!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("NetlifyCmsApp",["react","react-dom"],t):"object"==typeof exports?exports.NetlifyCmsApp=t(require("react"),require("react-dom")):e.NetlifyCmsApp=t(e.React,e.ReactDOM)}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__50__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1601)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,n){e.exports=n(679)()},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"o",(function(){return b})),n.d(t,"p",(function(){return _})),n.d(t,"q",(function(){return w})),n.d(t,"r",(function(){return E})),n.d(t,"s",(function(){return k})),n.d(t,"t",(function(){return O})),n.d(t,"u",(function(){return T})),n.d(t,"v",(function(){return C})),n.d(t,"w",(function(){return A})),n.d(t,"x",(function(){return P})),n.d(t,"y",(function(){return R})),n.d(t,"z",(function(){return M})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return D})),n.d(t,"C",(function(){return j})),n.d(t,"D",(function(){return L})),n.d(t,"E",(function(){return N})),n.d(t,"F",(function(){return F})),n.d(t,"H",(function(){return B})),n.d(t,"I",(function(){return U})),n.d(t,"J",(function(){return z})),n.d(t,"G",(function(){return q})),n.d(t,"a",(function(){return H}));var r=n(25),i=n(158),o=n(52);function a(e){for(var t=h(),n=0,r=e.length;ni&&(u|=o.a.RIGHT),la&&(u|=o.a.ABOVE),u===o.a.UNKNOWN&&(u=o.a.INTERSECTING),u}function h(){return[1/0,1/0,-1/0,-1/0]}function m(e,t,n,r,i){return i?(i[0]=e,i[1]=t,i[2]=n,i[3]=r,i):[e,t,n,r]}function g(e){return m(1/0,1/0,-1/0,-1/0,e)}function v(e,t){var n=e[0],r=e[1];return m(n,r,n,r,t)}function y(e,t){return x(g(t),e)}function b(e,t,n,r,i){return k(g(i),e,t,n,r)}function _(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function w(e,t){return t[0]e[2]&&(e[2]=t[2]),t[1]e[3]&&(e[3]=t[3]),e}function E(e,t){t[0]e[2]&&(e[2]=t[0]),t[1]e[3]&&(e[3]=t[1])}function x(e,t){for(var n=0,r=t.length;nt[0]?r[0]=e[0]:r[0]=t[0],e[1]>t[1]?r[1]=e[1]:r[1]=t[1],e[2]=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function B(e){return e[2]=u&&s<=d),r||!(a&o.a.RIGHT)||i&o.a.RIGHT||(r=(l=v-(g-d)*y)>=c&&l<=f),r||!(a&o.a.BELOW)||i&o.a.BELOW||(r=(s=g-(v-c)/y)>=u&&s<=d),r||!(a&o.a.LEFT)||i&o.a.LEFT||(r=(l=v-(g-u)*y)>=c&&l<=f)}return r}function H(e,t,n){var r=[e[0],e[1],e[0],e[3],e[2],e[1],e[2],e[3]];return t(r,r,2),function(e,t,n){return m(Math.min.apply(null,e),Math.min.apply(null,t),Math.max.apply(null,e),Math.max.apply(null,t),n)}([r[0],r[2],r[4],r[6]],[r[1],r[3],r[5],r[7]],n)}},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:q(e)}function r(e){return s(e)?e:H(e)}function i(e){return l(e)?e:W(e)}function o(e){return a(e)&&!u(e)?e:G(e)}function a(e){return!(!e||!e[d])}function s(e){return!(!e||!e[f])}function l(e){return!(!e||!e[p])}function u(e){return s(e)||l(e)}function c(e){return!(!e||!e[h])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=s,n.isIndexed=l,n.isAssociative=u,n.isOrdered=c,n.Keyed=r,n.Indexed=i,n.Set=o;var d="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",m={},g={value:!1},v={value:!1};function y(e){return e.value=!1,e}function b(e){e&&(e.value=!0)}function _(){}function w(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?E(e)+t:t}function k(){return!0}function S(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function O(e,t){return C(e,t,0)}function T(e,t){return C(e,t,t)}function C(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var A,P,R,M="function"==typeof Symbol&&Symbol.iterator,I=M||"@@iterator";function D(e){this.next=e}function j(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function L(){return{value:void 0,done:!0}}function N(e){return!!U(e)}function F(e){return e&&"function"==typeof e.next}function B(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(M&&e[M]||e["@@iterator"]);if("function"==typeof t)return t}function z(e){return e&&"number"==typeof e.length}function q(e){return null==e?X():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new K(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function H(e){return null==e?X().toKeyedSeq():a(e)?s(e)?e.toSeq():e.fromEntrySeq():J(e)}function W(e){return null==e?X():a(e)?s(e)?e.entrySeq():e.toIndexedSeq():Z(e)}function G(e){return(null==e?X():a(e)?s(e)?e.entrySeq():e:Z(e)).toSetSeq()}function V(e){this._array=e,this.size=e.length}function K(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function Q(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function X(){return A||(A=new V([]))}function J(e){var t=Array.isArray(e)?new V(e).fromEntrySeq():F(e)?new Y(e).fromEntrySeq():N(e)?new $(e).fromEntrySeq():"object"==typeof e?new K(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function Z(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return z(e)?new V(e):F(e)?new Y(e):N(e)?new $(e):void 0}function te(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new D((function(){var e=i[n?o-a:a];return a++>o?{value:void 0,done:!0}:j(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,i){return Array.isArray(n)?t.call(i,r,W(n).map((function(r,i){return e(t,r,i,n)}))):oe(n)?t.call(i,r,H(n).map((function(r,i){return e(t,r,i,n)}))):n}(t,e,"",{"":e}):ie(e)}function ie(e){return Array.isArray(e)?W(e).map(ie).toList():oe(e)?H(e).map(ie).toMap():e}function oe(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function se(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||l(e)!==l(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every((function(e,t){var i=r.next().value;return i&&ae(i[1],e)&&(n||ae(i[0],t))}))&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var d=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):i?!ae(t,e.get(r,m)):!ae(e.get(r,m),t))return d=!1,!1}));return d&&e.size===f}function le(e,t){if(!(this instanceof le))return new le(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(P)return P;P=this}}function ue(e,t){if(!e)throw new Error(t)}function ce(e,t,n){if(!(this instanceof ce))return new ce(e,t,n);if(ue(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:j(e,i,n[t?r-i++:i++])}))},t(K,H),K.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},K.prototype.has=function(e){return this._object.hasOwnProperty(e)},K.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},K.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new D((function(){var a=r[t?i-o:o];return o++>i?{value:void 0,done:!0}:j(e,a,n[a])}))},K.prototype[h]=!0,t($,W),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=B(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=B(this._iterable);if(!F(n))return new D(L);var r=0;return new D((function(){var t=n.next();return t.done?t:j(e,r++,t.value)}))},t(Y,W),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return j(e,i,r[i++])}))},t(le,W),le.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},le.prototype.get=function(e,t){return this.has(e)?this._value:t},le.prototype.includes=function(e){return ae(this._value,e)},le.prototype.slice=function(e,t){var n=this.size;return S(e,t,n)?this:new le(this._value,T(t,n)-O(e,n))},le.prototype.reverse=function(){return this},le.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},le.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},le.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?{value:void 0,done:!0}:j(e,o++,a)}))},ce.prototype.equals=function(e){return e instanceof ce?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},t(de,n),t(fe,de),t(pe,de),t(he,de),de.Keyed=fe,de.Indexed=pe,de.Set=he;var me="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ge(e){return e>>>1&1073741824|3221225471&e}function ve(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ge(n)}if("string"===t)return e.length>Se?function(e){var t=Ce[e];return void 0===t&&(t=ye(e),Te===Oe&&(Te=0,Ce={}),Te++,Ce[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Ee&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[ke]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[ke]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++xe,1073741824&xe&&(xe=0),Ee)be.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,ke,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[ke]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[ke]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},Pe.prototype.toString=function(){return this.__toString("Map {","}")},Pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Pe.prototype.set=function(e,t){return Ge(this,e,t)},Pe.prototype.setIn=function(e,t){return this.updateIn(e,m,(function(){return t}))},Pe.prototype.remove=function(e){return Ge(this,e,m)},Pe.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return m}))},Pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,i){var o=t===m,a=n.next();if(a.done){var s=o?r:t,l=i(s);return l===s?t:l}ue(o||t&&t.set,"invalid keyPath");var u=a.value,c=o?m:t.get(u,m),d=e(c,n,r,i);return d===c?t:d===m?t.remove(u):(o?We():t).set(u,d)}(this,Yt(e),t,n);return r===m?void 0:r},Pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):We()},Pe.prototype.merge=function(){return Ye(this,void 0,arguments)},Pe.prototype.mergeWith=function(t){var n=e.call(arguments,1);return Ye(this,t,n)},Pe.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},Pe.prototype.mergeDeep=function(){return Ye(this,Qe,arguments)},Pe.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Ye(this,Xe(t),n)},Pe.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,We(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},Pe.prototype.sort=function(e){return wt(Ft(this,e))},Pe.prototype.sortBy=function(e,t){return wt(Ft(this,t,e))},Pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},Pe.prototype.asImmutable=function(){return this.__ensureOwner()},Pe.prototype.wasAltered=function(){return this.__altered},Pe.prototype.__iterator=function(e,t){return new Ue(this,e,t)},Pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},Pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?He(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Pe.isMap=Re;var Me,Ie="@@__IMMUTABLE_MAP__@@",De=Pe.prototype;function je(e,t){this.ownerID=e,this.entries=t}function Le(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ne(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Fe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Be(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ue(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&qe(e._root)}function ze(e,t){return j(e,t[0],t[1])}function qe(e,t){return{node:e,index:0,__prev:t}}function He(e,t,n,r){var i=Object.create(De);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function We(){return Me||(Me=He(0))}function Ge(e,t,n){var r,i;if(e._root){var o=y(g),a=y(v);if(r=Ve(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===m?-1:1:0)}else{if(n===m)return e;i=1,r=new je(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?He(i,r):We()}function Ve(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===m?e:(b(s),b(a),new Be(t,r,[i,o]))}function Ke(e){return e.constructor===Be||e.constructor===Fe}function $e(e,t,n,r,i){if(e.keyHash===r)return new Fe(t,r,[e.entry,i]);var o,a=31&(0===n?e.keyHash:e.keyHash>>>n),s=31&(0===n?r:r>>>n);return new Le(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var i=r?e:w(e);return i[t]=n,i}De[Ie]=!0,De.delete=De.remove,De.removeIn=De.deleteIn,je.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=tt)return function(e,t,n,r){e||(e=new _);for(var i=new Be(e,ve(n),[n,r]),o=0;o>>e)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Ze(o&i-1)].get(e+5,t,n,r)},Le.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ve(r));var s=31&(0===t?n:n>>>t),l=1<=nt)return function(e,t,n,r,i){for(var o=0,a=new Array(32),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Ne(e,o+1,a)}(e,f,u,s,h);if(c&&!h&&2===f.length&&Ke(f[1^d]))return f[1^d];if(c&&h&&1===f.length&&Ke(h))return h;var g=e&&e===this.ownerID,v=c?h?u:u^l:u|l,y=c?h?et(f,d,h,g):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a>>e),o=this.nodes[i];return o?o.get(e+5,t,n,r):r},Ne.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ve(r));var s=31&(0===t?n:n>>>t),l=i===m,u=this.nodes,c=u[s];if(l&&!c)return this;var d=Ve(c,e,t+5,n,r,i,o,a);if(d===c)return this;var f=this.count;if(c){if(!d&&--f0&&r<32?pt(0,r,5,null,new lt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function ot(e){return!(!e||!e[at])}t(it,pe),it.of=function(){return this(arguments)},it.prototype.toString=function(){return this.__toString("List [","]")},it.prototype.get=function(e,t){if((e=x(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,i=e._root,o=y(v);return t>=_t(e._capacity)?r=mt(r,e.__ownerID,0,t,n,o):i=mt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,i,r):e}(this,e,t)},it.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},it.prototype.insert=function(e,t){return this.splice(e,0,t)},it.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},it.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new lt([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var s=gt(this,e);if(!o)for(var l=0;l>>t&31;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=gt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var ut,ct,dt={};function ft(e,t){var n=e._origin,r=e._capacity,i=_t(r),o=e._tail;return a(e._root,e._level,0);function a(e,s,l){return 0===s?function(e,a){var s=a===i?o&&o.array:e&&e.array,l=a>n?0:n-a,u=r-a;return u>32&&(u=32),function(){if(l===u)return dt;var e=t?--u:l++;return s&&s[e]}}(e,l):function(e,i,o){var s,l=e&&e.array,u=o>n?0:n-o>>i,c=1+(r-o>>i);return c>32&&(c=32),function(){for(;;){if(s){var e=s();if(e!==dt)return e;s=null}if(u===c)return dt;var n=t?--c:u++;s=a(l&&l[n],i-5,o+(n<>>n&31,l=e&&s0){var u=e&&e.array[s],c=mt(u,t,n-5,r,i,o);return c===u?e:((a=gt(e,t)).array[s]=c,a)}return l&&e.array[s]===i?e:(b(o),a=gt(e,t),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function gt(e,t){return t&&e&&t===e.ownerID?e:new lt(e?e.array.slice():[],t)}function vt(e,t){if(t>=_t(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new _,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new lt(u&&u.array.length?[void 0,u]:[],r),c+=1<<(l+=5);c&&(a+=c,i+=c,s+=c,o+=c);for(var d=_t(o),f=_t(s);f>=1<d?new lt([],r):p;if(p&&f>d&&a5;g-=5){var v=d>>>g&31;m=m.array[v]=gt(m.array[v],r)}m.array[d>>>5&31]=p}if(s=f)a-=f,s-=f,l=5,u=null,h=h&&h.removeBefore(r,0,a);else if(a>i||f>>l&31;if(y!==f>>>l&31)break;y&&(c+=(1<i&&(u=u.removeBefore(r,l,a-c)),u&&fo&&(o=u.size),a(l)||(u=u.map((function(e){return re(e)}))),r.push(u)}return o>e.size&&(e=e.setSize(o)),Je(e,t,r)}function _t(e){return e<32?0:e-1>>>5<<5}function wt(e){return null==e?kt():Et(e)?e:kt().withMutations((function(t){var n=r(e);Ae(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function Et(e){return Re(e)&&c(e)}function xt(e,t,n,r){var i=Object.create(wt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function kt(){return ct||(ct=xt(We(),ht()))}function St(e,t,n){var r,i,o=e._map,a=e._list,s=o.get(t),l=void 0!==s;if(n===m){if(!l)return e;a.size>=32&&a.size>=2*o.size?(r=(i=a.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):xt(r,i)}function Ot(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function Ct(e){this._iter=e,this.size=e.size}function At(e){this._iter=e,this.size=e.size}function Pt(e){var t=Vt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new D((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function Rt(e,t,n){var r=Vt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,m);return o===m?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate((function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new D((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return j(r,s,t.call(n,a[1],s,e),i)}))},r}function Mt(e,t){var n=Vt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Pt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Kt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function It(e,t,n,r){var i=Vt(e);return r&&(i.has=function(r){var i=e.get(r,m);return i!==m&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,m);return o!==m&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate((function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),s=0;return new D((function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return j(i,r?u:s++,c,o)}}))},i}function Dt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),S(t,n,i))return e;var o=O(t,i),a=T(n,i);if(o!=o||a!=a)return Dt(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l==l&&(s=l<0?0:l);var u=Vt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&Q(e)&&s>=0&&(u.get=function(t,n){return(t=x(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return r||1===t?e:j(t,l-1,0===t?void 0:e.value[1],e)}))},u}function jt(e,t,n,r){var i=Vt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate((function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return l++,i(e,r?o:l-1,a)})),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(2,o),l=!0,u=0;return new D((function(){var e,o,c;do{if((e=s.next()).done)return r||1===i?e:j(i,u++,0===i?void 0:e.value[1],e);var d=e.value;o=d[0],c=d[1],l&&(l=t.call(n,c,o,a))}while(l);return 2===i?e:j(i,o,c,e)}))},i}function Lt(e,t){var n=s(e),i=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?J(e):Z(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&s(o)||l(e)&&l(o))return o}var u=new V(i);return n?u=u.toKeyedSeq():l(e)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=i.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),u}function Nt(e,t,n){var r=Vt(e);return r.__iterateUncached=function(r,i){var o=0,s=!1;return function e(l,u){var c=this;l.__iterate((function(i,l){return(!t||u0}function zt(e,t,r){var i=Vt(e);return i.size=new V(r).map((function(e){return e.size})).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map((function(e){return e=n(e),B(i?e.reverse():e)})),a=0,s=!1;return new D((function(){var n;return s||(n=o.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?{value:void 0,done:!0}:j(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},i}function qt(e,t){return Q(e)?t:e.constructor(t)}function Ht(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Wt(e){return Ae(e.size),E(e)}function Gt(e){return s(e)?r:l(e)?i:o}function Vt(e){return Object.create((s(e)?H:l(e)?W:G).prototype)}function Kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):q.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):wn(e,t)},gn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Ae(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):wn(t,n)},gn.prototype.pop=function(){return this.slice(1)},gn.prototype.unshift=function(){return this.push.apply(this,arguments)},gn.prototype.unshiftAll=function(e){return this.pushAll(e)},gn.prototype.shift=function(){return this.pop.apply(this,arguments)},gn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):En()},gn.prototype.slice=function(e,t){if(S(e,t,this.size))return this;var n=O(e,this.size);if(T(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):wn(r,i)},gn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},gn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},gn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new D((function(){if(r){var t=r.value;return r=r.next,j(e,n++,t)}return{value:void 0,done:!0}}))},gn.isStack=vn;var yn,bn="@@__IMMUTABLE_STACK__@@",_n=gn.prototype;function wn(e,t,n,r){var i=Object.create(_n);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function En(){return yn||(yn=wn(0))}function xn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}_n[bn]=!0,_n.withMutations=De.withMutations,_n.asMutable=De.asMutable,_n.asImmutable=De.asImmutable,_n.wasAltered=De.wasAltered,n.Iterator=D,xn(n,{toArray:function(){Ae(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Tt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Ot(this,!0)},toMap:function(){return Pe(this.toKeyedSeq())},toObject:function(){Ae(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return wt(this.toKeyedSeq())},toOrderedSet:function(){return cn(s(this)?this.valueSeq():this)},toSet:function(){return tn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Ct(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return gn(s(this)?this.valueSeq():this)},toList:function(){return it(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return qt(this,Lt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Ae(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1})),n},filter:function(e,t){return qt(this,It(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ae(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ae(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return qt(this,Rt(this,e,t))},reduce:function(e,t,n){var r,i;return Ae(this.size),arguments.length<2?i=!0:r=t,this.__iterate((function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return qt(this,Mt(this,!0))},slice:function(e,t){return qt(this,Dt(this,e,t,!0))},some:function(e,t){return!this.every(Cn(e),t)},sort:function(e){return qt(this,Ft(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return E(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Pe().asMutable();return e.__iterate((function(i,o){r.update(t.call(n,i,o,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return se(this,e)},entrySeq:function(){var e=this;if(e._cache)return new V(e._cache);var t=e.toSeq().map(Tn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Cn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(k)},flatMap:function(e,t){return qt(this,function(e,t,n){var r=Gt(e);return e.toSeq().map((function(i,o){return r(t.call(n,i,o,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return qt(this,Nt(this,e,!0))},fromEntrySeq:function(){return new At(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,i=Yt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,m):m)===m)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=s(e),i=(c(e)?wt():Pe()).asMutable();e.__iterate((function(o,a){i.update(t.call(n,o,a,e),(function(e){return(e=e||[]).push(r?[a,o]:o),e}))}));var o=Gt(e);return i.map((function(t){return qt(e,o(t))}))}(this,e,t)},has:function(e){return this.get(e,m)!==m},hasIn:function(e){return this.getIn(e,m)!==m},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},keySeq:function(){return this.toSeq().map(On).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Bt(this,e)},maxBy:function(e,t){return Bt(this,t,e)},min:function(e){return Bt(this,e?An(e):Mn)},minBy:function(e,t){return Bt(this,t?An(t):Mn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return qt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return qt(this,jt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Cn(e),t)},sortBy:function(e,t){return qt(this,Ft(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return qt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return qt(this,function(e,t,n){var r=Vt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate((function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)})),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),s=!0;return new D((function(){if(!s)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,o)?2===r?e:j(r,l,u,e):(s=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Cn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=c(e),n=s(e),r=t?1:0;return function(e,t){return t=me(t,3432918353),t=me(t<<15|t>>>-15,461845907),t=me(t<<13|t>>>-13,5),t=me((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ge((t=me(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+In(ve(e),ve(t))|0}:function(e,t){r=r+In(ve(e),ve(t))|0}:t?function(e){r=31*r+ve(e)|0}:function(e){r=r+ve(e)|0}),r)}(this))}});var kn=n.prototype;kn[d]=!0,kn[I]=kn.values,kn.__toJS=kn.toArray,kn.__toStringMapper=Pn,kn.inspect=kn.toSource=function(){return this.toString()},kn.chain=kn.flatMap,kn.contains=kn.includes,xn(r,{flip:function(){return qt(this,Pt(this))},mapEntries:function(e,t){var n=this,r=0;return qt(this,this.toSeq().map((function(i,o){return e.call(t,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return qt(this,this.toSeq().flip().map((function(r,i){return e.call(t,r,i,n)})).flip())}});var Sn=r.prototype;function On(e,t){return t}function Tn(e,t){return[t,e]}function Cn(e){return function(){return!e.apply(this,arguments)}}function An(e){return function(){return-e.apply(this,arguments)}}function Pn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Rn(){return w(arguments)}function Mn(e,t){return et?-1:0}function In(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Sn[f]=!0,Sn[I]=kn.entries,Sn.__toJS=kn.toObject,Sn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Pn(e)},xn(i,{toKeyedSeq:function(){return new Ot(this,!1)},filter:function(e,t){return qt(this,It(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return qt(this,Mt(this,!1))},slice:function(e,t){return qt(this,Dt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=O(e,e<0?this.count():this.size);var r=this.slice(0,e);return qt(this,1===n?r:r.concat(w(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return qt(this,Nt(this,e,!1))},get:function(e,t){return(e=x(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=x(this,e))>=0&&(void 0!==this.size?this.size===1/0||e=15&&(d=!1,l=!0);var E=y&&(u||d&&(null==w||w<12.11)),x=n||a&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,O=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return T(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?j=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(j=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function K(e){for(;V.length<=e;)V.push($(V)+" ");return V[e]}function $(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u,c=a.length,d=[],f=0;f-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function he(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){be(e),_e(e)}function xe(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Oe,Te=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ce(e){if(null==Se){var t=A("span","​");C(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Se?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Oe)return Oe;var t=C(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Oe=r.right-n.right<3)}var Pe,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Pe=A("div"))||(Pe.setAttribute("oncopy","return;"),"function"==typeof Pe.oncopy),De=null,je={},Le={};function Ne(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Fe(e){if("string"==typeof e&&Le.hasOwnProperty(e))e=Le[e];else if(e&&"string"==typeof e.name&&Le.hasOwnProperty(e.name)){var t=Le[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Fe(t);var n=je[t.name];if(!n)return Be(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ue={};function ze(e,t){N(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function He(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function We(e,t,n){return!e.startState||e.startState(t,n)}var Ge=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ve(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?et(n,Ve(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},Ge.prototype.sol=function(){return this.pos==this.lineStart},Ge.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ge.prototype.next=function(){if(this.post},Ge.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ge.prototype.skipToEnd=function(){this.pos=this.string.length},Ge.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ge.prototype.backUp=function(e){this.pos-=e},Ge.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ge.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ge.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ge.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ge.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],o={};_t(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,u=0;n.state=!0,_t(e,t.text,s.mode,n,(function(e,t){for(var n=l;ue&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),o=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ct(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ve(o,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=F(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}(e,t,n),a=o>r.first&&Ve(r,o-1).stateAfter,s=a?ct.fromSaved(r,a,o):new ct(r,We(r.mode),o);return r.iter(o,t,(function(n){ht(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,n){return t instanceof ut?new ct(e,qe(e.mode,t.state),n,t.lookAhead):new ct(e,qe(e.mode,t),n)},ct.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ve(a,(t=st(a,t)).line),u=pt(e,t.line,n),c=new Ge(l.text,e.options.tabSize,u);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,d.pos),d.pos=t.length,l=null):l=bt(gt(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;u=t:o.to>t);(r||(r=[])).push(new xt(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||Mt(n,o.marker)<0)&&(n=o.marker)}return n}function Nt(e,t,n,r,i){var o=Ve(e,t),a=Et&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Dt(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var n=Ve(e,t),r=Ft(n);return n==r?t:Qe(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ve(e,t);if(!zt(e,r))return t;for(;n=jt(r);)r=n.find(1,!0).line;return Qe(r)+1}function zt(e,t){var n=Et&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Vt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Ct(e)}Vt.prototype.lineNo=function(){return Qe(this)},ye(Vt);var $t={},Yt={};function Qt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:$t;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=P("span",null,null,l?"padding-right: .1px":null),r={pre:P("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Ae(e.display.measure)&&(a=ue(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,ft(e,o,t!=e.display.externalMeasured&&Qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=D(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=D(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ce(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function Jt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,o,l){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&d.from<=u);f++);if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=s="",f=null,d=null,v=1/0;for(var y=[],b=void 0,_=0;_h||E.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),E.className&&(l+=" "+E.className),E.css&&(s=(s?s+";":"")+E.css),E.startStyle&&w.from==h&&(c+=" "+E.startStyle),E.endStyle&&w.to==v&&(b||(b=[])).push(E.endStyle,w.to),E.title&&((f||(f={})).title=E.title),E.attributes)for(var x in E.attributes)(f||(f={}))[x]=E.attributes[x];E.collapsed&&(!d||Mt(d.marker,E)<0)&&(d=w)}else w.from>h&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=p)break;for(var O=Math.min(p,v);;){if(g){var T=h+g.length;if(!d){var C=T>O?g.slice(0,O-h):g;t.addToken(t,C,a?a+l:l,c,h+C.length==v?u:"",s,f)}if(T>=O){g=g.slice(O-h),h=O;break}h=T,c=""}g=i.slice(o,o=n[m++]),a=Qt(n[m++],t.cm.options)}}else for(var A=1;An)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Pn(e,t,n,r){return In(e,Mn(e,t),n,r)}function Rn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Ln(t.map,n,r),l=o.node,u=o.start,c=o.end,d=o.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;u&&re(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var p;u>0&&(d=r="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+ir(e.display),top:h.top,bottom:h.bottom}:jn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&i==l-s)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,u),f=ae,p=c(l,d,"before"==u);return null!=f&&(p.other=c(l,f,"before"!=u)),p}function $n(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ve(e.doc,t.line),i=Ht(r)+xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Qn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Xe(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ve(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ve(r,i);;){var s=er(e,a,i,t,n),l=Lt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;a=Ve(r,i=u.line)}}function Xn(e,t,n,r){r-=Hn(t);var i=t.text.length,o=oe((function(t){return In(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return In(e,n,t).top>r}),o,i)}}function Jn(e,t,n,r){return n||(n=Mn(e,t)),Xn(e,t,n,Wn(e,t,In(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Ht(t);var o=Mn(e,t),a=Hn(t),s=0,l=t.text.length,u=!0,c=ue(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?nr:tr)(e,t,n,o,c,r,i);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var f,p,h=null,m=null,g=oe((function(t){var n=In(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=_.bottom?1:0}return Yn(n,g=ie(t.text,g,1),p,v,r-f)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],u=1!=l.level;return Zn(Kn(e,et(n,u?l.to:l.from,u?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var u=1!=l.level,c=Kn(e,et(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Zn(c,o,a,!0)&&c.top>a&&(l=i[s-1])}return l}function nr(e,t,n,r,i,o,a){var s=Xn(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f=u||p.to<=l)){var h=In(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,m=hm)&&(c=p,d=m)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Dn){Dn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(A("br"));Dn.appendChild(document.createTextNode("x"))}C(e.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");C(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(zt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Ve(e.doc,u.line).text).length==u.ch){var c=F(l,l.length,e.options.tabSize)-l.length;u=et(u.line,Math.max(0,Math.round((o-Sn(e.display).left)/ir(e.display))-c))}return u}function cr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Bt(e.doc,t)i.viewFrom?pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)pr(e);else if(t<=i.viewFrom){var o=hr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(e)}else if(n>=i.viewTo){var a=hr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(e)}else{var s=hr(e,t,t,-1),l=hr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[cr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var i,o=cr(e,t),a=e.display.view;if(!Et||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Bt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,_=null==r&&t==f,w=0==d,E=!m||d==m.length-1;if(y.top-v.top<=3){var x=(u?_:b)&&E,k=(u?b:_)&&w?s:(g?v:y).left,S=x?l:(g?y:v).right;c(k,v.top,S-k,v.bottom)}else{var O,T,C,A;g?(O=u&&b&&w?s:v.left,T=u?l:h(e,i,"before"),C=u?s:h(t,i,"after"),A=u&&_&&E?l:y.right):(O=u?h(e,i,"before"):s,T=!u&&b&&w?l:v.right,C=!u&&_&&E?s:y.left,A=u?h(t,i,"after"):l),c(O,v.top,T-O,v.bottom),v.bottom0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Er(e){e.state.focused||(e.display.input.focus(),kr(e))}function xr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sr(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Sr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,O(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Or(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(Ye(i.line,l),Tr(i.line),i.rest))for(var p=0;pe.display.sizerWidth){var h=Math.ceil(u/ir(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t=a&&(o=Xe(t,Ht(Ve(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Cn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+kn(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Tn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Pr(e,t){null!=t&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Rr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Dr(e,$n(e,t.from),$n(e,t.to),t.margin))}function Dr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Mr(e,i.scrollLeft,i.scrollTop)}function jr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Lr(e,t,!0),n&&li(e),ri(e,100))}function Lr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Nr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Br=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Br.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Br.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Br.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Br.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Br.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Br.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function zr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;qr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Or(e),qr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function qr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Hr={native:Br,null:Ur};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Hr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Nr(e,t):jr(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Gr=0;function Vr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Gr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Qr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Or(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Pn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+On(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Xr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-xn(e.display))+"px;\n height: "+(t.bottom-t.top+On(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Kn(e,t),l=n&&n!=t?Kn(e,n):s,u=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(jr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(Nr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,l=dt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&fn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(pr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Et&&(o=Bt(e.doc,o),a=Ut(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,cr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Ht(Ve(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=mr(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=M();if(!t||!R(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&R(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(p=!1),cn(e,f,c,n)),p&&(T(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,c)))),a=f.node.nextSibling}else{var h=vn(e,f,c,n);o.insertBefore(h,a)}c+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),e.anchorNode&&R(document.body,e.anchorNode)&&R(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-Cn(e),n.top)}),t.visible=Cr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ai(e,t);r=!1){Or(e);var i=Fr(e);gr(e),zr(e,i),ci(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new oi(e,t);if(ai(e,n)){Or(e),si(e,n);var r=Fr(e);gr(e),zr(e,r),ci(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ci(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+On(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&l)e:for(var f=t.target,p=a.view;f!=s;f=f.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var xi=function(e,t){this.anchor=e,this.head=t};function ki(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:l>=0){var u=ot(s.from(),a.from()),c=it(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new xi(d?c:u,d?u:c))}}return new Ei(t,n)}function Si(e,t){return new Ei([new xi(e,t||e)],0)}function Oi(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ti(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Oi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Oi(t).ch-t.to.ch),et(n,r)}function Ci(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Di(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(i,i.lastOp==r)))a=$(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Oi(t):o.changes.push(Fi(e,t));else{var l=$(i.done);for(l&&l.ranges||qi(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function zi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,$(i.done),t))?i.done[i.done.length-1]=t:qi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Bi(i.undone)}function qi(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Hi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Wi(e){if(!e)return null;for(var t,n=0;n-1&&($(s)[d]=u[d],delete u[d])}}}return r}function Ki(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new xi(i,t)}return new xi(n||t,t)}function $i(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new Ei([Ki(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(he(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(d=ao(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=tt(d,n))&&(r<0?f<0:f>0))return io(e,d,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?u:c)&&(p=ao(e,p,r,p.line==t.line?o:null)),p?io(e,p,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ve(e,t.line)).text.length?t.line0)){var c=[l,1],d=tt(u.from,s.from),f=tt(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)co(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ci(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),ho(e,t,n,Ot(e,t));var r=[];Di(e,(function(e,n){n||-1!=U(r,e.history)||(yo(e.history,t),r.push(e.history)),ho(e,t,null,Ot(e,t))}))}}function fo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,u=0;u=0;--p){var h=f(p);if(h)return h.v}}}}function po(e,t){if(0!=t&&(e.first+=t,e.sel=new Ei(Y(e.sel.ranges,(function(e){return new xi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Ci(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Qe(Ft(Ve(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ii(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Wt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ve(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead1||!(this.children[0]instanceof _o))){var s=[];this.collapse(s),this.children=[new _o(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=P("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Nt(e,t.line,t,n,o)||t.line!=n.line&&Nt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ft(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new xt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){zt(e,t)&&Ye(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ko,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)dr(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)fr(u,c,"text");o.atomic&&no(u.doc),ln(u,"markerAdded",u,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Kr(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)uo(this,r[l]);s?Ji(this,s):this.cm&&Rr(this.cm)})),undo:ni((function(){fo(this,"undo")})),redo:ni((function(){fo(this,"redo")})),undoSelection:ni((function(){fo(this,"undo",!0)})),redoSelection:ni((function(){fo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Si(n,n)),f)for(var p=0;p=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Rr(e)}))}function Jo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zo(e,t,n){var r=Jo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ue(n,t.doc.direction);if(o){var a,s=i<0?$(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Mn(t,n);a=i<0?n.text.length-1:0;var c=In(t,u,a).top;a=oe((function(e){return In(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Jo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Ho.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ho.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ho.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ho.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ho.default=y?Ho.macDefault:Ho.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Xo(e,(function(t){if(t.empty()){var n=Ve(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ve(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,u=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",u),o||(be(t),r.addNew||$i(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",u),de(i.wrapper.ownerDocument,"mousemove",c),de(i.scroller,"dragstart",d),de(i.scroller,"drop",u),xr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,l=o.sel,u=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?u[s]:new xi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new xi(n,n)),n=ur(e,t,!0,!0),s=-1;else{var c=va(e,n,r.unit);a=r.extend?Ki(a,c.anchor,c.head,r.extend):c}r.addNew?-1==s?(s=u.length,Zi(o,ki(e,u.concat([a]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==r.unit&&!r.extend?(Zi(o,ki(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Qi(o,s,a,H):(s=0,Zi(o,new Ei([a],0),H),l=o.sel);var d=n;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],u=e.options.tabSize,c=F(Ve(o,n.line).text,n.ch,u),f=F(Ve(o,t.line).text,t.ch,u),p=Math.min(c,f),h=Math.max(c,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ve(o,m).text,y=G(v,p,u);p==h?i.push(new xi(et(m,y),et(m,y))):v.length>y&&i.push(new xi(et(m,y),et(m,G(v,h,u))))}i.length||i.push(new xi(n,n)),Zi(o,ki(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=a,w=va(e,t,r.unit),E=_.anchor;tt(w.anchor,E)>0?(b=w.head,E=ot(_.from(),w.anchor)):(b=w.anchor,E=it(_.to(),w.head));var x=l.ranges.slice(0);x[s]=function(e,t){var n=t.anchor,r=t.head,i=Ve(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=se(o,r.ch,r.sticky),d=c-a||(r.ch-n.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:d>0}var f=o[u+(l?-1:0)],p=l==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new xi(new et(n.line,h,m),r)}(e,new xi(st(o,E),b)),Zi(o,ki(e,x,s),H)}}var p=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(be(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&ke(t)?function t(n){var a=++h,s=ur(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=M(),f(s);var l=Cr(i,o);(s.line>=l.to||s.linep.bottom?20:0;u&&setTimeout(ei(e,(function(){h==a&&(i.scroller.scrollTop+=u,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,de(i.wrapper.ownerDocument,"mousemove",g),de(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):xe(e)==n.scroller&&be(e):2==i?(r&&$i(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(x?t.display.input.onContextMenu(e):xr(t)))}}function va(e,t,n){if("char"==n)return new xi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new xi(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new xi(r.from,r.to)}function ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return we(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return he(e,n,e,Xe(e.doc,o),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function _a(e,t){En(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},xa={},ka={};function Sa(e,t,n){if(!t!=!(n&&n!=Ea)){var r=e.display.dragFunctions,i=t?de:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Oa(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(O(e.display.wrapper,"CodeMirror-wrap"),Gt(e)),lr(e),dr(e),Un(e),setTimeout((function(){return zr(e)}),100)}function Ta(e,t){var n=this;if(!(this instanceof Ta))return new Ta(e,t);this.options=t=t?N(t):{},N(xa,t,!1);var r=t.value;"string"==typeof r?r=new Ro(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ta.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var u in o.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,ga)),de(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=ur(e,t);if(n&&!ba(e,t)&&!En(e.display,t)){be(t);var r=e.findWordAt(n);$i(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),de(t.scroller,"contextmenu",(function(t){return _a(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_a(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!En(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new xi(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(jr(e,t.scroller.scrollTop),Nr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return wi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Ee(t)},over:function(t){me(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,r)}}(e,t),Ee(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Mo<100))Ee(t);else if(!me(e,t)&&!En(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Io),leave:function(t){me(e,t)||Do(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return da.call(e,t)})),de(l,"keydown",ei(e,ca)),de(l,"keypress",ei(e,fa)),de(l,"focus",(function(t){return kr(e,t)})),de(l,"blur",(function(t){return Sr(e,t)}))}(this),No(),Vr(this),this.curOp.forceUpdate=!0,ji(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(L(kr,this),20):Sr(this),ka)ka.hasOwnProperty(u)&&ka[u](this,t[u],Ea);fi(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?F(Ve(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)f+=a,d+="\t";if(fa,l=Re(t),u=null;if(s&&r.ranges.length>1)if(Pa&&Pa.text.join("\n")==t){if(r.ranges.length%Pa.text.length==0){u=[];for(var c=0;c=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+$(l).length)):s&&Pa&&Pa.lineWise&&Pa.text.join("\n")==t&&(h=m=et(h.line,0)));var g={from:h,to:m,text:u?u[f%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};uo(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Da(e,t),Rr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Ma(t,n,0,null,"paste")})),!0}function Da(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Aa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function ja(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&f>=c.begin)){var p=d?"before":"after";return new et(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,u(g)))?null:m}(e.cm,s,t,n):Zo(s,t,n))){if(r||(a=t.line+l)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(s=Ve(e,a))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var h=s.text.charAt(t.ch)||"\n",m=ee(h,f)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||p||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!p))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Qn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function za(e,t){var n=Rn(e,t.line);if(!n||n.hidden)return null;var r=Ve(e.doc,t.line),i=An(n,r,t.line),o=ue(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Ln(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function qa(e,t){return t&&(e.bad=!0),e}function Ha(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return qa(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&za(t,i)||{node:l[0].measure.map[2],offset:0},c=o.liner.firstLine()&&(a=et(a.line-1,Ve(r.doc,a.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=cr(r,a.line))?(t=Qe(i.view[0].line),n=i.view[0].node):(t=Qe(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,u,c=cr(r,s.line);if(c==i.view.length-1?(l=i.viewTo-1,u=i.lineDiv.lastChild):(l=Qe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function c(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void c(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(et(r,0),et(i+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&c(Ke(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var m=0;m1&&f.length>1;)if($(d)==$(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=et(t,p),E=et(l,f.length?$(f).length-h:0);return d.length>1||d[0]||tt(w,E)?(mo(r.doc,d,w,E,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return dr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ma)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Ga=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Ra({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=ja(r);Ra({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,q):(n.prevInput="",i.value=t.text.join("\n"),j(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!En(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){En(e,t)||be(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ga.prototype.createField=function(e){this.wrapper=Na(),this.textarea=this.wrapper.firstChild},Ga.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=Kn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ga.prototype.showSelection=function(e){var t=this.cm.display;C(t.cursorDiv,e.cursors),C(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ga.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&j(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ga.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ga.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Me(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),u=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Zi)(n.doc,Si(o),q);var c,f=i.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=window.scrollY),r.input.focus(),l&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),x){Ee(e);var m=function(){pe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ga.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Pi(e)}),!0),n("indentUnit",2,Pi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ri(e),Un(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Qo(t),i=n!=Ea&&Qo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Oa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return zr(e)}),!0),n("scrollbarStyle","native",(function(e){Wr(e),zr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Sr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Sa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ri,!0),n("addModeClass",!1,Ri,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ri,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ta),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Qo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Aa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Rr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Qi(this.doc,r,new xi(o,u[r].to()),q)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,Ve(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Ve(this.doc,e)}else r=e;return Wn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ht(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,u=(e=Kn(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&jr(o,s.scrollTop),null!=s.scrollLeft&&Nr(o,s.scrollLeft))},triggerOnKeyDown:ti(ca),triggerOnKeyPress:ti(fa),triggerOnKeyUp:da,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Da(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&lr(this),he(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),ji(this,e),Un(this),this.display.input.reset(),Mr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ta);var Va="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Ro.prototype)Ro.prototype.hasOwnProperty(Ka)&&U(Va,Ka)<0&&(Ta.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ro.prototype[Ka]));return ye(Ro),Ta.inputStyles={textarea:Ga,contenteditable:Ua},Ta.defineMode=function(e){Ta.defaults.mode||"null"==e||(Ta.defaults.mode=e),Ne.apply(this,arguments)},Ta.defineMIME=function(e,t){Le[e]=t},Ta.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ta.defineMIME("text/plain","null"),Ta.defineExtension=function(e,t){Ta.prototype[e]=t},Ta.defineDocExtension=function(e,t){Ro.prototype[e]=t},Ta.fromTextArea=function(e,t){if((t=t?N(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=M();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ta((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=de,e.wheelEventPixels=_i,e.Doc=Ro,e.splitLines=Re,e.countColumn=F,e.findColumn=G,e.isWordChar=Z,e.Pass=z,e.signal=he,e.Line=Vt,e.changeEnd=Oi,e.scrollbarModel=Hr,e.Pos=et,e.cmpPos=tt,e.modes=je,e.mimeModes=Le,e.resolveMode=Fe,e.getMode=Be,e.modeExtensions=Ue,e.extendMode=ze,e.copyState=qe,e.startState=We,e.innerMode=He,e.commands=ta,e.keyMap=Ho,e.keyName=Yo,e.isModifierKey=Ko,e.lookupKey=Vo,e.normalizeKeyMap=Go,e.StringStream=Ge,e.SharedTextMarker=To,e.TextMarker=So,e.LineWidget=Eo,e.e_preventDefault=be,e.e_stopPropagation=_e,e.e_stop=Ee,e.addClass=I,e.contains=R,e.rmClass=O,e.keyNames=Bo}(Ta),Ta.version="5.52.0",Ta}()},function(e,t,n){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var i=0;function o(e){return e.ol_uid||(e.ol_uid=String(++i))}var a="5.3.3"},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return u})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0p)&&(B=(q=q.replace(" ",":")).length),00){var r=n.connection.filter?n.connection.filter:[];r.sort();var i=t,o={};return r.forEach((function(e){o[e]=i[e]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=e;if(t){var l=s()(t);a+="("+l+")"}return n&&Object.keys(n).forEach((function(e){-1===c.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@"+e+"("+JSON.stringify(n[e])+")":a+="@"+e)})),a}function f(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return l(n,r,i,t)})),n}return null}function p(e){return e.alias?e.alias.value:e.name.value}function h(e){return"Field"===e.kind}function m(e){return"InlineFragment"===e.kind}function g(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function v(e,t){return void 0===t&&(t=!1),Object(o.a)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function y(e){return null!=e&&"object"==typeof e&&"json"===e.type}function b(e,t){if(e.directives&&e.directives.length){var n={};return e.directives.forEach((function(e){n[e.name.value]=f(e,t)})),n}return null}function _(e,t){return void 0===t&&(t={}),(n=e.directives,n?n.filter(x).map((function(e){var t=e.arguments;e.name.value,Object(i.b)(t&&1===t.length,2);var n=t[0];Object(i.b)(n.name&&"if"===n.name.value,3);var r=n.value;return Object(i.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),4),{directive:e,ifArgument:n}})):[]).every((function(e){var n=e.directive,r=e.ifArgument,o=!1;return"Variable"===r.value.kind?(o=t[r.value.name.value],Object(i.b)(void 0!==o,1)):o=r.value.value,"skip"===n.name.value?!o:o}));var n}function w(e,t){return function(e){var t=[];return Object(r.visit)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function E(e){return e&&w(["client"],e)&&w(["export"],e)}function x(e){var t=e.name.value;return"skip"===t||"include"===t}function k(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.a(5);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(Object(i.b)(1===r.length,6),n=r[0].name.value),Object(o.a)(Object(o.a)({},e),{definitions:Object(o.f)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function S(e){for(var t=[],n=1;n1){var r=[];t=ie(t,r);for(var i=1;i1?(n=i,r=o):u>0&&(n+=s*u,r+=l*u)}return a(e,t,n,r)}function a(e,t,n,r){var i=n-e,o=r-t;return i*i+o*o}function s(e){for(var t=e.length,n=0;ni&&(i=a,r=o)}if(0===i)return null;var s=e[r];e[r]=e[n],e[n]=s;for(var l=n+1;l=0;f--){d[f]=e[f][t]/e[f][f];for(var p=f-1;p>=0;p--)e[p][t]-=e[p][f]*d[f]}return d}function l(e){return 180*e/Math.PI}function u(e){return e*Math.PI/180}function c(e,t){var n=e%t;return n*t<0?n+t:n}function d(e,t,n){return e+n*(t-e)}},function(e,t,n){"use strict";t.a=function(e,t){0}},function(e,t,n){"use strict";t.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Dropdown",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return r.DropdownItem}}),Object.defineProperty(t,"DropdownButton",{enumerable:!0,get:function(){return r.DropdownButton}}),Object.defineProperty(t,"StyledDropdownButton",{enumerable:!0,get:function(){return r.StyledDropdownButton}}),Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ListItemTopBar",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"Loader",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"FieldLabel",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"IconButton",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Toggle",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ToggleContainer",{enumerable:!0,get:function(){return u.ToggleContainer}}),Object.defineProperty(t,"ToggleBackground",{enumerable:!0,get:function(){return u.ToggleBackground}}),Object.defineProperty(t,"ToggleHandle",{enumerable:!0,get:function(){return u.ToggleHandle}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"WidgetPreviewContainer",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ObjectWidgetTopBar",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"GoBackButton",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"fonts",{enumerable:!0,get:function(){return h.fonts}}),Object.defineProperty(t,"colorsRaw",{enumerable:!0,get:function(){return h.colorsRaw}}),Object.defineProperty(t,"colors",{enumerable:!0,get:function(){return h.colors}}),Object.defineProperty(t,"lengths",{enumerable:!0,get:function(){return h.lengths}}),Object.defineProperty(t,"components",{enumerable:!0,get:function(){return h.components}}),Object.defineProperty(t,"buttons",{enumerable:!0,get:function(){return h.buttons}}),Object.defineProperty(t,"text",{enumerable:!0,get:function(){return h.text}}),Object.defineProperty(t,"shadows",{enumerable:!0,get:function(){return h.shadows}}),Object.defineProperty(t,"borders",{enumerable:!0,get:function(){return h.borders}}),Object.defineProperty(t,"transitions",{enumerable:!0,get:function(){return h.transitions}}),Object.defineProperty(t,"effects",{enumerable:!0,get:function(){return h.effects}}),Object.defineProperty(t,"reactSelectStyles",{enumerable:!0,get:function(){return h.reactSelectStyles}}),Object.defineProperty(t,"GlobalStyles",{enumerable:!0,get:function(){return h.GlobalStyles}}),t.NetlifyCmsUiDefault=void 0;var r=v(n(504)),i=m(n(148)),o=m(n(983)),a=m(n(984)),s=m(n(985)),l=m(n(986)),u=v(n(987)),c=m(n(989)),d=m(n(990)),f=m(n(991)),p=m(n(510)),h=n(102);function m(e){return e&&e.__esModule?e:{default:e}}function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}const y={Dropdown:r.default,DropdownItem:r.DropdownItem,DropdownButton:r.DropdownButton,StyledDropdownButton:r.StyledDropdownButton,ListItemTopBar:o.default,FieldLabel:s.default,Icon:i.default,IconButton:l.default,Loader:a.default,Toggle:u.default,ToggleContainer:u.ToggleContainer,ToggleBackground:u.ToggleBackground,ToggleHandle:u.ToggleHandle,AuthenticationPage:c.default,WidgetPreviewContainer:d.default,ObjectWidgetTopBar:f.default,fonts:h.fonts,colorsRaw:h.colorsRaw,colors:h.colors,lengths:h.lengths,components:h.components,buttons:h.buttons,shadows:h.shadows,text:h.text,borders:h.borders,transitions:h.transitions,effects:h.effects,reactSelectStyles:h.reactSelectStyles,GlobalStyles:h.GlobalStyles};t.NetlifyCmsUiDefault=y},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"g",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return h}));var r=n(25),i=new Array(6);function o(){return[1,0,0,1,0,0]}function a(e){return l(e,1,0,0,1,0,0)}function s(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=t[0],u=t[1],c=t[2],d=t[3],f=t[4],p=t[5];return e[0]=n*l+i*u,e[1]=r*l+o*u,e[2]=n*c+i*d,e[3]=r*c+o*d,e[4]=n*f+i*p+a,e[5]=r*f+o*p+s,e}function l(e,t,n,r,i,o,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e}function u(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e,t){var n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function d(e,t,n){return s(e,l(i,t,0,0,n,0,0))}function f(e,t,n){return s(e,l(i,1,0,0,1,t,n))}function p(e,t,n,r,i,o,a,s){var l=Math.sin(o),u=Math.cos(o);return e[0]=r*u,e[1]=i*l,e[2]=-r*l,e[3]=i*u,e[4]=a*r*u-s*r*l+t,e[5]=a*i*l+s*i*u+n,e}function h(e){var t,n=(t=e)[0]*t[3]-t[1]*t[2];Object(r.a)(0!==n,32);var i=e[0],o=e[1],a=e[2],s=e[3],l=e[4],u=e[5];return e[0]=s/n,e[1]=-o/n,e[2]=-a/n,e[3]=i/n,e[4]=(a*u-s*l)/n,e[5]=-(i*u-o*l)/n,e}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(6),i=Object.setPrototypeOf,o=void 0===i?function(e,t){return e.__proto__=t,e}:i,a=function(e){function t(n){void 0===n&&(n="Invariant Violation");var r=e.call(this,"number"==typeof n?"Invariant Violation: "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name="Invariant Violation",o(r,t.prototype),r}return Object(r.c)(t,e),t}(Error);function s(e,t){if(!e)throw new a(t)}function l(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=l("warn"),e.error=l("error")}(s||(s={}));var u={env:{}};if("object"==typeof e)u=e;else try{Function("stub","process = stub")(u)}catch(e){}}).call(this,n(69))},function(e,t,n){"use strict";n.r(t);var r=n(643),i=n.n(r),o=n(0);var a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(9),u=n(119),c=n(118),d=s,f=function(e){return"theme"!==e&&"innerRef"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:f};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},C=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},A=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},P=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);to)return 1}return e.size===t.size?0:null}function M(e){if(null==e)return null;if(r.List.isList(e))return e;if(Array.isArray(e))return Object(r.List)(e);throw new Error("Paths can only be created from arrays or lists, but you passed: "+e)}function I(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:B(e,t),r=e.slice(0,n),i=t.slice(0,n);return[r,i]}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size-1;return j(e,0-t,n)}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size-1,r=e.get(n),i=r+t,o=e.set(n,i);return o}function L(e,t){var n=I(e,t),r=A(n,2),i=r[0],o=r[1];return e.sizel},isPath:function(e){return(r.List.isList(e)||Array.isArray(e))&&e.every((function(e){return"number"==typeof e}))},isSibling:function(e,t){if(e.size!==t.size)return!1;var n=e.butLast(),r=t.butLast();return n.equals(r)},isYounger:F,lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.slice(0,-1*t);return n},drop:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.slice(t);return n},max:function(e,t){return Math.max(e.size,t.size)},min:B,relate:function(e,t){for(var n=[],r=0;r=i&&(e=D(e=j(e,1,a),i,a+1))),"move_node"===n){var c=t.newPath;if(N(o,c))return Object(r.List)([e]);u||s?e=F(o,c)&&o.sizee.offset||1===U.compare(this.path,e.path))}},{key:"isAfterRange",value:function(e){return!this.isUnset&&this.isAfterPoint(e.end)}},{key:"isAtEndOfRange",value:function(e){return!this.isUnset&&this.equals(e.end)}},{key:"isAtStartOfRange",value:function(e){return!this.isUnset&&this.equals(e.start)}},{key:"isBeforePoint",value:function(e){return!this.isUnset&&(this.key===e.key&&this.offset0&&void 0!==arguments[0]?arguments[0]:1;if(0===e)return this;if(e<0)return this.moveForward(-e);var t=this.setOffset(this.offset-e);return t}},{key:"moveForward",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(0===e)return this;if(e<0)return this.moveBackward(-e);var t=this.setOffset(this.offset+e);return t}},{key:"moveTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.key;"number"==typeof e?(t=e,e=this.path):"string"==typeof e?e=(n=e)===this.key?this.path:null:n=e.equals(this.path)?this.key:null;var r=this.merge({key:n,path:e,offset:t});return r}},{key:"moveToStartOfNode",value:function(e){var t=e.getFirstText();return this.moveTo(t.key,0)}},{key:"moveToEndOfNode",value:function(e){var t=e.getLastText();return this.moveTo(t.key,t.text.length)}},{key:"normalize",value:function(e){if(null==this.key&&null==this.path)return this.setOffset(null);var n=this.key,r=this.offset,i=this.path,o=i&&e.getNode(i);if(!o&&(o=e.getNode(n)))return this.merge({path:e.getPath(n)});if(!o){Object(a.a)(!1,"A point's `path` or `key` invalid and was reset!");var s=e.getFirstText();return s?this.merge({key:s.key,offset:0,path:e.getPath(s.key)}):t.create()}if("text"!==o.object){Object(a.a)(!1,"A point should not reference a non-text node!");var l=o.getTextAtOffset(r),u=o.getOffset(l.key);return this.merge({offset:r-u,key:l.key,path:e.getPath(l.key)})}o&&i&&n&&n!==o.key&&Object(a.a)(!1,"A point's `key` did not match its `path`!");var c=this.merge({key:o.key,path:null==i?e.getPath(o.key):i,offset:null==r?0:Math.min(r,o.text.length)});if(c.offset===o.text.length){var d=e.getClosestBlock(c.path).getNextText();d&&(c=c.merge({key:d.key,path:e.getPath(d.key),offset:0}))}return c}},{key:"setKey",value:function(e){return null!=e&&(e=_.create(e)),this.set("key",e)}},{key:"setOffset",value:function(e){return this.set("offset",e)}},{key:"setPath",value:function(e){return null!=e&&(e=U.create(e)),this.set("path",e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,key:this.key,offset:this.offset,path:this.path&&this.path.toArray()};return e.preserveKeys||delete t.key,t}},{key:"unset",value:function(){return this.merge({key:null,offset:null,path:null})}},{key:"isSet",get:function(){return null!=this.key&&null!=this.offset&&null!=this.path}},{key:"isUnset",get:function(){return!this.isSet}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isPoint(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Point.create` only accepts objects or points, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isPoint(e))return{key:e.key,offset:e.offset,path:e.path};if(o()(e)){var n={};return"key"in e&&(n.key=e.key),"offset"in e&&(n.offset=e.offset),"path"in e&&(n.path=U.create(e.path)),"path"in e&&!("key"in e)&&(n.key=null),"key"in e&&!("path"in e)&&(n.path=null),n}throw new Error("`Point.createProperties` only accepts objects or points, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.key,r=void 0===n?null:n,i=e.offset,o=void 0===i?null:i,a=e.path,s=void 0===a?null:a;return new t({key:r,offset:o,path:U.create(s)})}}]),t}(Object(r.Record)(z)),H=function(){function e(){E(this,e)}return x(e,null,[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.Map.isMap(t))return t;if(o()(t))return e.fromJSON(t);throw new Error("`Data.create` only accepts objects or maps, but you passed it: "+t)}},{key:"fromJSON",value:function(e){return new r.Map(e)}}]),e}();H.fromJS=H.fromJSON;var W={data:void 0,type:void 0},G=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){return{object:this.object,type:this.type,data:this.data.toJSON()}}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isMark(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Mark.create` only accepts objects, strings or marks, but you passed it: "+e)}},{key:"createSet",value:function(e){if(r.Set.isSet(e)||Array.isArray(e))return new r.Set(e.map(t.create));if(null==e)return Object(r.Set)();throw new Error("`Mark.createSet` only accepts sets, arrays or null, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isMark(e))return{data:e.data,type:e.type};if("string"==typeof e)return{type:e};if(o()(e)){var n={};return"type"in e&&(n.type=e.type),"data"in e&&(n.data=H.create(e.data)),n}throw new Error("`Mark.createProperties` only accepts objects, strings or marks, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.data,i=void 0===n?{}:n,o=e.type;if("string"!=typeof o)throw new Error("`Mark.fromJS` requires a `type` string.");return new t({type:o,data:new r.Map(i)})}},{key:"isMarkSet",value:function(e){return r.Set.isSet(e)&&e.every((function(e){return t.isMark(e)}))}}]),t}(Object(r.Record)(W)),V={type:void 0,data:void 0,anchor:void 0,focus:void 0},K=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"setProperties",value:function(e){return e=t.createProperties(e),this.merge(e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDecoration(e))return e;if(Z.isRange(e))return t.fromJSON(Z.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Decoration.create` only accepts objects or decorations, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Decoration.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDecoration(e))return{type:e.type,data:e.data,anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus),mark:G.create(e.mark)};if(o()(e)){var n={};return"type"in e&&(n.type=e.type),"data"in e&&(n.data=H.create(e.data)),"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Decoration.createProperties` only accepts objects or decorations, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,r=e.focus,i=e.type,o=e.data;if(e.mark&&!i&&(Object(a.a)(!1,"As of slate@0.47 the `decoration.mark` property has been changed to `decoration.type` and `decoration.data` directly."),i=e.mark.type,o=e.mark.data),!i)throw new Error("Decorations must be created with a `type`, but you passed: "+JSON.stringify(e));return new t({type:i,data:H.create(o||{}),anchor:q.fromJSON(n||{}),focus:q.fromJSON(r||{})})}}]),t}(Object(r.Record)(V)),$={anchor:void 0,focus:void 0,isFocused:void 0,marks:void 0},Y=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"setIsFocused",value:function(e){return this.set("isFocused",e)}},{key:"setMarks",value:function(e){return this.set("marks",e)}},{key:"setProperties",value:function(e){var n=e=t.createProperties(e),r=n.anchor,i=n.focus,o=T(n,["anchor","focus"]);return r&&(o.anchor=q.create(r)),i&&(o.focus=q.create(i)),this.merge(o)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e),isFocused:this.isFocused,marks:null==this.marks?null:this.marks.toArray().map((function(e){return e.toJSON()}))};return t}},{key:"isBlurred",get:function(){return!this.isFocused}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isSelection(e))return e;if(Z.isRange(e))return t.fromJSON(Z.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Selection.create` only accepts objects, ranges or selections, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isSelection(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus),isFocused:e.isFocused,marks:e.marks};if(Z.isRange(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),"isFocused"in e&&(n.isFocused=e.isFocused),"marks"in e&&(n.marks=null==e.marks?null:G.createSet(e.marks)),n}throw new Error("`Selection.createProperties` only accepts objects, ranges or selections, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,i=e.focus,o=e.isFocused,a=void 0!==o&&o,s=e.marks,l=void 0===s?null:s;return new t({anchor:q.fromJSON(n||{}),focus:q.fromJSON(i||{}),isFocused:a,marks:null==l?null:new r.Set(l.map(G.fromJSON))})}}]),t}(Object(r.Record)($)),Q={annotation:"@@__SLATE_ANNOTATION__@@",block:"@@__SLATE_BLOCK__@@",change:"@@__SLATE_CHANGE__@@",decoration:"@@__SLATE_DECORATION__@@",document:"@@__SLATE_DOCUMENT__@@",editor:"@@__SLATE_EDITOR__@@",inline:"@@__SLATE_INLINE__@@",leaf:"@@__SLATE_LEAF__@@",mark:"@@__SLATE_MARK__@@",operation:"@@__SLATE_OPERATION__@@",point:"@@__SLATE_POINT__@@",range:"@@__SLATE_RANGE__@@",selection:"@@__SLATE_SELECTION__@@",text:"@@__SLATE_TEXT__@@",value:"@@__SLATE_VALUE__@@"};function X(e,t){return!(!t||!t[Q[e]])}var J={anchor:void 0,focus:void 0},Z=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isRange(e))return"range"===e.object?e:t.fromJSON(t.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Range.create` only accepts objects or ranges, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Range.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isRange(e))return{anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Range.createProperties` only accepts objects, annotations, decorations, ranges or selections, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.anchor,r=e.focus;return new t({anchor:q.fromJSON(n||{}),focus:q.fromJSON(r||{})})}},{key:"isRange",value:function(e){return X("range",e)||K.isDecoration(e)||Y.isSelection(e)}}]),t}(Object(r.Record)(J)),ee={key:void 0,type:void 0,data:void 0,anchor:void 0,focus:void 0},te=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"setProperties",value:function(e){return e=t.createProperties(e),this.merge(e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,key:this.key,type:this.type,data:this.data.toJSON(),anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isAnnotation(e))return e;if(Z.isRange(e))return t.fromJSON(Z.createProperties(e));if(o()(e))return t.fromJSON(e);throw new Error("`Annotation.create` only accepts objects or annotations, but you passed it: "+e)}},{key:"createMap",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.Map.isMap(e))return e;if(o()(e)){var n={};for(var i in e){var a=e[i],s=t.create(a);n[i]=s}return Object(r.Map)(n)}throw new Error("`Annotation.createMap` only accepts arrays or lists, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isAnnotation(e))return{key:e.key,type:e.type,data:e.data,anchor:q.createProperties(e.anchor),focus:q.createProperties(e.focus)};if(o()(e)){var n={};return"key"in e&&(n.key=e.key),"type"in e&&(n.type=e.type),"data"in e&&(n.data=H.create(e.data)),"anchor"in e&&(n.anchor=q.create(e.anchor)),"focus"in e&&(n.focus=q.create(e.focus)),n}throw new Error("`Annotation.createProperties` only accepts objects or annotations, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.key,r=e.type,i=e.data,o=e.anchor,a=e.focus;if(!n)throw new Error("Annotations must be created with a `key`, but you passed: "+JSON.stringify(e));if(!r)throw new Error("Annotations must be created with a `type`, but you passed: "+JSON.stringify(e));return new t({key:n,type:r,data:H.create(i||{}),anchor:q.fromJSON(o||{}),focus:q.fromJSON(a||{})})}}]),t}(Object(r.Record)(ee)),ne={data:void 0,key:void 0,nodes:void 0},re=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isDocument(e))return e;if((r.List.isList(e)||Array.isArray(e))&&(e={nodes:e}),o()(e))return t.fromJSON(e);throw new Error("`Document.create` only accepts objects, arrays, lists or documents, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isDocument(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s;return new t({key:a,data:new r.Map(i),nodes:ue.createList(l)})}}]),t}(Object(r.Record)(ne)),ie={data:void 0,key:void 0,nodes:void 0,type:void 0},oe=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isInline(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Inline.create` only accepts objects, strings or inlines, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Inline.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isInline(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s,u=e.type;if("string"!=typeof u)throw new Error("`Inline.fromJS` requires a `type` string.");return new t({key:a,type:u,data:new r.Map(i),nodes:ue.createList(l)})}},{key:"isInlineList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isInline(e)}))}}]),t}(Object(r.Record)(ie)),ae={key:void 0,marks:void 0,text:void 0},se=Object(r.Record)({text:void 0,marks:void 0,annotations:void 0,decorations:void 0}),le=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"addMark",value:function(e){e=G.create(e);var t=this.marks.add(e);return this.set("marks",t)}},{key:"addMarks",value:function(e){return e=G.createSet(e),this.set("marks",this.marks.union(e))}},{key:"getLeaves",value:function(e,t){var n=[{text:this.text,marks:this.marks,annotations:[],decorations:[]}],i=function(e,t){return[{text:e.text.slice(0,t),marks:e.marks,annotations:[].concat(P(e.annotations)),decorations:[].concat(P(e.decorations))},{text:e.text.slice(t),marks:e.marks,annotations:[].concat(P(e.annotations)),decorations:[].concat(P(e.decorations))}]},o=function(r){var o="annotations"===r?e.values():t,a=!0,s=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=d.start,p=d.end,h=[],m=0,g=!0,v=!1,y=void 0;try{for(var b,_=n[Symbol.iterator]();!(g=(b=_.next()).done);g=!0){var w=b.value,E=w.text.length,x=m;if(m+=E,f.offset<=x&&p.offset>=x+E)w[r].push(d),h.push(w);else if(f.offset>x+E||p.offsetx){var P=i(k,f.offset-x),R=A(P,2);S=R[0],k=R[1]}k[r].push(d),S&&h.push(S),h.push(k),O&&h.push(O)}}}catch(e){v=!0,y=e}finally{try{!g&&_.return&&_.return()}finally{if(v)throw y}}n=h}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}};return o("annotations"),o("decorations"),n=n.map((function(e){return new se(S({},e,{annotations:Object(r.List)(e.annotations),decorations:Object(r.List)(e.decorations)}))})),Object(r.List)(n)}},{key:"insertText",value:function(e,t){var n=this.text,r=n.slice(0,e)+t+n.slice(e);return this.set("text",r)}},{key:"removeMark",value:function(e){e=G.create(e);var t=this.marks.remove(e);return this.set("marks",t)}},{key:"removeText",value:function(e,t){var n=this.text,r=n.slice(0,e)+n.slice(e+t);return this.set("text",r)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,text:this.text,marks:this.marks.toArray().map((function(e){return e.toJSON()}))};return e.preserveKeys&&(t.key=this.key),t}},{key:"setMark",value:function(e,t){var n=this.marks,r=G.create(e),i=r.merge(t),o=n.remove(r).add(i);return this.set("marks",o)}},{key:"splitText",value:function(e){var t=this.text;return[this.set("text",t.slice(0,e)),this.set("text",t.slice(e)).regenerateKey()]}},{key:"mergeText",value:function(e){var t=this.text+e.text;return this.set("text",t)}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(t.isText(e))return e;if("string"==typeof e&&(e={text:e}),o()(e))return t.fromJSON(e);throw new Error("`Text.create` only accepts objects, arrays, strings or texts, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Text.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isText(e))return e;Object(s.a)(null==e.leaves,"As of slate@0.46, the `leaves` property of text nodes has been removed! Each individual leaf should be created as a text node instead.");var n=e.text,r=void 0===n?"":n,i=e.marks,o=void 0===i?[]:i,a=e.key;return new t({key:void 0===a?_.create():a,text:r,marks:G.createSet(o)})}},{key:"isTextList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isText(e)}))}}]),t}(Object(r.Record)(ae)),ue=function(){function e(){E(this,e)}return x(e,null,[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.isNode(t))return t;if(o()(t)){var n=t.object;switch(!n&&t.kind&&(Object(a.a)(!1,"As of slate@0.32.0, the `kind` property of Slate objects has been renamed to `object`."),n=t.kind),n){case"block":return de.create(t);case"document":return re.create(t);case"inline":return oe.create(t);case"text":return le.create(t);default:throw new Error("`Node.create` requires a `object` string.")}}throw new Error("`Node.create` only accepts objects or nodes but you passed it: "+t)}},{key:"createList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(t)||Array.isArray(t)){var n=[];t.forEach((function(t){if(t&&"text"===t.object&&t.leaves&&Array.isArray(t.leaves)){Object(a.a)(!1,"As of slate@0.46, the `leaves` property of Text nodes has been removed. Instead, each text node contains a string of text and a unique set of marks and leaves are unnecessary.");var r=le.createList(t.leaves).toArray();n=n.concat(r)}else{var i=e.create(t);n.push(i)}}));var i=Object(r.List)(n);return i}throw new Error("`Node.createList` only accepts lists or arrays, but you passed it: "+t)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(de.isBlock(e)||oe.isInline(e))return{data:e.data,type:e.type};if("string"==typeof e)return{type:e};if(o()(e)){var t={};return"type"in e&&(t.type=e.type),"data"in e&&(t.data=H.create(e.data)),t}throw new Error("`Node.createProperties` only accepts objects, strings, blocks or inlines, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var t=e.object;switch(!t&&e.kind&&(Object(a.a)(!1,"As of slate@0.32.0, the `kind` property of Slate objects has been renamed to `object`."),t=e.kind),t){case"block":return de.fromJSON(e);case"document":return re.fromJSON(e);case"inline":return oe.fromJSON(e);case"text":return le.fromJSON(e);default:throw new Error("`Node.fromJSON` requires an `object` of either 'block', 'document', 'inline' or 'text', but you passed: "+e)}}},{key:"isNode",value:function(e){return de.isBlock(e)||re.isDocument(e)||oe.isInline(e)||le.isText(e)}},{key:"isNodeList",value:function(t){return r.List.isList(t)&&t.every((function(t){return e.isNode(t)}))}}]),e}(),ce={data:void 0,key:void 0,nodes:void 0,type:void 0},de=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,type:this.type,data:this.data.toJSON(),nodes:this.nodes.toArray().map((function(t){return t.toJSON(e)}))};return e.preserveKeys&&(t.key=this.key),t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isBlock(e))return e;if("string"==typeof e&&(e={type:e}),o()(e))return t.fromJSON(e);throw new Error("`Block.create` only accepts objects, strings or blocks, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Block.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isBlock(e))return e;var n=e.data,i=void 0===n?{}:n,o=e.key,a=void 0===o?_.create():o,s=e.nodes,l=void 0===s?[]:s,u=e.type;if("string"!=typeof u)throw new Error("`Block.fromJSON` requires a `type` string.");return new t({key:a,type:u,data:Object(r.Map)(i),nodes:ue.createList(l)})}},{key:"isBlockList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isBlock(e)}))}}]),t}(Object(r.Record)(ce)),fe={annotations:void 0,data:void 0,document:void 0,selection:void 0},pe=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"addAnnotation",value:function(e){e=te.create(e);var t=this,n=t,r=n.annotations,i=n.document,o=e.key;return e=e.updatePoints((function(e){return e.normalize(i)})),r=r.set(o,e),t=t.set("annotations",r)}},{key:"addMark",value:function(e,t){t=G.create(t);var n=this,r=n.document;return r=r.addMark(e,t),n=n.set("document",r)}},{key:"insertNode",value:function(e,t){var n=this,r=n.document;return r=r.insertNode(e,t),n=(n=n.set("document",r)).mapRanges((function(e){return e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"insertText",value:function(e,t,n){var r=this,i=r.document,o=i.assertNode(e);return i=i.insertText(e,t,n),o=i.assertNode(e),r=(r=r.set("document",i)).mapPoints((function(e){return e.key===o.key&&e.offset>=t?e.setOffset(e.offset+n.length):e}))}},{key:"mergeNode",value:function(e){var t=this,n=t.document,r=n.mergeNode(e);e=n.resolvePath(e);var i=U.decrement(e),o=n.getNode(i),a=n.getNode(e);return t=(t=t.set("document",r)).mapRanges((function(e){if("text"===a.object){var t=o.text.length;e.anchor.key===a.key&&(e=e.moveAnchorTo(o.key,t+e.anchor.offset)),e.focus.key===a.key&&(e=e.moveFocusTo(o.key,t+e.focus.offset))}return e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"moveNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this,i=r,o=i.document;return U.isEqual(e,t)?r:(o=o.moveNode(e,t,n),r=(r=r.set("document",o)).mapPoints((function(e){return e.setPath(null)})))}},{key:"removeAnnotation",value:function(e){e=te.create(e);var t=this,n=t.annotations,r=e.key;return n=n.delete(r),t=t.set("annotations",n)}},{key:"removeMark",value:function(e,t){t=G.create(t);var n=this,r=n.document;return r=r.removeMark(e,t),n=n.set("document",r)}},{key:"removeNode",value:function(e){var t=this,n=t.document,r=n.assertNode(e),i="text"===r.object?r:r.getFirstText()||r,o="text"===r.object?r:r.getLastText()||r,a=n.getPreviousText(i.key),s=n.getNextText(o.key);return n=n.removeNode(e),t=(t=t.set("document",n)).mapRanges((function(e){var t=e,n=t.anchor,i=t.focus;return r.hasNode(n.key)&&(e=a?e.moveAnchorTo(a.key,a.text.length):s?e.moveAnchorTo(s.key,0):e.unset()),r.hasNode(i.key)&&(e=a?e.moveFocusTo(a.key,a.text.length):s?e.moveFocusTo(s.key,0):e.unset()),e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"removeText",value:function(e,t,n){var r=this,i=r.document,o=i.assertNode(e);i=i.removeText(e,t,n),r=r.set("document",i);var a=n.length,s=t,l=t+a;return r=r.mapPoints((function(e){return e.key!==o.key?e:e.offset>=l?e.setOffset(e.offset-a):e.offset>s?e.setOffset(s):e}))}},{key:"setAnnotation",value:function(e,t){t=te.createProperties(t);var n=te.create(e),r=n.merge(t),i=this,o=i.annotations,a=n.key;return o=o.set(a,r),i=i.set("annotations",o)}},{key:"setNode",value:function(e,t){var n=this,r=n.document;return r=r.setNode(e,t),n=n.set("document",r)}},{key:"setMark",value:function(e,t,n){var r=this,i=r.document;return i=i.setMark(e,t,n),r=r.set("document",i)}},{key:"setProperties",value:function(e){var t=this,n=t.document,r=e.data,i=e.annotations,o={};return r&&(o.data=r),i&&(o.annotations=i.map((function(e){return e.isSet?e:n.resolveAnnotation(e)}))),t=t.merge(o)}},{key:"setSelection",value:function(e){var t=this,n=t,r=n.document,i=n.selection,o=i.setProperties(e);return i=r.resolveSelection(o),t=t.set("selection",i)}},{key:"splitNode",value:function(e,t,n){var r=this,i=r.document,o=i.splitNode(e,t,n),a=i.assertNode(e);return r=(r=r.set("document",o)).mapRanges((function(e){var n=o.getNextText(a.key),r=e,i=r.anchor,s=r.focus;return a.key===i.key&&t<=i.offset&&(e=e.moveAnchorTo(n.key,i.offset-t)),a.key===s.key&&t<=s.offset&&(e=e.moveFocusTo(n.key,s.offset-t)),e=e.updatePoints((function(e){return e.setPath(null)}))}))}},{key:"mapRanges",value:function(e){var t=this,n=t,r=n.document,i=n.selection,o=n.annotations,a=i.isSet?e(i):i;a||(a=i.unset()),a!==i&&(a=r.createSelection(a)),t=t.set("selection",a);var s=o.map((function(t){var n=t.isSet?e(t):t;return n&&n!==t&&(n=r.createAnnotation(n)),n}));return s=s.filter((function(e){return!!e})),t=t.set("annotations",s)}},{key:"mapPoints",value:function(e){return this.mapRanges((function(t){return t.updatePoints(e)}))}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,document:this.document.toJSON(e)};return e.preserveData&&(t.data=this.data.toJSON(e)),e.preserveAnnotations&&(t.annotations=this.annotations.map((function(t){return t.toJSON(e)})).toObject()),e.preserveSelection&&(t.selection=this.selection.toJSON(e)),t}},{key:"change",value:function(){Object(s.a)(!1,"As of Slate 0.42.0, value object are no longer schema-aware, and the `value.change()` method is no longer available. Use the `editor.change()` method on the new `Editor` controller instead.")}},{key:"startBlock",get:function(){return this.selection.start.key&&this.document.getClosestBlock(this.selection.start.key)}},{key:"endBlock",get:function(){return this.selection.end.key&&this.document.getClosestBlock(this.selection.end.key)}},{key:"anchorBlock",get:function(){return this.selection.anchor.key&&this.document.getClosestBlock(this.selection.anchor.key)}},{key:"focusBlock",get:function(){return this.selection.focus.key&&this.document.getClosestBlock(this.selection.focus.key)}},{key:"startInline",get:function(){return this.selection.start.key&&this.document.getClosestInline(this.selection.start.key)}},{key:"endInline",get:function(){return this.selection.end.key&&this.document.getClosestInline(this.selection.end.key)}},{key:"anchorInline",get:function(){return this.selection.anchor.key&&this.document.getClosestInline(this.selection.anchor.key)}},{key:"focusInline",get:function(){return this.selection.focus.key&&this.document.getClosestInline(this.selection.focus.key)}},{key:"startText",get:function(){return this.selection.start.key&&this.document.getDescendant(this.selection.start.key)}},{key:"endText",get:function(){return this.selection.end.key&&this.document.getDescendant(this.selection.end.key)}},{key:"anchorText",get:function(){return this.selection.anchor.key&&this.document.getDescendant(this.selection.anchor.key)}},{key:"focusText",get:function(){return this.selection.focus.key&&this.document.getDescendant(this.selection.focus.key)}},{key:"nextBlock",get:function(){return this.selection.end.key&&this.document.getNextBlock(this.selection.end.key)}},{key:"previousBlock",get:function(){return this.selection.start.key&&this.document.getPreviousBlock(this.selection.start.key)}},{key:"nextInline",get:function(){return this.selection.end.key&&this.document.getNextInline(this.selection.end.key)}},{key:"previousInline",get:function(){return this.selection.start.key&&this.document.getPreviousInline(this.selection.start.key)}},{key:"nextText",get:function(){return this.selection.end.key&&this.document.getNextText(this.selection.end.key)}},{key:"previousText",get:function(){return this.selection.start.key&&this.document.getPreviousText(this.selection.start.key)}},{key:"marks",get:function(){return this.selection.isUnset?new r.Set:this.selection.marks||this.document.getMarksAtRange(this.selection)}},{key:"activeMarks",get:function(){return this.selection.isUnset?new r.Set:this.selection.marks||this.document.getActiveMarksAtRange(this.selection)}},{key:"blocks",get:function(){return this.selection.isUnset?new r.List:this.document.getLeafBlocksAtRange(this.selection)}},{key:"fragment",get:function(){return this.selection.isUnset?re.create():this.document.getFragmentAtRange(this.selection)}},{key:"inlines",get:function(){return this.selection.isUnset?new r.List:this.document.getLeafInlinesAtRange(this.selection)}},{key:"texts",get:function(){return this.selection.isUnset?new r.List:this.document.getTextsAtRange(this.selection)}},{key:"history",get:function(){Object(s.a)(!1,"As of Slate 0.42.0, the `value.history` model no longer exists, and the history is stored in `value.data` instead using plugins.")}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.isValue(e))return e;if(o()(e))return t.fromJSON(e,n);throw new Error("`Value.create` only accepts objects or values, but you passed it: "+e)}},{key:"createProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isValue(e))return{annotations:e.annotations,data:e.data};if(o()(e)){var n={};return"annotations"in e&&(n.annotations=te.createMap(e.annotations)),"data"in e&&(n.data=H.create(e.data)),n}throw new Error("`Value.createProperties` only accepts objects or values, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.data,r=void 0===n?{}:n,i=e.annotations,o=void 0===i?{}:i,a=e.document,s=void 0===a?{}:a,l=e.selection,u=void 0===l?{}:l;if(r=H.fromJSON(r),u=(s=re.fromJSON(s)).createSelection(u),o=te.createMap(o),u.isUnset){var c=s.getFirstText();c&&(u=u.moveToStartOfNode(c)),u=s.createSelection(u)}return new t({annotations:o,data:r,document:s,selection:u})}}]),t}(Object(r.Record)(fe)),he=u()("slate:operation:apply");function me(e,t){var n=(t=_e.create(t)).type;switch(he(n,t),n){case"add_annotation":var r=t.annotation;return e.addAnnotation(r);case"add_mark":var i=t,o=i.path,a=i.mark;return e.addMark(o,a);case"insert_node":var s=t,l=s.path,u=s.node;return e.insertNode(l,u);case"insert_text":var c=t,d=c.path,f=c.offset,p=c.text,h=c.marks;return e.insertText(d,f,p,h);case"merge_node":var m=t.path;return e.mergeNode(m);case"move_node":var g=t,v=g.path,y=g.newPath;return e.moveNode(v,y);case"remove_annotation":var b=t.annotation;return e.removeAnnotation(b);case"remove_mark":var _=t,w=_.path,E=_.mark;return e.removeMark(w,E);case"remove_node":var x=t.path;return e.removeNode(x);case"remove_text":var k=t,S=k.path,O=k.offset,T=k.text;return e.removeText(S,O,T);case"set_annotation":var C=t,A=C.properties,P=C.newProperties;return e.setAnnotation(A,P);case"set_mark":var R=t,M=R.path,I=R.properties,D=R.newProperties;return e.setMark(M,I,D);case"set_node":var j=t,L=j.path,N=j.newProperties;return e.setNode(L,N);case"set_selection":var F=t.newProperties;return e.setSelection(F);case"set_value":var B=t.newProperties;return e.setProperties(B);case"split_node":var U=t,z=U.path,q=U.position,H=U.properties;return e.splitNode(z,q,H);default:throw new Error('Unknown operation type: "'+n+'".')}}var ge=u()("slate:operation:invert");function ve(e){var t=(e=_e.create(e)).type;switch(ge(t,e),t){case"move_node":var n=e,r=n.newPath,i=n.path;if(U.isEqual(r,i))return e;var o=U.transform(i,e).first(),a=U.transform(U.increment(i),e).first();return e.set("path",o).set("newPath",a);case"merge_node":var s=e.path,l=U.decrement(s);return e.set("type","split_node").set("path",l);case"split_node":var u=e.path,c=U.increment(u);return e.set("type","merge_node").set("path",c);case"set_annotation":case"set_node":case"set_value":case"set_selection":case"set_mark":var d=e,f=d.properties,p=d.newProperties;return e.set("properties",p).set("newProperties",f);case"insert_node":case"insert_text":return e.set("type",t.replace("insert_","remove_"));case"remove_node":case"remove_text":return e.set("type",t.replace("remove_","insert_"));case"add_annotation":case"add_mark":return e.set("type",t.replace("add_","remove_"));case"remove_annotation":case"remove_mark":return e.set("type",t.replace("remove_","add_"));default:throw new Error('Unknown operation type: "'+t+'".')}}var ye={add_mark:["path","mark","data"],add_annotation:["annotation","data"],insert_node:["path","node","data"],insert_text:["path","offset","text","data"],merge_node:["path","position","properties","target","data"],move_node:["path","newPath","data"],remove_annotation:["annotation","data"],remove_mark:["path","mark","data"],remove_node:["path","node","data"],remove_text:["path","offset","text","data"],set_annotation:["properties","newProperties","data"],set_mark:["path","properties","newProperties","data"],set_node:["path","properties","newProperties","data"],set_selection:["properties","newProperties","data"],set_value:["properties","newProperties","data"],split_node:["path","position","properties","target","data"]},be={annotation:void 0,data:void 0,length:void 0,mark:void 0,marks:void 0,newPath:void 0,newProperties:void 0,node:void 0,offset:void 0,path:void 0,position:void 0,properties:void 0,target:void 0,text:void 0,type:void 0},_e=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"apply",value:function(e){return me(e,this)}},{key:"invert",value:function(){return ve(this)}},{key:"toJSON",value:function(){var e=this.object,t=this.type,n={object:e,type:t},r=ye[t],i=!0,o=!1,a=void 0;try{for(var s,l=r[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=this[u];if("annotation"!==u&&"mark"!==u&&"marks"!==u&&"node"!==u&&"path"!==u&&"newPath"!==u||(c=c.toJSON()),"properties"===u&&"merge_node"===t){var d={};"data"in c&&(d.data=c.data.toJS()),"type"in c&&(d.type=c.type),c=d}if(("properties"===u||"newProperties"===u)&&"set_annotation"===t){var f={};"anchor"in c&&(f.anchor=c.anchor.toJS()),"focus"in c&&(f.focus=c.focus.toJS()),"key"in c&&(f.key=c.key),"data"in c&&(f.data=c.data.toJS()),"type"in c&&(f.type=c.type),c=f}if(("properties"===u||"newProperties"===u)&&"set_mark"===t){var p={};"data"in c&&(p.data=c.data.toJS()),"type"in c&&(p.type=c.type),c=p}if(("properties"===u||"newProperties"===u)&&"set_node"===t){var h={};"data"in c&&(h.data=c.data.toJS()),"type"in c&&(h.type=c.type),c=h}if(("properties"===u||"newProperties"===u)&&"set_selection"===t){var m={};"anchor"in c&&(m.anchor=c.anchor.toJSON()),"focus"in c&&(m.focus=c.focus.toJSON()),"isFocused"in c&&(m.isFocused=c.isFocused),"marks"in c&&(m.marks=c.marks&&c.marks.toJSON()),c=m}if(("properties"===u||"newProperties"===u)&&"set_value"===t){var g={};"data"in c&&(g.data=c.data.toJS()),c=g}if("properties"===u&&"split_node"===t){var v={};"data"in c&&(v.data=c.data.toJS()),"type"in c&&(v.type=c.type),c=v}"data"===u&&(c=c.toJSON()),n[u]=c}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}return n}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isOperation(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Operation.create` only accepts objects or operations, but you passed it: "+e)}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Operation.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){if(t.isOperation(e))return e;var n=e.type,i=ye[n],o={type:n};if(!i)throw new Error('`Operation.fromJSON` was passed an unrecognized operation type: "'+n+'"');var a=!0,s=!1,l=void 0;try{for(var u,c=i[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=e[d];if("data"===d&&void 0===f&&(f={}),void 0===f)throw new Error('`Operation.fromJSON` was passed a "'+n+'" operation without the required "'+d+'" attribute.');"annotation"===d&&(f=te.create(f)),"path"!==d&&"newPath"!==d||(f=U.create(f)),"mark"===d&&(f=G.create(f)),"node"===d&&(f=ue.create(f)),"properties"!==d&&"newProperties"!==d||"set_annotation"!==n||(f=te.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_mark"!==n||(f=G.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_node"!==n&&"merge_node"!==n&&"split_node"!==n||(f=ue.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_selection"!==n||(f=Y.createProperties(f)),"properties"!==d&&"newProperties"!==d||"set_value"!==n||(f=pe.createProperties(f)),"data"===d&&(f=Object(r.Map)(f)),o[d]=f}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}return new t(o)}},{key:"isOperationList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isOperation(e)}))}}]),t}(Object(r.Record)(be)),we={operations:void 0,value:void 0},Ee=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,value:this.value.toJSON(e),operations:this.operations.toArray().map((function(t){return t.toJSON(e)}))};return t}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isChange(e))return e;if(o()(e))return t.fromJSON(e);throw new Error("`Change.create` only accepts objects or changes, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.value,r=e.operations,i=void 0===r?[]:r;return new t({value:pe.create(n),operations:_e.createList(i)})}}]),t}(Object(r.Record)(we));function xe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function t(t,n,r){var i=t.type,o=t.args,a=e[i];if(!a)return r();n.command.apply(n,[a].concat(P(o)))}function n(t,n){for(var r in e)t.registerCommand(r);return n()}return{onCommand:t,onConstruct:n}}var ke=/\s/,Se=/['\u2018\u2019]/,Oe=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;function Te(e){return 55296<=e&&e<=57343}function Ce(e,t,n){if(55356===e){var r=t.charCodeAt(n+1);return r<=57343&&r>=57339}return!1}function Ae(e){return e<=65039&&e>=65024}function Pe(e,t){if(ke.test(e))return!1;if(Se.test(e)){var n=t.charAt(0),r=Re(n);if(Pe(n=t.slice(0,r),t.slice(r)))return!0}return!Oe.test(e)}function Re(e){return Te(e.charCodeAt(0))?2:1}function Me(e,t,n){var r,i=0;if(""===e)return 1;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:1;return e=e.slice(0,t),Me(e=Object(c.reverse)(e),n)},getCharOffsetForward:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Me(e=e.slice(t),n,!0)},getWordOffset:Ie,getWordOffsetBackward:function(e,t){return e=e.slice(0,t),Ie(e=Object(c.reverse)(e))},getWordOffsetForward:function(e,t){return Ie(e=e.slice(t))},isSurrogate:Te,isWord:Pe};function je(e,t){t.isExpanded&&e.deleteAtRange(t);var n=e.value.document,r=t,i=r.start,o=r.end;return t=n.hasDescendant(i.path)?t.moveToStart():t.moveTo(o.path,0).normalize(n)}var Le={addMarkAtRange:function(e,t,n){if(!t.isCollapsed){var r=e.value.document,i=t.start,o=t.end,a=r.getTextsAtRange(t);e.withoutNormalizing((function(){a.forEach((function(t){var r=t.key,a=0,s=t.text.length;r===i.key&&(a=i.offset),r===o.key&&(s=o.offset),r===i.key&&r===o.key&&(s=o.offset-i.offset),e.addMarkByKey(r,a,s,n)}))}))}},addMarksAtRange:function(e,t,n){n.forEach((function(n){return e.addMarkAtRange(t,n)}))},deleteAtRange:function(e,t){e.snapshotSelection();var n=e.value,r=t.start,i=t.end,o=r.key,a=r.offset,s=i.key,l=i.offset,u=n.document,c=u.hasVoidParent(o,e),d=u.hasVoidParent(s,e),f=u.getClosestBlock(o),p=u.getClosestBlock(s),h=0===a&&0===l&&!1===c&&o===f.getFirstText().key&&s===p.getFirstText().key&&o!==s;if(h&&d){var m=u.getPreviousText(s);s=m.key,l=m.text.length,d=u.hasVoidParent(s,e)}e.withoutNormalizing((function(){for(;c;){var t=u.getClosestVoid(o,e),n=u.getNextText(o);if(e.removeNodeByKey(t.key),o===s)return;if(!n)return;u=e.value.document,o=n.key,a=0,c=u.hasVoidParent(o,e)}for(;d;){var r=u.getClosestVoid(s,e),i=u.getPreviousText(s);e.removeNodeByKey(r.key),u=e.value.document,s=i.key,l=i.text.length,d=u.hasVoidParent(s,e)}if(o===s&&h)e.removeNodeByKey(f.key);else if(o!==s){f=u.getClosestBlock(o),p=u.getClosestBlock(s);var m=u.getNode(o),g=u.getNode(s),v=m.text.length-a,y=l,b=u.getCommonAncestor(o,s),_=b.getFurthestChild(o),w=b.getFurthestChild(s),E=u.getParent(f.key),x=E.nodes.indexOf(f),k=E.nodes.indexOf(p),S=void 0;for(S=m;S.key!==_.key;){var O=u.getParent(S.key),T=O.nodes.indexOf(S);O.nodes.slice(T+1).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=O}var C=b.nodes.indexOf(_),P=b.nodes.indexOf(w);for(b.nodes.slice(C+1,P).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=g;S.key!==w.key;){var R=u.getParent(S.key),M=R.nodes.indexOf(S);R.nodes.slice(0,M).reverse().forEach((function(t){e.removeNodeByKey(t.key)})),S=R}if(0!==v&&e.removeTextByKey(o,a,v),0!==y&&e.removeTextByKey(s,0,l),f.key!==p.key){u=e.value.document;var I=void 0,D=!0,j=!1,L=void 0;try{for(var N,F=u.ancestors(p.key)[Symbol.iterator]();!(D=(N=F.next()).done);D=!0){var B=N.value,U=A(B,1)[0];if(U.nodes.size>1)break;I=U}}catch(e){j=!0,L=e}finally{try{!D&&F.return&&F.return()}finally{if(j)throw L}}k!==x+1&&e.moveNodeByKey(p.key,E.key,x+1),h?e.removeNodeByKey(f.key):e.mergeNodeByKey(p.key),I&&e.removeNodeByKey(I.key)}}else{var z=a,q=l-a;e.removeTextByKey(o,z,q)}}))},deleteBackwardAtRange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){var r=e.value,i=r.document,o=t,a=o.start,s=o.focus;if(t.isExpanded)e.deleteAtRange(t);else{var l=i.getClosestVoid(a.path,e);if(l)e.removeNodeByKey(l.key);else if(!a.isAtStartOfNode(i)){var u=i.getClosestBlock(a.path);if(1!==i.nodes.size&&u&&""===u.text&&1===u.nodes.size)e.removeNodeByKey(u.key);else{var c=i.getDescendant(a.path);if(a.isAtStartOfNode(c)){var d=i.getPreviousText(c.key),f=i.getClosestInline(c.key);f&&""===d.text&&(d=i.getPreviousText(d.key));var p=i.getClosestBlock(d.key),h=i.getClosestVoid(d.key,e);if(h)return void e.removeNodeByKey(h.key);if(1===n&&p!==u)return t=t.moveAnchorTo(d.key,d.text.length),void e.deleteAtRange(t)}if(n<=s.offset)return t=t.moveFocusBackward(n),void e.deleteAtRange(t);for(var m=c,g=0,v=s.offset;n>v;){var y=v+(m=i.getPreviousText(m.key)).text.length;if(n<=y){g=y-n;break}v=y}t=t.moveAnchorTo(m.key,g),e.deleteAtRange(t)}}}}},deleteCharBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=De.getCharOffsetBackward(a,o);e.deleteBackwardAtRange(t,s)}},deleteCharForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=De.getCharOffsetForward(a,o);e.deleteForwardAtRange(t,s)}},deleteForwardAtRange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){var r=e.value,i=r.document,o=t,a=o.start,s=o.focus;if(t.isExpanded)e.deleteAtRange(t);else{var l=i.getClosestVoid(a.path,e);if(l)e.removeNodeByKey(l.key);else{var u=i.getClosestBlock(a.path);if(u&&!e.isVoid(u)&&""===u.text&&1!==i.nodes.size){var c=i.getNextBlock(u.key);return e.removeNodeByKey(u.key),void(c&&c.key&&e.moveToStartOfNode(c))}if(!a.isAtEndOfNode(i)){var d=i.getDescendant(a.path);if(a.isAtEndOfNode(d)){var f=i.getNextText(d.key),p=i.getClosestBlock(f.key),h=i.getClosestVoid(f.key,e);if(h)return void e.removeNodeByKey(h.key);if(1===n&&p!==u)return t=t.moveFocusTo(f.key,0),void e.deleteAtRange(t)}if(n<=d.text.length-s.offset)return t=t.moveFocusForward(n),void e.deleteAtRange(t);for(var m=d,g=s.offset,v=d.text.length-s.offset;n>v;){var y=v+(m=i.getNextText(m.key)).text.length;if(n<=y){g=n-v;break}v=y}t=t.moveFocusTo(m.key,g),e.deleteAtRange(t)}}}}},deleteLineBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path).getOffset(r.key)+r.offset;e.deleteBackwardAtRange(t,i)}},deleteLineForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset;e.deleteForwardAtRange(t,i.text.length-o)}},deleteWordBackwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=0===o?1:De.getWordOffsetBackward(a,o);e.deleteBackwardAtRange(t,s)}},deleteWordForwardAtRange:function(e,t){if(t.isExpanded)e.deleteAtRange(t);else{var n=e.value.document,r=t.start,i=n.getClosestBlock(r.path),o=i.getOffset(r.key)+r.offset,a=i.text,s=De.getWordOffsetForward(a,o),l=0===s?1:s;e.deleteForwardAtRange(t,l)}},insertBlockAtRange:function(e,t,n){t=je(e,t),n=de.create(n);var r=e.value.document,i=t.start,o=i.key,a=i.offset,s=r.getClosestBlock(o),l=r.getClosestInline(o),u=r.getParent(s.key),c=u.nodes.indexOf(s),d=Ne(e,t);if("before"===d)e.insertNodeByKey(u.key,c,n);else if("behind"===d)e.insertNodeByKey(u.key,c+1,n);else{if(l&&e.isVoid(l)){var f=i.isAtEndOfNode(l),p=f?r.getNextText(o):r.getPreviousText(o),h=f?t.moveToStartOfNode(p):t.moveToEndOfNode(p);o=h.start.key,a=h.start.offset}e.withoutNormalizing((function(){e.splitDescendantsByKey(s.key,o,a),e.insertNodeByKey(u.key,c+1,n)}))}}},Ne=function(e,t){var n=e.value.document,r=t.start,i=r.key,o=n.getClosestBlock(i),a=n.getClosestInline(i);return e.isVoid(o)?r.isAtEndOfNode(o)?"behind":"before":a||""!==o.text?r.isAtStartOfNode(o)?"before":r.isAtEndOfNode(o)?"behind":"split":"behind"};Le.insertFragmentAtRange=function(e,t,n){e.withoutNormalizing((function(){if(t=je(e,t),n.nodes.size){n=n.mapDescendants((function(e){return e.regenerateKey()}));var i=t.start,o=e.value.document,a=o.getDescendant(i.path),s=o.getClosestBlock(a.key),l=s.getFurthestChild(a.key),u=i.isAtStartOfNode(s),c=o.getParent(s.key),d=c.nodes.indexOf(s),f=n.getBlocks(),p=n.nodes.first(),h=n.nodes.last(),m=f.first(),g=f.last(),v=Fe(n,o,s.key);if(m===g&&e.isVoid(m))e.insertBlockAtRange(t,m);else if(v!==n||!p.hasBlockChildren()&&!h.hasBlockChildren()){if(m!==g){var y=v.getFurthest(m.key,(function(e){return 1===e.nodes.size}))||m,b=c.nodes.indexOf(s);v.removeNode(y.key).nodes.forEach((function(t,n){var r=b+n+1;e.insertNodeByKey(c.key,r,t)}))}if(0!==i.offset&&e.splitDescendantsByKey(l.key,i.key,i.offset),a=(o=e.value.document).getDescendant(i.key),l=(s=o.getClosestBlock(i.key)).getFurthestChild(a.key),m!==g){var _=u?l:s.getNextSibling(l.key),w=_?s.nodes.skipUntil((function(e){return e.key===_.key})):Object(r.List)(),E=g.nodes.size;w.forEach((function(t,n){var r=E+n;e.moveNodeByKey(t.key,g.key,r)}))}if(e.isVoid(s)||""!==s.text||s.findDescendant((function(t){return e.isVoid(t)}))){var x=s.getFurthestChild(a.key),k=s.nodes.indexOf(x);m.nodes.forEach((function(t,n){var r=0===i.offset?0:1,o=k+n+r;e.insertNodeByKey(s.key,o,t)}))}else e.removeNodeByKey(s.key),e.insertNodeByKey(c.key,d,m)}else{("before"===Ne(e,t)?n.nodes:n.nodes.reverse()).forEach((function(n){e.insertBlockAtRange(t,n)}))}}}))};var Fe=function(e,t,n){var r=function(e,t){return t.size>=e.size&&e.every((function(e,n){return t.get(n).type===e.type}))},i=function(e,t){return e.getAncestors(t).slice(1).push(e.getNode(t)).reverse()},o=function(e){for(var t=e;1===t.nodes.size&&"block"===t.nodes.first().object;)t=t.nodes.first();return t===e?null:t}(e);return o?function(t,n){var i=t.size-n.size;if(i<0)return e;for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:1,r=t=je(e,t),i=r.start,o=r.end,a=e.value,s=a,l=s.document,u=l.assertDescendant(i.path),c=l.getClosestBlock(u.key),d=0;c&&"block"===c.object&&d2&&void 0!==arguments[2]?arguments[2]:1/0,r=t=je(e,t),i=r.start,o=e.value,a=o.document,s=a.assertDescendant(i.path),l=a.getClosestInline(s.key),u=0;l&&"inline"===l.object&&u3&&void 0!==arguments[3]?arguments[3]:n,i=t.start,o=t.end,a=t.moveToStart(),s=t.moveToEnd();i.path.equals(o.path)&&(s=s.moveForward(n.length)),e.withoutNormalizing((function(){e.insertTextAtRange(a,n),e.insertTextAtRange(s,r)}))};var Be={addMarkByPath:function(e,t,n,r,i){i=G.create(i),e.addMarksByPath(t,n,r,[i])},addMarksByPath:function(e,t,n,r,i){if((i=G.createSet(i)).size){var o=e.value.document.assertNode(t);e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=U.increment(t),n=0),i.forEach((function(n){e.applyOperation({type:"add_mark",path:t,mark:G.create(n)})}))}))}},replaceMarksByPath:function(e,t,n,r,i){var o=G.createSet(i),a=e.value.document.assertNode(t);a.marks.equals(o)||e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=U.increment(t),n=0);var i=o.subtract(a.marks);a.marks.subtract(o).forEach((function(n){e.applyOperation({type:"remove_mark",path:t,mark:G.create(n)})})),i.forEach((function(n){e.applyOperation({type:"add_mark",path:t,mark:G.create(n)})}))}))},insertFragmentByPath:function(e,t,n,r){r.nodes.forEach((function(r,i){e.insertNodeByPath(t,n+i,r)}))},insertNodeByPath:function(e,t,n,r){e.applyOperation({type:"insert_node",path:t.concat(n),node:r})},insertTextByPath:function(e,t,n,r,i){var o=e.value,a=o.annotations;o.document.assertNode(t),e.withoutNormalizing((function(){var o=!0,s=!1,l=void 0;try{for(var u,c=a.values()[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var d=u.value,f=d.start,p=d.end;e.isAtomic(d)&&(f.path.equals(t)&&f.offsetn)&&e.removeAnnotation(d))}}catch(e){s=!0,l=e}finally{try{!o&&c.return&&c.return()}finally{if(s)throw l}}e.applyOperation({type:"insert_text",path:t,offset:n,text:r}),i&&e.replaceMarksByPath(t,n,r.length,i)}))},mergeNodeByPath:function(e,t){var n=e.value.document,r=n.getDescendant(t),i=n.getPreviousSibling(t);if(!i)throw new Error('Unable to merge node with path "'+t+'", because it has no previous sibling.');var o="text"===i.object?i.text.length:i.nodes.size;e.applyOperation({type:"merge_node",path:t,position:o,properties:{type:r.type,data:r.data},target:null})},moveNodeByPath:function(e,t,n,r){if(U.isEqual(t,n))return e;var i=n.concat(r);if(U.isEqual(t,i))return e;e.applyOperation({type:"move_node",path:t,newPath:i})},removeMarkByPath:function(e,t,n,r,i){i=G.create(i),e.removeMarksByPath(t,n,r,[i])},removeMarksByPath:function(e,t,n,r,i){if((i=G.createSet(i)).size){var o=e.value.document.assertNode(t);i.intersect(o.marks).isEmpty()||e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=U.increment(t),n=0),i.forEach((function(i){e.applyOperation({type:"remove_mark",path:t,offset:n,length:r,mark:i})}))}))}},removeAllMarksByPath:function(e,t){var n=e.state.document.assertNode(t);e.withoutNormalizing((function(){if("text"!==n.object){var r=!0,i=!1,o=void 0;try{for(var a,s=n.texts()[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value,u=A(l,2),c=u[0],d=u[1],f=t.concat(d);e.removeMarksByPath(f,0,c.text.length,c.marks)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}else e.removeMarksByPath(t,0,n.text.length,n.marks)}))},removeNodeByPath:function(e,t){var n=e.value.document.assertNode(t);e.applyOperation({type:"remove_node",path:t,node:n})},removeTextByPath:function(e,t,n,r){var i=e.value,o=i.document,a=i.annotations,s=o.assertNode(t).text.slice(n,n+r);e.withoutNormalizing((function(){var r=!0,i=!1,o=void 0;try{for(var l,u=a.values()[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){var c=l.value,d=c.start,f=c.end;e.isAtomic(c)&&(d.path.equals(t)&&d.offsetn)&&e.removeAnnotation(c))}}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}e.applyOperation({type:"remove_text",path:t,offset:n,text:s})}))},replaceNodeByPath:function(e,t,n){n=ue.create(n);var r=t.last(),i=U.lift(t);e.withoutNormalizing((function(){e.removeNodeByPath(t),e.insertNodeByPath(i,r,n)}))},replaceTextByPath:function(e,t,n,r,i,o){e.withoutNormalizing((function(){e.removeTextByPath(t,n,r),e.insertTextByPath(t,n,i,o)}))},setMarkByPath:function(e,t,n,r,i,o){i=G.create(i),o=G.createProperties(o);var a=e.value.document.assertNode(t);e.withoutNormalizing((function(){n+r0&&(e.splitNodeByPath(t,n),t=U.increment(t),n=0),e.applyOperation({type:"set_mark",path:t,properties:i,newProperties:o})}))},setNodeByPath:function(e,t,n){var r=e.value.document.assertNode(t);n=ue.createProperties(n);var i=f()(r,Object.keys(n));e.applyOperation({type:"set_node",path:t,properties:i,newProperties:n})},setTextByPath:function(e,t,n,r){var i=e.value.document.assertNode(t).text.length;e.replaceTextByPath(t,0,i,n,r)},splitNodeByPath:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.target,o=void 0===i?null:i,a=e.value,s=a.document,l=s.getDescendant(t);e.applyOperation({type:"split_node",path:t,position:n,target:o,properties:{type:l.type,data:l.data}})},splitDescendantsByPath:function(e,t,n,r){if(t.equals(n))e.splitNodeByPath(n,r);else{var i=e.value.document,o=r,a=n;e.withoutNormalizing((function(){e.splitNodeByKey(n,r);var s=!0,l=!1,u=void 0;try{for(var c,d=i.ancestors(n)[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var f=c.value,p=A(f,2)[1],h=o;if(o=a.last()+1,a=p,e.splitNodeByPath(p,o,{target:h}),p.equals(t))break}}catch(e){l=!0,u=e}finally{try{!s&&d.return&&d.return()}finally{if(l)throw u}}}))}},unwrapInlineByPath:function(e,t,n){var r=e.value,i=r.document,o=r.selection,a=i.assertNode(t),s=a.getFirstText(),l=a.getLastText(),u=o.moveToRangeOfNode(s,l);e.unwrapInlineAtRange(u,n)},unwrapBlockByPath:function(e,t,n){var r=e.value,i=r.document,o=r.selection,a=i.assertNode(t),s=a.getFirstText(),l=a.getLastText(),u=o.moveToRangeOfNode(s,l);e.unwrapBlockAtRange(u,n)},unwrapNodeByPath:function(e,t){var n=e.value.document;n.assertNode(t);var r=U.lift(t),i=n.assertNode(r),o=t.last(),a=r.last(),s=U.lift(r),l=0===o,u=o===i.nodes.size-1;e.withoutNormalizing((function(){if(1===i.nodes.size)e.moveNodeByPath(t,s,a+1),e.removeNodeByPath(r);else if(l)e.moveNodeByPath(t,s,a);else if(u)e.moveNodeByPath(t,s,a+1);else{var n=U.increment(t,1,r.size-1);n=n.set(n.size-1,0),e.splitNodeByPath(r,o),e.moveNodeByPath(n,s,a+1)}}))},unwrapChildrenByPath:function(e,t){t=U.create(t);var n=e.value.document.assertNode(t),r=U.lift(t),i=t.last(),o=n.nodes;e.withoutNormalizing((function(){o.reverse().forEach((function(n,a){var s=o.size-a-1,l=t.push(s);e.moveNodeByPath(l,r,i+1)})),e.removeNodeByPath(t)}))},wrapBlockByPath:function(e,t,n){n=(n=de.create(n)).set("nodes",n.nodes.clear());var r=U.lift(t),i=t.last(),o=U.increment(t);e.withoutNormalizing((function(){e.insertNodeByPath(r,i,n),e.moveNodeByPath(o,t,0)}))},wrapInlineByPath:function(e,t,n){n=(n=oe.create(n)).set("nodes",n.nodes.clear());var r=U.lift(t),i=t.last(),o=U.increment(t);e.withoutNormalizing((function(){e.insertNodeByPath(r,i,n),e.moveNodeByPath(o,t,0)}))},wrapNodeByPath:function(e,t,n){"block"===(n=ue.create(n)).object?e.wrapBlockByPath(t,n):"inline"===n.object&&e.wrapInlineByPath(t,n)}},Ue=function(e){Be[e+"ByKey"]=function(t,n){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o3?r-3:0),o=3;o3?r-3:0),o=3;o100&&(c=c.takeLast(100)),e.withoutSaving((function(){var t=Object(r.List)(),n=i.set("undos",c).set("redos",t);e.setData(n)}))}},Ve.redo=function(e){var t=e.value.data,n=t.get("redos")||Object(r.List)(),i=t.get("undos")||Object(r.List)(),o=n.last();o&&e.withoutSaving((function(){e.withoutNormalizing((function(){o.forEach((function(t){var n=t,r=n.type,i=n.newProperties;"set_selection"===r&&(t=t.set("newProperties",h()(i,"isFocused"))),e.applyOperation(t)})),n=n.pop(),i=i.push(o);var r=t.set("undos",i).set("redos",n);e.setData(r)}))}))},Ve.undo=function(e){var t=e.value.data,n=t.get("redos")||Object(r.List)(),i=t.get("undos")||Object(r.List)(),o=i.last();o&&e.withoutSaving((function(){e.withoutNormalizing((function(){o.slice().reverse().map((function(e){return e.invert()})).forEach((function(t){var n=t,r=n.type,i=n.newProperties;"set_selection"===r&&(t=t.set("newProperties",h()(i,"isFocused"))),e.applyOperation(t)})),n=n.push(o),i=i.pop();var r=t.set("undos",i).set("redos",n);e.setData(r)}))}))},Ve.withoutMerging=function(e,t){var n=e.tmp.merge;e.tmp.merge=!1,t(e),e.tmp.merge=n},Ve.withoutSaving=function(e,t){var n=e.tmp.save;e.tmp.save=!1,t(e),e.tmp.save=n};var Ke={};function $e(e,t){for(var n,r=arguments.length,i=Array(r>2?r-2:0),o=2;o2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){if(n<0)return Je(e,t,-n);var r=t.slice(0,1).toUpperCase()+t.slice(1),i=e.value,o=i.document,a=i.selection,s=a[t],l=o.hasVoidParent(s.path,e);if(!l&&s.offset-n>=0){var u=a["move"+r+"Backward"](n);e.select(u)}else{var c=o.getPreviousText(s.path);if(c){var d=o.getClosestBlock(s.path),f=d.hasNode(c.key),p=c&&o.hasVoidParent(c.key,e);if(e["move"+r+"ToEndOfNode"](c),!l&&!p&&f){var h=e.value.selection["move"+r+"Backward"](n);e.select(h)}}}}}function Je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(0!==n){if(n<0)return Xe(e,t,-n);var r=t.slice(0,1).toUpperCase()+t.slice(1),i=e.value,o=i.document,a=i.selection,s=a[t],l=o.getNode(s.path),u=o.hasVoidParent(s.path,e);if(!u&&s.offset+n<=l.text.length){var c=a["move"+r+"Forward"](n);e.select(c)}else{var d=o.getNextText(s.path);if(d){var f=o.getClosestBlock(s.path),p=f.hasNode(d.key),h=o.hasVoidParent(d.key,e);if(e["move"+r+"ToStartOfNode"](d),!u&&!h&&p){var m=e.value.selection["move"+r+"Forward"](n);e.select(m)}}}}}function Ze(e,t){var n=e.value,r=n.document,i=n.selection[t],o=r.getClosestBlock(i.key),a=o.getOffset(i.key)+i.offset,s=o.text,l=De.getWordOffsetBackward(s,a);e.command(Xe,t,l>0?l:1)}function et(e,t){var n=e.value,r=n.document,i=n.selection[t],o=r.getClosestBlock(i.key),a=o.getOffset(i.key)+i.offset,s=o.text,l=De.getWordOffsetForward(s,a);e.command(Je,t,l>0?l:1)}Ke.blur=function(e){e.select({isFocused:!1})},Ke.deselect=function(e){var t=Y.create();e.select(t)},Ke.focus=function(e){e.select({isFocused:!0})},Ke.flip=function(e){e.command($e,"flip")},Ke.moveAnchorBackward=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:1;if(0!==t){var n=e.value,r=n.document,i=n.selection,o=i.start,a=r.getClosestBlock(o.key),s=a.getOffset(o.key),l=s+o.offset,u=a.text,c=De.getCharOffsetBackward(u,l,t);e.moveAnchorBackward(c).moveFocusBackward(c)}},Ke.moveWordBackward=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:1;if(0!==t){var n=e.value,r=n.document,i=n.selection,o=i.start,a=r.getClosestBlock(o.path),s=a.getOffset(o.key),l=s+o.offset,u=a.text,c=De.getCharOffsetForward(u,l,t);e.moveAnchorForward(c).moveFocusForward(c)}},Ke.moveWordForward=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:{};t=Y.createProperties(t);var i=n.snapshot,o=void 0!==i&&i,a=e.value,s=a.document,l=a.selection,u={},c=l.setProperties(t);for(var d in c=s.resolveSelection(c),t=f()(c,Object.keys(t)))!0!==o&&Object(r.is)(t[d],l[d])||(u[d]=t[d]);if(l.marks&&!u.marks&&(u.anchor||u.focus)&&(u.marks=null),0!==Object.keys(u).length){var p=f()(l.toJSON(),Object.keys(u));e.applyOperation({type:"set_selection",value:a,properties:p,newProperties:u},o?{skip:!1,merge:!1}:{})}},Ke.setAnchor=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};function t(t,n){for(var r in e)t.registerQuery(r);return n()}function n(t,n,r){var i=t.type,o=t.args,a=e[i];if(!a)return r();var s=a.apply(void 0,[n].concat(P(o)));return void 0===s?r():s}return{onConstruct:t,onQuery:n}}tt.setData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.value,r=pe.createProperties({data:t}),i=f()(n,Object.keys(r));e.applyOperation({type:"set_value",properties:i,newProperties:r})},tt.addAnnotation=function(e,t){t=te.create(t),e.applyOperation({type:"add_annotation",annotation:t})},tt.removeAnnotation=function(e,t){t=te.create(t),e.applyOperation({type:"remove_annotation",annotation:t})},tt.setAnnotation=function(e,t,n){t=te.create(t),n=te.createProperties(n),e.applyOperation({type:"set_annotation",properties:t,newProperties:n})},tt.setAnnotations=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.value,r=pe.createProperties({annotations:t}),i=f()(n,Object.keys(r));e.applyOperation({type:"set_value",properties:i,newProperties:r})};var rt=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E(this,t);var r=C(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));for(var i in r.code=e,n)r[i]=n[i];return Error.captureStackTrace?Error.captureStackTrace(r,r.constructor):r.stack=(new Error).stack,r}return O(t,e),t}(Error);function it(e){var t=e.rules,n=e.document,r=e.blocks,i=e.inlines,o=e.marks,a=e.annotations,s=e.decorations,l=[];if(t&&(l=l.concat(t)),n&&l.push(S({match:[{object:"document"}]},n)),r)for(var u in r)l.push(S({match:[{object:"block",type:u}]},r[u]));if(i)for(var c in i)l.push(S({match:[{object:"inline",type:c}]},i[c]));if(o)for(var d in o)l.push(S({match:[{object:"mark",type:d}]},o[d]));if(a)for(var f in a)l.push(S({match:[{object:"annotation",type:f}]},a[f]));if(s)for(var p in s)l.push(S({match:[{object:"decoration",type:p}]},s[p]));function h(e,t,n){var r=l.filter((function(t){return ot(e,t.match)})),i=at(e,r,l,{every:!0});return i?new rt(i.code,i):n()}return[{normalizeNode:function(e,t,n){var r=h(e,t,(function(){}));return r?function(){var e=r.rule,n=t.operations.size;e.normalize&&e.normalize(t,r),t.operations.size===n&&function(e,t){var n=t.code,r=t.node,i=t.child,o=t.next,a=t.previous,s=t.key,l=t.mark;switch(n){case"child_max_invalid":case"child_object_invalid":case"child_type_invalid":case"child_unknown":case"first_child_object_invalid":case"first_child_type_invalid":case"last_child_object_invalid":case"last_child_type_invalid":return"text"===i.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(i.key);case"previous_sibling_object_invalid":case"previous_sibling_type_invalid":return"text"===a.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(a.key);case"next_sibling_object_invalid":case"next_sibling_type_invalid":return"text"===o.object&&"block"===r.object&&1===r.nodes.size?e.removeNodeByKey(r.key):e.removeNodeByKey(o.key);case"child_min_invalid":case"node_text_invalid":case"parent_object_invalid":case"parent_type_invalid":return"document"===r.object?r.nodes.forEach((function(t){return e.removeNodeByKey(t.key)})):e.removeNodeByKey(r.key);case"node_data_invalid":return void 0===r.data.get(s)&&"document"!==r.object?e.removeNodeByKey(r.key):e.setNodeByKey(r.key,{data:r.data.delete(s)});case"node_mark_invalid":return r.getTexts().forEach((function(t){return e.removeMarkByKey(t.key,0,t.text.length,l)}));default:e.removeNodeByKey(r.key)}}(t,r)}:n()},validateNode:h},nt({isAtomic:function(e,t){var n=l.find((function(e){return"isAtomic"in e&&ot(t,e.match)}));return n&&n.isAtomic},isVoid:function(e,t){var n=l.find((function(e){return"isVoid"in e&&ot(t,e.match)}));return n&&n.isVoid}})]}function ot(e,t){return!at(e,t)}function at(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.every,o=void 0!==i&&i,a=r.match,s=void 0===a?null:a;if("function"==typeof t){var l=t(e,s);return l?null:yt("node_invalid",{rule:t,node:e})}if(Array.isArray(t)){var u=t.length?t:[{}],c=void 0,d=!0,f=!1,p=void 0;try{for(var h,m=u[Symbol.iterator]();!(d=(h=m.next()).done);d=!0){var g=h.value,v=at(e,g,n);if(c=c||v,o&&v)return v;if(!o&&!v)return}}catch(e){f=!0,p=e}finally{try{!d&&m.return&&m.return()}finally{if(f)throw p}}return c}var y=st(e,t)||lt(e,t)||ut(e,t)||ct(e,t)||dt(e,t)||ft(e,t)||pt(e,t)||ht(e,t,n);return y}function st(e,t){if(null!=t.object&&t.object!==e.object&&("function"!=typeof t.object||!t.object(e.object)))return yt("node_object_invalid",{rule:t,node:e})}function lt(e,t){if(null!=t.type&&t.type!==e.type&&("function"!=typeof t.type||!t.type(e.type)))return yt("node_type_invalid",{rule:t,node:e})}function ut(e,t){if(null!=t.data&&null!=e.data){if("function"==typeof t.data){if(t.data(e.data))return;return yt("node_data_invalid",{rule:t,node:e})}for(var n in t.data){var r=t.data[n],i=e.data&&e.data.get(n);if(!("function"==typeof r?r(i):r===i))return yt("node_data_invalid",{rule:t,node:e,key:n,value:i})}}}function ct(e,t){if(null!=t.marks){var n="text"===e.object?e.marks.toArray():e.getMarks().toArray(),r=function(n){return t.marks.some((function(e){return"function"==typeof e.type?e.type(n.type):e.type===n.type}))?"continue":{v:yt("node_mark_invalid",{rule:t,node:e,mark:n})}},i=!0,o=!1,a=void 0;try{for(var s,l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=r(s.value);switch(u){case"continue":continue;default:if("object"===(void 0===u?"undefined":w(u)))return u.v}}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}}}function dt(e,t){if(null!=t.text){var n=e.text;if(!("function"==typeof t.text?t.text(n):t.text.test(n)))return yt("node_text_invalid",{rule:t,node:e,text:n})}}function ft(e,t){if(null!=t.first){var n=e.nodes.first();if(n){var r=at(n,t.first);if(r)return r.rule=t,r.node=e,r.child=n,r.code=r.code.replace("node_","first_child_"),r}}}function pt(e,t){if(null!=t.last){var n=e.nodes.last();if(n){var r=at(n,t.last);if(r)return r.rule=t,r.node=e,r.child=n,r.code=r.code.replace("node_","last_child_"),r}}}function ht(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(null!=e.nodes){var r=e.nodes,i=null!=t.nodes?t.nodes.slice():[],o=0,a=0,s=null,l=-1,u=null,c=null,d=null,f=null,p=null;for(null!=t.nodes&&v();y();){var h=mt(e,d,n)||gt(e,d,f,l,n)||vt(e,d,p,l,n);if(h)return h;if(null!=t.nodes){if(!u)return yt("child_unknown",{rule:t,node:e,child:d,index:l});if(u.match){var m=at(d,u.match);if(m){if(null!=c&&o-1>c)return b(),yt("child_max_invalid",{rule:t,node:e,index:l,child:r.get(l),count:o,limit:c});var g=s;if(v()){if(a-1>=g){l-=1;continue}return null==at(d,u.match)?(b(),yt("child_min_invalid",{rule:t,node:e,index:l,count:a-1,limit:g})):(m.rule=t,m.node=e,m.child=d,m.index=l,m.code=m.code.replace("node_","child_"),m)}return null!=c&&o>c?yt("child_unknown",{rule:t,node:e,child:d,index:l}):(m.rule=t,m.node=e,m.child=d,m.index=l,m.code=m.code.replace("node_","child_"),m)}}}}if(null!=c&&o>c)return yt("child_max_invalid",{rule:t,node:e,index:l-1,count:o,child:r.get(l-1),limit:c});if(null!=t.nodes)do{if(o0&&(l-=1,o=a)}}function mt(e,t,n){var r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;if(null!=l.parent&&ot(t,l.match)){var u=at(e,l.parent);if(u)return u.rule=l,u.parent=e,u.node=t,u.code=u.code.replace("node_","parent_"),u}}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}}function gt(e,t,n,r,i){if(n){var o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;if(null!=c.previous&&ot(t,c.match)){var d=at(n,c.previous);if(d)return d.rule=c,d.node=e,d.child=t,d.index=r,d.previous=n,d.code=d.code.replace("node_","previous_sibling_"),d}}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}}}function vt(e,t,n,r,i){if(n){var o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;if(null!=c.next&&ot(t,c.match)){var d=at(n,c.next,[],{match:t});if(d)return d.rule=c,d.node=e,d.child=t,d.index=r,d.next=n,d.code=d.code.replace("node_","next_sibling_"),d}}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}}}function yt(e,t){return S({code:e},t)}function bt(e){e.value.selection.isExpanded&&e.delete()}var _t={};function wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,r=xe(S({},Le,Be,Ve,Ke,tt,_t)),i=nt({isAtomic:function(){return!1},isVoid:function(){return!1}}),o=it({rules:[{match:{object:"document"},nodes:[{match:{object:"block"}}]},{match:{object:"block",first:{object:"block"}},nodes:[{match:{object:"block"}}]},{match:{object:"block",first:[{object:"inline"},{object:"text"}]},nodes:[{match:[{object:"inline"},{object:"text"}]}]},{match:{object:"inline"},nodes:[{match:[{object:"inline"},{object:"text"}]}]},{match:[{object:"block"},{object:"inline"}],nodes:[{min:1}],normalize:function(e,t){var n=t.code,r=t.node;"child_min_invalid"===n&&r.nodes.isEmpty()&&e.insertNodeByKey(r.key,0,le.create())}},{match:{object:"block"},first:[{object:"block"},{object:"text"}],last:[{object:"block"},{object:"text"}],normalize:function(e,t){var n=t.code,r=t.node,i=le.create(),o=void 0;if("first_child_object_invalid"===n)o=0;else{if("last_child_object_invalid"!==n)return;o=r.nodes.size}e.insertNodeByKey(r.key,o,i)}},{match:{object:"inline"},first:[{object:"block"},{object:"text"}],last:[{object:"block"},{object:"text"}],previous:[{object:"block"},{object:"text"}],next:[{object:"block"},{object:"text"}],normalize:function(e,t){var n=t.code,r=t.node,i=t.index,o=le.create(),a=void 0;if("first_child_object_invalid"===n)a=0;else if("last_child_object_invalid"===n)a=r.nodes.size;else if("previous_sibling_object_invalid"===n)a=i;else{if("next_sibling_object_invalid"!==n)return;a=i+1}e.insertNodeByKey(r.key,a,o)}},{match:{object:"text"},next:function(e,t){return"text"!==e.object||!t.marks.equals(e.marks)},normalize:function(e,t){var n=t.code,r=t.next;"next_sibling_invalid"===n&&e.mergeNodeByKey(r.key)}},{match:{object:"text"},previous:function(e){return"text"!==e.object||""!==e.text},next:function(e){return"text"!==e.object||""!==e.text},normalize:function(e,t){var n=t.code,r=t.next,i=t.previous;"next_sibling_invalid"===n?e.removeNodeByKey(r.key):"previous_sibling_invalid"===n&&e.removeNodeByKey(i.key)}}]});return[o].concat(P(n),[r,i])}_t.addMark=function(e,t){t=G.create(t);var n=e.value,r=n.document,i=n.selection;if(i.isExpanded)e.addMarkAtRange(i,t);else if(i.marks){var o=i.marks.add(t),a=i.set("marks",o);e.select(a)}else{var s=r.getActiveMarksAtRange(i).add(t),l=i.set("marks",s);e.select(l)}},_t.addMarks=function(e,t){t.forEach((function(t){return e.addMark(t)}))},_t.delete=function(e){var t=e.value.selection;e.deleteAtRange(t),e.moveToFocus()},_t.deleteBackward=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.value,r=n.selection;r.isExpanded?e.delete():e.deleteBackwardAtRange(r,t)},_t.deleteCharBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteCharBackwardAtRange(t)},_t.deleteLineBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteLineBackwardAtRange(t)},_t.deleteWordBackward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteWordBackwardAtRange(t)},_t.deleteForward=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.value,r=n.selection;r.isExpanded?e.delete():e.deleteForwardAtRange(r,t)},_t.deleteCharForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteCharForwardAtRange(t)},_t.deleteLineForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteLineForwardAtRange(t)},_t.deleteWordForward=function(e){var t=e.value.selection;t.isExpanded?e.delete():e.deleteWordForwardAtRange(t)},_t.insertBlock=function(e,t){bt(e),t=de.create(t);var n=e.value.selection;e.insertBlockAtRange(n,t);var r=e.value.document.getNode(t.key);r&&e.moveToEndOfNode(r)},_t.insertFragment=function(e,t){if(t.nodes.size){bt(e);var n=e.value,r=n,i=r.document,o=r.selection,a=o.start,s=Array.from(i.texts(),(function(e){return A(e,1)[0].key}));e.insertFragmentAtRange(o,t);var l=(i=(n=e.value).document).getTexts().filter((function(e){return!s.includes(e.key)}));if(0!==l.size){var u=t.text.length,c=i.getNode(a.key)||l.first(),d=l.last()||c;if(c!==d){var f=i.getCommonAncestor(c.key,d.key),p=f.getOffset(c.key)+(a.key===c.key?a.offset:0);d=f.getTextAtOffset(p+u-1)||d,e.moveTo(d.key,p+u-f.getOffset(d.key))}else e.moveTo(d.key,u)}}},_t.insertInline=function(e,t){bt(e),t=oe.create(t);var n=e.value.selection;e.insertInlineAtRange(n,t);var r=e.value.document.getNode(t.key);r&&e.moveToEndOfNode(r)},_t.insertText=function(e,t,n){bt(e);var r=e.value,i=r.document,o=r.selection;n=n||o.marks||i.getInsertMarksAtRange(o),e.withoutNormalizing((function(){e.insertTextAtRange(o,t,n),o.marks&&i!==e.value.document&&e.select({marks:null})}))},_t.removeMark=function(e,t){t=G.create(t);var n=e.value,r=n.document,i=n.selection;if(i.isExpanded)e.removeMarkAtRange(i,t);else if(i.marks){var o=i.marks.remove(t),a=i.set("marks",o);e.select(a)}else{var s=r.getActiveMarksAtRange(i).remove(t),l=i.set("marks",s);e.select(l)}},_t.replaceMark=function(e,t,n){e.removeMark(t),e.addMark(n)},_t.setBlocks=function(e,t){var n=e.value.selection;e.setBlocksAtRange(n,t)},_t.setInlines=function(e,t){var n=e.value.selection;e.setInlinesAtRange(n,t)},_t.splitBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;bt(e);var n=e.value,r=n.selection,i=n.document,o=r.marks||i.getInsertMarksAtRange(r);e.splitBlockAtRange(r,t).moveToEnd(),o&&0!==o.size&&e.select({marks:o})},_t.splitInline=function(e,t){bt(e);var n=e.value.selection;e.splitInlineAtRange(n,t)},_t.toggleMark=function(e,t){t=G.create(t),e.value.activeMarks.has(t)?e.removeMark(t):e.addMark(t)},_t.unwrapBlock=function(e,t){var n=e.value.selection;e.unwrapBlockAtRange(n,t)},_t.unwrapInline=function(e,t){var n=e.value.selection;e.unwrapInlineAtRange(n,t)},_t.wrapBlock=function(e,t){var n=e.value.selection;e.wrapBlockAtRange(n,t)},_t.wrapInline=function(e,t){var n=e.value.selection;e.wrapInlineAtRange(n,t)},_t.wrapText=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.value,i=r.selection;e.wrapTextAtRange(i,t,n),i.isCollapsed&&e.moveStartBackward(t.length),e.moveEndBackward(n.length),i.isForward!==e.value.selection.isForward&&e.flip()};var Et=u()("slate:editor"),xt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};E(this,e);var i=n.controller,o=void 0===i?this:i,a=n.construct,s=void 0===a||a,l=t.onChange,u=void 0===l?function(){}:l,c=t.plugins,d=void 0===c?[]:c,f=t.readOnly,p=void 0!==f&&f,h=t.value,m=void 0===h?pe.create():h;this.controller=o,this.middleware={},this.onChange=u,this.operations=Object(r.List)(),this.readOnly=null,this.value=null,this.tmp={dirty:[],flushing:!1,merge:null,normalize:!0,save:!0};var g=wt({plugins:d});Ot(this,g),s&&(this.run("onConstruct"),this.setReadOnly(p),this.setValue(m,n))}return x(e,[{key:"applyOperation",value:function(e){var t=this,n=this.operations,r=this.controller,i=this.value;o()(e)&&(e=S({},e,{value:i})),e=_e.create(e),this.withoutNormalizing((function(){r.save(e),i=t.value})),Et("apply",{operation:e}),this.value=e.apply(i),this.operations=n.push(e);var a=function(e){var t=e.type,n=e.node,r=e.path,i=e.newPath;switch(t){case"add_mark":case"insert_text":case"remove_mark":case"remove_text":case"set_mark":case"set_node":var o=U.getAncestors(r).toArray();return[].concat(P(o),[r]);case"insert_node":var a=n.getKeysToPathsTable(),s=Object.values(a).map((function(e){return r.concat(e)})),l=U.getAncestors(r).toArray();return[].concat(P(l),[r],P(s));case"split_node":var u=U.getAncestors(r).toArray(),c=U.increment(r);return[].concat(P(u),[r,c]);case"merge_node":var d=U.getAncestors(r).toArray(),f=U.decrement(r);return[].concat(P(d),[f]);case"move_node":if(U.isEqual(r,i))return[];var p=U.getAncestors(r).reduce((function(t,n){return t.push.apply(t,P(U.transform(n,e).toArray())),t}),[]),h=U.getAncestors(i).reduce((function(t,n){return t.push.apply(t,P(U.transform(n,e).toArray())),t}),[]);return[].concat(P(p),P(h));case"remove_node":var m=U.getAncestors(r).toArray();return[].concat(P(m));default:return[]}}(e),s=this.tmp.dirty.map((function(t){return t=U.create(t),U.transform(t,e).toArray()})),l={},u=Array.prototype.concat.apply(a,s);return this.tmp.dirty=[],u.forEach((function(e){var n=e.join(",");l[n]||t.tmp.dirty.push(e),l[n]=!0})),this.tmp.flushing||(this.tmp.flushing=!0,Promise.resolve().then((function(){return t.flush()}))),r}},{key:"flush",value:function(){this.run("onChange");var e=this.value,t=this.operations,n=this.controller,i={value:e,operations:t};return this.operations=Object(r.List)(),this.tmp.flushing=!1,this.onChange(i),n}},{key:"command",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.normalize,r=void 0===n?e!==this.value:n;return this.value=e,r&&this.normalize(),this}},{key:"withoutNormalizing",value:function(e){var t=this.controller,n=this.tmp.normalize;return this.tmp.normalize=!1,e(t),this.tmp.normalize=n,kt(this),t}},{key:"change",value:function(e){Object(a.a)(!1,"As of Slate 0.43 the `change` object has been replaced with `editor`, so the `editor.change()` method is deprecated.`");for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(!1,"As of slate@0.41 the `change.getFlag` method has been deprecated."),void 0!==t[e]?t[e]:this.tmp[e]}},{key:"unsetOperationFlag",value:function(e){return Object(a.a)(!1,"As of slate@0.41 the `change.unsetOperationFlag` method has been deprecated."),delete this.tmp[e],this}},{key:"withoutNormalization",value:function(e){return Object(a.a)(!1,"As of slate@0.41 the `change.withoutNormalization` helper has been renamed to `change.withoutNormalizing`."),this.withoutNormalizing(e)}},{key:"editor",get:function(){return Object(a.a)(!1,"As of Slate 0.43 the `change` object has been replaced with `editor`, so you don't need to access `change.editor`."),this.controller}}]),e}();function kt(e){e.tmp.normalize&&e.tmp.dirty.length&&e.withoutNormalizing((function(){for(;e.tmp.dirty.length;){var t=e.tmp.dirty.pop();St(e,t)}}))}function St(e,t){for(var n=e.controller,r=e.value,i=r.document,o=i.assertNode(t),a=0,s=100+("text"===o.object?1:o.nodes.size);o;){var l=o.normalize(n);if(!l)break;l(n),i=(r=e.value).document;var u=o.key,c=i.getDescendant(t);if(c&&c.key===u)o=c;else{if(!(c=i.getDescendant(u)))break;o=c,t=i.getPath(u)}if(++a>s)throw new Error("A schema rule could not be normalized after sufficient iterations. This is usually due to a `rule.normalize` or `plugin.normalizeNode` function of a schema being incorrectly written, causing an infinite loop.")}}function Ot(e,t){if(Array.isArray(t))t.forEach((function(t){return Ot(e,t)}));else if(null!=t){var n=t.commands,r=t.queries,i=t.schema,o=T(t,["commands","queries","schema"]);if(n){var a=xe(n);Ot(e,a)}if(r){var s=nt(r);Ot(e,s)}if(i){var l=it(i);Ot(e,l)}for(var u in o){var c=o[u];(e.middleware[u]=e.middleware[u]||[]).push(c)}}}var Tt={marks:void 0,text:void 0},Ct=function(e){function t(){return E(this,t),C(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return O(t,e),x(t,[{key:"updateMark",value:function(e,t){var n=this.marks;if(t.equals(e))return this;if(!n.has(e))return this;var r=n.withMutations((function(n){n.remove(e).add(t)}));return this.set("marks",r)}},{key:"addMark",value:function(e){var t=this.marks;return this.set("marks",t.add(e))}},{key:"addMarks",value:function(e){var t=this.marks;return this.set("marks",t.union(e))}},{key:"insertText",value:function(e,t){var n=this.text,r=n.slice(0,e)+t+n.slice(e);return this.set("text",r)}},{key:"removeMark",value:function(e){var t=this.marks;return this.set("marks",t.remove(e))}},{key:"toJSON",value:function(){return{object:this.object,text:this.text,marks:this.marks.toArray().map((function(e){return e.toJSON()}))}}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(a.a)(!1,"As of slate@0.47 the `Leaf` model is deprecated."),t.isLeaf(e))return e;if("string"==typeof e&&(e={text:e}),o()(e))return t.fromJSON(e);throw new Error("`Leaf.create` only accepts objects, strings or leaves, but you passed it: "+e)}},{key:"createLeaves",value:function(e){if(e.size<=1)return e;var t=!1,n=Object(r.List)().withMutations((function(n){e.findLast((function(e,r){var i=n.first();if(i){if(i.marks.equals(e.marks))return t=!0,void n.set(0,i.set("text",""+e.text+i.text));if(""===i.text)return t=!0,void n.set(0,e);if(""===e.text)return void(t=!0)}n.unshift(e)}))}));return t?n:e}},{key:"splitLeaves",value:function(e,t){if(t<0)return[Object(r.List)(),e];if(0===e.size)return[Object(r.List)(),Object(r.List)()];var n=0,i=-1,o=void 0,a=void 0;return e.find((function(e){i++;var r=n,s=e.text;if((n+=s.length)t)return!1;var l=t-r;return o=e.set("text",s.slice(0,l)),a=e.set("text",s.slice(l)),!0})),o?""===o.text?0===i?[r.List.of(o),e]:[e.take(i),e.skip(i)]:""===a.text?i===e.size-1?[e,r.List.of(a)]:[e.take(i+1),e.skip(i+1)]:[e.take(i).push(o),e.skip(i+1).unshift(a)]:[e,Object(r.List)()]}},{key:"createList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(r.List.isList(e)||Array.isArray(e)){var n=new r.List(e.map(t.create));return n}throw new Error("`Leaf.createList` only accepts arrays or lists, but you passed it: "+e)}},{key:"fromJSON",value:function(e){var n=e.text,i=void 0===n?"":n,o=e.marks,a=void 0===o?[]:o;return new t({text:i,marks:Object(r.Set)(a.map(G.fromJSON))})}},{key:"isLeafList",value:function(e){return r.List.isList(e)&&e.every((function(e){return t.isLeaf(e)}))}}]),t}(Object(r.Record)(Tt));function At(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=!0,u=!1,c=void 0;try{for(var d,f=Object.getOwnPropertyNames(e)[Symbol.iterator]();!(l=(d=f.next()).done);l=!0){var p=d.value;if(!s.hasOwnProperty(p)){var h=Object.getOwnPropertyDescriptor(e,p);Object.defineProperty(s,p,h)}}}catch(e){u=!0,c=e}finally{try{!l&&f.return&&f.return()}finally{if(u)throw c}}var m=!0,g=!1,v=void 0;try{for(var y,b=Object.getOwnPropertyNames(e.prototype)[Symbol.iterator]();!(m=(y=b.next()).done);m=!0){var _=y.value;if(!s.prototype.hasOwnProperty(_)){h=Object.getOwnPropertyDescriptor(e.prototype,_);Object.defineProperty(s.prototype,_,h)}}}catch(e){g=!0,v=e}finally{try{!m&&b.return&&b.return()}finally{if(g)throw v}}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}Object.entries({Annotation:te,Block:de,Change:Ee,Decoration:K,Document:re,Editor:xt,Inline:oe,Leaf:Ct,Mark:G,Node:ue,Operation:_e,Point:q,Range:Z,Selection:Y,Text:le,Value:pe}).forEach((function(e){var t,n,r,i,o=A(e,2),a=o[0],s=o[1];return At((t=a.toLowerCase(),n=Q[t],r="is"+t.charAt(0).toUpperCase()+t.slice(1),(i=function(){function e(){E(this,e)}return x(e,[{key:"object",get:function(){return t}}]),e}())[r]=X.bind(null,t),i.prototype[n]=!0,i),[s])})),At(function(){function e(){E(this,e)}return x(e,[{key:"toJS",value:function(){return this.toJSON.apply(this,arguments)}}],[{key:"fromJS",value:function(){return this.fromJSON.apply(this,arguments)}}]),e}(),[te,de,K,re,oe,Ct,G,ue,_e,q,Z,Y,le,pe]);var Pt=!0,Rt=Symbol("LEAF"),Mt=Symbol("STORE_KEY"),It=Symbol("undefined"),Dt=Symbol("null"),jt=new WeakMap;function Lt(e,t){var n=function(t){var n=e[t];if(!n)throw new Error('Object does not have a property named "'+t+'".');e[t]=function(){for(var e=arguments.length,r=Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.onlyLeaves,n=e.onlyRoots,r=e.onlyTypes,i=e.match,o=T(e,["onlyLeaves","onlyRoots","onlyTypes","match"]),a=this.descendants(S({includeDocument:!1,includeInlines:!1,includeTexts:!1},o,{match:function(e,o){return!(r&&!r.includes(e.type))&&((!n||1===o.size)&&(!(t&&!e.isLeafBlock())&&!(i&&!i(e,o))))}}));return a}},{key:"createAnnotation",value:function(e){return e=te.createProperties(e),this.resolveAnnotation(e)}},{key:"createDecoration",value:function(e){return e=K.createProperties(e),this.resolveDecoration(e)}},{key:"createIterable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.direction,n=void 0===t?"forward":t,r=e.downward,i=void 0===r||r,o=e.upward,a=void 0===o||o,s=e.includeBlocks,l=void 0===s||s,u=e.includeDocument,c=void 0===u||u,d=e.includeInlines,f=void 0===d||d,p=e.includeRoot,h=void 0!==p&&p,m=e.includeTarget,g=void 0===m?!!e.range:m,v=e.includeTargetAncestors,y=void 0!==v&&v,b=e.includeTexts,_=void 0===b||b,w=e.match,E=void 0===w?null:w,x=this,S=null,O=null;e.range?(O=x.resolveRange(e.range),S=x.resolvePath(O.start.path)):e.path&&(S=x.resolvePath(e.path));var T=S&&x.assertNode(S),C="undefined"==typeof window?qt.Set:window.Set;return k({},Symbol.iterator,(function(){var e=new C,t=O&&O.start.path,r=O&&O.end.path,o=S,s=T,u=!1,d=!1,p=!1,m=function(){return o&&s?(h||s!==x)&&(l||"block"!==s.object)&&(c||"document"!==s.object)&&(f||"inline"!==s.object)&&(_||"text"!==s.object)?E&&!E(s,o)?v():{value:[s,o],done:!1}:v():{done:!0}},v=function l(){if(!o||!s)return m();if(t&&!d)return p?o.size===t.size-1?(d=!0,o=S,s=T,l()):(o=t.slice(0,o.size+1),s=x.assertNode(o),m()):(p=!0,o=U.create([]),s=x,m());if(g&&!u)return u=!0,m();if(r&&o.equals(r))return s=null,o=null,l();if(i&&s.nodes&&s.nodes.size&&!e.has(s)){e.add(s);var c="forward"===n?0:s.nodes.size-1;return o=o.push(c),s=x.assertNode(o),m()}if("forward"===n){var f=U.increment(o),h=x.getNode(f);if(h)return o=f,s=h,m()}if("backward"===n&&0!==o.last()){var v=U.decrement(o),b=x.getNode(v);if(b)return o=v,s=b,m()}return a&&o.size?(o=U.lift(o),s=x.assertNode(o),e.has(s)?l():(e.add(s),y?m():l())):(o=null,s=null,l())};return{next:v}}))}},{key:"createPoint",value:function(e){return e=q.createProperties(e),this.resolvePoint(e)}},{key:"createRange",value:function(e){return e=Z.createProperties(e),this.resolveRange(e)}},{key:"createSelection",value:function(e){return e=Y.createProperties(e),this.resolveSelection(e)}},{key:"descendants",value:function(e){return this.createIterable(S({path:[]},e))}},{key:"filterDescendants",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=[],n=!0,i=!1,o=void 0;try{for(var a,s=this.descendants()[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value,u=A(l,2),c=u[0],d=u[1];e(c,d)&&t.push(c)}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return Object(r.List)(t)}},{key:"findDescendant",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=!0,n=!1,r=void 0;try{for(var i,o=this.descendants()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,s=A(a,2),l=s[0],u=s[1];if(e(l,u))return l}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return null}},{key:"forEachDescendant",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,t=!0,n=!1,r=void 0;try{for(var i,o=this.descendants()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,s=e.apply(void 0,P(a));if(!1===s)return}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"getActiveMarksAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)return Object(r.Set)();if(e.isCollapsed){var t=e.start;return this.getInsertMarksAtPoint(t)}var n=e,i=n.start,o=n.end,a=i.path,s=i.offset,l=o.path,u=o.offset,c=this.getDescendant(a),d=this.getDescendant(l);if(!a.equals(l)){for(;!a.equals(l)&&0===u;){var f=this.texts({path:l,direction:"backward"}),p=A(f,1),h=A(p[0],2);d=h[0],l=h[1],u=d.text.length}for(;!a.equals(l)&&s===c.text.length;){var m=this.texts({path:a}),g=A(m,1),v=A(g[0],2);c=v[0],a=v[1],s=0}}if(a.equals(l))return c.marks;var y=c.marks;if(0===y.size)return Object(r.Set)();var b=d.marks,_=y.intersect(b);if(0===_.size)return _;var w=this.texts({path:a}),E=A(w,1),x=A(E[0],2);for(c=x[0],a=x[1];!a.equals(l);){if(0!==c.text.length&&0===(_=_.intersect(c.marks)).size)return Object(r.Set)();var k=this.texts({path:a}),S=A(k,1),O=A(S[0],2);c=O[0],a=O[1]}return _}},{key:"getAncestors",value:function(e){var t=this.ancestors(e),n=Array.from(t,(function(e){return A(e,1)[0]})).reverse();return Object(r.List)(n)}},{key:"getBlocks",value:function(){var e=this.blocks({onlyLeaves:!0}),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getBlocksByType",value:function(e){var t=this.blocks({onlyLeaves:!0,onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getChild",value:function(e){return!(e=this.resolvePath(e))||e.size>1?null:this.nodes.get(e.first())}},{key:"getClosest",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.ancestors(e)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=A(s,2),u=l[0];if(t(u,l[1]))return u}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"getClosestBlock",value:function(e){return this.getClosest(e,(function(e){return"block"===e.object}))}},{key:"getClosestInline",value:function(e){return this.getClosest(e,(function(e){return"inline"===e.object}))}},{key:"getClosestVoid",value:function(e,t){return Object(s.a)(!pe.isValue(t),"As of Slate 0.42.0, the `node.getClosestVoid` method takes an `editor` instead of a `value`."),this.getClosest(e,(function(e){return t.isVoid(e)}))}},{key:"getCommonAncestor",value:function(e,t){if(e=this.resolvePath(e),t=this.resolvePath(t),!e||!t)return null;var n=U.relate(e,t);return this.getNode(n)}},{key:"getDecorations",value:function(e){var t=e.run("decorateNode",this);return t=K.createList(t)}},{key:"getDepth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!(e=this.resolvePath(e)))return null;var n=this.getNode(e),r=n?e.size-1+t:null;return r}},{key:"getDescendant",value:function(e){if(!(e=this.resolvePath(e))||!e.size)return null;var t=this;return e.forEach((function(e){return!!(t=t.getIn(["nodes",e]))})),t}},{key:"getDescendantsAtRange",value:function(e){var t=this.descendants({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getFragmentAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)return re.create();for(var t=e,n=t.start,r=t.end,i=this,o=r.path,a=r.offset,s="end";o.size;){var l=o.last();i=i.splitNode(o,a),a=l+1,(o=U.lift(o)).size||"end"!==s||(o=n.path,a=n.offset,s="start")}var u=n.path.first()+1,c=r.path.first()+2,d=i.nodes.slice(u,c);return re.create({nodes:d})}},{key:"getFurthest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ht,n=this.ancestors(e),r=Array.from(n).reverse(),i=!0,o=!1,a=void 0;try{for(var s,l=r[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=A(u,2),d=c[0],f=c[1];if(t(d,f))return d}}catch(e){o=!0,a=e}finally{try{!i&&l.return&&l.return()}finally{if(o)throw a}}return null}},{key:"getFurthestBlock",value:function(e){return this.getFurthest(e,(function(e){return"block"===e.object}))}},{key:"getFurthestChild",value:function(e){return(e=this.resolvePath(e))&&e.size?this.nodes.get(e.first()):null}},{key:"getFurthestInline",value:function(e){return this.getFurthest(e,(function(e){return"inline"===e.object}))}},{key:"getInlines",value:function(){var e=this.inlines({onlyLeaves:!0}),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getInlinesByType",value:function(e){var t=this.inlines({onlyLeaves:!0,onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getInsertMarksAtPoint",value:function(e){var t=e=this.resolvePoint(e),n=t.path,r=t.offset,i=this.getDescendant(n);if(0!==r)return i.marks;var o=void 0,a=void 0,s=!0,l=!1,u=void 0;try{for(var c,d=this.ancestors(n)[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var f=c.value,p=A(f,2),h=p[0],m=p[1];"block"===h.object&&(o=h,a=m)}}catch(e){l=!0,u=e}finally{try{!s&&d.return&&d.return()}finally{if(l)throw u}}var g=U.drop(n,a.size),v=o.texts({path:g,direction:"backward"}),y=A(v,1)[0];return y?A(y,1)[0].marks:i.marks}},{key:"getInsertMarksAtRange",value:function(e){var t=(e=this.resolveRange(e)).start;return e.isUnset?Object(r.Set)():e.isCollapsed?this.getInsertMarksAtPoint(t):this.getDescendant(t.path).marks}},{key:"getLeafBlocksAtRange",value:function(e){var t=this.blocks({range:e,onlyLeaves:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getLeafInlinesAtRange",value:function(e){var t=this.inlines({range:e,onlyLeaves:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getNodesToPathsMap",value:function(){var e="undefined"==typeof window?new qt.Map:new window.Map;return e.set(this,U.create([])),this.forEachDescendant((function(t,n){e.set(t,n)})),e}},{key:"getMarks",value:function(){var e=this.marks(),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(t)}},{key:"getMarksAtRange",value:function(e){var t=this.marks({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(n)}},{key:"getMarksByType",value:function(e){var t=this.marks({onlyTypes:[e]}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.OrderedSet)(n)}},{key:"getNextBlock",value:function(e){var t=this.blocks({path:e,onlyLeaves:!0}),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextNode",value:function(e){var t=this.createIterable({path:e,downward:!1}),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextSibling",value:function(e){var t=this.siblings(e),n=A(t,1)[0];return n?n[0]:null}},{key:"getNextText",value:function(e){var t=this.texts({path:e}),n=A(t,1)[0];return n?n[0]:null}},{key:"getOffset",value:function(e){e=this.resolvePath(e),this.assertDescendant(e);var t=e.first(),n=this.nodes.slice(0,t).reduce((function(e,t){return e+t.text.length}),0);return 1===e.size?n:n+this.nodes.get(t).getOffset(U.drop(e))}},{key:"getOffsetAtRange",value:function(e){if((e=this.resolveRange(e)).isUnset)throw new Error("The range cannot be unset to calculcate its offset.");if(e.isExpanded)throw new Error("The range must be collapsed to calculcate its offset.");var t=e.start;return this.getOffset(t.path)+t.offset}},{key:"getParent",value:function(e){if(!(e=this.resolvePath(e)))return null;if(!e.size)return null;var t=U.lift(e);return this.getNode(t)}},{key:"getPreviousBlock",value:function(e){var t=this.blocks({path:e,onlyLeaves:!0,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousNode",value:function(e){var t=this.createIterable({path:e,downward:!1,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousSibling",value:function(e){var t=this.siblings(e,{direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getPreviousText",value:function(e){var t=this.texts({path:e,direction:"backward"}),n=A(t,1)[0];return n?n[0]:null}},{key:"getRootBlocksAtRange",value:function(e){var t=this.blocks({range:e,onlyRoots:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getRootInlinesAtRange",value:function(e){var t=this.inlines({range:e,onlyRoots:!0}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"getTextAtOffset",value:function(e){if(0===e)return this.getFirstText();if(e===this.text.length)return this.getLastText();if(e<0||e>this.text.length)return null;var t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this.texts()[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=A(s,1)[0];if((t+=l.text.length)>e)return l}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"getTextDirection",value:function(){var e=g()(this.text);return"neutral"===e?null:e}},{key:"getTexts",value:function(){var e=this.texts(),t=Array.from(e,(function(e){return A(e,1)[0]}));return Object(r.List)(t)}},{key:"getTextsAtRange",value:function(e){var t=this.texts({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"hasBlockChildren",value:function(){return!(!this.nodes||!this.nodes.find((function(e){return"block"===e.object})))}},{key:"hasChild",value:function(e){return!!this.getChild(e)}},{key:"hasInlineChildren",value:function(){return!(!this.nodes||!this.nodes.find((function(e){return"inline"===e.object||"text"===e.object})))}},{key:"hasDescendant",value:function(e){return!!this.getDescendant(e)}},{key:"hasVoidParent",value:function(e,t){return Object(s.a)(!pe.isValue(t),"As of Slate 0.42.0, the `node.hasVoidParent` method takes an `editor` instead of a `value`."),!!this.getClosestVoid(e,t)}},{key:"inlines",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.onlyLeaves,r=t.onlyRoots,i=t.onlyTypes,o=t.match,a=T(t,["onlyLeaves","onlyRoots","onlyTypes","match"]),s=this.descendants(S({includeBlocks:!1,includeTexts:!1,includeDocument:!1},a,{match:function(t,a){return!(i&&!i.includes(t.type))&&(!(n&&!t.isLeafInline())&&((!r||"block"===e.getParent(a).object)&&!(o&&!o(t,a))))}}));return s}},{key:"insertNode",value:function(e,t){var n=(e=this.resolvePath(e)).last(),r=U.lift(e),i=this.assertNode(r),o=i.nodes.splice(n,0,t);return i=i.set("nodes",o),this.replaceNode(r,i)}},{key:"insertText",value:function(e,t,n){e=this.resolvePath(e);var r=this.assertDescendant(e);return r=r.insertText(t,n),this.replaceNode(e,r)}},{key:"isLeafBlock",value:function(){return"block"===this.object&&!this.nodes.some((function(e){return"block"===e.object}))}},{key:"isLeafInline",value:function(){return"inline"===this.object&&!this.nodes.some((function(e){return"inline"===e.object}))}},{key:"isInRange",value:function(e,t){if(e=this.resolvePath(e),(t=this.resolveRange(t)).isUnset)return!1;var n=U.compare(e,t.start.path),r=U.compare(e,t.end.path),i=-1!==n&&1!==r;return i}},{key:"mapChildren",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,n=this.nodes;n.forEach((function(r,i){var o=t(r,i,e.nodes);o!==r&&(n=n.set(o.key,o))}));var r=this.set("nodes",n);return r}},{key:"mapDescendants",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht,n=this.nodes;n.forEach((function(r,i){var o=r;"text"!==o.object&&(o=o.mapDescendants(t)),(o=t(o,i,e.nodes))!==r&&(n=n.set(i,o))}));var r=this.set("nodes",n);return r}},{key:"marks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onlyTypes,n=void 0===t?null:t,r=e.match,i=T(e,["onlyTypes","match"]),o=this.texts(i);return k({},Symbol.iterator,(function(){var e=o[Symbol.iterator](),t=null,i=null,a=[];return{next:function o(){if(a.length){var s=a.shift();return n&&!n.includes(s.type)||r&&!r(s,t,i)?o():{value:[s,t,i],done:!1}}var l=e.next(),u=l.value;if(l.done)return{done:!0};var c=A(u,2);return t=c[0],i=c[1],a=t.marks.toArray(),o()}}}))}},{key:"mergeNode",value:function(e){var t=this.assertNode(e);if(0===(e=this.resolvePath(e)).last())throw new Error("Unable to merge node because it has no previous sibling: "+t);var n=U.decrement(e),r=this.assertNode(n);if(r.object!==t.object)throw new Error("Unable to merge two different kinds of nodes: "+r+" and "+t);var i="text"===r.object?r.mergeText(t):r.set("nodes",r.nodes.concat(t.nodes)),o=this;return o=(o=(o=o.removeNode(e)).removeNode(n)).insertNode(n,i)}},{key:"moveNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.assertNode(e);e=this.resolvePath(e),t=this.resolvePath(t,n);var i=U.lift(t);this.assertNode(i);var o=_e.create({type:"move_node",path:e,newPath:t});t=U.transform(e,o).first();var a=this;return a=(a=a.removeNode(e)).insertNode(t,r)}},{key:"removeMark",value:function(e,t){e=this.resolvePath(e);var n=this.assertDescendant(e);return n=n.removeMark(t),this.replaceNode(e,n)}},{key:"removeNode",value:function(e){this.assertDescendant(e);var t=(e=this.resolvePath(e)).flatMap((function(e){return["nodes",e]}));return this.deleteIn(t)}},{key:"removeText",value:function(e,t,n){var r=this.assertDescendant(e);return r=r.removeText(t,n.length),this.replaceNode(e,r)}},{key:"replaceNode",value:function(e,t){if(!(e=this.resolvePath(e)))throw new Error("Unable to replace a node because it could not be found in the first place: "+e);if(!e.size)return t;this.assertNode(e);var n=e.flatMap((function(e){return["nodes",e]}));return this.setIn(n,t)}},{key:"resolveAnnotation",value:function(e){return e=(e=te.create(e)).normalize(this)}},{key:"resolveDecoration",value:function(e){return e=(e=K.create(e)).normalize(this)}},{key:"resolvePoint",value:function(e){return e=(e=q.create(e)).normalize(this)}},{key:"resolveRange",value:function(e){return e=(e=Z.create(e)).normalize(this)}},{key:"resolveSelection",value:function(e){return e=(e=Y.create(e)).normalize(this)}},{key:"setNode",value:function(e,t){var n=this.assertNode(e);return n=n.merge(t),this.replaceNode(e,n)}},{key:"setMark",value:function(e,t,n){e=this.resolvePath(e);var r=this.assertDescendant(e);return r=r.setMark(t,n),this.replaceNode(e,r)}},{key:"siblings",value:function(e,t){return this.createIterable(S({path:e,upward:!1,downward:!1},t))}},{key:"splitNode",value:function(e,t,n){var r=this.assertNode(e);e=this.resolvePath(e);var i=void 0,o=void 0;if("text"===r.object){var a=r.splitText(t),s=A(a,2);i=s[0],o=s[1]}else{var l=r.nodes.take(t),u=r.nodes.skip(t);i=r.set("nodes",l),o=r.set("nodes",u).regenerateKey()}n&&"text"!==r.object&&(o=o.merge(n));var c=this;return c=(c=(c=c.removeNode(e)).insertNode(e,o)).insertNode(e,i)}},{key:"texts",value:function(e){return this.descendants(S({includeBlocks:!1,includeInlines:!1,includeDocument:!1},e))}},{key:"getBlocksAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getBlocksAtRange` method has been renamed to `getLeafBlocksAtRange`."),this.getLeafBlocksAtRange(e)}},{key:"getBlocksAtRangeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getBlocksAtRangeAsArray` method has been renamed to `getLeafBlocksAtRangeAsArray`."),this.getLeafBlocksAtRangeAsArray(e)}},{key:"getInlinesAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getInlinesAtRange` method has been renamed to `getLeafInlinesAtRange`."),this.getLeafInlinesAtRange(e)}},{key:"getInlinesAtRangeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.44 the `node.getInlinesAtRangeAsArray` method has been renamed to `getLeafInlinesAtRangeAsArray`."),this.getLeafInlinesAtRangeAsArray(e)}},{key:"getNextTextAndPath",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getNextTextAndPath` method has been renamed to `getNextTextEntry`."),this.getNextTextEntry(e)}},{key:"getNextDeepMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};Object(a.a)(!1,"As of slate@0.47, the `getNextDeepMatchingNodeAndPath` method is deprecated.");var n=this.getNextMatchingNodeAndPath(e);if(!n)return null;for(var r=A(n,2),i=r[0],o=r[1],s=void 0,l=function(){return s="text"!==i.object&&i.findFirstDescendantAndPath(t,o)};l(s);){var u=s,c=A(u,2);i=c[0],o=c[1]}return i?t(i)?[i,o]:this.getNextDeepMatchingNodeAndPath(n[1],t):null}},{key:"getPreviousTextAndPath",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getPreviousTextAndPath` method has been renamed to `getPreviousTextEntry`."),this.getPreviousTextEntry(e)}},{key:"findFirstDescendantAndPath",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `findFirstDescendantAndPath` method is deprecated."),this.findDescendantAndPath(e,t,!1)}},{key:"getPreviousMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(Object(a.a)(!1,"As of slate@0.47, the `getPreviousMatchingNodeAndPath` method is deprecated."),!e)return null;for(var n=e.size;n>0;n--){var r=e.slice(0,n);if(0!==r.last()){for(var i=U.decrement(r),o=this.getNode(i);o&&!t(o);)i=U.decrement(i),o=this.getNode(i);if(o)return[o,i]}}return null}},{key:"getPreviousDeepMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};Object(a.a)(!1,"As of slate@0.47, the `getPreviousDeepMatchingNodeAndPath` method is deprecated.");var n=this.getPreviousMatchingNodeAndPath(e);if(!n)return null;for(var r=A(n,2),i=r[0],o=r[1],s=void 0,l=function(){return s="text"!==i.object&&i.findLastDescendantAndPath(t,o)};l(s);){var u=s,c=A(u,2);i=c[0],o=c[1]}return i?t(i)?[i,o]:this.getPreviousDeepMatchingNodeAndPath(n[1],t):null}},{key:"findLastDescendantAndPath",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `findLastDescendantAndPath` method is deprecated."),this.findDescendantAndPath(e,t,!0)}},{key:"findDescendantAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U.create([]),n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(a.a)(!1,"As of slate@0.47, the `findDescendantAndPath` method is deprecated.");var r=void 0,i=void 0;return this.forEachDescendantWithPath((function(t,n,o){if(e(t,n,o))return r=t,i=n,!1}),t,n),r?[r,i]:null}},{key:"forEachDescendantWithPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U.create([]),n=arguments[2];Object(a.a)(!1,"As of slate@0.47, the `forEachDescendantWithPath` method is deprecated.");var r=this.nodes,i=void 0;return n&&(r=r.reverse()),r.forEach((function(o,a){var s=t.concat(a);return!1===e(o,s,r)?(i=!1,!1):"text"!==o.object?i=o.forEachDescendantWithPath(e,s,n):void 0})),i}},{key:"getNextMatchingNodeAndPath",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(Object(a.a)(!1,"As of slate@0.47, the `getNextMatchingNodeAndPath` method is deprecated."),!e)return null;for(var n=e.size;n>0;n--){for(var r=e.slice(0,n),i=U.increment(r),o=this.getNode(i);o&&!t(o);)i=U.increment(i),o=this.getNode(i);if(o)return[o,i]}return null}},{key:"getSelectionIndexes",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Object(a.a)(!1,"As of slate@0.47, the `getSelectionIndexes` method is deprecated.");var n=e.start,r=e.end;if(!t)return null;if(e.isUnset)return null;if(n.path.equals(r.path)){var i=this.getFurthestAncestor(n.path),o=i?this.nodes.indexOf(i):null;return{start:o,end:o+1}}var s=null,l=null;return this.nodes.forEach((function(e,t){return"text"===e.object?(null==s&&e.key===n.key&&(s=t),null==l&&e.key===r.key&&(l=t+1)):(null==s&&e.hasDescendant(n.key)&&(s=t),null==l&&e.hasDescendant(r.key)&&(l=t+1)),null==s||null==l})),t&&null==s&&(s=0),t&&null==l&&(l=this.nodes.size),null==s?null:{start:s,end:l}}},{key:"getTextsBetweenPositionsAsArray",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `getTextsBetweenPositionsAsArray` method is deprecated."),e=this.resolvePath(e),t=this.resolvePath(t),this.getTextsBetweenPathPositionsAsArray(e,t)}},{key:"getOrderedMarksBetweenPositions",value:function(e,t,n,i){Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksBetweenPositions` method is deprecated."),e=this.resolvePath(e),n=this.resolvePath(n);var o=this.getDescendant(e);if(U.isEqual(e,n))return o.marks;var s=this.getTextsBetweenPathPositionsAsArray(e,n);return Object(r.OrderedSet)().withMutations((function(e){s.forEach((function(t){e.union(t.marks)}))}))}},{key:"getTextsBetweenPathPositionsAsArray",value:function(e,t){if(Object(a.a)(!1,"As of slate@0.47, the `getTextsBetweenPathPositionsAsArray` method is deprecated."),e&&t&&U.isEqual(e,t))return[this.getDescendant(e)];if(!e&&!t)return this.getTextsAsArray();var n=e?e.get(0,0):0,r=t?t.get(0,this.nodes.size-1):this.nodes.size-1,i=[];return this.nodes.slice(n,r+1).forEach((function(o,a){if("text"===o.object)i.push(o);else{var s=e&&0===a?U.drop(e):null,l=t&&a===r-n?U.drop(t):null;i=i.concat(o.getTextsBetweenPathPositionsAsArray(s,l))}})),i}},{key:"getFurthestAncestor",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getFurthestAncestor` method has been renamed to `getFurthestChild`."),this.getFurthestChild(e)}},{key:"getLeafBlocksAtRangeAsArray",value:function(e){if(Object(a.a)(!1,"As of slate@0.47, the `getLeafBlocksAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset)return[];var t=e,n=t.start,r=t.end;return this.getLeafBlocksBetweenPathPositionsAsArray(n.path,r.path)}},{key:"getLeafBlocksBetweenPathPositionsAsArray",value:function(e,t){if(Object(a.a)(!1,"As of slate@0.47, the `getLeafBlocksBetweenPathPositionsAsArray` method is deprecated."),e&&t&&U.isEqual(e,t))return[this.getClosestBlock(e)];if(!e&&!t)return this.getBlocksAsArray();var n=e?e.get(0,0):0,r=t?t.get(0,this.nodes.size-1):this.nodes.size-1,i=[];return this.nodes.slice(n,r+1).forEach((function(o,a){if("block"===o.object)if(o.isLeafBlock())i.push(o);else{var s=e&&0===a?U.drop(e):null,l=t&&a===r-n?U.drop(t):null;i=i.concat(o.getLeafBlocksBetweenPathPositionsAsArray(s,l))}})),i}},{key:"getBlocksAsArray",value:function(){Object(a.a)(!1,"As of slate@0.47, the `getBlocksAsArray` method is deprecated.");var e=this.blocks({onlyLeaves:!0});return Array.from(e,(function(e){return A(e,1)[0]}))}},{key:"getBlocksByTypeAsArray",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getBlocksByTypeAsArray` method is deprecated.");var t=this.blocks({onlyLeaves:!0,onlyTypes:[e]});return Array.from(t,(function(e){return A(e,1)[0]}))}},{key:"getFurthestOnlyChildAncestor",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getFurthestOnlyChildAncestor` method is deprecated.");var t=this.getAncestors(e);return t&&t.rest().reverse().takeUntil((function(e){return e.nodes.size>1})).last()||null}},{key:"getInlinesAsArray",value:function(){return Object(a.a)(!1,"As of slate@0.47, the `getInlinesAsArray` method is deprecated."),Array.from(this.inlines({onlyLeaves:!0}),(function(e){return A(e,1)[0]}))}},{key:"getInlinesByTypeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getInlinesByTypeAsArray` method is deprecated."),Array.from(this.inlines({onlyLeaves:!0,onlyTypes:[e]}),(function(e){return A(e,1)[0]}))}},{key:"getLeafInlinesAtRangeAsArray",value:function(e){var t=this;return Object(a.a)(!1,"As of slate@0.47, the `getLeafInlinesAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset?[]:this.getTextsAtRangeAsArray(e).map((function(e){return t.getClosestInline(e.key)})).filter((function(e){return e}))}},{key:"getOrderedMarks",value:function(){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarks` method has been folded into `getMarks`, which will now return an ordered set."),this.getMarks()}},{key:"getOrderedMarksAtRange",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksAtRange` method has been folded into `getMarksAtRange`, which will now return an ordered set."),this.getMarksAtRange(e)}},{key:"getOrderedMarksByType",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getOrderedMarksByType` method has been folded into `getMarksByType`, which will now return an ordered set."),this.getMarksByType(e)}},{key:"getMarksByTypeAsArray",value:function(e){return Object(a.a)(!1,"As of slate@0.47, the `getMarksByTypeAsArray` method is deprecated."),this.nodes.reduce((function(t,n){return"text"===n.object?t.concat(n.marks.filter((function(t){return t.type===e}))):t.concat(n.getMarksByTypeAsArray(e))}),[])}},{key:"getMarksAsArray",value:function(){var e;Object(a.a)(!1,"As of slate@0.47, the `getMarksAsArray` method is deprecated.");var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=this.texts()[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value,u=A(l,1)[0];t.push(u.marks.toArray())}}catch(e){r=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return(e=[]).concat.apply(e,t)}},{key:"getRootInlinesAtRangeAsArray",value:function(e){var t=this;return Object(a.a)(!1,"As of slate@0.47, the `getRootInlinesAtRangeAsArray` method is deprecated."),(e=this.resolveRange(e)).isUnset?Object(r.List)():this.getTextsAtRangeAsArray(e).map((function(e){return t.getFurthestInline(e.key)})).filter((function(e){return e}))}},{key:"getTextsAsArray",value:function(){Object(a.a)(!1,"As of slate@0.47, the `getTextsAsArray` method is deprecated.");var e=this.texts();return Array.from(e,(function(e){return A(e,1)[0]}))}},{key:"getTextsAtRangeAsArray",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getTextsAtRangeAsArray` method is deprecated.");var t=this.texts({range:e});return Array.from(t,(function(e){return A(e,1)[0]}))}},{key:"getMarksAtPosition",value:function(e,t){Object(a.a)(!1,"As of slate@0.47, the `getMarksAtPosition` method is deprecated."),e=this.resolvePath(e);var n=this.getDescendant(e).marks;if(0!==t)return Object(r.OrderedSet)(n);var i=this.getClosestBlock(e);if(""===i.text)return Object(r.OrderedSet)(n);var o=this.texts({path:e,direction:"backward"}),s=A(o,1)[0];if(!s)return Object(r.OrderedSet)();var l=A(s,2),u=l[0],c=l[1];return i.hasDescendant(c)?Object(r.OrderedSet)(u.marks):Object(r.OrderedSet)(n)}},{key:"getNodesAtRange",value:function(e){Object(a.a)(!1,"As of slate@0.47, the `getNodesAtRange` method has been renamed to `getDescendantsAtRange`.");var t=this.descendants({range:e}),n=Array.from(t,(function(e){return A(e,1)[0]}));return Object(r.List)(n)}},{key:"isNodeInRange",value:function(e,t){return Object(a.a)(!1,"As of slate@0.47, the `isNodeInRange` method has been renamed to `isInRange`."),this.isInRange(e,t)}},{key:"text",get:function(){return this.getText()}}]),e}(),Gt=function(e){Wt.prototype["assert"+e]=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:e,n=this.setPoints([this.anchor.moveToStartOfNode(e),this.focus.moveToEndOfNode(t)]);return n}},{key:"moveToStart",value:function(){return this.setEnd(this.start)}},{key:"moveToStartOfNode",value:function(e){return this.updatePoints((function(t){return t.moveToStartOfNode(e)}))}},{key:"normalize",value:function(e){return this.updatePoints((function(t){return t.normalize(e)}))}},{key:"setAnchor",value:function(e){return this.set("anchor",e)}},{key:"setEnd",value:function(e){return this.isBackward?this.setAnchor(e):this.setFocus(e)}},{key:"setFocus",value:function(e){return this.set("focus",e)}},{key:"setPoints",value:function(e){var t=A(e,2),n=t[0],r=t[1];return this.set("anchor",n).set("focus",r)}},{key:"updatePoints",value:function(e){var t=this.anchor,n=this.focus;return t=e(t),n=e(n),this.merge({anchor:t,focus:n})}},{key:"setStart",value:function(e){return this.isBackward?this.setFocus(e):this.setAnchor(e)}},{key:"setProperties",value:function(e){var t=e=Z.createProperties(e),n=t.anchor,r=t.focus,i=T(t,["anchor","focus"]);return n&&(i.anchor=q.create(n)),r&&(i.focus=q.create(r)),this.merge(i)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={object:this.object,anchor:this.anchor.toJSON(e),focus:this.focus.toJSON(e)};return t}},{key:"toRange",value:function(){var e=Z.createProperties(this);return Z.create(e)}},{key:"unset",value:function(){return this.updatePoints((function(e){return e.unset()}))}},{key:"isCollapsed",get:function(){return this.anchor===this.focus||this.anchor.key===this.focus.key&&this.anchor.offset===this.focus.offset}},{key:"isExpanded",get:function(){return!this.isCollapsed}},{key:"isBackward",get:function(){var e=this.isUnset,t=this.anchor,n=this.focus;return e?null:t.key===n.key?t.offset>n.offset:U.isBefore(n.path,t.path)}},{key:"isForward",get:function(){var e=this.isBackward;return null==e?null:!e}},{key:"isUnset",get:function(){var e=this.anchor,t=this.focus;return e.isUnset||t.isUnset}},{key:"isSet",get:function(){return!this.isUnset}},{key:"start",get:function(){return this.isBackward?this.focus:this.anchor}},{key:"end",get:function(){return this.isBackward?this.anchor:this.focus}}]),e}(),[te,K,Z,Y]);var Xt={Annotation:te,Block:de,Change:Ee,Data:H,Decoration:K,Document:re,Editor:xt,Inline:oe,KeyUtils:_,Leaf:Ct,Mark:G,Node:ue,Operation:_e,PathUtils:U,Point:q,Range:Z,resetMemoization:Bt,Selection:Y,Text:le,TextUtils:De,useMemoization:Ut,Value:pe};t.default=Xt}.call(this,n(39))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";function r(e,t,n){for(var r,o,a=n||i,s=0,l=e.length,u=!1;s>1)],t))<0?s=r+1:(l=r,u=!o);return u?s:~s}function i(e,t){return e>t?1:e=0}function a(e,t,n){var r,i=e.length;if(e[0]<=t)return 0;if(t<=e[i-1])return i-1;if(n>0){for(r=1;r-1;return r&&e.splice(n,1),r}function c(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r0||n&&0===o)}))}n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"e",(function(){return f}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(283);function i(e,t){if(!e)throw new r.a(t)}},function(e,t,n){"use strict";var r,i=n(3),o=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};o.isRequired=o;var a=function(){return o};function s(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof i.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function l(e){function t(t,n,r,i,o,a){for(var s=arguments.length,l=Array(s>6?s-6:0),u=6;u>",null!=n[r])return e.apply(void 0,[n,r,i,o,a].concat(l));var c=o;return t?new Error("Required "+c+" `"+a+"` was not specified in `"+i+"`."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function u(e,t){return n="Iterable."+e,r=function(e){return i.Iterable.isIterable(e)&&t(e)},l((function(e,t,i,o,a){var l=e[t];if(!r(l)){var u=s(l);return new Error("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+i+"`, expected `"+n+"`.")}return null}));var n,r}(r={listOf:a,mapOf:a,orderedMapOf:a,setOf:a,orderedSetOf:a,stackOf:a,iterableOf:a,recordOf:a,shape:a,contains:a,mapContains:a,orderedMapContains:a,list:o,map:o,orderedMap:o,set:o,orderedSet:o,stack:o,seq:o,record:o,iterable:o}).iterable.indexed=u("Indexed",i.Iterable.isIndexed),r.iterable.keyed=u("Keyed",i.Iterable.isKeyed),e.exports=r},function(e,t,n){"use strict";var r=n(12);t.a={SINGLECLICK:"singleclick",CLICK:r.a.CLICK,DBLCLICK:r.a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},function(e,t,n){"use strict";t.a={ANIMATING:0,INTERACTING:1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a.a})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return P})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return I})),n.d(t,"f",(function(){return j})),n.d(t,"g",(function(){return L})),n.d(t,"h",(function(){return N}));var r=n(229),i=n(2),o=n(13),a=n(53),s=function(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit};s.prototype.canWrapX=function(){return this.canWrapX_},s.prototype.getCode=function(){return this.code_},s.prototype.getExtent=function(){return this.extent_},s.prototype.getUnits=function(){return this.units_},s.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||a.a[this.units_]},s.prototype.getWorldExtent=function(){return this.worldExtent_},s.prototype.getAxisOrientation=function(){return this.axisOrientation_},s.prototype.isGlobal=function(){return this.global_},s.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)},s.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},s.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},s.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)},s.prototype.setWorldExtent=function(e){this.worldExtent_=e},s.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},s.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var l=s,u=6378137*Math.PI,c=[-u,-u,u,u],d=[-180,-85,180,85],f=function(e){function t(t){e.call(this,{code:t,units:a.b.METERS,extent:c,global:!0,worldExtent:d,getPointResolution:function(e,t){return e/Object(o.b)(t[1]/6378137)}})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(l),p=[new f("EPSG:3857"),new f("EPSG:102100"),new f("EPSG:102113"),new f("EPSG:900913"),new f("urn:ogc:def:crs:EPSG:6.18:3:3857"),new f("urn:ogc:def:crs:EPSG::3857"),new f("http://www.opengis.net/gml/srs/epsg.xml#3857")];function h(e,t,n){var r=e.length,i=n>1?n:2,o=t;void 0===o&&(o=i>2?e.slice():new Array(r));for(var a=u,s=0;sa?l=a:l<-a&&(l=-a),o[s+1]=l}return o}function m(e,t,n){var r=e.length,i=n>1?n:2,o=t;void 0===o&&(o=i>2?e.slice():new Array(r));for(var a=0;a * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var r=n(1182);function i(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){var r=n(1186);e.exports=function(e){if(t=e,t&&t.window===t)return e;var t;var n=r(e);if(i){n.parentWindow.execScript("document._parentWindow = window;","Javascript");var o=n._parentWindow;return n._parentWindow=null,o}return n.defaultView||n.parentWindow};var i=n(1187)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"APIError",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Cursor",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"CURSOR_COMPATIBILITY_SYMBOL",{enumerable:!0,get:function(){return i.CURSOR_COMPATIBILITY_SYMBOL}}),Object.defineProperty(t,"EditorialWorkflowError",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"EDITORIAL_WORKFLOW_ERROR",{enumerable:!0,get:function(){return o.EDITORIAL_WORKFLOW_ERROR}}),Object.defineProperty(t,"localForage",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"isAbsolutePath",{enumerable:!0,get:function(){return s.isAbsolutePath}}),Object.defineProperty(t,"basename",{enumerable:!0,get:function(){return s.basename}}),Object.defineProperty(t,"fileExtensionWithSeparator",{enumerable:!0,get:function(){return s.fileExtensionWithSeparator}}),Object.defineProperty(t,"fileExtension",{enumerable:!0,get:function(){return s.fileExtension}}),Object.defineProperty(t,"onlySuccessfulPromises",{enumerable:!0,get:function(){return l.onlySuccessfulPromises}}),Object.defineProperty(t,"flowAsync",{enumerable:!0,get:function(){return l.flowAsync}}),Object.defineProperty(t,"then",{enumerable:!0,get:function(){return l.then}}),Object.defineProperty(t,"unsentRequest",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"filterByPropExtension",{enumerable:!0,get:function(){return c.filterByPropExtension}}),Object.defineProperty(t,"getAllResponses",{enumerable:!0,get:function(){return c.getAllResponses}}),Object.defineProperty(t,"parseLinkHeader",{enumerable:!0,get:function(){return c.parseLinkHeader}}),Object.defineProperty(t,"parseResponse",{enumerable:!0,get:function(){return c.parseResponse}}),Object.defineProperty(t,"responseParser",{enumerable:!0,get:function(){return c.responseParser}}),Object.defineProperty(t,"getPathDepth",{enumerable:!0,get:function(){return c.getPathDepth}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"getBlobSHA",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"asyncLock",{enumerable:!0,get:function(){return p.asyncLock}}),Object.defineProperty(t,"entriesByFiles",{enumerable:!0,get:function(){return h.entriesByFiles}}),Object.defineProperty(t,"entriesByFolder",{enumerable:!0,get:function(){return h.entriesByFolder}}),Object.defineProperty(t,"unpublishedEntries",{enumerable:!0,get:function(){return h.unpublishedEntries}}),Object.defineProperty(t,"getMediaDisplayURL",{enumerable:!0,get:function(){return h.getMediaDisplayURL}}),Object.defineProperty(t,"getMediaAsBlob",{enumerable:!0,get:function(){return h.getMediaAsBlob}}),Object.defineProperty(t,"runWithLock",{enumerable:!0,get:function(){return h.runWithLock}}),Object.defineProperty(t,"blobToFileObj",{enumerable:!0,get:function(){return h.blobToFileObj}}),Object.defineProperty(t,"readFile",{enumerable:!0,get:function(){return m.readFile}}),Object.defineProperty(t,"CMS_BRANCH_PREFIX",{enumerable:!0,get:function(){return m.CMS_BRANCH_PREFIX}}),Object.defineProperty(t,"generateContentKey",{enumerable:!0,get:function(){return m.generateContentKey}}),Object.defineProperty(t,"isCMSLabel",{enumerable:!0,get:function(){return m.isCMSLabel}}),Object.defineProperty(t,"labelToStatus",{enumerable:!0,get:function(){return m.labelToStatus}}),Object.defineProperty(t,"statusToLabel",{enumerable:!0,get:function(){return m.statusToLabel}}),Object.defineProperty(t,"DEFAULT_PR_BODY",{enumerable:!0,get:function(){return m.DEFAULT_PR_BODY}}),Object.defineProperty(t,"MERGE_COMMIT_MESSAGE",{enumerable:!0,get:function(){return m.MERGE_COMMIT_MESSAGE}}),Object.defineProperty(t,"isPreviewContext",{enumerable:!0,get:function(){return m.isPreviewContext}}),Object.defineProperty(t,"getPreviewStatus",{enumerable:!0,get:function(){return m.getPreviewStatus}}),Object.defineProperty(t,"PreviewState",{enumerable:!0,get:function(){return m.PreviewState}}),Object.defineProperty(t,"parseContentKey",{enumerable:!0,get:function(){return m.parseContentKey}}),Object.defineProperty(t,"branchFromContentKey",{enumerable:!0,get:function(){return m.branchFromContentKey}}),Object.defineProperty(t,"contentKeyFromBranch",{enumerable:!0,get:function(){return m.contentKeyFromBranch}}),Object.defineProperty(t,"createPointerFile",{enumerable:!0,get:function(){return g.createPointerFile}}),Object.defineProperty(t,"getLargeMediaFilteredMediaFiles",{enumerable:!0,get:function(){return g.getLargeMediaFilteredMediaFiles}}),Object.defineProperty(t,"getLargeMediaPatternsFromGitAttributesFile",{enumerable:!0,get:function(){return g.getLargeMediaPatternsFromGitAttributesFile}}),Object.defineProperty(t,"parsePointerFile",{enumerable:!0,get:function(){return g.parsePointerFile}}),Object.defineProperty(t,"getPointerFileForMediaFileObj",{enumerable:!0,get:function(){return g.getPointerFileForMediaFileObj}}),t.NetlifyCmsLibUtil=void 0;var r=b(n(477)),i=y(n(896)),o=y(n(897)),a=b(n(898)),s=n(900),l=n(901),u=b(n(478)),c=n(902),d=b(n(926)),f=b(n(489)),p=n(929),h=n(930),m=n(931),g=n(932);function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function b(e){return e&&e.__esModule?e:{default:e}}const _={APIError:r.default,Cursor:i.default,CURSOR_COMPATIBILITY_SYMBOL:i.CURSOR_COMPATIBILITY_SYMBOL,EditorialWorkflowError:o.default,EDITORIAL_WORKFLOW_ERROR:o.EDITORIAL_WORKFLOW_ERROR,localForage:a.default,basename:s.basename,fileExtensionWithSeparator:s.fileExtensionWithSeparator,fileExtension:s.fileExtension,onlySuccessfulPromises:l.onlySuccessfulPromises,flowAsync:l.flowAsync,then:l.then,unsentRequest:u.default,filterByPropExtension:c.filterByPropExtension,parseLinkHeader:c.parseLinkHeader,parseResponse:c.parseResponse,responseParser:c.responseParser,loadScript:d.default,getBlobSHA:f.default,getPathDepth:c.getPathDepth,entriesByFiles:h.entriesByFiles,entriesByFolder:h.entriesByFolder,unpublishedEntries:h.unpublishedEntries,getMediaDisplayURL:h.getMediaDisplayURL,getMediaAsBlob:h.getMediaAsBlob,readFile:m.readFile,CMS_BRANCH_PREFIX:m.CMS_BRANCH_PREFIX,generateContentKey:m.generateContentKey,isCMSLabel:m.isCMSLabel,labelToStatus:m.labelToStatus,statusToLabel:m.statusToLabel,DEFAULT_PR_BODY:m.DEFAULT_PR_BODY,MERGE_COMMIT_MESSAGE:m.MERGE_COMMIT_MESSAGE,isPreviewContext:m.isPreviewContext,getPreviewStatus:m.getPreviewStatus,runWithLock:h.runWithLock,PreviewState:m.PreviewState,parseContentKey:m.parseContentKey,createPointerFile:g.createPointerFile,getLargeMediaFilteredMediaFiles:g.getLargeMediaFilteredMediaFiles,getLargeMediaPatternsFromGitAttributesFile:g.getLargeMediaPatternsFromGitAttributesFile,parsePointerFile:g.parsePointerFile,getPointerFileForMediaFileObj:g.getPointerFileForMediaFileObj,branchFromContentKey:m.branchFromContentKey,contentKeyFromBranch:m.contentKeyFromBranch,blobToFileObj:h.blobToFileObj};t.NetlifyCmsLibUtil=_},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return p}));var r=n(32),i=n(51),o=n(228),a=n(13),s=function(e){function t(t){e.call(this),t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getActive=function(){return this.get(o.a.ACTIVE)},t.prototype.getMap=function(){return this.map_},t.prototype.handleEvent=function(e){return!0},t.prototype.setActive=function(e){this.set(o.a.ACTIVE,e)},t.prototype.setMap=function(e){this.map_=e},t}(r.a);function l(e,t,n){var r=e.getCenter();if(r){var o=e.constrainCenter([r[0]+t[0],r[1]+t[1]]);n?e.animate({duration:n,easing:i.d,center:o}):e.setCenter(o)}}function u(e,t,n,r){t=e.constrainRotation(t,0),c(e,t,n,r)}function c(e,t,n,r){if(void 0!==t){var o=e.getRotation(),a=e.getCenter();void 0!==o&&a&&r>0?e.animate({rotation:t,anchor:n,duration:r,easing:i.b}):e.rotate(t,n)}}function d(e,t,n,r,i){t=e.constrainResolution(t,0,i),p(e,t,n,r)}function f(e,t,n,r){var i=e.getResolution(),o=e.constrainResolution(i,t,0);if(void 0!==o){var s=e.getResolutions();o=Object(a.a)(o,e.getMinResolution()||s[s.length-1],e.getMaxResolution()||s[0])}if(n&&void 0!==o&&o!==i){var l=e.getCenter(),u=e.calculateCenterZoom(o,n);u=e.constrainCenter(u),n=[(o*l[0]-i*u[0])/(o-i),(o*l[1]-i*u[1])/(o-i)]}p(e,o,n,r)}function p(e,t,n,r){if(t){var o=e.getResolution(),a=e.getCenter();if(void 0!==o&&a&&t!==o&&r)e.animate({resolution:t,anchor:n,duration:r,easing:i.b});else{if(n){var s=e.calculateCenterZoom(t,n);e.setCenter(s)}e.setResolution(t)}}}t.a=s},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i}));var r=function(e){this.propagationStopped,this.type=e,this.target=null};function i(e){e.stopPropagation()}r.prototype.preventDefault=function(){this.propagationStopped=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},t.a=r},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;f--){var p=a[f];"."===p?o(a,f):".."===p?(o(a,f),d++):d&&(o(a,f),d--)}if(!u)for(;d--;d)a.unshift("..");!u||""===a[0]||a[0]&&i(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(44);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}function m(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"==typeof e?(o=h(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),d({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=g(e,t,f(),_.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(_.entries[_.index]=r,d({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return _}},function(e,t,n){"use strict";t.a={ADD:"add",REMOVE:"remove"}},function(e,t,n){"use strict";var r=n(645),i=n.n(r).a;t.a=i},function(e,t){e.exports=function(){for(var e={},t=0;t0}}else if(e.type==r.a.POINTERDOWN){var i=this.handleDownEvent(e);i&&e.preventDefault(),this.handlingDownUpSequence=i,t=this.stopDown(i)}else e.type==r.a.POINTERMOVE&&this.handleMoveEvent(e);return!t},t.prototype.handleMoveEvent=function(e){},t.prototype.handleUpEvent=function(e){return!1},t.prototype.stopDown=function(e){return e},t.prototype.updateTrackedPointers_=function(e){if(function(e){var t=e.type;return t===r.a.POINTERDOWN||t===r.a.POINTERDRAG||t===r.a.POINTERUP}(e)){var t=e.pointerEvent,n=t.pointerId.toString();e.type==r.a.POINTERUP?delete this.trackedPointers_[n]:(e.type==r.a.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=t),this.targetPointers=Object(o.c)(this.trackedPointers_)}},t}(i.a);function s(e){for(var t=e.length,n=0,r=0,i=0;i0;)this.pop()},t.prototype.extend=function(e){for(var t=0,n=e.length;t1)for(var n=1;n1)l=n;else{if(p>0){for(var h=0;ho&&(o=c),a=l,s=u}return o}function a(e,t,n,r,i){for(var a=0,s=n.length;a=0;--r)if(e[r]!=t[r]){n=!1;break}return n}function o(e,t){var n=Math.cos(t),r=Math.sin(t),i=e[0]*n-e[1]*r,o=e[1]*n+e[0]*r;return e[0]=i,e[1]=o,e}function a(e,t){return e[0]*=t,e[1]*=t,e}function s(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}},function(e,t,n){"use strict";n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return E})),n.d(t,"d",(function(){return x}));var r=n(24),i=n(2),o=n(35),a=n(8),s=n(57),l=n(193),u=n(70),c=n(64),d=n(65),f=n(90),p=function(e){function t(t,n){e.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===n||Array.isArray(t[0])?this.setCoordinates(t,n):this.setFlatCoordinates(n,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(e,t,n,r){return r=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1185)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(69))},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,o,a=t.children||[],s=a.length,l=[],u=-1;for(;++u0&&e[1]>0}function i(e,t,n){return void 0===n&&(n=[0,0]),n[0]=e[0]*t+.5|0,n[1]=e[1]*t+.5|0,n}function o(e,t){return Array.isArray(e)?e:(void 0===t?t=[e,e]:t[0]=t[1]=e,t)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,r=void 0,u=Array.isArray(e),c=[e],d=-1,f=[],p=void 0,h=void 0,m=void 0,g=[],v=[],y=e;do{var b=++d===c.length,_=b&&0!==f.length;if(b){if(h=0===v.length?void 0:g[g.length-1],p=m,m=v.pop(),_){if(u)p=p.slice();else{for(var w={},E=0,x=Object.keys(p);Ea.selectEntry(e.entries,t,n);t.selectEntries=(e,t)=>a.selectEntries(e.entries,t);t.selectPublishedSlugs=(e,t)=>a.selectPublishedSlugs(e.entries,t);t.selectSearchedEntries=e=>{const t=e.search.get("entryIds");return t&&t.map(({collection:t,slug:n})=>a.selectEntry(e.entries,t,n))};t.selectDeployPreview=(e,t,n)=>h.selectDeployPreview(e.deploys,t,n);t.selectUnpublishedEntry=(e,t,n)=>l.selectUnpublishedEntry(e.editorialWorkflow,t,n);t.selectUnpublishedEntriesByStatus=(e,t)=>l.selectUnpublishedEntriesByStatus(e.editorialWorkflow,t);t.selectUnpublishedSlugs=(e,t)=>l.selectUnpublishedSlugs(e.editorialWorkflow,t);t.selectIntegration=(e,t,n)=>o.selectIntegration(e.integrations,t,n)},function(e,t,n){"use strict"; /*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */var r,i="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,i="";else if(i.length>=n)return i.substr(0,n);for(;n>i.length&&t>1;)1&t&&(i+=e),t>>=1,e+=e;return i=(i+=e).substr(0,n)}},function(e,t,n){"use strict";n.r(t),n.d(t,"Provider",(function(){return d})),n.d(t,"createProvider",(function(){return c})),n.d(t,"connectAdvanced",(function(){return O})),n.d(t,"connect",(function(){return te}));var r=n(116),i=n(0),o=n.n(i),a=n(1),s=n.n(a),l=s.a.shape({trySubscribe:s.a.func.isRequired,tryUnsubscribe:s.a.func.isRequired,notifyNestedSubs:s.a.func.isRequired,isSubscribed:s.a.func.isRequired}),u=s.a.shape({subscribe:s.a.func.isRequired,dispatch:s.a.func.isRequired,getState:s.a.func.isRequired});o.a.forwardRef;function c(e){var t;void 0===e&&(e="store");var n=e+"Subscription",o=function(t){Object(r.a)(a,t);var o=a.prototype;function a(n,r){var i;return(i=t.call(this,n,r)||this)[e]=n.store,i}return o.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},o.render=function(){return i.Children.only(this.props.children)},a}(i.Component);return o.propTypes={store:u.isRequired,children:s.a.element.isRequired},o.childContextTypes=((t={})[e]=u.isRequired,t[n]=l,t),o}var d=c(),f=n(22),p=n(46),h=n(99),m=n(189),g=n.n(m),v=n(23),y=n.n(v),b=n(226),_={notify:function(){}};var w=function(){function e(e,t,n){this.store=e,this.parentSub=t,this.onStateChange=n,this.unsubscribe=null,this.listeners=_}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(e=[],t=[],{clear:function(){t=null,e=null},notify:function(){for(var n=e=t,r=0;r, or explicitly pass "'+A+'" as a prop to "'+o+'".'),r.initSelector(),r.initSubscription(),r}Object(r.a)(s,n);var l=s.prototype;return l.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return(e={})[I]=t||this.context[I],e},l.componentDidMount=function(){T&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},l.componentWillReceiveProps=function(e){this.selector.run(e)},l.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},l.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=S,this.store=null,this.selector.run=S,this.selector.shouldComponentUpdate=!1},l.getWrappedInstance=function(){return y()(R,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+m+"() call."),this.wrappedInstance},l.setWrappedInstance=function(e){this.wrappedInstance=e},l.initSelector=function(){var t=e(this.store.dispatch,a);this.selector=function(e,t){var n={run:function(r){try{var i=e(t.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}(t,this.store),this.selector.run(this.props)},l.initSubscription=function(){if(T){var e=(this.propsMode?this.props:this.context)[I];this.subscription=new w(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},l.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(k)):this.notifyNestedSubs()},l.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},l.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},l.addExtraProps=function(e){if(!(R||_||this.propsMode&&this.subscription))return e;var t=Object(p.a)({},e);return R&&(t.ref=this.setWrappedInstance),_&&(t[_]=this.renderCount++),this.propsMode&&this.subscription&&(t[I]=this.subscription),t},l.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(i.createElement)(t,this.addExtraProps(e.props))},s}(i.Component);return E&&(s.prototype.UNSAFE_componentWillReceiveProps=s.prototype.componentWillReceiveProps,delete s.prototype.componentWillReceiveProps),s.WrappedComponent=t,s.displayName=o,s.childContextTypes=L,s.contextTypes=j,s.propTypes=j,g()(s,t)}}var T=Object.prototype.hasOwnProperty;function C(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function A(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function q(e,t){return e===t}var H,W,G,V,K,$,Y,Q,X,J,Z,ee,te=(G=(W=void 0===H?{}:H).connectHOC,V=void 0===G?O:G,K=W.mapStateToPropsFactories,$=void 0===K?j:K,Y=W.mapDispatchToPropsFactories,Q=void 0===Y?D:Y,X=W.mergePropsFactories,J=void 0===X?N:X,Z=W.selectorFactory,ee=void 0===Z?U:Z,function(e,t,n,r){void 0===r&&(r={});var i=r,o=i.pure,a=void 0===o||o,s=i.areStatesEqual,l=void 0===s?q:s,u=i.areOwnPropsEqual,c=void 0===u?A:u,d=i.areStatePropsEqual,f=void 0===d?A:d,m=i.areMergedPropsEqual,g=void 0===m?A:m,v=Object(h.a)(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=z(e,$,"mapStateToProps"),b=z(t,Q,"mapDispatchToProps"),_=z(n,J,"mergeProps");return V(ee,Object(p.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:_,pure:a,areStatesEqual:l,areOwnPropsEqual:c,areStatePropsEqual:f,areMergedPropsEqual:g},v))})},function(e,t,n){"use strict";var r=n(192),i=n(7),o=n(30),a=n(45),s=function(e){function t(){e.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.addEventListener=function(e,t){var n=this.listeners_[e];n||(n=this.listeners_[e]=[]),-1===n.indexOf(t)&&n.push(t)},t.prototype.dispatchEvent=function(e){var t="string"==typeof e?new a.a(e):e,n=t.type;t.target=this;var r,i=this.listeners_[n];if(i){n in this.dispatching_||(this.dispatching_[n]=0,this.pendingRemovals_[n]=0),++this.dispatching_[n];for(var s=0,l=i.length;s0},t.prototype.removeEventListener=function(e,t){var n=this.listeners_[e];if(n){var r=n.indexOf(t);e in this.pendingRemovals_?(n[r]=o.c,++this.pendingRemovals_[e]):(n.splice(r,1),0===n.length&&delete this.listeners_[e])}},t}(r.a);t.a=s},function(e,t,n){"use strict";t.a={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(13);function i(e,t,n,i,o,a,s){var l=(n-t)/i;if(l<3){for(;t0;){for(var f=c.pop(),p=c.pop(),h=0,m=e[p],g=e[p+1],v=e[f],y=e[f+1],b=p+i;bh&&(d=b,h=E)}h>o&&(u[(d-t)/i]=1,p+i0&&g>h)&&(m<0&&v0&&v>m)?(l=f,u=p):(o[s++]=l,o[s++]=u,c=l,d=u,l=f,u=p)}}return o[s++]=l,o[s++]=u,s}function l(e,t,n,r,i,o,a,l){for(var u=0,c=n.length;uo&&(u-s)*(o-l)-(i-s)*(c-l)>0&&a++:c<=o&&(u-s)*(o-l)-(i-s)*(c-l)<0&&a--,s=u,l=c}return 0!==a}function a(e,t,n,r,i,a){if(0===n.length)return!1;if(!o(e,t,n[0],r,i,a))return!1;for(var s=1,l=n.length;s(e.get("extension")||(0,i.default)(c.formatExtensions,e.get("format")||"frontmatter")).replace(/^\./,""),fields:e=>e.get("fields"),entryPath(e,t){const n=e.get("folder").replace(/\/$/,"");return"".concat(n,"/").concat(t,".").concat(this.entryExtension(e))},entrySlug(e,t){var n;const i=e.get("folder").replace(/\/$/,"");return null===(n=t.split(i+"/").pop())||void 0===n?void 0:n.replace(new RegExp("\\.".concat((0,r.default)(this.entryExtension(e)),"$")),"")},allowNewEntries:e=>e.get("create"),allowDeletion:e=>e.get("delete",!0),templateName:e=>e.get("name")},[l.FILES]:{fileForEntry(e,t){const n=e.get("files");return n&&n.filter(e=>(null==e?void 0:e.get("name"))===t).get(0)},fields(e,t){const n=this.fileForEntry(e,t);return n&&n.get("fields")},entryPath(e,t){const n=this.fileForEntry(e,t);return n&&n.get("file")},entrySlug(e,t){const n=e.get("files").filter(e=>(null==e?void 0:e.get("file"))===t).get(0);return n&&n.get("name")},entryLabel(e,t){const n=this.entryPath(e,t),r=e.get("files");return r&&r.find(e=>(null==e?void 0:e.get("file"))===n).get("label")},allowNewEntries:()=>!1,allowDeletion:e=>e.get("delete",!1),templateName:(e,t)=>t}},m=e=>e.reduce((e,t)=>{if(t.has("media_folder")&&(e=[...e,t]),t.has("fields")){var n;const r=null===(n=t.get("fields"))||void 0===n?void 0:n.toArray();e=[...e,...m(r)]}else if(t.has("field")){const n=t.get("field");e=[...e,...m([n])]}else if(t.has("types")){var r;const n=null===(r=t.get("types"))||void 0===r?void 0:r.toArray();e=[...e,...m(n)]}return e},[]),g=(e,t)=>{var n;return null===(n=e.get("files"))||void 0===n?void 0:n.toArray().filter(e=>e.get("name")===t)[0]},v=(e,t)=>{if(e.has("folder")){const t=e.get("fields").toArray();return m(t)}if(e.has("files")){var n;const r=(null===(n=g(e,t))||void 0===n?void 0:n.get("fields").toArray())||[];return m(r)}return[]};t.selectFieldsWithMediaFolders=v;t.selectMediaFolders=(e,t,n)=>{const r=v(t,n.get("slug")).map(r=>(0,d.selectMediaFolder)(e.config,t,n,r));if(t.has("files")){g(t,n.get("slug"))&&r.unshift((0,d.selectMediaFolder)(e.config,t,n,void 0))}return t.has("media_folder")&&(t=t.delete("files"),r.unshift((0,d.selectMediaFolder)(e.config,t,n,void 0))),r};t.selectFields=(e,t)=>h[e.get("type")].fields(e,t);t.selectFolderEntryExtension=e=>h[l.FOLDER].entryExtension(e);t.selectFileEntryLabel=(e,t)=>h[l.FILES].entryLabel(e,t);t.selectEntryPath=(e,t)=>h[e.get("type")].entryPath(e,t);t.selectEntrySlug=(e,t)=>h[e.get("type")].entrySlug(e,t);t.selectAllowNewEntries=e=>h[e.get("type")].allowNewEntries(e);t.selectAllowDeletion=e=>h[e.get("type")].allowDeletion(e);t.selectTemplateName=(e,t)=>h[e.get("type")].templateName(e,t);const y=(e,t="")=>{let n=e.map(e=>"".concat(t).concat(e.get("name")));return e.forEach((e,t)=>{if(e.has("fields")){var r;const i=null===(r=e.get("fields"))||void 0===r?void 0:r.toArray();n=[...n,...y(i,"".concat(n[t],"."))]}else if(e.has("field")){const r=e.get("field");n=[...n,...y([r],"".concat(n[t],"."))]}else if(e.has("types")){var i;const r=null===(i=e.get("types"))||void 0===i?void 0:i.toArray();n=[...n,...y(r,"".concat(n[t],"."))]}}),n};t.getFieldsNames=y;const b=(e,t)=>{const n=(0,f.keyToPathArray)(t);let r,i,a=e.get("fields",(0,o.List)()).toArray();for(;(r=n.shift())&&a;){var s,l,u,c,d;if(i=a.find(e=>e.get("name")===r),null===(s=i)||void 0===s?void 0:s.has("fields"))a=null===(c=i)||void 0===c||null===(d=c.get("fields"))||void 0===d?void 0:d.toArray();else if(null===(l=i)||void 0===l?void 0:l.has("field")){var p;a=[null===(p=i)||void 0===p?void 0:p.get("field")]}else if(null===(u=i)||void 0===u?void 0:u.has("types")){var h,m;a=null===(h=i)||void 0===h||null===(m=h.get("types"))||void 0===m?void 0:m.toArray()}}return i};t.selectField=b;t.updateFieldByKey=(e,t,n)=>{const r=b(e,t);if(!r)return e;let i=!1;const a=e=>i?e:e=e.map(e=>{const t=e;return t===r?(i=!0,n(t)):t.has("fields")?t.set("fields",a(t.get("fields"))):t.has("field")?t.set("field",a((0,o.List)([t.get("field")])).get(0)):t.has("types")?t.set("types",a(t.get("types"))):t}).toList();return e=e.set("fields",a(e.get("fields",(0,o.List)())))};const _=e=>{const t=e.get("identifier_field"),n=t?[t,...u.IDENTIFIER_FIELDS]:u.IDENTIFIER_FIELDS,r=y(e.get("fields",(0,o.List)()).toArray());return n.find(e=>r.find(t=>(null==t?void 0:t.toLowerCase().trim())===e.toLowerCase().trim()))};t.selectIdentifier=_;t.selectInferedField=(e,t)=>{if("title"===t&&e.get("identifier_field"))return _(e);const n=u.INFERABLE_FIELDS[t],r=e.get("fields");let i;if(!r||!n)return null;const o=r.filter(e=>(null==e?void 0:e.get("widget","string"))===n.type).map(e=>null==e?void 0:e.get("name"));return i=o.filter(e=>-1!==n.synonyms.indexOf(e)),i&&i.size>0?i.first():(i=r.filter(e=>-1!==n.secondaryTypes.indexOf(null==e?void 0:e.get("widget","string"))).map(e=>null==e?void 0:e.get("name")).filter(e=>-1!==n.synonyms.indexOf(e)),i&&i.size>0?i.first():n.fallbackToFirstField&&o.size>0?o.first():(n.showError&&(0,a.default)("The Field ".concat(t," is missing for the collection “").concat(e.get("name"),"”"),"Netlify CMS tries to infer the entry ".concat(t," automatically, but one couldn't be found for entries of the collection “").concat(e.get("name"),"”. Please check your site configuration.")),null))};var w=(e=null,t)=>{switch(t.type){case s.CONFIG_SUCCESS:return(t.payload?t.payload.get("collections"):(0,o.List)()).toOrderedMap().map(e=>{const t=e;return t.has("folder")?t.set("type",l.FOLDER):t.has("files")?t.set("type",l.FILES):void 0}).mapKeys((e,t)=>t.get("name"));default:return e}};t.default=w},function(e,t,n){var r=n(884)();e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"TemplateTag",(function(){return l})),n.d(t,"trimResultTransformer",(function(){return u})),n.d(t,"stripIndentTransformer",(function(){return d})),n.d(t,"replaceResultTransformer",(function(){return f})),n.d(t,"replaceSubstitutionTransformer",(function(){return p})),n.d(t,"replaceStringTransformer",(function(){return h})),n.d(t,"inlineArrayTransformer",(function(){return g})),n.d(t,"splitStringTransformer",(function(){return v})),n.d(t,"removeNonPrintingValuesTransformer",(function(){return b})),n.d(t,"commaLists",(function(){return _})),n.d(t,"commaListsAnd",(function(){return w})),n.d(t,"commaListsOr",(function(){return E})),n.d(t,"html",(function(){return x})),n.d(t,"codeBlock",(function(){return x})),n.d(t,"source",(function(){return x})),n.d(t,"safeHtml",(function(){return k})),n.d(t,"oneLine",(function(){return S})),n.d(t,"oneLineTrim",(function(){return O})),n.d(t,"oneLineCommaLists",(function(){return T})),n.d(t,"oneLineCommaListsOr",(function(){return C})),n.d(t,"oneLineCommaListsAnd",(function(){return A})),n.d(t,"inlineLists",(function(){return P})),n.d(t,"oneLineInlineLists",(function(){return R})),n.d(t,"stripIndent",(function(){return M})),n.d(t,"stripIndents",(function(){return I}));var r,i,o=function(){function e(e,t){for(var n=0;n1?n-1:0),i=1;i0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map((function(e){return"function"==typeof e?e():e})),this.tag}return o(e,[{key:"interimTag",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var n=t.match(/^[^\S\n]*(?=\S)/gm),r=n&&Math.min.apply(Math,c(n.map((function(e){return e.length}))));if(r){var i=new RegExp("^.{"+r+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},f=function(e,t){return{onEndResult:function(n){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(e,t)}}},p=function(e,t){return{onSubstitution:function(n,r){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==n?n:n.toString().replace(e,t)}}},h=function(e,t){return{onString:function(n){if(null==e||null==t)throw new Error("replaceStringTransformer requires at least 2 arguments.");return n.replace(e,t)}}},m={separator:"",conjunction:"",serial:!1},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return{onSubstitution:function(t,n){if(Array.isArray(t)){var r=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=n.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&r>1){var l=t.lastIndexOf(i);t=t.slice(0,l)+(a?i:"")+" "+o+t.slice(l+1)}}return t}}},v=function(e){return{onSubstitution:function(t,n){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}},y=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e},b=function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(y):y(e)?e:""}}},_=new l(g({separator:","}),d,u),w=new l(g({separator:",",conjunction:"and"}),d,u),E=new l(g({separator:",",conjunction:"or"}),d,u),x=new l(v("\n"),b,g,d,u),k=new l(v("\n"),g,d,u,p(/&/g,"&"),p(//g,">"),p(/"/g,"""),p(/'/g,"'"),p(/`/g,"`")),S=new l(f(/(?:\n(?:\s*))+/g," "),u),O=new l(f(/(?:\n\s*)/g,""),u),T=new l(g({separator:","}),f(/(?:\s+)/g," "),u),C=new l(g({separator:",",conjunction:"or"}),f(/(?:\s+)/g," "),u),A=new l(g({separator:",",conjunction:"and"}),f(/(?:\s+)/g," "),u),P=new l(g,d,u),R=new l(g,f(/(?:\s+)/g," "),u),M=new l(d,u),I=new l(d("all"),u)},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return p}));var r=n(7),i=n(12),o=n(5),a=n(32),s=n(285),l=n(47),u=n(20),c=n(78),d=n(89),f=function(e){function t(t){var n=Object(u.a)({},t);delete n.source,e.call(this,n),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,t.map&&this.setMap(t.map),Object(r.a)(this,Object(a.b)(l.a.SOURCE),this.handleSourcePropertyChange_,this);var i=t.source?t.source:null;this.setSource(i)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getLayersArray=function(e){var t=e||[];return t.push(this),t},t.prototype.getLayerStatesArray=function(e){var t=e||[];return t.push(this.getLayerState()),t},t.prototype.getSource=function(){return this.get(l.a.SOURCE)||null},t.prototype.getSourceState=function(){var e=this.getSource();return e?e.getState():d.a.UNDEFINED},t.prototype.handleSourceChange_=function(){this.changed()},t.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Object(r.e)(this.sourceChangeKey_),this.sourceChangeKey_=null);var e=this.getSource();e&&(this.sourceChangeKey_=Object(r.a)(e,i.a.CHANGE,this.handleSourceChange_,this)),this.changed()},t.prototype.setMap=function(e){this.mapPrecomposeKey_&&(Object(r.e)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Object(r.e)(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=Object(r.a)(e,c.a.PRECOMPOSE,(function(e){var t=e,n=this.getLayerState();n.managed=!1,void 0===this.getZIndex()&&(n.zIndex=1/0),t.frameState.layerStatesArray.push(n),t.frameState.layerStates[Object(o.c)(this)]=n}),this),this.mapRenderKey_=Object(r.a)(this,i.a.CHANGE,e.render,e),this.changed())},t.prototype.setSource=function(e){this.set(l.a.SOURCE,e)},t}(s.a);function p(e,t){return e.visible&&t>=e.minResolution&&ta({},e,{border:0,boxShadow:"none",padding:"9px 0 9px 12px"}),option:(e,t)=>a({},e,{backgroundColor:t.isSelected?"".concat(c.active):t.isFocused?"".concat(c.activeBackground):"transparent",paddingLeft:"22px"}),menu:e=>a({},e,{right:0,zIndex:300}),container:e=>a({},e,{padding:"0 !important"}),indicatorSeparator:(e,t)=>t.hasValue&&t.selectProps.isClearable?a({},e,{backgroundColor:"".concat(c.textFieldBorder)}):{display:"none"},dropdownIndicator:e=>a({},e,{color:"".concat(c.controlLabel)}),clearIndicator:e=>a({},e,{color:"".concat(c.controlLabel)}),multiValue:e=>a({},e,{backgroundColor:c.background}),multiValueLabel:e=>a({},e,{color:c.textLead,fontWeight:500}),multiValueRemove:e=>a({},e,{color:c.controlLabel,":hover":{color:c.errorText,backgroundColor:c.errorBackground}})};t.reactSelectStyles=x;t.GlobalStyles=()=>(0,i.jsx)(i.Global,{styles:(0,i.css)("*,*:before,*:after{box-sizing:border-box;}:focus{outline:-webkit-focus-ring-color auto ",d.borderRadius,";}[data-whatintent='mouse'] *:focus{outline:none;}input{border:0;}body{font-family:",l.primary,";font-weight:normal;background-color:",c.background,";color:",c.text,";margin:0;}ul,ol{padding-left:0;}h1,h2,h3,h4,h5,h6,p{font-family:",l.primary,";color:",c.textLead,";font-size:15px;line-height:1.5;margin-top:0;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1{font-size:24px;letter-spacing:0.4px;color:",c.textLead,";}a,button{font-size:14px;font-weight:500;}a{color:",c.text,";text-decoration:none;}img{max-width:100%;}textarea{resize:none;};label:GlobalStyles;")})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},s=1;s<20;s++)a["f"+s]=111+s;function l(e,t,n){!t||"byKey"in t||(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),i=function(e){return r.some((function(t){return c(t,e)}))};return null==n?i:i(n)}function u(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),a=o.length;for(var s in i)r[i[s]]=!1;var l=!0,u=!1,c=void 0;try{for(var p,h=o[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var m=p.value,g=m.endsWith("?")&&m.length>1;g&&(m=m.slice(0,-1));var v=f(m),y=i[v];1!==a&&y||(n?r.key=v:r.which=d(m)),y&&(r[y]=!g||null)}}catch(e){u=!0,c=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw c}}return r}function c(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&((null!=(i="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r))return!1}return!0}function d(e){return e=f(e),a[e]||e.toUpperCase().charCodeAt(0)}function f(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=c,t.toKeyCode=d,t.toKeyName=f},function(e,t,n){"use strict";t.a={PROPERTYCHANGE:"propertychange"}},function(e,t,n){"use strict";var r=n(2),i=n(8),o=n(57),a=n(64),s=n(13),l=function(e){function t(t,n){e.call(this),this.setCoordinates(t,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(e,t,n,r){var i=this.flatCoordinates,o=Object(s.f)(e,t,i[0],i[1]);if(o` for `tagNames`, not `"+t+"`");if(!e||"object"!=typeof e||"element"!==e.type||"string"!=typeof e.tagName)return!1;if(null==t)return!0;if(n=e.tagName,"string"==typeof t)return n===t;return-1!==t.indexOf(n)}},function(e,t,n){"use strict";class r{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const r of Object.keys(n))"function"==typeof n[r]&&(t[r]=e[r],e[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}r.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}e.defineMode("htmlmixed",(function(n,a){var s=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag}),l={},u=a&&a.tags,c=a&&a.scriptTypes;if(o(t,l),u&&o(u,l),c)for(var d=c.length-1;d>=0;d--)l.script.unshift(["type",c[d].matches,c[d].mode]);function f(t,o){var a,u=s.token(t,o.htmlState),c=/\btag\b/.test(u);if(c&&!/[<>\s\/]/.test(t.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&c&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==t.current()&&function(e,t){for(var n=0;n-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,g,t.localMode.token(e,t.localState))},o.localMode=h,o.localState=e.startState(h,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return u}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(4),n(222),n(188),n(221))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(24),i=n(2),o=n(35),a=n(8),s=n(57),l=n(70),u=n(64),c=n(65),d=n(198),f=n(132),p=n(291),h=n(288),m=n(90),g=function(e){function t(t,n){e.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===n||Array.isArray(t[0])?this.setCoordinates(t,n):this.setFlatCoordinates(n,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.appendCoordinate=function(e){this.flatCoordinates?Object(r.c)(this.flatCoordinates,e):this.flatCoordinates=e.slice(),this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(e,t,n,r){return r=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},u=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),c=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===i[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var i=n.next;if(void 0!==i)for(;void 0!==i;)f={name:i.name,styles:i.styles,next:f},i=i.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},q={};function H(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(q[e]=i),t&&(q[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(q[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function W(e,t){return e.isValid()?(t=G(t,e.localeData()),z[t]=z[t]||function(e){var t,n,r,i=e.match(B);for(t=0,n=i.length;t=0&&U.test(e);)e=e.replace(U,r),U.lastIndex=0,n-=1;return e}var V=/\d/,K=/\d\d/,$=/\d{3}/,Y=/\d{4}/,Q=/[+-]?\d{6}/,X=/\d\d?/,J=/\d\d\d\d?/,Z=/\d\d\d\d\d\d?/,ee=/\d{1,3}/,te=/\d{1,4}/,ne=/[+-]?\d{1,6}/,re=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,ae=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,le={};function ue(e,t,n){le[e]=A(t)?t:function(e,r){return e&&n?n:t}}function ce(e,t){return c(le,e)?le[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function pe(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),s(t)&&(r=function(e,n){n[t]=E(e)}),n=0;n68?1900:2e3)};var ye,be=_e("FullYear",!0);function _e(e,t){return function(n){return null!=n?(Ee(this,e,n),r.updateOffset(this,t),this):we(this,e)}}function we(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ve(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ve(e)?29:28:31-r%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function De(e){var t;if(e<100&&e>=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function je(e,t,n){var r=7+t-n;return-(7+De(e,0,r).getUTCDay()-t)%7+r-1}function Le(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+je(e,r,i);return s<=0?a=ge(o=e-1)+s:s>ge(e)?(o=e+1,a=s-ge(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Ne(e,t,n){var r,i,o=je(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Fe(i=e.year()-1,t,n):a>Fe(e.year(),t,n)?(r=a-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Fe(e,t,n){var r=je(e,t,n),i=je(e+1,t,n);return(ge(e)-r+i)/7}function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),N("week",5),N("isoWeek",5),ue("w",X),ue("ww",X,K),ue("W",X),ue("WW",X,K),he(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=E(e)})),H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),ue("d",X),ue("e",X),ue("E",X),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),he(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e})),he(["d","e","E"],(function(e,t,n,r){t[r]=E(e)}));var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function He(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ye.call(this._shortWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ye.call(this._minWeekdaysParse,a))||-1!==(i=ye.call(this._weekdaysParse,a))||-1!==(i=ye.call(this._shortWeekdaysParse,a))?i:null}var We=se,Ge=se,Ve=se;function Ke(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=de(s[t]),l[t]=de(l[t]),u[t]=de(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $e(){return this.hours()%12||12}function Ye(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,$e),H("k",["kk",2],0,(function(){return this.hours()||24})),H("hmm",0,0,(function(){return""+$e.apply(this)+F(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+$e.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ye("a",!0),Ye("A",!1),I("hour","h"),N("hour",13),ue("a",Qe),ue("A",Qe),ue("H",X),ue("h",X),ue("k",X),ue("HH",X,K),ue("hh",X,K),ue("kk",X,K),ue("hmm",J),ue("hmmss",Z),ue("Hmm",J),ue("Hmmss",Z),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,n){var r=E(e);t[3]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[3]=E(e),p(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r)),p(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r,2)),t[5]=E(e.substr(i)),p(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=E(e.substr(0,r)),t[4]=E(e.substr(r,2)),t[5]=E(e.substr(i))}));var Xe,Je=_e("Hours",!0),Ze={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:Oe,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:qe,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function nt(e){return e?e.toLowerCase().replace("_","-"):e}function rt(t){var n=null;if(!et[t]&&void 0!==e&&e&&e.exports)try{n=Xe._abbr,!function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}(),it(n)}catch(e){}return et[t]}function it(e,t){var n;return e&&((n=a(t)?at(e):ot(e,t))?Xe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function ot(e,t){if(null!==t){var n,r=Ze;if(t.abbr=e,null!=et[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=et[e]._config;else if(null!=t.parentLocale)if(null!=et[t.parentLocale])r=et[t.parentLocale]._config;else{if(null==(n=rt(t.parentLocale)))return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return et[e]=new R(P(r,t)),tt[e]&&tt[e].forEach((function(e){ot(e.name,e.config)})),it(e),et[e]}return delete et[e],null}function at(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!i(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=rt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&x(i,n,!0)>=t-1)break;t--}o++}return Xe}(e)}function st(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>xe(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ut(e){var t,n,i,o,a,s=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=lt(t.GG,e._a[0],Ne(kt(),1,4).year),r=lt(t.W,1),((i=lt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=Ne(kt(),o,a);n=lt(t.gg,e._a[0],u.year),r=lt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>Fe(n,o,a)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=Le(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=lt(e._a[0],i[0]),(e._dayOfYear>ge(a)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=De(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?De:Ie).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ht=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((\-?\d+)/i;function gt(e){var t,n,r,i,o,a,s=e._i,l=ct.exec(s)||dt.exec(s);if(l){for(p(e).iso=!0,t=0,n=pt.length;t0&&p(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),q[o]?(n?p(e).empty=!1:p(e).unusedTokens.push(o),me(o,n,e)):e._strict&&!n&&p(e).unusedTokens.push(o);p(e).charsLeftOver=l-u,s.length>0&&p(e).unusedInput.push(s),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ut(e),st(e)}else _t(e);else gt(e)}function Et(e){var t=e._i,n=e._f;return e._locale=e._locale||at(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new b(st(t)):(l(t)?e._d=t:i(n)?function(e){var t,n,r,i,o;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()}));function Tt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return kt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function Zt(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function en(e,t){H(0,[e,e.length],0,t)}function tn(e,t,n,r,i){var o;return null==e?Ne(this,r,i).year:(t>(o=Fe(e,r,i))&&(t=o),nn.call(this,e,t,n,r,i))}function nn(e,t,n,r,i){var o=Le(e,t,n,r,i),a=De(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H(0,["gg",2],0,(function(){return this.weekYear()%100})),H(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ue("G",ie),ue("g",ie),ue("GG",X,K),ue("gg",X,K),ue("GGGG",te,Y),ue("gggg",te,Y),ue("GGGGG",ne,Q),ue("ggggg",ne,Q),he(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=E(e)})),he(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),H("Q",0,"Qo","quarter"),I("quarter","Q"),N("quarter",7),ue("Q",V),pe("Q",(function(e,t){t[1]=3*(E(e)-1)})),H("D",["DD",2],"Do","date"),I("date","D"),N("date",9),ue("D",X),ue("DD",X,K),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=E(e.match(X)[0])}));var rn=_e("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),N("dayOfYear",4),ue("DDD",ee),ue("DDDD",$),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=E(e)})),H("m",["mm",2],0,"minute"),I("minute","m"),N("minute",14),ue("m",X),ue("mm",X,K),pe(["m","mm"],4);var on=_e("Minutes",!1);H("s",["ss",2],0,"second"),I("second","s"),N("second",15),ue("s",X),ue("ss",X,K),pe(["s","ss"],5);var an,sn=_e("Seconds",!1);for(H("S",0,0,(function(){return~~(this.millisecond()/100)})),H(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),H(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),H(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),H(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),H(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),H(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),I("millisecond","ms"),N("millisecond",16),ue("S",ee,V),ue("SS",ee,K),ue("SSS",ee,$),an="SSSS";an.length<=9;an+="S")ue(an,re);function ln(e,t){t[6]=E(1e3*("0."+e))}for(an="S";an.length<=9;an+="S")pe(an,ln);var un=_e("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var cn=b.prototype;function dn(e){return e}cn.add=Gt,cn.calendar=function(e,t){var n=e||kt(),i=jt(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=t&&(A(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,kt(n)))},cn.clone=function(){return new b(this)},cn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=jt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=D(t)){case"year":o=Kt(this,r)/12;break;case"month":o=Kt(this,r);break;case"quarter":o=Kt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:w(o)},cn.endOf=function(e){var t;if(void 0===(e=D(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?Zt:Jt;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},cn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)},cn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||kt(e).isValid())?Ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},cn.fromNow=function(e){return this.from(kt(),e)},cn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||kt(e).isValid())?Ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},cn.toNow=function(e){return this.to(kt(),e)},cn.get=function(e){return A(this[e=D(e)])?this[e]():this},cn.invalidAt=function(){return p(this).overflow},cn.isAfter=function(e,t){var n=_(e)?e:kt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=D(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?W(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},cn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},cn.toJSON=function(){return this.isValid()?this.toISOString():null},cn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},cn.unix=function(){return Math.floor(this.valueOf()/1e3)},cn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},cn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},cn.year=be,cn.isLeapYear=function(){return ve(this.year())},cn.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},cn.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},cn.quarter=cn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},cn.month=Ae,cn.daysInMonth=function(){return xe(this.year(),this.month())},cn.week=cn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},cn.isoWeek=cn.isoWeeks=function(e){var t=Ne(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},cn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},cn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},cn.date=rn,cn.day=cn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},cn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},cn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},cn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},cn.hour=cn.hours=Je,cn.minute=cn.minutes=on,cn.second=cn.seconds=sn,cn.millisecond=cn.milliseconds=un,cn.utcOffset=function(e,t,n){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Dt(ae,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=Lt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Wt(this,Ut(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Lt(this)},cn.utc=function(e){return this.utcOffset(0,e)},cn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Lt(this),"m")),this},cn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Dt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},cn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},cn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},cn.isLocal=function(){return!!this.isValid()&&!this._isUTC},cn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},cn.isUtc=Nt,cn.isUTC=Nt,cn.zoneAbbr=function(){return this._isUTC?"UTC":""},cn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},cn.dates=S("dates accessor is deprecated. Use date instead.",rn),cn.months=S("months accessor is deprecated. Use month instead",Ae),cn.years=S("years accessor is deprecated. Use year instead",be),cn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),cn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),(e=Et(e))._a){var t=e._isUTC?f(e._a):kt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var fn=R.prototype;function pn(e,t,n,r){var i=at(),o=f().set(r,t);return i[n](o,e)}function hn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return pn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pn(e,r,n,"month");return i}function mn(e,t,n,r){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var i,o=at(),a=e?o._week.dow:0;if(null!=n)return pn(t,(n+a)%7,r,"day");var l=[];for(i=0;i<7;i++)l[i]=pn(t,(i+a)%7,r,"day");return l}fn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,n):r},fn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},fn.invalidDate=function(){return this._invalidDate},fn.ordinal=function(e){return this._ordinal.replace("%d",e)},fn.preparse=dn,fn.postformat=dn,fn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return A(i)?i(e,t,n,r):i.replace(/%d/i,e)},fn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},fn.set=function(e){var t,n;for(n in e)A(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ke).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},fn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ke.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Te.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},fn.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Me.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Re),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},fn.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Me.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},fn.week=function(e){return Ne(e,this._week.dow,this._week.doy).week},fn.firstDayOfYear=function(){return this._week.doy},fn.firstDayOfWeek=function(){return this._week.dow},fn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Be(n,this._week.dow):e?n[e.day()]:n},fn.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},fn.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},fn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return He.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},fn.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},fn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ge),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},fn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===E(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",it),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",at);var gn=Math.abs;function vn(e,t,n,r){var i=Ut(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function yn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function _n(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var En=wn("ms"),xn=wn("s"),kn=wn("m"),Sn=wn("h"),On=wn("d"),Tn=wn("w"),Cn=wn("M"),An=wn("Q"),Pn=wn("y");function Rn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Mn=Rn("milliseconds"),In=Rn("seconds"),Dn=Rn("minutes"),jn=Rn("hours"),Ln=Rn("days"),Nn=Rn("months"),Fn=Rn("years"),Bn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function zn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var qn=Math.abs;function Hn(e){return(e>0)-(e<0)||+e}function Wn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=qn(this._milliseconds)/1e3,r=qn(this._days),i=qn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var o=w(i/12),a=i%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Hn(this._months)!==Hn(d)?"-":"",h=Hn(this._days)!==Hn(d)?"-":"",m=Hn(this._milliseconds)!==Hn(d)?"-":"";return f+"P"+(o?p+o+"Y":"")+(a?p+a+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(c?m+c+"S":"")}var Gn=At.prototype;return Gn.isValid=function(){return this._isValid},Gn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Gn.add=function(e,t){return vn(this,e,t,1)},Gn.subtract=function(e,t){return vn(this,e,t,-1)},Gn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=D(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+bn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(_n(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Gn.asMilliseconds=En,Gn.asSeconds=xn,Gn.asMinutes=kn,Gn.asHours=Sn,Gn.asDays=On,Gn.asWeeks=Tn,Gn.asMonths=Cn,Gn.asQuarters=An,Gn.asYears=Pn,Gn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*E(this._months/12):NaN},Gn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*yn(_n(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=w(o/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,a+=w(n/24),i=w(bn(a)),s+=i,a-=yn(_n(i)),r=w(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Gn.clone=function(){return Ut(this)},Gn.get=function(e){return e=D(e),this.isValid()?this[e+"s"]():NaN},Gn.milliseconds=Mn,Gn.seconds=In,Gn.minutes=Dn,Gn.hours=jn,Gn.days=Ln,Gn.weeks=function(){return w(this.days()/7)},Gn.months=Nn,Gn.years=Fn,Gn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Ut(e).abs(),i=Bn(r.as("s")),o=Bn(r.as("m")),a=Bn(r.as("h")),s=Bn(r.as("d")),l=Bn(r.as("M")),u=Bn(r.as("y")),c=i<=Un.ss&&["s",i]||i0,c[4]=n,zn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Gn.toISOString=Wn,Gn.toString=Wn,Gn.toJSON=Wn,Gn.locale=$t,Gn.localeData=Qt,Gn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wn),Gn.lang=Yt,H("X",0,0,"unix"),H("x",0,0,"valueOf"),ue("x",ie),ue("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),pe("x",(function(e,t,n){n._d=new Date(E(e))})),r.version="2.24.0",t=kt,r.fn=cn,r.min=function(){var e=[].slice.call(arguments,0);return Tt("isBefore",e)},r.max=function(){var e=[].slice.call(arguments,0);return Tt("isAfter",e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return kt(1e3*e)},r.months=function(e,t){return hn(e,t,"months")},r.isDate=l,r.locale=it,r.invalid=m,r.duration=Ut,r.isMoment=_,r.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},r.parseZone=function(){return kt.apply(null,arguments).parseZone()},r.localeData=at,r.isDuration=Pt,r.monthsShort=function(e,t){return hn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},r.defineLocale=ot,r.updateLocale=function(e,t){if(null!=t){var n,r,i=Ze;null!=(r=rt(e))&&(i=r._config),t=P(i,t),(n=new R(t)).parentLocale=et[e],et[e]=n,it(e)}else null!=et[e]&&(null!=et[e].parentLocale?et[e]=et[e].parentLocale:null!=et[e]&&delete et[e]);return et[e]},r.locales=function(){return O(et)},r.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},r.normalizeUnits=D,r.relativeTimeRounding=function(e){return void 0===e?Bn:"function"==typeof e&&(Bn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=cn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(123)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(165),i=n(322),o=n(438),a=n(323),s=n(109),l=/^\s+/;e.exports=function(e,t,n){if((e=s(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=r(t)))return e;var u=a(e),c=o(u,a(t));return i(u,c).join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.entryLoading=x,t.entryLoaded=k,t.entryLoadError=S,t.entriesLoading=O,t.entriesLoaded=T,t.entriesFailed=C,t.entryPersisting=A,t.entryPersisted=P,t.entryPersistFail=R,t.entryDeleting=M,t.entryDeleted=I,t.entryDeleteFail=D,t.emptyDraftCreated=j,t.createDraftFromEntry=L,t.draftDuplicateEntry=N,t.discardDraft=function(){return{type:"DRAFT_DISCARD"}},t.changeDraftField=function(e,t,n,r){return{type:"DRAFT_CHANGE_FIELD",payload:{field:e,value:t,metadata:n,entries:r}}},t.changeDraftFieldValidation=function(e,t){return{type:"DRAFT_VALIDATION_ERRORS",payload:{uniquefieldId:e,errors:t}}},t.clearFieldErrors=function(){return{type:"DRAFT_CLEAR_ERRORS"}},t.localBackupRetrieved=F,t.loadLocalBackup=function(){return{type:"DRAFT_CREATE_FROM_LOCAL_BACKUP"}},t.addDraftEntryMediaFile=function(e){return{type:"ADD_DRAFT_ENTRY_MEDIA_FILE",payload:e}},t.removeDraftEntryMediaFile=function({id:e}){return{type:"REMOVE_DRAFT_ENTRY_MEDIA_FILE",payload:{id:e}}},t.persistLocalBackup=function(e,t){return(n,r)=>{const i=r();return(0,s.currentBackend)(i.config).persistLocalDraftBackup(e,t)}},t.createDraftDuplicateFromEntry=function(e){return t=>{t((0,y.waitUntil)({predicate:({type:e})=>"DRAFT_CREATE_EMPTY"===e,run:()=>t(N(e))}))}},t.retrieveLocalBackup=function(e,t){return async(n,r)=>{const o=r(),a=(0,s.currentBackend)(o.config),{entry:l}=await a.getLocalDraftBackup(e,t);if(l){const t=l.mediaFiles||[],o=await Promise.all(t.map(t=>t.file||t.url?(0,h.createAssetProxy)({path:t.path,file:t.file,url:t.url,field:t.field}):(0,g.getAsset)({collection:e,entry:(0,i.fromJS)(l),path:t.path,field:t.field})(n,r)));return n((0,g.addAssets)(o)),n(F(l))}}},t.deleteLocalBackup=function(e,t){return(n,r)=>{const i=r();return(0,s.currentBackend)(i.config).deleteLocalDraftBackup(e,t)}},t.loadEntry=function(e,t){return async(n,r)=>{await(0,v.waitForMediaLibraryToLoad)(n,r()),n(x(e,t));try{const i=await B(r(),e,t);n(k(e,i)),n(L(i))}catch(r){console.error(r),n(E({message:{details:r.message,key:"ui.toast.onFailToLoadEntries"},kind:"danger",dismissAfter:8e3})),n(S(r,e,t))}}},t.tryLoadEntry=B,t.loadEntries=q,t.traverseCollectionCursor=function(e,t){return async(n,r)=>{const i=r(),o=e.get("name");if(i.entries.getIn(["pages","".concat(o),"isFetching"]))return;const a=(0,s.currentBackend)(i.config),{action:l,append:u}=U.has(t)?U.get(t).toJS():{action:t,append:!1},c=(0,d.selectCollectionEntriesCursor)(i.cursors,e.get("name"));if(c.meta.get("usingOldPaginationAPI",!1))return n(q(e,c.data.get("nextPage")));try{n(O(e));const{entries:t,cursor:r}=await function(e,t,n){if(!t.actions.has(n))throw new Error('The current cursor does not support the pagination action "'.concat(n,'".'));return e.traverseCursor(t,n)}(a,c,l);return n(T(e,t,null,z(r),u))}catch(t){return console.error(t),n(E({message:{details:t,key:"ui.toast.onFailToPersist"},kind:"danger",dismissAfter:8e3})),Promise.reject(n(C(e,t)))}}},t.createEmptyDraft=function(e,t){return async(n,r)=>{new URLSearchParams(t).forEach((t,n)=>{e=(0,c.updateFieldByKey)(e,n,e=>e.set("default",(e=>{if(["true","True","TRUE"].includes(e))return!0;if(["false","False","FALSE"].includes(e))return!1;return(e=>e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"))(e)})(t)))});const o=H(e.get("fields",(0,i.List)()));let a=[];e.has("media_folder")||(await(0,v.waitForMediaLibraryToLoad)(n,r()),a=r().mediaLibrary.get("files")),n(j((0,p.createEntry)(e.get("name"),"","",{data:o,mediaFiles:a})))}},t.createEmptyDraftData=H,t.getMediaAssets=W,t.persistEntry=function(e){return async(t,n)=>{const r=n(),i=r.entryDraft,o=i.get("fieldsErrors"),l=(0,u.selectPublishedSlugs)(r,e.get("name"));if(!o.isEmpty()){return o.some(e=>e.some(e=>e.type&&e.type===m.default.PRESENCE))&&t(E({message:{key:"ui.toast.missingRequiredField"},kind:"danger",dismissAfter:8e3})),Promise.reject()}const d=(0,s.currentBackend)(r.config),f=i.get("entry"),p=await W({getState:n,dispatch:t,collection:e,entry:f}),h=(0,c.selectFields)(e,f.get("slug")),g=(0,a.serializeValues)(i.getIn(["entry","data"]),h),y=f.set("data",g),b=i.set("entry",y);return t(A(e,y)),d.persistEntry({config:r.config,collection:e,entryDraft:b,assetProxies:p,usedSlugs:l}).then(n=>{t(E({message:{key:"ui.toast.entrySaved"},kind:"success",dismissAfter:4e3})),p.length>0&&t((0,v.loadMedia)()),t(P(e,y,n))}).catch(n=>(console.error(n),t(E({message:{details:n,key:"ui.toast.onFailToPersist"},kind:"danger",dismissAfter:8e3})),Promise.reject(t(R(e,y,n)))))}},t.deleteEntry=function(e,t){return(n,r)=>{const i=r(),o=(0,s.currentBackend)(i.config);return n(M(e,t)),o.deleteEntry(i,e,t).then(()=>n(I(e,t))).catch(r=>(n(E({message:{details:r,key:"ui.toast.onFailToDelete"},kind:"danger",dismissAfter:8e3})),console.error(r),Promise.reject(n(D(e,t,r)))))}},t.REMOVE_DRAFT_ENTRY_MEDIA_FILE=t.ADD_DRAFT_ENTRY_MEDIA_FILE=t.ENTRY_DELETE_FAILURE=t.ENTRY_DELETE_SUCCESS=t.ENTRY_DELETE_REQUEST=t.ENTRY_PERSIST_FAILURE=t.ENTRY_PERSIST_SUCCESS=t.ENTRY_PERSIST_REQUEST=t.DRAFT_CREATE_DUPLICATE_FROM_ENTRY=t.DRAFT_CREATE_FROM_LOCAL_BACKUP=t.DRAFT_LOCAL_BACKUP_RETRIEVED=t.DRAFT_CLEAR_ERRORS=t.DRAFT_VALIDATION_ERRORS=t.DRAFT_CHANGE_FIELD=t.DRAFT_DISCARD=t.DRAFT_CREATE_EMPTY=t.DRAFT_CREATE_FROM_ENTRY=t.ENTRIES_FAILURE=t.ENTRIES_SUCCESS=t.ENTRIES_REQUEST=t.ENTRY_FAILURE=t.ENTRY_SUCCESS=t.ENTRY_REQUEST=void 0;var r=b(n(327)),i=n(3),o=n(138),a=n(455),s=n(139),l=n(333),u=n(85),c=n(96),d=n(343),f=n(41),p=n(334),h=n(168),m=b(n(347)),g=n(147),v=n(129),y=n(492);function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{notifSend:E}=o.actions;t.ENTRY_REQUEST="ENTRY_REQUEST";t.ENTRY_SUCCESS="ENTRY_SUCCESS";t.ENTRY_FAILURE="ENTRY_FAILURE";t.ENTRIES_REQUEST="ENTRIES_REQUEST";t.ENTRIES_SUCCESS="ENTRIES_SUCCESS";t.ENTRIES_FAILURE="ENTRIES_FAILURE";t.DRAFT_CREATE_FROM_ENTRY="DRAFT_CREATE_FROM_ENTRY";t.DRAFT_CREATE_EMPTY="DRAFT_CREATE_EMPTY";t.DRAFT_DISCARD="DRAFT_DISCARD";t.DRAFT_CHANGE_FIELD="DRAFT_CHANGE_FIELD";t.DRAFT_VALIDATION_ERRORS="DRAFT_VALIDATION_ERRORS";t.DRAFT_CLEAR_ERRORS="DRAFT_CLEAR_ERRORS";t.DRAFT_LOCAL_BACKUP_RETRIEVED="DRAFT_LOCAL_BACKUP_RETRIEVED";t.DRAFT_CREATE_FROM_LOCAL_BACKUP="DRAFT_CREATE_FROM_LOCAL_BACKUP";t.DRAFT_CREATE_DUPLICATE_FROM_ENTRY="DRAFT_CREATE_DUPLICATE_FROM_ENTRY";t.ENTRY_PERSIST_REQUEST="ENTRY_PERSIST_REQUEST";t.ENTRY_PERSIST_SUCCESS="ENTRY_PERSIST_SUCCESS";t.ENTRY_PERSIST_FAILURE="ENTRY_PERSIST_FAILURE";t.ENTRY_DELETE_REQUEST="ENTRY_DELETE_REQUEST";t.ENTRY_DELETE_SUCCESS="ENTRY_DELETE_SUCCESS";t.ENTRY_DELETE_FAILURE="ENTRY_DELETE_FAILURE";t.ADD_DRAFT_ENTRY_MEDIA_FILE="ADD_DRAFT_ENTRY_MEDIA_FILE";function x(e,t){return{type:"ENTRY_REQUEST",payload:{collection:e.get("name"),slug:t}}}function k(e,t){return{type:"ENTRY_SUCCESS",payload:{collection:e.get("name"),entry:t}}}function S(e,t,n){return{type:"ENTRY_FAILURE",payload:{error:e,collection:t.get("name"),slug:n}}}function O(e){return{type:"ENTRIES_REQUEST",payload:{collection:e.get("name")}}}function T(e,t,n,r,i=!0){return{type:"ENTRIES_SUCCESS",payload:{collection:e.get("name"),entries:t,page:n,cursor:f.Cursor.create(r),append:i}}}function C(e,t){return{type:"ENTRIES_FAILURE",error:"Failed to load entries",payload:t.toString(),meta:{collection:e.get("name")}}}function A(e,t){return{type:"ENTRY_PERSIST_REQUEST",payload:{collectionName:e.get("name"),entrySlug:t.get("slug")}}}function P(e,t,n){return{type:"ENTRY_PERSIST_SUCCESS",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),slug:n}}}function R(e,t,n){return{type:"ENTRY_PERSIST_FAILURE",error:"Failed to persist entry",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),error:n.toString()}}}function M(e,t){return{type:"ENTRY_DELETE_REQUEST",payload:{collectionName:e.get("name"),entrySlug:t}}}function I(e,t){return{type:"ENTRY_DELETE_SUCCESS",payload:{collectionName:e.get("name"),entrySlug:t}}}function D(e,t,n){return{type:"ENTRY_DELETE_FAILURE",payload:{collectionName:e.get("name"),entrySlug:t,error:n.toString()}}}function j(e){return{type:"DRAFT_CREATE_EMPTY",payload:e}}function L(e){return{type:"DRAFT_CREATE_FROM_ENTRY",payload:{entry:e}}}function N(e){return{type:"DRAFT_CREATE_DUPLICATE_FROM_ENTRY",payload:(0,p.createEntry)(e.get("collection"),"","",{data:e.get("data")})}}function F(e){return{type:"DRAFT_LOCAL_BACKUP_RETRIEVED",payload:{entry:e}}}async function B(e,t,n){const r=(0,s.currentBackend)(e.config);return await r.getEntry(e,t,n)}t.REMOVE_DRAFT_ENTRY_MEDIA_FILE="REMOVE_DRAFT_ENTRY_MEDIA_FILE";const U=(0,i.fromJS)({append_next:{action:"next",append:!0}}),z=e=>f.Cursor.create(e).updateStore("actions",e=>e.union(U.filter(t=>e.has(t.get("action"))).keySeq()));function q(e,t=0){return(n,r)=>{if(e.get("isFetching"))return;const i=r(),o=(0,s.currentBackend)(i.config),a=(0,u.selectIntegration)(i,e.get("name"),"listEntries"),c=a?(0,l.getIntegrationProvider)(i.integrations,o.getToken,a):o,d=!!(t&&!isNaN(t)&&t>0);n(O(e)),c.listEntries(e,t).then(e=>function(e){for(var t=1;tn(T(e,t.cursor.meta.get("usingOldPaginationAPI")?t.entries.reverse():t.entries,t.pagination,z(t.cursor),d))).catch(t=>(n(E({message:{details:t,key:"ui.toast.onFailToLoadEntries"},kind:"danger",dismissAfter:8e3})),Promise.reject(n(C(e,t)))))}}function H(e,t=!0){return e.reduce((e,n)=>{const o=e,a=n,s=a.get("field")||a.get("fields"),l="list"==a.get("widget"),u=a.get("name"),c=a.get("default",null),d=e=>[[{}],{}].some(t=>(0,r.default)(e,t));if(i.List.isList(s)){const e=l?[H(s)]:H(s);return d(e)||(o[u]=e),o}if(i.Map.isMap(s)){const e=l?[H((0,i.List)([s]),!1)]:H((0,i.List)([s]));return d(e)||(o[u]=e),o}if(null!==c){if(!t)return c;o[u]=c}return o},{})}async function W({getState:e,dispatch:t,collection:n,entry:r}){const i=r.get("mediaFiles").toArray();return await Promise.all(i.filter(e=>e.get("draft")).map(i=>(0,g.getAsset)({collection:n,entry:r,path:i.get("path"),field:i.get("field")})(t,e)))}},function(e,t,n){var r=n(162),i=n(330);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerPreviewStyle=b,t.getPreviewStyles=_,t.registerPreviewTemplate=w,t.getPreviewTemplate=E,t.registerWidget=x,t.getWidget=k,t.getWidgets=S,t.resolveWidget=O,t.registerEditorComponent=T,t.getEditorComponents=C,t.registerWidgetValueSerializer=A,t.getWidgetValueSerializer=P,t.registerBackend=R,t.getBackend=M,t.registerMediaLibrary=I,t.getMediaLibrary=D,t.getEventListeners=L,t.registerEventListener=N,t.invokeEvent=F,t.removeEventListener=B,t.registerLocale=U,t.getLocale=z,t.default=void 0;var r=n(3),i=s(n(853)),o=n(98),a=s(n(854));function s(e){return e&&e.__esModule?e:{default:e}}function l(){const e=c(['\n Only one editor component of type "code-block" may be registered. Previously registered code\n block component(s) will be overwritten.\n ']);return l=function(){return e},e}function u(){const e=c(['\n Multiple widgets registered with name "','". Only the last widget registered with\n this name will be used.\n ']);return u=function(){return e},e}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t{g[e]=[]});const v={backends:{},templates:{},previewStyles:[],widgets:{},editorComponents:(0,r.Map)(),widgetValueSerializers:{},mediaLibraries:[],locales:{},eventHandlers:g};var y={registerPreviewStyle:b,getPreviewStyles:_,registerPreviewTemplate:w,getPreviewTemplate:E,registerWidget:x,getWidget:k,getWidgets:S,resolveWidget:O,registerEditorComponent:T,getEditorComponents:C,registerWidgetValueSerializer:A,getWidgetValueSerializer:P,registerBackend:R,getBackend:M,registerMediaLibrary:I,getMediaLibrary:D,registerLocale:U,getLocale:z,registerEventListener:N,removeEventListener:B,getEventListeners:L,invokeEvent:F};function b(e,t){v.previewStyles.push(p({},t,{value:e}))}function _(){return v.previewStyles}function w(e,t){v.templates[e]=t}function E(e){return v.templates[e]}function x(e,t,n){if(Array.isArray(e))e.forEach(e=>{"object"!=typeof e?console.error("Cannot register widget: ".concat(e)):x(e)});else if("string"==typeof e){const r="string"==typeof t?v.widgets[t].control:t;v.widgets[e]={control:r,preview:n}}else if("object"==typeof e){const{name:t,controlComponent:n,previewComponent:r,allowMapValue:i,globalStyles:a}=e,s=d(e,["name","controlComponent","previewComponent","allowMapValue","globalStyles"]);if(v.widgets[t]&&console.warn((0,o.oneLine)(u(),t)),!n)throw Error('Widget "'.concat(t,'" registered without `controlComponent`.'));v.widgets[t]=p({control:n,preview:r,globalStyles:a,allowMapValue:i},s)}else console.error("`registerWidget` failed, called with incorrect arguments.")}function k(e){const t=v.widgets[e];if(!t){const t=e.toLowerCase(),n=!!v.widgets[t]?"Could not find widget '".concat(e,"'. Did you mean '").concat(t,"'?"):"Could not find widget '".concat(e,"'. Please make sure the widget name is configured correctly or register it via 'registerwidget'.");throw new Error(n)}return t}function S(){return(0,i.default)(Object.entries(v.widgets),e=>e.map(([e,t])=>p({name:e},t)))}function O(e){return k(e||"string")||k("unknown")}function T(e){const t=(0,a.default)(e);if("code-block"===t.type){const e=v.editorComponents.find(e=>"code-block"===e.type);e&&(console.warn((0,o.oneLine)(l())),v.editorComponents=v.editorComponents.delete(e.id))}v.editorComponents=v.editorComponents.set(t.id,t)}function C(){return v.editorComponents}function A(e,t){v.widgetValueSerializers[e]=t}function P(e){return v.widgetValueSerializers[e]}function R(e,t){e&&t?v.backends[e]?console.error("Backend [".concat(e,"] already registered. Please choose a different name.")):v.backends[e]={init:(...e)=>new t(...e)}:console.error("Backend parameters invalid. example: CMS.registerBackend('myBackend', BackendClass)")}function M(e){return v.backends[e]}function I(e,t){if(v.mediaLibraries.find(t=>e.name===t.name))throw new Error("A media library named ".concat(e.name," has already been registered."));v.mediaLibraries.push(p({},e,{options:t}))}function D(e){return v.mediaLibraries.find(t=>t.name===e)}function j(e){if(!m.includes(e))throw new Error("Invalid event name '".concat(e,"'"))}function L(e){return j(e),[...v.eventHandlers[e]]}function N({name:e,handler:t},n={}){j(e),v.eventHandlers[e].push({handler:t,options:n})}async function F({name:e,data:t}){j(e);const n=v.eventHandlers[e];for(const{handler:r,options:i}of n)try{await r(t,i)}catch(t){console.warn("Failed running handler for event ".concat(e," with message: ").concat(t.message))}}function B({name:e,handler:t}){j(e),v.eventHandlers[e]=t?v.eventHandlers[e].filter(e=>e.handler!==t):[]}function U(e,t){e&&t?v.locales[e]=t:console.error("Locale parameters invalid. example: CMS.registerLocale('locale', phrases)")}function z(e){return v.locales[e]}t.default=y},function(e,t,n){var r=n(936),i=n(937);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMediaLibrary=function(e){const t={show:e.show||(()=>{}),hide:e.hide||(()=>{}),onClearControl:e.onClearControl||(()=>{}),onRemoveControl:e.onRemoveControl||(()=>{}),enableStandalone:e.enableStandalone||(()=>{})};return{type:"MEDIA_LIBRARY_CREATE",payload:t}},t.clearMediaControl=function(e){return(t,n)=>{const r=n().mediaLibrary.get("externalLibrary");r&&r.onClearControl({id:e})}},t.removeMediaControl=function(e){return(t,n)=>{const r=n().mediaLibrary.get("externalLibrary");r&&r.onRemoveControl({id:e})}},t.openMediaLibrary=function(e={}){return(t,n)=>{const i=n().mediaLibrary.get("externalLibrary");if(i){const{controlID:t,value:n,config:o=(0,r.Map)(),allowMultiple:a,forImage:s}=e;i.show({id:t,value:n,config:o.toJS(),allowMultiple:a,imagesOnly:s})}t({type:"MEDIA_LIBRARY_OPEN",payload:e})}},t.closeMediaLibrary=function(){return(e,t)=>{const n=t().mediaLibrary.get("externalLibrary");n&&n.hide(),e({type:"MEDIA_LIBRARY_CLOSE"})}},t.insertMedia=function(e,t){return(n,r)=>{const i=r(),o=i.config,a=i.entryDraft.get("entry"),s=i.entryDraft.getIn(["entry","collection"]),l=i.collections.get(s);n({type:"MEDIA_INSERT",payload:{mediaPath:e=Array.isArray(e)?e.map(e=>(0,u.selectMediaFilePublicPath)(o,l,e,a,t)):(0,u.selectMediaFilePublicPath)(o,l,e,a,t)}})}},t.removeInsertedMedia=function(e){return{type:"MEDIA_REMOVE_INSERTED",payload:{controlID:e}}},t.loadMedia=function(e={}){const{delay:t=0,query:n="",page:r=1,privateUpload:i}=e;return async(e,o)=>{const s=o(),u=(0,a.currentBackend)(s.config),c=(0,l.selectIntegration)(s,null,"assetStore");if(c){const t=(0,d.getIntegrationProvider)(s.integrations,u.getToken,c);e(x(r));try{const o=await t.retrieve(n,r,i);return e(k(o,{page:r,canPaginate:!0,dynamicSearch:!0,dynamicSearchQuery:n,privateUpload:i}))}catch(t){return e(S({privateUpload:i}))}}e(x(r));const f=()=>u.getMedia().then(t=>e(k(t))).catch(t=>{console.error(t),404===t.status?(console.log("This 404 was expected and handled appropriately."),e(k([]))):e(S())});return t>0?new Promise(e=>{setTimeout(()=>e(f()),t)}):f()}},t.persistMedia=function(e,t={}){const{privateUpload:n,field:r}=t;return async(t,i)=>{const m=i(),g=(0,a.currentBackend)(m.config),v=(0,l.selectIntegration)(m,null,"assetStore"),y=(0,c.selectMediaFiles)(m,r),E=(0,h.sanitizeSlug)(e.name.toLowerCase(),m.config.get("slug")),x=y.find(e=>e.name.toLowerCase()===E),k=(0,u.selectEditingDraft)(m.entryDraft);if(!v&&x){if(!window.confirm("".concat(x.name," already exists. Do you want to replace it?")))return;await t(w(x,{privateUpload:n}))}!v&&k||t(O());try{let i,a;if(v)try{const t=(0,d.getIntegrationProvider)(m.integrations,g.getToken,v),r=await t.upload(e,n);i=(0,s.createAssetProxy)({url:r.asset.url,path:r.asset.url})}catch(t){i=(0,s.createAssetProxy)({file:e,path:E})}else{if(n)throw new Error("The Private Upload option is only available for Asset Store Integration");{const t=m.entryDraft.get("entry"),n=m.collections.get(null==t?void 0:t.get("collection")),o=(0,u.selectMediaFilePath)(m.config,n,t,E,r);i=(0,s.createAssetProxy)({file:e,path:o,field:r})}}if(t((0,f.addAsset)(i)),v){a=_({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:!1})}else{if(k){return a=_({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:k}),t((0,p.addDraftEntryMediaFile)(a))}a=await g.persistMedia(m.config,i)}return t(T(a,{privateUpload:n}))}catch(e){return console.error(e),t(b({message:"Failed to persist media: ".concat(e),kind:"danger",dismissAfter:8e3})),t(C({privateUpload:n}))}}},t.deleteMedia=w,t.getMediaFile=async function(e,t){const n=(0,a.currentBackend)(e.config),{url:r}=await n.getMediaFile(t);return{url:r}},t.loadMediaDisplayURL=E,t.mediaLoading=x,t.mediaLoaded=k,t.mediaLoadFailed=S,t.mediaPersisting=O,t.mediaPersisted=T,t.mediaPersistFailed=C,t.mediaDeleting=A,t.mediaDeleted=P,t.mediaDeleteFailed=R,t.mediaDisplayURLRequest=M,t.mediaDisplayURLSuccess=I,t.mediaDisplayURLFailure=D,t.waitForMediaLibraryToLoad=async function(e,t){!1===t.mediaLibrary.get("isLoading")||t.mediaLibrary.get("externalLibrary")||await(0,m.waitUntilWithTimeout)(e,e=>({predicate:({type:e})=>"MEDIA_LOAD_SUCCESS"===e||"MEDIA_LOAD_FAILURE"===e,run:()=>e()}))},t.getMediaDisplayURL=async function(e,t,n){const r=(0,c.selectMediaDisplayURL)(t,n.id);let i;if(r.get("url"))i=r.get("url");else if(r.get("err"))i=null;else{const t=n.id,o=(0,m.waitUntilWithTimeout)(e,e=>({predicate:({type:e,payload:n})=>("MEDIA_DISPLAY_URL_SUCCESS"===e||"MEDIA_DISPLAY_URL_FAILURE"===e)&&n.key===t,run:(t,n,r)=>e(r.payload.url)}));r.get("isFetching")||e(E(n)),i=await o}return i},t.MEDIA_DISPLAY_URL_FAILURE=t.MEDIA_DISPLAY_URL_SUCCESS=t.MEDIA_DISPLAY_URL_REQUEST=t.MEDIA_DELETE_FAILURE=t.MEDIA_DELETE_SUCCESS=t.MEDIA_DELETE_REQUEST=t.MEDIA_PERSIST_FAILURE=t.MEDIA_PERSIST_SUCCESS=t.MEDIA_PERSIST_REQUEST=t.MEDIA_LOAD_FAILURE=t.MEDIA_LOAD_SUCCESS=t.MEDIA_LOAD_REQUEST=t.MEDIA_REMOVE_INSERTED=t.MEDIA_INSERT=t.MEDIA_LIBRARY_CREATE=t.MEDIA_LIBRARY_CLOSE=t.MEDIA_LIBRARY_OPEN=void 0;var r=n(3),i=n(138),o=n(41),a=n(139),s=n(168),l=n(85),u=n(170),c=n(259),d=n(333),f=n(147),p=n(125),h=n(145),m=n(492);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t{const i=r(),o=(0,a.currentBackend)(i.config),s=(0,l.selectIntegration)(i,null,"assetStore");if(s){const r=(0,d.getIntegrationProvider)(i.integrations,o.getToken,s);t(A());try{return await r.delete(e.id),t(P(e,{privateUpload:n}))}catch(e){return console.error(e),t(b({message:"Failed to delete media: ".concat(e.message),kind:"danger",dismissAfter:8e3})),t(R({privateUpload:n}))}}try{if(e.draft)t((0,f.removeAsset)(e.path)),t((0,p.removeDraftEntryMediaFile)({id:e.id}));else{const n=(0,u.selectEditingDraft)(i.entryDraft);t(A()),t((0,f.removeAsset)(e.path)),await o.deleteMedia(i.config,e.path),t(P(e)),n&&t((0,p.removeDraftEntryMediaFile)({id:e.id}))}}catch(e){return console.error(e),t(b({message:"Failed to delete media: ".concat(e.message),kind:"danger",dismissAfter:8e3})),t(R())}}}function E(e){return async(t,n)=>{const{displayURL:r,id:i}=e,o=n(),s=(0,c.selectMediaDisplayURL)(o,i);if(!i||!r||s.get("url")||s.get("isFetching")||s.get("err"))return Promise.resolve();if("string"==typeof r)return t(M(i)),void t(I(i,r));try{const e=(0,a.currentBackend)(o.config);t(M(i));const n=await e.getMediaDisplayURL(r);if(!n)throw new Error("No display URL was returned!");t(I(i,n))}catch(e){t(D(i,e))}}}function x(e){return{type:"MEDIA_LOAD_REQUEST",payload:{page:e}}}function k(e,t={}){return{type:"MEDIA_LOAD_SUCCESS",payload:v({files:e},t)}}function S(e={}){const{privateUpload:t}=e;return{type:"MEDIA_LOAD_FAILURE",payload:{privateUpload:t}}}function O(){return{type:"MEDIA_PERSIST_REQUEST"}}function T(e,t={}){const{privateUpload:n}=t;return{type:"MEDIA_PERSIST_SUCCESS",payload:{file:e,privateUpload:n}}}function C(e={}){const{privateUpload:t}=e;return{type:"MEDIA_PERSIST_FAILURE",payload:{privateUpload:t}}}function A(){return{type:"MEDIA_DELETE_REQUEST"}}function P(e,t={}){const{privateUpload:n}=t;return{type:"MEDIA_DELETE_SUCCESS",payload:{file:e,privateUpload:n}}}function R(e={}){const{privateUpload:t}=e;return{type:"MEDIA_DELETE_FAILURE",payload:{privateUpload:t}}}function M(e){return{type:"MEDIA_DISPLAY_URL_REQUEST",payload:{key:e}}}function I(e,t){return{type:"MEDIA_DISPLAY_URL_SUCCESS",payload:{key:e,url:t}}}function D(e,t){return console.error(t),{type:"MEDIA_DISPLAY_URL_FAILURE",payload:{key:e,err:t}}}t.MEDIA_DISPLAY_URL_FAILURE="MEDIA_DISPLAY_URL_FAILURE"},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserRouter",(function(){return m})),n.d(t,"HashRouter",(function(){return b})),n.d(t,"Link",(function(){return T})),n.d(t,"MemoryRouter",(function(){return R})),n.d(t,"NavLink",(function(){return H})),n.d(t,"Prompt",(function(){return K})),n.d(t,"Redirect",(function(){return ie})),n.d(t,"Route",(function(){return B})),n.d(t,"Router",(function(){return d})),n.d(t,"StaticRouter",(function(){return me})),n.d(t,"Switch",(function(){return be})),n.d(t,"generatePath",(function(){return _e})),n.d(t,"matchPath",(function(){return we})),n.d(t,"withRouter",(function(){return Se}));var r=n(43),i=n.n(r),o=n(0),a=n.n(o),s=n(1),l=n.n(s),u=n(58),c=n(190),d=c.a;function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){var n,r;f(this,t);for(var i=arguments.length,o=Array(i),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return a.a.createElement(d,{history:this.history,children:this.props.children})},t}(a.a.Component);h.propTypes={basename:l.a.string,forceRefresh:l.a.bool,getUserConfirmation:l.a.func,keyLength:l.a.number,children:l.a.node};var m=h;function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var y=function(e){function t(){var n,r;g(this,t);for(var i=arguments.length,o=Array(i),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return a.a.createElement(d,{history:this.history,children:this.props.children})},t}(a.a.Component);y.propTypes={basename:l.a.string,getUserConfirmation:l.a.func,hashType:l.a.oneOf(["hashbang","noslash","slash"]),children:l.a.node};var b=y,_=n(23),w=n.n(_),E=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["replace","to","innerRef"]);w()(this.context.router,"You should not use outside a "),w()(void 0!==t,'You must specify the "to" property');var i=this.context.router.history,o="string"==typeof t?Object(u.createLocation)(t,null,null,i.location):t,s=i.createHref(o);return a.a.createElement("a",E({},r,{onClick:this.handleClick,href:s,ref:n}))},t}(a.a.Component);O.propTypes={onClick:l.a.func,target:l.a.string,replace:l.a.bool,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired,innerRef:l.a.oneOfType([l.a.string,l.a.func])},O.defaultProps={replace:!1},O.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired,createHref:l.a.func.isRequired}).isRequired}).isRequired};var T=O;function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var P=function(e){function t(){var n,r;C(this,t);for(var i=arguments.length,o=Array(i),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return a.a.createElement(c.a,{history:this.history,children:this.props.children})},t}(a.a.Component);P.propTypes={initialEntries:l.a.array,initialIndex:l.a.number,getUserConfirmation:l.a.func,keyLength:l.a.number,children:l.a.node};var R=P,M=n(191),I=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,u=(r||l.location).pathname;return Object(M.a)(u,{path:i,strict:o,exact:a,sensitive:s},l.match)},t.prototype.componentWillMount=function(){i()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),i()(!(this.props.component&&this.props.children&&!L(this.props.children)),"You should not use and in the same route; will be ignored"),i()(!(this.props.render&&this.props.children&&!L(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){i()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,i=t.render,o=this.context.router,s=o.history,l=o.route,u=o.staticContext,c={match:e,location:this.props.location||l.location,history:s,staticContext:u};return r?e?a.a.createElement(r,c):null:i?e?i(c):null:"function"==typeof n?n(c):n&&!L(n)?a.a.Children.only(n):null},t}(a.a.Component);N.propTypes={computedMatch:l.a.object,path:l.a.string,exact:l.a.bool,strict:l.a.bool,sensitive:l.a.bool,component:l.a.func,render:l.a.func,children:l.a.oneOfType([l.a.func,l.a.node]),location:l.a.object},N.contextTypes={router:l.a.shape({history:l.a.object.isRequired,route:l.a.object.isRequired,staticContext:l.a.object})},N.childContextTypes={router:l.a.object.isRequired};var F=N,B=F,U=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),p="object"===(void 0===t?"undefined":z(t))?t.pathname:t,h=p&&p.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return a.a.createElement(B,{path:h,exact:n,strict:r,location:i,children:function(e){var n=e.location,r=e.match,i=!!(c?c(r,n):r);return a.a.createElement(T,U({to:t,className:i?[s,o].filter((function(e){return e})).join(" "):s,style:i?U({},u,l):u,"aria-current":i&&d||null},f))}})};q.propTypes={to:T.propTypes.to,exact:l.a.bool,strict:l.a.bool,location:l.a.object,activeClassName:l.a.string,className:l.a.string,activeStyle:l.a.object,style:l.a.object,isActive:l.a.func,"aria-current":l.a.oneOf(["page","step","location","date","time","true"])},q.defaultProps={activeClassName:"active","aria-current":"page"};var H=q;function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var V=function(e){function t(){return W(this,t),G(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.enable=function(e){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(e)},t.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},t.prototype.componentWillMount=function(){w()(this.context.router,"You should not use outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(a.a.Component);V.propTypes={when:l.a.bool,message:l.a.oneOfType([l.a.func,l.a.string]).isRequired},V.defaultProps={when:!0},V.contextTypes={router:l.a.shape({history:l.a.shape({block:l.a.func.isRequired}).isRequired}).isRequired};var K=V,$=n(281),Y=n.n($),Q={},X=0,J=function(e){var t=e,n=Q[t]||(Q[t]={});if(n[e])return n[e];var r=Y.a.compile(e);return X<1e4&&(n[e]=r,X++),r},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("/"===e)return e;var n=J(e);return n(t,{pretty:!0})},ee=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(u.createLocation)(e.to),n=Object(u.createLocation)(this.props.to);Object(u.locationsAreEqual)(t,n)?i()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"==typeof n?Z(n,t.params):ee({},n,{pathname:Z(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(a.a.Component);re.propTypes={computedMatch:l.a.object,push:l.a.bool,from:l.a.string,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired},re.defaultProps={push:!1},re.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired}).isRequired,staticContext:l.a.object}).isRequired};var ie=re,oe=Object.assign||function(e){for(var t=1;t",e)}},pe=function(){},he=function(e){function t(){var n,r;ae(this,t);for(var i=arguments.length,o=Array(i),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:ce(t,Object(u.createLocation)(n)),push:this.handlePush,replace:this.handleReplace,go:fe("go"),goBack:fe("goBack"),goForward:fe("goForward"),listen:this.handleListen,block:this.handleBlock};return a.a.createElement(c.a,oe({},r,{history:i}))},t}(a.a.Component);he.propTypes={basename:l.a.string,context:l.a.object.isRequired,location:l.a.oneOfType([l.a.string,l.a.object])},he.defaultProps={basename:"",location:"/"},he.childContextTypes={router:l.a.object.isRequired};var me=he;function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var ye=function(e){function t(){return ge(this,t),ve(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){w()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){i()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),i()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,i=void 0;return a.a.Children.forEach(t,(function(t){if(null==r&&a.a.isValidElement(t)){var o=t.props,s=o.path,l=o.exact,u=o.strict,c=o.sensitive,d=o.from,f=s||d;i=t,r=Object(M.a)(n.pathname,{path:f,exact:l,strict:u,sensitive:c},e.match)}})),r?a.a.cloneElement(i,{location:n,computedMatch:r}):null},t}(a.a.Component);ye.contextTypes={router:l.a.shape({route:l.a.object.isRequired}).isRequired},ye.propTypes={children:l.a.node,location:l.a.object};var be=ye,_e=Z,we=M.a,Ee=n(641),xe=n.n(Ee),ke=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["wrappedComponentRef"]);return a.a.createElement(F,{children:function(t){return a.a.createElement(e,ke({},r,t,{ref:n}))}})};return t.displayName="withRouter("+(e.displayName||e.name)+")",t.WrappedComponent=e,t.propTypes={wrappedComponentRef:l.a.func},xe()(t,e)}},function(e,t,n){var r=n(110),i=n(345),o=n(559),a=n(141),s=n(178),l=n(1184),u=n(257),c=n(336),d=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=a(t,e),u||(u=t.length>1),t})),s(e,c(e),n),u&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u}));var r=n(2),i=n(92),o=n(288);function a(e,t,n,i,a){var s=Object(r.s)(Object(r.j)(),e,t,n,i);return!!Object(r.F)(a,s)&&(!!Object(r.g)(a,s)||(s[0]>=a[0]&&s[2]<=a[2]||(s[1]>=a[1]&&s[3]<=a[3]||Object(o.a)(e,t,n,i,(function(e,t){return Object(r.G)(a,e,t)})))))}function s(e,t,n,r,i){for(var o=0,s=n.length;o0}function o(e,t,n,r,o){for(var a=void 0!==o&&o,s=0,l=n.length;st=>e.reduce((e,n)=>{const r=n.split(".");let i=t.data;for(let e=0;ee.score>t.score?-1:e.score{const t=this.authStore.retrieve();if(t&&t.backendName===this.backendName)return this.user=S({},t,{},e),this.authStore.store(this.user),this.user}),O(this,"getToken",()=>this.implementation.getToken()),this.deleteAnonymousBackup(),this.config=r,this.implementation=e.init(this.config.toJS(),{useWorkflow:(0,c.selectUseWorkflow)(this.config),updateUserCredentials:this.updateUserCredentials,initialWorkflowStatus:b.status.first()}),this.backendName=t,this.authStore=n,null===this.implementation)throw new Error("Cannot instantiate a Backend with no implementation")}currentUser(){if(this.user)return this.user;const e=this.authStore.retrieve();return e&&e.backendName===this.backendName?Promise.resolve(this.implementation.restoreUser(e)).then(e=>(this.user=S({},e,{backendName:this.backendName}),this.authStore.store(this.user),this.user)):Promise.resolve(null)}authComponent(){return this.implementation.authComponent()}authenticate(e){return this.implementation.authenticate(e).then(e=>(this.user=S({},e,{backendName:this.backendName}),this.authStore&&this.authStore.store(this.user),this.user))}logout(){return Promise.resolve(this.implementation.logout()).then(()=>{this.user=null,this.authStore&&this.authStore.logout()})}async entryExist(e,t,n,r){const i=r&&await this.implementation.unpublishedEntry(e.get("name"),n).catch(e=>e instanceof y.EditorialWorkflowError&&e.notUnderEditorialWorkflow?Promise.resolve(!1):Promise.reject(e));return i||await this.implementation.getEntry(t).then(({data:e})=>e).catch(()=>Promise.resolve(!1))}async generateUniqueSlug(e,t,n,r){const i=n.get("slug"),o=(0,v.slugFormatter)(e,t,i);let a=1,s=o;for(;r.includes(s)||await this.entryExist(e,(0,p.selectEntryPath)(e,s),s,(0,c.selectUseWorkflow)(n));)s="".concat(o).concat((0,m.sanitizeChar)(" ",i)).concat(a++);return s}processEntries(e,t){const n=t.get("filter"),r=e.map(e=>(0,h.createEntry)(t.get("name"),(0,p.selectEntrySlug)(t,e.file.path),e.file.path,{raw:e.data||"",label:e.file.label})).map(this.entryWithFormat(t));return n?this.filterEntries({entries:r},n):r}listEntries(e){const t=(0,p.selectFolderEntryExtension)(e);let n;const r=e.get("type");if(r===w.FOLDER)n=()=>this.implementation.entriesByFolder(e.get("folder"),t,(0,y.getPathDepth)(e.get("path","")));else{if(r!==w.FILES)throw new Error("Unknown collection type: ".concat(r));{const t=e.get("files").map(e=>({path:e.get("file"),label:e.get("label")})).toArray();n=()=>this.implementation.entriesByFiles(t)}}return n().then(t=>({entries:this.processEntries(t,e),cursor:y.Cursor.create(t[y.CURSOR_COMPATIBILITY_SYMBOL]).wrapData({cursorType:"collectionEntries",collection:e})}))}async listAllEntries(e){if(e.get("folder")&&this.implementation.allEntriesByFolder){const t=(0,p.selectFolderEntryExtension)(e);return this.implementation.allEntriesByFolder(e.get("folder"),t,(0,y.getPathDepth)(e.get("path",""))).then(t=>this.processEntries(t,e))}const t=await this.listEntries(e),{entries:n}=t;let{cursor:r}=t;for(;r&&r.actions.includes("next");){const{entries:e,cursor:t}=await this.traverseCursor(r,"next");n.push(...e),r=t}return n}async search(e,t){const n=[],i=e.map(async e=>{const n=e.get("summary",""),i=(0,_.extractTemplateVars)(n),o=[(0,p.selectInferedField)(e,"title"),(0,p.selectInferedField)(e,"shortTitle"),(0,p.selectInferedField)(e,"author"),...i.map(t=>_.dateParsers[t]?(0,p.selectInferedField)(e,"date"):t)].filter(Boolean),a=await this.listAllEntries(e);return l.filter(t,a,{extract:A((0,r.default)(o))})}).map(e=>e.catch(e=>(n.push(e),[]))),a=await Promise.all(i).then(e=>(0,o.default)(e));if(n.length>0)throw new Error({message:"Errors ocurred while searching entries locally!",errors:n});return{entries:a.filter(({score:e})=>e>5).sort(P).map(e=>e.original)}}async query(e,t,n){const r=await this.listAllEntries(e);return{query:n,hits:l.filter(n,r,{extract:A(t)}).sort(P).map(e=>e.original)}}traverseCursor(e,t){const[n,r]=e.unwrapData(),i=n.get("collection");return this.implementation.traverseCursor(r,t).then(async({entries:e,cursor:t})=>({entries:this.processEntries(e,i),cursor:y.Cursor.create(t).wrapData({cursorType:"collectionEntries",collection:i})}))}async getLocalDraftBackup(e,t){const n=C(e.get("name"),t),r=await y.localForage.getItem(n);if(!r||!r.raw.trim())return{};const{raw:i,path:o}=r;let{mediaFiles:a=[]}=r;a=a.map(e=>e.file?S({},e,{url:URL.createObjectURL(e.file)}):e);const s=(0,p.selectFileEntryLabel)(e,t);return{entry:this.entryWithFormat(e)((0,h.createEntry)(e.get("name"),t,o,{raw:i,label:s,mediaFiles:a}))}}async persistLocalDraftBackup(e,t){const n=C(t.get("name"),e.get("slug")),r=this.entryToRaw(t,e);if(!r.trim())return;const i=await Promise.all(e.get("mediaFiles").toJS().map(async e=>{var t;if(null===(t=e.url)||void 0===t?void 0:t.startsWith("blob:")){const t=await fetch(e.url).then(e=>e.blob());return S({},e,{file:(0,y.blobToFileObj)(e.name,t)})}return e}));return await y.localForage.setItem(n,{raw:r,path:e.get("path"),mediaFiles:i}),y.localForage.setItem(C(),r)}async deleteLocalDraftBackup(e,t){const n=C(e.get("name"),t);return await y.localForage.removeItem(n),this.deleteAnonymousBackup()}deleteAnonymousBackup(){return y.localForage.removeItem(C())}async getEntry(e,t,n){const r=(0,p.selectEntryPath)(t,n),i=(0,p.selectFileEntryLabel)(t,n),o=(0,f.selectIntegration)(e.integrations,null,"assetStore"),a=await this.implementation.getEntry(r),l=(0,h.createEntry)(t.get("name"),n,a.file.path,{raw:a.data,label:i,mediaFiles:[]}),u=this.entryWithFormat(t)(l),c=(0,p.selectMediaFolders)(e,t,(0,s.fromJS)(u));if(c.length>0&&!o){l.mediaFiles=[];for(const e of c)l.mediaFiles=[...l.mediaFiles,...await this.implementation.getMedia(e)]}else l.mediaFiles=e.mediaLibrary.get("files")||[];return u}getMedia(){return this.implementation.getMedia()}getMediaFile(e){return this.implementation.getMediaFile(e)}getMediaDisplayURL(e){if(this.implementation.getMediaDisplayURL)return this.implementation.getMediaDisplayURL(e);const t=new Error("getMediaDisplayURL is not implemented by the current backend, but the backend returned a displayURL which was not a string!");return t.displayURL=e,Promise.reject(t)}entryWithFormat(e){return t=>{const n=(0,u.resolveFormat)(e,t);if(t&&void 0!==t.raw){const e=n&&(0,a.default)(n.fromFile.bind(n,t.raw))||{};return(0,i.default)(e)&&console.error(e),Object.assign(t,{data:(0,i.default)(e)?{}:e})}return n.fromFile(t)}}unpublishedEntries(e){return this.implementation.unpublishedEntries().then(t=>t.map(t=>{const n=t.metaData.collection,r=e.find(e=>e.get("name")===n),i=(0,h.createEntry)(n,t.slug,t.file.path,{raw:t.data,isModification:t.isModification,label:r&&(0,p.selectFileEntryLabel)(r,t.slug)});return i.metaData=t.metaData,i})).then(t=>({pagination:0,entries:t.reduce((t,n)=>{const r=e.get(n.collection);return r?t.push(this.entryWithFormat(r)(n)):console.warn("Missing collection '".concat(n.collection,"' for entry with path '").concat(n.path,"'")),t},[])}))}unpublishedEntry(e,t){return this.implementation.unpublishedEntry(e.get("name"),t).then(t=>(0,h.createEntry)(e.get("name"),t.slug,t.file.path,{raw:t.data,isModification:t.isModification,metaData:t.metaData,mediaFiles:t.mediaFiles})).then(this.entryWithFormat(e))}getDeploy(e,t,n){const r=this.config.get("site_url");if(r&&!1!==this.config.get("show_preview_links"))return{url:(0,v.previewUrlFormatter)(r,e,t,this.config.get("slug"),n),status:"SUCCESS"}}async getDeployPreview(e,t,n,{maxAttempts:r=1,interval:i=5e3}={}){if(!this.implementation.getDeployPreview||!1===this.config.get("show_preview_links"))return;let o,a=0;for(;!o&&asetTimeout(()=>e(),i));return o?{url:(0,v.previewUrlFormatter)(o.url,e,t,this.config.get("slug"),n),status:o.status?o.status.toUpperCase():""}:void 0}async persistEntry({config:e,collection:t,entryDraft:n,assetProxies:r,usedSlugs:i,unpublished:o=!1,status:a}){const s=n.getIn(["entry","newRecord"])||!1,l={title:n.getIn(["entry","data","title"],"No Title"),description:n.getIn(["entry","data","description"],"No Description!")};let u;if(s){if(!(0,p.selectAllowNewEntries)(t))throw new Error("Not allowed to create new entries in this collection");const o=await this.generateUniqueSlug(t,n.getIn(["entry","data"]),e,i),a=(0,p.selectEntryPath)(t,o);u={path:a,slug:o,raw:this.entryToRaw(t,n.get("entry"))},r.map(r=>{const i=r.path,o=(0,d.selectMediaFilePath)(e,t,n.get("entry").set("path",a),i,r.field);r.path=o})}else{u={path:n.getIn(["entry","path"]),slug:n.getIn(["entry","slug"]),raw:this.entryToRaw(t,n.get("entry"))}}const f=await this.currentUser(),h=(0,v.commitMessageFormatter)(s?"create":"update",e,{collection:t,slug:u.slug,path:u.path,authorLogin:f.login,authorName:f.name},f.useOpenAuthoring),m=(0,c.selectUseWorkflow)(e),g=S({newEntry:s,parsedData:l,commitMessage:h,collectionName:t.get("name"),useWorkflow:m},{unpublished:o,status:a});return m||await this.invokePrePublishEvent(n.get("entry")),await this.implementation.persistEntry(u,r,g),m||await this.invokePostPublishEvent(n.get("entry")),u.slug}async invokeEventWithEntry(e,t){const{login:n,name:r}=await this.currentUser();await(0,g.invokeEvent)({name:e,data:{entry:t,author:{login:n,name:r}}})}async invokePrePublishEvent(e){await this.invokeEventWithEntry("prePublish",e)}async invokePostPublishEvent(e){await this.invokeEventWithEntry("postPublish",e)}async invokePreUnpublishEvent(e){await this.invokeEventWithEntry("preUnpublish",e)}async invokePostUnpublishEvent(e){await this.invokeEventWithEntry("postUnpublish",e)}async persistMedia(e,t){const n=await this.currentUser(),r={commitMessage:(0,v.commitMessageFormatter)("uploadMedia",e,{path:t.path,authorLogin:n.login,authorName:n.name},n.useOpenAuthoring)};return this.implementation.persistMedia(t,r)}async deleteEntry(e,t,n){const r=(0,p.selectEntryPath)(t,n);if(!(0,p.selectAllowDeletion)(t))throw new Error("Not allowed to delete entries in this collection");const i=e.config,o=await this.currentUser(),a=(0,v.commitMessageFormatter)("delete",i,{collection:t,slug:n,path:r,authorLogin:o.login,authorName:o.name},o.useOpenAuthoring),s=(0,d.selectEntry)(e.entries,t.get("name"),n);await this.invokePreUnpublishEvent(s);const l=await this.implementation.deleteFile(r,a);return await this.invokePostUnpublishEvent(s),l}async deleteMedia(e,t){const n=await this.currentUser(),r=(0,v.commitMessageFormatter)("deleteMedia",e,{path:t,authorLogin:n.login,authorName:n.name},n.useOpenAuthoring);return this.implementation.deleteFile(t,r)}persistUnpublishedEntry(e){return this.persistEntry(S({},e,{unpublished:!0}))}updateUnpublishedEntryStatus(e,t,n){return this.implementation.updateUnpublishedEntryStatus(e,t,n)}async publishUnpublishedEntry(e){const t=e.get("collection"),n=e.get("slug");await this.invokePrePublishEvent(e),await this.implementation.publishUnpublishedEntry(t,n),await this.invokePostPublishEvent(e)}deleteUnpublishedEntry(e,t){return this.implementation.deleteUnpublishedEntry(e,t)}entryToRaw(e,t){const n=(0,u.resolveFormat)(e,t.toJS()),r=this.fieldsOrder(e,t);return n&&n.toFile(t.get("data").toJS(),r)}fieldsOrder(e,t){if(e.get("fields"))return e.get("fields").map(e=>e.get("name")).toArray();const n=(e.get("files")||(0,s.List)()).filter(e=>e.get("name")===t.get("slug")).get(0);if(null==n)throw new Error("No file found for ".concat(t.get("slug")," in ").concat(e.get("name")));return n.get("fields").map(e=>e.get("name")).toArray()}filterEntries(e,t){return e.entries.filter(e=>{const n=e.data[t.get("field")];return Array.isArray(n)?n.includes(t.get("value")):n===t.get("value")})}}function M(e){const t=e.getIn(["backend","name"]);if(null==t)throw new Error("No backend defined in configuration");const n=new T,r=(0,g.getBackend)(t);if(r)return new R(r,{backendName:t,authStore:n,config:e});throw new Error("Backend not found: ".concat(t))}t.Backend=R;const I=function(){let e;return t=>e||(e=M(t))}();t.currentBackend=I},function(e,t,n){var r=n(711),i=n(714);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(40),i=n(310),o=n(421),a=n(109);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(a(e))}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var r=n(245),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var o=Object.create(n(208));o.inherits=n(142);var a=n(429),s=n(319);o.inherits(d,a);for(var l=i(s.prototype),u=0;u{e(y());try{const n=t().config,r=(()=>{const e=document.querySelector('link[rel="cms-config-url"]');if(e&&{"text/yaml":"yaml","application/x-yaml":"yaml"}[e.type]&&(0,i.default)(e,"href")){const t=(0,i.default)(e,"href");return console.log('Using config file path: "'.concat(t,'"')),t}return"config.yml"})(),o=n&&n.size>1,a=n&&!1===n.get("load_config_file")?{}:await async function(e,t){const n=await fetch(e,{credentials:"same-origin"}).catch(e=>e);if(n instanceof Error||200!==n.status){if(t)return g("");throw new Error("Failed to load config.yml (".concat(n.status||n,")"))}const r=n.headers.get("Content-Type")||"Not-Found";if(-1===r.indexOf("yaml")&&(console.log("Response for ".concat(e," was not yaml. (Content-Type: ").concat(r,")")),t))return g("");return g(await n.text())}(r,o);let s=m(n,a);(0,c.validateConfig)(s.toJS()),s=await E(s),e(_(h(s))),e((0,l.authenticateUser)())}catch(t){throw e(b(t)),t}}},t.CONFIG_MERGE=t.CONFIG_FAILURE=t.CONFIG_SUCCESS=t.CONFIG_REQUEST=void 0;var r=f(n(199)),i=f(n(94)),o=f(n(124)),a=f(n(311)),s=n(3),l=n(200),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(95)),c=n(799);function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}t.CONFIG_REQUEST="CONFIG_REQUEST";t.CONFIG_SUCCESS="CONFIG_SUCCESS";t.CONFIG_FAILURE="CONFIG_FAILURE";t.CONFIG_MERGE="CONFIG_MERGE";const p={publish_mode:u.SIMPLE};function h(e){return(0,s.Map)(p).mergeDeep(e).withMutations(e=>{!e.get("display_url")&&e.get("site_url")&&e.set("display_url",e.get("site_url"));const t="/".concat((0,o.default)(e.get("media_folder"),"/"));e.get("public_folder")||e.set("public_folder",t),e.getIn(["slug","encoding"])||e.setIn(["slug","encoding"],"unicode"),e.getIn(["slug","clean_accents"])||e.setIn(["slug","clean_accents"],!1),e.getIn(["slug","sanitize_replacement"])||e.setIn(["slug","sanitize_replacement"],"-"),e.set("collections",e.get("collections").map(e=>{const t=e.get("folder");if(t)return e.has("path")&&!e.has("media_folder")&&(e=e.set("media_folder","")),e.has("media_folder")&&!e.has("public_folder")&&(e=e.set("public_folder",e.get("media_folder"))),e.set("folder",(0,o.default)(t,"/"));const n=e.get("files");return n?e.set("files",n.map(e=>e.set("file",(0,o.default)(e.get("file"),"/")))):void 0}))})}function m(e,t){const n=(0,s.fromJS)(t)||(0,s.Map)();return e?e.mergeDeep(n):n}function g(e){const t=a.default.safeLoad(e);return"string"==typeof CMS_ENV&&t[CMS_ENV]&&Object.keys(t[CMS_ENV]).forEach(e=>{t[e]=t[CMS_ENV][e]}),t}function v(e){return{type:"CONFIG_SUCCESS",payload:e}}function y(){return{type:"CONFIG_REQUEST"}}function b(e){return{type:"CONFIG_FAILURE",error:"Error loading config",payload:e}}function _(e){return t=>{t(v(e))}}async function w(e){if("localhost"===location.hostname||"127.0.0.1"===location.hostname){let t;!0===e?t="http://localhost:8081/api/v1":(0,r.default)(e)&&(t=e.url);try{console.log("Looking for Netlify CMS Proxy Server at '".concat(t,"'"));const{repo:e,publish_modes:n,type:r}=await fetch("".concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"info"})}).then(e=>e.json());if("string"==typeof e&&Array.isArray(n)&&"string"==typeof r)return console.log("Detected Netlify CMS Proxy Server at '".concat(t,"' with repo: '").concat(e,"'")),{proxyUrl:t,publish_modes:n,type:r}}catch{console.log("Netlify CMS Proxy Server not detected at '".concat(t,"'"))}}return{}}async function E(e){if(e.has("local_backend")){const{proxyUrl:t,publish_modes:n,type:r}=await w(e.toJS().local_backend);if(t&&(e=m(e,{backend:{name:"proxy",proxy_url:t}})).has("publish_mode")&&!n.includes(e.get("publish_mode"))){const t=n[0];console.log("'".concat(e.get("publish_mode"),"' is not supported by '").concat(r,"' backend, switching to '").concat(t,"'")),e=m(e,{publish_mode:t})}}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCollectionUrl=function(e,t){return p("/collections/".concat(e),t)},t.getNewEntryUrl=function(e,t){return p("/collections/".concat(e,"/new"),t)},t.addParams=function(e,t){const n=s.default.parse(e,!0);return n.query=function(e){for(var t=1;t-1?e.slice(t+2):e},t.getCharReplacer=y,t.sanitizeURI=b,t.sanitizeChar=function(e,t){const n=t.get("encoding"),r=t.get("sanitize_replacement");return y(n,r)(e)},t.sanitizeSlug=function(e,t){if(!(0,a.default)(e))throw new Error("The input slug must be a string.");const n=t.get("encoding"),s=t.get("clean_accents"),c=t.get("sanitize_replacement"),d=(0,i.default)([...s?[l.default.remove]:[],(0,r.default)(b,{replacement:c,encoding:n}),(0,r.default)(u.default,{replacement:c})])(e),f=new RegExp("(?:".concat((0,o.default)(c),")+"),"g"),p=new RegExp("".concat((0,o.default)(c),"$")),h=new RegExp("^".concat((0,o.default)(c)));return d.replace(f,c).replace(h,"").replace(p,"")};var r=c(n(465)),i=c(n(97)),o=c(n(456)),a=c(n(342)),s=c(n(885)),l=c(n(891)),u=c(n(892));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return"".concat(t?"/#":"").concat(e)}const h=/[\w\-.~]/i,m=/[\xA0-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFEF}\u{10000}-\u{1FFFD}\u{20000}-\u{2FFFD}\u{30000}-\u{3FFFD}\u{40000}-\u{4FFFD}\u{50000}-\u{5FFFD}\u{60000}-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}\u{90000}-\u{9FFFD}\u{A0000}-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}\u{D0000}-\u{DFFFD}\u{E1000}-\u{EFFFD}]/u,g=e=>h.test(e),v=e=>h.test(e)||m.test(e);function y(e,t){let n;if("unicode"===e)n=v;else{if("ascii"!==e)throw new Error('`options.encoding` must be "unicode" or "ascii".');n=g}if(!Array.from(t).every(n))throw new Error("The replacement character(s) (options.replacement) is itself unsafe.");return e=>n(e)?e:t}function b(e,{replacement:t="",encoding:n="unicode"}={}){if(!(0,a.default)(e))throw new Error("The input slug must be a string.");if(!(0,a.default)(t))throw new Error("`options.replacement` must be a string.");return Array.from(e).map(y(n,t)).join("")}},function(e,t,n){var r=n(110),i=n(111),o=n(484),a=n(40);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addAssets=function(e){return{type:"ADD_ASSETS",payload:e}},t.addAsset=l,t.removeAsset=function(e){return{type:"REMOVE_ASSET",payload:e}},t.loadAssetRequest=u,t.loadAssetSuccess=c,t.loadAssetFailure=d,t.loadAsset=f,t.boundGetAsset=function(e,t,n){return(r,i)=>e(h({collection:t,entry:n,path:r,field:i}))},t.getAsset=h,t.LOAD_ASSET_FAILURE=t.LOAD_ASSET_SUCCESS=t.LOAD_ASSET_REQUEST=t.REMOVE_ASSET=t.ADD_ASSET=t.ADD_ASSETS=void 0;var r=n(168),i=n(41),o=n(170),a=n(259),s=n(129);t.ADD_ASSETS="ADD_ASSETS";t.ADD_ASSET="ADD_ASSET";t.REMOVE_ASSET="REMOVE_ASSET";t.LOAD_ASSET_REQUEST="LOAD_ASSET_REQUEST";t.LOAD_ASSET_SUCCESS="LOAD_ASSET_SUCCESS";function l(e){return{type:"ADD_ASSET",payload:e}}function u(e){return{type:"LOAD_ASSET_REQUEST",payload:{path:e}}}function c(e){return{type:"LOAD_ASSET_SUCCESS",payload:{path:e}}}function d(e,t){return{type:"LOAD_ASSET_FAILURE",payload:{path:e,error:t}}}function f(e){return async(t,n)=>{try{t(u(e)),await(0,s.waitForMediaLibraryToLoad)(t,n());const i=(0,a.selectMediaFileByPath)(n(),e);if(i){const o=await(0,s.getMediaDisplayURL)(t,n(),i);t(l((0,r.createAssetProxy)({path:e,url:o||e})))}else{const{url:i}=await(0,s.getMediaFile)(n(),e);t(l((0,r.createAssetProxy)({path:e,url:i})))}t(c(e))}catch(n){t(d(e,n))}}}t.LOAD_ASSET_FAILURE="LOAD_ASSET_FAILURE";const p=(0,r.createAssetProxy)({path:"empty.svg",file:new File([''],"empty.svg",{type:"image/svg+xml"})});function h({collection:e,entry:t,path:n,field:a}){return(s,u)=>{if(!n)return p;const c=u(),d=(0,o.selectMediaFilePath)(c.config,e,t,n,a);let{asset:h,isLoading:m,error:g}=c.medias.get(d)||{};return m?p:h||((0,i.isAbsolutePath)(d)||g?(h=(0,r.createAssetProxy)({path:d,url:n}),s(l(h))):(s(f(d)),h=p),h)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(19)),i=(s(n(0)),s(n(1))),o=s(n(980)),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l=(0,r.default)("span",{target:"ei6fm2r0",label:"IconWrapper"})("display:inline-block;line-height:0;width:",e=>e.size,";height:",e=>e.size,";transform:",e=>"rotate(".concat(e.rotation,")"),";& path:not(.no-fill),& circle:not(.no-fill),& polygon:not(.no-fill),& rect:not(.no-fill){fill:currentColor;}& path.clipped{fill:transparent;}svg{width:100%;height:100%;}"),u=(e,t)=>{if(!e||!t)return"0deg";const n={right:90,down:180,left:270,up:360};return"".concat(n[t]-n[e],"deg")},c={xsmall:"12px",small:"18px",medium:"24px",large:"32px"},d=({type:e,direction:t,size:n="medium",className:r})=>{const i=o.default[e].image;return(0,a.jsx)(l,{className:r,size:c[n]||n,rotation:u(o.default[e].direction,t)},(0,a.jsx)(i,null))};d.propTypes={type:i.default.string.isRequired,direction:i.default.oneOf(["right","down","left","up"]),size:i.default.string,className:i.default.string};var f=(0,r.default)(d,{target:"ei6fm2r1"})("");t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INIT_COORDS="dnd-core/INIT_COORDS",t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",t.HOVER="dnd-core/HOVER",t.DROP="dnd-core/DROP",t.END_DRAG="dnd-core/END_DRAG"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=function(e){return"function"==typeof e},t.noop=function(){},t.isPlainObject=function(e){if(!function(e){return"object"==typeof e&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}},function(e,t,n){var r=n(332),i=n(175),o=n(203),a=n(40),s=n(126),l=n(211),u=n(250),c=n(249),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){var r=n(163),i=n(212),o=n(256),a=n(213),s=r((function(e,t){var n=a(t,o(s));return i(e,32,void 0,t,n)}));s.placeholder={},e.exports=s},function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return o})),n.d(t,"applyMiddleware",(function(){return g})),n.d(t,"bindActionCreators",(function(){return d})),n.d(t,"combineReducers",(function(){return u})),n.d(t,"compose",(function(){return m})),n.d(t,"createStore",(function(){return s}));var r=n(227),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var i;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var l=e,u=t,c=[],d=c,f=!1;function p(){d===c&&(d=c.slice())}function h(){if(f)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(f)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,p();var n=d.indexOf(e);d.splice(n,1),c=null}}}function g(e){if(!a(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(f)throw new Error("Reducers may not dispatch actions.");try{f=!0,u=l(u,e)}finally{f=!1}for(var t=c=d,n=0;nthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)},r.prototype.getHeight=function(){return this.maxY-this.minY+1},r.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},r.prototype.getWidth=function(){return this.maxX-this.minX+1},r.prototype.intersects=function(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY},t.b=r},function(e,t,n){"use strict";var r=n(25),i=n(7),o=n(12),a=n(32),s=function(e){function t(t){if(e.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,Object(i.a)(this,Object(a.b)(this.geometryName_),this.handleGeometryChanged_,this),t)if("function"==typeof t.getSimplifiedGeometry){var n=t;this.setGeometry(n)}else{var r=t;this.setProperties(r)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){var e=new t(this.getProperties());e.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&e.setGeometry(n.clone());var r=this.getStyle();return r&&e.setStyle(r),e},t.prototype.getGeometry=function(){return this.get(this.geometryName_)},t.prototype.getId=function(){return this.id_},t.prototype.getGeometryName=function(){return this.geometryName_},t.prototype.getStyle=function(){return this.style_},t.prototype.getStyleFunction=function(){return this.styleFunction_},t.prototype.handleGeometryChange_=function(){this.changed()},t.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Object(i.e)(this.geometryChangeKey_),this.geometryChangeKey_=null);var e=this.getGeometry();e&&(this.geometryChangeKey_=Object(i.a)(e,o.a.CHANGE,this.handleGeometryChange_,this)),this.changed()},t.prototype.setGeometry=function(e){this.set(this.geometryName_,e)},t.prototype.setStyle=function(e){this.style_=e,this.styleFunction_=e?function(e){if("function"==typeof e)return e;var t;Array.isArray(e)?t=e:(Object(r.a)("function"==typeof e.getZIndex,41),t=[e]);return function(){return t}}(e):void 0,this.changed()},t.prototype.setId=function(e){this.id_=e,this.changed()},t.prototype.setGeometryName=function(e){Object(i.c)(this,Object(a.b)(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=e,Object(i.a)(this,Object(a.b)(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},t}(a.a);t.a=s},function(e,t,n){var r=n(67).Symbol;e.exports=r},function(e,t,n){var r=n(101),i=n(75);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(204),i=n(417),o=n(308);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){var r=n(101),i=n(68);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(161),i=n(110),o=n(40),a=n(164),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;ne.blob());return await new Promise(t=>{const n=new FileReader;n.onload=e=>{var n;const r=(null===(n=e.target)||void 0===n?void 0:n.result)||"";t(r.toString().split("base64,")[1])},n.readAsDataURL(e)})}}t.default=i},function(e,t,n){"use strict";function r(e,t,n){var r=n?" !== ":" === ",i=n?" || ":" && ",o=n?"!":"",a=n?"":"!";switch(e){case"null":return t+r+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+i+"typeof "+t+r+'"object"'+i+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+i+a+"("+t+" % 1)"+i+t+r+t+")";default:return"typeof "+t+r+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t){switch(e.length){case 1:return r(e[0],t,!0);default:var n="",i=o(e);for(var a in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+r(a,t,!0);return n}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var s=o,u=i.split("/"),c=0;ce.getIn(["entities","".concat(t,".").concat(n)]);t.selectEntry=g;const v=(e,t)=>e.getIn(["pages",t,"ids"],(0,o.List)());t.selectPublishedSlugs=v;t.selectEntries=(e,t)=>{const n=v(e,t);return n&&n.map(n=>g(e,t,n))};const y=(e,t)=>e.find(e=>(null==e?void 0:e.get("name"))===t),b=(e,t,n,r)=>{if(!t)return!1;if(r&&r.has(e))return!0;if(t.has("files")){const r=y(t.get("files"),n);if(r&&r.has(e))return!0}return!!t.has(e)},_=(e,t,n,r,i,o,a)=>{const s=o.filter(e=>e===i)[0];if(s)return(0,u.folderFormatter)(s.has(e)?s.get(e):"{{".concat(e,"}}"),r,n,a,e,t.get("slug"));for(let s of o){s.has(e)||(s=s.set(e,"{{".concat(e,"}}")));const o=(0,u.folderFormatter)(s.get(e),r,n,a,e,t.get("slug"));let l=null;if(s.has("fields")?l=_(e,t,n,r,i,s.get("fields").toArray(),o):s.has("field")?l=_(e,t,n,r,i,[s.get("field")],o):s.has("types")&&(l=_(e,t,n,r,i,s.get("types").toArray(),o)),null!=l)return l}return null},w=(e,t,n,r,i)=>{let o=t.get(e);if(n.has(e)||(n=n.set(e,"{{".concat(e,"}}"))),n.has("files")){o=(0,u.folderFormatter)(n.get(e),r,n,o,e,t.get("slug"));let a=y(n.get("files"),null==r?void 0:r.get("slug"));if(a&&(a.has(e)||(a=a.set(e,"{{".concat(e,"}}"))),o=(0,u.folderFormatter)(a.get(e),r,n,o,e,t.get("slug")),i)){const s=_(e,t,n,r,i,a.get("fields").toArray(),o);null!==s&&(o=s)}}else if(o=(0,u.folderFormatter)(n.get(e),r,n,o,e,t.get("slug")),i){const a=_(e,t,n,r,i,n.get("fields").toArray(),o);null!==a&&(o=a)}return o},E=(e,t,n,r)=>{const o="media_folder";let s=e.get(o);if(b(o,t,null==n?void 0:n.get("slug"),r)){const i=null==n?void 0:n.get("path");if(i){const l=(0,a.dirname)(i),u=w(o,e,t,n,r);s=u.startsWith("/")?(0,a.join)(u):(0,a.join)(l,u)}else s=(0,a.join)(t.get("folder"),"DRAFT_MEDIA_FILES")}return(0,i.default)(s,"/")};t.selectMediaFolder=E;t.selectMediaFilePath=(e,t,n,r,i)=>{if((0,c.isAbsolutePath)(r))return r;const o=E(e,t,n,i);return(0,a.join)(o,(0,c.basename)(r))};t.selectMediaFilePublicPath=(e,t,n,r,i)=>{if((0,c.isAbsolutePath)(n))return n;const o="public_folder";let s=e.get(o);return b(o,t,null==r?void 0:r.get("slug"),i)&&(s=w(o,e,t,r,i)),(0,a.join)(s,(0,c.basename)(n))};t.selectEditingDraft=e=>{const t=e.get("entry");return t&&!t.isEmpty()};var x=(e=(0,o.Map)({entities:(0,o.Map)(),pages:(0,o.Map)()}),t)=>{switch(t.type){case s.ENTRY_REQUEST:{const n=t.payload;return e.setIn(["entities","".concat(n.collection,".").concat(n.slug),"isFetching"],!0)}case s.ENTRY_SUCCESS:{const n=t.payload;return d=n.collection,m=n.entry.slug,e.withMutations(e=>{e.setIn(["entities","".concat(d,".").concat(m)],(0,o.fromJS)(n.entry));const t=e.getIn(["pages",d,"ids"],(0,o.List)());t.includes(m)||e.setIn(["pages",d,"ids"],t.unshift(m))})}case s.ENTRIES_REQUEST:{const n=t.payload;return e.setIn(["pages",n.collection,"isFetching"],!0)}case s.ENTRIES_SUCCESS:{const n=t.payload;return d=n.collection,f=n.entries,p=n.append,h=n.page,e.withMutations(e=>{f.forEach(t=>e.setIn(["entities","".concat(d,".").concat(t.slug)],(0,o.fromJS)(t).set("isFetching",!1)));const t=(0,o.List)(f.map(e=>e.slug));e.setIn(["pages",d],(0,o.Map)({page:h,ids:p?e.getIn(["pages",d,"ids"],(0,o.List)()).concat(t):t}))})}case s.ENTRIES_FAILURE:return e.setIn(["pages",t.meta.collection,"isFetching"],!1);case s.ENTRY_FAILURE:{const n=t.payload;return e.withMutations(e=>{e.setIn(["entities","".concat(n.collection,".").concat(n.slug),"isFetching"],!1),e.setIn(["entities","".concat(n.collection,".").concat(n.slug),"error"],n.error.message)})}case l.SEARCH_ENTRIES_SUCCESS:{const n=t.payload;return f=n.entries,e.withMutations(e=>{f.forEach(t=>e.setIn(["entities","".concat(t.collection,".").concat(t.slug)],(0,o.fromJS)(t).set("isFetching",!1)))})}case s.ENTRY_DELETE_SUCCESS:{const n=t.payload;return e.withMutations(e=>{e.deleteIn(["entities","".concat(n.collectionName,".").concat(n.entrySlug)]),e.updateIn(["pages",n.collectionName,"ids"],e=>e.filter(e=>e!==n.entrySlug))})}default:return e}};t.default=x},function(e,t,n){var r=n(165),i=n(322),o=n(446),a=n(438),s=n(323),l=n(109),u=/^\s+|\s+$/g;e.exports=function(e,t,n){if((e=l(e))&&(n||void 0===t))return e.replace(u,"");if(!e||!(t=r(t)))return e;var c=s(e),d=s(t),f=a(c,d),p=o(c,d)+1;return i(c,f,p).join("")}},function(e,t,n){var r=n(453),i=n(332),o=n(126);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e=2&&("function"==typeof arguments[1]?n.task=arguments[1]:n.n=arguments[1]);var r=n.task;if(n.task=function(){r(t.leave)},t.current+n.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(n);t.current+=n.n-e,n.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var n=t.queue[0];n.n+t.current>t.capacity||(t.queue.shift(),t.current+=n.n,r(n.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}}()}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return r.DragSource}}),Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return r.DropTarget}}),Object.defineProperty(t,"HTML5DragDrop",{enumerable:!0,get:function(){return r.HTML5DragDrop}}),Object.defineProperty(t,"ErrorBoundary",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"FileUploadButton",{enumerable:!0,get:function(){return o.FileUploadButton}}),Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return a.Modal}}),Object.defineProperty(t,"Toast",{enumerable:!0,get:function(){return s.default}});var r=n(992),i=l(n(1044)),o=n(1046),a=n(1047),s=l(n(1056));function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=function(e,t,n){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:n||null}),e)},t.without=function(e,t){return e.filter((function(e){return e!==t}))},t.isString=function(e){return"string"==typeof e},t.isObject=function(e){return"object"==typeof e},t.xor=function(e,t){var n=new Map,r=function(e){return n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e,t){1===e&&i.push(t)})),i},t.intersection=function(e,t){return e.filter((function(e){return t.indexOf(e)>-1}))}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){"use strict";e.exports=s;var r=n(573),i=r.CONTINUE,o=r.SKIP,a=r.EXIT;function s(e,t,n,i){"function"==typeof t&&"function"!=typeof n&&(i=n,n=t,t=null),r(e,t,(function(e,t){var r=t[t.length-1],i=r?r.children.indexOf(e):null;return n(e,i,r)}),i)}s.CONTINUE=i,s.SKIP=o,s.EXIT=a},function(e,t,n){"use strict";e.exports=function(e,t){var n=[],i=-1,o=e.length;t&&n.push(r("text","\n"));for(;++i!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,n){return r=e,i=n,t}function m(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=m,h("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=m),h("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return h("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=g,g(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):Ke(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),h("regexp","string-2")):(e.eat("="),h("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if("<"==r&&e.match("!--")||"-"==r&&e.match("->"))return e.skipToEnd(),h("comment","comment");if(f.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),h("operator","operator",e.current());if(c.test(r)){e.eatWhile(c);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return h(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return h("async","keyword",i)}return h("variable","variable",i)}}function g(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return h("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=m;break}r=!r&&"\\"==n}return h("quasi","string-2",e.current())}function y(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(c.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var b={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function _(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function w(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var E={state:null,column:null,marked:null,cc:null};function x(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function k(){return x.apply(null,arguments),!0}function S(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function O(e){var t=E.state;if(E.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new C(r,n.vars,!0):null}return S(t,n.vars)?n:new C(n.prev,new A(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!S(e,t.localVars))return void(t.localVars=new A(e,t.localVars));n.globalVars&&!S(e,t.globalVars)&&(t.globalVars=new A(e,t.globalVars))}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function C(e,t,n){this.prev=e,this.vars=t,this.block=n}function A(e,t){this.name=e,this.next=t}var P=new A("this",new A("arguments",null));function R(){E.state.context=new C(E.state.context,E.state.localVars,!1),E.state.localVars=P}function M(){E.state.context=new C(E.state.context,E.state.localVars,!0),E.state.localVars=null}function I(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function D(e,t){var n=function(){var n=E.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new _(r,E.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function j(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function L(e){return function t(n){return n==e?k():";"==e||"}"==n||")"==n||"]"==n?x():k(t)}}function N(e,t){return"var"==e?k(D("vardef",t),ye,L(";"),j):"keyword a"==e?k(D("form"),z,N,j):"keyword b"==e?k(D("form"),N,j):"keyword d"==e?E.stream.match(/^\s*$/,!1)?k():k(D("stat"),H,L(";"),j):"debugger"==e?k(L(";")):"{"==e?k(D("}"),M,oe,j,I):";"==e?k():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==j&&E.state.cc.pop()(),k(D("form"),z,N,j,ke)):"function"==e?k(Ce):"for"==e?k(D("form"),Se,N,j):"class"==e||u&&"interface"==t?(E.marked="keyword",k(D("form","class"==e?e:t),Ie,j)):"variable"==e?u&&"declare"==t?(E.marked="keyword",k(N)):u&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?k(Ge):"type"==t?k(Pe,L("operator"),ce,L(";")):k(D("form"),be,L("{"),D("}"),oe,j,j)):u&&"namespace"==t?(E.marked="keyword",k(D("form"),B,N,j)):u&&"abstract"==t?(E.marked="keyword",k(N)):k(D("stat"),J):"switch"==e?k(D("form"),z,L("{"),D("}","switch"),M,oe,j,j,I):"case"==e?k(B,L(":")):"default"==e?k(L(":")):"catch"==e?k(D("form"),R,F,N,j,I):"export"==e?k(D("stat"),Ne,j):"import"==e?k(D("stat"),Be,j):"async"==e?k(N):"@"==t?k(B,N):x(D("stat"),B,L(";"),j)}function F(e){if("("==e)return k(Re,L(")"))}function B(e,t){return q(e,t,!1)}function U(e,t){return q(e,t,!0)}function z(e){return"("!=e?x():k(D(")"),B,L(")"),j)}function q(e,t,n){if(E.state.fatArrowAt==E.stream.start){var r=n?Y:$;if("("==e)return k(R,D(")"),re(Re,")"),j,L("=>"),r,I);if("variable"==e)return x(R,be,L("=>"),r,I)}var i=n?G:W;return b.hasOwnProperty(e)?k(i):"function"==e?k(Ce,i):"class"==e||u&&"interface"==t?(E.marked="keyword",k(D("form"),Me,j)):"keyword c"==e||"async"==e?k(n?U:B):"("==e?k(D(")"),H,L(")"),j,i):"operator"==e||"spread"==e?k(n?U:B):"["==e?k(D("]"),We,j,i):"{"==e?ie(ee,"}",null,i):"quasi"==e?x(V,i):"new"==e?k(function(e){return function(t){return"."==t?k(e?X:Q):"variable"==t&&u?k(me,e?G:W):x(e?U:B)}}(n)):"import"==e?k(B):k()}function H(e){return e.match(/[;\}\)\],]/)?x():x(B)}function W(e,t){return","==e?k(H):G(e,t,!1)}function G(e,t,n){var r=0==n?W:G,i=0==n?B:U;return"=>"==e?k(R,n?Y:$,I):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?k(r):u&&"<"==t&&E.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?k(D(">"),re(ce,">"),j,r):"?"==t?k(B,L(":"),i):k(i):"quasi"==e?x(V,r):";"!=e?"("==e?ie(U,")","call",r):"."==e?k(Z,r):"["==e?k(D("]"),H,L("]"),j,r):u&&"as"==t?(E.marked="keyword",k(ce,r)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),k(i)):void 0:void 0}function V(e,t){return"quasi"!=e?x():"${"!=t.slice(t.length-2)?k(V):k(B,K)}function K(e){if("}"==e)return E.marked="string-2",E.state.tokenize=v,k(V)}function $(e){return y(E.stream,E.state),x("{"==e?N:B)}function Y(e){return y(E.stream,E.state),x("{"==e?N:U)}function Q(e,t){if("target"==t)return E.marked="keyword",k(W)}function X(e,t){if("target"==t)return E.marked="keyword",k(G)}function J(e){return":"==e?k(j,N):x(W,L(";"),j)}function Z(e){if("variable"==e)return E.marked="property",k()}function ee(e,t){return"async"==e?(E.marked="property",k(ee)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?k(te):(u&&E.state.fatArrowAt==E.stream.start&&(n=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+n[0].length),k(ne))):"number"==e||"string"==e?(E.marked=s?"property":E.style+" property",k(ne)):"jsonld-keyword"==e?k(ne):u&&T(t)?(E.marked="keyword",k(ee)):"["==e?k(B,ae,L("]"),ne):"spread"==e?k(U,ne):"*"==t?(E.marked="keyword",k(ee)):":"==e?x(ne):void 0;var n}function te(e){return"variable"!=e?x(ne):(E.marked="property",k(Ce))}function ne(e){return":"==e?k(U):"("==e?x(Ce):void 0}function re(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=E.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),k((function(n,r){return n==t||r==t?x():x(e)}),r)}return i==t||o==t?k():n&&n.indexOf(";")>-1?x(e):k(L(t))}return function(n,i){return n==t||i==t?k():x(e,r)}}function ie(e,t,n){for(var r=3;r"),ce):void 0}function de(e){if("=>"==e)return k(ce)}function fe(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",k(fe)):"?"==t||"number"==e||"string"==e?k(fe):":"==e?k(ce):"["==e?k(L("variable"),se,L("]"),fe):"("==e?x(Ae,fe):void 0}function pe(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?k(pe):":"==e?k(ce):"spread"==e?k(pe):x(ce)}function he(e,t){return"<"==t?k(D(">"),re(ce,">"),j,he):"|"==t||"."==e||"&"==t?k(ce):"["==e?k(ce,L("]"),he):"extends"==t||"implements"==t?(E.marked="keyword",k(ce)):"?"==t?k(ce,L(":"),ce):void 0}function me(e,t){if("<"==t)return k(D(">"),re(ce,">"),j,he)}function ge(){return x(ce,ve)}function ve(e,t){if("="==t)return k(ce)}function ye(e,t){return"enum"==t?(E.marked="keyword",k(Ge)):x(be,ae,Ee,xe)}function be(e,t){return u&&T(t)?(E.marked="keyword",k(be)):"variable"==e?(O(t),k()):"spread"==e?k(be):"["==e?ie(we,"]"):"{"==e?ie(_e,"}"):void 0}function _e(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?k(be):"}"==e?x():"["==e?k(B,L("]"),L(":"),_e):k(L(":"),be,Ee)):(O(t),k(Ee))}function we(){return x(be,Ee)}function Ee(e,t){if("="==t)return k(U)}function xe(e){if(","==e)return k(ye)}function ke(e,t){if("keyword b"==e&&"else"==t)return k(D("form","else"),N,j)}function Se(e,t){return"await"==t?k(Se):"("==e?k(D(")"),Oe,j):void 0}function Oe(e){return"var"==e?k(ye,Te):"variable"==e?k(Te):x(Te)}function Te(e,t){return")"==e?k():";"==e?k(Te):"in"==t||"of"==t?(E.marked="keyword",k(B,Te)):x(B,Te)}function Ce(e,t){return"*"==t?(E.marked="keyword",k(Ce)):"variable"==e?(O(t),k(Ce)):"("==e?k(R,D(")"),re(Re,")"),j,le,N,I):u&&"<"==t?k(D(">"),re(ge,">"),j,Ce):void 0}function Ae(e,t){return"*"==t?(E.marked="keyword",k(Ae)):"variable"==e?(O(t),k(Ae)):"("==e?k(R,D(")"),re(Re,")"),j,le,I):u&&"<"==t?k(D(">"),re(ge,">"),j,Ae):void 0}function Pe(e,t){return"keyword"==e||"variable"==e?(E.marked="type",k(Pe)):"<"==t?k(D(">"),re(ge,">"),j):void 0}function Re(e,t){return"@"==t&&k(B,Re),"spread"==e?k(Re):u&&T(t)?(E.marked="keyword",k(Re)):u&&"this"==e?k(ae,Ee):x(be,ae,Ee)}function Me(e,t){return"variable"==e?Ie(e,t):De(e,t)}function Ie(e,t){if("variable"==e)return O(t),k(De)}function De(e,t){return"<"==t?k(D(">"),re(ge,">"),j,De):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(E.marked="keyword"),k(u?ce:B,De)):"{"==e?k(D("}"),je,j):void 0}function je(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",k(je)):"variable"==e||"keyword"==E.style?(E.marked="property",k(u?Le:Ce,je)):"number"==e||"string"==e?k(u?Le:Ce,je):"["==e?k(B,ae,L("]"),u?Le:Ce,je):"*"==t?(E.marked="keyword",k(je)):u&&"("==e?x(Ae,je):";"==e||","==e?k(je):"}"==e?k():"@"==t?k(B,je):void 0}function Le(e,t){if("?"==t)return k(Le);if(":"==e)return k(ce,Ee);if("="==t)return k(U);var n=E.state.lexical.prev;return x(n&&"interface"==n.info?Ae:Ce)}function Ne(e,t){return"*"==t?(E.marked="keyword",k(He,L(";"))):"default"==t?(E.marked="keyword",k(B,L(";"))):"{"==e?k(re(Fe,"}"),He,L(";")):x(N)}function Fe(e,t){return"as"==t?(E.marked="keyword",k(L("variable"))):"variable"==e?x(U,Fe):void 0}function Be(e){return"string"==e?k():"("==e?x(B):x(Ue,ze,He)}function Ue(e,t){return"{"==e?ie(Ue,"}"):("variable"==e&&O(t),"*"==t&&(E.marked="keyword"),k(qe))}function ze(e){if(","==e)return k(Ue,ze)}function qe(e,t){if("as"==t)return E.marked="keyword",k(Ue)}function He(e,t){if("from"==t)return E.marked="keyword",k(B)}function We(e){return"]"==e?k():x(re(U,"]"))}function Ge(){return x(D("form"),be,L("{"),D("}"),re(Ve,"}"),j,j)}function Ve(){return x(be,Ee)}function Ke(e,t,n){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return I.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new _((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new C(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),y(e,t)),t.tokenize!=g&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var o=e.cc;for(E.state=e,E.stream=i,E.marked=null,E.cc=o,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?B:N)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return E.marked?E.marked:"variable"==n&&w(e,r)?"variable-2":t}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==g)return e.Pass;if(t.tokenize!=m)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==j)l=l.prev;else if(c!=ke)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==W||i==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,p=s==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==d&&"{"==s?l.indented:"form"==d?l.indented+o:"stat"==d?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||o:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Ke,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=U||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(4))},function(e,t,n){"use strict";var r=n(226),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g may have only one child element"),this.unlisten=r.listen((function(){e.setState({match:e.computeMatch(r.location.pathname)})}))},t.prototype.componentWillReceiveProps=function(e){i()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?l.a.Children.only(e):null},t}(l.a.Component);h.propTypes={history:c.a.object.isRequired,children:c.a.node},h.contextTypes={router:c.a.object},h.childContextTypes={router:c.a.object.isRequired},t.a=h},function(e,t,n){"use strict";var r=n(281),i=n.n(r),o={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=o[n]||(o[n]={});if(r[e])return r[e];var s=[],l={re:i()(e,s,t),keys:s};return a<1e4&&(r[e]=l,a++),l};t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof t&&(t={path:t});var r=t,i=r.path,o=r.exact,a=void 0!==o&&o,l=r.strict,u=void 0!==l&&l,c=r.sensitive,d=void 0!==c&&c;if(null==i)return n;var f=s(i,{end:a,strict:u,sensitive:d}),p=f.re,h=f.keys,m=p.exec(e);if(!m)return null;var g=m[0],v=m.slice(1),y=e===g;return a&&!y?null:{path:i,url:"/"===i&&""===g?"/":g,isExact:y,params:h.reduce((function(e,t,n){return e[t.name]=v[n],e}),{})}}},function(e,t,n){"use strict";var r=function(){this.disposed_=!1};r.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},t.a=r},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=0,o=e[n-r],a=e[n-r+1];t=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,t,n,i,o){for(var a,s=[t,n];s.length;)(n=s.pop())-(t=s.pop())<=i||(a=t+Math.ceil((n-t)/i/2)*i,r(e,a,t,n,o),s.push(t,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!h(e,t))return n;for(var i,o,a,s,l=[];t;){for(i=0,o=t.children.length;i=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,o,a,l,u,c,f,p,h,m,g,v,y;for(u=c=1/0,r=t;r<=n-t;r++)i=s(e,0,r,this.toBBox),o=s(e,r,n,this.toBBox),p=i,h=o,m=void 0,g=void 0,v=void 0,y=void 0,m=Math.max(p.minX,h.minX),g=Math.max(p.minY,h.minY),v=Math.min(p.maxX,h.maxX),y=Math.min(p.maxY,h.maxY),a=Math.max(0,v-m)*Math.max(0,y-g),l=d(i)+d(o),a=t;i--)o=e.children[i],l(c,e.leaf?a(o):o),d+=f(c);return d},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():a(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},function(e,t,n){"use strict";var r=n(24),i=n(2),o=n(8),a=n(105),s=n(57),l=n(64),u=n(65),c=n(13),d=function(e){function t(t,n){e.call(this),n&&!Array.isArray(t[0])?this.setFlatCoordinates(n,t):this.setCoordinates(t,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.appendPoint=function(e){this.flatCoordinates?Object(r.c)(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.changed()},t.prototype.clone=function(){return new t(this.flatCoordinates.slice(),this.layout)},t.prototype.closestPointXY=function(e,t,n,r){if(r>1;o{const n=t(),r=(0,i.currentBackend)(n.config);return e(a()),r.currentUser().then(t=>{t?(t.useOpenAuthoring&&e(c()),e(s(t))):e(u())}).catch(t=>{e(l(t)),e(f())})}},t.loginUser=function(e){return(t,n)=>{const r=n(),u=(0,i.currentBackend)(r.config);return t(a()),u.authenticate(e).then(e=>{e.useOpenAuthoring&&t(c()),t(s(e))}).catch(e=>{console.error(e),t(o({message:{details:e.message,key:"ui.toast.onFailToAuth"},kind:"warning",dismissAfter:8e3})),t(l(e))})}},t.logoutUser=f,t.LOGOUT=t.USE_OPEN_AUTHORING=t.AUTH_REQUEST_DONE=t.AUTH_FAILURE=t.AUTH_SUCCESS=t.AUTH_REQUEST=void 0;var r=n(138),i=n(139);const{notifSend:o}=r.actions;t.AUTH_REQUEST="AUTH_REQUEST";t.AUTH_SUCCESS="AUTH_SUCCESS";t.AUTH_FAILURE="AUTH_FAILURE";t.AUTH_REQUEST_DONE="AUTH_REQUEST_DONE";t.USE_OPEN_AUTHORING="USE_OPEN_AUTHORING";function a(){return{type:"AUTH_REQUEST"}}function s(e){return{type:"AUTH_SUCCESS",payload:e}}function l(e){return{type:"AUTH_FAILURE",error:"Failed to authenticate",payload:e}}function u(){return{type:"AUTH_REQUEST_DONE"}}function c(){return{type:"USE_OPEN_AUTHORING"}}function d(){return{type:"LOGOUT"}}function f(){return(e,t)=>{const n=t(),r=(0,i.currentBackend)(n.config);Promise.resolve(r.logout()).then(()=>{e({type:"LOGOUT"})})}}t.LOGOUT="LOGOUT"},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(307);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(735),i=n(68),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=r},function(e,t,n){"use strict";var r=n(167);e.exports=new r({include:[n(423)],implicit:[n(750),n(751)],explicit:[n(752),n(755),n(756),n(757)]})},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var r=n(753),i=n(754),o=n(425);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return U(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(39))},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(207).Buffer)},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),a="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,l=0;l=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(69))},function(e,t,n){(function(e){var r=n(67),i=n(847),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(this,n(123)(e))},function(e,t,n){var r=n(466),i=n(871),o=n(872),a=n(468),s=n(881),l=n(339),u=n(882),c=n(474),d=n(475),f=n(112),p=Math.max;e.exports=function(e,t,n,h,m,g,v,y){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var _=h?h.length:0;if(_||(t&=-97,h=m=void 0),v=void 0===v?v:p(f(v),0),y=void 0===y?y:f(y),_-=m?m.length:0,64&t){var w=h,E=m;h=m=void 0}var x=b?void 0:l(e),k=[e,t,n,h,m,w,E,g,v,y];if(x&&u(k,x),e=k[0],t=k[1],n=k[2],h=k[3],m=k[4],!(y=k[9]=void 0===k[9]?b?0:e.length:p(k[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||16==t?o(e,t,y):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,n,h);else var S=i(e,t,n);return d((x?r:c)(S,k),e,t)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length,i=0,o=[];++n{const a=o(),s=a.entryDraft,f=s.get("fieldsErrors"),p=(0,c.selectUnpublishedSlugs)(a,e.get("name")),m=(0,c.selectPublishedSlugs)(a,e.get("name")).concat(p);if(!(0,r.default)(a.editorialWorkflow.toJS(),"pages.ids",!1)&&n(A(a.collections)),!f.isEmpty()){return f.some(e=>e.some(e=>e.type&&e.type===y.default.PRESENCE))&&n(x({message:{key:"ui.toast.missingRequiredField"},kind:"danger",dismissAfter:8e3})),Promise.reject()}const g=(0,u.currentBackend)(a.config),v=(0,i.default)(),b=s.get("entry"),_=await(0,h.getMediaAssets)({getState:o,dispatch:n,collection:e,entry:b}),w=(0,d.selectFields)(e,b.get("slug")),E=(0,l.serializeValues)(b.get("data"),w),k=b.set("data",E),C=s.set("entry",k);n(S(e,k,v));const P=t?g.persistUnpublishedEntry:g.persistEntry;try{const t=await P.call(g,{config:a.config,collection:e,entryDraft:C,assetProxies:_,usedSlugs:m});n(x({message:{key:"ui.toast.entrySaved"},kind:"success",dismissAfter:4e3})),n(O(e,v,t))}catch(e){return n(x({message:{key:"ui.toast.onFailToPersist",details:e},kind:"danger",dismissAfter:8e3})),Promise.reject(n(T(e,v)))}}},t.updateUnpublishedEntryStatus=function(e,t,n,r){return(o,s)=>{if(n===r)return;const l=s(),c=(0,u.currentBackend)(l.config),d=(0,i.default)();o(function(e,t,n,r,i){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST",payload:{collection:e,slug:t,oldStatus:n,newStatus:r},optimist:{type:a.BEGIN,id:i}}}(e,t,n,r,d)),c.updateUnpublishedEntryStatus(e,t,r).then(()=>{o(x({message:{key:"ui.toast.entryUpdated"},kind:"success",dismissAfter:4e3})),o(function(e,t,n,r,i){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS",payload:{collection:e,slug:t,oldStatus:n,newStatus:r},optimist:{type:a.COMMIT,id:i}}}(e,t,n,r,d))}).catch(n=>{o(x({message:{key:"ui.toast.onFailToUpdateStatus",details:n},kind:"danger",dismissAfter:8e3})),o(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE",payload:{collection:e,slug:t},optimist:{type:a.REVERT,id:n}}}(e,t,d))})}},t.deleteUnpublishedEntry=function(e,t){return(n,r)=>{const o=r(),s=(0,u.currentBackend)(o.config),l=(0,i.default)();return n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_DELETE_REQUEST",payload:{collection:e,slug:t},optimist:{type:a.BEGIN,id:n}}}(e,t,l)),s.deleteUnpublishedEntry(e,t).then(()=>{n(x({message:{key:"ui.toast.onDeleteUnpublishedChanges"},kind:"success",dismissAfter:4e3})),n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_DELETE_SUCCESS",payload:{collection:e,slug:t},optimist:{type:a.COMMIT,id:n}}}(e,t,l))}).catch(r=>{n(x({message:{key:"ui.toast.onDeleteUnpublishedChanges",details:r},kind:"danger",dismissAfter:8e3})),n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_DELETE_FAILURE",payload:{collection:e,slug:t},optimist:{type:a.REVERT,id:n}}}(e,t,l))})}},t.publishUnpublishedEntry=function(e,t){return(n,r)=>{const o=r(),s=o.collections,l=(0,u.currentBackend)(o.config),d=(0,i.default)(),f=(0,c.selectUnpublishedEntry)(o,e,t);return n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_PUBLISH_REQUEST",payload:{collection:e,slug:t},optimist:{type:a.BEGIN,id:n}}}(e,t,d)),l.publishUnpublishedEntry(f).then(()=>(n((0,v.loadMedia)()),n(x({message:{key:"ui.toast.entryPublished"},kind:"success",dismissAfter:4e3})),n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_PUBLISH_SUCCESS",payload:{collection:e,slug:t},optimist:{type:a.COMMIT,id:n}}}(e,t,d)),n((0,h.loadEntry)(s.get(e),t)))).catch(r=>{n(x({message:{key:"ui.toast.onFailToPublishEntry",details:r},kind:"danger",dismissAfter:8e3})),n(function(e,t,n){return{type:"UNPUBLISHED_ENTRY_PUBLISH_FAILURE",payload:{collection:e,slug:t},optimist:{type:a.REVERT,id:n}}}(e,t,d))})}},t.unpublishPublishedEntry=function(e,t){return(n,r)=>{const o=r(),a=(0,u.currentBackend)(o.config),l=(0,i.default)(),d=(0,c.selectEntry)(o,e.get("name"),t),p=(0,s.Map)().set("entry",d);return n(S(e,d,l)),a.deleteEntry(o,e,t).then(()=>a.persistEntry({config:o.config,collection:e,entryDraft:p,assetProxies:[],usedSlugs:(0,s.List)(),status:f.status.get("PENDING_PUBLISH")})).then(()=>{n(O(e,l,t)),n((0,h.entryDeleted)(e,t)),n(C(e,t)),n(x({message:{key:"ui.toast.entryUnpublished"},kind:"success",dismissAfter:4e3}))}).catch(e=>{n(x({message:{key:"ui.toast.onFailToUnpublishEntry",details:e},kind:"danger",dismissAfter:8e3})),n(T(e,l))})}},t.UNPUBLISHED_ENTRY_DELETE_FAILURE=t.UNPUBLISHED_ENTRY_DELETE_SUCCESS=t.UNPUBLISHED_ENTRY_DELETE_REQUEST=t.UNPUBLISHED_ENTRY_PUBLISH_FAILURE=t.UNPUBLISHED_ENTRY_PUBLISH_SUCCESS=t.UNPUBLISHED_ENTRY_PUBLISH_REQUEST=t.UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE=t.UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS=t.UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST=t.UNPUBLISHED_ENTRY_PERSIST_FAILURE=t.UNPUBLISHED_ENTRY_PERSIST_SUCCESS=t.UNPUBLISHED_ENTRY_PERSIST_REQUEST=t.UNPUBLISHED_ENTRIES_FAILURE=t.UNPUBLISHED_ENTRIES_SUCCESS=t.UNPUBLISHED_ENTRIES_REQUEST=t.UNPUBLISHED_ENTRY_REDIRECT=t.UNPUBLISHED_ENTRY_SUCCESS=t.UNPUBLISHED_ENTRY_REQUEST=void 0;var r=b(n(94)),i=b(n(128)),o=n(138),a=n(411),s=n(3),l=n(455),u=n(139),c=n(85),d=n(96),f=n(95),p=n(41),h=n(125),m=n(168),g=n(147),v=n(129),y=b(n(347));function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t{const o=i(),a=(0,u.currentBackend)(o.config);if(!(0,r.default)(o.editorialWorkflow.toJS(),"pages.ids",!1))try{const{entries:e,pagination:t}=await a.unpublishedEntries(o.collections);n(k(e,t))}catch(e){}n(function(e,t){return{type:"UNPUBLISHED_ENTRY_REQUEST",payload:{collection:e.get("name"),slug:t}}}(e,t));try{const r=await a.unpublishedEntry(e,t),o=await Promise.all(r.mediaFiles.map(({url:e,file:t,path:n})=>(0,m.createAssetProxy)({path:n,url:e,file:t})));n((0,g.addAssets)(o));let s=r.mediaFiles.map(e=>w({},e,{draft:!0}));if(!e.has("media_folder")){const e=i().mediaLibrary.get("files")||[];s=s.concat(e)}n(function(e,t){return{type:"UNPUBLISHED_ENTRY_SUCCESS",payload:{collection:e.get("name"),entry:t}}}(e,w({},r,{mediaFiles:s}))),n((0,h.createDraftFromEntry)(r))}catch(r){r.name===p.EDITORIAL_WORKFLOW_ERROR&&r.notUnderEditorialWorkflow?(n(function(e,t){return{type:"UNPUBLISHED_ENTRY_REDIRECT",payload:{collection:e.get("name"),slug:t}}}(e,t)),n((0,h.loadEntry)(e,t))):n(x({message:{key:"ui.toast.onFailToLoadEntries",details:r},kind:"danger",dismissAfter:8e3}))}}}function A(e){return(t,n)=>{const i=n(),o=(0,u.currentBackend)(i.config),a=(0,r.default)(i.editorialWorkflow.toJS(),"pages.ids",!1);i.config.get("publish_mode")!==f.EDITORIAL_WORKFLOW||a||(t({type:"UNPUBLISHED_ENTRIES_REQUEST"}),o.unpublishedEntries(e).then(e=>t(k(e.entries,e.pagination))).catch(e=>{t(x({message:{key:"ui.toast.onFailToLoadEntries",details:e},kind:"danger",dismissAfter:8e3})),t(function(e){return{type:"UNPUBLISHED_ENTRIES_FAILURE",error:"Failed to load entries",payload:e}}(e)),Promise.reject(e)}))}}t.UNPUBLISHED_ENTRY_DELETE_FAILURE="UNPUBLISHED_ENTRY_DELETE_FAILURE"},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var r in n=n||{},t)t.hasOwnProperty(r)&&(n[r]||(e[r]=t[r]))}},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l=t||n<0||g&&e-h>=c}function w(){var e=i();if(_(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-p);return g?s(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&l?y(e):(l=u=void 0,d)}function x(){var e=i(),n=_(e);if(l=arguments,u=this,p=e,n){if(void 0===f)return b(p);if(g)return clearTimeout(f),f=setTimeout(w,t),y(p)}return void 0===f&&(f=setTimeout(w,t)),d}return t=o(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,l=p=u=f=void 0},x.flush=function(){return void 0===f?d:E(i())},x}},function(e,t,n){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?w(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?w("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?w(null,n):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=k),w("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),w("property","word")):w(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),w("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?w("variable-2","variable-definition"):w("variable-2","variable")):e.match(/^\w+-/)?w("meta","meta"):void 0}function x(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),w("string","string")}}function k(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=x(")"),w(null,"(")}function S(e,t,n){this.type=e,this.indent=t,this.prev=n}function O(e,t,n,r){return e.context=new S(n,t.indentation()+(!1===r?0:a),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function C(e,t,n){return R[n.context.type](e,t,n)}function A(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return C(e,t,n)}function P(e){var t=e.current().toLowerCase();o=v.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var R={top:function(e,t,n){if("{"==e)return O(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(_&&/@component/i.test(e))return O(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return O(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return O(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return O(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return O(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return O(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(o="property","maybeprop"):p.hasOwnProperty(r)?(o="string-2","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?R.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?O(n,t,"prop"):C(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&y)return O(n,t,"propBlock");if("}"==e||"{"==e)return A(e,t,n);if("("==e)return O(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)P(t);else if("interpolation"==e)return O(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?A(e,t,n):")"==e?T(n):"("==e?O(n,t,"parens"):"interpolation"==e?O(n,t,"interpolation"):("word"==e&&P(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):C(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):R.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return O(n,t,"atBlock_parens");if("}"==e||";"==e)return A(e,t,n);if("{"==e)return T(n)&&O(n,t,y?"block":"top");if("interpolation"==e)return O(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":u.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?"string-2":v.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?A(e,t,n):"{"==e?T(n)&&O(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?A(e,t,n,2):R.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?O(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):C(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(o="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?O(n,t,"top"):C(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?A(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?A(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new S(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||E)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=R[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(l),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),f=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(f),h=t(["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=t(g),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),_=n.concat(i).concat(a).concat(l).concat(c).concat(f).concat(g).concat(y);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})}(n(4))},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},u=i.htmlMode?t:n;for(var c in u)l[c]=u[c];for(var c in i)l[c]=i[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=v,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",E):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,n)):(a="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",_):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",_(e,0,n)):(a="error",w)}function _(e,t,n){return"endTag"!=e?(a="error",_):(m(n),v)}function w(e,t,n){return a="error",_(e,0,n)}function E(e,t,n){if("word"==e)return a="attribute",x;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new h(n,r,i==n.indented)),v}return a="error",E}function x(e,t,n){return"equals"==e?k:(l.allowMissing||(a="error"),E(e,0,n))}function k(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(a="string",E):(a="error",E(e,0,n))}function S(e,t,n){return"string"==e?S:E(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==k&&(e.state=E)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(4))},function(e,t,n){!function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)2&&c.token&&"string"!=typeof c.token){r.pending=[];for(var p=2;p-1)return e.Pass;var a=r.indent.length-1,s=t[r.state];e:for(;;){for(var l=0;l-1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(101),i=n(68),o=n(199);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{let s;const u=function(e,t){if(!e.startsWith("fields."))return;const n=e.substring("fields.".length);return t.getIn(c(n),"")}(o,r);if(u)s=u;else{if(l[o]&&!t)return a=!0,"";s=l[o]?l[o](t):"slug"===o?n:r.getIn(c(o),"")}return i?i(s):s});if(s&&a){const e=new Error;throw e.name="SLUG_MISSING_REQUIRED_DATE",e}return d},t.extractTemplateVars=function(e){const t=RegExp(u,"g"),n=RegExp("[^}{]+","g");return(e.match(t)||[]).map(e=>{const t=e.match(n);return t?t[0]:""})},t.keyToPathArray=t.SLUG_MISSING_REQUIRED_DATE=t.dateParsers=void 0;var r,i=(r=n(122))&&r.__esModule?r:{default:r},o=n(3),a=n(96);function s(e){return"0".concat(e).slice(-2)}const l={year:e=>"".concat(e.getUTCFullYear()),month:e=>s(e.getUTCMonth()+1),day:e=>s(e.getUTCDate()),hour:e=>s(e.getUTCHours()),minute:e=>s(e.getUTCMinutes()),second:e=>s(e.getUTCSeconds())};t.dateParsers=l;t.SLUG_MISSING_REQUIRED_DATE="SLUG_MISSING_REQUIRED_DATE";const u="{{(".concat("[^}{]+",")}}"),c=e=>{if(!e)return[];const t=[],n=e.split("");let r,i=[];for(;r=n.shift();)["[","]","."].includes(r)?(i.length>0&&t.push(i.join("")),i=[]):i.push(r);return i.length>0&&t.push(i.join("")),t};t.keyToPathArray=c},function(e,t,n){var r=n(418);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(453),i=n(869),o=n(126);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(255),i=n(75);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},function(e,t,n){var r=n(75),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){var r=n(202),i=n(417),o=n(308);e.exports=function(e){return o(i(e,void 0,r),e+"")}},function(e,t,n){var r=n(903),i=n(905);e.exports=function(e,t,n){return r(i,e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectMediaFiles=h,t.selectMediaFileByPath=function(e,t){return h(e).find(e=>e.path===t)},t.selectMediaDisplayURL=function(e,t){return e.mediaLibrary.getIn(["displayURLs",t],(0,i.Map)())},t.default=void 0;var r,i=n(3),o=(r=n(128))&&r.__esModule?r:{default:r},a=n(129),s=n(170),l=n(85),u=n(210);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t(0,u.dirname)(e.path)===l).map(e=>d({key:e.id},e))}else c=n.get("files")||[];return c}var m=(e=(0,i.Map)(p),t)=>{switch(t.type){case a.MEDIA_LIBRARY_CREATE:return e.withMutations(e=>{e.set("externalLibrary",t.payload),e.set("showMediaButton",t.payload.enableStandalone())});case a.MEDIA_LIBRARY_OPEN:{const{controlID:n,forImage:r,privateUpload:o,config:a,field:s}=t.payload,l=a||(0,i.Map)();return e.get("privateUpload")!==o?(0,i.Map)({isVisible:!0,forImage:r,controlID:n,canInsert:!!n,privateUpload:o,config:l,controlMedia:(0,i.Map)(),field:s}):e.withMutations(e=>{e.set("isVisible",!0),e.set("forImage",r),e.set("controlID",n),e.set("canInsert",!!n),e.set("privateUpload",o),e.set("config",l),e.set("field",s)})}case a.MEDIA_LIBRARY_CLOSE:return e.set("isVisible",!1);case a.MEDIA_INSERT:{const{mediaPath:n}=t.payload,r=e.get("controlID");return e.withMutations(e=>{e.setIn(["controlMedia",r],n)})}case a.MEDIA_REMOVE_INSERTED:{const n=t.payload.controlID;return e.setIn(["controlMedia",n],"")}case a.MEDIA_LOAD_REQUEST:return e.withMutations(e=>{e.set("isLoading",!0),e.set("isPaginating",t.payload.page>1)});case a.MEDIA_LOAD_SUCCESS:{const{files:n=[],page:r,canPaginate:i,dynamicSearch:a,dynamicSearchQuery:s,privateUpload:l}=t.payload;if(e.get("privateUpload")!==l)return e;const u=n.map(e=>d({},e,{key:(0,o.default)()}));return e.withMutations(e=>{if(e.set("isLoading",!1),e.set("isPaginating",!1),e.set("page",r),e.set("hasNextPage",i&&n.length>0),e.set("dynamicSearch",a),e.set("dynamicSearchQuery",s),e.set("dynamicSearchActive",!!s),r&&r>1){const t=e.get("files").concat(u);e.set("files",t)}else e.set("files",u)})}case a.MEDIA_LOAD_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isLoading",!1);case a.MEDIA_PERSIST_REQUEST:return e.set("isPersisting",!0);case a.MEDIA_PERSIST_SUCCESS:{const{file:n,privateUpload:r}=t.payload;return e.get("privateUpload")!==r?e:e.withMutations(e=>{const t=[d({},n,{key:(0,o.default)()}),...e.get("files")];e.set("files",t),e.set("isPersisting",!1)})}case a.MEDIA_PERSIST_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isPersisting",!1);case a.MEDIA_DELETE_REQUEST:return e.set("isDeleting",!0);case a.MEDIA_DELETE_SUCCESS:{const{id:n,key:r,privateUpload:i}=t.payload.file;return e.get("privateUpload")!==i?e:e.withMutations(e=>{const t=e.get("files").filter(e=>r?e.key!==r:e.id!==n);e.set("files",t),e.deleteIn(["displayURLs",n]),e.set("isDeleting",!1)})}case a.MEDIA_DELETE_FAILURE:return e.get("privateUpload")!==t.payload.privateUpload?e:e.set("isDeleting",!1);case a.MEDIA_DISPLAY_URL_REQUEST:return e.setIn(["displayURLs",t.payload.key,"isFetching"],!0);case a.MEDIA_DISPLAY_URL_SUCCESS:{const n=["displayURLs",t.payload.key];return e.setIn([...n,"isFetching"],!1).setIn([...n,"url"],t.payload.url)}case a.MEDIA_DISPLAY_URL_FAILURE:{const n=["displayURLs",t.payload.key];return e.setIn([...n,"isFetching"],!1).setIn([...n,"err"],t.payload.err||!0).deleteIn([...n,"url"])}default:return e}};t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchingEntries=a,t.searchSuccess=s,t.searchFailure=l,t.querying=u,t.querySuccess=c,t.queryFailure=d,t.clearSearch=function(){return{type:"SEARCH_CLEAR"}},t.searchEntries=function(e,t=0){return(n,u)=>{n(a(e));const c=u(),d=(0,r.currentBackend)(c.config),f=c.collections.keySeq().toArray().filter(e=>(0,o.selectIntegration)(c,e,"search")),p=(0,o.selectIntegration)(c,f[0],"search");return(p?(0,i.getIntegrationProvider)(c.integrations,d.getToken,p).search(f,e,t):d.search(c.collections.valueSeq().toArray(),e)).then(t=>n(s(e,t.entries,t.pagination)),t=>n(l(e,t)))}},t.query=function(e,t,n,a){return(s,l)=>{s(u(e,t,n,a));const f=l(),p=(0,r.currentBackend)(f.config),h=(0,o.selectIntegration)(f,t,"search"),m=f.collections.find(e=>e.get("name")===t);return(h?(0,i.getIntegrationProvider)(f.integrations,p.getToken,h).searchBy(n.map(e=>"data.".concat(e)),t,a):p.query(m,n,a)).then(r=>s(c(e,t,n,a,r)),r=>s(d(e,t,n,a,r)))}},t.SEARCH_CLEAR=t.QUERY_FAILURE=t.QUERY_SUCCESS=t.QUERY_REQUEST=t.SEARCH_ENTRIES_FAILURE=t.SEARCH_ENTRIES_SUCCESS=t.SEARCH_ENTRIES_REQUEST=void 0;var r=n(139),i=n(333),o=n(85);t.SEARCH_ENTRIES_REQUEST="SEARCH_ENTRIES_REQUEST";t.SEARCH_ENTRIES_SUCCESS="SEARCH_ENTRIES_SUCCESS";t.SEARCH_ENTRIES_FAILURE="SEARCH_ENTRIES_FAILURE";t.QUERY_REQUEST="INIT_QUERY";t.QUERY_SUCCESS="QUERY_OK";t.QUERY_FAILURE="QUERY_ERROR";function a(e){return{type:"SEARCH_ENTRIES_REQUEST",payload:{searchTerm:e}}}function s(e,t,n){return{type:"SEARCH_ENTRIES_SUCCESS",payload:{searchTerm:e,entries:t,page:n}}}function l(e,t){return{type:"SEARCH_ENTRIES_FAILURE",payload:{searchTerm:e,error:t}}}function u(e,t,n,r){return{type:"INIT_QUERY",payload:{namespace:e,collection:t,searchFields:n,searchTerm:r}}}function c(e,t,n,r,i){return{type:"QUERY_OK",payload:{namespace:e,collection:t,searchFields:n,searchTerm:r,response:i}}}function d(e,t,n,r,i){return{type:"QUERY_ERROR",payload:{namespace:e,collection:t,searchFields:n,searchTerm:r,error:i}}}t.SEARCH_CLEAR="SEARCH_CLEAR"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.selectIsLoadingAsset=void 0;var r=n(3),i=n(147);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;tObject.values(e.toJS()).some(e=>e.isLoading);var l=(e=(0,r.fromJS)({}),t)=>{switch(t.type){case i.ADD_ASSETS:{const n=t.payload;let r=e;return n.forEach(e=>{r=r.set(e.path,{asset:e,isLoading:!1,error:null})}),r}case i.ADD_ASSET:{const n=t.payload;return e.set(n.path,{asset:n,isLoading:!1,error:null})}case i.REMOVE_ASSET:{const n=t.payload;return e.delete(n)}case i.LOAD_ASSET_REQUEST:{const{path:n}=t.payload;return e.set(n,a({},e.get(n),{isLoading:!0}))}case i.LOAD_ASSET_SUCCESS:{const{path:n}=t.payload;return e.set(n,a({},e.get(n),{isLoading:!1,error:null}))}case i.LOAD_ASSET_FAILURE:{const{path:n,error:r}=t.payload;return e.set(n,a({},e.get(n),{isLoading:!1,error:r}))}default:return e}};t.default=l},function(e,t,n){"use strict";var r=TypeError,i=Object.getOwnPropertyDescriptor;if(i)try{i({},"")}catch(e){i=null}var o=function(){throw new r},a=i?function(){try{return arguments.callee,o}catch(e){try{return i(arguments,"callee").get}catch(e){return o}}}():o,s=n(957)(),l=Object.getPrototypeOf||function(e){return e.__proto__},u=void 0,c="undefined"==typeof Uint8Array?void 0:l(Uint8Array),d={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?l([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":u&&s&&Symbol.asyncIterator?u[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?l(l([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s?l((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s?l((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?l(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:void 0,"%SymbolPrototype%":s?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":a,"%TypedArray%":c,"%TypedArrayPrototype%":c?c.prototype:void 0,"%TypeError%":r,"%TypeErrorPrototype%":r.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},f=n(350).call(Function.call,String.prototype.replace),p=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h=/\\(\\)?/g,m=function(e){var t=[];return f(e,p,(function(e,n,r,i){t[t.length]=r?f(i,h,"$1"):n||e})),t},g=function(e,t){if(!(e in d))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===d[e]&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return d[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=m(e),o=g("%"+(n.length>0?n[0]:"")+"%",t),a=1;a=n.length){var s=i(o,n[a]);if(!(t||n[a]in o))throw new r("base intrinsic for "+e+" exists, but the property is not available.");o=s?s.get||s.value:o[n[a]]}else o=o[n[a]];return o}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const t=(0,i.default)().use(a.default,{fences:!0,commonmark:!0}).use(T,{inlineTokenizers:["url"]}).use(b.remarkParseShortcodes,{plugins:(0,k.getEditorComponents)()}).use(E.default).parse(e);return(0,i.default)().use(y.default).runSync(t)};function T({inlineTokenizers:e}){e&&e.forEach(e=>{delete this.Parser.prototype.inlineTokenizers[e]})}t.markdownToRemark=O;const C=e=>{const t=e||(0,o.default)("root",[(0,o.default)("paragraph",[(0,o.default)("text","")])]),n=(0,i.default)().use(_.default).use(w.default).runSync(t),a=(0,i.default)().use(s.default,{commonmark:!0,fences:!0,listItemIndent:"1",bullet:"*",emphasis:"*",strong:"*",rule:"-"}).use((function(){this.Compiler.prototype.visitors.text=e=>e.value})).use((0,b.createRemarkShortcodeStringifier)({plugins:(0,k.getEditorComponents)()})).stringify(n).replace(/\r?/g,"");return(0,r.default)(a)};t.remarkToMarkdown=C;t.markdownToHtml=(e,{getAsset:t,resolveWidget:n}={})=>{const r=O(e),o=(0,i.default)().use(f.default,{plugins:(0,k.getEditorComponents)(),getAsset:t,resolveWidget:n}).use(l.default,{allowDangerousHTML:!0}).runSync(r);return(0,i.default)().use(u.default,{allowDangerousHTML:!0,allowDangerousCharacters:!0,closeSelfClosing:!0,entities:{useNamedReferences:!0}}).stringify(o)};t.htmlToSlate=e=>{const t=(0,i.default)().use(c.default,{fragment:!0}).parse(e),n=(0,i.default)().use(p.default).use(d.default,{minify:!1}).runSync(t);return(0,i.default)().use(h.default).use(m.default).use(g.default).use(v.default).runSync(n)};t.markdownToSlate=(e,{voidCodeBlock:t}={})=>{const n=O(e);return(0,i.default)().use(g.default).use(v.default,{voidCodeBlock:t}).runSync(n)};t.slateToMarkdown=(e,{voidCodeBlock:t}={})=>{const n=(0,x.default)(e,{voidCodeBlock:t});return C(n)}},function(e,t,n){"use strict";var r=n(567),i=n(1206),o=n(220),a=n(568),s=n(569),l=n(1207);e.exports=function(e,t){var n,o,a={};t||(t={});for(o in f)n=t[o],a[o]=null==n?f[o]:n;(a.position.indent||a.position.start)&&(a.indent=a.position.indent||[],a.position=a.position.start);return function(e,t){var n,o,a,f,b,_,w,E,x,k,S,O,T,C,A,P,R,M,I,D=t.additional,j=t.nonTerminated,L=t.text,N=t.reference,F=t.warning,B=t.textContext,U=t.referenceContext,z=t.warningContext,q=t.position,H=t.indent||[],W=e.length,G=0,V=-1,K=q.column||1,$=q.line||1,Y="",Q=[];"string"==typeof D&&(D=D.charCodeAt(0));P=J(),E=F?function(e,t){var n=J();n.column+=t,n.offset+=t,F.call(z,v[e],n,e)}:d,G--,W++;for(;++G=55296&&X<=57343||X>1114111?(E(7,M),_=c(65533)):_ in i?(E(6,M),_=i[_]):(k="",y(_)&&E(6,M),_>65535&&(k+=c((_-=65536)>>>10|55296),_=56320|1023&_),_=k+c(_))):C!==p&&E(4,M)),_?(Z(),P=J(),G=I-1,K+=I-T+1,Q.push(_),(R=J()).offset++,N&&N.call(U,_,{start:P,end:R},e.slice(T-1,I)),P=R):(f=e.slice(T-1,I),Y+=f,K+=f.length,G=I-1)}else 10===b&&($++,V++,K=0),b==b?(Y+=c(b),K++):Z();var X;return Q.join("");function J(){return{line:$,column:K,offset:G+(q.offset||0)}}function Z(){Y&&(Q.push(Y),L&&L.call(B,Y,{start:P,end:J()}),Y="")}}(e,a)};var u={}.hasOwnProperty,c=String.fromCharCode,d=Function.prototype,f={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},p="named",h="hexadecimal",m={hexadecimal:16,decimal:10},g={};g.named=s,g.decimal=o,g[h]=a;var v={};function y(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}v[1]="Named character references must be terminated by a semicolon",v[2]="Numeric character references must be terminated by a semicolon",v[3]="Named character references cannot be empty",v[4]="Numeric character references cannot be empty",v[5]="Named character references must be known",v[6]="Numeric character references cannot be disallowed",v[7]="Numeric character references cannot be outside the permissible Unicode range"},function(e,t,n){"use strict";e.exports=function(e){var t=String(e),n=t.length;for(;"\n"===t.charAt(--n););return t.slice(0,n+1)}},function(e,t,n){"use strict";var r={};function i(e,t,n){var o,a,s,l,u,c="";for("string"!=typeof t&&(n=t,t=i.defaultChars),void 0===n&&(n=!0),u=function(e){var t,n,i=r[e];if(i)return i;for(i=r[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&l<=57343){c+=encodeURIComponent(e[o]+e[o+1]),o++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[o]);return c}i.defaultChars=";/?:@&=+$,-_.!~*'()#",i.componentChars="-_.!~*'()",e.exports=i},function(e,t,n){"use strict";var r=0;function i(){return Math.pow(2,++r)}t.boolean=i(),t.booleanish=i(),t.overloadedBoolean=i(),t.number=i(),t.spaceSeparated=i(),t.commaSeparated=i(),t.commaOrSpaceSeparated=i()},function(e,t,n){"use strict";var r=n(591),i=n(593),o=n(596),a=n(597),s=n(600),l=n(1320);e.exports=r([o,i,a,s,l])},function(e,t,n){"use strict";const r=n(1340),i=n(378),o=n(1341),a=n(379),s=i.CODE_POINTS,l=i.CODE_POINT_SEQUENCES,u={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},c="DATA_STATE";function d(e){return e===s.SPACE||e===s.LINE_FEED||e===s.TABULATION||e===s.FORM_FEED}function f(e){return e>=s.DIGIT_0&&e<=s.DIGIT_9}function p(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_Z}function h(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_Z}function m(e){return h(e)||p(e)}function g(e){return m(e)||f(e)}function v(e){return e>=s.LATIN_CAPITAL_A&&e<=s.LATIN_CAPITAL_F}function y(e){return e>=s.LATIN_SMALL_A&&e<=s.LATIN_SMALL_F}function b(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function w(e){return String.fromCharCode(b(e))}function E(e,t){const n=o[++e];let r=++e,i=r+n-1;for(;r<=i;){const e=r+i>>>1,a=o[e];if(at))return o[e+n];i=e-1}}return-1}class x{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=c,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e)}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t)}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:x.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(e){this.state=e,this._unconsume()}_consumeSequenceIfMatch(e,t,n){let r=0,i=!0;const o=e.length;let a=0,l=t,u=void 0;for(;a0&&(l=this._consume(),r++),l===s.EOF){i=!1;break}if(u=e[a],l!==u&&(n||l!==b(u))){i=!1;break}}if(!i)for(;r--;)this._unconsume();return i}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let e=0;e0&&this._err(a.endTagWithAttributes),e.selfClosing&&this._err(a.endTagWithTrailingSolidus)),this.tokenQueue.push(e)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t)}_emitCodePoint(e){let t=x.CHARACTER_TOKEN;d(e)?t=x.WHITESPACE_CHARACTER_TOKEN:e===s.NULL&&(t=x.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,_(e))}_emitSeveralCodePoints(e){for(let t=0;t-1;){const e=o[r],i=e<7;i&&1&e&&(t=2&e?[o[++r],o[++r]]:[o[++r]],n=0);const a=this._consume();if(this.tempBuff.push(a),n++,a===s.EOF)break;r=i?4&e?E(r,a):-1:a===e?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return"ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===s.EQUALS_SIGN||g(e)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):m(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"))}SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE(e){m(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("")):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(i.REPLACEMENT_CHARACTER)):e===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e))}SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE(e){e===s.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):p(e)?(this.tempBuff.push(b(e)),this._emitCodePoint(e)):h(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE")}BEFORE_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===s.EQUALS_SIGN?(this._err(a.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}ATTRIBUTE_NAME_STATE(e){d(e)||e===s.SOLIDUS||e===s.GREATER_THAN_SIGN||e===s.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===s.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):p(e)?this.currentAttr.name+=w(e):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN?(this._err(a.unexpectedCharacterInAttributeName),this.currentAttr.name+=_(e)):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.name+=i.REPLACEMENT_CHARACTER):this.currentAttr.name+=_(e)}AFTER_ATTRIBUTE_NAME_STATE(e){d(e)||(e===s.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===s.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")))}BEFORE_ATTRIBUTE_VALUE_STATE(e){d(e)||(e===s.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===s.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.missingAttributeValue),this.state=c,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"))}ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}ATTRIBUTE_VALUE_UNQUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=i.REPLACEMENT_CHARACTER):e===s.QUOTATION_MARK||e===s.APOSTROPHE||e===s.LESS_THAN_SIGN||e===s.EQUALS_SIGN||e===s.GRAVE_ACCENT?(this._err(a.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=_(e)):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=_(e)}AFTER_ATTRIBUTE_VALUE_QUOTED_STATE(e){d(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===s.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===s.GREATER_THAN_SIGN?(this._leaveAttrValue(c),this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.missingWhitespaceBetweenAttributes),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}SELF_CLOSING_START_TAG_STATE(e){e===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.unexpectedSolidusInTag),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"))}BOGUS_COMMENT_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):this.currentToken.data+=_(e)}MARKUP_DECLARATION_OPEN_STATE(e){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(l.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(a.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(a.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"))}COMMENT_START_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=c,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE")}COMMENT_START_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=_(e)}COMMENT_LESS_THAN_SIGN_STATE(e){e===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE")}COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE(e){e!==s.GREATER_THAN_SIGN&&e!==s.EOF&&this._err(a.nestedComment),this._reconsumeInState("COMMENT_END_STATE")}COMMENT_END_DASH_STATE(e){e===s.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_STATE(e){e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===s.HYPHEN_MINUS?this.currentToken.data+="-":e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"))}COMMENT_END_BANG_STATE(e){e===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.incorrectlyClosedComment),this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"))}DOCTYPE_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingWhitespaceBeforeDoctypeName),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"))}BEFORE_DOCTYPE_NAME_STATE(e){d(e)||(p(e)?(this._createDoctypeToken(w(e)),this.state="DOCTYPE_NAME_STATE"):e===s.NULL?(this._err(a.unexpectedNullCharacter),this._createDoctypeToken(i.REPLACEMENT_CHARACTER),this.state="DOCTYPE_NAME_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(_(e)),this.state="DOCTYPE_NAME_STATE"))}DOCTYPE_NAME_STATE(e){d(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):p(e)?this.currentToken.name+=w(e):e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.name+=i.REPLACEMENT_CHARACTER):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=_(e)}AFTER_DOCTYPE_NAME_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(l.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(a.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=_(e)}AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){d(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===s.GREATER_THAN_SIGN?(this.state=c,this._emitCurrentToken()):e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE(e){d(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"))}BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===s.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=c,this._emitCurrentToken()):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===s.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===s.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=i.REPLACEMENT_CHARACTER):e===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=_(e)}AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){d(e)||(e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState("BOGUS_DOCTYPE_STATE")))}BOGUS_DOCTYPE_STATE(e){e===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=c):e===s.NULL?this._err(a.unexpectedNullCharacter):e===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}CDATA_SECTION_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===s.EOF?(this._err(a.eofInCdata),this._emitEOFToken()):this._emitCodePoint(e)}CDATA_SECTION_BRACKET_STATE(e){e===s.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CDATA_SECTION_END_STATE(e){e===s.GREATER_THAN_SIGN?this.state=c:e===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"))}CHARACTER_REFERENCE_STATE(e){this.tempBuff=[s.AMPERSAND],e===s.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):g(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}NAMED_CHARACTER_REFERENCE_STATE(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(a.missingSemicolonAfterCharacterReference),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE"}AMBIGUOS_AMPERSAND_STATE(e){g(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=_(e):this._emitCodePoint(e):(e===s.SEMICOLON&&this._err(a.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}NUMERIC_CHARACTER_REFERENCE_STATE(e){this.charRefCode=0,e===s.LATIN_SMALL_X||e===s.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE")}HEXADEMICAL_CHARACTER_REFERENCE_START_STATE(e){!function(e){return f(e)||v(e)||y(e)}(e)?(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE")}DECIMAL_CHARACTER_REFERENCE_START_STATE(e){f(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}HEXADEMICAL_CHARACTER_REFERENCE_STATE(e){v(e)?this.charRefCode=16*this.charRefCode+e-55:y(e)?this.charRefCode=16*this.charRefCode+e-87:f(e)?this.charRefCode=16*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}DECIMAL_CHARACTER_REFERENCE_STATE(e){f(e)?this.charRefCode=10*this.charRefCode+e-48:e===s.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"))}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===s.NULL)this._err(a.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(a.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isSurrogate(this.charRefCode))this._err(a.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(i.isUndefinedCodePoint(this.charRefCode))this._err(a.noncharacterCharacterReference);else if(i.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(a.controlCharacterReference);const e=u[this.charRefCode];e&&(this.charRefCode=e)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}x.CHARACTER_TOKEN="CHARACTER_TOKEN",x.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",x.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",x.START_TAG_TOKEN="START_TAG_TOKEN",x.END_TAG_TOKEN="END_TAG_TOKEN",x.COMMENT_TOKEN="COMMENT_TOKEN",x.DOCTYPE_TOKEN="DOCTYPE_TOKEN",x.EOF_TOKEN="EOF_TOKEN",x.HIBERNATION_TOKEN="HIBERNATION_TOKEN",x.MODE={DATA:c,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},x.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},e.exports=x},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){var n,i;if(!e||!t||"object"!=typeof e||"element"!==e.type)return!1;return n=e.properties,null!=(i=n&&r.call(n,t)&&n[t])&&!1!==i}},function(e,t,n){"use strict";function r(e){return e&&(e.value||e.alt||e.title||"children"in e&&i(e.children)||"length"in e&&i(e))||""}function i(e){for(var t=[],n=e.length,i=-1;++ifunction(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.delimiter,i=void 0===n?"\n":n;return"document"===e.object||"block"===e.object&&r.Block.isBlockList(e.nodes)?e.nodes.map(a).join(i):e.text}var s={deserialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.defaultBlock,a=void 0===n?"line":n,s=t.defaultMarks,l=void 0===s?[]:s,u=t.delimiter,c=void 0===u?"\n":u,d=t.toJSON,f=void 0!==d&&d;i.Set.isSet(l)&&(l=l.toArray()),a=r.Node.createProperties(a),l=l.map(r.Mark.createProperties);var p={object:"value",document:{object:"document",data:{},nodes:e.split(c).map((function(e){return o({},a,{object:"block",data:{},nodes:[{object:"text",text:e,marks:l}]})}))}},h=f?p:r.Value.fromJSON(p);return h},serialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(e.document,t)}};t.default=s},function(e,t,n){"use strict";var r=n(5),i=function(e){function t(t){var n="Assertion failed. See https://openlayers.org/en/"+("latest"===r.a?r.a:"v"+r.a.split("-")[0])+"/doc/errors/#"+t+" for details.";e.call(this,n),this.code=t,this.name="AssertionError",this.message=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error);t.a=i},function(e,t,n){"use strict";var r=n(7),i=n(88),o=n(12),a=function(e){function t(){e.call(this),this.revision_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.a.CHANGE)},t.prototype.getRevision=function(){return this.revision_},t.prototype.on=function(e,t){if(Array.isArray(e)){for(var n=e.length,i=new Array(n),o=0;oE&&(d=(f+p)/2,Object(i.c)(e,t,n,o,d,g)&&(w=d,E=x)),f=p}return isNaN(w)&&(w=a[s]),l?(l.push(w,g,E),l):[w,g,E]}function a(e,t,n,r,i){for(var a=[],s=0,l=n.length;sthis.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(o.a.CLEAR)},t.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},t.prototype.forEach=function(e,t){for(var n=this.oldest_;n;)e.call(t,n.value_,n.key_,this),n=n.newer},t.prototype.get=function(e){var t=this.entries_[e];return Object(r.a)(void 0!==t,15),t===this.newest_||(t===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(t.newer.older=t.older,t.older.newer=t.newer),t.newer=null,t.older=this.newest_,this.newest_.newer=t,this.newest_=t),t.value_},t.prototype.remove=function(e){var t=this.entries_[e];return Object(r.a)(void 0!==t,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var e,t=new Array(this.count_),n=0;for(e=this.newest_;e;e=e.older)t[n++]=e.key_;return t},t.prototype.getValues=function(){var e,t=new Array(this.count_),n=0;for(e=this.newest_;e;e=e.older)t[n++]=e.value_;return t},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},t.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},t.prototype.set=function(e,t){Object(r.a)(!(e in this.entries_),16);var n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_},t.prototype.setSize=function(e){this.highWaterMark=e},t.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},t}(i.a);t.a=a},function(e,t,n){"use strict";t.a={IMAGE:"image",VECTOR:"vector"}},function(e,t,n){"use strict";function r(e,t,n,r){for(var i=e[t],o=e[t+1],a=0,s=t+r;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(1183)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),i={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},a={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},s=1;s<20;s++)a["f"+s]=111+s;function l(e,t,n){!t||"byKey"in t||(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return u(e,t)})),i=function(e){return r.some((function(t){return c(t,e)}))};return null==n?i:i(n)}function u(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),a=o.length;for(var s in i)r[i[s]]=!1;var l=!0,u=!1,c=void 0;try{for(var p,h=o[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var m=p.value,g=m.endsWith("?");g&&(m=m.slice(0,-1));var v=f(m),y=i[v];1!==a&&y||(n?r.key=v:r.which=d(m)),y&&(r[y]=!g||null)}}catch(e){u=!0,c=e}finally{try{!l&&h.return&&h.return()}finally{if(u)throw c}}return r}function c(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&((null!=(i="key"===n?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r))return!1}return!0}function d(e){return e=f(e),a[e]||e.toUpperCase().charCodeAt(0)}function f(e){return e=e.toLowerCase(),e=o[e]||e}t.default=l,t.isHotkey=l,t.isCodeHotkey=function(e,t){return l(e,t)},t.isKeyHotkey=function(e,t){return l(e,{byKey:!0},t)},t.parseHotkey=u,t.compareHotkey=c,t.toKeyCode=d,t.toKeyName=f},function(e,t,n){var r=n(406)(Object.getPrototypeOf,Object);e.exports=r},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(708),i=n(724),o=n(726),a=n(727),s=n(728);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&o(c)?n>1?e(c,n-1,o,a,s):r(s,c):a||(s[s.length]=c)}return s}},function(e,t,n){var r=n(736),i=n(419)(r);e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveFormat=function(e,t){const n=e.get("frontmatter_delimiter"),o=i.List.isList(n)?n.toArray():n,a=e.get("format");if(a)return d(a,o);const s=t&&t.path;if(s){const e=s.split(".").pop();return(0,r.default)(c,e)}const l=e.get("extension");if(l)return(0,r.default)(c,l);return d("frontmatter",o)},t.extensionFormatters=t.formatExtensions=t.frontmatterFormats=void 0;var r=u(n(94)),i=n(3),o=u(n(422)),a=u(n(427)),s=u(n(434)),l=n(786);function u(e){return e&&e.__esModule?e:{default:e}}t.frontmatterFormats=["yaml-frontmatter","toml-frontmatter","json-frontmatter"];t.formatExtensions={yml:"yml",yaml:"yml",toml:"toml",json:"json",frontmatter:"md","json-frontmatter":"md","toml-frontmatter":"md","yaml-frontmatter":"md"};const c={yml:o.default,yaml:o.default,toml:a.default,json:s.default,md:l.FrontmatterInfer,markdown:l.FrontmatterInfer,html:l.FrontmatterInfer};t.extensionFormatters=c;const d=(e,t)=>({yml:o.default,yaml:o.default,toml:a.default,json:s.default,frontmatter:l.FrontmatterInfer,"json-frontmatter":(0,l.frontmatterJSON)(t),"toml-frontmatter":(0,l.frontmatterTOML)(t),"yaml-frontmatter":(0,l.frontmatterYAML)(t)}[e])},function(e,t,n){var r=n(40),i=n(164),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){"use strict";var r=n(740);e.exports=r},function(e,t,n){"use strict";var r=n(167);e.exports=new r({explicit:[n(743),n(744),n(745)]})},function(module,exports,__webpack_require__){"use strict";(function(global){module.exports=makeParserClass(__webpack_require__(765)),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=e=>{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__(766),createDateTimeFloat=__webpack_require__(767),createDate=__webpack_require__(768),createTime=__webpack_require__(769),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnder,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnder,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnder,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.return(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],n=tomlType(e);if(t!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${n}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,n=e.key.pop();for(let n of e.key){if(hasKey(t,n)&&(!isTable(t[n])||t[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[n]=t[n]||Table()}if(hasKey(t,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[n]=e.value.valueOf():t[n]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}}).call(this,__webpack_require__(39))},function(e,t,n){"use strict";e.exports=(e,t)=>{for(t=String(t);t.length "+r[t]+"\n",n+=o+" ";for(let t=0;t0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(t=e.exports=n(429)).Stream=t,t.Readable=t,t.Writable=n(319),t.Duplex=n(143),t.Transform=n(433),t.PassThrough=n(779)},function(e,t,n){var r=n(207),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var o=n(245);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=v;var u=Object.create(n(208));u.inherits=n(142);var c={deprecate:n(777)},d=n(430),f=n(318).Buffer,p=i.Uint8Array||function(){};var h,m=n(431);function g(){}function v(e,t){s=s||n(143),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),k(e,t))}(e,n,r,t,i);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?l(_,e,n,a,i):_(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(e){if(s=s||n(143),!(h.call(y,this)||this instanceof s))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function b(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,d=n.callback;if(b(e,t,!1,t.objectMode?1:u.length,u,c,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=E(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(y,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&(e&&e._writableState instanceof v)}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,f.isBuffer(r)||r instanceof p);return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(69),n(428).setImmediate,n(39))},function(e,t,n){"use strict";(function(e){const r=n(792),i=n(246);t.define=function(e,t,n){Reflect.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})},t.isBuffer=e=>"buffer"===i(e),t.isObject=e=>"object"===i(e),t.toBuffer=function(t){return"string"==typeof t?e.from(t):t},t.toString=function(e){if(t.isBuffer(e))return r(String(e));if("string"!=typeof e)throw new TypeError("expected input to be a string or buffer");return r(e)},t.arrayify=function(e){return e?Array.isArray(e)?e:[e]:[]},t.startsWith=function(e,t,n){return"number"!=typeof n&&(n=t.length),e.slice(0,n)===t}}).call(this,n(207).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.selectUseWorkflow=t.selectLocale=void 0;var r=n(3),i=n(144),o=n(95);const a=(0,r.Map)({isFetching:!0});t.selectLocale=e=>e.get("locale","en");t.selectUseWorkflow=e=>e.get("publish_mode")===o.EDITORIAL_WORKFLOW;var s=(e=a,t)=>{switch(t.type){case i.CONFIG_MERGE:return e.mergeDeep(t.payload);case i.CONFIG_REQUEST:return e.set("isFetching",!0);case i.CONFIG_SUCCESS:return t.payload.delete("isFetching");case i.CONFIG_FAILURE:return e.withMutations(e=>{e.delete("isFetching"),e.set("error",t.payload.toString())});default:return e}};t.default=s},function(e,t,n){var r=n(209);e.exports=function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:r(e,t,n)}},function(e,t,n){var r=n(796),i=n(797),o=n(798);e.exports=function(e){return i(e)?o(e):r(e)}},function(e,t,n){"use strict";var r=n(802),i=n(325),o=n(169),a=n(439),s=n(804);function l(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return l.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[n])instanceof a)return h(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i,o,s,c=u.call(this,t,n);return c&&(i=c.schema,t=c.root,s=c.baseId),i instanceof a?o=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(o=h(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),o}function u(e,t){var n=r.parse(t),i=g(n),o=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==o){var s=y(i),l=this._refs[s];if("string"==typeof l)return c.call(this,e,l,n);if(l instanceof a)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[s])instanceof a))return;if(l.validate||this._compile(l),s==y(t))return{schema:l,root:e,baseId:o};e=l}if(!e.schema)return;o=m(this._getId(e.schema))}return f.call(this,n,o,e.schema,e)}function c(e,t,n){var r=u.call(this,e,t);if(r){var i=r.schema,o=r.baseId;e=r.root;var a=this._getId(i);return a&&(o=b(o,a)),f.call(this,n,o,i,e)}}e.exports=l,l.normalizeId=y,l.fullPath=m,l.url=b,l.ids=function(e){var t=y(this._getId(e)),n={"":t},a={"":m(t,!1)},l={},u=this;return s(e,{allKeys:!0},(function(e,t,s,c,d,f,p){if(""!==t){var h=u._getId(e),m=n[c],g=a[c]+"/"+d;if(void 0!==p&&(g+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof h){h=m=y(m?r.resolve(m,h):h);var v=u._refs[h];if("string"==typeof v&&(v=u._refs[v]),v&&v.schema){if(!i(e,v.schema))throw new Error('id "'+h+'" resolves to more than one schema')}else if(h!=y(g))if("#"==h[0]){if(l[h]&&!i(e,l[h]))throw new Error('id "'+h+'" resolves to more than one schema');l[h]=e}else u._refs[h]=g}n[t]=m,a[t]=g}})),l},l.inlineRef=h,l.schema=u;var d=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,t,n,r){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),a=1;a-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){(function(e){var r=n(405),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(123)(e))},function(e,t,n){var r=n(250),i=n(849),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveIntegrations=s,t.getIntegrationProvider=void 0;var r=a(n(855)),i=a(n(858)),o=n(3);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){let n=(0,o.Map)({});return e.get("providers").forEach((e,o)=>{switch(o){case"algolia":n=n.set("algolia",new r.default(e));break;case"assetStore":n=n.set("assetStore",new i.default(e,t))}}),n}const l=function(){let e=null;return(t,n,r)=>(e||(e=s(t,n)),e.get(r))}();t.getIntegrationProvider=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEntry=function(e,t="",n="",r={}){return{collection:e,slug:t,path:n,partial:r.partial||!1,raw:r.raw||"",data:r.data||{},label:r.label||null,metaData:r.metaData||null,isModification:(0,i.default)(r.isModification)?r.isModification:null,mediaFiles:r.mediaFiles||[]}};var r,i=(r=n(856))&&r.__esModule?r:{default:r}},function(e,t,n){var r=n(252),i=n(201),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(450),i=n(464),o=n(253);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(255),i=n(338);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(467),i=n(415),o=r?function(e){return r.get(e)}:i;e.exports=o},function(e,t,n){var r=n(255),i=n(338);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++nnew i.Cursor(e.getIn(["cursorsByType","collectionEntries",t]));var a=(e=(0,r.fromJS)({cursorsByType:{collectionEntries:{}}}),t)=>{switch(t.type){case o.ENTRIES_SUCCESS:return e.setIn(["cursorsByType","collectionEntries",t.payload.collection],i.Cursor.create(t.payload.cursor).store);default:return e}};t.default=a},function(e,t,n){var r=n(258)("map",n(146));r.placeholder=n(214),e.exports=r},function(e,t,n){var r=n(248),i=n(341),o=n(335),a=n(480),s=n(908),l=n(481),u=n(177),c=n(909),d=n(910),f=n(449),p=n(336),h=n(175),m=n(911),g=n(912),v=n(483),y=n(40),b=n(211),_=n(916),w=n(75),E=n(918),x=n(172),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,S,O,T,C){var A,P=1&n,R=2&n,M=4&n;if(S&&(A=T?S(t,O,T,C):S(t)),void 0!==A)return A;if(!w(t))return t;var I=y(t);if(I){if(A=m(t),!P)return u(t,A)}else{var D=h(t),j="[object Function]"==D||"[object GeneratorFunction]"==D;if(b(t))return l(t,P);if("[object Object]"==D||"[object Arguments]"==D||j&&!T){if(A=R||j?{}:v(t),!P)return R?d(t,s(A,t)):c(t,a(A,t))}else{if(!k[D])return T?t:{};A=g(t,D,P)}}C||(C=new r);var L=C.get(t);if(L)return L;C.set(t,A),E(t)?t.forEach((function(r){A.add(e(r,n,S,r,t,C))})):_(t)&&t.forEach((function(r,i){A.set(i,e(r,n,S,i,t,C))}));var N=M?R?p:f:R?keysIn:x,F=I?void 0:N(t);return i(F||t,(function(r,i){F&&(r=t[i=r]),o(A,i,e(r,n,S,i,t,C))})),A}},function(e,t,n){var r=n(448);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={PRESENCE:"PRESENCE",PATTERN:"PATTERN",RANGE:"RANGE",CUSTOM:"CUSTOM"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.folderFormatter=t.summaryFormatter=t.previewUrlFormatter=t.slugFormatter=t.prepareSlug=t.commitMessageFormatter=void 0;var r=p(n(124)),i=p(n(176)),o=p(n(465)),a=p(n(97)),s=n(3),l=n(145),u=n(251),c=n(96),d=n(98),f=n(41);function p(e){return e&&e.__esModule?e:{default:e}}function h(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n Collection "','" configuration error:\n `preview_path_date_field` must be a field with a valid date. Ignoring `preview_path`.\n '],['\n Collection "','" configuration error:\n \\`preview_path_date_field\\` must be a field with a valid date. Ignoring \\`preview_path\\`.\n ']);return h=function(){return e},e}const m=(0,s.Map)({create:"Create {{collection}} “{{slug}}”",update:"Update {{collection}} “{{slug}}”",delete:"Delete {{collection}} “{{slug}}”",uploadMedia:"Upload “{{path}}”",deleteMedia:"Delete “{{path}}”",openAuthoring:"{{message}}"}),g=/\{\{([^}]+)\}\}/g;t.commitMessageFormatter=(e,t,{slug:n,path:r,collection:i,authorLogin:o,authorName:a},l)=>{const u=m.merge(t.getIn(["backend","commit_messages"],(0,s.Map)())),c=u.get(e).replace(g,(e,t)=>{switch(t){case"slug":return n||"";case"path":return r||"";case"collection":return i?i.get("label_singular")||i.get("label"):"";default:return console.warn("Ignoring unknown variable “".concat(t,"” in commit message template.")),""}});return l?u.get("openAuthoring").replace(g,(e,t)=>{switch(t){case"message":return c;case"author-login":return o||"";case"author-name":return a||"";default:return console.warn("Ignoring unknown variable “".concat(t,"” in open authoring message template.")),""}}):c};const v=e=>e.trim().toLocaleLowerCase().replace(/[']/g,"").replace(/[.]/g,"-");t.prepareSlug=v;const y=e=>(0,a.default)([e=>String(e),v,(0,o.default)(l.sanitizeSlug,e)]);t.slugFormatter=(e,t,n)=>{const r=e.get("slug")||"{{slug}}",i=t.getIn((0,u.keyToPathArray)((0,c.selectIdentifier)(e)));if(!i)throw new Error("Collection must have a field name that is a valid entry identifier, or must have `identifier_field` set");const o=y(n),a=new Date,s=(0,u.compileStringTemplate)(r,a,i,t,o);if(e.has("path")){const n=e.get("path");return(0,u.compileStringTemplate)(n,a,s,t,e=>e===s?e:o(e))}return s};const b=(e,t)=>{if(!e)return t;const n=(0,f.fileExtension)(e),r=(0,f.basename)(e,".".concat(n));return t=t.withMutations(e=>{e.set("filename",r),e.set("extension",n)})};t.previewUrlFormatter=(e,t,n,o,a)=>{if(!e)return;if(!t.get("preview_path"))return e;const s=(0,i.default)(e,"/"),l=t.get("preview_path");let c=a.get("data");c=b(a.get("path"),c);const f=(0,u.parseDateFromEntry)(a,t,t.get("preview_path_date_field")),p=y(o);let m;try{m=(0,u.compileStringTemplate)(l,f,n,c,p)}catch(e){if(e.name===u.SLUG_MISSING_REQUIRED_DATE)return console.error((0,d.stripIndent)(h(),t.get("name"))),s;throw e}const g=(0,r.default)(m," /");return"".concat(s,"/").concat(g)};t.summaryFormatter=(e,t,n)=>{let r=t.get("data");const i=(0,u.parseDateFromEntry)(t,n)||null,o=r.getIn((0,u.keyToPathArray)((0,c.selectIdentifier)(n)));return r=b(t.get("path"),r),(0,u.compileStringTemplate)(e,i,o,r)};t.folderFormatter=(e,t,n,r,i,o)=>{if(!t||!t.get("data"))return e;let a=t.get("data").set(i,r);a=b(t.get("path"),a);const s=(0,u.parseDateFromEntry)(t,n)||null,l=a.getIn((0,u.keyToPathArray)((0,c.selectIdentifier)(n))),d=y(o);return(0,u.compileStringTemplate)(e,s,l,a,e=>e===r?r:d(e))}},function(e,t,n){var r=n(126),i=n(68);e.exports=function(e){return i(e)&&r(e)}},function(e,t,n){"use strict";var r=n(955);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0);var o=((r=i)&&r.__esModule?r:{default:r}).default.createContext();t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var o=n(0),a=n(976).default,s=n(506),l=n(216);e.exports=function(e){var t,n;return n=t=function(t){function n(){return r(this,n),i(this,t.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.render=function(){var t=this;return o.createElement(s.Consumer,null,(function(n){var r={};return l(r,t.props),l(r,{ambManager:n}),o.createElement(e,r,t.props.children)}))},n}(o.Component),t.displayName="withManagerContext("+a(e)+")",n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE="__NATIVE_FILE__",t.URL="__NATIVE_URL__",t.TEXT="__NATIVE_TEXT__"},function(e,t,n){"use strict";function r(e){return e&&e.$$typeof&&"Symbol(react.forward_ref)"===e.$$typeof.toString()}Object.defineProperty(t,"__esModule",{value:!0}),t.isRefForwardingComponent=r,t.isRefable=function(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||r(e);var t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(263),o=n(23);t.useDragDropManager=function(){var e=r.useContext(i.context).dragDropManager;return o(null!=e,"Expected drag drop context"),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var r,i=n(1053);var o=((r=i)&&r.__esModule?r:{default:r}).default,a=o.canUseDOM?window.HTMLElement:{};t.canUseDOM=o.canUseDOM;t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchCollections=function(e){i.default.push("/search/".concat(e))},t.showCollection=function(e){i.default.push((0,o.getCollectionUrl)(e))},t.createNewEntry=function(e){i.default.push((0,o.getNewEntryUrl)(e))};var r,i=(r=n(231))&&r.__esModule?r:{default:r},o=n(145)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_STYLE_GRID=t.VIEW_STYLE_LIST=void 0;t.VIEW_STYLE_LIST="VIEW_STYLE_LIST";t.VIEW_STYLE_GRID="VIEW_STYLE_GRID"},function(e,t,n){var r=n(1114);e.exports=function(e){return r(2,e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PullRequestState=t.MOCK_PULL_REQUEST=t.API_NAME=void 0;var r=p(n(171)),i=p(n(124)),o=p(n(542)),a=p(n(152)),s=p(n(182)),l=p(n(1131)),u=n(543),c=p(n(179)),d=n(98),f=n(41);function p(e){return e&&e.__esModule?e:{default:e}}function h(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Netlify CMS is adding labels to ",' of your Editorial Workflow\n entries. The "Workflow" tab will be unavailable during this migration. You may use other\n areas of the CMS during this time. Note that closing the CMS will pause the migration.\n ']);return h=function(){return e},e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;te.labels.some(e=>(0,f.isCMSLabel)(e.name)),w=e=>e.reduce((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e),[]);let E=!1;class x{constructor(e){v(this,"apiRoot",void 0),v(this,"token",void 0),v(this,"branch",void 0),v(this,"useOpenAuthoring",void 0),v(this,"repo",void 0),v(this,"originRepo",void 0),v(this,"repoOwner",void 0),v(this,"repoName",void 0),v(this,"originRepoOwner",void 0),v(this,"originRepoName",void 0),v(this,"repoURL",void 0),v(this,"originRepoURL",void 0),v(this,"mergeMethod",void 0),v(this,"initialWorkflowStatus",void 0),v(this,"_userPromise",void 0),v(this,"_metadataSemaphore",void 0),v(this,"commitAuthor",void 0),v(this,"filterOpenAuthoringBranches",async e=>{const t=(0,f.contentKeyFromBranch)(e),{pullRequest:n,collection:r,slug:i}=await this.retrieveMetadata(t),{state:o,merged_at:a}=n;return-1!==n.number&&o===b.Closed&&a?(await this.deleteUnpublishedEntry(r,i),{branch:e,filter:!1}):{branch:e,filter:!0}}),this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL="/repos/".concat(this.repo),this.originRepoURL="/repos/".concat(this.originRepo);const[t,n]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=n[0],this.originRepoName=n[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.initialWorkflowStatus=e.initialWorkflowStatus}user(){return this._userPromise||(this._userPromise=this.request("/user")),this._userPromise}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions.push}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(e={}){const t=g({"Content-Type":"application/json; charset=utf-8"},e);return this.token?(t.Authorization="token ".concat(this.token),Promise.resolve(t)):Promise.resolve(t)}parseJsonResponse(e){return e.json().then(t=>e.ok?t:Promise.reject(t))}urlFor(e,t){const n=(new Date).getTime(),r=["ts=".concat(n)];if(t.params)for(const e in t.params)r.push("".concat(e,"=").concat(encodeURIComponent(t.params[e])));return r.length&&(e+="?".concat(r.join("&"))),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then(t=>e.ok?t:Promise.reject(t))}handleRequestError(e,t){throw new f.APIError(e.message,t,"GitHub")}async request(e,t={},n=(e=>this.parseResponse(e))){const r=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o;return fetch(i,g({},t,{headers:r})).then(e=>(o=e.status,n(e))).catch(e=>this.handleRequestError(e,o))}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){const n=await this.requestHeaders(t.headers||{}),r=this.urlFor(e,t),i=await(0,f.getAllResponses)(r,g({},t,{headers:n}),"next",this.nextUrlProcessor()),o=await Promise.all(i.map(e=>this.parseResponse(e)));return[].concat(...o)}generateContentKey(e,t){const n=(0,f.generateContentKey)(e,t);return this.useOpenAuthoring?"".concat(this.repo,"/").concat(n):n}parseContentKey(e){return this.useOpenAuthoring?(0,f.parseContentKey)(e.substring(this.repo.length+1)):(0,f.parseContentKey)(e)}checkMetadataRef(){return this.request("".concat(this.repoURL,"/git/refs/meta/_netlify_cms"),{cache:"no-store"}).then(e=>e.object).catch(()=>this.uploadBlob({raw:"# Netlify CMS\n\nThis tree is used by the Netlify CMS to store metadata information for specific files and branches."}).then(e=>this.request("".concat(this.repoURL,"/git/trees"),{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})})).then(e=>this.commit("First Commit",e)).then(e=>this.createRef("meta","_netlify_cms",e.sha)).then(e=>e.object))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=(0,c.default)(1)),new Promise((n,r)=>{var i;return null===(i=this._metadataSemaphore)||void 0===i?void 0:i.take(async()=>{try{var i;const r=await this.checkMetadataRef(),o={path:"".concat(e,".json"),raw:JSON.stringify(t)};await this.uploadBlob(o);const a=await this.updateTree(r.sha,[o]),{sha:s}=await this.commit("Updating “".concat(e,"” metadata"),a);await this.patchRef("meta","_netlify_cms",s),await f.localForage.setItem("gh.meta.".concat(e),{expires:Date.now()+3e5,data:t}),null===(i=this._metadataSemaphore)||void 0===i||i.leave(),n()}catch(e){r(e)}})})}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=(0,c.default)(1)),new Promise(t=>{var n;return null===(n=this._metadataSemaphore)||void 0===n?void 0:n.take(async()=>{try{var n;const r=await this.checkMetadataRef(),i={path:"".concat(e,".json"),sha:null},o=await this.updateTree(r.sha,[i]),{sha:a}=await this.commit("Deleting “".concat(e,"” metadata"),o);await this.patchRef("meta","_netlify_cms",a),null===(n=this._metadataSemaphore)||void 0===n||n.leave(),t()}catch(e){var r;null===(r=this._metadataSemaphore)||void 0===r||r.leave(),t()}})})}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_netlify_cms"},headers:{Accept:"application/vnd.github.v3.raw"},cache:"no-store"},n=t=>{throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t};if(!this.useOpenAuthoring){return await this.request("".concat(this.repoURL,"/contents/").concat(e,".json"),t).then(e=>JSON.parse(e)).catch(n)}const[r,i]=e.split("/");return this.request("/repos/".concat(r,"/").concat(i,"/contents/").concat(e,".json"),t).then(e=>JSON.parse(e)).catch(n)}async getPullRequests(e,t,n){return(await this.requestAllPages("".concat(this.originRepoURL,"/pulls"),{params:g({},e?{head:await this.getHeadReference(e)}:{},{base:this.branch,state:t,per_page:100})})).filter(e=>e.head.ref.startsWith("".concat(f.CMS_BRANCH_PREFIX,"/"))&&n(e))}async getOpenAuthoringPullRequest(e,t){const n=await this.getBranch(e),r=t.filter(e=>e.head.sha===n.commit.sha)[0];if(r){r.labels=r.labels.filter(e=>!(0,f.isCMSLabel)(e.name));const e=r.state===b.Closed?{name:(0,f.statusToLabel)(this.initialWorkflowStatus)}:{name:(0,f.statusToLabel)("pending_review")};return r.labels.push(e),r}try{return{head:{sha:n.commit.sha},number:-1,labels:[{name:(0,f.statusToLabel)(this.initialWorkflowStatus)}],state:b.Open}}catch(e){throw new f.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,b.All,()=>!0);return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,b.Open,_);if(t.length<=0)throw new f.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async retrieveMetadata(e){const{collection:t,slug:n}=this.parseContentKey(e),r=(0,f.branchFromContentKey)(e),i=await this.getBranchPullRequest(r),{files:o}=await this.getDifferences(this.branch,i.head.sha),{path:a,newFile:s}=o.filter(e=>e.patch&&!e.filename.endsWith(".svg")).map(e=>({path:e.filename,newFile:"added"===e.status}))[0],l=o.filter(e=>e.filename!==a).map(({filename:e,sha:t})=>({path:e,id:t})),u=i.labels.find(e=>(0,f.isCMSLabel)(e.name)),c=(0,f.labelToStatus)(u.name),d=i.updated_at;return{branch:r,collection:t,slug:n,path:a,status:c,newFile:s,mediaFiles:l,timeStamp:d,pullRequest:i}}async readFile(e,t,{branch:n=this.branch,repoURL:r=this.repoURL,parseText:i=!0}={}){t||(t=await this.getFileSha(e,{repoURL:r,branch:n}));return await(0,f.readFile)(t,()=>this.fetchBlobContent({sha:t,repoURL:r,parseText:i}),f.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:n}){const r=await this.request("".concat(t,"/git/blobs/").concat(e));if(n){return u.Base64.decode(r.content)}{const e=u.Base64.atob(r.content),t=new Uint8Array(e.length);for(let n=0;n1?{recursive:1}:{}})).tree.filter(e=>"blob"===e.type&&e.path.split("/").length<=i).map(e=>({type:e.type,id:e.sha,name:(0,f.basename)(e.path),path:"".concat(o,"/").concat(e.path),size:e.size}))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}async readUnpublishedBranchFile(e){try{const{branch:t,collection:n,slug:r,path:i,status:o,newFile:a,mediaFiles:s,timeStamp:l}=await this.retrieveMetadata(e),u=this.useOpenAuthoring?"/repos/".concat(e.split("/").slice(0,2).join("/")):this.repoURL;return{slug:r,metaData:{branch:t,collection:n,objects:{entry:{path:i,mediaFiles:s}},status:o,timeStamp:l},fileData:await this.readFile(i,null,{branch:t,repoURL:u}),isModification:!a}}catch(e){throw new f.EditorialWorkflowError("content is not under editorial workflow",!0)}}async migrateToVersion1(e,t){const n=e.head.ref.substring("cms/".length),r="".concat(t.collection,"/").concat(n),i="cms/".concat(r);await this.getBranch(i).catch(()=>{})||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,b.All,()=>!0))[0]||await this.createPR(e.title,i),a=g({},t,{pr:{number:o.number,head:o.head.sha},branch:i,version:"1"});return await this.storeMetadata(r,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(n),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const n=e.head.ref.substring("cms/".length);await this.deleteMetadata(n)}async migratePullRequest(e,t){const{number:n}=e;console.log("Migrating Pull Request '".concat(n,"' (").concat(t,")"));const r=(0,f.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(r).catch(()=>{});if(!i)return void console.log("Skipped migrating Pull Request '".concat(n,"' (").concat(t,")"));let o=n;if(!i.version){console.log("Migrating Pull Request '".concat(n,"' to version 1"));try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log("Failed to migrate Pull Request '".concat(n,"' to version 1. See error below.")),void console.error(e)}o=e.number,console.log("Done migrating Pull Request '".concat(n,"' to version 1. New pull request '").concat(o,"' created."))}"1"===i.version&&(console.log("Migrating Pull Request '".concat(o,"' to labels")),await this.migrateToPullRequestLabels(e,i),console.log("Done migrating Pull Request '".concat(o,"' to labels"))),console.log("Done migrating Pull Request '".concat(n===o?o:"".concat(n," => ").concat(o),"'"))}async getOpenAuthoringBranches(){return await this.requestAllPages("".concat(this.repoURL,"/git/refs/heads/cms/").concat(this.repo)).catch(()=>[])}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map(e=>e.ref.substring("refs/heads/".length));const t=await Promise.all(e.map(e=>this.filterOpenAuthoringBranches(e)));e=t.filter(e=>e.filter).map(e=>e.branch)}else{const t=await this.getPullRequests(void 0,b.Open,e=>!e.head.repo.fork&&(e=>e.labels.every(e=>!(0,f.isCMSLabel)(e.name)))(e));let n=0;for(const e of t)E||(E=!0,alert((0,d.oneLine)(h(),t.length))),n+=1,await this.migratePullRequest(e,"".concat(n," of ").concat(t.length));e=(await this.getPullRequests(void 0,b.Open,_)).map(e=>e.head.ref)}return e}async getStatuses(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=(await this.getBranchPullRequest(r)).head.sha;return(await this.request("".concat(this.originRepoURL,"/commits/").concat(i,"/status"))).statuses.map(e=>({context:e.context,target_url:e.target_url,state:e.state===y.Success?f.PreviewState.Success:f.PreviewState.Other}))}async persistFiles(e,t,n){const r=e?t.concat(e):t,o=r.map(e=>this.uploadBlob(e));if(await Promise.all(o),n.useWorkflow){const o=t.map(({sha:e,path:t})=>({path:(0,i.default)(t,"/"),sha:e}));return this.editorialWorkflowGit(r,e,o,n)}return this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,r)).then(e=>this.commit(n.commitMessage,e)).then(e=>this.patchBranch(this.branch,e.sha))}async getFileSha(e,{repoURL:t=this.repoURL,branch:n=this.branch}={}){const r=e.split("/"),i=(0,s.default)(r),o=(0,l.default)(r).join("/"),a=encodeURIComponent(o),u="".concat(t,"/git/trees/").concat(n,":").concat(a),c=(await this.request(u,{cache:"no-store"})).tree.find(e=>e.path===i);if(c)return c.sha;throw new f.APIError("Not Found",404,"GitHub")}deleteFile(e,t){if(this.useOpenAuthoring)return Promise.reject("Cannot delete published entries as an Open Authoring user!");const n=this.branch;return this.getFileSha(e,{branch:n}).then(r=>{const i={method:"DELETE",params:{sha:r,message:t,branch:n}};this.commitAuthor&&(i.params.author=g({},this.commitAuthor,{date:(new Date).toISOString()}));const o="".concat(this.repoURL,"/contents/").concat(e);return this.request(o,i)})}async createBranchAndPullRequest(e,t,n){return await this.createBranch(e,t),this.createPR(n,e)}async updatePullRequestLabels(e,t){await this.request("".concat(this.repoURL,"/issues/").concat(e,"/labels"),{method:"PUT",body:JSON.stringify({labels:t})})}async editorialWorkflowGit(e,t,n,r){const i=this.generateContentKey(r.collectionName,t.slug),o=(0,f.branchFromContentKey)(i);if(r.unpublished||!1){const{files:t}=await this.getDifferences(this.branch,await this.getHeadReference(o)),i=[];for(const e of t)n.some(t=>t.path===e.filename)||i.push({path:e.filename,sha:null});const a=await this.rebaseBranch(o),s=i.concat(e),l=await this.updateTree(a.sha,s),u=await this.commit(r.commitMessage,l);return this.patchBranch(o,u.sha,{force:!0})}{const t=await this.getDefaultBranch(),n=await this.updateTree(t.commit.sha,e),i=await this.commit(r.commitMessage,n);if(this.useOpenAuthoring)await this.createBranch(o,i.sha);else{const e=await this.createBranchAndPullRequest(o,i.sha,r.commitMessage);await this.setPullRequestStatus(e,r.status||this.initialWorkflowStatus)}}}async getDifferences(e,t){for(let n=1;n<=3;n++)try{return await this.request("".concat(this.originRepoURL,"/compare/").concat(e,"...").concat(t))}catch(e){if(3===n)throw e;await new Promise(e=>setTimeout(e,500))}throw new f.APIError("Not Found",404,"GitHub")}async rebaseSingleCommit(e,t){const n=await this.getDifferences(t.parents[0].sha,t.sha),r=w(n.files);if(r.length>0){const n=await this.updateTree(e.sha,r),{message:i,author:o,committer:a}=t.commit;return await this.createCommit(i,n.sha,[e.sha],o,a)}return t}async rebaseCommits(e,t){if(0===t.length||t[0].parents[0].sha===e.sha){return(0,s.default)(t)}return t.reduce((e,t)=>e.then(e=>{const n=e,r=t;return this.rebaseSingleCommit(n,r)}),Promise.resolve(e))}async rebaseBranch(e){try{const{base_commit:t,commits:n}=await this.getDifferences(this.branch,await this.getHeadReference(e));return await this.rebaseCommits(t,n)}catch(e){throw console.error(e),e}}async setPullRequestStatus(e,t){const n=[...e.labels.filter(e=>!(0,f.isCMSLabel)(e.name)).map(e=>e.name),(0,f.statusToLabel)(t)];await this.updatePullRequestLabels(e.number,n)}async updateUnpublishedEntryStatus(e,t,n){const r=this.generateContentKey(e,t),i=(0,f.branchFromContentKey)(r),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===status)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(-1!==o.number){const{state:e}=o;e===b.Open&&"draft"===n&&await this.closePR(o.number),e===b.Closed&&"pending_review"===n&&await this.openPR(o.number)}else if("pending_review"===n){var a,s;const e=(0,f.branchFromContentKey)(r),t=(null===(a=(await this.getDifferences(this.branch,await this.getHeadReference(e))).commits[0])||void 0===a||null===(s=a.commit)||void 0===s?void 0:s.message)||x.DEFAULT_COMMIT_MESSAGE;await this.createPR(t,e)}}else await this.setPullRequestStatus(o,n)}async deleteUnpublishedEntry(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);-1!==i.number&&await this.closePR(i.number),await this.deleteBranch(r)}async publishUnpublishedEntry(e,t){const n=this.generateContentKey(e,t),r=(0,f.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.mergePR(i),await this.deleteBranch(r)}async createRef(e,t,n){return await this.request("".concat(this.repoURL,"/git/refs"),{method:"POST",body:JSON.stringify({ref:"refs/".concat(e,"/").concat(t),sha:n})})}async patchRef(e,t,n,r={}){const i=r.force||!1;return await this.request("".concat(this.repoURL,"/git/refs/").concat(e,"/").concat(encodeURIComponent(t)),{method:"PATCH",body:JSON.stringify({sha:n,force:i})})}deleteRef(e,t){return this.request("".concat(this.repoURL,"/git/refs/").concat(e,"/").concat(encodeURIComponent(t)),{method:"DELETE"})}async getBranch(e){return await this.request("".concat(this.repoURL,"/branches/").concat(encodeURIComponent(e)))}async getDefaultBranch(){return await this.request("".concat(this.originRepoURL,"/branches/").concat(encodeURIComponent(this.branch)))}createBranch(e,t){return this.createRef("heads",e,t)}assertCmsBranch(e){return e.startsWith("".concat(f.CMS_BRANCH_PREFIX,"/"))}patchBranch(e,t,n={}){const r=n.force||!1;if(r&&!this.assertCmsBranch(e))throw Error("Only CMS branches can be force updated, cannot force update ".concat(e));return this.patchRef("heads",e,t,{force:r})}deleteBranch(e){return this.deleteRef("heads",e).catch(e=>"Reference does not exist"===e.message?Promise.resolve():(console.error(e),Promise.reject(e)))}async getHeadReference(e){return"".concat(this.repoOwner,":").concat(e)}async createPR(e,t){return await this.request("".concat(this.originRepoURL,"/pulls"),{method:"POST",body:JSON.stringify({title:e,body:f.DEFAULT_PR_BODY,head:await this.getHeadReference(t),base:this.branch})})}async openPR(e){return console.log("%c Re-opening PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request("".concat(this.originRepoURL,"/pulls/").concat(e),{method:"PATCH",body:JSON.stringify({state:b.Open})})}async closePR(e){return console.log("%c Deleting PR","line-height: 30px;text-align: center;font-weight: bold"),await this.request("".concat(this.originRepoURL,"/pulls/").concat(e),{method:"PATCH",body:JSON.stringify({state:b.Closed})})}async mergePR(e){console.log("%c Merging PR","line-height: 30px;text-align: center;font-weight: bold");try{return await this.request("".concat(this.originRepoURL,"/pulls/").concat(e.number,"/merge"),{method:"PUT",body:JSON.stringify({commit_message:f.MERGE_COMMIT_MESSAGE,sha:e.head.sha,merge_method:this.mergeMethod})})}catch(t){if(t instanceof f.APIError&&405===t.status)return this.forceMergePR(e);throw t}}async forceMergePR(e){const t=await this.getDifferences(e.base.sha,e.head.sha),n=w(t.files);let r="Automatically generated. Merged on Netlify CMS\n\nForce merge of:";return n.forEach(e=>{r+='\n* "'.concat(e.path,'"')}),console.log("%c Automatic merge not possible - Forcing merge.","line-height: 30px;text-align: center;font-weight: bold"),this.getDefaultBranch().then(e=>this.updateTree(e.commit.sha,n)).then(e=>this.commit(r,e)).then(e=>this.patchBranch(this.branch,e.sha))}toBase64(e){return Promise.resolve(u.Base64.encode(e))}uploadBlob(e){return(0,o.default)(e,"toBase64",(0,a.default)(this.toBase64,e.raw)).then(t=>this.request("".concat(this.repoURL,"/git/blobs"),{method:"POST",body:JSON.stringify({content:t,encoding:"base64"})}).then(t=>(e.sha=t.sha,e)))}async updateTree(e,t){const n=t.map(e=>({path:(0,i.default)(e.path,"/"),mode:"100644",type:"blob",sha:e.sha}));return g({},await this.createTree(e,n),{parentSha:e})}async createTree(e,t){return await this.request("".concat(this.repoURL,"/git/trees"),{method:"POST",body:JSON.stringify({base_tree:e,tree:t})})}commit(e,t){const n=t.parentSha?[t.parentSha]:[];return this.createCommit(e,t.sha,n)}async createCommit(e,t,n,r,i){return await this.request("".concat(this.repoURL,"/git/commits"),{method:"POST",body:JSON.stringify({message:e,tree:t,parents:n,author:r,committer:i})})}}t.default=x,v(x,"DEFAULT_COMMIT_MESSAGE","Automatically generated by Netlify CMS")},function(e,t,n){var r=n(1138).parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={};var s=!0;var l=!1;function u(e){var t=i(e);if(o[t])return o[t];var n=r(e,{experimentalFragmentVariables:l});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");return n=function e(t,n){var r=Object.prototype.toString.call(t);if("[object Array]"===r)return t.map((function(t){return e(t,n)}));if("[object Object]"!==r)throw new Error("Unexpected input.");n&&t.loc&&delete t.loc,t.loc&&(delete t.loc.startToken,delete t.loc.endToken);var i,o,a,s=Object.keys(t);for(i in s)s.hasOwnProperty(i)&&(o=t[s[i]],"[object Object]"!==(a=Object.prototype.toString.call(o))&&"[object Array]"!==a||(t[s[i]]=e(o,!0)));return t}(n=function(e){for(var t,n={},r=[],o=0;o=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?O(e):t}function C(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t-1}function D(e){return I(e)?window.pageYOffset:e.scrollTop}function j(e,t){I(e)?window.scrollTo(0,t):e.scrollTop=t}function L(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A,i=D(e),o=t-i,a=10,s=0;function l(){var t=L(s+=a,i,o,n);j(e,t),s=p)return{placement:"bottom",maxHeight:t};if(x>=p&&!a)return o&&N(l,k,160),{placement:"bottom",maxHeight:t};if(!a&&x>=r||a&&w>=r)return o&&N(l,k,160),{placement:"bottom",maxHeight:a?w-y:x-y};if("auto"===i||a){var O=t,T=a?_:E;return T>=r&&(O=Math.min(T-y-s.controlHeight,t)),{placement:"top",maxHeight:O}}if("bottom"===i)return j(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=p)return{placement:"top",maxHeight:t};if(E>=p&&!a)return o&&N(l,S,160),{placement:"top",maxHeight:t};if(!a&&E>=r||a&&_>=r){var C=t;return(!a&&E>=r||a&&_>=r)&&(C=a?_-b:E-b),o&&N(l,S,160),{placement:"top",maxHeight:C}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}var U=function(e){return"auto"===e?"bottom":e},z=function(e){function t(){var e,n;g(this,t);for(var r=arguments.length,i=new Array(r),o=0;o-1}},re=function(e){return i.a.createElement("span",_({className:Object(a.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},ie=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,S(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return i.a.createElement("input",_({ref:t},n,{className:Object(a.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(r.Component),oe=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(s.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component),ae=["boxSizing","height","overflow","paddingRight","position"],se={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function le(e){e.preventDefault()}function ue(e){e.stopPropagation()}function ce(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function de(){return"ontouchstart"in window||navigator.maxTouchPoints}var fe=!("undefined"==typeof window||!window.document||!window.document.createElement),pe=0,he=function(e){function t(){var e,n;g(this,t);for(var r=arguments.length,i=new Array(r),o=0;o0,h=c-d-u,m=!1;h>t&&n.isBottom&&(o&&o(e),n.isBottom=!1),p&&n.isTop&&(s&&s(e),n.isTop=!1),p&&t>h?(i&&!n.isBottom&&i(e),f.scrollTop=c,m=!0,n.isBottom=!0):!p&&-t>u&&(a&&!n.isTop&&a(e),f.scrollTop=0,m=!0,n.isTop=!0),m&&n.cancelScroll(e)})),b(O(O(n)),"onWheel",(function(e){n.handleEventDelta(e,e.deltaY)})),b(O(O(n)),"onTouchStart",(function(e){n.touchStart=e.changedTouches[0].clientY})),b(O(O(n)),"onTouchMove",(function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)})),b(O(O(n)),"getScrollTarget",(function(e){n.scrollTarget=e})),n}return E(t,e),y(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(oe,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(r.Component),ve=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=S(e,["isEnabled"]);return t?i.a.createElement(ge,n):this.props.children}}]),t}(r.Component);b(ve,"defaultProps",{isEnabled:!0});var ye=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,i=t.label,o=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(i||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},be=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},_e=function(e){return!!e.isDisabled},we=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,s=e.getStyles,l=e.hasValue;return i.a.createElement("div",{className:r(Object(a.a)(s("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":l},n)},t)}}]),t}(r.Component),Ee=function(e){var t=e.size,n=S(e,["size"]);return i.a.createElement("svg",_({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(a.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},xe=function(e){return i.a.createElement(Ee,_({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ke=function(e){return i.a.createElement(Ee,_({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Se=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Oe=Se,Te=Se,Ce=!1,Ae=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(a.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},Pe=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,s=e.isFocused,l=e.isRtl,u=e.theme.colors,c=s?u.neutral80:u.neutral20;return Ce||(Object(a.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),Ce=!0),i.a.createElement("div",_({},o,{className:n(Object(a.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ae,{color:c,delay:0,offset:l}),i.a.createElement(Ae,{color:c,delay:160,offset:!0}),i.a.createElement(Ae,{color:c,delay:320,offset:!l}))};Pe.defaultProps={size:4};var Re=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Me=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Ie=Me,De=Me,je=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t||i.a.createElement(xe,{size:14}))}}]),t}(r.Component),Le=function(e){function t(){return g(this,t),T(this,x(t).apply(this,arguments))}return E(t,e),y(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,s=e.data,l=e.getStyles,u=e.innerProps,c=e.isDisabled,d=e.removeProps,f=e.selectProps,p=r.Container,h=r.Label,m=r.Remove,g=w({className:o(Object(a.a)(l("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":c},n)},u),v={className:o(Object(a.a)(l("multiValueLabel",this.props)),{"multi-value__label":!0},n)},y=w({className:o(Object(a.a)(l("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},d);return i.a.createElement(p,{data:s,innerProps:g,selectProps:f},i.a.createElement(h,{data:s,innerProps:v,selectProps:f},t),i.a.createElement(m,{data:s,innerProps:y,selectProps:f}))}}]),t}(r.Component);b(Le,"defaultProps",{cropWithEllipsis:!0});var Ne={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.innerProps;return i.a.createElement("div",_({},s,{className:r(Object(a.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||i.a.createElement(xe,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,s=e.isDisabled,l=e.isFocused,u=e.innerRef,c=e.innerProps,d=e.menuIsOpen;return i.a.createElement("div",_({ref:u,className:n(Object(a.a)(r("control",e)),{control:!0,"control--is-disabled":s,"control--is-focused":l,"control--menu-is-open":d},o)},c),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.innerProps;return i.a.createElement("div",_({},s,{className:r(Object(a.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||i.a.createElement(ke,null))},DownChevron:ke,CrossIcon:xe,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.Heading,l=e.headingProps,u=e.label,c=e.theme,d=e.selectProps;return i.a.createElement("div",{className:r(Object(a.a)(o("group",e)),{group:!0},n)},i.a.createElement(s,_({},l,{selectProps:d,theme:c,getStyles:o,cx:r}),u),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,s=(e.selectProps,S(e,["className","cx","getStyles","theme","selectProps"]));return i.a.createElement("div",_({className:n(Object(a.a)(r("groupHeading",w({theme:o},s))),{"group-heading":!0},t)},s))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(a.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",_({},o,{className:n(Object(a.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,s=e.isHidden,l=e.isDisabled,u=e.theme,c=(e.selectProps,S(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return i.a.createElement("div",{className:Object(a.a)(r("input",w({theme:u},c)))},i.a.createElement(p.a,_({className:n(null,{input:!0},t),inputRef:o,inputStyle:Re(s),disabled:l},c)))},LoadingIndicator:Pe,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.innerRef,l=e.innerProps,u=r(Object(a.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",_({className:u},l,{ref:s}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.isMulti,l=e.innerRef;return i.a.createElement("div",{className:r(Object(a.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":s},n),ref:l},t)},MenuPortal:K,LoadingMessage:V,NoOptionsMessage:G,MultiValue:Le,MultiValueContainer:Ie,MultiValueLabel:De,MultiValueRemove:je,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.isDisabled,l=e.isFocused,u=e.isSelected,c=e.innerRef,d=e.innerProps;return i.a.createElement("div",_({ref:c,className:r(Object(a.a)(o("option",e)),{option:!0,"option--is-disabled":s,"option--is-focused":l,"option--is-selected":u},n)},d),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.innerProps;return i.a.createElement("div",_({className:r(Object(a.a)(o("placeholder",e)),{placeholder:!0},n)},s),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.innerProps,l=e.isDisabled,u=e.isRtl;return i.a.createElement("div",_({className:r(Object(a.a)(o("container",e)),{"--is-disabled":l,"--is-rtl":u},n)},s),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,s=e.isDisabled,l=e.innerProps;return i.a.createElement("div",_({className:r(Object(a.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":s},n)},l),t)},ValueContainer:we},Fe=function(e){return w({},Ne,e.components)},Be={clearIndicator:Te,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Oe,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:W,menu:function(e){var t,n=e.placement,r=e.theme,i=r.borderRadius,o=r.spacing,a=r.colors;return b(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),b(t,"backgroundColor",a.neutral0),b(t,"borderRadius",i),b(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),b(t,"marginBottom",o.menuGutter),b(t,"marginTop",o.menuGutter),b(t,"position","absolute"),b(t,"width","100%"),b(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:H,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,a=i.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=w({},e);return Object.keys(t).forEach((function(r){e[r]?n[r]=function(n,i){return t[r](e[r](n,i),i)}:n[r]=t[r]})),n}var ze={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},qe={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:ne(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:_e,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},He=1,We=function(e){function t(e){var n;g(this,t),b(O(O(n=T(this,x(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),b(O(O(n)),"blockOptionHover",!1),b(O(O(n)),"isComposing",!1),b(O(O(n)),"clearFocusValueOnUpdate",!1),b(O(O(n)),"commonProps",void 0),b(O(O(n)),"components",void 0),b(O(O(n)),"hasGroups",!1),b(O(O(n)),"initialTouchX",0),b(O(O(n)),"initialTouchY",0),b(O(O(n)),"inputIsHiddenAfterUpdate",void 0),b(O(O(n)),"instancePrefix",""),b(O(O(n)),"openAfterFocus",!1),b(O(O(n)),"scrollToFocusedOptionOnUpdate",!1),b(O(O(n)),"userIsDragging",void 0),b(O(O(n)),"controlRef",null),b(O(O(n)),"getControlRef",(function(e){n.controlRef=e})),b(O(O(n)),"focusedOptionRef",null),b(O(O(n)),"getFocusedOptionRef",(function(e){n.focusedOptionRef=e})),b(O(O(n)),"menuListRef",null),b(O(O(n)),"getMenuListRef",(function(e){n.menuListRef=e})),b(O(O(n)),"inputRef",null),b(O(O(n)),"getInputRef",(function(e){n.inputRef=e})),b(O(O(n)),"cacheComponents",(function(e){n.components=Fe({components:e})})),b(O(O(n)),"focus",n.focusInput),b(O(O(n)),"blur",n.blurInput),b(O(O(n)),"onChange",(function(e,t){var r=n.props;(0,r.onChange)(e,w({},t,{name:r.name}))})),b(O(O(n)),"setValue",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,i=n.props,o=i.closeMenuOnSelect,a=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})})),b(O(O(n)),"selectOption",(function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=n.state.selectValue;if(i)if(n.isOptionSelected(e,o)){var a=n.getOptionValue(e);n.setValue(o.filter((function(e){return n.getOptionValue(e)!==a})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(C(o),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,o)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()})),b(O(O(n)),"removeValue",(function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter((function(e){return n.getOptionValue(e)!==r})),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()})),b(O(O(n)),"clearValue",(function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})})),b(O(O(n)),"popValue",(function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})})),b(O(O(n)),"getOptionLabel",(function(e){return n.props.getOptionLabel(e)})),b(O(O(n)),"getOptionValue",(function(e){return n.props.getOptionValue(e)})),b(O(O(n)),"getStyles",(function(e,t){var r=Be[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r})),b(O(O(n)),"getElementId",(function(e){return"".concat(n.instancePrefix,"-").concat(e)})),b(O(O(n)),"getActiveDescendentId",(function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,i=t.focusedOption;if(i&&e){var o=r.focusable.indexOf(i),a=r.render[o];return a&&a.key}})),b(O(O(n)),"announceAriaLiveSelection",(function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:be(t,r)})})),b(O(O(n)),"announceAriaLiveContext",(function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:ye(t,w({},r,{label:n.props["aria-label"]}))})})),b(O(O(n)),"onMenuMouseDown",(function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())})),b(O(O(n)),"onMenuMouseMove",(function(e){n.blockOptionHover=!1})),b(O(O(n)),"onControlMouseDown",(function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()})),b(O(O(n)),"onDropdownIndicatorMouseDown",(function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}})),b(O(O(n)),"onClearIndicatorMouseDown",(function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout((function(){return n.focusInput()})))})),b(O(O(n)),"onScroll",(function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&I(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()})),b(O(O(n)),"onCompositionStart",(function(){n.isComposing=!0})),b(O(O(n)),"onCompositionEnd",(function(){n.isComposing=!1})),b(O(O(n)),"onTouchStart",(function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)})),b(O(O(n)),"onTouchMove",(function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||i>5}})),b(O(O(n)),"onTouchEnd",(function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)})),b(O(O(n)),"onControlTouchEnd",(function(e){n.userIsDragging||n.onControlMouseDown(e)})),b(O(O(n)),"onClearIndicatorTouchEnd",(function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)})),b(O(O(n)),"onDropdownIndicatorTouchEnd",(function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)})),b(O(O(n)),"handleInputChange",(function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()})),b(O(O(n)),"onInputFocus",(function(e){var t=n.props,r=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1})),b(O(O(n)),"onInputBlur",(function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))})),b(O(O(n)),"onOptionHover",(function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})})),b(O(O(n)),"shouldHideSelectedOptions",(function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t})),b(O(O(n)),"onKeyDown",(function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=n.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)n.removeValue(m);else{if(!i)return;r?n.popValue():s&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!u||!d||!h||f&&n.isOptionSelected(h,g))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":u?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):s&&o&&n.clearValue();break;case" ":if(a)return;if(!u){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":u?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":u?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!u)return;n.focusOption("pageup");break;case"PageDown":if(!u)return;n.focusOption("pagedown");break;case"Home":if(!u)return;n.focusOption("first");break;case"End":if(!u)return;n.focusOption("last");break;default:return}e.preventDefault()}}));var r=e.value;n.cacheComponents=Object(o.a)(n.cacheComponents,X).bind(O(O(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++He);var i=M(r),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return E(t,e),y(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==i){var o=M(e.value),a=this.buildMenuOptions(e,o),s=this.getNextFocusedValue(o),l=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:o,focusedOption:l,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,i,o,a=this.props,s=a.isDisabled,l=a.menuIsOpen,u=this.state.isFocused;(u&&!s&&e.isDisabled||u&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?j(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,i=this.state,o=i.selectValue,a=i.focusedValue;if(n){this.setState({focusedOption:null});var s=o.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var l=o.length-1,u=-1;if(o.length){switch(e){case"previous":u=0===s?0:-1===s?l:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,i=n.menuOptions,o=i.focusable;if(o.length){var a=0,s=o.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=s>0?s-1:o.length-1:"down"===e?a=(s+1)%o.length:"pageup"===e?(a=s-t)<0&&(a=0):"pagedown"===e?(a=s+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:_e(o[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ze):w({},ze,this.props.theme):ze}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,i=this.props,o=i.classNamePrefix,a=i.isMulti,s=i.isRtl,l=i.options,u=this.state.selectValue,c=this.hasValue();return{cx:R.bind(null,o),clearValue:e,getStyles:t,getValue:function(){return u},hasValue:c,isMulti:a,isRtl:s,options:l,selectOption:r,setValue:n,selectProps:i,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===r}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,i=void 0===r?"":r,o=e.options,a=function(e,r){var o=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),s=n.getOptionLabel(e),l=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:s,value:l,data:e},i))){var u=o?void 0:function(){return n.onOptionHover(e)},c=o?void 0:function(){return n.selectOption(e)},d="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:d,onClick:c,onMouseMove:u,onMouseOver:u,tabIndex:-1},data:e,isDisabled:o,isSelected:a,key:d,label:s,type:"option",value:l}}};return o.reduce((function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=a(t,"".concat(r,"-").concat(n));return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var o="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:o,data:t,options:i})}}else{var s=a(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,i=e.focusedOption,o=this.props,a=o.options,s=o.menuIsOpen,l=o.inputValue,u=o.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=i&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:a}):"",f=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:l,screenReaderMessage:u({count:this.countOptions()})});return"".concat(c," ").concat(d," ").concat(f," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,s=this.components.Input,l=this.state.inputIsHidden,u=r||this.getElementId("input");if(!n)return i.a.createElement(ie,{id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:A,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},d=this.commonProps,f=d.cx,p=d.theme,h=d.selectProps;return i.a.createElement(s,_({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:f,getStyles:this.getStyles,id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:a,theme:p,type:"text",value:o},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,s=t.SingleValue,l=t.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,f=c.isDisabled,p=c.isMulti,h=c.inputValue,m=c.placeholder,g=this.state,v=g.selectValue,y=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return h?null:i.a.createElement(l,_({},u,{key:"placeholder",isDisabled:f,isFocused:b}),m);if(p)return v.map((function(t){var s=t===y;return i.a.createElement(n,_({},u,{components:{Container:r,Label:o,Remove:a},isFocused:s,isDisabled:f,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=v[0];return i.a.createElement(s,_({},u,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,_({},t,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return i.a.createElement(e,_({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,_({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,_({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,s=t.MenuPortal,l=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,d=this.commonProps,f=this.state,p=f.focusedOption,h=f.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,y=m.isLoading,b=m.loadingMessage,w=m.minMenuHeight,E=m.maxMenuHeight,x=m.menuIsOpen,k=m.menuPlacement,O=m.menuPosition,T=m.menuPortalTarget,C=m.menuShouldBlockScroll,A=m.menuShouldScrollIntoView,P=m.noOptionsMessage,R=m.onMenuScrollToTop,M=m.onMenuScrollToBottom;if(!x)return null;var I,D=function(t){var n=p===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(c,_({},d,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=h.render.map((function(t){if("group"===t.type){t.type;var o=S(t,["type"]),a="".concat(t.key,"-heading");return i.a.createElement(n,_({},d,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return D(e)})))}if("option"===t.type)return D(t)}));else if(y){var j=b({inputValue:v});if(null===j)return null;I=i.a.createElement(l,d,j)}else{var L=P({inputValue:v});if(null===L)return null;I=i.a.createElement(u,d,L)}var N={minMenuHeight:w,maxMenuHeight:E,menuPlacement:k,menuPosition:O,menuShouldScrollIntoView:A},F=i.a.createElement(z,_({},d,N),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,l=r.maxHeight;return i.a.createElement(o,_({},d,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:s}),i.a.createElement(ve,{isEnabled:g,onTopArrive:R,onBottomArrive:M},i.a.createElement(me,{isEnabled:C},i.a.createElement(a,_({},d,{innerRef:e.getMenuListRef,isLoading:y,maxHeight:l}),I))))}));return T||"fixed"===O?i.a.createElement(s,_({},d,{appendTo:T,controlElement:this.controlRef,menuPlacement:k,menuPosition:O}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,s=this.state.selectValue;if(a&&!r){if(o){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:l})}var u=s.length>0?s.map((function(t,n){return i.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(re,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,_({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),i.a.createElement(t,_({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),i.a.createElement(o,_({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,_({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(r.Component);b(We,"defaultProps",qe);var Ge={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Ve=function(e){var t,n;return n=t=function(t){function n(){var e,t;g(this,n);for(var r=arguments.length,i=new Array(r),o=0;o1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return r===n||i===n},Je=w({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return Xe(e,t)}))||n.some((function(t){return Xe(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Ze=function(e){var t,n;return n=t=function(t){function n(e){var t;g(this,n),b(O(O(t=T(this,x(n).call(this,e)))),"select",void 0),b(O(O(t)),"onChange",(function(e,n){var r=t.props,i=r.getNewOptionData,o=r.inputValue,a=r.isMulti,s=r.onChange,l=r.onCreateOption,u=r.value;if("select-option"!==n.action)return s(e,n);var c=t.state.newOption,d=Array.isArray(e)?e:[e];if(d[d.length-1]!==c)s(e,n);else if(l)l(o);else{var f=i(o,o),p={action:"create-option"};s(a?[].concat(C(M(u)),[f]):f,p)}}));var r=e.options||[];return t.state={newOption:void 0,options:r},t}return E(n,t),y(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,i=e.getNewOptionData,o=e.inputValue,a=e.isLoading,s=e.isValidNewOption,l=e.value,u=e.options||[],c=this.state.newOption;c=s(o,M(l),u)?i(o,r(o)):void 0,this.setState({newOption:c,options:!t&&a||!c?u:"first"===n?[c].concat(C(u)):[].concat(C(u),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=_({},this.props),r=this.state.options;return i.a.createElement(e,_({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(r.Component),b(t,"defaultProps",Je),n},et=Ve(Ze(We)),tt=Ve(Ze(We)),nt=$e(tt),rt=function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=S(t,["in","onExited","appear","enter","exit"]);return i.a.createElement(e,n)}},it=function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,a=(e.onExited,S(e,["component","duration","in","onExited"])),s={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return i.a.createElement(h.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},(function(e){var n={style:w({},s[e])};return i.a.createElement(t,_({innerProps:n},a))}))},ot=function(e){function t(){var e,n;g(this,t);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=Fe({components:e}),n=t.Input,r=t.MultiValue,i=t.Placeholder,o=t.SingleValue,a=t.ValueContainer,s=S(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return w({Input:rt(n),MultiValue:at(r),Placeholder:st(i),SingleValue:lt(o),ValueContainer:ut(a)},s)},dt=ct(),ft=(dt.Input,dt.MultiValue,dt.Placeholder,dt.SingleValue,dt.ValueContainer,Object(o.a)(ct,X)),pt=Ve(We);t.default=pt},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getEditorComponents=t.getEditorControl=void 0;var r=u(n(0)),i=u(n(1)),o=u(n(26)),a=u(n(1181)),s=u(n(1414)),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let d,f=()=>[];t.getEditorControl=()=>d;t.getEditorComponents=()=>f();class p extends r.default.Component{constructor(e){super(e),c(this,"handleMode",e=>{this.setState({mode:e,pendingFocus:!0}),localStorage.setItem("cms.md-mode",e)}),c(this,"processRef",e=>this.ref=e),c(this,"setFocusReceived",()=>{this.setState({pendingFocus:!1})}),d=e.editorControl,f=e.getEditorComponents,this.state={mode:localStorage.getItem("cms.md-mode")||"visual",pendingFocus:!1}}render(){const{onChange:e,onAddAsset:t,getAsset:n,value:r,classNameWrapper:i,field:o,getEditorComponents:u,resolveWidget:c,t:d}=this.props,{mode:f,pendingFocus:p}=this.state,h=(0,l.jsx)("div",{className:"cms-editor-visual",ref:this.processRef},(0,l.jsx)(s.default,{onChange:e,onAddAsset:t,onMode:this.handleMode,getAsset:n,className:i,value:r,field:o,getEditorComponents:u,resolveWidget:c,pendingFocus:p&&this.setFocusReceived,t:d})),m=(0,l.jsx)("div",{className:"cms-editor-raw",ref:this.processRef},(0,l.jsx)(a.default,{onChange:e,onAddAsset:t,onMode:this.handleMode,getAsset:n,className:i,value:r,field:o,pendingFocus:p&&this.setFocusReceived,t:d}));return"visual"===f?h:m}}t.default=p,c(p,"propTypes",{onChange:i.default.func.isRequired,onAddAsset:i.default.func.isRequired,getAsset:i.default.func.isRequired,classNameWrapper:i.default.string.isRequired,editorControl:i.default.func.isRequired,value:i.default.string,field:o.default.map.isRequired,getEditorComponents:i.default.func,t:i.default.func.isRequired}),c(p,"defaultProps",{value:""})},function(e,t,n){"use strict";function r(e){if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return a;if("object"==typeof e)return("length"in e?o:i)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function i(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function o(e){var t=function(e){for(var t=[],n=e.length,i=-1;++i","&","`"]),d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;function p(e,t){var n=t||{},r=n.subset,i=r?g(r):c,o=n.escapeOnly,a=n.omitOptionalSemicolons;return e=e.replace(i,(function(e,t,r){return h(e,r.charAt(t+1),n)})),r||o?e:e.replace(d,(function(e,t,n){return m(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charAt(t+2),a)})).replace(f,(function(e,t,r){return h(e,r.charAt(t+1),n)}))}function h(e,t,n){var r,o,c=n.useShortestReferences,d=n.omitOptionalSemicolons;return(c||n.useNamedReferences)&&l.call(u,e)&&(r=function(e,t,n,r){var o="&"+e;if(n&&l.call(i,e)&&-1===s.indexOf(e)&&(!r||t&&"="!==t&&!a(t)))return o;return o+";"}(u[e],t,d,n.attribute)),!c&&r||(o=m(e.charCodeAt(0),t,d)),r&&(!c||r.length";return e};var i=/\s/},function(e,t,n){"use strict";e.exports=function(e,t){var n,r=String(e),i=0;if("string"!=typeof t||1!==t.length)throw new Error("Expected character");n=r.indexOf(t);for(;-1!==n;)i++,n=r.indexOf(t,n+1);return i}},function(e,t,n){"use strict";e.exports=function(e){var t=-1===e.indexOf('"')?'"':"'";return t+e+t}},function(e,t,n){"use strict";var r=n(591),i=n(593),o=n(596),a=n(597),s=n(600),l=n(1319);e.exports=r([o,i,a,s,l])},function(e,t,n){"use strict";e.exports=function(e){return e.toLowerCase()}},function(e,t,n){"use strict";function r(e){if("string"==typeof e)return function(e){return function(t){return Boolean(t&&t.type===e)}}(e);if(null==e)return a;if("object"==typeof e)return("length"in e?o:i)(e);if("function"==typeof e)return e;throw new Error("Expected function, string, or object as test")}function i(e){return function(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function o(e){var t=function(e){for(var t=[],n=e.length,i=-1;++i4&&"data"===n.slice(0,4)&&a.test(t)&&("-"===t.charAt(4)?d=function(e){var t=e.slice(5).replace(s,c);return"data"+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(s.test(t))return e;"-"!==(t=t.replace(l,u)).charAt(0)&&(t="-"+t);return"data"+t}(t),f=i);return new f(d,t)};var a=/^data[-a-z0-9.:_]+$/i,s=/-[a-z]/g,l=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function c(e){return e.charAt(1).toUpperCase()}},function(e,t,n){"use strict";const r=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];t.REPLACEMENT_CHARACTER="�",t.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},t.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},t.isSurrogate=function(e){return e>=55296&&e<=57343},t.isSurrogatePair=function(e){return e>=56320&&e<=57343},t.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},t.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},t.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||r.indexOf(e)>-1}},function(e,t,n){"use strict";e.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},function(e,t,n){"use strict";const r=n(114);e.exports=class extends r{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t)}_getOverriddenMethods(e){return{_err(t){e._reportError(t)}}}}},function(e,t,n){"use strict";e.exports=function(e,t){return i(r(e,t))};var r=n(63),i=n(382)},function(e,t,n){"use strict";e.exports=i,i.needed=function(e){var t=e.length,n=-1;for(;++n|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function a(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,A=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/,P=l.isReservedIdentifier||!1;function R(e,t){var n,r=e.next();if(_[r]){var i=_[r](e,t);if(!1!==i)return i}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,i=!1,o=!1;null!=(r=e.next());){if(r==n&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!w)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(S.test(r))return u=r,null;if(O.test(r)){if(e.backUp(1),e.match(T))return"number";e.next()}if("/"==r){if(e.eat("*"))return t.tokenize=M,M(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(C.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(C););return"operator"}if(e.eatWhile(A),k)for(;e.match(k);)e.eatWhile(A);var o=e.current();return s(h,o)?(s(v,o)&&(u="newstatement"),s(y,o)&&(c=!0),"keyword"):s(m,o)?"type":s(g,o)||P&&P(o)?(s(v,o)&&(u="newstatement"),"builtin"):s(b,o)?"atom":"variable"}function M(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function I(e,t){l.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var a=t.context;if(e.sol()&&(null==a.align&&(a.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return I(e,t),null;u=c=null;var s=(t.tokenize||R)(e,t);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),";"==u||":"==u||","==u&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==u)n(t,e.column(),"}");else if("["==u)n(t,e.column(),"]");else if("("==u)n(t,e.column(),")");else if("}"==u){for(;"statement"==a.type;)a=r(t);for("}"==a.type&&(a=r(t));"statement"==a.type;)a=r(t)}else u==a.type?r(t):E&&(("}"==a.type||"top"==a.type)&&";"!=u||"statement"==a.type&&"newstatement"==u)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),_.token){var d=_.token(e,t,s);void 0!==d&&(s=d)}return"def"==s&&!1===l.styleDefs&&(s="variable"),t.startOfLine=!1,t.prevToken=c?"def":s||u,I(e,t),s},indent:function(t,n){if(t.tokenize!=R&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0),o=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(_.indent){var a=_.indent(t,r,n,d);if("number"==typeof a)return a}var s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:f):!r.align||p&&")"==r.type?")"!=r.type||o?r.indented+(o?0:d)+(o||!s||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(o?0:1)},electricInput:x?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",u="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",c="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",d="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=a("int long char short double float unsigned signed void bool"),p=a("SEL instancetype id Class Protocol BOOL");function h(e){return s(f,e)||/.+_t$/.test(e)}function m(e){return h(e)||s(p,e)}var g="case do else for if switch while struct enum union";function v(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=v;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function y(e,t){return"type"==t.prevToken&&"type"}function b(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function _(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=k,k(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function E(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function x(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function k(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function S(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.types),i(n.builtin),i(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=O,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),S("text/x-kotlin",{name:"clike",keywords:a("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:a("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,i=!1,o=!1;!e.eol();){if(!n&&!i&&e.match('"')){o=!0;break}if(n&&e.match('"""')){o=!0;break}r=e.next(),!i&&"$"==r&&e.match("{")&&e.skipTo("}"),i=!i&&"\\"==r&&!n}return!o&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=T(1),t.tokenize(e,t))},indent:function(e,t,n,r){var i=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==i||("}"==e.prevToken||")"==e.prevToken)&&"."==i?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),S(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":v},modeProps:{fold:["brace","include"]}}),S("text/x-nesc",{name:"clike",keywords:a(l+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:h,blockKeywords:a(g),atoms:a("null true false"),hooks:{"#":v},modeProps:{fold:["brace","include"]}}),S("text/x-objectivec",{name:"clike",keywords:a(l+" "+c),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a("struct enum union @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:b,hooks:{"#":v,"*":y},modeProps:{fold:["brace","include"]}}),S("text/x-objectivec++",{name:"clike",keywords:a(l+" "+c+" "+u),types:m,builtin:a(d),blockKeywords:a(g+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a("struct enum union @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:b,hooks:{"#":v,"*":y,u:w,U:w,L:w,R:w,0:_,1:_,2:_,3:_,4:_,5:_,6:_,7:_,8:_,9:_,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&E(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),S("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:h,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":v},modeProps:{fold:["brace","include"]}});var C=null;S("text/x-ceylon",{name:"clike",keywords:a("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=function e(t){return function(n,r){for(var i,o=!1,a=!1;!n.eol();){if(!o&&n.match('"')&&("single"==t||n.match('""'))){a=!0;break}if(!o&&n.match("``")){C=e(t),a=!0;break}i=n.next(),o="single"==t&&!o&&"\\"==i}return a&&(r.tokenize=null),"string"}}(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!C||!e.match("`"))&&(t.tokenize=C,C=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})}(n(4))},function(e,t,n){!function(e){"use strict";e.defineMode("ruby",(function(t){function n(e){for(var t={},n=0,r=e.length;n-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}(e)?u(p(a,"string-2",!0),e,t):"operator";if("%"==a){var l="string",c=!0;e.eat("s")?l="atom":e.eat(/[WQ]/)?l="string":e.eat(/[r]/)?l="string-2":e.eat(/[wxq]/)&&(l="string",c=!1);var d=e.eat(/[^\w\s=]/);return d?(s.propertyIsEnumerable(d)&&(d=s[d]),u(p(d,l,c,!0),e,t)):"operator"}if("#"==a)return e.skipToEnd(),"comment";if("<"==a&&(n=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return u((i=n[2],o=n[1],function(e,t){return o&&e.eatSpace(),e.match(i)?t.tokenize.pop():e.skipToEnd(),"string"}),e,t);if("0"==a)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(a))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==a){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==a)return e.eat("'")?u(p("'","atom",!1),e,t):e.eat('"')?u(p('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==a&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==a)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(a))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=a||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(a))return r=a,null;if("-"==a&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(a)){var f=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=a||f||(r="."),"operator"}return null}return r="|",null}function d(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=d(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=d(e+1));return c(t,n)}}function f(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,c(t,n))}}function p(e,t,n,r){return function(i,o){var a,s=!1;for("read-quoted-paused"===o.context.type&&(o.context=o.context.prev,i.eat("}"));null!=(a=i.next());){if(a==e&&(r||!s)){o.tokenize.pop();break}if(n&&"#"==a&&!s){if(i.eat("{")){"}"==e&&(o.context={prev:o.context,type:"read-quoted-paused"}),o.tokenize.push(d());break}if(/[@\$]/.test(i.peek())){o.tokenize.push(f());break}}s=!s&&"\\"==a}return t}}function h(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[c],indented:0,context:{type:"top",indented:-t.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){r=null,e.sol()&&(t.indented=e.indentation());var n,s=t.tokenize[t.tokenize.length-1](e,t),l=r;if("ident"==s){var u=e.current();"keyword"==(s="."==t.lastTok?"property":i.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(u)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable")&&(l=u,o.propertyIsEnumerable(u)?n="indent":a.propertyIsEnumerable(u)?n="dedent":"if"!=u&&"unless"!=u||e.column()!=e.indentation()?"do"==u&&t.context.indented-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,o){if(o.innerActive){var a=o.innerActive;if(u=i.string,!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((d=a.close?r(u,a.close,i.pos,a.parseDelimiters):-1)==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";d>-1&&(i.string=u.slice(0,d));var s=a.mode.token(i,o.inner);return d>-1&&(i.string=u),d==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(s=s?s+" "+a.innerStyle:a.innerStyle),s}for(var l=1/0,u=i.string,c=0;c",(function(e){return s.Block.isBlockList(e)})),change:l("Change",(function(e){return s.Change.isChange(e)})),data:l("Data",(function(e){return s.Data.isData(e)})),document:l("Document",(function(e){return s.Document.isDocument(e)})),inline:l("Inline",(function(e){return s.Inline.isInline(e)})),inlines:l("Inline",(function(e){return s.Inline.isInlineList(e)})),leaf:l("Leaf",(function(e){return s.Leaf.isLeaf(e)})),leaves:l("List",(function(e){return s.Leaf.isLeafList(e)})),mark:l("Mark",(function(e){return s.Mark.isMark(e)})),marks:l("Set",(function(e){return s.Mark.isMarkSet(e)})),node:l("Node",(function(e){return s.Node.isNode(e)})),nodes:l("List",(function(e){return s.Node.isNodeList(e)})),range:l("Range",(function(e){return s.Range.isRange(e)})),ranges:l("List",(function(e){return s.Range.isRangeList(e)})),selection:l("Selection",(function(e){return s.Selection.isSelection(e)})),value:l("Value",(function(e){return s.Value.isValue(e)})),text:l("Text",(function(e){return s.Text.isText(e)})),texts:l("List",(function(e){return s.Text.isTextList(e)}))},c=n(26),d=n.n(c),f=n(74),p=n.n(f),h=n(14),m=n(38),g=n.n(m),v=n(659),y=n.n(v),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_="object"===("undefined"==typeof window?"undefined":b(window))&&"object"===("undefined"==typeof document?"undefined":b(document))&&9===document.nodeType,w=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},E=void 0;if(_){var x=!0,k=!1,S=void 0;try{for(var O,T=[["edge",/Edge\/([0-9\._]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["android",/Android\s([0-9\.]+)/],["safari",/Version\/([0-9\._]+).*Safari/]][Symbol.iterator]();!(x=(O=T.next()).done);x=!0){var C=O.value,A=w(C,2),P=A[0];if(A[1].test(window.navigator.userAgent)){E=P;break}}}catch(e){k=!0,S=e}finally{try{!x&&T.return&&T.return()}finally{if(k)throw S}}}var R=void 0;if(_){var M=!0,I=!1,D=void 0;try{for(var j,L=[["ios",/os ([\.\_\d]+) like mac os/i],["macos",/mac os x/i],["android",/android/i],["firefoxos",/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/i],["windows",/windows\s*(?:nt)?\s*([\.\_\d]+)/i]][Symbol.iterator]();!(M=(j=L.next()).done);M=!0){var N=j.value,F=w(N,2),B=F[0];if(F[1].test(window.navigator.userAgent)){R=B;break}}}catch(e){I=!0,D=e}finally{try{!M&&L.return&&L.return()}finally{if(I)throw D}}}var U=[];if(_){var z=!0,q=!1,H=void 0;try{for(var W,G=[["inputeventslevel1",function(e){return"inputType"in(e.InputEvent?new e.InputEvent("input"):{})}],["inputeventslevel2",function(e){var t=e.document.createElement("div");return t.contentEditable=!0,"onbeforeinput"in t}]][Symbol.iterator]();!(z=(W=G.next()).done);z=!0){var V=W.value,K=w(V,2),$=K[0];(0,K[1])(window)&&U.push($)}}catch(e){q=!0,H=e}finally{try{!z&&G.return&&G.return()}finally{if(q)throw H}}}var Y=[[/^9([.]0|)/,28],[/^8[.]1/,27],[/^8([.]0|)/,26],[/^7[.]1/,25],[/^7([.]0|)/,24],[/^6([.]0|)/,23],[/^5[.]1/,22],[/^5([.]0|)/,21],[/^4[.]4/,20]];var Q="firefox"===E,X="safari"===E,J="ie"===E,Z="edge"===E,ee="android"===R,te="ios"===R,ne="macos"===R,re=function(){if("android"!==R)return null;var e=window.navigator.userAgent.match(/Android\s([0-9\.]+)/);if(null==e)return null;var t=e[1],n=!0,r=!1,i=void 0;try{for(var o,a=Y[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,l=w(s,2),u=l[0],c=l[1];if(t.match(u))return c}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}(),ie=(U.includes("inputeventslevel1"),U.includes("inputeventslevel2")||ee&&(28===re||null===re)),oe=n(392),ae=n.n(oe),se=n(131),le=n.n(se),ue=n(3),ce=n(298),de={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z"},fe={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},pe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:"ctrl+y"},he={},me=te||ne,ge=!me;[].concat(Object.keys(de)).concat(Object.keys(fe)).concat(Object.keys(pe)).forEach((function(e){var t="is"+e[0].toUpperCase()+e.slice(1);if(!he[t]){var n=de[e],r=fe[e],i=pe[e],o=n&&Object(ce.isKeyHotkey)(n),a=r&&Object(ce.isKeyHotkey)(r),s=i&&Object(ce.isKeyHotkey)(i);he[t]=function(e){return!(!o||!o(e))||(!!(me&&a&&a(e))||!!(ge&&s&&s(e)))}}}));var ve=he,ye=n(50),be=n.n(ye),_e=n(196),we=n(282),Ee=n(44),xe=function(e,t){if(!e)throw new Error("Invariant failed: "+(t||""))},ke=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Te++,n=e.placeholder,r=e.when,o=e.style,a=void 0===o?{}:o;function s(e,n,i){if(!n.query(r,e))return i();var o=i(),a=e.texts(),s=Se(a,1)[0],l=e.texts({direction:"backward"}),u=Se(l,1)[0],c=Se(s,2),d=c[0],f=c[1],p=Se(u,2),h=p[0],m=p[1],g={type:"placeholder",data:{key:t},anchor:{key:d.key,offset:0,path:f},focus:{key:h.key,offset:h.text.length,path:m}};return[].concat(Oe(o),[g])}function l(e,r,o){var s=e.children,l=e.decoration;if("placeholder"===l.type&&l.data.get("key")===t){var u=ke({pointerEvents:"none",display:"inline-block",width:"0",maxWidth:"100%",whiteSpace:"nowrap",opacity:"0.333",verticalAlign:"text-top"},a);return i.a.createElement("span",null,i.a.createElement("span",{contentEditable:!1,style:u},n),s)}return o()}return xe("string"==typeof n,"You must pass `SlateReactPlaceholder` an `options.placeholder` string."),xe("string"==typeof r||"function"==typeof r,"You must pass `SlateReactPlaceholder` an `options.when` query."),{decorateNode:s,renderDecoration:l}},Ae=function(e,t){return e===t};var Pe=function(e,t){var n;void 0===t&&(t=Ae);var r,i=[],o=!1,a=function(e,n){return t(e,i[n],n)};return function(){for(var t=arguments.length,s=new Array(t),l=0;l1?n-1:0),i=1;i1?n-1:0),i=1;ic+s&&(N=L+h+_-s),ju+l&&(F=j+p+v+a.height-l),r?t.scrollTo(N,F):(n.scrollTop=F,n.scrollLeft=N)}}function gt(e){if(J){var t=window.document.body.createTextRange();t.collapse(),t.select()}else e.removeAllRanges()}var vt=/Permission denied to access property "nodeType"/,yt=p()("slate:content");yt.update=p()("slate:update");var bt=function(e){function t(){var e,n,r;We(this,t);for(var o=arguments.length,a=Array(o),s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=_t.reduce((function(t,n){return n in e&&(t[n]=e[n]),t}),{});return t}function Et(){return{decorateNode:function(){return[]},renderAnnotation:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)},renderBlock:function(e){var t=e.attributes,n=e.children;return i.a.createElement("div",Ke({},t,{style:{position:"relative"}}),n)},renderDecoration:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)},renderDocument:function(e){return e.children},renderEditor:function(e){return e.children},renderInline:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",Ke({},t,{style:{position:"relative"}}),n)},renderMark:function(e){var t=e.attributes,n=e.children;return i.a.createElement("span",t,n)}}}function xt(){return{queries:{findDOMNode:function(e,t){t=s.PathUtils.create(t);var n=e.tmp.contentRef.current;return n?t.size?function e(t,n){if(!t)return null;if(!n.size)return t.ref?t.ref.current||null:t||null;var r=n.first(),i=n.rest();return e(t.tmp.nodeRefs[r],i)}(n.tmp.nodeRef.current,t):n.ref.current||null:null},findDOMPoint:function(e,t){var n=e.findDOMNode(t.path),r=0;if(!n)return null;var i=Array.from(n.querySelectorAll(He.STRING+", "+He.ZERO_WIDTH)),o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,d=c.childNodes[0],f=d.textContent.length,p=f;c.hasAttribute(Le)&&(p=parseInt(c.getAttribute(Le),10));var h=r+p;if(t.offset<=h)return{node:d,offset:Math.min(f,Math.max(0,t.offset-r))};r=h}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return null},findDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=t.isBackward,o=t.isCollapsed,a=e.findDOMPoint(n),s=o?a:e.findDOMPoint(r);if(!a||!s)return null;var l=g()(a.node).document.createRange(),u=i?s:a,c=i?a:s;return l.setStart(u.node,u.offset),l.setEnd(c.node,c.offset),l},findEventRange:function(e,t){t.nativeEvent&&(t=t.nativeEvent);var n=t,r=n.clientX,i=n.clientY,o=n.target;if(null==r||null==i)return null;var a=e.value.document,s=e.findPath(t.target);if(!s)return null;var l=a.getNode(s);if(e.isVoid(l)){var u=o.getBoundingClientRect(),c="inline"===l.object?r-u.left=r.length?(a=!0,o=t-1,n="backward"):o<0?(s=!0,o=t+1,n="forward"):(i=r[o],"forward"===n&&o++,"backward"===n&&o--);return i||null}function St(e,t){if(e===t)return null;var n=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=e,o=0;-1!==o&&-1!==(o=i.indexOf(Ct,o));)r>o&&r--,i=""+i.slice(0,o)+i.slice(o+1);var a=i.charAt(i.length-1);n&&"\n"===a&&(i=i.slice(0,-1));var s=i.length;return r>s&&(r=s),{text:i,offset:r}}function Mt(e){var t=new window.MutationObserver((function(e){var t;Tt("flush"),(t=l).push.apply(t,Xe(e)),d()})),n=null,r={rootEl:null,diff:null,range:null,domNode:null};function i(){Tt("clearAction"),r.diff=null,r.domNode=null}function o(){Tt("applyDiff");var t=r.diff;if(null!=t){Tt("applyDiff:run");var n=e.value.document,i=e.value.selection.moveAnchorTo(t.path,t.start).moveFocusTo(t.path,t.end);i=n.resolveRange(i),e.insertTextAtRange(i,t.insertText)}}function a(){Tt("splitBlock"),Pt(e,(function(){o(),r.range?e.select(r.range):Tt("splitBlock:NO-SELECTION"),e.splitBlock().focus().restoreDOM(),i()}))}var s=null,l=[],u=null,c=!1;function d(){s&&(window.cancelAnimationFrame(s),s=null),c=!0,u&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame((function(){l.length>0&&function(t){if(Tt("flushAction",t.length,t),r.range&&!r.range.isCollapsed)return void Pt(e,(function(){e.select(r.range).deleteBackward().focus().restoreDOM()}));if(t.length>1){if(t.find((function(t){if("childList"!==t.type)return!1;if(0===t.addedNodes.length)return!1;var n=t.addedNodes[0];if(n.nodeType===window.Node.TEXT_NODE&&"\n"===n.textContent)return!0;if(n.nodeType!==window.Node.ELEMENT_NODE)return!1;var r=n.dataset.key;return null!=r&&!!e.value.document.getClosestBlock(r)})))return void a()}var s=t[0];"characterData"===s.type?function(t){Tt("resolveDOMNode");var n=e.value.document,i=t.closest("[data-key]").dataset.key,o=n.getPath(i),a=n.getClosestBlock(i),s=n.getDescendant(i),l=s.text,u=a.nodes.last()===s,c=Rt(t.textContent,0,u).text;if(c===l)return void(r.diff=null);var d=function(e,t){var n=St(e,t);if(null==n)return null;var r=Ot(t,n),i=Ot(e,n);return{start:n.start,end:e.length-n.end,cursor:n.start+r.length,insertText:r,removeText:i}}(l,c);r.diff={path:o,start:d.start,end:d.end,insertText:d.insertText},Tt("resolveDOMNode:diff",r.diff)}(s.target.parentNode):"childList"===s.type&&(s.removedNodes.length>0?1===t.length?function(t){if(Tt("removeNode"),t.nodeType!==window.Node.ELEMENT_NODE)return;var n=e.value,r=n.document,i=n.selection,o=e.findNode(t),a=r.resolveRange(i.moveToRangeOfNode(o));Pt(e,(function(){e.select(a).delete().restoreDOM()}))}(s.removedNodes[0]):(Tt("mergeBlock"),n.requestAnimationFrame((function(){Pt(e,(function(){o(),e.select(r.range).deleteBackward().focus().restoreDOM(),i()}))}))):s.addedNodes.length>0&&a())}(l),u=null,l=[],c=!1}))}return{clearDiff:function(){Tt("clearDIff"),r.diff=null},connect:function(){Tt("connect",{rootEl:i});var i=e.findDOMNode([]);r.rootEl!==i&&(Tt("connect:run"),n=g()(i),t.observe(i,{childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0}))},disconnect:function(){Tt("disconnect"),t.disconnect(),r.rootEl=null},onKeyDown:d,onCompositionStart:function(){Tt("onCompositionStart")},onCompositionEnd:function(){Tt("onCompositionEnd"),window.setTimeout((function(){r.diff&&(Tt("onCompositionEnd:applyDiff"),Pt(e,(function(){o();var t=n.getSelection().getRangeAt(0),r=Rt(t.startContainer.textContent,t.startOffset),i=e.findRange({anchorNode:t.startContainer,anchorOffset:0,focusNode:t.startContainer,focusOffset:0,isCollapsed:!0}).moveTo(r.offset);e.select(i).focus().restoreDOM()}))),i()}),20)},onSelect:function(t){Tt("onSelect:try"),t=t.nativeEvent?t.nativeEvent:t,window.cancelAnimationFrame(s),s=null,c||(s=window.requestAnimationFrame((function(){Tt("onSelect:save-selection");var n,a=g()(t.target).getSelection(),s=e.findRange(a),l=Rt(a.anchorNode.textContent,a.anchorOffset),u=Rt(a.focusNode.textContent,a.focusOffset);s.anchor.offset!==l.offset&&(s=s.set("anchor",s.anchor.set("offset",l.offset))),s.focus.offset!==u.offset&&(s=s.set("focus",s.focus.set("offset",u.offset))),Tt("onSelect:save-data",{domSelection:(n=a,{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),range:s.toJS()}),a.isCollapsed&&r.node!==a.anchorNode&&null!=r.diff&&(Tt("onSelect:applyDiff",r.diff),o(),e.select(s),i()),r.range=s,r.node=a.anchorNode})))}}}function It(e){var t=new Mt(e.editor);return{onComponentDidMount:function(){t.connect()},onComponentDidUpdate:function(){t.connect()},onComponentWillUnmount:function(){t.disconnect()},onCompositionEnd:function(){t.onCompositionEnd()},onCompositionStart:function(){t.onCompositionStart()},onRender:function(){t.disconnect(),t.clearDiff()},onSelect:function(e){!function(e){var t=e.getSelection(),n=t.anchorNode;if(null!=n){var r=n.parentElement.dataset;if(!!r&&"n"===r.slateZeroWidth&&1===n.textContent.length&&0!==t.anchorOffset){var i=e.document.createRange();i.setStart(n,0),i.setEnd(n,0),t.removeAllRanges(),t.addRange(i)}}}(g()(e.target)),t.onSelect(e)}}}function Dt(){var e={},t=!0,n=!1,r=void 0;try{for(var i,o=Re[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){e[i.value]=function(e,t,n){}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return e}var jt={FRAGMENT:"application/x-slate-fragment",HTML:"text/html",NODE:"application/x-slate-node",RICH:"text/rtf",TEXT:"text/plain"},Lt=jt.FRAGMENT,Nt=jt.HTML,Ft=jt.TEXT;function Bt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};Object(Ee.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `cloneFragment` utility takes an `editor` instead of a `value`.");var r=g()(e.target),i=r.getSelection(),o=t.value,a=o.document,l=o.fragment,u=o.selection,c=u.start,d=u.end,f=a.getClosestVoid(c.path,t),p=a.getClosestVoid(d.path,t);if(!i.isCollapsed||f){var h=_e.default.serializeNode(l),m=i.getRangeAt(0),v=m.cloneContents(),y=v.childNodes[0];if(v.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(y=e)})),p){var b=m.cloneRange(),_=a.getPath(p.key);if(_){var w=t.findDOMNode(_);b.setEndAfter(w),v=b.cloneContents()}}if(f&&(y=v.childNodes[0].childNodes[1].firstChild),[].slice.call(v.querySelectorAll(He.ZERO_WIDTH)).forEach((function(e){var t="n"===e.getAttribute(qe);e.textContent=t?"\n":""})),3===y.nodeType){var E=r.document.createElement("span");E.style.whiteSpace="pre",E.appendChild(y),v.appendChild(E),y=E}y.setAttribute(Ie,h);var x=s.Value.create({document:l}),k=we.default.serialize(x),S=r.document.createElement("div");if(S.appendChild(v),e.clipboardData&&e.clipboardData.setData&&!J)return e.preventDefault(),e.clipboardData.setData(Ft,k),e.clipboardData.setData(Lt,h),e.clipboardData.setData(Nt,S.innerHTML),void n();var O=e.target.closest(He.EDITOR);S.setAttribute("contenteditable",!0),S.style.position="absolute",S.style.left="-9999px",O.appendChild(S),i.selectAllChildren(S),r.requestAnimationFrame((function(){O.removeChild(S),gt(i),i.addRange(m),n()}))}}var Ut=jt.FRAGMENT,zt=jt.HTML,qt=jt.NODE,Ht=jt.RICH,Wt=jt.TEXT,Gt=/ data-slate-fragment="([^\s"]+)"/;function Vt(e){!J&&e.nativeEvent&&(e=e.nativeEvent);var t=e.dataTransfer||e.clipboardData,n=Kt(t,Ut),r=Kt(t,qt),i=Kt(t,zt),o=Kt(t,Ht),a=Kt(t,Wt),s=void 0;if(!n&&i&&~i.indexOf(" "+Ie+'="')){var l=Gt.exec(i),u=Qe(l,2),c=(u[0],u[1]);c&&(n=c)}if(a){var d=function(e){var t="SLATE-DATA-EMBED::";if(e.substring(0,t.length)!==t)return{TEXT:e};try{return JSON.parse(e.substring(t.length))}catch(e){throw new Error("Unable to parse custom Slate drag event data.")}}(a);d[Ut]&&(n=d[Ut]),d[qt]&&(r=d[qt]),d[Wt]&&(a=d[Wt])}n&&(n=_e.default.deserializeNode(n)),r&&(r=_e.default.deserializeNode(r));try{t.items&&t.items.length?s=Array.from(t.items).map((function(e){return"file"===e.kind?e.getAsFile():null})).filter((function(e){return e})):t.files&&t.files.length&&(s=Array.from(t.files))}catch(e){t.files&&t.files.length&&(s=Array.from(t.files))}var f={files:s,fragment:n,html:i,node:r,rich:o,text:a};return f.type=function(e){return e.fragment?"fragment":e.node?"node":e.rich&&e.html?"html":e.rich&&e.text?"text":e.files&&e.files.length?"files":e.html?"html":e.text?"text":"unknown"}(f),f}function Kt(e,t){return e.types&&e.types.length?-1!==Array.from(e.types).indexOf(t)&&e.getData(t)||null:t===Wt&&e.getData("Text")||null}var $t=jt.TEXT;function Yt(e,t,n){var r=jt[t.toUpperCase()];if(!r)throw new Error('Cannot set unknown transfer type "'+r+'".');e.nativeEvent&&(e=e.nativeEvent);var i=e.dataTransfer||e.clipboardData;try{i.setData(r,n),i.setData("text",i.getData("text"))}catch(e){var o="SLATE-DATA-EMBED::",a=i.getData($t),s={};if(a.substring(0,o.length)===o)try{s=JSON.parse(a.substring(o.length))}catch(e){throw new Error("Failed to parse Slate data from `DataTransfer` object.")}else s[$t]=a;s[r]=n;var l=""+o+JSON.stringify(s);i.setData($t,l)}}var Qt=p()("slate:after");function Xt(){var e=null,t=!1;return{onBeforeInput:function(e,t,n){var r=t.value;if(!!e.nativeEvent)return e.preventDefault(),t.insertText(e.data),n();var i=e.getTargetRanges(),o=Qe(i,1)[0];if(!o)return n();Qt("onBeforeInput",{event:e}),e.preventDefault();var a=r.document,s=r.selection,l=t.findRange(o);switch(e.inputType){case"deleteByDrag":case"deleteByCut":case"deleteContent":case"deleteContentBackward":case"deleteContentForward":t.deleteAtRange(l);break;case"deleteWordBackward":t.deleteWordBackwardAtRange(l);break;case"deleteWordForward":t.deleteWordForwardAtRange(l);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":t.deleteLineBackwardAtRange(l);break;case"deleteSoftLineForward":case"deleteHardLineForward":t.deleteLineForwardAtRange(l);break;case"insertLineBreak":case"insertParagraph":a.hasVoidParent(s.start.path,t)?t.moveToStartOfNextText():t.splitBlockAtRange(l);break;case"insertFromYank":case"insertReplacementText":case"insertText":var u=null==e.data?e.dataTransfer.getData("text/plain"):e.data;if(null==u)break;t.insertTextAtRange(l,u,s.marks),s.marks&&r.document!==t.value.document&&t.select({marks:null})}n()},onBlur:function(e,t,n){Qt("onBlur",{event:e}),t.blur(),n()},onClick:function(e,t,n){if(t.readOnly)return n();var r=t.value.document,i=t.findPath(e.target);if(!i)return n();Qt("onClick",{event:e});var o=r.getNode(i),a=r.getAncestors(i);o&&(t.isVoid(o)||a.some((function(e){return t.isVoid(e)})))&&t.focus().moveToEndOfNode(o),n()},onCopy:function(e,t,n){Qt("onCopy",{event:e}),Bt(e,t),n()},onCut:function(e,t,n){Qt("onCut",{event:e}),Bt(e,t,(function(){var e=t.value,n=e.document,r=e.selection,i=r.end,o=void 0;if(r.isCollapsed){var a=!0,s=!1,l=void 0;try{for(var u,c=n.ancestors(i.path)[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var d=u.value,f=Qe(d,2),p=f[0],h=f[1];if(t.isVoid(p)){o=h;break}}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}}o?t.removeNodeByKey(o):t.delete()})),n()},onDragEnd:function(t,n,r){Qt("onDragEnd",{event:t}),e=null,r()},onDragStart:function(t,n,r){Qt("onDragStart",{event:t}),e=!0;var i=n.value,o=i.document,a=n.findPath(t.target),s=o.getNode(a),l=o.getAncestors(a),u=s&&(n.isVoid(s)||l.some((function(e){return n.isVoid(e)}))),c=i.blocks.some((function(e){return e===s}));u&&!c&&n.moveToRangeOfNode(s);var d=n.value.fragment;Yt(t,"fragment",_e.default.serializeNode(d)),r()},onDrop:function(t,n,r){var i=n.value,o=i.document,a=i.selection,s=g()(t.target),l=n.findEventRange(t);if(!l)return r();Qt("onDrop",{event:t});var u=Vt(t),c=u.type,d=u.fragment,f=u.text;n.focus();var p=n.findDOMNode(l.focus.path);p&&p.dispatchEvent(new MouseEvent("mouseup",{view:s,bubbles:!0,cancelable:!0}));var h=a;if(n.select(l),e&&n.deleteAtRange(h),"text"===c||"html"===c){var m=l.anchor,v=o.hasVoidParent(m.path,n);if(v){for(var y=m.path,b=o.getNode(m.path);v;){var _=o.texts({path:y}),w=Qe(_,1)[0];if(!w)break;var E=Qe(w,2);b=E[0],y=E[1],v=o.hasVoidParent(y,n)}b&&n.moveToStartOfNode(b)}f&&f.split("\n").forEach((function(e,t){t>0&&n.splitBlock(),n.insertText(e)}))}"fragment"===c&&n.insertFragment(d),r()},onFocus:function(e,n,r){Qt("onFocus",{event:e}),!t||J||Z?n.focus():n.deselect().focus(),r()},onInput:function(e,t,n){Qt("onInput");var r=g()(e.target).getSelection(),i=t.findSelection(r);i?t.select(i):t.blur();var o=r.anchorNode;t.reconcileDOMNode(o),n()},onKeyDown:function(e,t,n){Qt("onKeyDown",{event:e});var r=t.value,i=r.document,o=r.selection,a=o.start,s=i.hasVoidParent(a.path,t);if(ve.isSplitBlock(e)&&!te)return s?t.moveToStartOfNextText():t.splitBlock();if(ve.isDeleteBackward(e)&&!te)return t.deleteCharBackward();if(ve.isDeleteForward(e)&&!te)return t.deleteCharForward();if(ve.isDeleteLineBackward(e))return t.deleteLineBackward();if(ve.isDeleteLineForward(e))return t.deleteLineForward();if(ve.isDeleteWordBackward(e))return t.deleteWordBackward();if(ve.isDeleteWordForward(e))return t.deleteWordForward();if(ve.isRedo(e))return t.redo();if(ve.isUndo(e))return t.undo();if(ve.isMoveLineBackward(e))return e.preventDefault(),t.moveToStartOfBlock();if(ve.isMoveLineForward(e))return e.preventDefault(),t.moveToEndOfBlock();if(ve.isExtendLineBackward(e))return e.preventDefault(),t.moveFocusToStartOfBlock();if(ve.isExtendLineForward(e))return e.preventDefault(),t.moveFocusToEndOfBlock();if(ve.isMoveBackward(e))return e.preventDefault(),o.isCollapsed?t.moveBackward():t.moveToStart();if(ve.isMoveForward(e))return e.preventDefault(),o.isCollapsed?t.moveForward():t.moveToEnd();if(ve.isMoveWordBackward(e))return e.preventDefault(),t.moveWordBackward();if(ve.isMoveWordForward(e))return e.preventDefault(),t.moveWordForward();if(ve.isExtendBackward(e)){var l=i.getNode(a.path),u=i.texts({path:a.path,direction:"backward"}),c=Qe(u,1)[0],d=!1;if(c){var f=Qe(c,2)[1];d=i.hasVoidParent(f,t)}if(s||d||""===l.text)return e.preventDefault(),t.moveFocusBackward()}if(ve.isExtendForward(e)){var p=i.getNode(a.path),h=i.texts({path:a.path}),m=Qe(h,1)[0],g=!1;if(m){var v=Qe(m,2)[1];g=i.hasVoidParent(v,t)}if(s||g||""===p.text)return e.preventDefault(),t.moveFocusForward()}n()},onMouseDown:function(e,n,r){Qt("onMouseDown",{event:e}),t=!0,r()},onMouseUp:function(e,n,r){Qt("onMouseUp",{event:e}),t=!1,r()},onPaste:function(e,t,n){Qt("onPaste",{event:e});var r=t.value,i=Vt(e),o=i.type,a=i.fragment,s=i.text;if("fragment"===o&&t.insertFragment(a),"text"===o||"html"===o){if(!s)return n();var l=r.document,u=r.selection,c=r.startBlock;if(t.isVoid(c))return n();var d=c,f=l.getInsertMarksAtRange(u),p=we.default.deserialize(s,{defaultBlock:d,defaultMarks:f}).document;t.insertFragment(p)}n()},onSelect:function(e,n,r){Qt("onSelect",{event:e});var i=g()(e.target).getSelection(),o=n.findSelection(i);o?n.select(o):n.blur(),t=!1,r()}}}var Jt=p()("slate:before");function Zt(){var e=null,t=0,n=!1,r=!1,i=!1,o=!1;return{onBeforeInput:function(e,t,n){var r=!!e.nativeEvent;t.readOnly||(o=!0,r&&ie||(Jt("onBeforeInput",{event:e}),n()))},onBlur:function(t,n,i){if(!r&&!n.readOnly){var o=t.relatedTarget,a=t.target,s=g()(a);if(e!==s.document.activeElement){if(o){var l=n.findDOMNode([]);if(o===l)return;if(o.hasAttribute(Be))return;var u=n.findNode(o);if(l.contains(o)&&u&&!n.isVoid(u))return}Jt("onBlur",{event:t}),i()}}},onClick:function(e,t,n){Jt("onClick",{event:e}),o=!0,n()},onCompositionEnd:function(e,r,i){var a=t;o=!0,window.requestAnimationFrame((function(){t>a||(n=!1)})),Jt("onCompositionEnd",{event:e}),i()},onCompositionStart:function(e,r,i){n=!0,t++;var a=r.value.selection;o=!0,a.isCollapsed||r.delete(),Jt("onCompositionStart",{event:e}),i()},onCopy:function(e,t,n){var i=g()(e.target);r=!0,i.requestAnimationFrame((function(){return r=!1})),Jt("onCopy",{event:e}),n()},onCut:function(e,t,n){if(!t.readOnly){var i=g()(e.target);r=!0,i.requestAnimationFrame((function(){return r=!1})),Jt("onCut",{event:e}),n()}},onDragEnd:function(e,t,n){i=!1,Jt("onDragEnd",{event:e}),n()},onDragEnter:function(e,t,n){Jt("onDragEnter",{event:e}),n()},onDragExit:function(e,t,n){Jt("onDragExit",{event:e}),n()},onDragLeave:function(e,t,n){Jt("onDragLeave",{event:e}),n()},onDragOver:function(e,t,n){var r=t.findNode(e.target);r&&!t.isVoid(r)||e.preventDefault(),J&&e.preventDefault(),i||(i=!0,J||(e.nativeEvent.dataTransfer.dropEffect="move")),Jt("onDragOver",{event:e}),n()},onDragStart:function(e,t,n){i=!0,Jt("onDragStart",{event:e}),n()},onDrop:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Jt("onDrop",{event:e}),n())},onFocus:function(t,n,i){if(!r&&!n.readOnly){var o=n.findDOMNode([]),a=g()(t.target);e=a.document.activeElement,Q&&t.target!==o?o.focus():(Jt("onFocus",{event:t}),i())}},onInput:function(e,t,r){n||t.value.selection.isBlurred||(o=!0,Jt("onInput",{event:e}),r())},onKeyDown:function(e,t,r){t.readOnly||(n?ve.isCompose(e)&&e.preventDefault():(!te&&(ve.isBold(e)||ve.isDeleteBackward(e)||ve.isDeleteForward(e)||ve.isDeleteLineBackward(e)||ve.isDeleteLineForward(e)||ve.isDeleteWordBackward(e)||ve.isDeleteWordForward(e)||ve.isItalic(e)||ve.isRedo(e)||ve.isSplitBlock(e)||ve.isTransposeCharacter(e)||ve.isUndo(e))&&e.preventDefault(),o=!0,Jt("onKeyDown",{event:e}),r()))},onPaste:function(e,t,n){t.readOnly||(o=!0,e.preventDefault(),Jt("onPaste",{event:e}),n())},onSelect:function(t,i,a){if(!r&&!n&&!i.readOnly){var s=g()(t.target);e=s.document.activeElement,o=!0,Jt("onSelect",{event:t}),a()}},queries:{userActionPerformed:function(){return o}},commands:{clearUserActionPerformed:function(){return o=!1,null}}}}function en(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.plugins,n=void 0===t?[]:t,r=Zt(),i=Xt(),o=ee?[It(e),Dt()]:[];return[].concat(o,[r],Xe(n),[i])}function tn(e){var t=e.nativeEvent||e;switch(t.type){case"keydown":return t.type+" "+JSON.stringify(t.key);case"input":case"beforeinput":case"textInput":return t.type+":"+t.inputType+" "+JSON.stringify(t.data);default:return t.type}}var nn=p()("slate:events");function rn(){var e={},t=!0,n=!1,r=void 0;try{for(var i,o=Re[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){e[i.value]=function(e,t,n){var r=tn(e);nn(r),n()}}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}return e}var on=p()("slate:batch-events");function an(){var e=null,t=null,n=[];function r(){on("\n"+n.join("\n")),n.length=0}function i(i){0===n.length&&(e=new Date);var o=tn(i),a=new Date;n.push("- "+(a-e)+" - "+o),clearTimeout(t),t=setTimeout(r,2e3)}var o={},a=!0,s=!1,l=void 0;try{for(var u,c=Re[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){o[u.value]=function(e,t,n){i(e),n()}}}catch(e){s=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}return o}var sn=p()("slate:mutations"),ln=["type","oldValue","target","addedNodes","removedNodes","attributeName","attributeNamespace","nextSibling","previousSibling"];function un(e){if(e.nodeType===window.Node.TEXT_NODE)return e.textContent;if(e.nodeType===window.Node.ELEMENT_NODE){var t=e.outerHTML,n=e.innerHTML;return null==t?JSON.stringify(e.textContent):t.slice(0,t.indexOf(n))}return"Node(type="+e.nodeType}function cn(){var e=new window.MutationObserver((function(e){var t=Array.from(e).map((function(e){var t={};return ln.forEach((function(n){var r=e[n];if(null!=r)if(r instanceof window.NodeList){if(0===r.length)return;t[n]=Array.from(r).map(un).join(", ")}else r instanceof window.Node&&(r=un(r)),t[n]=r})),t}));sn.apply(void 0,[t.length+" Mutations"].concat(Xe(t)))})),t=null;function n(n,r,i){var o=r.findDOMNode([]);if(o===t)return i();sn("start"),e.observe(o,{childList:!0,characterData:!0,attributes:!0,subtree:!0,characterDataOldValue:!0}),t=o,i()}return{onComponentDidMount:n,onComponentDidUpdate:n,onComponentWillUnmount:function(n,r,i){sn("stop"),e.disconnect(),t=null,i()}}}function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.placeholder,n=void 0===t?"":t,r=p.a.enabled("slate:events")?rn():null,i=p.a.enabled("slate:batch-events")?an():null,o=p.a.enabled("slate:mutations")?cn():null,a=Et(),s={commands:{reconcileNode:function(e,t){var n=e.value,r=n.document,i=n.selection,o=r.getPath(t.key),a=e.findDOMNode(o),s=r.getClosestBlock(o),l=t.text,u=a.textContent,c=s.nodes.last()===t,d=u.charAt(u.length-1);if(c&&"\n"===d&&(u=u.slice(0,-1)),l!==u){var f=i.moveAnchorTo(o,0).moveFocusTo(o,l.length);f=r.resolveRange(f),e.insertTextAtRange(f,u,t.marks)}},reconcileDOMNode:function(e,t){var n=t.parentElement.closest("[data-key]"),r=e.findNode(n);e.reconcileNode(r)}}},l=xt(),u=wt(e),c=en(e),d={commands:{restoreDOM:function(e){var t=e.tmp.contentRef.current.tmp;t.contentKey=t.contentKey+1}}},f=ee?null:Ce({placeholder:n,when:function(e,t){return"document"===t.object&&""===t.text&&1===t.nodes.size&&1===Array.from(t.texts()).length}});return[r,i,o,u,c,d,f,a,s,l]}var fn=p()("slate:editor"),pn=function(e){function t(){var e,n,r;We(this,t);for(var o=arguments.length,a=Array(o),l=0;l component is re-resolving the `plugins`, `schema`, `commands`, `queries` or `placeholder` prop on each update, which leads to poor performance. This is often due to passing in a new references for these props with each render by declaring them inline in your render function. Do not do this! Declare them outside your render function, or memoize them instead."),r.tmp.resolves++;var t=e(Ke({},r.props,{editor:r,value:r.props.value||r.state.value})),n=function(e){r.tmp.mounted?r.handleChange(e):r.tmp.change=e};r.controller=new s.Editor({plugins:[t],onChange:n},{controller:r,construct:!1}),r.controller.run("onConstruct")})),Ye(r,n)}return $e(t,e),Ge(t,[{key:"componentDidMount",value:function(){this.tmp.mounted=!0,this.tmp.updates++,this.props.autoFocus&&this.focus(),this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentDidUpdate",value:function(){this.tmp.updates++,this.tmp.change&&(this.handleChange(this.tmp.change),this.tmp.change=null)}},{key:"componentWillUnmount",value:function(){this.tmp.mounted=!1}},{key:"render",value:function(){var e=this;fn("render",this);var n=this.props,r=n.commands,o=n.placeholder,a=n.plugins,s=n.queries,l=n.schema;this.resolveController(a,l,r,s,o,dn);var u=this.props,c=u.options,d=u.readOnly,f=u.value,p=this.state.value,h=f||p,m=this.state.contentKey;this.controller.setReadOnly(d),this.controller.setValue(h,c);var g=this.props,v=g.autoCorrect,y=g.className,b=g.id,_=g.role,w=g.spellCheck,E=g.tabIndex,x=g.style,k=g.tagName,S=le()(this.props,Object.keys(t.propTypes)),O=i.a.createElement(bt,Ke({},S,{ref:this.tmp.contentRef,autoCorrect:v,className:y,contentKey:m,editor:this,id:b,onEvent:function(t,n){return e.run(t,n)},readOnly:d,role:_,spellCheck:w,style:x,tabIndex:E,tagName:k}));return this.controller.run("renderEditor",Ke({},this.props,{editor:this,children:O}))}},{key:"handleChange",value:function(e){var t=this.props.onChange;this.state.value&&this.setState({value:e.value}),t(e)}},{key:"applyOperation",value:function(){var e;return(e=this.controller).applyOperation.apply(e,arguments)}},{key:"command",value:function(){var e;return(e=this.controller).command.apply(e,arguments)}},{key:"hasCommand",value:function(){var e;return(e=this.controller).hasCommand.apply(e,arguments)}},{key:"hasQuery",value:function(){var e;return(e=this.controller).hasQuery.apply(e,arguments)}},{key:"normalize",value:function(){var e;return(e=this.controller).normalize.apply(e,arguments)}},{key:"query",value:function(){var e;return(e=this.controller).query.apply(e,arguments)}},{key:"registerCommand",value:function(){var e;return(e=this.controller).registerCommand.apply(e,arguments)}},{key:"registerQuery",value:function(){var e;return(e=this.controller).registerQuery.apply(e,arguments)}},{key:"run",value:function(){var e;return(e=this.controller).run.apply(e,arguments)}},{key:"withoutNormalizing",value:function(){var e;return(e=this.controller).withoutNormalizing.apply(e,arguments)}},{key:"call",value:function(){var e;return(e=this.controller).call.apply(e,arguments)}},{key:"change",value:function(){var e;return(e=this.controller).change.apply(e,arguments)}},{key:"onChange",value:function(){var e;return(e=this.controller).onChange.apply(e,arguments)}},{key:"applyOperations",value:function(){var e;return(e=this.controller).applyOperations.apply(e,arguments)}},{key:"setOperationFlag",value:function(){var e;return(e=this.controller).setOperationFlag.apply(e,arguments)}},{key:"getFlag",value:function(){var e;return(e=this.controller).getFlag.apply(e,arguments)}},{key:"unsetOperationFlag",value:function(){var e;return(e=this.controller).unsetOperationFlag.apply(e,arguments)}},{key:"withoutNormalization",value:function(){var e;return(e=this.controller).withoutNormalization.apply(e,arguments)}},{key:"operations",get:function(){return this.controller.operations}},{key:"readOnly",get:function(){return this.controller.readOnly}},{key:"value",get:function(){return this.controller.value}},{key:"editor",get:function(){return this.controller.editor}},{key:"schema",get:function(){Object(Ee.a)(!1,"As of Slate 0.42, the `editor.schema` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}},{key:"stack",get:function(){Object(Ee.a)(!1,"As of Slate 0.42, the `editor.stack` property no longer exists, and its functionality has been folded into the editor itself. Use the `editor` instead.")}}]),t}(i.a.Component);function hn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;Object(h.a)(!1,"As of slate-react@0.22 the `findDOMNode(key)` helper is deprecated in favor of `editor.findDOMNode(path)`."),s.Node.isNode(e)&&(e=e.key);var n=t.document.querySelector("["+De+'="'+e+'"]');if(!n)throw new Error('Unable to find a DOM node for "'+e+'". This is often because of forgetting to add `props.attributes` to a custom component.');return n}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;Object(h.a)(!1,"As of slate-react@0.22 the `findDOMPoint(point)` helper is deprecated in favor of `editor.findDOMPoint(point)`.");var n=hn(e.key,t),r=0,i=Array.from(n.querySelectorAll(He.STRING+", "+He.ZERO_WIDTH)),o=!0,a=!1,s=void 0;try{for(var l,u=i[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value,d=c.childNodes[0],f=d.textContent.length,p=f;c.hasAttribute(Le)&&(p=parseInt(c.getAttribute(Le),10));var m=r+p;if(e.offset<=m){var g=Math.min(f,Math.max(0,e.offset-r));return{node:d,offset:g}}r=m}}catch(e){a=!0,s=e}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return null}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;Object(h.a)(!1,"As of slate-react@0.22 the `findDOMRange(range)` helper is deprecated in favor of `editor.findDOMRange(range)`.");var n=e.anchor,r=e.focus,i=e.isBackward,o=e.isCollapsed,a=mn(n,t),s=o?a:mn(r,t);if(!a||!s)return null;var l=t.document.createRange(),u=i?s:a,c=i?a:s;return l.setStart(u.node,u.offset),l.setEnd(c.node,c.offset),l}function vn(e,t){Object(h.a)(!1,"As of slate-react@0.22 the `findNode(element)` helper is deprecated in favor of `editor.findNode(element)`."),Object(Ee.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.closest(He.KEY);if(!n)return null;var r=n.getAttribute(De);return r&&t.value.document.getNode(r)||null}function yn(e,t){Object(h.a)(!1,"As of slate-react@0.22 the `findPath(element)` helper is deprecated in favor of `editor.findPath(element)`.");var n=vn(e,t);return n?t.value.document.getPath(n):null}function bn(e,t,n){Object(h.a)(!1,"As of slate-react@0.22 the `findPoint(node, offset)` helper is deprecated in favor of `editor.findPoint(node, offset)`."),Object(Ee.a)(!s.Value.isValue(n),"As of Slate 0.42.0, the `findPoint` utility takes an `editor` instead of a `value`.");var r=function(e,t){if(1===e.nodeType&&e.childNodes.length){var n=t===e.childNodes.length,r=n?"backward":"forward";for(e=_n(e,n?t-1:t,r);1===e.nodeType&&e.childNodes.length;){var i=n?e.childNodes.length-1:0;e=_n(e,i,r)}t=n?e.textContent.length:0}return{node:e,offset:t}}(e,t),i=r.node,o=r.offset,a=g()(e),l=i.parentNode,u=l.closest(He.LEAF),c=void 0,d=void 0;if(u){var f=a.document.createRange(),p=u.closest(He.TEXT);f.setStart(p,0),f.setEnd(i,o),d=p;var m=f.cloneContents(),v=m.querySelectorAll("["+qe+"]");c=m.textContent.length-v.length}else{var y=l.closest(He.VOID);if(!y)return null;if(!(u=y.querySelector(He.LEAF)))return null;c=(d=u).textContent.length}c===d.textContent.length&&l.hasAttribute(qe)&&c--;var b=u.getAttribute(Fe);if(!b)return null;var _=Ze.parse(b).key,w=n.value;return w.document.hasDescendant(_)?w.document.createPoint({key:_,offset:c}):null}function _n(e,t,n){for(var r=e.childNodes,i=r[t],o=t,a=!1,s=!1;(8===i.nodeType||1===i.nodeType&&0===i.childNodes.length||1===i.nodeType&&"false"===i.getAttribute("contenteditable"))&&(!a||!s);)o>=r.length?(a=!0,o=t-1,n="backward"):o<0?(s=!0,o=t+1,n="forward"):(i=r[o],"forward"===n&&o++,"backward"===n&&o--);return i||null}function wn(e,t){Object(h.a)(!1,"As of slate-react@0.22 the `findRange(selection)` helper is deprecated in favor of `editor.findRange(selection)`."),Object(Ee.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`.");var n=e.anchorNode||e.startContainer;if(!n)return null;var r=g()(n);(e instanceof r.Range||r.StaticRange&&e instanceof r.StaticRange)&&(e={anchorNode:e.startContainer,anchorOffset:e.startOffset,focusNode:e.endContainer,focusOffset:e.endOffset});var i=e,o=i.anchorNode,a=i.anchorOffset,l=i.focusNode,u=i.focusOffset,c=i.isCollapsed,d=t.value,f=bn(o,a,t),p=c?f:bn(l,u,t);return f&&p?d.document.createRange({anchor:f,focus:p}):null}function En(e,t){Object(h.a)(!1,"As of slate-react@0.22 the `getEventRange(event, editor)` helper is deprecated in favor of `editor.findEventRange(event)`."),Object(Ee.a)(!s.Value.isValue(t),"As of Slate 0.42.0, the `findNode` utility takes an `editor` instead of a `value`."),e.nativeEvent&&(e=e.nativeEvent);var n=e,r=n.clientX,i=n.clientY,o=n.target;if(null==r||null==i)return null;var a=t.value.document,l=yn(e.target,t);if(!l)return null;var u=a.getNode(l);if(t.isVoid(u)){var c=o.getBoundingClientRect(),d="inline"===u.object?r-c.left=n[0]||(e[1]<=n[1]&&e[3]>=n[1]||Object(f.t)(e,this.intersectsCoordinate,this))}return!1},t.prototype.setCenter=function(e){var t=this.stride,n=this.flatCoordinates[t]-this.flatCoordinates[0],r=e.slice();r[t]=r[0]+n;for(var i=1;i=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&t.type===o.a.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t),i=!1):this.freehand_&&t.type===o.a.POINTERDOWN?i=!1:n?(i=t.type===o.a.POINTERMOVE)&&this.freehand_?i=this.handlePointerMove_(t):(t.pointerEvent.pointerType==x.b||t.type===o.a.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t):t.type===o.a.DBLCLICK&&(i=!1),e.prototype.handleEvent.call(this,t)&&i},t.prototype.handleDownEvent=function(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e),!0):!!this.condition_(e)&&(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new a.a(o.a.POINTERMOVE,e.map,e.pointerEvent,!1,e.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=e.pixel,!0)},t.prototype.handleUpEvent=function(e){var t=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e);var n=this.mode_===D;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||n?this.finishDrawing():this.atFinish_(e)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e):(this.startDrawing_(e),this.mode_===R&&this.finishDrawing()),t=!1):this.freehand_&&(this.finishCoordinate_=null,this.abortDrawing_()),!t&&this.stopClick_&&e.stopPropagation(),t},t.prototype.handlePointerMove_=function(e){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var t=this.downPx_,n=e.pixel,r=t[0]-n[0],i=t[1]-n[1],o=r*r+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return!0}return this.finishCoordinate_?this.modifyDrawing_(e):this.createOrUpdateSketchPoint_(e),!0},t.prototype.atFinish_=function(e){var t=!1;if(this.sketchFeature_){var n=!1,r=[this.finishCoordinate_];if(this.mode_===M)n=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===I){var i=this.sketchCoords_;n=i[0].length>this.minPoints_,r=[i[0][0],i[0][i[0].length-2]]}if(n)for(var o=e.map,a=0,s=r.length;a=this.maxPoints_&&(this.freehand_?n.pop():t=!0),n.push(r.slice()),this.geometryFunction_(n,i)):this.mode_===I&&((n=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?n.pop():t=!0),n.push(r.slice()),t&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,i)),this.updateSketchFeatures_(),t&&this.finishDrawing()},t.prototype.removeLastPoint=function(){if(this.sketchFeature_){var e,t=this.sketchFeature_.getGeometry();this.mode_===M?((e=this.sketchCoords_).splice(-2,1),this.geometryFunction_(e,t),e.length>=2&&(this.finishCoordinate_=e[e.length-2].slice())):this.mode_===I&&((e=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(e),this.geometryFunction_(this.sketchCoords_,t)),0===e.length&&(this.finishCoordinate_=null),this.updateSketchFeatures_()}},t.prototype.finishDrawing=function(){var e=this.abortDrawing_();if(e){var t=this.sketchCoords_,n=e.getGeometry();this.mode_===M?(t.pop(),this.geometryFunction_(t,n)):this.mode_===I&&(t[0].pop(),this.geometryFunction_(t,n),t=n.getCoordinates()),this.type_===h.a.MULTI_POINT?e.setGeometry(new w.a([t])):this.type_===h.a.MULTI_LINE_STRING?e.setGeometry(new _.a([t])):this.type_===h.a.MULTI_POLYGON&&e.setGeometry(new E.a([t])),this.dispatchEvent(new N(L,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)}},t.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var e=this.sketchFeature_;return e&&(this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0)),e},t.prototype.extend=function(e){var t=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=t.getCoordinates();var n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.updateSketchFeatures_(),this.dispatchEvent(new N(j,this.sketchFeature_))},t.prototype.updateSketchFeatures_=function(){var e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);var t=this.overlay_.getSource();t.clear(!0),t.addFeatures(e)},t.prototype.updateState_=function(){var e=this.getMap(),t=this.getActive();e&&t||this.abortDrawing_(),this.overlay_.setMap(t?e:null)},t}(O.b);function B(e,t){return function(n,r){var i=n[0],o=n[1],a=Math.sqrt(Object(l.e)(i,o)),s=r||Object(S.b)(new y(i),e),u=t;if(!t){var c=o[0]-i[0],d=o[1]-i[1];u=Math.atan(d/c)-(c<0?Math.PI:0)}return Object(S.d)(s,i,a,u),s}}function U(){return function(e,t){var n=Object(f.b)(e),r=[[Object(f.v)(n),Object(f.w)(n),Object(f.D)(n),Object(f.C)(n),Object(f.v)(n)]],i=t;return i?i.setCoordinates(r):i=new S.a(r),i}}t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BitbucketBackend",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"AuthenticationPage",{enumerable:!0,get:function(){return o.default}}),t.NetlifyCmsBackendBitbucket=void 0;var r=a(n(1149)),i=a(n(556)),o=a(n(555));function a(e){return e&&e.__esModule?e:{default:e}}const s={BitbucketBackend:r.default,API:i.default,AuthenticationPage:o.default};t.NetlifyCmsBackendBitbucket=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NetlifyCmsWidgetFile=void 0;var r=o(n(1171)),i=o(n(1172));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=(0,r.default)(),u={Widget:(e={})=>function(e){for(var t=1;t=200&&s.status<300){var i,o=t.getType();o==h.a.JSON||o==h.a.TEXT?i=s.responseText:o==h.a.XML?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):o==h.a.ARRAY_BUFFER&&(i=s.response),i?n.call(this,t.readFeatures(i,{featureProjection:a}),t.readProjection(i),t.getLastExtent()):r.call(this)}else r.call(this)}.bind(this),s.onerror=function(){r.call(this)}.bind(this),s.send()}}(e,t,(function(e,t){"function"==typeof this.addFeatures&&this.addFeatures(e)}),p.c)}function g(e,t){return[[-1/0,-1/0,1/0,1/0]]}var v=n(20),y=n(294),b=n(89),_="addfeature",w="changefeature",E="clear",x="removefeature",k=n(194),S=n.n(k),O=function(e){this.rbush_=S()(e,void 0),this.items_={}};O.prototype.insert=function(e,t){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[Object(r.c)(t)]=n},O.prototype.load=function(e,t){for(var n=new Array(t.length),i=0,o=t.length;i1&&"function"==typeof arguments[r-1]&&(t=arguments[r-1],--r),!this.isDef()){var i=arguments[r-1];return i.center&&this.setCenter(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(t&&S(t,!0))}for(var o=Date.now(),s=this.getCenter().slice(),l=this.getResolution(),u=this.getRotation(),c=[],f=0;f0},t.prototype.getInteracting=function(){return this.hints_[d.a.INTERACTING]>0},t.prototype.cancelAnimations=function(){this.setHint(d.a.ANIMATING,-this.hints_[d.a.ANIMATING]);for(var e=0,t=this.animations_.length;e=0;--n){for(var r=this.animations_[n],i=!0,o=0,s=r.length;o0?u/l.duration:1;c>=1?(l.complete=!0,c=1):i=!1;var m=l.easing(c);if(l.sourceCenter){var g=l.sourceCenter[0],v=l.sourceCenter[1],y=g+m*(l.targetCenter[0]-g),b=v+m*(l.targetCenter[1]-v);this.set(f,[y,b])}if(l.sourceResolution&&l.targetResolution){var _=1===m?l.targetResolution:l.sourceResolution+m*(l.targetResolution-l.sourceResolution);l.anchor&&this.set(f,this.calculateCenterZoom(_,l.anchor)),this.set(p,_)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var w=1===m?Object(a.d)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+m*(l.targetRotation-l.sourceRotation);l.anchor&&this.set(f,this.calculateCenterRotate(w,l.anchor)),this.set(h,w)}if(t=!0,!l.complete)break}}if(i){this.animations_[n]=null,this.setHint(d.a.ANIMATING,-1);var E=r[0].callback;E&&S(E,!0)}}this.animations_=this.animations_.filter(Boolean),t&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},t.prototype.calculateCenterRotate=function(e,t){var n,r=this.getCenter();return void 0!==r&&(n=[r[0]-t[0],r[1]-t[1]],Object(g.c)(n,e-this.getRotation()),Object(g.a)(n,t)),n},t.prototype.calculateCenterZoom=function(e,t){var n,r=this.getCenter(),i=this.getResolution();void 0!==r&&void 0!==i&&(n=[t[0]-e*(t[0]-r[0])/i,t[1]-e*(t[1]-r[1])/i]);return n},t.prototype.getSizeFromViewport_=function(){var e=[100,100],t='.ol-viewport[data-view="'+Object(i.c)(this)+'"]',n=document.querySelector(t);if(n){var r=getComputedStyle(n);e[0]=parseInt(r.width,10),e[1]=parseInt(r.height,10)}return e},t.prototype.constrainCenter=function(e){return this.constraints_.center(e)},t.prototype.constrainResolution=function(e,t,n){var r=t||0,i=n||0;return this.constraints_.resolution(e,r,i)},t.prototype.constrainRotation=function(e,t){var n=t||0;return this.constraints_.rotation(e,n)},t.prototype.getCenter=function(){return this.get(f)},t.prototype.getConstraints=function(){return this.constraints_},t.prototype.getHints=function(e){return void 0!==e?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()},t.prototype.calculateExtent=function(e){var t=e||this.getSizeFromViewport_(),n=this.getCenter();Object(m.a)(n,1);var r=this.getResolution();Object(m.a)(void 0!==r,2);var i=this.getRotation();return Object(m.a)(void 0!==i,3),Object(y.z)(n,r,i,t)},t.prototype.getMaxResolution=function(){return this.maxResolution_},t.prototype.getMinResolution=function(){return this.minResolution_},t.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},t.prototype.setMaxZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))},t.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},t.prototype.setMinZoom=function(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))},t.prototype.getProjection=function(){return this.projection_},t.prototype.getResolution=function(){return this.get(p)},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getResolutionForExtent=function(e,t){var n=t||this.getSizeFromViewport_(),r=Object(y.E)(e)/n[0],i=Object(y.A)(e)/n[1];return Math.max(r,i)},t.prototype.getResolutionForValueFunction=function(e){var t=e||2,n=this.maxResolution_,r=this.minResolution_,i=Math.log(n/r)/Math.log(t);return function(e){return n/Math.pow(t,e*i)}},t.prototype.getRotation=function(){return this.get(h)},t.prototype.getValueForResolutionFunction=function(e){var t=e||2,n=this.maxResolution_,r=this.minResolution_,i=Math.log(n/r)/Math.log(t);return function(e){return Math.log(n/e)/Math.log(t)/i}},t.prototype.getState=function(e){var t=this.getCenter(),n=this.getProjection(),r=this.getResolution(),i=r/e,o=this.getRotation();return{center:[Math.round(t[0]/i)*i,Math.round(t[1]/i)*i],projection:void 0!==n?n:null,resolution:r,rotation:o,zoom:this.getZoom()}},t.prototype.getZoom=function(){var e,t=this.getResolution();return void 0!==t&&(e=this.getZoomForResolution(t)),e},t.prototype.getZoomForResolution=function(e){var t,n,r=this.minZoom_||0;if(this.resolutions_){var i=Object(u.f)(this.resolutions_,e,1);r=i,t=this.resolutions_[i],n=i==this.resolutions_.length-1?2:t/this.resolutions_[i+1]}else t=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(t/e)/Math.log(n)},t.prototype.getResolutionForZoom=function(e){return this.constrainResolution(this.maxResolution_,e-this.minZoom_,0)},t.prototype.fit=function(e,t){var n,r=t||{},i=r.size;i||(i=this.getSizeFromViewport_()),Object(m.a)(Array.isArray(e)||"function"==typeof e.getSimplifiedGeometry,24),Array.isArray(e)?(Object(m.a)(!Object(y.H)(e),25),n=Object(_.c)(e)):e.getType()===b.a.CIRCLE?(e=e.getExtent(),(n=Object(_.c)(e)).rotate(this.getRotation(),Object(y.x)(e))):n=e;var a,s=void 0!==r.padding?r.padding:[0,0,0,0],l=void 0===r.constrainResolution||r.constrainResolution,u=void 0!==r.nearest&&r.nearest;a=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.constrainResolution(this.maxResolution_,r.maxZoom-this.minZoom_,0):0;for(var c=n.getFlatCoordinates(),d=this.getRotation(),f=Math.cos(-d),p=Math.sin(-d),h=1/0,g=1/0,v=-1/0,w=-1/0,E=n.getStride(),x=0,k=c.length;xe));t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitUntilAction=t.WAIT_UNTIL_ACTION=void 0;t.WAIT_UNTIL_ACTION="WAIT_UNTIL_ACTION";t.waitUntilAction=({dispatch:e,getState:t})=>{let n=[];return r=>i=>{if("WAIT_UNTIL_ACTION"===i.type)return n.push(i),null;const o=r(i);return function(r){const i=[],o=[];for(const e of n)e.predicate(r)?i.push(e):o.push(e);n=o;for(const n of i)n.run(e,t,r)}(i),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifSend=function(e){var t=r({},e);t.id||(t.id=(new Date).getTime());return function(e){e({type:i,payload:t}),t.dismissAfter&&setTimeout((function(){e({type:o,payload:t.id})}),t.dismissAfter)}},t.notifDismiss=function(e){return{type:o,payload:e}},t.notifClear=function(){return{type:a}};var r=n(232),i=t.NOTIF_SEND="NOTIF_SEND",o=t.NOTIF_DISMISS="NOTIF_DISMISS",a=t.NOTIF_CLEAR="NOTIF_CLEAR"},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default.shape({subscribe:o.default.func.isRequired,dispatch:o.default.func.isRequired,getState:o.default.func.isRequired})},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(39))},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){"use strict";var r=n(300);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=r(n(701));e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=r,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.nameShape=void 0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}};i(n(0));var r=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}t.nameShape=r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,leave:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterActive:r.default.string,leave:r.default.string,leaveActive:r.default.string,appear:r.default.string,appearActive:r.default.string})])},function(e,t,n){e.exports=n(705)},function(e,t,n){var r=n(707);e.exports=function(e){return e&&e.length?r(e):[]}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(140)(n(67),"Set");e.exports=r},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(242),i=n(163),o=n(240),a=i((function(e,t){try{return r(e,void 0,t)}catch(e){return o(e)?e:new Error(e)}}));e.exports=a},function(e,t,n){var r=n(242),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r;r={},e.exports=r,r.simpleFilter=function(e,t){return t.filter((function(t){return r.test(e,t)}))},r.test=function(e,t){return null!==r.match(e,t)},r.match=function(e,t,n){n=n||{};var r,i=0,o=[],a=t.length,s=0,l=0,u=n.pre||"",c=n.post||"",d=n.caseSensitive&&t||t.toLowerCase();e=n.caseSensitive&&e||e.toLowerCase();for(var f=0;fi.default.isMoment(e),represent:e=>e.format(e._f),resolve:e=>i.default.isMoment(e)&&e._f}),u=new r.default.Type("image",{kind:"scalar",instanceOf:o.default,represent:e=>"".concat(e.path),resolve:e=>null!==e&&e instanceof o.default}),c=new r.default.Schema({include:r.default.DEFAULT_SAFE_SCHEMA.include,implicit:[l,u].concat(r.default.DEFAULT_SAFE_SCHEMA.implicit),explicit:r.default.DEFAULT_SAFE_SCHEMA.explicit});var d={fromFile:e=>(e&&e.trim().endsWith("---")&&(e=e.trim().slice(0,-3)),r.default.safeLoad(e)),toFile:(e,t=[])=>r.default.safeDump(e,{schema:c,sortKeys:(0,a.sortKeys)(t)})};t.default=d},function(e,t,n){"use strict";var r=n(167);e.exports=new r({include:[n(424)]})},function(e,t,n){"use strict";var r=n(167);e.exports=new r({include:[n(312)],implicit:[n(746),n(747),n(748),n(749)]})},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortKeys=void 0;t.sortKeys=(e=[])=>(t,n)=>{const r=e.indexOf(t),i=e.indexOf(n);return-1===r||-1===i?0:r>i?1:ro.default.isMoment(t)?t.format(t._f):t instanceof a.default?"".concat(t.path):!!Number.isInteger(t)&&t.toString();var c={fromFile:e=>r.default.parse(e),toFile:(e,t=[])=>i.default.toToml(e,{replace:u,sort:(0,s.sortKeys)(t)})};t.default=c},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(771),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(39))},function(e,t,n){"use strict";(function(t,r){var i=n(245);e.exports=b;var o,a=n(425);b.ReadableState=y;n(316).EventEmitter;var s=function(e,t){return e.listeners(t).length},l=n(430),u=n(318).Buffer,c=t.Uint8Array||function(){};var d=Object.create(n(208));d.inherits=n(142);var f=n(774),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var h,m=n(775),g=n(431);d.inherits(b,l);var v=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var r=t instanceof(o=o||n(143));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(432).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function b(e){if(o=o||n(143),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function _(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,x(e)}(e,a)):(i||(o=function(e,t){var n;r=t,u.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):S(e,a)):w(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){p("emit readable"),e.emit("readable"),A(e)}function S(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(M,t,e))}function M(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null;var r,i=t.needReadable;return p("need readable",i),(0===t.length||t.length-e0?P(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&R(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:b;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",y),e.removeListener("drain",d),e.removeListener("error",g),e.removeListener("unpipe",u),n.removeListener("end",c),n.removeListener("end",b),n.removeListener("data",m),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function c(){p("onend"),e.end()}o.endEmitted?i.nextTick(l):n.once("end",l),e.on("unpipe",u);var d=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,A(e))}}(n);e.on("drain",d);var f=!1;var h=!1;function m(t){p("ondata"),h=!1,!1!==e.write(t)||h||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==I(o.pipes,e))&&!f&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function g(t){p("onerror",t),b(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",y),b()}function y(){p("onfinish"),e.removeListener("close",v),b()}function b(){p("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",g),e.once("close",v),e.once("finish",y),e.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=a;var r=n(143),i=Object.create(n(208));function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.lengthJSON.parse(e),toFile:e=>JSON.stringify(e,null,2)};t.default=r},function(module,exports,__webpack_require__){"use strict";const yaml=__webpack_require__(311),engines=exports=module.exports;engines.yaml={parse:yaml.safeLoad.bind(yaml),stringify:yaml.safeDump.bind(yaml)},engines.json={parse:JSON.parse.bind(JSON),stringify:function(e,t){const n=Object.assign({replacer:null,space:2},t);return JSON.stringify(e,n.replacer,n.space)}},engines.javascript={parse:function parse(str,options,wrap){try{return!1!==wrap&&(str="(function() {\nreturn "+str.trim()+";\n}());"),eval(str)||{}}catch(e){if(!1!==wrap&&/(unexpected|identifier)/i.test(e.message))return parse(str,options,!1);throw new SyntaxError(e)}},stringify:function(){throw new Error("stringifying JavaScript is not supported")}}},function(e,t,n){"use strict";const r=n(246),i=n(437),o=n(247);function a(e){return"\n"!==e.slice(-1)?e+"\n":e}e.exports=function(e,t,n){if(null==t&&null==n)switch(r(e)){case"object":t=e.data,n={};break;case"string":return e;default:throw new TypeError("expected file to be a string or object")}const s=e.content,l=o(n);if(null==t){if(!l.data)return e;t=l.data}const u=e.language||l.language,c=i(u,l);if("function"!=typeof c.stringify)throw new TypeError('expected "'+u+'.stringify" to be a function');t=Object.assign({},e.data,t);const d=l.delimiters[0],f=l.delimiters[1],p=c.stringify(t,n).trim();let h="";return"{}"!==p&&(h=a(d)+a(p)+a(f)),"string"==typeof e.excerpt&&""!==e.excerpt&&-1===s.indexOf(e.excerpt.trim())&&(h+=a(e.excerpt)+a(f)),h+a(s)}},function(e,t,n){"use strict";e.exports=function(e,t){let n=t.engines[e]||t.engines[function(e){switch(e.toLowerCase()){case"js":case"javascript":return"javascript";case"coffee":case"coffeescript":case"cson":return"coffee";case"yaml":case"yml":return"yaml";default:return e}}(e)];if(void 0===n)throw new Error('gray-matter engine "'+e+'" is not registered');return"function"==typeof n&&(n={parse:n}),n}},function(e,t,n){var r=n(303);e.exports=function(e,t){for(var n=-1,i=e.length;++n-1;);return n}},function(e,t,n){"use strict";var r=n(169);e.exports=function(e){r.copy(e,this)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),a=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var l="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(l);e.logger.warn(l)}}if(e.isTop&&(r+=" var validate = ",i&&(e.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",a&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+a+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){var u=e.level,c=e.dataLevel,d=e.schema["false schema"],f=e.schemaPath+e.util.getProperty("false schema"),p=e.errSchemaPath+"/false schema",h=!e.opts.allErrors,m="data"+(c||""),g="valid"+u;if(!1===e.schema){e.isTop?h=!0:r+=" var "+g+" = false; ",(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),r+=" } "):r+=" {} ";var v=r;r=X.pop(),!e.compositeRule&&h?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?r+=i?" return data; ":" validate.errors = null; return true; ":r+=" var "+g+" = true; ";return e.isTop&&(r+=" }; return validate; "),r}if(e.isTop){var y=e.isTop;u=e.level=0,c=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((c=e.dataLevel)||"");if(a&&(e.baseId=e.resolve.url(e.baseId,a)),i&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+u+" = errors;"}g="valid"+u,h=!e.opts.allErrors;var _="",w="",E=e.schema.type,x=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(x?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],x=!0)),x&&1==E.length&&(E=E[0],x=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(r+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var k=e.util.coerceToTypes(e.opts.coerceTypes,E);var S=e.RULES.types[E];if(k||x||!0===S||S&&!J(S)){f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";var O=x?"checkDataTypes":"checkDataType";if(r+=" if ("+e.util[O](E,m,!0)+") { ",k){var T="dataType"+u,C="coerced"+u;r+=" var "+T+" = typeof "+m+"; ","array"==e.opts.coerceTypes&&(r+=" if ("+T+" == 'object' && Array.isArray("+m+")) "+T+" = 'array'; "),r+=" var "+C+" = undefined; ";var A="",P=k;if(P)for(var R,M=-1,I=P.length-1;M",y=p?">":"<",b=void 0;if(g){var _=e.util.getData(m.$data,a,e.dataPathArr),w="exclusive"+o,E="exclType"+o,x="exclIsNumber"+o,k="' + "+(T="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+_+"; ",i+=" var "+w+"; var "+E+" = typeof "+(_="schemaExcl"+o)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var S;b=h;(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+h+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var O=i;i=S.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+O+"]); ":i+=" validate.errors = ["+O+"]; return false; ":i+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+E+" == 'number' ? ( ("+w+" = "+r+" === undefined || "+_+" "+v+"= "+r+") ? "+d+" "+y+"= "+_+" : "+d+" "+y+" "+r+" ) : ( ("+w+" = "+_+" === true) ? "+d+" "+y+"= "+r+" : "+d+" "+y+" "+r+" ) || "+d+" !== "+d+") { var op"+o+" = "+w+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=h,u=e.errSchemaPath+"/"+h,r=_,f=g)}else{k=v;if((x="number"==typeof m)&&f){var T="'"+k+"'";i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+m+" "+v+"= "+r+" ? "+d+" "+y+"= "+m+" : "+d+" "+y+" "+r+" ) || "+d+" !== "+d+") { "}else{x&&void 0===s?(w=!0,b=h,u=e.errSchemaPath+"/"+h,r=m,y+="="):(x&&(r=Math[p?"min":"max"](m,s)),m===(!x||r)?(w=!0,b=h,u=e.errSchemaPath+"/"+h,y+="="):(w=!1,k+="="));T="'"+k+"'";i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+d+" "+y+" "+r+" || "+d+" !== "+d+") { "}}b=b||t,(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+T+", limit: "+r+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+k+" ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";O=i;return i=S.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+O+"]); ":i+=" validate.errors = ["+O+"]; return false; ":i+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(a||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+d+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var p=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(a||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s;var p="maxLength"==t?">":"<";i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+d+".length ":i+=" ucs2length("+d+") ",i+=" "+p+" "+r+") { ";var h=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(a||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+d+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var p=t,h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var m=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,n){var r=n(303);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},function(e,t,n){var r=n(233),i=n(842),o=n(239);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var f=l.get(e);if(f&&l.get(t))return f==t;var p=-1,h=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p{let r=t.reduce((t,r)=>{const l=r.get("name"),u=e.get(l),c=(0,a.getWidgetValueSerializer)(r.get("widget")),d=r.get("fields");return d&&o.List.isList(u)?t.set(l,u.map(e=>s(e,d,n))):d&&o.Map.isMap(u)?t.set(l,s(u,d,n)):c&&!(0,i.default)(u)?t.set(l,c[n](u)):(0,i.default)(u)?t:t.set(l,u)},(0,o.Map)());return r=e.mergeDeep(r),r};t.serializeValues=(e,t)=>s(e,t,"serialize");t.deserializeValues=(e,t)=>s(e,t,"deserialize")},function(e,t,n){var r=n(109),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);e.exports=function(e){return(e=r(e))&&o.test(e)?e.replace(i,"\\$&"):e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOLDER=t.FILES=void 0;t.FILES="file_based_collection";t.FOLDER="folder_based_collection"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INFERABLE_FIELDS=t.IDENTIFIER_FIELDS=void 0;(r=n(0))&&r.__esModule;var r,i=n(9);t.IDENTIFIER_FIELDS=["title","path"];const o={title:{type:"string",secondaryTypes:[],synonyms:["title","name","label","headline","header"],defaultPreview:e=>(0,i.jsx)("h1",null,e),fallbackToFirstField:!0,showError:!0},shortTitle:{type:"string",secondaryTypes:[],synonyms:["short_title","shortTitle","short"],defaultPreview:e=>(0,i.jsx)("h2",null,e),fallbackToFirstField:!1,showError:!1},author:{type:"string",secondaryTypes:[],synonyms:["author","name","by","byline","owner"],defaultPreview:e=>(0,i.jsx)("strong",null,e),fallbackToFirstField:!1,showError:!1},date:{type:"datetime",secondaryTypes:["date"],synonyms:["date","publishDate","publish_date"],defaultPreview:e=>e,fallbackToFirstField:!1,showError:!1},description:{type:"string",secondaryTypes:["text","markdown"],synonyms:["shortDescription","short_description","shortdescription","description","intro","introduction","brief","content","biography","bio","summary"],defaultPreview:e=>e,fallbackToFirstField:!1,showError:!1},image:{type:"image",secondaryTypes:[],synonyms:["image","thumbnail","thumb","picture","avatar","photo","cover","hero"],defaultPreview:e=>e,fallbackToFirstField:!1,showError:!1}};t.INFERABLE_FIELDS=o},function(e,t,n){var r=n(75);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(864),i=n(462);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t,n){var r=n(141),i=n(203),o=n(40),a=n(173),s=n(330),l=n(121);e.exports=function(e,t,n){for(var u=-1,c=(t=r(t,e)).length,d=!1;++u1&&C.reverse(),_&&y{const[t,n]=e.split("?");return(0,r.Map)(function(e){for(var t=1;t(0,r.List)(e.split("=")).map(decodeURIComponent)).update(r.Map))}:{}));var i},d=e=>"".concat(e.get("url")).concat(e.get("params")?"?".concat(e.get("params").entrySeq().map(([e,t])=>"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))).join("&")):""),f=e=>(0,a.default)(e)?c(e):e?(0,r.fromJS)(e):(0,r.Map)(),p=e=>t=>e(f(t)),h=p(e=>fetch(...(e=>[d(e),e.remove("url").remove("params").toJS()])(e))),m=(0,o.default)([e=>(t,n)=>e(t,f(n)),i.default]),g=e=>[m((t,n)=>n.setIn(e,t)),m((t,n)=>n.getIn(e)?n:n.setIn(e,t))],v=e=>[m((t,n)=>n.updateIn(e,(e=(0,r.Map)())=>e.merge(t))),m((t,n)=>n.updateIn(e,(e=(0,r.Map)())=>(0,r.Map)(t).merge(e)))],[y,b]=g(["method"]),[_,w]=g(["body"]),[E,x]=v(["params"]),[k,S]=v(["headers"]),O=new RegExp("^(?:[a-z]+:)?//","i"),T=m((e,t)=>t.update("url",t=>O.test(t)?t:e&&t&&"/"!==t[0]&&"/"!==e[e.length-1]?"".concat(e,"/").concat(t):"".concat(e).concat(t))),C=p(e=>E({ts:(new Date).getTime()},e));var A={toURL:d,fromURL:c,fromFetchArguments:(e,t)=>c(e).merge((t?(0,r.fromJS)(t):(0,r.Map)()).remove("url").remove("params")),performRequest:h,withMethod:y,withDefaultMethod:b,withBody:_,withDefaultBody:w,withHeaders:k,withDefaultHeaders:S,withParams:E,withDefaultParams:x,withRoot:T,withTimestamp:C};t.default=A},function(e,t,n){var r=n(212);function i(e,t,n){var o=r(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return o.placeholder=i.placeholder,o}i.placeholder={},e.exports=i},function(e,t,n){var r=n(178),i=n(172);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){(function(e){var r=n(67),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(123)(e))},function(e,t,n){var r=n(346);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(255),i=n(299),o=n(250);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},function(e,t,n){var r=n(485),i=n(126);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},function(e,t,n){var r=n(486),i=n(925)(r);e.exports=i},function(e,t,n){var r=n(487),i=n(172);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(924)();e.exports=r},function(e,t){e.exports=function(e){for(var t=-1,n=null==e?0:e.length,r={};++tnew Promise((t,n)=>{const r=new FileReader;r.onload=({target:e})=>t((0,i.default)(null==e?void 0:e.result)),r.onerror=e=>{r.abort(),n(e)},r.readAsArrayBuffer(e)})},function(e,t,n){var r=n(258)("fromPairs",n(488));r.placeholder=n(214),e.exports=r},function(e,t,n){var r=n(258)("flow",n(97));r.placeholder=n(214),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitUntilWithTimeout=t.waitUntil=void 0;var r=n(401);const i=({predicate:e,run:t})=>({type:r.WAIT_UNTIL_ACTION,predicate:e,run:t});t.waitUntil=i;t.waitUntilWithTimeout=async(e,t,n=3e4)=>{let r=!1;const o=new Promise(n=>{e(i(t(n)))}),a=new Promise(e=>{setTimeout(()=>{r?e():(console.warn("Wait Action timed out"),e(null))},n)});return await Promise.race([o.then(e=>(r=!0,e)).catch(null),a])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.selectIntegration=void 0;var r=n(3),i=n(144);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.selectIntegration=(e,t,n)=>t?e.getIn(["hooks",t,n],!1):e.getIn(["hooks",n],!1);var l=(e=null,t)=>{switch(t.type){case i.CONFIG_SUCCESS:{const e=(t.payload.get("integrations",(0,r.List)()).toJS()||[]).reduce((e,n)=>{const{hooks:r,collections:i,provider:l}=n,u=s(n,["hooks","collections","provider"]);return e.providers[l]=function(e){for(var t=1;te.get("name")):i).forEach(t=>{r.forEach(n=>{e.hooks[t]?e.hooks[t][n]=l:e.hooks[t]={[n]:l}})}),e):(r.forEach(t=>{e.hooks[t]=l}),e)},{providers:{},hooks:{}});return(0,r.fromJS)(e)}default:return e}};t.default=l},function(e,t,n){var r=n(495),i=n(165),o=n(112),a=n(109);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(o(n),0,e.length),t=i(t),e.slice(n,n+t.length)==t}},function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deployPreviewLoading=s,t.deployPreviewLoaded=l,t.deployPreviewError=u,t.loadDeployPreview=function(e,t,n,r,c){return async(d,f)=>{const p=f(),h=(0,i.currentBackend)(p.config),m=(0,o.selectDeployPreview)(p,e,t);if(!m||!m.get("isFetching")){d(s(e,t));try{const i=r?h.getDeploy(e,t,n):await h.getDeployPreview(e,t,n,c);return d(i?l(e,t,i):u(e,t))}catch(n){console.error(n),d(a({message:{details:n.message,key:"ui.toast.onFailToLoadDeployPreview"},kind:"danger",dismissAfter:8e3})),d(u(e,t))}}}},t.DEPLOY_PREVIEW_FAILURE=t.DEPLOY_PREVIEW_SUCCESS=t.DEPLOY_PREVIEW_REQUEST=void 0;var r=n(138),i=n(139),o=n(85);const{notifSend:a}=r.actions;t.DEPLOY_PREVIEW_REQUEST="DEPLOY_PREVIEW_REQUEST";t.DEPLOY_PREVIEW_SUCCESS="DEPLOY_PREVIEW_SUCCESS";function s(e,t){return{type:"DEPLOY_PREVIEW_REQUEST",payload:{collection:e.get("name"),slug:t}}}function l(e,t,{url:n,status:r}){return{type:"DEPLOY_PREVIEW_SUCCESS",payload:{collection:e.get("name"),slug:t,url:n,status:r}}}function u(e,t){return{type:"DEPLOY_PREVIEW_FAILURE",payload:{collection:e.get("name"),slug:t}}}t.DEPLOY_PREVIEW_FAILURE="DEPLOY_PREVIEW_FAILURE"},function(e,t,n){var r=n(252),i=n(201);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";var r=n(350),i=n(262)("%Function%"),o=i.apply,a=i.call;e.exports=function(){return r.apply(a,arguments)},e.exports.apply=function(){return r.apply(o,arguments)}},function(e,t,n){"use strict";var r=n(959),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),u=function(e,t,n,r){var i;t in e&&("function"!=typeof(i=r)||"[object Function]"!==o.call(i)||!r())||(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(961),i=n(962),o=n(963)("String.prototype.replace"),a=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=i(r(this));return o(o(e,a,""),s,"")}},function(e,t,n){"use strict";var r=n(502);e.exports=function(){return String.prototype.trim&&"​"==="​".trim()?String.prototype.trim:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DropdownButton",{enumerable:!0,get:function(){return a.Button}}),t.StyledDropdownButton=t.DropdownItem=t.default=void 0;var r=u(n(19)),i=(u(n(0)),u(n(1))),o=n(9),a=n(968),s=n(102),l=u(n(148));function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,r.default)(a.Wrapper,{target:"e1d27pw00",label:"StyledWrapper"})({name:"p2aa31",styles:"position:relative;font-size:14px;user-select:none;"}),d=(0,r.default)(a.Button,{target:"e1d27pw01",label:"StyledDropdownButton"})(s.buttons.button,";",s.buttons.default,";display:block;padding-left:20px;padding-right:40px;&:after{",s.components.caretDown,";content:'';display:block;position:absolute;top:16px;right:16px;color:currentColor;}");t.StyledDropdownButton=d;const f=(0,r.default)("ul",{target:"e1d27pw02",label:"DropdownList"})(s.components.dropdownList,";margin:0;position:absolute;top:0;left:0;min-width:100%;z-index:2;",e=>(0,o.css)("width:",e.width,";top:",e.top,";left:","left"===e.position?0:"auto",";right:","right"===e.position?0:"auto",";;label:DropdownList;"),";"),p=(0,r.default)(a.MenuItem,{target:"e1d27pw03",label:"StyledMenuItem"})(s.components.dropdownItem,";"),h=(0,r.default)("div",{target:"e1d27pw04",label:"MenuItemIconContainer"})({name:"1bzfp24",styles:"flex:1 0 32px;text-align:right;position:relative;top:2px;"}),m=({renderButton:e,dropdownWidth:t="auto",dropdownPosition:n="left",dropdownTopOverlap:r="0",className:i,children:s})=>(0,o.jsx)(c,{onSelection:e=>e(),className:i},e(),(0,o.jsx)(a.Menu,null,(0,o.jsx)(f,{width:t,top:r,position:n},s)));t.default=m,m.propTypes={renderButton:i.default.func.isRequired,dropdownWidth:i.default.string,dropdownPosition:i.default.string,dropdownTopOverlap:i.default.string,className:i.default.string,children:i.default.node};const g=({label:e,icon:t,iconDirection:n,onClick:r,className:i})=>(0,o.jsx)(p,{value:r,className:i},(0,o.jsx)("span",null,e),t?(0,o.jsx)(h,null,(0,o.jsx)(l.default,{type:t,direction:n,size:"small"})):null);t.DropdownItem=g,g.propTypes={label:i.default.string,icon:i.default.string,iconDirection:i.default.string,onClick:i.default.func,className:i.default.string}},function(e,t,n){"use strict";var r={},i="a menu outside a mounted Wrapper with an id, or a menu that does not exist";e.exports={registerManager:function(e,t){r[e]=t},unregisterManager:function(e){delete r[e]},openMenu:function(e,t){var n=r[e];if(!n)throw new Error("Cannot open "+i);n.openMenu(t)},closeMenu:function(e,t){var n=r[e];if(!n)throw new Error("Cannot close "+i);n.closeMenu(t)}}},function(e,t,n){"use strict";var r=n(972)();e.exports=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(1));var r=s(n(407)),i=s(n(408)),o=s(n(0)),a=s(n(508));n(509);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var o=i.default.Children.only(n);return i.default.cloneElement(o,r)},r}(i.default.Component);function u(){}l.contextTypes={transitionGroup:r.object},l.childContextTypes={transitionGroup:function(){}},l.propTypes={},l.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:u,onEntering:u,onEntered:u,onExit:u,onExiting:u,onExited:u},l.UNMOUNTED=0,l.EXITED=1,l.ENTERING=2,l.ENTERED=3,l.EXITING=4;var c=(0,a.polyfill)(l);t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(1))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=n(102),s=u(n(148)),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,r.default)("a",{target:"ett28fv0",label:"GoBackButtonStyle"})({name:"uebubq",styles:"display:flex;align-items:center;margin-top:50px;padding:10px;font-size:14px;"}),d=(0,r.default)("p",{target:"ett28fv1",label:"ButtonText"})("color:",a.colorsRaw.gray,";margin:0 10px;");class f extends i.default.Component{render(){const{href:e,t:t}=this.props;return(0,l.jsx)(c,{href:e},(0,l.jsx)(s.default,{type:"arrow",size:"small"}),(0,l.jsx)(d,null,t("ui.default.goBackToSite")))}}t.default=f,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(f,"propTypes",{href:o.default.string.isRequired,t:o.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoize=function(e){var t=null;return function(){return null==t&&(t=e()),t}},t.without=function(e,t){return e.filter((function(e){return e!==t}))},t.union=function(e,t){var n=new Set,r=function(e){return n.add(e)};e.forEach(r),t.forEach(r);var i=[];return n.forEach((function(e){return i.push(e)})),i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(511);t.isFirefox=r.memoize((function(){return/firefox/i.test(navigator.userAgent)})),t.isSafari=r.memoize((function(){return Boolean(window.safari)}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(t.HandlerRole||(t.HandlerRole={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.strictEquality=function(e,t){return e===t},t.areCoordsEqual=function(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)},t.areArraysEqual=function(e,n,r){if(void 0===r&&(r=t.strictEquality),e.length!==n.length)return!1;for(var i=0;i0)}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n, or turn it into a drag source or a drop target itself.")}}(a);var s=n?function(t){return e(t,n)}:e;return i.default(a,s)}}n(1034),t.default=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var i=o(r);t[n]=function(){return i}}})),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRef=function(e){return null!==e&&"object"==typeof e&&e.hasOwnProperty("current")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){return"string"==typeof t||"symbol"==typeof t||!!n&&Array.isArray(t)&&t.every((function(t){return e(t,!1)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),i=!1,o=function(){function e(e){this.targetId=null,this.internalMonitor=e.getMonitor()}return e.prototype.receiveHandlerId=function(e){this.targetId=e},e.prototype.getHandlerId=function(){return this.targetId},e.prototype.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},e.prototype.canDrop=function(){if(!this.targetId)return!1;r(!i,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return i=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{i=!1}},e.prototype.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},e.prototype.getItemType=function(){return this.internalMonitor.getItemType()},e.prototype.getItem=function(){return this.internalMonitor.getItem()},e.prototype.getDropResult=function(){return this.internalMonitor.getDropResult()},e.prototype.didDrop=function(){return this.internalMonitor.didDrop()},e.prototype.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},e.prototype.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},e.prototype.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},e.prototype.getClientOffset=function(){return this.internalMonitor.getClientOffset()},e.prototype.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(522),i=n(523),o=n(217),a=function(){function e(e){var t=this;this.backend=e,this.hooks=r.default({dropTarget:function(e,n){t.dropTargetOptions=n,i.isRef(e)?t.dropTargetRef=e:t.dropTargetNode=e,t.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null}return Object.defineProperty(e.prototype,"connectTarget",{get:function(){return this.dropTarget},enumerable:!0,configurable:!0}),e.prototype.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},e.prototype.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},Object.defineProperty(e.prototype,"dropTargetOptions",{get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e},enumerable:!0,configurable:!0}),e.prototype.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},e.prototype.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},e.prototype.didOptionsChange=function(){return!o(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},e.prototype.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},Object.defineProperty(e.prototype,"dropTarget",{get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current},enumerable:!0,configurable:!0}),e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(529);t.useMonitorOutput=function(e,t,n){var o=i.useCollector(e,t,n),a=o[0],s=o[1];return r.useEffect((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(s,{handlerIds:[t]})}),[e,s]),a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(217),i=n(0);t.useCollector=function(e,t,n){var o=i.useState((function(){return t(e)})),a=o[0],s=o[1],l=i.useCallback((function(){var i=t(e);r(a,i)||(s(i),n&&n())}),[a,e,n]);return[a,l]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(a)}; /*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */ var r=/input|select|textarea|button|object/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function o(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(i(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=u,t.hide=function(e){u(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){u(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var r,i=n(43),o=(r=i)&&r.__esModule?r:{default:r},a=n(356);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){return!(!e&&!s)||((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};t.default=r,e.exports=t.default},function(e,t,n){"use strict";n.r(t),function(e){var r=n(0),i=n.n(r),o=n(396),a=n(1),s=n.n(a),l=n(226);function u(e,t){var n,r=(n=e,!isNaN(parseFloat(n))&&isFinite(n)?parseFloat(n):"px"===n.slice(-2)?parseFloat(n.slice(0,-2)):void 0);if("number"==typeof r)return r;var i=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof i?i*t:void 0}var c="above",d="inside",f="below",p="invisible";function h(e){if(e)try{i.a.Children.only(e)}catch(e){throw new Error(" expected to receive a single React element child.\n\nSee https://goo.gl/LrBNgw for more info.")}}function m(e){return"string"==typeof e.type}var g=void 0,v=[];function y(e){v.push(e),g||(g=setTimeout((function(){g=null;for(var e=void 0;e=v.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var n=v.indexOf(e);-1!==n&&(v.splice(n,1),!v.length&&g&&(clearTimeout(g),g=null))}}}var b=function(){function e(e,t){for(var n=0;n needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g.
) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(e.props.children,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=Object(o.a)(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=Object(o.a)(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))}},{key:"componentWillReceiveProps",value:function(e){h(e.children)}},{key:"componentDidUpdate",value:function(){var e=this;n.getWindow()&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=y((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))}},{key:"componentWillUnmount",value:function(){n.getWindow()&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())}},{key:"_findScrollableAncestor",value:function(){var t=this.props,n=t.horizontal,r=t.scrollableAncestor;if(r)return function(t){return"window"===t?e.window:t}(r);for(var i=this._ref;i.parentNode;){if((i=i.parentNode)===document.body)return window;var o=window.getComputedStyle(i),a=(n?o.getPropertyValue("overflow-x"):o.getPropertyValue("overflow-y"))||o.getPropertyValue("overflow");if("auto"===a||"scroll"===a)return i}return window}},{key:"_handleScroll",value:function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?p:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?d:e.viewportBottom{const c=[u("collection.entries.loadingEntries"),u("collection.entries.cachingEntries"),u("collection.entries.longerLoading")];return t?(0,l.jsx)(s.default,{collections:e,entries:t,viewStyle:r,cursor:i,handleCursorActions:o}):n?(0,l.jsx)(a.Loader,{active:!0},c):(0,l.jsx)("div",{className:"nc-collectionPage-noEntries"},"No Entries")};c.propTypes={collections:i.default.map.isRequired,entries:i.default.list,page:r.default.number,isFetching:r.default.bool,viewStyle:r.default.string,cursor:r.default.any.isRequired,handleCursorActions:r.default.func.isRequired,t:r.default.func.isRequired};var d=(0,o.translate)()(c);t.default=d},function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.defineProperty(t,"ScrollSync",{enumerable:!0,get:function(){return o(r).default}});var i=n(12);function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"ScrollSyncPane",{enumerable:!0,get:function(){return o(i).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&r.syncScrollPosition(r.panes[t][0],e),r.addEvents(e,t),r.panes[t].push(e))},r.unregisterPane=function(e,t){r.findPane(e,t)&&(r.removeEvents(e),r.panes[t].splice(r.panes[t].indexOf(e),1))},r.addEvents=function(e,t){e.onscroll=r.handlePaneScroll.bind(r,e,t)},r.removeEvents=function(e){e.onscroll=null},r.findPane=function(e,t){return!!r.panes[t]&&r.panes[t].find((function(t){return t===e}))},r.handlePaneScroll=function(e,t){r.props.enabled&&window.requestAnimationFrame((function(){r.syncScrollPositions(e,t)}))},r.syncScrollPositions=function(e,t){r.panes[t].forEach((function(n){e!==n&&(r.removeEvents(n,t),r.syncScrollPosition(e,n),window.requestAnimationFrame((function(){r.addEvents(n,t)})))}))},u(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"getChildContext",value:function(){return{registerPane:this.registerPane,unregisterPane:this.unregisterPane}}},{key:"syncScrollPosition",value:function(e,t){var n=e.scrollTop,r=e.scrollHeight,i=e.clientHeight,o=e.scrollLeft,a=e.scrollWidth,s=e.clientWidth,l=r-i,u=a-s,c=this.props,d=c.proportional,f=c.vertical,p=c.horizontal,h=t.scrollHeight-i,m=t.scrollWidth-s;f&&l>0&&(t.scrollTop=d?h*n/l:n),p&&u>0&&(t.scrollLeft=d?m*o/u:o)}},{key:"render",value:function(){return o.default.Children.only(this.props.children)}}]),t}(i.Component);c.propTypes={children:a.default.element.isRequired,proportional:a.default.bool,vertical:a.default.bool,horizontal:a.default.bool,enabled:a.default.bool},c.defaultProps={proportional:!0,vertical:!0,horizontal:!0,enabled:!0},c.childContextTypes={registerPane:a.default.func,unregisterPane:a.default.func},t.default=c,e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(5)((function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}),!0)}else e.exports=n(11)()}).call(t,n(4))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d1)for(var n=1;n>";return new c("Invalid "+i+" `"+o+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:"<>")+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:d((function(e,t,n,r,i){return p(e[t])?null:new c("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return d((function(t,n,r,i,o){if("function"!=typeof e)return new c("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],l=h(s);if("object"!==l)return new c("Invalid "+i+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var u in s)if(s.hasOwnProperty(u)){var d=e(s,u,r,i,o+"."+u,a);if(d instanceof Error)return d}return null}))},oneOf:function(e){return Array.isArray(e)?d((function(t,n,r,i,o){for(var a=t[n],s=0;s>",h=h||d,m!==a)if(n)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var g=f+":"+d;!r[g]&&s<3&&(o(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,f),r[g]=!0,s++)}return null==u[d]?l?null===u[d]?new c("The "+p+" `"+h+"` is marked as required in `"+f+"`, but its value is `null`."):new c("The "+p+" `"+h+"` is marked as required in `"+f+"`, but its value is `undefined`."):null:e(u,d,f,p,h)}var u=l.bind(null,!1);return u.isRequired=l.bind(null,!0),u}function f(e){return d((function(t,n,r,i,o,a){var s=t[n];return h(s)!==e?new c("Invalid "+i+" `"+o+"` of type `"+m(s)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function p(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(p);if(null===t||e(t))return!0;var n=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,i=n.call(t);if(n!==t.entries){for(;!(r=i.next()).done;)if(!p(r.value))return!1}else for(;!(r=i.next()).done;){var o=r.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function m(e){if(null==e)return""+e;var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=m(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return c.prototype=Error.prototype,u.checkPropTypes=s,u.PropTypes=u,u}}).call(t,n(4))},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";var n=function(e){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=function(e,t,r,i,o,a,s,l){if(n(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,i,o,a,s,l],d=0;(u=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}}).call(t,n(4))},function(e,t,n){(function(t){"use strict";var r,i=n(6);"production"!==t.env.NODE_ENV&&(r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2?n-2:0),o=2;oe?(0,a.jsx)(p,{src:e}):(0,a.jsx)(h,{type:"user",size:"large"});v.propTypes={imageUrl:o.default.string};const y=({displayUrl:e,isTestRepo:t,imageUrl:n,onLogoutClick:r,t:o})=>(0,a.jsx)(i.default.Fragment,null,t&&(0,a.jsx)(g,{href:"https://www.netlifycms.org/docs/test-backend",target:"_blank",rel:"noopener noreferrer"},"Test Backend ↗"),e?(0,a.jsx)(m,{href:e,target:"_blank"},(0,u.stripProtocol)(e)):null,(0,a.jsx)(l.Dropdown,{dropdownTopOverlap:"50px",dropdownWidth:"100px",dropdownPosition:"right",renderButton:()=>(0,a.jsx)(f,null,(0,a.jsx)(v,{imageUrl:n}))},(0,a.jsx)(l.DropdownItem,{label:o("ui.settingsDropdown.logOut"),onClick:r})));y.propTypes={displayUrl:o.default.string,isTestRepo:o.default.bool,imageUrl:o.default.string,onLogoutClick:o.default.func.isRequired,t:o.default.func.isRequired};var b=(0,s.translate)()(y);t.default=b},function(e,t,n){var r=n(110),i=n(1117),o=n(163),a=n(1118),s=o((function(e){var t=r(e,a);return t.length&&t[0]===e[0]?i(t):[]}));e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONHTTPError=t.TextHTTPError=t.HTTPError=t.getPagination=void 0;var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",n=arguments[1];a(this,e),this.apiURL=t,this.apiURL.match(/\/[^\/]?/)&&(this._sameOrigin=!0),this.defaultHeaders=n&&n.defaultHeaders||{}}return i(e,[{key:"headers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r({},this.defaultHeaders,{"Content-Type":"application/json"},e)}},{key:"parseJsonResponse",value:function(e){return e.json().then((function(t){if(!e.ok)return Promise.reject(new d(e,t));var n=(0,o.getPagination)(e);return n?{pagination:n,items:t}:t}))}},{key:"request",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.headers(n.headers||{});return this._sameOrigin&&(n.credentials=n.credentials||"same-origin"),fetch(this.apiURL+e,r({},n,{headers:i})).then((function(e){var n=e.headers.get("Content-Type");return n&&n.match(/json/)?t.parseJsonResponse(e):e.ok?e.text().then((function(e){})):e.text().then((function(t){return Promise.reject(new c(e,t))}))}))}}]),e}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=n(267),s=n(16),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;tnew Promise((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t()}})})),d(this,"handleLogin",e=>{e.preventDefault();const t={base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":this.props.siteId,auth_endpoint:this.props.authEndpoint},n=new a.NetlifyAuthenticator(t),{open_authoring:r=!1,auth_scope:i=""}=this.props.config.backend,o=i||(r?"public_repo":"repo");n.authenticate({provider:"github",scope:o},(e,t)=>{if(!e)return r?this.loginWithOpenAuthoring(t).then(()=>this.props.onLogin(t)):void this.props.onLogin(t);this.setState({loginError:e.toString()})})}),d(this,"renderLoginButton",()=>{const{inProgress:e,t:t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(f,{type:"github"}),t("auth.loginWithGitHub"))})}loginWithOpenAuthoring(e){const{backend:t}=this.props;return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch(e=>{throw this.setState({findingFork:!1}),console.error(e),e})}getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:n})=>(0,l.jsx)(p,null,(0,l.jsx)("p",null,"Open Authoring is enabled: we need to use a fork on your github account. (If a fork already exists, we'll use that.)"),(0,l.jsx)(h,null,(0,l.jsx)(n,{onClick:e},"Fork the repo"),(0,l.jsx)(n,{onClick:t},"Don't fork the repo")))}}return{renderButtonContent:this.renderLoginButton}}render(){const{inProgress:e,config:t,t:n}=this.props,{loginError:r,requestingFork:i,findingFork:o}=this.state;return(0,l.jsx)(s.AuthenticationPage,c({onLogin:this.handleLogin,loginDisabled:e||o||i,loginErrorMessage:r,logoUrl:t.logo_url,siteUrl:t.site_url},this.getAuthenticationPageRenderArgs(),{t:n}))}}t.default=m,d(m,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,base_url:o.default.string,siteId:o.default.string,authEndpoint:o.default.string,config:o.default.object.isRequired,clearHash:o.default.func,t:o.default.func.isRequired})},function(e,t,n){var r=n(141),i=n(162),o=n(121);e.exports=function(e,t,n){var a=-1,s=(t=r(t,e)).length;for(s||(s=1,e=void 0);++a>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)?e.toString("base64"):btoa(utob(String(e)))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):_encode(e)},encodeURI=function(e){return encode(e,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(t>>>10))+fromCharCode(56320+(1023&t));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,r=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),i=[fromCharCode(r>>>16),fromCharCode(r>>>8&255),fromCharCode(255&r)];return i.length-=[0,0,2,1][n],i.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum((function(){return decode(this)}))),Object.defineProperty(String.prototype,"toBase64",noEnum((function(e){return encode(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",noEnum((function(){return encode(this,!0)})))}}return global.Meteor&&(Base64=global.Base64),module.exports?module.exports.Base64=global.Base64:(__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return global.Base64}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)),{Base64:global.Base64}}))}).call(this,__webpack_require__(39))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a(e,[])};var r,i=(r=n(545))&&r.__esModule?r:{default:r};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(i.default)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var o=r.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},function(e,t,n){"use strict";function r(e){for(var t=null,n=1;n0&&o(t[0]);)t.shift();for(;t.length>0&&o(t[t.length-1]);)t.pop();return t.join("\n")},t.getBlockStringIndentation=r,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!r||o||n,s="";!a||r&&i||(s+="\n"+t);s+=t?e.replace(/\n/g,"\n"+t):e,a&&(s+="\n");return'"""'+s.replace(/"""/g,'\\"""')+'"""'}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.prototype.toString;e.prototype.toJSON=t,e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var r,i=(r=n(545))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,n){return new r.GraphQLError("Syntax Error: ".concat(n),void 0,e,[t])};var r=n(1139)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;for(;(n=r.exec(e.body))&&n.index",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileEntry=t.treeEntry=t.pullRequest=t.branch=t.object=t.blobWithText=t.repository=void 0;var r,i=(r=n(361))&&r.__esModule?r:{default:r};function o(){const e=f(["\n fragment FileEntryParts on TreeEntry {\n name\n sha: oid\n type\n blob: object {\n ... on Blob {\n size: byteSize\n }\n }\n }\n"]);return o=function(){return e},e}function a(){const e=f(["\n fragment TreeEntryParts on TreeEntry {\n path: name\n sha: oid\n type\n mode\n }\n"]);return a=function(){return e},e}function s(){const e=f(["\n fragment PullRequestParts on PullRequest {\n id\n baseRefName\n baseRefOid\n body\n headRefName\n headRefOid\n number\n state\n title\n merged_at: mergedAt\n repository {\n ...RepositoryParts\n }\n labels(last: 100) {\n nodes {\n name\n }\n }\n }\n ","\n"]);return s=function(){return e},e}function l(){const e=f(["\n fragment BranchParts on Ref {\n commit: target {\n ...ObjectParts\n }\n id\n name\n prefix\n repository {\n ...RepositoryParts\n }\n }\n ","\n ","\n"]);return l=function(){return e},e}function u(){const e=f(["\n fragment ObjectParts on GitObject {\n id\n sha: oid\n }\n"]);return u=function(){return e},e}function c(){const e=f(["\n fragment BlobWithTextParts on Blob {\n id\n text\n is_binary: isBinary\n }\n"]);return c=function(){return e},e}function d(){const e=f(["\n fragment RepositoryParts on Repository {\n id\n isFork\n }\n"]);return d=function(){return e},e}function f(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const p=(0,i.default)(d());t.repository=p;const h=(0,i.default)(c());t.blobWithText=h;const m=(0,i.default)(u());t.object=m;const g=(0,i.default)(l(),m,p);t.branch=g;const v=(0,i.default)(s(),p);t.pullRequest=v;const y=(0,i.default)(a());t.treeEntry=y;const b=(0,i.default)(o());t.fileEntry=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=n(267),s=n(16),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)(s.Icon,{target:"e1224wm40",label:"LoginButtonIcon"})({name:"x0sdsu",styles:"margin-right:18px;"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"state",{}),c(this,"handleLogin",e=>{e.preventDefault(),this.auth.authenticate({provider:"gitlab",scope:"api"},(e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})})}componentDidMount(){const{auth_type:e="",base_url:t="https://gitlab.com",auth_endpoint:n="oauth/authorize",app_id:r=""}=this.props.config.backend;"implicit"===e?(this.auth=new a.ImplicitAuthenticator({base_url:t,auth_endpoint:n,app_id:r,clearHash:this.props.clearHash}),this.auth.completeAuth((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})):this.auth=new a.NetlifyAuthenticator({base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":this.props.siteId,auth_endpoint:this.props.authEndpoint})}render(){const{inProgress:e,config:t,t:n}=this.props;return(0,l.jsx)(s.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(d,{type:"gitlab"})," ",n(e?"auth.loggingIn":"auth.loginWithGitLab")),t:n})}}t.default=f,c(f,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,base_url:o.default.string,siteId:o.default.string,authEndpoint:o.default.string,config:o.default.object.isRequired,clearHash:o.default.func,t:o.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getMaxAccess=t.API_NAME=void 0;var r=c(n(124)),i=c(n(542)),o=c(n(152)),a=c(n(97)),s=n(41),l=n(543),u=n(3);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;te.reduce((e,t)=>t.group_access_level>e.group_access_level?t:e,e[0]);t.getMaxAccess=g;t.default=class{constructor(e){p(this,"apiRoot",void 0),p(this,"token",void 0),p(this,"branch",void 0),p(this,"useOpenAuthoring",void 0),p(this,"repo",void 0),p(this,"repoURL",void 0),p(this,"commitAuthor",void 0),p(this,"squashMerges",void 0),p(this,"initialWorkflowStatus",void 0),p(this,"withAuthorizationHeaders",e=>s.unsentRequest.withHeaders(this.token?{Authorization:"Bearer ".concat(this.token)}:{},e)),p(this,"buildRequest",e=>(0,a.default)([s.unsentRequest.withRoot(this.apiRoot),this.withAuthorizationHeaders,s.unsentRequest.withTimestamp])(e)),p(this,"request",async e=>(0,a.default)([this.buildRequest,s.unsentRequest.performRequest,e=>e.catch(e=>Promise.reject(new s.APIError(e.message,null,"GitLab")))])(e)),p(this,"responseToJSON",(0,s.responseParser)({format:"json",apiName:"GitLab"})),p(this,"responseToBlob",(0,s.responseParser)({format:"blob",apiName:"GitLab"})),p(this,"responseToText",(0,s.responseParser)({format:"text",apiName:"GitLab"})),p(this,"requestJSON",e=>this.request(e).then(this.responseToJSON)),p(this,"requestText",e=>this.request(e).then(this.responseToText)),p(this,"user",()=>this.requestJSON("/user")),p(this,"WRITE_ACCESS",30),p(this,"MAINTAINER_ACCESS",40),p(this,"hasWriteAccess",async()=>{const{shared_with_groups:e,permissions:t}=await this.requestJSON(this.repoURL),{project_access:n,group_access:r}=t;if(n&&n.access_level>=this.WRITE_ACCESS)return!0;if(r&&r.access_level>=this.WRITE_ACCESS)return!0;if(e&&e.length>0){const t=g(e);if(t.group_access_level>=this.MAINTAINER_ACCESS)return!0;if(t.group_access_level>=this.WRITE_ACCESS){const e=await this.requestJSON("".concat(this.repoURL,"/repository/branches/").concat(this.branch)).catch(()=>({}));if(e.developers_can_merge&&e.developers_can_push)return!0}}return!1}),p(this,"readFile",async(e,t,{parseText:n=!0,branch:r=this.branch}={})=>await(0,s.readFile)(t,async()=>await this.request({url:"".concat(this.repoURL,"/repository/files/").concat(encodeURIComponent(e),"/raw"),params:{ref:r},cache:"no-store"}).then(n?this.responseToText:this.responseToBlob),s.localForage,n)),p(this,"getCursorFromHeaders",e=>{const t=parseInt(e.get("X-Page"),10)-1,n=parseInt(e.get("X-Total-Pages"),10)-1,r=parseInt(e.get("X-Per-Page"),10),i=parseInt(e.get("X-Total"),10),o=(0,s.parseLinkHeader)(e.get("Link")),a=(0,u.Map)(o).keySeq().flatMap(e=>"prev"===e&&t>0||"next"===e&&t0||"last"===e&&tthis.getCursorFromHeaders(e)),p(this,"fetchCursor",e=>(0,a.default)([s.unsentRequest.withMethod("HEAD"),this.request,(0,s.then)(this.getCursor)])(e)),p(this,"fetchCursorAndEntries",e=>(0,a.default)([s.unsentRequest.withMethod("GET"),this.request,e=>Promise.all([e.then(this.getCursor),e.then(this.responseToJSON)]),(0,s.then)(([e,t])=>({cursor:e,entries:t}))])(e)),p(this,"reversableActions",(0,u.Map)({first:"last",last:"first",next:"prev",prev:"next"})),p(this,"reverseCursor",e=>{const t=e.meta.get("pageCount",0)-e.meta.get("index",0),n=e.data.get("links",(0,u.Map)()).mapEntries(e=>{const[t,n]=e;return[this.reversableActions.get(t)||t,n]}),r=e.actions.map(e=>this.reversableActions.get(e)||e);return e.updateStore(e=>e.setIn(["meta","index"],t).setIn(["data","links"],n).set("actions",r))}),p(this,"listFiles",async(e,t=!1)=>{const n=(await this.fetchCursor({url:"".concat(this.repoURL,"/repository/tree"),params:{path:e,ref:this.branch,recursive:t}})).data.getIn(["links","last"]),{entries:r,cursor:i}=await this.fetchCursorAndEntries(n);return{files:r.filter(({type:e})=>"blob"===e).reverse(),cursor:this.reverseCursor(i)}}),p(this,"traverseCursor",async(e,t)=>{const n=e.data.getIn(["links",t]),{entries:r,cursor:i}=await this.fetchCursorAndEntries(n);return{entries:r.filter(({type:e})=>"blob"===e).reverse(),cursor:this.reverseCursor(i)}}),p(this,"listAllFiles",async(e,t=!1)=>{const n=[];let{cursor:r,entries:i}=await this.fetchCursorAndEntries({url:"".concat(this.repoURL,"/repository/tree"),params:{path:e,ref:this.branch,per_page:100,recursive:t}});for(n.push(...i);r&&r.actions.has("next");){const e=r.data.getIn(["links","next"]),{cursor:t,entries:i}=await this.fetchCursorAndEntries(e);n.push(...i),r=t}return n.filter(({type:e})=>"blob"===e)}),p(this,"toBase64",e=>Promise.resolve(l.Base64.encode(e))),p(this,"fromBase64",e=>l.Base64.decode(e)),p(this,"deleteFile",(e,t)=>{const n={commit_message:t,branch:this.branch};if(this.commitAuthor){const{name:e,email:t}=this.commitAuthor;n.author_name=e,n.author_email=t}return(0,a.default)([s.unsentRequest.withMethod("DELETE"),s.unsentRequest.withParams(n),this.request])("".concat(this.repoURL,"/repository/files/").concat(encodeURIComponent(e)))}),this.apiRoot=e.apiRoot||"https://gitlab.com/api/v4",this.token=e.token||!1,this.branch=e.branch||"master",this.repo=e.repo||"",this.repoURL="/projects/".concat(encodeURIComponent(this.repo)),this.squashMerges=e.squashMerges,this.initialWorkflowStatus=e.initialWorkflowStatus}uploadAndCommit(e,{commitMessage:t="",branch:n=this.branch,newBranch:r=!1}){const i=e.map(e=>f({action:e.action,file_path:e.path},e.base64Content?{content:e.base64Content,encoding:"base64"}:{})),o=f({branch:n,commit_message:t,actions:i},r?{start_branch:this.branch}:{});if(this.commitAuthor){const{name:e,email:t}=this.commitAuthor;o.author_name=e,o.author_email=t}return this.requestJSON({url:"".concat(this.repoURL,"/repository/commits"),method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(o)})}async getCommitItems(e,t){return await Promise.all(e.map(async e=>{const[n,a]=await Promise.all([(0,i.default)(e,"toBase64",(0,o.default)(this.toBase64,e.raw)),this.isFileExists(e.path,t)]);return{action:a?h.UPDATE:h.CREATE,base64Content:n,path:(0,r.default)(e.path,"/")}}))}async persistFiles(e,t,n){const r=e?[e,...t]:t;if(n.useWorkflow)return this.editorialWorkflowGit(r,e,n);{const e=await this.getCommitItems(r,this.branch);return this.uploadAndCommit(e,{commitMessage:n.commitMessage})}}async getMergeRequests(e){return(await this.requestJSON({url:"".concat(this.repoURL,"/merge_requests"),params:f({state:"opened",labels:"Any",target_branch:this.branch},e?{source_branch:e}:{})})).filter(e=>e.source_branch.startsWith(s.CMS_BRANCH_PREFIX)&&e.labels.some(s.isCMSLabel))}async listUnpublishedBranches(){return console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),(await this.getMergeRequests()).map(e=>e.source_branch)}async getFileId(e,t){return(await this.request({method:"HEAD",url:"".concat(this.repoURL,"/repository/files/").concat(encodeURIComponent(e)),params:{ref:t},cache:"no-store"})).headers.get("X-Gitlab-Blob-Id")}async isFileExists(e,t){return await this.requestText({method:"HEAD",url:"".concat(this.repoURL,"/repository/files/").concat(encodeURIComponent(e)),params:{ref:t},cache:"no-store"}).then(()=>!0).catch(e=>{if(e instanceof s.APIError&&404===e.status)return!1;throw e})}async getBranchMergeRequest(e){const t=await this.getMergeRequests(e);if(t.length<=0)throw new s.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async getDifferences(e){return(await this.requestJSON({url:"".concat(this.repoURL,"/repository/compare"),params:{from:this.branch,to:e}})).diffs.map(e=>f({},e,{binary:e.diff.startsWith("Binary")||/.svg$/.test(e.new_path)}))}async retrieveMetadata(e){const{collection:t,slug:n}=(0,s.parseContentKey)(e),r=(0,s.branchFromContentKey)(e),i=await this.getBranchMergeRequest(r),o=await this.getDifferences(i.sha),{old_path:a,new_file:l}=o.find(e=>!e.binary),u=await Promise.all(o.filter(e=>e.old_path!==a).map(async e=>{const t=e.new_path;return{path:t,id:await this.getFileId(t,r)}})),c=i.labels.find(s.isCMSLabel),d=(0,s.labelToStatus)(c),f=i.updated_at;return{branch:r,collection:t,slug:n,path:a,status:d,newFile:l,mediaFiles:u,timeStamp:f}}async readUnpublishedBranchFile(e){const{branch:t,collection:n,slug:r,path:i,status:o,newFile:a,mediaFiles:s,timeStamp:l}=await this.retrieveMetadata(e);return{slug:r,metaData:{branch:t,collection:n,objects:{entry:{path:i,mediaFiles:s}},status:o,timeStamp:l},fileData:await this.readFile(i,null,{branch:t}),isModification:!a}}async rebaseMergeRequest(e){let t=await this.requestJSON({method:"PUT",url:"".concat(this.repoURL,"/merge_requests/").concat(e.iid,"/rebase")}),n=1;for(;t.rebase_in_progress&&(await new Promise(e=>setTimeout(e,1e3)),t=await this.requestJSON({url:"".concat(this.repoURL,"/merge_requests/").concat(e.iid),params:{include_rebase_in_progress:!0}}),t.rebase_in_progress&&!(n>10));)n++;if(t.rebase_in_progress)throw new s.APIError("Timed out rebasing merge request",null,"GitLab");if(t.merge_error)throw new s.APIError("Rebase error: ".concat(t.merge_error),null,"GitLab")}async createMergeRequest(e,t,n){await this.requestJSON({method:"POST",url:"".concat(this.repoURL,"/merge_requests"),params:{source_branch:e,target_branch:this.branch,title:t,description:s.DEFAULT_PR_BODY,labels:(0,s.statusToLabel)(n),remove_source_branch:!0,squash:this.squashMerges}})}async editorialWorkflowGit(e,t,n){const r=(0,s.generateContentKey)(n.collectionName,t.slug),i=(0,s.branchFromContentKey)(r);if(n.unpublished||!1){const t=await this.getBranchMergeRequest(i);await this.rebaseMergeRequest(t);const[r,o]=await Promise.all([this.getCommitItems(e,i),this.getDifferences(i)]);for(const e of o)r.some(t=>t.path===e.new_path)||r.push({action:h.DELETE,path:e.new_path});await this.uploadAndCommit(r,{commitMessage:n.commitMessage,branch:i})}else{const t=await this.getCommitItems(e,this.branch);await this.uploadAndCommit(t,{commitMessage:n.commitMessage,branch:i,newBranch:!0}),await this.createMergeRequest(i,n.commitMessage,n.status||this.initialWorkflowStatus)}}async updateMergeRequestLabels(e,t){await this.requestJSON({method:"PUT",url:"".concat(this.repoURL,"/merge_requests/").concat(e.iid),params:{labels:t.join(",")}})}async updateUnpublishedEntryStatus(e,t,n){const r=(0,s.generateContentKey)(e,t),i=(0,s.branchFromContentKey)(r),o=await this.getBranchMergeRequest(i),a=[...o.labels.filter(e=>!(0,s.isCMSLabel)(e)),(0,s.statusToLabel)(n)];await this.updateMergeRequestLabels(o,a)}async mergeMergeRequest(e){await this.requestJSON({method:"PUT",url:"".concat(this.repoURL,"/merge_requests/").concat(e.iid,"/merge"),params:{merge_commit_message:s.MERGE_COMMIT_MESSAGE,squash_commit_message:s.MERGE_COMMIT_MESSAGE,squash:this.squashMerges,should_remove_source_branch:!0}})}async publishUnpublishedEntry(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),i=await this.getBranchMergeRequest(r);await this.mergeMergeRequest(i)}async closeMergeRequest(e){await this.requestJSON({method:"PUT",url:"".concat(this.repoURL,"/merge_requests/").concat(e.iid),params:{state_event:"close"}})}async deleteBranch(e){await this.request({method:"DELETE",url:"".concat(this.repoURL,"/repository/branches/").concat(encodeURIComponent(e))})}async deleteUnpublishedEntry(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),i=await this.getBranchMergeRequest(r);await this.closeMergeRequest(i),await this.deleteBranch(r)}async getMergeRequestStatues(e,t){return await this.requestJSON({url:"".concat(this.repoURL,"/repository/commits/").concat(e.sha,"/statuses"),params:{ref:t}})}async getStatuses(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),i=await this.getBranchMergeRequest(r);return(await this.getMergeRequestStatues(i,r)).map(({name:e,status:t,target_url:n})=>({context:e,state:t===m.Success?s.PreviewState.Success:s.PreviewState.Other,target_url:n}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=n(267),s=n(16),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)(s.Icon,{target:"eu4xeqg0",label:"LoginButtonIcon"})({name:"x0sdsu",styles:"margin-right:18px;"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"state",{}),c(this,"handleLogin",e=>{e.preventDefault(),this.auth.authenticate(this.authSettings,(e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})})}componentDidMount(){const{auth_type:e="",base_url:t="https://bitbucket.org",auth_endpoint:n="site/oauth2/authorize",app_id:r=""}=this.props.config.backend;"implicit"===e?(this.auth=new a.ImplicitAuthenticator({base_url:t,auth_endpoint:n,app_id:r,clearHash:this.props.clearHash}),this.auth.completeAuth((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}),this.authSettings={scope:"repository:write"}):(this.auth=new a.NetlifyAuthenticator({base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":this.props.siteId,auth_endpoint:this.props.authEndpoint}),this.authSettings={provider:"bitbucket",scope:"repo"})}render(){const{inProgress:e,config:t,t:n}=this.props;return(0,l.jsx)(s.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,l.jsx)(i.default.Fragment,null,(0,l.jsx)(d,{type:"bitbucket"}),n(e?"auth.loggingIn":"auth.loginWithBitbucket")),t:n})}}t.default=f,c(f,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,base_url:o.default.string,siteId:o.default.string,authEndpoint:o.default.string,config:o.default.object.isRequired,clearHash:o.default.func,t:o.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.API_NAME=void 0;var r,i,o=c(n(94)),a=c(n(97)),s=n(41),l=n(98),u=n(1150);function c(e){return e&&e.__esModule?e:{default:e}}function d(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n source.repository.full_name = "','" \n AND state = "','" \n AND destination.branch.name = "','"\n AND comment_count > 0\n AND ',"\n "]);return d=function(){return e},e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.MERGED="MERGED",e.SUPERSEDED="SUPERSEDED",e.OPEN="OPEN",e.DECLINED="DECLINED"}(r||(r={})),function(e){e.Successful="SUCCESSFUL",e.Failed="FAILED",e.InProgress="INPROGRESS",e.Stopped="STOPPED"}(i||(i={}));t.API_NAME="BitBucket";const h=e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),{size:0,values:[]}):Promise.reject(e);t.default=class{constructor(e){p(this,"apiRoot",void 0),p(this,"branch",void 0),p(this,"repo",void 0),p(this,"requestFunction",void 0),p(this,"repoURL",void 0),p(this,"commitAuthor",void 0),p(this,"mergeStrategy",void 0),p(this,"initialWorkflowStatus",void 0),p(this,"buildRequest",e=>(0,a.default)([s.unsentRequest.withRoot(this.apiRoot),s.unsentRequest.withTimestamp])(e)),p(this,"request",e=>(0,a.default)([this.buildRequest,this.requestFunction,e=>e.catch(e=>Promise.reject(new s.APIError(e.message,null,"BitBucket")))])(e)),p(this,"responseToJSON",(0,s.responseParser)({format:"json",apiName:"BitBucket"})),p(this,"responseToBlob",(0,s.responseParser)({format:"blob",apiName:"BitBucket"})),p(this,"responseToText",(0,s.responseParser)({format:"text",apiName:"BitBucket"})),p(this,"requestJSON",e=>this.request(e).then(this.responseToJSON)),p(this,"requestText",e=>this.request(e).then(this.responseToText)),p(this,"user",()=>this.requestJSON("/user")),p(this,"hasWriteAccess",async()=>{const e=await this.request(this.repoURL);if(404===e.status)throw Error("Repo not found");return e.ok}),p(this,"branchCommitSha",async e=>{const{target:{hash:t}}=await this.requestJSON("".concat(this.repoURL,"/refs/branches/").concat(e));return t}),p(this,"isFile",({type:e})=>"commit_file"===e),p(this,"processFile",e=>function(e){for(var t=1;te.filter(this.isFile).map(this.processFile)),p(this,"readFile",async(e,t,{parseText:n=!0,branch:r=this.branch}={})=>await(0,s.readFile)(t,async()=>{const t=await this.branchCommitSha(r);return await this.request({url:"".concat(this.repoURL,"/src/").concat(t,"/").concat(e),cache:"no-store"}).then(n?this.responseToText:this.responseToBlob)},s.localForage,n)),p(this,"getEntriesAndCursor",e=>{const{size:t,page:n,pagelen:r,next:i,previous:o,values:a}=e,l=r&&t?Math.ceil(t/r):void 0;return{entries:a,cursor:s.Cursor.create({actions:[...i?["next"]:[],...o?["prev"]:[]],meta:{index:n,count:t,pageSize:r,pageCount:l},data:{links:{next:i,prev:o}}})}}),p(this,"listFiles",async(e,t=1)=>{const n=await this.branchCommitSha(this.branch),r=await this.requestJSON({url:"".concat(this.repoURL,"/src/").concat(n,"/").concat(e),params:{sort:"-path",max_depth:t}}).catch(h),{entries:i,cursor:o}=this.getEntriesAndCursor(r);return{entries:this.processFiles(i),cursor:o}}),p(this,"traverseCursor",async(e,t)=>(0,a.default)([this.requestJSON,(0,s.then)(this.getEntriesAndCursor),(0,s.then)(({cursor:e,entries:t})=>({cursor:e,entries:this.processFiles(t)}))])(e.data.getIn(["links",t]))),p(this,"listAllFiles",async(e,t=1)=>{const{cursor:n,entries:r}=await this.listFiles(e,t),i=[...r];let o=n;for(;o&&o.actions.has("next");){const{cursor:e,entries:t}=await this.traverseCursor(o,"next");i.push(...t),o=e}return this.processFiles(i)}),p(this,"deleteFile",(e,t)=>{const n=new FormData;if(n.append("files",e),n.append("branch",this.branch),t&&n.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;n.append("author","".concat(e," <").concat(t,">"))}return(0,a.default)([s.unsentRequest.withMethod("POST"),s.unsentRequest.withBody(n),this.request])("".concat(this.repoURL,"/src"))}),this.apiRoot=e.apiRoot||"https://api.bitbucket.org/2.0",this.branch=e.branch||"master",this.repo=e.repo||"",this.requestFunction=e.requestFunction||s.unsentRequest.performRequest,this.hasWriteAccess=e.hasWriteAccess||this.hasWriteAccess,this.repoURL=this.repo?"/repositories/".concat(this.repo):"",this.mergeStrategy=e.squashMerges?"squash":"merge_commit",this.initialWorkflowStatus=e.initialWorkflowStatus}async uploadFiles(e,{commitMessage:t,branch:n,parentSha:r}){const i=new FormData;if(e.forEach(e=>{if(e.delete)i.append("files",e.path);else{const t=(0,o.default)(e,"fileObj",new Blob([e.raw]));i.append(e.path,t,(0,s.basename)(e.path))}}),t&&i.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;i.append("author","".concat(e," <").concat(t,">"))}return i.append("branch",n),r&&i.append("parents",r),await this.request({url:"".concat(this.repoURL,"/src"),method:"POST",body:i}),e}async persistFiles(e,t,n){const r=e?[e,...t]:t;return n.useWorkflow?this.editorialWorkflowGit(r,e,n):this.uploadFiles(r,{commitMessage:n.commitMessage,branch:this.branch})}async addPullRequestComment(e,t){await this.requestJSON({method:"POST",url:"".concat(this.repoURL,"/pullrequests/").concat(e.id,"/comments"),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({content:{raw:t}})})}async getPullRequestLabel(e){const t=await this.requestJSON({url:"".concat(this.repoURL,"/pullrequests/").concat(e,"/comments"),params:{pagelen:100}});return t.values.map(e=>e.content.raw)[t.values.length-1]}async createPullRequest(e,t,n){const r=await this.requestJSON({method:"POST",url:"".concat(this.repoURL,"/pullrequests"),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({title:t,source:{branch:{name:e}},destination:{branch:{name:this.branch}},description:s.DEFAULT_PR_BODY,close_source_branch:!0})});await this.addPullRequestComment(r,(0,s.statusToLabel)(n))}async getDifferences(e){const t=await this.requestText({url:"".concat(this.repoURL,"/diff/").concat(e,"..").concat(this.branch),params:{binary:!1}});return(0,u.parse)(t).map(e=>({newPath:e.newPath.replace(/b\//,""),binary:e.binary||/.svg$/.test(e.newPath),newFile:"added"===e.status}))}async editorialWorkflowGit(e,t,n){const r=(0,s.generateContentKey)(n.collectionName,t.slug),i=(0,s.branchFromContentKey)(r);if(n.unpublished||!1){const t=await this.getDifferences(i),r=[];for(const n of t)e.some(e=>e.path===n.newPath)||r.push({path:n.newPath,delete:!0});await this.uploadFiles([...e,...r],{commitMessage:n.commitMessage,branch:i})}else{const t=await this.branchCommitSha(this.branch);await this.uploadFiles(e,{commitMessage:n.commitMessage,branch:i,parentSha:t}),await this.createPullRequest(i,n.commitMessage,n.status||this.initialWorkflowStatus)}}async isFileExists(e,t){return await this.readFile(e,null,{branch:t}).then(()=>!0).catch(e=>{if(e instanceof s.APIError&&404===e.status)return!1;throw e})}async getPullRequests(e){const t=e?'source.branch.name = "'.concat(e,'"'):'source.branch.name ~ "'.concat(s.CMS_BRANCH_PREFIX,'/"'),n=await this.requestJSON({url:"".concat(this.repoURL,"/pullrequests"),params:{pagelen:50,q:(0,l.oneLine)(d(),this.repo,r.OPEN,this.branch,t)}}),i=await Promise.all(n.values.map(e=>this.getPullRequestLabel(e.id)));return n.values.filter((e,t)=>(0,s.isCMSLabel)(i[t]))}async getBranchPullRequest(e){const t=await this.getPullRequests(e);if(t.length<=0)throw new s.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async retrieveMetadata(e){const{collection:t,slug:n}=(0,s.parseContentKey)(e),r=(0,s.branchFromContentKey)(e),i=await this.getBranchPullRequest(r),o=await this.getDifferences(r),{newPath:a,newFile:l}=o.find(e=>!e.binary),u=await Promise.all(o.filter(e=>e.newPath!==a).map(e=>({path:e.newPath,id:null}))),c=await this.getPullRequestLabel(i.id),d=(0,s.labelToStatus)(c),f=i.updated_on;return{branch:r,collection:t,slug:n,path:a,status:d,newFile:l,mediaFiles:u,timeStamp:f}}async readUnpublishedBranchFile(e){const{branch:t,collection:n,slug:r,path:i,status:o,newFile:a,mediaFiles:s,timeStamp:l}=await this.retrieveMetadata(e);return{slug:r,metaData:{branch:t,collection:n,objects:{entry:{path:i,mediaFiles:s}},status:o,timeStamp:l},fileData:await this.readFile(i,null,{branch:t}),isModification:!a}}async listUnpublishedBranches(){return console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),(await this.getPullRequests()).map(e=>e.source.branch.name)}async updateUnpublishedEntryStatus(e,t,n){const r=(0,s.generateContentKey)(e,t),i=(0,s.branchFromContentKey)(r),o=await this.getBranchPullRequest(i);await this.addPullRequestComment(o,(0,s.statusToLabel)(n))}async mergePullRequest(e){await this.requestJSON({method:"POST",url:"".concat(this.repoURL,"/pullrequests/").concat(e.id,"/merge"),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({message:s.MERGE_COMMIT_MESSAGE,close_source_branch:!0,merge_strategy:this.mergeStrategy})})}async publishUnpublishedEntry(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.mergePullRequest(i)}async declinePullRequest(e){await this.requestJSON({method:"POST",url:"".concat(this.repoURL,"/pullrequests/").concat(e.id,"/decline")})}async deleteBranch(e){await this.request({method:"DELETE",url:"".concat(this.repoURL,"/refs/branches/").concat(e)})}async deleteUnpublishedEntry(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),i=await this.getBranchPullRequest(r);await this.declinePullRequest(i),await this.deleteBranch(r)}async getPullRequestStatuses(e){return(await this.requestJSON({url:"".concat(this.repoURL,"/pullrequests/").concat(e.id,"/statuses"),params:{pagelen:100}})).values}async getStatuses(e,t){const n=(0,s.generateContentKey)(e,t),r=(0,s.branchFromContentKey)(n),o=await this.getBranchPullRequest(r);return(await this.getPullRequestStatuses(o)).map(({key:e,state:t,url:n})=>({context:e,state:t===i.Successful?s.PreviewState.Success:s.PreviewState.Other,target_url:n}))}}},function(e,t,n){e.exports=c,c.Minimatch=d;var r={sep:"/"};try{r=n(210)}catch(e){}var i=c.GLOBSTAR=d.GLOBSTAR={},o=n(1153),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},s="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var l=/\/+/;function u(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function c(e,t,n){if("string"!=typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new d(t,n).match(e))}function d(e,t){if(!(this instanceof d))return new d(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function f(e,t){if(t||(t=this instanceof d?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:o(e)}c.filter=function(e,t){return t=t||{},function(n,r,i){return c(n,e,t)}},c.defaults=function(e){if(!e||!Object.keys(e).length)return c;var t=c,n=function(n,r,i){return t.minimatch(n,r,u(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,u(e,r))},n},d.defaults=function(e){return e&&Object.keys(e).length?c.defaults(e).Minimatch:d},d.prototype.debug=function(){},d.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(l)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=this.options,r=0;if(n.nonegate)return;for(var i=0,o=e.length;i65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,o="",l=!!n.nocase,u=!1,c=[],d=[],f=!1,h=-1,m=-1,g="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this;function y(){if(r){switch(r){case"*":o+="[^/]*?",l=!0;break;case"?":o+="[^/]",l=!0;break;default:o+="\\"+r}v.debug("clearStateChar %j %j",r,o),r=!1}}for(var b,_=0,w=e.length;_-1;C--){var A=d[C],P=o.slice(0,A.reStart),R=o.slice(A.reStart,A.reEnd-8),M=o.slice(A.reEnd-8,A.reEnd),I=o.slice(A.reEnd);M+=I;var D=P.split("(").length-1,j=I;for(_=0;_=0&&!(i=e[o]);o--);for(o=0;o>> no match, partial?",e,f,t,p),f!==s))}if("string"==typeof c?(u=r.nocase?d.toLowerCase()===c.toLowerCase():d===c,this.debug("string match",c,d,u)):(u=d.match(c),this.debug("pattern match",c,d,u)),!u)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&""===e[o];throw new Error("wtf?")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(152)),o=u(n(1)),a=u(n(0)),s=n(16),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const f=(0,r.default)("button",{target:"ey01qwa0",label:"LoginButton"})(s.buttons.button,";",s.shadows.dropDeep,";",s.buttons.default,";",s.buttons.gray,";padding:0 30px;display:block;margin-top:20px;margin-left:auto;"),p=(0,r.default)("form",{target:"ey01qwa1",label:"AuthForm"})({name:"olstp8",styles:"width:350px;margin-top:-80px;"}),h=(0,r.default)("input",{target:"ey01qwa2",label:"AuthInput"})("background-color:",s.colorsRaw.white,";border-radius:",s.lengths.borderRadius,";font-size:14px;padding:10px 10px;margin-bottom:15px;margin-top:6px;width:100%;position:relative;z-index:1;&:focus{outline:none;box-shadow:inset 0 0 0 2px ",s.colors.active,";}"),m=(0,r.default)("p",{target:"ey01qwa3",label:"ErrorMessage"})("color:",s.colors.errorText,";");let g=null;window.netlifyIdentity&&(window.netlifyIdentity.on("login",e=>{g&&g.handleIdentityLogin(e)}),window.netlifyIdentity.on("logout",()=>{g&&g.handleIdentityLogout()}),window.netlifyIdentity.on("error",e=>{g&&g.handleIdentityError(e)}));class v extends a.default.Component{constructor(e){super(e),d(this,"handleIdentityLogin",e=>{this.props.onLogin(e),window.netlifyIdentity.close()}),d(this,"handleIdentityLogout",()=>{window.netlifyIdentity.open()}),d(this,"handleIdentityError",e=>{var t;(null==e||null===(t=e.message)||void 0===t?void 0:t.match(/^Failed to load settings from.+\.netlify\/identity$/))&&(window.netlifyIdentity.close(),this.setState({errors:{identity:this.props.t("auth.errors.identitySettings")}}))}),d(this,"handleIdentity",()=>{const e=window.netlifyIdentity.currentUser();e?this.props.onLogin(e):window.netlifyIdentity.open()}),d(this,"state",{email:"",password:"",errors:{}}),d(this,"handleChange",(e,t)=>{this.setState(function(e){for(var t=1;t{e.preventDefault();const{email:t,password:n}=this.state,{t:r}=this.props,i={};t||(i.email=r("auth.errors.email")),n||(i.password=r("auth.errors.password")),Object.keys(i).length>0?this.setState({errors:i}):v.authClient.login(this.state.email,this.state.password,!0).then(e=>{this.props.onLogin(e)}).catch(e=>{this.setState({errors:{server:e.description||e.msg||e},loggingIn:!1})})}),g=this}componentDidMount(){!this.loggedIn&&window.netlifyIdentity&&window.netlifyIdentity.currentUser()&&(this.props.onLogin(window.netlifyIdentity.currentUser()),window.netlifyIdentity.close())}componentWillUnmount(){g=null}render(){const{errors:e}=this.state,{error:t,inProgress:n,config:r,t:o}=this.props;return window.netlifyIdentity?e.identity?(0,l.jsx)(s.AuthenticationPage,{logoUrl:r.logo_url,onLogin:this.handleIdentity,renderPageContent:()=>(0,l.jsx)("a",{href:"https://docs.netlify.com/visitor-access/git-gateway/#setup-and-settings",target:"_blank",rel:"noopener noreferrer"},e.identity)}):(0,l.jsx)(s.AuthenticationPage,{logoUrl:r.logo_url,onLogin:this.handleIdentity,renderButtonContent:()=>o("auth.loginWithNetlifyIdentity")}):(0,l.jsx)(s.AuthenticationPage,{logoUrl:r.logo_url,siteUrl:r.site_url,renderPageContent:()=>(0,l.jsx)(p,{onSubmit:this.handleLogin},t?(0,l.jsx)(m,null,t):null,e.server?(0,l.jsx)(m,null,String(e.server)):null,(0,l.jsx)(m,null,e.email||null),(0,l.jsx)(h,{type:"text",name:"email",placeholder:"Email",value:this.state.email,onChange:(0,i.default)(this.handleChange,"email")}),(0,l.jsx)(m,null,e.password||null),(0,l.jsx)(h,{type:"password",name:"password",placeholder:"Password",value:this.state.password,onChange:(0,i.default)(this.handleChange,"password")}),(0,l.jsx)(f,{disabled:n},o(n?"auth.loggingIn":"auth.login"))),t:o})}}t.default=v,d(v,"authClient",void 0),d(v,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool.isRequired,error:o.default.node,config:o.default.object.isRequired,t:o.default.func.isRequired})},function(e,t,n){var r=n(141),i=n(182),o=n(1161),a=n(121);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=l(n(0)),o=l(n(1)),a=n(16),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c=(0,r.default)("section",{target:"e121jgcy0",label:"StyledAuthenticationPage"})({name:"1ul3gz4",styles:"display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;height:100vh;"}),d=(0,r.default)(a.Icon,{target:"e121jgcy1",label:"PageLogoIcon"})({name:"11nl61t",styles:"color:#c4c6d2;margin-top:-300px;"}),f=(0,r.default)("button",{target:"e121jgcy2",label:"LoginButton"})(a.buttons.button,";",a.shadows.dropDeep,";",a.buttons.default,";",a.buttons.gray,";padding:0 30px;margin-top:-40px;display:flex;align-items:center;position:relative;",a.Icon,"{margin-right:18px;}");class p extends i.default.Component{constructor(...e){super(...e),u(this,"handleLogin",e=>{e.preventDefault(),this.props.onLogin(this.state)})}componentDidMount(){!1===this.props.config.backend.login&&this.props.onLogin(this.state)}render(){const{config:e,inProgress:t,t:n}=this.props;return(0,s.jsx)(c,null,(0,s.jsx)(d,{size:"300px",type:"netlify-cms"}),(0,s.jsx)(f,{disabled:t,onClick:this.handleLogin},n(t?"auth.loggingIn":"auth.login")),e.site_url&&(0,s.jsx)(a.GoBackButton,{href:e.site_url,t:n}))}}t.default=p,u(p,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,config:o.default.object.isRequired,t:o.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=l(n(0)),o=l(n(1)),a=n(16),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c=(0,r.default)("section",{target:"eyzerh70",label:"StyledAuthenticationPage"})({name:"1ul3gz4",styles:"display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;height:100vh;"}),d=(0,r.default)(a.Icon,{target:"eyzerh71",label:"PageLogoIcon"})({name:"11nl61t",styles:"color:#c4c6d2;margin-top:-300px;"}),f=(0,r.default)("button",{target:"eyzerh72",label:"LoginButton"})(a.buttons.button,";",a.shadows.dropDeep,";",a.buttons.default,";",a.buttons.gray,";padding:0 30px;margin-top:-40px;display:flex;align-items:center;position:relative;",a.Icon,"{margin-right:18px;}");class p extends i.default.Component{constructor(...e){super(...e),u(this,"handleLogin",e=>{e.preventDefault(),this.props.onLogin(this.state)})}render(){const{config:e,inProgress:t,t:n}=this.props;return(0,s.jsx)(c,null,(0,s.jsx)(d,{size:"300px",type:"netlify-cms"}),(0,s.jsx)(f,{disabled:t,onClick:this.handleLogin},n(t?"auth.loggingIn":"auth.login")),e.site_url&&(0,s.jsx)(a.GoBackButton,{href:e.site_url,t:n}))}}t.default=p,u(p,"propTypes",{onLogin:o.default.func.isRequired,inProgress:o.default.bool,config:o.default.object.isRequired,t:o.default.func.isRequired})},function(e,t,n){var r=n(111),i=n(126),o=n(172);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!i(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[l?t[u]:u]:void 0}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(1)),i=s(n(0)),o=n(225),a=n(1179);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),o=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:i.default.createElement(t,r,o)},r}(i.default.Component);d.childContextTypes={transitionGroup:r.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,o.polyfill)(d);t.default=f,e.exports=t.default},function(e,t){var n=1e3,r=6e4,i=36e5,o=24*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return a(e,t,o,"day");if(t>=i)return a(e,t,i,"hour");if(t>=r)return a(e,t,r,"minute");if(t>=n)return a(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(61),i=n(142);e.exports=function(e){var t,n,o;for(n in i(s,e),i(a,s),t=s.prototype)(o=t[n])&&"object"==typeof o&&(t[n]="concat"in o?o.concat():r(o));return s;function a(t){return e.apply(this,t)}function s(){return this instanceof s?e.apply(this,arguments):new a(arguments)}}},function(e,t,n){"use strict";e.exports=function(e,t,n){return function(){var r=n||this,i=r[e];return r[e]=!t,function(){r[e]=i}}}},function(e){e.exports=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},function(e,t,n){"use strict";var r=n(570),i=n(220);e.exports=function(e){return r(e)||i(e)}},function(e,t,n){"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},function(e,t,n){"use strict";e.exports=a;var r=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],i=r.concat(["~","|"]),o=i.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function a(e){var t=e||{};return t.commonmark?o:t.gfm?i:r}a.default=r,a.gfm=i,a.commonmark=o},function(e,t,n){"use strict";e.exports={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:n(1210)}},function(e,t,n){"use strict";e.exports=i;var r=n(365);function i(e,t,n,i){var a;function s(e,r,l){var u,c=[];return(t&&!a(e,r,l[l.length-1]||null)||!1!==(c=o(n(e,l)))[0])&&e.children&&"skip"!==c[0]&&!1===(u=o(function(e,t){var n,r=i?-1:1,o=(i?e.length:-1)+r;for(;o>-1&&o1&&(r=Math.floor(r/t)*t),o[r]=n,i=e.charAt(++n);return{indent:r,stops:o}}},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>";t.openCloseTag=new RegExp("^(?:"+r+"|"+i+")"),t.tag=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},function(e,t,n){"use strict";e.exports=function(e,t){return e.indexOf("<",t)}},function(e,t,n){"use strict";e.exports=function(e,t){var n=e.indexOf("[",t),r=e.indexOf("![",t);if(-1===r)return n;return no&&(o=i):i=1,n=r+1,r=e.indexOf(t,n);return o}},function(e,t,n){"use strict";e.exports=function(e){var t=e.referenceType;if("shortcut"===t)return"";return"["+("collapsed"===t?"":e.label||e.identifier)+"]"}},function(e,t,n){"use strict";var r=a("start"),i=a("end");function o(e){return{start:r(e),end:i(e)}}function a(e){return t.displayName=e,t;function t(t){var n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:isNaN(n.offset)?null:n.offset}}}e.exports=o,o.start=r,o.end=i},function(e,t,n){"use strict";var r=n(183);e.exports=function(e,t){return function(e){return function(t){var n=t&&o(t);return n&&i.call(e,n)?e[n]:null}}(function(e,t){var n={};if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return r(e,"definition",t&&t.commonmark?function(e){var t=o(e.identifier);i.call(n,t)||(n[t]=e)}:function(e){n[o(e.identifier)]=e}),n}(e,t))};var i={}.hasOwnProperty;function o(e){return e.toUpperCase()}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=t&&t.type,i=o.call(e.handlers,r)?e.handlers[r]:null;if(!r)throw new Error("Expected node, got `"+t+"`");return("function"==typeof i?i:a)(e,t,n)};var r=n(56),i=n(76),o={}.hasOwnProperty;function a(e,t){return function(e){var t=e.data||{};if(o.call(t,"hName")||o.call(t,"hProperties")||o.call(t,"hChildren"))return!1;return"value"in e}(t)?e.augment(t,r("text",t.value)):e(t,"div",i(e,t))}},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"hr")}},function(e,t,n){"use strict";e.exports=function(e,t){var n={},o=t.ordered?"ol":"ul";"number"==typeof t.start&&1!==t.start&&(n.start=t.start);return e(t,o,n,r(i(e,t),!0))};var r=n(184),i=n(76)},function(e,t,n){"use strict";e.exports=function(e,t){var n=t.identifier;return e(t.position,"sup",{id:"fnref-"+n},[e(t,"a",{href:"#fn-"+n,className:["footnote-ref"]},[r("text",n)])])};var r=n(56)},function(e,t,n){"use strict";e.exports=function(e,t){var n,o,a,s=t.referenceType,l="]";"collapsed"===s?l+="[]":"full"===s&&(l+="["+(t.label||t.identifier)+"]");if("imageReference"===t.type)return r("text","!["+t.alt+l);n=i(e,t),(o=n[0])&&"text"===o.type?o.value="["+o.value:n.unshift(r("text","["));(a=n[n.length-1])&&"text"===a.type?a.value+=l:n.push(r("text",l));return n};var r=n(56),i=n(76)},function(e,t,n){"use strict";var r=n(61),i=n(592);e.exports=function(e){var t,n,o=e.length,a=[],s=[],l=-1;for(;++l{const o=i.MODE[r];n[o]=function(n){e.ctLoc=e._getCurrentLocation(),t[o].call(this,n)}}),n}}},function(e,t,n){"use strict";const r=n(114);e.exports=class extends r{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(e,t){return{advance(){const n=this.pos+1,r=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const r=n-this.pos;e.lineStartPos-=r,e.droppedBufferSize+=r,e.offset=e.droppedBufferSize+this.pos}}}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=null;if("element"===t.type){if(t.properties&&"ignore"===t.properties.dataMdast)return;i.call(e.handlers,t.tagName)&&(r=e.handlers[t.tagName])}else i.call(e.handlers,t.type)&&(r=e.handlers[t.type]);return("function"==typeof r?r:o)(e,t,n)};var r=n(63),i={}.hasOwnProperty;function o(e,t){return t.value?e.augment(t,{type:"text",value:t.value}):r(e,t)}},function(e,t,n){"use strict";function r(e){return"text"===e.type?e.value:e.children?i(e):""}function i(e){for(var t=e.children,n=t.length,i=-1,o=[];++i1)for(;++ne.offPosition?"62px":"70px",";",e=>e.isActive&&(0,s.css)("font-weight:600;color:",u.colors.active,";;label:ToolbarToggleLabel;"),";");class y extends i.default.Component{constructor(...e){super(...e),f(this,"isVisible",e=>{const{buttons:t}=this.props;return!l.List.isList(t)||t.includes(e)}),f(this,"handleBlockClick",(e,t)=>{e&&e.preventDefault(),this.props.onBlockClick(t)}),f(this,"handleMarkClick",(e,t)=>{e.preventDefault(),this.props.onMarkClick(t)})}render(){const{onLinkClick:e,onToggleMode:t,rawMode:n,plugins:r,disabled:i,onSubmit:o,hasMark:a=(()=>{}),hasInline:d=(()=>{}),hasBlock:f=(()=>{}),editorComponents:y,t:b}=this.props,_=this.isVisible,w=!y||y.size>=1,E=r?r.toList().filter(({id:e})=>!y||y.includes(e)):(0,l.List)(),x={"heading-one":b("editor.editorWidgets.headingOptions.headingOne"),"heading-two":b("editor.editorWidgets.headingOptions.headingTwo"),"heading-three":b("editor.editorWidgets.headingOptions.headingThree"),"heading-four":b("editor.editorWidgets.headingOptions.headingFour"),"heading-five":b("editor.editorWidgets.headingOptions.headingFive"),"heading-six":b("editor.editorWidgets.headingOptions.headingSix")};return(0,s.jsx)(p,null,(0,s.jsx)("div",null,_("bold")&&(0,s.jsx)(c.default,{type:"bold",label:"Bold",icon:"bold",onClick:this.handleMarkClick,isActive:a("bold"),disabled:i}),_("italic")&&(0,s.jsx)(c.default,{type:"italic",label:"Italic",icon:"italic",onClick:this.handleMarkClick,isActive:a("italic"),disabled:i}),_("code")&&(0,s.jsx)(c.default,{type:"code",label:"Code",icon:"code",onClick:this.handleMarkClick,isActive:a("code"),disabled:i}),_("link")&&(0,s.jsx)(c.default,{type:"link",label:"Link",icon:"link",onClick:e,isActive:d("link"),disabled:i}),Object.keys(x).some(_)&&(0,s.jsx)(h,null,(0,s.jsx)(u.Dropdown,{dropdownTopOverlap:"36px",renderButton:()=>(0,s.jsx)(u.DropdownButton,null,(0,s.jsx)(c.default,{type:"headings",label:"Headings",icon:"hOptions",disabled:i,isActive:!i&&Object.keys(x).some(f)}))},!i&&Object.keys(x).map((e,t)=>_(e)&&(0,s.jsx)(u.DropdownItem,{key:t,label:x[e],className:f(e)?"active":"",onClick:()=>this.handleBlockClick(null,e)})))),_("quote")&&(0,s.jsx)(c.default,{type:"quote",label:"Quote",icon:"quote",onClick:this.handleBlockClick,isActive:f("quote"),disabled:i}),_("bulleted-list")&&(0,s.jsx)(c.default,{type:"bulleted-list",label:"Bulleted List",icon:"list-bulleted",onClick:this.handleBlockClick,isActive:f("bulleted-list"),disabled:i}),_("numbered-list")&&(0,s.jsx)(c.default,{type:"numbered-list",label:"Numbered List",icon:"list-numbered",onClick:this.handleBlockClick,isActive:f("numbered-list"),disabled:i}),w&&(0,s.jsx)(h,null,(0,s.jsx)(u.Dropdown,{dropdownTopOverlap:"36px",dropdownWidth:"110px",renderButton:()=>(0,s.jsx)(u.DropdownButton,null,(0,s.jsx)(c.default,{label:"Add Component",icon:"add-with",onClick:this.handleComponentsMenuToggle,disabled:i}))},E.map((e,t)=>(0,s.jsx)(u.DropdownItem,{key:t,label:e.label,onClick:()=>o(e)}))))),(0,s.jsx)(m,null,(0,s.jsx)(v,{isActive:!n,offPosition:!0},b("editor.editorWidgets.markdown.richText")),(0,s.jsx)(g,{active:n,onChange:t}),(0,s.jsx)(v,{isActive:n},b("editor.editorWidgets.markdown.markdown"))))}}t.default=y,f(y,"propTypes",{buttons:a.default.list,editorComponents:a.default.list,onToggleMode:o.default.func.isRequired,rawMode:o.default.bool,plugins:a.default.map,onSubmit:o.default.func,onAddAsset:o.default.func,getAsset:o.default.func,disabled:o.default.bool,onMarkClick:o.default.func,onBlockClick:o.default.func,onLinkClick:o.default.func,hasMark:o.default.func,hasInline:o.default.func,hasBlock:o.default.func,t:o.default.func.isRequired})},function(e,t,n){var r=n(1448);e.exports="string"==typeof r?r:r.toString()},function(e,t,n){"use strict";var r=n(624),i=n(1),o=n(187),a=n(122),s=n(0),l=n(1452),u=n(1457).default,c=Object.freeze({YEARS:"years",MONTHS:"months",DAYS:"days",TIME:"time"}),d=i,f=o({displayName:"DateTime",propTypes:{onFocus:d.func,onBlur:d.func,onChange:d.func,onViewModeChange:d.func,onNavigateBack:d.func,onNavigateForward:d.func,locale:d.string,utc:d.bool,displayTimeZone:d.string,input:d.bool,inputProps:d.object,timeConstraints:d.object,viewMode:d.oneOf([c.YEARS,c.MONTHS,c.DAYS,c.TIME]),isValidDate:d.func,open:d.bool,strictParsing:d.bool,closeOnSelect:d.bool,closeOnTab:d.bool},getInitialState:function(){this.checkTZ(this.props);var e=this.getStateFromProps(this.props);return void 0===e.open&&(e.open=!this.props.input),e.currentView=this.props.dateFormat?this.props.viewMode||e.updateOn||c.DAYS:c.TIME,e},parseDate:function(e,t){var n;return e&&"string"==typeof e?n=this.localMoment(e,t.datetime):e&&(n=this.localMoment(e)),n&&!n.isValid()&&(n=null),n},getStateFromProps:function(e){var t,n,r,i,o=this.getFormats(e),a=e.value||e.defaultValue;return t=this.parseDate(a,o),n=this.parseDate(e.viewDate,o),n=t?t.clone().startOf("month"):n?n.clone().startOf("month"):this.localMoment().startOf("month"),r=this.getUpdateOn(o),i=t?t.format(o.datetime):a.isValid&&!a.isValid()?"":a||"",{updateOn:r,inputFormat:o.datetime,viewDate:n,selectedDate:t,inputValue:i,open:e.open}},getUpdateOn:function(e){return e.date.match(/[lLD]/)?c.DAYS:-1!==e.date.indexOf("M")?c.MONTHS:-1!==e.date.indexOf("Y")?c.YEARS:c.DAYS},getFormats:function(e){var t={date:e.dateFormat||"",time:e.timeFormat||""},n=this.localMoment(e.date,null,e).localeData();return!0===t.date?t.date=n.longDateFormat("L"):this.getUpdateOn(t)!==c.DAYS&&(t.time=""),!0===t.time&&(t.time=n.longDateFormat("LT")),t.datetime=t.date&&t.time?t.date+" "+t.time:t.date||t.time,t},componentWillReceiveProps:function(e){var t=this.getFormats(e),n={};if(e.value===this.props.value&&t.datetime===this.getFormats(this.props).datetime||(n=this.getStateFromProps(e)),void 0===n.open&&(void 0!==e.open?n.open=e.open:this.props.closeOnSelect&&this.state.currentView!==c.TIME?n.open=!1:n.open=this.state.open),e.viewMode!==this.props.viewMode&&(n.currentView=e.viewMode),e.locale!==this.props.locale){if(this.state.viewDate){var r=this.state.viewDate.clone().locale(e.locale);n.viewDate=r}if(this.state.selectedDate){var i=this.state.selectedDate.clone().locale(e.locale);n.selectedDate=i,n.inputValue=i.format(t.datetime)}}e.utc===this.props.utc&&e.displayTimeZone===this.props.displayTimeZone||(e.utc?(this.state.viewDate&&(n.viewDate=this.state.viewDate.clone().utc()),this.state.selectedDate&&(n.selectedDate=this.state.selectedDate.clone().utc(),n.inputValue=n.selectedDate.format(t.datetime))):e.displayTimeZone?(this.state.viewDate&&(n.viewDate=this.state.viewDate.clone().tz(e.displayTimeZone)),this.state.selectedDate&&(n.selectedDate=this.state.selectedDate.clone().tz(e.displayTimeZone),n.inputValue=n.selectedDate.tz(e.displayTimeZone).format(t.datetime))):(this.state.viewDate&&(n.viewDate=this.state.viewDate.clone().local()),this.state.selectedDate&&(n.selectedDate=this.state.selectedDate.clone().local(),n.inputValue=n.selectedDate.format(t.datetime)))),e.viewDate!==this.props.viewDate&&(n.viewDate=a(e.viewDate)),this.checkTZ(e),this.setState(n)},onInputChange:function(e){var t=null===e.target?e:e.target.value,n=this.localMoment(t,this.state.inputFormat),r={inputValue:t};return n.isValid()&&!this.props.value?(r.selectedDate=n,r.viewDate=n.clone().startOf("month")):r.selectedDate=null,this.setState(r,(function(){return this.props.onChange(n.isValid()?n:this.state.inputValue)}))},onInputKey:function(e){9===e.which&&this.props.closeOnTab&&this.closeCalendar()},showView:function(e){var t=this;return function(){t.state.currentView!==e&&t.props.onViewModeChange(e),t.setState({currentView:e})}},setDate:function(e){var t=this,n={month:c.DAYS,year:c.MONTHS};return function(r){t.setState({viewDate:t.state.viewDate.clone()[e](parseInt(r.target.getAttribute("data-value"),10)).startOf(e),currentView:n[e]}),t.props.onViewModeChange(n[e])}},subtractTime:function(e,t,n){var r=this;return function(){r.props.onNavigateBack(e,t),r.updateTime("subtract",e,t,n)}},addTime:function(e,t,n){var r=this;return function(){r.props.onNavigateForward(e,t),r.updateTime("add",e,t,n)}},updateTime:function(e,t,n,r){var i={},o=r?"selectedDate":"viewDate";i[o]=this.state[o].clone()[e](t,n),this.setState(i)},allowedSetTime:["hours","minutes","seconds","milliseconds"],setTime:function(e,t){var n,r=this.allowedSetTime.indexOf(e)+1,i=this.state,o=(i.selectedDate||i.viewDate).clone();for(o[e](t);rc);d++){var f=e.getLine(u++);s=null==s?f:s+"\n"+f}l*=2,t.lastIndex=n.ch;var p=t.exec(s);if(p){var h=s.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,v=h[h.length-1].length;return{from:r(g,v),to:r(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function l(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function u(e,t,n){t=i(t,"g");for(var o=n.line,a=n.ch,s=e.firstLine();o>=s;o--,a=-1){var u=e.getLine(o),c=l(u,t,a<0?0:u.length-a);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function c(e,t,n){if(!o(t))return u(e,t,n);t=i(t,"gm");for(var a,s=1,c=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p=f;p++){var h=e.getLine(d--);a=null==a?h:h+"\n"+a}s*=2;var m=l(a,t,c);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function d(e,t,n,r){if(e.length==t.length)return n;for(var i=0,o=n+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function f(e,i,o,a){if(!i.length)return null;var s=a?t:n,l=s(i).split(/\r|\n\r?/);e:for(var u=o.line,c=o.ch,f=e.lastLine()+1-l.length;u<=f;u++,c=0){var p=e.getLine(u).slice(c),h=s(p);if(1==l.length){var m=h.indexOf(l[0]);if(-1==m)continue e;return o=d(p,h,m,s)+c,{from:r(u,d(p,h,m,s)+c),to:r(u,d(p,h,m+l[0].length,s)+c)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var v=1;v=f;u--,c=-1){var p=e.getLine(u);c>-1&&(p=p.slice(0,c));var h=s(p);if(1==l.length){var m=h.lastIndexOf(l[0]);if(-1==m)continue e;return{from:r(u,d(p,h,m,s)),to:r(u,d(p,h,m+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var v=1;for(o=u-l.length+1;v0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(n(4))},function(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),d=!u&&l>=0&&c.test(s.text.charAt(l))&&r[s.text.charAt(l)]||c.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(o&&o.strict&&f>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(f>0?1:0)),f,p||null,o);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,u=s&&s.maxScanLines||1e3,c=[],d=i(s),f=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),p=t.line;p!=f;p+=o){var h=e.getLine(p);if(h){var m=o>0?0:h.length-1,g=o>0?h.length:-1;if(!(h.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=h.charAt(m);if(d.test(v)&&(void 0===a||e.getTokenTypeAt(n(p,m+1))==a)){var y=r[v];if(y&&">"==y.charAt(1)==o>0)c.push(v);else{if(!c.length)return{pos:n(p,m),ch:v};c.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,r,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),u=0;u(0,o.jsx)(s,{onClick:t},(0,o.jsx)(i.Icon,{type:e?"close":"settings",size:"small"}));t.default=l},function(e,t,n){!function(e){"use strict";e.defineMode("coffeescript",(function(e,t){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var r=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,i=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,o=/^[_A-Za-z$][_A-Za-z$0-9]*/,a=/^@[_A-Za-z$][_A-Za-z$0-9]*/,s=n(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],u=n(l.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));l=n(l);var c=/^('{3}|\"{3}|['\"])/,d=/^(\/{3}|\/)/,f=n(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function p(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var n=t.scope.offset;if(e.eatSpace()){var l=e.indentation();return l>n&&"coffee"==t.scope.type?"indent":l0&&v(e,t)}if(e.eatSpace())return null;var p=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=m,t.tokenize(e,t);if("#"===p)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var g=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(g=!0),e.match(/^-?\d+\.\d*/)&&(g=!0),e.match(/^-?\.\d+/)&&(g=!0),g)return"."==e.peek()&&e.backUp(1),"number";var y=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(y=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(y=!0),e.match(/^-?0(?![\dx])/i)&&(y=!0),y)return"number"}if(e.match(c))return t.tokenize=h(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(d)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=h(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(r)||e.match(s)?"operator":e.match(i)?"punctuation":e.match(f)?"atom":e.match(a)||t.prop&&e.match(o)?"property":e.match(u)?"keyword":e.match(o)?"variable":(e.next(),"error")}function h(e,n,r){return function(i,o){for(;!i.eol();)if(i.eatWhile(/[^'"\/\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=p,r;i.eat(/['"\/]/)}return n&&(t.singleLineStringErrors?r="error":o.tokenize=p),r}}function m(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=p;break}e.eatWhile("#")}return"comment"}function g(t,n,r){r=r||"coffee";for(var i=0,o=!1,a=null,s=n.scope;s;s=s.prev)if("coffee"===s.type||"}"==s.type){i=s.offset+e.indentUnit;break}"coffee"!==r?(o=null,a=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:i,type:r,prev:n.scope,align:o,alignOffset:a}}function v(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,i=t.scope;i;i=i.prev)if(n===i.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}return{startState:function(e){return{tokenize:p,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=null===t.scope.align&&t.scope;n&&e.sol()&&(n.align=!1);var r=function(e,t){var n=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===n)&&g(e,t);var i="[({".indexOf(r);if(-1!==i&&g(e,t,"])}".slice(i,i+1)),l.exec(r)&&g(e,t),"then"==r&&v(e,t),"dedent"===n&&v(e,t))return"error";if(-1!==(i="])}".indexOf(r))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==r&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),n}(e,t);return r&&"comment"!=r&&(n&&(n.align=!0),t.prop="punctuation"==r&&"."==e.current()),r},indent:function(e,t){if(e.tokenize!=p)return 0;var n=e.scope,r=t&&"])}".indexOf(t.charAt(0))>-1;if(r)for(;"coffee"==n.type&&n.prev;)n=n.prev;var i=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(i?1:0):(i?n.prev:n).offset},lineComment:"#",fold:"indent"}})),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")}(n(4))},function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,c=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ *(?:\={1,}|-{1,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==_){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=k,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var a,f=r.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,_=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var x=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;x=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,o.code;if(r.eatSpace())return null;if(f&&i.indentation<=_&&(O=r.match(c))&&O[1].length<=6)return i.quote=0,i.header=O[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,E(i);if(i.indentation<=_&&r.eat(">"))return i.quote=f?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),E(i);if(!S&&!i.setext&&f&&i.indentation<=_&&(O=r.match(l))){var T=O[1]?"ol":"ul";return i.indentation=x+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(u,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),E(i)}return f&&i.indentation<=_&&(O=r.match(p,!0))?(i.quote=0,i.fencedEndRE=new RegExp(O[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(O[2]),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,E(i)):i.setext||!(k&&b||i.quote||!1!==i.list||i.code||S||h.test(r.string))&&(O=r.lookAhead(1))&&(O=O.match(d))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==O[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,E(i)):S?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===r.peek()?g(r,i,C):g(r,i,i.inline)}function _(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=k,n.block=b,n.htmlState=null)}return o}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,a=t.indentation=e.quote?t.push(o.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function x(e,t){if(e.match(f,!0))return E(t)}function k(t,i){var a=i.text(t,i);if(void 0!==a)return a;if(i.list)return i.list=null,E(i);if(i.taskList)return" "===t.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,E(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),E(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return o.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var p=E(i);return i.code=0,p}return i.formatting=d,E(i)}return i.code=f,E(i)}if(i.code)return E(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var h=E(i),g=o.formatting+"-escape";return h?h+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var h=E(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=O,h}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),E(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var h=E(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?O:k,h}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(h=E(i))?h+=" ":h="",h+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,n.highlightFormatting&&(i.formatting="link"),(h=E(i))?h+=" ":h="",h+o.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,_)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,x=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var T=t.peek()||" ",C=!/\s/.test(T)&&(!m.test(T)||/\s/.test(x)||m.test(x)),A=!/\s/.test(x)&&(!m.test(x)||/\s/.test(T)||m.test(T)),P=null,R=null;if(w%2&&(i.em||!C||"*"!==s&&A&&!m.test(x)?i.em!=s||!A||"*"!==s&&C&&!m.test(T)||(P=!1):P=!0),w>1&&(i.strong||!C||"*"!==s&&A&&!m.test(x)?i.strong!=s||!A||"*"!==s&&C&&!m.test(T)||(R=!1):R=!0),null!=R||null!=P)return n.highlightFormatting&&(i.formatting=null==P?"strong":null==R?"em":"strong em"),!0===P&&(i.em=s),!0===R&&(i.strong=s),p=E(i),!1===P&&(i.em=!1),!1===R&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return E(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=E(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),E(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return E(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var M=E(i);return i.emoji=!1,M}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),E(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link");var r=E(t);return r?r+=" ":r="",r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function O(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link-string");var i=E(t);return t.linkHref=!1,i}return e.match(T[r]),t.linkHref=!0,E(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,E(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function C(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,E(t)):g(e,t,k)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=P,n.highlightFormatting&&(t.formatting="link");var r=E(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function P(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=k,o.linkHref+" url")}var R={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:k,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=_)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==_?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:R}},indent:function(t,n,i){return t.block==_&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return R}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(4),n(222),n(630))},function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),e.defineMode("handlebars",(function(t,n){var r=e.getMode(t,"handlebars-tags");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:"{{",close:/\}\}\}?/,mode:r,parseDelimiters:!0}):r})),e.defineMIME("text/x-handlebars-template","handlebars")}(n(4),n(224),n(387))},function(e,t,n){!function(e){"use strict";e.defineMode("haskell",(function(e,t){function n(e,t,n){return t(n),n(e,t)}var r=/[a-z_]/,i=/[A-Z]/,o=/\d/,a=/[0-9A-Fa-f]/,s=/[0-7]/,l=/[a-z_A-Z0-9'\xa1-\uffff]/,u=/[-!#$%&*+.\/<=>?@\\^|~:]/,c=/[(),;[\]`{}]/,d=/[ \t\v\f]/;function f(e,t){if(e.eatWhile(d))return null;var h=e.next();if(c.test(h)){if("{"==h&&e.eat("-")){var m="comment";return e.eat("#")&&(m="meta"),n(e,t,function e(t,n){return 0==n?f:function(r,i){for(var o=n;!r.eol();){var a=r.next();if("{"==a&&r.eat("-"))++o;else if("-"==a&&r.eat("}")&&0==--o)return i(f),t}return i(e(t,o)),t}}(m,1))}return null}if("'"==h)return e.eat("\\"),e.next(),e.eat("'")?"string":"string error";if('"'==h)return n(e,t,p);if(i.test(h))return e.eatWhile(l),e.eat(".")?"qualifier":"variable-2";if(r.test(h))return e.eatWhile(l),"variable";if(o.test(h)){if("0"==h){if(e.eat(/[xX]/))return e.eatWhile(a),"integer";if(e.eat(/[oO]/))return e.eatWhile(s),"number"}return e.eatWhile(o),m="number",e.match(/^\.\d+/)&&(m="number"),e.eat(/[eE]/)&&(m="number",e.eat(/[-+]/),e.eatWhile(o)),m}return"."==h&&e.eat(".")?"keyword":u.test(h)?"-"==h&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(u))?(e.skipToEnd(),"comment"):(m="variable",":"==h&&(m="variable-2"),e.eatWhile(u),m):"error"}function p(e,t){for(;!e.eol();){var n=e.next();if('"'==n)return t(f),"string";if("\\"==n){if(e.eol()||e.eat(d))return t(h),"string";e.eat("&")||e.next()}}return t(f),"string error"}function h(e,t){return e.eat("\\")?n(e,t,p):(e.next(),t(f),"error")}var m=function(){var e={};function n(t){return function(){for(var n=0;n","@","~","=>"),n("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),n("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),n("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var r=t.overrideKeywords;if(r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i]);return e}();return{startState:function(){return{f:f}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,(function(e){t.f=e})),r=e.current();return m.hasOwnProperty(r)?m[r]:n},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}})),e.defineMIME("text/x-haskell","haskell")}(n(4))},function(e,t,n){!function(e){"use strict";e.defineMode("pug",(function(t){var n="keyword",r={"{":"}","(":")","[":"]"},i=e.getMode(t,"javascript");function o(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(i),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function a(e,t){if(e.match("#{"))return t.isInterpolating=!0,t.interpolationNesting=0,"punctuation"}function s(n,r){var i;if(n.match(/^:([\w\-]+)/))return t&&t.innerModes&&(i=t.innerModes(n.current().substring(1))),i||(i=n.current().substring(1)),"string"==typeof i&&(i=e.getMode(t,i)),l(n,r,i),"atom"}function l(n,r,i){i=e.mimeModes[i]||i,i=t.innerModes&&t.innerModes(i)||i,i=e.mimeModes[i]||i,i=e.getMode(t,i),r.indentOf=n.indentation(),i&&"null"!==i.name?r.innerMode=i:r.indentToken="string"}function u(t,n,r){if(t.indentation()>n.indentOf||n.innerModeForLine&&!t.sol()||r)return n.innerMode?(n.innerState||(n.innerState=n.innerMode.startState?e.startState(n.innerMode,t.indentation()):{}),t.hideFirstChars(n.indentOf+2,(function(){return n.innerMode.token(t,n.innerState)||!0}))):(t.skipToEnd(),n.indentToken);t.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}return o.prototype.copy=function(){var t=new o;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=e.copyState(i,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=e.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t},{startState:function(){return new o},copyState:function(e){return e.copy()},token:function(t,o){var c=u(t,o)||function(e,t){if(e.sol()&&(t.restOfLine=""),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine="",n}}(t,o)||function(e,t){if(t.isInterpolating){if("}"===e.peek()){if(t.interpolationNesting--,t.interpolationNesting<0)return e.next(),t.isInterpolating=!1,"punctuation"}else"{"===e.peek()&&t.interpolationNesting++;return i.token(e,t.jsState)||!0}}(t,o)||function(e,t){if(t.isIncludeFiltered){var n=s(e,t);return t.isIncludeFiltered=!1,t.restOfLine="string",n}}(t,o)||function(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,n;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return"variable"}}}(t,o)||function t(n,o){if(o.isAttrs){if(r[n.peek()]&&o.attrsNest.push(r[n.peek()]),o.attrsNest[o.attrsNest.length-1]===n.peek())o.attrsNest.pop();else if(n.eat(")"))return o.isAttrs=!1,"punctuation";if(o.inAttributeName&&n.match(/^[^=,\)!]+/))return"="!==n.peek()&&"!"!==n.peek()||(o.inAttributeName=!1,o.jsState=e.startState(i),"script"===o.lastTag&&"type"===n.current().trim().toLowerCase()?o.attributeIsType=!0:o.attributeIsType=!1),"attribute";var a=i.token(n,o.jsState);if(o.attributeIsType&&"string"===a&&(o.scriptType=n.current().toString()),0===o.attrsNest.length&&("string"===a||"variable"===a||"keyword"===a))try{return Function("","var x "+o.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),o.inAttributeName=!0,o.attrValue="",n.backUp(n.current().length),t(n,o)}catch(e){}return o.attrValue+=n.current(),a||!0}}(t,o)||function(e,t){if(e.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&":"===e.peek())return t.javaScriptLine=!1,void(t.javaScriptLineExcludesColon=!1);var n=i.token(e,t.jsState);return e.eol()&&(t.javaScriptLine=!1),n||!0}}(t,o)||function(e,t){if(t.javaScriptArguments)return 0===t.javaScriptArgumentsDepth&&"("!==e.peek()?void(t.javaScriptArguments=!1):("("===e.peek()?t.javaScriptArgumentsDepth++:")"===e.peek()&&t.javaScriptArgumentsDepth--,0===t.javaScriptArgumentsDepth?void(t.javaScriptArguments=!1):i.token(e,t.jsState)||!0)}(t,o)||function(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}(t,o)||function(e){if(e.match(/^yield\b/))return"keyword"}(t)||function(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return"meta"}(t)||a(t,o)||function(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,n}(t,o)||function(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,n}(t,o)||function(e){if(e.match(/^default\b/))return n}(t)||function(e,t){if(e.match(/^extends?\b/))return t.restOfLine="string",n}(t,o)||function(e,t){if(e.match(/^append\b/))return t.restOfLine="variable",n}(t,o)||function(e,t){if(e.match(/^prepend\b/))return t.restOfLine="variable",n}(t,o)||function(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine="variable",n}(t,o)||function(e,t){if(e.match(/^include\b/))return t.restOfLine="string",n}(t,o)||function(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match("include"))return t.isIncludeFiltered=!0,n}(t,o)||function(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,n}(t,o)||function(e,t){return e.match(/^\+([-\w]+)/)?(e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),"variable"):e.match(/^\+#{/,!1)?(e.next(),t.mixinCallAfter=!0,a(e,t)):void 0}(t,o)||function(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,n}(t,o)||function(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,n}(t,o)||function(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,n}(t,o)||function(e,t){var n;if(n=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),"script"===t.lastTag&&(t.scriptType="application/javascript"),"tag"}(t,o)||s(t,o)||function(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,"punctuation"}(t,o)||function(e){if(e.match(/^#([\w-]+)/))return"builtin"}(t)||function(e){if(e.match(/^\.([\w-]+)/))return"qualifier"}(t)||function(e,t){if("("==e.peek())return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue="",t.attributeIsType=!1,"punctuation"}(t,o)||function(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,"keyword"}(t,o)||function(e){if(e.sol()&&e.eatSpace())return"indent"}(t)||function(e,t){return e.match(/^(?:\| ?| )([^\n]+)/)?"string":e.match(/^(<[^\n]*)/,!1)?(l(e,t,"htmlmixed"),t.innerModeForLine=!0,u(e,t,!0)):void 0}(t,o)||function(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken="comment","comment"}(t,o)||function(e){if(e.match(/^: */))return"colon"}(t)||function(e,t){if(e.eat(".")){var n=null;return"script"===t.lastTag&&-1!=t.scriptType.toLowerCase().indexOf("javascript")?n=t.scriptType.toLowerCase().replace(/"|'/g,""):"style"===t.lastTag&&(n="css"),l(e,t,n),"dot"}}(t,o)||function(e){return e.next(),null}(t);return!0===c?null:c}}}),"javascript","css","htmlmixed"),e.defineMIME("text/x-pug","pug"),e.defineMIME("text/x-jade","pug")}(n(4),n(188),n(221),n(115))},function(e,t,n){!function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n,r=t(["and","or","not","is"]),i=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],o=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function a(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",i.concat(o)),e.defineMode("python",(function(n,s){for(var l=s.delimiters||s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[s.singleOperators,s.doubleOperators,s.doubleDelimiters,s.tripleDelimiters,s.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],c=0;cr?w(t):i0&&E(e,t)&&(o+=" error"),o}return _(e,t)}function _(e,t){if(e.eatSpace())return null;if(e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var n=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),e.match(/^[\d_]+\.\d*/)&&(n=!0),e.match(/^\.\d+/)&&(n=!0),n)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}if(e.match(g))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length;function r(e){return function(t,n){var o=_(t,n);return"punctuation"==o&&("{"==t.current()?n.tokenize=r(e+1):"}"==t.current()&&(n.tokenize=e>1?r(e-1):i)),o}}function i(i,o){for(;!i.eol();)if(i.eatWhile(/[^'"\{\}\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return"string"}else{if(i.match(e))return o.tokenize=t,"string";if(i.match("{{"))return"string";if(i.match("{",!1))return o.tokenize=r(0),i.current()?"string":o.tokenize(i,o);if(i.match("}}"))return"string";if(i.match("}"))return"error";i.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return"error";o.tokenize=t}return"string"}return i.isString=!0,i}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length;function r(r,i){for(;!r.eol();)if(r.eatWhile(/[^'"\\]/),r.eat("\\")){if(r.next(),n&&r.eol())return"string"}else{if(r.match(e))return i.tokenize=t,"string";r.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return"error";i.tokenize=t}return"string"}return r.isString=!0,r}(e.current(),t.tokenize),t.tokenize(e,t));for(var o=0;o1&&a(t).offset>n;){if("py"!=a(t).type)return!0;t.scopes.pop()}return a(t).offset!=n}function x(e,t){e.sol()&&(t.beginningOfLine=!0);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(m,!1)?"meta":h?"operator":"error";if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent+=1),"lambda"==r&&(t.lambda=!0),":"!=r||t.lambda||"py"!=a(t).type||w(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+d,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(a(t).type!=r)return"error";t.indent=t.scopes.pop().offset-d}}return t.dedent>0&&e.eol()&&"py"==a(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),n}return{startState:function(e){return{tokenize:b,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=x(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" error":r},indent:function(t,n){if(t.tokenize!=b)return t.tokenize.isString?e.Pass:0;var r=a(t),i=r.type==n.charAt(0);return null!=r.align?r.align-(i?1:0):r.offset-(i?d:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-python","python"),e.defineMIME("text/x-cython",{name:"python",extra_keywords:(n="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",n.split(" "))})}(n(4))},function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function a(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(t,u),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return a(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return a(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return a(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return a(t,(function(e,t){return l(e,t,"$")})),"keyword";var c=e.next();return"%"==c?(e.skipToEnd(),"comment"):"}"==c||"]"==c?(i=r(t))?(i.closeBracket(c),a(t,u),"bracket"):"error":"{"==c||"["==c?(n(t,i=new(i=o.DEFAULT)),"bracket"):/\d/.test(c)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return a(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function u(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),a(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(a(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return o.importmodule=i("importmodule","tag",["string","builtin"]),o.documentclass=i("documentclass","tag",["","atom"]),o.usepackage=i("usepackage","tag",["atom"]),o.begin=i("begin","tag",["atom"]),o.end=i("end","tag",["atom"]),o.label=i("label","tag",["atom"]),o.ref=i("ref","tag",["atom"]),o.eqref=i("eqref","tag",["atom"]),o.cite=i("cite","tag",["atom"]),o.bibitem=i("bibitem","tag",["atom"]),o.Bibitem=i("Bibitem","tag",["atom"]),o.RBibitem=i("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(4))},function(e,t,n){!function(e){"use strict";e.defineMode("sass",(function(t){var n,r=e.mimeModes["text/css"],i=r.propertyKeywords||{},o=r.colorKeywords||{},a=r.valueKeywords||{},s=r.fontProperties||{},l=new RegExp("^"+["true","false","null","auto"].join("|")),u=new RegExp("^"+["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"].join("|")),c=/^::?[a-zA-Z_][\w\-]*/;function d(e){return!e.peek()||e.match(/\s+$/,!1)}function f(e,t){var n=e.peek();return")"===n?(e.next(),t.tokenizer=y,"operator"):"("===n?(e.next(),e.eatSpace(),"operator"):"'"===n||'"'===n?(t.tokenizer=h(e.next()),"string"):(t.tokenizer=h(")",!1),"string")}function p(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=y,y(n,r)):(t&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=y):n.skipToEnd(),"comment")}}function h(e,t){return null==t&&(t=!0),function n(r,i){var o=r.next(),a=r.peek(),s=r.string.charAt(r.pos-2);return"\\"!==o&&a===e||o===e&&"\\"!==s?(o!==e&&t&&r.next(),d(r)&&(i.cursorHalf=0),i.tokenizer=y,"string"):"#"===o&&"{"===a?(i.tokenizer=m(n),r.next(),"operator"):"string"}}function m(e){return function(t,n){return"}"===t.peek()?(t.next(),n.tokenizer=e,"operator"):y(t,n)}}function g(e){if(0==e.indentCount){e.indentCount++;var n=e.scopes[0].offset+t.indentUnit;e.scopes.unshift({offset:n})}}function v(e){1!=e.scopes.length&&e.scopes.shift()}function y(e,t){var r=e.peek();if(e.match("/*"))return t.tokenizer=p(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=p(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=m(y),"operator";if('"'===r||"'"===r)return e.next(),t.tokenizer=h(r),"string";if(t.cursorHalf){if("#"===r&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return d(e)&&(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return d(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return d(e)&&(t.cursorHalf=0),"unit";if(e.match(l))return d(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=f,d(e)&&(t.cursorHalf=0),"atom";if("$"===r)return e.next(),e.eatWhile(/[\w-]/),d(e)&&(t.cursorHalf=0),"variable-2";if("!"===r)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(u))return d(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return d(e)&&(t.cursorHalf=0),n=e.current().toLowerCase(),a.hasOwnProperty(n)?"atom":o.hasOwnProperty(n)?"keyword":i.hasOwnProperty(n)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(d(e))return t.cursorHalf=0,null}else{if("-"===r&&e.match(/^-\w+-/))return"meta";if("."===r){if(e.next(),e.match(/^[\w-]+/))return g(t),"qualifier";if("#"===e.peek())return g(t),"tag"}if("#"===r){if(e.next(),e.match(/^[\w-]+/))return g(t),"builtin";if("#"===e.peek())return g(t),"tag"}if("$"===r)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(l))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=f,"atom";if("="===r&&e.match(/^=[\w-]+/))return g(t),"meta";if("+"===r&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===r&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||v(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return g(t),"def";if("@"===r)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){n=e.current().toLowerCase();var b=t.prevProp+"-"+n;return i.hasOwnProperty(b)?"property":i.hasOwnProperty(n)?(t.prevProp=n,"property"):s.hasOwnProperty(n)?"property":"tag"}return e.match(/ *:/,!1)?(g(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):(e.match(/ *,/,!1)||g(t),"tag")}if(":"===r)return e.match(c)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(u)?"operator":(e.next(),null)}return{startState:function(){return{tokenizer:y,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,n){var r=function(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if("@return"!==i&&"}"!==i||v(n),null!==r){for(var o=e.pos-i.length+t.indentUnit*n.indentCount,a=[],s=0;s]=?|\?:|\~)/,I=h(c),D=m(d),j=new RegExp(/^\-(moz|ms|o|webkit)-/i),L=m(f),N="",F={};_.length|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=N?N[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),p=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=U,U(e,t);if('"'==p||"'"==p)return e.next(),t.tokenize=z(p),t.tokenize(e,t);if("@"==p)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==p){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(j)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==p?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==p&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(C)?("("==e.peek()&&(t.tokenize=q),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(I)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!K(e.current())?(e.match(/\./),["variable-2","variable-name"]):["variable-2","word"]:e.match(M)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(p)?(e.next(),[null,p]):(e.next(),[null,null])}function U(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}function z(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),["string","string"]}}function q(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=z(")"),[null,"("]}function H(e,t,n,r){this.type=e,this.indent=t,this.prev=n,this.line=r||{firstWord:"",indent:0}}function W(e,t,n,r){return r=r>=0?r:b,e.context=new H(n,t.indentation()+r,e.context),n}function G(e,t){var n=e.context.indent-b;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=n),e.context.type}function V(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return function(e,t,n){return F[n.context.type](e,t,n)}(e,t,n)}function K(e){return e.toLowerCase()in w}function $(e){return(e=e.toLowerCase())in x||e in R}function Y(e){return e.toLowerCase()in D}function Q(e){return e.toLowerCase().match(j)}function X(e){var t=e.toLowerCase(),n="variable-2";return K(e)?n="tag":Y(e)?n="block-keyword":$(e)?n="property":t in S||t in L?n="atom":"return"==t||t in O?n="keyword":e.match(/^[A-Z]/)&&(n="string"),n}function J(e,t){return ne(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function Z(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function ee(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function te(e){return e.sol()||e.string.match(new RegExp("^\\s*"+e.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function ne(e){return e.eol()||e.match(/^\s*$/,!1)}function re(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,n="string"==typeof e?e.match(t):e.string.match(t);return n?n[0].replace(/^\s*/,""):""}return F.block=function(e,t,n){if("comment"==e&&te(t)||","==e&&ne(t)||"mixin"==e)return W(n,t,"block",0);if(Z(e,t))return W(n,t,"interpolation");if(ne(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!K(re(t)))return W(n,t,"block",0);if(J(e,t))return W(n,t,"block");if("}"==e&&ne(t))return W(n,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||Y(re(t))?W(n,t,"variableName"):W(n,t,"variableName",0);if("="==e)return ne(t)||Y(re(t))?W(n,t,"block"):W(n,t,"block",0);if("*"==e&&(ne(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return y="tag",W(n,t,"block");if(ee(e,t))return W(n,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return W(n,t,ne(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return W(n,t,"keyframes");if(/@extends?/.test(e))return W(n,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&$(t.current().slice(1))?(y="variable-2","block"):/(@import|@require|@charset)/.test(e)?W(n,t,"block",0):W(n,t,"block");if("reference"==e&&ne(t))return W(n,t,"block");if("("==e)return W(n,t,"parens");if("vendor-prefixes"==e)return W(n,t,"vendorPrefixes");if("word"==e){var r=t.current();if("property"==(y=X(r)))return te(t)?W(n,t,"block",0):(y="atom","block");if("tag"==y){if(/embed|menu|pre|progress|sub|table/.test(r)&&$(re(t)))return y="atom","block";if(t.string.match(new RegExp("\\[\\s*"+r+"|"+r+"\\s*\\]")))return y="atom","block";if(E.test(r)&&(te(t)&&t.string.match(/=/)||!te(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!K(re(t))))return y="variable-2",Y(re(t))?"block":W(n,t,"block",0);if(ne(t))return W(n,t,"block")}if("block-keyword"==y)return y="keyword",t.current(/(if|unless)/)&&!te(t)?"block":W(n,t,"block");if("return"==r)return W(n,t,"block",0);if("variable-2"==y&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return W(n,t,"block")}return n.context.type},F.parens=function(e,t,n){if("("==e)return W(n,t,"parens");if(")"==e)return"parens"==n.context.prev.type?G(n):t.string.match(/^[a-z][\w-]*\(/i)&&ne(t)||Y(re(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(re(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&K(re(t))?W(n,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?W(n,t,"block",0):ne(t)?W(n,t,"block"):W(n,t,"block",0);if(e&&"@"==e.charAt(0)&&$(t.current().slice(1))&&(y="variable-2"),"word"==e){var r=t.current();"tag"==(y=X(r))&&E.test(r)&&(y="variable-2"),"property"!=y&&"to"!=r||(y="atom")}return"variable-name"==e?W(n,t,"variableName"):ee(e,t)?W(n,t,"pseudo"):n.context.type},F.vendorPrefixes=function(e,t,n){return"word"==e?(y="property",W(n,t,"block",0)):G(n)},F.pseudo=function(e,t,n){return $(re(t.string))?V(e,t,n):(t.match(/^[a-z-]+/),y="variable-3",ne(t)?W(n,t,"block"):G(n))},F.atBlock=function(e,t,n){if("("==e)return W(n,t,"atBlock_parens");if(J(e,t))return W(n,t,"block");if(Z(e,t))return W(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();if("tag"==(y=/^(only|not|and|or)$/.test(r)?"keyword":T.hasOwnProperty(r)?"tag":P.hasOwnProperty(r)?"attribute":A.hasOwnProperty(r)?"property":k.hasOwnProperty(r)?"string-2":X(t.current()))&&ne(t))return W(n,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(y="keyword"),n.context.type},F.atBlock_parens=function(e,t,n){if("{"==e||"}"==e)return n.context.type;if(")"==e)return ne(t)?W(n,t,"block"):W(n,t,"atBlock");if("word"==e){var r=t.current().toLowerCase();return y=X(r),/^(max|min)/.test(r)&&(y="property"),"tag"==y&&(y=E.test(r)?"variable-2":"atom"),n.context.type}return F.atBlock(e,t,n)},F.keyframes=function(e,t,n){return"0"==t.indentation()&&("}"==e&&te(t)||"]"==e||"hash"==e||"qualifier"==e||K(t.current()))?V(e,t,n):"{"==e?W(n,t,"keyframes"):"}"==e?te(t)?G(n,!0):W(n,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?W(n,t,"keyframes"):"word"==e&&"block-keyword"==(y=X(t.current()))?(y="keyword",W(n,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?W(n,t,ne(t)?"block":"atBlock"):"mixin"==e?W(n,t,"block",0):n.context.type},F.interpolation=function(e,t,n){return"{"==e&&G(n)&&W(n,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&K(re(t))?W(n,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?W(n,t,"block",0):W(n,t,"block"):"variable-name"==e?W(n,t,"variableName",0):("word"==e&&"tag"==(y=X(t.current()))&&(y="atom"),n.context.type)},F.extend=function(e,t,n){return"["==e||"="==e?"extend":"]"==e?G(n):"word"==e?(y=X(t.current()),"extend"):G(n)},F.variableName=function(e,t,n){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(y="variable-2"),"variableName"):V(e,t,n)},{startState:function(e){return{tokenize:null,state:"block",context:new H("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((g=(t.tokenize||B)(e,t))&&"object"==typeof g&&(v=g[1],g=g[0]),y=g,t.state=F[t.state](v,e,t),y)},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),o=r.indent,a=re(t),s=n.match(/^\s*/)[0].replace(/\t/g,_).length,l=e.context.prev?e.context.prev.line.firstWord:"",u=e.context.prev?e.context.prev.line.indent:s;return r.prev&&("}"==i&&("block"==r.type||"atBlock"==r.type||"keyframes"==r.type)||")"==i&&("parens"==r.type||"atBlock_parens"==r.type)||"{"==i&&"at"==r.type)?o=r.indent-b:/(\})/.test(i)||(/@|\$|\d/.test(i)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(l)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||Y(a)?o=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||K(a)?o=/\,\s*$/.test(l)?u:/^\s+/.test(n)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||K(l))?s<=u?u:u+b:s:/,\s*$/.test(n)||!Q(a)&&!$(a)||(o=Y(l)?s<=u?u:u+b:/^\{/.test(l)?s<=u?s:u+b:Q(l)||$(l)?s>=u?u:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(l)||/=\s*$/.test(l)||K(l)||/^\$[\w-\.\[\]\'\"]/.test(l)?u+b:s)),o},electricChars:"}",lineComment:"//",fold:"indent"}}));var t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],n=["domain","regexp","url","url-prefix"],r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],o=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],a=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],s=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],l=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],c=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],d=["for","if","else","unless","from","to"],f=["null","true","false","href","title","type","not-allowed","readonly","disabled"],p=t.concat(n,r,i,o,a,l,u,s,c,d,f,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function h(e){return e=e.sort((function(e,t){return t>e})),new RegExp("^(("+e.join(")|(")+"))\\b")}function m(e){for(var t={},n=0;nn.keyCol)return t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def";if(t.match(/\.\.\./))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}(n(4))},function(e,t,n){"use strict";n.r(t),n.d(t,"ConnectedRouter",(function(){return m})),n.d(t,"getLocation",(function(){return v})),n.d(t,"createMatchSelector",(function(){return y})),n.d(t,"LOCATION_CHANGE",(function(){return u})),n.d(t,"routerReducer",(function(){return d})),n.d(t,"CALL_HISTORY_METHOD",(function(){return b})),n.d(t,"push",(function(){return w})),n.d(t,"replace",(function(){return E})),n.d(t,"go",(function(){return x})),n.d(t,"goBack",(function(){return k})),n.d(t,"goForward",(function(){return S})),n.d(t,"routerActions",(function(){return O})),n.d(t,"routerMiddleware",(function(){return T}));var r=n(0),i=n.n(r),o=n(1),a=n.n(o),s=n(190),l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;return n===u?l({},e,{location:r}):e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){var n,r;f(this,t);for(var i=arguments.length,o=Array(i),a=0;afunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:u},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:u},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.NetlifyCmsWidgetMarkdown=void 0;var r=o(n(364)),i=o(n(1434));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l={Widget:(e={})=>function(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;tfunction(e){for(var t=1;te&&{image:e[2],alt:e[1],title:e[4]},toBlock:({alt:e,image:t,title:n})=>"![".concat(e||"","](").concat(t||"").concat(n?' "'.concat(n.replace(/"/g,'\\"'),'"'):"",")"),toPreview:({alt:e,image:t,title:n},r,o)=>{const a=r(t,null==o?void 0:o.find(e=>"image"===e.get("widget")));return(0,i.jsx)("img",{src:a||"",alt:e||"",title:n||""})},pattern:/^!\[(.*)\]\((.*?)(\s"(.*)")?\)$/,fields:[{label:"Image",name:"image",widget:"image",media_library:{allow_multiple:!1}},{label:"Alt Text",name:"alt"},{label:"Title",name:"title"}]},a=o;t.NetlifyCmsEditorComponentImage=a;var s=o;t.default=s},function(e,t,n){"use strict";var r=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var o=function(e){for(var t,n=e.length,r=n^n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)};var a=function(e){function t(e,t,r){var i=t.trim().split(h);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";sr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0p)&&(B=(q=q.replace(" ",":")).length),01?i-1:0),a=1;a({locale:(0,f.selectLocale)(e.config)}))(({locale:e})=>(0,v.jsx)(p.I18n,{locale:e,messages:(0,d.getPhrases)(e)},(0,v.jsx)(m.ErrorBoundary,{showBackup:!0},(0,v.jsx)(s.ConnectedRouter,{history:l.default},(0,v.jsx)(a.Route,{component:g.default})))));var _=function(e={}){const{config:t}=e;console.log("netlify-cms-core ".concat("2.22.2")),t&&u.default.dispatch((0,c.mergeConfig)(t)),(0,i.render)((0,v.jsx)(()=>(0,v.jsx)(r.default.Fragment,null,(0,v.jsx)(h.GlobalStyles,null),(0,v.jsx)(o.Provider,{store:u.default},(0,v.jsx)(b,null))),null),function(){const e=document.getElementById("nc-root");if(e)return e;const t=document.createElement("div");return t.id="nc-root",document.body.appendChild(t),t}())};t.default=_},function(e,t,n){"use strict";var r=n(680);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict"; /** @license React v16.13.0 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case g:case u:return e;default:return t}}case o:return t}}}function x(e){return E(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=i,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return x(e)||E(e)===d},t.isConcurrentMode=x,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===p},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===o},t.isProfiler=function(e){return E(e)===l},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===_||e.$$typeof===w||e.$$typeof===y)},t.typeOf=E},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);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}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}n.r(t);var i=r();i.withExtraArgument=r,t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(154),i=n(639),o=n(138),a=l(n(411)),s=l(n(85));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=(0,a.default)((0,r.combineReducers)(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];if(!t||!t.type)return e;switch(t.type){case r.NOTIF_SEND:return[t.payload].concat(i(e.filter((function(e){return e.id!==t.payload.id}))));case r.NOTIF_DISMISS:return e.filter((function(e){return e.id!==t.payload}));case r.NOTIF_CLEAR:return[];default:return e}};var r=n(402);function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t3&&void 0!==arguments[3]?arguments[3]:{},w=Boolean(e),E=e||h,x=void 0;x="function"==typeof t?t:t?(0,s.default)(t):m;var k=n||g,S=c.pure,O=void 0===S||S,T=c.withRef,C=void 0!==T&&T,A=O&&k!==g,P=_++;return function(e){var t="Connect("+v(e)+")";var n=function(n){function o(e,r){d(this,o);var i=f(this,n.call(this,e,r));i.version=P,i.store=e.store||r.store,(0,u.default)(i.store,'Could not find "store" in either the context or props of "'+t+'". Either wrap the root component in a , or explicitly pass "store" as a prop to "'+t+'".');var a=i.store.getState();return i.state={storeState:a},i.clearCache(),i}return p(o,n),o.prototype.shouldComponentUpdate=function(){return!O||this.haveOwnPropsChanged||this.hasStoreStateChanged},o.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState();return this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n)},o.prototype.configureFinalMapState=function(e,t){var n=E(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:E,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},o.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch;return this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n)},o.prototype.configureFinalMapDispatch=function(e,t){var n=x(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:x,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},o.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,a.default)(e,this.stateProps))&&(this.stateProps=e,!0)},o.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,a.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},o.prototype.updateMergedPropsIfNeeded=function(){var e,t,n,r=(e=this.stateProps,t=this.dispatchProps,n=this.props,k(e,t,n));return!(this.mergedProps&&A&&(0,a.default)(r,this.mergedProps))&&(this.mergedProps=r,!0)},o.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},o.prototype.trySubscribe=function(){w&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},o.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},o.prototype.componentDidMount=function(){this.trySubscribe()},o.prototype.componentWillReceiveProps=function(e){O&&(0,a.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},o.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},o.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},o.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!O||t!==e){if(O&&!this.doStatePropsDependOnOwnProps){var n=b(this.updateStatePropsIfNeeded,this);if(!n)return;n===y&&(this.statePropsPrecalculationError=y.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},o.prototype.getWrappedInstance=function(){return(0,u.default)(C,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},o.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,o=this.haveStatePropsBeenPrecalculated,a=this.statePropsPrecalculationError,s=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,a)throw a;var l=!0,u=!0;O&&s&&(l=n||t&&this.doStatePropsDependOnOwnProps,u=t&&this.doDispatchPropsDependOnOwnProps);var c=!1,d=!1;o?c=!0:l&&(c=this.updateStatePropsIfNeeded()),u&&(d=this.updateDispatchPropsIfNeeded());return!(!!(c||d||t)&&this.updateMergedPropsIfNeeded())&&s?s:(this.renderedElement=C?(0,i.createElement)(e,r({},this.mergedProps,{ref:"wrappedInstance"})):(0,i.createElement)(e,this.mergedProps),this.renderedElement)},o}(i.Component);return n.displayName=t,n.WrappedComponent=e,n.contextTypes={store:o.default},n.propTypes={store:o.default},(0,l.default)(n,e)}};var i=n(0),o=c(n(403)),a=c(n(691)),s=c(n(692)),l=(c(n(404)),c(n(199)),c(n(189))),u=c(n(23));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){return{}},m=function(e){return{dispatch:e}},g=function(e,t,n){return r({},n,e,t)};function v(e){return e.displayName||e.name||"Component"}var y={value:null};function b(e,t){try{return e.apply(t)}catch(e){return y.value=e,y}}var _=0},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,o=0;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:i,innerState:e}}e.exports=function(e){function t(t,n,i){return t.length&&(t=t.concat([{action:i}])),a(n=e(n,i),i),r({optimist:t},n)}return function(n,i){if(i.optimist)switch(i.optimist.type){case"BEGIN":return function(t,n){var i=s(t),o=i.optimist,l=i.innerState;return o=o.concat([{beforeState:l,action:n}]),a(l=e(l,n),n),r({optimist:o},l)}(n,i);case"COMMIT":return function(e,n){var r=s(e),i=r.optimist,a=r.innerState,l=[],u=!1,c=!1;return i.forEach((function(e){u?e.beforeState&&o(e.action,n.optimist.id)?(c=!0,l.push({action:e.action})):l.push(e):e.beforeState&&!o(e.action,n.optimist.id)?(u=!0,l.push(e)):e.beforeState&&o(e.action,n.optimist.id)&&(c=!0)})),c||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),t(i=l,a,n)}(n,i);case"REVERT":return function(n,r){var i=s(n),l=i.optimist,u=i.innerState,c=[],d=!1,f=!1,p=u;return l.forEach((function(t){t.beforeState&&o(t.action,r.optimist.id)&&(p=t.beforeState,f=!0),o(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(f&&t.beforeState?c.push({beforeState:p,action:t.action}):c.push(t)),f&&(p=e(p,t.action),a(u,r)))})),f||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),t(l=c,p,r)}(n,i)}var l=s(n),u=l.optimist,c=l.innerState;if(n&&!u.length){var d=e(c,i);return d===c?n:(a(d,i),r({optimist:u},d))}return t(u,c,i)}},e.exports.BEGIN="BEGIN",e.exports.COMMIT="COMMIT",e.exports.REVERT="REVERT"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(3))&&r.__esModule?r:{default:r},o=n(200);var a=(e=null,t)=>{switch(t.type){case o.AUTH_REQUEST:return i.default.Map({isFetching:!0});case o.AUTH_SUCCESS:return i.default.fromJS({user:t.payload});case o.AUTH_FAILURE:return i.default.Map({error:t.payload&&t.payload.toString()});case o.AUTH_REQUEST_DONE:return e.remove("isFetching");case o.LOGOUT:return e.remove("user").remove("isFetching");default:return e}};t.default=a},function(e,t,n){var r=n(233),i=n(238),o=n(305),a=n(239),s=n(733),l=n(306);e.exports=function(e,t,n){var u=-1,c=i,d=e.length,f=!0,p=[],h=p;if(n)f=!1,c=o;else if(d>=200){var m=t?null:s(e);if(m)return l(m);f=!1,c=a,h=new r}else h=t?[]:p;e:for(;++u-1}},function(e,t,n){var r=n(236);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(237);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(237);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(237);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(237);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r>10),56320+(e-65536&1023))}for(var E=new Array(256),x=new Array(256),k=0;k<256;k++)E[k]=_(k)?1:0,x[k]=_(k);function S(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function O(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function T(e,t){throw O(e,t)}function C(e,t){e.onWarning&&e.onWarning.call(null,O(e,t))}var A={YAML:function(e,t,n){var r,i,o;null!==e.version&&T(e,"duplication of %YAML directive"),1!==n.length&&T(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&T(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&T(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&C(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&T(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],f.test(r)||T(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&T(e,'there is a previously declared suffix for "'+r+'" tag handle'),p.test(i)||T(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function P(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function N(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&v(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,3,!1,!0),a.push(e.result),D(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)T(e,"bad indentation of a sequence entry");else if(e.lineIndentt?_=1:e.lineIndent===t?_=0:e.lineIndentt?_=1:e.lineIndent===t?_=0:e.lineIndentt)&&(U(e,t,4,!0,i)&&(m?p=e.result:h=e.result),m||(M(e,c,d,f,p,h,o,a),f=p=h=null),D(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)T(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?T(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?T(e,"repeat of an indentation width identifier"):(d=t+o-1,c=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(I(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndentd&&(d=e.lineIndent),m(a))f++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:T(e,"expected hexadecimal character");e.result+=w(o),e.position++}else T(e,"unknown escape sequence");n=r=e.position}else m(s)?(P(e,n,r,!0),L(e,D(e,!1,t)),n=r=e.position):e.position===e.lineStart&&j(e)?T(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}T(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?S=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&T(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||T(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],D(e,!0,-1),!0}(e)?function(e,t,n){var r,i,o,a,s,l,u,c,d=e.kind,f=e.result;if(v(c=e.input.charCodeAt(e.position))||y(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(v(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==c;){if(58===c){if(v(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===c){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&j(e)||n&&y(c))break;if(m(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,D(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(P(e,i,o,!1),L(e,e.line-s),i=o=e.position,a=!1),g(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return P(e,i,o,!1),!!e.result||(e.kind=d,e.result=f,!1)}(e,p,1===n)&&(S=!0,null===e.tag&&(e.tag="?")):(S=!0,null===e.tag&&null===e.anchor||T(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===_&&(S=u&&N(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,d=e.implicitTypes.length;c tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result)?(e.result=f.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):T(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):T(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||S}function z(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(D(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&T(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&I(e),l.call(A,n)?A[n](e,n,r):C(e,'unknown document directive "'+n+'"')}D(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,D(e,!0,-1)):a&&T(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),D(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&C(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&j(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,D(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(166),i=n(55);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(166),i=n(55),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(55),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,u,c,d=0,f=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),c=new Date(Date.UTC(n,r,a,s,l,u,d)),f&&c.setTime(c.getTime()-f),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(55);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(207).Buffer}catch(e){}var i=n(55),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,l=0,u=[];for(t=0;t>16&255),u.push(l>>8&255),u.push(255&l)),l=l<<6|s.indexOf(i.charAt(t));return 0===(n=a%4*6)?(u.push(l>>16&255),u.push(l>>8&255),u.push(255&l)):18===n?(u.push(l>>10&255),u.push(l>>2&255)):12===n&&u.push(l>>4&255),r?r.from?r.from(u):new r(u):u},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0===(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=u}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*m}},function(e,t,n){"use strict";var r=n(55),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],u=e;for(t=0,n=u.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(!function(){var e=new Error("Cannot find module 'esprima'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(55);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){"use strict";var r=n(166),i=n(205),o=n(244),a=n(206),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,u={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},c=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function d(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");n="U",o=8}return"\\"+n+r.repeat("0",o-t.length)+t}function f(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,i,o,a,s,u;if(null===t)return{};for(n={},i=0,o=(r=Object.keys(t)).length;ir&&" "!==e[d+1],d=o);else if(!g(a))return 5;f=f&&v(a)}u=u||c&&o-d-1>r&&" "!==e[d+1]}return l||u?n>9&&y(e)?5:u?4:3:f&&!i(e)?1:2}function _(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==c.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+w(t,e.indent)+E(p(function(e,t){var n,r,i=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,x(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;r=i.exec(e);){var l=r[1],u=r[2];n=" "===u[0],o+=l+(a||n||""===u?"":"\n")+x(u,t),a=n}return o}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=d(1024*(t-55296)+n-56320+65536),o++):(r=u[t],i+=!r&&g(t)?e[o]:r||d(t));return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function w(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function E(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function x(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function k(e,t,n){var r,o,a,u,c,d;for(a=0,u=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+d+'" style');r=c.represent[d](t,d)}e.dump=r}return!0}return!1}function S(e,t,n,r,o,a){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var u,c,d="[object Object]"===l||"[object Array]"===l;if(d&&(c=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(o=!1),c&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&c&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var o,a,s,l,u,c,d="",f=e.tag,p=Object.keys(n);if(!0===e.sortKeys)p.sort();else if("function"==typeof e.sortKeys)p.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=p.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,u&&(c+=h(e,t)),S(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=e.dump));e.tag=f,e.dump=d||"{}"}(e,t,e.dump,o),c&&(e.dump="&ref_"+u+e.dump)):(!function(e,t,n){var r,i,o,a,s,l="",u=e.tag,c=Object.keys(n);for(r=0,i=c.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),S(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=u,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l){var f=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(!function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function O(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},function(e,t,n){"use strict";const r=n(314);class i extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}T${`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},function(e,t,n){"use strict";(function(t){const r=n(314),i=t.Date;class o extends i{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}}).call(this,n(39))},function(e,t,n){"use strict";const r=n(314);class i extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},function(e,t,n){"use strict";(function(t){e.exports=function(e,n){n||(n={});const o=n.blocksize||40960,a=new r;return new Promise((e,n)=>{t(s,0,o,e,n)});function s(n,r,o,l){if(n>=e.length)try{return o(a.finish())}catch(t){return l(i(t,e))}try{a.parse(e.slice(n,n+r)),t(s,n+r,r,o,l)}catch(t){l(i(t,e))}}};const r=n(313),i=n(315)}).call(this,n(428).setImmediate)},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,l=1,u={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{let i,o=!1,a=!1;function s(){if(o=!0,!i)try{n(t.finish())}catch(e){r(e)}}function l(e){a=!0,r(e)}e.once("end",s),e.once("error",l),function n(){let r;i=!0;for(;null!==(r=e.read());)try{t.parse(r)}catch(e){return l(e)}if(i=!1,o)return s();if(a)return;e.once("readable",n)}()})}(e):function(){const e=new i;return new r.Transform({objectMode:!0,transform(t,n,r){try{e.parse(t.toString(n))}catch(e){this.emit("error",e)}r()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const r=n(773),i=n(313)},function(e,t,n){e.exports=i;var r=n(316).EventEmitter;function i(){r.call(this)}n(142)(i,r),i.Readable=n(317),i.Writable=n(780),i.Duplex=n(781),i.Transform=n(782),i.PassThrough=n(783),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t){},function(e,t,n){"use strict";var r=n(318).Buffer,i=n(776);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(39))},function(e,t,n){var r=n(207),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";e.exports=o;var r=n(433),i=Object.create(n(208));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(142),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(319)},function(e,t,n){e.exports=n(143)},function(e,t,n){e.exports=n(317).Transform},function(e,t,n){e.exports=n(317).PassThrough},function(e,t,n){"use strict";function r(e){return new Error("Can only stringify objects, not "+e)}function i(e){return Object.keys(e).filter(t=>s(e[t]))}function o(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let n of Object.keys(e))!e[n]||"function"!=typeof e[n].toJSON||"toISOString"in e[n]?t[n]=e[n]:t[n]=e[n].toJSON();return t}function a(e,t,n){var c,d;c=i(n=o(n)),d=function(e){return Object.keys(e).filter(t=>!s(e[t]))}(n);var p=[],h=t||"";c.forEach(e=>{var t=l(n[e]);"undefined"!==t&&"null"!==t&&p.push(h+u(e)+" = "+f(n[e],!0))}),p.length>0&&p.push("");var g=e&&c.length>0?t+" ":"";return d.forEach(t=>{p.push(function(e,t,n,s){var c=l(s);if("array"===c)return function(e,t,n,i){m(i=o(i));var s=l(i[0]);if("table"!==s)throw r(s);var c=e+u(n),d="";return i.forEach(e=>{d.length>0&&(d+="\n"),d+=t+"[["+c+"]]\n",d+=a(c+".",t,e)}),d}(e,t,n,s);if("table"===c)return function(e,t,n,r){var o=e+u(n),s="";i(r).length>0&&(s+=t+"["+o+"]\n");return s+a(o+".",t,r)}(e,t,n,s);throw r(c)}(e,g,t,n[t]))}),p.join("\n")}function s(e){switch(l(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==l(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function l(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function u(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:c(t)}function c(e){return'"'+d(e).replace(/"/g,'\\"')+'"'}function d(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+function(e,t){for(;t.lengthd(e).replace(/"(?="")/g,'\\"')).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return c(e);case"string-literal":return"'"+e+"'";case"integer":return h(e);case"float":return function(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),n=t[0],r=t[1]||0;return h(n)+"."+r}(e);case"boolean":return function(e){return String(e)}(e);case"datetime":return function(e){return e.toISOString()}(e);case"array":return function(e){const t=m(e=o(e));var n="[",r=e.map(e=>p(e,t));r.join(", ").length>60||/\n/.test(r)?n+="\n "+r.join(",\n ")+"\n":n+=" "+r.join(", ")+(r.length>0?" ":"");return n+"]"}(e.filter(e=>"null"!==l(e)&&"undefined"!==l(e)&&"nan"!==l(e)));case"table":return function(e){e=o(e);var t=[];return Object.keys(e).forEach(n=>{t.push(u(n)+" = "+f(e[n],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw r(t)}}function h(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function m(e){const t=function(e){var t=l(e[0]);return e.every(e=>l(e)===t)?t:e.every(e=>{return"float"===(t=l(e))||"integer"===t;var t})?"float":"mixed"}(e);if("mixed"===t)throw new Error("Array values can't have mixed types");return t}e.exports=function(e){if(null===e)throw r("null");if(void 0===e)throw r("undefined");if("object"!=typeof e)throw r(typeof e);"function"==typeof e.toJSON&&(e=e.toJSON());if(null==e)return null;const t=l(e);if("table"!==t)throw r(t);return a("","",e)},e.exports.value=p},function(e,t,n){(function(e){var n;(function(){"use strict";var r=function(e,t){if(0===e.length)return"";for(var n="",r=0,i=e.length;r")+": "+t},o=function(e){return Object.prototype.toString.call(e)};o.Boolean=o(!1),o.String=o(""),o.Number=o(0),o.Array=o([]),o.Date=o(new Date(0));var a=function(e){return"string"==typeof e},s=function(e){return"number"==typeof e},l=Array.isArray||function(e){return o(e)===o.Array},u=function(e){return null!==e&&"object"==typeof e&&!(l(e)||function(e){return o(e)===o.Date}(e))},c=function(e){if(e.length<1)return!1;for(var t=0,n=e.length;t0&&e.space?"[\n"+w(s.join(",\n"),1,e.space)+"\n]":"["+s.join(", ")+"]"},h=function(e,t,n){if(e.replace){var r=e.replace.call(v(e),t,n);if(a(r))return r;if(null==r)return null;if(!1!==r)throw new Error(i(e.path,"Replacer must return a string, false, null or undefined."))}switch(o(n)){case o.Boolean:return function(e,t,n){return n?"true":"false"}(0,0,n);case o.String:return f(0,0,n);case o.Number:return function(e,t,n){if(!isFinite(n))throw new Error(i(e.path,"Number must be finite."));var r;return r=(r=(Number.isInteger?Number.isInteger(n):Math.floor(n)===n)?n.toFixed(1):String(n)).replace(/([eE])(\d)/,"$1+$2"),/[.eE]/.test(r)?r:r+".0"}(e,0,n);case o.Array:return p(e,0,n);case o.Date:return function(e,t,n){if(!isFinite(n.getTime()))throw new Error(i(e.path,"Invalid Date"));return n.toISOString()}(e,0,n);default:return null==n?null:function(e,t,n){var r=e.table;e.table=n;var o=e.inPair;e.inPair=!0;var s=[],l=Object.keys(n);e.sort&&l.sort(e.sort);for(var u=0,c=l.length;u0&&(l(_)?c(_):u(_));l(_)&&c(_)?h.push([!0,v,_,E]):u(_)?h.push([!1,v,_,E]):(e.path.push(v),b(e,v,_,r),e.path.pop())}}if(m=null,e.replace)for(f=0,p=h.length;f0;)r+=r||e,1&t&&(n+=r),t>>>=1;return n},w=function(e,t,n){var r=_(n,t);return e.replace(/^(?!$)/gm,r)},E=function(e){return a(e)?e:s(e)&&e>=0&&isFinite(e)&&Math.floor(e)===e?_(" ",e):""},x=function(e,t){if(null==e)throw new Error("Undefined or null cannot be stringified.");if(function(e){var t=function(e,n){if(!l(e)&&!u(e))return!1;if(-1!==n.indexOf(e))return!0;for(var r in n.push(e),e)if(d(e,r)){var i=n.length;if(t(e[r],n))return!0;n.splice(i)}return!1};return t(e,[])}(e))throw new Error("Converting circular structure to TOML.");if(null!=t&&"object"!=typeof t)throw new Error("Options must be an object.");if(null!=t.replace&&"function"!=typeof t.replace)throw new Error("Replacer must be a function.");if(null!=t.sort&&"function"!=typeof t.sort)throw new Error("Compare function for sorting must be a function.")},k={};k.toToml=function(e,t){if(!u(e))throw new Error("An object other than Array or Date is expected.");return x(e,t=null!=t?t:{}),function(e,t){var n=[];return b({path:[],table:{"":e},inPair:!1,inTableArray:!1,replace:t.replace,sort:t.sort,level:0,space:E(t.space),lines:n},"",e,(function(e,t,i){var o=null;if(u(i))""!==t&&(n.length>0&&n.push(""),o=e.inTableArray?"[["+r(e.path,!0)+"]]":"["+r(e.path,!0)+"]",n.push(w(o,e.level,e.space)));else{if(!l(i))return a(t)&&(o=g(e,t,i),a(o)&&n.push(w(o,e.level,e.space))),!0;if(!a(t))return!0;c(i)||(o=g(e,t,i),a(o)&&n.push(w(o,e.level,e.space)))}})),n.join("\n")}(e,t)},k.toKey=function(e,t){if(a(e)){if(!(n=m(e)))throw new Error("Key cannot be an empty string.");return n}if(l(e)){var n;if(!1===(n=r(e,t)))throw new Error("Key path must consist of non-empty string(s).");return n}throw new Error("Invalid Arguments for tomlify.toKey({String | Array})")},k.toValue=function(e,t){return x(e,t=null!=t?t:{}),function(e,t){return h({path:[],table:{"":e},inPair:!1,inTableArray:!1,sort:t.sort,replace:t.replace,level:0,space:E(t.space)},"",e)}(e,t)},null!=(null!==e?e.exports:void 0)?e.exports=k:void 0===(n=function(){return k}.apply(t,[]))||(e.exports=n)}).call(this)}).call(this,n(123)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.frontmatterJSON=t.frontmatterTOML=t.frontmatterYAML=t.FrontmatterInfer=t.getFormatOpts=void 0;var r=s(n(787)),i=s(n(427)),o=s(n(422)),a=s(n(434));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;ti.default.fromFile(e),stringify:(e,{sortedKeys:t})=>i.default.toFile(e,t)},json:{parse:e=>{let t=e.trim();return"{"!==t.substr(0,1)&&(t="{"+t),"}"!==t.substr(-1)&&(t+="}"),a.default.fromFile(t)},stringify:(e,{sortedKeys:t})=>{let n=a.default.toFile(e,t).trim();return"{"===n.substr(0,1)&&"}"===n.substr(-1)&&(n=n.substring(1,n.length-1)),n}},yaml:{parse:e=>o.default.fromFile(e),stringify:(e,{sortedKeys:t})=>o.default.toFile(e,t)}};const p=e=>({yaml:{language:"yaml",delimiters:"---"},toml:{language:"toml",delimiters:"+++"},json:{language:"json",delimiters:["{","}"]}}[e]);t.getFormatOpts=p;class h{constructor(e,t){this.format=p(e),this.customDelimiter=t}fromFile(e){const t=this.format||function(e){const t=e.substr(0,e.indexOf("\n")).trim();if(!(t.length>3&&"---"===t.substr(0,3)))switch(t){case"---":return p("yaml");case"+++":return p("toml");case"{":return p("json");default:console.warn("Unrecognized front-matter format.")}}(e);this.customDelimiter&&(this.format.delimiters=this.customDelimiter);const n=(0,r.default)(e,c({engines:f},t));return c({},n.data,{},n.content.trim()&&{body:n.content})}toFile(e,t){const{body:n=""}=e,i=l(e,["body"]),o=this.format||p("yaml");this.customDelimiter&&(this.format.delimiters=this.customDelimiter);const a="\n"!==n.slice(-1),s=r.default.stringify(n,i,c({engines:f,sortedKeys:t},o));return a&&"\n"===s.slice(-1)?s.substring(0,s.length-1):s}}const m=new h;t.FrontmatterInfer=m;t.frontmatterYAML=e=>new h("yaml",e);t.frontmatterTOML=e=>new h("toml",e);t.frontmatterJSON=e=>new h("json",e)},function(e,t,n){"use strict";const r=n(788),i=n(789),o=n(247),a=n(436),s=n(793),l=n(435),u=n(794),c=n(795),d=n(320);function f(e,t){if(""===e)return{data:{},content:e,excerpt:"",orig:e};let n=u(e);const r=f.cache[n.content];if(!t){if(r)return n=Object.assign({},r),n.orig=r.orig,n;f.cache[n.content]=n}return function(e,t){const n=o(t),r=n.delimiters[0],a="\n"+n.delimiters[1];let l=e.content;n.language&&(e.language=n.language);const u=r.length;if(!d.startsWith(l,r,u))return s(e,n),e;if(l.charAt(u)===r.slice(-1))return e;l=l.slice(u);const p=l.length,h=f.language(l,n);h.name&&(e.language=h.name,l=l.slice(h.raw.length));let m=l.indexOf(a);-1===m&&(m=p);e.matter=l.slice(0,m),""===e.matter.replace(/^\s*#[^\n]+/gm,"").trim()?(e.isEmpty=!0,e.empty=e.content,e.data={}):e.data=c(e.language,e.matter,n);m===p?e.content="":(e.content=l.slice(m+a.length),"\r"===e.content[0]&&(e.content=e.content.slice(1)),"\n"===e.content[0]&&(e.content=e.content.slice(1)));s(e,n),(!0===n.sections||"function"==typeof n.section)&&i(e,n.section);return e}(n,t)}f.engines=l,f.stringify=function(e,t,n){return"string"==typeof e&&(e=f(e,n)),a(e,t,n)},f.read=function(e,t){const n=f(r.readFileSync(e,"utf8"),t);return n.path=e,n},f.test=function(e,t){return d.startsWith(e,o(t).delimiters[0])},f.language=function(e,t){const n=o(t).delimiters[0];f.test(e)&&(e=e.slice(n.length));const r=e.slice(0,e.search(/\r?\n/));return{raw:r,name:r?r.trim():""}},f.cache={},f.clearCache=()=>f.cache={},e.exports=f},function(e,t){},function(e,t,n){"use strict";var r=n(246),i=n(790);function o(e,t){return e.slice(0,t.length)===t&&e.charAt(t.length+1)!==t.slice(-1)}function a(e){return e}e.exports=function(e,t){"function"==typeof t&&(t={parse:t});var n=function(e){"object"!==r(e)&&(e={content:e});if("string"!=typeof e.content&&!function(e){if(e&&e.constructor&&"function"==typeof e.constructor.isBuffer)return e.constructor.isBuffer(e);return!1}(e.content))throw new TypeError("expected a buffer or string");return e.content=e.content.toString(),e.sections=[],e}(e),s=i({},{section_delimiter:"---",parse:a},t),l=s.section_delimiter,u=n.content.split(/\r?\n/),c=null,d={key:"",data:"",content:""},f=[],p=[];function h(e){n.content=e,c=[],f=[]}function m(e){p.length&&(d.key=function(e,t){return e?e.slice(t.length).trim():""}(p[0],l),d.content=e,s.parse(d,c),c.push(d),d={key:"",data:"",content:""},f=[],p=[])}for(var g=0;g * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */e.exports=function(e){return null!=e&&("object"==typeof e||"function"==typeof e)}},function(e,t,n){"use strict"; /*! * strip-bom-string * * Copyright (c) 2015, 2017, Jon Schlinkert. * Released under the MIT License. */e.exports=function(e){return"string"==typeof e&&"\ufeff"===e.charAt(0)?e.slice(1):e}},function(e,t,n){"use strict";const r=n(247);e.exports=function(e,t){const n=r(t);if(null==e.data&&(e.data={}),"function"==typeof n.excerpt)return n.excerpt(e,n);const i=e.data.excerpt_separator||n.excerpt_separator;if(null==i&&(!1===n.excerpt||null==n.excerpt))return e;const o="string"==typeof n.excerpt?n.excerpt:i||n.delimiters[0],a=e.content.indexOf(o);return-1!==a&&(e.excerpt=e.content.slice(0,a)),e}},function(e,t,n){"use strict";const r=n(246),i=n(436),o=n(320);e.exports=function(e){return"object"!==r(e)&&(e={content:e}),"object"!==r(e.data)&&(e.data={}),e.contents&&null==e.content&&(e.content=e.contents),o.define(e,"orig",o.toBuffer(e.content)),o.define(e,"language",e.language||""),o.define(e,"matter",e.matter||""),o.define(e,"stringify",(function(t,n){return n&&n.language&&(e.language=n.language),i(e,t,n)})),e.content=o.toString(e.content),e.isEmpty=!1,e.excerpt="",e}},function(e,t,n){"use strict";const r=n(437),i=n(247);e.exports=function(e,t,n){const o=i(n),a=r(e,o);if("function"!=typeof a.parse)throw new TypeError('expected "'+e+'.parse" to be a function');return a.parse(t,o)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?"+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+l+")*"),c="(?:"+[o+r+"?",r,a,s,n].join("|")+")",d=RegExp(i+"(?="+i+")|"+c+u,"g");e.exports=function(e){return e.match(d)||[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateConfig=function(e){const t=new r.default({allErrors:!0,jsonPointers:!0});if((0,i.default)(t),!t.validate((()=>({type:"object",properties:{backend:{type:"object",properties:{name:{type:"string",examples:["test-repo"]},auth_scope:{type:"string",examples:["repo","public_repo"],enum:["repo","public_repo"]},open_authoring:{type:"boolean",examples:[!0]}},required:["name"]},local_backend:{oneOf:[{type:"boolean"},{type:"object",properties:{url:{type:"string",examples:["http://localhost:8081/api/v1"]}},required:["url"]}]},locale:{type:"string",examples:["en","fr","de"]},site_url:{type:"string",examples:["https://example.com"]},display_url:{type:"string",examples:["https://example.com"]},logo_url:{type:"string",examples:["https://example.com/images/logo.svg"]},show_preview_links:{type:"boolean"},media_folder:{type:"string",examples:["assets/uploads"]},public_folder:{type:"string",examples:["/uploads"]},media_folder_relative:{type:"boolean"},media_library:{type:"object",properties:{name:{type:"string",examples:["uploadcare"]},config:{type:"object"}},required:["name"]},publish_mode:{type:"string",enum:["simple","editorial_workflow"],examples:["editorial_workflow"]},slug:{type:"object",properties:{encoding:{type:"string",enum:["unicode","ascii"]},clean_accents:{type:"boolean"}}},collections:{type:"array",minItems:1,items:{type:"object",properties:{name:{type:"string"},label:{type:"string"},label_singular:{type:"string"},description:{type:"string"},folder:{type:"string"},files:{type:"array",items:{type:"object",properties:{name:{type:"string"},label:{type:"string"},label_singular:{type:"string"},description:{type:"string"},file:{type:"string"},fields:s},required:["name","label","file","fields"]}},identifier_field:{type:"string"},summary:{type:"string"},slug:{type:"string"},path:{type:"string"},preview_path:{type:"string"},preview_path_date_field:{type:"string"},create:{type:"boolean"},editor:{type:"object",properties:{preview:{type:"boolean"}}},format:{type:"string",enum:Object.keys(o.formatExtensions)},extension:{type:"string"},frontmatter_delimiter:{type:["string","array"],minItems:2,maxItems:2,items:{type:"string"}},fields:s},required:["name","label"],oneOf:[{required:["files"]},{required:["folder","fields"]}],if:{required:["extension"]},then:{if:{properties:{extension:{enum:Object.keys(o.extensionFormatters)}}},else:{required:["format"]}},dependencies:{frontmatter_delimiter:{properties:{format:{enum:o.frontmatterFormats}},required:["format"]}}}}},required:["backend","collections"],anyOf:[{required:["media_folder"]},{required:["media_library"]}]}))(),e))throw console.error("Config Errors",t.errors),new l(t.errors)};var r=a(n(800)),i=a(n(834)),o=n(309);function a(e){return e&&e.__esModule?e:{default:e}}const s={type:"array",minItems:1,items:{type:"object",properties:{name:{type:"string"},label:{type:"string"},widget:{type:"string"},required:{type:"boolean"}},required:["name"]}};class l extends(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error)){constructor(e,...t){const n=e.map(({message:e,dataPath:t})=>{const n=t.slice(1).split("/").map(e=>e.match(/^\d+$/)?"[".concat(e,"]"):".".concat(e)).join("").slice(1);return"".concat(n?"'".concat(n,"'"):"config"," ").concat(e)}).join("\n");super(n,...t),this.errors=e,this.message=n}toString(){return this.message}}},function(e,t,n){"use strict";var r=n(801),i=n(324),o=n(805),a=n(439),s=n(277),l=n(806),u=n(807),c=n(828),d=n(169);e.exports=v,v.prototype.validate=function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var r=this._addSchema(e);n=r.validate||this._compile(r)}var i=n(t);!0!==n.$async&&(this.errors=n.errors);return i},v.prototype.compile=function(e,t){var n=this._addSchema(e,void 0,t);return n.validate||this._compile(n)},v.prototype.addSchema=function(e,t,n,r){if(Array.isArray(e)){for(var o=0;o=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function f(e,t,n){var r=p.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function p(e,t,n){for(var r=0;r1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,m=String.fromCharCode;function g(e){throw new RangeError(p[e])}function v(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var i=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(f,".")).split("."),t).join(".");return r+i}function y(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))},w=function(e){var t,n=[],r=e.length,i=0,o=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var l=0;l=128&&g("not-basic"),n.push(e.charCodeAt(l));for(var c=s>0?s+1:0;c=r&&g("invalid-input");var m=(t=e.charCodeAt(c++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(m>=36||m>h((u-i)/f))&&g("overflow"),i+=m*f;var v=p<=a?1:p>=a+26?26:p-a;if(mh(u/y)&&g("overflow"),f*=y}var b=n.length+1;a=_(i-d,b,0==d),h(i/b)>u-o&&g("overflow"),o+=h(i/b),i%=b,n.splice(i++,0,o)}return String.fromCodePoint.apply(String,n)},E=function(e){var t=[],n=(e=y(e)).length,r=128,i=0,o=72,a=!0,s=!1,l=void 0;try{for(var c,d=e[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var f=c.value;f<128&&t.push(m(f))}}catch(e){s=!0,l=e}finally{try{!a&&d.return&&d.return()}finally{if(s)throw l}}var p=t.length,v=p;for(p&&t.push("-");v=r&&Th((u-i)/C)&&g("overflow"),i+=(w-r)*C,r=w;var A=!0,P=!1,R=void 0;try{for(var M,I=e[Symbol.iterator]();!(A=(M=I.next()).done);A=!0){var D=M.value;if(Du&&g("overflow"),D==r){for(var j=i,L=36;;L+=36){var N=L<=o?1:L>=o+26?26:L-o;if(j>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function T(e){for(var t="",n=0,r=e.length;n=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function C(e,t){function n(e){var n=T(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,O).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,O).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,O).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,O).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,O).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function P(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=l(n,2)[1];return r?r.split(".").map(A).join("."):e}function R(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=l(n,3),i=r[1],o=r[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=l(a,2),u=s[0],c=s[1],d=c?c.split(":").map(A):[],f=u.split(":").map(A),p=t.IPV4ADDRESS.test(f[f.length-1]),h=p?7:8,m=f.length-h,g=Array(h),v=0;v1){var _=g.slice(0,y.index),w=g.slice(y.index+y.length);b=_.join(":")+"::"+w.join(":")}else b=g.join(":");return o&&(b+="%"+o),b}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,I=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){I?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=R(P(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=S[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)C(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=x(n.host.replace(r.PCT_ENCODED,T).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}C(n,a)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function j(e,t){var n=!1!==t.iri?s:a,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(R(P(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}var L=/^\.\.?\//,N=/^\/\.(\/|$)/,F=/^\/\.\.(\/|$)/,B=/^\/?(?:.|\n)*?(?=\/|$)/;function U(e){for(var t=[];e.length;)if(e.match(L))e=e.replace(L,"");else if(e.match(N))e=e.replace(N,"/");else if(e.match(F))e=e.replace(F,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(B);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?s:a,r=[],i=S[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?k(e.host):x(e.host.replace(n.PCT_ENCODED,T).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}C(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=j(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var l=e.path;t.absolutePath||i&&i.absolutePath||(l=U(l)),void 0===o&&(l=l.replace(/^\/\//,"/%2F")),r.push(l)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i={};return r||(e=D(z(e,n),n),t=D(z(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=U(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=U(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=U(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=U(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function H(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,T)}var W={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},G={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize},V={},K="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$="[0-9A-Fa-f]",Y=n(n("%[EFef][0-9A-Fa-f]%"+$+$+"%"+$+$)+"|"+n("%[89A-Fa-f][0-9A-Fa-f]%"+$+$)+"|"+n("%"+$+$)),Q=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(K,"g"),J=new RegExp(Y,"g"),Z=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Q),"g"),ee=new RegExp(t("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),te=ee;function ne(e){var t=T(e);return t.match(X)?t:e}var re={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,o={},a=n.query.split("&"),s=0,l=a.length;s=55296&&t<=56319&&i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,d=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,f=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,h=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",r.copy(m[e])}function g(e){var t=e.match(i);if(!t)return!1;var n=+t[1],r=+t[2],a=+t[3];return r>=1&&r<=12&&a>=1&&a<=(2==r&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:o[r])}function v(e,t){var n=e.match(a);if(!n)return!1;var r=n[1],i=n[2],o=n[3],s=n[5];return(r<=23&&i<=59&&o<=59||23==r&&59==i&&60==o)&&(!t||s)}e.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-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-f]{1,4}:){5}(?:(?:(?::[0-9a-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-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-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-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-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-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-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-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-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-f]{1,4}){1,7})|(?:(?::[0-9a-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,regex:w,uuid:d,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":h},m.full={date:g,time:v,"date-time":function(e){var t=e.split(y);return 2==t.length&&g(t[0])&&v(t[1],!0)},uri:function(e){return b.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-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-f]{1,4}:){5}(?:(?:(?::[0-9a-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-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-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-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-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-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-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-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-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-f]{1,4}){1,7})|(?:(?::[0-9a-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,regex:w,uuid:d,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":h};var y=/t|\s/i;var b=/\/|:/;var _=/[^\\]\\Z/;function w(e){if(_.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(808),i=n(169).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(n){n.rules=n.rules.map((function(n){var i;if("object"==typeof n){var o=Object.keys(n)[0];i=n[o],n=o,i.forEach((function(n){t.push(n),e.all[n]=!0}))}return t.push(n),e.all[n]={keyword:n,code:r[n],implements:i}})),e.all.$comment={keyword:"$comment",code:r.$comment},n.type&&(e.types[n.type]=n)})),e.keywords=i(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},function(e,t,n){"use strict";e.exports={$ref:n(809),allOf:n(810),anyOf:n(811),$comment:n(812),const:n(813),contains:n(814),dependencies:n(815),enum:n(816),format:n(817),if:n(818),items:n(819),maximum:n(441),minimum:n(441),maxItems:n(442),minItems:n(442),maxLength:n(443),minLength:n(443),maxProperties:n(444),minProperties:n(444),multipleOf:n(820),not:n(821),oneOf:n(822),pattern:n(823),properties:n(824),propertyNames:n(825),required:n(826),uniqueItems:n(827),validate:n(440)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o=" ",a=e.level,s=e.dataLevel,l=e.schema[t],u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(s||""),f="valid"+a;if("#"==l||"#/"==l)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var h=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(h),(y=y||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var m=o;o=y.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,h);e.logger.warn(h),c&&(o+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=l,o+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",c&&(o+=" if ("+v+") { ")}else r=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+d+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var b=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=y.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(o+=" var "+f+"; "),o+=" try { await "+b+"; ",c&&(o+=" "+f+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(o+=" "+f+" = false; "),o+=" } ",c&&(o+=" if ("+f+") { ")}else o+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",c&&(o+=" else { ")}return o}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,d=l.baseId,f=!0,p=i;if(p)for(var h,m=-1,g=p.length-1;m0:e.util.schemaHasRules(h,e.RULES.all))&&(f=!1,l.schema=h,l.schemaPath=o+"["+m+"]",l.errSchemaPath=a+"/"+m,r+=" "+e.validate(l)+" ",l.baseId=d,s&&(r+=" if ("+c+") { ",u+="}"));return s&&(r+=f?" if (true) { ":" "+u.slice(0,-1)+" "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="valid"+i,f="errs__"+i,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level;if(a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var g=p.baseId;r+=" var "+f+" = errors; var "+d+" = false; ";var v=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=a;if(y)for(var b,_=-1,w=y.length-1;_0:e.util.schemaHasRules(a,e.RULES.all);if(r+="var "+f+" = errors;var "+d+";",b){var _=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" var "+h+" = false; for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=c+"["+m+"]";p.dataPathArr[g]=m;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,v)<2?r+=" "+e.util.varReplace(E,v,w)+" ":r+=" var "+v+" = "+w+"; "+E+" ",r+=" if ("+h+") break; } ",e.compositeRule=p.compositeRule=_,r+=" if (!"+h+") {"}else r+=" if ("+c+".length == 0) {";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var k=r;return r=x.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+k+"]); ":r+=" validate.errors = ["+k+"]; return false; ":r+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",b&&(r+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="errs__"+i,f=e.util.copy(e),p="";f.level++;var h="valid"+f.level,m={},g={},v=e.opts.ownProperties;for(w in a){var y=a[w],b=Array.isArray(y)?g:m;b[w]=y}r+="var "+d+" = errors;";var _=e.errorPath;for(var w in r+="var missing"+i+";",g)if((b=g[w]).length){if(r+=" if ( "+c+e.util.getProperty(w)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),u){r+=" && ( ";var E=b;if(E)for(var x=-1,k=E.length-1;x0:e.util.schemaHasRules(y,e.RULES.all))&&(r+=" "+h+" = true; if ( "+c+e.util.getProperty(w)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(w)+"') "),r+=") { ",f.schema=y,f.schemaPath=s+e.util.getProperty(w),f.errSchemaPath=l+"/"+e.util.escapeFragment(w),r+=" "+e.validate(f)+" ",f.baseId=j,r+=" } ",u&&(r+=" if ("+h+") { ",p+="}"))}return u&&(r+=" "+p+" if ("+d+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="valid"+i,f=e.opts.$data&&a&&a.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="i"+i,h="schema"+i;f||(r+=" var "+h+" = validate.schema"+s+";"),r+="var "+d+";",f&&(r+=" if (schema"+i+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+i+")) "+d+" = false; else {"),r+=d+" = false;for (var "+p+"=0; "+p+"<"+h+".length; "+p+"++) if (equal("+c+", "+h+"["+p+"])) { "+d+" = true; break; }",f&&(r+=" } "),r+=" if (!"+d+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var g=r;return r=m.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",u&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||"");if(!1===e.opts.format)return u&&(r+=" if (true) { "),r;var d,f=e.opts.$data&&a&&a.$data;f?(r+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",d="schema"+i):d=a;var p=e.opts.unknownFormats,h=Array.isArray(p);if(f){r+=" var "+(m="format"+i)+" = formats["+d+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(r+=" var async"+i+" = "+m+".async; "),r+=" "+m+" = "+m+".validate; } if ( ",f&&(r+=" ("+d+" !== undefined && typeof "+d+" != 'string') || "),r+=" (","ignore"!=p&&(r+=" ("+d+" && !"+m+" ",h&&(r+=" && self._opts.unknownFormats.indexOf("+d+") == -1 "),r+=") || "),r+=" ("+m+" && "+v+" == '"+n+"' && !(typeof "+m+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+m+"("+c+") : "+m+"("+c+")) ":r+=" "+m+"("+c+") ",r+=" : "+m+".test("+c+"))))) {"}else{var m;if(!(m=e.formats[a])){if("ignore"==p)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(r+=" if (true) { "),r;if(h&&p.indexOf(a)>=0)return u&&(r+=" if (true) { "),r;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=n)return u&&(r+=" if (true) { "),r;if(y){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(b="formats"+e.util.getProperty(a)+".validate")+"("+c+"))) { "}else{r+=" if (! ";var b="formats"+e.util.getProperty(a);g&&(b+=".validate"),r+="function"==typeof m?" "+b+"("+c+") ":" "+b+".test("+c+") ",r+=") { "}}var _=_||[];_.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",r+=f?""+d:""+e.util.toQuotedString(a),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=f?"' + "+d+" + '":""+e.util.escapeQuotes(a),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=f?"validate.schema"+s:""+e.util.toQuotedString(a),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var w=r;return r=_.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+w+"]); ":r+=" validate.errors = ["+w+"]; return false; ":r+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",u&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="valid"+i,f="errs__"+i,p=e.util.copy(e);p.level++;var h="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var _;p.createErrors=!1,p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" var "+f+" = errors; var "+d+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,r+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,r+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,v?(r+=" if ("+h+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(p)+" ",p.baseId=b,r+=" "+d+" = "+h+"; ",v&&y?r+=" var "+(_="ifClause"+i)+" = 'then'; ":_="'then'",r+=" } ",y&&(r+=" else { ")):r+=" if (!"+h+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(p)+" ",p.baseId=b,r+=" "+d+" = "+h+"; ",v&&y?r+=" var "+(_="ifClause"+i)+" = 'else'; ":_="'else'",r+=" } "),r+=" if (!"+d+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+_+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+_+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",u&&(r+=" else { "),r=e.util.cleanUpCode(r)}else u&&(r+=" if (true) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="valid"+i,f="errs__"+i,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(r+="var "+f+" = errors;var "+d+";",Array.isArray(a)){var _=e.schema.additionalItems;if(!1===_){r+=" "+d+" = "+c+".length <= "+a.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",r+=" if (!"+d+") { ";var E=E||[];E.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var x=r;r=E.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+x+"]); ":r+=" validate.errors = ["+x+"]; return false; ":r+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",l=w,u&&(h+="}",r+=" else { ")}var k=a;if(k)for(var S,O=-1,T=k.length-1;O0:e.util.schemaHasRules(S,e.RULES.all)){r+=" "+m+" = true; if ("+c+".length > "+O+") { ";var C=c+"["+O+"]";p.schema=S,p.schemaPath=s+"["+O+"]",p.errSchemaPath=l+"/"+O,p.errorPath=e.util.getPathExpr(e.errorPath,O,e.opts.jsonPointers,!0),p.dataPathArr[v]=O;var A=e.validate(p);p.baseId=b,e.util.varOccurences(A,y)<2?r+=" "+e.util.varReplace(A,y,C)+" ":r+=" var "+y+" = "+C+"; "+A+" ",r+=" } ",u&&(r+=" if ("+m+") { ",h+="}")}if("object"==typeof _&&(e.opts.strictKeywords?"object"==typeof _&&Object.keys(_).length>0:e.util.schemaHasRules(_,e.RULES.all))){p.schema=_,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+m+" = true; if ("+c+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+c+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=c+"["+g+"]";p.dataPathArr[v]=g;A=e.validate(p);p.baseId=b,e.util.varOccurences(A,y)<2?r+=" "+e.util.varReplace(A,y,C)+" ":r+=" var "+y+" = "+C+"; "+A+" ",u&&(r+=" if (!"+m+") break; "),r+=" } } ",u&&(r+=" if ("+m+") { ",h+="}")}}else if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0:e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" for (var "+g+" = 0; "+g+" < "+c+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=c+"["+g+"]";p.dataPathArr[v]=g;A=e.validate(p);p.baseId=b,e.util.varOccurences(A,y)<2?r+=" "+e.util.varReplace(A,y,C)+" ":r+=" var "+y+" = "+C+"; "+A+" ",u&&(r+=" if (!"+m+") break; "),r+=" }"}return u&&(r+=" "+h+" if ("+f+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(a||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,i+="var division"+o+";if (",f&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+o+" = "+d+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",f&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var h=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="errs__"+i,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0:e.util.schemaHasRules(a,e.RULES.all)){f.schema=a,f.schemaPath=s,f.errSchemaPath=l,r+=" var "+d+" = errors; ";var h,m=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.opts.allErrors&&(h=f.opts.allErrors,f.opts.allErrors=!1),r+=" "+e.validate(f)+" ",f.createErrors=!0,h&&(f.opts.allErrors=h),e.compositeRule=f.compositeRule=m,r+=" if ("+p+") { ";var g=g||[];g.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var v=r;r=g.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(r+=" if (false) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="valid"+i,f="errs__"+i,p=e.util.copy(e),h="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;r+="var "+f+" = errors , "+v+" = false , "+d+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var _=a;if(_)for(var w,E=-1,x=_.length-1;E0:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,r+=" "+e.validate(p)+" ",p.baseId=g):r+=" var "+m+" = true; ",E&&(r+=" if ("+m+" && "+v+") { "+d+" = false; "+y+" = ["+y+", "+E+"]; } else { ",h+="}"),r+=" if ("+m+") { "+d+" = "+v+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=b,r+=h+"if (!"+d+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,d="data"+(a||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(f?"(new RegExp("+r+"))":e.usePattern(s))+".test("+d+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=f?""+r:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=f?"' + "+r+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+l:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var h=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="errs__"+i,f=e.util.copy(e),p="";f.level++;var h="valid"+f.level,m="key"+i,g="idx"+i,v=f.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,_=Object.keys(a||{}),w=e.schema.patternProperties||{},E=Object.keys(w),x=e.schema.additionalProperties,k=_.length||E.length,S=!1===x,O="object"==typeof x&&Object.keys(x).length,T=e.opts.removeAdditional,C=S||O||T,A=e.opts.ownProperties,P=e.baseId,R=e.schema.required;if(R&&(!e.opts.$data||!R.$data)&&R.length8)r+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var I=_;if(I)for(var D=-1,j=I.length-1;D0:e.util.schemaHasRules(X,e.RULES.all)){var J=e.util.getProperty($),Z=(W=c+J,V&&void 0!==X.default);f.schema=X,f.schemaPath=s+J,f.errSchemaPath=l+"/"+e.util.escapeFragment($),f.errorPath=e.util.getPath(e.errorPath,$,e.opts.jsonPointers),f.dataPathArr[v]=e.util.toQuotedString($);G=e.validate(f);if(f.baseId=P,e.util.varOccurences(G,y)<2){G=e.util.varReplace(G,y,W);var ee=W}else{ee=y;r+=" var "+y+" = "+W+"; "}if(Z)r+=" "+G+" ";else{if(M&&M[$]){r+=" if ( "+ee+" === undefined ",A&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes($)+"') "),r+=") { "+h+" = false; ";B=e.errorPath,z=l;var te,ne=e.util.escapeQuotes($);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(B,$,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+ne+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";q=r;r=te.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+q+"]); ":r+=" validate.errors = ["+q+"]; return false; ":r+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=z,e.errorPath=B,r+=" } else { "}else u?(r+=" if ( "+ee+" === undefined ",A&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes($)+"') "),r+=") { "+h+" = true; } else { "):(r+=" if ("+ee+" !== undefined ",A&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes($)+"') "),r+=" ) { ");r+=" "+G+" } "}}u&&(r+=" if ("+h+") { ",p+="}")}}if(E.length){var re=E;if(re)for(var ie,oe=-1,ae=re.length-1;oe0:e.util.schemaHasRules(X,e.RULES.all)){f.schema=X,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),r+=A?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+c+") { ",r+=" if ("+e.usePattern(ie)+".test("+m+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);W=c+"["+m+"]";f.dataPathArr[v]=m;G=e.validate(f);f.baseId=P,e.util.varOccurences(G,y)<2?r+=" "+e.util.varReplace(G,y,W)+" ":r+=" var "+y+" = "+W+"; "+G+" ",u&&(r+=" if (!"+h+") break; "),r+=" } ",u&&(r+=" else "+h+" = true; "),r+=" } ",u&&(r+=" if ("+h+") { ",p+="}")}}}return u&&(r+=" "+p+" if ("+d+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(o||""),d="errs__"+i,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(r+="var "+d+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0:e.util.schemaHasRules(a,e.RULES.all)){f.schema=a,f.schemaPath=s,f.errSchemaPath=l;var h="key"+i,m="idx"+i,g="i"+i,v="' + "+h+" + '",y="data"+(f.dataLevel=e.dataLevel+1),b="dataProperties"+i,_=e.opts.ownProperties,w=e.baseId;_&&(r+=" var "+b+" = undefined; "),r+=_?" "+b+" = "+b+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+h+" = "+b+"["+m+"]; ":" for (var "+h+" in "+c+") { ",r+=" var startErrs"+i+" = errors; ";var E=h,x=e.compositeRule;e.compositeRule=f.compositeRule=!0;var k=e.validate(f);f.baseId=w,e.util.varOccurences(k,y)<2?r+=" "+e.util.varReplace(k,y,E)+" ":r+=" var "+y+" = "+E+"; "+k+" ",e.compositeRule=f.compositeRule=x,r+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"0:e.util.schemaHasRules(b,e.RULES.all))||(h[h.length]=g)}}else h=a;if(f||h.length){var _=e.errorPath,w=f||h.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(u)if(r+=" var missing"+i+"; ",w){f||(r+=" var "+p+" = validate.schema"+s+"; ");var x="' + "+(A="schema"+i+"["+(O="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(_,A,e.opts.jsonPointers)),r+=" var "+d+" = true; ",f&&(r+=" if (schema"+i+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+i+")) "+d+" = false; else {"),r+=" for (var "+O+" = 0; "+O+" < "+p+".length; "+O+"++) { "+d+" = "+c+"["+p+"["+O+"]] !== undefined ",E&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", "+p+"["+O+"]) "),r+="; if (!"+d+") break; } ",f&&(r+=" } "),r+=" if (!"+d+") { ",(C=C||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+x+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+x+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var k=r;r=C.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+k+"]); ":r+=" validate.errors = ["+k+"]; return false; ":r+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var S=h;if(S)for(var O=-1,T=S.length-1;O 1) { ";var h=e.schema.items&&e.schema.items.type,m=Array.isArray(h);if(!h||"object"==h||"array"==h||m&&(h.indexOf("object")>=0||h.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+d+"[i], "+d+"[j])) { "+f+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+d+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](h,"item",!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var n=0;n 0) { var "+p+" = (dataPath || '') + "+e.errorPath+"; var "+h+", "+v+", "+E+"; ","object"==typeof a){var A={},P={},R={properties:{},items:{}},M=!1,I=!1,D=!1;for(var j in a)switch(j){case"properties":for(var L in a.properties)I=!0,R.properties[L]=[];break;case"items":for(var N=0;N=0;t--){var n=e[t][a];n.modified||(Array.isArray(n.base)?R(n)&&S(n):P(n)&&S(n))}}function P(e){for(var t=e.base,n=e.draft,r=Object.keys(n),i=r.length-1;i>=0;i--){var o=r[i],s=t[o];if(void 0===s&&!m(t,o))return!0;var l=n[o],u=l&&l[a];if(u?u.base!==s:!g(l,s))return!0}return r.length!==Object.keys(t).length}function R(e){var t=e.draft;if(t.length!==e.base.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var M=Object.freeze({willFinalize:function(e,t,n){e.drafts.forEach((function(e){e[a].finalizing=!0})),n?s(t)&&t[a].scope===e&&A(e.drafts):(e.patches&&function e(t){if(!t||"object"!=typeof t)return;var n=t[a];if(!n)return;var r=n.base,i=n.draft,o=n.assigned;if(Array.isArray(t)){if(R(n)){if(S(n),o.length=!0,i.lengthc&&a[d-1]===s[d+u-1];)--d;for(var f=c;f=d;--m){var g=t.concat([m]);n[h+m-d]={op:"add",path:g,value:s[m]},r.push({op:"remove",path:g})}}(e,t,n,r):function(e,t,n,r){var i=e.base,o=e.copy;p(e.assigned,(function(e,a){var s=i[e],l=o[e],u=a?e in i?"replace":"add":"remove";if(s!==l||"replace"!==u){var c=t.concat(e);n.push("remove"===u?{op:u,path:c}:{op:u,path:c,value:l}),r.push("add"===u?{op:"remove",path:c}:"remove"===u?{op:"add",path:c,value:s}:{op:"replace",path:c,value:s})}}))}(e,t,n,r)}var z=function(e,t){for(var n=0,r=t;n0;)r[i]=arguments[i+1];return s.produce(e,(function(e){return t.call.apply(t,[n,e].concat(r))}))}}if("function"!=typeof t)throw new Error("The first or second argument to `produce` must be a function");if(void 0!==n&&"function"!=typeof n)throw new Error("The third argument to `produce` must be a function or undefined");if(l(e)){var u=y.enter(),c=this.createProxy(e),d=!0;try{r=t(c),d=!1}finally{d?u.revoke():u.leave()}return r instanceof Promise?r.then((function(e){return u.usePatches(n),o.processResult(e,u)}),(function(e){throw u.revoke(),e})):(u.usePatches(n),this.processResult(r,u))}return void 0===(r=t(e))?e:r!==i?r:void 0},H.prototype.produceWithPatches=function(e,t,n){var r,i,o=this;if("function"==typeof e)return function(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return o.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(n))}))};if(n)throw new Error("A patch listener cannot be passed to produceWithPatches");return[this.produce(e,t,(function(e,t){r=e,i=t})),r,i]},H.prototype.createDraft=function(e){if(!l(e))throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");var t=y.enter(),n=this.createProxy(e);return n[a].isManual=!0,t.leave(),n},H.prototype.finishDraft=function(e,t){var n=e&&e[a];if(!n||!n.isManual)throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");if(n.finalized)throw new Error("The given draft is already finalized");var r=n.scope;return r.usePatches(t),this.processResult(void 0,r)},H.prototype.setAutoFreeze=function(e){this.autoFreeze=e},H.prototype.setUseProxies=function(e){this.useProxies=e,c(this,e?B:M)},H.prototype.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}return s(e)?z(e,t):this.produce(e,(function(e){return z(e,t.slice(n+1))}))},H.prototype.processResult=function(e,t){var n=t.drafts[0],r=void 0!==e&&e!==n;if(this.willFinalize(t,e,r),r){if(n[a].modified)throw t.revoke(),new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");l(e)&&(e=this.finalize(e,null,t)),t.patches&&(t.patches.push({op:"replace",path:[],value:e}),t.inversePatches.push({op:"replace",path:[],value:n[a].base}))}else e=this.finalize(n,[],t);return t.revoke(),t.patches&&t.patchListener(t.patches,t.inversePatches),e!==i?e:void 0},H.prototype.finalize=function(e,t,n){var r=this,i=e[a];if(!i)return Object.isFrozen(e)?e:this.finalizeTree(e,null,n);if(i.scope!==n)return e;if(!i.modified)return i.base;if(!i.finalized){if(i.finalized=!0,this.finalizeTree(i.draft,t,n),this.onDelete)if(this.useProxies){var o=i.assigned;for(var s in o)o[s]||this.onDelete(i,s)}else{var l=i.base,u=i.copy;p(l,(function(e){m(u,e)||r.onDelete(i,e)}))}this.onCopy&&this.onCopy(i),this.autoFreeze&&n.canAutoFreeze&&Object.freeze(i.copy),t&&n.patches&&U(i,t,n.patches,n.inversePatches)}return i.copy},H.prototype.finalizeTree=function(e,t,n){var r=this,i=e[a];i&&(this.useProxies||(i.copy=f(i.draft,!0)),e=i.copy);var o=!!t&&!!n.patches,u=function(a,c,d){if(c===d)throw Error("Immer forbids circular references");var f=!!i&&d===e;if(s(c)){var m=f&&o&&!i.assigned[a]?t.concat(a):null;if(s(c=r.finalize(c,m,n))&&(n.canAutoFreeze=!1),Array.isArray(d)||h(d,a)?d[a]=c:Object.defineProperty(d,a,{value:c}),f&&c===i.base[a])return}else{if(f&&g(c,i.base[a]))return;l(c)&&!Object.isFrozen(c)&&p(c,u)}f&&r.onAssign&&r.onAssign(i,a,c)};return p(e,u),e};var W=new H,G=W.produce,V=W.produceWithPatches.bind(W),K=W.setAutoFreeze.bind(W),$=W.setUseProxies.bind(W),Y=W.applyPatches.bind(W),Q=W.createDraft.bind(W),X=W.finishDraft.bind(W);t.default=G}.call(this,n(69))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{id:t=null,label:n="unnamed component",icon:r="exclamation-triangle",type:i="shortcode",widget:c="object",pattern:d=l,fields:f=[],fromBlock:p,toBlock:h,toPreview:m}=e,g=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["id","label","icon","type","widget","pattern","fields","fromBlock","toBlock","toPreview"]);return function(e){for(var t=1;t({})),toBlock:u(h)||(()=>"Plugin"),toPreview:u(m)||!c&&(u(h)||(()=>"Plugin")),fields:(0,o.fromJS)(f)},g)};var r,i=(r=n(162))&&r.__esModule?r:{default:r},o=n(3);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=/.^/,u=e=>(0,i.default)(e)&&e.bind(null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(202))&&r.__esModule?r:{default:r},o=n(334),a=n(96);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;te.ok?t:Promise.reject(t))}urlFor(e,t){const n=[];if(t.params)for(const e in t.params)n.push("".concat(e,"=").concat(encodeURIComponent(t.params[e])));return n.length&&(e+="?".concat(n.join("&"))),e}request(e,t={}){const n=this.requestHeaders(t.headers||{}),r=this.urlFor(e,t);return fetch(r,l({},t,{headers:n})).then(e=>{const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text()})}search(e,t,n){const r=e.map(e=>({indexName:"".concat(this.indexPrefix).concat(e),params:"query=".concat(t,"&page=").concat(n)}));return this.request("".concat(this.searchURL,"/indexes/*/queries"),{method:"POST",body:JSON.stringify({requests:r})}).then(t=>{const r=t.results.map((t,n)=>t.hits.map(t=>{const r=t.path.split("/").pop().replace(/\.[^.]+$/,"");return(0,o.createEntry)(e[n],r,t.path,{data:t.data,partial:!0})}));return{entries:(0,i.default)(r),pagination:n}})}searchBy(e,t,n){return this.request("".concat(this.searchURL,"/indexes/").concat(this.indexPrefix).concat(t),{params:{restrictSearchableAttributes:e,query:n}})}listEntries(e,t){return this.entriesCache.collection===e&&this.entriesCache.page===t?Promise.resolve({page:this.entriesCache.page,entries:this.entriesCache.entries}):this.request("".concat(this.searchURL,"/indexes/").concat(this.indexPrefix).concat(e.get("name")),{params:{page:t}}).then(t=>{const n=t.hits.map(t=>{const n=(0,a.selectEntrySlug)(e,t.path);return(0,o.createEntry)(e.get("name"),n,t.path,{data:t.data,partial:!0})});return this.entriesCache={collection:e,pagination:t.page,entries:n},{entries:n,pagination:t.page}})}getEntry(e,t){return this.searchBy("slug",e.get("name"),t).then(n=>{const r=n.hits.filter(e=>e.slug===t)[0];return(0,o.createEntry)(e.get("name"),t,r.path,{data:r.data,partial:!0})})}}},function(e,t,n){var r=n(101),i=n(68);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){console.error("%c ⛔ ".concat(e,"\n")+"%c".concat(t,"\n\n"),"color: black; font-weight: bold; font-size: 16px; line-height: 50px;","color: black;")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(176)),i=a(n(859)),o=n(145);function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;te.ok?t:Promise.reject(t))}urlFor(e,t){const n=[];if(t.params)for(const e in t.params)n.push("".concat(e,"=").concat(encodeURIComponent(t.params[e])));return n.length&&(e+="?".concat(n.join("&"))),e}requestHeaders(e={}){return l({},e)}confirmRequest(e){this.getToken().then(t=>this.request("".concat(this.getSignedFormURL,"/").concat(e),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({state:"uploaded"})}))}async request(e,t={}){const n=this.requestHeaders(t.headers||{}),r=this.urlFor(e,t),i=await fetch(r,l({},t,{headers:n})),o=i.headers.get("Content-Type");return o&&o.match(/json/)?await this.parseJsonResponse(i):i.text()}async retrieve(e,t,n){const r=(0,i.default)({search:e,page:t,filter:n?"private":"public"},e=>!!e),a=(0,o.addParams)(this.getSignedFormURL,r),s=await this.getToken(),l={"Content-Type":"application/json",Authorization:"Bearer ".concat(s)};return(await this.request(a,{headers:l})).map(({id:e,name:t,size:n,url:r})=>({id:e,name:t,size:n,displayURL:r,url:r}))}delete(e){const t="".concat(this.getSignedFormURL,"/").concat(e);return this.getToken().then(e=>this.request(t,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}}))}async upload(e,t=!1){const n={name:e.name,size:e.size};e.type&&(n.content_type=e.type),t&&(n.visibility="private");try{const t=await this.getToken(),r=await this.request(this.getSignedFormURL,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify(n)}),i=r.form.url,o=r.form.fields,{id:a,name:s,size:l,url:u}=r.asset,c=new FormData;return Object.keys(o).forEach(e=>c.append(e,o[e])),c.append("file",e,e.name),await this.request(i,{method:"POST",body:c}),this.shouldConfirmUpload&&await this.confirmRequest(a),{success:!0,asset:{id:a,name:s,size:l,displayURL:u,url:u}}}catch(e){throw console.error(e),e}}}},function(e,t,n){var r=n(110),i=n(111),o=n(463),a=n(336);e.exports=function(e,t){if(null==e)return{};var n=r(a(e),(function(e){return[e]}));return t=i(t),o(e,n,(function(e,n){return t(e,n[0])}))}},function(e,t,n){var r=n(861),i=n(862),o=n(460);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(248),i=n(328);e.exports=function(e,t,n,o){var a=n.length,s=a,l=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var r=n(341),i=n(238),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return r(o,(function(n){var r="_."+n[0];t&n[1]&&!i(e,r)&&e.push(r)})),e.sort()}},function(e,t,n){var r=n(177),i=n(173),o=Math.min;e.exports=function(e,t){for(var n=e.length,a=o(t.length,n),s=r(e);a--;){var l=t[a];e[a]=i(l,n)?s[l]:void 0}return e}},function(e,t,n){var r=n(242),i=n(254),o=n(67);e.exports=function(e,t,n,a){var s=1&t,l=i(e);return function t(){for(var i=-1,u=arguments.length,c=-1,d=a.length,f=Array(d+u),p=this&&this!==o&&this instanceof t?l:e;++c",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(888);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?I+="x":I+=M[D];if(!I.match(p)){var L=P.slice(0,T),N=P.slice(T+1),F=M.match(h);F&&(L.push(F[1]),N.unshift(F[2])),N.length&&(b="/"+N.join(".")+b),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+B,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[E])for(T=0,R=c.length;T0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=x.slice(-1)[0],O=(n.host||e.host||x.length>1)&&("."===S||".."===S)||""===S,T=0,C=x.length;C>=0;C--)"."===(S=x[C])?x.splice(C,1):".."===S?(x.splice(C,1),T++):T&&(x.splice(C,1),T--);if(!w&&!E)for(;T--;T)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),O&&"/"!==x.join("/").substr(-1)&&x.push("");var A,P=""===x[0]||x[0]&&"/"===x[0].charAt(0);k&&(n.hostname=n.host=P?"":x.length?x.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(w=w||n.host&&x.length)&&!P&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\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"},p=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=h(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,n){var r=0;for(e=n?p(e/700):e>>1,e+=p(e/t);e>455;r+=36)e=p(e/35);return p(r+36*e/(e+38))}function E(e){var t,n,r,i,o,a,s,u,c,d,f,h=[],g=e.length,v=0,y=128,_=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((u=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>p((l-v)/a))&&m("overflow"),v+=u*a,!(u<(c=s<=_?1:s>=_+26?26:s-_));s+=36)a>p(l/(d=36-c))&&m("overflow"),a*=d;_=w(v-o,t=h.length+1,0==o),p(v/t)>l-y&&m("overflow"),y+=p(v/t),v%=t,h.splice(v++,0,y)}return b(h)}function x(e){var t,n,r,i,o,a,s,u,c,d,f,g,v,b,E,x=[];for(g=(e=y(e)).length,t=128,n=0,o=72,a=0;a=t&&fp((l-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,a=0;al&&m("overflow"),f==t){for(u=n,c=36;!(u<(d=c<=o?1:c>=o+26?26:c-o));c+=36)E=u-d,b=36-d,x.push(h(_(d+E%b,0))),u=p(E/b);x.push(h(_(u,0))),o=w(n,v,r==i),n=0,++r}++n,++t}return x.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:b},decode:E,encode:x,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(123)(e),n(39))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(889),t.encode=t.stringify=n(890)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c=0?(d=m.substr(0,g),f=m.substr(g+1)):(d=m,f=""),p=decodeURIComponent(d),h=decodeURIComponent(f),r(a,p)?i(a[p])?a[p].push(h):a[p]=[a[p],h]:a[p]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r\\:\*\|"]/g,o=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,s=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,l=/[\. ]+$/;function u(e,t){if("string"!=typeof e)throw new Error("Input must be string");var n=e.replace(i,t).replace(o,t).replace(a,t).replace(s,t).replace(l,t);return r(n,255)}e.exports=function(e,t){var n=t&&t.replacement||"",r=u(e,n);return""===n?r:u(r,"")}},function(e,t,n){"use strict";var r=n(894),i=n(895);e.exports=r.bind(null,i)},function(e,t,n){"use strict";function r(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e,t,n){if("string"!=typeof t)throw new Error("Input must be string");for(var o,a,s=t.length,l=0,u=0;un)return t.slice(0,u-a.length+1)}return t}},function(e,t,n){"use strict";function r(e){return e>=55296&&e<=56319}function i(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var t=e.length,n=0,o=null,a=null,s=0;s=128&&o<=2047?n+=2:o>=2048&&o<=65535&&(n+=3),a=o;return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CURSOR_COMPATIBILITY_SYMBOL=t.default=void 0;var r=n(3);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o=e=>{if(void 0===e)return(0,r.Map)();const t=(0,r.fromJS)(e);if(!r.Map.isMap(t))throw new Error("Object must be equivalent to a Map.");return t},a=(0,r.Set)(["index","page","count","pageSize","pageCount","usingOldPaginationAPI","extension","folder","depth"]),s=e=>e.filter((e,t)=>a.has(t));class l{static create(...e){return new l(...e)}constructor(...e){if(i(this,"store",void 0),i(this,"actions",void 0),i(this,"data",void 0),i(this,"meta",void 0),e[0]instanceof l)return e[0];this.store=((...e)=>{const{actions:t,data:n,meta:i}=1===e.length?o(e[0]).toObject():{actions:e[0],data:e[1],meta:e[2]};return(0,r.Map)({actions:(0,r.Set)(t),data:o(n),meta:o(i).update(s)})})(...e),this.actions=this.store.get("actions"),this.data=this.store.get("data"),this.meta=this.store.get("meta")}updateStore(...e){return new l(this.store.update(...e))}updateInStore(...e){return new l(this.store.updateIn(...e))}hasAction(e){return((e,t)=>e.hasIn(["actions",t]))(this.store,e)}addAction(e){return this.updateStore("actions",t=>t.add(e))}removeAction(e){return this.updateStore("actions",t=>t.delete(e))}setActions(e){return this.updateStore(t=>t.set("actions",(0,r.Set)(e)))}mergeActions(e){return this.updateStore("actions",t=>t.union(e))}getActionHandlers(e){return((e,t)=>e.get("actions",(0,r.Set)()).toMap().map(e=>t(e)))(this.store,e)}setData(e){return new l(this.store.set("data",o(e)))}mergeData(e){return new l(this.store.mergeIn(["data"],o(e)))}wrapData(e){return this.updateStore("data",t=>o(e).set("wrapped_cursor_data",t))}unwrapData(){return[this.store.get("data").delete("wrapped_cursor_data"),this.updateStore("data",e=>e.get("wrapped_cursor_data"))]}clearData(){return this.updateStore("data",()=>(0,r.Map)())}setMeta(e){return this.updateStore(t=>t.set("meta",o(e)))}mergeMeta(e){return this.updateStore(t=>t.update("meta",t=>t.merge(o(e))))}}t.default=l;const u=Symbol("cursor key for compatibility with old backends");t.CURSOR_COMPATIBILITY_SYMBOL=u},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.EDITORIAL_WORKFLOW_ERROR=void 0;t.EDITORIAL_WORKFLOW_ERROR="EDITORIAL_WORKFLOW_ERROR";class i extends(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error)){constructor(e,t){super(e),r(this,"message",void 0),r(this,"notUnderEditorialWorkflow",void 0),this.message=e,this.notUnderEditorialWorkflow=t,this.name="EDITORIAL_WORKFLOW_ERROR"}}t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(899))&&r.__esModule?r:{default:r};i.default.setItem("localForageTest",{expires:Date.now()+3e5}).then(()=>{i.default.removeItem("localForageTest")}).catch(e=>{if(22===e.code){const e="Unable to set localStorage key. Quota exceeded! Full disk?";console.warn(e)}console.log(e)});var o=i.default;t.default=o},function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){var n=t[a][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function m(e){var t=f[e.name],n={};n.promise=new a((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function g(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function v(e,t){var n=f[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function y(e,t){return new a((function(n,r){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);m(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var a=i.open.apply(i,o);t&&(a.onupgradeneeded=function(t){var n=a.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),a.onerror=function(e){e.preventDefault(),r(a.error)},a.onsuccess=function(){n(a.result),g(e)}}))}function b(e){return y(e,!1)}function _(e){return y(e,!0)}function w(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function E(e){return o([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_(e)})).then((function(){return function(e){m(e);for(var t=f[e.name],n=t.forages,r=0;r>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&o;return u}function I(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2],r+=T[(3&n[t])<<4|n[t+1]>>4],r+=T[(15&n[t+1])<<2|n[t+2]>>6],r+=T[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var D={serialize:function(e,t){var n="";if(e&&(n=R.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===R.call(e.buffer))){var r,i="__lfsc__:";e instanceof ArrayBuffer?(r=e,i+="arbf"):(r=e.buffer,"[object Int8Array]"===n?i+="si08":"[object Uint8Array]"===n?i+="ui08":"[object Uint8ClampedArray]"===n?i+="uic8":"[object Int16Array]"===n?i+="si16":"[object Uint16Array]"===n?i+="ur16":"[object Int32Array]"===n?i+="si32":"[object Uint32Array]"===n?i+="ui32":"[object Float32Array]"===n?i+="fl32":"[object Float64Array]"===n?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+I(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+I(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,A))return JSON.parse(e);var t,n=e.substring(P),r=e.substring(A,P);if("blob"===r&&C.test(n)){var i=n.match(C);t=i[1],n=n.substring(i[0].length)}var a=M(n);switch(r){case"arbf":return a;case"blob":return o([a],{type:t});case"si08":return new Int8Array(a);case"ui08":return new Uint8Array(a);case"uic8":return new Uint8ClampedArray(a);case"si16":return new Int16Array(a);case"ur16":return new Uint16Array(a);case"si32":return new Int32Array(a);case"ui32":return new Uint32Array(a);case"fl32":return new Float32Array(a);case"fl64":return new Float64Array(a);default:throw new Error("Unkown type: "+r)}},stringToBuffer:M,bufferToString:I};function j(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function L(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,s){s.rows.length?o(e,a):j(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,a)}),o)}function N(e,t,n,r){var i=this;e=u(e);var o=new a((function(o,a){i.ready().then((function(){void 0===t&&(t=null);var s=t,l=i._dbInfo;l.serializer.serialize(t,(function(t,u){u?a(u):l.db.transaction((function(n){L(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(s)}),(function(e,t){a(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(N.apply(i,[e,s,n,r-1]));a(t)}}))}))})).catch(a)}));return s(o,n),o}function F(e){return new a((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o0}var q={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=U(e,this._defaultConfig),z()?(this._dbInfo=t,t.serializer=D,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,a=1,s=0;s=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return s(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return s(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),t),r}},H=function(e,t){for(var n,r,i=e.length,o=0;o1)return n[n.length-2];if(t.length>0){if(r.substr(r.length-t.length)===t)return r.substr(0,r.length-t.length)}return r},t.fileExtensionWithSeparator=o,t.fileExtension=function(e){const t=o(e);return""===t?t:t.substr(1)};const r=new RegExp("^(?:[a-z]+:)?//","i"),i=e=>e.replace(/[\\/]+/g,"/");function o(e){const t=(e=i(e)).split("/");if(""===(e=t.pop())&&t.length>0&&(e=t.pop()),".."===e)return"";const n=e.lastIndexOf(".");return-1===n||0===n?"":e.substr(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flowAsync=t.onlySuccessfulPromises=t.then=void 0;var r,i=(r=n(97))&&r.__esModule?r:{default:r};t.then=e=>t=>Promise.resolve(t).then(e);const o=Symbol("filterPromiseSymbol");t.onlySuccessfulPromises=e=>Promise.all(e.map(e=>e.catch(()=>o))).then(e=>e.filter(e=>e!==o));t.flowAsync=e=>(0,i.default)(e.map(e=>(e=>async t=>e(await t))(e)))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathDepth=t.getAllResponses=t.parseLinkHeader=t.responseParser=t.parseResponse=t.filterByPropExtension=void 0;var r=c(n(344)),i=c(n(94)),o=c(n(488)),a=c(n(97)),s=n(3),l=c(n(478)),u=c(n(477));function c(e){return e&&e.__esModule?e:{default:e}}t.filterByPropExtension=(e,t)=>n=>n.filter(n=>(0,i.default)(n,t,"").endsWith(e.startsWith(".")?e:".".concat(e)));const d=(e,t)=>n=>{try{return t(n)}catch(t){throw new Error("Response cannot be parsed into the expected format (".concat(e,"): ").concat(t.message))}},f=(0,s.fromJS)({json:async e=>{const t=e.headers.get("Content-Type")||"";if(!t.startsWith("application/json")&&!t.startsWith("text/json"))throw new Error("".concat(t," is not a valid JSON Content-Type"));return e.json()},text:async e=>e.text(),blob:async e=>e.blob()}).mapEntries(([e,t])=>[e,d(e,t)]),p=async(e,{expectingOk:t=!0,format:n="text",apiName:r=""})=>{let i;try{const t=f.get(n,!1);if(!t)throw new Error("".concat(n," is not a supported response format."));i=await t(e)}catch(t){throw new u.default(t.message,e.status,r)}if(t&&!e.ok){var o;const t="json"===n,a=t?i.message||i.msg||(null===(o=i.error)||void 0===o?void 0:o.message):i;throw new u.default(t&&a?a:i,e.status,r)}return i};t.parseResponse=p;t.responseParser=e=>t=>p(t,e);const h=(0,a.default)([e=>e.split(","),(0,r.default)(e=>e.trim().split(";")),(0,r.default)(([e,t])=>[t.match(/rel="(.*?)"/)[1],e.trim().match(/<(.*?)>/)[1].replace(/\+/g,"%20")]),o.default]);t.parseLinkHeader=h;t.getAllResponses=async(e,t={},n,r)=>{let i=1,o=l.default.fromFetchArguments(e,t);const a=[];for(;o&&i<30;){const e=await l.default.performRequest(o),s=e.headers.get("Link"),u=s&&h(s)[n],{headers:c={}}=t;o=u&&l.default.fromFetchArguments(r(u),{headers:c}),a.push(e),i++}return a};t.getPathDepth=e=>e.split("/").length},function(e,t,n){var r=n(904),i=n(214),o=Array.prototype.push;function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function l(e,t){return function(){var n=arguments.length;if(n){for(var r=Array(n);n--;)r[n]=arguments[n];var i=r[0]=t.apply(void 0,r);return e.apply(void 0,r),i}}}e.exports=function e(t,n,u,c){var d="function"==typeof n,f=n===Object(n);if(f&&(c=u,u=n,n=void 0),null==u)throw new TypeError;c||(c={});var p=!("cap"in c)||c.cap,h=!("curry"in c)||c.curry,m=!("fixed"in c)||c.fixed,g=!("immutable"in c)||c.immutable,v=!("rearg"in c)||c.rearg,y=d?u:i,b="curry"in c&&c.curry,_="fixed"in c&&c.fixed,w="rearg"in c&&c.rearg,E=d?u.runInContext():void 0,x=d?u:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},k=x.ary,S=x.assign,O=x.clone,T=x.curry,C=x.forEach,A=x.isArray,P=x.isError,R=x.isFunction,M=x.isWeakMap,I=x.keys,D=x.rearg,j=x.toInteger,L=x.toPath,N=I(r.aryMethod),F={castArray:function(e){return function(){var t=arguments[0];return A(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],r=e(t,n),i=r.length;return p&&"number"==typeof n?(n=n>2?n-2:1,i&&i<=n?r:a(r,n)):r}},mixin:function(e){return function(t){var n=this;if(!R(n))return e(n,Object(t));var r=[];return C(I(t),(function(e){R(t[e])&&r.push([e,n.prototype[e]])})),e(n,Object(t)),C(r,(function(e){var t=e[1];R(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t<0?1:j(t)+1;return T(e(t),n)}},rearg:function(e){return function(t,n){var r=n?n.length:0;return T(e(t,n),r)}},runInContext:function(n){return function(r){return e(t,n(r),c)}}};function B(e,t){if(p){var n=r.iterateeRearg[e];if(n)return function(e,t){return W(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(D(a(e,n),t),n)}))}(t,n);var i=!d&&r.iterateeAry[e];if(i)return function(e,t){return W(e,(function(e){return"function"==typeof e?a(e,t):e}))}(t,i)}return t}function U(e,t,n){if(m&&(_||!r.skipFixed[e])){var i=r.methodSpread[e],a=i&&i.start;return void 0===a?k(t,n):function(e,t){return function(){for(var n=arguments.length,r=n-1,i=Array(n);n--;)i[n]=arguments[n];var a=i[t],s=i.slice(0,t);return a&&o.apply(s,a),t!=r&&o.apply(s,i.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function z(e,t,n){return v&&n>1&&(w||!r.skipRearg[e])?D(t,r.methodRearg[e]||r.aryRearg[n]):t}function q(e,t){for(var n=-1,r=(t=L(t)).length,i=r-1,o=O(Object(e)),a=o;null!=a&&++n1?T(t,n):t}(0,i=B(o,i),e),!1}})),!i})),i||(i=a),i==t&&(i=b?T(i,1):function(){return t.apply(this,arguments)}),i.convert=H(o,t),i.placeholder=t.placeholder=n,i}if(!f)return G(n,u,y);var V=u,K=[];return C(N,(function(e){C(r.aryMethod[e],(function(e){var t=V[r.remap[e]||e];t&&K.push([e,G(e,t,V)])}))})),C(I(V),(function(e){var t=V[e];if("function"==typeof t){for(var n=K.length;n--;)if(K[n][0]==e)return;t.convert=H(e,t),K.push([e,t])}})),C(K,(function(e){V[e[0]]=e[1]})),V.convert=function(e){return V.runInContext.convert(e)(void 0)},V.placeholder=V,C(I(V),(function(e){C(r.realToAlias[e]||[],(function(t){V[t]=V[e]}))})),V}},function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,r={};for(var i in n){var o=n[i];e.call(r,o)?r[o].push(i):r[o]=[i]}return r}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(e,t,n){e.exports={ary:n(906),assign:n(480),clone:n(907),curry:n(479),forEach:n(341),isArray:n(40),isError:n(240),isFunction:n(162),isWeakMap:n(920),iteratee:n(921),keys:n(332),rearg:n(922),toInteger:n(112),toPath:n(923)}},function(e,t,n){var r=n(212);e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,r(e,128,void 0,void 0,void 0,void 0,t)}},function(e,t,n){var r=n(345);e.exports=function(e){return r(e,4)}},function(e,t,n){var r=n(178),i=n(253);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(178),i=n(329);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(178),i=n(464);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(346),i=n(913),o=n(914),a=n(915),s=n(482);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Set]":return new l;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(346);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(161),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},function(e,t,n){var r=n(917),i=n(174),o=n(331),a=o&&o.isMap,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(175),i=n(68);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(919),i=n(174),o=n(331),a=o&&o.isSet,s=a?i(a):r;e.exports=s},function(e,t,n){var r=n(175),i=n(68);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},function(e,t,n){var r=n(175),i=n(68);e.exports=function(e){return i(e)&&"[object WeakMap]"==r(e)}},function(e,t,n){var r=n(345),i=n(111);e.exports=function(e){return i("function"==typeof e?e:r(e,1))}},function(e,t,n){var r=n(212),i=n(257),o=i((function(e,t){return r(e,256,void 0,void 0,void 0,t)}));e.exports=o},function(e,t,n){var r=n(110),i=n(177),o=n(40),a=n(164),s=n(421),l=n(121),u=n(109);e.exports=function(e){return o(e)?r(e,l):a(e)?[e]:i(s(u(e)))}},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},function(e,t,n){var r=n(126);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a{let r=!1;const i=document.getElementsByTagName("head")[0],o=document.createElement("script");o.src=e,o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState?n():(r=!0,t())},o.onerror=e=>n(e),i.appendChild(o)})}},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__; /** * [js-sha256]{@link https://github.com/emn178/js-sha256} * * @version 0.9.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2017 * @license MIT */!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(928),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n>6,a[l++]=128|63&o):o<55296||o>=57344?(a[l++]=224|o>>12,a[l++]=128|o>>6&63,a[l++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++r)),a[l++]=240|o>>18,a[l++]=128|o>>12&63,a[l++]=128|o>>6&63,a[l++]=128|63&o);e=a}else{if("object"!==i)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var u=[],c=[];for(r=0;r<64;++r){var d=e[r]||0;u[r]=92^d,c[r]=54^d}Sha256.call(this,t,n),this.update(c),this.oKeyPad=u,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var r,i,o=0,a=e.length,s=this.blocks;o>2]|=e[o]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,n,r,i,o,a,s,l,u=this.h0,c=this.h1,d=this.h2,f=this.h3,p=this.h4,h=this.h5,m=this.h6,g=this.h7,v=this.blocks;for(e=16;e<64;++e)t=((i=v[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=v[e-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,v[e]=v[e-16]+t+v[e-7]+n<<0;for(l=c&d,e=0;e<64;e+=4)this.first?(this.is224?(o=300032,g=(i=v[0]-1413257819)-150054599<<0,f=i+24177077<<0):(o=704751109,g=(i=v[0]-210244248)-1521486534<<0,f=i+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(o=u&c)^u&d^l,g=f+(i=g+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&h^~p&m)+K[e]+v[e])<<0,f=i+(t+r)<<0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(a=f&u)^f&c^o,m=d+(i=m+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&p^~g&h)+K[e+1]+v[e+1])<<0,t=((d=i+(t+r)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(s=d&f)^d&u^a,h=c+(i=h+(n=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&g^~m&p)+K[e+2]+v[e+2])<<0,t=((c=i+(t+r)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(l=c&d)^c&f^s,p=u+(i=p+(n=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&m^~h&g)+K[e+3]+v[e+3])<<0,u=i+(t+r)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+c<<0,this.h2=this.h2+d<<0,this.h3=this.h3+f<<0,this.h4=this.h4+p<<0,this.h5=this.h5+h<<0,this.h6=this.h6+m<<0,this.h7=this.h7+g<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,a=this.h6,s=this.h7,l=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a];return this.is224||(l+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,a=this.h6,s=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,a>>24&255,a>>16&255,a>>8&255,255&a];return this.is224||l.push(s>>24&255,s>>16&255,s>>8&255,255&s),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(69),__webpack_require__(39))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncLock=void 0;var r,i=(r=n(179))&&r.__esModule?r:{default:r};t.asyncLock=()=>{let e=(0,i.default)(1);return{acquire:(t=15e3)=>new Promise(n=>{const r=setTimeout(()=>{e=(0,i.default)(1),n(!1)},t);e.take(()=>{clearTimeout(r),n(!0)})}),release:()=>{try{e.leave()}catch(t){if("leave called too many times."!==t.message)throw t;console.warn("leave called too many times."),e=(0,i.default)(1)}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.runWithLock=t.getMediaDisplayURL=t.getMediaAsBlob=t.blobToFileObj=t.unpublishedEntries=t.entriesByFiles=t.entriesByFolder=void 0;var r,i=(r=n(179))&&r.__esModule?r:{default:r};const o=async(e,t,n)=>{const r=(0,i.default)(10),o=[];return e.forEach(e=>{o.push(new Promise(i=>r.take(()=>t(e.path,e.id,{parseText:!0}).then(t=>{i({file:e,data:t}),r.leave()}).catch((t=!0)=>{r.leave(),console.error("failed to load file from ".concat(n,": ").concat(e.path)),i({error:t})}))))}),Promise.all(o).then(e=>e.filter(e=>!e.error))};t.entriesByFolder=async(e,t,n)=>{const r=await e();return o(r,t,n)};t.entriesByFiles=async(e,t,n)=>o(e,t,n);t.unpublishedEntries=async(e,t,n)=>{try{const r=await e();return await(async(e,t,n)=>{const r=(0,i.default)(10),o=[];return e.forEach(e=>{o.push(new Promise(i=>r.take(()=>t(e).then(e=>{null==e?(i({error:!0}),r.leave()):(i({slug:e.slug,file:{path:e.metaData.objects.entry.path,id:null},data:e.fileData,metaData:e.metaData,isModification:e.isModification}),r.leave())}).catch((t=!0)=>{r.leave(),console.error("failed to load file from ".concat(n,": ").concat(e)),i({error:t})}))))}),Promise.all(o).then(e=>e.filter(e=>!e.error))})(r,t,n)}catch(e){if("Not Found"===e.message)return Promise.resolve([]);throw e}};t.blobToFileObj=(e,t)=>{const n=e.match(/.svg$/)?{type:"image/svg+xml"}:{};return new File([t],e,n)};const a=async(e,t,n)=>{let r;if(e.match(/.svg$/)){const i=await n(e,t,{parseText:!0});r=new Blob([i],{type:"image/svg+xml"})}else r=await n(e,t,{parseText:!1});return r};t.getMediaAsBlob=a;t.getMediaDisplayURL=async(e,t,n)=>{const{path:r,id:i}=e;return new Promise((e,o)=>n.take(()=>a(r,i,t).then(e=>URL.createObjectURL(e)).then(e,o).finally(()=>n.leave())))};t.runWithLock=async(e,t,n)=>{try{return await e.acquire()||console.warn(n),await t()}finally{e.release()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviewStatus=t.PreviewState=t.isPreviewContext=t.readFile=t.branchFromContentKey=t.contentKeyFromBranch=t.parseContentKey=t.generateContentKey=t.statusToLabel=t.labelToStatus=t.isCMSLabel=t.MERGE_COMMIT_MESSAGE=t.DEFAULT_PR_BODY=t.CMS_BRANCH_PREFIX=void 0;t.CMS_BRANCH_PREFIX="cms";t.DEFAULT_PR_BODY="Automatically generated by Netlify CMS";t.MERGE_COMMIT_MESSAGE="Automatically generated. Merged on Netlify CMS.";t.isCMSLabel=e=>e.startsWith("netlify-cms/");t.labelToStatus=e=>e.substr("netlify-cms/".length);t.statusToLabel=e=>"".concat("netlify-cms/").concat(e);t.generateContentKey=(e,t)=>"".concat(e,"/").concat(t);t.parseContentKey=e=>{const t=e.indexOf("/");return{collection:e.substr(0,t),slug:e.substr(t+1)}};t.contentKeyFromBranch=e=>e.substring("".concat("cms","/").length);t.branchFromContentKey=e=>"".concat("cms","/").concat(e);t.readFile=async(e,t,n,r)=>{const i=e?r?"gh.".concat(e):"gh.".concat(e,".blob"):null,o=i?await n.getItem(i):null;if(o)return o;const a=await t();return i&&await n.setItem(i,a),a};const r=["deploy"],i=(e,t)=>t?e===t:r.some(t=>e.includes(t));let o;t.isPreviewContext=i,t.PreviewState=o,function(e){e.Other="other",e.Success="success"}(o||(t.PreviewState=o={}));t.getPreviewStatus=(e,t)=>e.find(({context:e})=>i(e,t))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPointerFileForMediaFileObj=E,t.getLargeMediaFilteredMediaFiles=async function(e,t){return await Promise.all(t.map(async t=>{const{fileObj:n,path:r}=t,i=r.startsWith("/")?r.slice(1):r;return e.matchPath(i)?c({},t,{},await E(e,n,r)):t}))},t.createPointerFile=t.getLargeMediaPatternsFromGitAttributesFile=t.parsePointerFile=void 0;var r=l(n(344)),i=l(n(490)),o=l(n(491)),a=l(n(933)),s=l(n(489));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const p=e=>e.split("\n"),h=e=>e.split(/\s+/g),m=(0,o.default)([(0,r.default)(e=>e.trim()),(0,a.default)(e=>""!==e)]),g=(0,o.default)([p,m,(0,r.default)(h),i.default,e=>{let{size:t,oid:n}=e,r=f(e,["size","oid"]);return c({size:parseInt(t),sha:null==n?void 0:n.split(":")[1]},r)}]);t.parsePointerFile=g;const v=(0,o.default)([(0,r.default)(e=>e.includes("=")?e.split("="):e.startsWith("-")?[e.slice(1),!1]:[e,!0]),i.default]),y=(0,o.default)([h,([e,...t])=>[e,v(t)]]),b=(0,o.default)([p,(0,r.default)(e=>e.split("#")[0]),m,(0,r.default)(y)]),_=(0,o.default)([b,(0,a.default)(([,e])=>"lfs"===e.filter&&"lfs"===e.diff&&"lfs"===e.merge),(0,r.default)(([e])=>e)]);t.getLargeMediaPatternsFromGitAttributesFile=_;const w=({size:e,sha:t})=>"version https://git-lfs.github.com/spec/v1\noid sha256:".concat(t,"\nsize ").concat(e,"\n");async function E(e,t,n){const{name:r,size:i}=t,o=await(0,s.default)(t);await e.uploadResource({sha:o,size:i},t);const a=w({sha:o,size:i}),l=new Blob([a]),u=new File([l],r,{type:"text/plain"}),c=await(0,s.default)(u);return{fileObj:u,size:l.size,sha:c,raw:a,path:n}}t.createPointerFile=w},function(e,t,n){var r=n(258)("filter",n(934));r.placeholder=n(214),e.exports=r},function(e,t,n){var r=n(451),i=n(935),o=n(111),a=n(40);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){var r=n(485);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.selectUnpublishedSlugs=t.selectUnpublishedEntriesByStatus=t.selectUnpublishedEntry=void 0;var r,i=(r=n(494))&&r.__esModule?r:{default:r},o=n(3),a=n(95),s=n(215),l=n(144);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.selectUnpublishedEntry=(e,t,n)=>e&&e.getIn(["entities","".concat(t,".").concat(n)]);t.selectUnpublishedEntriesByStatus=(e,t)=>{if(!e)return null;return e.get("entities").filter(e=>e.getIn(["metaData","status"])===t).valueSeq()};t.selectUnpublishedSlugs=(e,t)=>{if(!e.get("entities"))return null;return e.get("entities").filter((e,n)=>(0,i.default)(n,"".concat(t,"."))).map(e=>e.get("slug")).valueSeq()};var d=(e=(0,o.Map)(),t)=>{switch(t.type){case l.CONFIG_SUCCESS:return(t.payload&&t.payload.get("publish_mode"))===a.EDITORIAL_WORKFLOW?(0,o.Map)({entities:(0,o.Map)(),pages:(0,o.Map)()}):e;case s.UNPUBLISHED_ENTRY_REQUEST:return e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"isFetching"],!0);case s.UNPUBLISHED_ENTRY_REDIRECT:return e.deleteIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug)]);case s.UNPUBLISHED_ENTRY_SUCCESS:return e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.entry.slug)],(0,o.fromJS)(t.payload.entry));case s.UNPUBLISHED_ENTRIES_REQUEST:return e.setIn(["pages","isFetching"],!0);case s.UNPUBLISHED_ENTRIES_SUCCESS:return e.withMutations(e=>{t.payload.entries.forEach(t=>e.setIn(["entities","".concat(t.collection,".").concat(t.slug)],(0,o.fromJS)(t).set("isFetching",!1))),e.set("pages",(0,o.Map)(function(e){for(var t=1;te.slug))})))});case s.UNPUBLISHED_ENTRY_PERSIST_REQUEST:return e.withMutations(e=>{e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.entry.get("slug"))],(0,o.fromJS)(t.payload.entry)),e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.entry.get("slug")),"isPersisting"],!0),e.updateIn(["pages","ids"],(0,o.List)(),e=>e.push(t.payload.entry.get("slug")))});case s.UNPUBLISHED_ENTRY_PERSIST_SUCCESS:return e.deleteIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"isPersisting"]);case s.UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST:return e.withMutations(e=>{e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"metaData","status"],t.payload.newStatus),e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"isUpdatingStatus"],!0)});case s.UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS:case s.UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE:return e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"isUpdatingStatus"],!1);case s.UNPUBLISHED_ENTRY_PUBLISH_REQUEST:return e.setIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug),"isPublishing"],!0);case s.UNPUBLISHED_ENTRY_PUBLISH_SUCCESS:case s.UNPUBLISHED_ENTRY_PUBLISH_FAILURE:return e.withMutations(e=>{e.deleteIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug)])});case s.UNPUBLISHED_ENTRY_DELETE_SUCCESS:return e.deleteIn(["entities","".concat(t.payload.collection,".").concat(t.payload.slug)]);default:return e}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=n(3),o=(r=n(128))&&r.__esModule?r:{default:r},a=n(125),s=n(215);const l=(0,i.Map)({entry:(0,i.Map)(),fieldsMetaData:(0,i.Map)(),fieldsErrors:(0,i.Map)(),hasChanged:!1,key:""});var u=(e=(0,i.Map)(),t)=>{switch(t.type){case a.DRAFT_CREATE_FROM_ENTRY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload.entry)),e.setIn(["entry","newRecord"],!1),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!1),e.set("key",(0,o.default)())});case a.DRAFT_CREATE_EMPTY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload)),e.setIn(["entry","newRecord"],!0),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!1),e.set("key",(0,o.default)())});case a.DRAFT_CREATE_FROM_LOCAL_BACKUP:return e.withMutations(e=>{const t=e.get("localBackup").get("entry");e.delete("localBackup"),e.set("entry",t),e.setIn(["entry","newRecord"],!t.get("path")),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!0),e.set("key",(0,o.default)())});case a.DRAFT_CREATE_DUPLICATE_FROM_ENTRY:return e.withMutations(e=>{e.set("entry",(0,i.fromJS)(t.payload)),e.setIn(["entry","newRecord"],!0),e.set("mediaFiles",(0,i.List)()),e.set("fieldsMetaData",(0,i.Map)()),e.set("fieldsErrors",(0,i.Map)()),e.set("hasChanged",!0)});case a.DRAFT_DISCARD:return l;case a.DRAFT_LOCAL_BACKUP_RETRIEVED:{const{entry:n}=t.payload,r=new i.Map({entry:(0,i.fromJS)(n)});return e.set("localBackup",r)}case a.DRAFT_CHANGE_FIELD:return e.withMutations(e=>{e.setIn(["entry","data",t.payload.field],t.payload.value),e.mergeDeepIn(["fieldsMetaData"],(0,i.fromJS)(t.payload.metadata));const n=e.getIn(["entry","data"]);e.set("hasChanged",!t.payload.entries.some(e=>n.equals(e.get("data"))))});case a.DRAFT_VALIDATION_ERRORS:return 0===t.payload.errors.length?e.deleteIn(["fieldsErrors",t.payload.uniquefieldId]):e.setIn(["fieldsErrors",t.payload.uniquefieldId],t.payload.errors);case a.DRAFT_CLEAR_ERRORS:return e.set("fieldsErrors",(0,i.Map)());case a.ENTRY_PERSIST_REQUEST:case s.UNPUBLISHED_ENTRY_PERSIST_REQUEST:return e.setIn(["entry","isPersisting"],!0);case a.ENTRY_PERSIST_FAILURE:case s.UNPUBLISHED_ENTRY_PERSIST_FAILURE:return e.deleteIn(["entry","isPersisting"]);case a.ENTRY_PERSIST_SUCCESS:case s.UNPUBLISHED_ENTRY_PERSIST_SUCCESS:return e.withMutations(e=>{e.deleteIn(["entry","isPersisting"]),e.set("hasChanged",!1),e.getIn(["entry","slug"])||e.setIn(["entry","slug"],t.payload.slug)});case a.ENTRY_DELETE_SUCCESS:return e.withMutations(e=>{e.deleteIn(["entry","isPersisting"]),e.set("hasChanged",!1)});case a.ADD_DRAFT_ENTRY_MEDIA_FILE:return e.withMutations(e=>{const n=e.getIn(["entry","mediaFiles"]);e.setIn(["entry","mediaFiles"],n.filterNot(e=>e.get("id")===t.payload.id).insert(0,(0,i.fromJS)(t.payload))),e.set("hasChanged",!0)});case a.REMOVE_DRAFT_ENTRY_MEDIA_FILE:return e.withMutations(e=>{const n=e.getIn(["entry","mediaFiles"]);e.setIn(["entry","mediaFiles"],n.filterNot(e=>e.get("id")===t.payload.id)),e.set("hasChanged",!0)});default:return e}};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),i=n(260);let o,a,s,l;const u=(0,r.Map)({isFetching:!1,term:null,page:0,entryIds:(0,r.List)([]),queryHits:(0,r.Map)({})});var c=(e=u,t)=>{switch(t.type){case i.SEARCH_CLEAR:return u;case i.SEARCH_ENTRIES_REQUEST:return t.payload.searchTerm!==e.get("term")?e.withMutations(e=>{e.set("isFetching",!0),e.set("term",t.payload.searchTerm)}):e;case i.SEARCH_ENTRIES_SUCCESS:return o=t.payload.entries,s=t.payload.page,l=t.payload.searchTerm,e.withMutations(e=>{const t=(0,r.List)(o.map(e=>({collection:e.collection,slug:e.slug})));e.set("isFetching",!1),e.set("fetchID",null),e.set("page",s),e.set("term",l),e.set("entryIds",!s||isNaN(s)||0===s?t:e.get("entryIds",(0,r.List)()).concat(t))});case i.QUERY_REQUEST:return t.payload.searchTerm!==e.get("term")?e.withMutations(e=>{e.set("isFetching",!!t.payload.namespace),e.set("fetchID",t.payload.namespace),e.set("term",t.payload.searchTerm)}):e;case i.QUERY_SUCCESS:return l=t.payload.searchTerm,a=t.payload.response,e.withMutations(e=>{e.set("isFetching",!1),e.set("fetchID",null),e.set("term",l),e.mergeIn(["queryHits"],(0,r.Map)({[t.payload.namespace]:a.hits}))});default:return e}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.selectDeployPreview=void 0;var r=n(3),i=n(496);t.selectDeployPreview=(e,t,n)=>e.getIn(["deploys","".concat(t,".").concat(n)]);var o=(e=(0,r.Map)({deploys:(0,r.Map)()}),t)=>{switch(t.type){case i.DEPLOY_PREVIEW_REQUEST:{const{collection:n,slug:r}=t.payload;return e.setIn(["deploys","".concat(n,".").concat(r),"isFetching"],!0)}case i.DEPLOY_PREVIEW_SUCCESS:{const{collection:n,slug:i,url:o,status:a}=t.payload;return e.setIn(["deploys","".concat(n,".").concat(i)],(0,r.fromJS)({isFetching:!1,url:o,status:a}))}case i.DEPLOY_PREVIEW_FAILURE:{const{collection:n,slug:i}=t.payload;return e.setIn(["deploys","".concat(n,".").concat(i)],(0,r.fromJS)({isFetching:!1}))}default:return e}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),i=n(200);const o=["DEPLOY_PREVIEW"],a=e=>o.some(t=>e.type.includes(t));var s=(e=(0,r.Map)({isFetching:!1,useOpenAuthoring:!1}),t)=>!a(t)&&t.type.includes("REQUEST")?e.set("isFetching",!0):a(t)||!t.type.includes("SUCCESS")&&!t.type.includes("FAILURE")?t.type===i.USE_OPEN_AUTHORING?e.set("useOpenAuthoring",!0):e:e.set("isFetching",!1);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPhrases=function(e){return(0,i.default)({},(0,o.getLocale)("en"),(0,o.getLocale)(e))};var r,i=(r=n(944))&&r.__esModule?r:{default:r},o=n(127)},function(e,t,n){var r=n(945),i=n(948)((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){var r=n(248),i=n(497),o=n(487),a=n(946),s=n(75),l=n(253),u=n(498);e.exports=function e(t,n,c,d,f){t!==n&&o(n,(function(o,l){if(f||(f=new r),s(o))a(t,n,l,c,e,d,f);else{var p=d?d(u(t,l),o,l+"",t,n,f):void 0;void 0===p&&(p=o),i(t,l,p)}}),l)}},function(e,t,n){var r=n(497),i=n(481),o=n(482),a=n(177),s=n(483),l=n(203),u=n(40),c=n(349),d=n(211),f=n(162),p=n(75),h=n(199),m=n(249),g=n(498),v=n(947);e.exports=function(e,t,n,y,b,_,w){var E=g(e,n),x=g(t,n),k=w.get(x);if(k)r(e,n,k);else{var S=_?_(E,x,n+"",e,t,w):void 0,O=void 0===S;if(O){var T=u(x),C=!T&&d(x),A=!T&&!C&&m(x);S=x,T||C||A?u(E)?S=E:c(E)?S=a(E):C?(O=!1,S=i(x,!0)):A?(O=!1,S=o(x,!0)):S=[]:h(x)||l(x)?(S=E,l(E)?S=v(E):p(E)&&!f(E)||(S=s(x))):O=!1}O&&(w.set(x,S),b(S,x,y,_,w),w.delete(x)),r(e,n,S)}}},function(e,t,n){var r=n(178),i=n(253);e.exports=function(e){return r(e,i(e))}},function(e,t,n){var r=n(163),i=n(949);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r=12&&t<=14)?1:2},d={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:c,chinese:function(){return 0},croatian:c,french:function(e){return e>1?1:0},german:function(e){return 1!==e?1:0},russian:c,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3}},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is"],slovenian:["sl-SL"]}};function f(e,t){var n,i,o=(n=e.pluralTypeToLanguages,i={},r(n,(function(e,t){r(e,(function(e){i[e]=t}))})),i);return o[t]||o[u.call(t,/-/,1)[0]]||o.en}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var h=/%\{(.*?)\}/g;function m(e,t,n,r,i){if("string"!=typeof e)throw new TypeError("Polyglot.transformPhrase expects argument #1 to be string");if(null==t)return e;var s=e,c=r||h,p=i||d,m="number"==typeof t?{smart_count:t}:t;if(null!=m.smart_count&&s){var g=u.call(s,"||||");s=a(g[function(e,t,n){return e.pluralTypes[f(e,t)](n)}(p,n||"en",m.smart_count)]||g[0])}return s=l.call(s,c,(function(e,t){return o(m,t)&&null!=m[t]?m[t]:e}))}function g(e){var t=e||{};this.phrases={},this.extend(t.phrases||{}),this.currentLocale=t.locale||"en";var n=t.allowMissing?m:null;this.onMissingKey="function"==typeof t.onMissingKey?t.onMissingKey:n,this.warn=t.warn||s,this.tokenRegex=function(e){var t=e&&e.prefix||"%{",n=e&&e.suffix||"}";if("||||"===t||"||||"===n)throw new RangeError('"||||" token is reserved for pluralization');return new RegExp(p(t)+"(.*?)"+p(n),"g")}(t.interpolation),this.pluralRules=t.pluralRules||d}g.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},g.prototype.extend=function(e,t){r(e,(function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.extend(e,r):this.phrases[r]=e}),this)},g.prototype.unset=function(e,t){"string"==typeof e?delete this.phrases[e]:r(e,(function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.unset(e,r):delete this.phrases[r]}),this)},g.prototype.clear=function(){this.phrases={}},g.prototype.replace=function(e){this.clear(),this.extend(e)},g.prototype.t=function(e,t){var n,r,i=null==t?{}:t;if("string"==typeof this.phrases[e])n=this.phrases[e];else if("string"==typeof i._)n=i._;else if(this.onMissingKey){r=(0,this.onMissingKey)(e,i,this.currentLocale,this.tokenRegex,this.pluralRules)}else this.warn('Missing translation for key: "'+e+'"'),r=e;return"string"==typeof n&&(r=m(n,i,this.currentLocale,this.tokenRegex,this.pluralRules)),r},g.prototype.has=function(e){return o(this.phrases,e)},g.transformPhrase=function(e,t,n){return m(e,t,n)},e.exports=g},function(e,t,n){"use strict";var r=n(953),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,i=e.length;r=3&&(o=n),"[object Array]"===i.call(e)?a(e,t,o):"string"==typeof e?s(e,t,o):l(e,t,o)}},function(e,t,n){"use strict";var r=Function.prototype.toString,i=/^\s*class\b/,o=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(s)return function(e){try{return!o(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(o(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},function(e,t,n){"use strict";var r=n(350);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(i.call(arguments)))},l=Math.max(0,t.length-a.length),u=[],c=0;c0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g0?t-1:this._settings.wrap?this._members.length-1:t,this.focusNodeAtIndex(e),e},n.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)},n.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)},n.prototype._handleUnboundKey=function(e){if(this._settings.stringSearch){if(""!==this._searchString&&(" "===e.key||32===e.keyCode))return e.preventDefault(),-1;if(!((t=e.keyCode)>=65&&t<=90))return-1;var t;if(e.ctrlKey||e.metaKey||e.altKey)return-1;e.preventDefault(),this._addToSearchString(String.fromCharCode(e.keyCode)),this._runStringSearch()}},n.prototype._clearSearchString=function(){this._searchString=""},n.prototype._addToSearchString=function(e){this._searchString+=e.toLowerCase()},n.prototype._startSearchStringRefreshTimer=function(){var e=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout((function(){e._clearSearchString()}),this._settings.stringSearchDelay)},n.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)},n.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)},n.prototype.moveFocusByString=function(e){for(var t,n=0,i=this._members.length;n=0&&delete r.disabled,t.options.closeOnBlur&&(n.onBlur=t.handleBlur),s(n,e,r),o.createElement(e.tag,n,e.children)},t}(o.Component);c.propTypes=u,c.defaultProps={tag:"span"},e.exports=l(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var o=n(0),a=n(50),s=n(1),l=n(978),u=n(216),c=n(352),d={ambManager:s.object.isRequired,children:s.oneOfType([s.func,s.node]).isRequired,tag:s.string},f=function(e){function t(){var n,o;r(this,t);for(var s=arguments.length,u=Array(s),c=0;cfunction(e){for(var t=1;t{const t=e(()=>(0,s.jsx)(f,null,(0,s.jsx)(o.default,{type:"drag-handle",size:"small"})));return(0,s.jsx)(t,null)},h=({className:e,collapsed:t,onCollapseToggle:n,onRemove:r,dragHandleHOC:i})=>(0,s.jsx)(u,{className:e},n?(0,s.jsx)(c,{onClick:n},(0,s.jsx)(o.default,{type:"chevron",size:"small",direction:t?"right":"down"})):null,i?(0,s.jsx)(p,{dragHandleHOC:i}):null,r?(0,s.jsx)(c,{onClick:r},(0,s.jsx)(o.default,{type:"close",size:"small"})):null);h.propTypes={className:i.default.string,collapsed:i.default.bool,onCollapseToggle:i.default.func,onRemove:i.default.func};var m=(0,r.default)(h,{target:"e191f7z73",label:"StyledListItemTopBar"})("display:flex;justify-content:space-between;height:26px;border-radius:",a.lengths.borderRadius," ",a.lengths.borderRadius," 0 0;position:relative;");t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Loader=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=n(9),s=u(n(507)),l=n(102);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n "]);return d=function(){return e},e}const f={disabled:{name:"1ob4o9f-disabled",styles:"display:none;;label:disabled;"},active:{name:"1exmk8-active",styles:"display:block;;label:active;"},enter:{name:"1rafamr-enter",styles:"opacity:0.01;;label:enter;"},enterActive:{name:"halfu0-enterActive",styles:"opacity:1;transition:opacity 500ms ease-in;;label:enterActive;"},exit:{name:"1p8uuwp-exit",styles:"opacity:1;;label:exit;"},exitActive:{name:"1istkwr-exitActive",styles:"opacity:0.01;transition:opacity 300ms ease-in;;label:exitActive;"}},p={loader:(0,a.keyframes)(d())},h=(0,r.default)("div",{target:"e1rlflmg0",label:"LoaderText"})({name:"8sb4j5",styles:"width:auto !important;height:auto !important;text-align:center;color:#767676;margin-top:55px;line-height:35px;"}),m=(0,r.default)("div",{target:"e1rlflmg1",label:"LoaderItem"})({name:"aprmr",styles:"position:absolute;white-space:nowrap;transform:translateX(-50%);"});class g extends i.default.Component{constructor(...e){super(...e),c(this,"state",{currentItem:0}),c(this,"setAnimation",()=>{if(this.interval)return;const{children:e}=this.props;this.interval=setInterval(()=>{const t=this.state.currentItem===e.length-1?0:this.state.currentItem+1;this.setState({currentItem:t})},5e3)}),c(this,"renderChild",()=>{const{children:e}=this.props,{currentItem:t}=this.state;return e?"string"==typeof e?(0,a.jsx)(h,null,e):Array.isArray(e)?(this.setAnimation(),(0,a.jsx)(h,null,(0,a.jsx)(s.default,{classNames:{enter:f.enter,enterActive:f.enterActive,exit:f.exit,exitActive:f.exitActive},timeout:500},(0,a.jsx)(m,{key:t},e[t])))):void 0:null})}componentWillUnmount(){this.interval&&clearInterval(this.interval)}render(){const{className:e}=this.props;return(0,a.jsx)("div",{className:e},this.renderChild())}}t.Loader=g,c(g,"propTypes",{children:o.default.node,className:o.default.string});var v=(0,r.default)(g,{target:"e1rlflmg2",label:"StyledLoader"})("display:",e=>e.active?"block":"none",";position:absolute;top:50%;left:50%;margin:0px;text-align:center;z-index:1000;transform:translateX(-50%) translateY(-50%);&:before,&:after{content:'';position:absolute;top:0%;left:50%;width:2.28571429rem;height:2.28571429rem;margin:0em 0em 0em -1.14285714rem;border-radius:500rem;border-style:solid;border-width:0.2em;}&:before{border-color:rgba(0,0,0,0.1);}&:after{animation:",p.loader," 0.6s linear;animation-iteration-count:infinite;border-color:",l.colors.active," transparent transparent;box-shadow:0px 0px 0px 1px transparent;}");t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(19))&&r.__esModule?r:{default:r},o=n(102);const a={default:{background:o.colors.textFieldBorder,text:o.colors.controlLabel},active:{background:o.colors.active,text:o.colors.textLight},error:{background:o.colors.errorText,text:o.colorsRaw.white}},s=({isActive:e,hasErrors:t})=>t?a.error:e?a.active:a.default;var l=(0,i.default)("label",{target:"e1j7dp4t0",label:"FieldLabel"})(o.text.fieldLabel,";color:",e=>s(e).text,";background-color:",e=>s(e).background,";display:inline-block;border:0;border-radius:3px 3px 0 0;padding:3px 6px 2px;margin:0;transition:all ",o.transitions.main,";position:relative;&:before,&:after{content:'';display:block;position:absolute;top:0;right:-4px;height:100%;width:4px;background-color:inherit;}&:after{border-bottom-left-radius:3px;background-color:#fff;}");t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(19)),i=(s(n(0)),s(n(148))),o=n(102),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l={small:"28px",large:"40px"},u=(0,r.default)("button",{target:"e32dhqu0",label:"ButtonRound"})(o.buttons.button,";",o.shadows.dropMiddle,";background-color:",o.colorsRaw.white,";color:",e=>o.colors[e.isActive?"active":"inactive"],";border-radius:32px;display:flex;justify-content:center;align-items:center;width:",e=>l[e.size],";height:",e=>l[e.size],";padding:0;");var c=({size:e,isActive:t,type:n,onClick:r,className:o,title:s})=>(0,a.jsx)(u,{size:e,isActive:t,className:o,onClick:r,title:s},(0,a.jsx)(i.default,{type:n,size:e}));t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleHandle=t.ToggleBackground=t.ToggleContainer=t.default=void 0;var r=l(n(19)),i=(l(n(0)),l(n(1))),o=n(9),a=l(n(988)),s=n(102);function l(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;te.isActive&&d,";");t.ToggleHandle=f;const p=(0,r.default)("span",{target:"e1keeugh2",label:"ToggleBackground"})("width:34px;height:14px;border-radius:10px;background-color:",s.colors.active,";");t.ToggleBackground=p;const h=({id:e,active:t,onChange:n,onFocus:r,onBlur:i,className:s,Container:l=c,Background:d=p,Handle:h=f})=>(0,o.jsx)(a.default,{on:t,onToggle:n},({on:t,getTogglerProps:n})=>(0,o.jsx)(l,u({id:e,onFocus:r,onBlur:i,className:s},n({role:"switch","aria-checked":t.toString(),"aria-expanded":null})),(0,o.jsx)(d,{isActive:t}),(0,o.jsx)(h,{isActive:t})));h.propTypes={id:i.default.string,active:i.default.bool,onChange:i.default.func,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string,Container:i.default.func,Background:i.default.func,Handle:i.default.func};const m=(0,r.default)(h,{target:"e1keeugh3",label:"StyledToggle"})("");t.default=m},function(e,t,n){"use strict";n.r(t);var r=n(0),i=(n(1),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return o({"aria-expanded":Boolean(r.getOn()),tabIndex:0},e,{onClick:s(e.onClick,r.toggle)})},r.toggleKeys=["Enter"," "],r.getInputTogglerProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.getTogglerProps(o({},e,{onKeyUp:s(e.onKeyUp,(function(e){"Enter"===e.key&&r.toggle()}))}))},r.getElementTogglerProps=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.getTogglerProps(o({},e,{onKeyUp:s(e.onKeyUp,(function(e){r.toggleKeys.indexOf(e.key)>-1&&r.toggle()}))}))},r.setOnState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!r.getOn(),t=r.getOn()===e?l:function(){r.props.onToggle(e,r.getTogglerStateAndHelpers())};r.setState({on:e},t)},r.setOn=r.setOnState.bind(r,!0),r.setOff=r.setOnState.bind(r,!1),r.toggle=r.setOnState.bind(r,void 0),a(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getOn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;return this.isOnControlled()?t.on:e.on},t.prototype.isOnControlled=function(){return void 0!==this.props.on},t.prototype.getTogglerStateAndHelpers=function(){return{on:this.getOn(),getTogglerProps:this.getTogglerProps,getInputTogglerProps:this.getInputTogglerProps,getElementTogglerProps:this.getElementTogglerProps,setOn:this.setOn,setOff:this.setOff,toggle:this.toggle}},t.prototype.componentWillReceiveProps=function(e){var t=e.on;t!==this.props.on&&t!==this.state.on&&this.setOnState(t)},t.prototype.render=function(){var e;return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.getTogglerStateAndHelpers())},t}(r.Component);u.defaultProps={defaultOn:!1,onToggle:l},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=(u(n(0)),u(n(1))),o=u(n(148)),a=n(102),s=u(n(510)),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,r.default)("section",{target:"e4hp3ji0",label:"StyledAuthenticationPage"})({name:"1ul3gz4",styles:"display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;height:100vh;"}),d=(0,r.default)("span",{target:"e4hp3ji1",label:"CustomIconWrapper"})({name:"pxf9nc",styles:"width:300px;height:200px;margin-top:-150px;"}),f=(0,r.default)(o.default,{target:"e4hp3ji2",label:"NetlifyLogoIcon"})({name:"11nl61t",styles:"color:#c4c6d2;margin-top:-300px;"}),p=(0,r.default)(o.default,{target:"e4hp3ji3",label:"NetlifyCreditIcon"})({name:"dnh8wx",styles:"color:#c4c6d2;position:absolute;bottom:10px;"}),h=({url:e})=>(0,l.jsx)(d,null,(0,l.jsx)("img",{src:e,alt:"Logo"})),m=(0,r.default)("button",{target:"e4hp3ji4",label:"LoginButton"})(a.buttons.button,";",a.shadows.dropDeep,";",a.buttons.default,";",a.buttons.gray,";&[disabled]{",a.buttons.disabled,";}padding:0 12px;margin-top:-40px;display:flex;align-items:center;position:relative;"),g=({onLogin:e,loginDisabled:t,loginErrorMessage:n,renderButtonContent:r,renderPageContent:i,logoUrl:o,siteUrl:a,t:u})=>(0,l.jsx)(c,null,(e=>e?(0,l.jsx)(h,{url:e}):(0,l.jsx)(f,{size:"300px",type:"netlify-cms"}))(o),n?(0,l.jsx)("p",null,n):null,i?i({LoginButton:m}):null,r?(0,l.jsx)(m,{disabled:t,onClick:e},r()):null,a&&(0,l.jsx)(s.default,{href:a,t:u}),o?(0,l.jsx)(p,{size:"100px",type:"netlify-cms"}):null);g.propTypes={onLogin:i.default.func,logoUrl:i.default.string,siteUrl:i.default.string,loginDisabled:i.default.bool,loginErrorMessage:i.default.node,renderButtonContent:i.default.func,renderPageContent:i.default.func,t:i.default.func.isRequired};var v=g;t.default=v},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=(0,((r=n(19))&&r.__esModule?r:{default:r}).default)("div",{target:"e5ld4zj0",label:"WidgetPreviewContainer"})({name:"1wfkwts",styles:"margin:15px 2px;"});t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(19)),i=f(n(0)),o=f(n(1)),a=n(9),s=f(n(148)),l=n(102),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(504)),c=f(n(26));function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}const p=(0,r.default)("div",{target:"e1yavck40",label:"TopBarContainer"})("align-items:center;background-color:",l.colors.textFieldBorder,";display:flex;justify-content:space-between;margin:0 -14px;padding:13px;");var h={name:"ekkxr4-ExpandButtonContainer",styles:"display:flex;align-items:center;font-size:14px;font-weight:500;line-height:1;;label:ExpandButtonContainer;"};const m=(0,r.default)("div",{target:"e1yavck41",label:"ExpandButtonContainer"})(e=>e.hasHeading&&h,";"),g=(0,r.default)("button",{target:"e1yavck42",label:"ExpandButton"})(l.buttons.button,";padding:4px;background-color:transparent;color:inherit;&:last-of-type{margin-right:4px;}"),v=(0,r.default)("button",{target:"e1yavck43",label:"AddButton"})(l.buttons.button,";display:flex;justify-content:center;align-items:center;padding:2px 12px;font-size:12px;font-weight:bold;border-radius:3px;",s.default,"{margin-left:6px;}");class y extends i.default.Component{renderAddUI(){return this.props.allowAdd?this.props.types&&this.props.types.size>0?this.renderTypesDropdown(this.props.types):this.renderAddButton():null}renderTypesDropdown(e){return(0,a.jsx)(u.default,{renderButton:()=>(0,a.jsx)(u.StyledDropdownButton,null,"Add ",this.props.label," item")},e.map((e,t)=>(0,a.jsx)(u.DropdownItem,{key:t,label:e.get("label",e.get("name")),onClick:()=>this.props.onAddType(e.get("name"))})))}renderAddButton(){return(0,a.jsx)(v,{onClick:this.props.onAdd},"Add ",this.props.label," ",(0,a.jsx)(s.default,{type:"add",size:"xsmall"}))}render(){const{onCollapseToggle:e,collapsed:t,heading:n=null}=this.props;return(0,a.jsx)(p,null,(0,a.jsx)(m,{hasHeading:!!n},(0,a.jsx)(g,{onClick:e},(0,a.jsx)(s.default,{type:"chevron",direction:t?"right":"down",size:"small"})),n),this.renderAddUI())}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(y,"propTypes",{allowAdd:o.default.bool,types:c.default.list,onAdd:o.default.func,onAddType:o.default.func,onCollapseToggle:o.default.func,collapsed:o.default.bool,heading:o.default.node,label:o.default.string});var b=y;t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5DragDrop=t.DropTarget=t.DragSource=void 0;var r=s(n(993)),i=n(1003),o=s(n(0)),a=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const u=e=>{let{namespace:t}=e,n=l(e,["namespace"]);const r=(0,i.DragSource)(t,{beginDrag(e){let{children:t,isDragging:n,connectDragComponent:r}=e;return l(e,["children","isDragging","connectDragComponent"])}},e=>({connectDragComponent:e.dragSource()}))(({children:e,connectDragComponent:t})=>e(t));return o.default.createElement(r,n,n.children)};t.DragSource=u,u.propTypes={namespace:a.default.any.isRequired,children:a.default.func.isRequired};const c=e=>{let{onDrop:t,namespace:n}=e,r=l(e,["onDrop","namespace"]);const a=(0,i.DropTarget)(n,{drop(e,n){t(n.getItem())}},(e,t)=>({connectDropTarget:e.dropTarget(),isHovered:t.isOver()}))(({children:e,connectDropTarget:t,isHovered:n})=>e(t,{isHovered:n}));return o.default.createElement(a,r,r.children)};t.DropTarget=c,c.propTypes={onDrop:a.default.func.isRequired,namespace:a.default.any.isRequired,children:a.default.func.isRequired};t.HTML5DragDrop=e=>(0,i.DragDropContext)(r.default)(e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(994),i=n(1002);t.getEmptyImage=i.default;var o=n(353);t.NativeTypes=o,t.default=function(e){return new r.default(e)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0},e.prototype.leave=function(e){var t=this.entered.length;return this.entered=r.without(this.entered.filter(this.isNodeInDocument),e),t>0&&0===this.entered.length},e.prototype.reset=function(){this.entered=[]},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(512),i=n(997);function o(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}t.getNodeClientOffset=o,t.getEventClientOffset=function(e){return{x:e.clientX,y:e.clientY}},t.getDragPreviewOffset=function(e,t,n,a,s){var l,u,c="IMG"===(l=t).nodeName&&(r.isFirefox()||!document.documentElement.contains(l)),d=o(c?e:t),f={x:n.x-d.x,y:n.y-d.y},p=e.offsetWidth,h=e.offsetHeight,m=a.anchorX,g=a.anchorY,v=function(e,t,n,i){var o=e?t.width:n,a=e?t.height:i;return r.isSafari()&&e&&(a/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:a}}(c,t,p,h),y=v.dragPreviewWidth,b=v.dragPreviewHeight,_=s.offsetX,w=s.offsetY,E=0===w||w;return{x:0===_||_?_:new i.default([0,.5,1],[f.x,f.x/p*y,f.x+y-p]).interpolate(m),y:E?w:(u=new i.default([0,.5,1],[f.y,f.y/h*b,f.y+b-h]).interpolate(g),r.isSafari()&&c&&(u+=(window.devicePixelRatio-1)*b),u)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=e.length,r=[],i=0;ie))return r[l];c=l-1}}var f=e-n[s=Math.max(0,c)],p=f*f;return r[s]+i[s]*f+o[s]*p+a[s]*f*p},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(999),i=n(1001);t.createNativeDragSource=function(e){return new i.NativeDragSource(r.nativeTypesConfig[e])},t.matchNativeItemType=function(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(r.nativeTypesConfig).filter((function(e){return r.nativeTypesConfig[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=n(353),o=n(1e3);t.nativeTypesConfig=((r={})[i.FILE]={exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]},r[i.URL]={exposeProperties:{urls:function(e,t){return o.getDataFromDataTransfer(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]},r[i.TEXT]={exposeProperties:{text:function(e,t){return o.getDataFromDataTransfer(e,t,"")}},matchesTypes:["Text","text/plain"]},r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDataFromDataTransfer=function(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),"");return null!=r?r:n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){var t=this;this.config=e,this.item={},Object.keys(this.config.exposeProperties).forEach((function(e){Object.defineProperty(t.item,e,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \""+e+'" until the drop event.'),null}})}))}return e.prototype.mutateItemByReadingDataTransfer=function(e){var t=this,n={};e&&Object.keys(this.config.exposeProperties).forEach((function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes)}})),Object.defineProperties(this.item,n)},e.prototype.canDrag=function(){return!0},e.prototype.beginDrag=function(){return this.item},e.prototype.isDragging=function(e,t){return t===e.getSourceId()},e.prototype.endDrag=function(){},e}();t.NativeDragSource=r},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return r||((r=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(263);t.DragDropContext=r.DragDropContext,t.DragDropContextProvider=r.DragDropContextProvider,t.DragDropContextConsumer=r.Consumer;var i=n(1026);t.DragLayer=i.default;var o=n(1027);t.DragSource=o.default;var a=n(1035);t.DropTarget=a.default;var s=n(1037);t.DragPreviewImage=s.default;var l=n(1038);t.useDrag=l.useDrag,t.useDragLayer=l.useDragLayer,t.useDrop=l.useDrop},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(513)),r(n(1005))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1006);t.createDragDropManager=function(e,t,n){return new r.default(e,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(154),i=n(1007),o=n(264),a=n(1019),s=n(1021);var l=function(){function e(e,t,n){var o=this;void 0===t&&(t={}),void 0===n&&(n=!1),this.context=t,this.isSetUp=!1,this.handleRefCountChange=function(){var e=o.store.getState().refCount>0;e&&!o.isSetUp?(o.backend.setup(),o.isSetUp=!0):!e&&o.isSetUp&&(o.backend.teardown(),o.isSetUp=!1)};var l=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return r.createStore(i.default,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(n);this.store=l,this.monitor=new a.default(l,new s.default(l)),this.backend=e(this),l.subscribe(this.handleRefCountChange)}return e.prototype.getContext=function(){return this.context},e.prototype.getMonitor=function(){return this.monitor},e.prototype.getBackend=function(){return this.backend},e.prototype.getRegistry=function(){return this.monitor.registry},e.prototype.getActions=function(){var e=this,t=this.store.dispatch;var n=o.default(this);return Object.keys(n).reduce((function(r,i){var o,a=n[i];return r[i]=(o=a,function(){for(var n=[],r=0;r=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,f);if(null!==h){var m=null;c&&(!function(e){o("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(d),m=d(h)),e.dispatch(r.setClientOffset(c,m));var g=p.getSource(h).beginDrag(f,h);!function(e){o(i.isObject(e),"Item must be an object.")}(g),p.pinSource(h);var v=p.getSourceType(h);return{type:a.BEGIN_DRAG,payload:{itemType:v,item:g,sourceId:h,clientOffset:c||null,sourceClientOffset:m||null,isSourcePublic:!!u}}}e.dispatch(s)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(149);t.setClientOffset=function(e,t){return{type:r.INIT_COORDS,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(149);t.default=function(e){return function(){if(e.getMonitor().isDragging())return{type:r.PUBLISH_DRAG_SOURCE}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(514),i=n(149),o=n(23);t.default=function(e){return function(t,n){var a=(void 0===n?{}:n).clientOffset;!function(e){o(Array.isArray(e),"Expected targetIds to be an array.")}(t);var s=t.slice(0),l=e.getMonitor(),u=e.getRegistry();return function(e,t,n){o(t.isDragging(),"Cannot call hover while not dragging."),o(!t.didDrop(),"Cannot call hover after drop.");for(var r=0;r=0;i--){var o=e[i],a=t.getTargetType(o);r.default(a,n)||e.splice(i,1)}}(s,u,l.getItemType()),function(e,t,n){for(var r=0,i=e;r0||!o.areArraysEqual(u,d)))return a.NONE;var p=d[d.length-1],h=u[u.length-1];return p!==h&&(p&&f.push(p),h&&f.push(h)),f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=0),e+1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(514),i=n(1020),o=n(516),a=n(23),s=function(){function e(e,t){this.store=e,this.registry=t}return e.prototype.subscribeToStateChange=function(e,t){var n=this;void 0===t&&(t={handlerIds:void 0});var r=t.handlerIds;a("function"==typeof e,"listener must be a function."),a(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId;return this.store.subscribe((function(){var t=n.store.getState(),a=t.stateId;try{a===i||a===i+1&&!o.areDirty(t.dirtyHandlerIds,r)||e()}finally{i=a}}))},e.prototype.subscribeToOffsetChange=function(e){var t=this;a("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))},e.prototype.canDragSource=function(e){if(!e)return!1;var t=this.registry.getSource(e);return a(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)},e.prototype.canDropOnTarget=function(e){if(!e)return!1;var t=this.registry.getTarget(e);if(a(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),i=this.getItemType();return r.default(n,i)&&t.canDrop(this,e)},e.prototype.isDragging=function(){return Boolean(this.getItemType())},e.prototype.isDraggingSource=function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return a(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))},e.prototype.isOverTarget=function(e,t){if(void 0===t&&(t={shallow:!1}),!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!r.default(i,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var s=a.indexOf(e);return n?s===a.length-1:s>-1},e.prototype.getItemType=function(){return this.store.getState().dragOperation.itemType},e.prototype.getItem=function(){return this.store.getState().dragOperation.item},e.prototype.getSourceId=function(){return this.store.getState().dragOperation.sourceId},e.prototype.getTargetIds=function(){return this.store.getState().dragOperation.targetIds},e.prototype.getDropResult=function(){return this.store.getState().dragOperation.dropResult},e.prototype.didDrop=function(){return this.store.getState().dragOperation.didDrop},e.prototype.isSourcePublic=function(){return this.store.getState().dragOperation.isSourcePublic},e.prototype.getInitialClientOffset=function(){return this.store.getState().dragOffset.initialClientOffset},e.prototype.getInitialSourceClientOffset=function(){return this.store.getState().dragOffset.initialSourceClientOffset},e.prototype.getClientOffset=function(){return this.store.getState().dragOffset.clientOffset},e.prototype.getSourceClientOffset=function(){return i.getSourceClientOffset(this.store.getState().dragOffset)},e.prototype.getDifferenceFromInitialOffset=function(){return i.getDifferenceFromInitialOffset(this.store.getState().dragOffset)},e}();t.default=s},function(e,t,n){"use strict";function r(e,t){return{x:e.x+t.x,y:e.y+t.y}}function i(e,t){return{x:e.x-t.x,y:e.y-t.y}}Object.defineProperty(t,"__esModule",{value:!0}),t.add=r,t.subtract=i,t.getSourceClientOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset,o=e.initialSourceClientOffset;return t&&n&&o?i(r(t,o),n):null},t.getDifferenceFromInitialOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset;return t&&n?i(t,n):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(265),i=n(1022),o=n(513),a=n(1023),s=n(23),l=n(1024);function u(e){switch(e[0]){case"S":return o.HandlerRole.SOURCE;case"T":return o.HandlerRole.TARGET;default:s(!1,"Cannot parse handler ID: "+e)}}function c(e,t){var n=e.entries(),r=!1;do{var i=n.next(),o=i.done;if(i.value[1]===t)return!0;r=o}while(!r);return!1}var d=function(){function e(e){this.store=e,this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null}return e.prototype.addSource=function(e,t){a.validateType(e),a.validateSourceContract(t);var n=this.addHandler(o.HandlerRole.SOURCE,e,t);return this.store.dispatch(r.addSource(n)),n},e.prototype.addTarget=function(e,t){a.validateType(e,!0),a.validateTargetContract(t);var n=this.addHandler(o.HandlerRole.TARGET,e,t);return this.store.dispatch(r.addTarget(n)),n},e.prototype.containsHandler=function(e){return c(this.dragSources,e)||c(this.dropTargets,e)},e.prototype.getSource=function(e,t){return void 0===t&&(t=!1),s(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)},e.prototype.getTarget=function(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)},e.prototype.getSourceType=function(e){return s(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)},e.prototype.getTargetType=function(e){return s(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)},e.prototype.isSourceId=function(e){return u(e)===o.HandlerRole.SOURCE},e.prototype.isTargetId=function(e){return u(e)===o.HandlerRole.TARGET},e.prototype.removeSource=function(e){var t=this;s(this.getSource(e),"Expected an existing source."),this.store.dispatch(r.removeSource(e)),l((function(){t.dragSources.delete(e),t.types.delete(e)}))},e.prototype.removeTarget=function(e){s(this.getTarget(e),"Expected an existing target."),this.store.dispatch(r.removeTarget(e)),this.dropTargets.delete(e),this.types.delete(e)},e.prototype.pinSource=function(e){var t=this.getSource(e);s(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t},e.prototype.unpinSource=function(){s(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null},e.prototype.addHandler=function(e,t,n){var r=function(e){var t=i.default().toString();switch(e){case o.HandlerRole.SOURCE:return"S"+t;case o.HandlerRole.TARGET:return"T"+t;default:throw new Error("Unknown Handler Role: "+e)}}(e);return this.types.set(r,t),e===o.HandlerRole.SOURCE?this.dragSources.set(r,n):e===o.HandlerRole.TARGET&&this.dropTargets.set(r,n),r},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=0;t.default=function(){return r++}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(23);t.validateSourceContract=function(e){r("function"==typeof e.canDrag,"Expected canDrag to be a function."),r("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),r("function"==typeof e.endDrag,"Expected endDrag to be a function.")},t.validateTargetContract=function(e){r("function"==typeof e.canDrop,"Expected canDrop to be a function."),r("function"==typeof e.hover,"Expected hover to be a function."),r("function"==typeof e.drop,"Expected beginDrag to be a function.")},t.validateType=function e(t,n){n&&Array.isArray(t)?t.forEach((function(t){return e(t,!1)})):r("string"==typeof t||"symbol"==typeof t,n?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}},function(e,t,n){"use strict";var r=n(1025),i=[],o=[],a=r.makeRequestCallFromTimer((function(){if(o.length)throw o.shift()}));function s(e){var t;(t=i.length?i.pop():new l).task=e,r(t)}function l(){this.task=null}e.exports=s,l.prototype.call=function(){try{this.task.call()}catch(e){s.onerror?s.onerror(e):(o.push(e),a())}finally{this.task=null,i[i.length]=this}}},function(e,t,n){"use strict";(function(t){function n(e){i.length||(r(),!0),i[i.length]=e}e.exports=n;var r,i=[],o=0;function a(){for(;o1024){for(var t=0,n=i.length-o;t-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',o.join(", "),t),i("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),a.forEach((function(t){i("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new s(e,t,n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(23);function o(e,t){"function"==typeof e?e(t):e.current=t}t.default=function(e,t){var n=e.ref;return i("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?r.cloneElement(e,{ref:function(e){o(t,e),n&&o(n,e)}}):r.cloneElement(e,{ref:t})}},function(e,t,n){"use strict";String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(266),i=n(517),o=n(525),a=n(1036),s=n(524),l=n(526),u=n(527),c=n(150),d=n(23);t.default=function(e,t,n,f){void 0===f&&(f={}),r.default("DropTarget","type, spec, collect[, options]",e,t,n,f);var p=e;"function"!=typeof e&&(d(s.default(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),p=function(){return e}),d(c.isPlainObject(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var h=a.default(t);return d("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),d(c.isPlainObject(f),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return i.default({containerDisplayName:"DropTarget",createHandler:h,registerHandler:o.default,createMonitor:function(e){return new l.default(e)},createConnector:function(e){return new u.default(e)},DecoratedComponent:e,getType:p,collect:n,options:f})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(519),i=(n(150),n(23)),o=["canDrop","hover","drop"],a=function(){function e(e,t,n){this.spec=e,this.monitor=t,this.ref=n,this.props=null}return e.prototype.receiveProps=function(e){this.props=e},e.prototype.receiveMonitor=function(e){this.monitor=e},e.prototype.canDrop=function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)},e.prototype.hover=function(){this.spec.hover&&this.spec.hover(this.props,this.monitor,r.getDecoratedComponent(this.ref))},e.prototype.drop=function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)},e}();t.default=function(e){return Object.keys(e).forEach((function(t){i(o.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',o.join(", "),t),i("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new a(e,t,n)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0).memo((function(e){var t=e.connect,n=e.src;if("undefined"!=typeof Image){var r=new Image;r.src=n,r.onload=function(){return t(r)}}return null}));r.displayName="DragPreviewImage",t.default=r},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1039)),r(n(1041)),r(n(1043))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(528),i=n(1040),o=n(0),a=n(23);t.useDrag=function(e){var t=o.useRef(e);t.current=e,a(null!=e.item,"item must be defined"),a(null!=e.item.type,"item type must be defined");var n=i.useDragSourceMonitor(),s=n[0],l=n[1];i.useDragHandler(t,s,l);var u=r.useMonitorOutput(s,t.current.collect||function(){return{}},(function(){return l.reconnect()})),c=o.useMemo((function(){return l.hooks.dragSource()}),[l]),d=o.useMemo((function(){return l.hooks.dragPreview()}),[l]);return o.useEffect((function(){l.dragSourceOptions=t.current.options||null,l.reconnect()}),[l]),o.useEffect((function(){l.dragPreviewOptions=t.current.previewOptions||null,l.reconnect()}),[l]),[u,c,d]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(518),o=n(355),a=n(520),s=n(521),l=n(23);t.useDragSourceMonitor=function(){var e=o.useDragDropManager();return[r.useMemo((function(){return new a.default(e)}),[e]),r.useMemo((function(){return new s.default(e.getBackend())}),[e])]},t.useDragHandler=function(e,t,n){var a=o.useDragDropManager(),s=r.useMemo((function(){return{beginDrag:function(){var n=e.current,r=n.begin,i=n.item;if(r){var o=r(t);return l(null==o||"object"==typeof o,"dragSpec.begin() must either return an object, undefined, or null"),o||i||{}}return i||{}},canDrag:function(){return"boolean"==typeof e.current.canDrag?e.current.canDrag:"function"!=typeof e.current.canDrag||e.current.canDrag(t)},isDragging:function(n,r){var i=e.current.isDragging;return i?i(t):r===n.getSourceId()},endDrag:function(){var r=e.current.end;r&&r(t.getItem(),t),n.reconnect()}}}),[]);r.useEffect((function(){var r=i.default(e.current.item.type,s,a),o=r[0],l=r[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),l}),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(528),i=n(1042),o=n(0),a=n(23);t.useDrop=function(e){var t=o.useRef(e);t.current=e,a(null!=e.accept,"accept must be defined");var n=i.useDropTargetMonitor(),s=n[0],l=n[1];i.useDropHandler(t,s,l);var u=r.useMonitorOutput(s,t.current.collect||function(){return{}},(function(){return l.reconnect()})),c=o.useMemo((function(){return l.hooks.dropTarget()}),[l]);return o.useEffect((function(){l.dropTargetOptions=e.options||null,l.reconnect()}),[e.options]),[u,c]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(525),o=n(355),a=n(527),s=n(526);t.useDropTargetMonitor=function(){var e=o.useDragDropManager();return[r.useMemo((function(){return new s.default(e)}),[e]),r.useMemo((function(){return new a.default(e.getBackend())}),[e])]},t.useDropHandler=function(e,t,n){var a=o.useDragDropManager(),s=r.useMemo((function(){return{canDrop:function(){var n=e.current.canDrop;return!n||n(t.getItem(),t)},hover:function(){var n=e.current.hover;n&&n(t.getItem(),t)},drop:function(){var n=e.current.drop;if(n)return n(t.getItem(),t)}}}),[t]);r.useEffect((function(){var r=i.default(e.current.accept,s,a),o=r[0],l=r[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),l}),[t,n])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(355),o=n(529);t.useDragLayer=function(e){var t=i.useDragDropManager().getMonitor(),n=o.useCollector(t,e),a=n[0],s=n[1];return r.useEffect((function(){return t.subscribeToOffsetChange(s)})),r.useEffect((function(){return t.subscribeToStateChange(s)})),a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(19)),i=d(n(0)),o=d(n(1)),a=n(49),s=d(n(1045)),l=n(41),u=n(16),c=n(9);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,r.default)("div",{target:"e177kfaq0",label:"ErrorBoundaryContainer"})("padding:40px;h1{font-size:28px;color:",u.colors.text,";}h2{font-size:20px;}strong{color:",u.colors.textLead,";font-weight:500;}hr{width:200px;margin:30px 0;border:0;height:1px;background-color:",u.colors.text,";}a{color:",u.colors.text,";}"),h=(0,r.default)("button",{target:"e177kfaq1",label:"CopyButton"})(u.buttons.button,";",u.buttons.default,";",u.buttons.gray,";display:block;margin:12px 0;"),m=({entry:e,t:t})=>(console.log(e),(0,c.jsx)(i.default.Fragment,null,(0,c.jsx)("hr",null),(0,c.jsx)("h2",null,t("ui.errorBoundary.recoveredEntry.heading")),(0,c.jsx)("strong",null,t("ui.errorBoundary.recoveredEntry.warning")),(0,c.jsx)(h,{onClick:()=>(0,s.default)(e)},t("ui.errorBoundary.recoveredEntry.copyButtonLabel")),(0,c.jsx)("pre",null,(0,c.jsx)("code",null,e))));class g extends i.default.Component{constructor(...e){super(...e),f(this,"state",{hasError:!1,errorMessage:"",backup:""})}static getDerivedStateFromError(e){return console.error(e),{hasError:!0,errorMessage:e.toString()}}shouldComponentUpdate(e,t){return!this.props.showBackup||(this.state.errorMessage!==t.errorMessage||this.state.backup!==t.backup)}async componentDidUpdate(){if(this.props.showBackup){const e=await l.localForage.getItem("backup");console.log(e),this.setState({backup:e})}}render(){const{hasError:e,errorMessage:t,backup:n}=this.state,{showBackup:r,t:i}=this.props;return e?(0,c.jsx)(p,null,(0,c.jsx)("h1",null,i("ui.errorBoundary.title")),(0,c.jsx)("p",null,(0,c.jsx)("span",null,i("ui.errorBoundary.details")),(0,c.jsx)("a",{href:"https://github.com/netlify/netlify-cms/issues/new?template=bug_report.md",target:"_blank",rel:"noopener noreferrer"},i("ui.errorBoundary.reportIt"))),(0,c.jsx)("hr",null),(0,c.jsx)("h2",null,i("ui.errorBoundary.detailsHeading")),(0,c.jsx)("p",null,t),n&&r&&(0,c.jsx)(m,{entry:n,t:i})):this.props.children}}f(g,"propTypes",{children:o.default.node,t:o.default.func.isRequired});var v=(0,a.translate)()(g);t.default=v},function(e,t,n){"use strict";const r=e=>{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const r=document.getSelection();let i=!1;r.rangeCount>0&&(i=r.getRangeAt(0)),document.body.append(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length;let o=!1;try{o=document.execCommand("copy")}catch(e){}return t.remove(),i&&(r.removeAllRanges(),r.addRange(i)),n&&n.focus(),o};e.exports=r,e.exports.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadButton=void 0;o(n(0));var r=o(n(1)),i=n(9);function o(e){return e&&e.__esModule?e:{default:e}}const a=({label:e,imagesOnly:t,onChange:n,disabled:r,className:o})=>(0,i.jsx)("label",{className:"nc-fileUploadButton ".concat(o||"")},(0,i.jsx)("span",null,e),(0,i.jsx)("input",{type:"file",accept:t?"image/*":"*/*",onChange:n,disabled:r}));t.FileUploadButton=a,a.propTypes={className:r.default.string,label:r.default.string.isRequired,imagesOnly:r.default.bool,onChange:r.default.func.isRequired,disabled:r.default.bool}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Modal=void 0;var r=l(n(0)),i=l(n(1)),o=n(9),a=l(n(1048)),s=n(16);function l(e){return e&&e.__esModule?e:{default:e}}function u(){const e=p(["\n ",";\n "]);return u=function(){return e},e}function c(){const e=p(["\n ",";\n "]);return c=function(){return e},e}function d(){const e=p(["\n ",";\n "]);return d=function(){return e},e}function f(){const e=p(["\n ",";\n "]);return f=function(){return e},e}function p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var h={name:"1o9c9d2-ReactModalGlobalStyles",styles:".ReactModal__Body--open{overflow:hidden;};label:ReactModalGlobalStyles;"};const m=()=>(0,o.jsx)(o.Global,{styles:h}),g={modalBody:"\n ".concat(s.shadows.dropDeep,";\n background-color: #fff;\n border-radius: ").concat(s.lengths.borderRadius,";\n height: 80%;\n text-align: center;\n max-width: 2200px;\n padding: 20px;\n\n &:focus {\n outline: none;\n }\n "),overlay:"\n z-index: 99999;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n background-color: rgba(0, 0, 0, 0);\n transition: background-color ".concat(s.transitions.main,", opacity ").concat(s.transitions.main,";\n "),overlayAfterOpen:"\n background-color: rgba(0, 0, 0, 0.6);\n opacity: 1;\n ",overlayBeforeClose:"\n background-color: rgba(0, 0, 0, 0);\n opacity: 0;\n "};class v extends r.default.Component{componentDidMount(){a.default.setAppElement("#nc-root")}render(){const{isOpen:e,children:t,className:n,onClose:i}=this.props;return(0,o.jsx)(r.default.Fragment,null,(0,o.jsx)(m,null),(0,o.jsx)(o.ClassNames,null,({css:r,cx:s})=>(0,o.jsx)(a.default,{isOpen:e,onRequestClose:i,closeTimeoutMS:300,className:{base:s(r(f(),g.modalBody),n),afterOpen:"",beforeClose:""},overlayClassName:{base:r(d(),g.overlay),afterOpen:r(c(),g.overlayAfterOpen),beforeClose:r(u(),g.overlayBeforeClose)}},t)))}}t.Modal=v,function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(v,"propTypes",{children:i.default.node.isRequired,isOpen:i.default.bool.isRequired,className:i.default.string,onClose:i.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(1049),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t0&&0===(y-=1)&&d.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&f.add(document.body,i),r&&f.add(document.getElementsByTagName("html")[0],r),n&&(y+=1,d.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,o=e.defaultStyles,a=n?{}:o.content,l=i?{}:o.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",r({id:t,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:l.default.bool.isRequired,defaultStyles:l.default.shape({content:l.default.object,overlay:l.default.object}),style:l.default.shape({content:l.default.object,overlay:l.default.object}),className:l.default.oneOfType([l.default.string,l.default.object]),overlayClassName:l.default.oneOfType([l.default.string,l.default.object]),bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,ariaHideApp:l.default.bool,appElement:l.default.instanceOf(p.default),onAfterOpen:l.default.func,onAfterClose:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,role:l.default.string,contentLabel:l.default.string,aria:l.default.object,data:l.default.object,children:l.default.node,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,testId:l.default.string},t.default=b,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==a.length&&(e=a.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var r,i=n(530),o=(r=i)&&r.__esModule?r:{default:r};var a=[],s=null,l=!1;function u(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,o.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,a=n[0],s=n[n.length-1];if(e===document.activeElement){if(!i)return;r=s}s!==document.activeElement||i||(r=a);a===document.activeElement&&i&&(r=s);if(r)return t.preventDefault(),void r.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(document.activeElement);u>-1&&(u+=i?-1:1);if(void 0===(r=n[u]))return t.preventDefault(),void(r=i?s:a).focus();t.preventDefault(),r.focus()};var r,i=n(530),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){var r; /*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. */!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},i={};t.add=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),n.add(e)}));var n,o},t.remove=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&n.remove(e)}));var n,o}},function(e,t,n){"use strict";var r,i=n(532),o=(r=i)&&r.__esModule?r:{default:r};var a=void 0,s=void 0,l=[];function u(){0!==l.length&&l[l.length-1].focusContent()}o.default.subscribe((function(e,t){a&&s||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",u),(s=a.cloneNode()).addEventListener("focus",u)),(l=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(155)),i=(u(n(0)),u(n(1))),o=n(9),a=n(49),s=u(n(1057)),l=n(16);function u(e){return e&&e.__esModule?e:{default:e}}const c=()=>(0,o.jsx)(o.Global,{styles:(0,o.css)(s.default,";.notif__container{z-index:10000;white-space:pre-wrap;};label:ReduxNotificationsGlobalStyles;")}),d={toast:(0,o.css)(l.shadows.drop,";background-color:",l.colors.background,";color:",l.colors.textLight,";border-radius:",l.lengths.borderRadius,";margin:10px;padding:20px;overflow:hidden;;label:toast;"),info:(0,o.css)("background-color:",l.colors.infoBackground,";color:",l.colors.infoText,";;label:info;"),success:(0,o.css)("background-color:",l.colors.successBackground,";color:",l.colors.successText,";;label:success;"),warning:(0,o.css)("background-color:",l.colors.warnBackground,";color:",l.colors.warnText,";;label:warning;"),danger:(0,o.css)("background-color:",l.colors.errorBackground,";color:",l.colors.errorText,";;label:danger;")},f=({kind:e,message:t,t:n})=>(0,o.jsx)("div",{css:(0,r.default)([d.toast,d[e]],";label:Toast;")},(0,o.jsx)(c,null),n(t.key,{details:t.details}));f.propTypes={kind:i.default.oneOf(["info","success","warning","danger"]).isRequired,message:i.default.object,t:i.default.func.isRequired};var p=(0,a.translate)()(f);t.default=p},function(e,t,n){var r=n(1058);e.exports="string"==typeof r?r:r.toString()},function(e,t,n){(t=n(218)(!1)).push([e.i,".notif-transition-enter {\n opacity : 0.01;\n transition : opacity .5s ease-in;\n}\n\n.notif-transition-enter-active {\n opacity : 1;\n}\n\n.notif-transition-leave {\n opacity : 1;\n transition : opacity .5s ease-in;\n}\n\n.notif-transition-leave-active {\n opacity : 0.01;\n}\n\n.notif {\n position : relative;\n font : 1rem normal Helvetica, sans-serif;\n overflow : hidden;\n border-radius : 4px;\n margin-bottom : 2px;\n max-height : 400px;\n box-sizing : border-box;\n box-shadow : 0 0 1px 1px rgba(10, 10, 11, .125);\n padding : 0.5rem;\n color : #fff;\n}\n\n.notif--success {\n background-color: #64ce83;\n}\n\n.notif--info {\n background-color: #3ea2ff;\n}\n\n.notif--warning {\n background-color: #ff7f48;\n}\n\n.notif--danger {\n background-color: #e74c3c;\n}\n\n.notif__container {\n position : fixed;\n top : 10px;\n right : 0;\n left : 0;\n z-index : 1000;\n width : 80%;\n max-width : 400px;\n margin : auto;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=A(n(19)),i=A(n(1)),o=A(n(0)),a=n(1060),s=n(49),l=A(n(26)),u=n(87),c=n(130),d=n(138),f=A(n(1062)),p=n(144),h=n(200),m=n(139),g=n(357),v=n(129),y=A(n(1064)),b=n(180),_=n(16),w=A(n(231)),E=n(95),x=A(n(1079)),k=A(n(1086)),S=A(n(1089)),O=A(n(1108)),T=A(n(1109)),C=n(9);function A(e){return e&&e.__esModule?e:{default:e}}function P(){return(P=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}f.default.config({barColors:{0:_.colors.active,"1.0":_.colors.active},shadowBlur:0,barThickness:2});const M=(0,r.default)("div",{target:"e1ghgnen0",label:"AppMainContainer"})({name:"123tny7",styles:"min-width:800px;max-width:1440px;margin:0 auto;"}),I=(0,r.default)("div",{target:"e1ghgnen1",label:"ErrorContainer"})({name:"zwiamn",styles:"margin:20px;"}),D=(0,r.default)("pre",{target:"e1ghgnen2",label:"ErrorCodeBlock"})({name:"1v6y79z",styles:"margin-left:20px;font-size:15px;line-height:1.5;"}),j=e=>"/collections/".concat(e.first().get("name")),L=e=>{let{collections:t,render:n}=e,r=R(e,["collections","render"]);const i=j(t);return(0,C.jsx)(c.Route,P({},r,{render:e=>t.get(e.match.params.name)?n(e):(0,C.jsx)(c.Redirect,{to:i})}))};class N extends o.default.Component{configError(e){const t=this.props.t;return(0,C.jsx)(I,null,(0,C.jsx)("h1",null,t("app.app.errorHeader")),(0,C.jsx)("div",null,(0,C.jsx)("strong",null,t("app.app.configErrors"),":"),(0,C.jsx)(D,null,e.get("error")),(0,C.jsx)("span",null,t("app.app.checkConfigYml"))))}componentDidMount(){const{loadConfig:e}=this.props;e()}handleLogin(e){this.props.loginUser(e)}authenticating(){const{auth:e,t:t}=this.props,n=(0,m.currentBackend)(this.props.config);return null==n?(0,C.jsx)("div",null,(0,C.jsx)("h1",null,t("app.app.waitingBackend"))):(0,C.jsx)("div",null,(0,C.jsx)(d.Notifs,{CustomComponent:b.Toast}),o.default.createElement(n.authComponent(),{onLogin:this.handleLogin.bind(this),error:e&&e.get("error"),isFetching:e&&e.get("isFetching"),inProgress:e&&e.get("isFetching")||!1,siteId:this.props.config.getIn(["backend","site_domain"]),base_url:this.props.config.getIn(["backend","base_url"],null),authEndpoint:this.props.config.getIn(["backend","auth_endpoint"]),config:this.props.config.toJS(),clearHash:()=>w.default.replace("/"),t:t}))}handleLinkClick(e,t,...n){e.preventDefault(),t(...n)}render(){const{user:e,config:t,collections:n,logoutUser:r,isFetching:i,publishMode:a,useMediaLibrary:s,openMediaLibrary:l,t:u,showMediaButton:p}=this.props;if(null===t)return null;if(t.get("error"))return this.configError(t);if(t.get("isFetching"))return(0,C.jsx)(_.Loader,{active:!0},u("app.app.loadingConfig"));if(null==e)return this.authenticating(u);const h=j(n),m=a===E.EDITORIAL_WORKFLOW;return(0,C.jsx)(o.default.Fragment,null,(0,C.jsx)(d.Notifs,{CustomComponent:b.Toast}),(0,C.jsx)(T.default,{user:e,collections:n,onCreateEntryClick:g.createNewEntry,onLogoutClick:r,openMediaLibrary:l,hasWorkflow:m,displayUrl:t.get("display_url"),isTestRepo:"test-repo"===t.getIn(["backend","name"]),showMediaButton:p}),(0,C.jsx)(M,null,i&&(0,C.jsx)(f.default,null),(0,C.jsx)(c.Switch,null,(0,C.jsx)(c.Redirect,{exact:!0,from:"/",to:h}),(0,C.jsx)(c.Redirect,{exact:!0,from:"/search/",to:h}),m?(0,C.jsx)(c.Route,{path:"/workflow",component:k.default}):null,(0,C.jsx)(L,{exact:!0,collections:n,path:"/collections/:name",render:e=>(0,C.jsx)(x.default,e)}),(0,C.jsx)(L,{path:"/collections/:name/new",collections:n,render:e=>(0,C.jsx)(S.default,P({},e,{newRecord:!0}))}),(0,C.jsx)(L,{path:"/collections/:name/entries/*",collections:n,render:e=>(0,C.jsx)(S.default,e)}),(0,C.jsx)(c.Route,{path:"/search/:searchTerm",render:e=>(0,C.jsx)(x.default,P({},e,{isSearchResults:!0}))}),(0,C.jsx)(L,{path:"/edit/:name/:entryName",collections:n,render:({match:e})=>{const{name:t,entryName:n}=e.params;return(0,C.jsx)(c.Redirect,{to:"/collections/".concat(t,"/entries/").concat(n)})}}),(0,C.jsx)(c.Route,{component:O.default})),s?(0,C.jsx)(y.default,null):null))}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(N,"propTypes",{auth:l.default.map,config:l.default.map,collections:l.default.orderedMap,loadConfig:i.default.func.isRequired,loginUser:i.default.func.isRequired,logoutUser:i.default.func.isRequired,user:l.default.map,isFetching:i.default.bool.isRequired,publishMode:i.default.oneOf([E.SIMPLE,E.EDITORIAL_WORKFLOW]),siteId:i.default.string,useMediaLibrary:i.default.bool,openMediaLibrary:i.default.func.isRequired,showMediaButton:i.default.bool,t:i.default.func.isRequired});const F={openMediaLibrary:v.openMediaLibrary,loadConfig:p.loadConfig,loginUser:h.loginUser,logoutUser:h.logoutUser};var B=(0,a.hot)(e)((0,u.connect)((function(e){const{auth:t,config:n,collections:r,globalUI:i,mediaLibrary:o}=e,a=t&&t.get("user"),s=i.get("isFetching"),l=n&&n.get("publish_mode"),u=!o.get("externalLibrary");return{auth:t,config:n,collections:r,user:a,isFetching:s,publishMode:l,showMediaButton:o.get("showMediaButton"),useMediaLibrary:u}}),F)((0,s.translate)()(N)));t.default=B}).call(this,n(123)(e))},function(e,t,n){"use strict";e.exports=n(1061)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(0))&&"object"==typeof r&&"default"in r?r.default:r;function o(e){return o.warnAboutHMRDisabled&&(o.warnAboutHMRDisabled=!0,console.error("React-Hot-Loader: misconfiguration detected, using production version in non-production environment."),console.error("React-Hot-Loader: Hot Module Replacement is not enabled.")),i.Children.only(e.children)}o.warnAboutHMRDisabled=!1;var a=function e(){return e.shouldWrapWithAppContainer?function(e){return function(t){return i.createElement(o,null,i.createElement(e,t))}}:function(e){return e}};a.shouldWrapWithAppContainer=!1;t.AppContainer=o,t.hot=a,t.areComponentsEqual=function(e,t){return e===t},t.setConfig=function(){},t.cold=function(e){return e},t.configureComponent=function(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n=0||e.indexOf("-")>=0?u:0)+parseFloat(e)),u=e>1?1:e,f()),u},hide:function(){c&&(c=!1,null!=s&&(i.cancelAnimationFrame(s),s=null),function e(){if(p.progress("+.1")>=1&&(a.style.opacity-=.05,a.style.opacity<=.05))return a.style.display="none",void(l=null);l=i.requestAnimationFrame(e)}())}};"object"==typeof e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}).call(this,window,document)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(146)),i=v(n(1065)),o=v(n(0)),a=v(n(1)),s=v(n(26)),l=n(87),u=n(49),c=v(n(420)),d=n(41),f=n(129),p=n(259),h=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1070)),m=n(9);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t{const{loadMediaDisplayURL:t}=this.props;t(e)}),_(this,"filterImages",e=>e.filter(e=>{const t=(0,d.fileExtension)(e.name).toLowerCase();return E.includes(t)})),_(this,"toTableData",e=>{const t=e&&e.map(({key:e,name:t,id:n,size:r,path:i,queryOrder:o,displayURL:a,draft:s})=>{const l=(0,d.fileExtension)(t).toLowerCase();return{key:e,id:n,name:t,path:i,type:l.toUpperCase(),size:r,queryOrder:o,displayURL:a,draft:s,isImage:E.includes(l),isViewableImage:w.includes(l)}}),{sortFields:n}=this.state,o=(0,r.default)(n,"fieldName").concat("queryOrder"),a=(0,r.default)(n,"direction").concat("asc");return(0,i.default)(t,o,a)}),_(this,"handleClose",()=>{this.props.closeMediaLibrary()}),_(this,"handleAssetClick",e=>{const t=this.state.selectedFile.key===e.key?{}:e;this.setState({selectedFile:t})}),_(this,"handlePersist",async e=>{e.persist(),e.stopPropagation(),e.preventDefault();const{persistMedia:t,privateUpload:n,config:r,t:i,field:o}=this.props,{files:a}=e.dataTransfer||e.target,s=[...a][0],l=r.get("max_file_size");l&&s.size>l?window.alert(i("mediaLibrary.mediaLibrary.fileTooLarge",{size:Math.floor(l/1e3)})):(await t(s,{privateUpload:n,field:o}),this.setState({selectedFile:this.props.files[0]}),this.scrollToTop()),e.target.value=null}),_(this,"handleInsert",()=>{const{selectedFile:e}=this.state,{path:t}=e,{insertMedia:n,field:r}=this.props;n(t,r),this.handleClose()}),_(this,"handleDelete",()=>{const{selectedFile:e}=this.state,{files:t,deleteMedia:n,privateUpload:r,t:i}=this.props;window.confirm(i("mediaLibrary.mediaLibrary.onDelete"))&&n(t.find(t=>e.key===t.key),{privateUpload:r}).then(()=>{this.setState({selectedFile:{}})})}),_(this,"handleLoadMore",()=>{const{loadMedia:e,dynamicSearchQuery:t,page:n,privateUpload:r}=this.props;e({query:t,page:n+1,privateUpload:r})}),_(this,"handleSearchKeyDown",async e=>{const{dynamicSearch:t,loadMedia:n,privateUpload:r}=this.props;"Enter"===e.key&&t&&(await n({query:this.state.query,privateUpload:r}),this.scrollToTop())}),_(this,"scrollToTop",()=>{this.scrollContainerRef.scrollTop=0}),_(this,"handleSearchChange",e=>{this.setState({query:e.target.value})}),_(this,"queryFilter",(e,t)=>{const n=e.replace(/ /g,"");return c.default.filter(n,t,{extract:e=>e.name}).map((e,n)=>b({},t[e.index],{queryIndex:n}))})}componentDidMount(){this.props.loadMedia()}UNSAFE_componentWillReceiveProps(e){!this.props.isVisible&&e.isVisible&&this.setState({selectedFile:{},query:""})}componentDidUpdate(e){!e.isVisible&&this.props.isVisible&&e.privateUpload!==this.props.privateUpload&&this.props.loadMedia({privateUpload:this.props.privateUpload})}render(){const{isVisible:e,canInsert:t,files:n,dynamicSearch:r,dynamicSearchActive:i,forImage:o,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:u,isPaginating:c,privateUpload:d,displayURLs:f,t:p}=this.props;return(0,m.jsx)(h.default,{isVisible:e,canInsert:t,files:n,dynamicSearch:r,dynamicSearchActive:i,forImage:o,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:u,isPaginating:c,privateUpload:d,query:this.state.query,selectedFile:this.state.selectedFile,handleFilter:this.filterImages,handleQuery:this.queryFilter,toTableData:this.toTableData,handleClose:this.handleClose,handleSearchChange:this.handleSearchChange,handleSearchKeyDown:this.handleSearchKeyDown,handlePersist:this.handlePersist,handleDelete:this.handleDelete,handleInsert:this.handleInsert,setScrollContainerRef:e=>this.scrollContainerRef=e,handleAssetClick:this.handleAssetClick,handleLoadMore:this.handleLoadMore,displayURLs:f,loadDisplayURL:this.loadDisplayURL,t:p})}}_(x,"propTypes",{isVisible:a.default.bool,loadMediaDisplayURL:a.default.func,displayURLs:s.default.map,canInsert:a.default.bool,files:a.default.arrayOf(a.default.shape(h.fileShape)).isRequired,dynamicSearch:a.default.bool,dynamicSearchActive:a.default.bool,forImage:a.default.bool,isLoading:a.default.bool,isPersisting:a.default.bool,isDeleting:a.default.bool,hasNextPage:a.default.bool,isPaginating:a.default.bool,privateUpload:a.default.bool,config:s.default.map,loadMedia:a.default.func.isRequired,dynamicSearchQuery:a.default.string,page:a.default.number,persistMedia:a.default.func.isRequired,deleteMedia:a.default.func.isRequired,insertMedia:a.default.func.isRequired,closeMediaLibrary:a.default.func.isRequired,t:a.default.func.isRequired}),_(x,"defaultProps",{files:[]});const k={loadMedia:f.loadMedia,persistMedia:f.persistMedia,deleteMedia:f.deleteMedia,insertMedia:f.insertMedia,loadMediaDisplayURL:f.loadMediaDisplayURL,closeMediaLibrary:f.closeMediaLibrary};var S=(0,l.connect)(e=>{const{mediaLibrary:t}=e,n=t.get("field");return b({},{isVisible:t.get("isVisible"),canInsert:t.get("canInsert"),files:(0,p.selectMediaFiles)(e,n),displayURLs:t.get("displayURLs"),dynamicSearch:t.get("dynamicSearch"),dynamicSearchActive:t.get("dynamicSearchActive"),dynamicSearchQuery:t.get("dynamicSearchQuery"),forImage:t.get("forImage"),isLoading:t.get("isLoading"),isPersisting:t.get("isPersisting"),isDeleting:t.get("isDeleting"),privateUpload:t.get("privateUpload"),config:t.get("config"),page:t.get("page"),hasNextPage:t.get("hasNextPage"),isPaginating:t.get("isPaginating"),field:n})},k)((0,u.translate)()(x));t.default=S},function(e,t,n){var r=n(1066),i=n(40);e.exports=function(e,t,n,o){return null==e?[]:(i(t)||(t=null==t?[]:[t]),i(n=o?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},function(e,t,n){var r=n(110),i=n(111),o=n(484),a=n(1067),s=n(174),l=n(1068),u=n(204);e.exports=function(e,t,n){var c=-1;t=r(t.length?t:[u],s(i));var d=o(e,(function(e,n,i){return{criteria:r(t,(function(t){return t(e)})),index:++c,value:e}}));return a(d,(function(e,t){return l(e,t,n)}))}},function(e,t){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},function(e,t,n){var r=n(1069);e.exports=function(e,t,n){for(var i=-1,o=e.criteria,a=t.criteria,s=o.length,l=n.length;++i=l?u:u*("desc"==n[i]?-1:1)}return e.index-t.index}},function(e,t,n){var r=n(164);e.exports=function(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,a=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||i&&s&&u||!n&&u||!o)return 1;if(!i&&!a&&!c&&ee.isPrivate&&h.colors.grayDark,";@media (min-width:800px){width:calc(","300px"," * 2 + 20px);}@media (min-width:1120px){width:calc(","300px"," * 3 + 20px);}@media (min-width:1440px){width:calc(","300px"," * 4 + 20px);}@media (min-width:1760px){width:calc(","300px"," * 5 + 20px);}@media (min-width:2080px){width:calc(","300px"," * 6 + 20px);}h1{color:",e=>e.isPrivate&&h.colors.textFieldBorder,";}button:disabled,label[disabled]{background-color:",e=>e.isPrivate&&"rgba(217, 217, 217, 0.15)",";}"),b=({isVisible:e,canInsert:t,files:n,dynamicSearch:r,dynamicSearchActive:o,forImage:a,isLoading:s,isPersisting:l,isDeleting:h,hasNextPage:g,isPaginating:b,privateUpload:_,query:w,selectedFile:E,handleFilter:x,handleQuery:k,toTableData:S,handleClose:O,handleSearchChange:T,handleSearchKeyDown:C,handlePersist:A,handleDelete:P,handleInsert:R,setScrollContainerRef:M,handleAssetClick:I,handleLoadMore:D,loadDisplayURL:j,displayURLs:L,t:N})=>{const F=a?x(n):n,B=!r&&w?k(w,F):F,U=S(B),z=n&&!!n.length,q=F&&!!F.length,H=B&&!!B.length,W=H,G=!W,V=s&&!W&&N("mediaLibrary.mediaLibraryModal.loading")||o&&N("mediaLibrary.mediaLibraryModal.noResults")||!z&&N("mediaLibrary.mediaLibraryModal.noAssetsFound")||!q&&N("mediaLibrary.mediaLibraryModal.noImagesFound")||!H&&N("mediaLibrary.mediaLibraryModal.noResults"),K=W&&!(0,i.default)(E),$=l||h;return(0,m.jsx)(y,{isOpen:e,onClose:O,isPrivate:_},(0,m.jsx)(v,null,(0,m.jsx)("div",null,(0,m.jsx)(c.default,{onClose:O,title:"".concat(_?N("mediaLibrary.mediaLibraryModal.private"):"").concat(N(a?"mediaLibrary.mediaLibraryModal.images":"mediaLibrary.mediaLibraryModal.mediaAssets")),isPrivate:_}),(0,m.jsx)(u.default,{value:w,onChange:T,onKeyDown:C,placeholder:N("mediaLibrary.mediaLibraryModal.search"),disabled:!o&&!q})),(0,m.jsx)(d.default,{uploadButtonLabel:N(l?"mediaLibrary.mediaLibraryModal.uploading":"mediaLibrary.mediaLibraryModal.uploadNew"),deleteButtonLabel:N(h?"mediaLibrary.mediaLibraryModal.deleting":"mediaLibrary.mediaLibraryModal.deleteSelected"),insertButtonLabel:N("mediaLibrary.mediaLibraryModal.chooseSelected"),uploadEnabled:!$,deleteEnabled:!$&&K,insertEnabled:K,insertVisible:t,imagesOnly:a,onPersist:A,onDelete:P,onInsert:R})),G?(0,m.jsx)(p.default,{content:V,isPrivate:_}):null,(0,m.jsx)(f.default,{setScrollContainerRef:M,mediaItems:U,isSelectedFile:e=>E.key===e.key,onAssetClick:I,canLoadMore:g,onLoadMore:D,isPaginating:b,paginatingMessage:N("mediaLibrary.mediaLibraryModal.loading"),cardDraftText:N("mediaLibrary.mediaLibraryCard.draft"),cardWidth:"280px",cardHeight:"240px",cardMargin:"10px",isPrivate:_,loadDisplayURL:j,displayURLs:L}))},_={displayURL:o.default.oneOfType([o.default.string,o.default.object]).isRequired,id:o.default.string.isRequired,key:o.default.string.isRequired,name:o.default.string.isRequired,queryOrder:o.default.number,size:o.default.number,path:o.default.string.isRequired};t.fileShape=_,b.propTypes={isVisible:o.default.bool,canInsert:o.default.bool,files:o.default.arrayOf(o.default.shape(_)).isRequired,dynamicSearch:o.default.bool,dynamicSearchActive:o.default.bool,forImage:o.default.bool,isLoading:o.default.bool,isPersisting:o.default.bool,isDeleting:o.default.bool,hasNextPage:o.default.bool,isPaginating:o.default.bool,privateUpload:o.default.bool,query:o.default.string,selectedFile:o.default.oneOfType([o.default.shape(_),o.default.shape({})]),handleFilter:o.default.func.isRequired,handleQuery:o.default.func.isRequired,toTableData:o.default.func.isRequired,handleClose:o.default.func.isRequired,handleSearchChange:o.default.func.isRequired,handleSearchKeyDown:o.default.func.isRequired,handlePersist:o.default.func.isRequired,handleDelete:o.default.func.isRequired,handleInsert:o.default.func.isRequired,setScrollContainerRef:o.default.func.isRequired,handleAssetClick:o.default.func.isRequired,handleLoadMore:o.default.func.isRequired,loadDisplayURL:o.default.func.isRequired,t:o.default.func.isRequired,displayURLs:o.default.instanceOf(a.Map).isRequired};var w=(0,s.translate)()(b);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(19)),i=(s(n(0)),s(n(1))),o=n(16),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l=(0,r.default)("div",{target:"e3b6gd60",label:"SearchContainer"})({name:"xts1j",styles:"height:37px;display:flex;align-items:center;position:relative;width:400px;"}),u=(0,r.default)("input",{target:"e3b6gd61",label:"SearchInput"})("background-color:#eff0f4;border-radius:",o.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:1;&:focus{outline:none;box-shadow:inset 0 0 0 2px ",o.colors.active,";}"),c=(0,r.default)(o.Icon,{target:"e3b6gd62",label:"SearchIcon"})({name:"ms1jfj",styles:"position:absolute;top:50%;left:6px;z-index:2;transform:translate(0,-50%);"}),d=({value:e,onChange:t,onKeyDown:n,placeholder:r,disabled:i})=>(0,a.jsx)(l,null,(0,a.jsx)(c,{type:"search",size:"small"}),(0,a.jsx)(u,{value:e,onChange:t,onKeyDown:n,placeholder:r,disabled:i}));d.propTypes={value:i.default.string,onChange:i.default.func.isRequired,onKeyDown:i.default.func.isRequired,placeholder:i.default.string.isRequired,disabled:i.default.bool};var f=d;t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(19)),i=(s(n(0)),s(n(1))),o=n(16),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l=(0,r.default)("button",{target:"e1ye9psy0",label:"CloseButton"})(o.buttons.button,";",o.shadows.dropMiddle,";position:absolute;margin-right:-40px;left:-40px;top:-40px;width:40px;height:40px;border-radius:50%;background-color:white;padding:0;display:flex;justify-content:center;align-items:center;"),u=(0,r.default)("h1",{target:"e1ye9psy1",label:"LibraryTitle"})("line-height:36px;font-size:22px;text-align:left;margin-bottom:25px;color:",e=>e.isPrivate&&o.colors.textFieldBorder,";"),c=({onClose:e,title:t,isPrivate:n})=>(0,a.jsx)("div",null,(0,a.jsx)(l,{onClick:e},(0,a.jsx)(o.Icon,{type:"close"})),(0,a.jsx)(u,{isPrivate:n},t));c.propTypes={onClose:i.default.func.isRequired,title:i.default.string.isRequired,isPrivate:i.default.bool};var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=(l(n(0)),l(n(1))),o=n(9),a=n(180),s=n(16);function l(e){return e&&e.__esModule?e:{default:e}}const u={button:(0,o.css)(s.buttons.button,";",s.buttons.default,";display:inline-block;margin-left:15px;margin-right:2px;&[disabled]{",s.buttons.disabled,";cursor:default;};label:button;")},c=(0,r.default)("div",{target:"e1ff5q1o0",label:"ActionsContainer"})({name:"s2uf1z",styles:"text-align:right;"}),d=(0,r.default)(a.FileUploadButton,{target:"e1ff5q1o1",label:"StyledUploadButton"})(u.button,";",s.buttons.gray,";",s.shadows.dropMain,";margin-bottom:0;span{font-size:14px;font-weight:500;display:flex;justify-content:center;align-items:center;}input{height:0.1px;width:0.1px;margin:0;padding:0;opacity:0;overflow:hidden;position:absolute;z-index:0;outline:none;}"),f=(0,r.default)("button",{target:"e1ff5q1o2",label:"DeleteButton"})(u.button,";",s.buttons.lightRed,";"),p=(0,r.default)("button",{target:"e1ff5q1o3",label:"InsertButton"})(u.button,";",s.buttons.green,";"),h=(0,r.default)("div",{target:"e1ff5q1o4",label:"LowerActionsContainer"})({name:"46b038",styles:"margin-top:30px;"}),m=({uploadButtonLabel:e,deleteButtonLabel:t,insertButtonLabel:n,uploadEnabled:r,deleteEnabled:i,insertEnabled:a,insertVisible:s,imagesOnly:l,onPersist:u,onDelete:m,onInsert:g})=>(0,o.jsx)(c,null,(0,o.jsx)(d,{label:e,imagesOnly:l,onChange:u,disabled:!r}),(0,o.jsx)(h,null,(0,o.jsx)(f,{onClick:m,disabled:!i},t),s?(0,o.jsx)(p,{onClick:g,disabled:!a},n):null));m.propTypes={uploadButtonLabel:i.default.string.isRequired,deleteButtonLabel:i.default.string.isRequired,insertButtonLabel:i.default.string.isRequired,uploadEnabled:i.default.bool,deleteEnabled:i.default.bool,insertEnabled:i.default.bool,insertVisible:i.default.bool,imagesOnly:i.default.bool,onPersist:i.default.func.isRequired,onDelete:i.default.func.isRequired,onInsert:i.default.func.isRequired};var g=m;t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(19)),i=(f(n(0)),f(n(1))),o=f(n(533)),a=f(n(1075)),s=n(3),l=n(16),u=n(1076),c=f(n(1077)),d=n(9);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t{const{rowIndex:t,columnIndex:n,style:r,data:{mediaItems:i,isSelectedFile:o,onAssetClick:l,cardDraftText:u,cardWidth:c,cardHeight:f,isPrivate:p,displayURLs:m,loadDisplayURL:g,columnCount:v,gutter:y}}=e,b=t*v+n;if(b>=i.length)return null;const _=i[b];return(0,d.jsx)("div",{style:h({},r,{left:r.left+y*n,top:r.top+y,width:r.width-y,height:r.height-y})},(0,d.jsx)(a.default,{key:_.key,isSelected:o(_),text:_.name,onClick:()=>l(_),isDraft:_.draft,draftText:u,width:c,height:f,margin:"0px",isPrivate:p,displayURL:m.get(_.id,_.url?(0,s.Map)({url:_.url}):(0,s.Map)()),loadDisplayURL:()=>g(_),type:_.type,isViewableImage:_.isViewableImage}))},v=e=>{const{mediaItems:t,setScrollContainerRef:n}=e;return(0,d.jsx)(b,{ref:n},(0,d.jsx)(c.default,null,({height:n,width:r})=>{const i=parseInt(e.cardWidth,10),o=parseInt(e.cardHeight,10),a=parseInt(e.cardMargin,10),s=i+a,l=o+a,c=Math.floor(r/s),f=Math.ceil(t.length/c);return(0,d.jsx)(u.FixedSizeGrid,{columnCount:c,columnWidth:s,rowCount:f,rowHeight:l,width:r,height:n,itemData:h({},e,{gutter:a,columnCount:c})},g)}))},y=({setScrollContainerRef:e,mediaItems:t,isSelectedFile:n,onAssetClick:r,cardDraftText:i,cardWidth:l,cardHeight:u,cardMargin:c,isPrivate:f,displayURLs:p,loadDisplayURL:h,canLoadMore:m,onLoadMore:g,isPaginating:v,paginatingMessage:y})=>(0,d.jsx)(b,{ref:e},(0,d.jsx)(_,null,t.map(e=>(0,d.jsx)(a.default,{key:e.key,isSelected:n(e),text:e.name,onClick:()=>r(e),isDraft:e.draft,draftText:i,width:l,height:u,margin:c,isPrivate:f,displayURL:p.get(e.id,e.url?(0,s.Map)({url:e.url}):(0,s.Map)()),loadDisplayURL:()=>h(e),type:e.type,isViewableImage:e.isViewableImage})),m?(0,d.jsx)(o.default,{onEnter:g}):null),v?(0,d.jsx)(w,{isPrivate:f},y):null),b=(0,r.default)("div",{target:"e11970yf0",label:"CardGridContainer"})({name:"1wzx962",styles:"overflow-y:auto;overflow-x:hidden;"}),_=(0,r.default)("div",{target:"e11970yf1",label:"CardGrid"})({name:"wbkx89",styles:"display:flex;flex-wrap:wrap;margin-left:-10px;margin-right:-10px;"}),w=(0,r.default)("h1",{target:"e11970yf2",label:"PaginatingMessage"})("color:",e=>e.isPrivate&&l.colors.textFieldBorder,";"),E=e=>{const{canLoadMore:t,isPaginating:n}=e;return t||n?(0,d.jsx)(y,e):(0,d.jsx)(v,e)};E.propTypes={setScrollContainerRef:i.default.func.isRequired,mediaItems:i.default.arrayOf(i.default.shape({displayURL:i.default.oneOfType([i.default.string,i.default.object]),id:i.default.string.isRequired,key:i.default.string.isRequired,name:i.default.string.isRequired,type:i.default.string.isRequired,draft:i.default.bool})).isRequired,isSelectedFile:i.default.func.isRequired,onAssetClick:i.default.func.isRequired,canLoadMore:i.default.bool,onLoadMore:i.default.func.isRequired,isPaginating:i.default.bool,paginatingMessage:i.default.string,cardDraftText:i.default.string.isRequired,cardWidth:i.default.string.isRequired,cardMargin:i.default.string.isRequired,loadDisplayURL:i.default.func.isRequired,isPrivate:i.default.bool,displayURLs:i.default.instanceOf(s.Map).isRequired};var x=E;t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=u(n(26)),s=n(16),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}const c=(0,r.default)("div",{target:"e984n9b0",label:"Card"})("width:",e=>e.width,";height:",e=>e.height,";margin:",e=>e.margin,";border:",s.borders.textField,";border-color:",e=>e.isSelected&&s.colors.active,";border-radius:",s.lengths.borderRadius,";cursor:pointer;overflow:hidden;background-color:",e=>e.isPrivate&&s.colors.textFieldBorder,";&:focus{outline:none;}"),d=(0,r.default)("div",{target:"e984n9b1",label:"CardImageWrapper"})("height:",162,"px;",s.effects.checkerboard,";",s.shadows.inset,";border-bottom:solid ",s.lengths.borderWidth," ",s.colors.textFieldBorder,";position:relative;"),f=(0,r.default)("img",{target:"e984n9b2",label:"CardImage"})("width:100%;height:",160,"px;object-fit:contain;border-radius:2px 2px 0 0;"),p=(0,r.default)("div",{target:"e984n9b3",label:"CardFileIcon"})({name:"17s0kw4",styles:"width:100%;height:160px;object-fit:cover;border-radius:2px 2px 0 0;padding:1em;font-size:3em;"}),h=(0,r.default)("p",{target:"e984n9b4",label:"CardText"})("color:",s.colors.text,";padding:8px;margin-top:20px;overflow-wrap:break-word;line-height:1.3 !important;"),m=(0,r.default)("p",{target:"e984n9b5",label:"DraftText"})("color:",s.colors.mediaDraftText,";background-color:",s.colors.mediaDraftBackground,";position:absolute;padding:8px;border-radius:",s.lengths.borderRadius," 0px ",s.lengths.borderRadius," 0;");class g extends i.default.Component{render(){const{isSelected:e,displayURL:t,text:n,onClick:r,draftText:i,width:o,height:a,margin:s,isPrivate:u,type:g,isViewableImage:v,isDraft:y}=this.props,b=t.get("url");return(0,l.jsx)(c,{isSelected:e,onClick:r,width:o,height:a,margin:s,tabIndex:"-1",isPrivate:u},(0,l.jsx)(d,null,y?(0,l.jsx)(m,{"data-testid":"draft-text"},i):null,b&&v?(0,l.jsx)(f,{src:b}):(0,l.jsx)(p,{"data-testid":"card-file-icon"},g)),(0,l.jsx)(h,null,n))}componentDidMount(){const{displayURL:e,loadDisplayURL:t}=this.props;e.get("url")||t()}}g.propTypes={isSelected:o.default.bool,displayURL:a.default.map.isRequired,text:o.default.string.isRequired,onClick:o.default.func.isRequired,draftText:o.default.string.isRequired,width:o.default.string.isRequired,height:o.default.string.isRequired,margin:o.default.string.isRequired,isPrivate:o.default.bool,type:o.default.string,isViewableImage:o.default.bool.isRequired,loadDisplayURL:o.default.func.isRequired,isDraft:o.default.bool};var v=g;t.default=v},function(e,t,n){"use strict";n.r(t),n.d(t,"VariableSizeGrid",(function(){return S})),n.d(t,"VariableSizeList",(function(){return I})),n.d(t,"FixedSizeGrid",(function(){return D})),n.d(t,"FixedSizeList",(function(){return j})),n.d(t,"areEqual",(function(){return N})),n.d(t,"shouldComponentUpdate",(function(){return F}));var r=n(46),i=n(116),o=n(22),a=n(107),s=n(0),l=n(99),u="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function c(e){cancelAnimationFrame(e.id)}function d(e,t){var n=u();var r={id:requestAnimationFrame((function i(){u()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var f=-1;var p=null;function h(e){if(void 0===e&&(e=!1),null===p||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?p="positive-descending":(t.scrollLeft=1,p=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),p}return p}var m=function(e){var t=e.columnIndex;e.data;return e.rowIndex+":"+t};function g(e){var t,n,l=e.getColumnOffset,u=e.getColumnStartIndexForOffset,p=e.getColumnStopIndexForStartIndex,g=e.getColumnWidth,y=e.getEstimatedTotalHeight,b=e.getEstimatedTotalWidth,_=e.getOffsetForColumnAndAlignment,w=e.getOffsetForRowAndAlignment,E=e.getRowHeight,x=e.getRowOffset,k=e.getRowStartIndexForOffset,S=e.getRowStopIndexForStartIndex,O=e.initInstanceProps,T=e.shouldResetStyleCacheOnItemSizeChange,C=e.validateProps;return n=t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=O(n.props,Object(o.a)(Object(o.a)(n))),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:Object(o.a)(Object(o.a)(n)),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=Object(a.a)((function(e,t,r,i,o,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),n._callOnScroll=void 0,n._callOnScroll=Object(a.a)((function(e,t,r,i,o){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})})),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var r,i,o=n.props,a=o.columnWidth,s=o.direction,u=o.rowHeight,c=n._getItemStyleCache(T&&a,T&&s,T&&u),d=e+":"+t;c.hasOwnProperty(d)?r=c[d]:c[d]=((i={position:"absolute"})["rtl"===s?"right":"left"]=l(n.props,t,n._instanceProps),i.top=x(n.props,e,n._instanceProps),i.height=E(n.props,e,n._instanceProps),i.width=g(n.props,t,n._instanceProps),r=i);return r},n._getItemStyleCache=void 0,n._getItemStyleCache=Object(a.a)((function(e,t,n){return{}})),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState((function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=n.props.direction,u=o;if("rtl"===t)switch(h()){case"negative":u=-o;break;case"positive-descending":u=l-i-o}u=Math.max(0,Math.min(u,l-i));var c=Math.max(0,Math.min(a,s-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeftu?h:0,v=m>s?h:0;this.scrollTo({scrollLeft:void 0!==r?_(this.props,r,n,d,this._instanceProps,v):d,scrollTop:void 0!==i?w(this.props,i,n,p,this._instanceProps,g):p})},n.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(h()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&c(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,i=e.columnCount,o=e.direction,a=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,f=e.itemKey,p=void 0===f?m:f,h=e.outerElementType,g=e.outerTagName,v=e.rowCount,_=e.style,w=e.useIsScrolling,E=e.width,x=this.state.isScrolling,k=this._getHorizontalRangeToRender(),S=k[0],O=k[1],T=this._getVerticalRangeToRender(),C=T[0],A=T[1],P=[];if(i>0&&v)for(var R=C;R<=A;R++)for(var M=S;M<=O;M++)P.push(Object(s.createElement)(t,{columnIndex:M,data:d,isScrolling:w?x:void 0,key:p({columnIndex:M,data:d,rowIndex:R}),rowIndex:R,style:this._getItemStyle(R,M)}));var I=y(this.props,this._instanceProps),D=b(this.props,this._instanceProps);return Object(s.createElement)(h||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Object(r.a)({position:"relative",height:a,width:E,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},_)},Object(s.createElement)(u||c||"div",{children:P,ref:l,style:{height:I,pointerEvents:x?"none":void 0,width:D}}))},n._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],u=o[3],c=this._getVerticalRangeToRender(),d=c[0],f=c[1],p=c[2],h=c[3];this._callOnItemsRendered(a,s,d,f,l,u,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,y=m.scrollTop,b=m.scrollUpdateWasRequested,_=m.verticalScrollDirection;this._callOnScroll(v,y,g,_,b)}},n._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,i=e.overscanCount,o=e.rowCount,a=this.state,s=a.horizontalScrollDirection,l=a.isScrolling,c=a.scrollLeft,d=n||r||i||1;if(0===t||0===o)return[0,0,0,0];var f=u(this.props,c,this._instanceProps),h=p(this.props,f,c,this._instanceProps),m=l&&"backward"!==s?1:Math.max(1,d),g=l&&"forward"!==s?1:Math.max(1,d);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},n._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=k(this.props,u,this._instanceProps),f=S(this.props,d,u,this._instanceProps),p=s&&"backward"!==l?1:Math.max(1,c),h=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-p),Math.max(0,Math.min(o-1,f+h)),d,f]},t}(s.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},n}var v=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},y=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},b=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},_=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},w=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?E(e,t,n,o,0,r):x(e,t,n,Math.max(0,o),r)},E=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=_(e,t,a,n).offset;if(s===o)return a;so&&(r=a-1)}return i>0?i-1:0},x=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r=d-s&&i<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);case"auto":default:return i>=d&&i<=c?i:d>c||i0)for(var A=S;A<=T;A++)C.push(Object(s.createElement)(t,{data:f,key:h(A,f),index:A,isScrolling:b?w:void 0,style:this._getItemStyle(A)}));var P=u(this.props,this._instanceProps);return Object(s.createElement)(g||v||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:Object(r.a)({position:"relative",height:o,width:_,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},Object(s.createElement)(l||c||"div",{children:C,ref:a,style:{height:E?"100%":P,pointerEvents:w?"none":void 0,width:E?P:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var s=m(this.props,a,this._instanceProps),l=g(this.props,s,a,this._instanceProps),u=i&&"backward"!==o?1:Math.max(1,n),c=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,s-u),Math.max(0,Math.min(t-1,l+c)),s,l]},t}(s.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var C=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},A=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var u=r(l);i[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},P=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=A(e,o,t).offset;if(a===i)return o;ai&&(n=o-1)}return r>0?r-1:0},R=function(e,t,n,r){for(var i=e.itemCount,o=1;n=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},I=T({getItemOffset:function(e,t,n){return A(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:M,getOffsetForIndexAndAlignment:function(e,t,n,r,i){var o=e.direction,a=e.height,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:a,c=A(e,t,i),d=M(e,i),f=Math.max(0,Math.min(d-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch("smart"===n&&(n=r>=p-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return p;case"center":return Math.round(p+(f-p)/2);case"auto":default:return r>=p&&r<=f?r:r0?r[i].offset:0)>=n?P(e,t,i,0,n):R(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===i||"horizontal"===s?l:o,c=A(e,t,r),d=n+u,f=c.offset+c.size,p=t;p=d-l&&r<=c+l?"auto":"center"),n){case"start":return c;case"end":return d;case"center":var f=Math.round(d+(c-d)/2);return fu+Math.floor(l/2)?u:f;case"auto":default:return r>=d&&r<=c?r:d>c||r=d-s&&r<=c+s?"auto":"center"),n){case"start":return c;case"end":return d;case"center":var f=Math.round(d+(c-d)/2);return fu+Math.floor(s/2)?u:f;case"auto":default:return r>=d&&r<=c?r:d>c||r=p-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return p;case"center":var h=Math.round(p+(f-p)/2);return hd+Math.floor(c/2)?d:h;case"auto":default:return r>=p&&r<=f?r:r div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],i=e.createElement("style");i.id="detectElementResize",i.type="text/css",null!=t&&i.setAttribute("nonce",t),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(e.createTextNode(n)),r.appendChild(i)}}(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='
',e.appendChild(e.__resizeTriggers__),l(e),e.addEventListener("scroll",u,!0),f&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&l(e)},e.__resizeTriggers__.addEventListener(f,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(r)}},removeResizeListener:function(e,t){if(o)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}var o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;ne.isPrivate&&o.colors.textFieldBorder,";"),u=({content:e,isPrivate:t})=>(0,a.jsx)(l,{isPrivate:t},(0,a.jsx)("h1",null,e));u.propTypes={content:i.default.string.isRequired,isPrivate:i.default.bool};var c=u;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(n(19)),i=g(n(0)),o=g(n(1)),a=g(n(26)),s=n(87),l=n(16),u=n(145),c=g(n(1080)),d=g(n(1081)),f=g(n(1082)),p=g(n(1085)),h=n(358),m=n(9);function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=(0,r.default)("div",{target:"e1yhfkro0",label:"CollectionContainer"})("margin:",l.lengths.pageMargin,";"),b=(0,r.default)("main",{target:"e1yhfkro1",label:"CollectionMain"})({name:"1r4jzjw",styles:"padding-left:280px;"});class _ extends i.default.Component{constructor(...e){super(...e),v(this,"state",{viewStyle:h.VIEW_STYLE_LIST}),v(this,"renderEntriesCollection",()=>{const{collection:e}=this.props;return(0,m.jsx)(f.default,{collection:e,viewStyle:this.state.viewStyle})}),v(this,"renderEntriesSearch",()=>{const{searchTerm:e,collections:t}=this.props;return(0,m.jsx)(p.default,{collections:t,searchTerm:e})}),v(this,"handleChangeViewStyle",e=>{this.state.viewStyle!==e&&this.setState({viewStyle:e})})}render(){const{collection:e,collections:t,collectionName:n,isSearchResults:r,searchTerm:i}=this.props,o=e.get("create")?(0,u.getNewEntryUrl)(n):"";return(0,m.jsx)(y,null,(0,m.jsx)(c.default,{collections:t,searchTerm:i}),(0,m.jsx)(b,null,r?null:(0,m.jsx)(d.default,{collectionLabel:e.get("label"),collectionLabelSingular:e.get("label_singular"),collectionDescription:e.get("description"),newEntryUrl:o,viewStyle:this.state.viewStyle,onChangeViewStyle:this.handleChangeViewStyle}),r?this.renderEntriesSearch():this.renderEntriesCollection()))}}v(_,"propTypes",{searchTerm:o.default.string,collectionName:o.default.string,isSearchResults:o.default.bool,collection:a.default.map.isRequired,collections:a.default.orderedMap.isRequired});var w=(0,s.connect)((function(e,t){const{collections:n}=e,{isSearchResults:r,match:i}=t,{name:o,searchTerm:a}=i.params;return{collection:o?n.get(o):n.first(),collections:n,collectionName:o,isSearchResults:r,searchTerm:a}}))(_);t.default=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(19)),i=f(n(0)),o=f(n(1)),a=f(n(26)),s=n(9),l=n(49),u=n(130),c=n(16),d=n(357);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const h={sidebarNavLinkActive:(0,s.css)("color:",c.colors.active,";background-color:",c.colors.activeBackground,";border-left-color:#4863c6;;label:sidebarNavLinkActive;")},m=(0,r.default)("aside",{target:"el9l68m0",label:"SidebarContainer"})(c.components.card,";width:250px;padding:8px 0 12px;position:fixed;max-height:calc(100vh - 112px);overflow:auto;"),g=(0,r.default)("h2",{target:"el9l68m1",label:"SidebarHeading"})("font-size:23px;font-weight:600;padding:0;margin:18px 12px 12px;color:",c.colors.textLead,";"),v=(0,r.default)("div",{target:"el9l68m2",label:"SearchContainer"})("display:flex;align-items:center;margin:0 12px;position:relative;",c.Icon,"{position:absolute;top:0;left:6px;z-index:2;height:100%;display:flex;align-items:center;pointer-events:none;}"),y=(0,r.default)("input",{target:"el9l68m3",label:"SearchInput"})("background-color:#eff0f4;border-radius:",c.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:1;&:focus{outline:none;box-shadow:inset 0 0 0 2px ",c.colorsRaw.blue,";}"),b=(0,r.default)("ul",{target:"el9l68m4",label:"SidebarNavList"})({name:"93f2xv",styles:"margin:16px 0 0;list-style:none;"}),_=(0,r.default)(u.NavLink,{target:"el9l68m5",label:"SidebarNavLink"})("display:flex;font-size:14px;font-weight:500;align-items:center;padding:8px 12px;border-left:2px solid #fff;",c.Icon,"{margin-right:8px;}",e=>(0,s.css)("&:hover,&:active,&.",e.activeClassName,"{",h.sidebarNavLinkActive,";};label:SidebarNavLink;"),";");class w extends i.default.Component{constructor(...e){super(...e),p(this,"state",{query:this.props.searchTerm}),p(this,"renderLink",e=>{const t=e.get("name");return(0,s.jsx)("li",{key:t},(0,s.jsx)(_,{to:"/collections/".concat(t),activeClassName:"sidebar-active"},(0,s.jsx)(c.Icon,{type:"write"}),e.get("label")))})}render(){const{collections:e,t:t}=this.props,{query:n}=this.state;return(0,s.jsx)(m,null,(0,s.jsx)(g,null,t("collection.sidebar.collections")),(0,s.jsx)(v,null,(0,s.jsx)(c.Icon,{type:"search",size:"small"}),(0,s.jsx)(y,{onChange:e=>this.setState({query:e.target.value}),onKeyDown:e=>"Enter"===e.key&&(0,d.searchCollections)(n),placeholder:t("collection.sidebar.searchAll"),value:n})),(0,s.jsx)(b,null,e.toList().map(this.renderLink)))}}p(w,"propTypes",{collections:a.default.orderedMap.isRequired,searchTerm:o.default.string,t:o.default.func.isRequired}),p(w,"defaultProps",{searchTerm:""});var E=(0,l.translate)()(w);t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(19)),i=c(n(1)),o=(c(n(0)),n(49)),a=n(130),s=n(16),l=n(358),u=n(9);function c(e){return e&&e.__esModule?e:{default:e}}const d=(0,r.default)("div",{target:"enajvhy0",label:"CollectionTopContainer"})(s.components.cardTop,";"),f=(0,r.default)("div",{target:"enajvhy1",label:"CollectionTopRow"})({name:"15nespj",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;"}),p=(0,r.default)("h1",{target:"enajvhy2",label:"CollectionTopHeading"})(s.components.cardTopHeading,";"),h=(0,r.default)(a.Link,{target:"enajvhy3",label:"CollectionTopNewButton"})(s.buttons.button,";",s.shadows.dropDeep,";",s.buttons.default,";",s.buttons.gray,";padding:0 30px;"),m=(0,r.default)("p",{target:"enajvhy4",label:"CollectionTopDescription"})(s.components.cardTopDescription,";"),g=(0,r.default)("div",{target:"enajvhy5",label:"ViewControls"})({name:"1o34z4",styles:"display:flex;align-items:center;justify-content:flex-end;margin-top:24px;"}),v=(0,r.default)("span",{target:"enajvhy6",label:"ViewControlsText"})("font-size:14px;color:",s.colors.text,";margin-right:12px;"),y=(0,r.default)("button",{target:"enajvhy7",label:"ViewControlsButton"})(s.buttons.button,";color:",e=>e.isActive?s.colors.active:"#b3b9c4",";background-color:transparent;display:block;padding:0;margin:0 4px;&:last-child{margin-right:0;}",s.Icon,"{display:block;}"),b=({collectionLabel:e,collectionLabelSingular:t,collectionDescription:n,viewStyle:r,onChangeViewStyle:i,newEntryUrl:o,t:a})=>(0,u.jsx)(d,null,(0,u.jsx)(f,null,(0,u.jsx)(p,null,e),o?(0,u.jsx)(h,{to:o},a("collection.collectionTop.newButton",{collectionLabel:t||e})):null),n?(0,u.jsx)(m,null,n):null,(0,u.jsx)(g,null,(0,u.jsx)(v,null,a("collection.collectionTop.viewAs"),":"),(0,u.jsx)(y,{isActive:r===l.VIEW_STYLE_LIST,onClick:()=>i(l.VIEW_STYLE_LIST)},(0,u.jsx)(s.Icon,{type:"list"})),(0,u.jsx)(y,{isActive:r===l.VIEW_STYLE_GRID,onClick:()=>i(l.VIEW_STYLE_GRID)},(0,u.jsx)(s.Icon,{type:"grid"}))));b.propTypes={collectionLabel:i.default.string.isRequired,collectionLabelSingular:i.default.string,collectionDescription:i.default.string,viewStyle:i.default.oneOf([l.VIEW_STYLE_LIST,l.VIEW_STYLE_GRID]).isRequired,onChangeViewStyle:i.default.func.isRequired,newEntryUrl:i.default.string,t:i.default.func.isRequired};var _=(0,o.translate)()(b);t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(152)),i=h(n(0)),o=h(n(1)),a=h(n(26)),s=n(87),l=n(41),u=n(125),c=n(85),d=n(343),f=h(n(534)),p=n(9);function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class g extends i.default.Component{constructor(...e){super(...e),m(this,"handleCursorActions",(e,t)=>{const{collection:n,traverseCollectionCursor:r}=this.props;r(n,t)})}componentDidMount(){const{collection:e,entriesLoaded:t,loadEntries:n}=this.props;e&&!t&&n(e)}componentDidUpdate(e){const{collection:t,entriesLoaded:n,loadEntries:r}=this.props;t===e.collection||n||r(t)}render(){const{collection:e,entries:t,isFetching:n,viewStyle:i,cursor:o}=this.props;return(0,p.jsx)(f.default,{collections:e,entries:t,isFetching:n,collectionName:e.get("label"),viewStyle:i,cursor:o,handleCursorActions:(0,r.default)(this.handleCursorActions,o)})}}m(g,"propTypes",{collection:a.default.map.isRequired,entries:a.default.list,isFetching:o.default.bool.isRequired,viewStyle:o.default.string,cursor:o.default.object.isRequired,loadEntries:o.default.func.isRequired,traverseCollectionCursor:o.default.func.isRequired,entriesLoaded:o.default.bool});const v={loadEntries:u.loadEntries,traverseCollectionCursor:u.traverseCollectionCursor};var y=(0,s.connect)((function(e,t){const{collection:n,viewStyle:r}=t,i=e.entries.getIn(["pages",n.get("name"),"page"]),o=(0,c.selectEntries)(e,n.get("name")),a=!!e.entries.getIn(["pages",n.get("name")]),s=e.entries.getIn(["pages",n.get("name"),"isFetching"],!1),u=(0,d.selectCollectionEntriesCursor)(e.cursors,n.get("name"));return{collection:n,page:i,entries:o,entriesLoaded:a,isFetching:s,viewStyle:r,cursor:l.Cursor.create(u).clearData()}}),v)(g);t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(19)),i=p(n(1)),o=p(n(0)),a=p(n(26)),s=p(n(533)),l=n(3),u=n(41),c=n(96),d=p(n(1084)),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}function h(){return(h=Object.assign||function(e){for(var t=1;tu.Cursor.create(this.props.cursor).actions.has("append_next")),m(this,"handleLoadMore",()=>{this.hasMore()&&this.props.handleCursorActions("append_next")}),m(this,"inferFields",e=>{const t=(0,c.selectInferedField)(e,"title"),n=(0,c.selectInferedField)(e,"description"),r=(0,c.selectInferedField)(e,"image"),i=(0,c.selectFields)(e),o=[t,n,r];return{titleField:t,descriptionField:n,imageField:r,remainingFields:i&&i.filter(e=>-1===o.indexOf(e.get("name")))}}),m(this,"renderCardsForSingleCollection",()=>{const{collections:e,entries:t,viewStyle:n}=this.props,r={collection:e,inferedFields:this.inferFields(e),viewStyle:n};return t.map((e,t)=>(0,f.jsx)(d.default,h({},r,{entry:e,key:t})))}),m(this,"renderCardsForMultipleCollections",()=>{const{collections:e,entries:t}=this.props;return t.map((t,n)=>{const r=t.get("collection"),i=e.find(e=>e.get("name")===r),o=i.get("label"),a={collection:i,entry:t,inferedFields:this.inferFields(i),collectionLabel:o};return(0,f.jsx)(d.default,h({},a,{key:n}))})})}render(){const{collections:e}=this.props;return(0,f.jsx)("div",null,(0,f.jsx)(g,null,l.Map.isMap(e)?this.renderCardsForSingleCollection():this.renderCardsForMultipleCollections(),this.hasMore()&&(0,f.jsx)(s.default,{onEnter:this.handleLoadMore})))}}t.default=v,m(v,"propTypes",{collections:a.default.iterable.isRequired,entries:a.default.list,viewStyle:i.default.string,cursor:i.default.any.isRequired,handleCursorActions:i.default.func.isRequired})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(19)),i=(p(n(0)),n(87)),o=n(147),a=n(130),s=n(16),l=n(358),u=n(348),c=n(251),d=n(261),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=(0,r.default)("li",{target:"eab48an0",label:"ListCard"})(s.components.card,";width:",s.lengths.topCardWidth,";margin-left:12px;margin-bottom:16px;overflow:hidden;"),v=(0,r.default)(a.Link,{target:"eab48an1",label:"ListCardLink"})("display:block;max-width:100%;padding:16px 22px;&:hover{background-color:",s.colors.foreground,";}"),y=(0,r.default)("li",{target:"eab48an2",label:"GridCard"})(s.components.card,";flex:0 0 335px;height:240px;overflow:hidden;margin-left:12px;margin-bottom:16px;"),b=(0,r.default)(a.Link,{target:"eab48an3",label:"GridCardLink"})("display:block;&,&:hover{background-color:",s.colors.foreground,";color:",s.colors.text,";}"),_=(0,r.default)("h2",{target:"eab48an4",label:"CollectionLabel"})("font-size:12px;color:",s.colors.textLead,";text-transform:uppercase;"),w=(0,r.default)("h2",{target:"eab48an5",label:"ListCardTitle"})({name:"gx0lhm",styles:"margin-bottom:0;"}),E=(0,r.default)("h2",{target:"eab48an6",label:"CardHeading"})({name:"1kpnu25",styles:"margin:0 0 2px;"}),x=(0,r.default)("div",{target:"eab48an7",label:"CardBody"})("padding:16px 22px;height:90px;position:relative;margin-bottom:",e=>e.hasImage&&0,";&:after{content:'';position:absolute;display:block;z-index:1;bottom:0;left:-20%;height:140%;width:140%;box-shadow:inset 0 -15px 24px ",s.colorsRaw.white,";}"),k=(0,r.default)("div",{target:"eab48an8",label:"CardImage"})("background-image:url(",e=>e.src,");background-position:center center;background-size:cover;background-repeat:no-repeat;height:150px;");var S=(0,i.connect)((e,t)=>{var n;const{entry:r,inferedFields:i,collection:o}=t,a=r.get("label"),s=r.get("data"),l=a||i.titleField&&s.getIn((0,c.keyToPathArray)(i.titleField)),f=o.get("summary"),p=f?(0,u.summaryFormatter)(f,r,o):l;let h=s.get(i.imageField);h&&(h=encodeURI(h));const m=(0,d.selectIsLoadingAsset)(e.medias);return{summary:p,path:"/collections/".concat(o.get("name"),"/entries/").concat(r.get("slug")),image:h,imageFolder:null===(n=o.get("fields"))||void 0===n?void 0:n.find(e=>e.get("name")===i.imageField&&"image"===e.get("widget")),isLoadingAsset:m}},e=>({boundGetAsset:(t,n)=>(0,o.boundGetAsset)(e,t,n)}),(e,t,n)=>function(e){for(var t=1;to===l.VIEW_STYLE_LIST?(0,f.jsx)(g,null,(0,f.jsx)(v,{to:e},i?(0,f.jsx)(_,null,i):null,(0,f.jsx)(w,null,t))):o===l.VIEW_STYLE_GRID?(0,f.jsx)(y,null,(0,f.jsx)(b,{to:e},(0,f.jsx)(x,{hasImage:n},i?(0,f.jsx)(_,null,i):null,(0,f.jsx)(E,null,t)),n?(0,f.jsx)(k,{src:a(n,r).toString()}):null)):void 0);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(0)),i=f(n(1)),o=f(n(26)),a=n(87),s=n(41),l=n(85),u=n(260),c=f(n(534)),d=n(9);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class h extends r.default.Component{constructor(...e){super(...e),p(this,"getCursor",()=>{const{page:e}=this.props;return s.Cursor.create({actions:isNaN(e)?[]:["append_next"]})}),p(this,"handleCursorActions",e=>{const{page:t,searchTerm:n,searchEntries:r}=this.props;if("append_next"===e){r(n,t+1)}})}componentDidMount(){const{searchTerm:e,searchEntries:t}=this.props;t(e)}componentDidUpdate(e){if(e.searchTerm===this.props.searchTerm)return;const{searchEntries:t}=e;t(this.props.searchTerm)}componentWillUnmount(){this.props.clearSearch()}render(){const{collections:e,entries:t,isFetching:n}=this.props;return(0,d.jsx)(c.default,{cursor:this.getCursor(),handleCursorActions:this.handleCursorActions,collections:e,entries:t,isFetching:n})}}p(h,"propTypes",{isFetching:i.default.bool,searchEntries:i.default.func.isRequired,clearSearch:i.default.func.isRequired,searchTerm:i.default.string.isRequired,collections:o.default.seq,entries:o.default.list,page:i.default.number});const m={searchEntries:u.searchEntries,clearSearch:u.clearSearch};var g=(0,a.connect)((function(e,t){const{searchTerm:n}=t,r=t.collections.toIndexedSeq();return{isFetching:e.search.get("isFetching"),page:e.search.get("page"),collections:r,entries:(0,l.selectSearchedEntries)(e),searchTerm:n}}),m)(h);t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n(19)),i=y(n(1)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=y(n(26)),s=n(3),l=n(49),u=n(87),c=n(16),d=n(357),f=n(215),p=n(85),h=n(95),m=y(n(1087)),g=n(9);function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(e){return e&&e.__esModule?e:{default:e}}const b=(0,r.default)("div",{target:"eg19in30",label:"WorkflowContainer"})("padding:",c.lengths.pageMargin," 0;height:100vh;"),_=(0,r.default)("div",{target:"eg19in31",label:"WorkflowTop"})(c.components.cardTop,";"),w=(0,r.default)("div",{target:"eg19in32",label:"WorkflowTopRow"})("display:flex;justify-content:space-between;span[role='button']{",c.shadows.dropDeep,";}"),E=(0,r.default)("h1",{target:"eg19in33",label:"WorkflowTopHeading"})(c.components.cardTopHeading,";"),x=(0,r.default)("p",{target:"eg19in34",label:"WorkflowTopDescription"})(c.components.cardTopDescription,";");class k extends o.Component{componentDidMount(){const{loadUnpublishedEntries:e,isEditorialWorkflow:t,collections:n}=this.props;t&&e(n)}render(){const{isEditorialWorkflow:e,isOpenAuthoring:t,isFetching:n,unpublishedEntries:r,updateUnpublishedEntryStatus:i,publishUnpublishedEntry:o,deleteUnpublishedEntry:a,collections:s,t:l}=this.props;if(!e)return null;if(n)return(0,g.jsx)(c.Loader,{active:!0},l("workflow.workflow.loading"));const u=r.get("pending_review").size,f=r.get("pending_publish").size;return(0,g.jsx)(b,null,(0,g.jsx)(_,null,(0,g.jsx)(w,null,(0,g.jsx)(E,null,l("workflow.workflow.workflowHeading")),(0,g.jsx)(c.Dropdown,{dropdownWidth:"160px",dropdownPosition:"left",dropdownTopOverlap:"40px",renderButton:()=>(0,g.jsx)(c.StyledDropdownButton,null,l("workflow.workflow.newPost"))},s.filter(e=>e.get("create")).toList().map(e=>(0,g.jsx)(c.DropdownItem,{key:e.get("name"),label:e.get("label"),onClick:()=>(0,d.createNewEntry)(e.get("name"))})))),(0,g.jsx)(x,null,l("workflow.workflow.description",{smart_count:u,readyCount:f}))),(0,g.jsx)(m.default,{entries:r,handleChangeStatus:i,handlePublish:o,handleDelete:a,isOpenAuthoring:t,collections:s}))}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(k,"propTypes",{collections:a.default.orderedMap,isEditorialWorkflow:i.default.bool.isRequired,isOpenAuthoring:i.default.bool,isFetching:i.default.bool,unpublishedEntries:a.default.map,loadUnpublishedEntries:i.default.func.isRequired,updateUnpublishedEntryStatus:i.default.func.isRequired,publishUnpublishedEntry:i.default.func.isRequired,deleteUnpublishedEntry:i.default.func.isRequired,t:i.default.func.isRequired});var S=(0,u.connect)((function(e){const{collections:t,config:n,globalUI:r}=e,i=n.get("publish_mode")===h.EDITORIAL_WORKFLOW,o={collections:t,isEditorialWorkflow:i,isOpenAuthoring:r.get("useOpenAuthoring",!1)};return i&&(o.isFetching=e.editorialWorkflow.getIn(["pages","isFetching"],!1),o.unpublishedEntries=h.status.reduce((t,n)=>{const r=(0,p.selectUnpublishedEntriesByStatus)(e,n);return t.set(n,r)},(0,s.OrderedMap)())),o}),{loadUnpublishedEntries:f.loadUnpublishedEntries,updateUnpublishedEntryStatus:f.updateUnpublishedEntryStatus,publishUnpublishedEntry:f.publishUnpublishedEntry,deleteUnpublishedEntry:f.deleteUnpublishedEntry})((0,l.translate)()(k));t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=m(n(155)),i=m(n(19)),o=m(n(1)),a=m(n(0)),s=m(n(26)),l=n(9),u=m(n(122)),c=n(49),d=n(16),f=n(95),p=n(180),h=m(n(1088));function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v=(0,i.default)("div",{target:"e1sboua10",label:"WorkflowListContainer"})({name:"1booyhj",styles:"min-height:60%;display:grid;grid-template-columns:33.3% 33.3% 33.3%;"}),y=(0,i.default)("div",{target:"e1sboua11",label:"WorkflowListContainerOpenAuthoring"})({name:"1q1dzdp",styles:"min-height:60%;display:grid;grid-template-columns:50% 50% 0%;"});var b={name:"qbubgm",styles:"margin-left:0;"},_={name:"1xzanuf",styles:"margin-right:0;"};const w={columnPosition:e=>0===e&&b||2===e&&_||(0,l.css)("&:before,&:after{content:'';display:block;position:absolute;width:2px;height:80%;top:76px;background-color:",d.colors.textFieldBorder,";}&:before{left:-23px;}&:after{right:-23px;}"),column:{name:"f8lkbe-column",styles:"margin:0 20px;transition:background-color 0.5s ease;border:2px dashed transparent;border-radius:4px;position:relative;height:100%;;label:column;"},columnHovered:(0,l.css)("border-color:",d.colors.active,";;label:columnHovered;"),hiddenColumn:{name:"9wvypa-hiddenColumn",styles:"display:none;;label:hiddenColumn;"},hiddenRightBorder:{name:"hg8806-hiddenRightBorder",styles:"&:not(:first-child):not(:last-child){&:after{display:none;}};label:hiddenRightBorder;"}},E=(0,i.default)("h2",{target:"e1sboua12",label:"ColumnHeader"})("font-size:20px;font-weight:normal;padding:4px 14px;border-radius:",d.lengths.borderRadius,";margin-bottom:28px;",e=>"draft"===e.name&&(0,l.css)("background-color:",d.colors.statusDraftBackground,";color:",d.colors.statusDraftText,";;label:ColumnHeader;")," ",e=>"pending_review"===e.name&&(0,l.css)("background-color:",d.colors.statusReviewBackground,";color:",d.colors.statusReviewText,";;label:ColumnHeader;")," ",e=>"pending_publish"===e.name&&(0,l.css)("background-color:",d.colors.statusReadyBackground,";color:",d.colors.statusReadyText,";;label:ColumnHeader;"),""),x=(0,i.default)("p",{target:"e1sboua13",label:"ColumnCount"})("font-size:13px;font-weight:500;color:",d.colors.text,";text-transform:uppercase;margin-bottom:6px;");class k extends a.default.Component{constructor(...e){super(...e),g(this,"handleChangeStatus",(e,t)=>{const n=t.slug,r=t.collection,i=t.ownStatus;this.props.handleChangeStatus(r,n,i,e)}),g(this,"requestDelete",(e,t,n)=>{window.confirm(this.props.t("workflow.workflowList.onDeleteEntry"))&&this.props.handleDelete(e,t,n)}),g(this,"requestPublish",(e,t,n)=>{n===f.status.last()?window.confirm(this.props.t("workflow.workflowList.onPublishEntry"))&&this.props.handlePublish(e,t):window.alert(this.props.t("workflow.workflowList.onPublishingNotReadyEntry"))}),g(this,"renderColumns",(e,t)=>{const{isOpenAuthoring:n,collections:i,t:o}=this.props;return e?t?(0,l.jsx)("div",null,e.map(e=>{var t;const n=(0,u.default)(e.getIn(["metaData","timeStamp"])).format(o("workflow.workflow.dateFormat")),r=e.get("slug"),a="collections/".concat(e.getIn(["metaData","collection"]),"/entries/").concat(r),s=e.getIn(["metaData","status"]),c=e.getIn(["metaData","collection"]),d=null==i||null===(t=i.find(e=>e.get("name")===c))||void 0===t?void 0:t.get("label"),m=e.get("isModification"),g=s===f.status.last()&&!e.get("isPersisting",!1);return(0,l.jsx)(p.DragSource,{namespace:"cms-workflow",key:"".concat(c,"-").concat(r),slug:r,collection:c,ownStatus:s},t=>t((0,l.jsx)("div",null,(0,l.jsx)(h.default,{collectionLabel:d||c,title:e.get("label")||e.getIn(["data","title"]),authorLastChange:e.getIn(["metaData","user"]),body:e.getIn(["data","body"]),isModification:m,editLink:a,timestamp:n,onDelete:this.requestDelete.bind(this,c,r,s),canPublish:g,onPublish:this.requestPublish.bind(this,c,r,s)}))))})):e.entrySeq().map(([e,t],i)=>(0,l.jsx)(p.DropTarget,{namespace:"cms-workflow",key:e,onDrop:this.handleChangeStatus.bind(this,e)},(o,{isHovered:a})=>o((0,l.jsx)("div",{style:{height:"100%"}},(0,l.jsx)("div",{css:(0,r.default)([w.column,w.columnPosition(i),a&&w.columnHovered,n&&"pending_publish"===e&&w.hiddenColumn,n&&"pending_review"===e&&w.hiddenRightBorder],";label:WorkflowList;")},(0,l.jsx)(E,{name:e},((e,t)=>{switch(e){case"draft":return t("workflow.workflowList.draftHeader");case"pending_review":return t("workflow.workflowList.inReviewHeader");case"pending_publish":return t("workflow.workflowList.readyHeader")}})(e,this.props.t)),(0,l.jsx)(x,null,this.props.t("workflow.workflowList.currentEntries",{smart_count:t.size})),this.renderColumns(t,e)))))):null})}render(){const e=this.renderColumns(this.props.entries),t=this.props.isOpenAuthoring?y:v;return(0,l.jsx)(t,null,e)}}g(k,"propTypes",{entries:s.default.orderedMap,handleChangeStatus:o.default.func.isRequired,handlePublish:o.default.func.isRequired,handleDelete:o.default.func.isRequired,t:o.default.func.isRequired,isOpenAuthoring:o.default.bool,collections:s.default.orderedMap});var S=(0,p.HTML5DragDrop)((0,c.translate)()(k));t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=(u(n(0)),u(n(1))),o=n(9),a=n(49),s=n(130),l=n(16);function u(e){return e&&e.__esModule?e:{default:e}}const c={text:{name:"1v21rim-text",styles:"font-size:13px;font-weight:normal;margin-top:4px;;label:text;"},button:(0,o.css)(l.buttons.button,";width:auto;flex:1 0 0;font-size:13px;padding:6px 0;;label:button;")},d=(0,r.default)(s.Link,{target:"e1x8f48e0",label:"WorkflowLink"})({name:"xe15uv",styles:"display:block;padding:0 18px 18px;height:200px;overflow:hidden;"}),f=(0,r.default)("div",{target:"e1x8f48e1",label:"CardCollection"})("font-size:14px;color:",l.colors.textLead,";text-transform:uppercase;margin-top:12px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),p=(0,r.default)("h2",{target:"e1x8f48e2",label:"CardTitle"})("margin:28px 0 0;color:",l.colors.textLead,";"),h=(0,r.default)("div",{target:"e1x8f48e3",label:"CardDateContainer"})(c.text,";"),m=(0,r.default)("p",{target:"e1x8f48e4",label:"CardBody"})(c.text,";color:",l.colors.text,";margin:24px 0 0;overflow-wrap:break-word;word-break:break-word;hyphens:auto;"),g=(0,r.default)("div",{target:"e1x8f48e5",label:"CardButtonContainer"})("background-color:",l.colors.foreground,";position:absolute;bottom:0;width:100%;padding:12px 18px;display:flex;opacity:0;transition:opacity ",l.transitions.main,";cursor:pointer;"),v=(0,r.default)("button",{target:"e1x8f48e6",label:"DeleteButton"})(c.button,";background-color:",l.colorsRaw.redLight,";color:",l.colorsRaw.red,";margin-right:6px;"),y=(0,r.default)("button",{target:"e1x8f48e7",label:"PublishButton"})(c.button,";background-color:",l.colorsRaw.teal,";color:",l.colors.textLight,";margin-left:6px;&[disabled]{background-color:",l.colorsRaw.grayLight,";color:",l.colorsRaw.gray,";}"),b=(0,r.default)("div",{target:"e1x8f48e8",label:"WorkflowCardContainer"})(l.components.card,";margin-bottom:24px;position:relative;overflow:hidden;&:hover ",g,"{opacity:1;}"),_=(0,a.translate)()(({t:e,date:t,author:n})=>{const r=((e,t)=>e&&t?"lastChange":e?"lastChangeNoAuthor":t?"lastChangeNoDate":void 0)(t,n);if(r)return(0,o.jsx)(h,null,e("workflow.workflowCard.".concat(r),{date:t,author:n}))}),w=({collectionLabel:e,title:t,authorLastChange:n,body:r,isModification:i,editLink:a,timestamp:s,onDelete:l,canPublish:u,onPublish:c,t:h})=>(0,o.jsx)(b,null,(0,o.jsx)(d,{to:a},(0,o.jsx)(f,null,e),(0,o.jsx)(p,null,t),(s||n)&&(0,o.jsx)(_,{date:s,author:n}),(0,o.jsx)(m,null,r)),(0,o.jsx)(g,null,(0,o.jsx)(v,{onClick:l},h(i?"workflow.workflowCard.deleteChanges":"workflow.workflowCard.deleteNewEntry")),(0,o.jsx)(y,{disabled:!u,onClick:c},h(i?"workflow.workflowCard.publishChanges":"workflow.workflowCard.publishNewEntry"))));w.propTypes={collectionLabel:i.default.string.isRequired,title:i.default.string,authorLastChange:i.default.string,body:i.default.string,isModification:i.default.bool,editLink:i.default.string.isRequired,timestamp:i.default.string.isRequired,onDelete:i.default.func.isRequired,canPublish:i.default.bool.isRequired,onPublish:i.default.func.isRequired,t:i.default.func.isRequired};var E=(0,a.translate)()(w);t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Editor=void 0;var r=w(n(219)),i=w(n(1)),o=w(n(0)),a=w(n(26)),s=n(87),l=n(16),u=n(49),c=w(n(231)),d=n(200),f=n(125),p=n(215),h=n(496),m=n(85),g=n(96),v=n(95),y=w(n(1091)),b=w(n(1107)),_=n(9);function w(e){return e&&e.__esModule?e:{default:e}}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=e=>c.default.push("/collections/".concat(e)),k=e=>x(e),S=e=>x("".concat(e,"/new"));class O extends o.default.Component{constructor(...e){super(...e),E(this,"createBackup",(0,r.default)((function(e,t){this.props.persistLocalBackup(e,t)}),2e3)),E(this,"handleChangeDraftField",(e,t,n)=>{const r=[this.props.unPublishedEntry,this.props.publishedEntry].filter(Boolean);this.props.changeDraftField(e,t,n,r)}),E(this,"handleChangeStatus",e=>{const{entryDraft:t,updateUnpublishedEntryStatus:n,collection:r,slug:i,currentStatus:o,t:a}=this.props;if(t.get("hasChanged"))return void window.alert(a("editor.editor.onUpdatingWithUnsavedChanges"));const s=v.status.get(e);n(r.get("name"),i,o,s)}),E(this,"handlePersistEntry",async(e={})=>{const{createNew:t=!1,duplicate:n=!1}=e,{persistEntry:r,collection:i,currentStatus:o,hasWorkflow:a,loadEntry:s,slug:l,createDraftDuplicateFromEntry:u,entryDraft:c}=this.props;await r(i),this.deleteBackup(i,l),t?(S(i.get("name")),n&&u(c.get("entry"))):l&&a&&!o&&s(i,l)}),E(this,"handlePublishEntry",async(e={})=>{const{createNew:t=!1,duplicate:n=!1}=e,{publishUnpublishedEntry:r,createDraftDuplicateFromEntry:i,entryDraft:o,collection:a,slug:s,currentStatus:l,t:u}=this.props;l===v.status.last()?o.get("hasChanged")?window.alert(u("editor.editor.onPublishingWithUnsavedChanges")):window.confirm(u("editor.editor.onPublishing"))&&(await r(a.get("name"),s),this.deleteBackup(),t&&S(a.get("name")),n&&i(o.get("entry"))):window.alert(u("editor.editor.onPublishingNotReady"))}),E(this,"handleUnpublishEntry",async()=>{const{unpublishPublishedEntry:e,collection:t,slug:n,t:r}=this.props;if(window.confirm(r("editor.editor.onUnpublishing")))return await e(t,n),k(t.get("name"))}),E(this,"handleDuplicateEntry",()=>{const{createDraftDuplicateFromEntry:e,collection:t,entryDraft:n}=this.props;S(t.get("name")),e(n.get("entry"))}),E(this,"handleDeleteEntry",()=>{const{entryDraft:e,newEntry:t,collection:n,deleteEntry:r,slug:i,t:o}=this.props;if(e.get("hasChanged")){if(!window.confirm(o("editor.editor.onDeleteWithUnsavedChanges")))return}else if(!window.confirm(o("editor.editor.onDeletePublishedEntry")))return;if(t)return k(n.get("name"));setTimeout(async()=>(await r(n,i),this.deleteBackup(),k(n.get("name"))),0)}),E(this,"handleDeleteUnpublishedChanges",async()=>{const{entryDraft:e,collection:t,slug:n,deleteUnpublishedEntry:r,loadEntry:i,isModification:o,t:a}=this.props;e.get("hasChanged")&&!window.confirm(a("editor.editor.onDeleteUnpublishedChangesWithUnsavedChanges"))||window.confirm(a("editor.editor.onDeleteUnpublishedChanges"))&&(await r(t.get("name"),n),this.deleteBackup(),o?i(t,n):k(t.get("name")))})}componentDidMount(){const{newEntry:e,collection:t,slug:n,loadEntry:r,createEmptyDraft:i,loadEntries:o,retrieveLocalBackup:a,collectionEntriesLoaded:s,t:l}=this.props;a(t,n),e?i(t,this.props.location.search):r(t,n);const u=l("editor.editor.onLeavePage");this.exitBlocker=e=>{if(this.props.entryDraft.get("hasChanged"))return e.returnValue=u,u},window.addEventListener("beforeunload",this.exitBlocker);const d=c.default.block((e,n)=>{const r=this.props.entryDraft.getIn(["entry","isPersisting"]),i=this.props.entryDraft.getIn(["entry","newRecord"]),o="/collections/".concat(t.get("name"),"/new");if(!r||!i||this.props.location.pathname!==o||"PUSH"!==n)return this.props.hasChanged?u:void 0});this.unlisten=c.default.listen((e,n)=>{const r="/collections/".concat(t.get("name"),"/new"),i="/collections/".concat(t.get("name"),"/entries/"),{pathname:o}=e;o.startsWith(r)||o.startsWith(i)&&"PUSH"===n||(this.deleteBackup(),d(),this.unlisten())}),s||o(t)}componentDidUpdate(e){const t=this.props.entryDraft&&this.props.entryDraft.getIn(["entry","slug"]);var n,r;if(!e.slug&&t&&this.props.newEntry&&(n=e.collection.get("name"),r=t,x("".concat(n,"/entries/").concat(r)),this.props.loadEntry(this.props.collection,t)),!e.localBackup&&this.props.localBackup){window.confirm(this.props.t("editor.editor.confirmLoadBackup"))?this.props.loadLocalBackup():this.deleteBackup()}if(this.props.hasChanged&&this.createBackup(this.props.entryDraft.get("entry"),this.props.collection),e.entry===this.props.entry)return;const{newEntry:i,collection:o}=this.props;i&&e.createEmptyDraft(o,this.props.location.search)}componentWillUnmount(){this.createBackup.flush(),this.props.discardDraft(),window.removeEventListener("beforeunload",this.exitBlocker)}deleteBackup(){const{deleteLocalBackup:e,collection:t,slug:n,newEntry:r}=this.props;this.createBackup.cancel(),e(t,!r&&n)}render(){const{entry:e,entryDraft:t,fields:n,collection:r,changeDraftFieldValidation:i,user:o,hasChanged:a,displayUrl:s,hasWorkflow:u,useOpenAuthoring:c,unpublishedEntry:d,newEntry:f,isModification:p,currentStatus:h,logoutUser:m,deployPreview:g,loadDeployPreview:v,draftKey:b,slug:w,t:E}=this.props,x=!f&&!d;return e&&e.get("error")?(0,_.jsx)("div",null,(0,_.jsx)("h3",null,e.get("error"))):null==t||void 0===t.get("entry")||e&&e.get("isFetching")?(0,_.jsx)(l.Loader,{active:!0},E("editor.editor.loadingEntry")):(0,_.jsx)(y.default,{draftKey:b,entry:t.get("entry"),collection:r,fields:n,fieldsMetaData:t.get("fieldsMetaData"),fieldsErrors:t.get("fieldsErrors"),onChange:this.handleChangeDraftField,onValidate:i,onPersist:this.handlePersistEntry,onDelete:this.handleDeleteEntry,onDeleteUnpublishedChanges:this.handleDeleteUnpublishedChanges,onChangeStatus:this.handleChangeStatus,onPublish:this.handlePublishEntry,unPublish:this.handleUnpublishEntry,onDuplicate:this.handleDuplicateEntry,showDelete:this.props.showDelete,user:o,hasChanged:a,displayUrl:s,hasWorkflow:u,useOpenAuthoring:c,hasUnpublishedChanges:d,isNewEntry:f,isModification:p,currentStatus:h,onLogoutClick:m,deployPreview:g,loadDeployPreview:t=>v(r,w,e,x,t)})}}t.Editor=O,E(O,"propTypes",{changeDraftField:i.default.func.isRequired,changeDraftFieldValidation:i.default.func.isRequired,collection:a.default.map.isRequired,createDraftDuplicateFromEntry:i.default.func.isRequired,createEmptyDraft:i.default.func.isRequired,discardDraft:i.default.func.isRequired,entry:a.default.map,entryDraft:a.default.map.isRequired,loadEntry:i.default.func.isRequired,persistEntry:i.default.func.isRequired,deleteEntry:i.default.func.isRequired,showDelete:i.default.bool.isRequired,fields:a.default.list.isRequired,slug:i.default.string,newEntry:i.default.bool.isRequired,displayUrl:i.default.string,hasWorkflow:i.default.bool,useOpenAuthoring:i.default.bool,unpublishedEntry:i.default.bool,isModification:i.default.bool,collectionEntriesLoaded:i.default.bool,updateUnpublishedEntryStatus:i.default.func.isRequired,publishUnpublishedEntry:i.default.func.isRequired,deleteUnpublishedEntry:i.default.func.isRequired,logoutUser:i.default.func.isRequired,loadEntries:i.default.func.isRequired,deployPreview:a.default.map,loadDeployPreview:i.default.func.isRequired,currentStatus:i.default.string,user:a.default.map.isRequired,location:i.default.shape({pathname:i.default.string,search:i.default.string}),hasChanged:i.default.bool,t:i.default.func.isRequired,retrieveLocalBackup:i.default.func.isRequired,localBackup:a.default.map,loadLocalBackup:i.default.func,persistLocalBackup:i.default.func.isRequired,deleteLocalBackup:i.default.func});const T={changeDraftField:f.changeDraftField,changeDraftFieldValidation:f.changeDraftFieldValidation,loadEntry:f.loadEntry,loadEntries:f.loadEntries,loadDeployPreview:h.loadDeployPreview,loadLocalBackup:f.loadLocalBackup,retrieveLocalBackup:f.retrieveLocalBackup,persistLocalBackup:f.persistLocalBackup,deleteLocalBackup:f.deleteLocalBackup,createDraftDuplicateFromEntry:f.createDraftDuplicateFromEntry,createEmptyDraft:f.createEmptyDraft,discardDraft:f.discardDraft,persistEntry:f.persistEntry,deleteEntry:f.deleteEntry,updateUnpublishedEntryStatus:p.updateUnpublishedEntryStatus,publishUnpublishedEntry:p.publishUnpublishedEntry,unpublishPublishedEntry:p.unpublishPublishedEntry,deleteUnpublishedEntry:p.deleteUnpublishedEntry,logoutUser:d.logoutUser};var C=(0,s.connect)((function(e,t){const{collections:n,entryDraft:r,auth:i,config:o,entries:a,globalUI:s}=e,l=t.match.params[0],u=n.get(t.match.params.name),c=u.get("name"),d=!0===t.newRecord,f=(0,g.selectFields)(u,l),p=d?null:(0,m.selectEntry)(e,c,l),h=i&&i.get("user"),y=r.get("hasChanged"),b=o.get("display_url"),_=o.get("publish_mode")===v.EDITORIAL_WORKFLOW,w=s.get("useOpenAuthoring",!1),E=r.getIn(["entry","isModification"]),x=!!a.getIn(["pages",c]),k=(0,m.selectUnpublishedEntry)(e,c,l),S=(0,m.selectEntry)(e,c,l),O=k&&k.getIn(["metaData","status"]),T=(0,m.selectDeployPreview)(e,c,l),C=r.get("localBackup"),A=r.get("key");return{collection:u,collections:n,newEntry:d,entryDraft:r,fields:f,slug:l,entry:p,user:h,hasChanged:y,displayUrl:b,hasWorkflow:_,useOpenAuthoring:w,isModification:E,collectionEntriesLoaded:x,currentStatus:O,deployPreview:T,localBackup:C,draftKey:A,publishedEntry:S,unPublishedEntry:k}}),T)((0,b.default)((0,u.translate)()(O)));t.default=C},function(e,t,n){var r=n(67);e.exports=function(){return r.Date.now()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=m(n(19)),i=m(n(1)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),a=m(n(26)),s=n(9),l=m(n(1092)),u=n(16),c=n(535),d=m(n(1094)),f=m(n(1098)),p=m(n(1106));function h(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v={splitPane:(0,s.css)(u.components.card,";border-radius:0;height:100%;;label:splitPane;"),pane:{name:"nq3sgi-pane",styles:"height:100%;overflow-y:auto;;label:pane;"}},y=(0,r.default)(u.IconButton,{target:"e1pxf6c40",label:"EditorToggle"})({name:"1upilqn",styles:"margin-bottom:12px;"}),b=()=>(0,s.jsx)(s.Global,{styles:(0,s.css)(".Resizer.vertical{width:21px;cursor:col-resize;position:relative;transition:background-color ",u.transitions.main,";&:before{content:'';width:2px;height:100%;position:relative;left:10px;background-color:",u.colors.textFieldBorder,";display:block;}&:hover,&:active{background-color:",u.colorsRaw.GrayLight,";}};label:ReactSplitPaneGlobalStyles;")}),_=(0,r.default)(l.default,{target:"e1pxf6c41",label:"StyledSplitPane"})(v.splitPane,";.Pane{height:100%;}"),w=(0,r.default)("div",{target:"e1pxf6c42",label:"NoPreviewContainer"})(v.splitPane,";"),E=(0,r.default)("div",{target:"e1pxf6c43",label:"EditorContainer"})("width:100%;min-width:800px;height:100%;position:absolute;top:0;left:0;overflow:hidden;padding-top:66px;background-color:",u.colors.background,";"),x=(0,r.default)("div",{target:"e1pxf6c44",label:"Editor"})({name:"1gs40ov",styles:"height:100%;margin:0 auto;position:relative;"}),k=(0,r.default)("div",{target:"e1pxf6c45",label:"PreviewPaneContainer"})("height:100%;overflow-y:auto;pointer-events:",e=>e.blockEntry?"none":"auto",";"),S=(0,r.default)(k,{target:"e1pxf6c46",label:"ControlPaneContainer"})({name:"pjxpm9",styles:"padding:0 16px;position:relative;overflow-x:hidden;"}),O=(0,r.default)("div",{target:"e1pxf6c47",label:"ViewControls"})({name:"1hu71zb",styles:"position:absolute;top:10px;right:10px;z-index:299;"});class T extends o.Component{constructor(...e){super(...e),g(this,"state",{showEventBlocker:!1,previewVisible:"false"!==localStorage.getItem("cms.preview-visible"),scrollSyncEnabled:"false"!==localStorage.getItem("cms.scroll-sync-enabled")}),g(this,"handleSplitPaneDragStart",()=>{this.setState({showEventBlocker:!0})}),g(this,"handleSplitPaneDragFinished",()=>{this.setState({showEventBlocker:!1})}),g(this,"handleOnPersist",(e={})=>{const{createNew:t=!1,duplicate:n=!1}=e;this.controlPaneRef.validate(),this.props.onPersist({createNew:t,duplicate:n})}),g(this,"handleOnPublish",(e={})=>{const{createNew:t=!1,duplicate:n=!1}=e;this.controlPaneRef.validate(),this.props.onPublish({createNew:t,duplicate:n})}),g(this,"handleTogglePreview",()=>{const e=!this.state.previewVisible;this.setState({previewVisible:e}),localStorage.setItem("cms.preview-visible",e)}),g(this,"handleToggleScrollSync",()=>{const e=!this.state.scrollSyncEnabled;this.setState({scrollSyncEnabled:e}),localStorage.setItem("cms.scroll-sync-enabled",e)})}render(){const{collection:e,entry:t,fields:n,fieldsMetaData:r,fieldsErrors:i,onChange:o,showDelete:a,onDelete:l,onDeleteUnpublishedChanges:u,onChangeStatus:h,onPublish:m,unPublish:g,onDuplicate:v,onValidate:T,user:C,hasChanged:A,displayUrl:P,hasWorkflow:R,useOpenAuthoring:M,hasUnpublishedChanges:I,isNewEntry:D,isModification:j,currentStatus:L,onLogoutClick:N,loadDeployPreview:F,deployPreview:B,draftKey:U}=this.props,{previewVisible:z,scrollSyncEnabled:q,showEventBlocker:H}=this.state,W=e.getIn(["editor","preview"],!0),G=(0,s.jsx)(S,{blockEntry:H},(0,s.jsx)(d.default,{collection:e,entry:t,fields:n,fieldsMetaData:r,fieldsErrors:i,onChange:o,onValidate:T,ref:e=>this.controlPaneRef=e})),V=(0,s.jsx)(c.ScrollSync,{enabled:this.state.scrollSyncEnabled},(0,s.jsx)("div",null,(0,s.jsx)(b,null),(0,s.jsx)(_,{maxSize:-100,defaultSize:parseInt(localStorage.getItem("cms.split-pane-position"),10)||"50%",onChange:e=>localStorage.setItem("cms.split-pane-position",e),onDragStarted:this.handleSplitPaneDragStart,onDragFinished:this.handleSplitPaneDragFinished},(0,s.jsx)(c.ScrollSyncPane,null,G),(0,s.jsx)(k,{blockEntry:H},(0,s.jsx)(f.default,{collection:e,entry:t,fields:n,fieldsMetaData:r})))));return(0,s.jsx)(E,null,(0,s.jsx)(p.default,{isPersisting:t.get("isPersisting"),isPublishing:t.get("isPublishing"),isUpdatingStatus:t.get("isUpdatingStatus"),isDeleting:t.get("isDeleting"),onPersist:this.handleOnPersist,onPersistAndNew:()=>this.handleOnPersist({createNew:!0}),onPersistAndDuplicate:()=>this.handleOnPersist({createNew:!0,duplicate:!0}),onDelete:l,onDeleteUnpublishedChanges:u,onChangeStatus:h,showDelete:a,onPublish:m,unPublish:g,onDuplicate:v,onPublishAndNew:()=>this.handleOnPublish({createNew:!0}),onPublishAndDuplicate:()=>this.handleOnPublish({createNew:!0,duplicate:!0}),user:C,hasChanged:A,displayUrl:P,collection:e,hasWorkflow:R,useOpenAuthoring:M,hasUnpublishedChanges:I,isNewEntry:D,isModification:j,currentStatus:L,onLogoutClick:N,loadDeployPreview:F,deployPreview:B}),(0,s.jsx)(x,{key:U},(0,s.jsx)(O,null,W&&(0,s.jsx)(y,{isActive:z,onClick:this.handleTogglePreview,size:"large",type:"eye",title:"Toggle preview"}),W&&z&&(0,s.jsx)(y,{isActive:q,onClick:this.handleToggleScrollSync,size:"large",type:"scroll",title:"Sync scrolling"})),W&&this.state.previewVisible?V:(0,s.jsx)(w,null,G)))}}T.propTypes={collection:a.default.map.isRequired,entry:a.default.map.isRequired,fields:a.default.list.isRequired,fieldsMetaData:a.default.map.isRequired,fieldsErrors:a.default.map.isRequired,onChange:i.default.func.isRequired,onValidate:i.default.func.isRequired,onPersist:i.default.func.isRequired,showDelete:i.default.bool.isRequired,onDelete:i.default.func.isRequired,onDeleteUnpublishedChanges:i.default.func.isRequired,onPublish:i.default.func.isRequired,unPublish:i.default.func.isRequired,onDuplicate:i.default.func.isRequired,onChangeStatus:i.default.func.isRequired,user:a.default.map.isRequired,hasChanged:i.default.bool,displayUrl:i.default.string,hasWorkflow:i.default.bool,useOpenAuthoring:i.default.bool,hasUnpublishedChanges:i.default.bool,isNewEntry:i.default.bool,isModification:i.default.bool,currentStatus:i.default.string,onLogoutClick:i.default.func.isRequired,deployPreview:a.default.map,loadDeployPreview:i.default.func.isRequired,draftKey:i.default.string.isRequired};var C=T;t.default=C},function(e,t,n){"use strict";n.r(t),n.d(t,"Pane",(function(){return _}));var r=n(0),i=n.n(r),o=n(1),a=n.n(o),s=n(137),l=n.n(s),u=n(225);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n=0?n:1/0;return Math.max(i,Math.min(o,r))}return void 0!==e?e:t}w.propTypes={className:a.a.string.isRequired,onClick:a.a.func,onDoubleClick:a.a.func,onMouseDown:a.a.func.isRequired,onTouchStart:a.a.func.isRequired,onTouchEnd:a.a.func.isRequired,split:a.a.oneOf(["vertical","horizontal"]),style:l.a,resizerClassName:a.a.string.isRequired},w.defaultProps={resizerClassName:"Resizer"};var k=function(e){function t(e){var n;c(this,t),(n=b(this,g(t).call(this,e))).onMouseDown=n.onMouseDown.bind(y(y(n))),n.onTouchStart=n.onTouchStart.bind(y(y(n))),n.onMouseMove=n.onMouseMove.bind(y(y(n))),n.onTouchMove=n.onTouchMove.bind(y(y(n))),n.onMouseUp=n.onMouseUp.bind(y(y(n)));var r=e.size,i=e.defaultSize,o=e.minSize,a=e.maxSize,s=e.primary,l=void 0!==r?r:x(i,o,a,null);return n.state={active:!1,resized:!1,pane1Size:"first"===s?l:void 0,pane2Size:"second"===s?l:void 0,instanceProps:{size:r}},n}return m(t,e),f(t,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(t.getSizeUpdate(this.props,this.state))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove)}},{key:"onMouseDown",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchStart(t)}},{key:"onTouchStart",value:function(e){var t=this.props,n=t.allowResize,r=t.onDragStarted,i=t.split;if(n){E(document,window);var o="vertical"===i?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:o})}}},{key:"onMouseMove",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchMove(t)}},{key:"onTouchMove",value:function(e){var t=this.props,n=t.allowResize,r=t.maxSize,i=t.minSize,o=t.onChange,a=t.split,s=t.step,l=this.state,u=l.active,c=l.position;if(n&&u){E(document,window);var d="first"===this.props.primary,f=d?this.pane1:this.pane2,h=d?this.pane2:this.pane1;if(f){var m=f,g=h;if(m.getBoundingClientRect){var v=m.getBoundingClientRect().width,y=m.getBoundingClientRect().height,b="vertical"===a?v:y,_=c-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(_)parseInt(window.getComputedStyle(g).order)&&(w=-w);var x=r;if(void 0!==r&&r<=0){var k=this.splitPane;x="vertical"===a?k.getBoundingClientRect().width+r:k.getBoundingClientRect().height+r}var S=b-w,O=c-_;Sx?S=x:this.setState({position:O,resized:!0}),o&&o(S),this.setState(p({draggedSize:S},d?"pane1Size":"pane2Size",S))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,i=r.active,o=r.draggedSize;t&&i&&("function"==typeof n&&n(o),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,r=t.children,o=t.className,a=t.onResizerClick,s=t.onResizerDoubleClick,l=t.paneClassName,u=t.pane1ClassName,c=t.pane2ClassName,d=t.paneStyle,f=t.pane1Style,p=t.pane2Style,m=t.resizerClassName,g=t.resizerStyle,v=t.split,y=t.style,b=this.state,E=b.pane1Size,x=b.pane2Size,k=n?"":"disabled",S=m?"".concat(m," ").concat("Resizer"):m,O=function(e){return i.a.Children.toArray(e).filter((function(e){return e}))}(r),T=h({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},y);"vertical"===v?Object.assign(T,{flexDirection:"row",left:0,right:0}):Object.assign(T,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var C=["SplitPane",o,v,k],A=h({},d,f),P=h({},d,p),R=["Pane1",l,u].join(" "),M=["Pane2",l,c].join(" ");return i.a.createElement("div",{className:C.join(" "),ref:function(t){e.splitPane=t},style:T},i.a.createElement(_,{className:R,key:"pane1",eleRef:function(t){e.pane1=t},size:E,split:v,style:A},O[0]),i.a.createElement(w,{className:k,onClick:a,onDoubleClick:s,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:S,split:v,style:g||{}}),i.a.createElement(_,{className:M,key:"pane2",eleRef:function(t){e.pane2=t},size:x,split:v,style:P},O[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,n){return t.getSizeUpdate(e,n)}},{key:"getSizeUpdate",value:function(e,t){var n={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var r=void 0!==e.size?e.size:x(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var i="first"===e.primary;return n[i?"pane1Size":"pane2Size"]=r,n[i?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),t}(i.a.Component);k.propTypes={allowResize:a.a.bool,children:a.a.arrayOf(a.a.node).isRequired,className:a.a.string,primary:a.a.oneOf(["first","second"]),minSize:a.a.oneOfType([a.a.string,a.a.number]),maxSize:a.a.oneOfType([a.a.string,a.a.number]),defaultSize:a.a.oneOfType([a.a.string,a.a.number]),size:a.a.oneOfType([a.a.string,a.a.number]),split:a.a.oneOf(["vertical","horizontal"]),onDragStarted:a.a.func,onDragFinished:a.a.func,onChange:a.a.func,onResizerClick:a.a.func,onResizerDoubleClick:a.a.func,style:l.a,resizerStyle:l.a,paneClassName:a.a.string,pane1ClassName:a.a.string,pane2ClassName:a.a.string,paneStyle:l.a,pane1Style:l.a,pane2Style:l.a,resizerClassName:a.a.string,step:a.a.number},k.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},Object(u.polyfill)(k),t.default=k},function(e,t){e.exports=["alignContent","MozAlignContent","WebkitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebkitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebkitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebkitAll","MSAll","OAll","animation","MozAnimation","WebkitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebkitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebkitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebkitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebkitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebkitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebkitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebkitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebkitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebkitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebkitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebkitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebkitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebkitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebkitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebkitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebkitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebkitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebkitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebkitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebkitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebkitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebkitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebkitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebkitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebkitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebkitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebkitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebkitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebkitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebkitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebkitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebkitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebkitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebkitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebkitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebkitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebkitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebkitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebkitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebkitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebkitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebkitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebkitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebkitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebkitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebkitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebkitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebkitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebkitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebkitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebkitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebkitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebkitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebkitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebkitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebkitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebkitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebkitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebkitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebkitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebkitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebkitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebkitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebkitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebkitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebkitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebkitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebkitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebkitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebkitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebkitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebkitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebkitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebkitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebkitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebkitCaptionSide","MSCaptionSide","OCaptionSide","caretColor","MozCaretColor","WebkitCaretColor","MSCaretColor","OCaretColor","ch","MozCh","WebkitCh","MSCh","OCh","clear","MozClear","WebkitClear","MSClear","OClear","clip","MozClip","WebkitClip","MSClip","OClip","clipPath","MozClipPath","WebkitClipPath","MSClipPath","OClipPath","cm","MozCm","WebkitCm","MSCm","OCm","color","MozColor","WebkitColor","MSColor","OColor","columnCount","MozColumnCount","WebkitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebkitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebkitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebkitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebkitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebkitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebkitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebkitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebkitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebkitColumns","MSColumns","OColumns","content","MozContent","WebkitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebkitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebkitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebkitCursor","MSCursor","OCursor","deg","MozDeg","WebkitDeg","MSDeg","ODeg","direction","MozDirection","WebkitDirection","MSDirection","ODirection","display","MozDisplay","WebkitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebkitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebkitDpi","MSDpi","ODpi","dppx","MozDppx","WebkitDppx","MSDppx","ODppx","em","MozEm","WebkitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebkitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebkitEx","MSEx","OEx","filter","MozFilter","WebkitFilter","MSFilter","OFilter","flexBasis","MozFlexBasis","WebkitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebkitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebkitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebkitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebkitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebkitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebkitFloat","MSFloat","OFloat","font","MozFont","WebkitFont","MSFont","OFont","fontFamily","MozFontFamily","WebkitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebkitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebkitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebkitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebkitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebkitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebkitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebkitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebkitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebkitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebkitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebkitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebkitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebkitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebkitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebkitFontWeight","MSFontWeight","OFontWeight","fr","MozFr","WebkitFr","MSFr","OFr","grad","MozGrad","WebkitGrad","MSGrad","OGrad","grid","MozGrid","WebkitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebkitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebkitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebkitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebkitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebkitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebkitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebkitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebkitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebkitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebkitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebkitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebkitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebkitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebkitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebkitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebkitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebkitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebkitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebkitHyphens","MSHyphens","OHyphens","hz","MozHz","WebkitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebkitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebkitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebkitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebkitImeMode","MSImeMode","OImeMode","in","MozIn","WebkitIn","MSIn","OIn","inherit","MozInherit","WebkitInherit","MSInherit","OInherit","initial","MozInitial","WebkitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebkitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebkitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebkitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebkitKhz","MSKhz","OKhz","left","MozLeft","WebkitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebkitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebkitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebkitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebkitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebkitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebkitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebkitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebkitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebkitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebkitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebkitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebkitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebkitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebkitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebkitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebkitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebkitMask","MSMask","OMask","maskClip","MozMaskClip","WebkitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebkitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebkitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebkitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebkitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebkitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebkitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebkitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebkitMaskType","MSMaskType","OMaskType","maxHeight","MozMaxHeight","WebkitMaxHeight","MSMaxHeight","OMaxHeight","maxWidth","MozMaxWidth","WebkitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebkitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebkitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebkitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebkitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebkitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebkitMm","MSMm","OMm","ms","MozMs","WebkitMs","MSMs","OMs","objectFit","MozObjectFit","WebkitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebkitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebkitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebkitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebkitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebkitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebkitOpacity","MSOpacity","OOpacity","order","MozOrder","WebkitOrder","MSOrder","OOrder","orphans","MozOrphans","WebkitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebkitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebkitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebkitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebkitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebkitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebkitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebkitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebkitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebkitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebkitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebkitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebkitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebkitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebkitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebkitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebkitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebkitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebkitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebkitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebkitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebkitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebkitPc","MSPc","OPc","perspective","MozPerspective","WebkitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebkitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebkitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebkitPosition","MSPosition","OPosition","pt","MozPt","WebkitPt","MSPt","OPt","px","MozPx","WebkitPx","MSPx","OPx","q","MozQ","WebkitQ","MSQ","OQ","quotes","MozQuotes","WebkitQuotes","MSQuotes","OQuotes","rad","MozRad","WebkitRad","MSRad","ORad","rem","MozRem","WebkitRem","MSRem","ORem","resize","MozResize","WebkitResize","MSResize","OResize","revert","MozRevert","WebkitRevert","MSRevert","ORevert","right","MozRight","WebkitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebkitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebkitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebkitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebkitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebkitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebkitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebkitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebkitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebkitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebkitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebkitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebkitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebkitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebkitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebkitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebkitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebkitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebkitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebkitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebkitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebkitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebkitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebkitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebkitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebkitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebkitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebkitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebkitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebkitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebkitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebkitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebkitTop","MSTop","OTop","touchAction","MozTouchAction","WebkitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebkitTransform","msTransform","OTransform","transformBox","MozTransformBox","WebkitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebkitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebkitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebkitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebkitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebkitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebkitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebkitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebkitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebkitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebkitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebkitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebkitVh","MSVh","OVh","visibility","MozVisibility","WebkitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebkitVmax","MSVmax","OVmax","vmin","MozVmin","WebkitVmin","MSVmin","OVmin","vw","MozVw","WebkitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebkitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebkitWidows","MSWidows","OWidows","width","MozWidth","WebkitWidth","MSWidth","OWidth","willChange","MozWillChange","WebkitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebkitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebkitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebkitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebkitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebkitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","flex","MozFlex","WebkitFlex","MSFlex","OFlex","fr","MozFr","WebkitFr","MSFr","OFr","overflowScrolling","MozOverflowScrolling","WebkitOverflowScrolling","MSOverflowScrolling","OOverflowScrolling","userSelect","MozUserSelect","WebkitUserSelect","MSUserSelect","OUserSelect"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(19)),i=u(n(0)),o=u(n(1)),a=u(n(26)),s=u(n(1095)),l=n(9);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,r.default)("div",{target:"e1tnasa20",label:"ControlPaneContainer"})({name:"78woh1",styles:"max-width:800px;margin:0 auto;padding-bottom:16px;font-size:16px;"});class f extends i.default.Component{constructor(...e){super(...e),c(this,"componentValidate",{}),c(this,"validate",()=>{this.props.fields.forEach(e=>{"hidden"!==e.get("widget")&&this.componentValidate[e.get("name")]()})})}controlRef(e,t){var n;if(!t)return;const r=e.get("name");this.componentValidate[r]=(null===(n=t.innerWrappedControl)||void 0===n?void 0:n.validate)||t.validate}render(){const{collection:e,fields:t,entry:n,fieldsMetaData:r,fieldsErrors:i,onChange:o,onValidate:a}=this.props;return e&&t?0===n.size||!0===n.get("partial")?null:(0,l.jsx)(d,null,t.map((e,t)=>"hidden"===e.get("widget")?null:(0,l.jsx)(s.default,{key:t,field:e,value:n.getIn(["data",e.get("name")]),fieldsMetaData:r,fieldsErrors:i,onChange:o,onValidate:a,processControlRef:this.controlRef.bind(this),controlRef:this.controlRef}))):null}}t.default=f,f.propTypes={collection:a.default.map.isRequired,entry:a.default.map.isRequired,fields:a.default.list.isRequired,fieldsMetaData:a.default.map.isRequired,fieldsErrors:a.default.map.isRequired,onChange:o.default.func.isRequired,onValidate:o.default.func.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ControlHint=void 0;var r=w(n(19)),i=w(n(1096)),o=w(n(152)),a=w(n(0)),s=n(154),l=w(n(1)),u=w(n(26)),c=n(49),d=n(9),f=n(87),p=n(16),h=n(127),m=n(125),g=n(147),v=n(261),y=n(260),b=n(129),_=w(n(1097));function w(e){return e&&e.__esModule?e:{default:e}}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;te.error?p.colors.errorText:e.active?p.colors.active:p.colors.controlLabel,";transition:color ",p.transitions.main,";");t.ControlHint=L;class N extends a.default.Component{constructor(...e){super(...e),M(this,"state",{activeLabel:!1}),M(this,"uniqueFieldId",(0,i.default)("".concat(this.props.field.get("name"),"-field-")))}render(){const{value:e,field:t,fieldsMetaData:n,fieldsErrors:r,mediaPaths:i,boundGetAsset:a,onChange:s,openMediaLibrary:l,clearMediaControl:u,removeMediaControl:c,addAsset:f,removeInsertedMedia:m,onValidate:g,processControlRef:v,controlRef:y,query:b,queryHits:w,isFetching:E,clearSearch:x,clearFieldErrors:R,loadEntry:M,className:N,isSelected:B,isEditorComponent:U,isNewEditorComponent:z,t:q}=this.props,H=t.get("widget"),W=(0,h.resolveWidget)(H),G=t.get("name"),V=t.get("hint"),K=!1===t.get("required"),$=g,Y=n&&n.get(G),Q=r&&r.get(this.uniqueFieldId);return(0,d.jsx)(d.ClassNames,null,({css:n,cx:H})=>(0,d.jsx)(D,{className:N},W.globalStyles&&(0,d.jsx)(d.Global,{styles:(0,d.css)(W.globalStyles,";label:EditorControl;")}),Q&&(0,d.jsx)(j,null,Q.map(e=>e.message&&"string"==typeof e.message&&(0,d.jsx)("li",{key:e.message.trim().replace(/[^a-z0-9]+/gi,"-")},e.message))),(0,d.jsx)(p.FieldLabel,{isActive:B||this.state.styleActive,hasErrors:!!Q,htmlFor:this.uniqueFieldId},"".concat(t.get("label",t.get("name"))).concat(K?" (".concat(q("editor.editorControl.field.optional"),")"):"")),(0,d.jsx)(_.default,{classNameWrapper:H(n(P(),I.widget),{[n(A(),I.widgetActive)]:B||this.state.styleActive},{[n(C(),I.widgetError)]:!!Q}),classNameWidget:n(T(),I.widget),classNameWidgetActive:n(O(),I.widgetActive),classNameLabel:n(S(),I.label),classNameLabelActive:n(k(),I.labelActive),controlComponent:W.control,field:t,uniqueFieldId:this.uniqueFieldId,value:e,mediaPaths:i,metadata:Y,onChange:(e,t)=>s(G,e,t),onValidate:g&&(0,o.default)(g,this.uniqueFieldId),onOpenMediaLibrary:l,onClearMediaControl:u,onRemoveMediaControl:c,onRemoveInsertedMedia:m,onAddAsset:f,getAsset:a,hasActiveStyle:B||this.state.styleActive,setActiveStyle:()=>this.setState({styleActive:!0}),setInactiveStyle:()=>this.setState({styleActive:!1}),resolveWidget:h.resolveWidget,widget:W,getEditorComponents:h.getEditorComponents,ref:v&&(0,o.default)(v,t),controlRef:y,editorControl:F,query:b,loadEntry:M,queryHits:w,clearSearch:x,clearFieldErrors:R,isFetching:E,fieldsErrors:r,onValidateObject:$,isEditorComponent:U,isNewEditorComponent:z,t:q}),V&&(0,d.jsx)(L,{active:B||this.state.styleActive,error:!!Q},V)))}}M(N,"propTypes",{value:l.default.oneOfType([l.default.node,l.default.object,l.default.string,l.default.bool]),field:u.default.map.isRequired,fieldsMetaData:u.default.map,fieldsErrors:u.default.map,mediaPaths:u.default.map.isRequired,boundGetAsset:l.default.func.isRequired,onChange:l.default.func.isRequired,openMediaLibrary:l.default.func.isRequired,addAsset:l.default.func.isRequired,removeInsertedMedia:l.default.func.isRequired,onValidate:l.default.func,processControlRef:l.default.func,controlRef:l.default.func,query:l.default.func.isRequired,queryHits:l.default.oneOfType([l.default.array,l.default.object]),isFetching:l.default.bool,clearSearch:l.default.func.isRequired,clearFieldErrors:l.default.func.isRequired,loadEntry:l.default.func.isRequired,t:l.default.func.isRequired,isEditorComponent:l.default.bool,isNewEditorComponent:l.default.bool});const F=(0,f.connect)(e=>{const{collections:t,entryDraft:n}=e,r=n.get("entry"),i=t.get(n.getIn(["entry","collection"])),o=(0,v.selectIsLoadingAsset)(e.medias);return{mediaPaths:e.mediaLibrary.get("controlMedia"),isFetching:e.search.get("isFetching"),queryHits:e.search.get("queryHits"),collection:i,entry:r,isLoadingAsset:o,loadEntry:async(n,r)=>{const i=t.get(n);if(i){return await(0,m.tryLoadEntry)(e,i,r)}throw new Error("Can't find collection '".concat(n,"'"))}}},e=>x({},(0,s.bindActionCreators)({openMediaLibrary:b.openMediaLibrary,clearMediaControl:b.clearMediaControl,removeMediaControl:b.removeMediaControl,removeInsertedMedia:b.removeInsertedMedia,addAsset:g.addAsset,query:y.query,clearSearch:y.clearSearch,clearFieldErrors:m.clearFieldErrors},e),{boundGetAsset:(t,n)=>(0,g.boundGetAsset)(e,t,n)}),(e,t,n)=>x({},e,{},t,{},n,{boundGetAsset:t.boundGetAsset(e.collection,e.entry)}))((0,c.translate)()(N));var B=F;t.default=B},function(e,t,n){var r=n(109),i=0;e.exports=function(e){var t=++i;return r(e)+t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(1)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=c(n(26)),a=n(3),s=n(98),l=c(n(347));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function d(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n this.wrappedControlValid is not a function. Are you sure widget\n "','" is registered?\n ']);return d=function(){return e},e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=()=>({error:!1}),h=e=>null==e||Object.prototype.hasOwnProperty.call(e,"length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length||a.List.isList(e)&&0===e.size;class m extends i.Component{constructor(...e){super(...e),f(this,"processInnerControlRef",e=>{if(!e)return;this.innerWrappedControl=e.getWrappedInstance?e.getWrappedInstance():e,this.wrappedControlValid=this.innerWrappedControl.isValid||p;const{shouldComponentUpdate:t}=this.innerWrappedControl;this.wrappedControlShouldComponentUpdate=t&&t.bind(this.innerWrappedControl)}),f(this,"validate",(e=!1)=>{let t=this.props.value;a.List.isList(t)&&(t=t.join(","));const n=this.props.field,r=[];if([this.validatePresence,this.validatePattern].forEach(e=>{const i=e(n,t);i.error&&r.push(i.error)}),e)e.error&&r.push(e.error);else{const e=this.validateWrappedControl(n);e.error&&r.push(e.error)}this.props.onValidate(r)}),f(this,"validatePresence",(e,t)=>{const n=this.props.t;if(e.get("required",!0)&&h(t)){return{error:{type:l.default.PRESENCE,message:n("editor.editorControlPane.widget.required",{fieldLabel:e.get("label",e.get("name"))})}}}return{error:!1}}),f(this,"validatePattern",(e,t)=>{const n=this.props.t,r=e.get("pattern",!1);if(h(t))return{error:!1};if(r&&!RegExp(r.first()).test(t)){return{error:{type:l.default.PATTERN,message:n("editor.editorControlPane.widget.regexPattern",{fieldLabel:e.get("label",e.get("name")),pattern:r.last()})}}}return{error:!1}}),f(this,"validateWrappedControl",e=>{const t=this.props.t;if("function"!=typeof this.wrappedControlValid)throw new Error((0,s.oneLine)(d(),e.get("widget")));const n=this.wrappedControlValid();if("boolean"==typeof n){return{error:!n}}if(Object.prototype.hasOwnProperty.call(n,"error"))return n;if(n instanceof Promise){return n.then(()=>{this.validate({error:!1})},t=>{const n={type:l.default.CUSTOM,message:"".concat(e.get("label",e.get("name"))," - ").concat(t,".")};this.validate({error:n})}),{error:{type:l.default.CUSTOM,message:t("editor.editorControlPane.widget.processing",{fieldLabel:e.get("label",e.get("name"))})}}}return{error:!1}}),f(this,"getObjectValue",()=>this.props.value||(0,a.Map)()),f(this,"onChangeObject",(e,t,n)=>{const r=this.getObjectValue().set(e,t);return this.props.onChange(r,n&&{[this.props.field.get("name")]:n})})}shouldComponentUpdate(e){return this.wrappedControlShouldComponentUpdate?this.wrappedControlShouldComponentUpdate(e):this.props.value!==e.value||this.props.classNameWrapper!==e.classNameWrapper||this.props.hasActiveStyle!==e.hasActiveStyle}render(){const{controlComponent:e,field:t,value:n,mediaPaths:r,metadata:o,onChange:a,onValidateObject:s,onOpenMediaLibrary:l,onRemoveMediaControl:u,onClearMediaControl:c,onAddAsset:d,onRemoveInsertedMedia:f,getAsset:p,classNameWrapper:h,classNameWidget:m,classNameWidgetActive:g,classNameLabel:v,classNameLabelActive:y,setActiveStyle:b,setInactiveStyle:_,hasActiveStyle:w,editorControl:E,uniqueFieldId:x,resolveWidget:k,widget:S,getEditorComponents:O,query:T,queryHits:C,clearSearch:A,clearFieldErrors:P,isFetching:R,loadEntry:M,fieldsErrors:I,controlRef:D,isEditorComponent:j,isNewEditorComponent:L,t:N}=this.props;return i.default.createElement(e,{field:t,value:n,mediaPaths:r,metadata:o,onChange:a,onChangeObject:this.onChangeObject,onValidateObject:s,onOpenMediaLibrary:l,onClearMediaControl:c,onRemoveMediaControl:u,onAddAsset:d,onRemoveInsertedMedia:f,getAsset:p,forID:x,ref:this.processInnerControlRef,validate:this.validate,classNameWrapper:h,classNameWidget:m,classNameWidgetActive:g,classNameLabel:v,classNameLabelActive:y,setActiveStyle:b,setInactiveStyle:_,hasActiveStyle:w,editorControl:E,resolveWidget:k,widget:S,getEditorComponents:O,query:T,queryHits:C,clearSearch:A,clearFieldErrors:P,isFetching:R,loadEntry:M,isEditorComponent:j,isNewEditorComponent:L,fieldsErrors:I,controlRef:D,t:N})}}t.default=m,f(m,"propTypes",{controlComponent:r.default.func.isRequired,field:o.default.map.isRequired,hasActiveStyle:r.default.bool,setActiveStyle:r.default.func.isRequired,setInactiveStyle:r.default.func.isRequired,classNameWrapper:r.default.string.isRequired,classNameWidget:r.default.string.isRequired,classNameWidgetActive:r.default.string.isRequired,classNameLabel:r.default.string.isRequired,classNameLabelActive:r.default.string.isRequired,value:r.default.oneOfType([r.default.node,r.default.object,r.default.string,r.default.bool]),mediaPaths:o.default.map.isRequired,metadata:o.default.map,fieldsErrors:o.default.map,onChange:r.default.func.isRequired,onValidate:r.default.func,onOpenMediaLibrary:r.default.func.isRequired,onClearMediaControl:r.default.func.isRequired,onRemoveMediaControl:r.default.func.isRequired,onAddAsset:r.default.func.isRequired,onRemoveInsertedMedia:r.default.func.isRequired,getAsset:r.default.func.isRequired,resolveWidget:r.default.func.isRequired,widget:r.default.object.isRequired,getEditorComponents:r.default.func.isRequired,isFetching:r.default.bool,controlRef:r.default.func,query:r.default.func.isRequired,clearSearch:r.default.func.isRequired,clearFieldErrors:r.default.func.isRequired,queryHits:r.default.oneOfType([r.default.array,r.default.object]),editorControl:r.default.func.isRequired,uniqueFieldId:r.default.string.isRequired,loadEntry:r.default.func.isRequired,t:r.default.func.isRequired,onValidateObject:r.default.func,isEditorComponent:r.default.bool,isNewEditorComponent:r.default.bool})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.PreviewPane=void 0;var r=w(n(19)),i=w(n(1)),o=w(n(0)),a=n(3),s=w(n(26)),l=w(n(536)),u=n(16),c=n(127),d=n(180),f=n(96),p=n(87),h=n(147),m=n(261),g=n(458),v=w(n(1101)),y=w(n(1104)),b=w(n(1105)),_=n(9);function w(e){return e&&e.__esModule?e:{default:e}}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t{const{getAsset:o,entry:s}=r,l=(0,c.resolveWidget)(e.get("widget")),u=i?e.get("name")+"_"+i:e.get("name"),d=t&&!l.allowMapValue&&a.Map.isMap(t);return l.preview?(0,_.jsx)(y.default,{previewComponent:l.preview,key:u,field:e,getAsset:o,value:d?t.get(e.get("name")):t,entry:s,fieldsMetaData:n,resolveWidget:c.resolveWidget}):null}),k(this,"inferedFields",{}),k(this,"widgetFor",(e,t=this.props.fields,n=this.props.entry.get("data"),r=this.props.fieldsMetaData)=>{let i=t&&t.find(t=>t.get("name")===e),o=n&&n.get(i.get("name"));const s=i.get("fields"),l=i.get("field"),u=r&&r.get(i.get("name"),(0,a.Map)());s&&(i=i.set("fields",this.getNestedWidgets(s,o,u))),l&&(i=i.set("field",this.getSingleNested(l,o,u)));const c=Object.entries(this.inferedFields).filter(([e])=>(0,f.selectField)(this.props.collection,e)===i).map(([,e])=>e)[0];return c?o=c.defaultPreview(o):o&&-1!==["string","text","number"].indexOf(i.get("widget"))&&o.toString().length<50&&(o=(0,_.jsx)("div",null,(0,_.jsx)("strong",null,i.get("label",i.get("name")),":")," ",o)),o?this.getWidget(i,o,u,this.props):null}),k(this,"getNestedWidgets",(e,t,n)=>a.List.isList(t)?t.map(t=>this.widgetsForNestedFields(e,t,n)):this.widgetsForNestedFields(e,t,n)),k(this,"getSingleNested",(e,t,n)=>a.List.isList(t)?t.map((t,r)=>this.getWidget(e,t,n.get(e.get("name")),this.props,r)):this.getWidget(e,t,n.get(e.get("name")),this.props)),k(this,"widgetsForNestedFields",(e,t,n)=>e.map(r=>this.widgetFor(r.get("name"),e,t,n))),k(this,"widgetsFor",e=>{const{fields:t,entry:n,fieldsMetaData:r}=this.props,i=t.find(t=>t.get("name")===e),o=i&&i.get("fields"),s=n.getIn(["data",i.get("name")]),l=r.get(i.get("name"),(0,a.Map)());return a.List.isList(s)?s.map(e=>{const t=o&&(0,a.Map)(o.map((t,n)=>[t.get("name"),(0,_.jsx)("div",{key:n},this.getWidget(t,e,l.get(t.get("name")),this.props))]));return(0,a.Map)({data:e,widgets:t})}):(0,a.Map)({data:s,widgets:o&&(0,a.Map)(o.map(e=>[e.get("name"),this.getWidget(e,s,l.get(e.get("name")),this.props)]))})})}inferFields(){const e=(0,f.selectInferedField)(this.props.collection,"title"),t=(0,f.selectInferedField)(this.props.collection,"shortTitle"),n=(0,f.selectInferedField)(this.props.collection,"author");this.inferedFields={},e&&(this.inferedFields[e]=g.INFERABLE_FIELDS.title),t&&(this.inferedFields[t]=g.INFERABLE_FIELDS.shortTitle),n&&(this.inferedFields[n]=g.INFERABLE_FIELDS.author)}render(){const{entry:e,collection:t}=this.props;if(!e||!e.get("data"))return null;const n=(0,c.getPreviewTemplate)((0,f.selectTemplateName)(t,e.get("slug")))||b.default;this.inferFields();const r=x({},this.props,{widgetFor:this.widgetFor,widgetsFor:this.widgetsFor}),i=(0,c.getPreviewStyles)().map((e,t)=>e.raw?(0,_.jsx)("style",{key:t},e.value):(0,_.jsx)("link",{key:t,href:e.value,type:"text/css",rel:"stylesheet"}));t||(0,_.jsx)(S,{head:i});return(0,_.jsx)(d.ErrorBoundary,null,(0,_.jsx)(S,{head:i,initialContent:'\n\n\n \n
\n\n'},(0,_.jsx)(v.default,{previewComponent:n,previewProps:r})))}}t.PreviewPane=O,O.propTypes={collection:s.default.map.isRequired,fields:s.default.list.isRequired,entry:s.default.map.isRequired,fieldsMetaData:s.default.map.isRequired,getAsset:i.default.func.isRequired};var T=(0,p.connect)(e=>({isLoadingAsset:(0,m.selectIsLoadingAsset)(e.medias)}),e=>({boundGetAsset:(t,n)=>(0,h.boundGetAsset)(e,t,n)}),(e,t,n)=>x({},e,{},t,{},n,{getAsset:t.boundGetAsset(n.collection,n.entry)}))(O);t.default=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t
'},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n(0,l.jsx)(a.ScrollSyncPane,{attachTo:n.document.scrollingElement},(0,o.isElement)(e)?i.default.cloneElement(e,t):i.default.createElement(e,t)))}}c.propTypes={previewComponent:r.default.func.isRequired,previewProps:r.default.object};var d=c;t.default=d},function(e,t,n){"use strict";e.exports=n(1103)},function(e,t,n){"use strict"; /** @license React v16.12.0 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case d:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case g:case u:return e;default:return t}}case o:return t}}}function E(e){return w(e)===f}t.typeOf=w,t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=i,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===y||e.$$typeof===b||e.$$typeof===_)},t.isAsyncMode=function(e){return E(e)||w(e)===d},t.isConcurrentMode=E,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===h}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),i=a(n(1)),o=a(n(26));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}class l extends r.default.Component{shouldComponentUpdate(e){return["object","list"].includes(e.field.get("widget"))||this.props.value!==e.value||this.props.fieldsMetaData!==e.fieldsMetaData||this.props.getAsset!==e.getAsset}render(){const e=this.props,{previewComponent:t}=e,n=s(e,["previewComponent"]);return r.default.createElement(t,n)}}l.propTypes={previewComponent:i.default.func.isRequired,field:o.default.map.isRequired,value:i.default.oneOfType([i.default.node,i.default.object,i.default.string,i.default.bool])};var u=l;t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=l(n(0)),o=l(n(1)),a=l(n(26)),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return"hidden"!==e.get("widget")}const c=(0,r.default)("div",{target:"e1r8oqnq0",label:"PreviewContainer"})({name:"1gj2677",styles:"font-family:Roboto,'Helvetica Neue',HelveticaNeue,Helvetica,Arial,sans-serif;"});class d extends i.default.Component{render(){const{collection:e,fields:t,widgetFor:n}=this.props;return e&&t?(0,s.jsx)(c,null,t.filter(u).map(e=>(0,s.jsx)("div",{key:e.get("name")},n(e.get("name"))))):null}}t.default=d,d.propTypes={collection:a.default.map.isRequired,entry:a.default.map.isRequired,fields:a.default.list.isRequired,getAsset:o.default.func.isRequired,widgetFor:o.default.func.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(19)),i=h(n(0)),o=h(n(1)),a=h(n(26)),s=n(9),l=n(49),u=n(3),c=n(130),d=n(16),f=n(95),p=h(n(538));function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g={noOverflow:{name:"1ven8wv-noOverflow",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;;label:noOverflow;"},buttonMargin:{name:"1yqtsv2-buttonMargin",styles:"margin:0 10px;;label:buttonMargin;"},toolbarSection:(0,s.css)("height:100%;display:flex;align-items:center;border:0 solid ",d.colors.textFieldBorder,";;label:toolbarSection;"),publishedButton:(0,s.css)("background-color:",d.colorsRaw.tealLight,";color:",d.colorsRaw.teal,";;label:publishedButton;")},v=(0,r.default)(d.StyledDropdownButton,{target:"evqrzhe0",label:"DropdownButton"})(g.noOverflow," @media (max-width:1200px){padding-left:10px;}"),y=(0,r.default)("div",{target:"evqrzhe1",label:"ToolbarContainer"})({name:"fykiwf",styles:"box-shadow:0 2px 6px 0 rgba(68,74,87,0.05),0 1px 3px 0 rgba(68,74,87,0.1),0 2px 54px rgba(0,0,0,0.1);position:fixed;top:0;left:0;width:100%;min-width:800px;z-index:300;background-color:#fff;height:66px;display:flex;justify-content:space-between;"}),b=(0,r.default)("div",{target:"evqrzhe2",label:"ToolbarSectionMain"})(g.toolbarSection,";flex:10;display:flex;justify-content:space-between;padding:0 10px;"),_=(0,r.default)("div",{target:"evqrzhe3",label:"ToolbarSubSectionFirst"})({name:"70qvj9",styles:"display:flex;align-items:center;"}),w=(0,r.default)(_,{target:"evqrzhe4",label:"ToolbarSubSectionLast"})({name:"1a9getn",styles:"justify-content:flex-end;"}),E=(0,r.default)(c.Link,{target:"evqrzhe5",label:"ToolbarSectionBackLink"})(g.toolbarSection,";border-right-width:1px;font-weight:normal;padding:0 20px;&:hover,&:focus{background-color:#f1f2f4;}"),x=(0,r.default)("div",{target:"evqrzhe6",label:"ToolbarSectionMeta"})(g.toolbarSection,";border-left-width:1px;padding:0 7px;"),k=(0,r.default)(d.Dropdown,{target:"evqrzhe7",label:"ToolbarDropdown"})(g.buttonMargin,";",d.Icon,"{color:",d.colorsRaw.teal,";}"),S=(0,r.default)("div",{target:"evqrzhe8",label:"BackArrow"})("color:",d.colors.textLead,";font-size:21px;font-weight:600;margin-right:16px;"),O=(0,r.default)("div",{target:"evqrzhe9",label:"BackCollection"})("color:",d.colors.textLead,";font-size:14px;"),T=(0,r.default)("div",{target:"evqrzhe10",label:"BackStatus"})({name:"19ug521",styles:"margin-top:6px;"}),C=(0,r.default)(T,{target:"evqrzhe11",label:"BackStatusUnchanged"})(d.components.textBadgeSuccess,";&::after{height:12px;width:15.5px;color:",d.colors.successText,";margin-left:5px;position:relative;top:1px;content:url(\"data:image/svg+xml; utf8, \");}"),A=(0,r.default)(T,{target:"evqrzhe12",label:"BackStatusChanged"})(d.components.textBadgeDanger,";"),P=(0,r.default)("button",{target:"evqrzhe13",label:"ToolbarButton"})(d.buttons.button,";",d.buttons.default,";",g.buttonMargin,";",g.noOverflow,";display:block;@media (max-width:1200px){padding:0 10px;}"),R=(0,r.default)(P,{target:"evqrzhe14",label:"DeleteButton"})(d.buttons.lightRed,";"),M=(0,r.default)(P,{target:"evqrzhe15",label:"SaveButton"})(d.buttons.lightBlue,";"),I=(0,r.default)(v,{target:"evqrzhe16",label:"PublishedToolbarButton"})(g.publishedButton,""),D=(0,r.default)(P,{target:"evqrzhe17",label:"PublishedButton"})(g.publishedButton,""),j=(0,r.default)(v,{target:"evqrzhe18",label:"PublishButton"})("background-color:",d.colorsRaw.teal,";"),L=(0,r.default)(v,{target:"evqrzhe19",label:"StatusButton"})("background-color:",d.colorsRaw.tealLight,";color:",d.colorsRaw.teal,";"),N=(0,r.default)("div",{target:"evqrzhe20",label:"PreviewButtonContainer"})("margin-right:12px;color:",d.colorsRaw.blue,";display:flex;align-items:center;a,",d.Icon,"{color:",d.colorsRaw.blue,";}",d.Icon,"{position:relative;top:1px;}"),F=(0,r.default)("button",{target:"evqrzhe21",label:"RefreshPreviewButton"})("background:none;border:0;cursor:pointer;color:",d.colorsRaw.blue,";span{margin-right:6px;}"),B=F.withComponent("a",{target:"evqrzhe23",label:"PreviewLink"}),U=(0,r.default)(d.DropdownItem,{target:"evqrzhe22",label:"StatusDropdownItem"})(d.Icon,"{color:",d.colors.infoText,";}");class z extends i.default.Component{constructor(...e){super(...e),m(this,"renderSimpleSaveControls",()=>{const{showDelete:e,onDelete:t,t:n}=this.props;return(0,s.jsx)("div",null,e?(0,s.jsx)(R,{onClick:t},n("editor.editorToolbar.deleteEntry")):null)}),m(this,"renderDeployPreviewControls",e=>{const{deployPreview:t=(0,u.Map)(),loadDeployPreview:n,t:r}=this.props,i=t.get("url"),o=t.get("status");if(!o)return;const a=t.get("isFetching"),l="SUCCESS"===o&&!a;return(0,s.jsx)(N,null,l?(0,s.jsx)(B,{rel:"noopener noreferrer",target:"_blank",href:i},(0,s.jsx)("span",null,e),(0,s.jsx)(d.Icon,{type:"new-tab",size:"xsmall"})):(0,s.jsx)(F,{onClick:n},(0,s.jsx)("span",null,r("editor.editorToolbar.deployPreviewPendingButtonLabel")),(0,s.jsx)(d.Icon,{type:"refresh",size:"xsmall"})))}),m(this,"renderSimplePublishControls",()=>{const{collection:e,onPersist:t,onPersistAndNew:n,onPersistAndDuplicate:r,onDuplicate:o,isPersisting:a,hasChanged:l,isNewEntry:u,t:c}=this.props,f=e.get("create");return u||l?(0,s.jsx)("div",null,(0,s.jsx)(k,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,s.jsx)(j,null,c(a?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,s.jsx)(d.DropdownItem,{label:c("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:t}),f?(0,s.jsx)(i.default.Fragment,null,(0,s.jsx)(d.DropdownItem,{label:c("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:n}),(0,s.jsx)(d.DropdownItem,{label:c("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:r})):null)):(0,s.jsx)(i.default.Fragment,null,this.renderDeployPreviewControls(c("editor.editorToolbar.deployButtonLabel")),f?(0,s.jsx)(k,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,s.jsx)(I,null,c("editor.editorToolbar.published"))},(0,s.jsx)(d.DropdownItem,{label:c("editor.editorToolbar.duplicate"),icon:"add",onClick:o})):(0,s.jsx)(D,null,c("editor.editorToolbar.published")))}),m(this,"renderWorkflowSaveControls",()=>{const{onPersist:e,onDelete:t,onDeleteUnpublishedChanges:n,showDelete:r,hasChanged:i,hasUnpublishedChanges:o,isPersisting:a,isDeleting:l,isNewEntry:u,isModification:c,t:d}=this.props,f=o&&c&&d("editor.editorToolbar.deleteUnpublishedChanges")||o&&(u||!c)&&d("editor.editorToolbar.deleteUnpublishedEntry")||!o&&!c&&d("editor.editorToolbar.deletePublishedEntry");return[(0,s.jsx)(M,{key:"save-button",onClick:()=>i&&e()},d(a?"editor.editorToolbar.saving":"editor.editorToolbar.save")),r||o||c?(0,s.jsx)(R,{key:"delete-button",onClick:o?n:t},l?d("editor.editorToolbar.deleting"):f):null]}),m(this,"renderWorkflowPublishControls",()=>{const{collection:e,isUpdatingStatus:t,isPublishing:n,onChangeStatus:r,onPublish:o,unPublish:a,onDuplicate:l,onPublishAndNew:u,onPublishAndDuplicate:c,currentStatus:p,isNewEntry:h,useOpenAuthoring:m,isPersisting:g,t:v}=this.props,y=e.get("create");return p?(0,s.jsx)(i.default.Fragment,null,this.renderDeployPreviewControls(v("editor.editorToolbar.deployPreviewButtonLabel")),(0,s.jsx)(k,{dropdownTopOverlap:"40px",dropdownWidth:"120px",renderButton:()=>(0,s.jsx)(L,null,v(t?"editor.editorToolbar.updating":"editor.editorToolbar.setStatus"))},(0,s.jsx)(U,{label:v("editor.editorToolbar.draft"),onClick:()=>r("DRAFT"),icon:p===f.status.get("DRAFT")?"check":null}),(0,s.jsx)(U,{label:v("editor.editorToolbar.inReview"),onClick:()=>r("PENDING_REVIEW"),icon:p===f.status.get("PENDING_REVIEW")?"check":null}),m?"":(0,s.jsx)(U,{label:v("editor.editorToolbar.ready"),onClick:()=>r("PENDING_PUBLISH"),icon:p===f.status.get("PENDING_PUBLISH")?"check":null})),m?"":(0,s.jsx)(k,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,s.jsx)(j,null,v(n?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,s.jsx)(d.DropdownItem,{label:v("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:o}),y?(0,s.jsx)(i.default.Fragment,null,(0,s.jsx)(d.DropdownItem,{label:v("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:u}),(0,s.jsx)(d.DropdownItem,{label:v("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:c})):null)):h?void 0:(0,s.jsx)(i.default.Fragment,null,this.renderDeployPreviewControls(v("editor.editorToolbar.deployButtonLabel")),(0,s.jsx)(k,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,s.jsx)(I,null,v(g?"editor.editorToolbar.unpublishing":"editor.editorToolbar.published"))},(0,s.jsx)(d.DropdownItem,{label:v("editor.editorToolbar.unpublish"),icon:"arrow",iconDirection:"right",onClick:a}),y&&(0,s.jsx)(d.DropdownItem,{label:v("editor.editorToolbar.duplicate"),icon:"add",onClick:l})))})}componentDidMount(){const{isNewEntry:e,loadDeployPreview:t}=this.props;e||t({maxAttempts:3})}componentDidUpdate(e){const{isNewEntry:t,isPersisting:n,loadDeployPreview:r}=this.props;t||!e.isPersisting||n||r({maxAttempts:3})}render(){const{user:e,hasChanged:t,displayUrl:n,collection:r,hasWorkflow:i,onLogoutClick:o,t:a}=this.props;return(0,s.jsx)(y,null,(0,s.jsx)(E,{to:"/collections/".concat(r.get("name"))},(0,s.jsx)(S,null,"←"),(0,s.jsx)("div",null,(0,s.jsx)(O,null,a("editor.editorToolbar.backCollection",{collectionLabel:r.get("label")})),t?(0,s.jsx)(A,null,a("editor.editorToolbar.unsavedChanges")):(0,s.jsx)(C,null,a("editor.editorToolbar.changesSaved")))),(0,s.jsx)(b,null,(0,s.jsx)(_,null,i?this.renderWorkflowSaveControls():this.renderSimpleSaveControls()),(0,s.jsx)(w,null,i?this.renderWorkflowPublishControls():this.renderSimplePublishControls())),(0,s.jsx)(x,null,(0,s.jsx)(p.default,{displayUrl:n,imageUrl:e.get("avatar_url"),onLogoutClick:o})))}}m(z,"propTypes",{isPersisting:o.default.bool,isPublishing:o.default.bool,isUpdatingStatus:o.default.bool,isDeleting:o.default.bool,onPersist:o.default.func.isRequired,onPersistAndNew:o.default.func.isRequired,onPersistAndDuplicate:o.default.func.isRequired,showDelete:o.default.bool.isRequired,onDelete:o.default.func.isRequired,onDeleteUnpublishedChanges:o.default.func.isRequired,onChangeStatus:o.default.func.isRequired,onPublish:o.default.func.isRequired,unPublish:o.default.func.isRequired,onDuplicate:o.default.func.isRequired,onPublishAndNew:o.default.func.isRequired,onPublishAndDuplicate:o.default.func.isRequired,user:a.default.map.isRequired,hasChanged:o.default.bool,displayUrl:o.default.string,collection:a.default.map.isRequired,hasWorkflow:o.default.bool,useOpenAuthoring:o.default.bool,hasUnpublishedChanges:o.default.bool,isNewEntry:o.default.bool,isModification:o.default.bool,currentStatus:o.default.string,onLogoutClick:o.default.func.isRequired,deployPreview:a.default.map,loadDeployPreview:o.default.func.isRequired,t:o.default.func.isRequired});var q=(0,l.translate)()(z);t.default=q},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.connect)(p,null,h)(class extends i.default.Component{render(){return(0,c.jsx)(e,this.props)}})};var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(87),a=n(95),s=n(85),l=n(96),u=n(215),c=n(9);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){const{collections:n}=e,r=e.config.get("publish_mode")===a.EDITORIAL_WORKFLOW,i=n.get(t.match.params.name),o={isEditorialWorkflow:r,showDelete:!t.newEntry&&(0,l.selectAllowDeletion)(i)};if(r){const n=t.match.params[0],r=(0,s.selectUnpublishedEntry)(e,i.get("name"),n);r&&(o.unpublishedEntry=!0,o.entry=r)}return o}function h(e,t,n){const{isEditorialWorkflow:r,unpublishedEntry:i}=e,{dispatch:o}=t,a={};return r&&(a.loadEntry=(e,t)=>o((0,u.loadUnpublishedEntry)(e,t)),a.persistEntry=e=>o((0,u.persistUnpublishedEntry)(e,i))),function(e){for(var t=1;t(0,s.jsx)(u,null,(0,s.jsx)("h2",null,e("app.notFoundPage.header")));c.propTypes={t:a.default.func.isRequired};var d=(0,i.translate)()(c);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(19)),i=f(n(1)),o=f(n(0)),a=f(n(26)),s=n(9),l=n(49),u=n(130),c=n(16),d=f(n(538));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t(0,s.jsx)("header",h({css:(0,s.css)(c.shadows.dropMain,";position:sticky;width:100%;top:0;background-color:",c.colors.foreground,";z-index:300;height:",c.lengths.topBarHeight,";;label:AppHeader;")},e)),v=(0,r.default)("div",{target:"e16dayda0",label:"AppHeaderContent"})({name:"oh6t3a",styles:"display:flex;justify-content:space-between;min-width:800px;max-width:1440px;padding:0 12px;margin:0 auto;"}),y=(0,r.default)("button",{target:"e16dayda1",label:"AppHeaderButton"})(c.buttons.button,";background:none;color:#7b8290;font-family:inherit;font-size:16px;font-weight:500;display:inline-flex;padding:16px 20px;align-items:center;",c.Icon,"{margin-right:4px;color:#b3b9c4;}&:hover,&:active,&:focus{",m.buttonActive,";",c.Icon,"{",m.buttonActive,";}}",e=>(0,s.css)("&.",e.activeClassName,"{",m.buttonActive,";",c.Icon,"{",m.buttonActive,";}};label:AppHeaderButton;"),";"),b=y.withComponent(u.NavLink,{target:"e16dayda5",label:"AppHeaderNavLink"}),_=(0,r.default)("div",{target:"e16dayda2",label:"AppHeaderActions"})({name:"18biwo",styles:"display:inline-flex;align-items:center;"}),w=(0,r.default)(c.StyledDropdownButton,{target:"e16dayda3",label:"AppHeaderQuickNewButton"})(c.buttons.button,";",c.buttons.medium,";",c.buttons.gray,";margin-right:8px;&:after{top:11px;}"),E=(0,r.default)("ul",{target:"e16dayda4",label:"AppHeaderNavList"})({name:"lsxu3a",styles:"display:flex;margin:0;list-style:none;"});class x extends o.default.Component{constructor(...e){super(...e),p(this,"handleCreatePostClick",e=>{const{onCreateEntryClick:t}=this.props;t&&t(e)})}render(){const{user:e,collections:t,onLogoutClick:n,openMediaLibrary:r,hasWorkflow:i,displayUrl:o,isTestRepo:a,t:l,showMediaButton:u}=this.props,f=t.filter(e=>e.get("create")).toList();return(0,s.jsx)(g,null,(0,s.jsx)(v,null,(0,s.jsx)("nav",null,(0,s.jsx)(E,null,(0,s.jsx)("li",null,(0,s.jsx)(b,{to:"/",activeClassName:"header-link-active",isActive:(e,t)=>t.pathname.startsWith("/collections/")},(0,s.jsx)(c.Icon,{type:"page"}),l("app.header.content"))),i&&(0,s.jsx)("li",null,(0,s.jsx)(b,{to:"/workflow",activeClassName:"header-link-active"},(0,s.jsx)(c.Icon,{type:"workflow"}),l("app.header.workflow"))),u&&(0,s.jsx)("li",null,(0,s.jsx)(y,{onClick:r},(0,s.jsx)(c.Icon,{type:"media-alt"}),l("app.header.media"))))),(0,s.jsx)(_,null,f.size>0&&(0,s.jsx)(c.Dropdown,{renderButton:()=>(0,s.jsx)(w,null," ",l("app.header.quickAdd")),dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},f.map(e=>(0,s.jsx)(c.DropdownItem,{key:e.get("name"),label:e.get("label_singular")||e.get("label"),onClick:()=>this.handleCreatePostClick(e.get("name"))}))),(0,s.jsx)(d.default,{displayUrl:o,isTestRepo:a,imageUrl:e.get("avatar_url"),onLogoutClick:n}))))}}p(x,"propTypes",{user:a.default.map.isRequired,collections:a.default.orderedMap.isRequired,onCreateEntryClick:i.default.func.isRequired,onLogoutClick:i.default.func.isRequired,openMediaLibrary:i.default.func.isRequired,hasWorkflow:i.default.bool.isRequired,displayUrl:i.default.string,isTestRepo:i.default.bool,t:i.default.func.isRequired});var k=(0,l.translate)()(x);t.default=k},function(e,t,n){"use strict";var r=n(127),i=a(n(1111)),o=a(n(1112));function a(e){return e&&e.__esModule?e:{default:e}}(0,r.registerWidget)("unknown",i.default,o.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;s(n(0));var r=n(49),i=s(n(26)),o=s(n(1)),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l=({field:e,t:t})=>(0,a.jsx)("div",null,t("editor.editorWidgets.unknownControl.noControl",{widget:e.get("widget")}));l.propTypes={field:i.default.map,t:o.default.func.isRequired};var u=(0,r.translate)()(l);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;s(n(0));var r=n(49),i=s(n(26)),o=s(n(1)),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}const l=({field:e,t:t})=>(0,a.jsx)("div",{className:"nc-widgetPreview"},t("editor.editorWidgets.unknownPreview.noPreview",{widget:e.get("widget")}));l.propTypes={field:i.default.map,t:o.default.func.isRequired};var u=(0,r.translate)()(l);t.default=u},function(e,t,n){"use strict";var r=l(n(359)),i=n(127),o=l(n(400)),a=n(144),s=n(129);function l(e){return e&&e.__esModule?e:{default:e}}const u=(0,r.default)((async function(e,t){const n=(0,i.getMediaLibrary)(e);if(n){const e=e=>o.default.dispatch((0,s.insertMedia)(e,void 0)),r=await n.init({options:t,handleInsert:e});o.default.dispatch((0,s.createMediaLibrary)(r))}else{const t=new Error("Missing external media library '".concat(e,"'. Please use 'registerMediaLibrary' to register it."));o.default.dispatch((0,a.configFailed)(t))}}));o.default.subscribe(()=>{const e=o.default.getState(),t=e.config.getIn(["media_library","name"]);if(t&&!e.mediaLibrary.get("externalLibrary")){const n=e.config.get("media_library").toJS();u(t,n)}})},function(e,t,n){var r=n(112);e.exports=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},function(e,t,n){ /** * what-input - A global utility for tracking the current input method (mouse, keyboard or touch). * @version v5.2.7 * @link https://github.com/ten1seven/what-input * @license MIT */ var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){"use strict";e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",r=n,i=Date.now(),o="false",a=["button","input","select","textarea"],s=[],l=[16,17,18,91,93],u=[],c={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},d=!1,f={x:null,y:null},p={2:"touch",3:"touch",4:"mouse"},h=!1;try{var m=Object.defineProperty({},"passive",{get:function(){h=!0}});window.addEventListener("test",null,m)}catch(e){}var g=function(){var e=!!h&&{passive:!0};document.addEventListener("DOMContentLoaded",v),window.PointerEvent?(window.addEventListener("pointerdown",y),window.addEventListener("pointermove",_)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",y),window.addEventListener("MSPointerMove",_)):(window.addEventListener("mousedown",y),window.addEventListener("mousemove",_),"ontouchstart"in window&&(window.addEventListener("touchstart",y,e),window.addEventListener("touchend",y))),window.addEventListener(O(),_,e),window.addEventListener("keydown",y),window.addEventListener("keyup",y),window.addEventListener("focusin",w),window.addEventListener("focusout",E)},v=function(){if(o=!(e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(r=window.sessionStorage.getItem("what-intent"))}catch(e){}b("input"),b("intent")},y=function(e){var t=e.which,i=c[e.type];"pointer"===i&&(i=k(e));var o=!u.length&&-1===l.indexOf(t),s=u.length&&-1!==u.indexOf(t),d="keyboard"===i&&t&&(o||s)||"mouse"===i||"touch"===i;if(S(i)&&(d=!1),d&&n!==i&&(x("input",n=i),b("input")),d&&r!==i){var f=document.activeElement;f&&f.nodeName&&(-1===a.indexOf(f.nodeName.toLowerCase())||"button"===f.nodeName.toLowerCase()&&!A(f,"form"))&&(x("intent",r=i),b("intent"))}},b=function(t){e.setAttribute("data-what"+t,"input"===t?n:r),T(t)},_=function(e){var t=c[e.type];"pointer"===t&&(t=k(e)),C(e),(!d&&!S(t)||d&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&r!==t&&(x("intent",r=t),b("intent"))},w=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):E()},E=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},x=function(e,t){if(o)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},k=function(e){return"number"==typeof e.pointerType?p[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},S=function(e){var t=Date.now(),r="mouse"===e&&"touch"===n&&t-i<200;return i=t,r},O=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},T=function(e){for(var t=0,i=s.length;tthis.tokenPromise().then(t=>u.unsentRequest.withHeaders({Authorization:"Bearer ".concat(t)},e)).then(u.unsentRequest.performRequest)),this.options=b({proxied:!0,API:null,initialWorkflowStatus:""},t),this.config=e,this.branch=(null===(n=e.backend.branch)||void 0===n?void 0:n.trim())||"master",this.squashMerges=e.backend.squash_merges||!1,this.mediaFolder=e.media_folder,this.transformImages=e.backend.use_large_media_transforms_in_media_library||!0;const r=localStorage.getItem("netlifySiteURL"),i=S(e.backend.identity_url||E,r);this.gatewayUrl=S(e.backend.gateway_url||x,r),this.netlifyLargeMediaURL=S(e.backend.large_media_url||k,r);const o=/\/(github|gitlab|bitbucket)\/?$/,s=this.gatewayUrl.match(o);s?(this.backendType=s[1],this.gatewayUrl=this.gatewayUrl.replace(o,"")):this.backendType=null,this.authClient=window.netlifyIdentity?window.netlifyIdentity.gotrue:new a.default({APIUrl:i}),m.default.authClient=this.authClient,this.backend=null}authenticate(e){const t=e;return this.tokenPromise=t.jwt.bind(t),this.tokenPromise().then(async e=>{if(!this.backendType){const{github_enabled:t,gitlab_enabled:n,bitbucket_enabled:r,roles:i}=await fetch("".concat(this.gatewayUrl,"/settings"),{headers:{Authorization:"Bearer ".concat(e)}}).then(async e=>{const t=e.headers.get("Content-Type")||"";if(!t.includes("application/json")&&!t.includes("text/json"))throw new u.APIError("Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.",e.status,"Git Gateway");const n=await e.json();if(!e.ok)throw new u.APIError("Git Gateway Error: ".concat(n.message?n.message:n),e.status,"Git Gateway");return n});this.acceptRoles=i,t?this.backendType="github":n?this.backendType="gitlab":r&&(this.backendType="bitbucket")}if(this.acceptRoles&&this.acceptRoles.length>0){const t=(0,o.default)((0,s.default)(e),"app_metadata.roles",[]);if(!((0,r.default)(t,this.acceptRoles).length>0))throw new Error("You don't have sufficient permissions to access Netlify CMS")}const n={name:t.user_metadata.full_name||t.email.split("@").shift(),email:t.email,avatar_url:t.user_metadata.avatar_url,metadata:t.user_metadata},a={apiRoot:"".concat(this.gatewayUrl,"/").concat(this.backendType),branch:this.branch,tokenPromise:this.tokenPromise,commitAuthor:(0,i.default)(n,["name","email"]),squashMerges:this.squashMerges,initialWorkflowStatus:this.options.initialWorkflowStatus};if("github"===this.backendType?(this.api=new p.default(a),this.backend=new c.GitHubBackend(this.config,b({},this.options,{API:this.api}))):"gitlab"===this.backendType?(this.api=new h.default(a),this.backend=new d.GitLabBackend(this.config,b({},this.options,{API:this.api}))):"bitbucket"===this.backendType&&(this.api=new f.API(b({},a,{requestFunction:this.requestFunction,hasWriteAccess:async()=>!0})),this.backend=new f.BitbucketBackend(this.config,b({},this.options,{API:this.api}))),!await this.api.hasWriteAccess())throw new Error("You don't have sufficient permissions to access Netlify CMS");return{name:n.name,login:n.email}})}restoreUser(){const e=this.authClient&&this.authClient.currentUser();return e?this.authenticate(e):Promise.reject()}authComponent(){return m.default}logout(){if(window.netlifyIdentity)return window.netlifyIdentity.logout();const e=this.authClient.currentUser();return e&&e.logout()}getToken(){return this.tokenPromise()}entriesByFolder(e,t,n){return this.backend.entriesByFolder(e,t,n)}allEntriesByFolder(e,t,n){return this.backend.allEntriesByFolder(e,t,n)}entriesByFiles(e){return this.backend.entriesByFiles(e)}getEntry(e){return this.backend.getEntry(e)}async loadEntryMediaFiles(e,t){const n=await this.getLargeMediaClient(),r=this.backend;return n.enabled?await Promise.all(t.map(async t=>{if(n.matchPath(t.path)){const{path:n,id:r}=t,i=await this.getLargeMediaDisplayURL({path:n,id:r},e);return{id:r,name:(0,u.basename)(n),path:n,url:i,displayURL:i,file:new File([],name),size:0}}return r.loadMediaFile(e,t)})):r.loadEntryMediaFiles(e,t)}getMedia(e=this.mediaFolder){return this.backend.getMedia(e)}getLargeMediaClient(){return this._largeMediaClientPromise||(this._largeMediaClientPromise=this._getLargeMediaClient()),this._largeMediaClientPromise}_getLargeMediaClient(){const e=this.api.readFile(".lfsconfig").then(e=>l.default.decode(e)).then(({lfs:{url:e}})=>new URL(e)).then(e=>({enabled:e.hostname.endsWith("netlify.com")})).catch(e=>({enabled:!1,err:e})),t=this.api.readFile(".gitattributes").then(e=>(0,u.getLargeMediaPatternsFromGitAttributesFile)(e)).then(e=>({err:null,patterns:e})).catch(e=>e.message.includes("404")?(console.log("This 404 was expected and handled appropriately."),{err:null,patterns:[]}):{err:e,patterns:[]});return Promise.all([e,t]).then(([{enabled:e},{patterns:t,err:n}])=>{const r=e&&!n;return e&&n&&console.error(n),(0,g.getClient)({enabled:r,rootURL:this.netlifyLargeMediaURL,makeAuthorizedRequest:this.requestFunction,patterns:t,transformImages:!!this.transformImages&&{nf_resize:"fit",w:560,h:320}})})}async getLargeMediaDisplayURL({path:e,id:t},n=this.branch){const r=(await(0,u.entriesByFiles)([{path:e,id:t}],(e,t,{parseText:r})=>this.api.readFile(e,t,{branch:n,parseText:r}),"Git-Gateway"))[0],i=(0,u.parsePointerFile)(r.data);if(!i.sha)return console.warn("Failed parsing pointer file ".concat(e)),e;const o=await this.getLargeMediaClient();return await o.getDownloadURL(i)}async getMediaDisplayURL(e){const{path:t,id:n}=e,r=await this.getLargeMediaClient();if(r.enabled&&r.matchPath(t))return this.getLargeMediaDisplayURL({path:t,id:n});if("string"==typeof e)return e;if(this.backend.getMediaDisplayURL)return this.backend.getMediaDisplayURL(e);const i=new Error("getMediaDisplayURL is not implemented by the ".concat(this.backendType," backend, but the backend returned a displayURL which was not a string!"));return i.displayURL=e,Promise.reject(i)}async getMediaFile(e){const t=await this.getLargeMediaClient();if(t.enabled&&t.matchPath(e)){const t=await this.getLargeMediaDisplayURL({path:e,id:null});return{id:t,name:(0,u.basename)(e),path:e,url:t,displayURL:t}}return this.backend.getMediaFile(e)}async persistEntry(e,t,n){const r=await this.getLargeMediaClient();return this.backend.persistEntry(e,r.enabled?await(0,u.getLargeMediaFilteredMediaFiles)(r,t):t,n)}async persistMedia(e,t){const{fileObj:n,path:r}=e,i=URL.createObjectURL(n),o=await this.getLargeMediaClient(),a=r.startsWith("/")?r.slice(1):r;if(!o.enabled||!o.matchPath(a))return this.backend.persistMedia(e,t);const s=await(0,u.getPointerFileForMediaFileObj)(o,n,r);return b({},await this.backend.persistMedia(s,t),{displayURL:i})}deleteFile(e,t){return this.backend.deleteFile(e,t)}async getDeployPreview(e,t){return this.backend.getDeployPreview(e,t)}unpublishedEntries(){return this.backend.unpublishedEntries()}unpublishedEntry(e,t){return this.backend.unpublishedEntry(e,t,{loadEntryMediaFiles:(e,t)=>this.loadEntryMediaFiles(e,t)})}updateUnpublishedEntryStatus(e,t,n){return this.backend.updateUnpublishedEntryStatus(e,t,n)}deleteUnpublishedEntry(e,t){return this.backend.deleteUnpublishedEntry(e,t)}publishUnpublishedEntry(e,t){return this.backend.publishUnpublishedEntry(e,t)}traverseCursor(e,t){return this.backend.traverseCursor(e,t)}}},function(e,t,n){var r=n(233),i=n(238),o=n(305),a=n(110),s=n(174),l=n(239),u=Math.min;e.exports=function(e,t,n){for(var c=n?o:i,d=e[0].length,f=e.length,p=f,h=Array(f),m=1/0,g=[];p--;){var v=e[p];p&&t&&(v=a(v,s(t))),m=u(v.length,m),h[p]=!n&&(t||d>=120&&v.length>=120)?new r(p&&v):void 0}v=e[0];var y=-1,b=h[0];e:for(;++y0&&void 0!==arguments[0]?arguments[0]:{},n=t.APIUrl,r=void 0===n?"/.netlify/identity":n,i=t.audience,a=void 0===i?"":i,s=t.setCookie,c=void 0!==s&&s;l(this,e),r.match(u)&&console.warn("Warning:\n\nDO NOT USE HTTP IN PRODUCTION FOR GOTRUE EVER!\nGoTrue REQUIRES HTTPS to work securely."),a&&(this.audience=a),this.setCookie=c,this.api=new o.default(r)}return r(e,[{key:"_request",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.headers=t.headers||{};var n=t.audience||this.audience;return n&&(t.headers["X-JWT-AUD"]=n),this.api.request(e,t).catch((function(e){return e instanceof i.JSONHTTPError&&e.json&&(e.json.msg?e.message=e.json.msg:e.json.error&&(e.message=e.json.error+": "+e.json.error_description)),Promise.reject(e)}))}},{key:"settings",value:function(){return this._request("/settings")}},{key:"signup",value:function(e,t,n){return this._request("/signup",{method:"POST",body:JSON.stringify({email:e,password:t,data:n})})}},{key:"login",value:function(e,t,n){var r=this;return this._setRememberHeaders(n),this._request("/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"grant_type=password&username="+encodeURIComponent(e)+"&password="+encodeURIComponent(t)}).then((function(e){return a.default.removeSavedSession(),r.createUser(e,n)}))}},{key:"loginExternalUrl",value:function(e){return this.api.apiURL+"/authorize?provider="+e}},{key:"confirm",value:function(e,t){return this._setRememberHeaders(t),this.verify("signup",e,t)}},{key:"requestPasswordRecovery",value:function(e){return this._request("/recover",{method:"POST",body:JSON.stringify({email:e})})}},{key:"recover",value:function(e,t){return this._setRememberHeaders(t),this.verify("recovery",e,t)}},{key:"acceptInvite",value:function(e,t,n){var r=this;return this._setRememberHeaders(n),this._request("/verify",{method:"POST",body:JSON.stringify({token:e,password:t,type:"signup"})}).then((function(e){return r.createUser(e,n)}))}},{key:"acceptInviteExternalUrl",value:function(e,t){return this.api.apiURL+"/authorize?provider="+e+"&invite_token="+t}},{key:"createUser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._setRememberHeaders(t);var n=new a.default(this.api,e,this.audience);return n.getUserData().then((function(e){return t&&e._saveSession(),e}))}},{key:"currentUser",value:function(){var e=a.default.recoverSession(this.api);return e&&this._setRememberHeaders(e._fromStorage),e}},{key:"verify",value:function(e,t,n){var r=this;return this._setRememberHeaders(n),this._request("/verify",{method:"POST",body:JSON.stringify({token:t,type:e})}).then((function(e){return r.createUser(e,n)}))}},{key:"_setRememberHeaders",value:function(e){this.setCookie&&(this.api.defaultHeaders=this.api.defaultHeaders||{},this.api.defaultHeaders["X-Use-Cookie"]=e?"1":"session")}}]),e}();t.default=c,"undefined"!=typeof window&&(window.GoTrue=c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.getPagination=function(e){var t=e.headers.get("Link"),n={};if(null==t)return null;t=t.split(",");for(var i=e.headers.get("X-Total-Count"),o=0,a=t.length;o1&&void 0!==arguments[1]?arguments[1]:{};n.headers=n.headers||{};var i=n.audience||this.audience;return i&&(n.headers["X-JWT-AUD"]=i),this.jwt().then((function(i){return t.api.request(e,r({headers:Object.assign(n.headers,{Authorization:"Bearer "+i})},n)).catch((function(e){return e instanceof o.JSONHTTPError&&e.json&&(e.json.msg?e.message=e.json.msg:e.json.error&&(e.message=e.json.error+": "+e.json.error_description)),Promise.reject(e)}))}))}},{key:"getUserData",value:function(){return this._request("/user").then(this._saveUserData.bind(this)).then(this._refreshSavedSession.bind(this))}},{key:"_saveUserData",value:function(t,n){for(var r in t)r in e.prototype||r in d||(this[r]=t[r]);return n&&(this._fromStorage=!0),this}},{key:"_processTokenResponse",value:function(e){this.token=e;var t=void 0;try{t=JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}var n=window.atob(t);try{return decodeURIComponent(escape(n))}catch(e){return n}}(e.access_token.split(".")[1])),this.token.expires_at=1e3*t.exp}catch(t){console.error(new Error("Gotrue-js: Failed to parse tokenResponse claims: "+JSON.stringify(e)))}}},{key:"_refreshSavedSession",value:function(){return p()&&localStorage.getItem("gotrue.user")&&this._saveSession(),this}},{key:"_saveSession",value:function(){return p()&&localStorage.setItem("gotrue.user",JSON.stringify(this._details)),this}},{key:"tokenDetails",value:function(){return this.token}},{key:"clearSession",value:function(){e.removeSavedSession(),this.token=null,c=null}},{key:"admin",get:function(){return new s.default(this)}},{key:"_details",get:function(){var t={};for(var n in this)n in e.prototype||n in f||(t[n]=this[n]);return t}}],[{key:"removeSavedSession",value:function(){p()&&localStorage.removeItem("gotrue.user")}},{key:"recoverSession",value:function(t){if(c)return c;var n=p()&&localStorage.getItem("gotrue.user");if(n)try{var r=JSON.parse(n),i=r.url,o=r.token,s=r.audience;return i&&o?new e(t||new a.default(i,{}),o,s)._saveUserData(r,!0):null}catch(e){return console.error(new Error("Gotrue-js: Error recovering session: "+e)),null}return null}}]),e}();t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return this.user._request("/admin/users/"+e.id,{method:"PUT",body:JSON.stringify(t)})}},{key:"createUser",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.email=e,n.password=t,this.user._request("/admin/users",{method:"POST",body:JSON.stringify(n)})}},{key:"deleteUser",value:function(e){return this.user._request("/admin/users/"+e.id,{method:"DELETE"})}}]),e}();t.default=i},function(e,t,n){"use strict";var r=n(1125);function i(e){this.message=e}i.prototype=new Error,i.prototype.name="InvalidTokenError",e.exports=function(e,t){if("string"!=typeof e)throw new i("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(r(e.split(".")[n]))}catch(e){throw new i("Invalid token specified: "+e.message)}},e.exports.InvalidTokenError=i},function(e,t,n){var r=n(1126);e.exports=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}},function(e,t){function n(e){this.message=e}n.prototype=new Error,n.prototype.name="InvalidCharacterError",e.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,a=0,s="";i=t.charAt(a++);~i&&(r=o%4?64*r+i:i,o++%4)?s+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s}},function(e,t,n){(function(e){t.parse=t.decode=function(e){var t={},n=t,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach((function(e,r,s){if(e&&!e.match(/^\s*[;#]/)){var l=e.match(o);if(l){if(void 0!==l[1])return i=a(l[1]),void(n=t[i]=t[i]||{});var u=a(l[2]),c=!l[3]||a(l[4]);switch(c){case"true":case"false":case"null":c=JSON.parse(c)}u.length>2&&"[]"===u.slice(-2)&&(u=u.substring(0,u.length-2),n[u]?Array.isArray(n[u])||(n[u]=[n[u]]):n[u]=[]),Array.isArray(n[u])?n[u].push(c):n[u]=c}}})),Object.keys(t).filter((function(e,n,i){if(!t[e]||"object"!=typeof t[e]||Array.isArray(t[e]))return!1;var o=r(e),a=t,s=o.pop(),l=s.replace(/\\\./g,".");return o.forEach((function(e,t,n){a[e]&&"object"==typeof a[e]||(a[e]={}),a=a[e]})),(a!==t||l!==s)&&(a[l]=t[e],!0)})).forEach((function(e,n,r){delete t[e]})),t},t.stringify=t.encode=function e(t,i){var a=[],s="";"string"==typeof i?i={section:i,whitespace:!1}:(i=i||{}).whitespace=!0===i.whitespace;var l=i.whitespace?" = ":"=";Object.keys(t).forEach((function(e,r,i){var u=t[e];u&&Array.isArray(u)?u.forEach((function(t){s+=o(e+"[]")+l+o(t)+"\n"})):u&&"object"==typeof u?a.push(e):s+=o(e)+l+o(u)+n})),i.section&&s.length&&(s="["+o(i.section)+"]"+n+s);return a.forEach((function(o,a,l){var u=r(o).join("\\."),c=(i.section?i.section+".":"")+u,d=e(t[o],{section:c,whitespace:i.whitespace});s.length&&d.length&&(s+=n),s+=d})),s},t.safe=o,t.unsafe=a;var n=void 0!==e&&"win32"===e.platform?"\r\n":"\n";function r(e){return e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map((function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")}))}function i(e){return'"'===e.charAt(0)&&'"'===e.slice(-1)||"'"===e.charAt(0)&&"'"===e.slice(-1)}function o(e){return"string"!=typeof e||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&i(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#")}function a(e,t){if(!i(e=(e||"").trim())){for(var n=!1,r="",o=0,a=e.length;o{const n=e.length,r=Math.ceil(e.length/20),i=[];return t>1&&(i.push("prev"),i.push("first")),t(0,c.jsx)(s.default,m({},e,{backend:this}));return e.displayName="AuthenticationPage",e}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>!0}).then(()=>this.authenticate(e)):this.authenticate(e)}async pollUntilForkExists({repo:e,token:t}){let n=!1;for(;!n;)n=await fetch("".concat(this.apiRoot,"/repos/").concat(e),{headers:{Authorization:"token ".concat(t)}}).then(()=>!0).catch(e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),!1):Promise.reject(e)),n||await new Promise(e=>setTimeout(e,250));return Promise.resolve()}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=fetch("".concat(this.apiRoot,"/user"),{headers:{Authorization:"token ".concat(e)}}).then(e=>e.json())),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const n=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[n]||(this._userIsOriginMaintainerPromises[n]=fetch("".concat(this.apiRoot,"/repos/").concat(this.originRepo,"/collaborators/").concat(n,"/permission"),{headers:{Authorization:"token ".concat(t)}}).then(e=>e.json()).then(({permission:e})=>"admin"===e||"write"===e)),this._userIsOriginMaintainerPromises[n]}async forkExists({token:e}){try{const t=await this.currentUser({token:e}),n=this.originRepo.split("/")[1],r=await fetch("".concat(this.apiRoot,"/repos/").concat(t.login,"/").concat(n),{method:"GET",headers:{Authorization:"token ".concat(e)}}).then(e=>e.json());return!0===r.fork&&r.parent&&r.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const n=e.token;if(await this.userIsOriginMaintainer({token:n}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();await this.forkExists({token:n})||await t();const r=await fetch("".concat(this.apiRoot,"/repos/").concat(this.originRepo,"/forks"),{method:"POST",headers:{Authorization:"token ".concat(n)}}).then(e=>e.json());return this.useOpenAuthoring=!0,this.repo=r.full_name,this.pollUntilForkExists({repo:r.full_name,token:n})}async authenticate(e){this.token=e.token;const t=this.useGraphql?u.default:l.default;this.api=new t({token:this.token,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,useOpenAuthoring:this.useOpenAuthoring,initialWorkflowStatus:this.options.initialWorkflowStatus});const n=await this.api.user();if(!await this.api.hasWriteAccess().catch(e=>{throw e.message=(0,o.stripIndent)(h(),this.repo),e}))throw new Error("Your GitHub user account does not have access to this repo.");return v({},n,{token:e.token,useOpenAuthoring:this.useOpenAuthoring})}logout(){if(this.token=null,this.api&&this.api.reset&&"function"==typeof this.api.reset)return this.api.reset()}getToken(){return Promise.resolve(this.token)}async entriesByFolder(e,t,n){const r=this.api.originRepoURL;let i;const o=await(0,a.entriesByFolder)(()=>this.api.listFiles(e,{repoURL:r,depth:n}).then(e=>{const n=(0,a.filterByPropExtension)(t,"path")(e),r=this.getCursorAndFiles(n,1);return i=r.cursor,r.files}),(e,t)=>this.api.readFile(e,t,{repoURL:r}),l.API_NAME);return o[a.CURSOR_COMPATIBILITY_SYMBOL]=i,o}async allEntriesByFolder(e,t,n){const r=this.api.originRepoURL;return await(0,a.entriesByFolder)(()=>this.api.listFiles(e,{repoURL:r,depth:n}).then(e=>(0,a.filterByPropExtension)(t,"path")(e)),(e,t)=>this.api.readFile(e,t,{repoURL:r}),l.API_NAME)}entriesByFiles(e){const t=this.useOpenAuthoring?this.api.originRepoURL:this.api.repoURL;return(0,a.entriesByFiles)(e,(e,n)=>this.api.readFile(e,n,{repoURL:t}).catch(()=>""),"GitHub")}getEntry(e){const t=this.api.originRepoURL;return this.api.readFile(e,null,{repoURL:t}).then(t=>({file:{path:e,id:null},data:t})).catch(()=>({file:{path:e,id:null},data:""}))}getMedia(e=this.mediaFolder){return this.api.listFiles(e).then(e=>e.map(({id:e,name:t,size:n,path:r})=>({id:e,name:t,size:n,displayURL:{id:e,path:r},path:r})))}async getMediaFile(e){const t=await(0,a.getMediaAsBlob)(e,null,this.api.readFile.bind(this.api)),n=(0,a.basename)(e),r=(0,a.blobToFileObj)(n,t),i=URL.createObjectURL(r);return{id:await(0,a.getBlobSHA)(t),displayURL:i,path:e,name:n,size:r.size,file:r,url:i}}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||(0,r.default)(10),(0,a.getMediaDisplayURL)(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}persistEntry(e,t=[],n){return(0,a.runWithLock)(this.lock,()=>this.api.persistFiles(e,t,n),"Failed to acquire persist entry lock")}async persistMedia(e,t){try{await this.api.persistFiles(null,[e],t);const{sha:n,path:r,fileObj:o}=e,a=URL.createObjectURL(o);return{id:n,name:o.name,size:o.size,displayURL:a,path:(0,i.default)(r,"/")}}catch(e){throw console.error(e),e}}deleteFile(e,t){return this.api.deleteFile(e,t)}async traverseCursor(e,t){const n=e.meta,r=e.data.get("files").toJS();let i;switch(t){case"first":i=this.getCursorAndFiles(r,1);break;case"last":i=this.getCursorAndFiles(r,n.get("pageCount"));break;case"next":i=this.getCursorAndFiles(r,n.get("page")+1);break;case"prev":i=this.getCursorAndFiles(r,n.get("page")-1);break;default:i=this.getCursorAndFiles(r,1)}return{entries:await Promise.all(i.files.map(e=>this.api.readFile(e.path,e.id,{repoURL:this.api.originRepoURL}).then(t=>({file:e,data:t})))),cursor:i.cursor}}loadMediaFile(e,t){return(0,a.getMediaAsBlob)(t.path,t.id,(t,n,{parseText:r})=>this.api.readFile(t,n,{branch:e,parseText:r})).then(e=>{const n=(0,a.basename)(t.path),r=(0,a.blobToFileObj)(n,e);return{id:t.id,displayURL:URL.createObjectURL(r),path:t.path,name:n,size:r.size,file:r}})}async loadEntryMediaFiles(e,t){return await Promise.all(t.map(t=>this.loadMediaFile(e,t)))}unpublishedEntries(){return(0,a.unpublishedEntries)(()=>this.api.listUnpublishedBranches().then(e=>e.map(e=>(0,a.contentKeyFromBranch)(e))),e=>this.api.readUnpublishedBranchFile(e),"GitHub")}async unpublishedEntry(e,t,{loadEntryMediaFiles:n=((e,t)=>this.loadEntryMediaFiles(e,t))}={}){const r=this.api.generateContentKey(e,t),i=await this.api.readUnpublishedBranchFile(r),o=i.metaData.objects.entry.mediaFiles||[],a=await n(i.metaData.branch,o.map(({id:e,path:t})=>({id:e,path:t})));return{slug:t,file:{path:i.metaData.objects.entry.path,id:null},data:i.fileData,metaData:i.metaData,mediaFiles:a,isModification:i.isModification}}async getDeployPreview(e,t){try{const n=await this.api.getStatuses(e,t),r=(0,a.getPreviewStatus)(n,this.previewContext);if(r){const{target_url:e,state:t}=r;return{url:e,status:t}}return null}catch(e){return null}}updateUnpublishedEntryStatus(e,t,n){return(0,a.runWithLock)(this.lock,()=>this.api.updateUnpublishedEntryStatus(e,t,n),"Failed to acquire update entry status lock")}deleteUnpublishedEntry(e,t){return(0,a.runWithLock)(this.lock,()=>this.api.deleteUnpublishedEntry(e,t),"Failed to acquire delete entry lock")}publishUnpublishedEntry(e,t){return(0,a.runWithLock)(this.lock,()=>this.api.publishUnpublishedEntry(e,t),"Failed to acquire publish entry lock")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(171)),i=o(n(176));function o(e){return e&&e.__esModule?e:{default:e}}class a{constructor(e){this.err=e}toString(){return this.err&&this.err.message}}const s={github:{width:960,height:600},gitlab:{width:960,height:600},bitbucket:{width:960,height:500},email:{width:500,height:400}};var l=class{constructor(e={}){this.site_id=e.site_id||null,this.base_url=(0,i.default)(e.base_url,"/")||"https://api.netlify.com",this.auth_endpoint=(0,r.default)(e.auth_endpoint,"/")||"auth"}handshakeCallback(e,t){const n=r=>{if(r.data==="authorizing:"+e.provider&&r.origin===this.base_url)return window.removeEventListener("message",n,!1),window.addEventListener("message",this.authorizeCallback(e,t),!1),this.authWindow.postMessage(r.data,r.origin)};return n}authorizeCallback(e,t){const n=r=>{if(r.origin===this.base_url){if(0===r.data.indexOf("authorization:"+e.provider+":success:")){const i=JSON.parse(r.data.match(new RegExp("^authorization:"+e.provider+":success:(.+)$"))[1]);window.removeEventListener("message",n,!1),this.authWindow.close(),t(null,i)}if(0===r.data.indexOf("authorization:"+e.provider+":error:")){const i=JSON.parse(r.data.match(new RegExp("^authorization:"+e.provider+":error:(.+)$"))[1]);window.removeEventListener("message",n,!1),this.authWindow.close(),t(new a(i))}}};return n}getSiteID(){if(this.site_id)return this.site_id;const e=document.location.host.split(":")[0];return"localhost"===e?"cms.netlify.com":e}authenticate(e,t){const{provider:n}=e,r=this.getSiteID();if(!n)return t(new a({message:"You must specify a provider when calling netlify.authenticate"}));if(!r)return t(new a({message:"You must set a site_id with netlify.configure({site_id: 'your-site-id'}) to make authentication work from localhost"}));const i=s[n]||s.github,o=screen.width/2-i.width/2,l=screen.height/2-i.height/2;window.addEventListener("message",this.handshakeCallback(e,t),!1);let u="".concat(this.base_url,"/").concat(this.auth_endpoint,"?provider=").concat(e.provider,"&site_id=").concat(r);e.scope&&(u+="&scope="+e.scope),!0===e.login&&(u+="&login=true"),e.beta_invite&&(u+="&beta_invite="+e.beta_invite),e.invite_code&&(u+="&invite_code="+e.invite_code),this.authWindow=window.open(u,"Netlify Authorization","width=".concat(i.width,", height=").concat(i.height,", top=").concat(l,", left=").concat(o)),this.authWindow.focus()}refresh(e,t){const{provider:n,refresh_token:r}=e,i=this.getSiteID(),o=t||Promise.reject.bind(Promise);if(!n||!r)return o(new a({message:"You must specify a provider and refresh token when calling netlify.refresh"}));if(!i)return o(new a({message:"You must set a site_id with netlify.configure({site_id: 'your-site-id'}) to make token refresh work from localhost"}));const s="".concat(this.base_url,"/").concat(this.auth_endpoint,"/refresh?provider=").concat(n,"&site_id=").concat(i,"&refresh_token=").concat(r),l=fetch(s,{method:"POST",body:""}).then(e=>e.json());if(!t)return l;l.then(e=>t(null,e)).catch(t)}};t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(3),i=s(n(171)),o=s(n(176)),a=s(n(128));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(){const e=(0,a.default)();return window.sessionStorage.setItem("netlify-cms-auth",JSON.stringify({nonce:e})),e}t.default=class{constructor(e={}){const t=(0,o.default)(e.base_url,"/"),n=(0,i.default)(e.auth_endpoint,"/");this.auth_url="".concat(t,"/").concat(n),this.appID=e.app_id,this.clearHash=e.clearHash}authenticate(e,t){if("https:"!==document.location.protocol&&"localhost"!==document.location.hostname&&"127.0.0.1"!==document.location.hostname)return t(new Error("Cannot authenticate over insecure protocol!"));const n=new URL(this.auth_url);n.searchParams.set("client_id",this.appID),n.searchParams.set("redirect_uri",document.location.origin+document.location.pathname),n.searchParams.set("response_type","token"),n.searchParams.set("scope",e.scope);const r=JSON.stringify({auth_type:"implicit",nonce:d()});n.searchParams.set("state",r),document.location.assign(n.href)}completeAuth(e){const t=new URLSearchParams(document.location.hash.replace(/^#?\/?/,""));if(!t.has("access_token")&&!t.has("error"))return;this.clearHash();const n=(0,r.Map)(t.entries()),{nonce:i}=JSON.parse(n.get("state"));if(!function(e){const t=window.sessionStorage.getItem("netlify-cms-auth"),n=t&&JSON.parse(t).nonce;return window.localStorage.removeItem("netlify-cms-auth"),e===n}(i))return e(new Error("Invalid nonce"));if(n.has("error"))return e(new Error("".concat(n.get("error"),": ").concat(n.get("error_description"))));if(n.has("access_token")){const t=n.toJS(),{access_token:r}=t;e(null,function(e){for(var t=1;tv({},e,{labels:e.labels.nodes,head:{ref:e.headRefName,sha:e.headRefOid,repo:{fork:e.repository.isFork}},base:{ref:e.baseRefName,sha:e.baseRefOid}});class w extends c.default{constructor(e){super(e),y(this,"client",void 0),this.client=this.getApolloClient()}getApolloClient(){const e=(0,s.setContext)((e,{headers:t})=>({headers:v({"Content-Type":"application/json; charset=utf-8"},t,{authorization:this.token?"token ".concat(this.token):""})})),t=(0,a.createHttpLink)({uri:"".concat(this.apiRoot,"/graphql")});return new i.ApolloClient({link:e.concat(t),cache:new o.InMemoryCache({fragmentMatcher:b}),defaultOptions:{watchQuery:{fetchPolicy:"no-cache",errorPolicy:"ignore"},query:{fetchPolicy:"no-cache",errorPolicy:"all"}}})}reset(){return this.client.resetStore()}async getRepository(e,t){const{data:n}=await this.query({query:d.repository,variables:{owner:e,name:t},fetchPolicy:"cache-first"});return n.repository}query(e){return this.client.query(e).catch(e=>{throw new l.APIError(e.message,500,"GitHub")})}mutate(e){return this.client.mutate(e).catch(e=>{throw new l.APIError(e.message,500,"GitHub")})}async hasWriteAccess(){const{repoOwner:e,repoName:t}=this;try{const{data:n}=await this.query({query:d.repoPermission,variables:{owner:e,name:t},fetchPolicy:"cache-first"}),{viewerPermission:r}=n.repository;return["ADMIN","MAINTAIN","WRITE"].includes(r)}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}async user(){const{data:e}=await this.query({query:d.user,fetchPolicy:"cache-first"});return e.viewer}async retrieveBlobObject(e,t,n,r={}){const{data:i}=await this.query(v({query:d.blob,variables:{owner:e,name:t,expression:n}},r));if(i.repository.object){const{is_binary:e,text:t}=i.repository.object;return{isNull:!1,isBinary:e,text:t}}return{isNull:!0}}getOwnerAndNameFromRepoUrl(e){let{repoOwner:t,repoName:n}=this;return e===this.originRepoURL&&({originRepoOwner:t,originRepoName:n}=this),{owner:t,name:n}}async readFile(e,t,{branch:n=this.branch,repoURL:r=this.repoURL,parseText:i=!0}={}){t||(t=await this.getFileSha(e,{repoURL:r,branch:n}));return await(0,l.readFile)(t,()=>this.fetchBlobContent({sha:t,repoURL:r,parseText:i}),l.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:n}){if(!n)return super.fetchBlobContent({sha:e,repoURL:t,parseText:n});const{owner:r,name:i}=this.getOwnerAndNameFromRepoUrl(t),{isNull:o,isBinary:a,text:s}=await this.retrieveBlobObject(r,i,e,{fetchPolicy:"cache-first"});if(o)throw new l.APIError("Not Found",404,"GitHub");return a?super.fetchBlobContent({sha:e,repoURL:t,parseText:n}):s}async getPullRequests(e,t,n){const{originRepoOwner:r,originRepoName:i}=this;let o;o=t===c.PullRequestState.Open?["OPEN"]:t===c.PullRequestState.Closed?["CLOSED","MERGED"]:["OPEN","CLOSED","MERGED"];const{data:a}=await this.query({query:d.pullRequests,variables:v({owner:r,name:i},e?{head:e}:{},{states:o})}),{pullRequests:s}=a.repository;return s.nodes.map(_).filter(e=>e.head.ref.startsWith("".concat(l.CMS_BRANCH_PREFIX,"/"))&&n(e))}async getOpenAuthoringBranches(){const{repoOwner:e,repoName:t}=this,{data:n}=await this.query({query:d.openAuthoringBranches,variables:{owner:e,name:t,refPrefix:"refs/heads/cms/".concat(this.repo,"/")}});return n.repository.refs.nodes.map(({name:e,prefix:t})=>({ref:"".concat(t).concat(e)}))}async getStatuses(e,t){const n=this.generateContentKey(e,t),r=(0,l.branchFromContentKey)(n),i=(await this.getBranchPullRequest(r)).head.sha,{originRepoOwner:o,originRepoName:a}=this,{data:s}=await this.query({query:d.statues,variables:{owner:o,name:a,sha:i}});if(s.repository.object){const{status:e}=s.repository.object,{contexts:t}=e||{contexts:[]};return t}return[]}getAllFiles(e,t){return e.reduce((e,n)=>{if("tree"===n.type){var r;const i=(null===(r=n.object)||void 0===r?void 0:r.entries)||[];return[...e,...this.getAllFiles(i,"".concat(t,"/").concat(n.name))]}return"blob"===n.type?[...e,{name:n.name,type:n.type,id:n.sha,path:"".concat(t,"/").concat(n.name),size:n.blob?n.blob.size:0}]:e},[])}async listFiles(e,{repoURL:t=this.repoURL,branch:n=this.branch,depth:i=1}={}){const{owner:o,name:a}=this.getOwnerAndNameFromRepoUrl(t),s=(0,r.default)(e,"/"),{data:l}=await this.query({query:d.files(i),variables:{owner:o,name:a,expression:"".concat(n,":").concat(s)}});if(l.repository.object){return this.getAllFiles(l.repository.object.entries,s)}return[]}getBranchQualifiedName(e){return"refs/heads/".concat(e)}getBranchQuery(e,t,n){return{query:d.branch,variables:{owner:t,name:n,qualifiedName:this.getBranchQualifiedName(e)}}}async getDefaultBranch(){const{data:e}=await this.query(v({},this.getBranchQuery(this.branch,this.originRepoOwner,this.originRepoName)));return e.repository.branch}async getBranch(e){const{data:t}=await this.query(v({},this.getBranchQuery(e,this.repoOwner,this.repoName),{fetchPolicy:"cache-first"}));return t.repository.branch}async patchRef(e,t,n,r={}){if("heads"!==e)return super.patchRef(e,t,n,r);const i=r.force||!1,o=await this.getBranch(t),{data:a}=await this.mutate({mutation:f.updateBranch,variables:{input:{oid:n,refId:o.id,force:i}}});return a.updateRef.branch}async deleteBranch(e){const t=await this.getBranch(e),{data:n}=await this.mutate({mutation:f.deleteBranch,variables:{deleteRefInput:{refId:t.id}},update:e=>e.data.delete((0,o.defaultDataIdFromObject)(t))});return n.deleteRef}getPullRequestQuery(e){const{originRepoOwner:t,originRepoName:n}=this;return{query:d.pullRequest,variables:{owner:t,name:n,number:e}}}async getPullRequest(e){const{data:t}=await this.query(v({},this.getPullRequestQuery(e),{fetchPolicy:"cache-first"})),n="OPEN"===t.repository.pullRequest.state?c.PullRequestState.Open:c.PullRequestState.Closed;return v({},t.repository.pullRequest,{state:n})}getPullRequestAndBranchQuery(e,t){const{repoOwner:n,repoName:r}=this,{originRepoOwner:i,originRepoName:o}=this;return{query:d.pullRequestAndBranch,variables:{owner:n,name:r,originRepoOwner:i,originRepoName:o,number:t,qualifiedName:this.getBranchQualifiedName(e)}}}async getPullRequestAndBranch(e,t){const{data:n}=await this.query(v({},this.getPullRequestAndBranchQuery(e,t),{fetchPolicy:"cache-first"})),{repository:r,origin:i}=n;return{branch:r.branch,pullRequest:i.pullRequest}}async openPR(e){const t=await this.getPullRequest(e),{data:n}=await this.mutate({mutation:f.reopenPullRequest,variables:{reopenPullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:n}=t.reopenPullRequest,r={repository:v({},n.repository,{pullRequest:n})};e.writeQuery(v({},this.getPullRequestQuery(n.number),{data:r}))}});return n.reopenPullRequest}async closePR(e){const t=await this.getPullRequest(e),{data:n}=await this.mutate({mutation:f.closePullRequest,variables:{closePullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:n}=t.closePullRequest,r={repository:v({},n.repository,{pullRequest:n})};e.writeQuery(v({},this.getPullRequestQuery(n.number),{data:r}))}});return n.closePullRequest}async deleteUnpublishedEntry(e,t){try{const n=this.generateContentKey(e,t),r=(0,l.branchFromContentKey)(n),i=await this.retrieveMetadata(n);if(i.pullRequest.number!==c.MOCK_PULL_REQUEST){const{branch:e,pullRequest:t}=await this.getPullRequestAndBranch(r,i.pullRequest.number),{data:n}=await this.mutate({mutation:f.closePullRequestAndDeleteBranch,variables:{deleteRefInput:{refId:e.id},closePullRequestInput:{pullRequestId:t.id}},update:n=>{n.data.delete((0,o.defaultDataIdFromObject)(e)),n.data.delete((0,o.defaultDataIdFromObject)(t))}});return n.closePullRequest}return await this.deleteBranch(r)}catch(e){const{graphQLErrors:t}=e;if(t&&t.length>0){if(t.some(e=>"NOT_FOUND"===e.type))return}throw e}}async createPR(e,t){const[n,r]=await Promise.all([this.getRepository(this.originRepoOwner,this.originRepoName),this.useOpenAuthoring?"".concat((await this.user()).login,":").concat(t):t]),{data:i}=await this.mutate({mutation:f.createPullRequest,variables:{createPullRequestInput:{baseRefName:this.branch,body:l.DEFAULT_PR_BODY,title:e,headRefName:r,repositoryId:n.id}},update:(e,{data:t})=>{const{pullRequest:n}=t.createPullRequest,r={repository:v({},n.repository,{pullRequest:n})};e.writeQuery(v({},this.getPullRequestQuery(n.number),{data:r}))}}),{pullRequest:o}=i.createPullRequest;return v({},o,{head:{sha:o.headRefOid}})}async createBranch(e,t){const n=this.repoOwner,r=this.repoName,i=await this.getRepository(n,r),{data:o}=await this.mutate({mutation:f.createBranch,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:i.id}},update:(t,{data:i})=>{const{branch:o}=i.createRef,a={repository:v({},o.repository,{branch:o})};t.writeQuery(v({},this.getBranchQuery(e,n,r),{data:a}))}}),{branch:a}=o.createRef;return v({},a,{ref:"".concat(a.prefix).concat(a.name)})}async createBranchAndPullRequest(e,t,n){const r=this.originRepoOwner,i=this.originRepoName,o=await this.getRepository(r,i),{data:a}=await this.mutate({mutation:f.createBranchAndPullRequest,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:o.id},createPullRequestInput:{baseRefName:this.branch,body:l.DEFAULT_PR_BODY,title:n,headRefName:e,repositoryId:o.id}},update:(t,{data:n})=>{const{branch:o}=n.createRef,{pullRequest:a}=n.createPullRequest,s={repository:v({},o.repository,{branch:o})},l={repository:v({},a.repository,{branch:o}),origin:v({},a.repository,{pullRequest:a})};t.writeQuery(v({},this.getBranchQuery(e,r,i),{data:s})),t.writeQuery(v({},this.getPullRequestAndBranchQuery(e,a.number),{data:l}))}}),{pullRequest:s}=a.createPullRequest;return _(s)}async getFileSha(e,{repoURL:t=this.repoURL,branch:n=this.branch}={}){const{owner:r,name:i}=this.getOwnerAndNameFromRepoUrl(t),{data:o}=await this.query({query:d.fileSha,variables:{owner:r,name:i,expression:"".concat(n,":").concat(e)}});if(o.repository.file)return o.repository.file.sha;throw new l.APIError("Not Found",404,c.API_NAME)}}t.default=w},function(e,t,n){"use strict";n.r(t),n.d(t,"ApolloClient",(function(){return A})),n.d(t,"ApolloError",(function(){return v})),n.d(t,"FetchType",(function(){return g})),n.d(t,"NetworkStatus",(function(){return r})),n.d(t,"ObservableQuery",(function(){return y})),n.d(t,"isApolloError",(function(){return m}));var r,i=n(6),o=n(11),a=n(120),s=n(60),l=n(93),u=n(227),c=n(18),d=n(84);function f(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(r||(r={}));var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.c)(t,e),t.prototype[u.a]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(s.a);function h(e){return Array.isArray(e)&&e.length>0}function m(e){return e.hasOwnProperty("graphQLErrors")}var g,v=function(e){function t(n){var r,i,o=n.graphQLErrors,a=n.networkError,s=n.errorMessage,l=n.extraInfo,u=e.call(this,s)||this;return u.graphQLErrors=o||[],u.networkError=a||null,u.message=s||(i="",h((r=u).graphQLErrors)&&r.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"})),r.networkError&&(i+="Network error: "+r.networkError.message+"\n"),i=i.replace(/\n$/,"")),u.extraInfo=l,u.__proto__=t.prototype,u}return Object(i.c)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(g||(g={}));var y=function(e){function t(t){var n=t.queryManager,r=t.options,i=t.shouldSubscribe,a=void 0===i||i,s=e.call(this,(function(e){return s.onSubscribe(e)}))||this;s.observers=new Set,s.subscriptions=new Set,s.isTornDown=!1,s.options=r,s.variables=r.variables||{},s.queryId=n.generateQueryId(),s.shouldSubscribe=a;var l=Object(o.m)(r.query);return s.queryName=l&&l.name&&l.name.value,s.queryManager=n,s}return Object(i.c)(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:r.error}}var t,n,o,a=this.queryManager.getCurrentQueryResult(this),s=a.data,l=a.partial,u=this.queryManager.queryStore.get(this.queryId),c=this.options.fetchPolicy,d="network-only"===c||"no-cache"===c;if(u){var p=u.networkStatus;if(n=u,void 0===(o=this.options.errorPolicy)&&(o="none"),n&&(n.networkError||"none"===o&&h(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:p,error:new v({graphQLErrors:u.graphQLErrors,networkError:u.networkError})};u.variables&&(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),u.variables),this.variables=this.options.variables),t={data:s,loading:f(p),networkStatus:p},u.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=u.graphQLErrors)}else{var m=d||l&&"cache-only"!==c;t={data:s,loading:m,networkStatus:m?r.loading:r.ready}}return l||this.updateLastResult(Object(i.a)(Object(i.a)({},t),{stale:!1})),Object(i.a)(Object(i.a)({},t),{partial:l})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(a.a)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new c.a(3)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(a.a)(this.variables,e)||(this.variables=Object(i.a)(Object(i.a)({},this.variables),e)),Object(a.a)(this.options.variables,this.variables)||(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,Object(i.a)(Object(i.a)({},this.options),{fetchPolicy:t}),g.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(c.b)(e.updateQuery,4);var n=Object(i.a)(Object(i.a)({},e.query?e:Object(i.a)(Object(i.a)(Object(i.a)({},this.options),e),{variables:Object(i.a)(Object(i.a)({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,g.normal,this.queryId).then((function(i){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:n.variables})})),t.queryManager.stopQuery(r),i}),(function(e){throw t.queryManager.stopQuery(r),e}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=Object(i.a)(Object(i.a)({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n=e.fetchPolicy;return this.setVariables(this.options.variables,t!==n&&("cache-only"===t||"standby"===t||"network-only"===n),e.fetchResults)},t.prototype.setVariables=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1,e=e||this.variables,!t&&Object(a.a)(e,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=t.getQueryWithPreviousResult(this.queryId),r=n.previousResult,i=n.variables,a=n.document,s=Object(o.I)((function(){return e(r,{variables:i})}));s&&(t.dataStore.markUpdateQueryResult(a,i,s),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){w(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:Object(o.f)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var n=e._subscription._observer;n&&!n.error&&(n.error=b)}catch(e){}var r=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),r&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,n=this.queryId;this.shouldSubscribe&&t.addObservableQuery(n,this),this.options.pollInterval&&(w(this),t.startPollingQuery(this.options,n));var o=function(t){e.updateLastResult(Object(i.a)(Object(i.a)({},e.lastResult),{errors:t.graphQLErrors,networkStatus:r.error,loading:!1})),_(e.observers,"error",e.lastError=t)};t.observeQuery(n,this.options,{next:function(n){if(e.lastError||e.isDifferentFromLastResult(n)){var r=e.updateLastResult(n),i=e.options,o=i.query,s=i.variables,l=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,s).then((function(i){var s=e.variables;e.variables=e.options.variables=i,!n.loading&&r&&"cache-only"!==l&&t.transform(o).serverQuery&&!Object(a.a)(s,i)?e.refetch():_(e.observers,"next",n)})):_(e.observers,"next",n)}},error:o}).catch(o)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(p);function b(e){}function _(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function w(e){var t=e.options.fetchPolicy;Object(c.b)("cache-first"!==t&&"cache-only"!==t,5)}var E=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),x=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Object(c.b)(!t||t.document===e.document||Object(a.a)(t.document,e.document),19);var n,i=!1,o=null;e.storePreviousVariables&&t&&t.networkStatus!==r.loading&&(Object(a.a)(t.variables,e.variables)||(i=!0,o=t.variables)),n=i?r.setVariables:e.isPoll?r.poll:e.isRefetch?r.refetch:r.loading;var s=[];t&&t.graphQLErrors&&(s=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:o,networkError:null,graphQLErrors:s,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=r.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=h(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=r.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=r.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=r.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){var n=this.store&&this.store[e];n&&(n.networkError=null,n.previousVariables=null,t&&(n.networkStatus=r.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(n){e.indexOf(n)<0?t.stopQuery(n):t.store[n].networkStatus=r.loading}))},e}();var k=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(o.A)(t.resolvers,e)})):this.resolvers=Object(o.A)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,o,this.fragmentMatcher,s).then((function(e){return Object(i.a)(Object(i.a)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Object(o.s)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(o.C)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(i.a)(Object(i.a)({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(c.b)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return Object(i.a)(Object(i.a)({},t),e.exportedVariables)}))]:[2,Object(i.a)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(d.visit)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return d.BREAK}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(o.d)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,a,s){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),Object(i.b)(this,void 0,void 0,(function(){var l,u,c,d,f,p,h,m,g;return Object(i.d)(this,(function(v){var y;return l=Object(o.l)(e),u=Object(o.j)(e),c=Object(o.g)(u),d=l.operation,f=d?(y=d).charAt(0).toUpperCase()+y.slice(1):"Query",h=(p=this).cache,m=p.client,g={fragmentMap:c,context:Object(i.a)(Object(i.a)({},n),{cache:h,client:m}),variables:r,fragmentMatcher:a,defaultOperationType:f,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(l.selectionSet,t,g).then((function(e){return{result:e,exportedVariables:g.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,s,l,u,d=this;return Object(i.d)(this,(function(f){return r=n.fragmentMap,a=n.context,s=n.variables,l=[t],u=function(e){return Object(i.b)(d,void 0,void 0,(function(){var u,d;return Object(i.d)(this,(function(i){return Object(o.F)(e,s)?Object(o.t)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&l.push(((n={})[Object(o.E)(e)]=t,n))}))]:(Object(o.v)(e)?u=e:(u=r[e.name.value],Object(c.b)(u,7)),u&&u.typeCondition&&(d=u.typeCondition.name.value,n.fragmentMatcher(t,d,a))?[2,this.resolveSelectionSet(u.selectionSet,t,n).then((function(e){l.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(u)).then((function(){return Object(o.B)(l)}))]}))}))},e.prototype.resolveField=function(e,t,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,s,l,u,c,d,f,p,h=this;return Object(i.d)(this,(function(i){return r=n.variables,a=e.name.value,s=Object(o.E)(e),l=a!==s,u=t[s]||t[a],c=Promise.resolve(u),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=t.__typename||n.defaultOperationType,(f=this.resolvers&&this.resolvers[d])&&(p=f[l?a:s])&&(c=Promise.resolve(p(t,Object(o.b)(e,r),n.context,{field:e,fragmentMap:n.fragmentMap})))),[2,c.then((function(t){return void 0===t&&(t=u),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?h.resolveSubSelectedArray(e,t,n):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}();function S(e){var t=new Set,n=null;return new p((function(r){return t.add(r),n=n||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(r)&&!t.size&&n&&(n.unsubscribe(),n=null)}}))}var O=Object.prototype.hasOwnProperty,T=function(){function e(e){var t=e.link,n=e.queryDeduplication,r=void 0!==n&&n,i=e.store,a=e.onBroadcast,s=void 0===a?function(){}:a,l=e.ssrMode,u=void 0!==l&&l,c=e.clientAwareness,d=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.mutationStore=new E,this.queryStore=new x,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(o.e?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=s,this.clientAwareness=d,this.localState=f||new k({cache:i.getCache()}),this.ssrMode=u,this.assumeImmutableResults=!!p}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(e){e(new c.a(8))}))},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,l=void 0===s?[]:s,u=e.awaitRefetchQueries,d=void 0!==u&&u,f=e.update,p=e.errorPolicy,m=void 0===p?"none":p,g=e.fetchPolicy,y=e.context,b=void 0===y?{}:y;return Object(i.b)(this,void 0,void 0,(function(){var e,s,u,p=this;return Object(i.d)(this,(function(y){switch(y.label){case 0:return Object(c.b)(t,9),Object(c.b)(!g||"no-cache"===g,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,b)]:[3,2];case 1:n=y.sent(),y.label=2;case 2:return s=function(){var e={};return a&&p.queries.forEach((function(t,n){var r=t.observableQuery;if(r){var i=r.queryName;i&&O.call(a,i)&&(e[n]={updater:a[i],query:p.queryStore.get(n)})}})),e},this.mutationStore.initMutation(e,t,n),this.dataStore.markMutationInit({mutationId:e,document:t,variables:n,updateQueries:s(),update:f,optimisticResponse:r}),this.broadcastQueries(),u=this,[2,new Promise((function(a,c){var p,y;u.getObservableFromLink(t,Object(i.a)(Object(i.a)({},b),{optimisticResponse:r}),n,!1).subscribe({next:function(r){Object(o.q)(r)&&"none"===m?y=new v({graphQLErrors:r.errors}):(u.mutationStore.markMutationResult(e),"no-cache"!==g&&u.dataStore.markMutationResult({mutationId:e,result:r,document:t,variables:n,updateQueries:s(),update:f}),p=r)},error:function(t){u.mutationStore.markMutationError(e,t),u.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),u.broadcastQueries(),u.setQuery(e,(function(){return{document:null}})),c(new v({networkError:t}))},complete:function(){if(y&&u.mutationStore.markMutationError(e,y),u.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),u.broadcastQueries(),y)c(y);else{"function"==typeof l&&(l=l(p));var t=[];h(l)&&l.forEach((function(e){if("string"==typeof e)u.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(u.query(n))}})),Promise.all(d?t:[]).then((function(){u.setQuery(e,(function(){return{document:null}})),"ignore"===m&&p&&Object(o.q)(p)&&delete p.errors,a(p)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,n,r){return Object(i.b)(this,void 0,void 0,(function(){var a,s,l,u,c,d,f,p,h,y,b,_,w,E,x,k,S,O,T=this;return Object(i.d)(this,(function(C){switch(C.label){case 0:return a=t.metadata,s=void 0===a?null:a,l=t.fetchPolicy,u=void 0===l?"cache-first":l,c=t.context,d=void 0===c?{}:c,f=this.transform(t.query).document,p=this.getVariables(f,t.variables),this.transform(f).hasClientExports?[4,this.localState.addExportedVariables(f,p,d)]:[3,2];case 1:p=C.sent(),C.label=2;case 2:if(t=Object(i.a)(Object(i.a)({},t),{variables:p}),b=y="network-only"===u||"no-cache"===u,y||(_=this.dataStore.getCache().diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),w=_.complete,E=_.result,b=!w||"cache-and-network"===u,h=E),x=b&&"cache-only"!==u&&"standby"!==u,Object(o.s)(["live"],f)&&(x=!0),k=this.idCounter++,S="no-cache"!==u?this.updateQueryWatch(e,f,t):void 0,this.setQuery(e,(function(){return{document:f,lastRequestId:k,invalidated:!0,cancel:S}})),this.invalidate(r),this.queryStore.initQuery({queryId:e,document:f,storePreviousVariables:x,variables:p,isPoll:n===g.poll,isRefetch:n===g.refetch,metadata:s,fetchMoreForQueryId:r}),this.broadcastQueries(),x){if(O=this.fetchRequest({requestId:k,queryId:e,document:f,options:t,fetchMoreForQueryId:r}).catch((function(t){throw m(t)?t:(k>=T.getQuery(e).lastRequestId&&(T.queryStore.markQueryError(e,t,r),T.invalidate(e),T.invalidate(r),T.broadcastQueries()),new v({networkError:t}))})),"cache-and-network"!==u)return[2,O];O.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!x),this.invalidate(e),this.invalidate(r),this.transform(f).hasForcedResolvers?[2,this.localState.runResolvers({document:f,remoteResult:{data:h},context:d,variables:p,onlyRunForcedResolvers:!0}).then((function(n){return T.markQueryResult(e,n,t,r),T.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:h}])}}))}))},e.prototype.markQueryResult=function(e,t,n,r){var i=n.fetchPolicy,o=n.variables,a=n.errorPolicy;"no-cache"===i?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,r,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,n){var r=this;function i(e,t){if(n[e])try{n[e](t)}catch(e){}}return function(n,o){if(r.invalidate(e,!1),n){var a=r.getQuery(e),s=a.observableQuery,l=a.document,u=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==u){var c=f(n.networkStatus),d=s&&s.getLastResult(),p=!(!d||d.networkStatus===n.networkStatus),m=t.returnPartialData||!o&&n.previousVariables||p&&t.notifyOnNetworkStatusChange||"cache-only"===u||"cache-and-network"===u;if(!c||m){var g=h(n.graphQLErrors),y=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===y&&g||n.networkError)return i("error",new v({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var b=void 0,_=void 0;if(o)"no-cache"!==u&&"network-only"!==u&&r.setQuery(e,(function(){return{newData:null}})),b=o.result,_=!o.complete;else{var w=s&&s.getLastError(),E="none"!==y&&(w&&w.graphQLErrors)!==n.graphQLErrors;if(d&&d.data&&!E)b=d.data,_=!1;else{var x=r.dataStore.getCache().diff({query:l,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});b=x.result,_=!x.complete}}var k=_&&!(t.returnPartialData||"cache-only"===u),S={data:k?d&&d.data:b,loading:c,networkStatus:n.networkStatus,stale:k};"all"===y&&g&&(S.errors=n.graphQLErrors),i("next",S)}catch(e){i("error",new v({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.dataStore.getCache(),r=n.transformDocument(e),i=Object(o.D)(n.transformForLink(r)),a=this.localState.clientQuery(r),s=this.localState.serverQuery(i),l={document:r,hasClientExports:Object(o.r)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:a,serverQuery:s,defaultVars:Object(o.h)(Object(o.m)(r))},u=function(e){e&&!t.has(e)&&t.set(e,l)};u(e),u(r),u(a),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return Object(i.a)(Object(i.a)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(c.b)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=Object(i.a)({},e);return new y({queryManager:this,options:n,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(c.b)(e.query,12),Object(c.b)("Document"===e.query.kind,13),Object(c.b)(!e.returnPartialData,14),Object(c.b)(!e.pollInterval,15),new Promise((function(n,r){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(n,r).then((function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,n){var r=this,i=this.getQuery(e).cancel;i&&i();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=r.getQuery(e).observableQuery;if(n){var i=n.getLastResult();i&&(t=i.data)}return t},callback:function(t){r.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new c.a(16))}));var e=[];return this.queries.forEach((function(t,n){t.observableQuery&&e.push(n)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.queries.forEach((function(r,i){var o=r.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||n.push(o.refetch()),t.setQuery(i,(function(){return{newData:null}})),t.invalidate(i)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.observeQuery=function(e,t,n){return this.addQueryListener(e,this.queryListenerForObserver(e,t,n)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.variables;n=this.transform(n).document,i=this.getVariables(n,i);var a=function(e){return t.getObservableFromLink(n,{},e,!1).map((function(i){if(r&&"no-cache"===r||(t.dataStore.markSubscriptionResult(i,n,e),t.broadcastQueries()),Object(o.q)(i))throw new v({graphQLErrors:i.errors});return i}))};if(this.transform(n).hasClientExports){var s=this.localState.addExportedVariables(n,i).then(a);return new p((function(e){var t=null;return s.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return a(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,r=n.variables,i=n.query,o=n.fetchPolicy,a=n.returnPartialData,s=e.getLastResult(),l=this.getQuery(e.queryId).newData;if(l&&l.complete)return{data:l.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var u=this.dataStore.getCache().diff({query:i,variables:r,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),c=u.result,d=u.complete;return{data:d||a?c:void 0,partial:!d}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;Object(c.b)(n,17),t=n}else t=e;var r=t.options,i=r.variables,o=r.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,n){t.invalidated&&t.listeners.forEach((function(r){r&&r(e.queryStore.get(n),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var a,s=this;void 0===r&&(r=this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,d=this.link,f={query:u,variables:n,operationName:Object(o.n)(u)||void 0,context:this.prepareContext(Object(i.a)(Object(i.a)({},t),{forceFetch:!r}))};if(t=f.context,r){var h=c.get(u)||new Map;c.set(u,h);var m=JSON.stringify(n);if(!(a=h.get(m))){h.set(m,a=S(Object(l.b)(d,f)));var g=function(){h.delete(m),h.size||c.delete(u),v.unsubscribe()},v=a.subscribe({next:g,error:g,complete:g})}}else a=S(Object(l.b)(d,f))}else a=p.of({data:{}}),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(a=function(e,t){return new p((function(n){var r=n.next,i=n.error,o=n.complete,a=0,s=!1,l={next:function(e){++a,new Promise((function(n){n(t(e))})).then((function(e){--a,r&&r.call(n,e),s&&l.complete()}),(function(e){--a,i&&i.call(n,e)}))},error:function(e){i&&i.call(n,e)},complete:function(){s=!0,a||o&&o.call(n)}},u=e.subscribe(l);return function(){return u.unsubscribe()}}))}(a,(function(e){return s.localState.runResolvers({document:y,remoteResult:e,context:t,variables:n})}))),a},e.prototype.fetchRequest=function(e){var t,n,i=this,o=e.requestId,a=e.queryId,s=e.document,l=e.options,u=e.fetchMoreForQueryId,c=l.variables,d=l.errorPolicy,f=void 0===d?"none":d,p=l.fetchPolicy;return new Promise((function(e,d){var m=i.getObservableFromLink(s,l.context,c),g="fetchRequest:"+a;i.fetchQueryRejectFns.set(g,d);var y=function(){i.fetchQueryRejectFns.delete(g),i.setQuery(a,(function(e){e.subscriptions.delete(b)}))},b=m.map((function(e){if(o>=i.getQuery(a).lastRequestId&&(i.markQueryResult(a,e,l,u),i.queryStore.markQueryResult(a,e,u),i.invalidate(a),i.invalidate(u),i.broadcastQueries()),"none"===f&&h(e.errors))return d(new v({graphQLErrors:e.errors}));if("all"===f&&(n=e.errors),u||"no-cache"===p)t=e.data;else{var r=i.dataStore.getCache().diff({variables:c,query:s,optimistic:!1,returnPartialData:!0}),m=r.result;(r.complete||l.returnPartialData)&&(t=m)}})).subscribe({error:function(e){y(),d(e)},complete:function(){y(),e({data:t,errors:n,loading:!1,networkStatus:r.ready,stale:!1})}});i.setQuery(a,(function(e){e.subscriptions.add(b)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),r=Object(i.a)(Object(i.a)({},n),t(n));this.queries.set(e,r)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(i.a)(Object(i.a)({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==r.ready&&t.networkStatus!==r.error},e.prototype.startPollingQuery=function(e,t,n){var r=this,o=e.pollInterval;if(Object(c.b)(o,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(t);a||this.pollingInfoByQueryId.set(t,a={}),a.interval=o,a.options=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"network-only"});var s=function(){var e=r.pollingInfoByQueryId.get(t);e&&(r.checkInFlight(t)?l():r.fetchQuery(t,e.options,g.poll).then(l,l))},l=function(){var e=r.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(s,e.interval))};n&&this.addQueryListener(t,n),l()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),C=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,r,i){void 0===i&&(i=!1);var a=!Object(o.q)(e);i&&Object(o.q)(e)&&e.data&&(a=!0),!r&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(o.q)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t,n=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=n.cache;n.cache=r;try{n.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{n.cache=i}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(o.q)(e.result)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],r=e.updateQueries;r&&Object.keys(r).forEach((function(i){var a=r[i],s=a.query,l=a.updater,u=t.cache.diff({query:s.document,variables:s.variables,returnPartialData:!0,optimistic:!1}),c=u.result;if(u.complete){var d=Object(o.I)((function(){return l(c,{mutationResult:e.result,queryName:Object(o.n)(s.document)||void 0,queryVariables:s.variables})}));d&&n.push({result:d,dataId:"ROOT_QUERY",query:s.document,variables:s.variables})}})),this.cache.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&Object(o.I)((function(){return r(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),A=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.cache,r=e.ssrMode,i=void 0!==r&&r,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,u=e.queryDeduplication,d=void 0===u||u,f=e.defaultOptions,p=e.assumeImmutableResults,h=void 0!==p&&p,m=e.resolvers,g=e.typeDefs,v=e.fragmentMatcher,y=e.name,b=e.version,_=e.link;if(!_&&m&&(_=l.a.empty()),!_||!n)throw new c.a(1);this.link=_,this.cache=n,this.store=new C(n),this.disableNetworkFetches=i||a>0,this.queryDeduplication=d,this.defaultOptions=f||{},this.typeDefs=g,a&&setTimeout((function(){return t.disableNetworkFetches=!1}),a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);void 0!==s&&(s&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.8",this.localState=new k({cache:n,client:this,resolvers:m,fragmentMatcher:v}),this.queryManager=new T({link:this.link,store:this.store,queryDeduplication:d,ssrMode:i,clientAwareness:{name:y,version:b},localState:this.localState,assumeImmutableResults:h,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.query),e)),Object(c.b)("cache-and-network"!==e.fetchPolicy,2),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Object(l.b)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}();t.default=A},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n1,i=!1,o=arguments[1],a=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=f(t,c);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return h(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(s("iterator")&&(r=f(t,u)))return new n((function(e){g((function(){if(!e.closed){var n=!0,i=!1,o=void 0;try{for(var a,s=r.call(t)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var l=a.value;if(e.next(l),e.closed)return}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){g((function(){if(!e.closed){for(var n=0;n(0,i.default)(m(),((e=1)=>{let t=(0,o.oneLine)(v(),"PLACE_HOLDER");for(let n=0;n120){for(var h=Math.floor(c/80),m=c%80,g=[],v=0;v0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive")};t.Source=a,(0,i.default)(a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLexer=function(e,t){var n=new c(s.TokenKind.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:l,lookahead:u}},t.isPunctuatorToken=function(e){var t=e.kind;return t===s.TokenKind.BANG||t===s.TokenKind.DOLLAR||t===s.TokenKind.AMP||t===s.TokenKind.PAREN_L||t===s.TokenKind.PAREN_R||t===s.TokenKind.SPREAD||t===s.TokenKind.COLON||t===s.TokenKind.EQUALS||t===s.TokenKind.AT||t===s.TokenKind.BRACKET_L||t===s.TokenKind.BRACKET_R||t===s.TokenKind.BRACE_L||t===s.TokenKind.PIPE||t===s.TokenKind.BRACE_R};var r,i=(r=n(548))&&r.__esModule?r:{default:r},o=n(549),a=n(546),s=n(551);function l(){return this.lastToken=this.token,this.token=this.lookahead()}function u(){var e=this.token;if(e.kind!==s.TokenKind.EOF)do{e=e.next||(e.next=f(this,e))}while(e.kind===s.TokenKind.COMMENT);return e}function c(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function d(e){return isNaN(e)?s.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function f(e,t){var n=e.source,r=n.body,i=r.length,l=function(e,t,n){var r=e.length,i=t;for(;i=i)return new c(s.TokenKind.EOF,i,i,u,f,t);var m=r.charCodeAt(l);switch(m){case 33:return new c(s.TokenKind.BANG,l,l+1,u,f,t);case 35:return function(e,t,n,r,i){var o,a=e.body,l=t;do{o=a.charCodeAt(++l)}while(!isNaN(o)&&(o>31||9===o));return new c(s.TokenKind.COMMENT,t,l,n,r,i,a.slice(t+1,l))}(n,l,u,f,t);case 36:return new c(s.TokenKind.DOLLAR,l,l+1,u,f,t);case 38:return new c(s.TokenKind.AMP,l,l+1,u,f,t);case 40:return new c(s.TokenKind.PAREN_L,l,l+1,u,f,t);case 41:return new c(s.TokenKind.PAREN_R,l,l+1,u,f,t);case 46:if(46===r.charCodeAt(l+1)&&46===r.charCodeAt(l+2))return new c(s.TokenKind.SPREAD,l,l+3,u,f,t);break;case 58:return new c(s.TokenKind.COLON,l,l+1,u,f,t);case 61:return new c(s.TokenKind.EQUALS,l,l+1,u,f,t);case 64:return new c(s.TokenKind.AT,l,l+1,u,f,t);case 91:return new c(s.TokenKind.BRACKET_L,l,l+1,u,f,t);case 93:return new c(s.TokenKind.BRACKET_R,l,l+1,u,f,t);case 123:return new c(s.TokenKind.BRACE_L,l,l+1,u,f,t);case 124:return new c(s.TokenKind.PIPE,l,l+1,u,f,t);case 125:return new c(s.TokenKind.BRACE_R,l,l+1,u,f,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,n,r,i){var o=e.body,a=o.length,l=t+1,u=0;for(;l!==a&&!isNaN(u=o.charCodeAt(l))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++l;return new c(s.TokenKind.NAME,t,l,n,r,i,o.slice(t,l))}(n,l,u,f,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,a){var l=e.body,u=n,f=t,h=!1;45===u&&(u=l.charCodeAt(++f));if(48===u){if((u=l.charCodeAt(++f))>=48&&u<=57)throw(0,o.syntaxError)(e,f,"Invalid number, unexpected digit after 0: ".concat(d(u),"."))}else f=p(e,f,u),u=l.charCodeAt(f);46===u&&(h=!0,u=l.charCodeAt(++f),f=p(e,f,u),u=l.charCodeAt(f));69!==u&&101!==u||(h=!0,43!==(u=l.charCodeAt(++f))&&45!==u||(u=l.charCodeAt(++f)),f=p(e,f,u),u=l.charCodeAt(f));if(46===u||69===u||101===u)throw(0,o.syntaxError)(e,f,"Invalid number, expected digit but got: ".concat(d(u),"."));return new c(h?s.TokenKind.FLOAT:s.TokenKind.INT,t,f,r,i,a,l.slice(t,f))}(n,l,m,u,f,t);case 34:return 34===r.charCodeAt(l+1)&&34===r.charCodeAt(l+2)?function(e,t,n,r,i,l){var u=e.body,f=t+3,p=f,h=0,m="";for(;f=48&&a<=57){do{a=r.charCodeAt(++i)}while(a>=48&&a<=57);return i}throw(0,o.syntaxError)(e,i,"Invalid number, expected digit but got: ".concat(d(a),"."))}function h(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}(0,i.default)(c,(function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reopenPullRequest=t.createBranchAndPullRequest=t.createBranch=t.createPullRequest=t.closePullRequestAndDeleteBranch=t.closePullRequest=t.deleteBranch=t.updateBranch=void 0;var r,i=(r=n(361))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(552));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function s(){const e=m(["\n mutation reopenPullRequest($reopenPullRequestInput: ReopenPullRequestInput!) {\n reopenPullRequest(input: $reopenPullRequestInput) {\n clientMutationId\n pullRequest {\n ...PullRequestParts\n }\n }\n }\n ","\n"]);return s=function(){return e},e}function l(){const e=m(["\n mutation createBranchAndPullRequest(\n $createRefInput: CreateRefInput!\n $createPullRequestInput: CreatePullRequestInput!\n ) {\n createRef(input: $createRefInput) {\n branch: ref {\n ...BranchParts\n }\n }\n ","\n }\n ","\n ","\n"]);return l=function(){return e},e}function u(){const e=m(["\n mutation createBranch($createRefInput: CreateRefInput!) {\n createRef(input: $createRefInput) {\n branch: ref {\n ...BranchParts\n }\n }\n }\n ","\n"]);return u=function(){return e},e}function c(){const e=m(["\n mutation createPullRequest($createPullRequestInput: CreatePullRequestInput!) {\n ","\n }\n ","\n"]);return c=function(){return e},e}function d(){const e=m(["\n mutation closePullRequestAndDeleteBranch(\n $closePullRequestInput: ClosePullRequestInput!\n $deleteRefInput: DeleteRefInput!\n ) {\n ","\n ","\n }\n ","\n"]);return d=function(){return e},e}function f(){const e=m(["\n mutation closePullRequestAndDeleteBranch($closePullRequestInput: ClosePullRequestInput!) {\n ","\n }\n ","\n"]);return f=function(){return e},e}function p(){const e=m(["\n mutation deleteRef($deleteRefInput: DeleteRefInput!) {\n ","\n }\n"]);return p=function(){return e},e}function h(){const e=m(["\n mutation updateRef($input: UpdateRefInput!) {\n updateRef(input: $input) {\n branch: ref {\n ...BranchParts\n }\n }\n }\n ","\n"]);return h=function(){return e},e}function m(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const g=(0,i.default)(h(),o.branch);t.updateBranch=g;const v=(0,i.default)(p(),"\ndeleteRef(input: $deleteRefInput) {\n clientMutationId\n}\n");t.deleteBranch=v;const y="\nclosePullRequest(input: $closePullRequestInput) {\n clientMutationId\n pullRequest {\n ...PullRequestParts\n }\n}\n",b=(0,i.default)(f(),y,o.pullRequest);t.closePullRequest=b;const _=(0,i.default)(d(),y,"\ndeleteRef(input: $deleteRefInput) {\n clientMutationId\n}\n",o.pullRequest);t.closePullRequestAndDeleteBranch=_;const w="\n createPullRequest(input: $createPullRequestInput) {\n clientMutationId\n pullRequest {\n ...PullRequestParts\n }\n}\n ",E=(0,i.default)(c(),w,o.pullRequest);t.createPullRequest=E;const x=(0,i.default)(u(),o.branch);t.createBranch=x;const k=(0,i.default)(l(),w,o.branch,o.pullRequest);t.createBranchAndPullRequest=k;const S=(0,i.default)(s(),o.pullRequest);t.reopenPullRequest=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(171)),i=d(n(124)),o=d(n(179)),a=n(98),s=n(41),l=d(n(553)),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(554));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function d(e){return e&&e.__esModule?e:{default:e}}function f(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n Repo "',"\" not found.\n\n Please ensure the repo information is spelled correctly.\n\n If the repo is private, make sure you're logged into a GitLab account with access.\n "]);return f=function(){return e},e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t{throw e.message=(0,a.stripIndent)(f(),this.repo),e}))throw new Error("Your GitLab user account does not have access to this repo.");return h({},t,{login:t.username,token:e.token})}async logout(){this.token=null}getToken(){return Promise.resolve(this.token)}filterFile(e,t,n,i){const o=(0,r.default)(t.path.split(e)[1]||"/","/");return t.name.endsWith("."+n)&&o.split("/").length<=i}async entriesByFolder(e,t,n){let r;const i=await(0,s.entriesByFolder)(()=>this.api.listFiles(e,n>1).then(({files:i,cursor:o})=>(r=o.mergeMeta({folder:e,extension:t,depth:n}),i.filter(r=>this.filterFile(e,r,t,n)))),this.api.readFile.bind(this.api),u.API_NAME);return i[s.CURSOR_COMPATIBILITY_SYMBOL]=r,i}async allEntriesByFolder(e,t,n){return await(0,s.entriesByFolder)(()=>this.api.listAllFiles(e,n>1).then(r=>r.filter(r=>this.filterFile(e,r,t,n))),this.api.readFile.bind(this.api),u.API_NAME)}entriesByFiles(e){return(0,s.entriesByFiles)(e,this.api.readFile.bind(this.api),u.API_NAME)}getEntry(e){return this.api.readFile(e).then(t=>({file:{path:e,id:null},data:t}))}getMedia(e=this.mediaFolder){return this.api.listAllFiles(e).then(e=>e.map(({id:e,name:t,path:n})=>({id:e,name:t,path:n,displayURL:{id:e,name:t,path:n}})))}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||(0,o.default)(10),(0,s.getMediaDisplayURL)(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=(0,s.basename)(e),n=await(0,s.getMediaAsBlob)(e,null,this.api.readFile.bind(this.api)),r=(0,s.blobToFileObj)(t,n),i=URL.createObjectURL(r);return{id:await(0,s.getBlobSHA)(n),displayURL:i,path:e,name:t,size:r.size,file:r,url:i}}async persistEntry(e,t,n){return(0,s.runWithLock)(this.lock,()=>this.api.persistFiles(e,t,n),"Failed to acquire persist entry lock")}async persistMedia(e,t){const n=e.fileObj,[r]=await Promise.all([(0,s.getBlobSHA)(n),this.api.persistFiles(null,[e],t)]),{path:o}=e,a=URL.createObjectURL(n);return{displayURL:a,path:(0,i.default)(o,"/"),name:n.name,size:n.size,file:n,url:a,id:r}}deleteFile(e,t){return this.api.deleteFile(e,t)}traverseCursor(e,t){return this.api.traverseCursor(e,t).then(async({entries:t,cursor:n})=>{var r,i,o;const[a,s,l]=[null===(r=e.meta)||void 0===r?void 0:r.get("folder"),null===(i=e.meta)||void 0===i?void 0:i.get("depth"),null===(o=e.meta)||void 0===o?void 0:o.get("extension")];return a&&s&&l&&(t=t.filter(e=>this.filterFile(a,e,l,s)),n=n.mergeMeta({folder:a,extension:l,depth:s})),{entries:await Promise.all(t.map(e=>this.api.readFile(e.path,e.id).then(t=>({file:e,data:t})))),cursor:n}})}loadMediaFile(e,t){return(0,s.getMediaAsBlob)(t.path,null,(t,n,{parseText:r})=>this.api.readFile(t,n,{branch:e,parseText:r})).then(e=>{const n=(0,s.basename)(t.path),r=(0,s.blobToFileObj)(n,e);return{id:t.path,displayURL:URL.createObjectURL(r),path:t.path,name:n,size:r.size,file:r}})}async loadEntryMediaFiles(e,t){return await Promise.all(t.map(t=>this.loadMediaFile(e,t)))}async unpublishedEntries(){return(0,s.unpublishedEntries)(()=>this.api.listUnpublishedBranches().then(e=>e.map(e=>(0,s.contentKeyFromBranch)(e))),e=>this.api.readUnpublishedBranchFile(e),u.API_NAME)}async unpublishedEntry(e,t,{loadEntryMediaFiles:n=((e,t)=>this.loadEntryMediaFiles(e,t))}={}){const r=(0,s.generateContentKey)(e,t),i=await this.api.readUnpublishedBranchFile(r),o=await n(i.metaData.branch,i.metaData.objects.entry.mediaFiles);return{slug:t,file:{path:i.metaData.objects.entry.path,id:null},data:i.fileData,metaData:i.metaData,mediaFiles:o,isModification:i.isModification}}async updateUnpublishedEntryStatus(e,t,n){return(0,s.runWithLock)(this.lock,()=>this.api.updateUnpublishedEntryStatus(e,t,n),"Failed to acquire update entry status lock")}async deleteUnpublishedEntry(e,t){return(0,s.runWithLock)(this.lock,()=>this.api.deleteUnpublishedEntry(e,t),"Failed to acquire delete entry lock")}async publishUnpublishedEntry(e,t){return(0,s.runWithLock)(this.lock,()=>this.api.publishUnpublishedEntry(e,t),"Failed to acquire publish entry lock")}async getDeployPreview(e,t){try{const n=await this.api.getStatuses(e,t),r=(0,s.getPreviewStatus)(n,this.previewContext);if(r){const{target_url:e,state:t}=r;return{url:e,status:t}}return null}catch(e){return null}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=p(n(124)),i=p(n(97)),o=p(n(179)),a=n(98),s=n(41),l=p(n(267)),u=p(n(555)),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(556)),d=n(1152);function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function p(e){return e&&e.__esModule?e:{default:e}}function h(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n Repo "',"\" not found.\n\n Please ensure the repo information is spelled correctly.\n\n If the repo is private, make sure you're logged into a Bitbucket account with access.\n "]);return h=function(){return e},e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;tthis.getToken().then(t=>s.unsentRequest.withHeaders({Authorization:"Bearer ".concat(t)},e)).then(s.unsentRequest.performRequest)),v(this,"apiRequestFunction",async e=>{const t=this.refreshedTokenPromise?await this.refreshedTokenPromise:this.token;return(0,i.default)([s.unsentRequest.withHeaders({Authorization:"Bearer ".concat(t)}),s.unsentRequest.performRequest,(0,s.then)(async t=>{if(401===t.status){const n=await t.json().catch(()=>null);if(n&&"error"===n.type&&/^access token expired/i.test(n.error.message)){const t=await this.getRefreshedAccessToken(),n=s.unsentRequest.withHeaders({Authorization:"Bearer ".concat(t)},e);return s.unsentRequest.performRequest(n)}}return t})])(e)}),this.options=g({proxied:!1,API:null,updateUserCredentials:async()=>null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The BitBucket backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.updateUserCredentials=this.options.updateUserCredentials,this.repo=e.backend.repo||"",this.branch=e.backend.branch||"master",this.apiRoot=e.backend.api_root||"https://api.bitbucket.org/2.0",this.baseUrl=e.base_url||"",this.siteId=e.site_id||"",this.largeMediaURL=e.backend.large_media_url||"https://bitbucket.org/".concat(e.backend.repo,"/info/lfs"),this.token="",this.mediaFolder=e.media_folder,this.squashMerges=e.backend.squash_merges||!1,this.previewContext=e.backend.preview_context||"",this.lock=(0,s.asyncLock)()}authComponent(){return u.default}setUser(e){this.token=e.token,this.api=new c.default({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,squashMerges:this.squashMerges,initialWorkflowStatus:this.options.initialWorkflowStatus})}restoreUser(e){return this.authenticate(e)}async authenticate(e){if(this.token=e.token,this.refreshToken=e.refresh_token,this.api=new c.default({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,initialWorkflowStatus:this.options.initialWorkflowStatus}),!await this.api.hasWriteAccess().catch(e=>{throw e.message=(0,a.stripIndent)(h(),this.repo),e}))throw new Error("Your BitBucket user account does not have access to this repo.");const t=await this.api.user();return g({},t,{name:t.display_name,login:t.username,token:e.token,avatar_url:t.links.avatar.href,refresh_token:e.refresh_token})}getRefreshedAccessToken(){if(this.refreshedTokenPromise)return this.refreshedTokenPromise;if(!this.auth){const e={base_url:this.baseUrl,site_id:this.siteId};this.authenticator=new l.default(e)}return this.refreshedTokenPromise=this.authenticator.refresh({provider:"bitbucket",refresh_token:this.refreshToken}).then(({token:e,refresh_token:t})=>(this.token=e,this.refreshToken=t,this.refreshedTokenPromise=void 0,this.updateUserCredentials({token:e,refresh_token:t}),e)),this.refreshedTokenPromise}logout(){this.token=null}getToken(){return this.refreshedTokenPromise?this.refreshedTokenPromise:Promise.resolve(this.token)}async entriesByFolder(e,t,n){let r;const i=await(0,s.entriesByFolder)(()=>this.api.listFiles(e,n).then(({entries:e,cursor:n})=>(r=n.mergeMeta({extension:t}),(0,s.filterByPropExtension)(t,"path")(e))),this.api.readFile.bind(this.api),"BitBucket");return i[s.CURSOR_COMPATIBILITY_SYMBOL]=r,i}async allEntriesByFolder(e,t,n){return await(0,s.entriesByFolder)(()=>this.api.listAllFiles(e,n).then((0,s.filterByPropExtension)(t,"path")),this.api.readFile.bind(this.api),"BitBucket")}async entriesByFiles(e){return(0,s.entriesByFiles)(e,this.api.readFile.bind(this.api),"BitBucket")}getEntry(e){return this.api.readFile(e).then(t=>({file:{path:e,id:null},data:t}))}getMedia(e=this.mediaFolder){return this.api.listAllFiles(e).then(e=>e.map(({id:e,name:t,path:n})=>({id:e,name:t,path:n,displayURL:{id:e,path:n}})))}getLargeMediaClient(){return this._largeMediaClientPromise||(this._largeMediaClientPromise=(async()=>{const e=await this.api.readFile(".gitattributes").then(e=>(0,s.getLargeMediaPatternsFromGitAttributesFile)(e)).catch(e=>(404===e.status?console.log("This 404 was expected and handled appropriately."):console.error(e),[]));return new d.GitLfsClient(!!(this.largeMediaURL&&e.length>0),this.largeMediaURL,e,this.requestFunction)})()),this._largeMediaClientPromise}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||(0,o.default)(10),(0,s.getMediaDisplayURL)(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=(0,s.basename)(e),n=await(0,s.getMediaAsBlob)(e,null,this.api.readFile.bind(this.api)),r=(0,s.blobToFileObj)(t,n),i=URL.createObjectURL(r);return{id:await(0,s.getBlobSHA)(r),displayURL:i,path:e,name:t,size:r.size,file:r,url:i}}async persistEntry(e,t,n){const r=await this.getLargeMediaClient();return(0,s.runWithLock)(this.lock,async()=>this.api.persistFiles(e,r.enabled?await(0,s.getLargeMediaFilteredMediaFiles)(r,t):t,n),"Failed to acquire persist entry lock")}async persistMedia(e,t){const{fileObj:n,path:r}=e,i=URL.createObjectURL(n),o=await this.getLargeMediaClient(),a=r.startsWith("/")?r.slice(1):r;if(!o.enabled||!o.matchPath(a))return this._persistMedia(e,t);const l=await(0,s.getPointerFileForMediaFileObj)(o,n,r);return g({},await this._persistMedia(l,t),{displayURL:i})}async _persistMedia(e,t){const n=e.fileObj,[i]=await Promise.all([(0,s.getBlobSHA)(n),this.api.persistFiles(null,[e],t)]),o=URL.createObjectURL(n);return{displayURL:o,path:(0,r.default)(e.path,"/k"),name:n.name,size:n.size,id:i,file:n,url:o}}deleteFile(e,t){return this.api.deleteFile(e,t)}traverseCursor(e,t){return this.api.traverseCursor(e,t).then(async({entries:t,cursor:n})=>{var r;const i=null===(r=e.meta)||void 0===r?void 0:r.get("extension");return i&&(t=(0,s.filterByPropExtension)(i,"path")(t),n=n.mergeMeta({extension:i})),{entries:await Promise.all(t.map(e=>this.api.readFile(e.path,e.id).then(t=>({file:e,data:t})))),cursor:n}})}loadMediaFile(e,t){return(0,s.getMediaAsBlob)(t.path,null,(t,n,{parseText:r})=>this.api.readFile(t,n,{branch:e,parseText:r})).then(e=>{const n=(0,s.basename)(t.path),r=(0,s.blobToFileObj)(n,e);return{id:t.path,displayURL:URL.createObjectURL(r),path:t.path,name:n,size:r.size,file:r}})}async loadEntryMediaFiles(e,t){return await Promise.all(t.map(t=>this.loadMediaFile(e,t)))}async unpublishedEntries(){return(0,s.unpublishedEntries)(()=>this.api.listUnpublishedBranches().then(e=>e.map(e=>(0,s.contentKeyFromBranch)(e))),e=>this.api.readUnpublishedBranchFile(e),c.API_NAME)}async unpublishedEntry(e,t,{loadEntryMediaFiles:n=((e,t)=>this.loadEntryMediaFiles(e,t))}={}){const r=(0,s.generateContentKey)(e,t),i=await this.api.readUnpublishedBranchFile(r),o=await n(i.metaData.branch,i.metaData.objects.entry.mediaFiles);return{slug:t,file:{path:i.metaData.objects.entry.path,id:null},data:i.fileData,metaData:i.metaData,mediaFiles:o,isModification:i.isModification}}async updateUnpublishedEntryStatus(e,t,n){return(0,s.runWithLock)(this.lock,()=>this.api.updateUnpublishedEntryStatus(e,t,n),"Failed to acquire update entry status lock")}async deleteUnpublishedEntry(e,t){return(0,s.runWithLock)(this.lock,()=>this.api.deleteUnpublishedEntry(e,t),"Failed to acquire delete entry lock")}async publishUnpublishedEntry(e,t){return(0,s.runWithLock)(this.lock,()=>this.api.publishUnpublishedEntry(e,t),"Failed to acquire publish entry lock")}async getDeployPreview(e,t){try{const n=await this.api.getStatuses(e,t),r=(0,s.getPreviewStatus)(n,this.previewContext);if(r){const{target_url:e,state:t}=r;return{url:e,status:t}}return null}catch(e){return null}}}},function(e,t,n){var r=n(1151);e.exports={parse:function(e){return r.parse(e.toString())}}},function(e,t,n){"use strict";function r(e,t,n,i){this.message=e,this.expected=t,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(r,Error),r.buildMessage=function(e,t){var n={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,n="";for(t=0;t0){for(t=1,r=1;tY&&(Y=K,Q=[]),Q.push(e))}function ie(e,t,n){return new r(r.buildMessage(e,t),e,t,n)}function oe(){var e,t,n,r=35*K+0,o=J[r];if(o)return K=o.nextPos,o.result;for(e=K,t=[],n=ae();n!==i;)t.push(n),n=ae();return t!==i&&(e,t=t),e=t,J[r]={nextPos:K,result:e},e}function ae(){var t,n=35*K+1,r=J[n];return r?(K=r.nextPos,r.result):((t=function(){var e,t,n=35*K+5,r=J[n];if(r)return K=r.nextPos,r.result;e=K,(t=le())!==i&&ve()!==i&&se()!==i?(e,t=xe(t,void 0,!0),e=t):(K=e,e=i);return J[n]={nextPos:K,result:e},e}())===i&&(t=function(){var t,n,r,o,a,s,l,u,c=35*K+6,d=J[c];if(d)return K=d.nextPos,d.result;t=K,(n=function(){var t,n,r,o,a,s,l=35*K+19,u=J[l];if(u)return K=u.nextPos,u.result;t=K,"diff "===e.substr(K,5)?(n="diff ",K+=5):(n=i,0===X&&re(k));n!==i&&(r=_e())!==i?(32===e.charCodeAt(K)?(o=" ",K++):(o=i,0===X&&re(w)),o!==i&&(a=be())!==i&&(s=ye())!==i?t=n=[n,r,o,a,s]:(K=t,t=i)):(K=t,t=i);return J[l]={nextPos:K,result:t},t}())!==i?((r=ge())===i&&(r=null),r!==i&&(o=function(){var t,n,r,o,a=35*K+21,s=J[a];if(s)return K=s.nextPos,s.result;t=K,"similarity index "===e.substr(K,17)?(n="similarity index ",K+=17):(n=i,0===X&&re(S));n!==i&&(r=we())!==i?(37===e.charCodeAt(K)?(o="%",K++):(o=i,0===X&&re(O)),o!==i&&ye()!==i?(t,t=n=r):(K=t,t=i)):(K=t,t=i);return J[a]={nextPos:K,result:t},t}())!==i&&(a=function(){var t,n,r,o,a=35*K+25,s=J[a];if(s)return K=s.nextPos,s.result;t=K,"rename"===e.substr(K,6)?(n="rename",K+=6):(n=i,0===X&&re(M));n===i&&("copy"===e.substr(K,4)?(n="copy",K+=4):(n=i,0===X&&re(I)));n!==i?(" from "===e.substr(K,6)?(r=" from ",K+=6):(r=i,0===X&&re(D)),r!==i&&(o=be())!==i&&ye()!==i?(t,n=j(n,o),t=n):(K=t,t=i)):(K=t,t=i);return J[a]={nextPos:K,result:t},t}())!==i&&(s=function(){var t,n,r,o,a=35*K+26,s=J[a];if(s)return K=s.nextPos,s.result;t=K,"rename"===e.substr(K,6)?(n="rename",K+=6):(n=i,0===X&&re(M));n===i&&("copy"===e.substr(K,4)?(n="copy",K+=4):(n=i,0===X&&re(I)));n!==i?(" to "===e.substr(K,4)?(r=" to ",K+=4):(r=i,0===X&&re(L)),r!==i&&(o=be())!==i&&ye()!==i?(t,n=j(n,o),t=n):(K=t,t=i)):(K=t,t=i);return J[a]={nextPos:K,result:t},t}())!==i?((l=ve())===i&&(l=null),l!==i?((u=se())===i&&(u=ue()),u===i&&(u=null),u!==i?(t,f=r,p=o,m=s,g=l,v=u,n=function(e,t,n,r,i,o){const a={oldPath:n,newPath:r,hunks:o?o.hunks:[],status:"copy"===e?"copied":"renamed",similarity:t};return i&&(a.oldMode=i.old_mode,a.newMode=i.new_mode),a}((h=a).operation,p,h.file,m.file,f||g,v),t=n):(K=t,t=i)):(K=t,t=i)):(K=t,t=i)):(K=t,t=i);var f,p,h,m,g,v;return J[c]={nextPos:K,result:t},t}())===i&&(t=function(){var e,t,n,r=35*K+7,o=J[r];if(o)return K=o.nextPos,o.result;e=K,(t=le())!==i&&ve()!==i?((n=ue())===i&&(n=null),n!==i?(e,t=xe(t,n),e=t):(K=e,e=i)):(K=e,e=i);return J[r]={nextPos:K,result:e},e}())===i&&(t=function(){var t,n,r,o=35*K+9,a=J[o];if(a)return K=a.nextPos,a.result;t=K,"* Unmerged path "===e.substr(K,16)?(n="* Unmerged path ",K+=16):(n=i,0===X&&re(u));n!==i&&(r=be())!==i&&ye()!==i?(t,n=xe(r),t=n):(K=t,t=i);return J[o]={nextPos:K,result:t},t}())===i&&(t=function(){var e,t,n,r,o=35*K+2,a=J[o];if(a)return K=a.nextPos,a.result;e=K,(t=he())!==i?((n=me())===i&&(n=null),n!==i?((r=ce())===i&&(r=null),r!==i&&se()!==i?(e,t=Ee(t,n,void 0,!0),e=t):(K=e,e=i)):(K=e,e=i)):(K=e,e=i);return J[o]={nextPos:K,result:e},e}())===i&&(t=function(){var e,t,n,r,o=35*K+4,a=J[o];if(a)return K=a.nextPos,a.result;e=K,(t=he())!==i?((n=me())===i&&(n=null),n!==i?((r=ue())===i&&(r=null),r!==i?(e,t=Ee(t,n,r),e=t):(K=e,e=i)):(K=e,e=i)):(K=e,e=i);return J[o]={nextPos:K,result:e},e}()),J[n]={nextPos:K,result:t},t)}function se(){var t,n,r,o,a=35*K+3,l=J[a];return l?(K=l.nextPos,l.result):(t=K,"Binary files "===e.substr(K,13)?(n="Binary files ",K+=13):(n=i,0===X&&re(s)),n!==i&&(r=be())!==i&&(o=ye())!==i?t=n=[n,r,o]:(K=t,t=i),J[a]={nextPos:K,result:t},t)}function le(){var t,n,r,o=35*K+8,a=J[o];return a?(K=a.nextPos,a.result):(t=K,"diff --cc "===e.substr(K,10)?(n="diff --cc ",K+=10):(n=i,0===X&&re(l)),n!==i&&(r=be())!==i&&ye()!==i?(t,t=n=r):(K=t,t=i),J[o]={nextPos:K,result:t},t)}function ue(){var e,t,n,r=35*K+10,o=J[r];if(o)return K=o.nextPos,o.result;if(e=K,ce()!==i){for(t=[],n=de();n!==i;)t.push(n),n=de();t!==i?(e,e={hunks:t}):(K=e,e=i)}else K=e,e=i;return J[r]={nextPos:K,result:e},e}function ce(){var t,n,r,o,a,s=35*K+11,l=J[s];return l?(K=l.nextPos,l.result):(t=K,"--- "===e.substr(K,4)?(n="--- ",K+=4):(n=i,0===X&&re(c)),n!==i&&(r=be())!==i&&ye()!==i?("+++ "===e.substr(K,4)?(o="+++ ",K+=4):(o=i,0===X&&re(d)),o!==i&&(a=be())!==i&&ye()!==i?(t,t=n={old_file_name:r,new_file_name:a}):(K=t,t=i)):(K=t,t=i),J[s]={nextPos:K,result:t},t)}function de(){var t,n,r,o,a,s,l=35*K+12,u=J[l];if(u)return K=u.nextPos,u.result;if(t=K,(n=function(){var t,n=35*K+13,r=J[n];if(r)return K=r.nextPos,r.result;(t=function(){var t,n,r,o,a,s,l,u,c,d=35*K+14,g=J[d];if(g)return K=g.nextPos,g.result;t=K,"@@@ -"===e.substr(K,5)?(n="@@@ -",K+=5):(n=i,0===X&&re(f));n!==i&&(r=fe())!==i?(" -"===e.substr(K,2)?(o=" -",K+=2):(o=i,0===X&&re(p)),o!==i&&(a=fe())!==i?(" +"===e.substr(K,2)?(s=" +",K+=2):(s=i,0===X&&re(h)),s!==i&&(l=fe())!==i?(" @@@"===e.substr(K,4)?(u=" @@@",K+=4):(u=i,0===X&&re(m)),u!==i?((c=be())===i&&(c=null),c!==i&&ye()!==i?(t,y=a,b=l,_=c,n={ourStartLine:(v=r).start,ourLineCount:v.count,theirStartLine:b.start,theirLineCount:b.count,baseStartLine:y.start,baseLineCount:y.count,heading:_?_.trim():""},t=n):(K=t,t=i)):(K=t,t=i)):(K=t,t=i)):(K=t,t=i)):(K=t,t=i);var v,y,b,_;return J[d]={nextPos:K,result:t},t}())===i&&(t=function(){var t,n,r,o,a,s,l,u=35*K+15,c=J[u];if(c)return K=c.nextPos,c.result;t=K,"@@ -"===e.substr(K,4)?(n="@@ -",K+=4):(n=i,0===X&&re(g));n!==i&&(r=fe())!==i?(" +"===e.substr(K,2)?(o=" +",K+=2):(o=i,0===X&&re(h)),o!==i&&(a=fe())!==i?(" @@"===e.substr(K,3)?(s=" @@",K+=3):(s=i,0===X&&re(v)),s!==i?((l=be())===i&&(l=null),l!==i&&ye()!==i?(t,f=a,p=l,n={oldStartLine:(d=r).start,oldLineCount:d.count,newStartLine:f.start,newLineCount:f.count,heading:p?p.trim():""},t=n):(K=t,t=i)):(K=t,t=i)):(K=t,t=i)):(K=t,t=i);var d,f,p;return J[u]={nextPos:K,result:t},t}());return J[n]={nextPos:K,result:t},t}())!==i){if(r=[],(o=pe())!==i)for(;o!==i;)r.push(o),o=pe();else r=i;r!==i?(t,a=n,s=r,t=n=Object.assign({},a,{lines:s})):(K=t,t=i)}else K=t,t=i;return J[l]={nextPos:K,result:t},t}function fe(){var t,n,r,o,a=35*K+16,s=J[a];return s?(K=s.nextPos,s.result):(t=K,(n=we())!==i?(44===e.charCodeAt(K)?(r=",",K++):(r=i,0===X&&re(y)),r!==i&&(o=we())!==i?(t,t=n={start:n,count:o}):(K=t,t=i)):(K=t,t=i),t===i&&(t=K,(n=we())!==i&&(t,n=function(e){return{start:e,count:1}}(n)),t=n),J[a]={nextPos:K,result:t},t)}function pe(){var t,n,r,o,a=35*K+17,s=J[a];return s?(K=s.nextPos,s.result):(t=K,n=K,43===e.charCodeAt(K)?(r="+",K++):(r=i,0===X&&re(b)),r===i&&(45===e.charCodeAt(K)?(r="-",K++):(r=i,0===X&&re(_)),r===i&&(32===e.charCodeAt(K)?(r=" ",K++):(r=i,0===X&&re(w)),r===i&&(92===e.charCodeAt(K)?(r="\\",K++):(r=i,0===X&&re(E))))),r!==i?((o=be())===i&&(o=null),o!==i?n=r=[r,o]:(K=n,n=i)):(K=n,n=i),n!==i&&(r=ye())!==i?(t,t=n=x(n)):(K=t,t=i),J[a]={nextPos:K,result:t},t)}function he(){var t,n,r,o,a=35*K+18,s=J[a];return s?(K=s.nextPos,s.result):(t=K,"diff "===e.substr(K,5)?(n="diff ",K+=5):(n=i,0===X&&re(k)),n!==i&&_e()!==i?(32===e.charCodeAt(K)?(r=" ",K++):(r=i,0===X&&re(w)),r!==i&&(o=function(){var e,t,n=35*K+20,r=J[n];if(r)return K=r.nextPos,r.result;e=K,(t=be())!==i&&(e,t=(o=t).substr(o.length/2+1));var o;return e=t,J[n]={nextPos:K,result:e},e}())!==i&&ye()!==i?(t,t=n={file_name:o}):(K=t,t=i)):(K=t,t=i),J[a]={nextPos:K,result:t},t)}function me(){var t,n,r,o,a=35*K+22,s=J[a];return s?(K=s.nextPos,s.result):(t=K,(n=function(){var t,n,r,o,a=35*K+23,s=J[a];if(s)return K=s.nextPos,s.result;t=K,"new"===e.substr(K,3)?(n="new",K+=3):(n=i,0===X&&re(T));n===i&&("deleted"===e.substr(K,7)?(n="deleted",K+=7):(n=i,0===X&&re(C)));n!==i?(" file mode "===e.substr(K,11)?(r=" file mode ",K+=11):(r=i,0===X&&re(A)),r!==i&&(o=be())!==i&&ye()!==i?(t,l=o,t=n="new"===n?{old_mode:null,new_mode:l}:{old_mode:l,new_mode:null}):(K=t,t=i)):(K=t,t=i);var l;return J[a]={nextPos:K,result:t},t}())===i&&(n=ge()),n===i&&(n=null),n!==i?((r=ve())===i&&(r=null),r!==i?(t,o=r,t=n=n||o):(K=t,t=i)):(K=t,t=i),J[a]={nextPos:K,result:t},t)}function ge(){var t,n,r,o,a,s=35*K+24,l=J[s];return l?(K=l.nextPos,l.result):(t=K,"old mode "===e.substr(K,9)?(n="old mode ",K+=9):(n=i,0===X&&re(P)),n!==i&&(r=be())!==i&&ye()!==i?("new mode "===e.substr(K,9)?(o="new mode ",K+=9):(o=i,0===X&&re(R)),o!==i&&(a=be())!==i&&ye()!==i?(t,t=n={old_mode:r,new_mode:a}):(K=t,t=i)):(K=t,t=i),J[s]={nextPos:K,result:t},t)}function ve(){var t,n,r,o,a,s,l=35*K+27,u=J[l];return u?(K=u.nextPos,u.result):(t=K,"index "===e.substr(K,6)?(n="index ",K+=6):(n=i,0===X&&re(N)),n!==i&&(r=_e())!==i?(32===e.charCodeAt(K)?(o=" ",K++):(o=i,0===X&&re(w)),o!==i&&(a=be())!==i&&ye()!==i?(t,t=n={old_mode:s=a,new_mode:s}):(K=t,t=i)):(K=t,t=i),t===i&&(t=K,"index "===e.substr(K,6)?(n="index ",K+=6):(n=i,0===X&&re(N)),n!==i&&(r=_e())!==i&&(o=ye())!==i?t=n=[n,r,o]:(K=t,t=i)),J[l]={nextPos:K,result:t},t)}function ye(){var t,n=35*K+29,r=J[n];return r?(K=r.nextPos,r.result):(10===e.charCodeAt(K)?(t="\n",K++):(t=i,0===X&&re(F)),t===i&&("\r\n"===e.substr(K,2)?(t="\r\n",K+=2):(t=i,0===X&&re(B))),t===i&&(t=function(){var t,n,r=35*K+31,o=J[r];if(o)return K=o.nextPos,o.result;t=K,X++,e.length>K?(n=e.charAt(K),K++):(n=i,0===X&&re(U));X--,n===i?t=void 0:(K=t,t=i);return J[r]={nextPos:K,result:t},t}()),J[n]={nextPos:K,result:t},t)}function be(){var t,n,r,o=35*K+32,a=J[o];if(a)return K=a.nextPos,a.result;if(t=K,n=[],z.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(q)),r!==i)for(;r!==i;)n.push(r),z.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(q));else n=i;return n!==i&&(t,n=x(n)),t=n,J[o]={nextPos:K,result:t},t}function _e(){var t,n,r,o=35*K+33,a=J[o];if(a)return K=a.nextPos,a.result;if(t=K,n=[],H.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(W)),r!==i)for(;r!==i;)n.push(r),H.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(W));else n=i;return n!==i&&(t,n=x(n)),t=n,J[o]={nextPos:K,result:t},t}function we(){var t,n,r,o=35*K+34,a=J[o];if(a)return K=a.nextPos,a.result;if(t=K,n=[],G.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(V)),r!==i)for(;r!==i;)n.push(r),G.test(e.charAt(K))?(r=e.charAt(K),K++):(r=i,0===X&&re(V));else n=i;return n!==i&&(t,n=parseInt(n.join(""),10)),t=n,J[o]={nextPos:K,result:t},t}function Ee(e,t,n,r){if(t.old_mode&&!t.new_mode)return{newPath:null,oldPath:e.file_name,newMode:null,oldMode:t.old_mode,hunks:n?n.hunks:[],status:"deleted",binary:!!r};if(!t.old_mode&&t.new_mode)return{oldPath:null,newPath:e.file_name,oldMode:null,newMode:t.new_mode,hunks:n?n.hunks:[],status:"added",binary:!!r};if(t.old_mode&&t.new_mode)return{newPath:e.file_name,oldPath:e.file_name,oldMode:t.old_mode,newMode:t.new_mode,hunks:n?n.hunks:[],status:"modified",binary:!!r};throw new Error("file modes missing")}function xe(e,t,n){return(t=t||{}).filePath=e,t.status="unmerged",t.binary=!!n,t}if((n=a())!==i&&K===e.length)return n;throw n!==i&&K=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t(0,i.default)(e,t,{matchBase:!0}))}async uploadResource(e,t){const n=await this.getResourceUploadRequests([e]);for(const e of n)await this.doUpload(e.actions.upload,t),e.actions.verify&&await this.doVerify(e.actions.verify,e);return e.sha}async doUpload(e,t){await fetch(decodeURI(e.href),{method:"PUT",body:t,headers:e.header})}async doVerify(e,t){this.makeAuthorizedRequest({url:decodeURI(e.href),method:"POST",headers:s({},u.defaultContentHeaders,{},e.header),body:JSON.stringify({oid:t.oid,size:t.size})})}async getResourceUploadRequests(e){const t=await this.makeAuthorizedRequest({url:"".concat(this.rootURL,"/objects/batch"),method:"POST",headers:u.defaultContentHeaders,body:JSON.stringify({operation:"upload",transfers:["basic"],objects:e.map(e=>{let{sha:t}=e;return s({},o(e,["sha"]),{oid:t})})})});return(await t.json()).objects.filter(e=>"error"in e?(console.error(e.error),!1):e.actions)}}t.GitLfsClient=u,l(u,"defaultContentHeaders",{Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"})},function(e,t,n){var r=n(1154),i=n(1155);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,n){var o=[],a=i("{","}",t);if(!a||/\$$/.test(a.pre))return[t];var l,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),g=u||d,v=a.body.indexOf(",")>=0;if(!g&&!v)return a.post.match(/,.*\}/)?(t=a.pre+"{"+a.body+s+a.post,e(t)):[t];if(g)l=a.body.split(/\.\./);else{if(1===(l=function e(t){if(!t)return[""];var n=[],r=i("{","}",t);if(!r)return t.split(",");var o=r.pre,a=r.body,s=r.post,l=o.split(",");l[l.length-1]+="{"+a+"}";var u=e(s);s.length&&(l[l.length-1]+=u.shift(),l.push.apply(l,u));return n.push.apply(n,l),n}(a.body)).length)if(1===(l=e(l[0],!1).map(f)).length)return(_=a.post.length?e(a.post,!1):[""]).map((function(e){return a.pre+l[0]+e}))}var y,b=a.pre,_=a.post.length?e(a.post,!1):[""];if(g){var w=c(l[0]),E=c(l[1]),x=Math.max(l[0].length,l[1].length),k=3==l.length?Math.abs(c(l[2])):1,S=h;E0){var P=new Array(A+1).join("0");C=T<0?"-"+P+C.slice(1):P+C}}y.push(C)}}else y=r(l,(function(t){return e(t,!1)}));for(var R=0;R=t}},function(e,t){e.exports=function(e,t){for(var r=[],i=0;i=0&&u>0){for(r=[],o=n.length;c>=0&&!s;)c==l?(r.push(c),l=n.indexOf(e,c+1)):1==r.length?s=[r.pop(),u]:((i=r.pop())=0?l:u;r.length&&(s=[o,a])}return s}e.exports=r,r.range=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(278),i=n(41);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t!0).catch(e=>{if(401===e.status){if("Bad credentials"===e.message)throw new i.APIError("Git Gateway Error: Please ask your site administrator to reissue the Git Gateway token.",e.status,"Git Gateway");return!1}throw 404!==e.status||void 0!==e.message&&"Unable to locate site configuration"!==e.message?(console.error("Problem fetching repo data from Git Gateway"),e):new i.APIError("Git Gateway Error: Please make sure Git Gateway is enabled on your site.",e.status,"Git Gateway")})}requestHeaders(e={}){return this.tokenPromise().then(t=>a({Authorization:"Bearer ".concat(t),"Content-Type":"application/json; charset=utf-8"},e))}handleRequestError(e,t){throw new i.APIError(e.message||e.msg,t,"Git Gateway")}user(){return Promise.resolve(a({login:""},this.commitAuthor))}async getHeadReference(e){if(!this.repoOwner){const e=(await this.getDefaultBranch())._links.self,t=new RegExp("https?://.+?/repos/(.+?)/"),n=e.match(t);this.repoOwner=n?n[1]:""}return super.getHeadReference(e)}commit(e,t){const n={message:e,tree:t.sha,parents:t.parentSha?[t.parentSha]:[]};return this.commitAuthor&&(n.author=a({},this.commitAuthor,{date:(new Date).toISOString()})),this.request("/git/commits",{method:"POST",body:JSON.stringify(n)})}nextUrlProcessor(){return e=>e.replace(/^(?:[a-z]+:\/\/.+?\/.+?\/.+?\/)/,"".concat(this.apiRoot,"/"))}}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(97))&&r.__esModule?r:{default:r},o=n(279),a=n(41);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l extends o.API{constructor(e){super(e),s(this,"tokenPromise",void 0),s(this,"authenticateRequest",async e=>a.unsentRequest.withHeaders({Authorization:"Bearer ".concat(await this.tokenPromise())},e)),s(this,"request",async e=>(0,i.default)([this.buildRequest,this.authenticateRequest,(0,a.then)(a.unsentRequest.performRequest)])(e)),s(this,"hasWriteAccess",()=>Promise.resolve(!0)),this.tokenPromise=e.tokenPromise,this.commitAuthor=e.commitAuthor,this.repoURL=""}}t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClient=t.matchPath=void 0;var r=s(n(344)),i=s(n(490)),o=s(n(491)),a=s(n(557));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const f=({patterns:e},t)=>e.some(e=>(0,a.default)(t,e,{matchBase:!0}));t.matchPath=f;const p={Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"},h=async({rootURL:e,makeAuthorizedRequest:t},{sha:n,size:r})=>{const i=await t({url:"".concat(e,"/verify"),method:"POST",headers:p,body:JSON.stringify({oid:n,size:r})});return!!i.ok||404!==i.status&&void 0},m=e=>({operation:"upload",transfers:["basic"],objects:e.map(e=>{let{sha:t}=e;return u({},d(e,["sha"]),{oid:t})})}),g=async({rootURL:e,makeAuthorizedRequest:t},n)=>{const r=await t({url:"".concat(e,"/objects/batch"),method:"POST",headers:p,body:JSON.stringify(m(n))});return(await r.json()).objects.map(e=>{if(e.error)throw new Error(e.error.message);return e.actions.upload.href})},v={resourceExists:h,getResourceUploadURLs:g,getDownloadURL:({rootURL:e,transformImages:t,makeAuthorizedRequest:n},{sha:r})=>n("".concat(e,"/origin/").concat(r).concat(t&&Object.keys(t).length>0?(e=>"?nf_resize=".concat(e.nf_resize,"&w=").concat(e.w,"&h=").concat(e.h))(t):"")).then(e=>e.ok?e:Promise.reject(e)).then(e=>e.blob()).then(e=>URL.createObjectURL(e)).catch(e=>(console.error(e),Promise.resolve(""))),uploadResource:async(e,{sha:t,size:n},r)=>{if(await h(e,{sha:t,size:n}))return t;const[i]=await g(e,[{sha:t,size:n}]);return await((e,t)=>fetch(e,{method:"PUT",body:t}))(i,r),t},matchPath:f};t.getClient=e=>(0,o.default)([Object.keys,(0,r.default)(t=>{return[t,(n=e,r=v[t],(...e)=>r(n,...e))];var n,r}),i.default,t=>u({},t,{patterns:e.patterns,enabled:e.enabled})])(v)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getFolderEntries=void 0;var r=c(n(1160)),i=c(n(1162)),o=c(n(240)),a=c(n(416)),s=c(n(128)),l=n(41),u=c(n(560));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t{const o=n.length,a=Math.floor(o/10);return l.Cursor.create({actions:[...r0?["prev","first"]:[]],meta:{index:r,count:o,pageSize:10,pageCount:a},data:{folder:e,extension:t,index:r,pageCount:a,depth:i}})},g=(e,t,n,r,i=[],o=t)=>(r<=0||Object.keys(e[t]||{}).forEach(a=>{if(!a.endsWith(".".concat(n))){const s=e[t];return g(s,a,n,r-1,i,"".concat(o,"/").concat(a))}{const n=e[t][a];i.unshift({file:{path:"".concat(o,"/").concat(a),id:null},data:n.content})}}),i);t.getFolderEntries=g;t.default=class{constructor(e,t={}){p(this,"assets",void 0),p(this,"options",void 0),this.assets=[],this.options=t}authComponent(){return u.default}restoreUser(){return this.authenticate()}authenticate(){return Promise.resolve()}logout(){return null}getToken(){return Promise.resolve("")}traverseCursor(e,t){const{folder:n,extension:r,index:i,pageCount:o,depth:a}=e.data.toObject(),s="next"===t?i+1:"prev"===t?i-1:"first"===t?0:"last"===t?o:0,l=g(window.repoFiles,n,r,a),u=l.slice(10*s,10*s+10),c=m(n,r,l,s,a);return Promise.resolve({entries:u,cursor:c})}entriesByFolder(e,t,n){const r=e?g(window.repoFiles,e,t,n):[],o=m(e,t,r,0,n),a=(0,i.default)(r,10);return a[l.CURSOR_COMPATIBILITY_SYMBOL]=o,Promise.resolve(a)}entriesByFiles(e){return Promise.all(e.map(e=>({file:e,data:h(e.path).content})))}getEntry(e){return Promise.resolve({file:{path:e,id:null},data:h(e).content})}unpublishedEntries(){return Promise.resolve(window.repoFilesUnpublished)}getMediaFiles(e){return e.mediaFiles.map(e=>f({},e,{},this.normalizeAsset(e),{file:e.file}))}unpublishedEntry(e,t){const n=window.repoFilesUnpublished.find(n=>n.metaData.collection===e&&n.slug===t);return n?(n.mediaFiles=this.getMediaFiles(n),Promise.resolve(n)):Promise.reject(new l.EditorialWorkflowError("content is not under editorial workflow",!0))}deleteUnpublishedEntry(e,t){const n=window.repoFilesUnpublished,r=n.findIndex(n=>n.metaData.collection===e&&n.slug===t);return n.splice(r,1),Promise.resolve()}async persistEntry({path:e,raw:t,slug:n},r,i){if(i.useWorkflow){const o=window.repoFilesUnpublished,a=o.findIndex(t=>t.file.path===e);if(a>=0){const e=f({},o[a],{data:t,title:i.parsedData&&i.parsedData.title,description:i.parsedData&&i.parsedData.description,mediaFiles:r.map(this.normalizeAsset)});o.splice(a,1,e)}else{const a={data:t,file:{path:e,id:null},metaData:{collection:i.collectionName,status:i.status||this.options.initialWorkflowStatus,title:i.parsedData&&i.parsedData.title,description:i.parsedData&&i.parsedData.description},slug:n,mediaFiles:r.map(this.normalizeAsset)};o.push(a)}return Promise.resolve()}const o=i.newEntry||!1,a=e.split("/"),s=o?{content:t}:f({},h(e),{content:t});let l=window.repoFiles;for(;a.length>1;){const e=a.shift();l[e]=l[e]||{},l=l[e]}return l[a.shift()]=s,await Promise.all(r.map(e=>this.persistMedia(e))),Promise.resolve()}updateUnpublishedEntryStatus(e,t,n){const r=window.repoFilesUnpublished,i=r.findIndex(n=>n.metaData.collection===e&&n.slug===t);return r[i].metaData.status=n,Promise.resolve()}async publishUnpublishedEntry(e,t){const n=window.repoFilesUnpublished,r=n.findIndex(n=>n.metaData.collection===e&&n.slug===t),i=n[r],o={raw:i.data,slug:i.slug,path:i.file.path};n.splice(r,1),await this.persistEntry(o,i.mediaFiles,{commitMessage:""})}getMedia(){return Promise.resolve(this.assets)}async getMediaFile(e){const t=this.assets.find(t=>t.path===e).url,n=(0,l.basename)(e),r=await fetch(t).then(e=>e.blob()),i=new File([r],n);return{id:t,displayURL:t,path:e,name:n,size:i.size,file:i,url:t}}normalizeAsset(e){const t=e.fileObj,{name:n,size:r}=t,i=(0,a.default)(window.URL.createObjectURL,t),l=(0,o.default)(i)?"":i;return{id:(0,s.default)(),name:n,size:r,path:e.path,url:l,displayURL:l,fileObj:t}}persistMedia(e){const t=this.normalizeAsset(e);return this.assets.push(t),Promise.resolve(t)}deleteFile(e){const t=this.assets.findIndex(t=>t.path===e);return t>-1?this.assets.splice(t,1):(0,r.default)(window.repoFiles,e.split("/")),Promise.resolve()}async getDeployPreview(){return null}}},function(e,t,n){var r=n(559);e.exports=function(e,t){return null==e||r(e,t)}},function(e,t,n){var r=n(243),i=n(209);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},function(e,t,n){var r=n(209),i=n(112);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:i(t),r(e,0,t<0?0:t)):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=n(41),o=(r=n(561))&&r.__esModule?r:{default:r};function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t{const t=await e.toBase64();return{path:e.path,content:t,encoding:"base64"}},c=({id:e,content:t,encoding:n,path:r,name:i})=>{let o=new Uint8Array(0);if("base64"!==n)console.error("Unsupported encoding '".concat(n,"' for file '").concat(r,"'"));else{const e=atob(t);o=new Uint8Array(e.length);for(let t=0;tn(e.target.value),onFocus:i,onBlur:a})}}t.default=l,s(l,"propTypes",{onChange:i.default.func.isRequired,forID:i.default.string,value:i.default.node,classNameWrapper:i.default.string.isRequired,setActiveStyle:i.default.func.isRequired,setInactiveStyle:i.default.func.isRequired}),s(l,"defaultProps",{value:""})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;a(n(0));var r=a(n(1)),i=n(16),o=n(9);function a(e){return e&&e.__esModule?e:{default:e}}const s=({value:e})=>(0,o.jsx)(i.WidgetPreviewContainer,null,e);s.propTypes={value:r.default.node};var l=s;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateMinMax=c,t.default=void 0;var r=s(n(0)),i=s(n(1)),o=s(n(26)),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u="RANGE";function c(e,t,n,r,i){let o;switch(!0){case""!==e&&!1!==t&&!1!==n&&(en):o={type:u,message:i("editor.editorControlPane.widget.range",{fieldLabel:r.get("label",r.get("name")),minValue:t,maxValue:n})};break;case""!==e&&!1!==t&&en:o={type:u,message:i("editor.editorControlPane.widget.max",{fieldLabel:r.get("label",r.get("name")),maxValue:n})};break;default:o=null}return o}class d extends r.default.Component{constructor(...e){super(...e),l(this,"handleChange",e=>{const t=this.props.field.get("valueType"),{onChange:n}=this.props,r="float"===t?parseFloat(e.target.value):parseInt(e.target.value,10);isNaN(r)?n(""):n(r)}),l(this,"isValid",()=>{const{field:e,value:t,t:n}=this.props,r=!!e.get("pattern",!1),i=e.get("min",!1),o=e.get("max",!1);if(r)return!0;const a=c(t,i,o,e,n);return!a||{error:a}})}render(){const{field:e,value:t,classNameWrapper:n,forID:r,setActiveStyle:i,setInactiveStyle:o}=this.props,s=e.get("min",""),l=e.get("max",""),u=e.get("step","int"===e.get("valueType")?1:"");return(0,a.jsx)("input",{type:"number",id:r,className:n,onFocus:i,onBlur:o,value:t||(0===t?t:""),step:u,min:s,max:l,onChange:this.handleChange})}}t.default=d,l(d,"propTypes",{field:o.default.map.isRequired,onChange:i.default.func.isRequired,classNameWrapper:i.default.string.isRequired,setActiveStyle:i.default.func.isRequired,setInactiveStyle:i.default.func.isRequired,value:i.default.node,forID:i.default.string,valueType:i.default.string,step:i.default.number,min:i.default.number,max:i.default.number,t:i.default.func.isRequired}),l(d,"defaultProps",{value:""})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;a(n(0));var r=a(n(1)),i=n(16),o=n(9);function a(e){return e&&e.__esModule?e:{default:e}}const s=({value:e})=>(0,o.jsx)(i.WidgetPreviewContainer,null,e);s.propTypes={value:r.default.node};var l=s;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(0)),i=s(n(1)),o=s(n(1169)),a=n(9);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={name:"1feyfsx-TextControl",styles:"font-family:inherit;;label:TextControl;"};class c extends r.default.Component{shouldComponentUpdate(){return!0}render(){const{forID:e,value:t,onChange:n,classNameWrapper:r,setActiveStyle:i,setInactiveStyle:s}=this.props;return(0,a.jsx)(o.default,{id:e,value:t||"",className:r,onFocus:i,onBlur:s,style:{minHeight:"140px"},css:u,onChange:e=>n(e.target.value)})}}t.default=c,l(c,"propTypes",{onChange:i.default.func.isRequired,forID:i.default.string,value:i.default.node,classNameWrapper:i.default.string.isRequired,setActiveStyle:i.default.func.isRequired,setInactiveStyle:i.default.func.isRequired}),l(c,"defaultProps",{value:""})},function(e,t,n){"use strict";n.r(t);var r=n(46),i=n(99),o=n(22),a=n(116),s=n(0),l=(n(1),!!document.documentElement.currentStyle),u={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},c=["letter-spacing","line-height","font-family","font-weight","font-size","font-style","tab-size","text-rendering","text-transform","width","text-indent","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","box-sizing"],d={},f=document.createElement("textarea"),p=function(e){Object.keys(u).forEach((function(t){e.style.setProperty(t,u[t],"important")}))};function h(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===i&&(i=null),null===f.parentNode&&document.body.appendChild(f);var o=function(e,t,n){void 0===n&&(n=!1);if(n&&d[t])return d[t];var r=window.getComputedStyle(e);if(null===r)return null;var i=c.reduce((function(e,t){return e[t]=r.getPropertyValue(t),e}),{}),o=i["box-sizing"];if(""===o)return null;l&&"border-box"===o&&(i.width=parseFloat(i.width)+parseFloat(r["border-right-width"])+parseFloat(r["border-left-width"])+parseFloat(r["padding-right"])+parseFloat(r["padding-left"])+"px");var a=parseFloat(i["padding-bottom"])+parseFloat(i["padding-top"]),s=parseFloat(i["border-bottom-width"])+parseFloat(i["border-top-width"]),u={sizingStyle:i,paddingSize:a,borderSize:s,boxSizing:o};n&&(d[t]=u);return u}(e,t,n);if(null===o)return null;var a=o.paddingSize,s=o.borderSize,u=o.boxSizing,h=o.sizingStyle;Object.keys(h).forEach((function(e){f.style[e]=h[e]})),p(f),f.value=e.value||e.placeholder||"x";var m=-1/0,g=1/0,v=f.scrollHeight;"border-box"===u?v+=s:"content-box"===u&&(v-=a),f.value="x";var y=f.scrollHeight-a,b=Math.floor(v/y);return null!==r&&(m=y*r,"border-box"===u&&(m=m+a+s),v=Math.max(m,v)),null!==i&&(g=y*i,"border-box"===u&&(g=g+a+s),v=Math.min(g,v)),{height:v,minHeight:m,maxHeight:g,rowCount:Math.floor(v/y),valueRowCount:b}}f.setAttribute("tab-index","-1"),f.setAttribute("aria-hidden","true"),p(f);var m=function(){},g=0,v=function(e){function t(t){var n;return(n=e.call(this,t)||this)._onRef=function(e){n._ref=e;var t=n.props.inputRef;"function"!=typeof t?t.current=e:t(e)},n._onChange=function(e){n._controlled||n._resizeComponent(),n.props.onChange(e,Object(o.a)(n))},n._resizeComponent=function(e){void 0===e&&(e=m);var t=h(n._ref,n._uid,n.props.useCacheForDOMMeasurements,n.props.minRows,n.props.maxRows);if(null!==t){var r=t.height,i=t.minHeight,o=t.maxHeight,a=t.rowCount,s=t.valueRowCount;n.rowCount=a,n.valueRowCount=s,n.state.height===r&&n.state.minHeight===i&&n.state.maxHeight===o?e():n.setState({height:r,minHeight:i,maxHeight:o},e)}else e()},n.state={height:t.style&&t.style.height||0,minHeight:-1/0,maxHeight:1/0},n._uid=g++,n._controlled=void 0!==t.value,n._resizeLock=!1,n}Object(a.a)(t,e);var n=t.prototype;return n.render=function(){var e=this.props,t=(e.inputRef,e.maxRows,e.minRows,e.onHeightChange,e.useCacheForDOMMeasurements,Object(i.a)(e,["inputRef","maxRows","minRows","onHeightChange","useCacheForDOMMeasurements"]));return t.style=Object(r.a)({},t.style,{height:this.state.height}),Math.max(t.style.maxHeight||1/0,this.state.maxHeight)(0,o.jsx)(i.WidgetPreviewContainer,null,e);s.propTypes={value:r.default.node};var l=s;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({forImage:e}={}){var t,n;return n=t=class extends o.default.Component{constructor(t){super(t),h(this,"handleChange",t=>{const{field:n,onOpenMediaLibrary:r,value:i}=this.props;let o;return t.preventDefault(),n.hasIn(["options","media_library"])?(T(n),o=n.getIn(["options","media_library"],(0,l.Map)())):o=n.get("media_library",(0,l.Map)()),r({controlID:this.controlID,forImage:e,privateUpload:n.get("private"),value:i,allowMultiple:!!o.get("allow_multiple",!0),config:o.get("config"),field:n})}),h(this,"handleRemove",e=>(e.preventDefault(),this.props.onClearMediaControl(this.controlID),this.props.onChange(""))),h(this,"renderFileLink",e=>{if(!e||e.length<=50)return e;const t="".concat(e.substring(0,25),"…").concat(e.substring(e.length-25+1,e.length));return(0,f.jsx)(w,{href:e,rel:"noopener",target:"_blank"},t)}),h(this,"renderFileLinks",()=>{const{value:e}=this.props;return O(e)?(0,f.jsx)(E,null,(0,f.jsx)(x,null,e.map(e=>(0,f.jsx)("li",{key:e},this.renderFileLink(e))))):(0,f.jsx)(E,null,this.renderFileLink(e))}),h(this,"renderImages",()=>{const{getAsset:e,value:t,field:n}=this.props;if(O(t))return(0,f.jsx)(_,null,t.map(t=>(0,f.jsx)(v,{key:t},(0,f.jsx)(b,{src:e(t,n)||""}))));const r=e(t,n);return(0,f.jsx)(v,null,(0,f.jsx)(b,{src:r||""}))}),h(this,"renderSelection",t=>{const{t:n}=this.props;return(0,f.jsx)("div",null,e?this.renderImages():null,(0,f.jsx)("div",null,e?null:this.renderFileLinks(),(0,f.jsx)(k,{onClick:this.handleChange},n("editor.editorWidgets.".concat(t,".chooseDifferent"))),(0,f.jsx)(S,{onClick:this.handleRemove},n("editor.editorWidgets.".concat(t,".remove")))))}),h(this,"renderNoSelection",e=>{const{t:t}=this.props;return(0,f.jsx)(k,{onClick:this.handleChange},t("editor.editorWidgets.".concat(e,".choose")))}),this.controlID=(0,u.default)()}shouldComponentUpdate(e){if(this.props.value!==e.value||this.props.getAsset!==e.getAsset)return!0;const t=e.mediaPaths.get(this.controlID);return!(!t||e.value===t)}componentDidUpdate(){const{mediaPaths:e,value:t,onRemoveInsertedMedia:n,onChange:r}=this.props,i=e.get(this.controlID);i&&i!==t?r(i):i&&i===t&&n(this.controlID)}componentWillUnmount(){this.props.onRemoveMediaControl(this.controlID)}render(){const{value:t,classNameWrapper:n}=this.props,r=e?"image":"file";return(0,f.jsx)("div",{className:n},(0,f.jsx)("span",null,t?this.renderSelection(r):this.renderNoSelection(r)))}},h(t,"propTypes",{field:a.default.object.isRequired,getAsset:a.default.func.isRequired,mediaPaths:s.default.map.isRequired,onAddAsset:a.default.func.isRequired,onChange:a.default.func.isRequired,onRemoveInsertedMedia:a.default.func.isRequired,onOpenMediaLibrary:a.default.func.isRequired,onClearMediaControl:a.default.func.isRequired,onRemoveMediaControl:a.default.func.isRequired,classNameWrapper:a.default.string.isRequired,value:a.default.oneOfType([a.default.string,a.default.arrayOf(a.default.string)]),t:a.default.func.isRequired}),h(t,"defaultProps",{value:""}),n};var r=p(n(19)),i=p(n(359)),o=p(n(0)),a=p(n(1)),s=p(n(26)),l=n(3),u=p(n(128)),c=n(98),d=n(16),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Netlify CMS config: ",' field: property "options" has been deprecated for the\n '," widget and will be removed in the next major release. Rather than\n `field.options.media_library`, apply media library options for this widget under\n `field.media_library`.\n"],["\n Netlify CMS config: ",' field: property "options" has been deprecated for the\n '," widget and will be removed in the next major release. Rather than\n \\`field.options.media_library\\`, apply media library options for this widget under\n \\`field.media_library\\`.\n"]);return m=function(){return e},e}function g(){return(g=Object.assign||function(e){for(var t=1;t(0,f.jsx)(y,g({role:"presentation"},e)),_=(0,r.default)("div",{target:"e1awjdnj2",label:"MultiImageWrapper"})({name:"2imjyh",styles:"display:flex;flex-wrap:wrap;"}),w=(0,r.default)("a",{target:"e1awjdnj3",label:"FileLink"})({name:"7mbjrw",styles:"margin-bottom:20px;font-weight:normal;color:inherit;&:hover,&:active,&:focus{text-decoration:underline;}"}),E=(0,r.default)("div",{target:"e1awjdnj4",label:"FileLinks"})({name:"1upilqn",styles:"margin-bottom:12px;"}),x=(0,r.default)("ul",{target:"e1awjdnj5",label:"FileLinkList"})({name:"155za0w",styles:"list-style-type:none;"}),k=(0,r.default)("button",{target:"e1awjdnj6",label:"FileWidgetButton"})(d.buttons.button,";",d.components.badge,";"),S=(0,r.default)("button",{target:"e1awjdnj7",label:"FileWidgetButtonRemove"})(d.buttons.button,";",d.components.badgeDanger,";margin-top:12px;");function O(e){return Array.isArray(e)||l.List.isList(e)}const T=(0,i.default)(e=>console.warn((0,c.oneLine)(m(),e.get("name"),e.get("widget"))))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=(l(n(0)),l(n(1))),o=n(3),a=n(16),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}const u=(0,r.default)(({href:e,path:t})=>(0,s.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank"},t),{target:"e1sxjo0z0",label:"FileLink"})({name:"13o7eu2",styles:"display:block;"});function c({values:e,getAsset:t,field:n}){return(0,s.jsx)("div",null,e.map(e=>(0,s.jsx)(u,{key:e,path:e,href:t(e,n)})))}function d(e){const{value:t,getAsset:n,field:r}=e;return Array.isArray(t)||o.List.isList(t)?(0,s.jsx)(c,{values:t,getAsset:n,field:r}):(0,s.jsx)(u,{key:t,path:t,href:n(t,r)})}const f=e=>(0,s.jsx)(a.WidgetPreviewContainer,null,e.value?(0,s.jsx)(d,e):null);f.propTypes={getAsset:i.default.func.isRequired,value:i.default.node};var p=f;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(19)),i=(l(n(0)),l(n(1))),o=n(3),a=n(16),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}const u=(0,r.default)(({src:e})=>(0,s.jsx)("img",{src:e||"",role:"presentation"}),{target:"e1ksx8c40",label:"StyledImage"})({name:"6b4u1g",styles:"display:block;max-width:100%;height:auto;"}),c=({getAsset:e,value:t,field:n})=>(0,s.jsx)(u,{src:e(t,n)}),d=e=>{const{value:t,getAsset:n,field:r}=e;return Array.isArray(t)||o.List.isList(t)?t.map(e=>(0,s.jsx)(c,{key:e,value:e,getAsset:n,field:r})):(0,s.jsx)(c,e)},f=e=>(0,s.jsx)(a.WidgetPreviewContainer,null,e.value?(0,s.jsx)(d,e):null);f.propTypes={getAsset:i.default.func.isRequired,value:i.default.node};var p=f;t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(1175)),i=f(n(362)),o=f(n(0)),a=f(n(1)),s=f(n(26)),l=n(3),u=f(n(363)),c=n(16),d=n(9);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return e&&e.value?e.value:null}function m(e){return"string"==typeof e?{label:e,value:e}:l.Map.isMap(e)?e.toJS():e}class g extends o.default.Component{constructor(...e){super(...e),p(this,"isValid",()=>{const{field:e,value:t,t:n}=this.props,i=e.get("min"),o=e.get("max"),a=t=>({error:{message:n("editor.editorControlPane.widget.".concat(t),{fieldLabel:e.get("label",e.get("name")),minCount:i,maxCount:o,count:i})}});return e.get("multiple")?[i,o].every(r.default)&&(null==t?void 0:t.size)&&(t.sizeo)?a(i===o?"rangeCountExact":"rangeCount"):(0,r.default)(i)&&i>0&&(null==t?void 0:t.size)&&t.sizeo?a("rangeMax"):{error:!1}:{error:!1}}),p(this,"handleChange",e=>{const{onChange:t,field:n}=this.props,r=n.get("multiple",!1),i=r?!(null==e?void 0:e.length):!e;if(n.get("required")&&i&&r)t((0,l.List)());else if(i)t(null);else if(r){const n=e.map(h);t((0,l.fromJS)(n))}else t(h(e))})}componentDidMount(){const{field:e,onChange:t,value:n}=this.props;e.get("required")&&e.get("multiple")&&(n&&!l.List.isList(n)?t((0,l.fromJS)([n])):n||t((0,l.fromJS)([])))}render(){const{field:e,value:t,forID:n,classNameWrapper:r,setActiveStyle:o,setInactiveStyle:a}=this.props,s=e.get("options"),f=e.get("multiple",!1),p=!e.get("required",!0)||f;if(!s)return(0,d.jsx)("div",null,"Error rendering select control for ",e.get("name"),": No options");const h=[...s.map(m)],g=function({value:e,options:t,isMultiple:n}){if(n){const n=l.List.isList(e)?e.toJS():e;return n&&Array.isArray(n)?n.map(e=>t.find(t=>t.value===(e.value||e))).filter(Boolean).map(m):null}return(0,i.default)(t,["value",e])||null}({options:h,value:t,isMultiple:f});return(0,d.jsx)(u.default,{inputId:n,value:g,onChange:this.handleChange,className:r,onFocus:o,onBlur:a,options:h,styles:c.reactSelectStyles,isMulti:f,isClearable:p,placeholder:""})}}t.default=g,p(g,"propTypes",{onChange:a.default.func.isRequired,value:a.default.node,forID:a.default.string.isRequired,classNameWrapper:a.default.string.isRequired,setActiveStyle:a.default.func.isRequired,setInactiveStyle:a.default.func.isRequired,field:s.default.contains({options:s.default.listOf(a.default.oneOfType([a.default.string,s.default.contains({label:a.default.string.isRequired,value:a.default.string.isRequired})])).isRequired})})},function(e,t,n){var r=n(101),i=n(68);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},function(e,t,n){var r=n(304),i=n(111),o=n(112),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=a(s+l,0)),r(e,i(t,3),l)}},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(69))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(1));var r=a(n(0)),i=n(50),o=a(n(563));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t,n;function a(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0||(i[n]=e[n]);return i}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],l=a[1];return delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,r.default.createElement(o.default,i,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(r.default.Component);s.propTypes={};var l=s;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=o,t.getInitialChildMapping=function(e,t){return i(e.children,(function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var s=i(e.children),l=o(t,s);return Object.keys(l).forEach((function(i){var o=l[i];if((0,r.isValidElement)(o)){var u=i in t,c=i in s,d=t[i],f=(0,r.isValidElement)(d)&&!d.props.in;!c||u&&!f?c||!u||f?c&&u&&(0,r.isValidElement)(d)&&(l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:d.props.in,exit:a(o,"exit",e),enter:a(o,"enter",e)})):l[i]=(0,r.cloneElement)(o,{in:!1}):l[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:a(o,"exit",e),enter:a(o,"enter",e)})}})),l};var r=n(0);function i(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function o(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r(0,s.jsx)("ul",null,e.map((e,t)=>(0,s.jsx)("li",{key:t},e))),c=({value:e})=>(0,s.jsx)(a.WidgetPreviewContainer,null,e&&(i.List.isList(e)?(0,s.jsx)(u,{values:e}):e),!e&&null);c.propTypes={value:r.default.oneOfType([r.default.string,o.default.list])};var d=c;t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=v(n(19)),i=v(n(219)),o=v(n(0)),a=v(n(1)),s=v(n(26)),l=n(9),u=n(21),c=n(388),d=v(n(282)),f=v(n(103)),p=n(16),h=n(268),m=n(620),g=v(n(621));function v(e){return e&&e.__esModule?e:{default:e}}function y(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n ","\n "]);return y=function(){return e},e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=({minimal:e})=>"\n position: relative;\n overflow: hidden;\n overflow-x: auto;\n min-height: ".concat(e?"auto":p.lengths.richTextEditorMinHeight,";\n font-family: ").concat(p.fonts.mono,";\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-top: 0;\n margin-top: -").concat(m.editorStyleVars.stickyDistanceBottom,";\n"),w=(0,r.default)("div",{target:"er7tv020",label:"RawEditorContainer"})({name:"79elbk",styles:"position:relative;"});class E extends o.default.Component{constructor(e){super(e),b(this,"handleCopy",(e,t)=>{const{getAsset:n,resolveWidget:r}=this.props,i=d.default.serialize(u.Value.create({document:t.value.fragment})),o=(0,h.markdownToHtml)(i,{getAsset:n,resolveWidget:r});(0,c.setEventTransfer)(e,"text",i),(0,c.setEventTransfer)(e,"html",o),e.preventDefault()}),b(this,"handleCut",(e,t,n)=>{this.handleCopy(e,t,n),t.delete()}),b(this,"handlePaste",(e,t,n)=>{e.preventDefault();const r=e.clipboardData;if((0,f.default)("shift",e))return n();const i=d.default.deserialize(r.getData("text/plain"));return t.insertFragment(i.document)}),b(this,"handleChange",e=>{this.state.value.document.equals(e.value.document)||this.handleDocumentChange(e),this.setState({value:e.value})}),b(this,"handleDocumentChange",(0,i.default)(e=>{const t=d.default.serialize(e.value);this.props.onChange(t)},150)),b(this,"handleToggleMode",()=>{this.props.onMode("visual")}),b(this,"processRef",e=>{this.editor=e}),this.state={value:d.default.deserialize(this.props.value||"")}}shouldComponentUpdate(e,t){return!this.state.value.equals(t.value)}componentDidMount(){this.props.pendingFocus&&(this.editor.focus(),this.props.pendingFocus())}render(){const{className:e,field:t,t:n}=this.props;return(0,l.jsx)(w,null,(0,l.jsx)(m.EditorControlBar,null,(0,l.jsx)(g.default,{onToggleMode:this.handleToggleMode,buttons:t.get("buttons"),disabled:!0,rawMode:!0,t:n})),(0,l.jsx)(l.ClassNames,null,({css:r,cx:i})=>(0,l.jsx)(c.Editor,{className:i(e,r(y(),_({minimal:t.get("minimal")}))),value:this.state.value,onChange:this.handleChange,onPaste:this.handlePaste,onCut:this.handleCut,onCopy:this.handleCopy,ref:this.processRef,t:n})))}}t.default=E,E.propTypes={onChange:a.default.func.isRequired,onMode:a.default.func.isRequired,className:a.default.string.isRequired,value:a.default.string,field:s.default.map.isRequired,t:a.default.func.isRequired}},function(e,t,n){"use strict"; /*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";e.exports=function(e){function t(e){for(var t=0,n=0;n * @license MIT */ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var r=n(1198);e.exports=o,o.wrap=r;var i=[].slice;function o(){var e=[],t={run:function(){var t=-1,n=i.call(arguments,0,-1),o=arguments[arguments.length-1];if("function"!=typeof o)throw new Error("Expected function as last argument, not "+o);function a(s){var l=e[++t],u=i.call(arguments,0),c=u.slice(1),d=n.length,f=-1;if(s)o(s);else{for(;++fa.length;s&&a.push(i);try{t=e.apply(null,a)}catch(e){if(s&&n)throw e;return i(e)}s||(t&&"function"==typeof t.then?t.then(o,i):t instanceof Error?i(t):o(t))};function i(){n||(n=!0,t.apply(null,arguments))}function o(e){i(null,e)}}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return"[object String]"===n.call(e)}},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},function(e,t,n){"use strict";var r=n(565),i=n(61),o=n(1202);function a(e){var t=this.data("settings"),n=r(o);n.prototype.options=i(n.prototype.options,t,e),this.Parser=n}e.exports=a,a.Parser=o},function(e,t,n){"use strict";var r=n(61),i=n(566),o=n(1203),a=n(1204),s=n(1205),l=n(1208);function u(e,t){this.file=t,this.offset={},this.options=r(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=o(t).toOffset,this.unescape=a(this,"escape"),this.decode=s(this)}e.exports=u;var c=u.prototype;function d(e){var t,n=[];for(t in e)n.push(t);return n}c.setOptions=n(1209),c.parse=n(1211),c.options=n(572),c.exitStart=i("atStart",!0),c.enterList=i("inList",!1),c.enterLink=i("inLink",!1),c.enterBlock=i("inBlock",!1),c.interruptParagraph=[["thematicBreak"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],c.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],c.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}],["footnote",{commonmark:!1}]],c.blockTokenizers={newline:n(1213),indentedCode:n(1214),fencedCode:n(1215),blockquote:n(1216),atxHeading:n(1217),thematicBreak:n(1218),list:n(1219),setextHeading:n(1221),html:n(1222),footnote:n(1223),definition:n(1224),table:n(1225),paragraph:n(1226)},c.inlineTokenizers={escape:n(1227),autoLink:n(1229),url:n(1230),html:n(1232),link:n(1233),reference:n(1234),strong:n(1235),emphasis:n(1237),deletion:n(1240),code:n(1242),break:n(1244),text:n(1246)},c.blockMethods=d(c.blockTokenizers),c.inlineMethods=d(c.inlineTokenizers),c.tokenizeBlock=l("block"),c.tokenizeInline=l("inline"),c.tokenizeFactory=l},function(e,t,n){"use strict";function r(e){return function(t){var n=-1,r=e.length;if(t<0)return{};for(;++nt)return{line:n+1,column:t-(e[n-1]||0)+1,offset:t};return{}}}function i(e){return function(t){var n=t&&t.line,r=t&&t.column;if(!isNaN(n)&&!isNaN(r)&&n-1 in e)return(e[n-2]||0)+r-1||0;return-1}}e.exports=function(e){var t=function(e){var t=[],n=e.indexOf("\n");for(;-1!==n;)t.push(n+1),n=e.indexOf("\n",n+1);return t.push(e.length+1),t}(String(e));return{toPosition:r(t),toOffset:i(t)}}},function(e,t,n){"use strict";e.exports=function(e,t){return function(n){var r,i=0,o=n.indexOf("\\"),a=e[t],s=[];for(;-1!==o;)s.push(n.slice(i,o)),i=o+1,(r=n.charAt(i))&&-1!==a.indexOf(r)||s.push("\\"),o=n.indexOf("\\",i+1);return s.push(n.slice(i)),s.join("")}}},function(e,t,n){"use strict";var r=n(61),i=n(269);e.exports=function(e){return n.raw=function(e,n,a){return i(e,r(a,{position:t(n),warning:o}))},n;function t(t){for(var n=e.offset,r=t.line,i=[];++r&&r in n;)i.push((n[r]||0)+1);return{start:t,indent:i}}function n(n,r,a){i(n,{position:t(r),warning:o,text:a,reference:a,textContext:e,referenceContext:e})}function o(t,n,r){3!==r&&e.file.message(t,n)}}},function(e){e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},function(e,t,n){"use strict";var r;e.exports=function(e){var t,n="&"+e+";";if((r=r||document.createElement("i")).innerHTML=n,59===(t=r.textContent).charCodeAt(t.length-1)&&"semi"!==e)return!1;return t!==n&&t}},function(e,t,n){"use strict";function r(e){var t,n;return"text"!==e.type||!e.position||(t=e.position.start,n=e.position.end,t.line!==n.line||n.column-t.column===e.value.length)}function i(e,t){return e.value+=t.value,e}function o(e,t){return this.options.commonmark?t:(e.children=e.children.concat(t.children),e)}e.exports=function(e){return function(t,n){var a,s,l,u,c,d,f=this,p=f.offset,h=[],m=f[e+"Methods"],g=f[e+"Tokenizers"],v=n.line,y=n.column;if(!t)return h;E.now=_,E.file=f.file,b("");for(;t;){for(a=-1,s=m.length,c=!1;++a=4)){for(c="";b"!==t.charAt(x))return;if(n)return!0;x=0;for(;x"===t.charAt(x)?(x++,f=!0," "===t.charAt(x)&&x++):x=d,u=t.slice(x,l),!f&&!r(u)){x=d;break}if(!f&&(s=t.slice(x),i(g,m,this,[e,s,!0])))break;c=d===x?u:t.slice(d,l),E.push(x-d),_.push(c),w.push(u),x=l+1}x=-1,b=E.length,o=e(_.join("\n"));for(;++x6)return;if(!o||!a&&"#"===t.charAt(l+1))return;s=t.length+1,i="";for(;++l=3&&(!r||"\n"===r)?(u+=a,!!n||e(u)({type:"thematicBreak"})):void 0;a+=r}}},function(e,t,n){"use strict";var r=n(153),i=n(86),o=n(220),a=n(574),s=n(1220),l=n(366);e.exports=function(e,t,n){var i,a,s,u,c,d,f,p,m,g,v,y,b,_,w,E,x,k,S,O,T,C,A=this.options.commonmark,P=this.options.pedantic,R=this.blockTokenizers,M=this.interruptList,I=0,D=t.length,j=null,L=0,N=!1;for(;I=4)return;if("*"===(s=t.charAt(I))||"+"===s||"-"===s)u=s,a=!1;else{for(a=!0,i="";I=4&&(C=!0),E&&L>=E.indent&&(C=!0),s=t.charAt(I),p=null,!C){if("*"===s||"+"===s||"-"===s)p=s,I++,L++;else{for(i="";I=E.indent||L>4):C=!0,f=!1,I=d;if(g=t.slice(d,c),m=d===I?g:t.slice(I,c),("*"===p||"_"===p||"-"===p)&&R.thematicBreak.call(this,e,g,!0))break;if(v=y,y=!f&&!r(m).length,C&&E)E.value=E.value.concat(w,g),_=_.concat(w,g),w=[];else if(f)0!==w.length&&(N=!0,E.value.push(""),E.trail=w.concat()),E={value:[g],indent:L,trail:[]},b.push(E),_=_.concat(w,g),w=[];else if(y){if(v&&!A)break;w.push(g)}else{if(v)break;if(l(M,R,this,[e,g,!0]))break;E.value=E.value.concat(w,g),_=_.concat(w,g),w=[]}I=c+1}S=e(_.join("\n")).reset({type:"list",ordered:a,start:j,spread:N,children:[]}),x=this.enterList(),k=this.enterBlock(),I=-1,D=b.length;for(;++I0&&a.indent=3){c--;break}d+=o}r="",i="";for(;++c|$))","i"),k=t.length,S=0,O=[[i,o,!0],[a,s,!0],[l,u,!0],[c,d,!0],[f,p,!0],[x,h,!0],[m,h,!1]];for(;S|$))/i,o=/<\/(script|pre|style)>/i,a=/^/,l=/^<\?/,u=/\?>/,c=/^/,f=/^/,h=/^$/,m=new RegExp(r.source+"\\s*$")},function(e,t,n){"use strict";var r=n(82),i=n(367);e.exports=a,a.notInList=!0,a.notInBlock=!0;var o=/^( {4}|\t)?/gm;function a(e,t,n){var a,s,l,u,c,d,f,p,h,m,g,v,y=this.offset;if(this.options.footnotes){for(a=0,s=t.length,l="",u=e.now(),c=u.line;a"!==e&&"["!==e&&"]"!==e}function s(e){return"["!==e&&"]"!==e&&!r(e)}a.delimiter=">"},function(e,t,n){"use strict";var r=n(82);e.exports=function(e,t,n){var i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,b,_,w,E,x,k,S,O,T;if(!this.options.gfm)return;i=0,w=0,u=t.length+1,c=[];for(;iS){if(w<2)return;break}c.push(t.slice(i,S)),w++,i=S+1}s=c.join("\n"),o=c.splice(1,1)[0]||[],i=0,u=o.length,w--,a=!1,h=[];for(;i1&&(f?(s+=d.slice(0,d.length-1),d=d.charAt(d.length-1)):(s+=d,d="")),b=e.now(),e(s)({type:"tableCell",children:this.tokenizeInline(m,b)},l)),e(d+f),d="",m=""}else if(d&&(m+=d,d=""),m+=f,"\\"===f&&i!==u-2&&(m+=E.charAt(i+1),i++),"`"===f){for(v=1;E.charAt(i+1)===f;)m+=f,i++,v++;y?v>=y&&(y=0):y=v}g=!1,i++}else m?d+=f:e(f),i++;_||e("\n"+o)}return k}},function(e,t,n){"use strict";var r=n(153),i=n(220),o=n(270),a=n(366);e.exports=function(e,t,n){var s,l,u,c,d,f=this.options,p=f.commonmark,h=f.gfm,m=this.blockTokenizers,g=this.interruptParagraph,v=t.indexOf("\n"),y=t.length;for(;v=4&&"\n"!==u){v=t.indexOf("\n",v+1);continue}}if(l=t.slice(v+1),a(g,m,this,[e,l,!0]))break;if(m.list.call(this,e,l,!0)&&(this.inList||p||h&&!i(r.left(l).charAt(0))))break;if(s=v,-1!==(v=t.indexOf("\n",v+1))&&""===r(t.slice(s,v))){v=s;break}}if(l=t.slice(0,v),""===r(l))return e(l),null;if(n)return!0;return d=e.now(),l=o(l),e(l)({type:"paragraph",children:this.tokenizeInline(l,d)})}},function(e,t,n){"use strict";var r=n(1228);e.exports=i,i.locator=r;function i(e,t,n){var r,i;if("\\"===t.charAt(0)&&(r=t.charAt(1),-1!==this.escape.indexOf(r)))return!!n||(i="\n"===r?{type:"break"}:{type:"text",value:r},e("\\"+r)(i))}},function(e,t,n){"use strict";e.exports=function(e,t){return e.indexOf("\\",t)}},function(e,t,n){"use strict";var r=n(82),i=n(269),o=n(576);e.exports=s,s.locator=o,s.notInLink=!0;var a="mailto:".length;function s(e,t,n){var o,s,l,u,c,d="",f=t.length,p=0,h="",m=!1,g="";if("<"===t.charAt(0)){for(p++,d="<";p"===o||"@"===o||":"===o&&"/"===t.charAt(p+1)));)h+=o,p++;if(h){if(g+=h,h="",g+=o=t.charAt(p),p++,"@"===o)m=!0;else{if(":"!==o||"/"!==t.charAt(p+1))return;g+="/",p++}for(;p"!==o);)h+=o,p++;if(o=t.charAt(p),h&&">"===o)return!!n||(l=g+=h,d+=g+o,(s=e.now()).column++,s.offset++,m&&("mailto:"===g.slice(0,a).toLowerCase()?(l=l.substr(a),s.column+=a,s.offset+=a):g="mailto:"+g),u=this.inlineTokenizers,this.inlineTokenizers={text:u.text},c=this.enterLink(),l=this.tokenizeInline(l,s),this.inlineTokenizers=u,c(),e(d)({type:"link",title:null,url:i(g,{nonTerminated:!1}),children:l}))}}}},function(e,t,n){"use strict";var r=n(269),i=n(82),o=n(1231);e.exports=l,l.locator=o,l.notInLink=!0;var a=["http://","https://","mailto:"],s=a.length;function l(e,t,n){var o,l,u,c,d,f,p,h,m,g,v,y,b;if(this.options.gfm){for(o="",c=-1;++c/i;function l(e,t,n){var i,l,u=t.length;if(!("<"!==t.charAt(0)||u<3)&&(i=t.charAt(1),(r(i)||"?"===i||"!"===i||"/"===i)&&(l=t.match(o))))return!!n||(l=l[0],!this.inLink&&a.test(l)?this.inLink=!0:this.inLink&&s.test(l)&&(this.inLink=!1),e(l)({type:"html",value:l}))}},function(e,t,n){"use strict";var r=n(82),i=n(577);e.exports=o,o.locator=i;function o(e,t,n){var i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,b,_,w,E="",x=0,k=t.charAt(0),S=this.options.pedantic,O=this.options.commonmark,T=this.options.gfm;if("!"===k&&(d=!0,E=k,k=t.charAt(++x)),"["===k&&(d||!this.inLink)){for(E+=k,v="",x++,h=t.length,g=0,(b=e.now()).column+=x,b.offset+=x;x=a&&(a=0):a=o}else if("\\"===k)x++,u+=t.charAt(x);else if(a&&!T||"["!==k){if((!a||T)&&"]"===k){if(!g){if(!S)for(;x"!==(k=t.charAt(x));){if(O&&"\n"===k)return;v+=k,x++}if(">"!==t.charAt(x))return;E+="<"+v+">",y=v,x++}else{for(k=null,u="";xt&&" "===e.charAt(n-1);)n--;return n}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,o,a,s,l,u,c,d,f;if(n)return!0;r=this.inlineMethods,a=r.length,i=this.inlineTokenizers,o=-1,d=t.length;for(;++o","OElig":"Œ","oelig":"œ","Scaron":"Š","scaron":"š","Yuml":"Ÿ","circ":"ˆ","tilde":"˜","ensp":" ","emsp":" ","thinsp":" ","zwnj":"‌","zwj":"‍","lrm":"‎","rlm":"‏","ndash":"–","mdash":"—","lsquo":"‘","rsquo":"’","sbquo":"‚","ldquo":"“","rdquo":"”","bdquo":"„","dagger":"†","Dagger":"‡","permil":"‰","lsaquo":"‹","rsaquo":"›","euro":"€"}')},function(e){e.exports=JSON.parse('["cent","copy","divide","gt","lt","not","para","times"]')},function(e,t,n){"use strict";var r=n(220),i=n(1254),o=n(82),a=n(571),s=n(580);e.exports=function(e){return function(t,n,p){var h,m,g,v,y,b,_=e.gfm,w=e.commonmark,E=e.pedantic,x=w?[".",")"]:["."],k=p&&p.children,S=k&&k.indexOf(n),O=k&&k[S-1],T=k&&k[S+1],C=t.length,A=a(e),P=-1,R=[],M=R;h=O?d(O)&&u.test(O.value):!p||"root"===p.type||"paragraph"===p.type;for(;++P0||"]"===m&&this.inLink||_&&"~"===m&&"~"===t.charAt(P+1)||_&&"|"===m&&(this.inTable||c(t,P))||"_"===m&&P>0&&P"===m||"#"===m||"*"===m||"-"===m||"+"===m)b=!0;else if(r(m)){for(y=P+1;y"+r.join("\n>")}},function(e,t,n){"use strict";e.exports=function(e){return(e.ordered?this.visitOrderedItems:this.visitUnorderedItems).call(this,e)}},function(e,t,n){"use strict";var r=n(86),i=n(581);e.exports=function(e,t,n,a){var s,l,u,c=this.options.listItemIndent,d=a||this.options.bullet,f=null==e.spread||e.spread,p=e.checked,h=e.children,m=h.length,g=[],v=-1;for(;++v?@[\\\]^`{|}~_]/},function(e,t,n){"use strict";var r=n(583);e.exports=function(e){return"!["+(this.encode(e.alt,e)||"")+"]"+r(e)}},function(e,t,n){"use strict";var r=n(370),i=n(372);e.exports=function(e){var t=r(e.url);e.title&&(t+=" "+i(e.title));return"["+(e.label||e.identifier)+"]: "+t}},function(e,t,n){"use strict";var r=n(370),i=n(372);e.exports=function(e){var t=r(this.encode(e.url||"",e)),n=this.enterLink(),o=this.encode(this.escape(e.alt||"",e));n(),e.title&&(t+=" "+i(this.encode(e.title,e)));return"!["+o+"]("+t+")"}},function(e,t,n){"use strict";e.exports=function(e){return"[^"+this.all(e).join("")+"]"}},function(e,t,n){"use strict";e.exports=function(e){return"[^"+(e.label||e.identifier)+"]"}},function(e,t,n){"use strict";var r=n(86),i=r(" ",4);e.exports=function(e){var t=this.all(e).join("\n\n"+i);return"[^"+(e.label||e.identifier)+"]: "+t}},function(e,t,n){"use strict";var r=n(1287);e.exports=function(e){var t,n,i=this.options,o=i.looseTable,a=i.spacedTable,s=i.paddedTable,l=i.stringLength,u=e.children,c=u.length,d=this.enterTable(),f=[];for(;c--;)f[c]=this.all(u[c]);d(),o?(t="",n=""):a?(t="| ",n=" |"):(t="|",n="|");return r(f,{align:e.align,pad:s,start:t,end:n,stringLength:l,delimiter:a?" | ":"|"})}},function(e,t,n){"use strict";e.exports=function(e,t){var n,i,u,c,d,f,p,h,m,g,v,y,b=t||{},_=b.delimiter,w=b.start,E=b.end,x=b.align,k=b.stringLength||a,S=0,O=-1,T=e.length,C=[];x=x?x.concat():[],null==_&&(_=" | ");null==w&&(w="| ");null==E&&(E=" |");for(;++OS&&(S=c.length);++fC[f]&&(C[f]=p);"string"==typeof x&&(x=s(S,x).split(""));f=-1;for(;++fC[f]&&(C[f]=h);O=-1;for(;++O3?g:3):g=C[f],n=x[f],m="r"===n||""===n?"-":":",m+=s(g-2,"-"),m+="l"!==n&&""!==n?":":"-",i[f]=m;u.splice(1,0,i.join(_))}return w+u.join(E+"\n"+w)+E};var r=/\./,i=/\.[^.]*$/;function o(e){return null==e?"":String(e)}function a(e){return String(e).length}function s(e,t){return new Array(e+1).join(t||" ")}function l(e){var t=i.exec(e);return t?t.index+1:e.length}},function(e,t,n){"use strict";e.exports=function(e){return this.all(e).join("")}},function(e,t,n){"use strict";var r=n(1290);e.exports=function(e,t){e&&!e.process&&(t=e,e=null);return e?function(e,t){return function(n,i,o){e.run(r(n,t),i,(function(e){o(e)}))}}(e,t):function(e){return function(t){return r(t,e)}}(t)}},function(e,t,n){"use strict";e.exports=n(1291)},function(e,t,n){"use strict";e.exports=function(e,t){var n=function(e,t){var n=t||{},i=n.allowDangerousHTML;return c.dangerous=i,c.definition=l(e,n),c.footnotes=[],c.augment=u,c.handlers=r(d,n.handlers||{}),o(e,"footnoteDefinition",f),c;function u(e,t){var n,i;return e&&"data"in e&&(n=e.data,"element"===t.type&&n.hName&&(t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=r(t.properties,n.hProperties)),t.children&&n.hChildren&&(t.children=n.hChildren)),i=e&&e.position?e:{position:e},s(i)||(t.position={start:a.start(i),end:a.end(i)}),t}function c(e,t,n,r){return null==r&&"object"==typeof n&&"length"in n&&(r=n,n={}),u(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}function f(e){c.footnotes.push(e)}}(e,t),f=u(n,e),p=c(n);f&&f.children&&p&&(f.children=f.children.concat(i("text","\n"),p));return f};var r=n(61),i=n(56),o=n(183),a=n(584),s=n(1292),l=n(585),u=n(586),c=n(1293),d=n(1294)},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e?e:{}}e.exports=function(e){var t=r(r(e).position),n=r(t.start),i=r(t.end);return!(n.line&&n.column&&i.line&&i.column)}},function(e,t,n){"use strict";e.exports=function(e){var t,n,a,s,l=e.footnotes,u=l.length,c=-1,d=[];if(!u)return null;for(;++c1:t}},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"p",r(e,t))};var r=n(76)},function(e,t,n){"use strict";e.exports=function(e,t){return e.augment(t,r("root",i(o(e,t))))};var r=n(56),i=n(184),o=n(76)},function(e,t,n){"use strict";e.exports=function(e,t){return e(t,"strong",r(e,t))};var r=n(76)},function(e,t,n){"use strict";e.exports=function(e,t){var n,a,s,l,u,c=t.children,d=c.length,f=t.align,p=f.length,h=[];for(;d--;){for(a=c[d].children,l=0===d?"th":"td",n=p,s=[];n--;)u=a[n],s[n]=e(u,l,{align:f[n]},u?o(e,u):[]);h[d]=e(c[d],"tr",i(s,!0))}return e(t,"table",i([e(h[0].position,"thead",i([h[0]],!0)),e({start:r.start(h[1]),end:r.end(h[h.length-1])},"tbody",i(h.slice(1),!0))],!0))};var r=n(584),i=n(184),o=n(76)},function(e,t,n){"use strict";e.exports=function(e,t){return e.augment(t,r("text",i(t.value)))};var r=n(56),i=n(1315)},function(e,t,n){"use strict";e.exports=function(e){return String(e).replace(r,"\n")};var r=/[ \t]*\n+[ \t]*/g},function(e,t,n){"use strict";var r=n(61),i=n(1317);e.exports=function(e){var t=r(e,this.data("settings"));this.Compiler=function(e){return i(e,t)}}},function(e,t,n){"use strict";e.exports=n(1318)},function(e,t,n){"use strict";var r=n(373),i=n(273),o=n(1321),a=n(1322),s=n(605);e.exports=function(e,t){var n=t||{},l=n.quote||'"',u='"'===l?"'":'"',c=n.quoteSmart;if('"'!==l&&"'"!==l)throw new Error("Invalid quote `"+l+"`, expected `'` or `\"`");return s({valid:n.allowParseErrors?0:1,safe:n.allowDangerousCharacters?0:1,schema:"svg"===n.space?i:r,omit:n.omitOptionalTags&&a,quote:l,alternative:c?u:null,unquoted:Boolean(n.preferUnquoted),tight:n.tightAttributes,tightDoctype:Boolean(n.tightDoctype),tightLists:n.tightCommaSeparatedLists,tightClose:n.tightSelfClosing,collapseEmpty:n.collapseEmptyAttributes,dangerous:n.allowDangerousHTML,voids:n.voids||o.concat(),entities:n.entities||{},close:n.closeSelfClosing,closeEmpty:n.closeEmptyElements},e)}},function(e,t,n){"use strict";var r=n(272),i=n(185),o=n(598),a=r.boolean,s=r.overloadedBoolean,l=r.booleanish,u=r.number,c=r.spaceSeparated,d=r.commaSeparated;e.exports=i({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:o,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:d,acceptCharset:c,accessKey:c,action:null,allow:null,allowFullScreen:a,allowPaymentRequest:a,allowUserMedia:a,alt:null,as:null,async:a,autoCapitalize:null,autoComplete:c,autoFocus:a,autoPlay:a,capture:a,charSet:null,checked:a,cite:null,className:c,cols:u,colSpan:null,content:null,contentEditable:l,controls:a,controlsList:c,coords:u|d,crossOrigin:null,data:null,dateTime:null,decoding:null,default:a,defer:a,dir:null,dirName:null,disabled:a,download:s,draggable:l,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:a,formTarget:null,headers:c,height:u,hidden:a,high:u,href:null,hrefLang:null,htmlFor:c,httpEquiv:c,id:null,imageSizes:null,imageSrcSet:d,inputMode:null,integrity:null,is:null,isMap:a,itemId:null,itemProp:c,itemRef:c,itemScope:a,itemType:c,kind:null,label:null,lang:null,language:null,list:null,loop:a,low:u,manifest:null,max:null,maxLength:u,media:null,method:null,min:null,minLength:u,multiple:a,muted:a,name:null,nonce:null,noModule:a,noValidate:a,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:a,optimum:u,pattern:null,ping:c,placeholder:null,playsInline:a,poster:null,preload:null,readOnly:a,referrerPolicy:null,rel:c,required:a,reversed:a,rows:u,rowSpan:u,sandbox:c,scope:null,scoped:a,seamless:a,selected:a,shape:null,size:u,sizes:null,slot:null,span:u,spellCheck:l,src:null,srcDoc:null,srcLang:null,srcSet:d,start:u,step:null,style:null,tabIndex:u,target:null,title:null,translate:null,type:null,typeMustMatch:a,useMap:null,value:l,width:u,wrap:null,align:null,aLink:null,archive:c,axis:null,background:null,bgColor:null,border:u,borderColor:null,bottomMargin:u,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:a,declare:a,event:null,face:null,frame:null,frameBorder:null,hSpace:u,leftMargin:u,link:null,longDesc:null,lowSrc:null,marginHeight:u,marginWidth:u,noResize:a,noHref:a,noShade:a,noWrap:a,object:null,profile:null,prompt:null,rev:null,rightMargin:u,rules:null,scheme:null,scrolling:l,standby:null,summary:null,text:null,topMargin:u,valueType:null,version:null,vAlign:null,vLink:null,vSpace:u,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:a,prefix:null,property:null,results:u,security:null,unselectable:null}})},function(e,t,n){"use strict";var r=n(272),i=n(185),o=n(599),a=r.boolean,s=r.number,l=r.spaceSeparated,u=r.commaSeparated,c=r.commaOrSpaceSeparated;e.exports=i({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:o,properties:{about:c,accentHeight:s,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:s,amplitude:s,arabicForm:null,ascent:s,attributeName:null,attributeType:null,azimuth:s,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:s,by:null,calcMode:null,capHeight:s,className:l,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:s,diffuseConstant:s,direction:null,display:null,dur:null,divisor:s,dominantBaseline:null,download:a,dx:null,dy:null,edgeMode:null,editable:null,elevation:s,enableBackground:null,end:null,event:null,exponent:s,externalResourcesRequired:null,fill:null,fillOpacity:s,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:u,g2:u,glyphName:u,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:s,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:s,horizOriginX:s,horizOriginY:s,id:null,ideographic:s,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:s,k:s,k1:s,k2:s,k3:s,k4:s,kernelMatrix:c,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:s,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:s,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:s,overlineThickness:s,paintOrder:null,panose1:null,path:null,pathLength:s,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:l,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:s,pointsAtY:s,pointsAtZ:s,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:c,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:c,rev:c,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:c,requiredFeatures:c,requiredFonts:c,requiredFormats:c,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:s,specularExponent:s,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:s,strikethroughThickness:s,string:null,stroke:null,strokeDashArray:c,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:s,strokeOpacity:s,strokeWidth:null,style:null,surfaceScale:s,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:c,tabIndex:s,tableValues:null,target:null,targetX:s,targetY:s,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:c,to:null,transform:null,u1:null,u2:null,underlinePosition:s,underlineThickness:s,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:s,values:null,vAlphabetic:s,vMathematical:s,vectorEffect:null,vHanging:s,vIdeographic:s,version:null,vertAdvY:s,vertOriginX:s,vertOriginY:s,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:s,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}})},function(e){e.exports=JSON.parse('["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"]')},function(e,t,n){"use strict";t.opening=n(1323),t.closing=n(603)},function(e,t,n){"use strict";var r=n(375),i=n(113),o=n(376).before,a=n(1324),s=n(1325),l=n(602),u=n(603),c=n(604),d={}.hasOwnProperty,f=["title","base"],p=["meta","link","script","style","template"],h=["thead","tbody"];e.exports=c({html:function(e){var t=a(e);return!t||!r("comment",t)},head:function(e){var t,n,r=e.children,o=r.length,a={},s=-1;for(;++s");return e.schema=d,h};function f(e,t,n){var i=e.schema,c=i.space,f=o(i,t),p=f.attribute;if(!f.overloadedBoolean||n!==p&&""!==n?(f.boolean||f.overloadedBoolean&&"string"!=typeof n)&&(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&isNaN(n))return"";if(p=function(e,t){var n="html"===e.schema.space?e.valid:1,i=d.name[n][e.safe];return l(t,r(e.entities,{subset:i}))}(e,p),!0===n){if("html"===c)return p;n=p}return p+function(e,t,n,i){var o,c,f=e.entities,p=e.quote,h=e.alternative,m=e.schema.space;"object"==typeof n&&"length"in n&&(n=(i.commaSeparated?s:a)(n,{padLeft:!e.tightLists}));n=String(n),("html"!==m||n||!e.collapseEmpty)&&(o=n,"html"===m&&e.unquoted&&(c=d.unquoted[e.valid][e.safe],o=l(n,r(f,{subset:c,attribute:!0}))),"html"===m&&e.unquoted&&o===n||(h&&u(n,p)>u(n,h)&&(p=h),c=(c="'"===p?d.single:d.double)["html"===m?e.valid:1][e.safe],n=l(n,r(f,{subset:c,attribute:!0})),n=p+n+p),n=n?"="+n:n);return n}(e,0,n,f)}},function(e,t,n){"use strict";var r=[" ","\t","\n","\r","\f"],i=r.concat("&","/",">","="),o=r.concat("&",">"),a=o.concat("\0",'"',"'","<","=","`"),s=["&","'"],l=["&",'"'];e.exports={name:[[i,i.concat('"',"'","`")],[i.concat("\0",'"',"'","<"),i.concat("\0",'"',"'","<","`")]],unquoted:[[o,a],[a,a]],single:[[s,s.concat('"',"`")],[s.concat("\0"),s.concat("\0",'"',"`")]],double:[[l,l.concat("'","`")],[l.concat("\0"),l.concat("\0","'","`")]]}},function(e,t,n){"use strict";function r(e){var t=-1===e.indexOf('"')?'"':"'";return t+e+t}e.exports=function(e,t){var n=e.tightDoctype?"":" ",i=t.name,o=t.public,a=t.system,s=[""}},function(e,t,n){"use strict";e.exports=function(e,t){return"\x3c!--"+t.value+"--\x3e"}},function(e,t,n){"use strict";var r=n(607);e.exports=function(e,t){return e.dangerous?t.value:r(e,t)}},function(e,t,n){"use strict";var r=n(1332),i=n(1339),o=n(61),a=n(1353),s={2:!0,1:!1,0:null};function l(e){return e.charAt(1).toUpperCase()}e.exports=function(e){var t=o(e,this.data("settings")),n=t.position;n="boolean"!=typeof n||n,this.Parser=function(e,o){var u=t.fragment?"parseFragment":"parse",c=t.emitParseErrors?function(n){var r,i,u=n.code,c=function(e){return e.replace(/-[a-z]/g,l)}(u),d=t[c],f=null==d||d,p="number"==typeof f?f:f?1:0,h={line:n.startLine,column:n.startCol,offset:n.startOffset},m={line:n.endLine,column:n.endCol,offset:n.endOffset};p&&(r=a[c]||{reason:"",description:""},(i=o.message(g(r.reason),{start:h,end:m})).source="parse-error",i.ruleId=u,i.fatal=s[p],i.note=g(r.description),i.url=!1===r.url?null:"https://html.spec.whatwg.org/multipage/parsing.html#parse-error-"+u);function g(e){return e.replace(/%c(?:-(\d+))?/g,v).replace(/%x/g,y)}function v(t,r){var i=r?-parseInt(r,10):0,o=e.charAt(n.startOffset+i);return"`"===o?"` ` `":o}function y(){return"0x"+e.charCodeAt(n.startOffset).toString(16).toUpperCase()}}:null,d=new i({sourceCodeLocationInfo:n,onParseError:c,scriptingEnabled:!1});return r(d[u](e),{space:t.space,file:o,verbose:t.verbose})}}},function(e,t,n){"use strict";var r=n(373),i=n(273),o=n(377),a=n(1333),s=n(1334),l=n(1337),u=n(61),c=n(371);e.exports=function(e,t){var n,o=t||{};o.messages?(n=o,o={}):n=o.file;return p(e,{schema:"svg"===o.space?i:r,file:n,verbose:o.verbose,location:!1})};var d={}.hasOwnProperty,f={"#document":h,"#document-fragment":h,"#text":function(e){return{type:"text",value:e.value}},"#comment":function(e){return{type:"comment",value:e.data}},"#documentType":function(e){return{type:"doctype",name:e.name||"",public:e.publicId||null,system:e.systemId||null}}};function p(e,t){var n,s,l,c=t.schema,h=d.call(f,e.nodeName)?f[e.nodeName]:m;return h===m&&(t.schema=e.namespaceURI===a.svg?i:r),e.childNodes&&(n=function(e,t){var n=e.length,r=-1,i=[];for(;++r=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i)}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function O(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=T(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function T(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function C(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===g.TEMPLATE&&i===v.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function A(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o)}function P(e,t){let n;for(let r=0;r<8&&(n=k(e,t),n);r++){const t=S(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const r=O(e,t,n.element),i=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(r),C(e,i,r),A(e,t,n)}}function R(){}function M(e){e._err(p.misplacedDoctype)}function I(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current)}function D(e,t){e._appendCommentNode(t,e.document)}function j(e,t){e._insertCharacters(t)}function L(e){e.stopped=!0}function N(e,t){e._err(p.missingDoctype,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,m.DOCUMENT_MODE.QUIRKS),e.insertionMode="BEFORE_HTML_MODE",e._processToken(t)}function F(e,t){e._insertFakeRootElement(),e.insertionMode="BEFORE_HEAD_MODE",e._processToken(t)}function B(e,t){e._insertFakeElement(g.HEAD),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function U(e,t){const n=t.tagName;n===g.HTML?re(e,t):n===g.BASE||n===g.BASEFONT||n===g.BGSOUND||n===g.LINK||n===g.META?(e._appendElement(t,v.HTML),t.ackSelfClosing=!0):n===g.TITLE?e._switchToTextParsing(t,r.MODE.RCDATA):n===g.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,r.MODE.RAWTEXT):(e._insertElement(t,v.HTML),e.insertionMode="IN_HEAD_NO_SCRIPT_MODE"):n===g.NOFRAMES||n===g.STYLE?e._switchToTextParsing(t,r.MODE.RAWTEXT):n===g.SCRIPT?e._switchToTextParsing(t,r.MODE.SCRIPT_DATA):n===g.TEMPLATE?(e._insertTemplate(t,v.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode="IN_TEMPLATE_MODE",e._pushTmplInsertionMode("IN_TEMPLATE_MODE")):n===g.HEAD?e._err(p.misplacedStartTagForHeadElement):q(e,t)}function z(e,t){const n=t.tagName;n===g.HEAD?(e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE"):n===g.BODY||n===g.BR||n===g.HTML?q(e,t):n===g.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==g.TEMPLATE&&e._err(p.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(p.endTagWithoutMatchingOpenElement)}function q(e,t){e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE",e._processToken(t)}function H(e,t){const n=t.type===r.EOF_TOKEN?p.openElementsLeftAfterEof:p.disallowedContentInNoscriptInHead;e._err(n),e.openElements.pop(),e.insertionMode="IN_HEAD_MODE",e._processToken(t)}function W(e,t){e._insertFakeElement(g.BODY),e.insertionMode="IN_BODY_MODE",e._processToken(t)}function G(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function V(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function K(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}function $(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Y(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function X(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,v.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function J(e,t){e._appendElement(t,v.HTML),t.ackSelfClosing=!0}function Z(e,t){e._switchToTextParsing(t,r.MODE.RAWTEXT)}function ee(e,t){e.openElements.currentTagName===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML)}function te(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,v.HTML)}function ne(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML)}function re(e,t){const n=t.tagName;switch(n.length){case 1:n===g.I||n===g.S||n===g.B||n===g.U?Y(e,t):n===g.P?K(e,t):n===g.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(g.A);n&&(P(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):ne(e,t);break;case 2:n===g.DL||n===g.OL||n===g.UL?K(e,t):n===g.H1||n===g.H2||n===g.H3||n===g.H4||n===g.H5||n===g.H6?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==g.H1&&n!==g.H2&&n!==g.H3&&n!==g.H4&&n!==g.H5&&n!==g.H6||e.openElements.pop(),e._insertElement(t,v.HTML)}(e,t):n===g.LI||n===g.DD||n===g.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.items[t],i=e.treeAdapter.getTagName(r);let o=null;if(n===g.LI&&i===g.LI?o=g.LI:n!==g.DD&&n!==g.DT||i!==g.DD&&i!==g.DT||(o=i),o){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(r))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}(e,t):n===g.EM||n===g.TT?Y(e,t):n===g.BR?X(e,t):n===g.HR?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,v.HTML),e.framesetOk=!1,e.ackSelfClosing=!0}(e,t):n===g.RB?te(e,t):n===g.RT||n===g.RP?function(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,v.HTML)}(e,t):n!==g.TH&&n!==g.TD&&n!==g.TR&&ne(e,t);break;case 3:n===g.DIV||n===g.DIR||n===g.NAV?K(e,t):n===g.PRE?$(e,t):n===g.BIG?Y(e,t):n===g.IMG||n===g.WBR?X(e,t):n===g.XMP?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===g.SVG?function(e,t){e._reconstructActiveFormattingElements(),f.adjustTokenSVGAttrs(t),f.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,v.SVG):e._insertElement(t,v.SVG),t.ackSelfClosing=!0}(e,t):n===g.RTC?te(e,t):n!==g.COL&&ne(e,t);break;case 4:n===g.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t):n===g.BASE||n===g.LINK||n===g.META?U(e,t):n===g.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t):n===g.MAIN||n===g.MENU?K(e,t):n===g.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),n||(e.formElement=e.openElements.current))}(e,t):n===g.CODE||n===g.FONT?Y(e,t):n===g.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(P(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,v.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t):n===g.AREA?X(e,t):n===g.MATH?function(e,t){e._reconstructActiveFormattingElements(),f.adjustTokenMathMLAttrs(t),f.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,v.MATHML):e._insertElement(t,v.MATHML),t.ackSelfClosing=!0}(e,t):n===g.MENU?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML)}(e,t):n!==g.HEAD&&ne(e,t);break;case 5:n===g.STYLE||n===g.TITLE?U(e,t):n===g.ASIDE?K(e,t):n===g.SMALL?Y(e,t):n===g.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==m.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.framesetOk=!1,e.insertionMode=_}(e,t):n===g.EMBED?X(e,t):n===g.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,v.HTML);const n=r.getTokenAttr(t,y.TYPE);n&&"hidden"===n.toLowerCase()||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t):n===g.PARAM||n===g.TRACK?J(e,t):n===g.IMAGE?function(e,t){t.tagName=g.IMG,X(e,t)}(e,t):n!==g.FRAME&&n!==g.TBODY&&n!==g.TFOOT&&n!==g.THEAD&&ne(e,t);break;case 6:n===g.SCRIPT?U(e,t):n===g.CENTER||n===g.FIGURE||n===g.FOOTER||n===g.HEADER||n===g.HGROUP||n===g.DIALOG?K(e,t):n===g.BUTTON?function(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.framesetOk=!1}(e,t):n===g.STRIKE||n===g.STRONG?Y(e,t):n===g.APPLET||n===g.OBJECT?Q(e,t):n===g.KEYGEN?X(e,t):n===g.SOURCE?J(e,t):n===g.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,r.MODE.RAWTEXT)}(e,t):n===g.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,v.HTML),e.framesetOk=!1,e.insertionMode===_||"IN_CAPTION_MODE"===e.insertionMode||"IN_TABLE_BODY_MODE"===e.insertionMode||"IN_ROW_MODE"===e.insertionMode||"IN_CELL_MODE"===e.insertionMode?e.insertionMode="IN_SELECT_IN_TABLE_MODE":e.insertionMode="IN_SELECT_MODE"}(e,t):n===g.OPTION?ee(e,t):ne(e,t);break;case 7:n===g.BGSOUND?U(e,t):n===g.DETAILS||n===g.ADDRESS||n===g.ARTICLE||n===g.SECTION||n===g.SUMMARY?K(e,t):n===g.LISTING?$(e,t):n===g.MARQUEE?Q(e,t):n===g.NOEMBED?Z(e,t):n!==g.CAPTION&&ne(e,t);break;case 8:n===g.BASEFONT?U(e,t):n===g.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,v.HTML),e.insertionMode="IN_FRAMESET_MODE")}(e,t):n===g.FIELDSET?K(e,t):n===g.TEXTAREA?function(e,t){e._insertElement(t,v.HTML),e.skipNextNewLine=!0,e.tokenizer.state=r.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode="TEXT_MODE"}(e,t):n===g.TEMPLATE?U(e,t):n===g.NOSCRIPT?e.options.scriptingEnabled?Z(e,t):ne(e,t):n===g.OPTGROUP?ee(e,t):n!==g.COLGROUP&&ne(e,t);break;case 9:n===g.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,v.HTML),e.tokenizer.state=r.MODE.PLAINTEXT}(e,t):ne(e,t);break;case 10:n===g.BLOCKQUOTE||n===g.FIGCAPTION?K(e,t):ne(e,t);break;default:ne(e,t)}}function ie(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function oe(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ae(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const r=e.openElements.items[t];if(e.treeAdapter.getTagName(r)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(r);break}if(e._isSpecialElement(r))break}}function se(e,t){const n=t.tagName;switch(n.length){case 1:n===g.A||n===g.B||n===g.I||n===g.S||n===g.U?P(e,t):n===g.P?function(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(g.P),e._closePElement()}(e):ae(e,t);break;case 2:n===g.DL||n===g.UL||n===g.OL?ie(e,t):n===g.LI?function(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}(e):n===g.DD||n===g.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t):n===g.H1||n===g.H2||n===g.H3||n===g.H4||n===g.H5||n===g.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e):n===g.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(g.BR),e.openElements.pop(),e.framesetOk=!1}(e):n===g.EM||n===g.TT?P(e,t):ae(e,t);break;case 3:n===g.BIG?P(e,t):n===g.DIR||n===g.DIV||n===g.NAV||n===g.PRE?ie(e,t):ae(e,t);break;case 4:n===g.BODY?function(e){e.openElements.hasInScope(g.BODY)&&(e.insertionMode="AFTER_BODY_MODE")}(e):n===g.HTML?function(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode="AFTER_BODY_MODE",e._processToken(t))}(e,t):n===g.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):e.openElements.remove(n))}(e):n===g.CODE||n===g.FONT||n===g.NOBR?P(e,t):n===g.MAIN||n===g.MENU?ie(e,t):ae(e,t);break;case 5:n===g.ASIDE?ie(e,t):n===g.SMALL?P(e,t):ae(e,t);break;case 6:n===g.CENTER||n===g.FIGURE||n===g.FOOTER||n===g.HEADER||n===g.HGROUP||n===g.DIALOG?ie(e,t):n===g.APPLET||n===g.OBJECT?oe(e,t):n===g.STRIKE||n===g.STRONG?P(e,t):ae(e,t);break;case 7:n===g.ADDRESS||n===g.ARTICLE||n===g.DETAILS||n===g.SECTION||n===g.SUMMARY||n===g.LISTING?ie(e,t):n===g.MARQUEE?oe(e,t):ae(e,t);break;case 8:n===g.FIELDSET?ie(e,t):n===g.TEMPLATE?z(e,t):ae(e,t);break;case 10:n===g.BLOCKQUOTE||n===g.FIGCAPTION?ie(e,t):ae(e,t);break;default:ae(e,t)}}function le(e,t){e.tmplInsertionModeStackTop>-1?ve(e,t):e.stopped=!0}function ue(e,t){const n=e.openElements.currentTagName;n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode="IN_TABLE_TEXT_MODE",e._processToken(t)):fe(e,t)}function ce(e,t){const n=t.tagName;switch(n.length){case 2:n===g.TD||n===g.TH||n===g.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(g.TBODY),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)}(e,t):fe(e,t);break;case 3:n===g.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(g.COLGROUP),e.insertionMode="IN_COLUMN_GROUP_MODE",e._processToken(t)}(e,t):fe(e,t);break;case 4:n===g.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,v.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t):fe(e,t);break;case 5:n===g.TABLE?function(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processToken(t))}(e,t):n===g.STYLE?U(e,t):n===g.TBODY||n===g.TFOOT||n===g.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_TABLE_BODY_MODE"}(e,t):n===g.INPUT?function(e,t){const n=r.getTokenAttr(t,y.TYPE);n&&"hidden"===n.toLowerCase()?e._appendElement(t,v.HTML):fe(e,t),t.ackSelfClosing=!0}(e,t):fe(e,t);break;case 6:n===g.SCRIPT?U(e,t):fe(e,t);break;case 7:n===g.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,v.HTML),e.insertionMode="IN_CAPTION_MODE"}(e,t):fe(e,t);break;case 8:n===g.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,v.HTML),e.insertionMode="IN_COLUMN_GROUP_MODE"}(e,t):n===g.TEMPLATE?U(e,t):fe(e,t);break;default:fe(e,t)}}function de(e,t){const n=t.tagName;n===g.TABLE?e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode()):n===g.TEMPLATE?z(e,t):n!==g.BODY&&n!==g.CAPTION&&n!==g.COL&&n!==g.COLGROUP&&n!==g.HTML&&n!==g.TBODY&&n!==g.TD&&n!==g.TFOOT&&n!==g.TH&&n!==g.THEAD&&n!==g.TR&&fe(e,t)}function fe(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n}function pe(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0}function ye(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}function be(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t)}e.exports=class{constructor(e){this.options=c(b,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&l.install(this,a),this.options.onParseError&&l.install(this,s,{onParseError:this.options.onParseError})}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(g.TEMPLATE,v.HTML,[]));const n=this.treeAdapter.createElement("documentmock",v.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===g.TEMPLATE&&this._pushTmplInsertionMode("IN_TEMPLATE_MODE"),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,i),i}_bootstrap(e,t){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new i(this.document,this.treeAdapter),this.activeFormattingElements=new o(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1)}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e()}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==v.HTML&&!this._isIntegrationPoint(e)}_switchToTextParsing(e,t){this._insertElement(e,v.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode="TEXT_MODE"}switchToPlaintextParsing(){this.insertionMode="TEXT_MODE",this.originalInsertionMode="IN_BODY_MODE",this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===g.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===v.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===g.TITLE||e===g.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:e===g.STYLE||e===g.XMP||e===g.IFRAME||e===g.NOEMBED||e===g.NOFRAMES||e===g.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:e===g.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:e===g.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,r)}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,v.HTML,[]);this._attachElementToTree(t),this.openElements.push(t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,v.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(g.HTML,v.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n)}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars)}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(t);if(n===v.HTML)return!1;if(this.treeAdapter.getTagName(t)===g.ANNOTATION_XML&&n===v.MATHML&&e.type===r.START_TAG_TOKEN&&e.tagName===g.SVG)return!1;const i=e.type===r.CHARACTER_TOKEN||e.type===r.NULL_CHARACTER_TOKEN||e.type===r.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===r.START_TAG_TOKEN&&e.tagName!==g.MGLYPH&&e.tagName!==g.MALIGNMARK)&&!i||!this._isIntegrationPoint(t,v.MATHML))&&((e.type!==r.START_TAG_TOKEN&&!i||!this._isIntegrationPoint(t,v.HTML))&&e.type!==r.EOF_TOKEN)}_processToken(e){x[this.insertionMode][e.type](this,e)}_processTokenInBodyMode(e){x.IN_BODY_MODE[e.type](this,e)}_processTokenInForeignContent(e){e.type===r.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e):e.type===r.NULL_CHARACTER_TOKEN?function(e,t){t.chars=h.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e):e.type===r.WHITESPACE_CHARACTER_TOKEN?j(this,e):e.type===r.COMMENT_TOKEN?I(this,e):e.type===r.START_TAG_TOKEN?function(e,t){if(f.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==v.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t)}else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===v.MATHML?f.adjustTokenMathMLAttrs(t):r===v.SVG&&(f.adjustTokenSVGTagName(t),f.adjustTokenSVGAttrs(t)),f.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):e.type===r.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===v.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}(this,e)}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===r.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(p.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return f.isIntegrationPoint(n,r,i,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===o.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let r=t;r=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),i=w[r];if(i){this.insertionMode=i;break}if(!(t||r!==g.TD&&r!==g.TH)){this.insertionMode="IN_CELL_MODE";break}if(!t&&r===g.HEAD){this.insertionMode="IN_HEAD_MODE";break}if(r===g.SELECT){this._resetInsertionModeForSelect(e);break}if(r===g.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===g.HTML){this.insertionMode=this.headElement?"AFTER_HEAD_MODE":"BEFORE_HEAD_MODE";break}if(t){this.insertionMode="IN_BODY_MODE";break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===g.TEMPLATE)break;if(n===g.TABLE)return void(this.insertionMode="IN_SELECT_IN_TABLE_MODE")}this.insertionMode="IN_SELECT_MODE"}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===g.TABLE||t===g.TBODY||t===g.TFOOT||t===g.THEAD||t===g.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===g.TEMPLATE&&i===v.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===g.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e)}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return m.SPECIAL_ELEMENTS[n][t]}}},function(e,t,n){"use strict";const r=n(378),i=n(379),o=r.CODE_POINTS;e.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(t))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,o.EOF;return this._err(i.surrogateInInputStream),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,o.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===o.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===o.CARRIAGE_RETURN)return this.skipNextNewLine=!0,o.LINE_FEED;return this.skipNextNewLine=!1,r.isSurrogate(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===o.LINE_FEED||e===o.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){r.isControlCodePoint(e)?this._err(i.controlCharacterInInputStream):r.isUndefinedCodePoint(e)&&this._err(i.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},function(e,t,n){"use strict";e.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},function(e,t,n){"use strict";const r=n(186),i=r.TAG_NAMES,o=r.NAMESPACES;function a(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI;case 3:return e===i.RTC;case 6:return e===i.OPTION;case 8:return e===i.OPTGROUP}return!1}function s(e){switch(e.length){case 1:return e===i.P;case 2:return e===i.RB||e===i.RP||e===i.RT||e===i.DD||e===i.DT||e===i.LI||e===i.TD||e===i.TH||e===i.TR;case 3:return e===i.RTC;case 5:return e===i.TBODY||e===i.TFOOT||e===i.THEAD;case 6:return e===i.OPTION;case 7:return e===i.CAPTION;case 8:return e===i.OPTGROUP||e===i.COLGROUP}return!1}function l(e,t){switch(e.length){case 2:if(e===i.TD||e===i.TH)return t===o.HTML;if(e===i.MI||e===i.MO||e===i.MN||e===i.MS)return t===o.MATHML;break;case 4:if(e===i.HTML)return t===o.HTML;if(e===i.DESC)return t===o.SVG;break;case 5:if(e===i.TABLE)return t===o.HTML;if(e===i.MTEXT)return t===o.MATHML;if(e===i.TITLE)return t===o.SVG;break;case 6:return(e===i.APPLET||e===i.OBJECT)&&t===o.HTML;case 7:return(e===i.CAPTION||e===i.MARQUEE)&&t===o.HTML;case 8:return e===i.TEMPLATE&&t===o.HTML;case 13:return e===i.FOREIGN_OBJECT&&t===o.SVG;case 14:return e===i.ANNOTATION_XML&&t===o.MATHML}return!1}e.exports=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===i.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===o.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement()}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===o.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.H1||e===i.H2||e===i.H3||e===i.H4||e===i.H5||e===i.H6&&t===o.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.TD||e===i.TH&&t===o.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==i.TABLE&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==i.TBODY&&this.currentTagName!==i.TFOOT&&this.currentTagName!==i.THEAD&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==i.TR&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==o.HTML;)this.pop()}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===i.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return--t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===i.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if(l(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===i.H1||t===i.H2||t===i.H3||t===i.H4||t===i.H5||t===i.H6)&&n===o.HTML)return!0;if(l(t,n))return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if((n===i.UL||n===i.OL)&&r===o.HTML||l(n,r))return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===o.HTML)return!0;if(n===i.BUTTON&&r===o.HTML||l(n,r))return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===o.HTML){if(n===e)return!0;if(n===i.TABLE||n===i.TEMPLATE||n===i.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===o.HTML){if(t===i.TBODY||t===i.THEAD||t===i.TFOOT)return!0;if(t===i.TABLE||t===i.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===o.HTML){if(n===e)return!0;if(n!==i.OPTION&&n!==i.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;s(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;a(this.currentTagName)&&this.currentTagName!==e;)this.pop()}}},function(e,t,n){"use strict";class r{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null}_getNoahArkConditionCandidates(e){const t=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const a=this.entries[e];if(a.type===r.MARKER_ENTRY)break;const s=a.element,l=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===i&&this.treeAdapter.getNamespaceURI(s)===o&&l.length===n&&t.push({idx:e,attrs:l})}}return t.length<3?[]:t}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const r=this.treeAdapter.getAttrList(e),i=r.length,o=Object.create(null);for(let e=0;e=2;e--)this.entries.splice(t[e].idx,1),this.length--}}insertMarker(){this.entries.push({type:r.MARKER_ENTRY}),this.length++}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:r.ELEMENT_ENTRY,element:e,token:t}),this.length++}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===r.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===r.ELEMENT_ENTRY&&n.element===e)return n}return null}}r.MARKER_ENTRY="MARKER_ENTRY",r.ELEMENT_ENTRY="ELEMENT_ENTRY",e.exports=r},function(e,t,n){"use strict";const r=n(114),i=n(274),o=n(611),a=n(1345),s=n(186).TAG_NAMES;e.exports=class extends r{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t)}_setEndLocation(e,t){const n=this.treeAdapter.getNodeSourceCodeLocation(e);if(n&&t.location){const r=t.location,o=this.treeAdapter.getTagName(e);t.type===i.END_TAG_TOKEN&&o===t.tagName?(n.endTag=Object.assign({},r),n.endLine=r.endLine,n.endCol=r.endCol,n.endOffset=r.endOffset):(n.endLine=r.startLine,n.endCol=r.startCol,n.endOffset=r.startOffset)}}_getOverriddenMethods(e,t){return{_bootstrap(n,i){t._bootstrap.call(this,n,i),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const s=r.install(this.tokenizer,o);e.posTracker=s.posTracker,r.install(this.openElements,a,{onItemPop:function(t){e._setEndLocation(t,e.currentToken)}})},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken)},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n)},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===i.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];if(this.treeAdapter.getTagName(r)===n.tagName){e._setEndLocation(r,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let t=0;t0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this)},remove(n){e.onItemPop(this.current),t.remove.call(this,n)}}}}},function(e,t,n){"use strict";const r=n(380),i=n(1347),o=n(611),a=n(114);e.exports=class extends r{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(e,t){return{_bootstrap(n,r){t._bootstrap.call(this,n,r),a.install(this.tokenizer,i,e.opts),a.install(this.tokenizer,o)},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n)},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t)}}}}},function(e,t,n){"use strict";const r=n(380),i=n(1348),o=n(114);e.exports=class extends r{constructor(e,t){super(e,t);const n=o.install(e.preprocessor,i,t);this.posTracker=n.posTracker}}},function(e,t,n){"use strict";const r=n(380),i=n(612),o=n(114);e.exports=class extends r{constructor(e,t){super(e,t),this.posTracker=o.install(e,i),this.lastErrOffset=-1}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e))}}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(186);t.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return{nodeName:"#comment",data:e,parentNode:null}};const i=function(e){return{nodeName:"#text",value:e,parentNode:null}},o=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e},a=t.insertBefore=function(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e};t.setTemplateContent=function(e,t){e.content=t},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,r){let i=null;for(let t=0;t(Object.keys(t).forEach(n=>{e[n]=t[n]}),e),Object.create(null))}},function(e,t,n){"use strict";const{DOCUMENT_MODE:r}=n(186),i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],o=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),a=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],s=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l=s.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function u(e){const t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function c(e,t){for(let n=0;n-1)return r.QUIRKS;let e=null===t?o:i;if(c(n,e))return r.QUIRKS;if(e=null===t?s:l,c(n,e))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},t.serializeContent=function(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=" PUBLIC "+u(t):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+u(n)),r}},function(e,t,n){"use strict";const r=n(274),i=n(186),o=i.TAG_NAMES,a=i.NAMESPACES,s=i.ATTRS,l="text/html",u="application/xhtml+xml",c={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},d={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:a.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:a.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:a.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:a.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:a.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:a.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:a.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:a.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:a.XML},"xml:space":{prefix:"xml",name:"space",namespace:a.XML},xmlns:{prefix:"",name:"xmlns",namespace:a.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:a.XMLNS}},f=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},p={[o.B]:!0,[o.BIG]:!0,[o.BLOCKQUOTE]:!0,[o.BODY]:!0,[o.BR]:!0,[o.CENTER]:!0,[o.CODE]:!0,[o.DD]:!0,[o.DIV]:!0,[o.DL]:!0,[o.DT]:!0,[o.EM]:!0,[o.EMBED]:!0,[o.H1]:!0,[o.H2]:!0,[o.H3]:!0,[o.H4]:!0,[o.H5]:!0,[o.H6]:!0,[o.HEAD]:!0,[o.HR]:!0,[o.I]:!0,[o.IMG]:!0,[o.LI]:!0,[o.LISTING]:!0,[o.MENU]:!0,[o.META]:!0,[o.NOBR]:!0,[o.OL]:!0,[o.P]:!0,[o.PRE]:!0,[o.RUBY]:!0,[o.S]:!0,[o.SMALL]:!0,[o.SPAN]:!0,[o.STRONG]:!0,[o.STRIKE]:!0,[o.SUB]:!0,[o.SUP]:!0,[o.TABLE]:!0,[o.TT]:!0,[o.U]:!0,[o.UL]:!0,[o.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return!!(t===o.FONT&&(null!==r.getTokenAttr(e,s.COLOR)||null!==r.getTokenAttr(e,s.SIZE)||null!==r.getTokenAttr(e,s.FACE)))||p[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t`","url":false},"abruptClosingOfEmptyComment":{"reason":"Unexpected abruptly closed empty comment","description":"Unexpected `>` or `->`. Expected `--\x3e` to close comments"},"abruptDoctypePublicIdentifier":{"reason":"Unexpected abruptly closed public identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the public identifier"},"abruptDoctypeSystemIdentifier":{"reason":"Unexpected abruptly closed system identifier","description":"Unexpected `>`. Expected a closing `\\"` or `\'` after the identifier identifier"},"absenceOfDigitsInNumericCharacterReference":{"reason":"Unexpected non-digit at start of numeric character reference","description":"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},"cdataInHtmlContent":{"reason":"Unexpected CDATA section in HTML","description":"Unexpected `` in ``","description":"Unexpected text character `%c`. Only use text in `