decap-cms-core 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/decap-cms-core.js +3 -3
- package/dist/decap-cms-core.js.map +1 -1
- package/dist/esm/backend.js +16 -1
- package/dist/esm/bootstrap.js +2 -2
- package/dist/esm/components/Editor/EditorControlPane/EditorControlPane.js +7 -7
- package/dist/esm/components/UI/ErrorBoundary.js +2 -2
- package/index.d.ts +8 -0
- package/package.json +2 -2
- package/src/backend.ts +28 -1
- package/src/components/Editor/EditorControlPane/EditorControlPane.js +1 -1
- package/src/lib/i18n.ts +5 -1
package/dist/decap-cms-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see decap-cms-core.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("prop-types"),require("decap-cms-ui-default"),require("immutable"),require("decap-cms-lib-util"),require("decap-cms-lib-widgets"),require("moment"),require("@emotion/core"),require("react-immutable-proptypes")):"function"==typeof define&&define.amd?define("DecapCmsCore",["react","react-dom","prop-types","decap-cms-ui-default","immutable","decap-cms-lib-util","decap-cms-lib-widgets","moment","@emotion/core","react-immutable-proptypes"],t):"object"==typeof exports?exports.DecapCmsCore=t(require("react"),require("react-dom"),require("prop-types"),require("decap-cms-ui-default"),require("immutable"),require("decap-cms-lib-util"),require("decap-cms-lib-widgets"),require("moment"),require("@emotion/core"),require("react-immutable-proptypes")):e.DecapCmsCore=t(e.React,e.ReactDOM,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsUiDefault,e.DecapCmsDefaultExports.Immutable,e.DecapCmsLibUtil,e.DecapCmsLibWidgets,e.DecapCmsDefaultExports.Moment,e.DecapCmsDefaultExports.EmotionCore,e.DecapCmsDefaultExports.ImmutablePropTypes)}(window,((__WEBPACK_EXTERNAL_MODULE__12244__,__WEBPACK_EXTERNAL_MODULE__53741__,__WEBPACK_EXTERNAL_MODULE__32673__,__WEBPACK_EXTERNAL_MODULE__53327__,__WEBPACK_EXTERNAL_MODULE__34106__,__WEBPACK_EXTERNAL_MODULE__24688__,__WEBPACK_EXTERNAL_MODULE__75976__,__WEBPACK_EXTERNAL_MODULE__18815__,__WEBPACK_EXTERNAL_MODULE__62797__,__WEBPACK_EXTERNAL_MODULE__78841__)=>(()=>{var __webpack_modules__={34601:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(82601),o=r(12244);const i=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}};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)-.*))$/;const s=i((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var l=r(62797);const c=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},u={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 f=/[A-Z]|^ms/g,p=/_EMO_([^_]+?)_([^]*?)_EMO_/g,d=function(e){return 45===e.charCodeAt(1)},h=function(e){return null!=e&&"boolean"!=typeof e},g=i((function(e){return d(e)?e:e.replace(f,"-$&").toLowerCase()})),m=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(p,(function(e,t,r){return v={name:t,styles:r,next:v},t}))}return 1===u[e]||d(e)||"number"!=typeof t||0===t?t:t+"px"};function y(e,t,r,n){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return v={name:r.name,styles:r.styles,next:v},r.name;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)v={name:o.name,styles:o.styles,next:v},o=o.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=y(e,t,r[o],!1);else for(var i in r){var a=r[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=i+"{"+t[a]+"}":h(a)&&(n+=g(i)+":"+m(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=y(e,t,a,!1);switch(i){case"animation":case"animationName":n+=g(i)+":"+s+";";break;default:n+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)h(a[l])&&(n+=g(i)+":"+m(i,a[l])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=v,a=r(e);return v=i,y(e,t,a,n)}}if(null==t)return r;var s=t[r];return void 0===s||n?r:s}var v,b=/label:\s*([^\s;\n{]+)\s*;/g,w=s,S=function(e){return"theme"!==e&&"innerRef"!==e},x=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?w:S};function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var O=function(){return null};const E=function e(t,r){var i,a,s;void 0!==r&&(i=r.label,s=r.target,a=t.__emotion_forwardProp&&r.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&r.shouldForwardProp(e)}:r.shouldForwardProp);var u=t.__emotion_real===t,f=u&&t.__emotion_base||t;"function"!=typeof a&&u&&(a=t.__emotion_forwardProp);var p=a||x(f),d=!p("as");return function(){var h=arguments,g=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&g.push("label:"+i+";"),null==h[0]||void 0===h[0].raw)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,w=1;w<m;w++)g.push(h[w],h[0][w])}var S=(0,l.withEmotionCache)((function(e,t,r){return(0,o.createElement)(l.ThemeContext.Consumer,null,(function(n){var i,l,u,h,m=d&&e.as||f,w="",S=[],_=e;if(null==e.theme){for(var E in _={},e)_[E]=e[E];_.theme=n}"string"==typeof e.className?(i=t.registered,l=S,u=e.className,h="",u.split(" ").forEach((function(e){void 0!==i[e]?l.push(i[e]):h+=e+" "})),w=h):null!=e.className&&(w=e.className+" ");var k=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";v=void 0;var i=e[0];null==i||void 0===i.raw?(n=!1,o+=y(r,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=y(r,t,e[a],46===o.charCodeAt(o.length-1)),n&&(o+=i[a]);b.lastIndex=0;for(var s,l="";null!==(s=b.exec(o));)l+="-"+s[1];return{name:c(o)+l,styles:o,next:v}}(g.concat(S),t.registered,_);!function(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+n,o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,k,"string"==typeof m),w+=t.key+"-"+k.name,void 0!==s&&(w+=" "+s);var C=d&&void 0===a?x(m):p,T={};for(var P in e)d&&"as"===P||C(P)&&(T[P]=e[P]);T.className=w,T.ref=r||e.innerRef;var j=(0,o.createElement)(m,T),R=(0,o.createElement)(O,null);return(0,o.createElement)(o.Fragment,null,R,j)}))}));return S.displayName=void 0!==i?i:"Styled("+("string"==typeof f?f:f.displayName||f.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=f,S.__emotion_styles=g,S.__emotion_forwardProp=a,Object.defineProperty(S,"toString",{value:function(){return"."+s}}),S.withComponent=function(t,o){return e(t,void 0!==o?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r||{},{},o):r).apply(void 0,g)},S}}},55034:(e,t,r)=>{"use strict";const n=r(11976),o=r.g.Date;class i extends o{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},59697:(e,t,r)=>{"use strict";const n=r(11976);class o extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}T${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},12446:e=>{"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},70256:(e,t,r)=>{"use strict";const n=r(11976);class o extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},11976:e=>{"use strict";e.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}},86056:e=>{"use strict";const t=1114112;class r extends Error{constructor(e,t,n){super("[ParserError] "+e,t,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class n{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class o{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new n(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=String(e),this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let e;this.char=t;do{e=this.state.parser,this.runOne()}while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if("function"!=typeof e)throw new r("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new n(e)}callNow(e,t){return this.call(e,t),this.runOne()}return(e){if(0===this.stack.length)throw this.error(new r("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===t)throw this.error(new r("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new r("Must declare a parseStart method")}}o.END=t,o.Error=r,e.exports=o},77146:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=makeParserClass(__webpack_require__(86056)),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__(12446),createDateTimeFloat=__webpack_require__(59697),createDate=__webpack_require__(55034),createTime=__webpack_require__(70256),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=__webpack_require__.g.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),__webpack_require__.g.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,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=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()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)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.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,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.parseNoUnderHexOctBinLiteral);{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.parseNoUnderHexOctBinLiteral);{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.parseNoUnderHexOctBinLiteral);{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.returnNow(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],r=tomlType(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`))}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,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=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 (])"))}}}},66615:(e,t,r)=>{"use strict";e.exports=function(e,t){t||(t={});const r=t.blocksize||40960,i=new n;return new Promise(((e,t)=>{setImmediate(a,0,r,e,t)}));function a(t,r,n,s){if(t>=e.length)try{return n(i.finish())}catch(t){return s(o(t,e))}try{i.parse(e.slice(t,t+r)),setImmediate(a,t+r,r,n,s)}catch(t){s(o(t,e))}}};const n=r(77146),o=r(53146)},53146:e=>{"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const n=t.split(/\n/),o=String(Math.min(n.length,e.line+3)).length;let i=" ";for(;i.length<o;)i+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(n.length,e.line+2);++t){let a=String(t+1);if(a.length<o&&(a=" "+a),e.line===t){r+=a+"> "+n[t]+"\n",r+=i+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n"}else r+=a+": "+n[t]+"\n"}}return e.message=r+"\n",e}},24312:(e,t,r)=>{"use strict";e.exports=function(e){return e?function(e){const t=new o;return e.setEncoding("utf8"),new Promise(((r,n)=>{let o,i=!1,a=!1;function s(){if(i=!0,!o)try{r(t.finish())}catch(e){n(e)}}function l(e){a=!0,n(e)}e.once("end",s),e.once("error",l),function r(){let n;for(o=!0;null!==(n=e.read());)try{t.parse(n)}catch(e){return l(e)}if(o=!1,i)return s();a||e.once("readable",r)}()}))}(e):function(){const e=new o;return new n.Transform({objectMode:!0,transform(t,r,n){try{e.parse(t.toString(r))}catch(e){this.emit("error",e)}n()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const n=r(54851),o=r(77146)},13475:(e,t,r)=>{"use strict";e.exports=function(e){r.g.Buffer&&r.g.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new n;try{return t.parse(e),t.finish()}catch(t){throw o(t,e)}};const n=r(77146),o=r(53146)},53279:(e,t,r)=>{"use strict";e.exports=r(13475),e.exports.async=r(66615),e.exports.stream=r(24312),e.exports.prettyError=r(53146)},57573:e=>{"use strict";function t(e){return new Error("Can only stringify objects, not "+e)}function r(e){return Object.keys(e).filter((t=>i(e[t])))}function n(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&"function"==typeof e[r].toJSON&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function o(e,l,c){var f,p;f=r(c=n(c)),p=function(e){return Object.keys(e).filter((t=>!i(e[t])))}(c);var h=[],g=l||"";f.forEach((e=>{var t=a(c[e]);"undefined"!==t&&"null"!==t&&h.push(g+s(e)+" = "+u(c[e],!0))})),h.length>0&&h.push("");var m=e&&f.length>0?l+" ":"";return p.forEach((i=>{h.push(function(e,i,l,c){var u=a(c);if("array"===u)return function(e,r,i,l){d(l=n(l));var c=a(l[0]);if("table"!==c)throw t(c);var u=e+s(i),f="";return l.forEach((e=>{f.length>0&&(f+="\n"),f+=r+"[["+u+"]]\n",f+=o(u+".",r,e)})),f}(e,i,l,c);if("table"===u)return function(e,t,n,i){var a=e+s(n),l="";return r(i).length>0&&(l+=t+"["+a+"]\n"),l+o(a+".",t,i)}(e,i,l,c);throw t(u)}(e,m,i,c[i]))})),h.join("\n")}function i(e){switch(a(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"!==a(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function a(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 s(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:l(t)}function l(e){return'"'+c(e).replace(/"/g,'\\"')+'"'}function c(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.length<4;)t="0"+t;return t}(0,e.codePointAt(0).toString(16))))}function u(e,t){let r=a(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),f(e,r)}function f(e,r){switch(r||(r=a(e)),r){case"string-multiline":return function(e){let t=e.split(/\n/).map((e=>c(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return l(e);case"string-literal":return"'"+e+"'";case"integer":return p(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("."),r=t[0],n=t[1]||0;return p(r)+"."+n}(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=d(e=n(e));var r="[",o=e.map((e=>f(e,t)));return o.join(", ").length>60||/\n/.test(o)?r+="\n "+o.join(",\n ")+"\n":r+=" "+o.join(", ")+(o.length>0?" ":""),r+"]"}(e.filter((e=>"null"!==a(e)&&"undefined"!==a(e)&&"nan"!==a(e))));case"table":return function(e){e=n(e);var t=[];return Object.keys(e).forEach((r=>{t.push(s(r)+" = "+u(e[r],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw t(r)}}function p(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function d(e){const t=function(e){var t=a(e[0]);return e.every((e=>a(e)===t))?t:e.every((e=>{return"float"===(t=a(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 t("null");if(void 0===e)throw t("undefined");if("object"!=typeof e)throw t(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;const r=a(e);if("table"!==r)throw t(r);return o("","",e)},e.exports.value=f},6901:(e,t,r)=>{"use strict";t.parse=r(53279),t.stringify=r(57573)},85692:(e,t,r)=>{"use strict";var n=r(67286),o=r(62680),i=n("%TypeError%"),a=r(69738),s=r(14989),l=r(60845),c=r(2685),u=r(98529),f=r(14749),p=r(47623),d=r(26302),h=o("String.prototype.split"),g=Object("a"),m="a"!==g[0]||!(0 in g);e.exports=function(e){var t,r=f(this),n=m&&d(this)?h(this,""):r,o=u(n);if(!c(e))throw new i("Array.prototype.forEach callback must be a function");arguments.length>1&&(t=arguments[1]);for(var g=0;g<o;){var y=p(g);if(l(n,y)){var v=s(n,y);a(e,t,[v,g,n])}g+=1}}},33443:(e,t,r)=>{"use strict";var n=r(14926),o=r(89429),i=r(62680),a=r(95339),s=r(85692),l=r(25970),c=l(),u=r(89055),f=i("Array.prototype.slice"),p=o.apply(c),d=function(e,t){return a(e),p(e,f(arguments,1))};n(d,{getPolyfill:l,implementation:s,shim:u}),e.exports=d},25970:(e,t,r)=>{"use strict";var n=r(63937),o=r(85692);e.exports=function(){var e=Array.prototype.forEach;return n(e)?e:o}},89055:(e,t,r)=>{"use strict";var n=r(14926),o=r(25970);e.exports=function(){var e=o();return n(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e}},36867:(e,t,r)=>{"use strict";r.d(t,{DP:()=>a,Fx:()=>c,Nv:()=>u,Oe:()=>l,So:()=>g,TX:()=>y,Wr:()=>s,ZH:()=>i,pH:()=>m});var n=r(44905),o=r(15967);const i="AUTH_REQUEST",a="AUTH_SUCCESS",s="AUTH_FAILURE",l="AUTH_REQUEST_DONE",c="USE_OPEN_AUTHORING",u="LOGOUT";function f(){return{type:i}}function p(e){return{type:a,payload:e}}function d(e){return{type:s,error:"Failed to authenticate",payload:e}}function h(){return{type:c}}function g(){return(e,t)=>{const r=t(),o=(0,n.Rg)(r.config);return e(f()),Promise.resolve(o.currentUser()).then((t=>{t?(t.useOpenAuthoring&&e(h()),e(p(t))):e({type:l})})).catch((t=>{e(d(t)),e(y())}))}}function m(e){return(t,r)=>{const i=r(),a=(0,n.Rg)(i.config);return t(f()),a.authenticate(e).then((e=>{e.useOpenAuthoring&&t(h()),t(p(e))})).catch((e=>{console.error(e),t((0,o.wN)({message:{details:e.message,key:"ui.toast.onFailToAuth"},type:"error",dismissAfter:8e3})),t(d(e))}))}}function y(){return(e,t)=>{const r=t(),i=(0,n.Rg)(r.config);Promise.resolve(i.logout()).then((()=>{e({type:u}),e((0,o.L1)())}))}}},97166:(e,t,r)=>{"use strict";r.d(t,{cd:()=>Z,YS:()=>K,P6:()=>G,rR:()=>le,ME:()=>ce});var n=r(45455),o=r.n(n),i=r(5648),a=r.n(i),s=r(93433),l=r.n(s),c=r(60155),u=r.n(c),f=r(34106),p=r(39714),d=r.n(p),h=r(76665),g=r(52588),m=r(1581),y=r.n(m),v=r(12430),b=r(33351),w=r.n(b),S=r(26426),x=r.n(S),_=r(76221),O=r(19619),E=r(2995);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const P={type:"string",minLength:2,maxLength:10,pattern:"^[a-zA-Z-_]+$"},j={type:"object",properties:{structure:{type:"string",enum:Object.values(E.hb)},locales:{type:"array",minItems:1,items:P,uniqueItems:!0},default_locale:P}},R=C(C({},j),{},{required:["structure","locales"]}),A={oneOf:[{type:"boolean"},j]},M={oneOf:[{type:"boolean"},{type:"string",enum:Object.values(E.JD)}]};function I(){const e=x()();return{$id:`fields_${e}`,type:"array",minItems:1,items:{$id:`field_${e}`,type:"object",properties:{name:{type:"string"},label:{type:"string"},widget:{type:"string"},required:{type:"boolean"},i18n:M,hint:{type:"string"},pattern:{type:"array",minItems:2,items:[{oneOf:[{type:"string"},{instanceof:"RegExp"}]},{type:"string"}]},field:{$ref:`field_${e}`},fields:{$ref:`fields_${e}`},types:{$ref:`fields_${e}`}},select:{$data:"0/widget"},selectCases:C({},N()),required:["name"]},uniqueItemProperties:["name"]}}const D={type:"array",minItems:1,items:{type:"object",properties:{label:{type:"string"},field:{type:"string"},pattern:{oneOf:[{type:"boolean"},{type:"string"}]}},additionalProperties:!1,required:["label","field","pattern"]}},L={type:"array",minItems:1,items:{type:"object",properties:{label:{type:"string"},field:{type:"string"},pattern:{type:"string"}},additionalProperties:!1,required:["label","field"]}};function N(){const e=(0,O.fH)().map((e=>({[e.name]:e.schema})));return Object.assign(...e)}class $ 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 r=e.map((({message:e,instancePath:t})=>{const r=t.slice(1).split("/").map((e=>e.match(/^\d+$/)?`[${e}]`:`.${e}`)).join("").slice(1);return`${r?`'${r}'`:"config"} ${e}`})).join("\n");super(r,...t),this.errors=e,this.message=r}toString(){return this.message}}var F=r(14093),B=r(75863),U=r(44905),z=r(72431);const W=["sortableFields"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){V(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const K="CONFIG_REQUEST",G="CONFIG_SUCCESS",Z="CONFIG_FAILURE";function Y(e){return"types"in e||"field"in e}function J(e,t){return e.map((e=>{const r=t(e);return function(e){return"fields"in e}(r)?H(H({},r),{},{fields:J(r.fields,t)}):Y(r)&&r.field?H(H({},r),{},{field:J([r.field],t)[0]}):Y(r)&&r.types?H(H({},r),{},{types:J(r.types,t)}):r}))}function Q(e){return"media_folder"in e&&!("public_folder"in e)?H(H({},e),{},{public_folder:e.media_folder}):e}const X={dateFormat:"date_format",timeFormat:"time_format",pickerUtc:"picker_utc",editorComponents:"editor_components",valueType:"value_type",valueField:"value_field",searchFields:"search_fields",displayFields:"display_fields",optionsLength:"options_length"};function ee(e){const t=Object.keys(X).filter((t=>t in e)).map((t=>{const r=X[t];return console.warn(`Field ${e.name} is using a deprecated configuration '${t}'. Please use '${r}'`),{[r]:e[t]}}));return Object.assign({},e,...t)}function te(e){return!0===e[E.mb]?H(H({},e),{},{[E.mb]:E.JD.TRANSLATE}):!1!==e[E.mb]&&e[E.mb]?e:H(H({},e),{},{[E.mb]:E.JD.NONE})}function re(e,t){if("boolean"==typeof e)return t;{const r=e.locales||t.locales,n=e.default_locale||r[0],o=d()(t,e);return o.locales=r,o.default_locale=n,ie(o),o}}function ne(e,t){return J(e,t?te:e=>{const t=H({},e);return delete t[E.mb],t})}function oe(e){if(e&&e.structure!==E.hb.SINGLE_FILE)throw new Error(`i18n configuration for files collections is limited to ${E.hb.SINGLE_FILE} structure`)}function ie(e){if(e&&e.default_locale&&!e.locales.includes(e.default_locale))throw new Error(`i18n locales '${e.locales.join(", ")}' are missing the default locale ${e.default_locale}`)}function ae(e,t){const r=(0,B.Zh)((0,f.fromJS)(e));return!!(0,B._5)(r,t.name,"listEntries")}function se(e){return{type:G,payload:e}}function le(e){return{type:Z,error:"Error loading config",payload:e}}function ce(e={},t){return window.CMS_CONFIG?se(window.CMS_CONFIG):async r=>{r({type:K});try{const i=function(){const e=document.querySelector('link[rel="cms-config-url"]');return e&&{"text/yaml":"yaml","application/x-yaml":"yaml"}[e.type]&&e.href?(console.log(`Using config file path: "${e.href}"`),e.href):"config.yml"}(),s=!o()(e),c=!1===e.load_config_file?{}:await async function(e,t){const r=await fetch(e,{credentials:"same-origin"}).catch((e=>e));if(r instanceof Error||200!==r.status){if(t)return{};const e=r instanceof Error?r.message:r.status;throw new Error(`Failed to load config.yml (${e})`)}const n=r.headers.get("Content-Type")||"Not-Found";return-1===n.indexOf("yaml")&&(console.log(`Response for ${e} was not yaml. (Content-Type: ${n})`),t)?{}:function(e){const t=u().parse(e,{maxAliasCount:-1,prettyErrors:!0,merge:!0});if("undefined"!=typeof window&&"string"==typeof window.CMS_ENV&&t[window.CMS_ENV]){const e=Object.keys(t[window.CMS_ENV]);for(const r of e)t[r]=t[window.CMS_ENV][r]}return t}(await r.text())}(i,s),p=d()(c,e);!function(e){const t=new(y())({allErrors:!0,$data:!0,strict:!1});if((0,v.uniqueItemProperties)(t),(0,v.select)(t),(0,v.instanceof)(t),(0,v.prohibited)(t),w()(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"]},cms_label_prefix:{type:"string",minLength:1},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"]},allowed_hosts:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},locale:{type:"string",examples:["en","fr","de"]},i18n:R,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"},preview_path:{type:"string"},preview_path_date_field:{type:"string"},fields:I()},required:["name","label","file","fields"]},uniqueItemProperties:["name"]},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"},publish:{type:"boolean"},hide:{type:"boolean"},editor:{type:"object",properties:{preview:{type:"boolean"}}},format:{type:"string"},extension:{type:"string"},frontmatter_delimiter:{type:["string","array"],minItems:2,maxItems:2,items:{type:"string"}},fields:I(),sortable_fields:{type:"array",items:{type:"string"}},sortableFields:{type:"array",items:{type:"string"}},view_filters:D,view_groups:L,nested:{type:"object",properties:{depth:{type:"number",minimum:1,maximum:1e3},summary:{type:"string"}},required:["depth"]},meta:{type:"object",properties:{path:{type:"object",properties:{label:{type:"string"},widget:{type:"string"},index_file:{type:"string"}},required:["label","widget","index_file"]}},additionalProperties:!1,minProperties:1},i18n:A},required:["name","label"],oneOf:[{required:["files"]},{required:["folder","fields"]}],not:{required:["sortable_fields","sortableFields"]},if:{required:["extension"]},then:{if:{properties:{extension:{enum:Object.keys(_.rL)}}},else:{required:["format"]}},dependencies:{frontmatter_delimiter:{properties:{format:{enum:_.C$}},required:["format"]}}},uniqueItemProperties:["name"]},editor:{type:"object",properties:{preview:{type:"boolean"}}}},required:["backend","collections"],anyOf:[{required:["media_folder"]},{required:["media_library"]}]},e)){const e=t.errors.map((e=>{switch(e.keyword){case"uniqueItemProperties":{const t=e.instancePath||"";let r=e;return t.endsWith("/fields")?r=C(C({},e),{},{message:"fields names must be unique"}):t.endsWith("/files")?r=C(C({},e),{},{message:"files names must be unique"}):t.endsWith("/collections")&&(r=C(C({},e),{},{message:"collections names must be unique"})),r}case"instanceof":{const t=e.instancePath||"";let r=e;return/fields\/\d+\/pattern\/\d+/.test(t)&&(r=C(C({},e),{},{message:"must be a regular expression"})),r}default:return e}}));throw console.error("Config Errors",e),new $(e)}}(p);const m=function(e){const{collections:t=[]}=e,r=t.map((e=>{const{fields:t,files:r}=e;let n=e;if(t){const e=J(t,ee);n=H(H({},n),{},{fields:e})}if(r){const e=r.map((e=>{const t=J(e.fields,ee);return H(H({},e),{},{fields:t})}));n=H(H({},n),{},{files:e})}if(n.sortableFields){const{sortableFields:t}=n;n=H(H({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,W)),{},{sortable_fields:t}),console.warn(`Collection ${e.name} is using a deprecated configuration 'sortableFields'. Please use 'sortable_fields'`)}return n}));return H(H({},e),{},{collections:r})}(await async function(e){if(!e.local_backend)return e;const{proxyUrl:t,publish_modes:r,type:n}=await async function(e){if(!["localhost","127.0.0.1",..."boolean"==typeof e?[]:(null==e?void 0:e.allowed_hosts)||[]].includes(location.hostname)||!e)return{};const t="http://localhost:8081/api/v1",r=!0===e?t:e.url||t.replace("localhost",location.hostname);try{console.log(`Looking for Decap CMS Proxy Server at '${r}'`);const e=await fetch(`${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"info"})}),{repo:t,publish_modes:n,type:o}=await e.json();return"string"==typeof t&&Array.isArray(n)&&"string"==typeof o?(console.log(`Detected Decap CMS Proxy Server at '${r}' with repo: '${t}'`),{proxyUrl:r,publish_modes:n,type:o}):(console.log(`Decap CMS Proxy Server not detected at '${r}'`),{})}catch{return console.log(`Decap CMS Proxy Server not detected at '${r}'`),{}}}(e.local_backend);return t?(0,h.Uy)(e,(e=>{e.backend.name="proxy",e.backend.proxy_url=t,e.publish_mode&&(e.publish_mode=function(e,t,r){if(e.publish_mode&&t&&!t.includes(e.publish_mode)){const n=t[0];return console.log(`'${e.publish_mode}' is not supported by '${r}' backend, switching to '${n}'`),n}return e.publish_mode}(e,r,n))})):e}(p)),b=(n=m,(0,h.Uy)(n,(e=>{e.publish_mode=e.publish_mode||g.pt,e.slug=e.slug||{},e.collections=e.collections||[],!e.display_url&&e.site_url&&(e.display_url=e.site_url);const t=`/${l()(e.media_folder,"/")}`;"public_folder"in e||(e.public_folder=t),"encoding"in e.slug||(e.slug.encoding="unicode"),"clean_accents"in e.slug||(e.slug.clean_accents=!1),"sanitize_replacement"in e.slug||(e.slug.sanitize_replacement="-");const r=e[E.mb];r&&(r.default_locale=r.default_locale||r.locales[0]),ie(r);const n=(0,U.FO)(e);for(const t of e.collections){"publish"in t||(t.publish=!0);let o=t[E.mb];r&&o?(o=re(o,r),t[E.mb]=o):(o=void 0,delete t[E.mb]),t.fields&&(t.fields=ne(t.fields,Boolean(o)));const{folder:i,files:s,view_filters:c,view_groups:u,meta:p}=t;if(i&&(t.type=z.S,t.path&&!t.media_folder&&(t.media_folder=""),"media_folder"in t&&!("public_folder"in t)&&(t.public_folder=t.media_folder),t.fields&&(t.fields=J(t.fields,Q)),t.folder=a()(i,"/"),p&&p.path)){const e=H({name:"path",meta:!0,required:!0},p.path);t.fields=[e,...t.fields||[]]}if(s){t.type=z.h,oe(o),delete t.nested,delete t.meta;for(const e of s){e.file=l()(e.file,"/"),"media_folder"in e&&!("public_folder"in e)&&(e.public_folder=e.media_folder),e.fields&&(e.fields=J(e.fields,Q));let t=e[E.mb];t&&o?(t=re(t,o),e[E.mb]=t):(t=void 0,delete e[E.mb]),oe(t),e.fields&&(e.fields=ne(e.fields,Boolean(t)))}}t.sortable_fields||(t.sortable_fields=(0,F.Xd)((0,f.fromJS)(t),n,ae(e,t))),t.view_filters=(c||[]).map((e=>H(H({},e),{},{id:`${e.field}__${e.pattern}`}))),t.view_groups=(u||[]).map((e=>H(H({},e),{},{id:`${e.field}__${e.pattern}`}))),e.editor&&!t.editor&&(t.editor={preview:e.editor.preview})}})));r(se(b)),"function"==typeof t&&t()}catch(e){throw r(le(e)),e}var n}}},86384:(e,t,r)=>{"use strict";r.d(t,{CC:()=>l,ed:()=>u,s7:()=>s,vL:()=>a});var n=r(44905),o=r(93324),i=r(15967);const a="DEPLOY_PREVIEW_REQUEST",s="DEPLOY_PREVIEW_SUCCESS",l="DEPLOY_PREVIEW_FAILURE";function c(e,t){return{type:l,payload:{collection:e,slug:t}}}function u(e,t,r,l,u){return async(f,p)=>{const d=p(),h=(0,n.Rg)(d.config),g=e.get("name"),m=(0,o.Cz)(d,g,t);if(!m||!m.isFetching){f(function(e,t){return{type:a,payload:{collection:e,slug:t}}}(g,t));try{const n=l?h.getDeploy(e,t,r):await h.getDeployPreview(e,t,r,u);return f(n?function(e,t,r){const{url:n,status:o}=r;return{type:s,payload:{collection:e,slug:t,url:n,status:o}}}(g,t,n):c(g,t))}catch(e){console.error(e),f((0,i.wN)({message:{details:e.message,key:"ui.toast.onFailToLoadDeployPreview"},type:"error",dismissAfter:8e3})),f(c(g,t))}}}}},31464:(e,t,r)=>{"use strict";r.d(t,{AR:()=>E,J5:()=>b,JY:()=>W,Jv:()=>P,S0:()=>B,SX:()=>V,T3:()=>w,Ts:()=>H,Ty:()=>q,WS:()=>A,Wt:()=>O,Yh:()=>U,an:()=>S,dU:()=>k,ih:()=>j,lf:()=>v,qx:()=>x,r1:()=>I,tH:()=>z,xQ:()=>C,yH:()=>T,yJ:()=>R});var n=r(72579),o=r.n(n),i=r(34106),a=r(24688),s=r(44905),l=r(93324),c=r(98343),u=r(52588),f=r(69217),p=r(49469),d=r(93854),h=r(52977),g=r(76066),m=r(12318),y=r(15967);const v="UNPUBLISHED_ENTRY_REQUEST",b="UNPUBLISHED_ENTRY_SUCCESS",w="UNPUBLISHED_ENTRY_REDIRECT",S="UNPUBLISHED_ENTRIES_REQUEST",x="UNPUBLISHED_ENTRIES_SUCCESS",_="UNPUBLISHED_ENTRIES_FAILURE",O="UNPUBLISHED_ENTRY_PERSIST_REQUEST",E="UNPUBLISHED_ENTRY_PERSIST_SUCCESS",k="UNPUBLISHED_ENTRY_PERSIST_FAILURE",C="UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST",T="UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS",P="UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE",j="UNPUBLISHED_ENTRY_PUBLISH_REQUEST",R="UNPUBLISHED_ENTRY_PUBLISH_SUCCESS",A="UNPUBLISHED_ENTRY_PUBLISH_FAILURE",M="UNPUBLISHED_ENTRY_DELETE_REQUEST",I="UNPUBLISHED_ENTRY_DELETE_SUCCESS",D="UNPUBLISHED_ENTRY_DELETE_FAILURE";function L(e,t){return{type:x,payload:{entries:e,pages:t}}}function N(e,t){return{type:O,payload:{collection:e.get("name"),slug:t}}}function $(e,t){return{type:E,payload:{collection:e.get("name"),entry:t}}}function F(e,t,r){return{type:k,payload:{error:e,collection:t.get("name"),slug:r},error:e}}function B(e,t){return async(r,n)=>{const i=n(),l=(0,s.Rg)(i.config);if(!o()(i.editorialWorkflow.toJS(),"pages.ids",!1))try{const{entries:e,pagination:t}=await l.unpublishedEntries(i.collections);r(L(e,t))}catch(e){}r(function(e,t){return{type:v,payload:{collection:e.get("name"),slug:t}}}(e,t));try{const n=await l.unpublishedEntry(i,e,t),o=await Promise.all(n.mediaFiles.filter((e=>e.draft)).map((({url:e,file:t,path:r})=>(0,p.r)({path:r,url:e,file:t}))));r((0,d.q$)(o)),r(function(e,t){return{type:b,payload:{collection:e.get("name"),entry:t}}}(e,n)),r((0,f.at)(n))}catch(n){n.name===a.EDITORIAL_WORKFLOW_ERROR&&n.notUnderEditorialWorkflow?(r(function(e,t){return{type:w,payload:{collection:e.get("name"),slug:t}}}(e,t)),r((0,f.KS)(e,t))):r((0,y.wN)({message:{key:"ui.toast.onFailToLoadEntries",details:n},type:"error",dismissAfter:8e3}))}}}function U(e){return(t,r)=>{const n=r(),i=(0,s.Rg)(n.config),a=o()(n.editorialWorkflow.toJS(),"pages.ids",!1);n.config.publish_mode!==u.S0||a||(t({type:S}),i.unpublishedEntries(e).then((e=>t(L(e.entries,e.pagination)))).catch((e=>{t((0,y.wN)({message:{key:"ui.toast.onFailToLoadEntries",details:e},type:"error",dismissAfter:8e3})),t(function(e){return{type:_,error:"Failed to load entries",payload:e}}(e)),Promise.reject(e)})))}}function z(e,t){return async(r,n)=>{const i=n(),a=i.entryDraft,c=a.get("fieldsErrors"),u=(0,l.W5)(i,e.get("name")),p=(0,l.St)(i,e.get("name")).concat(u);if(!o()(i.editorialWorkflow.toJS(),"pages.ids",!1)&&r(U(i.collections)),!c.isEmpty())return c.some((e=>e.some((e=>e.type&&e.type===g.Z.PRESENCE))))&&r((0,y.wN)({message:{key:"ui.toast.missingRequiredField"},type:"error",dismissAfter:8e3})),Promise.reject();const d=(0,s.Rg)(i.config),h=a.get("entry"),v=(0,f.vp)({entry:h}),b=(0,f.GO)(e,h),w=a.set("entry",b);r(N(e,h.get("slug")));const S=t?d.persistUnpublishedEntry:d.persistEntry;try{const t=await S.call(d,{config:i.config,collection:e,entryDraft:w,assetProxies:v,usedSlugs:p});r((0,y.wN)({message:{key:"ui.toast.entrySaved"},type:"success",dismissAfter:4e3})),r($(e,b)),h.get("slug")!==t&&(r(B(e,t)),(0,m.GN)(e.get("name"),t))}catch(t){return r((0,y.wN)({message:{key:"ui.toast.onFailToPersist",details:t},type:"error",dismissAfter:8e3})),Promise.reject(r(F(t,e,h.get("slug"))))}}}function W(e,t,r,n){return(o,i)=>{if(r===n)return;const a=i(),l=(0,s.Rg)(a.config);o(function(e,t){return{type:C,payload:{collection:e,slug:t}}}(e,t)),l.updateUnpublishedEntryStatus(e,t,n).then((()=>{o((0,y.wN)({message:{key:"ui.toast.entryUpdated"},type:"success",dismissAfter:4e3})),o(function(e,t,r){return{type:T,payload:{collection:e,slug:t,newStatus:r}}}(e,t,n))})).catch((r=>{o((0,y.wN)({message:{key:"ui.toast.onFailToUpdateStatus",details:r},type:"error",dismissAfter:8e3})),o(function(e,t){return{type:P,payload:{collection:e,slug:t}}}(e,t))}))}}function q(e,t){return(r,n)=>{const o=n(),i=(0,s.Rg)(o.config);return r(function(e,t){return{type:M,payload:{collection:e,slug:t}}}(e,t)),i.deleteUnpublishedEntry(e,t).then((()=>{r((0,y.wN)({message:{key:"ui.toast.onDeleteUnpublishedChanges"},type:"success",dismissAfter:4e3})),r(function(e,t){return{type:I,payload:{collection:e,slug:t}}}(e,t))})).catch((n=>{r((0,y.wN)({message:{key:"ui.toast.onDeleteUnpublishedChanges",details:n},type:"error",dismissAfter:8e3})),r(function(e,t){return{type:D,payload:{collection:e,slug:t}}}(e,t))}))}}function H(e,t){return async(r,n)=>{const o=n(),i=o.collections,a=(0,s.Rg)(o.config),u=(0,l.Js)(o,e,t);r(function(e,t){return{type:j,payload:{collection:e,slug:t}}}(e,t));try{await a.publishUnpublishedEntry(u),r((0,h.pW)()),r((0,y.wN)({message:{key:"ui.toast.entryPublished"},type:"success",dismissAfter:4e3})),r(function(e,t){return{type:R,payload:{collection:e,slug:t}}}(e,t));const n=i.get(e);if(!n.has("nested"))return r((0,f.KS)(n,t));{r((0,f.Jw)(n));const e=(0,s.GB)(n,u.get("path"));(0,f.KS)(n,e),t!==e&&(0,c.s)(o.entryDraft)&&(0,m.GN)(n.get("name"),e)}}catch(n){r((0,y.wN)({message:{key:"ui.toast.onFailToPublishEntry",details:n},type:"error",dismissAfter:8e3})),r(function(e,t){return{type:A,payload:{collection:e,slug:t}}}(e,t))}}}function V(e,t){return(r,n)=>{const o=n(),a=(0,s.Rg)(o.config),c=(0,l.WK)(o,e.get("name"),t),p=(0,i.Map)().set("entry",c);return r(N(e,t)),a.deleteEntry(o,e,t).then((()=>a.persistEntry({config:o.config,collection:e,entryDraft:p,assetProxies:[],usedSlugs:(0,i.List)(),status:u.i7.get("PENDING_PUBLISH")}))).then((()=>{r($(e,c)),r((0,f.BF)(e,t)),r(B(e,t)),r((0,y.wN)({message:{key:"ui.toast.entryUnpublished"},type:"success",dismissAfter:4e3}))})).catch((t=>{r((0,y.wN)({message:{key:"ui.toast.onFailToUnpublishEntry",details:t},type:"error",dismissAfter:8e3})),r(F(t,e,c.get("slug")))}))}}},69217:(e,t,r)=>{"use strict";r.d(t,{RS:()=>le,ps:()=>ue,QX:()=>Y,t_:()=>Q,O9:()=>te,uM:()=>G,BK:()=>K,T8:()=>ee,r6:()=>Z,Un:()=>X,vY:()=>J,lW:()=>N,xw:()=>D,cT:()=>L,Dd:()=>ae,H1:()=>I,sn:()=>oe,Qm:()=>re,UY:()=>ne,qk:()=>A,zV:()=>M,Mw:()=>W,yZ:()=>U,iw:()=>z,LF:()=>V,QS:()=>q,w5:()=>H,QF:()=>ce,Hq:()=>B,S$:()=>$,Hb:()=>F,Kv:()=>ke,tw:()=>xe,QM:()=>_e,pK:()=>ve,Lf:()=>Oe,ED:()=>Pe,at:()=>we,lK:()=>$e,pO:()=>We,$G:()=>Re,vQ:()=>Se,BF:()=>be,wu:()=>me,vp:()=>Be,GO:()=>Ue,YU:()=>ye,Jw:()=>Le,KS:()=>Ae,SG:()=>Ee,G4:()=>ze,q9:()=>Te,HG:()=>Ce,RO:()=>je,L1:()=>ge,$L:()=>Ne,T0:()=>Me,f2:()=>He});var n=r(18149),o=r.n(n),i=r(34106),a=r(24688),s=r(31620),l=r(14093),c=r(93324),u=r(26969),f=r(44905),p=r(1842),d=r.n(p),h=r(19619);function g(e,t,r){let n=t.reduce(((t,n)=>{const o=n.get("name"),a=e.get(o),s=(0,h.pS)(n.get("widget")),l=n.get("fields");return l&&i.List.isList(a)?t.set(o,a.map((e=>g(e,l,r)))):l&&i.Map.isMap(a)?t.set(o,g(a,l,r)):s&&!d()(a)?t.set(o,s[r](a)):d()(a)?t:t.set(o,a)}),(0,i.Map)());return n=e.mergeDeep(n),n}var m=r(19445),y=r(49469),v=r(76066),b=r(93854),w=r(38793),S=r(52977),x=r(22612),_=r(98343),O=r(49971),E=r(12318),k=r(11040),C=r(2995),T=r(15967);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const A="ENTRY_REQUEST",M="ENTRY_SUCCESS",I="ENTRY_FAILURE",D="ENTRIES_REQUEST",L="ENTRIES_SUCCESS",N="ENTRIES_FAILURE",$="SORT_ENTRIES_REQUEST",F="SORT_ENTRIES_SUCCESS",B="SORT_ENTRIES_FAILURE",U="FILTER_ENTRIES_REQUEST",z="FILTER_ENTRIES_SUCCESS",W="FILTER_ENTRIES_FAILURE",q="GROUP_ENTRIES_REQUEST",H="GROUP_ENTRIES_SUCCESS",V="GROUP_ENTRIES_FAILURE",K="DRAFT_CREATE_FROM_ENTRY",G="DRAFT_CREATE_EMPTY",Z="DRAFT_DISCARD",Y="DRAFT_CHANGE_FIELD",J="DRAFT_VALIDATION_ERRORS",Q="DRAFT_CLEAR_ERRORS",X="DRAFT_LOCAL_BACKUP_RETRIEVED",ee="DRAFT_CREATE_FROM_LOCAL_BACKUP",te="DRAFT_CREATE_DUPLICATE_FROM_ENTRY",re="ENTRY_PERSIST_REQUEST",ne="ENTRY_PERSIST_SUCCESS",oe="ENTRY_PERSIST_FAILURE",ie="ENTRY_DELETE_REQUEST",ae="ENTRY_DELETE_SUCCESS",se="ENTRY_DELETE_FAILURE",le="ADD_DRAFT_ENTRY_MEDIA_FILE",ce="REMOVE_DRAFT_ENTRY_MEDIA_FILE",ue="CHANGE_VIEW_STYLE";function fe(e){return{type:D,payload:{collection:e.get("name")}}}function pe(e,t,r,n,o=!0){return{type:L,payload:{collection:e.get("name"),entries:t,page:r,cursor:a.Cursor.create(n),append:o}}}function de(e,t){return{type:N,error:"Failed to load entries",payload:t.toString(),meta:{collection:e.get("name")}}}async function he(e,t){const r=(0,f.Rg)(e.config),n=(0,c._5)(e,t.get("name"),"listEntries"),o=n?(0,u.B)(e.integrations,r.getToken,n):r;return await o.listAllEntries(t)}function ge(e,t,r=w.S.Ascending){return async(n,o)=>{const i=o(),a=(0,_.pT)(i.entries,e.get("name"));if(n({type:$,payload:{collection:e.get("name"),key:t,direction:r}}),!a)try{const o=await he(i,e);n({type:F,payload:{collection:e.get("name"),key:t,direction:r,entries:o}})}catch(o){n({type:B,payload:{collection:e.get("name"),key:t,direction:r,error:o}})}}}function me(e,t){return async(r,n)=>{const o=n(),i=(0,_.pT)(o.entries,e.get("name"));if(r({type:U,payload:{collection:e.get("name"),filter:t}}),!i)try{const n=await he(o,e);r({type:z,payload:{collection:e.get("name"),filter:t,entries:n}})}catch(n){r({type:W,payload:{collection:e.get("name"),filter:t,error:n}})}}}function ye(e,t){return async(r,n)=>{const o=n(),i=(0,_.pT)(o.entries,e.get("name"));if(r({type:q,payload:{collection:e.get("name"),group:t}}),!i)try{const n=await he(o,e);r({type:H,payload:{collection:e.get("name"),group:t,entries:n}})}catch(n){r({type:V,payload:{collection:e.get("name"),group:t,error:n}})}}}function ve(e){return{type:ue,payload:{style:e}}}function be(e,t){return{type:ae,payload:{collectionName:e.get("name"),entrySlug:t}}}function we(e){return{type:K,payload:{entry:e}}}function Se(){return{type:Z}}function xe({field:e,value:t,metadata:r,entries:n,i18n:o}){return{type:Y,payload:{field:e,value:t,metadata:r,entries:n,i18n:o}}}function _e(e,t){return{type:J,payload:{uniquefieldId:e,errors:t}}}function Oe(){return{type:Q}}function Ee(){return{type:ee}}function ke(e){return{type:le,payload:e}}function Ce({id:e}){return{type:ce,payload:{id:e}}}function Te(e,t){return(r,n)=>{const o=n();return(0,f.Rg)(o.config).persistLocalDraftBackup(e,t)}}function Pe(e){return t=>{t((0,x.A)({predicate:({type:e})=>e===G,run:()=>t(function(e){return{type:te,payload:(0,m.Y)(e.get("collection"),"","",{data:e.get("data"),mediaFiles:e.get("mediaFiles").toJS()})}}(e))}))}}function je(e,t){return async(r,n)=>{const o=n(),a=(0,f.Rg)(o.config),{entry:s}=await a.getLocalDraftBackup(e,t);if(s){const t=s.mediaFiles||[],o=await Promise.all(t.map((t=>t.file||t.url?(0,y.r)({path:t.path,file:t.file,url:t.url,field:t.field}):(0,b.Nh)({collection:e,entry:(0,i.fromJS)(s),path:t.path,field:t.field})(r,n))));return r((0,b.q$)(o)),r(function(e){return{type:X,payload:{entry:e}}}(s))}}}function Re(e,t){return(r,n)=>{const o=n();return(0,f.Rg)(o.config).deleteLocalDraftBackup(e,t)}}function Ae(e,t){return async(r,n)=>{await(0,S.yV)(r,n()),r(function(e,t){return{type:A,payload:{collection:e.get("name"),slug:t}}}(e,t));try{const o=await Me(n(),e,t);r(function(e,t){return{type:M,payload:{collection:e.get("name"),entry:t}}}(e,o)),r(we(o))}catch(n){r((0,T.wN)({message:{details:n.message,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),r(function(e,t,r){return{type:I,payload:{error:e,collection:t.get("name"),slug:r}}}(n,e,t))}}}async function Me(e,t,r){const n=(0,f.Rg)(e.config);return await n.getEntry(e,t,r)}const Ie=(0,i.fromJS)({append_next:{action:"next",append:!0}});function De(e){return a.Cursor.create(e).updateStore("actions",(e=>e.union(Ie.filter((t=>e.has(t.get("action")))).keySeq())))}function Le(e,t=0){return async(r,n)=>{if(e.get("isFetching"))return;const o=n(),i=(0,_.mF)(o.entries,e.get("name"));if(i&&i.length>0){const t=i[0];return r(ge(e,t.get("key"),t.get("direction")))}const s=(0,f.Rg)(o.config),l=(0,c._5)(o,e.get("name"),"listEntries"),p=l?(0,u.B)(o.integrations,s.getToken,l):s,d=!!(t&&!isNaN(t)&&t>0);r(fe(e));try{const n=e.has("nested")||(0,C.nR)(e);let o=await(n?p.listAllEntries(e).then((e=>({entries:e}))):p.listEntries(e,t));o=j(j({},o),{},{cursor:l?a.Cursor.create({actions:["next"],meta:{usingOldPaginationAPI:!0},data:{nextPage:t+1}}):a.Cursor.create(o.cursor)}),r(pe(e,o.cursor.meta.get("usingOldPaginationAPI")?o.entries.reverse():o.entries,o.pagination,De(o.cursor),d))}catch(t){return r((0,T.wN)({message:{details:t,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),Promise.reject(r(de(e,t)))}}}function Ne(e,t){return async(r,n)=>{const o=n(),i=e.get("name");if(o.entries.getIn(["pages",`${i}`,"isFetching"]))return;const a=(0,f.Rg)(o.config),{action:l,append:c}=Ie.has(t)?Ie.get(t).toJS():{action:t,append:!1},u=(0,s.k)(o.cursors,e.get("name"));if(u.meta.get("usingOldPaginationAPI",!1))return r(Le(e,u.data.get("nextPage")));try{var p;r(fe(e));const{entries:t,cursor:n}=await function(e,t,r){if(!t.actions.has(r))throw new Error(`The current cursor does not support the pagination action "${r}".`);return e.traverseCursor(t,r)}(a,u,l),o=null===(p=n.meta)||void 0===p?void 0:p.get("page");return r(pe(e,t,o,De(n),c))}catch(t){return console.error(t),r((0,T.wN)({message:{details:t,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),Promise.reject(r(de(e,t)))}}}function $e(e,t){return async(r,n)=>{new URLSearchParams(t).forEach(((t,r)=>{e=(0,l.BP)(e,r,(e=>{return e.set("default",!!["true","True","TRUE"].includes(r=t)||!["false","False","FALSE"].includes(r)&&function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(r));var r}))}));const o=e.get("fields",(0,i.List)()),a=function(e){return e.filter((e=>!e.get("meta"))).toList()}(o),s=Fe(a),c=function(e){return e.filter((e=>!0===e.get("meta"))).toList()}(o),u=Fe(c),p=n(),d=(0,f.Rg)(p.config);e.has("media_folder")||await(0,S.yV)(r,n());const h=function(e,t){if(!(0,C.nR)(e))return{};const r=Fe(t,(function(e){return e.get(C.mb)!==C.JD.DUPLICATE&&e.get(C.mb)!==C.JD.TRANSLATE}));return(0,C.wC)(e,r)}(e,a);let g=(0,m.Y)(e.get("name"),"","",{data:s,i18n:h,mediaFiles:[],meta:u});g=await d.processEntry(p,e,g),r({type:G,payload:g})}}function Fe(e,t=(()=>!1)){return e.reduce(((e,r)=>{const n=e,a=r;if(t(a))return n;const s=a.get("field")||a.get("fields"),l="list"==a.get("widget"),c=a.get("name"),u=a.get("default",null);if(i.List.isList(s)||i.Map.isMap(s)){if(l&&i.List.isList(u))n[c]=u;else{const e=i.List.isList(s)?s:(0,i.List)([s]),r=l?[Fe(e,t)]:Fe(e,t);f=r,[[{}],{}].some((e=>o()(f,e)))||(n[c]=r)}return n}var f;return null!==u&&(n[c]=u),n}),{})}function Be({entry:e}){return e.get("mediaFiles").toArray().filter((e=>e.get("draft"))).map((e=>(0,y.r)({path:e.get("path"),file:e.get("file"),url:e.get("url"),field:e.get("field")})))}function Ue(e,t){const r=(0,l.LY)(e,t.get("slug"));function n(e){return function(e,t){return g(e,t,"serialize")}(e,r)}const o=n(t.get("data"));let i=t.set("data",o);return(0,C.nR)(e)&&(i=(0,C.ci)(e,i,n)),i}function ze(e){return async(t,r)=>{const n=r(),o=n.entryDraft,i=o.get("fieldsErrors"),a=(0,c.St)(n,e.get("name"));if(!i.isEmpty())return i.some((e=>e.some((e=>e.type&&e.type===v.Z.PRESENCE))))&&t((0,T.wN)({message:{key:"ui.toast.missingRequiredField"},type:"error",dismissAfter:8e3})),Promise.reject();const s=(0,f.Rg)(n.config),l=o.get("entry"),u=Be({entry:l}),p=Ue(e,l),d=o.set("entry",p);return t(function(e,t){return{type:re,payload:{collectionName:e.get("name"),entrySlug:t.get("slug")}}}(e,p)),s.persistEntry({config:n.config,collection:e,entryDraft:d,assetProxies:u,usedSlugs:a}).then((async r=>{t((0,T.wN)({message:{key:"ui.toast.entrySaved"},type:"success",dismissAfter:4e3})),u.length>0&&await t((0,S.pW)()),t(function(e,t,r){return{type:ne,payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),slug:r}}}(e,p,r)),e.has("nested")&&await t(Le(e)),l.get("slug")!==r&&(await t(Ae(e,r)),(0,E.GN)(e.get("name"),r))})).catch((r=>(console.error(r),t((0,T.wN)({message:{details:r,key:"ui.toast.onFailToPersist"},type:"error",dismissAfter:8e3})),Promise.reject(t(function(e,t,r){return{type:oe,error:"Failed to persist entry",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),error:r.toString()}}}(e,p,r))))))}}function We(e,t){return(r,n)=>{const o=n(),i=(0,f.Rg)(o.config);return r(function(e,t){return{type:ie,payload:{collectionName:e.get("name"),entrySlug:t}}}(e,t)),i.deleteEntry(o,e,t).then((()=>r(be(e,t)))).catch((n=>(r((0,T.wN)({message:{details:n,key:"ui.toast.onFailToDelete"},type:"error",dismissAfter:8e3})),console.error(n),Promise.reject(r(function(e,t,r){return{type:se,payload:{collectionName:e.get("name"),entrySlug:t,error:r.toString()}}}(e,t,n))))))}}function qe(e,t,r){return{error:{type:v.Z.CUSTOM,message:r(`editor.editorControlPane.widget.${t}`,{path:e})}}}function He(e,t,r,n,o){if(r.get("meta")&&"path"===r.get("name")){var a;if(!n)return qe(n,"invalidPath",o);const r=n.split("/").map((0,k.aX)(e.config.slug)).join("/");if(n!==r)return qe(n,"invalidPath",o);const s=(0,O.x)(t,(0,i.fromJS)({entry:{meta:{path:n}}})),l=s?(0,_.sD)(e.entries,t.get("name"),s):void 0,c=null==l?void 0:l.get("path"),u=null===(a=e.entryDraft)||void 0===a?void 0:a.getIn(["entry","path"]);if(c&&c!==u)return qe(n,"pathExists",o)}return{error:!1}}},93854:(e,t,r)=>{"use strict";r.d(t,{FG:()=>d,LX:()=>p,Nh:()=>b,RL:()=>c,WF:()=>m,ZJ:()=>g,_W:()=>l,cq:()=>u,pY:()=>f,q$:()=>h,zg:()=>v});var n=r(24688),o=r(49469),i=r(98343),a=r(90737),s=r(52977);const l="ADD_ASSETS",c="ADD_ASSET",u="REMOVE_ASSET",f="LOAD_ASSET_REQUEST",p="LOAD_ASSET_SUCCESS",d="LOAD_ASSET_FAILURE";function h(e){return{type:l,payload:e}}function g(e){return{type:c,payload:e}}function m(e){return{type:u,payload:e}}const y=(0,o.r)({path:"empty.svg",file:new File(['<svg xmlns="http://www.w3.org/2000/svg"></svg>'],"empty.svg",{type:"image/svg+xml"})});function v(e,t,r){return function(n,o){return e(b({collection:t,entry:r,path:n,field:o}))}}function b({collection:e,entry:t,path:r,field:l}){return(c,u)=>{if(!r)return y;const h=u(),m=(0,i.$C)(h.config,e,t,r,l);let{asset:v,isLoading:b,error:w}=h.medias[m]||{};return b?y:v||((0,n.isAbsolutePath)(m)||w?(v=(0,o.r)({path:m,url:r}),c(g(v))):(c(function(e){return async(t,r)=>{try{t({type:f,payload:{path:e}}),await(0,s.yV)(t,r());const n=(0,a.cK)(r(),e);if(n){const i=await(0,s.Gv)(t,r(),n);t(g((0,o.r)({path:e,url:i||e})))}else{const{url:n}=await(0,s.LA)(r(),e);t(g((0,o.r)({path:e,url:n})))}t({type:p,payload:{path:e}})}catch(r){t(function(e,t){return{type:d,payload:{path:e,error:t}}}(e,r))}}}(m)),v=y),v)}}},52977:(e,t,r)=>{"use strict";r.d(t,{$A:()=>G,$E:()=>z,$g:()=>E,BZ:()=>H,C9:()=>U,D6:()=>w,Ge:()=>x,Gv:()=>oe,H$:()=>C,K6:()=>N,Ke:()=>j,LA:()=>K,RF:()=>L,St:()=>A,UN:()=>F,Y6:()=>P,eT:()=>b,en:()=>S,fq:()=>I,h6:()=>V,ko:()=>B,ky:()=>k,lk:()=>R,pQ:()=>T,pW:()=>W,qV:()=>_,qb:()=>$,tV:()=>D,xZ:()=>M,yV:()=>ne,yv:()=>O});var n=r(34106),o=r(24688),i=r(44905),a=r(49469),s=r(93324),l=r(98343),c=r(90737),u=r(26969),f=r(93854),p=r(69217),d=r(56079),h=r(22612),g=r(15967);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b="MEDIA_LIBRARY_OPEN",w="MEDIA_LIBRARY_CLOSE",S="MEDIA_LIBRARY_CREATE",x="MEDIA_INSERT",_="MEDIA_REMOVE_INSERTED",O="MEDIA_LOAD_REQUEST",E="MEDIA_LOAD_SUCCESS",k="MEDIA_LOAD_FAILURE",C="MEDIA_PERSIST_REQUEST",T="MEDIA_PERSIST_SUCCESS",P="MEDIA_PERSIST_FAILURE",j="MEDIA_DELETE_REQUEST",R="MEDIA_DELETE_SUCCESS",A="MEDIA_DELETE_FAILURE",M="MEDIA_DISPLAY_URL_REQUEST",I="MEDIA_DISPLAY_URL_SUCCESS",D="MEDIA_DISPLAY_URL_FAILURE";function L(e){const t={show:e.show||(()=>{}),hide:e.hide||(()=>{}),onClearControl:e.onClearControl||(()=>{}),onRemoveControl:e.onRemoveControl||(()=>{}),enableStandalone:e.enableStandalone||(()=>{})};return{type:S,payload:t}}function N(e){return(t,r)=>{const n=r().mediaLibrary.get("externalLibrary");n&&n.onClearControl({id:e})}}function $(e){return(t,r)=>{const n=r().mediaLibrary.get("externalLibrary");n&&n.onRemoveControl({id:e})}}function F(e={}){return(t,r)=>{const o=r().mediaLibrary.get("externalLibrary");if(o){const{controlID:t,value:r,config:i=(0,n.Map)(),allowMultiple:a,forImage:s}=e;o.show({id:t,value:r,config:i.toJS(),allowMultiple:a,imagesOnly:s})}t(function(e){return{type:b,payload:e}}(e))}}function B(){return(e,t)=>{const r=t().mediaLibrary.get("externalLibrary");r&&r.hide(),e({type:w})}}function U(e,t){return(r,n)=>{const o=n(),i=o.config,a=o.entryDraft.get("entry"),s=o.entryDraft.getIn(["entry","collection"]),c=o.collections.get(s);r(function(e){return{type:x,payload:{mediaPath:e}}}(e=Array.isArray(e)?e.map((e=>(0,l.sm)(i,c,e,a,t))):(0,l.sm)(i,c,e,a,t)))}}function z(e){return{type:_,payload:{controlID:e}}}function W(e={}){const{delay:t=0,query:r="",page:n=1,privateUpload:o}=e;return async(e,a)=>{const l=a(),c=(0,i.Rg)(l.config),f=(0,s._5)(l,null,"assetStore");if(f){const t=(0,u.B)(l.integrations,c.getToken,f);e(Z(n));try{const i=await t.retrieve(r,n,o);return e(Y(i,{page:n,canPaginate:!0,dynamicSearch:!0,dynamicSearchQuery:r,privateUpload:o}))}catch(t){return e(J({privateUpload:o}))}}function p(){return c.getMedia().then((t=>e(Y(t)))).catch((t=>{console.error(t),404===t.status?(console.log("This 404 was expected and handled appropriately."),e(Y([]))):e(J())}))}return e(Z(n)),t>0?new Promise((e=>{setTimeout((()=>e(p())),t)})):p()}}function q({id:e,file:t,assetProxy:r,draft:n}){return{id:e,name:(0,o.basename)(r.path),displayURL:r.url,draft:n,file:t,size:t.size,url:r.url,path:r.path,field:r.field}}function H(e,t={}){const{privateUpload:r,field:n}=t;return async(t,h)=>{const m=h(),y=(0,i.Rg)(m.config),v=(0,s._5)(m,null,"assetStore"),b=(0,c.x5)(m,n),w=(0,d.Ql)(e.name.toLowerCase(),m.config.slug),S=b.find((e=>e.name.toLowerCase()===w)),x=(0,l.s)(m.entryDraft);if(!v&&S){if(!window.confirm(`${S.name} already exists. Do you want to replace it?`))return;await t(V(S,{privateUpload:r}))}!v&&x||t({type:C});try{let i,s;if(v)try{const t=(0,u.B)(m.integrations,y.getToken,v),n=await t.upload(e,r);i=(0,a.r)({url:n.asset.url,path:n.asset.url})}catch(t){i=(0,a.r)({file:e,path:w})}else{if(r)throw new Error("The Private Upload option is only available for Asset Store Integration");{const t=m.entryDraft.get("entry"),r=m.collections.get(null==t?void 0:t.get("collection")),o=(0,l.$C)(m.config,r,t,w,n);i=(0,a.r)({file:e,path:o,field:n})}}if(t((0,f.ZJ)(i)),v)s=q({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:!1});else{if(x)return s=q({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:x}),t((0,p.Kv)(s));s=await y.persistMedia(m.config,i)}return t(function(e,t={}){const{privateUpload:r}=t;return{type:T,payload:{file:e,privateUpload:r}}}(s,{privateUpload:r}))}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to persist media: ${e}`,type:"error",dismissAfter:8e3})),t(function(e={}){const{privateUpload:t}=e;return{type:P,payload:{privateUpload:t}}}({privateUpload:r}))}}}function V(e,t={}){const{privateUpload:r}=t;return async(t,n)=>{const o=n(),a=(0,i.Rg)(o.config),c=(0,s._5)(o,null,"assetStore");if(c){const n=(0,u.B)(o.integrations,a.getToken,c);t(Q());try{return await n.delete(e.id),t(X(e,{privateUpload:r}))}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to delete media: ${e.message}`,type:"error",dismissAfter:8e3})),t(ee({privateUpload:r}))}}try{if(e.draft)t((0,f.WF)(e.path)),t((0,p.HG)({id:e.id}));else{const r=(0,l.s)(o.entryDraft);t(Q()),t((0,f.WF)(e.path)),await a.deleteMedia(o.config,e.path),t(X(e)),r&&t((0,p.HG)({id:e.id}))}}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to delete media: ${e.message}`,type:"error",dismissAfter:8e3})),t(ee())}}}async function K(e,t){const r=(0,i.Rg)(e.config),{url:n}=await r.getMediaFile(t);return{url:n}}function G(e){return async(t,r)=>{const{displayURL:n,id:o}=e,a=r(),s=(0,c.ag)(a,o);if(!o||!n||s.get("url")||s.get("isFetching")||s.get("err"))return Promise.resolve();if("string"==typeof n)return t(te(o)),void t(re(o,n));try{const e=(0,i.Rg)(a.config);t(te(o));const r=await e.getMediaDisplayURL(n);if(!r)throw new Error("No display URL was returned!");t(re(o,r))}catch(e){console.error(e),t(function(e,t){return{type:D,payload:{key:e,err:t}}}(o,e))}}}function Z(e){return{type:O,payload:{page:e}}}function Y(e,t={}){return{type:E,payload:y({files:e},t)}}function J(e={}){const{privateUpload:t}=e;return{type:k,payload:{privateUpload:t}}}function Q(){return{type:j}}function X(e,t={}){const{privateUpload:r}=t;return{type:R,payload:{file:e,privateUpload:r}}}function ee(e={}){const{privateUpload:t}=e;return{type:A,payload:{privateUpload:t}}}function te(e){return{type:M,payload:{key:e}}}function re(e,t){return{type:I,payload:{key:e,url:t}}}async function ne(e,t){!1===t.mediaLibrary.get("isLoading")||t.mediaLibrary.get("externalLibrary")||await(0,h.R)(e,(e=>({predicate:({type:e})=>e===E||e===k,run:()=>e()})))}async function oe(e,t,r){const n=(0,c.ag)(t,r.id);let o;if(n.get("url"))o=n.get("url");else if(n.get("err"))o=null;else{var i;const t=r.id,a=(0,h.R)(e,(e=>({predicate:({type:e,payload:r})=>(e===I||e===D)&&r.key===t,run:(t,r,n)=>e(n.payload.url)})));n.get("isFetching")||e(G(r)),o=null!==(i=await a)&&void 0!==i?i:null}return o}},15967:(e,t,r)=>{"use strict";r.d(t,{JF:()=>n,L1:()=>l,N5:()=>s,UW:()=>o,WR:()=>i,wN:()=>a});const n="NOTIFICATION_SEND",o="NOTIFICATION_DISMISS",i="NOTIFICATION_CLEAR";function a(e){return{type:n,payload:e}}function s(e){return{type:o,id:e}}function l(){return{type:i}}},57655:(e,t,r)=>{"use strict";r.d(t,{$h:()=>d,AQ:()=>g,B:()=>h,IF:()=>p,IO:()=>y,M$:()=>l,Pu:()=>m,Qq:()=>u,gQ:()=>c,o8:()=>f});var n=r(18149),o=r.n(n),i=r(44905),a=r(26969),s=r(93324);const l="SEARCH_ENTRIES_REQUEST",c="SEARCH_ENTRIES_SUCCESS",u="SEARCH_ENTRIES_FAILURE",f="QUERY_REQUEST",p="QUERY_SUCCESS",d="QUERY_FAILURE",h="SEARCH_CLEAR";function g(){return{type:h}}function m(e,t,r=0){return async(n,f)=>{const p=f(),{search:d}=p,h=(0,i.Rg)(p.config),g=t||p.collections.keySeq().toArray(),m=g.filter((e=>(0,s._5)(p,e,"search"))),y=(0,s._5)(p,m[0],"search");if(d.isFetching&&d.term===e&&o()(g,d.collections)&&(d.page===r||!y))return;n(function(e,t,r){return{type:l,payload:{searchTerm:e,searchCollections:t,page:r}}}(e,g,r));const v=y?(0,a.B)(p.integrations,h.getToken,y).search(m,e,r):h.search(p.collections.filter(((e,t)=>-1!==g.indexOf(t))).valueSeq().toArray(),e);try{const e=await v;return n(function(e,t){return{type:c,payload:{entries:e,page:t}}}(e.entries,e.pagination))}catch(e){return n(function(e){return{type:u,payload:{error:e}}}(e))}}}function y(e,t,r,n,o,l){return async(c,u)=>{c(function(e){return{type:f,payload:{searchTerm:e}}}(n));const h=u(),g=(0,i.Rg)(h.config),m=(0,s._5)(h,t,"search"),y=h.collections.find((e=>e.get("name")===t)),v=m?(0,a.B)(h.integrations,g.getToken,m).searchBy(r.map((e=>`data.${e}`)),t,n):g.query(y,r,n,o,l);try{const t=await v;return c(function(e,t){return{type:p,payload:{namespace:e,hits:t}}}(e,t.hits))}catch(e){return c(function(e){return{type:d,payload:{error:e}}}(e))}}}},92699:(e,t,r)=>{"use strict";r.d(t,{BA:()=>i,Md:()=>s,oj:()=>c,zv:()=>a});var n=r(44905),o=r(15967);const i="STATUS_REQUEST",a="STATUS_SUCCESS",s="STATUS_FAILURE";function l(e){return{type:a,payload:{status:e}}}function c(){return async(e,t)=>{try{const r=t();if(r.status.isFetching)return;e({type:i});const a=(0,n.Rg)(r.config),s=await a.status(),c="ui.toast.onBackendDown",u=r.notifications.notifications.filter((e=>{var t;return"string"!=typeof e.message&&(null===(t=e.message)||void 0===t?void 0:t.key)===c}));if(!1===s.api.status)return 0===u.length&&e((0,o.wN)({message:{details:s.api.statusPage,key:"ui.toast.onBackendDown"},type:"error"})),e(l(s));if(!0===s.api.status&&u.length>0&&u.forEach((t=>{e((0,o.N5)(t.id))})),!1===s.auth.status){const t="ui.toast.onLoggedOut";r.notifications.notifications.find((e=>{var r;return"string"!=typeof e.message&&(null===(r=e.message)||void 0===r?void 0:r.key)===t}))||e((0,o.wN)({message:{key:"ui.toast.onLoggedOut"},type:"error"}))}e(l(s))}catch(t){e(function(e){return{type:s,payload:{error:e}}}(t))}}}},22612:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,R:()=>i});var n=r(15161);function o({predicate:e,run:t}){return{type:n.w,predicate:e,run:t}}async function i(e,t,r=3e4){let n=!1;const i=new Promise((r=>{e(o(t(r)))})),a=new Promise((e=>{setTimeout((()=>{n?e():(console.warn("Wait Action timed out"),e(null))}),r)}));return await Promise.race([i.then((e=>(n=!0,e))).catch(null),a])}},44905:(e,t,r)=>{"use strict";r.d(t,{FO:()=>X,GB:()=>Z,Rg:()=>ee});var n=r(16765),o=r.n(n),i=r(72579),a=r.n(i),s=r(829),l=r.n(s),c=r(5648),u=r.n(c),f=r(75652),p=r.n(f),d=r(85121),h=r.n(d),g=r(35676),m=r.n(g),y=r(55027),v=r.n(y),b=r(34106),w=r(14478),S=r(24688),x=r(21023),_=r(75976),O=r(76221),E=r(86402),k=r(98343),C=r(75863),T=r(14093),P=r(19445),j=r(56079),R=r(19619),A=r(11040),M=r(52588),I=r(72431),D=r(49971),L=r(2995);const N=["field"];function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{extractTemplateVars:U,dateParsers:z,expandPath:W}=_.stringTemplate;class q{constructor(){B(this,"storageKey","decap-cms-user")}retrieve(){const e=window.localStorage.getItem(this.storageKey);return e&&JSON.parse(e)}store(e){window.localStorage.setItem(this.storageKey,JSON.stringify(e))}logout(){window.localStorage.removeItem(this.storageKey)}}function H(e,t){const r="backup";return e?`${r}.${e}${t?`.${t}`:""}`:r}function V(e,t){const r=a()(t.data,e);if(r)return String(r);{const r=e.split(".")[0];return t[r]?t[r]:""}}function K(e){return t=>e.reduce(((e,r)=>{const n=V(r,t);return n?`${e} ${n}`:e}),"")}function G(e,t){return e.score>t.score?-1:e.score<t.score?1:0}function Z(e,t){const r=e.get("folder",""),n=t.toLowerCase().replace(r.toLowerCase(),"");return(0,x.join)((0,x.dirname)(u()(n,"/")),(0,x.basename)(n,(0,x.extname)(t)))}function Y(e,t){return(0,T.XP)(t)?(0,x.dirname)(e).slice(t.get("folder").length+1)||"/":e}function J(e){var t;let r;return r=(null===(t=e.get("nested"))||void 0===t?void 0:t.get("depth"))||(0,S.getPathDepth)(e.get("path","")),(0,L.nR)(e)&&(r=(0,L.Sw)(e,r)),r}class Q{constructor(e,{backendName:t,authStore:r,config:n}){if(B(this,"implementation",void 0),B(this,"backendName",void 0),B(this,"config",void 0),B(this,"authStore",void 0),B(this,"user",void 0),B(this,"backupSync",void 0),B(this,"updateUserCredentials",(e=>{const t=this.authStore.retrieve();if(t&&t.backendName===this.backendName)return this.user=F(F({},t),e),this.authStore.store(this.user),this.user})),B(this,"getToken",(()=>this.implementation.getToken())),this.deleteAnonymousBackup(),this.config=n,this.implementation=e.init(this.config,{useWorkflow:(0,E.Ii)(this.config),updateUserCredentials:this.updateUserCredentials,initialWorkflowStatus:M.i7.first()}),this.backendName=t,this.authStore=r,null===this.implementation)throw new Error("Cannot instantiate a Backend with no implementation");this.backupSync=(0,S.asyncLock)()}async status(){let e={auth:{status:!0},api:{status:!0,statusPage:""}};for(let t=1;t<=3;t++){if(e=await this.implementation.status(),Object.values(e).every((e=>!0===e.status)))return e;await new Promise((e=>setTimeout(e,1e3*t)))}return e}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=F(F({},e),{},{backendName:this.backendName}),this.authStore.store(this.user),this.user))):Promise.resolve(null)}isGitBackend(){var e,t;return(null===(e=(t=this.implementation).isGitBackend)||void 0===e?void 0:e.call(t))||!1}authComponent(){return this.implementation.authComponent()}authenticate(e){return this.implementation.authenticate(e).then((e=>(this.user=F(F({},e),{},{backendName:this.backendName}),this.authStore&&this.authStore.store(this.user),this.user)))}async logout(){try{await this.implementation.logout()}catch(e){console.warn("Error during logout",e.message)}finally{this.user=null,this.authStore&&this.authStore.logout()}}async entryExist(e,t,r,n){const o=n&&await this.implementation.unpublishedEntry({collection:e.get("name"),slug:r}).catch((e=>e.name===S.EDITORIAL_WORKFLOW_ERROR&&e.notUnderEditorialWorkflow?Promise.resolve(!1):Promise.reject(e)));return o||await this.implementation.getEntry(t).then((({data:e})=>e)).catch((()=>Promise.resolve(!1)))}async generateUniqueSlug(e,t,r,n,o){const i=r.slug;let a;a=o?Z(e,o):(0,A.wK)(e,t,i);let s=1,l=a;for(;n.includes(l)||await this.entryExist(e,(0,T.VD)(e,l),l,(0,E.Ii)(r));)l=`${a}${(0,j.KI)(" ",i)}${s++}`;return l}processEntries(e,t){const r=e.map((e=>(0,P.Y)(t.get("name"),(0,T.g_)(t,e.file.path),e.file.path,{raw:e.data||"",label:e.file.label,author:e.file.author,updatedOn:e.file.updatedOn,meta:{path:Y(e.file.path,t)}}))).map(this.entryWithFormat(t)),n=t.get("filter"),o=n?this.filterEntries({entries:r},n):r;if((0,L.nR)(t)){const e=(0,T.hd)(t);return(0,L.N6)(t,e,o)}return o}async listEntries(e){var t;const r=(0,T.hd)(e);let n;const o=e.get("type");if(o===I.S)n=()=>{const t=J(e);return this.implementation.entriesByFolder(e.get("folder"),r,t)};else{if(o!==I.h)throw new Error(`Unknown collection type: ${o}`);{const t=e.get("files").map((e=>({path:e.get("file"),label:e.get("label")}))).toArray();n=()=>this.implementation.entriesByFiles(t)}}const i=await n(),a=S.Cursor.create(i[S.CURSOR_COMPATIBILITY_SYMBOL]).wrapData({cursorType:"collectionEntries",collection:e});return{entries:this.processEntries(i,e),pagination:null===(t=a.meta)||void 0===t?void 0:t.get("page"),cursor:a}}async listAllEntries(e){if(e.get("folder")&&this.implementation.allEntriesByFolder){const t=J(e),r=(0,T.hd)(e);return this.implementation.allEntriesByFolder(e.get("folder"),r,t).then((t=>this.processEntries(t,e)))}const t=await this.listEntries(e),{entries:r}=t;let{cursor:n}=t;for(;n&&n.actions.includes("next");){const{entries:e,cursor:t}=await this.traverseCursor(n,"next");r.push(...e),n=t}return r}async search(e,t){const r=[],n=e.map((async e=>{const r=e.get("summary",""),n=U(r);let o=[];var i;e.get("type")===I.h?null===(i=e.get("files"))||void 0===i||i.forEach((e=>{const t=e.get("fields").map((e=>e.get("name"))).toArray();o=[...o,...t]})):o=[(0,T.GK)(e,"title"),(0,T.GK)(e,"shortTitle"),(0,T.GK)(e,"author"),...n.map((t=>z[t]?(0,T.GK)(e,"date"):t))];const a=o.filter(Boolean),s=await this.listAllEntries(e);return w.filter(t,s,{extract:K(p()(a))})})).map((e=>e.catch((e=>(r.push(e),[]))))),o=await Promise.all(n).then((e=>m()(e)));if(r.length>0)throw new Error({message:"Errors ocurred while searching entries locally!",errors:r});return{entries:o.filter((({score:e})=>e>5)).sort(G).map((e=>e.original))}}async query(e,t,r,n,i){let s=await this.listAllEntries(e);n&&(s=s.filter((e=>e.slug===n)));const l=function(e,t){return e.reduce(((e,r)=>{const n=t.reduce(((e,t)=>{const n=W({data:r.data,path:t});return e.push(...n),e}),[]);for(let t=0;t<n.length;t++)e.push(F(F({},r),{},{field:n[t]}));return e}),[])}(s,t);let c=w.filter(r,l,{extract:e=>V(e.field,e)}).sort(G).map((e=>e.original));void 0!==i&&i>0&&(c=c.slice(0,i));const u=function(e){const t=e.map((e=>e.field)),r={},n=e.reduce(((e,t)=>{if(!e[t.slug]){const{field:n}=t,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,N);e[t.slug]=o,r[t.slug]=(0,b.Set)()}const n=t.field.split(".");let o=e[t.slug].data;for(let e=0;e<n.length;e++)if(o=o[n[e]],Array.isArray(o)){const o=n.slice(0,e+1).join(".");r[t.slug]=r[t.slug].add(o)}return e}),{});return Object.keys(n).forEach((e=>{const i=n[e].data;for(const n of r[e].toArray()){const e=a()(i,n),r=e.filter(((e,r)=>t.some((e=>`${e}.`.startsWith(`${n}.${r}.`)))));r.sort(((r,o)=>{const i=e.indexOf(r),a=e.indexOf(o),s=`${n}.${i}.`,l=`${n}.${a}.`;return t.findIndex((e=>`${e}.`.startsWith(s)))-t.findIndex((e=>`${e}.`.startsWith(l)))})),o()(i,n,r)}})),Object.values(n)}(c);return{query:r,hits:u}}traverseCursor(e,t){const[r,n]=e.unwrapData(),o=r.get("collection");return this.implementation.traverseCursor(n,t).then((async({entries:e,cursor:t})=>({entries:this.processEntries(e,o),cursor:S.Cursor.create(t).wrapData({cursorType:"collectionEntries",collection:o})})))}async getLocalDraftBackup(e,t){const r=H(e.get("name"),t),n=await S.localForage.getItem(r);if(!n||!n.raw.trim())return{};const{raw:o,path:i}=n;let{mediaFiles:a=[]}=n;a=a.map((e=>e.file?F(F({},e),{},{url:URL.createObjectURL(e.file)}):e));const s=(0,T.Io)(e,t),l=r=>this.entryWithFormat(e)((0,P.Y)(e.get("name"),t,i,{raw:r,label:s,mediaFiles:a,meta:{path:Y(i,e)}})),c=l(o);if((0,L.nR)(e)&&n.i18n){const e=(0,L.tN)(n.i18n,l);c.i18n=e}return{entry:c}}async persistLocalDraftBackup(e,t){try{await this.backupSync.acquire();const r=H(t.get("name"),e.get("slug")),n=this.entryToRaw(t,e);if(!n.trim())return;const o=await Promise.all(e.get("mediaFiles").toJS().map((async e=>{var t;if(null!==(t=e.url)&&void 0!==t&&t.startsWith("blob:")){const t=await fetch(e.url).then((e=>e.blob()));return F(F({},e),{},{file:(0,S.blobToFileObj)(e.name,t)})}return e})));let i;return(0,L.nR)(t)&&(i=(0,L.wi)(t,e,(e=>this.entryToRaw(t,e)))),await S.localForage.setItem(r,F({raw:n,path:e.get("path"),mediaFiles:o},i&&{i18n:i})),await S.localForage.setItem(H(),n)}catch(e){console.warn("persistLocalDraftBackup",e)}finally{this.backupSync.release()}}async deleteLocalDraftBackup(e,t){try{return await this.backupSync.acquire(),await S.localForage.removeItem(H(e.get("name"),t)),t&&await S.localForage.removeItem(H(e.get("name"))),await this.deleteAnonymousBackup()}catch(e){console.warn("deleteLocalDraftBackup",e)}finally{this.backupSync.release()}}deleteAnonymousBackup(){return S.localForage.removeItem(H())}async getEntry(e,t,r){const n=(0,T.VD)(t,r),o=(0,T.Io)(t,r),i=(0,T.hd)(t),a=async n=>{const i=await this.implementation.getEntry(n);let a=(0,P.Y)(t.get("name"),r,i.file.path,{raw:i.data,label:o,mediaFiles:[],meta:{path:Y(i.file.path,t)}});return a=this.entryWithFormat(t)(a),a=await this.processEntry(e,t,a),a};let s;return s=(0,L.nR)(t)?await(0,L.u5)(t,i,n,r,a):await a(n),s}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 r=(0,O.RR)(e,t);if(t&&void 0!==t.raw){const e=r&&v()(r.fromFile.bind(r,t.raw))||{};return h()(e)&&console.error(e),Object.assign(t,{data:h()(e)?{}:e})}return r.fromFile(t)}}async processUnpublishedEntry(e,t,r){const{slug:n}=t;let o;if(e.get("type")===I.h){const t=e.get("files").find((e=>(null==e?void 0:e.get("name"))===n));o=(0,x.extname)(t.get("file"))}else o=(0,T.hd)(e);const i=[];if(r){const r=t.diffs.filter((e=>!e.path.endsWith(o))),a=await Promise.all(r.map((t=>this.implementation.unpublishedEntryMediaFile(e.get("name"),n,t.path,t.id))));i.push(...a.map((e=>F(F({},e),{},{draft:!0}))))}const a=l()(t.diffs.filter((e=>e.path.endsWith(o))),(e=>e.path.length)),s=(r,o,a)=>{const s=(0,P.Y)(e.get("name"),n,o,{raw:r,isModification:!a,label:e&&(0,T.Io)(e,n),mediaFiles:i,updatedOn:t.updatedAt,author:t.pullRequestAuthor,status:t.status,meta:{path:Y(o,e)}});return this.entryWithFormat(e)(s)},c=async r=>{const n=await this.implementation.unpublishedEntryDataFile(e.get("name"),t.slug,r.path,r.id);return s(n,r.path,r.newFile)};if(a.length<=0){const t=await this.implementation.getEntry((0,T.VD)(e,n));return s(t.data,t.file.path,!1)}if((0,L.nR)(e)){const t=(0,T.VD)(e,n),r=(0,L.Nr)(e,o,t,n,a);let i=await Promise.all(r.map((e=>c(e).catch((()=>null)))));return i=i.filter(Boolean),(await(0,L.N6)(e,o,i))[0]}return await c(a[0])}async unpublishedEntries(e){const t=await this.implementation.unpublishedEntries();return{pagination:0,entries:(await Promise.all(t.map((async t=>{const r=await this.implementation.unpublishedEntry({id:t}),n=r.collection,o=e.find((e=>e.get("name")===n));return o?await this.processUnpublishedEntry(o,r,!1):(console.warn(`Missing collection '${n}' for unpublished entry '${t}'`),null)})))).filter(Boolean)}}async processEntry(e,t,r){const n=(0,C._5)(e.integrations,null,"assetStore"),o=(0,T.bO)(e.config,t,(0,b.fromJS)(r));if(o.length>0&&!n){const e=await Promise.all(o.map((e=>this.implementation.getMedia(e))));r.mediaFiles=r.mediaFiles.concat(...e)}else r.mediaFiles=r.mediaFiles.concat(e.mediaLibrary.get("files")||[]);return r}async unpublishedEntry(e,t,r){const n=await this.implementation.unpublishedEntry({collection:t.get("name"),slug:r});let o=await this.processUnpublishedEntry(t,n,!0);return o=await this.processEntry(e,t,o),o}getDeploy(e,t,r){const n=this.config.site_url;if(n&&!1!==this.config.show_preview_links)return{url:(0,A.U8)(n,e,t,r,this.config.slug),status:"SUCCESS"}}async getDeployPreview(e,t,r,{maxAttempts:n=1,interval:o=5e3}={}){if(!this.implementation.getDeployPreview||!1===this.config.show_preview_links)return;let i,a=0;for(;!i&&a<n;)a++,i=await this.implementation.getDeployPreview(e.get("name"),t),i||await new Promise((e=>setTimeout((()=>e(void 0)),o)));return i?{url:(0,A.U8)(i.url,e,t,r,this.config.slug),status:i.status?i.status.toUpperCase():""}:void 0}async persistEntry({config:e,collection:t,entryDraft:r,assetProxies:n,usedSlugs:o,unpublished:i=!1,status:a}){const s=await this.invokePreSaveEvent(r.get("entry")),l=s&&r.setIn(["entry","data"],s)||r,c=l.getIn(["entry","newRecord"])||!1,u=(0,E.Ii)(e),f=(0,D.x)(t,l);let p;if(c){if(!(0,T.AQ)(t))throw new Error("Not allowed to create new entries in this collection");const r=await this.generateUniqueSlug(t,l.getIn(["entry","data"]),e,o,f),i=f||(0,T.VD)(t,r);p={path:i,slug:r,raw:this.entryToRaw(t,l.get("entry"))},function(e,t,r,n,o){e.map((e=>{const i=e.path,a=(0,k.$C)(t,r,n.get("entry").set("path",o),i,e.field);e.path=a}))}(n,e,t,l,i)}else{const e=l.getIn(["entry","slug"]);p={path:l.getIn(["entry","path"]),slug:f&&!u?Z(t,f):e,raw:this.entryToRaw(t,l.get("entry")),newPath:f}}const{slug:d,path:h,newPath:g}=p;let m=[p];if((0,L.nR)(t)){const e=(0,T.hd)(t);m=(0,L.R6)(t,e,l.get("entry"),(e=>this.entryToRaw(t,e)),h,d,g)}const y=await this.currentUser(),v=F({newEntry:c,commitMessage:(0,A.CZ)(c?"create":"update",e,{collection:t,slug:d,path:h,authorLogin:y.login,authorName:y.name},y.useOpenAuthoring),collectionName:t.get("name"),useWorkflow:u},{unpublished:i,status:a});return u||await this.invokePrePublishEvent(l.get("entry")),await this.implementation.persistEntry({dataFiles:m,assets:n},v),await this.invokePostSaveEvent(l.get("entry")),u||await this.invokePostPublishEvent(l.get("entry")),d}async invokeEventWithEntry(e,t){const{login:r,name:n}=await this.currentUser();return await(0,R.j2)({name:e,data:{entry:t,author:{login:r,name:n}}})}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 invokePreSaveEvent(e){return await this.invokeEventWithEntry("preSave",e)}async invokePostSaveEvent(e){await this.invokeEventWithEntry("postSave",e)}async persistMedia(e,t){const r=await this.currentUser(),n={commitMessage:(0,A.CZ)("uploadMedia",e,{path:t.path,authorLogin:r.login,authorName:r.name},r.useOpenAuthoring)};return this.implementation.persistMedia(t,n)}async deleteEntry(e,t,r){const n=e.config,o=(0,T.VD)(t,r),i=(0,T.hd)(t);if(!(0,T.Zh)(t))throw new Error("Not allowed to delete entries in this collection");const a=await this.currentUser(),s=(0,A.CZ)("delete",n,{collection:t,slug:r,path:o,authorLogin:a.login,authorName:a.name},a.useOpenAuthoring),l=(0,k.WK)(e.entries,t.get("name"),r);await this.invokePreUnpublishEvent(l);let c=[o];(0,L.nR)(t)&&(c=(0,L.Jn)(t,i,o,r)),await this.implementation.deleteFiles(c,s),await this.invokePostUnpublishEvent(l)}async deleteMedia(e,t){const r=await this.currentUser(),n=(0,A.CZ)("deleteMedia",e,{path:t,authorLogin:r.login,authorName:r.name},r.useOpenAuthoring);return this.implementation.deleteFiles([t],n)}persistUnpublishedEntry(e){return this.persistEntry(F(F({},e),{},{unpublished:!0}))}updateUnpublishedEntryStatus(e,t,r){return this.implementation.updateUnpublishedEntryStatus(e,t,r)}async publishUnpublishedEntry(e){const t=e.get("collection"),r=e.get("slug");await this.invokePrePublishEvent(e),await this.implementation.publishUnpublishedEntry(t,r),await this.invokePostPublishEvent(e)}deleteUnpublishedEntry(e,t){return this.implementation.deleteUnpublishedEntry(e,t)}entryToRaw(e,t){const r=(0,O.RR)(e,t.toJS()),n=this.fieldsOrder(e,t),o=(0,T.VF)(e,t);return r&&r.toFile(t.get("data").toJS(),n,o)}fieldsOrder(e,t){if(e.get("fields"))return e.get("fields").map((e=>e.get("name"))).toArray();const r=(e.get("files")||(0,b.List)()).filter((e=>e.get("name")===t.get("slug"))).get(0);if(null==r)throw new Error(`No file found for ${t.get("slug")} in ${e.get("name")}`);return r.get("fields").map((e=>e.get("name"))).toArray()}filterEntries(e,t){return e.entries.filter((e=>{const r=e.data[t.get("field")];return Array.isArray(r)?r.includes(t.get("value")):r===t.get("value")}))}}function X(e){if(!e.backend.name)throw new Error("No backend defined in configuration");const{name:t}=e.backend,r=new q,n=(0,R.N_)(t);if(n)return new Q(n,{backendName:t,authStore:r,config:e});throw new Error(`Backend not found: ${t}`)}const ee=function(){let e;return t=>e||(e=X(t))}()},69456:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Ns});var n=r(34601),o=r(32673),i=r.n(o),a=r(12244),s=r.n(a),l=r(34536),c=r(9316),u=r(78841),f=r.n(u),p=r(57903),d=r(7267),h=r(75465),g=r.n(h),m=r(53327),y=r(36867),v=r(44905),b=r(12318),w=r(56079);function S(e){b.m8.push((0,w.f7)(e))}var x=r(52977),_=r(16760),O=r.n(_),E=r(34498),k=r.n(E),C=r(14478),T=r.n(C),P=r(24688),j=r(90737),R=r(45455),A=r.n(R),M=r(34106),I=r(64682),D=r(62797);const L=(0,n.Z)("div",{target:"el0uck00",label:"SearchContainer"})({name:"xts1j",styles:"height:37px;display:flex;align-items:center;position:relative;width:400px;"}),N=(0,n.Z)("input",{target:"el0uck01",label:"SearchInput"})("background-color:#eff0f4;border-radius:",m.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:",m.zIndex.zIndex1,";&:focus{outline:none;box-shadow:inset 0 0 0 2px ",m.colors.active,";}"),$=(0,n.Z)(m.Icon,{target:"el0uck02",label:"SearchIcon"})("position:absolute;top:50%;left:6px;z-index:",m.zIndex.zIndex2,";transform:translate(0,-50%);");function F({value:e,onChange:t,onKeyDown:r,placeholder:n,disabled:o}){return(0,D.jsx)(L,null,(0,D.jsx)($,{type:"search",size:"small"}),(0,D.jsx)(N,{value:e,onChange:t,onKeyDown:r,placeholder:n,disabled:o}))}F.propTypes={value:i().string,onChange:i().func.isRequired,onKeyDown:i().func.isRequired,placeholder:i().string.isRequired,disabled:i().bool};const B=F,U=(0,n.Z)("button",{target:"estf6120",label:"CloseButton"})(m.buttons.button,";",m.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;"),z=(0,n.Z)("h1",{target:"estf6121",label:"LibraryTitle"})("line-height:36px;font-size:22px;text-align:left;margin-bottom:25px;color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function W({onClose:e,title:t,isPrivate:r}){return(0,D.jsx)("div",null,(0,D.jsx)(U,{onClick:e},(0,D.jsx)(m.Icon,{type:"close"})),(0,D.jsx)(z,{isPrivate:r},t))}W.propTypes={onClose:i().func.isRequired,title:i().string.isRequired,isPrivate:i().bool};const q=W;var H=r(85411);function V(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const K={button:(0,D.css)(m.buttons.button,";",m.buttons.default,";display:inline-block;margin-left:15px;margin-right:2px;&[disabled]{",m.buttons.disabled,";cursor:default;};label:button;")},G=(0,n.Z)(I.KH,{target:"e288rjk0",label:"UploadButton"})(K.button,";",m.buttons.gray,";",m.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:",m.zIndex.zIndex0,";outline:none;}"),Z=(0,n.Z)("button",{target:"e288rjk1",label:"DeleteButton"})(K.button,";",m.buttons.lightRed,";"),Y=(0,n.Z)("button",{target:"e288rjk2",label:"InsertButton"})(K.button,";",m.buttons.green,";"),J=(0,n.Z)("button",{target:"e288rjk3",label:"ActionButton"})(K.button,";",(e=>!e.disabled&&(0,D.css)(m.buttons.gray,";label:ActionButton;")),""),Q=J;class X extends s().Component{constructor(...e){super(...e),V(this,"mounted",!1),V(this,"timeout",void 0),V(this,"state",{copied:!1}),V(this,"handleCopy",(()=>{clearTimeout(this.timeout);const{path:e,draft:t,name:r}=this.props;(0,H.Z)((0,P.isAbsolutePath)(e)||!t?e:r),this.setState({copied:!0}),this.timeout=setTimeout((()=>this.mounted&&this.setState({copied:!1})),1500)})),V(this,"getTitle",(()=>{const{t:e,path:t,draft:r}=this.props;return this.state.copied?e("mediaLibrary.mediaLibraryCard.copied"):t?(0,P.isAbsolutePath)(t)?e("mediaLibrary.mediaLibraryCard.copyUrl"):e(r?"mediaLibrary.mediaLibraryCard.copyName":"mediaLibrary.mediaLibraryCard.copyPath"):e("mediaLibrary.mediaLibraryCard.copy")}))}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}render(){const{disabled:e}=this.props;return(0,D.jsx)(J,{disabled:e,onClick:this.handleCopy},this.getTitle())}}X.propTypes={disabled:i().bool.isRequired,draft:i().bool,path:i().string,name:i().string,t:i().func.isRequired};const ee=(0,n.Z)("div",{target:"e1n0ky5z0",label:"LibraryTop"})({name:"1ab1jlb",styles:"position:relative;display:flex;flex-direction:column;"}),te=(0,n.Z)("div",{target:"e1n0ky5z1",label:"RowContainer"})({name:"gg4vpm",styles:"display:flex;justify-content:space-between;"}),re=(0,n.Z)("div",{target:"e1n0ky5z2",label:"ButtonsContainer"})({name:"6su6fj",styles:"flex-shrink:0;"});function ne({t:e,onClose:t,privateUpload:r,forImage:n,onDownload:o,onUpload:i,query:a,onSearchChange:s,onSearchKeyDown:l,searchDisabled:c,onDelete:u,canInsert:f,onInsert:p,hasSelection:d,isPersisting:h,isDeleting:g,selectedFile:m}){const y=h||g,v=!y,b=!y&&d,w=e(h?"mediaLibrary.mediaLibraryModal.uploading":"mediaLibrary.mediaLibraryModal.upload"),S=e(g?"mediaLibrary.mediaLibraryModal.deleting":"mediaLibrary.mediaLibraryModal.deleteSelected"),x=e("mediaLibrary.mediaLibraryModal.download"),_=e("mediaLibrary.mediaLibraryModal.chooseSelected");return(0,D.jsx)(ee,null,(0,D.jsx)(te,null,(0,D.jsx)(q,{onClose:t,title:`${r?e("mediaLibrary.mediaLibraryModal.private"):""}${e(n?"mediaLibrary.mediaLibraryModal.images":"mediaLibrary.mediaLibraryModal.mediaAssets")}`,isPrivate:r}),(0,D.jsx)(re,null,(0,D.jsx)(X,{disabled:!d,path:m.path,name:m.name,draft:m.draft,t:e}),(0,D.jsx)(Q,{onClick:o,disabled:!d},x),(0,D.jsx)(G,{label:w,imagesOnly:n,onChange:i,disabled:!v}))),(0,D.jsx)(te,null,(0,D.jsx)(B,{value:a,onChange:s,onKeyDown:l,placeholder:e("mediaLibrary.mediaLibraryModal.search"),disabled:c}),(0,D.jsx)(re,null,(0,D.jsx)(Z,{onClick:u,disabled:!b},S),f?(0,D.jsx)(Y,{onClick:p,disabled:!d},_):null)))}ne.propTypes={t:i().func.isRequired,onClose:i().func.isRequired,privateUpload:i().bool,forImage:i().bool,onDownload:i().func.isRequired,onUpload:i().func.isRequired,query:i().string,onSearchChange:i().func.isRequired,onSearchKeyDown:i().func.isRequired,searchDisabled:i().bool.isRequired,onDelete:i().func.isRequired,canInsert:i().bool,onInsert:i().func.isRequired,hasSelection:i().bool.isRequired,isPersisting:i().bool,isDeleting:i().bool,selectedFile:i().oneOfType([i().shape({path:i().string.isRequired,draft:i().bool.isRequired,name:i().string.isRequired}),i().shape({})])};const oe=ne;var ie=r(36981),ae=!("undefined"==typeof window||!window.document||!window.document.createElement),se=void 0;function le(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function ce(e){this.target=e,this.events={}}ce.prototype.getEventHandlers=function(e,t){var r,n=String(e)+" "+String((r=t)?!0===r?100:(r.capture<<0)+(r.passive<<1)+(r.once<<2):0);return this.events[n]||(this.events[n]={handlers:[],handleEvent:void 0},this.events[n].nextHandlers=this.events[n].handlers),this.events[n]},ce.prototype.handleEvent=function(e,t,r){var n=this.getEventHandlers(e,t);n.handlers=n.nextHandlers,n.handlers.forEach((function(e){e&&e(r)}))},ce.prototype.add=function(e,t,r){var n=this,o=this.getEventHandlers(e,r);le(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,r),this.target.addEventListener(e,o.handleEvent,r)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,le(o);var a=o.nextHandlers.indexOf(t);o.nextHandlers.splice(a,1),0===o.nextHandlers.length&&(n.target&&n.target.removeEventListener(e,o.handleEvent,r),o.handleEvent=void 0)}}};var ue="__consolidated_events_handlers__";function fe(e,t,r,n){e[ue]||(e[ue]=new ce(e));var o=function(e){if(e)return void 0===se&&(se=function(){if(!ae)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),r=function(){};window.addEventListener("testPassiveEventSupport",r,t),window.removeEventListener("testPassiveEventSupport",r,t)}catch(e){}return e}()),se?e:!!e.capture}(n);return e[ue].add(t,r,o)}var pe=r(94237);function de(e,t){var r,n=(r=e,!isNaN(parseFloat(r))&&isFinite(r)?parseFloat(r):"px"===r.slice(-2)?parseFloat(r.slice(0,-2)):void 0);if("number"==typeof n)return n;var o=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof o?o*t:void 0}var he,ge="above",me="inside",ye="below",ve="invisible";function be(e){return"string"==typeof e.type}var we=[];function Se(e){we.push(e),he||(he=setTimeout((function(){var e;for(he=null;e=we.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var r=we.indexOf(e);-1!==r&&(we.splice(r,1),!we.length&&he&&(clearTimeout(he),he=null))}}}var xe="undefined"!=typeof window,_e=function(e){function t(t){var r;return(r=e.call(this,t)||this).refElement=function(e){r._ref=e},r}(0,ie.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;xe&&(this.cancelOnNextTick=Se((function(){e.cancelOnNextTick=null;var t=e.props,r=t.children;t.debug,function(e,t){if(e&&!be(e)&&!t)throw new Error("<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(r,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=fe(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=fe(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},n.componentDidUpdate=function(){var e=this;xe&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=Se((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},n.componentWillUnmount=function(){xe&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},n._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,n=e.scrollableAncestor;if(n)return function(e){return"window"===e?r.g.window:e}(n);for(var o=this._ref;o.parentNode;){if((o=o.parentNode)===document.body)return window;var i=window.getComputedStyle(o),a=(t?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===a||"scroll"===a||"overlay"===a)return o}return window},n._handleScroll=function(e){if(this._ref){var t=this._getBounds(),r=function(e){return e.viewportBottom-e.viewportTop==0?ve:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?me:e.viewportBottom<e.waypointTop?ye:e.waypointTop<e.viewportTop?ge:ve}(t),n=this._previousPosition,o=this.props,i=(o.debug,o.onPositionChange),a=o.onEnter,s=o.onLeave,l=o.fireOnRapidScroll;if(this._previousPosition=r,n!==r){var c={currentPosition:r,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom};i.call(this,c),r===me?a.call(this,c):n===me&&s.call(this,c),l&&(n===ye&&r===ge||n===ge&&r===ye)&&(a.call(this,{currentPosition:me,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}),s.call(this,{currentPosition:r,previousPosition:me,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}))}}},n._getBounds=function(){var e,t,r=this.props,n=r.horizontal,o=(r.debug,this._ref.getBoundingClientRect()),i=o.left,a=o.top,s=o.right,l=o.bottom,c=n?i:a,u=n?s:l;this.scrollableAncestor===window?(e=n?window.innerWidth:window.innerHeight,t=0):(e=n?this.scrollableAncestor.offsetWidth:this.scrollableAncestor.offsetHeight,t=n?this.scrollableAncestor.getBoundingClientRect().left:this.scrollableAncestor.getBoundingClientRect().top);var f=this.props,p=f.bottomOffset;return{waypointTop:c,waypointBottom:u,viewportTop:t+de(f.topOffset,e),viewportBottom:t+e-de(p,e)}},n.render=function(){var e=this,t=this.props.children;return t?be(t)||(0,pe.isForwardRef)(t)?s().cloneElement(t,{ref:function(r){e.refElement(r),t.ref&&("function"==typeof t.ref?t.ref(r):t.ref.current=r)}}):s().cloneElement(t,{innerRef:this.refElement}):s().createElement("span",{ref:this.refElement,style:{fontSize:0}})},t}(s().PureComponent);_e.above=ge,_e.below=ye,_e.inside=me,_e.invisible=ve,_e.defaultProps={debug:!1,scrollableAncestor:void 0,children:void 0,topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){},onLeave:function(){},onPositionChange:function(){},fireOnRapidScroll:!0},_e.displayName="Waypoint";var Oe=r(7896);function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ke=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Ce(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!((n=e[r])===(o=t[r])||ke(n)&&ke(o)))return!1;var n,o;return!0}const Te=function(e,t){var r;void 0===t&&(t=Ce);var n,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}};var Pe="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function je(e){cancelAnimationFrame(e.id)}var Re=-1;var Ae=null;function Me(e){if(void 0===e&&(e=!1),null===Ae||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Ae="positive-descending":(t.scrollLeft=1,Ae=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ae}return Ae}var Ie=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function De(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,f=e.getRowHeight,p=e.getRowOffset,d=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return(t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=g(n.props,Ee(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:Ee(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=Te((function(e,t,r,o,i,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),n._callOnScroll=void 0,n._callOnScroll=Te((function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,u=n._getItemStyleCache(m&&s,m&&l,m&&c),d=e+":"+t;if(u.hasOwnProperty(d))o=u[d];else{var h=r(n.props,t,n._instanceProps),g="rtl"===l;u[d]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:p(n.props,e,n._instanceProps),height:f(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=Te((function(e,t,r){return{}})),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,c=i;if("rtl"===t)switch(Me()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r,o;null!==n._resetIsScrollingTimeoutId&&je(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=150,r=Pe(),o={id:requestAnimationFrame((function n(){Pe()-r>=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}(0,ie.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return Le(e,t),y(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,f=i.height,p=i.rowCount,d=i.width,h=this.state,g=h.scrollLeft,m=h.scrollTop,y=function(e){if(void 0===e&&(e=!1),-1===Re||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Re=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Re}();void 0!==n&&(n=Math.max(0,Math.min(n,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>d?y:0,w=v>f?y:0;this.scrollTo({scrollLeft:void 0!==n?c(this.props,n,r,g,this._instanceProps,w):g,scrollTop:void 0!==o?u(this.props,o,r,m,this._instanceProps,b):m})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Me()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&je(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,c=e.innerRef,u=e.innerElementType,f=e.innerTagName,p=e.itemData,d=e.itemKey,h=void 0===d?Ie:d,g=e.outerElementType,m=e.outerTagName,y=e.rowCount,v=e.style,b=e.useIsScrolling,w=e.width,S=this.state.isScrolling,x=this._getHorizontalRangeToRender(),_=x[0],O=x[1],E=this._getVerticalRangeToRender(),k=E[0],C=E[1],T=[];if(n>0&&y)for(var P=k;P<=C;P++)for(var j=_;j<=O;j++)T.push((0,a.createElement)(t,{columnIndex:j,data:p,isScrolling:b?S:void 0,key:h({columnIndex:j,data:p,rowIndex:P}),rowIndex:P,style:this._getItemStyle(P,j)}));var R=s(this.props,this._instanceProps),A=l(this.props,this._instanceProps);return(0,a.createElement)(g||m||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:(0,Oe.Z)({position:"relative",height:i,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},(0,a.createElement)(u||f||"div",{children:T,ref:c,style:{height:R,pointerEvents:S?"none":void 0,width:A}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),f=u[0],p=u[1],d=u[2],h=u[3];this._callOnItemsRendered(a,s,f,p,l,c,d,h)}if("function"==typeof n){var g=this.state,m=g.horizontalScrollDirection,y=g.scrollLeft,v=g.scrollTop,b=g.scrollUpdateWasRequested,w=g.verticalScrollDirection;this._callOnScroll(y,v,m,w,b)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,f=l.scrollLeft,p=r||i||a||1;if(0===t||0===s)return[0,0,0,0];var d=n(this.props,f,this._instanceProps),h=o(this.props,d,f,this._instanceProps),g=u&&"backward"!==c?1:Math.max(1,p),m=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,d-g),Math.max(0,Math.min(t-1,h+m)),d,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var f=d(this.props,c,this._instanceProps),p=h(this.props,f,c,this._instanceProps),g=s&&"backward"!==l?1:Math.max(1,u),m=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,f-g),Math.max(0,Math.min(i-1,p+m)),f,p]},t}(a.PureComponent)).defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Le=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Ne=De({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),f=Math.max(0,t*s-l+i+s);switch("smart"===r&&(r=n>=f-l&&n<=u+l?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var p=Math.round(f+(u-f)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return n>=f&&n<=u?n:f>u||n<f?f:u}},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),f=Math.max(0,t*a-s+i+a);switch("smart"===r&&(r=n>=f-s&&n<=u+s?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var p=Math.round(f+(u-f)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return n>=f&&n<=u?n:f>u||n<f?f:u}},getColumnStartIndexForOffset:function(e,t){var r=e.columnWidth,n=e.columnCount;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getColumnStopIndexForStartIndex:function(e,t,r){var n=e.columnWidth,o=e.columnCount,i=e.width,a=t*n,s=Math.ceil((i+r-a)/n);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var r=e.rowHeight,n=e.rowCount;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getRowStopIndexForStartIndex:function(e,t,r){var n=e.rowHeight,o=e.rowCount,i=e.height,a=t*n,s=Math.ceil((i+r-a)/n);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}});let $e;$e="undefined"!=typeof window?window:"undefined"!=typeof self?self:r.g;let Fe=null,Be=null;const Ue=$e.clearTimeout,ze=$e.setTimeout,We=$e.cancelAnimationFrame||$e.mozCancelAnimationFrame||$e.webkitCancelAnimationFrame,qe=$e.requestAnimationFrame||$e.mozRequestAnimationFrame||$e.webkitRequestAnimationFrame;null==We||null==qe?(Fe=Ue,Be=function(e){return ze(e,20)}):(Fe=function([e,t]){We(e),Ue(t)},Be=function(e){const t=qe((function(){Ue(r),e()})),r=ze((function(){We(t),e()}),20);return[t,r]});class He extends a.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:r}=this.props;if(this._parentNode){var n,o,i,a;const s=window.getComputedStyle(this._parentNode)||{},l=parseFloat(null!==(n=s.paddingLeft)&&void 0!==n?n:"0"),c=parseFloat(null!==(o=s.paddingRight)&&void 0!==o?o:"0"),u=parseFloat(null!==(i=s.paddingTop)&&void 0!==i?i:"0"),f=parseFloat(null!==(a=s.paddingBottom)&&void 0!==a?a:"0"),p=this._parentNode.getBoundingClientRect(),d=p.height-u-f,h=p.width-l-c,g=this._parentNode.offsetHeight-u-f,m=this._parentNode.offsetWidth-l-c;(e||this.state.height===g&&this.state.scaledHeight===d)&&(t||this.state.width===m&&this.state.scaledWidth===h)||(this.setState({height:g,width:m,scaledHeight:d,scaledWidth:h}),"function"==typeof r&&r({height:g,scaledHeight:d,scaledWidth:h,width:m}))}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((()=>{this._timeoutId=setTimeout(this._onResize,0)})),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=function(e){let t,r,n,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const t=e.__resizeTriggers__,r=t.firstElementChild,n=t.lastElementChild,o=r.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,o.style.width=r.offsetWidth+1+"px",o.style.height=r.offsetHeight+1+"px",r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&Fe(this.__resizeRAF__),this.__resizeRAF__=Be((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(r){r.call(t,e)})))}))};let e=!1,l="";n="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let r=0;r<c.length;r++)if(void 0!==t.style[c[r]+"AnimationName"]){f=c[r],l="-"+f.toLowerCase()+"-",n=u[r],e=!0;break}}r="resizeanim",t="@"+l+"keyframes "+r+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+r+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=$e.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(r){if(!r.getElementById("detectElementResize")){const n=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > 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%; }',i=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const f=l.createElement("div");f.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(f),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),n&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(i)},i.__resizeTriggers__.addEventListener(n,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:r,disableHeight:n=!1,disableWidth:o=!1,nonce:i,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:f,scaledHeight:p,scaledWidth:d,width:h}=this.state,g={overflow:"visible"},m={};let y=!1;return n||(0===f&&(y=!0),g.height=0,m.height=f,m.scaledHeight=p),o||(0===h&&(y=!0),g.width=0,m.width=h,m.scaledWidth=d),(0,a.createElement)(c,{ref:this._setRef,style:{...g,...l},...u},!y&&e(m))}}const Ve=(0,n.Z)("div",{target:"e2etv5a0",label:"Card"})("width:",(e=>e.width),";height:",(e=>e.height),";margin:",(e=>e.margin),";border:",m.borders.textField,";border-color:",(e=>e.isSelected&&m.colors.active),";border-radius:",m.lengths.borderRadius,";cursor:pointer;overflow:hidden;background-color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";&:focus{outline:none;}"),Ke=(0,n.Z)("div",{target:"e2etv5a1",label:"CardImageWrapper"})("height:",162,"px;",m.effects.checkerboard,";",m.shadows.inset,";border-bottom:solid ",m.lengths.borderWidth," ",m.colors.textFieldBorder,";position:relative;"),Ge=(0,n.Z)("img",{target:"e2etv5a2",label:"CardImage"})("width:100%;height:",160,"px;object-fit:contain;border-radius:2px 2px 0 0;"),Ze=(0,n.Z)("div",{target:"e2etv5a3",label:"CardFileIcon"})({name:"17s0kw4",styles:"width:100%;height:160px;object-fit:cover;border-radius:2px 2px 0 0;padding:1em;font-size:3em;"}),Ye=(0,n.Z)("p",{target:"e2etv5a4",label:"CardText"})("color:",m.colors.text,";padding:8px;margin-top:20px;overflow-wrap:break-word;line-height:1.3 !important;"),Je=(0,n.Z)("p",{target:"e2etv5a5",label:"DraftText"})("color:",m.colors.mediaDraftText,";background-color:",m.colors.mediaDraftBackground,";position:absolute;padding:8px;border-radius:",m.lengths.borderRadius," 0 ",m.lengths.borderRadius," 0;");class Qe extends s().Component{render(){const{isSelected:e,displayURL:t,text:r,onClick:n,draftText:o,width:i,height:a,margin:s,isPrivate:l,type:c,isViewableImage:u,isDraft:f}=this.props,p=t.get("url");return(0,D.jsx)(Ve,{isSelected:e,onClick:n,width:i,height:a,margin:s,tabIndex:"-1",isPrivate:l},(0,D.jsx)(Ke,null,f?(0,D.jsx)(Je,{"data-testid":"draft-text"},o):null,p&&u?(0,D.jsx)(Ge,{loading:"lazy",src:p}):(0,D.jsx)(Ze,{"data-testid":"card-file-icon"},c)),(0,D.jsx)(Ye,null,r))}componentDidMount(){const{displayURL:e,loadDisplayURL:t}=this.props;e.get("url")||t()}}Qe.propTypes={isSelected:i().bool,displayURL:f().map.isRequired,text:i().string.isRequired,onClick:i().func.isRequired,draftText:i().string.isRequired,width:i().string.isRequired,height:i().string.isRequired,margin:i().string.isRequired,isPrivate:i().bool,type:i().string,isViewableImage:i().bool.isRequired,loadDisplayURL:i().func.isRequired,isDraft:i().bool};const Xe=Qe;function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e){const{rowIndex:t,columnIndex:r,style:n,data:{mediaItems:o,isSelectedFile:i,onAssetClick:a,cardDraftText:s,cardWidth:l,cardHeight:c,isPrivate:u,displayURLs:f,loadDisplayURL:p,columnCount:d,gutter:h}}=e,g=t*d+r;if(g>=o.length)return null;const m=o[g];return(0,D.jsx)("div",{tabIndex:"0",style:tt(tt({},n),{},{left:n.left+h*r,top:n.top+h,width:n.width-h,height:n.height-h})},(0,D.jsx)(Xe,{key:m.key,isSelected:i(m),text:m.name,onClick:()=>a(m),isDraft:m.draft,draftText:s,width:l,height:c,margin:"0px",isPrivate:u,displayURL:f.get(m.id,m.url?(0,M.Map)({url:m.url}):(0,M.Map)()),loadDisplayURL:()=>p(m),type:m.type,isViewableImage:m.isViewableImage}))}function ot(e){const{mediaItems:t,setScrollContainerRef:r}=e;return(0,D.jsx)(at,{ref:r},(0,D.jsx)(He,null,(({height:r,width:n})=>{const o=parseInt(e.cardWidth,10),i=parseInt(e.cardHeight,10),a=parseInt(e.cardMargin,10),s=o+a,l=i+a,c=Math.floor(n/s),u=Math.ceil(t.length/c);return(0,D.jsx)(Ne,{columnCount:c,columnWidth:s,rowCount:u,rowHeight:l,width:n,height:r,itemData:tt(tt({},e),{},{gutter:a,columnCount:c})},nt)})))}function it({setScrollContainerRef:e,mediaItems:t,isSelectedFile:r,onAssetClick:n,cardDraftText:o,cardWidth:i,cardHeight:a,cardMargin:s,isPrivate:l,displayURLs:c,loadDisplayURL:u,canLoadMore:f,onLoadMore:p,isPaginating:d,paginatingMessage:h}){return(0,D.jsx)(at,{ref:e},(0,D.jsx)(st,null,t.map((e=>(0,D.jsx)(Xe,{key:e.key,isSelected:r(e),text:e.name,onClick:()=>n(e),isDraft:e.draft,draftText:o,width:i,height:a,margin:s,isPrivate:l,displayURL:c.get(e.id,e.url?(0,M.Map)({url:e.url}):(0,M.Map)()),loadDisplayURL:()=>u(e),type:e.type,isViewableImage:e.isViewableImage}))),f?(0,D.jsx)(_e,{onEnter:p}):null),d?(0,D.jsx)(lt,{isPrivate:l},h):null)}const at=(0,n.Z)("div",{target:"e1l5oka20",label:"CardGridContainer"})({name:"1wzx962",styles:"overflow-y:auto;overflow-x:hidden;"}),st=(0,n.Z)("div",{target:"e1l5oka21",label:"CardGrid"})({name:"wbkx89",styles:"display:flex;flex-wrap:wrap;margin-left:-10px;margin-right:-10px;"}),lt=(0,n.Z)("h1",{target:"e1l5oka22",label:"PaginatingMessage"})("color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function ct(e){const{canLoadMore:t,isPaginating:r}=e;return t||r?(0,D.jsx)(it,e):(0,D.jsx)(ot,e)}ct.propTypes={setScrollContainerRef:i().func.isRequired,mediaItems:i().arrayOf(i().shape({displayURL:i().oneOfType([i().string,i().object]),id:i().string.isRequired,key:i().string.isRequired,name:i().string.isRequired,type:i().string.isRequired,draft:i().bool})).isRequired,isSelectedFile:i().func.isRequired,onAssetClick:i().func.isRequired,canLoadMore:i().bool,onLoadMore:i().func.isRequired,isPaginating:i().bool,paginatingMessage:i().string,cardDraftText:i().string.isRequired,cardWidth:i().string.isRequired,cardMargin:i().string.isRequired,loadDisplayURL:i().func.isRequired,isPrivate:i().bool,displayURLs:i().instanceOf(M.Map).isRequired};const ut=ct,ft=(0,n.Z)("div",{target:"e156433y0",label:"EmptyMessageContainer"})("height:100%;width:100%;display:flex;justify-content:center;align-items:center;color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function pt({content:e,isPrivate:t}){return(0,D.jsx)(ft,{isPrivate:t},(0,D.jsx)("h1",null,e))}pt.propTypes={content:i().string.isRequired,isPrivate:i().bool};const dt=pt,ht="300px",gt=(0,n.Z)(I.u_,{target:"e4d0svf0",label:"StyledModal"})("display:grid;grid-template-rows:120px auto;width:calc(",ht," + 20px);background-color:",(e=>e.isPrivate&&m.colors.grayDark),";@media (min-width:800px){width:calc(",ht," * 2 + 20px);}@media (min-width:1120px){width:calc(",ht," * 3 + 20px);}@media (min-width:1440px){width:calc(",ht," * 4 + 20px);}@media (min-width:1760px){width:calc(",ht," * 5 + 20px);}@media (min-width:2080px){width:calc(",ht," * 6 + 20px);}h1{color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";}button:disabled,label[disabled]{background-color:",(e=>e.isPrivate&&"rgba(217, 217, 217, 0.15)"),";}");function mt({isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,query:p,selectedFile:d,handleFilter:h,handleQuery:g,toTableData:m,handleClose:y,handleSearchChange:v,handleSearchKeyDown:b,handlePersist:w,handleDelete:S,handleInsert:x,handleDownload:_,setScrollContainerRef:O,handleAssetClick:E,handleLoadMore:k,loadDisplayURL:C,displayURLs:T,t:P}){const j=i?h(r):r,R=!n&&p?g(p,j):j,M=m(R),I=r&&!!r.length,L=j&&!!j.length,N=R&&!!R.length,$=N,F=!$,B=a&&!$&&P("mediaLibrary.mediaLibraryModal.loading")||o&&P("mediaLibrary.mediaLibraryModal.noResults")||!I&&P("mediaLibrary.mediaLibraryModal.noAssetsFound")||!L&&P("mediaLibrary.mediaLibraryModal.noImagesFound")||!N&&P("mediaLibrary.mediaLibraryModal.noResults"),U=$&&!A()(d);return(0,D.jsx)(gt,{isOpen:e,onClose:y,isPrivate:f},(0,D.jsx)(oe,{t:P,onClose:y,privateUpload:f,forImage:i,onDownload:_,onUpload:w,query:p,onSearchChange:v,onSearchKeyDown:b,searchDisabled:!o&&!L,onDelete:S,canInsert:t,onInsert:x,hasSelection:U,isPersisting:s,isDeleting:l,selectedFile:d}),F?(0,D.jsx)(dt,{content:B,isPrivate:f}):null,(0,D.jsx)(ut,{setScrollContainerRef:O,mediaItems:M,isSelectedFile:e=>d.key===e.key,onAssetClick:E,canLoadMore:c,onLoadMore:k,isPaginating:u,paginatingMessage:P("mediaLibrary.mediaLibraryModal.loading"),cardDraftText:P("mediaLibrary.mediaLibraryCard.draft"),cardWidth:"280px",cardHeight:"240px",cardMargin:"10px",isPrivate:f,loadDisplayURL:C,displayURLs:T}))}const yt={displayURL:i().oneOfType([i().string,i().object]).isRequired,id:i().string.isRequired,key:i().string.isRequired,name:i().string.isRequired,queryOrder:i().number,size:i().number,path:i().string.isRequired};mt.propTypes={isVisible:i().bool,canInsert:i().bool,files:i().arrayOf(i().shape(yt)).isRequired,dynamicSearch:i().bool,dynamicSearchActive:i().bool,forImage:i().bool,isLoading:i().bool,isPersisting:i().bool,isDeleting:i().bool,hasNextPage:i().bool,isPaginating:i().bool,privateUpload:i().bool,query:i().string,selectedFile:i().oneOfType([i().shape(yt),i().shape({})]),handleFilter:i().func.isRequired,handleQuery:i().func.isRequired,toTableData:i().func.isRequired,handleClose:i().func.isRequired,handleSearchChange:i().func.isRequired,handleSearchKeyDown:i().func.isRequired,handlePersist:i().func.isRequired,handleDelete:i().func.isRequired,handleInsert:i().func.isRequired,setScrollContainerRef:i().func.isRequired,handleAssetClick:i().func.isRequired,handleLoadMore:i().func.isRequired,loadDisplayURL:i().func.isRequired,t:i().func.isRequired,displayURLs:i().instanceOf(M.Map).isRequired};const vt=(0,c.Iu)()(mt);function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){St(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function St(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xt=["jpg","jpeg","webp","gif","png","bmp","tiff","svg","avif"],_t=[...xt];class Ot extends s().Component{constructor(...e){super(...e),St(this,"state",{selectedFile:{},query:"",isPersisted:!1}),St(this,"loadDisplayURL",(e=>{const{loadMediaDisplayURL:t}=this.props;t(e)})),St(this,"filterImages",(e=>e.filter((e=>{const t=(0,P.fileExtension)(e.name).toLowerCase();return _t.includes(t)})))),St(this,"toTableData",(e=>{const t=e&&e.map((({key:e,name:t,id:r,size:n,path:o,queryOrder:i,displayURL:a,draft:s})=>{const l=(0,P.fileExtension)(t).toLowerCase();return{key:e,id:r,name:t,path:o,type:l.toUpperCase(),size:n,queryOrder:i,displayURL:a,draft:s,isImage:_t.includes(l),isViewableImage:xt.includes(l)}})),{sortFields:r}=this.state,n=O()(r,"fieldName").concat("queryOrder"),o=O()(r,"direction").concat("asc");return k()(t,n,o)})),St(this,"handleClose",(()=>{this.props.closeMediaLibrary()})),St(this,"handleAssetClick",(e=>{const t=this.state.selectedFile.key===e.key?{}:e;this.setState({selectedFile:t})})),St(this,"handlePersist",(async e=>{e.persist(),e.stopPropagation(),e.preventDefault();const{persistMedia:t,privateUpload:r,config:n,t:o,field:i}=this.props,{files:a}=e.dataTransfer||e.target,s=[...a][0],l=n.get("max_file_size");l&&s.size>l?window.alert(o("mediaLibrary.mediaLibrary.fileTooLarge",{size:Math.floor(l/1e3)})):(await t(s,{privateUpload:r,field:i}),this.setState({isPersisted:!0}),this.scrollToTop()),e.target.value=null})),St(this,"handleInsert",(()=>{const{selectedFile:e}=this.state,{path:t}=e,{insertMedia:r,field:n}=this.props;r(t,n),this.handleClose()})),St(this,"handleDelete",(()=>{const{selectedFile:e}=this.state,{files:t,deleteMedia:r,privateUpload:n,t:o}=this.props;window.confirm(o("mediaLibrary.mediaLibrary.onDelete"))&&r(t.find((t=>e.key===t.key)),{privateUpload:n}).then((()=>{this.setState({selectedFile:{}})}))})),St(this,"handleDownload",(()=>{const{selectedFile:e}=this.state,{displayURLs:t}=this.props,r=t.getIn([e.id,"url"])||e.url;if(!r)return;const n=e.name,o=document.createElement("a");o.setAttribute("href",r),o.setAttribute("download",n),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),this.setState({selectedFile:{}})})),St(this,"handleLoadMore",(()=>{const{loadMedia:e,dynamicSearchQuery:t,page:r,privateUpload:n}=this.props;e({query:t,page:r+1,privateUpload:n})})),St(this,"handleSearchKeyDown",(async e=>{const{dynamicSearch:t,loadMedia:r,privateUpload:n}=this.props;"Enter"===e.key&&t&&(await r({query:this.state.query,privateUpload:n}),this.scrollToTop())})),St(this,"scrollToTop",(()=>{this.scrollContainerRef.scrollTop=0})),St(this,"handleSearchChange",(e=>{this.setState({query:e.target.value})})),St(this,"queryFilter",((e,t)=>{const r=e.replace(/ /g,"");return T().filter(r,t,{extract:e=>e.name}).map(((e,r)=>wt(wt({},t[e.index]),{},{queryIndex:r})))}))}componentDidMount(){this.props.loadMedia()}UNSAFE_componentWillReceiveProps(e){!this.props.isVisible&&e.isVisible&&this.setState({selectedFile:{},query:""}),this.state.isPersisted&&this.setState({selectedFile:e.files[0],isPersisted:!1})}componentDidUpdate(e){!e.isVisible&&this.props.isVisible&&e.privateUpload!==this.props.privateUpload&&this.props.loadMedia({privateUpload:this.props.privateUpload}),this.state.isPersisted&&this.setState({selectedFile:this.props.files[0],isPersisted:!1})}render(){const{isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,displayURLs:p,t:d}=this.props;return(0,D.jsx)(vt,{isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,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,handleDownload:this.handleDownload,setScrollContainerRef:e=>this.scrollContainerRef=e,handleAssetClick:this.handleAssetClick,handleLoadMore:this.handleLoadMore,displayURLs:p,loadDisplayURL:this.loadDisplayURL,t:d})}}St(Ot,"propTypes",{isVisible:i().bool,loadMediaDisplayURL:i().func,displayURLs:f().map,canInsert:i().bool,files:i().arrayOf(i().shape(yt)).isRequired,dynamicSearch:i().bool,dynamicSearchActive:i().bool,forImage:i().bool,isLoading:i().bool,isPersisting:i().bool,isDeleting:i().bool,hasNextPage:i().bool,isPaginating:i().bool,privateUpload:i().bool,config:f().map,loadMedia:i().func.isRequired,dynamicSearchQuery:i().string,page:i().number,persistMedia:i().func.isRequired,deleteMedia:i().func.isRequired,insertMedia:i().func.isRequired,closeMediaLibrary:i().func.isRequired,t:i().func.isRequired}),St(Ot,"defaultProps",{files:[]});const Et={loadMedia:x.pW,persistMedia:x.BZ,deleteMedia:x.h6,insertMedia:x.C9,loadMediaDisplayURL:x.$A,closeMediaLibrary:x.ko},kt=(0,p.$j)((function(e){const{mediaLibrary:t}=e,r=t.get("field");return wt({},{isVisible:t.get("isVisible"),canInsert:t.get("canInsert"),files:(0,j.x5)(e,r),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:r})}),Et)((0,c.Iu)()(Ot));var Ct=r(52588),Tt=r(70809),Pt=r(31461),jt=r(10362);s().Component,s().Component;var Rt=function(e,t){return"function"==typeof e?e(t):e},At=function(e,t){return"string"==typeof e?(0,Tt.ob)(e,null,null,t):e},Mt=function(e){return e},It=s().forwardRef;void 0===It&&(It=Mt);var Dt=It((function(e,t){var r=e.innerRef,n=e.navigate,o=e.onClick,i=(0,Pt.Z)(e,["innerRef","navigate","onClick"]),a=i.target,l=(0,Oe.Z)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),n())}});return l.ref=Mt!==It&&t||r,s().createElement("a",l)})),Lt=It((function(e,t){var r=e.component,n=void 0===r?Dt:r,o=e.replace,i=e.to,a=e.innerRef,l=(0,Pt.Z)(e,["component","replace","to","innerRef"]);return s().createElement(d.s6.Consumer,null,(function(e){e||(0,jt.Z)(!1);var r=e.history,c=At(Rt(i,e.location),e.location),u=c?r.createHref(c):"",f=(0,Oe.Z)({},l,{href:u,navigate:function(){var t=Rt(i,e.location),n=(0,Tt.Ep)(e.location)===(0,Tt.Ep)(At(t));(o||n?r.replace:r.push)(t)}});return Mt!==It?f.ref=t||a:f.innerRef=a,s().createElement(n,f)}))})),Nt=function(e){return e},$t=s().forwardRef;void 0===$t&&($t=Nt);var Ft=$t((function(e,t){var r=e["aria-current"],n=void 0===r?"page":r,o=e.activeClassName,i=void 0===o?"active":o,a=e.activeStyle,l=e.className,c=e.exact,u=e.isActive,f=e.location,p=e.sensitive,h=e.strict,g=e.style,m=e.to,y=e.innerRef,v=(0,Pt.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return s().createElement(d.s6.Consumer,null,(function(e){e||(0,jt.Z)(!1);var r=f||e.location,o=At(Rt(m,r),r),b=o.pathname,w=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),S=w?(0,d.LX)(r.pathname,{path:w,exact:c,sensitive:p,strict:h}):null,x=!!(u?u(S,r):S),_="function"==typeof l?l(x):l,O="function"==typeof g?g(x):g;x&&(_=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((function(e){return e})).join(" ")}(_,i),O=(0,Oe.Z)({},O,a));var E=(0,Oe.Z)({"aria-current":x&&n||null,className:_,style:O,to:o},v);return Nt!==$t?E.ref=t||y:E.innerRef=y,s().createElement(Lt,E)}))}));function Bt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ut=(0,n.Z)("div",{target:"e6w847r0",label:"SearchContainer"})("margin:0 12px;position:relative;",m.Icon,"{position:absolute;top:0;left:6px;z-index:",m.zIndex.zIndex2,";height:100%;display:flex;align-items:center;pointer-events:none;}"),zt=(0,n.Z)("div",{target:"e6w847r1",label:"InputContainer"})({name:"14s4iyf",styles:"display:flex;align-items:center;position:relative;"}),Wt=(0,n.Z)("input",{target:"e6w847r2",label:"SearchInput"})("background-color:#eff0f4;border-radius:",m.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:",m.zIndex.zIndex1,";&:focus{outline:none;box-shadow:inset 0 0 0 2px ",m.colorsRaw.blue,";}"),qt=(0,n.Z)("div",{target:"e6w847r3",label:"SuggestionsContainer"})({name:"1jke4yk",styles:"position:relative;width:100%;"}),Ht=(0,n.Z)("ul",{target:"e6w847r4",label:"Suggestions"})("position:absolute;top:6px;left:0;right:0;padding:10px 0;margin:0;list-style:none;background-color:#fff;border-radius:",m.lengths.borderRadius,";border:1px solid ",m.colors.textFieldBorder,";z-index:",m.zIndex.zIndex1,";"),Vt=(0,n.Z)("li",{target:"e6w847r5",label:"SuggestionHeader"})("padding:0 6px 6px 32px;font-size:12px;color:",m.colors.text,";"),Kt=(0,n.Z)("li",{target:"e6w847r6",label:"SuggestionItem"})((({isActive:e})=>`\n color: ${e?m.colors.active:m.colorsRaw.grayDark};\n background-color: ${e?m.colors.activeBackground:"inherit"};\n padding: 6px 6px 6px 32px;\n cursor: pointer;\n position: relative;\n\n &:hover {\n color: ${m.colors.active};\n background-color: ${m.colors.activeBackground};\n }\n`),""),Gt=(0,n.Z)("div",{target:"e6w847r7",label:"SuggestionDivider"})({name:"8atqhb",styles:"width:100%;"});class Zt extends s().Component{constructor(...e){super(...e),Bt(this,"state",{query:this.props.searchTerm,suggestionsVisible:!1,selectedCollectionIdx:this.getSelectedSelectionBasedOnProps()}),Bt(this,"submitSearch",(()=>{const{onSubmit:e,collections:t}=this.props,{selectedCollectionIdx:r,query:n}=this.state;this.toggleSuggestions(!1),-1!==r?e(n,t.toIndexedSeq().getIn([r,"name"])):e(n)})),Bt(this,"handleKeyDown",(e=>{const{suggestionsVisible:t}=this.state;"Enter"===e.key&&this.submitSearch(),t&&("Escape"===e.key&&this.toggleSuggestions(!1),"ArrowDown"===e.key?(this.selectNextSuggestion(),e.preventDefault()):"ArrowUp"===e.key&&(this.selectPreviousSuggestion(),e.preventDefault()))})),Bt(this,"handleQueryChange",(e=>{this.setState({query:e}),this.toggleSuggestions(""!==e),""===e&&this.resetSelectedSuggestion()})),Bt(this,"handleSuggestionClick",((e,t)=>{this.setState({selectedCollectionIdx:t},this.submitSearch),e.preventDefault()}))}componentDidUpdate(e){if(e.collection!==this.props.collection){const e=this.getSelectedSelectionBasedOnProps();this.setState({selectedCollectionIdx:e})}}getSelectedSelectionBasedOnProps(){const{collection:e,collections:t}=this.props;return e?t.keySeq().indexOf(e.get("name")):-1}toggleSuggestions(e){this.setState({suggestionsVisible:e})}selectNextSuggestion(){const{collections:e}=this.props,{selectedCollectionIdx:t}=this.state;this.setState({selectedCollectionIdx:Math.min(t+1,e.size-1)})}selectPreviousSuggestion(){const{selectedCollectionIdx:e}=this.state;this.setState({selectedCollectionIdx:Math.max(e-1,-1)})}resetSelectedSuggestion(){this.setState({selectedCollectionIdx:-1})}render(){const{collections:e,t}=this.props,{suggestionsVisible:r,selectedCollectionIdx:n,query:o}=this.state;return(0,D.jsx)(Ut,{onBlur:()=>this.toggleSuggestions(!1),onFocus:()=>this.toggleSuggestions(""!==o)},(0,D.jsx)(zt,null,(0,D.jsx)(m.Icon,{type:"search"}),(0,D.jsx)(Wt,{onChange:e=>this.handleQueryChange(e.target.value),onKeyDown:this.handleKeyDown,onClick:()=>this.toggleSuggestions(!0),placeholder:t("collection.sidebar.searchAll"),value:o})),r&&(0,D.jsx)(qt,null,(0,D.jsx)(Ht,null,(0,D.jsx)(Vt,null,t("collection.sidebar.searchIn")),(0,D.jsx)(Kt,{isActive:-1===n,onClick:e=>this.handleSuggestionClick(e,-1),onMouseDown:e=>e.preventDefault()},t("collection.sidebar.allCollections")),(0,D.jsx)(Gt,null),e.toIndexedSeq().map(((e,t)=>(0,D.jsx)(Kt,{key:t,isActive:t===n,onClick:e=>this.handleSuggestionClick(e,t),onMouseDown:e=>e.preventDefault()},e.get("label")))))))}}Bt(Zt,"propTypes",{collections:f().map.isRequired,collection:f().map,searchTerm:i().string.isRequired,onSubmit:i().func.isRequired,t:i().func.isRequired});const Yt=(0,c.Iu)()(Zt);var Jt=r(829),Qt=r.n(Jt),Xt=r(21023),er=r(75976),tr=r(98343),rr=r(14093);function nr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(r),!0).forEach((function(t){ir(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ir(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{addFileTemplateFields:ar}=er.stringTemplate,sr=(0,n.Z)("div",{target:"eh84wlq0",label:"NodeTitleContainer"})({name:"1n2mv2k",styles:"display:flex;justify-content:center;align-items:center;"}),lr=(0,n.Z)("div",{target:"eh84wlq1",label:"NodeTitle"})({name:"15ro776",styles:"margin-right:4px;"}),cr=(0,n.Z)("div",{target:"eh84wlq2",label:"Caret"})({name:"wmzlvu",styles:"position:relative;top:2px;"}),ur=(0,n.Z)(cr,{target:"eh84wlq3",label:"CaretDown"})(m.components.caretDown,";color:currentColor;"),fr=(0,n.Z)(cr,{target:"eh84wlq4",label:"CaretRight"})(m.components.caretRight,";color:currentColor;left:2px;"),pr=(0,n.Z)(Ft,{target:"eh84wlq5",label:"TreeNavLink"})("display:flex;font-size:14px;font-weight:500;align-items:center;padding:8px;padding-left:",(e=>20*e.depth+12),"px;border-left:2px solid #fff;",m.Icon,"{margin-right:8px;flex-shrink:0;}",(e=>(0,D.css)("&:hover,&:active,&.",e.activeClassName,"{color:",m.colors.active,";background-color:",m.colors.activeBackground,";border-left-color:#4863c6;};label:TreeNavLink;")),";");function dr(e){var t;return e.isRoot?e.title:(null===(t=e.children.find((e=>!e.isDir&&e.title)))||void 0===t?void 0:t.title)||e.title}function hr(e){const{collection:t,treeData:r,depth:n=0,onToggle:o}=e,i=t.get("name");return Qt()(r,dr).map((e=>{var r;if(e.children.length<=1&&(null===(r=e.children[0])||void 0===r||!r.isDir)&&n>0)return null;let a=`/collections/${i}`;n>0&&(a=`${a}/filter${e.path}`);const l=dr(e),c=0===n||e.children.some((e=>e.children.some((e=>e.isDir))));return(0,D.jsx)(s().Fragment,{key:e.path},(0,D.jsx)(pr,{exact:!0,to:a,activeClassName:"sidebar-active",onClick:()=>o({node:e,expanded:!e.expanded}),depth:n,"data-testid":e.path},(0,D.jsx)(m.Icon,{type:"write"}),(0,D.jsx)(sr,null,(0,D.jsx)(lr,null,l),c&&(e.expanded?(0,D.jsx)(ur,null):(0,D.jsx)(fr,null)))),e.expanded&&(0,D.jsx)(hr,{collection:t,depth:n+1,treeData:e.children,onToggle:o}))}))}function gr(e,t){return function e(r){for(const n of r)t(n),e(n.children)}(e)}function mr(e,t){const r=e.get("folder"),n=t.toJS().map((e=>or(or({},e),{},{path:e.path.slice(r.length)}))),o=n.reduce(((e,t)=>{let r=(0,Xt.dirname)(t.path);for(;!e[r]&&r&&"/"!==r;){const t=r.split(Xt.sep);e[r]=t.pop(),r=t.length&&t.join(Xt.sep)}return e}),{}),i=[{title:(e=e.getIn(["nested","summary"])?e.set("summary",e.getIn(["nested","summary"])):e.delete("summary")).get("label"),path:"/",isDir:!0,isRoot:!0},...Object.entries(o).map((([e,t])=>({title:t,path:e,isDir:!0,isRoot:!1}))),...n.map(((r,n)=>{let o=t.get(n);o=o.set("data",ar(o.get("path"),o.get("data")));const i=(0,rr.Pt)(e,o);return or(or({},r),{},{title:i,isDir:!1,isRoot:!1})}))].reduce(((e,t)=>{const r="/"===t.path?"":(0,Xt.dirname)(t.path);return e[r]?e[r].push(t):e[r]=[t],e}),{}),a=i[""].reduce((function e(t,r){const n=r;let o=[];return i[n.path]&&(o=i[n.path].reduce(e,[])),t.push(or(or({},n),{},{children:o})),t}),[]);return a}hr.propTypes={collection:f().map.isRequired,depth:i().number,treeData:i().array.isRequired,onToggle:i().func.isRequired};class yr extends s().Component{constructor(e){super(e),ir(this,"onToggle",(({node:e,expanded:t})=>{if(!this.state.selected||this.state.selected.path===e.path||t){const r=function(e,t,r){let n=!1;return function e(o){if(n)return o;for(let e=0;e<o.length;e++)if(o[e].path===t.path)return o[e]=r(t),n=!0,o;return o.forEach((t=>e(t.children))),o}([...e])}(this.state.treeData,e,(e=>or(or({},e),{},{expanded:t})));this.setState({treeData:r,selected:e,useFilter:!1})}else this.setState({selected:e,useFilter:!1})})),this.state={treeData:mr(this.props.collection,this.props.entries),selected:null,useFilter:!0}}componentDidUpdate(e){const{collection:t,entries:r,filterTerm:n}=this.props;if(t!==e.collection||r!==e.entries||n!==e.filterTerm){const e={};gr(this.state.treeData,(t=>{t.expanded&&(e[t.path]=!0)}));const o=mr(t,r),i=`/${n}`;gr(o,(t=>{(e[t.path]||this.state.useFilter&&i.startsWith(t.path))&&(t.expanded=!0)})),this.setState({treeData:o})}}render(){const{treeData:e}=this.state,{collection:t}=this.props;return(0,D.jsx)(hr,{collection:t,treeData:e,onToggle:this.onToggle})}}ir(yr,"propTypes",{collection:f().map.isRequired,entries:f().list.isRequired,filterTerm:i().string});const vr=(0,p.$j)((function(e,t){const{collection:r}=t;return{entries:(0,tr.rU)(e.entries,r)||(0,M.List)()}}),null)(yr);function br(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wr={sidebarNavLinkActive:(0,D.css)("color:",m.colors.active,";background-color:",m.colors.activeBackground,";border-left-color:#4863c6;;label:sidebarNavLinkActive;")},Sr=(0,n.Z)("aside",{target:"e1t18l340",label:"SidebarContainer"})(m.components.card,";width:250px;padding:8px 0 12px;position:fixed;max-height:calc(100vh - 112px);display:flex;flex-direction:column;"),xr=(0,n.Z)("h2",{target:"e1t18l341",label:"SidebarHeading"})("font-size:23px;font-weight:600;padding:0;margin:18px 12px 12px;color:",m.colors.textLead,";"),_r=(0,n.Z)("ul",{target:"e1t18l342",label:"SidebarNavList"})({name:"1gam4ys",styles:"margin:16px 0 0;list-style:none;overflow:auto;"}),Or=(0,n.Z)(Ft,{target:"e1t18l343",label:"SidebarNavLink"})("display:flex;font-size:14px;font-weight:500;align-items:center;padding:8px 12px;border-left:2px solid #fff;z-index:-1;",m.Icon,"{margin-right:8px;flex-shrink:0;}",(e=>(0,D.css)("&:hover,&:active,&.",e.activeClassName,"{",wr.sidebarNavLinkActive,";};label:SidebarNavLink;")),";");class Er extends s().Component{constructor(...e){super(...e),br(this,"renderLink",((e,t)=>{const r=e.get("name");return e.has("nested")?(0,D.jsx)("li",{key:r},(0,D.jsx)(vr,{collection:e,filterTerm:t,"data-testid":r})):(0,D.jsx)("li",{key:r},(0,D.jsx)(Or,{to:`/collections/${r}`,activeClassName:"sidebar-active","data-testid":r},(0,D.jsx)(m.Icon,{type:"write"}),e.get("label")))}))}render(){const{collections:e,collection:t,isSearchEnabled:r,searchTerm:n,t:o,filterTerm:i}=this.props;return(0,D.jsx)(Sr,null,(0,D.jsx)(xr,null,o("collection.sidebar.collections")),r&&(0,D.jsx)(Yt,{searchTerm:n,collections:e,collection:t,onSubmit:(e,t)=>function(e,t){t?b.m8.push(`/collections/${t}/search/${e}`):b.m8.push(`/search/${e}`)}(e,t)}),(0,D.jsx)(_r,null,e.toList().filter((e=>!0!==e.get("hide"))).map((e=>this.renderLink(e,i)))))}}br(Er,"propTypes",{collections:f().map.isRequired,collection:f().map,isSearchEnabled:i().bool,searchTerm:i().string,filterTerm:i().string,t:i().func.isRequired});const kr=(0,c.Iu)()(Er),Cr=(0,n.Z)("div",{target:"ei8nkzc0",label:"CollectionTopContainer"})(m.components.cardTop,";margin-bottom:22px;"),Tr=(0,n.Z)("div",{target:"ei8nkzc1",label:"CollectionTopRow"})({name:"1lekzkb",styles:"display:flex;align-items:center;justify-content:space-between;"}),Pr=(0,n.Z)("h1",{target:"ei8nkzc2",label:"CollectionTopHeading"})(m.components.cardTopHeading,";"),jr=(0,n.Z)(Lt,{target:"ei8nkzc3",label:"CollectionTopNewButton"})(m.buttons.button,";",m.shadows.dropDeep,";",m.buttons.default,";",m.buttons.gray,";padding:0 30px;"),Rr=(0,n.Z)("p",{target:"ei8nkzc4",label:"CollectionTopDescription"})(m.components.cardTopDescription,";margin-bottom:0;");function Ar({collection:e,newEntryUrl:t,t:r}){const{collectionLabel:n,collectionLabelSingular:o,collectionDescription:i}=function(e){return{collectionLabel:e.get("label"),collectionLabelSingular:e.get("label_singular"),collectionDescription:e.get("description")}}(e);return(0,D.jsx)(Cr,null,(0,D.jsx)(Tr,null,(0,D.jsx)(Pr,null,n),t?(0,D.jsx)(jr,{to:t},r("collection.collectionTop.newButton",{collectionLabel:o||n})):null),i?(0,D.jsx)(Rr,null,i):null)}Ar.propTypes={collection:f().map.isRequired,newEntryUrl:i().string,t:i().func.isRequired};const Mr=(0,c.Iu)()(Ar);var Ir=r(83465),Dr=r.n(Ir),Lr=r(69217),Nr=r(31620),$r=r(93854),Fr=r(26369),Br=r(40510);function Ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(r),!0).forEach((function(t){Wr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qr=(0,n.Z)("li",{target:"effeus40",label:"ListCard"})(m.components.card,";width:",m.lengths.topCardWidth,";margin-left:12px;margin-bottom:10px;overflow:hidden;"),Hr=(0,n.Z)(Lt,{target:"effeus41",label:"ListCardLink"})("display:block;max-width:100%;padding:16px 22px;&:hover{background-color:",m.colors.foreground,";}"),Vr=(0,n.Z)("li",{target:"effeus42",label:"GridCard"})(m.components.card,";flex:0 0 335px;height:240px;overflow:hidden;margin-left:12px;margin-bottom:16px;"),Kr=(0,n.Z)(Lt,{target:"effeus43",label:"GridCardLink"})("display:block;height:100%;outline-offset:-2px;&,&:hover{background-color:",m.colors.foreground,";color:",m.colors.text,";}"),Gr=(0,n.Z)("h2",{target:"effeus44",label:"CollectionLabel"})("font-size:12px;color:",m.colors.textLead,";text-transform:uppercase;"),Zr=(0,n.Z)("h2",{target:"effeus45",label:"ListCardTitle"})({name:"gx0lhm",styles:"margin-bottom:0;"}),Yr=(0,n.Z)("h2",{target:"effeus46",label:"CardHeading"})({name:"1kpnu25",styles:"margin:0 0 2px;"}),Jr=(0,n.Z)("div",{target:"effeus47",label:"CardBody"})("padding:16px 22px;height:90px;position:relative;margin-bottom:",(e=>e.hasImage&&0),";&:after{content:'';position:absolute;display:block;z-index:",m.zIndex.zIndex1,";bottom:0;left:-20%;height:140%;width:140%;box-shadow:inset 0 -15px 24px ",m.colorsRaw.white,";}"),Qr=(0,n.Z)("div",{target:"effeus48",label:"CardImage"})("background-image:url(",(e=>e.src),");background-position:center center;background-size:cover;background-repeat:no-repeat;height:150px;"),Xr=(0,p.$j)((function(e,t){var r;const{entry:n,inferedFields:o,collection:i}=t,a=n.get("data"),s=(0,rr.Pt)(i,n);let l=a.get(o.imageField);l&&(l=encodeURI(l));const c=(0,Br.B)(e.medias);return{summary:s,path:`/collections/${i.get("name")}/entries/${n.get("slug")}`,image:l,imageFolder:null===(r=i.get("fields"))||void 0===r?void 0:r.find((e=>e.get("name")===o.imageField&&"image"===e.get("widget"))),isLoadingAsset:c}}),(function(e){return{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)}}),(function(e,t,r){return zr(zr(zr(zr({},e),t),r),{},{getAsset:t.boundGetAsset(r.collection,r.entry)})}))((function({path:e,summary:t,image:r,imageField:n,collectionLabel:o,viewStyle:i=Fr.A,getAsset:a}){return i===Fr.A?(0,D.jsx)(qr,null,(0,D.jsx)(Hr,{to:e},o?(0,D.jsx)(Gr,null,o):null,(0,D.jsx)(Zr,null,t))):i===Fr.n?(0,D.jsx)(Vr,null,(0,D.jsx)(Kr,{to:e},(0,D.jsx)(Jr,{hasImage:r},o?(0,D.jsx)(Gr,null,o):null,(0,D.jsx)(Yr,null,t)),r?(0,D.jsx)(Qr,{src:a(r,n).toString()}):null)):void 0}));function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},en.apply(this,arguments)}function tn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rn=(0,n.Z)("ul",{target:"etq0ss00",label:"CardsGrid"})({name:"c1vo2d",styles:"display:flex;flex-flow:row wrap;list-style-type:none;margin-left:-12px;margin-top:16px;margin-bottom:16px;"});class nn extends s().Component{constructor(...e){super(...e),tn(this,"hasMore",(()=>{var e,t;return null===(e=this.props.cursor)||void 0===e||null===(t=e.actions)||void 0===t?void 0:t.has("append_next")})),tn(this,"handleLoadMore",(()=>{this.hasMore()&&this.props.handleCursorActions("append_next")})),tn(this,"inferFields",(e=>{const t=(0,rr.GK)(e,"title"),r=(0,rr.GK)(e,"description"),n=(0,rr.GK)(e,"image"),o=(0,rr.LY)(e),i=[t,r,n];return{titleField:t,descriptionField:r,imageField:n,remainingFields:o&&o.filter((e=>-1===i.indexOf(e.get("name"))))}})),tn(this,"renderCardsForSingleCollection",(()=>{const{collections:e,entries:t,viewStyle:r}=this.props,n={collection:e,inferedFields:this.inferFields(e),viewStyle:r};return t.map(((e,t)=>(0,D.jsx)(Xr,en({},n,{entry:e,key:t}))))})),tn(this,"renderCardsForMultipleCollections",(()=>{const{collections:e,entries:t}=this.props,r=1===e.size;return t.map(((t,n)=>{const o=t.get("collection"),i=e.find((e=>e.get("name")===o)),a=!r&&i.get("label"),s={collection:i,entry:t,inferedFields:this.inferFields(i),collectionLabel:a};return(0,D.jsx)(Xr,en({},s,{key:n}))}))}))}render(){const{collections:e,page:t}=this.props;return(0,D.jsx)("div",null,(0,D.jsx)(rn,null,M.Map.isMap(e)?this.renderCardsForSingleCollection():this.renderCardsForMultipleCollections(),this.hasMore()&&(0,D.jsx)(_e,{key:t,onEnter:this.handleLoadMore})))}}tn(nn,"propTypes",{collections:f().iterable.isRequired,entries:f().list,viewStyle:i().string,cursor:i().any.isRequired,handleCursorActions:i().func.isRequired,page:i().number});const on=(0,n.Z)("div",{target:"e1d0i3na0",label:"PaginationMessage"})("width:",m.lengths.topCardWidth,";padding:16px;text-align:center;"),an=(0,n.Z)(on,{target:"e1d0i3na1",label:"NoEntriesMessage"})({name:"1yuhvjn",styles:"margin-top:16px;"});function sn({collections:e,entries:t,isFetching:r,viewStyle:n,cursor:o,handleCursorActions:i,t:a,page:l}){var c;const u=[a("collection.entries.loadingEntries"),a("collection.entries.cachingEntries"),a("collection.entries.longerLoading")];return r&&void 0===l?(0,D.jsx)(m.Loader,{active:!0},u):t&&t.size>0||(null==o||null===(c=o.actions)||void 0===c?void 0:c.has("append_next"))?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(nn,{collections:e,entries:t,viewStyle:n,cursor:o,handleCursorActions:i,page:l}),r&&void 0!==l&&t.size>0?(0,D.jsx)(on,null,a("collection.entries.loadingEntries")):null):(0,D.jsx)(an,null,a("collection.entries.noEntries"))}sn.propTypes={collections:f().iterable.isRequired,entries:f().list,page:i().number,isFetching:i().bool,viewStyle:i().string,cursor:i().any.isRequired,handleCursorActions:i().func.isRequired,t:i().func.isRequired};const ln=(0,c.Iu)()(sn);function cn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const un=(0,n.Z)("h2",{target:"eucqz2q0",label:"GroupHeading"})("font-size:23px;font-weight:600;color:",m.colors.textLead,";"),fn=(0,n.Z)("div",{target:"eucqz2q1",label:"GroupContainer"})("");function pn(e,t){return e.filter((e=>t.has(e.get("path"))))}class dn extends s().Component{constructor(...e){super(...e),cn(this,"handleCursorActions",((e,t)=>{const{collection:r,traverseCollectionCursor:n}=this.props;n(r,t)}))}componentDidMount(){const{collection:e,entriesLoaded:t,loadEntries:r}=this.props;e&&!t&&r(e)}componentDidUpdate(e){const{collection:t,entriesLoaded:r,loadEntries:n}=this.props;t===e.collection||r||n(t)}render(){const{collection:e,entries:t,groups:r,isFetching:n,viewStyle:o,cursor:i,page:a,t:s}=this.props,l=({entries:t})=>(0,D.jsx)(ln,{collections:e,entries:t,isFetching:n,collectionName:e.get("label"),viewStyle:o,cursor:i,handleCursorActions:Dr()(this.handleCursorActions,i),page:a});return r&&r.length>0?function(e,t,r,n){return e.map((e=>{const o=function(e,t){const{label:r,value:n}=e;return void 0===n?t("collection.groups.other"):"boolean"==typeof n?n?r:t("collection.groups.negateLabel",{label:r}):`${r} ${n}`.trim()}(e,n);return(0,D.jsx)(fn,{key:e.id,id:e.id},(0,D.jsx)(un,null,o),(0,D.jsx)(r,{entries:pn(t,e.paths)}))}))}(r,t,l,s):(0,D.jsx)(l,{entries:t})}}cn(dn,"propTypes",{collection:f().map.isRequired,page:i().number,entries:f().list,groups:i().array,isFetching:i().bool.isRequired,viewStyle:i().string,cursor:i().object.isRequired,loadEntries:i().func.isRequired,traverseCollectionCursor:i().func.isRequired,entriesLoaded:i().bool});const hn={loadEntries:Lr.Jw,traverseCollectionCursor:Lr.$L},gn=(0,p.$j)((function(e,t){const{collection:r,viewStyle:n,filterTerm:o}=t,i=e.entries.getIn(["pages",r.get("name"),"page"]);let a=(0,tr.rU)(e.entries,r);const s=(0,tr.Gr)(e.entries,r);r.has("nested")&&(a=function(e,t,r){return r.filter((r=>{const n=r.get("path").slice(t.length+1);return!!n.startsWith(e)&&(e?2===n.slice(e.length+1).split("/").length:n.split("/").length<=2)}))}(o||"",r.get("folder"),a));const l=(0,tr.D_)(e.entries,r.get("name")),c=(0,tr.pT)(e.entries,r.get("name")),u=(0,Nr.k)(e.cursors,r.get("name"));return{collection:r,page:i,entries:a,groups:s,entriesLoaded:l,isFetching:c,viewStyle:n,cursor:P.Cursor.create(u).clearData()}}),hn)(dn),mn=(0,c.Iu)()(gn);var yn=r(18149),vn=r.n(yn),bn=r(93324),wn=r(57655);function Sn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class xn extends s().Component{constructor(...e){super(...e),Sn(this,"getCursor",(()=>{const{page:e}=this.props;return P.Cursor.create({actions:isNaN(e)?[]:["append_next"]})})),Sn(this,"handleCursorActions",(e=>{const{page:t,searchTerm:r,searchEntries:n,collectionNames:o}=this.props;"append_next"===e&&n(r,o,t+1)}))}componentDidMount(){const{searchTerm:e,searchEntries:t,collectionNames:r}=this.props;t(e,r)}componentDidUpdate(e){const{searchTerm:t,collectionNames:r}=this.props;if(e.searchTerm===t&&vn()(e.collectionNames,r))return;const{searchEntries:n}=e;n(t,r)}componentWillUnmount(){this.props.clearSearch()}render(){const{collections:e,entries:t,isFetching:r}=this.props;return(0,D.jsx)(ln,{cursor:this.getCursor(),handleCursorActions:this.handleCursorActions,collections:e,entries:t,isFetching:r})}}Sn(xn,"propTypes",{isFetching:i().bool,searchEntries:i().func.isRequired,clearSearch:i().func.isRequired,searchTerm:i().string.isRequired,collections:f().seq,collectionNames:i().array,entries:f().list,page:i().number});const _n={searchEntries:wn.Pu,clearSearch:wn.AQ},On=(0,p.$j)((function(e,t){const{searchTerm:r}=t,n=t.collections.toIndexedSeq(),o=t.collections.keySeq().toArray();return{isFetching:e.search.isFetching,page:e.search.page,collections:n,collectionNames:o,entries:(0,bn.hq)(e,o),searchTerm:r}}),_n)(xn),En=(0,n.Z)("div",{target:"evv1i7c0",label:"ViewControlsSection"})({name:"nuh2uw",styles:"display:flex;align-items:center;justify-content:flex-end;max-width:500px;"}),kn=(0,n.Z)("button",{target:"evv1i7c1",label:"ViewControlsButton"})(m.buttons.button,";color:",(e=>e.isActive?m.colors.active:"#b3b9c4"),";background-color:transparent;display:block;padding:0;margin:0 4px;&:last-child{margin-right:0;}",m.Icon,"{display:block;}"),Cn=function({viewStyle:e,onChangeViewStyle:t}){return(0,D.jsx)(En,null,(0,D.jsx)(kn,{isActive:e===Fr.A,onClick:()=>t(Fr.A)},(0,D.jsx)(m.Icon,{type:"list"})),(0,D.jsx)(kn,{isActive:e===Fr.n,onClick:()=>t(Fr.n)},(0,D.jsx)(m.Icon,{type:"grid"})))};var Tn=r(38793);const Pn=(0,n.Z)(m.StyledDropdownButton,{target:"e1obtllk0",label:"Button"})(m.buttons.button,";",m.buttons.medium,";",m.buttons.grayText,";font-size:14px;&:after{top:11px;}");function jn({active:e,title:t}){return(0,D.jsx)(Pn,{css:(0,D.css)("color:",e?m.colors.active:void 0,";;label:ControlButton;")},t)}function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rn.apply(this,arguments)}const An={[Tn.S.Ascending]:"up",[Tn.S.Descending]:"down"},Mn=(0,c.Iu)()((function({t:e,fields:t,onSortClick:r,sort:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>e.direction!==Tn.S.None));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:e("collection.collectionTop.sortBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},t.map((e=>{const t=null==n?void 0:n.getIn([e.key,"direction"]),o=t&&t!==Tn.S.None,i=function(e){switch(e){case Tn.S.Ascending:return Tn.S.Descending;case Tn.S.Descending:return Tn.S.None;default:return Tn.S.Ascending}}(t);return(0,D.jsx)(m.DropdownItem,Rn({key:e.key,label:e.label,onClick:()=>r(e.key,i),isActive:o},o&&function(e){return{icon:"chevron",iconDirection:An[e],iconSmall:!0}}(t)))})))})),In=(0,c.Iu)()((function({viewFilters:e,t,onFilterClick:r,filter:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>!0===e.active));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:t("collection.collectionTop.filterBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownPosition:"left"},e.map((e=>(0,D.jsx)(m.DropdownCheckedItem,{key:e.id,label:e.label,id:e.id,checked:n.getIn([e.id,"active"],!1),onClick:()=>r(e)}))))})),Dn=(0,c.Iu)()((function({viewGroups:e,t,onGroupClick:r,group:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>!0===e.active));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:t("collection.collectionTop.groupBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},e.map((e=>(0,D.jsx)(m.DropdownItem,{key:e.id,label:e.label,onClick:()=>r(e),isActive:n.getIn([e.id,"active"],!1)}))))})),Ln=(0,n.Z)("div",{target:"emfmed70",label:"CollectionControlsContainer"})("display:flex;align-items:center;flex-direction:row-reverse;margin-top:22px;width:",m.lengths.topCardWidth,";max-width:100%;& > div{margin-left:6px;}"),Nn=function({viewStyle:e,onChangeViewStyle:t,sortableFields:r,onSortClick:n,sort:o,viewFilters:i,viewGroups:a,onFilterClick:s,onGroupClick:l,t:c,filter:u,group:f}){return(0,D.jsx)(Ln,null,(0,D.jsx)(Cn,{viewStyle:e,onChangeViewStyle:t}),a.length>0&&(0,D.jsx)(Dn,{viewGroups:a,onGroupClick:l,t:c,group:f}),i.length>0&&(0,D.jsx)(In,{viewFilters:i,onFilterClick:s,t:c,filter:u}),r.length>0&&(0,D.jsx)(Mn,{fields:r,sort:o,onSortClick:n}))};function $n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$n(Object(r),!0).forEach((function(t){Bn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Un=(0,n.Z)("div",{target:"e1sogrfi0",label:"CollectionContainer"})("margin:",m.lengths.pageMargin,";"),zn=(0,n.Z)("main",{target:"e1sogrfi1",label:"CollectionMain"})({name:"1r4jzjw",styles:"padding-left:280px;"}),Wn=(0,n.Z)("div",{target:"e1sogrfi2",label:"SearchResultContainer"})(m.components.cardTop,";margin-bottom:22px;"),qn=(0,n.Z)("h1",{target:"e1sogrfi3",label:"SearchResultHeading"})(m.components.cardTopHeading,";");class Hn extends s().Component{constructor(...e){super(...e),Bn(this,"renderEntriesCollection",(()=>{const{collection:e,filterTerm:t,viewStyle:r}=this.props;return(0,D.jsx)(mn,{collection:e,viewStyle:r,filterTerm:t})})),Bn(this,"renderEntriesSearch",(()=>{const{searchTerm:e,collections:t,collection:r,isSingleSearchResult:n}=this.props;return(0,D.jsx)(On,{collections:n?t.filter((e=>e===r)):t,searchTerm:e})}))}render(){const{collection:e,collections:t,collectionName:r,isSearchEnabled:n,isSearchResults:o,isSingleSearchResult:i,searchTerm:a,sortableFields:l,onSortClick:c,sort:u,viewFilters:f,viewGroups:p,filterTerm:d,t:h,onFilterClick:g,onGroupClick:m,filter:y,group:v,onChangeViewStyle:b,viewStyle:S}=this.props;let x=e.get("create")?(0,w.f7)(r):"";x&&d&&(x=(0,w.f7)(r),d&&(x=`${x}?path=${d}`));const _="collection.collectionTop.searchResults"+(i?"InCollection":"");return(0,D.jsx)(Un,null,(0,D.jsx)(kr,{collections:t,collection:(!o||i)&&e,isSearchEnabled:n,searchTerm:a,filterTerm:d}),(0,D.jsx)(zn,null,o?(0,D.jsx)(Wn,null,(0,D.jsx)(qn,null,h(_,{searchTerm:a,collection:e.get("label")}))):(0,D.jsx)(s().Fragment,null,(0,D.jsx)(Mr,{collection:e,newEntryUrl:x}),(0,D.jsx)(Nn,{viewStyle:S,onChangeViewStyle:b,sortableFields:l,onSortClick:c,sort:u,viewFilters:f,viewGroups:p,t:h,onFilterClick:g,onGroupClick:m,filter:y,group:v})),o?this.renderEntriesSearch():this.renderEntriesCollection()))}}Bn(Hn,"propTypes",{searchTerm:i().string,collectionName:i().string,isSearchResults:i().bool,isSingleSearchResult:i().bool,collection:f().map.isRequired,collections:f().map.isRequired,sortableFields:i().array,sort:f().orderedMap,onSortClick:i().func.isRequired});const Vn={sortByField:Lr.L1,filterByField:Lr.wu,changeViewStyle:Lr.pK,groupByField:Lr.YU},Kn=(0,p.$j)((function(e,t){const{collections:r}=e,n=e.config&&0!=e.config.search,{isSearchResults:o,match:i,t:a}=t,{name:s,searchTerm:l="",filterTerm:c=""}=i.params,u=s?r.get(s):r.first(),f=(0,tr.GO)(e.entries,u.get("name")),p=(0,rr.w7)(u,a),d=(0,rr.SQ)(u),h=(0,rr.WK)(u),g=(0,tr.qT)(e.entries,u.get("name")),m=(0,tr.xI)(e.entries,u.get("name"));return{collection:u,collections:r,collectionName:s,isSearchEnabled:n,isSearchResults:o,searchTerm:l,filterTerm:c,sort:f,sortableFields:p,viewFilters:d,viewGroups:h,filter:g,group:m,viewStyle:(0,tr.IG)(e.entries)}}),Vn,(function(e,t,r){return Fn(Fn(Fn({},e),r),{},{onSortClick:(r,n)=>t.sortByField(e.collection,r,n),onFilterClick:r=>t.filterByField(e.collection,r),onGroupClick:r=>t.groupByField(e.collection,r),onChangeViewStyle:e=>t.changeViewStyle(e)})}))(Hn),Gn=(0,c.Iu)()(Kn);var Zn=r(31464),Yn=r(18815),Jn=r.n(Yn);const Qn={text:{name:"1v21rim-text",styles:"font-size:13px;font-weight:normal;margin-top:4px;;label:text;"},button:(0,D.css)(m.buttons.button,";width:auto;flex:1 0 0;font-size:13px;padding:6px 0;;label:button;")},Xn=(0,n.Z)(Lt,{target:"ewffzyy0",label:"WorkflowLink"})({name:"xe15uv",styles:"display:block;padding:0 18px 18px;height:200px;overflow:hidden;"}),eo=(0,n.Z)("div",{target:"ewffzyy1",label:"CardCollection"})("font-size:14px;color:",m.colors.textLead,";text-transform:uppercase;margin-top:12px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),to=(0,n.Z)("h2",{target:"ewffzyy2",label:"CardTitle"})("margin:28px 0 0;color:",m.colors.textLead,";"),ro=(0,n.Z)("div",{target:"ewffzyy3",label:"CardDateContainer"})(Qn.text,";"),no=(0,n.Z)("p",{target:"ewffzyy4",label:"CardBody"})(Qn.text,";color:",m.colors.text,";margin:24px 0 0;overflow-wrap:break-word;word-break:break-word;hyphens:auto;"),oo=(0,n.Z)("div",{target:"ewffzyy5",label:"CardButtonContainer"})("background-color:",m.colors.foreground,";position:absolute;bottom:0;width:100%;padding:12px 18px;display:flex;opacity:0;transition:opacity ",m.transitions.main,";cursor:pointer;"),io=(0,n.Z)("button",{target:"ewffzyy6",label:"DeleteButton"})(Qn.button,";background-color:",m.colorsRaw.redLight,";color:",m.colorsRaw.red,";margin-right:6px;"),ao=(0,n.Z)("button",{target:"ewffzyy7",label:"PublishButton"})(Qn.button,";background-color:",m.colorsRaw.teal,";color:",m.colors.textLight,";margin-left:6px;&[disabled]{",m.buttons.disabled,";}"),so=(0,n.Z)("div",{target:"ewffzyy8",label:"WorkflowCardContainer"})(m.components.card,";margin-bottom:24px;position:relative;overflow:hidden;&:hover ",oo,"{opacity:1;}"),lo=(0,c.Iu)()((({t:e,date:t,author:r})=>{const n=function(e,t){return e&&t?"lastChange":e?"lastChangeNoAuthor":t?"lastChangeNoDate":void 0}(t,r);if(n)return(0,D.jsx)(ro,null,e(`workflow.workflowCard.${n}`,{date:t,author:r}))}));function co({collectionLabel:e,title:t,authorLastChange:r,body:n,isModification:o,editLink:i,timestamp:a,onDelete:s,allowPublish:l,canPublish:c,onPublish:u,postAuthor:f,t:p}){return(0,D.jsx)(so,null,(0,D.jsx)(Xn,{to:i},(0,D.jsx)(eo,null,e),f,(0,D.jsx)(to,null,t),(a||r)&&(0,D.jsx)(lo,{date:a,author:r}),(0,D.jsx)(no,null,n)),(0,D.jsx)(oo,null,(0,D.jsx)(io,{onClick:s},p(o?"workflow.workflowCard.deleteChanges":"workflow.workflowCard.deleteNewEntry")),l&&(0,D.jsx)(ao,{disabled:!c,onClick:u},p(o?"workflow.workflowCard.publishChanges":"workflow.workflowCard.publishNewEntry"))))}co.propTypes={collectionLabel:i().string.isRequired,title:i().string,authorLastChange:i().string,body:i().string,isModification:i().bool,editLink:i().string.isRequired,timestamp:i().string.isRequired,onDelete:i().func.isRequired,allowPublish:i().bool.isRequired,canPublish:i().bool.isRequired,onPublish:i().func.isRequired,postAuthor:i().string,t:i().func.isRequired};const uo=(0,c.Iu)()(co);function fo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const po=(0,n.Z)("div",{target:"e190xgae0",label:"WorkflowListContainer"})({name:"1booyhj",styles:"min-height:60%;display:grid;grid-template-columns:33.3% 33.3% 33.3%;"}),ho=(0,n.Z)("div",{target:"e190xgae1",label:"WorkflowListContainerOpenAuthoring"})({name:"1q1dzdp",styles:"min-height:60%;display:grid;grid-template-columns:50% 50% 0%;"});var go={name:"qbubgm",styles:"margin-left:0;"},mo={name:"1xzanuf",styles:"margin-right:0;"};const yo={columnPosition:e=>0===e&&go||2===e&&mo||(0,D.css)("&:before,&:after{content:'';display:block;position:absolute;width:2px;height:80%;top:76px;background-color:",m.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,D.css)("border-color:",m.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;"}},vo=(0,n.Z)("h2",{target:"e190xgae2",label:"ColumnHeader"})("font-size:20px;font-weight:normal;padding:4px 14px;border-radius:",m.lengths.borderRadius,";margin-bottom:28px;",(e=>"draft"===e.name&&(0,D.css)("background-color:",m.colors.statusDraftBackground,";color:",m.colors.statusDraftText,";;label:ColumnHeader;"))," ",(e=>"pending_review"===e.name&&(0,D.css)("background-color:",m.colors.statusReviewBackground,";color:",m.colors.statusReviewText,";;label:ColumnHeader;"))," ",(e=>"pending_publish"===e.name&&(0,D.css)("background-color:",m.colors.statusReadyBackground,";color:",m.colors.statusReadyText,";;label:ColumnHeader;")),""),bo=(0,n.Z)("p",{target:"e190xgae3",label:"ColumnCount"})("font-size:13px;font-weight:500;color:",m.colors.text,";text-transform:uppercase;margin-bottom:6px;"),wo="cms-workflow";class So extends s().Component{constructor(...e){super(...e),fo(this,"handleChangeStatus",((e,t)=>{const r=t.slug,n=t.collection,o=t.ownStatus;this.props.handleChangeStatus(n,r,o,e)})),fo(this,"requestDelete",((e,t,r)=>{window.confirm(this.props.t("workflow.workflowList.onDeleteEntry"))&&this.props.handleDelete(e,t,r)})),fo(this,"requestPublish",((e,t,r)=>{r===Ct.i7.last()?window.confirm(this.props.t("workflow.workflowList.onPublishEntry"))&&this.props.handlePublish(e,t):window.alert(this.props.t("workflow.workflowList.onPublishingNotReadyEntry"))})),fo(this,"renderColumns",((e,t)=>{const{isOpenAuthoring:r,collections:n,t:o}=this.props;return e?t?(0,D.jsx)("div",null,e.map((e=>{const t=Jn()(e.get("updatedOn")).format(o("workflow.workflow.dateFormat")),r=e.get("slug"),i=e.get("collection"),a=`collections/${i}/entries/${r}?ref=workflow`,s=e.get("status"),l=n.find((e=>e.get("name")===i)),c=null==l?void 0:l.get("label"),u=e.get("isModification"),f=null==l?void 0:l.get("publish"),p=s===Ct.i7.last()&&!e.get("isPersisting",!1),d=e.get("author");return(0,D.jsx)(I.Ej,{namespace:wo,key:`${i}-${r}`,slug:r,collection:i,ownStatus:s},(n=>n((0,D.jsx)("div",null,(0,D.jsx)(uo,{collectionLabel:c||i,title:(0,rr.Pt)(l,e),authorLastChange:e.getIn(["metaData","user"]),body:e.getIn(["data","body"]),isModification:u,editLink:a,timestamp:t,onDelete:this.requestDelete.bind(this,i,r,s),allowPublish:f,canPublish:p,onPublish:this.requestPublish.bind(this,i,r,s),postAuthor:d})))))}))):e.entrySeq().map((([e,t],n)=>(0,D.jsx)(I.GR,{namespace:wo,key:e,onDrop:this.handleChangeStatus.bind(this,e)},((o,{isHovered:i})=>o((0,D.jsx)("div",{style:{height:"100%"}},(0,D.jsx)("div",{css:(0,D.css)([yo.column,yo.columnPosition(n),i&&yo.columnHovered,r&&"pending_publish"===e&&yo.hiddenColumn,r&&"pending_review"===e&&yo.hiddenRightBorder],";label:WorkflowList;")},(0,D.jsx)(vo,{name:e},function(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,D.jsx)(bo,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?ho:po;return(0,D.jsx)(t,null,e)}}fo(So,"propTypes",{entries:f().orderedMap,handleChangeStatus:i().func.isRequired,handlePublish:i().func.isRequired,handleDelete:i().func.isRequired,t:i().func.isRequired,isOpenAuthoring:i().bool,collections:f().map.isRequired});const xo=(0,I.XK)((0,c.Iu)()(So)),_o=(0,n.Z)("div",{target:"e1t9l5ui0",label:"WorkflowContainer"})("padding:",m.lengths.pageMargin," 0;height:100vh;"),Oo=(0,n.Z)("div",{target:"e1t9l5ui1",label:"WorkflowTop"})(m.components.cardTop,";"),Eo=(0,n.Z)("div",{target:"e1t9l5ui2",label:"WorkflowTopRow"})("display:flex;justify-content:space-between;span[role='button']{",m.shadows.dropDeep,";}"),ko=(0,n.Z)("h1",{target:"e1t9l5ui3",label:"WorkflowTopHeading"})(m.components.cardTopHeading,";"),Co=(0,n.Z)("p",{target:"e1t9l5ui4",label:"WorkflowTopDescription"})(m.components.cardTopDescription,";");class To extends a.Component{componentDidMount(){const{loadUnpublishedEntries:e,isEditorialWorkflow:t,collections:r}=this.props;t&&e(r)}render(){const{isEditorialWorkflow:e,isOpenAuthoring:t,isFetching:r,unpublishedEntries:n,updateUnpublishedEntryStatus:o,publishUnpublishedEntry:i,deleteUnpublishedEntry:a,collections:s,t:l}=this.props;if(!e)return null;if(r)return(0,D.jsx)(m.Loader,{active:!0},l("workflow.workflow.loading"));const c=n.get("pending_review").size,u=n.get("pending_publish").size;return(0,D.jsx)(_o,null,(0,D.jsx)(Oo,null,(0,D.jsx)(Eo,null,(0,D.jsx)(ko,null,l("workflow.workflow.workflowHeading")),(0,D.jsx)(m.Dropdown,{dropdownWidth:"160px",dropdownPosition:"left",dropdownTopOverlap:"40px",renderButton:()=>(0,D.jsx)(m.StyledDropdownButton,null,l("workflow.workflow.newPost"))},s.filter((e=>e.get("create"))).toList().map((e=>(0,D.jsx)(m.DropdownItem,{key:e.get("name"),label:e.get("label"),onClick:()=>S(e.get("name"))}))))),(0,D.jsx)(Co,null,l("workflow.workflow.description",{smart_count:c,readyCount:u}))),(0,D.jsx)(xo,{entries:n,handleChangeStatus:o,handlePublish:i,handleDelete:a,isOpenAuthoring:t,collections:s}))}}var Po,jo,Ro;Po=To,jo="propTypes",Ro={collections:f().map.isRequired,isEditorialWorkflow:i().bool.isRequired,isOpenAuthoring:i().bool,isFetching:i().bool,unpublishedEntries:f().map,loadUnpublishedEntries:i().func.isRequired,updateUnpublishedEntryStatus:i().func.isRequired,publishUnpublishedEntry:i().func.isRequired,deleteUnpublishedEntry:i().func.isRequired,t:i().func.isRequired},(jo=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(jo))in Po?Object.defineProperty(Po,jo,{value:Ro,enumerable:!0,configurable:!0,writable:!0}):Po[jo]=Ro;const Ao=(0,p.$j)((function(e){const{collections:t,config:r,globalUI:n}=e,o=r.publish_mode===Ct.S0,i={collections:t,isEditorialWorkflow:o,isOpenAuthoring:n.useOpenAuthoring};return o&&(i.isFetching=e.editorialWorkflow.getIn(["pages","isFetching"],!1),i.unpublishedEntries=Ct.i7.reduce(((t,r)=>{const n=(0,bn.GG)(e,r);return t.set(r,n)}),(0,M.OrderedMap)())),i}),{loadUnpublishedEntries:Zn.Yh,updateUnpublishedEntryStatus:Zn.JY,publishUnpublishedEntry:Zn.Ts,deleteUnpublishedEntry:Zn.Ty})((0,c.Iu)()(To));var Mo=r(54073),Io=r.n(Mo),Do=r(86384),Lo=r(25473),No=r.n(Lo),$o=r(46847);function Fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Uo(e,t,r){return t&&Bo(e.prototype,t),r&&Bo(e,r),e}function zo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wo(Object(r),!0).forEach((function(t){zo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ho(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ko(e,t)}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}function Ko(e,t){return Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ko(e,t)}function Go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zo(e){return function(){var t,r=Vo(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=Vo(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Go(e):t}(this,t)}}var Yo=function(e){Ho(r,e);var t=Zo(r);function r(){return Fo(this,r),t.apply(this,arguments)}return Uo(r,[{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,n=e.split,o=e.style,i=e.size,a=e.eleRef,l=["Pane",n,r],c={flex:1,position:"relative",outline:"none"};return void 0!==i&&("vertical"===n?c.width=i:(c.height=i,c.display="flex"),c.flex="none"),c=Object.assign({},c,o||{}),s().createElement("div",{ref:a,className:l.join(" "),style:c},t)}}]),r}(s().PureComponent);Yo.propTypes={className:i().string.isRequired,children:i().node.isRequired,size:i().oneOfType([i().string,i().number]),split:i().oneOf(["vertical","horizontal"]),style:No(),eleRef:i().func},Yo.defaultProps={};var Jo="Resizer",Qo=function(e){Ho(r,e);var t=Zo(r);function r(){return Fo(this,r),t.apply(this,arguments)}return Uo(r,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.onClick,n=e.onDoubleClick,o=e.onMouseDown,i=e.onTouchEnd,a=e.onTouchStart,l=e.resizerClassName,c=e.split,u=e.style,f=[l,c,t];return s().createElement("span",{role:"presentation",className:f.join(" "),style:u,onMouseDown:function(e){return o(e)},onTouchStart:function(e){e.preventDefault(),a(e)},onTouchEnd:function(e){e.preventDefault(),i(e)},onClick:function(e){r&&(e.preventDefault(),r(e))},onDoubleClick:function(e){n&&(e.preventDefault(),n(e))}})}}]),r}(s().Component);function Xo(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function ei(e,t,r,n){if("number"==typeof n){var o="number"==typeof t?t:0,i="number"==typeof r&&r>=0?r:1/0;return Math.max(o,Math.min(i,n))}return void 0!==e?e:t}Qo.propTypes={className:i().string.isRequired,onClick:i().func,onDoubleClick:i().func,onMouseDown:i().func.isRequired,onTouchStart:i().func.isRequired,onTouchEnd:i().func.isRequired,split:i().oneOf(["vertical","horizontal"]),style:No(),resizerClassName:i().string.isRequired},Qo.defaultProps={resizerClassName:Jo};var ti=function(e){Ho(r,e);var t=Zo(r);function r(e){var n;Fo(this,r),(n=t.call(this,e)).onMouseDown=n.onMouseDown.bind(Go(n)),n.onTouchStart=n.onTouchStart.bind(Go(n)),n.onMouseMove=n.onMouseMove.bind(Go(n)),n.onTouchMove=n.onTouchMove.bind(Go(n)),n.onMouseUp=n.onMouseUp.bind(Go(n));var o=e.size,i=e.defaultSize,a=e.minSize,s=e.maxSize,l=e.primary,c=void 0!==o?o:ei(i,a,s,null);return n.state={active:!1,resized:!1,pane1Size:"first"===l?c:void 0,pane2Size:"second"===l?c:void 0,instanceProps:{size:o}},n}return Uo(r,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(r.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,r=t.allowResize,n=t.onDragStarted,o=t.split;if(r){Xo(document,window);var i="vertical"===o?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof n&&n(),this.setState({active:!0,position:i})}}},{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,r=t.allowResize,n=t.maxSize,o=t.minSize,i=t.onChange,a=t.split,s=t.step,l=this.state,c=l.active,u=l.position;if(r&&c){Xo(document,window);var f="first"===this.props.primary,p=f?this.pane1:this.pane2,d=f?this.pane2:this.pane1;if(p){var h=p,g=d;if(h.getBoundingClientRect){var m=h.getBoundingClientRect().width,y=h.getBoundingClientRect().height,v="vertical"===a?m:y,b=u-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(b)<s)return;b=~~(b/s)*s}var w=f?b:-b;parseInt(window.getComputedStyle(h).order)>parseInt(window.getComputedStyle(g).order)&&(w=-w);var S=n;if(void 0!==n&&n<=0){var x=this.splitPane;S="vertical"===a?x.getBoundingClientRect().width+n:x.getBoundingClientRect().height+n}var _=v-w,O=u-b;_<o?_=o:void 0!==n&&_>S?_=S:this.setState({position:O,resized:!0}),i&&i(_),this.setState(zo({draggedSize:_},f?"pane1Size":"pane2Size",_))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,r=e.onDragFinished,n=this.state,o=n.active,i=n.draggedSize;t&&o&&("function"==typeof r&&r(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,r=t.allowResize,n=t.children,o=t.className,i=t.onResizerClick,a=t.onResizerDoubleClick,l=t.paneClassName,c=t.pane1ClassName,u=t.pane2ClassName,f=t.paneStyle,p=t.pane1Style,d=t.pane2Style,h=t.resizerClassName,g=t.resizerStyle,m=t.split,y=t.style,v=this.state,b=v.pane1Size,w=v.pane2Size,S=r?"":"disabled",x=h?"".concat(h," ").concat(Jo):h,_=function(e){return s().Children.toArray(e).filter((function(e){return e}))}(n),O=qo({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},y);"vertical"===m?Object.assign(O,{flexDirection:"row",left:0,right:0}):Object.assign(O,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var E=["SplitPane",o,m,S],k=qo({},f,{},p),C=qo({},f,{},d),T=["Pane1",l,c].join(" "),P=["Pane2",l,u].join(" ");return s().createElement("div",{className:E.join(" "),ref:function(t){e.splitPane=t},style:O},s().createElement(Yo,{className:T,key:"pane1",eleRef:function(t){e.pane1=t},size:b,split:m,style:k},_[0]),s().createElement(Qo,{className:S,onClick:i,onDoubleClick:a,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:x,split:m,style:g||{}}),s().createElement(Yo,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:w,split:m,style:C},_[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return r.getSizeUpdate(e,t)}},{key:"getSizeUpdate",value:function(e,t){var r={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var n=void 0!==e.size?e.size:ei(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(r.draggedSize=n);var o="first"===e.primary;return r[o?"pane1Size":"pane2Size"]=n,r[o?"pane2Size":"pane1Size"]=void 0,r.instanceProps={size:e.size},r}}]),r}(s().Component);ti.propTypes={allowResize:i().bool,children:i().arrayOf(i().node).isRequired,className:i().string,primary:i().oneOf(["first","second"]),minSize:i().oneOfType([i().string,i().number]),maxSize:i().oneOfType([i().string,i().number]),defaultSize:i().oneOfType([i().string,i().number]),size:i().oneOfType([i().string,i().number]),split:i().oneOf(["vertical","horizontal"]),onDragStarted:i().func,onDragFinished:i().func,onChange:i().func,onResizerClick:i().func,onResizerDoubleClick:i().func,style:No(),resizerStyle:No(),paneClassName:i().string,pane1ClassName:i().string,pane2ClassName:i().string,paneStyle:No(),pane1Style:No(),pane2Style:No(),resizerClassName:i().string,step:i().number},ti.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,$o.polyfill)(ti);const ri=ti;var ni=r(93232),oi=r(74930),ii=r.n(oi),ai=r(74081),si=r(88100),li=r.n(si),ci=r(40940),ui=r.n(ci),fi=r(19619),pi=r(56505),di=r(76066);function hi(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gi(){return{error:!1}}function mi(e){return null==e||Object.prototype.hasOwnProperty.call(e,"length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length||M.List.isList(e)&&0===e.size}class yi extends a.Component{constructor(...e){super(...e),hi(this,"processInnerControlRef",(e=>{if(!e)return;this.innerWrappedControl=e.getWrappedInstance?e.getWrappedInstance():e,this.wrappedControlValid=this.innerWrappedControl.isValid||gi;const{shouldComponentUpdate:t}=this.innerWrappedControl;this.wrappedControlShouldComponentUpdate=t&&t.bind(this.innerWrappedControl)})),hi(this,"getValidateValue",(()=>{var e,t;let r=(null===(e=this.innerWrappedControl)||void 0===e||null===(t=e.getValidateValue)||void 0===t?void 0:t.call(e))||this.props.value;return M.List.isList(r)&&(r=r.join(",")),r})),hi(this,"validate",((e=!1)=>{const t=this.getValidateValue(),r=this.props.field,n=[],o=[this.validatePresence,this.validatePattern];if(r.get("meta")&&o.push(this.props.validateMetaField),o.forEach((e=>{const o=e(r,t,this.props.t);o.error&&n.push(o.error)})),e)e.error&&n.push(e.error);else{const e=this.validateWrappedControl(r);e.error&&n.push(e.error)}this.props.onValidate(n)})),hi(this,"validatePresence",((e,t)=>{const{t:r,parentIds:n}=this.props;return e.get("required",!0)&&mi(t)?{error:{type:di.Z.PRESENCE,parentIds:n,message:r("editor.editorControlPane.widget.required",{fieldLabel:e.get("label",e.get("name"))})}}:{error:!1}})),hi(this,"validatePattern",((e,t)=>{const{t:r,parentIds:n}=this.props,o=e.get("pattern",!1);return mi(t)?{error:!1}:o&&!RegExp(o.first()).test(t)?{error:{type:di.Z.PATTERN,parentIds:n,message:r("editor.editorControlPane.widget.regexPattern",{fieldLabel:e.get("label",e.get("name")),pattern:o.last()})}}:{error:!1}})),hi(this,"validateWrappedControl",(e=>{const{t,parentIds:r}=this.props;if("function"!=typeof this.wrappedControlValid)throw new Error(pi.f9`
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom"),require("prop-types"),require("decap-cms-ui-default"),require("immutable"),require("decap-cms-lib-util"),require("decap-cms-lib-widgets"),require("moment"),require("@emotion/core"),require("react-immutable-proptypes")):"function"==typeof define&&define.amd?define("DecapCmsCore",["react","react-dom","prop-types","decap-cms-ui-default","immutable","decap-cms-lib-util","decap-cms-lib-widgets","moment","@emotion/core","react-immutable-proptypes"],t):"object"==typeof exports?exports.DecapCmsCore=t(require("react"),require("react-dom"),require("prop-types"),require("decap-cms-ui-default"),require("immutable"),require("decap-cms-lib-util"),require("decap-cms-lib-widgets"),require("moment"),require("@emotion/core"),require("react-immutable-proptypes")):e.DecapCmsCore=t(e.React,e.ReactDOM,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsUiDefault,e.DecapCmsDefaultExports.Immutable,e.DecapCmsLibUtil,e.DecapCmsLibWidgets,e.DecapCmsDefaultExports.Moment,e.DecapCmsDefaultExports.EmotionCore,e.DecapCmsDefaultExports.ImmutablePropTypes)}(window,((__WEBPACK_EXTERNAL_MODULE__12244__,__WEBPACK_EXTERNAL_MODULE__53741__,__WEBPACK_EXTERNAL_MODULE__32673__,__WEBPACK_EXTERNAL_MODULE__53327__,__WEBPACK_EXTERNAL_MODULE__34106__,__WEBPACK_EXTERNAL_MODULE__24688__,__WEBPACK_EXTERNAL_MODULE__75976__,__WEBPACK_EXTERNAL_MODULE__18815__,__WEBPACK_EXTERNAL_MODULE__62797__,__WEBPACK_EXTERNAL_MODULE__78841__)=>(()=>{var __webpack_modules__={34601:(e,t,r)=>{"use strict";r.d(t,{Z:()=>E});var n=r(82601),o=r(12244);const i=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}};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)-.*))$/;const s=i((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var l=r(62797);const c=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},u={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 f=/[A-Z]|^ms/g,p=/_EMO_([^_]+?)_([^]*?)_EMO_/g,d=function(e){return 45===e.charCodeAt(1)},h=function(e){return null!=e&&"boolean"!=typeof e},g=i((function(e){return d(e)?e:e.replace(f,"-$&").toLowerCase()})),m=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(p,(function(e,t,r){return v={name:t,styles:r,next:v},t}))}return 1===u[e]||d(e)||"number"!=typeof t||0===t?t:t+"px"};function y(e,t,r,n){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return v={name:r.name,styles:r.styles,next:v},r.name;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)v={name:o.name,styles:o.styles,next:v},o=o.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=y(e,t,r[o],!1);else for(var i in r){var a=r[i];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=i+"{"+t[a]+"}":h(a)&&(n+=g(i)+":"+m(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=y(e,t,a,!1);switch(i){case"animation":case"animationName":n+=g(i)+":"+s+";";break;default:n+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)h(a[l])&&(n+=g(i)+":"+m(i,a[l])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=v,a=r(e);return v=i,y(e,t,a,n)}}if(null==t)return r;var s=t[r];return void 0===s||n?r:s}var v,b=/label:\s*([^\s;\n{]+)\s*;/g,w=s,S=function(e){return"theme"!==e&&"innerRef"!==e},x=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?w:S};function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var O=function(){return null};const E=function e(t,r){var i,a,s;void 0!==r&&(i=r.label,s=r.target,a=t.__emotion_forwardProp&&r.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&r.shouldForwardProp(e)}:r.shouldForwardProp);var u=t.__emotion_real===t,f=u&&t.__emotion_base||t;"function"!=typeof a&&u&&(a=t.__emotion_forwardProp);var p=a||x(f),d=!p("as");return function(){var h=arguments,g=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&g.push("label:"+i+";"),null==h[0]||void 0===h[0].raw)g.push.apply(g,h);else{g.push(h[0][0]);for(var m=h.length,w=1;w<m;w++)g.push(h[w],h[0][w])}var S=(0,l.withEmotionCache)((function(e,t,r){return(0,o.createElement)(l.ThemeContext.Consumer,null,(function(n){var i,l,u,h,m=d&&e.as||f,w="",S=[],_=e;if(null==e.theme){for(var E in _={},e)_[E]=e[E];_.theme=n}"string"==typeof e.className?(i=t.registered,l=S,u=e.className,h="",u.split(" ").forEach((function(e){void 0!==i[e]?l.push(i[e]):h+=e+" "})),w=h):null!=e.className&&(w=e.className+" ");var k=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";v=void 0;var i=e[0];null==i||void 0===i.raw?(n=!1,o+=y(r,t,i,!1)):o+=i[0];for(var a=1;a<e.length;a++)o+=y(r,t,e[a],46===o.charCodeAt(o.length-1)),n&&(o+=i[a]);b.lastIndex=0;for(var s,l="";null!==(s=b.exec(o));)l+="-"+s[1];return{name:c(o)+l,styles:o,next:v}}(g.concat(S),t.registered,_);!function(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+n,o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,k,"string"==typeof m),w+=t.key+"-"+k.name,void 0!==s&&(w+=" "+s);var C=d&&void 0===a?x(m):p,T={};for(var P in e)d&&"as"===P||C(P)&&(T[P]=e[P]);T.className=w,T.ref=r||e.innerRef;var j=(0,o.createElement)(m,T),R=(0,o.createElement)(O,null);return(0,o.createElement)(o.Fragment,null,R,j)}))}));return S.displayName=void 0!==i?i:"Styled("+("string"==typeof f?f:f.displayName||f.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=f,S.__emotion_styles=g,S.__emotion_forwardProp=a,Object.defineProperty(S,"toString",{value:function(){return"."+s}}),S.withComponent=function(t,o){return e(t,void 0!==o?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r||{},{},o):r).apply(void 0,g)},S}}},55034:(e,t,r)=>{"use strict";const n=r(11976),o=r.g.Date;class i extends o{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},59697:(e,t,r)=>{"use strict";const n=r(11976);class o extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}T${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},12446:e=>{"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},70256:(e,t,r)=>{"use strict";const n=r(11976);class o extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},11976:e=>{"use strict";e.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}},86056:e=>{"use strict";const t=1114112;class r extends Error{constructor(e,t,n){super("[ParserError] "+e,t,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class n{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class o{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new n(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=String(e),this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let e;this.char=t;do{e=this.state.parser,this.runOne()}while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if("function"!=typeof e)throw new r("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new n(e)}callNow(e,t){return this.call(e,t),this.runOne()}return(e){if(0===this.stack.length)throw this.error(new r("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===t)throw this.error(new r("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new r("Must declare a parseStart method")}}o.END=t,o.Error=r,e.exports=o},77146:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=makeParserClass(__webpack_require__(86056)),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__(12446),createDateTimeFloat=__webpack_require__(59697),createDate=__webpack_require__(55034),createTime=__webpack_require__(70256),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=__webpack_require__.g.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),__webpack_require__.g.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,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=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()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)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.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,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.parseNoUnderHexOctBinLiteral);{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.parseNoUnderHexOctBinLiteral);{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.parseNoUnderHexOctBinLiteral);{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.returnNow(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],r=tomlType(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`))}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,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=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 (])"))}}}},66615:(e,t,r)=>{"use strict";e.exports=function(e,t){t||(t={});const r=t.blocksize||40960,i=new n;return new Promise(((e,t)=>{setImmediate(a,0,r,e,t)}));function a(t,r,n,s){if(t>=e.length)try{return n(i.finish())}catch(t){return s(o(t,e))}try{i.parse(e.slice(t,t+r)),setImmediate(a,t+r,r,n,s)}catch(t){s(o(t,e))}}};const n=r(77146),o=r(53146)},53146:e=>{"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const n=t.split(/\n/),o=String(Math.min(n.length,e.line+3)).length;let i=" ";for(;i.length<o;)i+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(n.length,e.line+2);++t){let a=String(t+1);if(a.length<o&&(a=" "+a),e.line===t){r+=a+"> "+n[t]+"\n",r+=i+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n"}else r+=a+": "+n[t]+"\n"}}return e.message=r+"\n",e}},24312:(e,t,r)=>{"use strict";e.exports=function(e){return e?function(e){const t=new o;return e.setEncoding("utf8"),new Promise(((r,n)=>{let o,i=!1,a=!1;function s(){if(i=!0,!o)try{r(t.finish())}catch(e){n(e)}}function l(e){a=!0,n(e)}e.once("end",s),e.once("error",l),function r(){let n;for(o=!0;null!==(n=e.read());)try{t.parse(n)}catch(e){return l(e)}if(o=!1,i)return s();a||e.once("readable",r)}()}))}(e):function(){const e=new o;return new n.Transform({objectMode:!0,transform(t,r,n){try{e.parse(t.toString(r))}catch(e){this.emit("error",e)}n()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const n=r(54851),o=r(77146)},13475:(e,t,r)=>{"use strict";e.exports=function(e){r.g.Buffer&&r.g.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new n;try{return t.parse(e),t.finish()}catch(t){throw o(t,e)}};const n=r(77146),o=r(53146)},53279:(e,t,r)=>{"use strict";e.exports=r(13475),e.exports.async=r(66615),e.exports.stream=r(24312),e.exports.prettyError=r(53146)},57573:e=>{"use strict";function t(e){return new Error("Can only stringify objects, not "+e)}function r(e){return Object.keys(e).filter((t=>i(e[t])))}function n(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&"function"==typeof e[r].toJSON&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function o(e,l,c){var f,p;f=r(c=n(c)),p=function(e){return Object.keys(e).filter((t=>!i(e[t])))}(c);var h=[],g=l||"";f.forEach((e=>{var t=a(c[e]);"undefined"!==t&&"null"!==t&&h.push(g+s(e)+" = "+u(c[e],!0))})),h.length>0&&h.push("");var m=e&&f.length>0?l+" ":"";return p.forEach((i=>{h.push(function(e,i,l,c){var u=a(c);if("array"===u)return function(e,r,i,l){d(l=n(l));var c=a(l[0]);if("table"!==c)throw t(c);var u=e+s(i),f="";return l.forEach((e=>{f.length>0&&(f+="\n"),f+=r+"[["+u+"]]\n",f+=o(u+".",r,e)})),f}(e,i,l,c);if("table"===u)return function(e,t,n,i){var a=e+s(n),l="";return r(i).length>0&&(l+=t+"["+a+"]\n"),l+o(a+".",t,i)}(e,i,l,c);throw t(u)}(e,m,i,c[i]))})),h.join("\n")}function i(e){switch(a(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"!==a(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function a(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 s(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:l(t)}function l(e){return'"'+c(e).replace(/"/g,'\\"')+'"'}function c(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.length<4;)t="0"+t;return t}(0,e.codePointAt(0).toString(16))))}function u(e,t){let r=a(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),f(e,r)}function f(e,r){switch(r||(r=a(e)),r){case"string-multiline":return function(e){let t=e.split(/\n/).map((e=>c(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return l(e);case"string-literal":return"'"+e+"'";case"integer":return p(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("."),r=t[0],n=t[1]||0;return p(r)+"."+n}(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=d(e=n(e));var r="[",o=e.map((e=>f(e,t)));return o.join(", ").length>60||/\n/.test(o)?r+="\n "+o.join(",\n ")+"\n":r+=" "+o.join(", ")+(o.length>0?" ":""),r+"]"}(e.filter((e=>"null"!==a(e)&&"undefined"!==a(e)&&"nan"!==a(e))));case"table":return function(e){e=n(e);var t=[];return Object.keys(e).forEach((r=>{t.push(s(r)+" = "+u(e[r],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw t(r)}}function p(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function d(e){const t=function(e){var t=a(e[0]);return e.every((e=>a(e)===t))?t:e.every((e=>{return"float"===(t=a(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 t("null");if(void 0===e)throw t("undefined");if("object"!=typeof e)throw t(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;const r=a(e);if("table"!==r)throw t(r);return o("","",e)},e.exports.value=f},6901:(e,t,r)=>{"use strict";t.parse=r(53279),t.stringify=r(57573)},85692:(e,t,r)=>{"use strict";var n=r(67286),o=r(62680),i=n("%TypeError%"),a=r(69738),s=r(14989),l=r(60845),c=r(2685),u=r(98529),f=r(14749),p=r(47623),d=r(26302),h=o("String.prototype.split"),g=Object("a"),m="a"!==g[0]||!(0 in g);e.exports=function(e){var t,r=f(this),n=m&&d(this)?h(this,""):r,o=u(n);if(!c(e))throw new i("Array.prototype.forEach callback must be a function");arguments.length>1&&(t=arguments[1]);for(var g=0;g<o;){var y=p(g);if(l(n,y)){var v=s(n,y);a(e,t,[v,g,n])}g+=1}}},33443:(e,t,r)=>{"use strict";var n=r(14926),o=r(89429),i=r(62680),a=r(95339),s=r(85692),l=r(25970),c=l(),u=r(89055),f=i("Array.prototype.slice"),p=o.apply(c),d=function(e,t){return a(e),p(e,f(arguments,1))};n(d,{getPolyfill:l,implementation:s,shim:u}),e.exports=d},25970:(e,t,r)=>{"use strict";var n=r(63937),o=r(85692);e.exports=function(){var e=Array.prototype.forEach;return n(e)?e:o}},89055:(e,t,r)=>{"use strict";var n=r(14926),o=r(25970);e.exports=function(){var e=o();return n(Array.prototype,{forEach:e},{forEach:function(){return Array.prototype.forEach!==e}}),e}},36867:(e,t,r)=>{"use strict";r.d(t,{DP:()=>a,Fx:()=>c,Nv:()=>u,Oe:()=>l,So:()=>g,TX:()=>y,Wr:()=>s,ZH:()=>i,pH:()=>m});var n=r(44905),o=r(15967);const i="AUTH_REQUEST",a="AUTH_SUCCESS",s="AUTH_FAILURE",l="AUTH_REQUEST_DONE",c="USE_OPEN_AUTHORING",u="LOGOUT";function f(){return{type:i}}function p(e){return{type:a,payload:e}}function d(e){return{type:s,error:"Failed to authenticate",payload:e}}function h(){return{type:c}}function g(){return(e,t)=>{const r=t(),o=(0,n.Rg)(r.config);return e(f()),Promise.resolve(o.currentUser()).then((t=>{t?(t.useOpenAuthoring&&e(h()),e(p(t))):e({type:l})})).catch((t=>{e(d(t)),e(y())}))}}function m(e){return(t,r)=>{const i=r(),a=(0,n.Rg)(i.config);return t(f()),a.authenticate(e).then((e=>{e.useOpenAuthoring&&t(h()),t(p(e))})).catch((e=>{console.error(e),t((0,o.wN)({message:{details:e.message,key:"ui.toast.onFailToAuth"},type:"error",dismissAfter:8e3})),t(d(e))}))}}function y(){return(e,t)=>{const r=t(),i=(0,n.Rg)(r.config);Promise.resolve(i.logout()).then((()=>{e({type:u}),e((0,o.L1)())}))}}},97166:(e,t,r)=>{"use strict";r.d(t,{cd:()=>Z,YS:()=>K,P6:()=>G,rR:()=>le,ME:()=>ce});var n=r(45455),o=r.n(n),i=r(5648),a=r.n(i),s=r(93433),l=r.n(s),c=r(60155),u=r.n(c),f=r(34106),p=r(39714),d=r.n(p),h=r(76665),g=r(52588),m=r(1581),y=r.n(m),v=r(12430),b=r(33351),w=r.n(b),S=r(26426),x=r.n(S),_=r(76221),O=r(19619),E=r(2995);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function T(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const P={type:"string",minLength:2,maxLength:10,pattern:"^[a-zA-Z-_]+$"},j={type:"object",properties:{structure:{type:"string",enum:Object.values(E.hb)},locales:{type:"array",minItems:1,items:P,uniqueItems:!0},default_locale:P}},R=C(C({},j),{},{required:["structure","locales"]}),A={oneOf:[{type:"boolean"},j]},M={oneOf:[{type:"boolean"},{type:"string",enum:Object.values(E.JD)}]};function I(){const e=x()();return{$id:`fields_${e}`,type:"array",minItems:1,items:{$id:`field_${e}`,type:"object",properties:{name:{type:"string"},label:{type:"string"},widget:{type:"string"},required:{type:"boolean"},i18n:M,hint:{type:"string"},pattern:{type:"array",minItems:2,items:[{oneOf:[{type:"string"},{instanceof:"RegExp"}]},{type:"string"}]},field:{$ref:`field_${e}`},fields:{$ref:`fields_${e}`},types:{$ref:`fields_${e}`}},select:{$data:"0/widget"},selectCases:C({},N()),required:["name"]},uniqueItemProperties:["name"]}}const D={type:"array",minItems:1,items:{type:"object",properties:{label:{type:"string"},field:{type:"string"},pattern:{oneOf:[{type:"boolean"},{type:"string"}]}},additionalProperties:!1,required:["label","field","pattern"]}},L={type:"array",minItems:1,items:{type:"object",properties:{label:{type:"string"},field:{type:"string"},pattern:{type:"string"}},additionalProperties:!1,required:["label","field"]}};function N(){const e=(0,O.fH)().map((e=>({[e.name]:e.schema})));return Object.assign(...e)}class $ 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 r=e.map((({message:e,instancePath:t})=>{const r=t.slice(1).split("/").map((e=>e.match(/^\d+$/)?`[${e}]`:`.${e}`)).join("").slice(1);return`${r?`'${r}'`:"config"} ${e}`})).join("\n");super(r,...t),this.errors=e,this.message=r}toString(){return this.message}}var F=r(14093),B=r(75863),U=r(44905),z=r(72431);const W=["sortableFields"];function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){V(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const K="CONFIG_REQUEST",G="CONFIG_SUCCESS",Z="CONFIG_FAILURE";function Y(e){return"types"in e||"field"in e}function J(e,t){return e.map((e=>{const r=t(e);return function(e){return"fields"in e}(r)?H(H({},r),{},{fields:J(r.fields,t)}):Y(r)&&r.field?H(H({},r),{},{field:J([r.field],t)[0]}):Y(r)&&r.types?H(H({},r),{},{types:J(r.types,t)}):r}))}function Q(e){return"media_folder"in e&&!("public_folder"in e)?H(H({},e),{},{public_folder:e.media_folder}):e}const X={dateFormat:"date_format",timeFormat:"time_format",pickerUtc:"picker_utc",editorComponents:"editor_components",valueType:"value_type",valueField:"value_field",searchFields:"search_fields",displayFields:"display_fields",optionsLength:"options_length"};function ee(e){const t=Object.keys(X).filter((t=>t in e)).map((t=>{const r=X[t];return console.warn(`Field ${e.name} is using a deprecated configuration '${t}'. Please use '${r}'`),{[r]:e[t]}}));return Object.assign({},e,...t)}function te(e){return!0===e[E.mb]?H(H({},e),{},{[E.mb]:E.JD.TRANSLATE}):!1!==e[E.mb]&&e[E.mb]?e:H(H({},e),{},{[E.mb]:E.JD.NONE})}function re(e,t){if("boolean"==typeof e)return t;{const r=e.locales||t.locales,n=e.default_locale||r[0],o=d()(t,e);return o.locales=r,o.default_locale=n,ie(o),o}}function ne(e,t){return J(e,t?te:e=>{const t=H({},e);return delete t[E.mb],t})}function oe(e){if(e&&e.structure!==E.hb.SINGLE_FILE)throw new Error(`i18n configuration for files collections is limited to ${E.hb.SINGLE_FILE} structure`)}function ie(e){if(e&&e.default_locale&&!e.locales.includes(e.default_locale))throw new Error(`i18n locales '${e.locales.join(", ")}' are missing the default locale ${e.default_locale}`)}function ae(e,t){const r=(0,B.Zh)((0,f.fromJS)(e));return!!(0,B._5)(r,t.name,"listEntries")}function se(e){return{type:G,payload:e}}function le(e){return{type:Z,error:"Error loading config",payload:e}}function ce(e={},t){return window.CMS_CONFIG?se(window.CMS_CONFIG):async r=>{r({type:K});try{const i=function(){const e=document.querySelector('link[rel="cms-config-url"]');return e&&{"text/yaml":"yaml","application/x-yaml":"yaml"}[e.type]&&e.href?(console.log(`Using config file path: "${e.href}"`),e.href):"config.yml"}(),s=!o()(e),c=!1===e.load_config_file?{}:await async function(e,t){const r=await fetch(e,{credentials:"same-origin"}).catch((e=>e));if(r instanceof Error||200!==r.status){if(t)return{};const e=r instanceof Error?r.message:r.status;throw new Error(`Failed to load config.yml (${e})`)}const n=r.headers.get("Content-Type")||"Not-Found";return-1===n.indexOf("yaml")&&(console.log(`Response for ${e} was not yaml. (Content-Type: ${n})`),t)?{}:function(e){const t=u().parse(e,{maxAliasCount:-1,prettyErrors:!0,merge:!0});if("undefined"!=typeof window&&"string"==typeof window.CMS_ENV&&t[window.CMS_ENV]){const e=Object.keys(t[window.CMS_ENV]);for(const r of e)t[r]=t[window.CMS_ENV][r]}return t}(await r.text())}(i,s),p=d()(c,e);!function(e){const t=new(y())({allErrors:!0,$data:!0,strict:!1});if((0,v.uniqueItemProperties)(t),(0,v.select)(t),(0,v.instanceof)(t),(0,v.prohibited)(t),w()(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"]},cms_label_prefix:{type:"string",minLength:1},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"]},allowed_hosts:{type:"array",items:{type:"string"}}},additionalProperties:!1}]},locale:{type:"string",examples:["en","fr","de"]},i18n:R,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"},preview_path:{type:"string"},preview_path_date_field:{type:"string"},fields:I()},required:["name","label","file","fields"]},uniqueItemProperties:["name"]},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"},publish:{type:"boolean"},hide:{type:"boolean"},editor:{type:"object",properties:{preview:{type:"boolean"}}},format:{type:"string"},extension:{type:"string"},frontmatter_delimiter:{type:["string","array"],minItems:2,maxItems:2,items:{type:"string"}},fields:I(),sortable_fields:{type:"array",items:{type:"string"}},sortableFields:{type:"array",items:{type:"string"}},view_filters:D,view_groups:L,nested:{type:"object",properties:{depth:{type:"number",minimum:1,maximum:1e3},summary:{type:"string"}},required:["depth"]},meta:{type:"object",properties:{path:{type:"object",properties:{label:{type:"string"},widget:{type:"string"},index_file:{type:"string"}},required:["label","widget","index_file"]}},additionalProperties:!1,minProperties:1},i18n:A},required:["name","label"],oneOf:[{required:["files"]},{required:["folder","fields"]}],not:{required:["sortable_fields","sortableFields"]},if:{required:["extension"]},then:{if:{properties:{extension:{enum:Object.keys(_.rL)}}},else:{required:["format"]}},dependencies:{frontmatter_delimiter:{properties:{format:{enum:_.C$}},required:["format"]}}},uniqueItemProperties:["name"]},editor:{type:"object",properties:{preview:{type:"boolean"}}}},required:["backend","collections"],anyOf:[{required:["media_folder"]},{required:["media_library"]}]},e)){const e=t.errors.map((e=>{switch(e.keyword){case"uniqueItemProperties":{const t=e.instancePath||"";let r=e;return t.endsWith("/fields")?r=C(C({},e),{},{message:"fields names must be unique"}):t.endsWith("/files")?r=C(C({},e),{},{message:"files names must be unique"}):t.endsWith("/collections")&&(r=C(C({},e),{},{message:"collections names must be unique"})),r}case"instanceof":{const t=e.instancePath||"";let r=e;return/fields\/\d+\/pattern\/\d+/.test(t)&&(r=C(C({},e),{},{message:"must be a regular expression"})),r}default:return e}}));throw console.error("Config Errors",e),new $(e)}}(p);const m=function(e){const{collections:t=[]}=e,r=t.map((e=>{const{fields:t,files:r}=e;let n=e;if(t){const e=J(t,ee);n=H(H({},n),{},{fields:e})}if(r){const e=r.map((e=>{const t=J(e.fields,ee);return H(H({},e),{},{fields:t})}));n=H(H({},n),{},{files:e})}if(n.sortableFields){const{sortableFields:t}=n;n=H(H({},function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,W)),{},{sortable_fields:t}),console.warn(`Collection ${e.name} is using a deprecated configuration 'sortableFields'. Please use 'sortable_fields'`)}return n}));return H(H({},e),{},{collections:r})}(await async function(e){if(!e.local_backend)return e;const{proxyUrl:t,publish_modes:r,type:n}=await async function(e){if(!["localhost","127.0.0.1",..."boolean"==typeof e?[]:(null==e?void 0:e.allowed_hosts)||[]].includes(location.hostname)||!e)return{};const t="http://localhost:8081/api/v1",r=!0===e?t:e.url||t.replace("localhost",location.hostname);try{console.log(`Looking for Decap CMS Proxy Server at '${r}'`);const e=await fetch(`${r}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"info"})}),{repo:t,publish_modes:n,type:o}=await e.json();return"string"==typeof t&&Array.isArray(n)&&"string"==typeof o?(console.log(`Detected Decap CMS Proxy Server at '${r}' with repo: '${t}'`),{proxyUrl:r,publish_modes:n,type:o}):(console.log(`Decap CMS Proxy Server not detected at '${r}'`),{})}catch{return console.log(`Decap CMS Proxy Server not detected at '${r}'`),{}}}(e.local_backend);return t?(0,h.Uy)(e,(e=>{e.backend.name="proxy",e.backend.proxy_url=t,e.publish_mode&&(e.publish_mode=function(e,t,r){if(e.publish_mode&&t&&!t.includes(e.publish_mode)){const n=t[0];return console.log(`'${e.publish_mode}' is not supported by '${r}' backend, switching to '${n}'`),n}return e.publish_mode}(e,r,n))})):e}(p)),b=(n=m,(0,h.Uy)(n,(e=>{e.publish_mode=e.publish_mode||g.pt,e.slug=e.slug||{},e.collections=e.collections||[],!e.display_url&&e.site_url&&(e.display_url=e.site_url);const t=`/${l()(e.media_folder,"/")}`;"public_folder"in e||(e.public_folder=t),"encoding"in e.slug||(e.slug.encoding="unicode"),"clean_accents"in e.slug||(e.slug.clean_accents=!1),"sanitize_replacement"in e.slug||(e.slug.sanitize_replacement="-");const r=e[E.mb];r&&(r.default_locale=r.default_locale||r.locales[0]),ie(r);const n=(0,U.FO)(e);for(const t of e.collections){"publish"in t||(t.publish=!0);let o=t[E.mb];r&&o?(o=re(o,r),t[E.mb]=o):(o=void 0,delete t[E.mb]),t.fields&&(t.fields=ne(t.fields,Boolean(o)));const{folder:i,files:s,view_filters:c,view_groups:u,meta:p}=t;if(i&&(t.type=z.S,t.path&&!t.media_folder&&(t.media_folder=""),"media_folder"in t&&!("public_folder"in t)&&(t.public_folder=t.media_folder),t.fields&&(t.fields=J(t.fields,Q)),t.folder=a()(i,"/"),p&&p.path)){const e=H({name:"path",meta:!0,required:!0},p.path);t.fields=[e,...t.fields||[]]}if(s){t.type=z.h,oe(o),delete t.nested,delete t.meta;for(const e of s){e.file=l()(e.file,"/"),"media_folder"in e&&!("public_folder"in e)&&(e.public_folder=e.media_folder),e.fields&&(e.fields=J(e.fields,Q));let t=e[E.mb];t&&o?(t=re(t,o),e[E.mb]=t):(t=void 0,delete e[E.mb]),oe(t),e.fields&&(e.fields=ne(e.fields,Boolean(t)))}}t.sortable_fields||(t.sortable_fields=(0,F.Xd)((0,f.fromJS)(t),n,ae(e,t))),t.view_filters=(c||[]).map((e=>H(H({},e),{},{id:`${e.field}__${e.pattern}`}))),t.view_groups=(u||[]).map((e=>H(H({},e),{},{id:`${e.field}__${e.pattern}`}))),e.editor&&!t.editor&&(t.editor={preview:e.editor.preview})}})));r(se(b)),"function"==typeof t&&t()}catch(e){throw r(le(e)),e}var n}}},86384:(e,t,r)=>{"use strict";r.d(t,{CC:()=>l,ed:()=>u,s7:()=>s,vL:()=>a});var n=r(44905),o=r(93324),i=r(15967);const a="DEPLOY_PREVIEW_REQUEST",s="DEPLOY_PREVIEW_SUCCESS",l="DEPLOY_PREVIEW_FAILURE";function c(e,t){return{type:l,payload:{collection:e,slug:t}}}function u(e,t,r,l,u){return async(f,p)=>{const d=p(),h=(0,n.Rg)(d.config),g=e.get("name"),m=(0,o.Cz)(d,g,t);if(!m||!m.isFetching){f(function(e,t){return{type:a,payload:{collection:e,slug:t}}}(g,t));try{const n=l?h.getDeploy(e,t,r):await h.getDeployPreview(e,t,r,u);return f(n?function(e,t,r){const{url:n,status:o}=r;return{type:s,payload:{collection:e,slug:t,url:n,status:o}}}(g,t,n):c(g,t))}catch(e){console.error(e),f((0,i.wN)({message:{details:e.message,key:"ui.toast.onFailToLoadDeployPreview"},type:"error",dismissAfter:8e3})),f(c(g,t))}}}}},31464:(e,t,r)=>{"use strict";r.d(t,{AR:()=>E,J5:()=>b,JY:()=>W,Jv:()=>P,S0:()=>B,SX:()=>V,T3:()=>w,Ts:()=>H,Ty:()=>q,WS:()=>A,Wt:()=>O,Yh:()=>U,an:()=>S,dU:()=>k,ih:()=>j,lf:()=>v,qx:()=>x,r1:()=>I,tH:()=>z,xQ:()=>C,yH:()=>T,yJ:()=>R});var n=r(72579),o=r.n(n),i=r(34106),a=r(24688),s=r(44905),l=r(93324),c=r(98343),u=r(52588),f=r(69217),p=r(49469),d=r(93854),h=r(52977),g=r(76066),m=r(12318),y=r(15967);const v="UNPUBLISHED_ENTRY_REQUEST",b="UNPUBLISHED_ENTRY_SUCCESS",w="UNPUBLISHED_ENTRY_REDIRECT",S="UNPUBLISHED_ENTRIES_REQUEST",x="UNPUBLISHED_ENTRIES_SUCCESS",_="UNPUBLISHED_ENTRIES_FAILURE",O="UNPUBLISHED_ENTRY_PERSIST_REQUEST",E="UNPUBLISHED_ENTRY_PERSIST_SUCCESS",k="UNPUBLISHED_ENTRY_PERSIST_FAILURE",C="UNPUBLISHED_ENTRY_STATUS_CHANGE_REQUEST",T="UNPUBLISHED_ENTRY_STATUS_CHANGE_SUCCESS",P="UNPUBLISHED_ENTRY_STATUS_CHANGE_FAILURE",j="UNPUBLISHED_ENTRY_PUBLISH_REQUEST",R="UNPUBLISHED_ENTRY_PUBLISH_SUCCESS",A="UNPUBLISHED_ENTRY_PUBLISH_FAILURE",M="UNPUBLISHED_ENTRY_DELETE_REQUEST",I="UNPUBLISHED_ENTRY_DELETE_SUCCESS",D="UNPUBLISHED_ENTRY_DELETE_FAILURE";function L(e,t){return{type:x,payload:{entries:e,pages:t}}}function N(e,t){return{type:O,payload:{collection:e.get("name"),slug:t}}}function $(e,t){return{type:E,payload:{collection:e.get("name"),entry:t}}}function F(e,t,r){return{type:k,payload:{error:e,collection:t.get("name"),slug:r},error:e}}function B(e,t){return async(r,n)=>{const i=n(),l=(0,s.Rg)(i.config);if(!o()(i.editorialWorkflow.toJS(),"pages.ids",!1))try{const{entries:e,pagination:t}=await l.unpublishedEntries(i.collections);r(L(e,t))}catch(e){}r(function(e,t){return{type:v,payload:{collection:e.get("name"),slug:t}}}(e,t));try{const n=await l.unpublishedEntry(i,e,t),o=await Promise.all(n.mediaFiles.filter((e=>e.draft)).map((({url:e,file:t,path:r})=>(0,p.r)({path:r,url:e,file:t}))));r((0,d.q$)(o)),r(function(e,t){return{type:b,payload:{collection:e.get("name"),entry:t}}}(e,n)),r((0,f.at)(n))}catch(n){n.name===a.EDITORIAL_WORKFLOW_ERROR&&n.notUnderEditorialWorkflow?(r(function(e,t){return{type:w,payload:{collection:e.get("name"),slug:t}}}(e,t)),r((0,f.KS)(e,t))):r((0,y.wN)({message:{key:"ui.toast.onFailToLoadEntries",details:n},type:"error",dismissAfter:8e3}))}}}function U(e){return(t,r)=>{const n=r(),i=(0,s.Rg)(n.config),a=o()(n.editorialWorkflow.toJS(),"pages.ids",!1);n.config.publish_mode!==u.S0||a||(t({type:S}),i.unpublishedEntries(e).then((e=>t(L(e.entries,e.pagination)))).catch((e=>{t((0,y.wN)({message:{key:"ui.toast.onFailToLoadEntries",details:e},type:"error",dismissAfter:8e3})),t(function(e){return{type:_,error:"Failed to load entries",payload:e}}(e)),Promise.reject(e)})))}}function z(e,t){return async(r,n)=>{const i=n(),a=i.entryDraft,c=a.get("fieldsErrors"),u=(0,l.W5)(i,e.get("name")),p=(0,l.St)(i,e.get("name")).concat(u);if(!o()(i.editorialWorkflow.toJS(),"pages.ids",!1)&&r(U(i.collections)),!c.isEmpty())return c.some((e=>e.some((e=>e.type&&e.type===g.Z.PRESENCE))))&&r((0,y.wN)({message:{key:"ui.toast.missingRequiredField"},type:"error",dismissAfter:8e3})),Promise.reject();const d=(0,s.Rg)(i.config),h=a.get("entry"),v=(0,f.vp)({entry:h}),b=(0,f.GO)(e,h),w=a.set("entry",b);r(N(e,h.get("slug")));const S=t?d.persistUnpublishedEntry:d.persistEntry;try{const t=await S.call(d,{config:i.config,collection:e,entryDraft:w,assetProxies:v,usedSlugs:p});r((0,y.wN)({message:{key:"ui.toast.entrySaved"},type:"success",dismissAfter:4e3})),r($(e,b)),h.get("slug")!==t&&(r(B(e,t)),(0,m.GN)(e.get("name"),t))}catch(t){return r((0,y.wN)({message:{key:"ui.toast.onFailToPersist",details:t},type:"error",dismissAfter:8e3})),Promise.reject(r(F(t,e,h.get("slug"))))}}}function W(e,t,r,n){return(o,i)=>{if(r===n)return;const a=i(),l=(0,s.Rg)(a.config);o(function(e,t){return{type:C,payload:{collection:e,slug:t}}}(e,t)),l.updateUnpublishedEntryStatus(e,t,n).then((()=>{o((0,y.wN)({message:{key:"ui.toast.entryUpdated"},type:"success",dismissAfter:4e3})),o(function(e,t,r){return{type:T,payload:{collection:e,slug:t,newStatus:r}}}(e,t,n))})).catch((r=>{o((0,y.wN)({message:{key:"ui.toast.onFailToUpdateStatus",details:r},type:"error",dismissAfter:8e3})),o(function(e,t){return{type:P,payload:{collection:e,slug:t}}}(e,t))}))}}function q(e,t){return(r,n)=>{const o=n(),i=(0,s.Rg)(o.config);return r(function(e,t){return{type:M,payload:{collection:e,slug:t}}}(e,t)),i.deleteUnpublishedEntry(e,t).then((()=>{r((0,y.wN)({message:{key:"ui.toast.onDeleteUnpublishedChanges"},type:"success",dismissAfter:4e3})),r(function(e,t){return{type:I,payload:{collection:e,slug:t}}}(e,t))})).catch((n=>{r((0,y.wN)({message:{key:"ui.toast.onDeleteUnpublishedChanges",details:n},type:"error",dismissAfter:8e3})),r(function(e,t){return{type:D,payload:{collection:e,slug:t}}}(e,t))}))}}function H(e,t){return async(r,n)=>{const o=n(),i=o.collections,a=(0,s.Rg)(o.config),u=(0,l.Js)(o,e,t);r(function(e,t){return{type:j,payload:{collection:e,slug:t}}}(e,t));try{await a.publishUnpublishedEntry(u),r((0,h.pW)()),r((0,y.wN)({message:{key:"ui.toast.entryPublished"},type:"success",dismissAfter:4e3})),r(function(e,t){return{type:R,payload:{collection:e,slug:t}}}(e,t));const n=i.get(e);if(!n.has("nested"))return r((0,f.KS)(n,t));{r((0,f.Jw)(n));const e=(0,s.GB)(n,u.get("path"));(0,f.KS)(n,e),t!==e&&(0,c.s)(o.entryDraft)&&(0,m.GN)(n.get("name"),e)}}catch(n){r((0,y.wN)({message:{key:"ui.toast.onFailToPublishEntry",details:n},type:"error",dismissAfter:8e3})),r(function(e,t){return{type:A,payload:{collection:e,slug:t}}}(e,t))}}}function V(e,t){return(r,n)=>{const o=n(),a=(0,s.Rg)(o.config),c=(0,l.WK)(o,e.get("name"),t),p=(0,i.Map)().set("entry",c);return r(N(e,t)),a.deleteEntry(o,e,t).then((()=>a.persistEntry({config:o.config,collection:e,entryDraft:p,assetProxies:[],usedSlugs:(0,i.List)(),status:u.i7.get("PENDING_PUBLISH")}))).then((()=>{r($(e,c)),r((0,f.BF)(e,t)),r(B(e,t)),r((0,y.wN)({message:{key:"ui.toast.entryUnpublished"},type:"success",dismissAfter:4e3}))})).catch((t=>{r((0,y.wN)({message:{key:"ui.toast.onFailToUnpublishEntry",details:t},type:"error",dismissAfter:8e3})),r(F(t,e,c.get("slug")))}))}}},69217:(e,t,r)=>{"use strict";r.d(t,{RS:()=>le,ps:()=>ue,QX:()=>Y,t_:()=>Q,O9:()=>te,uM:()=>G,BK:()=>K,T8:()=>ee,r6:()=>Z,Un:()=>X,vY:()=>J,lW:()=>N,xw:()=>D,cT:()=>L,Dd:()=>ae,H1:()=>I,sn:()=>oe,Qm:()=>re,UY:()=>ne,qk:()=>A,zV:()=>M,Mw:()=>W,yZ:()=>U,iw:()=>z,LF:()=>V,QS:()=>q,w5:()=>H,QF:()=>ce,Hq:()=>B,S$:()=>$,Hb:()=>F,Kv:()=>ke,tw:()=>xe,QM:()=>_e,pK:()=>ve,Lf:()=>Oe,ED:()=>Pe,at:()=>we,lK:()=>$e,pO:()=>We,$G:()=>Re,vQ:()=>Se,BF:()=>be,wu:()=>me,vp:()=>Be,GO:()=>Ue,YU:()=>ye,Jw:()=>Le,KS:()=>Ae,SG:()=>Ee,G4:()=>ze,q9:()=>Te,HG:()=>Ce,RO:()=>je,L1:()=>ge,$L:()=>Ne,T0:()=>Me,f2:()=>He});var n=r(18149),o=r.n(n),i=r(34106),a=r(24688),s=r(31620),l=r(14093),c=r(93324),u=r(26969),f=r(44905),p=r(1842),d=r.n(p),h=r(19619);function g(e,t,r){let n=t.reduce(((t,n)=>{const o=n.get("name"),a=e.get(o),s=(0,h.pS)(n.get("widget")),l=n.get("fields");return l&&i.List.isList(a)?t.set(o,a.map((e=>g(e,l,r)))):l&&i.Map.isMap(a)?t.set(o,g(a,l,r)):s&&!d()(a)?t.set(o,s[r](a)):d()(a)?t:t.set(o,a)}),(0,i.Map)());return n=e.mergeDeep(n),n}var m=r(19445),y=r(49469),v=r(76066),b=r(93854),w=r(38793),S=r(52977),x=r(22612),_=r(98343),O=r(49971),E=r(12318),k=r(11040),C=r(2995),T=r(15967);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const A="ENTRY_REQUEST",M="ENTRY_SUCCESS",I="ENTRY_FAILURE",D="ENTRIES_REQUEST",L="ENTRIES_SUCCESS",N="ENTRIES_FAILURE",$="SORT_ENTRIES_REQUEST",F="SORT_ENTRIES_SUCCESS",B="SORT_ENTRIES_FAILURE",U="FILTER_ENTRIES_REQUEST",z="FILTER_ENTRIES_SUCCESS",W="FILTER_ENTRIES_FAILURE",q="GROUP_ENTRIES_REQUEST",H="GROUP_ENTRIES_SUCCESS",V="GROUP_ENTRIES_FAILURE",K="DRAFT_CREATE_FROM_ENTRY",G="DRAFT_CREATE_EMPTY",Z="DRAFT_DISCARD",Y="DRAFT_CHANGE_FIELD",J="DRAFT_VALIDATION_ERRORS",Q="DRAFT_CLEAR_ERRORS",X="DRAFT_LOCAL_BACKUP_RETRIEVED",ee="DRAFT_CREATE_FROM_LOCAL_BACKUP",te="DRAFT_CREATE_DUPLICATE_FROM_ENTRY",re="ENTRY_PERSIST_REQUEST",ne="ENTRY_PERSIST_SUCCESS",oe="ENTRY_PERSIST_FAILURE",ie="ENTRY_DELETE_REQUEST",ae="ENTRY_DELETE_SUCCESS",se="ENTRY_DELETE_FAILURE",le="ADD_DRAFT_ENTRY_MEDIA_FILE",ce="REMOVE_DRAFT_ENTRY_MEDIA_FILE",ue="CHANGE_VIEW_STYLE";function fe(e){return{type:D,payload:{collection:e.get("name")}}}function pe(e,t,r,n,o=!0){return{type:L,payload:{collection:e.get("name"),entries:t,page:r,cursor:a.Cursor.create(n),append:o}}}function de(e,t){return{type:N,error:"Failed to load entries",payload:t.toString(),meta:{collection:e.get("name")}}}async function he(e,t){const r=(0,f.Rg)(e.config),n=(0,c._5)(e,t.get("name"),"listEntries"),o=n?(0,u.B)(e.integrations,r.getToken,n):r;return await o.listAllEntries(t)}function ge(e,t,r=w.S.Ascending){return async(n,o)=>{const i=o(),a=(0,_.pT)(i.entries,e.get("name"));if(n({type:$,payload:{collection:e.get("name"),key:t,direction:r}}),!a)try{const o=await he(i,e);n({type:F,payload:{collection:e.get("name"),key:t,direction:r,entries:o}})}catch(o){n({type:B,payload:{collection:e.get("name"),key:t,direction:r,error:o}})}}}function me(e,t){return async(r,n)=>{const o=n(),i=(0,_.pT)(o.entries,e.get("name"));if(r({type:U,payload:{collection:e.get("name"),filter:t}}),!i)try{const n=await he(o,e);r({type:z,payload:{collection:e.get("name"),filter:t,entries:n}})}catch(n){r({type:W,payload:{collection:e.get("name"),filter:t,error:n}})}}}function ye(e,t){return async(r,n)=>{const o=n(),i=(0,_.pT)(o.entries,e.get("name"));if(r({type:q,payload:{collection:e.get("name"),group:t}}),!i)try{const n=await he(o,e);r({type:H,payload:{collection:e.get("name"),group:t,entries:n}})}catch(n){r({type:V,payload:{collection:e.get("name"),group:t,error:n}})}}}function ve(e){return{type:ue,payload:{style:e}}}function be(e,t){return{type:ae,payload:{collectionName:e.get("name"),entrySlug:t}}}function we(e){return{type:K,payload:{entry:e}}}function Se(){return{type:Z}}function xe({field:e,value:t,metadata:r,entries:n,i18n:o}){return{type:Y,payload:{field:e,value:t,metadata:r,entries:n,i18n:o}}}function _e(e,t){return{type:J,payload:{uniquefieldId:e,errors:t}}}function Oe(){return{type:Q}}function Ee(){return{type:ee}}function ke(e){return{type:le,payload:e}}function Ce({id:e}){return{type:ce,payload:{id:e}}}function Te(e,t){return(r,n)=>{const o=n();return(0,f.Rg)(o.config).persistLocalDraftBackup(e,t)}}function Pe(e){return t=>{t((0,x.A)({predicate:({type:e})=>e===G,run:()=>t(function(e){return{type:te,payload:(0,m.Y)(e.get("collection"),"","",{data:e.get("data"),mediaFiles:e.get("mediaFiles").toJS()})}}(e))}))}}function je(e,t){return async(r,n)=>{const o=n(),a=(0,f.Rg)(o.config),{entry:s}=await a.getLocalDraftBackup(e,t);if(s){const t=s.mediaFiles||[],o=await Promise.all(t.map((t=>t.file||t.url?(0,y.r)({path:t.path,file:t.file,url:t.url,field:t.field}):(0,b.Nh)({collection:e,entry:(0,i.fromJS)(s),path:t.path,field:t.field})(r,n))));return r((0,b.q$)(o)),r(function(e){return{type:X,payload:{entry:e}}}(s))}}}function Re(e,t){return(r,n)=>{const o=n();return(0,f.Rg)(o.config).deleteLocalDraftBackup(e,t)}}function Ae(e,t){return async(r,n)=>{await(0,S.yV)(r,n()),r(function(e,t){return{type:A,payload:{collection:e.get("name"),slug:t}}}(e,t));try{const o=await Me(n(),e,t);r(function(e,t){return{type:M,payload:{collection:e.get("name"),entry:t}}}(e,o)),r(we(o))}catch(n){r((0,T.wN)({message:{details:n.message,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),r(function(e,t,r){return{type:I,payload:{error:e,collection:t.get("name"),slug:r}}}(n,e,t))}}}async function Me(e,t,r){const n=(0,f.Rg)(e.config);return await n.getEntry(e,t,r)}const Ie=(0,i.fromJS)({append_next:{action:"next",append:!0}});function De(e){return a.Cursor.create(e).updateStore("actions",(e=>e.union(Ie.filter((t=>e.has(t.get("action")))).keySeq())))}function Le(e,t=0){return async(r,n)=>{if(e.get("isFetching"))return;const o=n(),i=(0,_.mF)(o.entries,e.get("name"));if(i&&i.length>0){const t=i[0];return r(ge(e,t.get("key"),t.get("direction")))}const s=(0,f.Rg)(o.config),l=(0,c._5)(o,e.get("name"),"listEntries"),p=l?(0,u.B)(o.integrations,s.getToken,l):s,d=!!(t&&!isNaN(t)&&t>0);r(fe(e));try{const n=e.has("nested")||(0,C.nR)(e);let o=await(n?p.listAllEntries(e).then((e=>({entries:e}))):p.listEntries(e,t));o=j(j({},o),{},{cursor:l?a.Cursor.create({actions:["next"],meta:{usingOldPaginationAPI:!0},data:{nextPage:t+1}}):a.Cursor.create(o.cursor)}),r(pe(e,o.cursor.meta.get("usingOldPaginationAPI")?o.entries.reverse():o.entries,o.pagination,De(o.cursor),d))}catch(t){return r((0,T.wN)({message:{details:t,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),Promise.reject(r(de(e,t)))}}}function Ne(e,t){return async(r,n)=>{const o=n(),i=e.get("name");if(o.entries.getIn(["pages",`${i}`,"isFetching"]))return;const a=(0,f.Rg)(o.config),{action:l,append:c}=Ie.has(t)?Ie.get(t).toJS():{action:t,append:!1},u=(0,s.k)(o.cursors,e.get("name"));if(u.meta.get("usingOldPaginationAPI",!1))return r(Le(e,u.data.get("nextPage")));try{var p;r(fe(e));const{entries:t,cursor:n}=await function(e,t,r){if(!t.actions.has(r))throw new Error(`The current cursor does not support the pagination action "${r}".`);return e.traverseCursor(t,r)}(a,u,l),o=null===(p=n.meta)||void 0===p?void 0:p.get("page");return r(pe(e,t,o,De(n),c))}catch(t){return console.error(t),r((0,T.wN)({message:{details:t,key:"ui.toast.onFailToLoadEntries"},type:"error",dismissAfter:8e3})),Promise.reject(r(de(e,t)))}}}function $e(e,t){return async(r,n)=>{new URLSearchParams(t).forEach(((t,r)=>{e=(0,l.BP)(e,r,(e=>{return e.set("default",!!["true","True","TRUE"].includes(r=t)||!["false","False","FALSE"].includes(r)&&function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(r));var r}))}));const o=e.get("fields",(0,i.List)()),a=function(e){return e.filter((e=>!e.get("meta"))).toList()}(o),s=Fe(a),c=function(e){return e.filter((e=>!0===e.get("meta"))).toList()}(o),u=Fe(c),p=n(),d=(0,f.Rg)(p.config);e.has("media_folder")||await(0,S.yV)(r,n());const h=function(e,t){if(!(0,C.nR)(e))return{};const r=Fe(t,(function(e){return e.get(C.mb)!==C.JD.DUPLICATE&&e.get(C.mb)!==C.JD.TRANSLATE}));return(0,C.wC)(e,r)}(e,a);let g=(0,m.Y)(e.get("name"),"","",{data:s,i18n:h,mediaFiles:[],meta:u});g=await d.processEntry(p,e,g),r({type:G,payload:g})}}function Fe(e,t=(()=>!1)){return e.reduce(((e,r)=>{const n=e,a=r;if(t(a))return n;const s=a.get("field")||a.get("fields"),l="list"==a.get("widget"),c=a.get("name"),u=a.get("default",null);if(i.List.isList(s)||i.Map.isMap(s)){if(l&&i.List.isList(u))n[c]=u;else{const e=i.List.isList(s)?s:(0,i.List)([s]),r=l?[Fe(e,t)]:Fe(e,t);f=r,[[{}],{}].some((e=>o()(f,e)))||(n[c]=r)}return n}var f;return null!==u&&(n[c]=u),n}),{})}function Be({entry:e}){return e.get("mediaFiles").toArray().filter((e=>e.get("draft"))).map((e=>(0,y.r)({path:e.get("path"),file:e.get("file"),url:e.get("url"),field:e.get("field")})))}function Ue(e,t){const r=(0,l.LY)(e,t.get("slug"));function n(e){return function(e,t){return g(e,t,"serialize")}(e,r)}const o=n(t.get("data"));let i=t.set("data",o);return(0,C.nR)(e)&&(i=(0,C.ci)(e,i,n)),i}function ze(e){return async(t,r)=>{const n=r(),o=n.entryDraft,i=o.get("fieldsErrors"),a=(0,c.St)(n,e.get("name"));if(!i.isEmpty())return i.some((e=>e.some((e=>e.type&&e.type===v.Z.PRESENCE))))&&t((0,T.wN)({message:{key:"ui.toast.missingRequiredField"},type:"error",dismissAfter:8e3})),Promise.reject();const s=(0,f.Rg)(n.config),l=o.get("entry"),u=Be({entry:l}),p=Ue(e,l),d=o.set("entry",p);return t(function(e,t){return{type:re,payload:{collectionName:e.get("name"),entrySlug:t.get("slug")}}}(e,p)),s.persistEntry({config:n.config,collection:e,entryDraft:d,assetProxies:u,usedSlugs:a}).then((async r=>{t((0,T.wN)({message:{key:"ui.toast.entrySaved"},type:"success",dismissAfter:4e3})),u.length>0&&await t((0,S.pW)()),t(function(e,t,r){return{type:ne,payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),slug:r}}}(e,p,r)),e.has("nested")&&await t(Le(e)),l.get("slug")!==r&&(await t(Ae(e,r)),(0,E.GN)(e.get("name"),r))})).catch((r=>(console.error(r),t((0,T.wN)({message:{details:r,key:"ui.toast.onFailToPersist"},type:"error",dismissAfter:8e3})),Promise.reject(t(function(e,t,r){return{type:oe,error:"Failed to persist entry",payload:{collectionName:e.get("name"),entrySlug:t.get("slug"),error:r.toString()}}}(e,p,r))))))}}function We(e,t){return(r,n)=>{const o=n(),i=(0,f.Rg)(o.config);return r(function(e,t){return{type:ie,payload:{collectionName:e.get("name"),entrySlug:t}}}(e,t)),i.deleteEntry(o,e,t).then((()=>r(be(e,t)))).catch((n=>(r((0,T.wN)({message:{details:n,key:"ui.toast.onFailToDelete"},type:"error",dismissAfter:8e3})),console.error(n),Promise.reject(r(function(e,t,r){return{type:se,payload:{collectionName:e.get("name"),entrySlug:t,error:r.toString()}}}(e,t,n))))))}}function qe(e,t,r){return{error:{type:v.Z.CUSTOM,message:r(`editor.editorControlPane.widget.${t}`,{path:e})}}}function He(e,t,r,n,o){if(r.get("meta")&&"path"===r.get("name")){var a;if(!n)return qe(n,"invalidPath",o);const r=n.split("/").map((0,k.aX)(e.config.slug)).join("/");if(n!==r)return qe(n,"invalidPath",o);const s=(0,O.x)(t,(0,i.fromJS)({entry:{meta:{path:n}}})),l=s?(0,_.sD)(e.entries,t.get("name"),s):void 0,c=null==l?void 0:l.get("path"),u=null===(a=e.entryDraft)||void 0===a?void 0:a.getIn(["entry","path"]);if(c&&c!==u)return qe(n,"pathExists",o)}return{error:!1}}},93854:(e,t,r)=>{"use strict";r.d(t,{FG:()=>d,LX:()=>p,Nh:()=>b,RL:()=>c,WF:()=>m,ZJ:()=>g,_W:()=>l,cq:()=>u,pY:()=>f,q$:()=>h,zg:()=>v});var n=r(24688),o=r(49469),i=r(98343),a=r(90737),s=r(52977);const l="ADD_ASSETS",c="ADD_ASSET",u="REMOVE_ASSET",f="LOAD_ASSET_REQUEST",p="LOAD_ASSET_SUCCESS",d="LOAD_ASSET_FAILURE";function h(e){return{type:l,payload:e}}function g(e){return{type:c,payload:e}}function m(e){return{type:u,payload:e}}const y=(0,o.r)({path:"empty.svg",file:new File(['<svg xmlns="http://www.w3.org/2000/svg"></svg>'],"empty.svg",{type:"image/svg+xml"})});function v(e,t,r){return function(n,o){return e(b({collection:t,entry:r,path:n,field:o}))}}function b({collection:e,entry:t,path:r,field:l}){return(c,u)=>{if(!r)return y;const h=u(),m=(0,i.$C)(h.config,e,t,r,l);let{asset:v,isLoading:b,error:w}=h.medias[m]||{};return b?y:v||((0,n.isAbsolutePath)(m)||w?(v=(0,o.r)({path:m,url:r}),c(g(v))):(c(function(e){return async(t,r)=>{try{t({type:f,payload:{path:e}}),await(0,s.yV)(t,r());const n=(0,a.cK)(r(),e);if(n){const i=await(0,s.Gv)(t,r(),n);t(g((0,o.r)({path:e,url:i||e})))}else{const{url:n}=await(0,s.LA)(r(),e);t(g((0,o.r)({path:e,url:n})))}t({type:p,payload:{path:e}})}catch(r){t(function(e,t){return{type:d,payload:{path:e,error:t}}}(e,r))}}}(m)),v=y),v)}}},52977:(e,t,r)=>{"use strict";r.d(t,{$A:()=>G,$E:()=>z,$g:()=>E,BZ:()=>H,C9:()=>U,D6:()=>w,Ge:()=>x,Gv:()=>oe,H$:()=>C,K6:()=>N,Ke:()=>j,LA:()=>K,RF:()=>L,St:()=>A,UN:()=>F,Y6:()=>P,eT:()=>b,en:()=>S,fq:()=>I,h6:()=>V,ko:()=>B,ky:()=>k,lk:()=>R,pQ:()=>T,pW:()=>W,qV:()=>_,qb:()=>$,tV:()=>D,xZ:()=>M,yV:()=>ne,yv:()=>O});var n=r(34106),o=r(24688),i=r(44905),a=r(49469),s=r(93324),l=r(98343),c=r(90737),u=r(26969),f=r(93854),p=r(69217),d=r(56079),h=r(22612),g=r(15967);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b="MEDIA_LIBRARY_OPEN",w="MEDIA_LIBRARY_CLOSE",S="MEDIA_LIBRARY_CREATE",x="MEDIA_INSERT",_="MEDIA_REMOVE_INSERTED",O="MEDIA_LOAD_REQUEST",E="MEDIA_LOAD_SUCCESS",k="MEDIA_LOAD_FAILURE",C="MEDIA_PERSIST_REQUEST",T="MEDIA_PERSIST_SUCCESS",P="MEDIA_PERSIST_FAILURE",j="MEDIA_DELETE_REQUEST",R="MEDIA_DELETE_SUCCESS",A="MEDIA_DELETE_FAILURE",M="MEDIA_DISPLAY_URL_REQUEST",I="MEDIA_DISPLAY_URL_SUCCESS",D="MEDIA_DISPLAY_URL_FAILURE";function L(e){const t={show:e.show||(()=>{}),hide:e.hide||(()=>{}),onClearControl:e.onClearControl||(()=>{}),onRemoveControl:e.onRemoveControl||(()=>{}),enableStandalone:e.enableStandalone||(()=>{})};return{type:S,payload:t}}function N(e){return(t,r)=>{const n=r().mediaLibrary.get("externalLibrary");n&&n.onClearControl({id:e})}}function $(e){return(t,r)=>{const n=r().mediaLibrary.get("externalLibrary");n&&n.onRemoveControl({id:e})}}function F(e={}){return(t,r)=>{const o=r().mediaLibrary.get("externalLibrary");if(o){const{controlID:t,value:r,config:i=(0,n.Map)(),allowMultiple:a,forImage:s}=e;o.show({id:t,value:r,config:i.toJS(),allowMultiple:a,imagesOnly:s})}t(function(e){return{type:b,payload:e}}(e))}}function B(){return(e,t)=>{const r=t().mediaLibrary.get("externalLibrary");r&&r.hide(),e({type:w})}}function U(e,t){return(r,n)=>{const o=n(),i=o.config,a=o.entryDraft.get("entry"),s=o.entryDraft.getIn(["entry","collection"]),c=o.collections.get(s);r(function(e){return{type:x,payload:{mediaPath:e}}}(e=Array.isArray(e)?e.map((e=>(0,l.sm)(i,c,e,a,t))):(0,l.sm)(i,c,e,a,t)))}}function z(e){return{type:_,payload:{controlID:e}}}function W(e={}){const{delay:t=0,query:r="",page:n=1,privateUpload:o}=e;return async(e,a)=>{const l=a(),c=(0,i.Rg)(l.config),f=(0,s._5)(l,null,"assetStore");if(f){const t=(0,u.B)(l.integrations,c.getToken,f);e(Z(n));try{const i=await t.retrieve(r,n,o);return e(Y(i,{page:n,canPaginate:!0,dynamicSearch:!0,dynamicSearchQuery:r,privateUpload:o}))}catch(t){return e(J({privateUpload:o}))}}function p(){return c.getMedia().then((t=>e(Y(t)))).catch((t=>{console.error(t),404===t.status?(console.log("This 404 was expected and handled appropriately."),e(Y([]))):e(J())}))}return e(Z(n)),t>0?new Promise((e=>{setTimeout((()=>e(p())),t)})):p()}}function q({id:e,file:t,assetProxy:r,draft:n}){return{id:e,name:(0,o.basename)(r.path),displayURL:r.url,draft:n,file:t,size:t.size,url:r.url,path:r.path,field:r.field}}function H(e,t={}){const{privateUpload:r,field:n}=t;return async(t,h)=>{const m=h(),y=(0,i.Rg)(m.config),v=(0,s._5)(m,null,"assetStore"),b=(0,c.x5)(m,n),w=(0,d.Ql)(e.name.toLowerCase(),m.config.slug),S=b.find((e=>e.name.toLowerCase()===w)),x=(0,l.s)(m.entryDraft);if(!v&&S){if(!window.confirm(`${S.name} already exists. Do you want to replace it?`))return;await t(V(S,{privateUpload:r}))}!v&&x||t({type:C});try{let i,s;if(v)try{const t=(0,u.B)(m.integrations,y.getToken,v),n=await t.upload(e,r);i=(0,a.r)({url:n.asset.url,path:n.asset.url})}catch(t){i=(0,a.r)({file:e,path:w})}else{if(r)throw new Error("The Private Upload option is only available for Asset Store Integration");{const t=m.entryDraft.get("entry"),r=m.collections.get(null==t?void 0:t.get("collection")),o=(0,l.$C)(m.config,r,t,w,n);i=(0,a.r)({file:e,path:o,field:n})}}if(t((0,f.ZJ)(i)),v)s=q({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:!1});else{if(x)return s=q({id:await(0,o.getBlobSHA)(e),file:e,assetProxy:i,draft:x}),t((0,p.Kv)(s));s=await y.persistMedia(m.config,i)}return t(function(e,t={}){const{privateUpload:r}=t;return{type:T,payload:{file:e,privateUpload:r}}}(s,{privateUpload:r}))}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to persist media: ${e}`,type:"error",dismissAfter:8e3})),t(function(e={}){const{privateUpload:t}=e;return{type:P,payload:{privateUpload:t}}}({privateUpload:r}))}}}function V(e,t={}){const{privateUpload:r}=t;return async(t,n)=>{const o=n(),a=(0,i.Rg)(o.config),c=(0,s._5)(o,null,"assetStore");if(c){const n=(0,u.B)(o.integrations,a.getToken,c);t(Q());try{return await n.delete(e.id),t(X(e,{privateUpload:r}))}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to delete media: ${e.message}`,type:"error",dismissAfter:8e3})),t(ee({privateUpload:r}))}}try{if(e.draft)t((0,f.WF)(e.path)),t((0,p.HG)({id:e.id}));else{const r=(0,l.s)(o.entryDraft);t(Q()),t((0,f.WF)(e.path)),await a.deleteMedia(o.config,e.path),t(X(e)),r&&t((0,p.HG)({id:e.id}))}}catch(e){return console.error(e),t((0,g.wN)({message:`Failed to delete media: ${e.message}`,type:"error",dismissAfter:8e3})),t(ee())}}}async function K(e,t){const r=(0,i.Rg)(e.config),{url:n}=await r.getMediaFile(t);return{url:n}}function G(e){return async(t,r)=>{const{displayURL:n,id:o}=e,a=r(),s=(0,c.ag)(a,o);if(!o||!n||s.get("url")||s.get("isFetching")||s.get("err"))return Promise.resolve();if("string"==typeof n)return t(te(o)),void t(re(o,n));try{const e=(0,i.Rg)(a.config);t(te(o));const r=await e.getMediaDisplayURL(n);if(!r)throw new Error("No display URL was returned!");t(re(o,r))}catch(e){console.error(e),t(function(e,t){return{type:D,payload:{key:e,err:t}}}(o,e))}}}function Z(e){return{type:O,payload:{page:e}}}function Y(e,t={}){return{type:E,payload:y({files:e},t)}}function J(e={}){const{privateUpload:t}=e;return{type:k,payload:{privateUpload:t}}}function Q(){return{type:j}}function X(e,t={}){const{privateUpload:r}=t;return{type:R,payload:{file:e,privateUpload:r}}}function ee(e={}){const{privateUpload:t}=e;return{type:A,payload:{privateUpload:t}}}function te(e){return{type:M,payload:{key:e}}}function re(e,t){return{type:I,payload:{key:e,url:t}}}async function ne(e,t){!1===t.mediaLibrary.get("isLoading")||t.mediaLibrary.get("externalLibrary")||await(0,h.R)(e,(e=>({predicate:({type:e})=>e===E||e===k,run:()=>e()})))}async function oe(e,t,r){const n=(0,c.ag)(t,r.id);let o;if(n.get("url"))o=n.get("url");else if(n.get("err"))o=null;else{var i;const t=r.id,a=(0,h.R)(e,(e=>({predicate:({type:e,payload:r})=>(e===I||e===D)&&r.key===t,run:(t,r,n)=>e(n.payload.url)})));n.get("isFetching")||e(G(r)),o=null!==(i=await a)&&void 0!==i?i:null}return o}},15967:(e,t,r)=>{"use strict";r.d(t,{JF:()=>n,L1:()=>l,N5:()=>s,UW:()=>o,WR:()=>i,wN:()=>a});const n="NOTIFICATION_SEND",o="NOTIFICATION_DISMISS",i="NOTIFICATION_CLEAR";function a(e){return{type:n,payload:e}}function s(e){return{type:o,id:e}}function l(){return{type:i}}},57655:(e,t,r)=>{"use strict";r.d(t,{$h:()=>d,AQ:()=>g,B:()=>h,IF:()=>p,IO:()=>y,M$:()=>l,Pu:()=>m,Qq:()=>u,gQ:()=>c,o8:()=>f});var n=r(18149),o=r.n(n),i=r(44905),a=r(26969),s=r(93324);const l="SEARCH_ENTRIES_REQUEST",c="SEARCH_ENTRIES_SUCCESS",u="SEARCH_ENTRIES_FAILURE",f="QUERY_REQUEST",p="QUERY_SUCCESS",d="QUERY_FAILURE",h="SEARCH_CLEAR";function g(){return{type:h}}function m(e,t,r=0){return async(n,f)=>{const p=f(),{search:d}=p,h=(0,i.Rg)(p.config),g=t||p.collections.keySeq().toArray(),m=g.filter((e=>(0,s._5)(p,e,"search"))),y=(0,s._5)(p,m[0],"search");if(d.isFetching&&d.term===e&&o()(g,d.collections)&&(d.page===r||!y))return;n(function(e,t,r){return{type:l,payload:{searchTerm:e,searchCollections:t,page:r}}}(e,g,r));const v=y?(0,a.B)(p.integrations,h.getToken,y).search(m,e,r):h.search(p.collections.filter(((e,t)=>-1!==g.indexOf(t))).valueSeq().toArray(),e);try{const e=await v;return n(function(e,t){return{type:c,payload:{entries:e,page:t}}}(e.entries,e.pagination))}catch(e){return n(function(e){return{type:u,payload:{error:e}}}(e))}}}function y(e,t,r,n,o,l){return async(c,u)=>{c(function(e){return{type:f,payload:{searchTerm:e}}}(n));const h=u(),g=(0,i.Rg)(h.config),m=(0,s._5)(h,t,"search"),y=h.collections.find((e=>e.get("name")===t)),v=m?(0,a.B)(h.integrations,g.getToken,m).searchBy(r.map((e=>`data.${e}`)),t,n):g.query(y,r,n,o,l);try{const t=await v;return c(function(e,t){return{type:p,payload:{namespace:e,hits:t}}}(e,t.hits))}catch(e){return c(function(e){return{type:d,payload:{error:e}}}(e))}}}},92699:(e,t,r)=>{"use strict";r.d(t,{BA:()=>i,Md:()=>s,oj:()=>c,zv:()=>a});var n=r(44905),o=r(15967);const i="STATUS_REQUEST",a="STATUS_SUCCESS",s="STATUS_FAILURE";function l(e){return{type:a,payload:{status:e}}}function c(){return async(e,t)=>{try{const r=t();if(r.status.isFetching)return;e({type:i});const a=(0,n.Rg)(r.config),s=await a.status(),c="ui.toast.onBackendDown",u=r.notifications.notifications.filter((e=>{var t;return"string"!=typeof e.message&&(null===(t=e.message)||void 0===t?void 0:t.key)===c}));if(!1===s.api.status)return 0===u.length&&e((0,o.wN)({message:{details:s.api.statusPage,key:"ui.toast.onBackendDown"},type:"error"})),e(l(s));if(!0===s.api.status&&u.length>0&&u.forEach((t=>{e((0,o.N5)(t.id))})),!1===s.auth.status){const t="ui.toast.onLoggedOut";r.notifications.notifications.find((e=>{var r;return"string"!=typeof e.message&&(null===(r=e.message)||void 0===r?void 0:r.key)===t}))||e((0,o.wN)({message:{key:"ui.toast.onLoggedOut"},type:"error"}))}e(l(s))}catch(t){e(function(e){return{type:s,payload:{error:e}}}(t))}}}},22612:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,R:()=>i});var n=r(15161);function o({predicate:e,run:t}){return{type:n.w,predicate:e,run:t}}async function i(e,t,r=3e4){let n=!1;const i=new Promise((r=>{e(o(t(r)))})),a=new Promise((e=>{setTimeout((()=>{n?e():(console.warn("Wait Action timed out"),e(null))}),r)}));return await Promise.race([i.then((e=>(n=!0,e))).catch(null),a])}},44905:(e,t,r)=>{"use strict";r.d(t,{FO:()=>X,GB:()=>Z,Rg:()=>ee});var n=r(16765),o=r.n(n),i=r(72579),a=r.n(i),s=r(829),l=r.n(s),c=r(5648),u=r.n(c),f=r(75652),p=r.n(f),d=r(85121),h=r.n(d),g=r(35676),m=r.n(g),y=r(55027),v=r.n(y),b=r(34106),w=r(14478),S=r(24688),x=r(21023),_=r(75976),O=r(76221),E=r(86402),k=r(98343),C=r(75863),T=r(14093),P=r(19445),j=r(56079),R=r(19619),A=r(11040),M=r(52588),I=r(72431),D=r(49971),L=r(2995);const N=["field"];function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{extractTemplateVars:U,dateParsers:z,expandPath:W}=_.stringTemplate;class q{constructor(){B(this,"storageKey","decap-cms-user")}retrieve(){const e=window.localStorage.getItem(this.storageKey);return e&&JSON.parse(e)}store(e){window.localStorage.setItem(this.storageKey,JSON.stringify(e))}logout(){window.localStorage.removeItem(this.storageKey)}}function H(e,t){const r="backup";return e?`${r}.${e}${t?`.${t}`:""}`:r}function V(e,t){const r=a()(t.data,e);if(r)return String(r);{const r=e.split(".")[0];return t[r]?t[r]:""}}function K(e){return t=>e.reduce(((e,r)=>{const n=V(r,t);return n?`${e} ${n}`:e}),"")}function G(e,t){return e.score>t.score?-1:e.score<t.score?1:0}function Z(e,t){const r=e.get("folder",""),n=t.toLowerCase().replace(r.toLowerCase(),"");return(0,x.join)((0,x.dirname)(u()(n,"/")),(0,x.basename)(n,(0,x.extname)(t)))}function Y(e,t){return(0,T.XP)(t)?(0,x.dirname)(e).slice(t.get("folder").length+1)||"/":e}function J(e){var t;let r;return r=(null===(t=e.get("nested"))||void 0===t?void 0:t.get("depth"))||(0,S.getPathDepth)(e.get("path","")),(0,L.nR)(e)&&(r=(0,L.Sw)(e,r)),r}class Q{constructor(e,{backendName:t,authStore:r,config:n}){if(B(this,"implementation",void 0),B(this,"backendName",void 0),B(this,"config",void 0),B(this,"authStore",void 0),B(this,"user",void 0),B(this,"backupSync",void 0),B(this,"updateUserCredentials",(e=>{const t=this.authStore.retrieve();if(t&&t.backendName===this.backendName)return this.user=F(F({},t),e),this.authStore.store(this.user),this.user})),B(this,"getToken",(()=>this.implementation.getToken())),this.deleteAnonymousBackup(),this.config=n,this.implementation=e.init(this.config,{useWorkflow:(0,E.Ii)(this.config),updateUserCredentials:this.updateUserCredentials,initialWorkflowStatus:M.i7.first()}),this.backendName=t,this.authStore=r,null===this.implementation)throw new Error("Cannot instantiate a Backend with no implementation");this.backupSync=(0,S.asyncLock)()}async status(){let e={auth:{status:!0},api:{status:!0,statusPage:""}};for(let t=1;t<=3;t++){if(e=await this.implementation.status(),Object.values(e).every((e=>!0===e.status)))return e;await new Promise((e=>setTimeout(e,1e3*t)))}return e}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=F(F({},e),{},{backendName:this.backendName}),this.authStore.store(this.user),this.user))):Promise.resolve(null)}isGitBackend(){var e,t;return(null===(e=(t=this.implementation).isGitBackend)||void 0===e?void 0:e.call(t))||!1}authComponent(){return this.implementation.authComponent()}authenticate(e){return this.implementation.authenticate(e).then((e=>(this.user=F(F({},e),{},{backendName:this.backendName}),this.authStore&&this.authStore.store(this.user),this.user)))}async logout(){try{await this.implementation.logout()}catch(e){console.warn("Error during logout",e.message)}finally{this.user=null,this.authStore&&this.authStore.logout()}}async entryExist(e,t,r,n){const o=n&&await this.implementation.unpublishedEntry({collection:e.get("name"),slug:r}).catch((e=>e.name===S.EDITORIAL_WORKFLOW_ERROR&&e.notUnderEditorialWorkflow?Promise.resolve(!1):Promise.reject(e)));return o||await this.implementation.getEntry(t).then((({data:e})=>e)).catch((()=>Promise.resolve(!1)))}async generateUniqueSlug(e,t,r,n,o){const i=r.slug;let a;a=o?Z(e,o):(0,A.wK)(e,t,i);let s=1,l=a;for(;n.includes(l)||await this.entryExist(e,(0,T.VD)(e,l),l,(0,E.Ii)(r));)l=`${a}${(0,j.KI)(" ",i)}${s++}`;return l}processEntries(e,t){const r=e.map((e=>(0,P.Y)(t.get("name"),(0,T.g_)(t,e.file.path),e.file.path,{raw:e.data||"",label:e.file.label,author:e.file.author,updatedOn:e.file.updatedOn,meta:{path:Y(e.file.path,t)}}))).map(this.entryWithFormat(t)),n=t.get("filter"),o=n?this.filterEntries({entries:r},n):r;if((0,L.nR)(t)){const e=(0,T.hd)(t);return(0,L.N6)(t,e,o)}return o}async listEntries(e){var t;const r=(0,T.hd)(e);let n;const o=e.get("type");if(o===I.S)n=()=>{const t=J(e);return this.implementation.entriesByFolder(e.get("folder"),r,t)};else{if(o!==I.h)throw new Error(`Unknown collection type: ${o}`);{const t=e.get("files").map((e=>({path:e.get("file"),label:e.get("label")}))).toArray();n=()=>this.implementation.entriesByFiles(t)}}const i=await n(),a=S.Cursor.create(i[S.CURSOR_COMPATIBILITY_SYMBOL]).wrapData({cursorType:"collectionEntries",collection:e});return{entries:this.processEntries(i,e),pagination:null===(t=a.meta)||void 0===t?void 0:t.get("page"),cursor:a}}async listAllEntries(e){if(e.get("folder")&&this.implementation.allEntriesByFolder){const t=J(e),r=(0,T.hd)(e);return this.implementation.allEntriesByFolder(e.get("folder"),r,t,function(e){console.log("collection",e.toJS());let t="";if(e.get("path")&&(t=`${e.get("folder")}/${e.get("path")}`.replace(/{{.*}}/gm,"(.*)")),(0,L.nR)(e)){const{defaultLocale:r}=(0,L.Kb)(e);t+=`\\.${r}\\..*`}return console.log("ruleString",t),t?new RegExp(t):void 0}(e)).then((t=>this.processEntries(t,e)))}const t=await this.listEntries(e),{entries:r}=t;let{cursor:n}=t;for(;n&&n.actions.includes("next");){const{entries:e,cursor:t}=await this.traverseCursor(n,"next");r.push(...e),n=t}return r}async search(e,t){const r=[],n=e.map((async e=>{const r=e.get("summary",""),n=U(r);let o=[];var i;e.get("type")===I.h?null===(i=e.get("files"))||void 0===i||i.forEach((e=>{const t=e.get("fields").map((e=>e.get("name"))).toArray();o=[...o,...t]})):o=[(0,T.GK)(e,"title"),(0,T.GK)(e,"shortTitle"),(0,T.GK)(e,"author"),...n.map((t=>z[t]?(0,T.GK)(e,"date"):t))];const a=o.filter(Boolean),s=await this.listAllEntries(e);return w.filter(t,s,{extract:K(p()(a))})})).map((e=>e.catch((e=>(r.push(e),[]))))),o=await Promise.all(n).then((e=>m()(e)));if(r.length>0)throw new Error({message:"Errors ocurred while searching entries locally!",errors:r});return{entries:o.filter((({score:e})=>e>5)).sort(G).map((e=>e.original))}}async query(e,t,r,n,i){let s=await this.listAllEntries(e);n&&(s=s.filter((e=>e.slug===n)));const l=function(e,t){return e.reduce(((e,r)=>{const n=t.reduce(((e,t)=>{const n=W({data:r.data,path:t});return e.push(...n),e}),[]);for(let t=0;t<n.length;t++)e.push(F(F({},r),{},{field:n[t]}));return e}),[])}(s,t);let c=w.filter(r,l,{extract:e=>V(e.field,e)}).sort(G).map((e=>e.original));void 0!==i&&i>0&&(c=c.slice(0,i));const u=function(e){const t=e.map((e=>e.field)),r={},n=e.reduce(((e,t)=>{if(!e[t.slug]){const{field:n}=t,o=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,N);e[t.slug]=o,r[t.slug]=(0,b.Set)()}const n=t.field.split(".");let o=e[t.slug].data;for(let e=0;e<n.length;e++)if(o=o[n[e]],Array.isArray(o)){const o=n.slice(0,e+1).join(".");r[t.slug]=r[t.slug].add(o)}return e}),{});return Object.keys(n).forEach((e=>{const i=n[e].data;for(const n of r[e].toArray()){const e=a()(i,n),r=e.filter(((e,r)=>t.some((e=>`${e}.`.startsWith(`${n}.${r}.`)))));r.sort(((r,o)=>{const i=e.indexOf(r),a=e.indexOf(o),s=`${n}.${i}.`,l=`${n}.${a}.`;return t.findIndex((e=>`${e}.`.startsWith(s)))-t.findIndex((e=>`${e}.`.startsWith(l)))})),o()(i,n,r)}})),Object.values(n)}(c);return{query:r,hits:u}}traverseCursor(e,t){const[r,n]=e.unwrapData(),o=r.get("collection");return this.implementation.traverseCursor(n,t).then((async({entries:e,cursor:t})=>({entries:this.processEntries(e,o),cursor:S.Cursor.create(t).wrapData({cursorType:"collectionEntries",collection:o})})))}async getLocalDraftBackup(e,t){const r=H(e.get("name"),t),n=await S.localForage.getItem(r);if(!n||!n.raw.trim())return{};const{raw:o,path:i}=n;let{mediaFiles:a=[]}=n;a=a.map((e=>e.file?F(F({},e),{},{url:URL.createObjectURL(e.file)}):e));const s=(0,T.Io)(e,t),l=r=>this.entryWithFormat(e)((0,P.Y)(e.get("name"),t,i,{raw:r,label:s,mediaFiles:a,meta:{path:Y(i,e)}})),c=l(o);if((0,L.nR)(e)&&n.i18n){const e=(0,L.tN)(n.i18n,l);c.i18n=e}return{entry:c}}async persistLocalDraftBackup(e,t){try{await this.backupSync.acquire();const r=H(t.get("name"),e.get("slug")),n=this.entryToRaw(t,e);if(!n.trim())return;const o=await Promise.all(e.get("mediaFiles").toJS().map((async e=>{var t;if(null!==(t=e.url)&&void 0!==t&&t.startsWith("blob:")){const t=await fetch(e.url).then((e=>e.blob()));return F(F({},e),{},{file:(0,S.blobToFileObj)(e.name,t)})}return e})));let i;return(0,L.nR)(t)&&(i=(0,L.wi)(t,e,(e=>this.entryToRaw(t,e)))),await S.localForage.setItem(r,F({raw:n,path:e.get("path"),mediaFiles:o},i&&{i18n:i})),await S.localForage.setItem(H(),n)}catch(e){console.warn("persistLocalDraftBackup",e)}finally{this.backupSync.release()}}async deleteLocalDraftBackup(e,t){try{return await this.backupSync.acquire(),await S.localForage.removeItem(H(e.get("name"),t)),t&&await S.localForage.removeItem(H(e.get("name"))),await this.deleteAnonymousBackup()}catch(e){console.warn("deleteLocalDraftBackup",e)}finally{this.backupSync.release()}}deleteAnonymousBackup(){return S.localForage.removeItem(H())}async getEntry(e,t,r){const n=(0,T.VD)(t,r),o=(0,T.Io)(t,r),i=(0,T.hd)(t),a=async n=>{const i=await this.implementation.getEntry(n);let a=(0,P.Y)(t.get("name"),r,i.file.path,{raw:i.data,label:o,mediaFiles:[],meta:{path:Y(i.file.path,t)}});return a=this.entryWithFormat(t)(a),a=await this.processEntry(e,t,a),a};let s;return s=(0,L.nR)(t)?await(0,L.u5)(t,i,n,r,a):await a(n),s}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 r=(0,O.RR)(e,t);if(t&&void 0!==t.raw){const e=r&&v()(r.fromFile.bind(r,t.raw))||{};return h()(e)&&console.error(e),Object.assign(t,{data:h()(e)?{}:e})}return r.fromFile(t)}}async processUnpublishedEntry(e,t,r){const{slug:n}=t;let o;if(e.get("type")===I.h){const t=e.get("files").find((e=>(null==e?void 0:e.get("name"))===n));o=(0,x.extname)(t.get("file"))}else o=(0,T.hd)(e);const i=[];if(r){const r=t.diffs.filter((e=>!e.path.endsWith(o))),a=await Promise.all(r.map((t=>this.implementation.unpublishedEntryMediaFile(e.get("name"),n,t.path,t.id))));i.push(...a.map((e=>F(F({},e),{},{draft:!0}))))}const a=l()(t.diffs.filter((e=>e.path.endsWith(o))),(e=>e.path.length)),s=(r,o,a)=>{const s=(0,P.Y)(e.get("name"),n,o,{raw:r,isModification:!a,label:e&&(0,T.Io)(e,n),mediaFiles:i,updatedOn:t.updatedAt,author:t.pullRequestAuthor,status:t.status,meta:{path:Y(o,e)}});return this.entryWithFormat(e)(s)},c=async r=>{const n=await this.implementation.unpublishedEntryDataFile(e.get("name"),t.slug,r.path,r.id);return s(n,r.path,r.newFile)};if(a.length<=0){const t=await this.implementation.getEntry((0,T.VD)(e,n));return s(t.data,t.file.path,!1)}if((0,L.nR)(e)){const t=(0,T.VD)(e,n),r=(0,L.Nr)(e,o,t,n,a);let i=await Promise.all(r.map((e=>c(e).catch((()=>null)))));return i=i.filter(Boolean),(await(0,L.N6)(e,o,i))[0]}return await c(a[0])}async unpublishedEntries(e){const t=await this.implementation.unpublishedEntries();return{pagination:0,entries:(await Promise.all(t.map((async t=>{const r=await this.implementation.unpublishedEntry({id:t}),n=r.collection,o=e.find((e=>e.get("name")===n));return o?await this.processUnpublishedEntry(o,r,!1):(console.warn(`Missing collection '${n}' for unpublished entry '${t}'`),null)})))).filter(Boolean)}}async processEntry(e,t,r){const n=(0,C._5)(e.integrations,null,"assetStore"),o=(0,T.bO)(e.config,t,(0,b.fromJS)(r));if(o.length>0&&!n){const e=await Promise.all(o.map((e=>this.implementation.getMedia(e))));r.mediaFiles=r.mediaFiles.concat(...e)}else r.mediaFiles=r.mediaFiles.concat(e.mediaLibrary.get("files")||[]);return r}async unpublishedEntry(e,t,r){const n=await this.implementation.unpublishedEntry({collection:t.get("name"),slug:r});let o=await this.processUnpublishedEntry(t,n,!0);return o=await this.processEntry(e,t,o),o}getDeploy(e,t,r){const n=this.config.site_url;if(n&&!1!==this.config.show_preview_links)return{url:(0,A.U8)(n,e,t,r,this.config.slug),status:"SUCCESS"}}async getDeployPreview(e,t,r,{maxAttempts:n=1,interval:o=5e3}={}){if(!this.implementation.getDeployPreview||!1===this.config.show_preview_links)return;let i,a=0;for(;!i&&a<n;)a++,i=await this.implementation.getDeployPreview(e.get("name"),t),i||await new Promise((e=>setTimeout((()=>e(void 0)),o)));return i?{url:(0,A.U8)(i.url,e,t,r,this.config.slug),status:i.status?i.status.toUpperCase():""}:void 0}async persistEntry({config:e,collection:t,entryDraft:r,assetProxies:n,usedSlugs:o,unpublished:i=!1,status:a}){const s=await this.invokePreSaveEvent(r.get("entry")),l=s&&r.setIn(["entry","data"],s)||r,c=l.getIn(["entry","newRecord"])||!1,u=(0,E.Ii)(e),f=(0,D.x)(t,l);let p;if(c){if(!(0,T.AQ)(t))throw new Error("Not allowed to create new entries in this collection");const r=await this.generateUniqueSlug(t,l.getIn(["entry","data"]),e,o,f),i=f||(0,T.VD)(t,r);p={path:i,slug:r,raw:this.entryToRaw(t,l.get("entry"))},function(e,t,r,n,o){e.map((e=>{const i=e.path,a=(0,k.$C)(t,r,n.get("entry").set("path",o),i,e.field);e.path=a}))}(n,e,t,l,i)}else{const e=l.getIn(["entry","slug"]);p={path:l.getIn(["entry","path"]),slug:f&&!u?Z(t,f):e,raw:this.entryToRaw(t,l.get("entry")),newPath:f}}const{slug:d,path:h,newPath:g}=p;let m=[p];if((0,L.nR)(t)){const e=(0,T.hd)(t);m=(0,L.R6)(t,e,l.get("entry"),(e=>this.entryToRaw(t,e)),h,d,g)}const y=await this.currentUser(),v=F({newEntry:c,commitMessage:(0,A.CZ)(c?"create":"update",e,{collection:t,slug:d,path:h,authorLogin:y.login,authorName:y.name},y.useOpenAuthoring),collectionName:t.get("name"),useWorkflow:u},{unpublished:i,status:a});return u||await this.invokePrePublishEvent(l.get("entry")),await this.implementation.persistEntry({dataFiles:m,assets:n},v),await this.invokePostSaveEvent(l.get("entry")),u||await this.invokePostPublishEvent(l.get("entry")),d}async invokeEventWithEntry(e,t){const{login:r,name:n}=await this.currentUser();return await(0,R.j2)({name:e,data:{entry:t,author:{login:r,name:n}}})}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 invokePreSaveEvent(e){return await this.invokeEventWithEntry("preSave",e)}async invokePostSaveEvent(e){await this.invokeEventWithEntry("postSave",e)}async persistMedia(e,t){const r=await this.currentUser(),n={commitMessage:(0,A.CZ)("uploadMedia",e,{path:t.path,authorLogin:r.login,authorName:r.name},r.useOpenAuthoring)};return this.implementation.persistMedia(t,n)}async deleteEntry(e,t,r){const n=e.config,o=(0,T.VD)(t,r),i=(0,T.hd)(t);if(!(0,T.Zh)(t))throw new Error("Not allowed to delete entries in this collection");const a=await this.currentUser(),s=(0,A.CZ)("delete",n,{collection:t,slug:r,path:o,authorLogin:a.login,authorName:a.name},a.useOpenAuthoring),l=(0,k.WK)(e.entries,t.get("name"),r);await this.invokePreUnpublishEvent(l);let c=[o];(0,L.nR)(t)&&(c=(0,L.Jn)(t,i,o,r)),await this.implementation.deleteFiles(c,s),await this.invokePostUnpublishEvent(l)}async deleteMedia(e,t){const r=await this.currentUser(),n=(0,A.CZ)("deleteMedia",e,{path:t,authorLogin:r.login,authorName:r.name},r.useOpenAuthoring);return this.implementation.deleteFiles([t],n)}persistUnpublishedEntry(e){return this.persistEntry(F(F({},e),{},{unpublished:!0}))}updateUnpublishedEntryStatus(e,t,r){return this.implementation.updateUnpublishedEntryStatus(e,t,r)}async publishUnpublishedEntry(e){const t=e.get("collection"),r=e.get("slug");await this.invokePrePublishEvent(e),await this.implementation.publishUnpublishedEntry(t,r),await this.invokePostPublishEvent(e)}deleteUnpublishedEntry(e,t){return this.implementation.deleteUnpublishedEntry(e,t)}entryToRaw(e,t){const r=(0,O.RR)(e,t.toJS()),n=this.fieldsOrder(e,t),o=(0,T.VF)(e,t);return r&&r.toFile(t.get("data").toJS(),n,o)}fieldsOrder(e,t){if(e.get("fields"))return e.get("fields").map((e=>e.get("name"))).toArray();const r=(e.get("files")||(0,b.List)()).filter((e=>e.get("name")===t.get("slug"))).get(0);if(null==r)throw new Error(`No file found for ${t.get("slug")} in ${e.get("name")}`);return r.get("fields").map((e=>e.get("name"))).toArray()}filterEntries(e,t){return e.entries.filter((e=>{const r=e.data[t.get("field")];return Array.isArray(r)?r.includes(t.get("value")):r===t.get("value")}))}}function X(e){if(!e.backend.name)throw new Error("No backend defined in configuration");const{name:t}=e.backend,r=new q,n=(0,R.N_)(t);if(n)return new Q(n,{backendName:t,authStore:r,config:e});throw new Error(`Backend not found: ${t}`)}const ee=function(){let e;return t=>e||(e=X(t))}()},69456:(e,t,r)=>{"use strict";r.d(t,{Z:()=>Ns});var n=r(34601),o=r(32673),i=r.n(o),a=r(12244),s=r.n(a),l=r(34536),c=r(9316),u=r(78841),f=r.n(u),p=r(57903),d=r(7267),h=r(75465),g=r.n(h),m=r(53327),y=r(36867),v=r(44905),b=r(12318),w=r(56079);function S(e){b.m8.push((0,w.f7)(e))}var x=r(52977),_=r(16760),O=r.n(_),E=r(34498),k=r.n(E),C=r(14478),T=r.n(C),P=r(24688),j=r(90737),R=r(45455),A=r.n(R),M=r(34106),I=r(64682),D=r(62797);const L=(0,n.Z)("div",{target:"el0uck00",label:"SearchContainer"})({name:"xts1j",styles:"height:37px;display:flex;align-items:center;position:relative;width:400px;"}),N=(0,n.Z)("input",{target:"el0uck01",label:"SearchInput"})("background-color:#eff0f4;border-radius:",m.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:",m.zIndex.zIndex1,";&:focus{outline:none;box-shadow:inset 0 0 0 2px ",m.colors.active,";}"),$=(0,n.Z)(m.Icon,{target:"el0uck02",label:"SearchIcon"})("position:absolute;top:50%;left:6px;z-index:",m.zIndex.zIndex2,";transform:translate(0,-50%);");function F({value:e,onChange:t,onKeyDown:r,placeholder:n,disabled:o}){return(0,D.jsx)(L,null,(0,D.jsx)($,{type:"search",size:"small"}),(0,D.jsx)(N,{value:e,onChange:t,onKeyDown:r,placeholder:n,disabled:o}))}F.propTypes={value:i().string,onChange:i().func.isRequired,onKeyDown:i().func.isRequired,placeholder:i().string.isRequired,disabled:i().bool};const B=F,U=(0,n.Z)("button",{target:"estf6120",label:"CloseButton"})(m.buttons.button,";",m.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;"),z=(0,n.Z)("h1",{target:"estf6121",label:"LibraryTitle"})("line-height:36px;font-size:22px;text-align:left;margin-bottom:25px;color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function W({onClose:e,title:t,isPrivate:r}){return(0,D.jsx)("div",null,(0,D.jsx)(U,{onClick:e},(0,D.jsx)(m.Icon,{type:"close"})),(0,D.jsx)(z,{isPrivate:r},t))}W.propTypes={onClose:i().func.isRequired,title:i().string.isRequired,isPrivate:i().bool};const q=W;var H=r(85411);function V(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const K={button:(0,D.css)(m.buttons.button,";",m.buttons.default,";display:inline-block;margin-left:15px;margin-right:2px;&[disabled]{",m.buttons.disabled,";cursor:default;};label:button;")},G=(0,n.Z)(I.KH,{target:"e288rjk0",label:"UploadButton"})(K.button,";",m.buttons.gray,";",m.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:",m.zIndex.zIndex0,";outline:none;}"),Z=(0,n.Z)("button",{target:"e288rjk1",label:"DeleteButton"})(K.button,";",m.buttons.lightRed,";"),Y=(0,n.Z)("button",{target:"e288rjk2",label:"InsertButton"})(K.button,";",m.buttons.green,";"),J=(0,n.Z)("button",{target:"e288rjk3",label:"ActionButton"})(K.button,";",(e=>!e.disabled&&(0,D.css)(m.buttons.gray,";label:ActionButton;")),""),Q=J;class X extends s().Component{constructor(...e){super(...e),V(this,"mounted",!1),V(this,"timeout",void 0),V(this,"state",{copied:!1}),V(this,"handleCopy",(()=>{clearTimeout(this.timeout);const{path:e,draft:t,name:r}=this.props;(0,H.Z)((0,P.isAbsolutePath)(e)||!t?e:r),this.setState({copied:!0}),this.timeout=setTimeout((()=>this.mounted&&this.setState({copied:!1})),1500)})),V(this,"getTitle",(()=>{const{t:e,path:t,draft:r}=this.props;return this.state.copied?e("mediaLibrary.mediaLibraryCard.copied"):t?(0,P.isAbsolutePath)(t)?e("mediaLibrary.mediaLibraryCard.copyUrl"):e(r?"mediaLibrary.mediaLibraryCard.copyName":"mediaLibrary.mediaLibraryCard.copyPath"):e("mediaLibrary.mediaLibraryCard.copy")}))}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}render(){const{disabled:e}=this.props;return(0,D.jsx)(J,{disabled:e,onClick:this.handleCopy},this.getTitle())}}X.propTypes={disabled:i().bool.isRequired,draft:i().bool,path:i().string,name:i().string,t:i().func.isRequired};const ee=(0,n.Z)("div",{target:"e1n0ky5z0",label:"LibraryTop"})({name:"1ab1jlb",styles:"position:relative;display:flex;flex-direction:column;"}),te=(0,n.Z)("div",{target:"e1n0ky5z1",label:"RowContainer"})({name:"gg4vpm",styles:"display:flex;justify-content:space-between;"}),re=(0,n.Z)("div",{target:"e1n0ky5z2",label:"ButtonsContainer"})({name:"6su6fj",styles:"flex-shrink:0;"});function ne({t:e,onClose:t,privateUpload:r,forImage:n,onDownload:o,onUpload:i,query:a,onSearchChange:s,onSearchKeyDown:l,searchDisabled:c,onDelete:u,canInsert:f,onInsert:p,hasSelection:d,isPersisting:h,isDeleting:g,selectedFile:m}){const y=h||g,v=!y,b=!y&&d,w=e(h?"mediaLibrary.mediaLibraryModal.uploading":"mediaLibrary.mediaLibraryModal.upload"),S=e(g?"mediaLibrary.mediaLibraryModal.deleting":"mediaLibrary.mediaLibraryModal.deleteSelected"),x=e("mediaLibrary.mediaLibraryModal.download"),_=e("mediaLibrary.mediaLibraryModal.chooseSelected");return(0,D.jsx)(ee,null,(0,D.jsx)(te,null,(0,D.jsx)(q,{onClose:t,title:`${r?e("mediaLibrary.mediaLibraryModal.private"):""}${e(n?"mediaLibrary.mediaLibraryModal.images":"mediaLibrary.mediaLibraryModal.mediaAssets")}`,isPrivate:r}),(0,D.jsx)(re,null,(0,D.jsx)(X,{disabled:!d,path:m.path,name:m.name,draft:m.draft,t:e}),(0,D.jsx)(Q,{onClick:o,disabled:!d},x),(0,D.jsx)(G,{label:w,imagesOnly:n,onChange:i,disabled:!v}))),(0,D.jsx)(te,null,(0,D.jsx)(B,{value:a,onChange:s,onKeyDown:l,placeholder:e("mediaLibrary.mediaLibraryModal.search"),disabled:c}),(0,D.jsx)(re,null,(0,D.jsx)(Z,{onClick:u,disabled:!b},S),f?(0,D.jsx)(Y,{onClick:p,disabled:!d},_):null)))}ne.propTypes={t:i().func.isRequired,onClose:i().func.isRequired,privateUpload:i().bool,forImage:i().bool,onDownload:i().func.isRequired,onUpload:i().func.isRequired,query:i().string,onSearchChange:i().func.isRequired,onSearchKeyDown:i().func.isRequired,searchDisabled:i().bool.isRequired,onDelete:i().func.isRequired,canInsert:i().bool,onInsert:i().func.isRequired,hasSelection:i().bool.isRequired,isPersisting:i().bool,isDeleting:i().bool,selectedFile:i().oneOfType([i().shape({path:i().string.isRequired,draft:i().bool.isRequired,name:i().string.isRequired}),i().shape({})])};const oe=ne;var ie=r(36981),ae=!("undefined"==typeof window||!window.document||!window.document.createElement),se=void 0;function le(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function ce(e){this.target=e,this.events={}}ce.prototype.getEventHandlers=function(e,t){var r,n=String(e)+" "+String((r=t)?!0===r?100:(r.capture<<0)+(r.passive<<1)+(r.once<<2):0);return this.events[n]||(this.events[n]={handlers:[],handleEvent:void 0},this.events[n].nextHandlers=this.events[n].handlers),this.events[n]},ce.prototype.handleEvent=function(e,t,r){var n=this.getEventHandlers(e,t);n.handlers=n.nextHandlers,n.handlers.forEach((function(e){e&&e(r)}))},ce.prototype.add=function(e,t,r){var n=this,o=this.getEventHandlers(e,r);le(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,r),this.target.addEventListener(e,o.handleEvent,r)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,le(o);var a=o.nextHandlers.indexOf(t);o.nextHandlers.splice(a,1),0===o.nextHandlers.length&&(n.target&&n.target.removeEventListener(e,o.handleEvent,r),o.handleEvent=void 0)}}};var ue="__consolidated_events_handlers__";function fe(e,t,r,n){e[ue]||(e[ue]=new ce(e));var o=function(e){if(e)return void 0===se&&(se=function(){if(!ae)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),r=function(){};window.addEventListener("testPassiveEventSupport",r,t),window.removeEventListener("testPassiveEventSupport",r,t)}catch(e){}return e}()),se?e:!!e.capture}(n);return e[ue].add(t,r,o)}var pe=r(94237);function de(e,t){var r,n=(r=e,!isNaN(parseFloat(r))&&isFinite(r)?parseFloat(r):"px"===r.slice(-2)?parseFloat(r.slice(0,-2)):void 0);if("number"==typeof n)return n;var o=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof o?o*t:void 0}var he,ge="above",me="inside",ye="below",ve="invisible";function be(e){return"string"==typeof e.type}var we=[];function Se(e){we.push(e),he||(he=setTimeout((function(){var e;for(he=null;e=we.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var r=we.indexOf(e);-1!==r&&(we.splice(r,1),!we.length&&he&&(clearTimeout(he),he=null))}}}var xe="undefined"!=typeof window,_e=function(e){function t(t){var r;return(r=e.call(this,t)||this).refElement=function(e){r._ref=e},r}(0,ie.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;xe&&(this.cancelOnNextTick=Se((function(){e.cancelOnNextTick=null;var t=e.props,r=t.children;t.debug,function(e,t){if(e&&!be(e)&&!t)throw new Error("<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(r,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=fe(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=fe(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},n.componentDidUpdate=function(){var e=this;xe&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=Se((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},n.componentWillUnmount=function(){xe&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},n._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,n=e.scrollableAncestor;if(n)return function(e){return"window"===e?r.g.window:e}(n);for(var o=this._ref;o.parentNode;){if((o=o.parentNode)===document.body)return window;var i=window.getComputedStyle(o),a=(t?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===a||"scroll"===a||"overlay"===a)return o}return window},n._handleScroll=function(e){if(this._ref){var t=this._getBounds(),r=function(e){return e.viewportBottom-e.viewportTop==0?ve:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?me:e.viewportBottom<e.waypointTop?ye:e.waypointTop<e.viewportTop?ge:ve}(t),n=this._previousPosition,o=this.props,i=(o.debug,o.onPositionChange),a=o.onEnter,s=o.onLeave,l=o.fireOnRapidScroll;if(this._previousPosition=r,n!==r){var c={currentPosition:r,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom};i.call(this,c),r===me?a.call(this,c):n===me&&s.call(this,c),l&&(n===ye&&r===ge||n===ge&&r===ye)&&(a.call(this,{currentPosition:me,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}),s.call(this,{currentPosition:r,previousPosition:me,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}))}}},n._getBounds=function(){var e,t,r=this.props,n=r.horizontal,o=(r.debug,this._ref.getBoundingClientRect()),i=o.left,a=o.top,s=o.right,l=o.bottom,c=n?i:a,u=n?s:l;this.scrollableAncestor===window?(e=n?window.innerWidth:window.innerHeight,t=0):(e=n?this.scrollableAncestor.offsetWidth:this.scrollableAncestor.offsetHeight,t=n?this.scrollableAncestor.getBoundingClientRect().left:this.scrollableAncestor.getBoundingClientRect().top);var f=this.props,p=f.bottomOffset;return{waypointTop:c,waypointBottom:u,viewportTop:t+de(f.topOffset,e),viewportBottom:t+e-de(p,e)}},n.render=function(){var e=this,t=this.props.children;return t?be(t)||(0,pe.isForwardRef)(t)?s().cloneElement(t,{ref:function(r){e.refElement(r),t.ref&&("function"==typeof t.ref?t.ref(r):t.ref.current=r)}}):s().cloneElement(t,{innerRef:this.refElement}):s().createElement("span",{ref:this.refElement,style:{fontSize:0}})},t}(s().PureComponent);_e.above=ge,_e.below=ye,_e.inside=me,_e.invisible=ve,_e.defaultProps={debug:!1,scrollableAncestor:void 0,children:void 0,topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){},onLeave:function(){},onPositionChange:function(){},fireOnRapidScroll:!0},_e.displayName="Waypoint";var Oe=r(7896);function Ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ke=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Ce(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!((n=e[r])===(o=t[r])||ke(n)&&ke(o)))return!1;var n,o;return!0}const Te=function(e,t){var r;void 0===t&&(t=Ce);var n,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}};var Pe="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function je(e){cancelAnimationFrame(e.id)}var Re=-1;var Ae=null;function Me(e){if(void 0===e&&(e=!1),null===Ae||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Ae="positive-descending":(t.scrollLeft=1,Ae=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ae}return Ae}var Ie=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function De(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,f=e.getRowHeight,p=e.getRowOffset,d=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return(t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=g(n.props,Ee(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:Ee(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=Te((function(e,t,r,o,i,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),n._callOnScroll=void 0,n._callOnScroll=Te((function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,u=n._getItemStyleCache(m&&s,m&&l,m&&c),d=e+":"+t;if(u.hasOwnProperty(d))o=u[d];else{var h=r(n.props,t,n._instanceProps),g="rtl"===l;u[d]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:p(n.props,e,n._instanceProps),height:f(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=Te((function(e,t,r){return{}})),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,c=i;if("rtl"===t)switch(Me()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r,o;null!==n._resetIsScrollingTimeoutId&&je(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=150,r=Pe(),o={id:requestAnimationFrame((function n(){Pe()-r>=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}(0,ie.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return Le(e,t),y(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,f=i.height,p=i.rowCount,d=i.width,h=this.state,g=h.scrollLeft,m=h.scrollTop,y=function(e){if(void 0===e&&(e=!1),-1===Re||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Re=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Re}();void 0!==n&&(n=Math.max(0,Math.min(n,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>d?y:0,w=v>f?y:0;this.scrollTo({scrollLeft:void 0!==n?c(this.props,n,r,g,this._instanceProps,w):g,scrollTop:void 0!==o?u(this.props,o,r,m,this._instanceProps,b):m})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Me()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&je(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,c=e.innerRef,u=e.innerElementType,f=e.innerTagName,p=e.itemData,d=e.itemKey,h=void 0===d?Ie:d,g=e.outerElementType,m=e.outerTagName,y=e.rowCount,v=e.style,b=e.useIsScrolling,w=e.width,S=this.state.isScrolling,x=this._getHorizontalRangeToRender(),_=x[0],O=x[1],E=this._getVerticalRangeToRender(),k=E[0],C=E[1],T=[];if(n>0&&y)for(var P=k;P<=C;P++)for(var j=_;j<=O;j++)T.push((0,a.createElement)(t,{columnIndex:j,data:p,isScrolling:b?S:void 0,key:h({columnIndex:j,data:p,rowIndex:P}),rowIndex:P,style:this._getItemStyle(P,j)}));var R=s(this.props,this._instanceProps),A=l(this.props,this._instanceProps);return(0,a.createElement)(g||m||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:(0,Oe.Z)({position:"relative",height:i,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},(0,a.createElement)(u||f||"div",{children:T,ref:c,style:{height:R,pointerEvents:S?"none":void 0,width:A}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),f=u[0],p=u[1],d=u[2],h=u[3];this._callOnItemsRendered(a,s,f,p,l,c,d,h)}if("function"==typeof n){var g=this.state,m=g.horizontalScrollDirection,y=g.scrollLeft,v=g.scrollTop,b=g.scrollUpdateWasRequested,w=g.verticalScrollDirection;this._callOnScroll(y,v,m,w,b)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,f=l.scrollLeft,p=r||i||a||1;if(0===t||0===s)return[0,0,0,0];var d=n(this.props,f,this._instanceProps),h=o(this.props,d,f,this._instanceProps),g=u&&"backward"!==c?1:Math.max(1,p),m=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,d-g),Math.max(0,Math.min(t-1,h+m)),d,h]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var f=d(this.props,c,this._instanceProps),p=h(this.props,f,c,this._instanceProps),g=s&&"backward"!==l?1:Math.max(1,u),m=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,f-g),Math.max(0,Math.min(i-1,p+m)),f,p]},t}(a.PureComponent)).defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Le=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Ne=De({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),f=Math.max(0,t*s-l+i+s);switch("smart"===r&&(r=n>=f-l&&n<=u+l?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var p=Math.round(f+(u-f)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return n>=f&&n<=u?n:f>u||n<f?f:u}},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),f=Math.max(0,t*a-s+i+a);switch("smart"===r&&(r=n>=f-s&&n<=u+s?"auto":"center"),r){case"start":return u;case"end":return f;case"center":var p=Math.round(f+(u-f)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return n>=f&&n<=u?n:f>u||n<f?f:u}},getColumnStartIndexForOffset:function(e,t){var r=e.columnWidth,n=e.columnCount;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getColumnStopIndexForStartIndex:function(e,t,r){var n=e.columnWidth,o=e.columnCount,i=e.width,a=t*n,s=Math.ceil((i+r-a)/n);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var r=e.rowHeight,n=e.rowCount;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getRowStopIndexForStartIndex:function(e,t,r){var n=e.rowHeight,o=e.rowCount,i=e.height,a=t*n,s=Math.ceil((i+r-a)/n);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}});let $e;$e="undefined"!=typeof window?window:"undefined"!=typeof self?self:r.g;let Fe=null,Be=null;const Ue=$e.clearTimeout,ze=$e.setTimeout,We=$e.cancelAnimationFrame||$e.mozCancelAnimationFrame||$e.webkitCancelAnimationFrame,qe=$e.requestAnimationFrame||$e.mozRequestAnimationFrame||$e.webkitRequestAnimationFrame;null==We||null==qe?(Fe=Ue,Be=function(e){return ze(e,20)}):(Fe=function([e,t]){We(e),Ue(t)},Be=function(e){const t=qe((function(){Ue(r),e()})),r=ze((function(){We(t),e()}),20);return[t,r]});class He extends a.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:r}=this.props;if(this._parentNode){var n,o,i,a;const s=window.getComputedStyle(this._parentNode)||{},l=parseFloat(null!==(n=s.paddingLeft)&&void 0!==n?n:"0"),c=parseFloat(null!==(o=s.paddingRight)&&void 0!==o?o:"0"),u=parseFloat(null!==(i=s.paddingTop)&&void 0!==i?i:"0"),f=parseFloat(null!==(a=s.paddingBottom)&&void 0!==a?a:"0"),p=this._parentNode.getBoundingClientRect(),d=p.height-u-f,h=p.width-l-c,g=this._parentNode.offsetHeight-u-f,m=this._parentNode.offsetWidth-l-c;(e||this.state.height===g&&this.state.scaledHeight===d)&&(t||this.state.width===m&&this.state.scaledWidth===h)||(this.setState({height:g,width:m,scaledHeight:d,scaledWidth:h}),"function"==typeof r&&r({height:g,scaledHeight:d,scaledWidth:h,width:m}))}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,null!=this._parentNode&&("undefined"!=typeof ResizeObserver?(this._resizeObserver=new ResizeObserver((()=>{this._timeoutId=setTimeout(this._onResize,0)})),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=function(e){let t,r,n,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const t=e.__resizeTriggers__,r=t.firstElementChild,n=t.lastElementChild,o=r.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,o.style.width=r.offsetWidth+1+"px",o.style.height=r.offsetHeight+1+"px",r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;a(this),this.__resizeRAF__&&Fe(this.__resizeRAF__),this.__resizeRAF__=Be((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(r){r.call(t,e)})))}))};let e=!1,l="";n="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let r=0;r<c.length;r++)if(void 0!==t.style[c[r]+"AnimationName"]){f=c[r],l="-"+f.toLowerCase()+"-",n=u[r],e=!0;break}}r="resizeanim",t="@"+l+"keyframes "+r+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+r+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=$e.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(r){if(!r.getElementById("detectElementResize")){const n=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > 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%; }',i=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),i.appendChild(a)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const f=l.createElement("div");f.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(f),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),n&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(i)},i.__resizeTriggers__.addEventListener(n,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:e,defaultHeight:t,defaultWidth:r,disableHeight:n=!1,disableWidth:o=!1,nonce:i,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:f,scaledHeight:p,scaledWidth:d,width:h}=this.state,g={overflow:"visible"},m={};let y=!1;return n||(0===f&&(y=!0),g.height=0,m.height=f,m.scaledHeight=p),o||(0===h&&(y=!0),g.width=0,m.width=h,m.scaledWidth=d),(0,a.createElement)(c,{ref:this._setRef,style:{...g,...l},...u},!y&&e(m))}}const Ve=(0,n.Z)("div",{target:"e2etv5a0",label:"Card"})("width:",(e=>e.width),";height:",(e=>e.height),";margin:",(e=>e.margin),";border:",m.borders.textField,";border-color:",(e=>e.isSelected&&m.colors.active),";border-radius:",m.lengths.borderRadius,";cursor:pointer;overflow:hidden;background-color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";&:focus{outline:none;}"),Ke=(0,n.Z)("div",{target:"e2etv5a1",label:"CardImageWrapper"})("height:",162,"px;",m.effects.checkerboard,";",m.shadows.inset,";border-bottom:solid ",m.lengths.borderWidth," ",m.colors.textFieldBorder,";position:relative;"),Ge=(0,n.Z)("img",{target:"e2etv5a2",label:"CardImage"})("width:100%;height:",160,"px;object-fit:contain;border-radius:2px 2px 0 0;"),Ze=(0,n.Z)("div",{target:"e2etv5a3",label:"CardFileIcon"})({name:"17s0kw4",styles:"width:100%;height:160px;object-fit:cover;border-radius:2px 2px 0 0;padding:1em;font-size:3em;"}),Ye=(0,n.Z)("p",{target:"e2etv5a4",label:"CardText"})("color:",m.colors.text,";padding:8px;margin-top:20px;overflow-wrap:break-word;line-height:1.3 !important;"),Je=(0,n.Z)("p",{target:"e2etv5a5",label:"DraftText"})("color:",m.colors.mediaDraftText,";background-color:",m.colors.mediaDraftBackground,";position:absolute;padding:8px;border-radius:",m.lengths.borderRadius," 0 ",m.lengths.borderRadius," 0;");class Qe extends s().Component{render(){const{isSelected:e,displayURL:t,text:r,onClick:n,draftText:o,width:i,height:a,margin:s,isPrivate:l,type:c,isViewableImage:u,isDraft:f}=this.props,p=t.get("url");return(0,D.jsx)(Ve,{isSelected:e,onClick:n,width:i,height:a,margin:s,tabIndex:"-1",isPrivate:l},(0,D.jsx)(Ke,null,f?(0,D.jsx)(Je,{"data-testid":"draft-text"},o):null,p&&u?(0,D.jsx)(Ge,{loading:"lazy",src:p}):(0,D.jsx)(Ze,{"data-testid":"card-file-icon"},c)),(0,D.jsx)(Ye,null,r))}componentDidMount(){const{displayURL:e,loadDisplayURL:t}=this.props;e.get("url")||t()}}Qe.propTypes={isSelected:i().bool,displayURL:f().map.isRequired,text:i().string.isRequired,onClick:i().func.isRequired,draftText:i().string.isRequired,width:i().string.isRequired,height:i().string.isRequired,margin:i().string.isRequired,isPrivate:i().bool,type:i().string,isViewableImage:i().bool.isRequired,loadDisplayURL:i().func.isRequired,isDraft:i().bool};const Xe=Qe;function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?et(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nt(e){const{rowIndex:t,columnIndex:r,style:n,data:{mediaItems:o,isSelectedFile:i,onAssetClick:a,cardDraftText:s,cardWidth:l,cardHeight:c,isPrivate:u,displayURLs:f,loadDisplayURL:p,columnCount:d,gutter:h}}=e,g=t*d+r;if(g>=o.length)return null;const m=o[g];return(0,D.jsx)("div",{tabIndex:"0",style:tt(tt({},n),{},{left:n.left+h*r,top:n.top+h,width:n.width-h,height:n.height-h})},(0,D.jsx)(Xe,{key:m.key,isSelected:i(m),text:m.name,onClick:()=>a(m),isDraft:m.draft,draftText:s,width:l,height:c,margin:"0px",isPrivate:u,displayURL:f.get(m.id,m.url?(0,M.Map)({url:m.url}):(0,M.Map)()),loadDisplayURL:()=>p(m),type:m.type,isViewableImage:m.isViewableImage}))}function ot(e){const{mediaItems:t,setScrollContainerRef:r}=e;return(0,D.jsx)(at,{ref:r},(0,D.jsx)(He,null,(({height:r,width:n})=>{const o=parseInt(e.cardWidth,10),i=parseInt(e.cardHeight,10),a=parseInt(e.cardMargin,10),s=o+a,l=i+a,c=Math.floor(n/s),u=Math.ceil(t.length/c);return(0,D.jsx)(Ne,{columnCount:c,columnWidth:s,rowCount:u,rowHeight:l,width:n,height:r,itemData:tt(tt({},e),{},{gutter:a,columnCount:c})},nt)})))}function it({setScrollContainerRef:e,mediaItems:t,isSelectedFile:r,onAssetClick:n,cardDraftText:o,cardWidth:i,cardHeight:a,cardMargin:s,isPrivate:l,displayURLs:c,loadDisplayURL:u,canLoadMore:f,onLoadMore:p,isPaginating:d,paginatingMessage:h}){return(0,D.jsx)(at,{ref:e},(0,D.jsx)(st,null,t.map((e=>(0,D.jsx)(Xe,{key:e.key,isSelected:r(e),text:e.name,onClick:()=>n(e),isDraft:e.draft,draftText:o,width:i,height:a,margin:s,isPrivate:l,displayURL:c.get(e.id,e.url?(0,M.Map)({url:e.url}):(0,M.Map)()),loadDisplayURL:()=>u(e),type:e.type,isViewableImage:e.isViewableImage}))),f?(0,D.jsx)(_e,{onEnter:p}):null),d?(0,D.jsx)(lt,{isPrivate:l},h):null)}const at=(0,n.Z)("div",{target:"e1l5oka20",label:"CardGridContainer"})({name:"1wzx962",styles:"overflow-y:auto;overflow-x:hidden;"}),st=(0,n.Z)("div",{target:"e1l5oka21",label:"CardGrid"})({name:"wbkx89",styles:"display:flex;flex-wrap:wrap;margin-left:-10px;margin-right:-10px;"}),lt=(0,n.Z)("h1",{target:"e1l5oka22",label:"PaginatingMessage"})("color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function ct(e){const{canLoadMore:t,isPaginating:r}=e;return t||r?(0,D.jsx)(it,e):(0,D.jsx)(ot,e)}ct.propTypes={setScrollContainerRef:i().func.isRequired,mediaItems:i().arrayOf(i().shape({displayURL:i().oneOfType([i().string,i().object]),id:i().string.isRequired,key:i().string.isRequired,name:i().string.isRequired,type:i().string.isRequired,draft:i().bool})).isRequired,isSelectedFile:i().func.isRequired,onAssetClick:i().func.isRequired,canLoadMore:i().bool,onLoadMore:i().func.isRequired,isPaginating:i().bool,paginatingMessage:i().string,cardDraftText:i().string.isRequired,cardWidth:i().string.isRequired,cardMargin:i().string.isRequired,loadDisplayURL:i().func.isRequired,isPrivate:i().bool,displayURLs:i().instanceOf(M.Map).isRequired};const ut=ct,ft=(0,n.Z)("div",{target:"e156433y0",label:"EmptyMessageContainer"})("height:100%;width:100%;display:flex;justify-content:center;align-items:center;color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";");function pt({content:e,isPrivate:t}){return(0,D.jsx)(ft,{isPrivate:t},(0,D.jsx)("h1",null,e))}pt.propTypes={content:i().string.isRequired,isPrivate:i().bool};const dt=pt,ht="300px",gt=(0,n.Z)(I.u_,{target:"e4d0svf0",label:"StyledModal"})("display:grid;grid-template-rows:120px auto;width:calc(",ht," + 20px);background-color:",(e=>e.isPrivate&&m.colors.grayDark),";@media (min-width:800px){width:calc(",ht," * 2 + 20px);}@media (min-width:1120px){width:calc(",ht," * 3 + 20px);}@media (min-width:1440px){width:calc(",ht," * 4 + 20px);}@media (min-width:1760px){width:calc(",ht," * 5 + 20px);}@media (min-width:2080px){width:calc(",ht," * 6 + 20px);}h1{color:",(e=>e.isPrivate&&m.colors.textFieldBorder),";}button:disabled,label[disabled]{background-color:",(e=>e.isPrivate&&"rgba(217, 217, 217, 0.15)"),";}");function mt({isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,query:p,selectedFile:d,handleFilter:h,handleQuery:g,toTableData:m,handleClose:y,handleSearchChange:v,handleSearchKeyDown:b,handlePersist:w,handleDelete:S,handleInsert:x,handleDownload:_,setScrollContainerRef:O,handleAssetClick:E,handleLoadMore:k,loadDisplayURL:C,displayURLs:T,t:P}){const j=i?h(r):r,R=!n&&p?g(p,j):j,M=m(R),I=r&&!!r.length,L=j&&!!j.length,N=R&&!!R.length,$=N,F=!$,B=a&&!$&&P("mediaLibrary.mediaLibraryModal.loading")||o&&P("mediaLibrary.mediaLibraryModal.noResults")||!I&&P("mediaLibrary.mediaLibraryModal.noAssetsFound")||!L&&P("mediaLibrary.mediaLibraryModal.noImagesFound")||!N&&P("mediaLibrary.mediaLibraryModal.noResults"),U=$&&!A()(d);return(0,D.jsx)(gt,{isOpen:e,onClose:y,isPrivate:f},(0,D.jsx)(oe,{t:P,onClose:y,privateUpload:f,forImage:i,onDownload:_,onUpload:w,query:p,onSearchChange:v,onSearchKeyDown:b,searchDisabled:!o&&!L,onDelete:S,canInsert:t,onInsert:x,hasSelection:U,isPersisting:s,isDeleting:l,selectedFile:d}),F?(0,D.jsx)(dt,{content:B,isPrivate:f}):null,(0,D.jsx)(ut,{setScrollContainerRef:O,mediaItems:M,isSelectedFile:e=>d.key===e.key,onAssetClick:E,canLoadMore:c,onLoadMore:k,isPaginating:u,paginatingMessage:P("mediaLibrary.mediaLibraryModal.loading"),cardDraftText:P("mediaLibrary.mediaLibraryCard.draft"),cardWidth:"280px",cardHeight:"240px",cardMargin:"10px",isPrivate:f,loadDisplayURL:C,displayURLs:T}))}const yt={displayURL:i().oneOfType([i().string,i().object]).isRequired,id:i().string.isRequired,key:i().string.isRequired,name:i().string.isRequired,queryOrder:i().number,size:i().number,path:i().string.isRequired};mt.propTypes={isVisible:i().bool,canInsert:i().bool,files:i().arrayOf(i().shape(yt)).isRequired,dynamicSearch:i().bool,dynamicSearchActive:i().bool,forImage:i().bool,isLoading:i().bool,isPersisting:i().bool,isDeleting:i().bool,hasNextPage:i().bool,isPaginating:i().bool,privateUpload:i().bool,query:i().string,selectedFile:i().oneOfType([i().shape(yt),i().shape({})]),handleFilter:i().func.isRequired,handleQuery:i().func.isRequired,toTableData:i().func.isRequired,handleClose:i().func.isRequired,handleSearchChange:i().func.isRequired,handleSearchKeyDown:i().func.isRequired,handlePersist:i().func.isRequired,handleDelete:i().func.isRequired,handleInsert:i().func.isRequired,setScrollContainerRef:i().func.isRequired,handleAssetClick:i().func.isRequired,handleLoadMore:i().func.isRequired,loadDisplayURL:i().func.isRequired,t:i().func.isRequired,displayURLs:i().instanceOf(M.Map).isRequired};const vt=(0,c.Iu)()(mt);function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach((function(t){St(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function St(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xt=["jpg","jpeg","webp","gif","png","bmp","tiff","svg","avif"],_t=[...xt];class Ot extends s().Component{constructor(...e){super(...e),St(this,"state",{selectedFile:{},query:"",isPersisted:!1}),St(this,"loadDisplayURL",(e=>{const{loadMediaDisplayURL:t}=this.props;t(e)})),St(this,"filterImages",(e=>e.filter((e=>{const t=(0,P.fileExtension)(e.name).toLowerCase();return _t.includes(t)})))),St(this,"toTableData",(e=>{const t=e&&e.map((({key:e,name:t,id:r,size:n,path:o,queryOrder:i,displayURL:a,draft:s})=>{const l=(0,P.fileExtension)(t).toLowerCase();return{key:e,id:r,name:t,path:o,type:l.toUpperCase(),size:n,queryOrder:i,displayURL:a,draft:s,isImage:_t.includes(l),isViewableImage:xt.includes(l)}})),{sortFields:r}=this.state,n=O()(r,"fieldName").concat("queryOrder"),o=O()(r,"direction").concat("asc");return k()(t,n,o)})),St(this,"handleClose",(()=>{this.props.closeMediaLibrary()})),St(this,"handleAssetClick",(e=>{const t=this.state.selectedFile.key===e.key?{}:e;this.setState({selectedFile:t})})),St(this,"handlePersist",(async e=>{e.persist(),e.stopPropagation(),e.preventDefault();const{persistMedia:t,privateUpload:r,config:n,t:o,field:i}=this.props,{files:a}=e.dataTransfer||e.target,s=[...a][0],l=n.get("max_file_size");l&&s.size>l?window.alert(o("mediaLibrary.mediaLibrary.fileTooLarge",{size:Math.floor(l/1e3)})):(await t(s,{privateUpload:r,field:i}),this.setState({isPersisted:!0}),this.scrollToTop()),e.target.value=null})),St(this,"handleInsert",(()=>{const{selectedFile:e}=this.state,{path:t}=e,{insertMedia:r,field:n}=this.props;r(t,n),this.handleClose()})),St(this,"handleDelete",(()=>{const{selectedFile:e}=this.state,{files:t,deleteMedia:r,privateUpload:n,t:o}=this.props;window.confirm(o("mediaLibrary.mediaLibrary.onDelete"))&&r(t.find((t=>e.key===t.key)),{privateUpload:n}).then((()=>{this.setState({selectedFile:{}})}))})),St(this,"handleDownload",(()=>{const{selectedFile:e}=this.state,{displayURLs:t}=this.props,r=t.getIn([e.id,"url"])||e.url;if(!r)return;const n=e.name,o=document.createElement("a");o.setAttribute("href",r),o.setAttribute("download",n),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),this.setState({selectedFile:{}})})),St(this,"handleLoadMore",(()=>{const{loadMedia:e,dynamicSearchQuery:t,page:r,privateUpload:n}=this.props;e({query:t,page:r+1,privateUpload:n})})),St(this,"handleSearchKeyDown",(async e=>{const{dynamicSearch:t,loadMedia:r,privateUpload:n}=this.props;"Enter"===e.key&&t&&(await r({query:this.state.query,privateUpload:n}),this.scrollToTop())})),St(this,"scrollToTop",(()=>{this.scrollContainerRef.scrollTop=0})),St(this,"handleSearchChange",(e=>{this.setState({query:e.target.value})})),St(this,"queryFilter",((e,t)=>{const r=e.replace(/ /g,"");return T().filter(r,t,{extract:e=>e.name}).map(((e,r)=>wt(wt({},t[e.index]),{},{queryIndex:r})))}))}componentDidMount(){this.props.loadMedia()}UNSAFE_componentWillReceiveProps(e){!this.props.isVisible&&e.isVisible&&this.setState({selectedFile:{},query:""}),this.state.isPersisted&&this.setState({selectedFile:e.files[0],isPersisted:!1})}componentDidUpdate(e){!e.isVisible&&this.props.isVisible&&e.privateUpload!==this.props.privateUpload&&this.props.loadMedia({privateUpload:this.props.privateUpload}),this.state.isPersisted&&this.setState({selectedFile:this.props.files[0],isPersisted:!1})}render(){const{isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,displayURLs:p,t:d}=this.props;return(0,D.jsx)(vt,{isVisible:e,canInsert:t,files:r,dynamicSearch:n,dynamicSearchActive:o,forImage:i,isLoading:a,isPersisting:s,isDeleting:l,hasNextPage:c,isPaginating:u,privateUpload:f,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,handleDownload:this.handleDownload,setScrollContainerRef:e=>this.scrollContainerRef=e,handleAssetClick:this.handleAssetClick,handleLoadMore:this.handleLoadMore,displayURLs:p,loadDisplayURL:this.loadDisplayURL,t:d})}}St(Ot,"propTypes",{isVisible:i().bool,loadMediaDisplayURL:i().func,displayURLs:f().map,canInsert:i().bool,files:i().arrayOf(i().shape(yt)).isRequired,dynamicSearch:i().bool,dynamicSearchActive:i().bool,forImage:i().bool,isLoading:i().bool,isPersisting:i().bool,isDeleting:i().bool,hasNextPage:i().bool,isPaginating:i().bool,privateUpload:i().bool,config:f().map,loadMedia:i().func.isRequired,dynamicSearchQuery:i().string,page:i().number,persistMedia:i().func.isRequired,deleteMedia:i().func.isRequired,insertMedia:i().func.isRequired,closeMediaLibrary:i().func.isRequired,t:i().func.isRequired}),St(Ot,"defaultProps",{files:[]});const Et={loadMedia:x.pW,persistMedia:x.BZ,deleteMedia:x.h6,insertMedia:x.C9,loadMediaDisplayURL:x.$A,closeMediaLibrary:x.ko},kt=(0,p.$j)((function(e){const{mediaLibrary:t}=e,r=t.get("field");return wt({},{isVisible:t.get("isVisible"),canInsert:t.get("canInsert"),files:(0,j.x5)(e,r),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:r})}),Et)((0,c.Iu)()(Ot));var Ct=r(52588),Tt=r(70809),Pt=r(31461),jt=r(10362);s().Component,s().Component;var Rt=function(e,t){return"function"==typeof e?e(t):e},At=function(e,t){return"string"==typeof e?(0,Tt.ob)(e,null,null,t):e},Mt=function(e){return e},It=s().forwardRef;void 0===It&&(It=Mt);var Dt=It((function(e,t){var r=e.innerRef,n=e.navigate,o=e.onClick,i=(0,Pt.Z)(e,["innerRef","navigate","onClick"]),a=i.target,l=(0,Oe.Z)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),n())}});return l.ref=Mt!==It&&t||r,s().createElement("a",l)})),Lt=It((function(e,t){var r=e.component,n=void 0===r?Dt:r,o=e.replace,i=e.to,a=e.innerRef,l=(0,Pt.Z)(e,["component","replace","to","innerRef"]);return s().createElement(d.s6.Consumer,null,(function(e){e||(0,jt.Z)(!1);var r=e.history,c=At(Rt(i,e.location),e.location),u=c?r.createHref(c):"",f=(0,Oe.Z)({},l,{href:u,navigate:function(){var t=Rt(i,e.location),n=(0,Tt.Ep)(e.location)===(0,Tt.Ep)(At(t));(o||n?r.replace:r.push)(t)}});return Mt!==It?f.ref=t||a:f.innerRef=a,s().createElement(n,f)}))})),Nt=function(e){return e},$t=s().forwardRef;void 0===$t&&($t=Nt);var Ft=$t((function(e,t){var r=e["aria-current"],n=void 0===r?"page":r,o=e.activeClassName,i=void 0===o?"active":o,a=e.activeStyle,l=e.className,c=e.exact,u=e.isActive,f=e.location,p=e.sensitive,h=e.strict,g=e.style,m=e.to,y=e.innerRef,v=(0,Pt.Z)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return s().createElement(d.s6.Consumer,null,(function(e){e||(0,jt.Z)(!1);var r=f||e.location,o=At(Rt(m,r),r),b=o.pathname,w=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),S=w?(0,d.LX)(r.pathname,{path:w,exact:c,sensitive:p,strict:h}):null,x=!!(u?u(S,r):S),_="function"==typeof l?l(x):l,O="function"==typeof g?g(x):g;x&&(_=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((function(e){return e})).join(" ")}(_,i),O=(0,Oe.Z)({},O,a));var E=(0,Oe.Z)({"aria-current":x&&n||null,className:_,style:O,to:o},v);return Nt!==$t?E.ref=t||y:E.innerRef=y,s().createElement(Lt,E)}))}));function Bt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ut=(0,n.Z)("div",{target:"e6w847r0",label:"SearchContainer"})("margin:0 12px;position:relative;",m.Icon,"{position:absolute;top:0;left:6px;z-index:",m.zIndex.zIndex2,";height:100%;display:flex;align-items:center;pointer-events:none;}"),zt=(0,n.Z)("div",{target:"e6w847r1",label:"InputContainer"})({name:"14s4iyf",styles:"display:flex;align-items:center;position:relative;"}),Wt=(0,n.Z)("input",{target:"e6w847r2",label:"SearchInput"})("background-color:#eff0f4;border-radius:",m.lengths.borderRadius,";font-size:14px;padding:10px 6px 10px 32px;width:100%;position:relative;z-index:",m.zIndex.zIndex1,";&:focus{outline:none;box-shadow:inset 0 0 0 2px ",m.colorsRaw.blue,";}"),qt=(0,n.Z)("div",{target:"e6w847r3",label:"SuggestionsContainer"})({name:"1jke4yk",styles:"position:relative;width:100%;"}),Ht=(0,n.Z)("ul",{target:"e6w847r4",label:"Suggestions"})("position:absolute;top:6px;left:0;right:0;padding:10px 0;margin:0;list-style:none;background-color:#fff;border-radius:",m.lengths.borderRadius,";border:1px solid ",m.colors.textFieldBorder,";z-index:",m.zIndex.zIndex1,";"),Vt=(0,n.Z)("li",{target:"e6w847r5",label:"SuggestionHeader"})("padding:0 6px 6px 32px;font-size:12px;color:",m.colors.text,";"),Kt=(0,n.Z)("li",{target:"e6w847r6",label:"SuggestionItem"})((({isActive:e})=>`\n color: ${e?m.colors.active:m.colorsRaw.grayDark};\n background-color: ${e?m.colors.activeBackground:"inherit"};\n padding: 6px 6px 6px 32px;\n cursor: pointer;\n position: relative;\n\n &:hover {\n color: ${m.colors.active};\n background-color: ${m.colors.activeBackground};\n }\n`),""),Gt=(0,n.Z)("div",{target:"e6w847r7",label:"SuggestionDivider"})({name:"8atqhb",styles:"width:100%;"});class Zt extends s().Component{constructor(...e){super(...e),Bt(this,"state",{query:this.props.searchTerm,suggestionsVisible:!1,selectedCollectionIdx:this.getSelectedSelectionBasedOnProps()}),Bt(this,"submitSearch",(()=>{const{onSubmit:e,collections:t}=this.props,{selectedCollectionIdx:r,query:n}=this.state;this.toggleSuggestions(!1),-1!==r?e(n,t.toIndexedSeq().getIn([r,"name"])):e(n)})),Bt(this,"handleKeyDown",(e=>{const{suggestionsVisible:t}=this.state;"Enter"===e.key&&this.submitSearch(),t&&("Escape"===e.key&&this.toggleSuggestions(!1),"ArrowDown"===e.key?(this.selectNextSuggestion(),e.preventDefault()):"ArrowUp"===e.key&&(this.selectPreviousSuggestion(),e.preventDefault()))})),Bt(this,"handleQueryChange",(e=>{this.setState({query:e}),this.toggleSuggestions(""!==e),""===e&&this.resetSelectedSuggestion()})),Bt(this,"handleSuggestionClick",((e,t)=>{this.setState({selectedCollectionIdx:t},this.submitSearch),e.preventDefault()}))}componentDidUpdate(e){if(e.collection!==this.props.collection){const e=this.getSelectedSelectionBasedOnProps();this.setState({selectedCollectionIdx:e})}}getSelectedSelectionBasedOnProps(){const{collection:e,collections:t}=this.props;return e?t.keySeq().indexOf(e.get("name")):-1}toggleSuggestions(e){this.setState({suggestionsVisible:e})}selectNextSuggestion(){const{collections:e}=this.props,{selectedCollectionIdx:t}=this.state;this.setState({selectedCollectionIdx:Math.min(t+1,e.size-1)})}selectPreviousSuggestion(){const{selectedCollectionIdx:e}=this.state;this.setState({selectedCollectionIdx:Math.max(e-1,-1)})}resetSelectedSuggestion(){this.setState({selectedCollectionIdx:-1})}render(){const{collections:e,t}=this.props,{suggestionsVisible:r,selectedCollectionIdx:n,query:o}=this.state;return(0,D.jsx)(Ut,{onBlur:()=>this.toggleSuggestions(!1),onFocus:()=>this.toggleSuggestions(""!==o)},(0,D.jsx)(zt,null,(0,D.jsx)(m.Icon,{type:"search"}),(0,D.jsx)(Wt,{onChange:e=>this.handleQueryChange(e.target.value),onKeyDown:this.handleKeyDown,onClick:()=>this.toggleSuggestions(!0),placeholder:t("collection.sidebar.searchAll"),value:o})),r&&(0,D.jsx)(qt,null,(0,D.jsx)(Ht,null,(0,D.jsx)(Vt,null,t("collection.sidebar.searchIn")),(0,D.jsx)(Kt,{isActive:-1===n,onClick:e=>this.handleSuggestionClick(e,-1),onMouseDown:e=>e.preventDefault()},t("collection.sidebar.allCollections")),(0,D.jsx)(Gt,null),e.toIndexedSeq().map(((e,t)=>(0,D.jsx)(Kt,{key:t,isActive:t===n,onClick:e=>this.handleSuggestionClick(e,t),onMouseDown:e=>e.preventDefault()},e.get("label")))))))}}Bt(Zt,"propTypes",{collections:f().map.isRequired,collection:f().map,searchTerm:i().string.isRequired,onSubmit:i().func.isRequired,t:i().func.isRequired});const Yt=(0,c.Iu)()(Zt);var Jt=r(829),Qt=r.n(Jt),Xt=r(21023),er=r(75976),tr=r(98343),rr=r(14093);function nr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nr(Object(r),!0).forEach((function(t){ir(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ir(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{addFileTemplateFields:ar}=er.stringTemplate,sr=(0,n.Z)("div",{target:"eh84wlq0",label:"NodeTitleContainer"})({name:"1n2mv2k",styles:"display:flex;justify-content:center;align-items:center;"}),lr=(0,n.Z)("div",{target:"eh84wlq1",label:"NodeTitle"})({name:"15ro776",styles:"margin-right:4px;"}),cr=(0,n.Z)("div",{target:"eh84wlq2",label:"Caret"})({name:"wmzlvu",styles:"position:relative;top:2px;"}),ur=(0,n.Z)(cr,{target:"eh84wlq3",label:"CaretDown"})(m.components.caretDown,";color:currentColor;"),fr=(0,n.Z)(cr,{target:"eh84wlq4",label:"CaretRight"})(m.components.caretRight,";color:currentColor;left:2px;"),pr=(0,n.Z)(Ft,{target:"eh84wlq5",label:"TreeNavLink"})("display:flex;font-size:14px;font-weight:500;align-items:center;padding:8px;padding-left:",(e=>20*e.depth+12),"px;border-left:2px solid #fff;",m.Icon,"{margin-right:8px;flex-shrink:0;}",(e=>(0,D.css)("&:hover,&:active,&.",e.activeClassName,"{color:",m.colors.active,";background-color:",m.colors.activeBackground,";border-left-color:#4863c6;};label:TreeNavLink;")),";");function dr(e){var t;return e.isRoot?e.title:(null===(t=e.children.find((e=>!e.isDir&&e.title)))||void 0===t?void 0:t.title)||e.title}function hr(e){const{collection:t,treeData:r,depth:n=0,onToggle:o}=e,i=t.get("name");return Qt()(r,dr).map((e=>{var r;if(e.children.length<=1&&(null===(r=e.children[0])||void 0===r||!r.isDir)&&n>0)return null;let a=`/collections/${i}`;n>0&&(a=`${a}/filter${e.path}`);const l=dr(e),c=0===n||e.children.some((e=>e.children.some((e=>e.isDir))));return(0,D.jsx)(s().Fragment,{key:e.path},(0,D.jsx)(pr,{exact:!0,to:a,activeClassName:"sidebar-active",onClick:()=>o({node:e,expanded:!e.expanded}),depth:n,"data-testid":e.path},(0,D.jsx)(m.Icon,{type:"write"}),(0,D.jsx)(sr,null,(0,D.jsx)(lr,null,l),c&&(e.expanded?(0,D.jsx)(ur,null):(0,D.jsx)(fr,null)))),e.expanded&&(0,D.jsx)(hr,{collection:t,depth:n+1,treeData:e.children,onToggle:o}))}))}function gr(e,t){return function e(r){for(const n of r)t(n),e(n.children)}(e)}function mr(e,t){const r=e.get("folder"),n=t.toJS().map((e=>or(or({},e),{},{path:e.path.slice(r.length)}))),o=n.reduce(((e,t)=>{let r=(0,Xt.dirname)(t.path);for(;!e[r]&&r&&"/"!==r;){const t=r.split(Xt.sep);e[r]=t.pop(),r=t.length&&t.join(Xt.sep)}return e}),{}),i=[{title:(e=e.getIn(["nested","summary"])?e.set("summary",e.getIn(["nested","summary"])):e.delete("summary")).get("label"),path:"/",isDir:!0,isRoot:!0},...Object.entries(o).map((([e,t])=>({title:t,path:e,isDir:!0,isRoot:!1}))),...n.map(((r,n)=>{let o=t.get(n);o=o.set("data",ar(o.get("path"),o.get("data")));const i=(0,rr.Pt)(e,o);return or(or({},r),{},{title:i,isDir:!1,isRoot:!1})}))].reduce(((e,t)=>{const r="/"===t.path?"":(0,Xt.dirname)(t.path);return e[r]?e[r].push(t):e[r]=[t],e}),{}),a=i[""].reduce((function e(t,r){const n=r;let o=[];return i[n.path]&&(o=i[n.path].reduce(e,[])),t.push(or(or({},n),{},{children:o})),t}),[]);return a}hr.propTypes={collection:f().map.isRequired,depth:i().number,treeData:i().array.isRequired,onToggle:i().func.isRequired};class yr extends s().Component{constructor(e){super(e),ir(this,"onToggle",(({node:e,expanded:t})=>{if(!this.state.selected||this.state.selected.path===e.path||t){const r=function(e,t,r){let n=!1;return function e(o){if(n)return o;for(let e=0;e<o.length;e++)if(o[e].path===t.path)return o[e]=r(t),n=!0,o;return o.forEach((t=>e(t.children))),o}([...e])}(this.state.treeData,e,(e=>or(or({},e),{},{expanded:t})));this.setState({treeData:r,selected:e,useFilter:!1})}else this.setState({selected:e,useFilter:!1})})),this.state={treeData:mr(this.props.collection,this.props.entries),selected:null,useFilter:!0}}componentDidUpdate(e){const{collection:t,entries:r,filterTerm:n}=this.props;if(t!==e.collection||r!==e.entries||n!==e.filterTerm){const e={};gr(this.state.treeData,(t=>{t.expanded&&(e[t.path]=!0)}));const o=mr(t,r),i=`/${n}`;gr(o,(t=>{(e[t.path]||this.state.useFilter&&i.startsWith(t.path))&&(t.expanded=!0)})),this.setState({treeData:o})}}render(){const{treeData:e}=this.state,{collection:t}=this.props;return(0,D.jsx)(hr,{collection:t,treeData:e,onToggle:this.onToggle})}}ir(yr,"propTypes",{collection:f().map.isRequired,entries:f().list.isRequired,filterTerm:i().string});const vr=(0,p.$j)((function(e,t){const{collection:r}=t;return{entries:(0,tr.rU)(e.entries,r)||(0,M.List)()}}),null)(yr);function br(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wr={sidebarNavLinkActive:(0,D.css)("color:",m.colors.active,";background-color:",m.colors.activeBackground,";border-left-color:#4863c6;;label:sidebarNavLinkActive;")},Sr=(0,n.Z)("aside",{target:"e1t18l340",label:"SidebarContainer"})(m.components.card,";width:250px;padding:8px 0 12px;position:fixed;max-height:calc(100vh - 112px);display:flex;flex-direction:column;"),xr=(0,n.Z)("h2",{target:"e1t18l341",label:"SidebarHeading"})("font-size:23px;font-weight:600;padding:0;margin:18px 12px 12px;color:",m.colors.textLead,";"),_r=(0,n.Z)("ul",{target:"e1t18l342",label:"SidebarNavList"})({name:"1gam4ys",styles:"margin:16px 0 0;list-style:none;overflow:auto;"}),Or=(0,n.Z)(Ft,{target:"e1t18l343",label:"SidebarNavLink"})("display:flex;font-size:14px;font-weight:500;align-items:center;padding:8px 12px;border-left:2px solid #fff;z-index:-1;",m.Icon,"{margin-right:8px;flex-shrink:0;}",(e=>(0,D.css)("&:hover,&:active,&.",e.activeClassName,"{",wr.sidebarNavLinkActive,";};label:SidebarNavLink;")),";");class Er extends s().Component{constructor(...e){super(...e),br(this,"renderLink",((e,t)=>{const r=e.get("name");return e.has("nested")?(0,D.jsx)("li",{key:r},(0,D.jsx)(vr,{collection:e,filterTerm:t,"data-testid":r})):(0,D.jsx)("li",{key:r},(0,D.jsx)(Or,{to:`/collections/${r}`,activeClassName:"sidebar-active","data-testid":r},(0,D.jsx)(m.Icon,{type:"write"}),e.get("label")))}))}render(){const{collections:e,collection:t,isSearchEnabled:r,searchTerm:n,t:o,filterTerm:i}=this.props;return(0,D.jsx)(Sr,null,(0,D.jsx)(xr,null,o("collection.sidebar.collections")),r&&(0,D.jsx)(Yt,{searchTerm:n,collections:e,collection:t,onSubmit:(e,t)=>function(e,t){t?b.m8.push(`/collections/${t}/search/${e}`):b.m8.push(`/search/${e}`)}(e,t)}),(0,D.jsx)(_r,null,e.toList().filter((e=>!0!==e.get("hide"))).map((e=>this.renderLink(e,i)))))}}br(Er,"propTypes",{collections:f().map.isRequired,collection:f().map,isSearchEnabled:i().bool,searchTerm:i().string,filterTerm:i().string,t:i().func.isRequired});const kr=(0,c.Iu)()(Er),Cr=(0,n.Z)("div",{target:"ei8nkzc0",label:"CollectionTopContainer"})(m.components.cardTop,";margin-bottom:22px;"),Tr=(0,n.Z)("div",{target:"ei8nkzc1",label:"CollectionTopRow"})({name:"1lekzkb",styles:"display:flex;align-items:center;justify-content:space-between;"}),Pr=(0,n.Z)("h1",{target:"ei8nkzc2",label:"CollectionTopHeading"})(m.components.cardTopHeading,";"),jr=(0,n.Z)(Lt,{target:"ei8nkzc3",label:"CollectionTopNewButton"})(m.buttons.button,";",m.shadows.dropDeep,";",m.buttons.default,";",m.buttons.gray,";padding:0 30px;"),Rr=(0,n.Z)("p",{target:"ei8nkzc4",label:"CollectionTopDescription"})(m.components.cardTopDescription,";margin-bottom:0;");function Ar({collection:e,newEntryUrl:t,t:r}){const{collectionLabel:n,collectionLabelSingular:o,collectionDescription:i}=function(e){return{collectionLabel:e.get("label"),collectionLabelSingular:e.get("label_singular"),collectionDescription:e.get("description")}}(e);return(0,D.jsx)(Cr,null,(0,D.jsx)(Tr,null,(0,D.jsx)(Pr,null,n),t?(0,D.jsx)(jr,{to:t},r("collection.collectionTop.newButton",{collectionLabel:o||n})):null),i?(0,D.jsx)(Rr,null,i):null)}Ar.propTypes={collection:f().map.isRequired,newEntryUrl:i().string,t:i().func.isRequired};const Mr=(0,c.Iu)()(Ar);var Ir=r(83465),Dr=r.n(Ir),Lr=r(69217),Nr=r(31620),$r=r(93854),Fr=r(26369),Br=r(40510);function Ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(r),!0).forEach((function(t){Wr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Wr(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qr=(0,n.Z)("li",{target:"effeus40",label:"ListCard"})(m.components.card,";width:",m.lengths.topCardWidth,";margin-left:12px;margin-bottom:10px;overflow:hidden;"),Hr=(0,n.Z)(Lt,{target:"effeus41",label:"ListCardLink"})("display:block;max-width:100%;padding:16px 22px;&:hover{background-color:",m.colors.foreground,";}"),Vr=(0,n.Z)("li",{target:"effeus42",label:"GridCard"})(m.components.card,";flex:0 0 335px;height:240px;overflow:hidden;margin-left:12px;margin-bottom:16px;"),Kr=(0,n.Z)(Lt,{target:"effeus43",label:"GridCardLink"})("display:block;height:100%;outline-offset:-2px;&,&:hover{background-color:",m.colors.foreground,";color:",m.colors.text,";}"),Gr=(0,n.Z)("h2",{target:"effeus44",label:"CollectionLabel"})("font-size:12px;color:",m.colors.textLead,";text-transform:uppercase;"),Zr=(0,n.Z)("h2",{target:"effeus45",label:"ListCardTitle"})({name:"gx0lhm",styles:"margin-bottom:0;"}),Yr=(0,n.Z)("h2",{target:"effeus46",label:"CardHeading"})({name:"1kpnu25",styles:"margin:0 0 2px;"}),Jr=(0,n.Z)("div",{target:"effeus47",label:"CardBody"})("padding:16px 22px;height:90px;position:relative;margin-bottom:",(e=>e.hasImage&&0),";&:after{content:'';position:absolute;display:block;z-index:",m.zIndex.zIndex1,";bottom:0;left:-20%;height:140%;width:140%;box-shadow:inset 0 -15px 24px ",m.colorsRaw.white,";}"),Qr=(0,n.Z)("div",{target:"effeus48",label:"CardImage"})("background-image:url(",(e=>e.src),");background-position:center center;background-size:cover;background-repeat:no-repeat;height:150px;"),Xr=(0,p.$j)((function(e,t){var r;const{entry:n,inferedFields:o,collection:i}=t,a=n.get("data"),s=(0,rr.Pt)(i,n);let l=a.get(o.imageField);l&&(l=encodeURI(l));const c=(0,Br.B)(e.medias);return{summary:s,path:`/collections/${i.get("name")}/entries/${n.get("slug")}`,image:l,imageFolder:null===(r=i.get("fields"))||void 0===r?void 0:r.find((e=>e.get("name")===o.imageField&&"image"===e.get("widget"))),isLoadingAsset:c}}),(function(e){return{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)}}),(function(e,t,r){return zr(zr(zr(zr({},e),t),r),{},{getAsset:t.boundGetAsset(r.collection,r.entry)})}))((function({path:e,summary:t,image:r,imageField:n,collectionLabel:o,viewStyle:i=Fr.A,getAsset:a}){return i===Fr.A?(0,D.jsx)(qr,null,(0,D.jsx)(Hr,{to:e},o?(0,D.jsx)(Gr,null,o):null,(0,D.jsx)(Zr,null,t))):i===Fr.n?(0,D.jsx)(Vr,null,(0,D.jsx)(Kr,{to:e},(0,D.jsx)(Jr,{hasImage:r},o?(0,D.jsx)(Gr,null,o):null,(0,D.jsx)(Yr,null,t)),r?(0,D.jsx)(Qr,{src:a(r,n).toString()}):null)):void 0}));function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},en.apply(this,arguments)}function tn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rn=(0,n.Z)("ul",{target:"etq0ss00",label:"CardsGrid"})({name:"c1vo2d",styles:"display:flex;flex-flow:row wrap;list-style-type:none;margin-left:-12px;margin-top:16px;margin-bottom:16px;"});class nn extends s().Component{constructor(...e){super(...e),tn(this,"hasMore",(()=>{var e,t;return null===(e=this.props.cursor)||void 0===e||null===(t=e.actions)||void 0===t?void 0:t.has("append_next")})),tn(this,"handleLoadMore",(()=>{this.hasMore()&&this.props.handleCursorActions("append_next")})),tn(this,"inferFields",(e=>{const t=(0,rr.GK)(e,"title"),r=(0,rr.GK)(e,"description"),n=(0,rr.GK)(e,"image"),o=(0,rr.LY)(e),i=[t,r,n];return{titleField:t,descriptionField:r,imageField:n,remainingFields:o&&o.filter((e=>-1===i.indexOf(e.get("name"))))}})),tn(this,"renderCardsForSingleCollection",(()=>{const{collections:e,entries:t,viewStyle:r}=this.props,n={collection:e,inferedFields:this.inferFields(e),viewStyle:r};return t.map(((e,t)=>(0,D.jsx)(Xr,en({},n,{entry:e,key:t}))))})),tn(this,"renderCardsForMultipleCollections",(()=>{const{collections:e,entries:t}=this.props,r=1===e.size;return t.map(((t,n)=>{const o=t.get("collection"),i=e.find((e=>e.get("name")===o)),a=!r&&i.get("label"),s={collection:i,entry:t,inferedFields:this.inferFields(i),collectionLabel:a};return(0,D.jsx)(Xr,en({},s,{key:n}))}))}))}render(){const{collections:e,page:t}=this.props;return(0,D.jsx)("div",null,(0,D.jsx)(rn,null,M.Map.isMap(e)?this.renderCardsForSingleCollection():this.renderCardsForMultipleCollections(),this.hasMore()&&(0,D.jsx)(_e,{key:t,onEnter:this.handleLoadMore})))}}tn(nn,"propTypes",{collections:f().iterable.isRequired,entries:f().list,viewStyle:i().string,cursor:i().any.isRequired,handleCursorActions:i().func.isRequired,page:i().number});const on=(0,n.Z)("div",{target:"e1d0i3na0",label:"PaginationMessage"})("width:",m.lengths.topCardWidth,";padding:16px;text-align:center;"),an=(0,n.Z)(on,{target:"e1d0i3na1",label:"NoEntriesMessage"})({name:"1yuhvjn",styles:"margin-top:16px;"});function sn({collections:e,entries:t,isFetching:r,viewStyle:n,cursor:o,handleCursorActions:i,t:a,page:l}){var c;const u=[a("collection.entries.loadingEntries"),a("collection.entries.cachingEntries"),a("collection.entries.longerLoading")];return r&&void 0===l?(0,D.jsx)(m.Loader,{active:!0},u):t&&t.size>0||(null==o||null===(c=o.actions)||void 0===c?void 0:c.has("append_next"))?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(nn,{collections:e,entries:t,viewStyle:n,cursor:o,handleCursorActions:i,page:l}),r&&void 0!==l&&t.size>0?(0,D.jsx)(on,null,a("collection.entries.loadingEntries")):null):(0,D.jsx)(an,null,a("collection.entries.noEntries"))}sn.propTypes={collections:f().iterable.isRequired,entries:f().list,page:i().number,isFetching:i().bool,viewStyle:i().string,cursor:i().any.isRequired,handleCursorActions:i().func.isRequired,t:i().func.isRequired};const ln=(0,c.Iu)()(sn);function cn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const un=(0,n.Z)("h2",{target:"eucqz2q0",label:"GroupHeading"})("font-size:23px;font-weight:600;color:",m.colors.textLead,";"),fn=(0,n.Z)("div",{target:"eucqz2q1",label:"GroupContainer"})("");function pn(e,t){return e.filter((e=>t.has(e.get("path"))))}class dn extends s().Component{constructor(...e){super(...e),cn(this,"handleCursorActions",((e,t)=>{const{collection:r,traverseCollectionCursor:n}=this.props;n(r,t)}))}componentDidMount(){const{collection:e,entriesLoaded:t,loadEntries:r}=this.props;e&&!t&&r(e)}componentDidUpdate(e){const{collection:t,entriesLoaded:r,loadEntries:n}=this.props;t===e.collection||r||n(t)}render(){const{collection:e,entries:t,groups:r,isFetching:n,viewStyle:o,cursor:i,page:a,t:s}=this.props,l=({entries:t})=>(0,D.jsx)(ln,{collections:e,entries:t,isFetching:n,collectionName:e.get("label"),viewStyle:o,cursor:i,handleCursorActions:Dr()(this.handleCursorActions,i),page:a});return r&&r.length>0?function(e,t,r,n){return e.map((e=>{const o=function(e,t){const{label:r,value:n}=e;return void 0===n?t("collection.groups.other"):"boolean"==typeof n?n?r:t("collection.groups.negateLabel",{label:r}):`${r} ${n}`.trim()}(e,n);return(0,D.jsx)(fn,{key:e.id,id:e.id},(0,D.jsx)(un,null,o),(0,D.jsx)(r,{entries:pn(t,e.paths)}))}))}(r,t,l,s):(0,D.jsx)(l,{entries:t})}}cn(dn,"propTypes",{collection:f().map.isRequired,page:i().number,entries:f().list,groups:i().array,isFetching:i().bool.isRequired,viewStyle:i().string,cursor:i().object.isRequired,loadEntries:i().func.isRequired,traverseCollectionCursor:i().func.isRequired,entriesLoaded:i().bool});const hn={loadEntries:Lr.Jw,traverseCollectionCursor:Lr.$L},gn=(0,p.$j)((function(e,t){const{collection:r,viewStyle:n,filterTerm:o}=t,i=e.entries.getIn(["pages",r.get("name"),"page"]);let a=(0,tr.rU)(e.entries,r);const s=(0,tr.Gr)(e.entries,r);r.has("nested")&&(a=function(e,t,r){return r.filter((r=>{const n=r.get("path").slice(t.length+1);return!!n.startsWith(e)&&(e?2===n.slice(e.length+1).split("/").length:n.split("/").length<=2)}))}(o||"",r.get("folder"),a));const l=(0,tr.D_)(e.entries,r.get("name")),c=(0,tr.pT)(e.entries,r.get("name")),u=(0,Nr.k)(e.cursors,r.get("name"));return{collection:r,page:i,entries:a,groups:s,entriesLoaded:l,isFetching:c,viewStyle:n,cursor:P.Cursor.create(u).clearData()}}),hn)(dn),mn=(0,c.Iu)()(gn);var yn=r(18149),vn=r.n(yn),bn=r(93324),wn=r(57655);function Sn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class xn extends s().Component{constructor(...e){super(...e),Sn(this,"getCursor",(()=>{const{page:e}=this.props;return P.Cursor.create({actions:isNaN(e)?[]:["append_next"]})})),Sn(this,"handleCursorActions",(e=>{const{page:t,searchTerm:r,searchEntries:n,collectionNames:o}=this.props;"append_next"===e&&n(r,o,t+1)}))}componentDidMount(){const{searchTerm:e,searchEntries:t,collectionNames:r}=this.props;t(e,r)}componentDidUpdate(e){const{searchTerm:t,collectionNames:r}=this.props;if(e.searchTerm===t&&vn()(e.collectionNames,r))return;const{searchEntries:n}=e;n(t,r)}componentWillUnmount(){this.props.clearSearch()}render(){const{collections:e,entries:t,isFetching:r}=this.props;return(0,D.jsx)(ln,{cursor:this.getCursor(),handleCursorActions:this.handleCursorActions,collections:e,entries:t,isFetching:r})}}Sn(xn,"propTypes",{isFetching:i().bool,searchEntries:i().func.isRequired,clearSearch:i().func.isRequired,searchTerm:i().string.isRequired,collections:f().seq,collectionNames:i().array,entries:f().list,page:i().number});const _n={searchEntries:wn.Pu,clearSearch:wn.AQ},On=(0,p.$j)((function(e,t){const{searchTerm:r}=t,n=t.collections.toIndexedSeq(),o=t.collections.keySeq().toArray();return{isFetching:e.search.isFetching,page:e.search.page,collections:n,collectionNames:o,entries:(0,bn.hq)(e,o),searchTerm:r}}),_n)(xn),En=(0,n.Z)("div",{target:"evv1i7c0",label:"ViewControlsSection"})({name:"nuh2uw",styles:"display:flex;align-items:center;justify-content:flex-end;max-width:500px;"}),kn=(0,n.Z)("button",{target:"evv1i7c1",label:"ViewControlsButton"})(m.buttons.button,";color:",(e=>e.isActive?m.colors.active:"#b3b9c4"),";background-color:transparent;display:block;padding:0;margin:0 4px;&:last-child{margin-right:0;}",m.Icon,"{display:block;}"),Cn=function({viewStyle:e,onChangeViewStyle:t}){return(0,D.jsx)(En,null,(0,D.jsx)(kn,{isActive:e===Fr.A,onClick:()=>t(Fr.A)},(0,D.jsx)(m.Icon,{type:"list"})),(0,D.jsx)(kn,{isActive:e===Fr.n,onClick:()=>t(Fr.n)},(0,D.jsx)(m.Icon,{type:"grid"})))};var Tn=r(38793);const Pn=(0,n.Z)(m.StyledDropdownButton,{target:"e1obtllk0",label:"Button"})(m.buttons.button,";",m.buttons.medium,";",m.buttons.grayText,";font-size:14px;&:after{top:11px;}");function jn({active:e,title:t}){return(0,D.jsx)(Pn,{css:(0,D.css)("color:",e?m.colors.active:void 0,";;label:ControlButton;")},t)}function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rn.apply(this,arguments)}const An={[Tn.S.Ascending]:"up",[Tn.S.Descending]:"down"},Mn=(0,c.Iu)()((function({t:e,fields:t,onSortClick:r,sort:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>e.direction!==Tn.S.None));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:e("collection.collectionTop.sortBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},t.map((e=>{const t=null==n?void 0:n.getIn([e.key,"direction"]),o=t&&t!==Tn.S.None,i=function(e){switch(e){case Tn.S.Ascending:return Tn.S.Descending;case Tn.S.Descending:return Tn.S.None;default:return Tn.S.Ascending}}(t);return(0,D.jsx)(m.DropdownItem,Rn({key:e.key,label:e.label,onClick:()=>r(e.key,i),isActive:o},o&&function(e){return{icon:"chevron",iconDirection:An[e],iconSmall:!0}}(t)))})))})),In=(0,c.Iu)()((function({viewFilters:e,t,onFilterClick:r,filter:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>!0===e.active));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:t("collection.collectionTop.filterBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownPosition:"left"},e.map((e=>(0,D.jsx)(m.DropdownCheckedItem,{key:e.id,label:e.label,id:e.id,checked:n.getIn([e.id,"active"],!1),onClick:()=>r(e)}))))})),Dn=(0,c.Iu)()((function({viewGroups:e,t,onGroupClick:r,group:n}){const o=null==n?void 0:n.valueSeq().toJS().some((e=>!0===e.active));return(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(jn,{active:o,title:t("collection.collectionTop.groupBy")}),closeOnSelection:!1,dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},e.map((e=>(0,D.jsx)(m.DropdownItem,{key:e.id,label:e.label,onClick:()=>r(e),isActive:n.getIn([e.id,"active"],!1)}))))})),Ln=(0,n.Z)("div",{target:"emfmed70",label:"CollectionControlsContainer"})("display:flex;align-items:center;flex-direction:row-reverse;margin-top:22px;width:",m.lengths.topCardWidth,";max-width:100%;& > div{margin-left:6px;}"),Nn=function({viewStyle:e,onChangeViewStyle:t,sortableFields:r,onSortClick:n,sort:o,viewFilters:i,viewGroups:a,onFilterClick:s,onGroupClick:l,t:c,filter:u,group:f}){return(0,D.jsx)(Ln,null,(0,D.jsx)(Cn,{viewStyle:e,onChangeViewStyle:t}),a.length>0&&(0,D.jsx)(Dn,{viewGroups:a,onGroupClick:l,t:c,group:f}),i.length>0&&(0,D.jsx)(In,{viewFilters:i,onFilterClick:s,t:c,filter:u}),r.length>0&&(0,D.jsx)(Mn,{fields:r,sort:o,onSortClick:n}))};function $n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$n(Object(r),!0).forEach((function(t){Bn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Bn(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Un=(0,n.Z)("div",{target:"e1sogrfi0",label:"CollectionContainer"})("margin:",m.lengths.pageMargin,";"),zn=(0,n.Z)("main",{target:"e1sogrfi1",label:"CollectionMain"})({name:"1r4jzjw",styles:"padding-left:280px;"}),Wn=(0,n.Z)("div",{target:"e1sogrfi2",label:"SearchResultContainer"})(m.components.cardTop,";margin-bottom:22px;"),qn=(0,n.Z)("h1",{target:"e1sogrfi3",label:"SearchResultHeading"})(m.components.cardTopHeading,";");class Hn extends s().Component{constructor(...e){super(...e),Bn(this,"renderEntriesCollection",(()=>{const{collection:e,filterTerm:t,viewStyle:r}=this.props;return(0,D.jsx)(mn,{collection:e,viewStyle:r,filterTerm:t})})),Bn(this,"renderEntriesSearch",(()=>{const{searchTerm:e,collections:t,collection:r,isSingleSearchResult:n}=this.props;return(0,D.jsx)(On,{collections:n?t.filter((e=>e===r)):t,searchTerm:e})}))}render(){const{collection:e,collections:t,collectionName:r,isSearchEnabled:n,isSearchResults:o,isSingleSearchResult:i,searchTerm:a,sortableFields:l,onSortClick:c,sort:u,viewFilters:f,viewGroups:p,filterTerm:d,t:h,onFilterClick:g,onGroupClick:m,filter:y,group:v,onChangeViewStyle:b,viewStyle:S}=this.props;let x=e.get("create")?(0,w.f7)(r):"";x&&d&&(x=(0,w.f7)(r),d&&(x=`${x}?path=${d}`));const _="collection.collectionTop.searchResults"+(i?"InCollection":"");return(0,D.jsx)(Un,null,(0,D.jsx)(kr,{collections:t,collection:(!o||i)&&e,isSearchEnabled:n,searchTerm:a,filterTerm:d}),(0,D.jsx)(zn,null,o?(0,D.jsx)(Wn,null,(0,D.jsx)(qn,null,h(_,{searchTerm:a,collection:e.get("label")}))):(0,D.jsx)(s().Fragment,null,(0,D.jsx)(Mr,{collection:e,newEntryUrl:x}),(0,D.jsx)(Nn,{viewStyle:S,onChangeViewStyle:b,sortableFields:l,onSortClick:c,sort:u,viewFilters:f,viewGroups:p,t:h,onFilterClick:g,onGroupClick:m,filter:y,group:v})),o?this.renderEntriesSearch():this.renderEntriesCollection()))}}Bn(Hn,"propTypes",{searchTerm:i().string,collectionName:i().string,isSearchResults:i().bool,isSingleSearchResult:i().bool,collection:f().map.isRequired,collections:f().map.isRequired,sortableFields:i().array,sort:f().orderedMap,onSortClick:i().func.isRequired});const Vn={sortByField:Lr.L1,filterByField:Lr.wu,changeViewStyle:Lr.pK,groupByField:Lr.YU},Kn=(0,p.$j)((function(e,t){const{collections:r}=e,n=e.config&&0!=e.config.search,{isSearchResults:o,match:i,t:a}=t,{name:s,searchTerm:l="",filterTerm:c=""}=i.params,u=s?r.get(s):r.first(),f=(0,tr.GO)(e.entries,u.get("name")),p=(0,rr.w7)(u,a),d=(0,rr.SQ)(u),h=(0,rr.WK)(u),g=(0,tr.qT)(e.entries,u.get("name")),m=(0,tr.xI)(e.entries,u.get("name"));return{collection:u,collections:r,collectionName:s,isSearchEnabled:n,isSearchResults:o,searchTerm:l,filterTerm:c,sort:f,sortableFields:p,viewFilters:d,viewGroups:h,filter:g,group:m,viewStyle:(0,tr.IG)(e.entries)}}),Vn,(function(e,t,r){return Fn(Fn(Fn({},e),r),{},{onSortClick:(r,n)=>t.sortByField(e.collection,r,n),onFilterClick:r=>t.filterByField(e.collection,r),onGroupClick:r=>t.groupByField(e.collection,r),onChangeViewStyle:e=>t.changeViewStyle(e)})}))(Hn),Gn=(0,c.Iu)()(Kn);var Zn=r(31464),Yn=r(18815),Jn=r.n(Yn);const Qn={text:{name:"1v21rim-text",styles:"font-size:13px;font-weight:normal;margin-top:4px;;label:text;"},button:(0,D.css)(m.buttons.button,";width:auto;flex:1 0 0;font-size:13px;padding:6px 0;;label:button;")},Xn=(0,n.Z)(Lt,{target:"ewffzyy0",label:"WorkflowLink"})({name:"xe15uv",styles:"display:block;padding:0 18px 18px;height:200px;overflow:hidden;"}),eo=(0,n.Z)("div",{target:"ewffzyy1",label:"CardCollection"})("font-size:14px;color:",m.colors.textLead,";text-transform:uppercase;margin-top:12px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"),to=(0,n.Z)("h2",{target:"ewffzyy2",label:"CardTitle"})("margin:28px 0 0;color:",m.colors.textLead,";"),ro=(0,n.Z)("div",{target:"ewffzyy3",label:"CardDateContainer"})(Qn.text,";"),no=(0,n.Z)("p",{target:"ewffzyy4",label:"CardBody"})(Qn.text,";color:",m.colors.text,";margin:24px 0 0;overflow-wrap:break-word;word-break:break-word;hyphens:auto;"),oo=(0,n.Z)("div",{target:"ewffzyy5",label:"CardButtonContainer"})("background-color:",m.colors.foreground,";position:absolute;bottom:0;width:100%;padding:12px 18px;display:flex;opacity:0;transition:opacity ",m.transitions.main,";cursor:pointer;"),io=(0,n.Z)("button",{target:"ewffzyy6",label:"DeleteButton"})(Qn.button,";background-color:",m.colorsRaw.redLight,";color:",m.colorsRaw.red,";margin-right:6px;"),ao=(0,n.Z)("button",{target:"ewffzyy7",label:"PublishButton"})(Qn.button,";background-color:",m.colorsRaw.teal,";color:",m.colors.textLight,";margin-left:6px;&[disabled]{",m.buttons.disabled,";}"),so=(0,n.Z)("div",{target:"ewffzyy8",label:"WorkflowCardContainer"})(m.components.card,";margin-bottom:24px;position:relative;overflow:hidden;&:hover ",oo,"{opacity:1;}"),lo=(0,c.Iu)()((({t:e,date:t,author:r})=>{const n=function(e,t){return e&&t?"lastChange":e?"lastChangeNoAuthor":t?"lastChangeNoDate":void 0}(t,r);if(n)return(0,D.jsx)(ro,null,e(`workflow.workflowCard.${n}`,{date:t,author:r}))}));function co({collectionLabel:e,title:t,authorLastChange:r,body:n,isModification:o,editLink:i,timestamp:a,onDelete:s,allowPublish:l,canPublish:c,onPublish:u,postAuthor:f,t:p}){return(0,D.jsx)(so,null,(0,D.jsx)(Xn,{to:i},(0,D.jsx)(eo,null,e),f,(0,D.jsx)(to,null,t),(a||r)&&(0,D.jsx)(lo,{date:a,author:r}),(0,D.jsx)(no,null,n)),(0,D.jsx)(oo,null,(0,D.jsx)(io,{onClick:s},p(o?"workflow.workflowCard.deleteChanges":"workflow.workflowCard.deleteNewEntry")),l&&(0,D.jsx)(ao,{disabled:!c,onClick:u},p(o?"workflow.workflowCard.publishChanges":"workflow.workflowCard.publishNewEntry"))))}co.propTypes={collectionLabel:i().string.isRequired,title:i().string,authorLastChange:i().string,body:i().string,isModification:i().bool,editLink:i().string.isRequired,timestamp:i().string.isRequired,onDelete:i().func.isRequired,allowPublish:i().bool.isRequired,canPublish:i().bool.isRequired,onPublish:i().func.isRequired,postAuthor:i().string,t:i().func.isRequired};const uo=(0,c.Iu)()(co);function fo(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const po=(0,n.Z)("div",{target:"e190xgae0",label:"WorkflowListContainer"})({name:"1booyhj",styles:"min-height:60%;display:grid;grid-template-columns:33.3% 33.3% 33.3%;"}),ho=(0,n.Z)("div",{target:"e190xgae1",label:"WorkflowListContainerOpenAuthoring"})({name:"1q1dzdp",styles:"min-height:60%;display:grid;grid-template-columns:50% 50% 0%;"});var go={name:"qbubgm",styles:"margin-left:0;"},mo={name:"1xzanuf",styles:"margin-right:0;"};const yo={columnPosition:e=>0===e&&go||2===e&&mo||(0,D.css)("&:before,&:after{content:'';display:block;position:absolute;width:2px;height:80%;top:76px;background-color:",m.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,D.css)("border-color:",m.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;"}},vo=(0,n.Z)("h2",{target:"e190xgae2",label:"ColumnHeader"})("font-size:20px;font-weight:normal;padding:4px 14px;border-radius:",m.lengths.borderRadius,";margin-bottom:28px;",(e=>"draft"===e.name&&(0,D.css)("background-color:",m.colors.statusDraftBackground,";color:",m.colors.statusDraftText,";;label:ColumnHeader;"))," ",(e=>"pending_review"===e.name&&(0,D.css)("background-color:",m.colors.statusReviewBackground,";color:",m.colors.statusReviewText,";;label:ColumnHeader;"))," ",(e=>"pending_publish"===e.name&&(0,D.css)("background-color:",m.colors.statusReadyBackground,";color:",m.colors.statusReadyText,";;label:ColumnHeader;")),""),bo=(0,n.Z)("p",{target:"e190xgae3",label:"ColumnCount"})("font-size:13px;font-weight:500;color:",m.colors.text,";text-transform:uppercase;margin-bottom:6px;"),wo="cms-workflow";class So extends s().Component{constructor(...e){super(...e),fo(this,"handleChangeStatus",((e,t)=>{const r=t.slug,n=t.collection,o=t.ownStatus;this.props.handleChangeStatus(n,r,o,e)})),fo(this,"requestDelete",((e,t,r)=>{window.confirm(this.props.t("workflow.workflowList.onDeleteEntry"))&&this.props.handleDelete(e,t,r)})),fo(this,"requestPublish",((e,t,r)=>{r===Ct.i7.last()?window.confirm(this.props.t("workflow.workflowList.onPublishEntry"))&&this.props.handlePublish(e,t):window.alert(this.props.t("workflow.workflowList.onPublishingNotReadyEntry"))})),fo(this,"renderColumns",((e,t)=>{const{isOpenAuthoring:r,collections:n,t:o}=this.props;return e?t?(0,D.jsx)("div",null,e.map((e=>{const t=Jn()(e.get("updatedOn")).format(o("workflow.workflow.dateFormat")),r=e.get("slug"),i=e.get("collection"),a=`collections/${i}/entries/${r}?ref=workflow`,s=e.get("status"),l=n.find((e=>e.get("name")===i)),c=null==l?void 0:l.get("label"),u=e.get("isModification"),f=null==l?void 0:l.get("publish"),p=s===Ct.i7.last()&&!e.get("isPersisting",!1),d=e.get("author");return(0,D.jsx)(I.Ej,{namespace:wo,key:`${i}-${r}`,slug:r,collection:i,ownStatus:s},(n=>n((0,D.jsx)("div",null,(0,D.jsx)(uo,{collectionLabel:c||i,title:(0,rr.Pt)(l,e),authorLastChange:e.getIn(["metaData","user"]),body:e.getIn(["data","body"]),isModification:u,editLink:a,timestamp:t,onDelete:this.requestDelete.bind(this,i,r,s),allowPublish:f,canPublish:p,onPublish:this.requestPublish.bind(this,i,r,s),postAuthor:d})))))}))):e.entrySeq().map((([e,t],n)=>(0,D.jsx)(I.GR,{namespace:wo,key:e,onDrop:this.handleChangeStatus.bind(this,e)},((o,{isHovered:i})=>o((0,D.jsx)("div",{style:{height:"100%"}},(0,D.jsx)("div",{css:(0,D.css)([yo.column,yo.columnPosition(n),i&&yo.columnHovered,r&&"pending_publish"===e&&yo.hiddenColumn,r&&"pending_review"===e&&yo.hiddenRightBorder],";label:WorkflowList;")},(0,D.jsx)(vo,{name:e},function(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,D.jsx)(bo,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?ho:po;return(0,D.jsx)(t,null,e)}}fo(So,"propTypes",{entries:f().orderedMap,handleChangeStatus:i().func.isRequired,handlePublish:i().func.isRequired,handleDelete:i().func.isRequired,t:i().func.isRequired,isOpenAuthoring:i().bool,collections:f().map.isRequired});const xo=(0,I.XK)((0,c.Iu)()(So)),_o=(0,n.Z)("div",{target:"e1t9l5ui0",label:"WorkflowContainer"})("padding:",m.lengths.pageMargin," 0;height:100vh;"),Oo=(0,n.Z)("div",{target:"e1t9l5ui1",label:"WorkflowTop"})(m.components.cardTop,";"),Eo=(0,n.Z)("div",{target:"e1t9l5ui2",label:"WorkflowTopRow"})("display:flex;justify-content:space-between;span[role='button']{",m.shadows.dropDeep,";}"),ko=(0,n.Z)("h1",{target:"e1t9l5ui3",label:"WorkflowTopHeading"})(m.components.cardTopHeading,";"),Co=(0,n.Z)("p",{target:"e1t9l5ui4",label:"WorkflowTopDescription"})(m.components.cardTopDescription,";");class To extends a.Component{componentDidMount(){const{loadUnpublishedEntries:e,isEditorialWorkflow:t,collections:r}=this.props;t&&e(r)}render(){const{isEditorialWorkflow:e,isOpenAuthoring:t,isFetching:r,unpublishedEntries:n,updateUnpublishedEntryStatus:o,publishUnpublishedEntry:i,deleteUnpublishedEntry:a,collections:s,t:l}=this.props;if(!e)return null;if(r)return(0,D.jsx)(m.Loader,{active:!0},l("workflow.workflow.loading"));const c=n.get("pending_review").size,u=n.get("pending_publish").size;return(0,D.jsx)(_o,null,(0,D.jsx)(Oo,null,(0,D.jsx)(Eo,null,(0,D.jsx)(ko,null,l("workflow.workflow.workflowHeading")),(0,D.jsx)(m.Dropdown,{dropdownWidth:"160px",dropdownPosition:"left",dropdownTopOverlap:"40px",renderButton:()=>(0,D.jsx)(m.StyledDropdownButton,null,l("workflow.workflow.newPost"))},s.filter((e=>e.get("create"))).toList().map((e=>(0,D.jsx)(m.DropdownItem,{key:e.get("name"),label:e.get("label"),onClick:()=>S(e.get("name"))}))))),(0,D.jsx)(Co,null,l("workflow.workflow.description",{smart_count:c,readyCount:u}))),(0,D.jsx)(xo,{entries:n,handleChangeStatus:o,handlePublish:i,handleDelete:a,isOpenAuthoring:t,collections:s}))}}var Po,jo,Ro;Po=To,jo="propTypes",Ro={collections:f().map.isRequired,isEditorialWorkflow:i().bool.isRequired,isOpenAuthoring:i().bool,isFetching:i().bool,unpublishedEntries:f().map,loadUnpublishedEntries:i().func.isRequired,updateUnpublishedEntryStatus:i().func.isRequired,publishUnpublishedEntry:i().func.isRequired,deleteUnpublishedEntry:i().func.isRequired,t:i().func.isRequired},(jo=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(jo))in Po?Object.defineProperty(Po,jo,{value:Ro,enumerable:!0,configurable:!0,writable:!0}):Po[jo]=Ro;const Ao=(0,p.$j)((function(e){const{collections:t,config:r,globalUI:n}=e,o=r.publish_mode===Ct.S0,i={collections:t,isEditorialWorkflow:o,isOpenAuthoring:n.useOpenAuthoring};return o&&(i.isFetching=e.editorialWorkflow.getIn(["pages","isFetching"],!1),i.unpublishedEntries=Ct.i7.reduce(((t,r)=>{const n=(0,bn.GG)(e,r);return t.set(r,n)}),(0,M.OrderedMap)())),i}),{loadUnpublishedEntries:Zn.Yh,updateUnpublishedEntryStatus:Zn.JY,publishUnpublishedEntry:Zn.Ts,deleteUnpublishedEntry:Zn.Ty})((0,c.Iu)()(To));var Mo=r(54073),Io=r.n(Mo),Do=r(86384),Lo=r(25473),No=r.n(Lo),$o=r(46847);function Fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Uo(e,t,r){return t&&Bo(e.prototype,t),r&&Bo(e,r),e}function zo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wo(Object(r),!0).forEach((function(t){zo(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ho(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ko(e,t)}function Vo(e){return Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vo(e)}function Ko(e,t){return Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ko(e,t)}function Go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zo(e){return function(){var t,r=Vo(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=Vo(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Go(e):t}(this,t)}}var Yo=function(e){Ho(r,e);var t=Zo(r);function r(){return Fo(this,r),t.apply(this,arguments)}return Uo(r,[{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,n=e.split,o=e.style,i=e.size,a=e.eleRef,l=["Pane",n,r],c={flex:1,position:"relative",outline:"none"};return void 0!==i&&("vertical"===n?c.width=i:(c.height=i,c.display="flex"),c.flex="none"),c=Object.assign({},c,o||{}),s().createElement("div",{ref:a,className:l.join(" "),style:c},t)}}]),r}(s().PureComponent);Yo.propTypes={className:i().string.isRequired,children:i().node.isRequired,size:i().oneOfType([i().string,i().number]),split:i().oneOf(["vertical","horizontal"]),style:No(),eleRef:i().func},Yo.defaultProps={};var Jo="Resizer",Qo=function(e){Ho(r,e);var t=Zo(r);function r(){return Fo(this,r),t.apply(this,arguments)}return Uo(r,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.onClick,n=e.onDoubleClick,o=e.onMouseDown,i=e.onTouchEnd,a=e.onTouchStart,l=e.resizerClassName,c=e.split,u=e.style,f=[l,c,t];return s().createElement("span",{role:"presentation",className:f.join(" "),style:u,onMouseDown:function(e){return o(e)},onTouchStart:function(e){e.preventDefault(),a(e)},onTouchEnd:function(e){e.preventDefault(),i(e)},onClick:function(e){r&&(e.preventDefault(),r(e))},onDoubleClick:function(e){n&&(e.preventDefault(),n(e))}})}}]),r}(s().Component);function Xo(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function ei(e,t,r,n){if("number"==typeof n){var o="number"==typeof t?t:0,i="number"==typeof r&&r>=0?r:1/0;return Math.max(o,Math.min(i,n))}return void 0!==e?e:t}Qo.propTypes={className:i().string.isRequired,onClick:i().func,onDoubleClick:i().func,onMouseDown:i().func.isRequired,onTouchStart:i().func.isRequired,onTouchEnd:i().func.isRequired,split:i().oneOf(["vertical","horizontal"]),style:No(),resizerClassName:i().string.isRequired},Qo.defaultProps={resizerClassName:Jo};var ti=function(e){Ho(r,e);var t=Zo(r);function r(e){var n;Fo(this,r),(n=t.call(this,e)).onMouseDown=n.onMouseDown.bind(Go(n)),n.onTouchStart=n.onTouchStart.bind(Go(n)),n.onMouseMove=n.onMouseMove.bind(Go(n)),n.onTouchMove=n.onTouchMove.bind(Go(n)),n.onMouseUp=n.onMouseUp.bind(Go(n));var o=e.size,i=e.defaultSize,a=e.minSize,s=e.maxSize,l=e.primary,c=void 0!==o?o:ei(i,a,s,null);return n.state={active:!1,resized:!1,pane1Size:"first"===l?c:void 0,pane2Size:"second"===l?c:void 0,instanceProps:{size:o}},n}return Uo(r,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(r.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,r=t.allowResize,n=t.onDragStarted,o=t.split;if(r){Xo(document,window);var i="vertical"===o?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof n&&n(),this.setState({active:!0,position:i})}}},{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,r=t.allowResize,n=t.maxSize,o=t.minSize,i=t.onChange,a=t.split,s=t.step,l=this.state,c=l.active,u=l.position;if(r&&c){Xo(document,window);var f="first"===this.props.primary,p=f?this.pane1:this.pane2,d=f?this.pane2:this.pane1;if(p){var h=p,g=d;if(h.getBoundingClientRect){var m=h.getBoundingClientRect().width,y=h.getBoundingClientRect().height,v="vertical"===a?m:y,b=u-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(b)<s)return;b=~~(b/s)*s}var w=f?b:-b;parseInt(window.getComputedStyle(h).order)>parseInt(window.getComputedStyle(g).order)&&(w=-w);var S=n;if(void 0!==n&&n<=0){var x=this.splitPane;S="vertical"===a?x.getBoundingClientRect().width+n:x.getBoundingClientRect().height+n}var _=v-w,O=u-b;_<o?_=o:void 0!==n&&_>S?_=S:this.setState({position:O,resized:!0}),i&&i(_),this.setState(zo({draggedSize:_},f?"pane1Size":"pane2Size",_))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,r=e.onDragFinished,n=this.state,o=n.active,i=n.draggedSize;t&&o&&("function"==typeof r&&r(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,r=t.allowResize,n=t.children,o=t.className,i=t.onResizerClick,a=t.onResizerDoubleClick,l=t.paneClassName,c=t.pane1ClassName,u=t.pane2ClassName,f=t.paneStyle,p=t.pane1Style,d=t.pane2Style,h=t.resizerClassName,g=t.resizerStyle,m=t.split,y=t.style,v=this.state,b=v.pane1Size,w=v.pane2Size,S=r?"":"disabled",x=h?"".concat(h," ").concat(Jo):h,_=function(e){return s().Children.toArray(e).filter((function(e){return e}))}(n),O=qo({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},y);"vertical"===m?Object.assign(O,{flexDirection:"row",left:0,right:0}):Object.assign(O,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var E=["SplitPane",o,m,S],k=qo({},f,{},p),C=qo({},f,{},d),T=["Pane1",l,c].join(" "),P=["Pane2",l,u].join(" ");return s().createElement("div",{className:E.join(" "),ref:function(t){e.splitPane=t},style:O},s().createElement(Yo,{className:T,key:"pane1",eleRef:function(t){e.pane1=t},size:b,split:m,style:k},_[0]),s().createElement(Qo,{className:S,onClick:i,onDoubleClick:a,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:x,split:m,style:g||{}}),s().createElement(Yo,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:w,split:m,style:C},_[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return r.getSizeUpdate(e,t)}},{key:"getSizeUpdate",value:function(e,t){var r={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var n=void 0!==e.size?e.size:ei(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(r.draggedSize=n);var o="first"===e.primary;return r[o?"pane1Size":"pane2Size"]=n,r[o?"pane2Size":"pane1Size"]=void 0,r.instanceProps={size:e.size},r}}]),r}(s().Component);ti.propTypes={allowResize:i().bool,children:i().arrayOf(i().node).isRequired,className:i().string,primary:i().oneOf(["first","second"]),minSize:i().oneOfType([i().string,i().number]),maxSize:i().oneOfType([i().string,i().number]),defaultSize:i().oneOfType([i().string,i().number]),size:i().oneOfType([i().string,i().number]),split:i().oneOf(["vertical","horizontal"]),onDragStarted:i().func,onDragFinished:i().func,onChange:i().func,onResizerClick:i().func,onResizerDoubleClick:i().func,style:No(),resizerStyle:No(),paneClassName:i().string,pane1ClassName:i().string,pane2ClassName:i().string,paneStyle:No(),pane1Style:No(),pane2Style:No(),resizerClassName:i().string,step:i().number},ti.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,$o.polyfill)(ti);const ri=ti;var ni=r(93232),oi=r(74930),ii=r.n(oi),ai=r(74081),si=r(88100),li=r.n(si),ci=r(40940),ui=r.n(ci),fi=r(19619),pi=r(56505),di=r(76066);function hi(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gi(){return{error:!1}}function mi(e){return null==e||Object.prototype.hasOwnProperty.call(e,"length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length||M.List.isList(e)&&0===e.size}class yi extends a.Component{constructor(...e){super(...e),hi(this,"processInnerControlRef",(e=>{if(!e)return;this.innerWrappedControl=e.getWrappedInstance?e.getWrappedInstance():e,this.wrappedControlValid=this.innerWrappedControl.isValid||gi;const{shouldComponentUpdate:t}=this.innerWrappedControl;this.wrappedControlShouldComponentUpdate=t&&t.bind(this.innerWrappedControl)})),hi(this,"getValidateValue",(()=>{var e,t;let r=(null===(e=this.innerWrappedControl)||void 0===e||null===(t=e.getValidateValue)||void 0===t?void 0:t.call(e))||this.props.value;return M.List.isList(r)&&(r=r.join(",")),r})),hi(this,"validate",((e=!1)=>{const t=this.getValidateValue(),r=this.props.field,n=[],o=[this.validatePresence,this.validatePattern];if(r.get("meta")&&o.push(this.props.validateMetaField),o.forEach((e=>{const o=e(r,t,this.props.t);o.error&&n.push(o.error)})),e)e.error&&n.push(e.error);else{const e=this.validateWrappedControl(r);e.error&&n.push(e.error)}this.props.onValidate(n)})),hi(this,"validatePresence",((e,t)=>{const{t:r,parentIds:n}=this.props;return e.get("required",!0)&&mi(t)?{error:{type:di.Z.PRESENCE,parentIds:n,message:r("editor.editorControlPane.widget.required",{fieldLabel:e.get("label",e.get("name"))})}}:{error:!1}})),hi(this,"validatePattern",((e,t)=>{const{t:r,parentIds:n}=this.props,o=e.get("pattern",!1);return mi(t)?{error:!1}:o&&!RegExp(o.first()).test(t)?{error:{type:di.Z.PATTERN,parentIds:n,message:r("editor.editorControlPane.widget.regexPattern",{fieldLabel:e.get("label",e.get("name")),pattern:o.last()})}}:{error:!1}})),hi(this,"validateWrappedControl",(e=>{const{t,parentIds:r}=this.props;if("function"!=typeof this.wrappedControlValid)throw new Error(pi.f9`
|
|
3
3
|
this.wrappedControlValid is not a function. Are you sure widget
|
|
4
4
|
"${e.get("widget")}" is registered?
|
|
5
5
|
`);const n=this.wrappedControlValid();return"boolean"==typeof n?{error:!n}:Object.prototype.hasOwnProperty.call(n,"error")?n:n instanceof Promise?(n.then((()=>{this.validate({error:!1})}),(t=>{const r={type:di.Z.CUSTOM,message:`${e.get("label",e.get("name"))} - ${t}.`};this.validate({error:r})})),{error:{type:di.Z.CUSTOM,parentIds:r,message:t("editor.editorControlPane.widget.processing",{fieldLabel:e.get("label",e.get("name"))})}}):{error:!1}})),hi(this,"getObjectValue",(()=>this.props.value||(0,M.Map)())),hi(this,"onChangeObject",((e,t,r)=>{const n=this.getObjectValue().set(e.get("name"),t);return this.props.onChange(n,r&&{[this.props.field.get("name")]:r})})),hi(this,"setInactiveStyle",(()=>{this.props.setInactiveStyle(),this.props.field.has("pattern")&&!mi(this.getValidateValue())&&this.validate()}))}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,entry:t,collection:r,config:n,field:o,value:i,mediaPaths:a,metadata:l,onChange:c,onValidateObject:u,onOpenMediaLibrary:f,onRemoveMediaControl:p,onPersistMedia:d,onClearMediaControl:h,onAddAsset:g,onRemoveInsertedMedia:m,getAsset:y,classNameWrapper:v,classNameWidget:b,classNameWidgetActive:w,classNameLabel:S,classNameLabelActive:x,setActiveStyle:_,hasActiveStyle:O,editorControl:E,uniqueFieldId:k,resolveWidget:C,widget:T,getEditorComponents:P,query:j,queryHits:R,clearSearch:A,clearFieldErrors:M,isFetching:I,loadEntry:D,fieldsErrors:L,controlRef:N,isEditorComponent:$,isNewEditorComponent:F,parentIds:B,t:U,isDisabled:z,isFieldDuplicate:W,isFieldHidden:q,locale:H}=this.props;return s().createElement(e,{entry:t,collection:r,config:n,field:o,value:i,mediaPaths:a,metadata:l,onChange:c,onChangeObject:this.onChangeObject,onValidateObject:u,onOpenMediaLibrary:f,onClearMediaControl:h,onRemoveMediaControl:p,onPersistMedia:d,onAddAsset:g,onRemoveInsertedMedia:m,getAsset:y,forID:k,ref:this.processInnerControlRef,validate:this.validate,classNameWrapper:v,classNameWidget:b,classNameWidgetActive:w,classNameLabel:S,classNameLabelActive:x,setActiveStyle:_,setInactiveStyle:()=>this.setInactiveStyle(),hasActiveStyle:O,editorControl:E,resolveWidget:C,widget:T,getEditorComponents:P,getRemarkPlugins:fi.MM,query:j,queryHits:R,clearSearch:A,clearFieldErrors:M,isFetching:I,loadEntry:D,isEditorComponent:$,isNewEditorComponent:F,fieldsErrors:L,controlRef:N,parentIds:B,t:U,isDisabled:z,isFieldDuplicate:W,isFieldHidden:q,locale:H})}}hi(yi,"propTypes",{controlComponent:i().func.isRequired,field:f().map.isRequired,hasActiveStyle:i().bool,setActiveStyle:i().func.isRequired,setInactiveStyle:i().func.isRequired,classNameWrapper:i().string.isRequired,classNameWidget:i().string.isRequired,classNameWidgetActive:i().string.isRequired,classNameLabel:i().string.isRequired,classNameLabelActive:i().string.isRequired,value:i().oneOfType([i().node,i().object,i().string,i().bool]),mediaPaths:f().map.isRequired,metadata:f().map,fieldsErrors:f().map,onChange:i().func.isRequired,onValidate:i().func,onOpenMediaLibrary:i().func.isRequired,onClearMediaControl:i().func.isRequired,onRemoveMediaControl:i().func.isRequired,onPersistMedia:i().func.isRequired,onAddAsset:i().func.isRequired,onRemoveInsertedMedia:i().func.isRequired,getAsset:i().func.isRequired,resolveWidget:i().func.isRequired,widget:i().object.isRequired,getEditorComponents:i().func.isRequired,isFetching:i().bool,controlRef:i().func,query:i().func.isRequired,clearSearch:i().func.isRequired,clearFieldErrors:i().func.isRequired,queryHits:i().oneOfType([i().array,i().object]),editorControl:i().elementType.isRequired,uniqueFieldId:i().string.isRequired,loadEntry:i().func.isRequired,t:i().func.isRequired,onValidateObject:i().func,isEditorComponent:i().bool,isNewEditorComponent:i().bool,entry:f().map.isRequired,isDisabled:i().bool,isFieldDuplicate:i().func,isFieldHidden:i().func,locale:i().string});const vi=["node"];function bi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bi(Object(r),!0).forEach((function(t){xi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Si.apply(this,arguments)}function xi(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _i={widget:`\n display: block;\n width: 100%;\n padding: ${m.lengths.inputPadding};\n margin: 0;\n border: ${m.borders.textField};\n border-radius: ${m.lengths.borderRadius};\n border-top-left-radius: 0;\n outline: 0;\n box-shadow: none;\n background-color: ${m.colors.inputBackground};\n color: #444a57;\n transition: border-color ${m.transitions.main};\n position: relative;\n font-size: 15px;\n line-height: 1.5;\n\n select& {\n text-indent: 14px;\n height: 58px;\n }\n `,widgetActive:`\n border-color: ${m.colors.active};\n `,widgetError:`\n border-color: ${m.colors.errorText};\n `,disabled:"\n pointer-events: none;\n opacity: 0.5;\n background: #ccc;\n ",hidden:"\n visibility: hidden;\n "},Oi=(0,n.Z)("div",{target:"ec1nk3l0",label:"ControlContainer"})({name:"gpgisz",styles:"margin-top:16px;&:first-of-type{margin-top:36px;}"}),Ei=(0,n.Z)("ul",{target:"ec1nk3l1",label:"ControlErrorsList"})("list-style-type:none;font-size:12px;color:",m.colors.errorText,";margin-bottom:5px;text-align:right;text-transform:uppercase;position:relative;font-weight:600;top:20px;"),ki=(0,n.Z)("p",{target:"ec1nk3l2",label:"ControlHint"})("margin-bottom:0;padding:3px 0;font-size:12px;color:",(e=>e.error?m.colors.errorText:e.active?m.colors.active:m.colors.controlLabel),";transition:color ",m.transitions.main,";");function Ci({field:e,isActive:t,hasErrors:r,uniqueFieldId:n,isFieldOptional:o,t:i}){const a=`${e.get("label",e.get("name"))}`;return(0,D.jsx)(m.FieldLabel,{isActive:t,hasErrors:r,htmlFor:n},a," ",o?` (${i("editor.editorControl.field.optional")})`:"")}class Ti extends s().Component{constructor(...e){super(...e),xi(this,"state",{activeLabel:!1}),xi(this,"uniqueFieldId",ii()(`${this.props.field.get("name")}-field-`)),xi(this,"isAncestorOfFieldError",(()=>{const{fieldsErrors:e}=this.props;return!!(e&&e.size>0)&&Object.values(e.toJS()).some((e=>e.some((e=>e.parentIds&&e.parentIds.includes(this.uniqueFieldId)))))}))}render(){const{value:e,entry:t,collection:r,config:n,field:o,fieldsMetaData:i,fieldsErrors:a,mediaPaths:s,boundGetAsset:l,onChange:c,openMediaLibrary:u,clearMediaControl:f,removeMediaControl:p,addAsset:d,removeInsertedMedia:h,persistMedia:g,onValidate:m,processControlRef:y,controlRef:v,query:b,queryHits:w,isFetching:S,clearSearch:x,clearFieldErrors:_,loadEntry:O,className:E,isSelected:k,isEditorComponent:C,isNewEditorComponent:T,parentIds:P,t:j,validateMetaField:R,isDisabled:A,isHidden:M,isFieldDuplicate:I,isFieldHidden:L,locale:N}=this.props,$=o.get("widget"),F=(0,fi.EK)($),B=o.get("name"),U=o.get("hint"),z=!1===o.get("required"),W=m,q=i&&i.get(B),H=a&&a.get(this.uniqueFieldId),V=this.isAncestorOfFieldError(),K=!!H||V;return(0,D.jsx)(D.ClassNames,null,(({css:i,cx:$})=>(0,D.jsx)(Oi,{className:E,css:i`
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
${_i.label};
|
|
21
21
|
`,classNameLabelActive:i`
|
|
22
22
|
${_i.labelActive};
|
|
23
|
-
`,controlComponent:F.control,entry:t,collection:r,config:n,field:o,uniqueFieldId:this.uniqueFieldId,value:e,mediaPaths:s,metadata:q,onChange:(e,t)=>c(o,e,t),onValidate:m&&Dr()(m,this.uniqueFieldId),onOpenMediaLibrary:u,onClearMediaControl:f,onRemoveMediaControl:p,onRemoveInsertedMedia:h,onPersistMedia:g,onAddAsset:d,getAsset:l,hasActiveStyle:k||this.state.styleActive,setActiveStyle:()=>this.setState({styleActive:!0}),setInactiveStyle:()=>this.setState({styleActive:!1}),resolveWidget:fi.EK,widget:F,getEditorComponents:fi.Sq,ref:y&&Dr()(y,o),controlRef:v,editorControl:Pi,query:b,loadEntry:O,queryHits:w[this.uniqueFieldId]||[],clearSearch:x,clearFieldErrors:_,isFetching:S,fieldsErrors:a,onValidateObject:W,isEditorComponent:C,isNewEditorComponent:T,parentIds:P,t:j,validateMetaField:R,isDisabled:A,isFieldDuplicate:I,isFieldHidden:L,locale:N}),U&&(0,D.jsx)(ki,{active:k||this.state.styleActive,error:K},(0,D.jsx)(li(),{remarkPlugins:[ui()],allowedElements:["a","strong","em","del"],unwrapDisallowed:!0,components:{a:e=>{let{node:t}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,vi);return(0,D.jsx)("a",Si({},r,{target:"_blank",rel:"noopener noreferrer",style:{color:"inherit"}}))}}},U)))))}}xi(Ti,"propTypes",{value:i().oneOfType([i().node,i().object,i().string,i().bool]),field:f().map.isRequired,fieldsMetaData:f().map,fieldsErrors:f().map,mediaPaths:f().map.isRequired,boundGetAsset:i().func.isRequired,onChange:i().func.isRequired,openMediaLibrary:i().func.isRequired,addAsset:i().func.isRequired,removeInsertedMedia:i().func.isRequired,persistMedia:i().func.isRequired,onValidate:i().func,processControlRef:i().func,controlRef:i().func,query:i().func.isRequired,queryHits:i().object,isFetching:i().bool,clearSearch:i().func.isRequired,clearFieldErrors:i().func.isRequired,loadEntry:i().func.isRequired,t:i().func.isRequired,isEditorComponent:i().bool,isNewEditorComponent:i().bool,parentIds:i().arrayOf(i().string),entry:f().map.isRequired,collection:f().map.isRequired,isDisabled:i().bool,isHidden:i().bool,isFieldDuplicate:i().func,isFieldHidden:i().func,locale:i().string}),xi(Ti,"defaultProps",{parentIds:[]});const Pi=(0,p.$j)((function(e){const{collections:t,entryDraft:r}=e,n=r.get("entry"),o=t.get(r.getIn(["entry","collection"])),i=(0,Br.B)(e.medias);return{mediaPaths:e.mediaLibrary.get("controlMedia"),isFetching:e.search.isFetching,queryHits:e.search.queryHits,config:e.config,entry:n,collection:o,isLoadingAsset:i,loadEntry:async function(r,n){const o=t.get(r);if(o)return await(0,Lr.T0)(e,o,n);throw new Error(`Can't find collection '${r}'`)},validateMetaField:(t,r,n)=>(0,Lr.f2)(e,o,t,r,n)}}),(function(e){return wi(wi({},(0,ai.DE)({openMediaLibrary:x.UN,clearMediaControl:x.K6,removeMediaControl:x.qb,removeInsertedMedia:x.$E,persistMedia:x.BZ,addAsset:$r.ZJ,query:wn.IO,clearSearch:wn.AQ,clearFieldErrors:Lr.Lf},e)),{},{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)})}),(function(e,t,r){return wi(wi(wi(wi({},e),t),r),{},{boundGetAsset:t.boundGetAsset(e.collection,e.entry)})}))((0,c.Iu)()(Ti)),ji=Pi;var Ri=r(2995);function Ai(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mi=(0,n.Z)("div",{target:"e11hw0lx0",label:"ControlPaneContainer"})({name:"78woh1",styles:"max-width:800px;margin:0 auto;padding-bottom:16px;font-size:16px;"}),Ii=(0,n.Z)(m.StyledDropdownButton,{target:"e11hw0lx1",label:"LocaleButton"})(m.buttons.button,";",m.buttons.medium,";color:",m.colors.controlLabel,";background:",m.colors.textFieldBorder,";height:100%;&:after{top:11px;}"),Di=(0,n.Z)("div",{target:"e11hw0lx2",label:"LocaleButtonWrapper"})({name:"k008qs",styles:"display:flex;"}),Li=(0,n.Z)("div",{target:"e11hw0lx3",label:"LocaleRowWrapper"})({name:"k008qs",styles:"display:flex;"}),Ni=(0,n.Z)(m.Dropdown,{target:"e11hw0lx4",label:"StyledDropdown"})({name:"qq8cu0",styles:"width:max-content;margin-top:20px;margin-bottom:20px;margin-right:20px;"});function $i({locales:e,dropdownText:t,onLocaleChange:r}){return(0,D.jsx)(Ni,{renderButton:()=>(0,D.jsx)(Di,null,(0,D.jsx)(Ii,null,t))},e.map((e=>(0,D.jsx)(m.DropdownItem,{css:(0,D.css)(m.text.fieldLabel,""),key:e,label:e,onClick:()=>r(e)}))))}function Fi({field:e,entry:t,isTranslatable:r,locale:n}){if(e.get("meta"))return t.getIn(["meta",e.get("name")]);if(r){const r=(0,Ri.M8)(n);return t.getIn([...r,e.get("name")])}return t.getIn(["data",e.get("name")])}class Bi extends s().Component{constructor(...e){super(...e),Ai(this,"state",{selectedLocale:this.props.locale}),Ai(this,"componentValidate",{}),Ai(this,"handleLocaleChange",(e=>{this.setState({selectedLocale:e}),this.props.onLocaleChange(e)})),Ai(this,"copyFromOtherLocale",(({targetLocale:e,t})=>r=>{if(!window.confirm(t("editor.editorControlPane.i18n.copyFromLocaleConfirm",{locale:r.toUpperCase()})))return;const{entry:n,collection:o}=this.props,{locales:i,defaultLocale:a}=(0,Ri.Kb)(o),s=this.state.selectedLocale,l=i&&{currentLocale:s,locales:i,defaultLocale:a};this.props.fields.forEach((t=>{if((0,Ri.et)(t,e,r)){const e=Fi({field:t,entry:n,locale:r,isTranslatable:r!==a});this.props.onChange(t,e,void 0,l)}}))})),Ai(this,"validate",(async()=>{this.props.fields.forEach((e=>{"hidden"!==e.get("widget")&&this.componentValidate[e.get("name")]()}))})),Ai(this,"switchToDefaultLocale",(()=>{if((0,Ri.nR)(this.props.collection)){const{defaultLocale:e}=(0,Ri.Kb)(this.props.collection);return new Promise((t=>this.setState({selectedLocale:e},t)))}return Promise.resolve()}))}controlRef(e,t){var r;if(!t)return;const n=e.get("name");this.componentValidate[n]=(null===(r=t.innerWrappedControl)||void 0===r?void 0:r.validate)||t.validate}render(){const{collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,onValidate:a,t:s}=this.props;if(!e||!r)return null;if(0===t.size||!0===t.get("partial"))return null;const{locales:l,defaultLocale:c}=(0,Ri.Kb)(e),u=this.state.selectedLocale,f=l&&{currentLocale:u,locales:l,defaultLocale:c};return(0,D.jsx)(Mi,null,l&&(0,D.jsx)(Li,null,(0,D.jsx)($i,{locales:l,dropdownText:s("editor.editorControlPane.i18n.writingInLocale",{locale:u.toUpperCase()}),onLocaleChange:this.handleLocaleChange}),(0,D.jsx)($i,{locales:l.filter((e=>e!==u)),dropdownText:s("editor.editorControlPane.i18n.copyFromLocale"),onLocaleChange:this.copyFromOtherLocale({targetLocale:u,t:s})})),r.filter((e=>"hidden"!==e.get("widget"))).map(((r,s)=>{const l=(0,Ri.et)(r,u,c),p=(0,Ri.c5)(r,u,c),d=(0,Ri.jg)(r,u,c),h=f?`${u}_${s}`:s;return(0,D.jsx)(ji,{key:h,field:r,value:Fi({field:r,entry:t,locale:u,isTranslatable:l}),fieldsMetaData:n,fieldsErrors:o,onChange:(e,t,r)=>{i(e,t,r,f)},onValidate:a,processControlRef:this.controlRef.bind(this),controlRef:this.controlRef,entry:t,collection:e,isDisabled:p,isHidden:d,isFieldDuplicate:e=>(0,Ri.c5)(e,u,c),isFieldHidden:e=>(0,Ri.jg)(e,u,c),locale:u})})))}}Bi.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,fieldsMetaData:f().map.isRequired,fieldsErrors:f().map.isRequired,onChange:i().func.isRequired,onValidate:i().func.isRequired,locale:i().string};var Ui=r(12693),zi=r(1719),Wi=r(48570);class qi extends s().Component{render(){const{previewComponent:e,previewProps:t}=this.props;return(0,D.jsx)(Ui.Kr,null,(r=>(0,D.jsx)(ni.ScrollSyncPane,{attachTo:r.document.scrollingElement},(0,Wi.isElement)(e)?s().cloneElement(e,t):s().createElement(e,t))))}}qi.propTypes={previewComponent:i().func.isRequired,previewProps:i().object};const Hi=qi,Vi=["previewComponent"];class Ki extends s().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,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Vi);return s().createElement(t,r)}}Ki.propTypes={previewComponent:i().func.isRequired,field:f().map.isRequired,value:i().oneOfType([i().node,i().object,i().string,i().bool])};const Gi=Ki;function Zi(e){return"hidden"!==e.get("widget")}const Yi=(0,n.Z)("div",{target:"e1iji6y40",label:"PreviewContainer"})({name:"1gj2677",styles:"font-family:Roboto,'Helvetica Neue',HelveticaNeue,Helvetica,Arial,sans-serif;"});class Ji extends s().Component{render(){const{collection:e,fields:t,widgetFor:r}=this.props;return e&&t?(0,D.jsx)(Yi,null,t.filter(Zi).map((e=>(0,D.jsx)("div",{key:e.get("name")},r(e.get("name")))))):null}}function Qi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qi(Object(r),!0).forEach((function(t){ea(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ea(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Ji.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,getAsset:i().func.isRequired,widgetFor:i().func.isRequired};const ta=(0,n.Z)(Ui.ZP,{target:"enus48h0",label:"PreviewPaneFrame"})("width:100%;height:100%;border:none;background:#fff;border-radius:",m.lengths.borderRadius,";");class ra extends s().Component{constructor(...e){super(...e),ea(this,"getWidget",((e,t,r,n,o=null)=>{const{getAsset:i,entry:a}=n,s=(0,fi.EK)(e.get("widget")),l=o?e.get("name")+"_"+o:e.get("name"),c=t&&!s.allowMapValue&&M.Map.isMap(t);return s.preview?(0,D.jsx)(Gi,{previewComponent:s.preview,key:l,field:e,getAsset:i,value:c?t.get(e.get("name")):t,entry:a,fieldsMetaData:r,resolveWidget:fi.EK,getRemarkPlugins:fi.MM}):null})),ea(this,"inferedFields",{}),ea(this,"widgetFor",((e,t=this.props.fields,r=this.props.entry.get("data"),n=this.props.fieldsMetaData)=>{let o=t&&t.find((t=>t.get("name")===e)),i=M.Map.isMap(r)&&r.get(o.get("name"));o.get("meta")&&(i=this.props.entry.getIn(["meta",o.get("name")]));const a=o.get("fields"),s=o.get("field"),l=n&&n.get(o.get("name"),(0,M.Map)());a&&(o=o.set("fields",this.getNestedWidgets(a,i,l))),s&&(o=o.set("field",this.getSingleNested(s,i,l)));const c=Object.entries(this.inferedFields).filter((([e])=>(0,rr._M)(this.props.collection,e)===o)).map((([,e])=>e))[0];return c?i=c.defaultPreview(i):i&&-1!==["string","text","number"].indexOf(o.get("widget"))&&i.toString().length<50&&(i=(0,D.jsx)("div",null,(0,D.jsx)("strong",null,o.get("label",o.get("name")),":")," ",i)),i?this.getWidget(o,i,l,this.props):null})),ea(this,"getNestedWidgets",((e,t,r)=>M.List.isList(t)?t.map((t=>this.widgetsForNestedFields(e,t,r))):this.widgetsForNestedFields(e,t,r))),ea(this,"getSingleNested",((e,t,r)=>M.List.isList(t)?t.map(((t,n)=>this.getWidget(e,t,r.get(e.get("name")),this.props,n))):this.getWidget(e,t,r.get(e.get("name")),this.props))),ea(this,"widgetsForNestedFields",((e,t,r)=>e.map((n=>this.widgetFor(n.get("name"),e,t,r))))),ea(this,"widgetsFor",(e=>{const{fields:t,entry:r,fieldsMetaData:n}=this.props,o=t.find((t=>t.get("name")===e)),i=o&&o.get("fields"),a=r.getIn(["data",o.get("name")]),s=n.get(o.get("name"),(0,M.Map)());return M.List.isList(a)?a.map((e=>{const t=i&&(0,M.Map)(i.map(((t,r)=>[t.get("name"),(0,D.jsx)("div",{key:r},this.getWidget(t,e,s.get(t.get("name")),this.props))])));return(0,M.Map)({data:e,widgets:t})})):(0,M.Map)({data:a,widgets:i&&(0,M.Map)(i.map((e=>[e.get("name"),this.getWidget(e,a,s.get(e.get("name")),this.props)])))})}))}inferFields(){const e=(0,rr.GK)(this.props.collection,"title"),t=(0,rr.GK)(this.props.collection,"shortTitle"),r=(0,rr.GK)(this.props.collection,"author");this.inferedFields={},e&&(this.inferedFields[e]=zi.xt.title),t&&(this.inferedFields[t]=zi.xt.shortTitle),r&&(this.inferedFields[r]=zi.xt.author)}render(){const{entry:e,collection:t,config:r}=this.props;if(!e||!e.get("data"))return null;const n=(0,fi.LO)((0,rr.A3)(t,e.get("slug")))||Ji;this.inferFields();const o=Xi(Xi({},this.props),{},{widgetFor:this.widgetFor,widgetsFor:this.widgetsFor}),i=(0,fi.s3)().map(((e,t)=>e.raw?(0,D.jsx)("style",{key:t},e.value):(0,D.jsx)("link",{key:t,href:e.value,type:"text/css",rel:"stylesheet"})));return t||(0,D.jsx)(ta,{id:"preview-pane",head:i}),(0,D.jsx)(I.SV,{config:r},(0,D.jsx)(ta,{id:"preview-pane",head:i,initialContent:'\n<!DOCTYPE html>\n<html>\n <head><base target="_blank"/></head>\n <body><div></div></body>\n</html>\n'},(0,D.jsx)(Ui.Kr,null,(({document:e,window:t})=>(0,D.jsx)(Hi,{previewComponent:n,previewProps:Xi(Xi({},o),{},{document:e,window:t})})))))}}ra.propTypes={collection:f().map.isRequired,fields:f().list.isRequired,entry:f().map.isRequired,fieldsMetaData:f().map.isRequired,getAsset:i().func.isRequired};const na=(0,p.$j)((function(e){return{isLoadingAsset:(0,Br.B)(e.medias),config:e.config}}),(function(e){return{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)}}),(function(e,t,r){return Xi(Xi(Xi(Xi({},e),t),r),{},{getAsset:t.boundGetAsset(r.collection,r.entry)})}))(ra);function oa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ia={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,D.css)("height:100%;display:flex;align-items:center;border:0 solid ",m.colors.textFieldBorder,";;label:toolbarSection;"),publishedButton:(0,D.css)("background-color:",m.colorsRaw.tealLight,";color:",m.colorsRaw.tealDark,";;label:publishedButton;")},aa=(0,n.Z)("div",{target:"e1d2l9mo0",label:"TooltipText"})({name:"198q1ye",styles:"visibility:hidden;width:321px;background-color:#555;color:#fff;text-align:unset;border-radius:6px;padding:5px;position:absolute;z-index:1;top:145%;left:50%;margin-left:-320px;opacity:0;transition:opacity 0.3s;"}),sa=(0,n.Z)("div",{target:"e1d2l9mo1",label:"Tooltip"})("position:relative;display:inline-block;&:hover + ",aa,"{visibility:visible;opacity:0.9;}"),la=(0,n.Z)("div",{target:"e1d2l9mo2",label:"TooltipContainer"})({name:"79elbk",styles:"position:relative;"}),ca=(0,n.Z)(m.StyledDropdownButton,{target:"e1d2l9mo3",label:"DropdownButton"})(ia.noOverflow," @media (max-width:1200px){padding-left:10px;}"),ua=(0,n.Z)("div",{target:"e1d2l9mo4",label:"ToolbarContainer"})("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:",m.zIndex.zIndex300,";background-color:#fff;height:66px;display:flex;justify-content:space-between;"),fa=(0,n.Z)("div",{target:"e1d2l9mo5",label:"ToolbarSectionMain"})(ia.toolbarSection,";flex:10;display:flex;justify-content:space-between;padding:0 10px;"),pa=(0,n.Z)("div",{target:"e1d2l9mo6",label:"ToolbarSubSectionFirst"})({name:"70qvj9",styles:"display:flex;align-items:center;"}),da=(0,n.Z)(pa,{target:"e1d2l9mo7",label:"ToolbarSubSectionLast"})({name:"1a9getn",styles:"justify-content:flex-end;"}),ha=(0,n.Z)(Lt,{target:"e1d2l9mo8",label:"ToolbarSectionBackLink"})(ia.toolbarSection,";border-right-width:1px;font-weight:normal;padding:0 20px;&:hover,&:focus{background-color:#f1f2f4;}"),ga=(0,n.Z)("div",{target:"e1d2l9mo9",label:"ToolbarSectionMeta"})(ia.toolbarSection,";border-left-width:1px;padding:0 7px;"),ma=(0,n.Z)(m.Dropdown,{target:"e1d2l9mo10",label:"ToolbarDropdown"})(ia.buttonMargin,";",m.Icon,"{color:",m.colorsRaw.teal,";}"),ya=(0,n.Z)("div",{target:"e1d2l9mo11",label:"BackArrow"})("color:",m.colors.textLead,";font-size:21px;font-weight:600;margin-right:16px;"),va=(0,n.Z)("div",{target:"e1d2l9mo12",label:"BackCollection"})("color:",m.colors.textLead,";font-size:14px;"),ba=(0,n.Z)("div",{target:"e1d2l9mo13",label:"BackStatus"})({name:"19ug521",styles:"margin-top:6px;"}),wa=(0,n.Z)(ba,{target:"e1d2l9mo14",label:"BackStatusUnchanged"})(m.components.textBadgeSuccess,";"),Sa=(0,n.Z)(ba,{target:"e1d2l9mo15",label:"BackStatusChanged"})(m.components.textBadgeDanger,";"),xa=(0,n.Z)("button",{target:"e1d2l9mo16",label:"ToolbarButton"})(m.buttons.button,";",m.buttons.default,";",ia.buttonMargin,";",ia.noOverflow,";display:block;@media (max-width:1200px){padding:0 10px;}"),_a=(0,n.Z)(xa,{target:"e1d2l9mo17",label:"DeleteButton"})(m.buttons.lightRed,";"),Oa=(0,n.Z)(xa,{target:"e1d2l9mo18",label:"SaveButton"})(m.buttons.lightBlue,";&[disabled]{",m.buttons.disabled,";}"),Ea=(0,n.Z)(ca,{target:"e1d2l9mo19",label:"PublishedToolbarButton"})(ia.publishedButton,""),ka=(0,n.Z)(xa,{target:"e1d2l9mo20",label:"PublishedButton"})(ia.publishedButton,""),Ca=(0,n.Z)(ca,{target:"e1d2l9mo21",label:"PublishButton"})("background-color:",m.colorsRaw.teal,";"),Ta=(0,n.Z)(ca,{target:"e1d2l9mo22",label:"StatusButton"})("background-color:",m.colorsRaw.tealLight,";color:",m.colorsRaw.teal,";"),Pa=(0,n.Z)("div",{target:"e1d2l9mo23",label:"PreviewButtonContainer"})("margin-right:12px;color:",m.colorsRaw.blue,";display:flex;align-items:center;a,",m.Icon,"{color:",m.colorsRaw.blue,";}",m.Icon,"{position:relative;top:1px;}"),ja=(0,n.Z)("button",{target:"e1d2l9mo24",label:"RefreshPreviewButton"})("background:none;border:0;cursor:pointer;color:",m.colorsRaw.blue,";span{margin-right:6px;}"),Ra=ja.withComponent("a",{target:"e1d2l9mo27",label:"PreviewLink"}),Aa=(0,n.Z)(m.DropdownItem,{target:"e1d2l9mo25",label:"PublishDropDownItem"})({name:"12k1a1h",styles:"min-width:initial;"}),Ma=(0,n.Z)(m.DropdownItem,{target:"e1d2l9mo26",label:"StatusDropdownItem"})(m.Icon,"{color:",m.colors.infoText,";}");class Ia extends s().Component{constructor(...e){super(...e),oa(this,"renderSimpleControls",(()=>{const{collection:e,hasChanged:t,isNewEntry:r,showDelete:n,onDelete:o,t:i}=this.props,a=e.get("create");return(0,D.jsx)(s().Fragment,null,r||t?this.renderNewEntrySimplePublishControls({canCreate:a}):this.renderExistingEntrySimplePublishControls({canCreate:a}),(0,D.jsx)("div",null,n?(0,D.jsx)(_a,{onClick:o},i("editor.editorToolbar.deleteEntry")):null))})),oa(this,"renderDeployPreviewControls",(e=>{const{deployPreview:t={},loadDeployPreview:r,t:n}=this.props,{url:o,status:i,isFetching:a}=t;if(!i)return;const s="SUCCESS"===i&&!a;return(0,D.jsx)(Pa,null,s?(0,D.jsx)(Ra,{rel:"noopener noreferrer",target:"_blank",href:o},(0,D.jsx)("span",null,e),(0,D.jsx)(m.Icon,{type:"new-tab",size:"xsmall"})):(0,D.jsx)(ja,{onClick:r},(0,D.jsx)("span",null,n("editor.editorToolbar.deployPreviewPendingButtonLabel")),(0,D.jsx)(m.Icon,{type:"refresh",size:"xsmall"})))})),oa(this,"renderStatusInfoTooltip",(()=>{const{t:e,currentStatus:t}=this.props,r={[Ct.i7.get("DRAFT")]:"statusInfoTooltipDraft",[Ct.i7.get("PENDING_REVIEW")]:"statusInfoTooltipInReview"},n=Object.keys(r).find((e=>e===t));return(0,D.jsx)(la,null,(0,D.jsx)(sa,null,(0,D.jsx)(m.Icon,{type:"info-circle",size:"small",className:"tooltip"})),n&&(0,D.jsx)(aa,null,e(`editor.editorToolbar.${r[n]}`)))})),oa(this,"renderWorkflowStatusControls",(()=>{const{isUpdatingStatus:e,onChangeStatus:t,currentStatus:r,t:n,useOpenAuthoring:o}=this.props,i={[Ct.i7.get("DRAFT")]:n("editor.editorToolbar.draft"),[Ct.i7.get("PENDING_REVIEW")]:n("editor.editorToolbar.inReview"),[Ct.i7.get("PENDING_PUBLISH")]:n("editor.editorToolbar.ready")},a=e?n("editor.editorToolbar.updating"):n("editor.editorToolbar.status",{status:i[r]});return(0,D.jsx)(s().Fragment,null,(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"120px",renderButton:()=>(0,D.jsx)(Ta,null,a)},(0,D.jsx)(Ma,{label:n("editor.editorToolbar.draft"),onClick:()=>t("DRAFT"),icon:r===Ct.i7.get("DRAFT")?"check":null}),(0,D.jsx)(Ma,{label:n("editor.editorToolbar.inReview"),onClick:()=>t("PENDING_REVIEW"),icon:r===Ct.i7.get("PENDING_REVIEW")?"check":null}),o?"":(0,D.jsx)(Ma,{label:n("editor.editorToolbar.ready"),onClick:()=>t("PENDING_PUBLISH"),icon:r===Ct.i7.get("PENDING_PUBLISH")?"check":null})),o&&this.renderStatusInfoTooltip())})),oa(this,"renderNewEntryWorkflowPublishControls",(({canCreate:e,canPublish:t})=>{const{isPublishing:r,onPublish:n,onPublishAndNew:o,onPublishAndDuplicate:i,t:a}=this.props;return t?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"200px",renderButton:()=>(0,D.jsx)(Ca,null,a(r?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:n}),e?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:o}),(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:i})):null):""})),oa(this,"renderExistingEntryWorkflowPublishControls",(({canCreate:e,canPublish:t,canDelete:r})=>{const{unPublish:n,onDuplicate:o,isPersisting:i,t:a}=this.props;return t||e?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",key:"td-publish-create",renderButton:()=>(0,D.jsx)(Ea,null,a(i?"editor.editorToolbar.unpublishing":"editor.editorToolbar.published"))},r&&t&&(0,D.jsx)(m.DropdownItem,{label:a("editor.editorToolbar.unpublish"),icon:"arrow",iconDirection:"right",onClick:n}),e&&(0,D.jsx)(m.DropdownItem,{label:a("editor.editorToolbar.duplicate"),icon:"add",onClick:o})):""})),oa(this,"renderExistingEntrySimplePublishControls",(({canCreate:e})=>{const{onDuplicate:t,t:r}=this.props;return e?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,D.jsx)(Ea,null,r("editor.editorToolbar.published"))},(0,D.jsx)(m.DropdownItem,{label:r("editor.editorToolbar.duplicate"),icon:"add",onClick:t})):(0,D.jsx)(ka,null,r("editor.editorToolbar.published"))})),oa(this,"renderNewEntrySimplePublishControls",(({canCreate:e})=>{const{onPersist:t,onPersistAndNew:r,onPersistAndDuplicate:n,isPersisting:o,t:i}=this.props;return(0,D.jsx)("div",null,(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,D.jsx)(Ca,null,i(o?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:t}),e?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:r}),(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:n})):null))})),oa(this,"renderSimpleDeployPreviewControls",(()=>{const{hasChanged:e,isNewEntry:t,t:r}=this.props;if(!t&&!e)return this.renderDeployPreviewControls(r("editor.editorToolbar.deployButtonLabel"))})),oa(this,"renderWorkflowControls",(()=>{const{onPersist:e,onDelete:t,onDeleteUnpublishedChanges:r,showDelete:n,hasChanged:o,hasUnpublishedChanges:i,useOpenAuthoring:a,isPersisting:s,isDeleting:l,isNewEntry:c,isModification:u,currentStatus:f,collection:p,t:d}=this.props,h=p.get("create"),g=p.get("publish")&&!a,m=p.get("delete",!0),y=i&&u&&d("editor.editorToolbar.deleteUnpublishedChanges")||i&&(c||!u)&&d("editor.editorToolbar.deleteUnpublishedEntry")||!i&&!u&&d("editor.editorToolbar.deletePublishedEntry");return[(0,D.jsx)(Oa,{disabled:!o,key:"save-button",onClick:()=>o&&e()},d(s?"editor.editorToolbar.saving":"editor.editorToolbar.save")),f?[this.renderWorkflowStatusControls(),this.renderNewEntryWorkflowPublishControls({canCreate:h,canPublish:g})]:!c&&this.renderExistingEntryWorkflowPublishControls({canCreate:h,canPublish:g,canDelete:m}),n&&!a||i||u?(0,D.jsx)(_a,{key:"delete-button",onClick:i?r:t},l?d("editor.editorToolbar.deleting"):y):null]})),oa(this,"renderWorkflowDeployPreviewControls",(()=>{const{currentStatus:e,isNewEntry:t,t:r}=this.props;return e?this.renderDeployPreviewControls(r("editor.editorToolbar.deployPreviewButtonLabel")):t?void 0:this.renderDeployPreviewControls(r("editor.editorToolbar.deployButtonLabel"))}))}componentDidMount(){const{isNewEntry:e,loadDeployPreview:t}=this.props;e||t({maxAttempts:3})}componentDidUpdate(e){const{isNewEntry:t,isPersisting:r,loadDeployPreview:n}=this.props;t||!e.isPersisting||r||n({maxAttempts:3})}render(){const{user:e,hasChanged:t,displayUrl:r,collection:n,hasWorkflow:o,onLogoutClick:i,t:a,editorBackLink:s}=this.props;return(0,D.jsx)(ua,null,(0,D.jsx)(ha,{to:s},(0,D.jsx)(ya,null,"←"),(0,D.jsx)("div",null,(0,D.jsx)(va,null,a("editor.editorToolbar.backCollection",{collectionLabel:n.get("label")})),t?(0,D.jsx)(Sa,null,a("editor.editorToolbar.unsavedChanges")):(0,D.jsx)(wa,null,a("editor.editorToolbar.changesSaved")))),(0,D.jsx)(fa,null,(0,D.jsx)(pa,null,o?this.renderWorkflowControls():this.renderSimpleControls()),(0,D.jsx)(da,null,o?this.renderWorkflowDeployPreviewControls():this.renderSimpleDeployPreviewControls())),(0,D.jsx)(ga,null,(0,D.jsx)(I.Xp,{displayUrl:r,imageUrl:null==e?void 0:e.avatar_url,onLogoutClick:i})))}}oa(Ia,"propTypes",{isPersisting:i().bool,isPublishing:i().bool,isUpdatingStatus:i().bool,isDeleting:i().bool,onPersist:i().func.isRequired,onPersistAndNew:i().func.isRequired,onPersistAndDuplicate:i().func.isRequired,showDelete:i().bool.isRequired,onDelete:i().func.isRequired,onDeleteUnpublishedChanges:i().func.isRequired,onChangeStatus:i().func.isRequired,onPublish:i().func.isRequired,unPublish:i().func.isRequired,onDuplicate:i().func.isRequired,onPublishAndNew:i().func.isRequired,onPublishAndDuplicate:i().func.isRequired,user:i().object,hasChanged:i().bool,displayUrl:i().string,collection:f().map.isRequired,hasWorkflow:i().bool,useOpenAuthoring:i().bool,hasUnpublishedChanges:i().bool,isNewEntry:i().bool,isModification:i().bool,currentStatus:i().string,onLogoutClick:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,t:i().func.isRequired,editorBackLink:i().string.isRequired});const Da=(0,c.Iu)()(Ia);var La=r(72431);function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Na.apply(this,arguments)}function $a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fa="cms.preview-visible",Ba="cms.scroll-sync-enabled",Ua="cms.split-pane-position",za="cms.i18n-visible",Wa={splitPane:(0,D.css)(m.components.card,";border-radius:0;height:100%;;label:splitPane;"),pane:{name:"nq3sgi-pane",styles:"height:100%;overflow-y:auto;;label:pane;"}},qa=(0,n.Z)(m.IconButton,{target:"e1nx103k0",label:"EditorToggle"})({name:"1upilqn",styles:"margin-bottom:12px;"});function Ha(){return(0,D.jsx)(D.Global,{styles:(0,D.css)(".Resizer.vertical{width:21px;cursor:col-resize;position:relative;transition:background-color ",m.transitions.main,";&:before{content:'';width:2px;height:100%;position:relative;left:10px;background-color:",m.colors.textFieldBorder,";display:block;}&:hover,&:active{background-color:",m.colorsRaw.GrayLight,";}};label:ReactSplitPaneGlobalStyles;")})}const Va=(0,n.Z)(ri,{target:"e1nx103k1",label:"StyledSplitPane"})(Wa.splitPane,";.Pane{height:100%;}"),Ka=(0,n.Z)("div",{target:"e1nx103k2",label:"NoPreviewContainer"})(Wa.splitPane,";"),Ga=(0,n.Z)("div",{target:"e1nx103k3",label:"EditorContainer"})("width:100%;min-width:800px;height:100%;position:absolute;top:0;left:0;overflow:hidden;padding-top:66px;background-color:",m.colors.background,";"),Za=(0,n.Z)("div",{target:"e1nx103k4",label:"Editor"})({name:"1gs40ov",styles:"height:100%;margin:0 auto;position:relative;"}),Ya=(0,n.Z)("div",{target:"e1nx103k5",label:"PreviewPaneContainer"})("height:100%;pointer-events:",(e=>e.blockEntry?"none":"auto"),";overflow-y:",(e=>e.overFlow?"auto":"hidden"),";"),Ja=(0,n.Z)(Ya,{target:"e1nx103k6",label:"ControlPaneContainer"})({name:"pjxpm9",styles:"padding:0 16px;position:relative;overflow-x:hidden;"}),Qa=(0,n.Z)("div",{target:"e1nx103k7",label:"ViewControls"})("position:absolute;top:10px;right:10px;z-index:",m.zIndex.zIndex299,";");function Xa({i18nVisible:e,previewVisible:t,editor:r,editorWithEditor:n,editorWithPreview:o}){return e?n:t?o:(0,D.jsx)(Ka,null,r)}class es extends a.Component{constructor(...e){super(...e),$a(this,"state",{showEventBlocker:!1,previewVisible:"false"!==localStorage.getItem(Fa),scrollSyncEnabled:"false"!==localStorage.getItem(Ba),i18nVisible:"false"!==localStorage.getItem(za)}),$a(this,"handleSplitPaneDragStart",(()=>{this.setState({showEventBlocker:!0})})),$a(this,"handleSplitPaneDragFinished",(()=>{this.setState({showEventBlocker:!1})})),$a(this,"handleOnPersist",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e;await this.controlPaneRef.switchToDefaultLocale(),this.controlPaneRef.validate(),this.props.onPersist({createNew:t,duplicate:r})})),$a(this,"handleOnPublish",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e;await this.controlPaneRef.switchToDefaultLocale(),this.controlPaneRef.validate(),this.props.onPublish({createNew:t,duplicate:r})})),$a(this,"handleTogglePreview",(()=>{const e=!this.state.previewVisible;this.setState({previewVisible:e}),localStorage.setItem(Fa,e)})),$a(this,"handleToggleScrollSync",(()=>{const e=!this.state.scrollSyncEnabled;this.setState({scrollSyncEnabled:e}),localStorage.setItem(Ba,e)})),$a(this,"handleToggleI18n",(()=>{const e=!this.state.i18nVisible;this.setState({i18nVisible:e}),localStorage.setItem(za,e)})),$a(this,"handleLeftPanelLocaleChange",(e=>{this.setState({leftPanelLocale:e})}))}render(){const{collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,showDelete:a,onDelete:s,onDeleteUnpublishedChanges:l,onChangeStatus:c,onPublish:u,unPublish:f,onDuplicate:p,onValidate:d,user:h,hasChanged:g,displayUrl:m,hasWorkflow:y,useOpenAuthoring:v,hasUnpublishedChanges:b,isNewEntry:w,isModification:S,currentStatus:x,onLogoutClick:_,loadDeployPreview:O,deployPreview:E,draftKey:k,editorBackLink:C,t:T}=this.props,{scrollSyncEnabled:P,showEventBlocker:j}=this.state,R=function(e,t){if(e.get("type")===La.h){const r=(0,rr.HN)(e,t.get("slug")),n=null==r?void 0:r.getIn(["editor","preview"]);if(null!=n)return n}return e.getIn(["editor","preview"],!0)}(e,t),{locales:A,defaultLocale:M}=(0,Ri.Kb)(this.props.collection),I=(0,Ri.nR)(e)&&A.length>1,L={collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,onValidate:d},N=this.state.leftPanelLocale||(null==A?void 0:A[0]),$=(0,D.jsx)(Ja,{overFlow:!0,blockEntry:j},(0,D.jsx)(Bi,Na({},L,{ref:e=>this.controlPaneRef=e,locale:N,t:T,onLocaleChange:this.handleLeftPanelLocaleChange}))),F=(0,D.jsx)(Ja,{overFlow:!this.state.scrollSyncEnabled,blockEntry:j},(0,D.jsx)(Bi,Na({},L,{locale:null==A?void 0:A[1],t:T}))),B=I?(0,Ri.cw)(t,N,M):t,U=(0,D.jsx)(ni.ScrollSync,{enabled:this.state.scrollSyncEnabled},(0,D.jsx)("div",null,(0,D.jsx)(Ha,null),(0,D.jsx)(Va,{maxSize:-100,minSize:400,defaultSize:parseInt(localStorage.getItem(Ua),10)||"50%",onChange:e=>localStorage.setItem(Ua,e),onDragStarted:this.handleSplitPaneDragStart,onDragFinished:this.handleSplitPaneDragFinished},(0,D.jsx)(ni.ScrollSyncPane,null,$),(0,D.jsx)(Ya,{blockEntry:j},(0,D.jsx)(na,{collection:e,entry:B,fields:r,fieldsMetaData:n,locale:N}))))),z=(0,D.jsx)(ni.ScrollSync,{enabled:this.state.scrollSyncEnabled},(0,D.jsx)("div",null,(0,D.jsx)(Va,{maxSize:-100,defaultSize:parseInt(localStorage.getItem(Ua),10)||"50%",onChange:e=>localStorage.setItem(Ua,e),onDragStarted:this.handleSplitPaneDragStart,onDragFinished:this.handleSplitPaneDragFinished},(0,D.jsx)(ni.ScrollSyncPane,null,$),(0,D.jsx)(ni.ScrollSyncPane,null,F)))),W=I&&this.state.i18nVisible,q=R&&this.state.previewVisible,H=W||q;return(0,D.jsx)(Ga,null,(0,D.jsx)(Da,{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:s,onDeleteUnpublishedChanges:l,onChangeStatus:c,showDelete:a,onPublish:u,unPublish:f,onDuplicate:p,onPublishAndNew:()=>this.handleOnPublish({createNew:!0}),onPublishAndDuplicate:()=>this.handleOnPublish({createNew:!0,duplicate:!0}),user:h,hasChanged:g,displayUrl:m,collection:e,hasWorkflow:y,useOpenAuthoring:v,hasUnpublishedChanges:b,isNewEntry:w,isModification:S,currentStatus:x,onLogoutClick:_,loadDeployPreview:O,deployPreview:E,editorBackLink:C}),(0,D.jsx)(Za,{key:k},(0,D.jsx)(Qa,null,I&&(0,D.jsx)(qa,{isActive:W,onClick:this.handleToggleI18n,size:"large",type:"page",title:T("editor.editorInterface.toggleI18n"),marginTop:"70px"}),R&&(0,D.jsx)(qa,{isActive:q,onClick:this.handleTogglePreview,size:"large",type:"eye",title:T("editor.editorInterface.togglePreview")}),H&&(0,D.jsx)(qa,{isActive:P,onClick:this.handleToggleScrollSync,size:"large",type:"scroll",title:T("editor.editorInterface.toggleScrollSync")})),(0,D.jsx)(Xa,{i18nVisible:W,previewVisible:q,editor:$,editorWithEditor:z,editorWithPreview:U})))}}es.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,fieldsMetaData:f().map.isRequired,fieldsErrors:f().map.isRequired,onChange:i().func.isRequired,onValidate:i().func.isRequired,onPersist:i().func.isRequired,showDelete:i().bool.isRequired,onDelete:i().func.isRequired,onDeleteUnpublishedChanges:i().func.isRequired,onPublish:i().func.isRequired,unPublish:i().func.isRequired,onDuplicate:i().func.isRequired,onChangeStatus:i().func.isRequired,user:i().object,hasChanged:i().bool,displayUrl:i().string,hasWorkflow:i().bool,useOpenAuthoring:i().bool,hasUnpublishedChanges:i().bool,isNewEntry:i().bool,isModification:i().bool,currentStatus:i().string,onLogoutClick:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,draftKey:i().string.isRequired,t:i().func.isRequired};const ts=es;function rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ns(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(r),!0).forEach((function(t){os(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function os(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function is(e,t){const{collections:r}=e,n=e.config.publish_mode===Ct.S0,o=r.get(t.match.params.name),i={isEditorialWorkflow:n,showDelete:!t.newEntry&&(0,rr.Zh)(o)};if(n){const r=t.match.params[0],n=(0,bn.Js)(e,o.get("name"),r);n&&(i.unpublishedEntry=!0,i.entry=n)}return i}function as(e,t,r){const{isEditorialWorkflow:n,unpublishedEntry:o}=e,{dispatch:i}=t,a={};return n&&(a.loadEntry=(e,t)=>i((0,Zn.S0)(e,t)),a.persistEntry=e=>i((0,Zn.tH)(e,o))),ns(ns(ns({},r),e),a)}function ss(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class ls extends s().Component{constructor(...e){super(...e),ss(this,"createBackup",Io()((function(e,t){this.props.persistLocalBackup(e,t)}),2e3)),ss(this,"handleChangeDraftField",((e,t,r,n)=>{const o=[this.props.unPublishedEntry,this.props.publishedEntry].filter(Boolean);this.props.changeDraftField({field:e,value:t,metadata:r,entries:o,i18n:n})})),ss(this,"handleChangeStatus",(e=>{const{entryDraft:t,updateUnpublishedEntryStatus:r,collection:n,slug:o,currentStatus:i,t:a}=this.props;if(t.get("hasChanged"))return void window.alert(a("editor.editor.onUpdatingWithUnsavedChanges"));const s=Ct.i7.get(e);r(n.get("name"),o,i,s)})),ss(this,"handlePersistEntry",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e,{persistEntry:n,collection:o,currentStatus:i,hasWorkflow:a,loadEntry:s,slug:l,createDraftDuplicateFromEntry:c,entryDraft:u}=this.props;await n(o),this.deleteBackup(),t?((0,b.Tc)(o.get("name")),r&&c(u.get("entry"))):l&&a&&!i&&s(o,l)})),ss(this,"handlePublishEntry",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e,{publishUnpublishedEntry:n,createDraftDuplicateFromEntry:o,entryDraft:i,collection:a,slug:s,currentStatus:l,t:c}=this.props;l===Ct.i7.last()?i.get("hasChanged")?window.alert(c("editor.editor.onPublishingWithUnsavedChanges")):window.confirm(c("editor.editor.onPublishing"))&&(await n(a.get("name"),s),this.deleteBackup(),t&&(0,b.Tc)(a.get("name")),r&&o(i.get("entry"))):window.alert(c("editor.editor.onPublishingNotReady"))})),ss(this,"handleUnpublishEntry",(async()=>{const{unpublishPublishedEntry:e,collection:t,slug:r,t:n}=this.props;if(window.confirm(n("editor.editor.onUnpublishing")))return await e(t,r),(0,b.db)(t.get("name"))})),ss(this,"handleDuplicateEntry",(()=>{const{createDraftDuplicateFromEntry:e,collection:t,entryDraft:r}=this.props;(0,b.Tc)(t.get("name")),e(r.get("entry"))})),ss(this,"handleDeleteEntry",(()=>{const{entryDraft:e,newEntry:t,collection:r,deleteEntry:n,slug:o,t:i}=this.props;if(e.get("hasChanged")){if(!window.confirm(i("editor.editor.onDeleteWithUnsavedChanges")))return}else if(!window.confirm(i("editor.editor.onDeletePublishedEntry")))return;if(t)return(0,b.db)(r.get("name"));setTimeout((async()=>(await n(r,o),this.deleteBackup(),(0,b.db)(r.get("name")))),0)})),ss(this,"handleDeleteUnpublishedChanges",(async()=>{const{entryDraft:e,collection:t,slug:r,deleteUnpublishedEntry:n,loadEntry:o,isModification:i,t:a}=this.props;e.get("hasChanged")&&!window.confirm(a("editor.editor.onDeleteUnpublishedChangesWithUnsavedChanges"))||window.confirm(a("editor.editor.onDeleteUnpublishedChanges"))&&(await n(t.get("name"),r),this.deleteBackup(),i?o(t,r):(0,b.db)(t.get("name")))}))}componentDidMount(){const{newEntry:e,collection:t,slug:r,loadEntry:n,createEmptyDraft:o,loadEntries:i,retrieveLocalBackup:a,collectionEntriesLoaded:s,t:l}=this.props;a(t,r),e?o(t,this.props.location.search):n(t,r);const c=l("editor.editor.onLeavePage");this.exitBlocker=e=>{if(this.props.entryDraft.get("hasChanged"))return e.returnValue=c,c},window.addEventListener("beforeunload",this.exitBlocker);const u=b.m8.block(((e,r)=>{const n=this.props.entryDraft.getIn(["entry","isPersisting"]),o=this.props.entryDraft.getIn(["entry","newRecord"]),i=`/collections/${t.get("name")}/new`;if(!n||!o||this.props.location.pathname!==i||"PUSH"!==r)return this.props.hasChanged?c:void 0}));this.unlisten=b.m8.listen(((e,r)=>{const n=`/collections/${t.get("name")}/new`,o=`/collections/${t.get("name")}/entries/`,{pathname:i}=e;i.startsWith(n)||i.startsWith(o)&&"PUSH"===r||(this.deleteBackup(),u(),this.unlisten())})),s||i(t)}componentDidUpdate(e){if(!e.localBackup&&this.props.localBackup&&(window.confirm(this.props.t("editor.editor.confirmLoadBackup"))?this.props.loadLocalBackup():this.deleteBackup()),this.props.hasChanged&&this.createBackup(this.props.entryDraft.get("entry"),this.props.collection),e.entry===this.props.entry)return;const{newEntry:t,collection:r}=this.props;t&&e.createEmptyDraft(r,this.props.location.search)}componentWillUnmount(){this.createBackup.flush(),this.props.discardDraft(),window.removeEventListener("beforeunload",this.exitBlocker)}deleteBackup(){const{deleteLocalBackup:e,collection:t,slug:r,newEntry:n}=this.props;this.createBackup.cancel(),e(t,!n&&r)}render(){const{entry:e,entryDraft:t,fields:r,collection:n,changeDraftFieldValidation:o,user:i,hasChanged:a,displayUrl:s,hasWorkflow:l,useOpenAuthoring:c,unpublishedEntry:u,newEntry:f,isModification:p,currentStatus:d,logoutUser:h,deployPreview:g,loadDeployPreview:y,draftKey:v,slug:b,t:w,editorBackLink:S}=this.props,x=!f&&!u;return e&&e.get("error")?(0,D.jsx)("div",null,(0,D.jsx)("h3",null,e.get("error"))):null==t||void 0===t.get("entry")||e&&e.get("isFetching")?(0,D.jsx)(m.Loader,{active:!0},w("editor.editor.loadingEntry")):(0,D.jsx)(ts,{draftKey:v,entry:t.get("entry"),collection:n,fields:r,fieldsMetaData:t.get("fieldsMetaData"),fieldsErrors:t.get("fieldsErrors"),onChange:this.handleChangeDraftField,onValidate:o,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:i,hasChanged:a,displayUrl:s,hasWorkflow:l,useOpenAuthoring:c,hasUnpublishedChanges:u,isNewEntry:f,isModification:p,currentStatus:d,onLogoutClick:h,deployPreview:g,loadDeployPreview:t=>y(n,b,e,x,t),editorBackLink:S,t:w})}}ss(ls,"propTypes",{changeDraftField:i().func.isRequired,changeDraftFieldValidation:i().func.isRequired,collection:f().map.isRequired,createDraftDuplicateFromEntry:i().func.isRequired,createEmptyDraft:i().func.isRequired,discardDraft:i().func.isRequired,entry:f().map,entryDraft:f().map.isRequired,loadEntry:i().func.isRequired,persistEntry:i().func.isRequired,deleteEntry:i().func.isRequired,showDelete:i().bool.isRequired,fields:f().list.isRequired,slug:i().string,newEntry:i().bool.isRequired,displayUrl:i().string,hasWorkflow:i().bool,useOpenAuthoring:i().bool,unpublishedEntry:i().bool,isModification:i().bool,collectionEntriesLoaded:i().bool,updateUnpublishedEntryStatus:i().func.isRequired,publishUnpublishedEntry:i().func.isRequired,deleteUnpublishedEntry:i().func.isRequired,logoutUser:i().func.isRequired,loadEntries:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,currentStatus:i().string,user:i().object,location:i().shape({pathname:i().string,search:i().string}),hasChanged:i().bool,t:i().func.isRequired,retrieveLocalBackup:i().func.isRequired,localBackup:f().map,loadLocalBackup:i().func,persistLocalBackup:i().func.isRequired,deleteLocalBackup:i().func});const cs={changeDraftField:Lr.tw,changeDraftFieldValidation:Lr.QM,loadEntry:Lr.KS,loadEntries:Lr.Jw,loadDeployPreview:Do.ed,loadLocalBackup:Lr.SG,retrieveLocalBackup:Lr.RO,persistLocalBackup:Lr.q9,deleteLocalBackup:Lr.$G,createDraftDuplicateFromEntry:Lr.ED,createEmptyDraft:Lr.lK,discardDraft:Lr.vQ,persistEntry:Lr.G4,deleteEntry:Lr.pO,updateUnpublishedEntryStatus:Zn.JY,publishUnpublishedEntry:Zn.Ts,unpublishPublishedEntry:Zn.SX,deleteUnpublishedEntry:Zn.Ty,logoutUser:y.TX},us=(0,p.$j)((function(e,t){const{collections:r,entryDraft:n,auth:o,config:i,entries:a,globalUI:s}=e,l=t.match.params[0],c=r.get(t.match.params.name),u=c.get("name"),f=!0===t.newRecord,p=(0,rr.LY)(c,l),d=f?null:(0,bn.WK)(e,u,l),h=o.user,g=n.get("hasChanged"),m=i.display_url,y=i.publish_mode===Ct.S0,v=s.useOpenAuthoring,b=n.getIn(["entry","isModification"]),w=!!a.getIn(["pages",u]),S=(0,bn.Js)(e,u,l),x=(0,bn.WK)(e,u,l),_=S&&S.get("status"),O=(0,bn.Cz)(e,u,l),E=n.get("localBackup"),k=n.get("key");let C=`/collections/${u}`;if("workflow"===new URLSearchParams(t.location.search).get("ref")&&(C="/workflow"),c.has("nested")&&l){const e=l.split("/");e.length>2&&(C=`${C}/filter/${e.slice(0,-2).join("/")}`)}return{collection:c,collections:r,newEntry:f,entryDraft:n,fields:p,slug:l,entry:d,user:h,hasChanged:g,displayUrl:m,hasWorkflow:y,useOpenAuthoring:v,isModification:b,collectionEntriesLoaded:w,currentStatus:_,deployPreview:O,localBackup:E,draftKey:k,publishedEntry:x,unPublishedEntry:S,editorBackLink:C}}),cs)(function(e){return(0,p.$j)(is,null,as)(class extends s().Component{render(){return(0,D.jsx)(e,this.props)}})}((0,c.Iu)()(ls))),fs=(0,n.Z)("div",{target:"ew40z3q0",label:"NotFoundContainer"})("margin:",m.lengths.pageMargin,";");function ps({t:e}){return(0,D.jsx)(fs,null,(0,D.jsx)("h2",null,e("app.notFoundPage.header")))}ps.propTypes={t:i().func.isRequired};const ds=(0,c.Iu)()(ps);var hs=r(92699);function gs(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(this,arguments)}const ys={buttonActive:(0,D.css)("color:",m.colors.active,";;label:buttonActive;")};function vs(e){return(0,D.jsx)("header",ms({css:(0,D.css)(m.shadows.dropMain,";position:sticky;width:100%;top:0;background-color:",m.colors.foreground,";z-index:",m.zIndex.zIndex300,";height:",m.lengths.topBarHeight,";;label:AppHeader;")},e))}const bs=(0,n.Z)("div",{target:"e1rbzf6g0",label:"AppHeaderContent"})({name:"oh6t3a",styles:"display:flex;justify-content:space-between;min-width:800px;max-width:1440px;padding:0 12px;margin:0 auto;"}),ws=(0,n.Z)("button",{target:"e1rbzf6g1",label:"AppHeaderButton"})(m.buttons.button,";background:none;color:#7b8290;font-family:inherit;font-size:16px;font-weight:500;display:inline-flex;padding:16px 20px;align-items:center;",m.Icon,"{margin-right:4px;color:#b3b9c4;}&:hover,&:active,&:focus{",ys.buttonActive,";",m.Icon,"{",ys.buttonActive,";}}",(e=>(0,D.css)("&.",e.activeClassName,"{",ys.buttonActive,";",m.Icon,"{",ys.buttonActive,";}};label:AppHeaderButton;")),";"),Ss=ws.withComponent(Ft,{target:"e1rbzf6g5",label:"AppHeaderNavLink"}),xs=(0,n.Z)("div",{target:"e1rbzf6g2",label:"AppHeaderActions"})({name:"18biwo",styles:"display:inline-flex;align-items:center;"}),_s=(0,n.Z)(m.StyledDropdownButton,{target:"e1rbzf6g3",label:"AppHeaderQuickNewButton"})(m.buttons.button,";",m.buttons.medium,";",m.buttons.gray,";margin-right:8px;&:after{top:11px;}"),Os=(0,n.Z)("ul",{target:"e1rbzf6g4",label:"AppHeaderNavList"})({name:"lsxu3a",styles:"display:flex;margin:0;list-style:none;"});class Es extends s().Component{constructor(...e){super(...e),gs(this,"intervalId",void 0),gs(this,"handleCreatePostClick",(e=>{const{onCreateEntryClick:t}=this.props;t&&t(e)}))}componentDidMount(){this.intervalId=setInterval((()=>{this.props.checkBackendStatus()}),3e5)}componentWillUnmount(){clearInterval(this.intervalId)}render(){const{user:e,collections:t,onLogoutClick:r,openMediaLibrary:n,hasWorkflow:o,displayUrl:i,isTestRepo:a,t:s,showMediaButton:l}=this.props,c=t.filter((e=>e.get("create"))).toList();return(0,D.jsx)(vs,null,(0,D.jsx)(bs,null,(0,D.jsx)("nav",null,(0,D.jsx)(Os,null,(0,D.jsx)("li",null,(0,D.jsx)(Ss,{to:"/",activeClassName:"header-link-active",isActive:(e,t)=>t.pathname.startsWith("/collections/")},(0,D.jsx)(m.Icon,{type:"page"}),s("app.header.content"))),o&&(0,D.jsx)("li",null,(0,D.jsx)(Ss,{to:"/workflow",activeClassName:"header-link-active"},(0,D.jsx)(m.Icon,{type:"workflow"}),s("app.header.workflow"))),l&&(0,D.jsx)("li",null,(0,D.jsx)(ws,{onClick:n},(0,D.jsx)(m.Icon,{type:"media-alt"}),s("app.header.media"))))),(0,D.jsx)(xs,null,c.size>0&&(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(_s,null," ",s("app.header.quickAdd")),dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},c.map((e=>(0,D.jsx)(m.DropdownItem,{key:e.get("name"),label:e.get("label_singular")||e.get("label"),onClick:()=>this.handleCreatePostClick(e.get("name"))})))),(0,D.jsx)(I.Xp,{displayUrl:i,isTestRepo:a,imageUrl:null==e?void 0:e.avatar_url,onLogoutClick:r}))))}}gs(Es,"propTypes",{user:i().object.isRequired,collections:f().map.isRequired,onCreateEntryClick:i().func.isRequired,onLogoutClick:i().func.isRequired,openMediaLibrary:i().func.isRequired,hasWorkflow:i().bool.isRequired,displayUrl:i().string,isTestRepo:i().bool,t:i().func.isRequired,checkBackendStatus:i().func.isRequired});const ks={checkBackendStatus:hs.oj},Cs=(0,p.$j)(null,ks)((0,c.Iu)()(Es));e=r.hmd(e);const Ts=["collections","render"];function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}g().config({barColors:{0:m.colors.active,"1.0":m.colors.active},shadowBlur:0,barThickness:2});const js=(0,n.Z)("div",{target:"eh2m33j0",label:"AppMainContainer"})({name:"123tny7",styles:"min-width:800px;max-width:1440px;margin:0 auto;"}),Rs=(0,n.Z)("div",{target:"eh2m33j1",label:"ErrorContainer"})({name:"zwiamn",styles:"margin:20px;"}),As=(0,n.Z)("pre",{target:"eh2m33j2",label:"ErrorCodeBlock"})({name:"1v6y79z",styles:"margin-left:20px;font-size:15px;line-height:1.5;"});function Ms(e){const t=e.filter((e=>!0!==e.get("hide"))).first();if(t)return`/collections/${t.get("name")}`;throw new Error("Could not find a non hidden collection")}function Is(e){let{collections:t,render:r}=e,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Ts);const o=Ms(t);return(0,D.jsx)(d.AW,Ps({},n,{render:e=>t.get(e.match.params.name)?r(e):(0,D.jsx)(d.l_,{to:o})}))}class Ds extends s().Component{configError(e){const t=this.props.t;return(0,D.jsx)(Rs,null,(0,D.jsx)("h1",null,t("app.app.errorHeader")),(0,D.jsx)("div",null,(0,D.jsx)("strong",null,t("app.app.configErrors"),":"),(0,D.jsx)(As,null,e.error),(0,D.jsx)("span",null,t("app.app.checkConfigYml"))))}handleLogin(e){this.props.loginUser(e)}authenticating(){const{auth:e,t}=this.props,r=(0,v.Rg)(this.props.config);return null==r?(0,D.jsx)("div",null,(0,D.jsx)("h1",null,t("app.app.waitingBackend"))):(0,D.jsx)("div",null,(0,D.jsx)(I.Tx,null),s().createElement(r.authComponent(),{onLogin:this.handleLogin.bind(this),error:e.error,inProgress:e.isFetching,siteId:this.props.config.backend.site_domain,base_url:this.props.config.backend.base_url,authEndpoint:this.props.config.backend.auth_endpoint,config:this.props.config,clearHash:()=>b.m8.replace("/"),t}))}handleLinkClick(e,t,...r){e.preventDefault(),t(...r)}render(){const{user:e,config:t,collections:r,logoutUser:n,isFetching:o,publishMode:i,useMediaLibrary:a,openMediaLibrary:l,t:c,showMediaButton:u}=this.props;if(null===t)return null;if(t.error)return this.configError(t);if(t.isFetching)return(0,D.jsx)(m.Loader,{active:!0},c("app.app.loadingConfig"));if(null==e)return this.authenticating(c);const f=Ms(r),p=i===Ct.S0;return(0,D.jsx)(s().Fragment,null,(0,D.jsx)(I.Tx,null),(0,D.jsx)(Cs,{user:e,collections:r,onCreateEntryClick:S,onLogoutClick:n,openMediaLibrary:l,hasWorkflow:p,displayUrl:t.display_url,isTestRepo:"test-repo"===t.backend.name,showMediaButton:u}),(0,D.jsx)(js,null,o&&(0,D.jsx)(g(),null),(0,D.jsx)(d.rs,null,(0,D.jsx)(d.l_,{exact:!0,from:"/",to:f}),(0,D.jsx)(d.l_,{exact:!0,from:"/search/",to:f}),(0,D.jsx)(Is,{exact:!0,collections:r,path:"/collections/:name/search/",render:({match:e})=>(0,D.jsx)(d.l_,{to:`/collections/${e.params.name}`})}),(0,D.jsx)(d.l_,{from:"/error=access_denied&error_description=Signups+not+allowed+for+this+instance",to:f}),p?(0,D.jsx)(d.AW,{path:"/workflow",component:Ao}):null,(0,D.jsx)(Is,{exact:!0,collections:r,path:"/collections/:name",render:e=>(0,D.jsx)(Gn,e)}),(0,D.jsx)(Is,{path:"/collections/:name/new",collections:r,render:e=>(0,D.jsx)(us,Ps({},e,{newRecord:!0}))}),(0,D.jsx)(Is,{path:"/collections/:name/entries/*",collections:r,render:e=>(0,D.jsx)(us,e)}),(0,D.jsx)(Is,{path:"/collections/:name/search/:searchTerm",collections:r,render:e=>(0,D.jsx)(Gn,Ps({},e,{isSearchResults:!0,isSingleSearchResult:!0}))}),(0,D.jsx)(Is,{collections:r,path:"/collections/:name/filter/:filterTerm*",render:e=>(0,D.jsx)(Gn,e)}),(0,D.jsx)(d.AW,{path:"/search/:searchTerm",render:e=>(0,D.jsx)(Gn,Ps({},e,{isSearchResults:!0}))}),(0,D.jsx)(Is,{path:"/edit/:name/:entryName",collections:r,render:({match:e})=>{const{name:t,entryName:r}=e.params;return(0,D.jsx)(d.l_,{to:`/collections/${t}/entries/${r}`})}}),(0,D.jsx)(d.AW,{component:ds})),a?(0,D.jsx)(kt,null):null))}}!function(e,t,r){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(Ds,"propTypes",{auth:i().object.isRequired,config:i().object.isRequired,collections:f().map.isRequired,loginUser:i().func.isRequired,logoutUser:i().func.isRequired,user:i().object,isFetching:i().bool.isRequired,publishMode:i().oneOf([Ct.pt,Ct.S0]),siteId:i().string,useMediaLibrary:i().bool,openMediaLibrary:i().func.isRequired,showMediaButton:i().bool,t:i().func.isRequired});const Ls={openMediaLibrary:x.UN,loginUser:y.pH,logoutUser:y.TX},Ns=(0,l.wU)(e)((0,p.$j)((function(e){const{auth:t,config:r,collections:n,globalUI:o,mediaLibrary:i}=e,a=t.user,s=o.isFetching,l=r.publish_mode,c=!i.get("externalLibrary");return{auth:t,config:r,collections:n,user:a,isFetching:s,publishMode:l,showMediaButton:i.get("showMediaButton"),useMediaLibrary:c}}),Ls)((0,c.Iu)()(Ds)))},64682:(e,t,r)=>{"use strict";r.d(t,{Ej:()=>yr,GR:()=>vr,SV:()=>zr,KH:()=>Wr,XK:()=>br,u_:()=>Yr,Tx:()=>$n,Xp:()=>Gn});var n={};function o(e){var t=null;return function(){return null==t&&(t=e()),t}}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(n),r.d(n,{FILE:()=>y,HTML:()=>w,TEXT:()=>b,URL:()=>v});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"entered",[]),a(this,"isNodeInDocument",void 0),this.isNodeInDocument=t}var t,r;return t=e,(r=[{key:"enter",value:function(e){var t=this,r=this.entered.length;return this.entered=function(e,t){var r=new Set,n=function(e){return r.add(e)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e){return o.push(e)})),o}(this.entered.filter((function(r){return t.isNodeInDocument(r)&&(!r.contains||r.contains(e))})),[e]),0===r&&this.entered.length>0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&i(t.prototype,r),e}(),l=o((function(){return/firefox/i.test(navigator.userAgent)})),c=o((function(){return Boolean(window.safari)}));function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,"xs",void 0),f(this,"ys",void 0),f(this,"c1s",void 0),f(this,"c2s",void 0),f(this,"c3s",void 0);for(var n=t.length,o=[],i=0;i<n;i++)o.push(i);o.sort((function(e,r){return t[e]<t[r]?-1:1}));for(var a,s,l=[],c=[],u=[],p=0;p<n-1;p++)a=t[p+1]-t[p],s=r[p+1]-r[p],c.push(a),l.push(s),u.push(s/a);for(var d=[u[0]],h=0;h<c.length-1;h++){var g=u[h],m=u[h+1];if(g*m<=0)d.push(0);else{a=c[h];var y=c[h+1],v=a+y;d.push(3*v/((v+y)/g+(v+a)/m))}}d.push(u[u.length-1]);for(var b,w=[],S=[],x=0;x<d.length-1;x++){b=u[x];var _=d[x],O=1/c[x],E=_+d[x+1]-b-b;w.push((b-_-E)*O),S.push(E*O*O)}this.xs=t,this.ys=r,this.c1s=d,this.c2s=w,this.c3s=S}var t,r;return t=e,(r=[{key:"interpolate",value:function(e){var t=this.xs,r=this.ys,n=this.c1s,o=this.c2s,i=this.c3s,a=t.length-1;if(e===t[a])return r[a];for(var s,l=0,c=i.length-1;l<=c;){var u=t[s=Math.floor(.5*(l+c))];if(u<e)l=s+1;else{if(!(u>e))return r[s];c=s-1}}var f=e-t[a=Math.max(0,c)],p=f*f;return r[a]+n[a]*f+o[a]*p+i[a]*f*p}}])&&u(t.prototype,r),e}(),d=1;function h(e){var t=e.nodeType===d?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function g(e){return{x:e.clientX,y:e.clientY}}var m,y="__NATIVE_FILE__",v="__NATIVE_URL__",b="__NATIVE_TEXT__",w="__NATIVE_HTML__";function S(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _=(x(m={},y,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),x(m,w,{exposeProperties:{html:function(e,t){return S(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),x(m,v,{exposeProperties:{urls:function(e,t){return S(e,t,"").split("\n")},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),x(m,b,{exposeProperties:{text:function(e,t){return S(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),m);function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),E(this,"item",void 0),E(this,"config",void 0),this.config=t,this.item={},this.initializeExposedProperties()}var t,r;return t=e,(r=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var r={};Object.keys(this.config.exposeProperties).forEach((function(n){r[n]={value:t.config.exposeProperties[n](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,r)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&O(t.prototype,r),e}();function C(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(_).filter((function(e){return _[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var j=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"ownerDocument",null),P(this,"globalContext",void 0),P(this,"optionsArgs",void 0),this.globalContext=t,this.optionsArgs=r}var t,r;return t=e,(r=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.globalContext)&&void 0!==e&&e.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}}])&&T(t.prototype,r),e}();function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){I(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),I(this,"options",void 0),I(this,"actions",void 0),I(this,"monitor",void 0),I(this,"registry",void 0),I(this,"enterLeaveCounter",void 0),I(this,"sourcePreviewNodes",new Map),I(this,"sourcePreviewNodeOptions",new Map),I(this,"sourceNodes",new Map),I(this,"sourceNodeOptions",new Map),I(this,"dragStartSourceIds",null),I(this,"dropTargetIds",[]),I(this,"dragEnterTargetIds",[]),I(this,"currentNativeSource",null),I(this,"currentNativeHandle",null),I(this,"currentDragSourceNode",null),I(this,"altKeyPressed",!1),I(this,"mouseMoveTimeoutTimer",null),I(this,"asyncEndDragFrameId",null),I(this,"dragOverTargetIds",null),I(this,"lastClientOffset",null),I(this,"hoverRafId",null),I(this,"getSourceClientOffset",(function(e){var t=o.sourceNodes.get(e);return t&&h(t)||null})),I(this,"endDragNativeItem",(function(){o.isDraggingNativeItem()&&(o.actions.endDrag(),o.currentNativeHandle&&o.registry.removeSource(o.currentNativeHandle),o.currentNativeHandle=null,o.currentNativeSource=null)})),I(this,"isNodeInDocument",(function(e){return Boolean(e&&o.document&&o.document.body&&o.document.body.contains(e))})),I(this,"endDragIfSourceWasRemovedFromDOM",(function(){var e=o.currentDragSourceNode;null==e||o.isNodeInDocument(e)||o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleTopDragStartCapture",(function(){o.clearCurrentDragSourceNode(),o.dragStartSourceIds=[]})),I(this,"handleTopDragStart",(function(e){if(!e.defaultPrevented){var t=o.dragStartSourceIds;o.dragStartSourceIds=null;var r=g(e);o.monitor.isDragging()&&o.actions.endDrag(),o.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:o.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,i=C(n);if(o.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){var a=o.monitor.getSourceId(),s=o.sourceNodes.get(a),u=o.sourcePreviewNodes.get(a)||s;if(u){var f=o.getCurrentSourcePreviewNodeOptions(),d=function(e,t,r,n,o){var i,a,s="IMG"===(i=t).nodeName&&(l()||!(null!==(a=document.documentElement)&&void 0!==a&&a.contains(i))),u=h(s?e:t),f={x:r.x-u.x,y:r.y-u.y},d=e.offsetWidth,g=e.offsetHeight,m=n.anchorX,y=n.anchorY,v=function(e,t,r,n){var o=e?t.width:r,i=e?t.height:n;return c()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(s,t,d,g),b=v.dragPreviewWidth,w=v.dragPreviewHeight,S=o.offsetX,x=o.offsetY,_=0===x||x;return{x:0===S||S?S:new p([0,.5,1],[f.x,f.x/d*b,f.x+b-d]).interpolate(m),y:_?x:function(){var e=new p([0,.5,1],[f.y,f.y/g*w,f.y+w-g]).interpolate(y);return c()&&s&&(e+=(window.devicePixelRatio-1)*w),e}()}}(s,u,r,{anchorX:f.anchorX,anchorY:f.anchorY},{offsetX:f.offsetX,offsetY:f.offsetY});n.setDragImage(u,d.x,d.y)}}try{null==n||n.setData("application/json",{})}catch(e){}o.setCurrentDragSourceNode(e.target),o.getCurrentSourcePreviewNodeOptions().captureDraggingState?o.actions.publishDragSource():setTimeout((function(){return o.actions.publishDragSource()}),0)}else if(i)o.beginDragNativeItem(i);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}})),I(this,"handleTopDragEndCapture",(function(){o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleTopDragEnterCapture",(function(e){if(o.dragEnterTargetIds=[],o.enterLeaveCounter.enter(e.target)&&!o.monitor.isDragging()){var t=e.dataTransfer,r=C(t);r&&o.beginDragNativeItem(r,t)}})),I(this,"handleTopDragEnter",(function(e){var t=o.dragEnterTargetIds;o.dragEnterTargetIds=[],o.monitor.isDragging()&&(o.altKeyPressed=e.altKey,t.length>0&&o.actions.hover(t,{clientOffset:g(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))})),I(this,"handleTopDragOverCapture",(function(){o.dragOverTargetIds=[]})),I(this,"handleTopDragOver",(function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.lastClientOffset=g(e),null===o.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(o.hoverRafId=requestAnimationFrame((function(){o.monitor.isDragging()&&o.actions.hover(t||[],{clientOffset:o.lastClientOffset}),o.hoverRafId=null}))),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))})),I(this,"handleTopDragLeaveCapture",(function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)})),I(this,"handleTopDropCapture",(function(e){var t;o.dropTargetIds=[],o.isDraggingNativeItem()?(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):C(e.dataTransfer)&&e.preventDefault(),o.enterLeaveCounter.reset()})),I(this,"handleTopDrop",(function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:g(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleSelectStart",(function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))})),this.options=new j(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new s(this.isNodeInDocument)}var t,r;return t=e,(r=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var o=function(t){return n.handleDragStart(t,e)},i=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},o=function(t){return r.handleDragOver(t,e)},i=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return A({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return A({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(n).some((function(t){return n[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new k(_[e]);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&M(t.prototype,r),e}(),L=function(e,t,r){return new D(e,t,r)};function N(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return n[a++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}function $(e,t,r){var n=r.getRegistry(),o=n.addTarget(e,t);return[o,function(){return n.removeTarget(o)}]}function F(e,t,r){var n=r.getRegistry(),o=n.addSource(e,t);return[o,function(){return n.removeSource(o)}]}var B=r(12244),U=r.n(B);function z(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var o=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,B.isValidElement)(t)){var n=t;return e(n,r),n}var o=t;!function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}(o);var i=r?function(t){return e(t,r)}:e;return function(e,t){var r=e.ref;return N("string"!=typeof r,"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 <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,B.cloneElement)(e,{ref:function(e){W(r,e),W(t,e)}}):(0,B.cloneElement)(e,{ref:t})}(o,i)}}(n);t[r]=function(){return o}}})),t}function W(e,t){"function"==typeof e?e(t):e.current=t}function q(e){return q="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},q(e)}function H(e){return null!==e&&"object"===q(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function V(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],f=t[c];if(!1===(o=r?r.call(n,u,f,c):void 0)||void 0===o&&u!==f)return!1}return!0}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),G(this,"hooks",z({dragSource:function(e,t){r.clearDragSource(),r.dragSourceOptions=t||null,H(e)?r.dragSourceRef=e:r.dragSourceNode=e,r.reconnectDragSource()},dragPreview:function(e,t){r.clearDragPreview(),r.dragPreviewOptions=t||null,H(e)?r.dragPreviewRef=e:r.dragPreviewNode=e,r.reconnectDragPreview()}})),G(this,"handlerId",null),G(this,"dragSourceRef",null),G(this,"dragSourceNode",void 0),G(this,"dragSourceOptionsInternal",null),G(this,"dragSourceUnsubscribe",void 0),G(this,"dragPreviewRef",null),G(this,"dragPreviewNode",void 0),G(this,"dragPreviewOptionsInternal",null),G(this,"dragPreviewUnsubscribe",void 0),G(this,"lastConnectedHandlerId",null),G(this,"lastConnectedDragSource",null),G(this,"lastConnectedDragSourceOptions",null),G(this,"lastConnectedDragPreview",null),G(this,"lastConnectedDragPreviewOptions",null),G(this,"backend",void 0),this.backend=t}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();t&&this.disconnectDragPreview(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!V(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!V(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}])&&K(t.prototype,r),e}();function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function J(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=!1,X=!1,ee=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,"internalMonitor",void 0),J(this,"sourceId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){N(!Q,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Q=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Q=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;N(!X,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return X=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{X=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&Y(t.prototype,r),e}();function te(e){return te="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},te(e)}function re(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function ne(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){var t;return"Symbol(react.forward_ref)"===(null==e||null===(t=e.$$typeof)||void 0===t?void 0:t.toString())}(e);var t}function oe(e){return"function"==typeof e}function ie(){}function ae(e){if(!function(e){return"object"===te(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 se(e,t){return"string"==typeof e||"symbol"===te(e)||!!t&&Array.isArray(e)&&e.every((function(e){return se(e,!1)}))}var le=r(52322),ce=(0,B.createContext)({dragDropManager:void 0});function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pe(e,t,r){return t&&fe(e.prototype,t),r&&fe(e,r),e}function de(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var he=function(){function e(t){ue(this,e),de(this,"isDisposed",!1),de(this,"action",void 0),this.action=oe(t)?t:ie}return pe(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return Boolean(e&&oe(e.dispose))}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();de(he,"empty",{dispose:ie});var ge=function(){function e(){ue(this,e),de(this,"isDisposed",!1),de(this,"disposables",void 0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.disposables=r}return pe(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var r=this.disposables.indexOf(e);-1!==r&&(t=!0,this.disposables.splice(r,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}}]),e}(),me=function(){function e(){ue(this,e),de(this,"isDisposed",!1),de(this,"current",void 0)}return pe(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var r=this.current;this.current=e,r&&r.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}(),ye=r(73463),ve=r.n(ye);function be(e){return be="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},be(e)}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xe(e,t){return xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xe(e,t)}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ke(e){var t=e.DecoratedComponent,r=e.createHandler,n=e.createMonitor,o=e.createConnector,i=e.registerHandler,a=e.containerDisplayName,s=e.getType,l=e.collect,c=e.options.arePropsEqual,u=void 0===c?V:c,f=t,p=t.displayName||t.name||"Component",d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}(g,e);var t,a,c,d,h=(c=g,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Oe(c);if(d){var r=Oe(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _e(e)}(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),Ee(_e(t=h.call(this,e)),"decoratedRef",(0,B.createRef)()),Ee(_e(t),"handlerId",void 0),Ee(_e(t),"manager",void 0),Ee(_e(t),"handlerMonitor",void 0),Ee(_e(t),"handlerConnector",void 0),Ee(_e(t),"handler",void 0),Ee(_e(t),"disposable",void 0),Ee(_e(t),"currentType",void 0),Ee(_e(t),"handleChange",(function(){var e=t.getCurrentState();V(e,t.state)||t.setState(e)})),t.disposable=new me,t.receiveProps(e),t.dispose(),t}return t=g,(a=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return N(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!u(e,this.props)||!V(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new me,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){u(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(s(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=(a=i(e,this.handler,this.manager),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?we(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],n=t[1];this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new ge(new he(o),new he(n)))}var a,s}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?l(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return(0,le.jsx)(ce.Consumer,{children:function(t){var r=t.dragDropManager;return e.receiveDragDropManager(r),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){var t;return null===(t=e.handlerConnector)||void 0===t?void 0:t.reconnect()})),(0,le.jsx)(f,Object.assign({},e.props,e.getCurrentState(),{ref:ne(f)?e.decoratedRef:null}),void 0)}},void 0)}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(N(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",p,p),void 0!==e&&(this.manager=e,this.handlerMonitor=n(e),this.handlerConnector=o(e.getBackend()),this.handler=r(this.handlerMonitor,this.decoratedRef)))}}])&&Se(t.prototype,a),g}(B.Component);return Ee(d,"DecoratedComponent",t),Ee(d,"displayName","".concat(a,"(").concat(p,")")),ve()(d,t)}function Ce(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pe=["canDrag","beginDrag","isDragging","endDrag"],je=["beginDrag"],Re=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Te(this,"props",null),Te(this,"spec",void 0),Te(this,"monitor",void 0),Te(this,"ref",void 0),Te(this,"beginDrag",(function(){if(o.props)return o.spec.beginDrag(o.props,o.monitor,o.ref.current)})),this.spec=t,this.monitor=r,this.ref=n}var t,r;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,re(this.ref))}}])&&Ce(t.prototype,r),e}();function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ie=!1,De=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Me(this,"internalMonitor",void 0),Me(this,"targetId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;N(!Ie,"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 Ie=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ie=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&Ae(t.prototype,r),e}();function Le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $e=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ne(this,"hooks",z({dropTarget:function(e,t){r.clearDropTarget(),r.dropTargetOptions=t,H(e)?r.dropTargetRef=e:r.dropTargetNode=e,r.reconnect()}})),Ne(this,"handlerId",null),Ne(this,"dropTargetRef",null),Ne(this,"dropTargetNode",void 0),Ne(this,"dropTargetOptionsInternal",null),Ne(this,"unsubscribeDropTarget",void 0),Ne(this,"lastConnectedHandlerId",null),Ne(this,"lastConnectedDropTarget",null),Ne(this,"lastConnectedDropTargetOptions",null),Ne(this,"backend",void 0),this.backend=t}var t,r;return t=e,(r=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value: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)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!V(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}])&&Le(t.prototype,r),e}();function Fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Be(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ue=["canDrop","hover","drop"],ze=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Be(this,"props",null),Be(this,"spec",void 0),Be(this,"monitor",void 0),Be(this,"ref",void 0),this.spec=t,this.monitor=r,this.ref=n}var t,r;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.props&&this.spec.hover(this.props,this.monitor,re(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&Fe(t.prototype,r),e}();var We="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",He="dnd-core/PUBLISH_DRAG_SOURCE",Ve="dnd-core/HOVER",Ke="dnd-core/DROP",Ge="dnd-core/END_DRAG";function Ze(e,t){return{type:We,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Ye(e){return Ye="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},Ye(e)}function Je(e){return"object"===Ye(e)}var Qe={type:We,payload:{clientOffset:null,sourceClientOffset:null}};function Xe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,o=void 0===n||n,i=r.clientOffset,a=r.getSourceClientOffset,s=e.getMonitor(),l=e.getRegistry();e.dispatch(Ze(i)),function(e,t,r){N(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){N(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,s,l);var c=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,s);if(null!==c){var u=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){N("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(c)}e.dispatch(Ze(i,u));var f=l.getSource(c).beginDrag(s,c);if(null!=f){!function(e){N(Je(e),"Item must be an object.")}(f),l.pinSource(c);var p=l.getSourceType(c);return{type:qe,payload:{itemType:p,item:f,sourceId:c,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!o}}}}else e.dispatch(Qe)}}function et(e){return function(){if(e.getMonitor().isDragging())return{type:He}}}function tt(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function rt(e){return function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){N(Array.isArray(e),"Expected targetIds to be an array.")}(t);var n=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,r){N(t.isDragging(),"Cannot call hover while not dragging."),N(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var o=e[n];N(e.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array."),N(r.getTarget(o),"Expected targetIds to be registered.")}}(n,o,i),function(e,t,r){for(var n=e.length-1;n>=0;n--){var o=e[n];tt(t.getTargetType(o),r)||e.splice(n,1)}}(n,i,o.getItemType()),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,o,i),{type:Ve,payload:{targetIds:n,clientOffset:r||null}}}}function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){it(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function at(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();!function(e){N(e.isDragging(),"Cannot call drop while not dragging."),N(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);var o=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);o.forEach((function(o,i){var a=function(e,t,r,n){var o=r.getTarget(e),i=o?o.drop(n,e):void 0;return function(e){N(void 0===e||Je(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:n.getDropResult()),i}(o,i,n,r),s={type:Ke,payload:{dropResult:ot(ot({},t),a)}};e.dispatch(s)}))}}function st(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){N(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:Ge}}}function lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ut=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ct(this,"store",void 0),ct(this,"monitor",void 0),ct(this,"backend",void 0),ct(this,"isSetUp",!1),ct(this,"handleRefCountChange",(function(){var e=n.store.getState().refCount>0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))})),this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:Xe(e),publishDragSource:et(e),hover:rt(e),drop:at(e),endDrag:st(e)}}(this);return Object.keys(r).reduce((function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=i.apply(e,n);void 0!==a&&t(a)}),n}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],r&<(t.prototype,r),e}(),ft=r(74081),pt=function(e,t){return e===t};function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function yt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mt,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case We:case qe:return{initialSourceClientOffset:o.sourceClientOffset,initialClientOffset:o.clientOffset,clientOffset:o.clientOffset};case Ve:return e=r.clientOffset,t=o.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:ht(ht({},r),{},{clientOffset:o.clientOffset});case Ge:case Ke:return mt;default:return r}}var vt="dnd-core/ADD_SOURCE",bt="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",St="dnd-core/REMOVE_TARGET";function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){Ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Et={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function kt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Et,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case qe:return _t(_t({},r),{},{itemType:o.itemType,item:o.item,sourceId:o.sourceId,isSourcePublic:o.isSourcePublic,dropResult:null,didDrop:!1});case He:return _t(_t({},r),{},{isSourcePublic:!0});case Ve:return _t(_t({},r),{},{targetIds:o.targetIds});case St:return-1===r.targetIds.indexOf(o.targetId)?r:_t(_t({},r),{},{targetIds:(e=r.targetIds,t=o.targetId,e.filter((function(e){return e!==t})))});case Ke:return _t(_t({},r),{},{dropResult:o.dropResult,didDrop:!0,targetIds:[]});case Ge:return _t(_t({},r),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function Ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case vt:case bt:return e+1;case wt:case St:return e-1;default:return e}}var Tt=[],Pt=[];function jt(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ve:break;case vt:case bt:case St:case wt:return Tt;default:return Pt}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,o=t.prevTargetIds,i=void 0===o?[]:o,a=function(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e,t){1===e&&o.push(t)})),o}(n,i),s=a.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pt;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(n,i);if(!s)return Tt;var l=i[i.length-1],c=n[n.length-1];return l!==c&&(l&&a.push(l),c&&a.push(c)),a}function Rt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?At(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:jt(r.dirtyHandlerIds,{type:n.type,payload:Mt(Mt({},n.payload),{},{prevTargetIds:(e=r,"dragOperation.targetIds",t=[],"dragOperation.targetIds".split(".").reduce((function(e,r){return e&&e[r]?e[r]:t||null}),e))})}),dragOffset:yt(r.dragOffset,n),refCount:Ct(r.refCount,n),dragOperation:kt(r.dragOperation,n),stateId:Rt(r.stateId)}}function Lt(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Tt.__IS_NONE__=!0,Pt.__IS_ALL__=!0;var Ft,Bt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$t(this,"store",void 0),$t(this,"registry",void 0),this.store=t,this.registry=r}var t,r;return t=e,r=[{key:"subscribeToStateChange",value:function(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0}).handlerIds;N("function"==typeof e,"listener must be a function."),N(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId;return this.store.subscribe((function(){var o=t.store.getState(),i=o.stateId;try{var a=i===n||i===n+1&&!function(e,t){return e!==Tt&&(e===Pt||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}(o.dirtyHandlerIds,r);a||e()}finally{n=i}}))}},{key:"subscribeToOffsetChange",value:function(e){var t=this;N("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return N(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return N(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&tt(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return N(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),n=this.getItemType();if(n&&!tt(r,n))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(e);return t?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset,t&&r&&n?Lt(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,n),r):null;var e,t,r,n}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?Lt(t,r):null;var e,t,r}}],r&&Nt(t.prototype,r),e}(),Ut=0;function zt(e){return zt="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},zt(e)}function Wt(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Wt(e,!1)})):N("string"==typeof e||"symbol"===zt(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Ft||(Ft={}));const qt="undefined"!=typeof global?global:self,Ht=qt.MutationObserver||qt.WebKitMutationObserver;function Vt(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const Kt="function"==typeof Ht?function(e){let t=1;const r=new Ht(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:Vt;class Gt{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Zt=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Kt(this.flush),this.requestErrorThrow=Vt((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Yt=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new Gt(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(Zt.registerPendingError);function Jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function er(e){switch(e[0]){case"S":return Ft.SOURCE;case"T":return Ft.TARGET;default:N(!1,"Cannot parse handler ID: ".concat(e))}}function tr(e,t){var r,n,o=e.entries(),i=!1;do{var a=o.next(),s=a.done;if((r=a.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xt(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]===t)return!0;i=!!s}while(!i);return!1}var rr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qt(this,"types",new Map),Qt(this,"dragSources",new Map),Qt(this,"dropTargets",new Map),Qt(this,"pinnedSourceId",null),Qt(this,"pinnedSource",null),Qt(this,"store",void 0),this.store=t}var t,r;return t=e,r=[{key:"addSource",value:function(e,t){Wt(e),function(e){N("function"==typeof e.canDrag,"Expected canDrag to be a function."),N("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),N("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var r=this.addHandler(Ft.SOURCE,e,t);return this.store.dispatch(function(e){return{type:vt,payload:{sourceId:e}}}(r)),r}},{key:"addTarget",value:function(e,t){Wt(e,!0),function(e){N("function"==typeof e.canDrop,"Expected canDrop to be a function."),N("function"==typeof e.hover,"Expected hover to be a function."),N("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var r=this.addHandler(Ft.TARGET,e,t);return this.store.dispatch(function(e){return{type:bt,payload:{targetId:e}}}(r)),r}},{key:"containsHandler",value:function(e){return tr(this.dragSources,e)||tr(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return N(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return N(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return N(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return N(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return er(e)===Ft.SOURCE}},{key:"isTargetId",value:function(e){return er(e)===Ft.TARGET}},{key:"removeSource",value:function(e){var t,r=this;N(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:wt,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},Zt.enqueueTask(Yt.create(t))}},{key:"removeTarget",value:function(e){N(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:St,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);N(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){N(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(Ut++).toString();switch(e){case Ft.SOURCE:return"S".concat(t);case Ft.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===Ft.SOURCE?this.dragSources.set(n,r):e===Ft.TARGET&&this.dropTargets.set(n,r),n}}],r&&Jt(t.prototype,r),e}();function nr(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,(0,ft.MT)(Dt,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))),a=new Bt(i,new rr(i)),s=new ut(i,a),l=e(s,n,o);return s.receiveBackend(l),s}var or=["children"];function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ar=0,sr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lr=(0,B.memo)((function(e){var t,r,n=e.children,o=function(e){if("manager"in e)return[{dragDropManager:e.manager},!1];var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;return o[sr]||(o[sr]={dragDropManager:nr(e,t,r,n)}),o[sr]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,or)),i=(r=2,function(e){if(Array.isArray(e))return e}(t=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ir(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,B.useEffect)((function(){if(s){var e=cr();return++ar,function(){0==--ar&&(e[sr]=null)}}}),[]),(0,le.jsx)(ce.Provider,Object.assign({value:a},{children:n}),void 0)}));function cr(){return void 0!==r.g?r.g:window}var ur=r(32673),fr=r.n(ur),pr=r(62797);const dr=["namespace"],hr=["children","isDragging","connectDragComponent"],gr=["onDrop","namespace"];function mr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function yr(e){let{namespace:t}=e,r=mr(e,dr);const n=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(N(se(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),N(ae(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var i=function(e){return Object.keys(e).forEach((function(t){N(Pe.indexOf(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',Pe.join(", "),t),N("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])})),je.forEach((function(t){N("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,r){return new Re(e,t,r)}}(t);return N("function"==typeof r,'Expected "collect" provided as the third argument to DragSource 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/drag-source',r),N(ae(n),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',r),function(e){return ke({containerDisplayName:"DragSource",createHandler:i,registerHandler:F,createConnector:function(e){return new Z(e)},createMonitor:function(e){return new ee(e)},DecoratedComponent:e,getType:o,collect:r,options:n})}}(t,{beginDrag(e){let{children:t,isDragging:r,connectDragComponent:n}=e;return mr(e,hr)}},(e=>({connectDragComponent:e.dragSource()})))((({children:e,connectDragComponent:t})=>e(t)));return U().createElement(n,r,r.children)}function vr(e){let{onDrop:t,namespace:r}=e,n=mr(e,gr);const o=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(N(se(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),o=function(){return e}),N(ae(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 i=function(e){return Object.keys(e).forEach((function(t){N(Ue.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',Ue.join(", "),t),N("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,r){return new ze(e,t,r)}}(t);return N("function"==typeof r,'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',r),N(ae(n),'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',r),function(e){return ke({containerDisplayName:"DropTarget",createHandler:i,registerHandler:$,createMonitor:function(e){return new De(e)},createConnector:function(e){return new $e(e)},DecoratedComponent:e,getType:o,collect:r,options:n})}}(r,{drop(e,r){t(r.getItem())}},((e,t)=>({connectDropTarget:e.dropTarget(),isHovered:t.isOver()})))((({children:e,connectDropTarget:t,isHovered:r})=>e(t,{isHovered:r})));return U().createElement(o,n,n.children)}function br(e){return class extends U().Component{render(){return(0,pr.jsx)(lr,{backend:L},(0,pr.jsx)(e,this.props))}}}yr.propTypes={namespace:fr().any.isRequired,children:fr().func.isRequired},vr.propTypes={onDrop:fr().func.isRequired,namespace:fr().any.isRequired,children:fr().func.isRequired};var wr=r(34601),Sr=r(36585),xr=r.n(Sr),_r=r(9316),Or=r(60155),Er=r.n(Or),kr=r(85411),Cr=r(24688),Tr=r(53327),Pr=r(67129);const jr=/\s+at.*[(\s](.*)\)?/,Rr=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Ar=void 0===Pr.homedir?"":Pr.homedir().replace(/\\/g,"/");function Mr(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(jr);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||Rr.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(jr,((e,t)=>e.replace(t,t.replace(Ar,"~"))))),e))).join("\n")}function Ir(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Dr="https://github.com/decaporg/decap-cms/issues/new?";function Lr({title:e,config:t}){try{const r=function({config:e}){let t="";"string"==typeof DECAP_CMS_VERSION?t=`decap-cms@${DECAP_CMS_VERSION}`:"string"==typeof DECAP_CMS_APP_VERSION&&(t=`decap-cms-app@${DECAP_CMS_APP_VERSION}`);const r=function({version:e,provider:t,browser:r,config:n}){return`\n**Describe the bug**\n\n**To Reproduce**\n\n**Expected behavior**\n\n**Screenshots**\n\n**Applicable Versions:**\n - Decap CMS version: \`${e}\`\n - Git provider: \`${t}\`\n - Browser version: \`${r}\`\n\n**CMS configuration**\n\`\`\`\n${n}\n\`\`\`\n\n**Additional context**\n`}({version:t,provider:e.backend.name,browser:navigator.userAgent,config:Er().stringify(e)});return r}({config:t}),n=new URLSearchParams;return n.append("title",xr()(e,{length:100})),n.append("body",xr()(r,{length:4e3,omission:"\n..."})),n.append("labels","type: bug"),`${Dr}${n.toString()}`}catch(e){return console.log(e),`${Dr}template=bug_report.md`}}const Nr=(0,wr.Z)("div",{target:"emw4gx70",label:"ErrorBoundaryContainer"})("padding:40px;h1{font-size:28px;color:",Tr.colors.text,";}h2{font-size:20px;}strong{color:",Tr.colors.textLead,";font-weight:500;}hr{width:200px;margin:30px 0;border:0;height:1px;background-color:",Tr.colors.text,";}a{color:",Tr.colors.active,";}"),$r=(0,wr.Z)("span",{target:"emw4gx71",label:"PrivacyWarning"})("color:",Tr.colors.text,";"),Fr=(0,wr.Z)("button",{target:"emw4gx72",label:"CopyButton"})(Tr.buttons.button,";",Tr.buttons.default,";",Tr.buttons.gray,";display:block;margin:12px 0;");function Br({entry:e,t}){return console.log(e),(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)("hr",null),(0,pr.jsx)("h2",null,t("ui.errorBoundary.recoveredEntry.heading")),(0,pr.jsx)("strong",null,t("ui.errorBoundary.recoveredEntry.warning")),(0,pr.jsx)(Fr,{onClick:()=>(0,kr.Z)(e)},t("ui.errorBoundary.recoveredEntry.copyButtonLabel")),(0,pr.jsx)("pre",null,(0,pr.jsx)("code",null,e)))}class Ur extends U().Component{constructor(...e){super(...e),Ir(this,"state",{hasError:!1,errorMessage:"",errorTitle:"",backup:""})}static getDerivedStateFromError(e){return console.error(e),{hasError:!0,errorMessage:Mr(e.stack,{basePath:window.location.origin||""}),errorTitle: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 Cr.localForage.getItem("backup");e&&console.log(e),this.setState({backup:e})}}render(){const{hasError:e,errorMessage:t,backup:r,errorTitle:n}=this.state,{showBackup:o,t:i}=this.props;return e?(0,pr.jsx)(Nr,null,(0,pr.jsx)("h1",null,i("ui.errorBoundary.title")),(0,pr.jsx)("p",null,(0,pr.jsx)("span",null,i("ui.errorBoundary.details")),(0,pr.jsx)("a",{href:Lr({title:n,config:this.props.config}),target:"_blank",rel:"noopener noreferrer","data-testid":"issue-url"},i("ui.errorBoundary.reportIt"))),(0,pr.jsx)("p",null,i("ui.errorBoundary.privacyWarning").split("\n").map(((e,t)=>(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)($r,{key:t},e),(0,pr.jsx)("br",null))))),(0,pr.jsx)("hr",null),(0,pr.jsx)("h2",null,i("ui.errorBoundary.detailsHeading")),(0,pr.jsx)("p",null,t),r&&o&&(0,pr.jsx)(Br,{entry:r,t:i})):this.props.children}}Ir(Ur,"propTypes",{children:fr().node,t:fr().func.isRequired,config:fr().object.isRequired});const zr=(0,_r.Iu)()(Ur);function Wr({label:e,imagesOnly:t,onChange:r,disabled:n,className:o}){return(0,pr.jsx)("label",{tabIndex:"0",className:`nc-fileUploadButton ${o||""}`},(0,pr.jsx)("span",null,e),(0,pr.jsx)("input",{type:"file",accept:t?"image/*":"*/*",onChange:r,disabled:n}))}Wr.propTypes={className:fr().string,label:fr().string.isRequired,imagesOnly:fr().bool,onChange:fr().func.isRequired,disabled:fr().bool};var qr=r(37149),Hr=r.n(qr),Vr={name:"1o9c9d2-ReactModalGlobalStyles",styles:".ReactModal__Body--open{overflow:hidden;};label:ReactModalGlobalStyles;"};function Kr(){return(0,pr.jsx)(pr.Global,{styles:Vr})}const Gr=`\n ${Tr.shadows.dropDeep};\n background-color: #fff;\n border-radius: ${Tr.lengths.borderRadius};\n height: 80%;\n text-align: center;\n max-width: 2200px;\n padding: 20px;\n\n &:focus {\n outline: none;\n }\n `,Zr=`\n z-index: ${Tr.zIndex.zIndex99999};\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 ${Tr.transitions.main}, opacity ${Tr.transitions.main};\n `;class Yr extends U().Component{componentDidMount(){Hr().setAppElement("#nc-root")}render(){const{isOpen:e,children:t,className:r,onClose:n}=this.props;return(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)(Kr,null),(0,pr.jsx)(pr.ClassNames,null,(({css:o,cx:i})=>(0,pr.jsx)(Hr(),{isOpen:e,onRequestClose:n,closeTimeoutMS:300,className:{base:i(o`
|
|
23
|
+
`,controlComponent:F.control,entry:t,collection:r,config:n,field:o,uniqueFieldId:this.uniqueFieldId,value:e,mediaPaths:s,metadata:q,onChange:(e,t)=>c(o,e,t),onValidate:m&&Dr()(m,this.uniqueFieldId),onOpenMediaLibrary:u,onClearMediaControl:f,onRemoveMediaControl:p,onRemoveInsertedMedia:h,onPersistMedia:g,onAddAsset:d,getAsset:l,hasActiveStyle:k||this.state.styleActive,setActiveStyle:()=>this.setState({styleActive:!0}),setInactiveStyle:()=>this.setState({styleActive:!1}),resolveWidget:fi.EK,widget:F,getEditorComponents:fi.Sq,ref:y&&Dr()(y,o),controlRef:v,editorControl:Pi,query:b,loadEntry:O,queryHits:w[this.uniqueFieldId]||[],clearSearch:x,clearFieldErrors:_,isFetching:S,fieldsErrors:a,onValidateObject:W,isEditorComponent:C,isNewEditorComponent:T,parentIds:P,t:j,validateMetaField:R,isDisabled:A,isFieldDuplicate:I,isFieldHidden:L,locale:N}),U&&(0,D.jsx)(ki,{active:k||this.state.styleActive,error:K},(0,D.jsx)(li(),{remarkPlugins:[ui()],allowedElements:["a","strong","em","del"],unwrapDisallowed:!0,components:{a:e=>{let{node:t}=e,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,vi);return(0,D.jsx)("a",Si({},r,{target:"_blank",rel:"noopener noreferrer",style:{color:"inherit"}}))}}},U)))))}}xi(Ti,"propTypes",{value:i().oneOfType([i().node,i().object,i().string,i().bool]),field:f().map.isRequired,fieldsMetaData:f().map,fieldsErrors:f().map,mediaPaths:f().map.isRequired,boundGetAsset:i().func.isRequired,onChange:i().func.isRequired,openMediaLibrary:i().func.isRequired,addAsset:i().func.isRequired,removeInsertedMedia:i().func.isRequired,persistMedia:i().func.isRequired,onValidate:i().func,processControlRef:i().func,controlRef:i().func,query:i().func.isRequired,queryHits:i().object,isFetching:i().bool,clearSearch:i().func.isRequired,clearFieldErrors:i().func.isRequired,loadEntry:i().func.isRequired,t:i().func.isRequired,isEditorComponent:i().bool,isNewEditorComponent:i().bool,parentIds:i().arrayOf(i().string),entry:f().map.isRequired,collection:f().map.isRequired,isDisabled:i().bool,isHidden:i().bool,isFieldDuplicate:i().func,isFieldHidden:i().func,locale:i().string}),xi(Ti,"defaultProps",{parentIds:[]});const Pi=(0,p.$j)((function(e){const{collections:t,entryDraft:r}=e,n=r.get("entry"),o=t.get(r.getIn(["entry","collection"])),i=(0,Br.B)(e.medias);return{mediaPaths:e.mediaLibrary.get("controlMedia"),isFetching:e.search.isFetching,queryHits:e.search.queryHits,config:e.config,entry:n,collection:o,isLoadingAsset:i,loadEntry:async function(r,n){const o=t.get(r);if(o)return await(0,Lr.T0)(e,o,n);throw new Error(`Can't find collection '${r}'`)},validateMetaField:(t,r,n)=>(0,Lr.f2)(e,o,t,r,n)}}),(function(e){return wi(wi({},(0,ai.DE)({openMediaLibrary:x.UN,clearMediaControl:x.K6,removeMediaControl:x.qb,removeInsertedMedia:x.$E,persistMedia:x.BZ,addAsset:$r.ZJ,query:wn.IO,clearSearch:wn.AQ,clearFieldErrors:Lr.Lf},e)),{},{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)})}),(function(e,t,r){return wi(wi(wi(wi({},e),t),r),{},{boundGetAsset:t.boundGetAsset(e.collection,e.entry)})}))((0,c.Iu)()(Ti)),ji=Pi;var Ri=r(2995);function Ai(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mi=(0,n.Z)("div",{target:"e11hw0lx0",label:"ControlPaneContainer"})({name:"78woh1",styles:"max-width:800px;margin:0 auto;padding-bottom:16px;font-size:16px;"}),Ii=(0,n.Z)(m.StyledDropdownButton,{target:"e11hw0lx1",label:"LocaleButton"})(m.buttons.button,";",m.buttons.medium,";color:",m.colors.controlLabel,";background:",m.colors.textFieldBorder,";height:100%;&:after{top:11px;}"),Di=(0,n.Z)("div",{target:"e11hw0lx2",label:"LocaleButtonWrapper"})({name:"k008qs",styles:"display:flex;"}),Li=(0,n.Z)("div",{target:"e11hw0lx3",label:"LocaleRowWrapper"})({name:"k008qs",styles:"display:flex;"}),Ni=(0,n.Z)(m.Dropdown,{target:"e11hw0lx4",label:"StyledDropdown"})({name:"qq8cu0",styles:"width:max-content;margin-top:20px;margin-bottom:20px;margin-right:20px;"});function $i({locales:e,dropdownText:t,onLocaleChange:r}){return(0,D.jsx)(Ni,{renderButton:()=>(0,D.jsx)(Di,null,(0,D.jsx)(Ii,null,t))},e.map((e=>(0,D.jsx)(m.DropdownItem,{css:(0,D.css)(m.text.fieldLabel,""),key:e,label:e,onClick:()=>r(e)}))))}function Fi({field:e,entry:t,isTranslatable:r,locale:n}){if(e.get("meta"))return t.getIn(["meta",e.get("name")]);if(r){const r=(0,Ri.M8)(n);return t.getIn([...r,e.get("name")])}return t.getIn(["data",e.get("name")])}class Bi extends s().Component{constructor(...e){super(...e),Ai(this,"state",{selectedLocale:this.props.locale}),Ai(this,"componentValidate",{}),Ai(this,"handleLocaleChange",(e=>{this.setState({selectedLocale:e}),this.props.onLocaleChange(e)})),Ai(this,"copyFromOtherLocale",(({targetLocale:e,t})=>r=>{if(!window.confirm(t("editor.editorControlPane.i18n.copyFromLocaleConfirm",{locale:r.toUpperCase()})))return;const{entry:n,collection:o}=this.props,{locales:i,defaultLocale:a}=(0,Ri.Kb)(o),s=this.state.selectedLocale,l=i&&{currentLocale:s,locales:i,defaultLocale:a};this.props.fields.forEach((t=>{if((0,Ri.et)(t,e,r)){const e=Fi({field:t,entry:n,locale:r,isTranslatable:r!==a});e&&this.props.onChange(t,e,void 0,l)}}))})),Ai(this,"validate",(async()=>{this.props.fields.forEach((e=>{"hidden"!==e.get("widget")&&this.componentValidate[e.get("name")]()}))})),Ai(this,"switchToDefaultLocale",(()=>{if((0,Ri.nR)(this.props.collection)){const{defaultLocale:e}=(0,Ri.Kb)(this.props.collection);return new Promise((t=>this.setState({selectedLocale:e},t)))}return Promise.resolve()}))}controlRef(e,t){var r;if(!t)return;const n=e.get("name");this.componentValidate[n]=(null===(r=t.innerWrappedControl)||void 0===r?void 0:r.validate)||t.validate}render(){const{collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,onValidate:a,t:s}=this.props;if(!e||!r)return null;if(0===t.size||!0===t.get("partial"))return null;const{locales:l,defaultLocale:c}=(0,Ri.Kb)(e),u=this.state.selectedLocale,f=l&&{currentLocale:u,locales:l,defaultLocale:c};return(0,D.jsx)(Mi,null,l&&(0,D.jsx)(Li,null,(0,D.jsx)($i,{locales:l,dropdownText:s("editor.editorControlPane.i18n.writingInLocale",{locale:u.toUpperCase()}),onLocaleChange:this.handleLocaleChange}),(0,D.jsx)($i,{locales:l.filter((e=>e!==u)),dropdownText:s("editor.editorControlPane.i18n.copyFromLocale"),onLocaleChange:this.copyFromOtherLocale({targetLocale:u,t:s})})),r.filter((e=>"hidden"!==e.get("widget"))).map(((r,s)=>{const l=(0,Ri.et)(r,u,c),p=(0,Ri.c5)(r,u,c),d=(0,Ri.jg)(r,u,c),h=f?`${u}_${s}`:s;return(0,D.jsx)(ji,{key:h,field:r,value:Fi({field:r,entry:t,locale:u,isTranslatable:l}),fieldsMetaData:n,fieldsErrors:o,onChange:(e,t,r)=>{i(e,t,r,f)},onValidate:a,processControlRef:this.controlRef.bind(this),controlRef:this.controlRef,entry:t,collection:e,isDisabled:p,isHidden:d,isFieldDuplicate:e=>(0,Ri.c5)(e,u,c),isFieldHidden:e=>(0,Ri.jg)(e,u,c),locale:u})})))}}Bi.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,fieldsMetaData:f().map.isRequired,fieldsErrors:f().map.isRequired,onChange:i().func.isRequired,onValidate:i().func.isRequired,locale:i().string};var Ui=r(12693),zi=r(1719),Wi=r(48570);class qi extends s().Component{render(){const{previewComponent:e,previewProps:t}=this.props;return(0,D.jsx)(Ui.Kr,null,(r=>(0,D.jsx)(ni.ScrollSyncPane,{attachTo:r.document.scrollingElement},(0,Wi.isElement)(e)?s().cloneElement(e,t):s().createElement(e,t))))}}qi.propTypes={previewComponent:i().func.isRequired,previewProps:i().object};const Hi=qi,Vi=["previewComponent"];class Ki extends s().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,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Vi);return s().createElement(t,r)}}Ki.propTypes={previewComponent:i().func.isRequired,field:f().map.isRequired,value:i().oneOfType([i().node,i().object,i().string,i().bool])};const Gi=Ki;function Zi(e){return"hidden"!==e.get("widget")}const Yi=(0,n.Z)("div",{target:"e1iji6y40",label:"PreviewContainer"})({name:"1gj2677",styles:"font-family:Roboto,'Helvetica Neue',HelveticaNeue,Helvetica,Arial,sans-serif;"});class Ji extends s().Component{render(){const{collection:e,fields:t,widgetFor:r}=this.props;return e&&t?(0,D.jsx)(Yi,null,t.filter(Zi).map((e=>(0,D.jsx)("div",{key:e.get("name")},r(e.get("name")))))):null}}function Qi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qi(Object(r),!0).forEach((function(t){ea(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ea(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Ji.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,getAsset:i().func.isRequired,widgetFor:i().func.isRequired};const ta=(0,n.Z)(Ui.ZP,{target:"enus48h0",label:"PreviewPaneFrame"})("width:100%;height:100%;border:none;background:#fff;border-radius:",m.lengths.borderRadius,";");class ra extends s().Component{constructor(...e){super(...e),ea(this,"getWidget",((e,t,r,n,o=null)=>{const{getAsset:i,entry:a}=n,s=(0,fi.EK)(e.get("widget")),l=o?e.get("name")+"_"+o:e.get("name"),c=t&&!s.allowMapValue&&M.Map.isMap(t);return s.preview?(0,D.jsx)(Gi,{previewComponent:s.preview,key:l,field:e,getAsset:i,value:c?t.get(e.get("name")):t,entry:a,fieldsMetaData:r,resolveWidget:fi.EK,getRemarkPlugins:fi.MM}):null})),ea(this,"inferedFields",{}),ea(this,"widgetFor",((e,t=this.props.fields,r=this.props.entry.get("data"),n=this.props.fieldsMetaData)=>{let o=t&&t.find((t=>t.get("name")===e)),i=M.Map.isMap(r)&&r.get(o.get("name"));o.get("meta")&&(i=this.props.entry.getIn(["meta",o.get("name")]));const a=o.get("fields"),s=o.get("field"),l=n&&n.get(o.get("name"),(0,M.Map)());a&&(o=o.set("fields",this.getNestedWidgets(a,i,l))),s&&(o=o.set("field",this.getSingleNested(s,i,l)));const c=Object.entries(this.inferedFields).filter((([e])=>(0,rr._M)(this.props.collection,e)===o)).map((([,e])=>e))[0];return c?i=c.defaultPreview(i):i&&-1!==["string","text","number"].indexOf(o.get("widget"))&&i.toString().length<50&&(i=(0,D.jsx)("div",null,(0,D.jsx)("strong",null,o.get("label",o.get("name")),":")," ",i)),i?this.getWidget(o,i,l,this.props):null})),ea(this,"getNestedWidgets",((e,t,r)=>M.List.isList(t)?t.map((t=>this.widgetsForNestedFields(e,t,r))):this.widgetsForNestedFields(e,t,r))),ea(this,"getSingleNested",((e,t,r)=>M.List.isList(t)?t.map(((t,n)=>this.getWidget(e,t,r.get(e.get("name")),this.props,n))):this.getWidget(e,t,r.get(e.get("name")),this.props))),ea(this,"widgetsForNestedFields",((e,t,r)=>e.map((n=>this.widgetFor(n.get("name"),e,t,r))))),ea(this,"widgetsFor",(e=>{const{fields:t,entry:r,fieldsMetaData:n}=this.props,o=t.find((t=>t.get("name")===e)),i=o&&o.get("fields"),a=r.getIn(["data",o.get("name")]),s=n.get(o.get("name"),(0,M.Map)());return M.List.isList(a)?a.map((e=>{const t=i&&(0,M.Map)(i.map(((t,r)=>[t.get("name"),(0,D.jsx)("div",{key:r},this.getWidget(t,e,s.get(t.get("name")),this.props))])));return(0,M.Map)({data:e,widgets:t})})):(0,M.Map)({data:a,widgets:i&&(0,M.Map)(i.map((e=>[e.get("name"),this.getWidget(e,a,s.get(e.get("name")),this.props)])))})}))}inferFields(){const e=(0,rr.GK)(this.props.collection,"title"),t=(0,rr.GK)(this.props.collection,"shortTitle"),r=(0,rr.GK)(this.props.collection,"author");this.inferedFields={},e&&(this.inferedFields[e]=zi.xt.title),t&&(this.inferedFields[t]=zi.xt.shortTitle),r&&(this.inferedFields[r]=zi.xt.author)}render(){const{entry:e,collection:t,config:r}=this.props;if(!e||!e.get("data"))return null;const n=(0,fi.LO)((0,rr.A3)(t,e.get("slug")))||Ji;this.inferFields();const o=Xi(Xi({},this.props),{},{widgetFor:this.widgetFor,widgetsFor:this.widgetsFor}),i=(0,fi.s3)().map(((e,t)=>e.raw?(0,D.jsx)("style",{key:t},e.value):(0,D.jsx)("link",{key:t,href:e.value,type:"text/css",rel:"stylesheet"})));return t||(0,D.jsx)(ta,{id:"preview-pane",head:i}),(0,D.jsx)(I.SV,{config:r},(0,D.jsx)(ta,{id:"preview-pane",head:i,initialContent:'\n<!DOCTYPE html>\n<html>\n <head><base target="_blank"/></head>\n <body><div></div></body>\n</html>\n'},(0,D.jsx)(Ui.Kr,null,(({document:e,window:t})=>(0,D.jsx)(Hi,{previewComponent:n,previewProps:Xi(Xi({},o),{},{document:e,window:t})})))))}}ra.propTypes={collection:f().map.isRequired,fields:f().list.isRequired,entry:f().map.isRequired,fieldsMetaData:f().map.isRequired,getAsset:i().func.isRequired};const na=(0,p.$j)((function(e){return{isLoadingAsset:(0,Br.B)(e.medias),config:e.config}}),(function(e){return{boundGetAsset:(t,r)=>(0,$r.zg)(e,t,r)}}),(function(e,t,r){return Xi(Xi(Xi(Xi({},e),t),r),{},{getAsset:t.boundGetAsset(r.collection,r.entry)})}))(ra);function oa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ia={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,D.css)("height:100%;display:flex;align-items:center;border:0 solid ",m.colors.textFieldBorder,";;label:toolbarSection;"),publishedButton:(0,D.css)("background-color:",m.colorsRaw.tealLight,";color:",m.colorsRaw.tealDark,";;label:publishedButton;")},aa=(0,n.Z)("div",{target:"e1d2l9mo0",label:"TooltipText"})({name:"198q1ye",styles:"visibility:hidden;width:321px;background-color:#555;color:#fff;text-align:unset;border-radius:6px;padding:5px;position:absolute;z-index:1;top:145%;left:50%;margin-left:-320px;opacity:0;transition:opacity 0.3s;"}),sa=(0,n.Z)("div",{target:"e1d2l9mo1",label:"Tooltip"})("position:relative;display:inline-block;&:hover + ",aa,"{visibility:visible;opacity:0.9;}"),la=(0,n.Z)("div",{target:"e1d2l9mo2",label:"TooltipContainer"})({name:"79elbk",styles:"position:relative;"}),ca=(0,n.Z)(m.StyledDropdownButton,{target:"e1d2l9mo3",label:"DropdownButton"})(ia.noOverflow," @media (max-width:1200px){padding-left:10px;}"),ua=(0,n.Z)("div",{target:"e1d2l9mo4",label:"ToolbarContainer"})("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:",m.zIndex.zIndex300,";background-color:#fff;height:66px;display:flex;justify-content:space-between;"),fa=(0,n.Z)("div",{target:"e1d2l9mo5",label:"ToolbarSectionMain"})(ia.toolbarSection,";flex:10;display:flex;justify-content:space-between;padding:0 10px;"),pa=(0,n.Z)("div",{target:"e1d2l9mo6",label:"ToolbarSubSectionFirst"})({name:"70qvj9",styles:"display:flex;align-items:center;"}),da=(0,n.Z)(pa,{target:"e1d2l9mo7",label:"ToolbarSubSectionLast"})({name:"1a9getn",styles:"justify-content:flex-end;"}),ha=(0,n.Z)(Lt,{target:"e1d2l9mo8",label:"ToolbarSectionBackLink"})(ia.toolbarSection,";border-right-width:1px;font-weight:normal;padding:0 20px;&:hover,&:focus{background-color:#f1f2f4;}"),ga=(0,n.Z)("div",{target:"e1d2l9mo9",label:"ToolbarSectionMeta"})(ia.toolbarSection,";border-left-width:1px;padding:0 7px;"),ma=(0,n.Z)(m.Dropdown,{target:"e1d2l9mo10",label:"ToolbarDropdown"})(ia.buttonMargin,";",m.Icon,"{color:",m.colorsRaw.teal,";}"),ya=(0,n.Z)("div",{target:"e1d2l9mo11",label:"BackArrow"})("color:",m.colors.textLead,";font-size:21px;font-weight:600;margin-right:16px;"),va=(0,n.Z)("div",{target:"e1d2l9mo12",label:"BackCollection"})("color:",m.colors.textLead,";font-size:14px;"),ba=(0,n.Z)("div",{target:"e1d2l9mo13",label:"BackStatus"})({name:"19ug521",styles:"margin-top:6px;"}),wa=(0,n.Z)(ba,{target:"e1d2l9mo14",label:"BackStatusUnchanged"})(m.components.textBadgeSuccess,";"),Sa=(0,n.Z)(ba,{target:"e1d2l9mo15",label:"BackStatusChanged"})(m.components.textBadgeDanger,";"),xa=(0,n.Z)("button",{target:"e1d2l9mo16",label:"ToolbarButton"})(m.buttons.button,";",m.buttons.default,";",ia.buttonMargin,";",ia.noOverflow,";display:block;@media (max-width:1200px){padding:0 10px;}"),_a=(0,n.Z)(xa,{target:"e1d2l9mo17",label:"DeleteButton"})(m.buttons.lightRed,";"),Oa=(0,n.Z)(xa,{target:"e1d2l9mo18",label:"SaveButton"})(m.buttons.lightBlue,";&[disabled]{",m.buttons.disabled,";}"),Ea=(0,n.Z)(ca,{target:"e1d2l9mo19",label:"PublishedToolbarButton"})(ia.publishedButton,""),ka=(0,n.Z)(xa,{target:"e1d2l9mo20",label:"PublishedButton"})(ia.publishedButton,""),Ca=(0,n.Z)(ca,{target:"e1d2l9mo21",label:"PublishButton"})("background-color:",m.colorsRaw.teal,";"),Ta=(0,n.Z)(ca,{target:"e1d2l9mo22",label:"StatusButton"})("background-color:",m.colorsRaw.tealLight,";color:",m.colorsRaw.teal,";"),Pa=(0,n.Z)("div",{target:"e1d2l9mo23",label:"PreviewButtonContainer"})("margin-right:12px;color:",m.colorsRaw.blue,";display:flex;align-items:center;a,",m.Icon,"{color:",m.colorsRaw.blue,";}",m.Icon,"{position:relative;top:1px;}"),ja=(0,n.Z)("button",{target:"e1d2l9mo24",label:"RefreshPreviewButton"})("background:none;border:0;cursor:pointer;color:",m.colorsRaw.blue,";span{margin-right:6px;}"),Ra=ja.withComponent("a",{target:"e1d2l9mo27",label:"PreviewLink"}),Aa=(0,n.Z)(m.DropdownItem,{target:"e1d2l9mo25",label:"PublishDropDownItem"})({name:"12k1a1h",styles:"min-width:initial;"}),Ma=(0,n.Z)(m.DropdownItem,{target:"e1d2l9mo26",label:"StatusDropdownItem"})(m.Icon,"{color:",m.colors.infoText,";}");class Ia extends s().Component{constructor(...e){super(...e),oa(this,"renderSimpleControls",(()=>{const{collection:e,hasChanged:t,isNewEntry:r,showDelete:n,onDelete:o,t:i}=this.props,a=e.get("create");return(0,D.jsx)(s().Fragment,null,r||t?this.renderNewEntrySimplePublishControls({canCreate:a}):this.renderExistingEntrySimplePublishControls({canCreate:a}),(0,D.jsx)("div",null,n?(0,D.jsx)(_a,{onClick:o},i("editor.editorToolbar.deleteEntry")):null))})),oa(this,"renderDeployPreviewControls",(e=>{const{deployPreview:t={},loadDeployPreview:r,t:n}=this.props,{url:o,status:i,isFetching:a}=t;if(!i)return;const s="SUCCESS"===i&&!a;return(0,D.jsx)(Pa,null,s?(0,D.jsx)(Ra,{rel:"noopener noreferrer",target:"_blank",href:o},(0,D.jsx)("span",null,e),(0,D.jsx)(m.Icon,{type:"new-tab",size:"xsmall"})):(0,D.jsx)(ja,{onClick:r},(0,D.jsx)("span",null,n("editor.editorToolbar.deployPreviewPendingButtonLabel")),(0,D.jsx)(m.Icon,{type:"refresh",size:"xsmall"})))})),oa(this,"renderStatusInfoTooltip",(()=>{const{t:e,currentStatus:t}=this.props,r={[Ct.i7.get("DRAFT")]:"statusInfoTooltipDraft",[Ct.i7.get("PENDING_REVIEW")]:"statusInfoTooltipInReview"},n=Object.keys(r).find((e=>e===t));return(0,D.jsx)(la,null,(0,D.jsx)(sa,null,(0,D.jsx)(m.Icon,{type:"info-circle",size:"small",className:"tooltip"})),n&&(0,D.jsx)(aa,null,e(`editor.editorToolbar.${r[n]}`)))})),oa(this,"renderWorkflowStatusControls",(()=>{const{isUpdatingStatus:e,onChangeStatus:t,currentStatus:r,t:n,useOpenAuthoring:o}=this.props,i={[Ct.i7.get("DRAFT")]:n("editor.editorToolbar.draft"),[Ct.i7.get("PENDING_REVIEW")]:n("editor.editorToolbar.inReview"),[Ct.i7.get("PENDING_PUBLISH")]:n("editor.editorToolbar.ready")},a=e?n("editor.editorToolbar.updating"):n("editor.editorToolbar.status",{status:i[r]});return(0,D.jsx)(s().Fragment,null,(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"120px",renderButton:()=>(0,D.jsx)(Ta,null,a)},(0,D.jsx)(Ma,{label:n("editor.editorToolbar.draft"),onClick:()=>t("DRAFT"),icon:r===Ct.i7.get("DRAFT")?"check":null}),(0,D.jsx)(Ma,{label:n("editor.editorToolbar.inReview"),onClick:()=>t("PENDING_REVIEW"),icon:r===Ct.i7.get("PENDING_REVIEW")?"check":null}),o?"":(0,D.jsx)(Ma,{label:n("editor.editorToolbar.ready"),onClick:()=>t("PENDING_PUBLISH"),icon:r===Ct.i7.get("PENDING_PUBLISH")?"check":null})),o&&this.renderStatusInfoTooltip())})),oa(this,"renderNewEntryWorkflowPublishControls",(({canCreate:e,canPublish:t})=>{const{isPublishing:r,onPublish:n,onPublishAndNew:o,onPublishAndDuplicate:i,t:a}=this.props;return t?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"200px",renderButton:()=>(0,D.jsx)(Ca,null,a(r?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:n}),e?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:o}),(0,D.jsx)(Aa,{label:a("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:i})):null):""})),oa(this,"renderExistingEntryWorkflowPublishControls",(({canCreate:e,canPublish:t,canDelete:r})=>{const{unPublish:n,onDuplicate:o,isPersisting:i,t:a}=this.props;return t||e?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",key:"td-publish-create",renderButton:()=>(0,D.jsx)(Ea,null,a(i?"editor.editorToolbar.unpublishing":"editor.editorToolbar.published"))},r&&t&&(0,D.jsx)(m.DropdownItem,{label:a("editor.editorToolbar.unpublish"),icon:"arrow",iconDirection:"right",onClick:n}),e&&(0,D.jsx)(m.DropdownItem,{label:a("editor.editorToolbar.duplicate"),icon:"add",onClick:o})):""})),oa(this,"renderExistingEntrySimplePublishControls",(({canCreate:e})=>{const{onDuplicate:t,t:r}=this.props;return e?(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,D.jsx)(Ea,null,r("editor.editorToolbar.published"))},(0,D.jsx)(m.DropdownItem,{label:r("editor.editorToolbar.duplicate"),icon:"add",onClick:t})):(0,D.jsx)(ka,null,r("editor.editorToolbar.published"))})),oa(this,"renderNewEntrySimplePublishControls",(({canCreate:e})=>{const{onPersist:t,onPersistAndNew:r,onPersistAndDuplicate:n,isPersisting:o,t:i}=this.props;return(0,D.jsx)("div",null,(0,D.jsx)(ma,{dropdownTopOverlap:"40px",dropdownWidth:"150px",renderButton:()=>(0,D.jsx)(Ca,null,i(o?"editor.editorToolbar.publishing":"editor.editorToolbar.publish"))},(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishNow"),icon:"arrow",iconDirection:"right",onClick:t}),e?(0,D.jsx)(s().Fragment,null,(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishAndCreateNew"),icon:"add",onClick:r}),(0,D.jsx)(m.DropdownItem,{label:i("editor.editorToolbar.publishAndDuplicate"),icon:"add",onClick:n})):null))})),oa(this,"renderSimpleDeployPreviewControls",(()=>{const{hasChanged:e,isNewEntry:t,t:r}=this.props;if(!t&&!e)return this.renderDeployPreviewControls(r("editor.editorToolbar.deployButtonLabel"))})),oa(this,"renderWorkflowControls",(()=>{const{onPersist:e,onDelete:t,onDeleteUnpublishedChanges:r,showDelete:n,hasChanged:o,hasUnpublishedChanges:i,useOpenAuthoring:a,isPersisting:s,isDeleting:l,isNewEntry:c,isModification:u,currentStatus:f,collection:p,t:d}=this.props,h=p.get("create"),g=p.get("publish")&&!a,m=p.get("delete",!0),y=i&&u&&d("editor.editorToolbar.deleteUnpublishedChanges")||i&&(c||!u)&&d("editor.editorToolbar.deleteUnpublishedEntry")||!i&&!u&&d("editor.editorToolbar.deletePublishedEntry");return[(0,D.jsx)(Oa,{disabled:!o,key:"save-button",onClick:()=>o&&e()},d(s?"editor.editorToolbar.saving":"editor.editorToolbar.save")),f?[this.renderWorkflowStatusControls(),this.renderNewEntryWorkflowPublishControls({canCreate:h,canPublish:g})]:!c&&this.renderExistingEntryWorkflowPublishControls({canCreate:h,canPublish:g,canDelete:m}),n&&!a||i||u?(0,D.jsx)(_a,{key:"delete-button",onClick:i?r:t},l?d("editor.editorToolbar.deleting"):y):null]})),oa(this,"renderWorkflowDeployPreviewControls",(()=>{const{currentStatus:e,isNewEntry:t,t:r}=this.props;return e?this.renderDeployPreviewControls(r("editor.editorToolbar.deployPreviewButtonLabel")):t?void 0:this.renderDeployPreviewControls(r("editor.editorToolbar.deployButtonLabel"))}))}componentDidMount(){const{isNewEntry:e,loadDeployPreview:t}=this.props;e||t({maxAttempts:3})}componentDidUpdate(e){const{isNewEntry:t,isPersisting:r,loadDeployPreview:n}=this.props;t||!e.isPersisting||r||n({maxAttempts:3})}render(){const{user:e,hasChanged:t,displayUrl:r,collection:n,hasWorkflow:o,onLogoutClick:i,t:a,editorBackLink:s}=this.props;return(0,D.jsx)(ua,null,(0,D.jsx)(ha,{to:s},(0,D.jsx)(ya,null,"←"),(0,D.jsx)("div",null,(0,D.jsx)(va,null,a("editor.editorToolbar.backCollection",{collectionLabel:n.get("label")})),t?(0,D.jsx)(Sa,null,a("editor.editorToolbar.unsavedChanges")):(0,D.jsx)(wa,null,a("editor.editorToolbar.changesSaved")))),(0,D.jsx)(fa,null,(0,D.jsx)(pa,null,o?this.renderWorkflowControls():this.renderSimpleControls()),(0,D.jsx)(da,null,o?this.renderWorkflowDeployPreviewControls():this.renderSimpleDeployPreviewControls())),(0,D.jsx)(ga,null,(0,D.jsx)(I.Xp,{displayUrl:r,imageUrl:null==e?void 0:e.avatar_url,onLogoutClick:i})))}}oa(Ia,"propTypes",{isPersisting:i().bool,isPublishing:i().bool,isUpdatingStatus:i().bool,isDeleting:i().bool,onPersist:i().func.isRequired,onPersistAndNew:i().func.isRequired,onPersistAndDuplicate:i().func.isRequired,showDelete:i().bool.isRequired,onDelete:i().func.isRequired,onDeleteUnpublishedChanges:i().func.isRequired,onChangeStatus:i().func.isRequired,onPublish:i().func.isRequired,unPublish:i().func.isRequired,onDuplicate:i().func.isRequired,onPublishAndNew:i().func.isRequired,onPublishAndDuplicate:i().func.isRequired,user:i().object,hasChanged:i().bool,displayUrl:i().string,collection:f().map.isRequired,hasWorkflow:i().bool,useOpenAuthoring:i().bool,hasUnpublishedChanges:i().bool,isNewEntry:i().bool,isModification:i().bool,currentStatus:i().string,onLogoutClick:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,t:i().func.isRequired,editorBackLink:i().string.isRequired});const Da=(0,c.Iu)()(Ia);var La=r(72431);function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Na.apply(this,arguments)}function $a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fa="cms.preview-visible",Ba="cms.scroll-sync-enabled",Ua="cms.split-pane-position",za="cms.i18n-visible",Wa={splitPane:(0,D.css)(m.components.card,";border-radius:0;height:100%;;label:splitPane;"),pane:{name:"nq3sgi-pane",styles:"height:100%;overflow-y:auto;;label:pane;"}},qa=(0,n.Z)(m.IconButton,{target:"e1nx103k0",label:"EditorToggle"})({name:"1upilqn",styles:"margin-bottom:12px;"});function Ha(){return(0,D.jsx)(D.Global,{styles:(0,D.css)(".Resizer.vertical{width:21px;cursor:col-resize;position:relative;transition:background-color ",m.transitions.main,";&:before{content:'';width:2px;height:100%;position:relative;left:10px;background-color:",m.colors.textFieldBorder,";display:block;}&:hover,&:active{background-color:",m.colorsRaw.GrayLight,";}};label:ReactSplitPaneGlobalStyles;")})}const Va=(0,n.Z)(ri,{target:"e1nx103k1",label:"StyledSplitPane"})(Wa.splitPane,";.Pane{height:100%;}"),Ka=(0,n.Z)("div",{target:"e1nx103k2",label:"NoPreviewContainer"})(Wa.splitPane,";"),Ga=(0,n.Z)("div",{target:"e1nx103k3",label:"EditorContainer"})("width:100%;min-width:800px;height:100%;position:absolute;top:0;left:0;overflow:hidden;padding-top:66px;background-color:",m.colors.background,";"),Za=(0,n.Z)("div",{target:"e1nx103k4",label:"Editor"})({name:"1gs40ov",styles:"height:100%;margin:0 auto;position:relative;"}),Ya=(0,n.Z)("div",{target:"e1nx103k5",label:"PreviewPaneContainer"})("height:100%;pointer-events:",(e=>e.blockEntry?"none":"auto"),";overflow-y:",(e=>e.overFlow?"auto":"hidden"),";"),Ja=(0,n.Z)(Ya,{target:"e1nx103k6",label:"ControlPaneContainer"})({name:"pjxpm9",styles:"padding:0 16px;position:relative;overflow-x:hidden;"}),Qa=(0,n.Z)("div",{target:"e1nx103k7",label:"ViewControls"})("position:absolute;top:10px;right:10px;z-index:",m.zIndex.zIndex299,";");function Xa({i18nVisible:e,previewVisible:t,editor:r,editorWithEditor:n,editorWithPreview:o}){return e?n:t?o:(0,D.jsx)(Ka,null,r)}class es extends a.Component{constructor(...e){super(...e),$a(this,"state",{showEventBlocker:!1,previewVisible:"false"!==localStorage.getItem(Fa),scrollSyncEnabled:"false"!==localStorage.getItem(Ba),i18nVisible:"false"!==localStorage.getItem(za)}),$a(this,"handleSplitPaneDragStart",(()=>{this.setState({showEventBlocker:!0})})),$a(this,"handleSplitPaneDragFinished",(()=>{this.setState({showEventBlocker:!1})})),$a(this,"handleOnPersist",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e;await this.controlPaneRef.switchToDefaultLocale(),this.controlPaneRef.validate(),this.props.onPersist({createNew:t,duplicate:r})})),$a(this,"handleOnPublish",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e;await this.controlPaneRef.switchToDefaultLocale(),this.controlPaneRef.validate(),this.props.onPublish({createNew:t,duplicate:r})})),$a(this,"handleTogglePreview",(()=>{const e=!this.state.previewVisible;this.setState({previewVisible:e}),localStorage.setItem(Fa,e)})),$a(this,"handleToggleScrollSync",(()=>{const e=!this.state.scrollSyncEnabled;this.setState({scrollSyncEnabled:e}),localStorage.setItem(Ba,e)})),$a(this,"handleToggleI18n",(()=>{const e=!this.state.i18nVisible;this.setState({i18nVisible:e}),localStorage.setItem(za,e)})),$a(this,"handleLeftPanelLocaleChange",(e=>{this.setState({leftPanelLocale:e})}))}render(){const{collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,showDelete:a,onDelete:s,onDeleteUnpublishedChanges:l,onChangeStatus:c,onPublish:u,unPublish:f,onDuplicate:p,onValidate:d,user:h,hasChanged:g,displayUrl:m,hasWorkflow:y,useOpenAuthoring:v,hasUnpublishedChanges:b,isNewEntry:w,isModification:S,currentStatus:x,onLogoutClick:_,loadDeployPreview:O,deployPreview:E,draftKey:k,editorBackLink:C,t:T}=this.props,{scrollSyncEnabled:P,showEventBlocker:j}=this.state,R=function(e,t){if(e.get("type")===La.h){const r=(0,rr.HN)(e,t.get("slug")),n=null==r?void 0:r.getIn(["editor","preview"]);if(null!=n)return n}return e.getIn(["editor","preview"],!0)}(e,t),{locales:A,defaultLocale:M}=(0,Ri.Kb)(this.props.collection),I=(0,Ri.nR)(e)&&A.length>1,L={collection:e,entry:t,fields:r,fieldsMetaData:n,fieldsErrors:o,onChange:i,onValidate:d},N=this.state.leftPanelLocale||(null==A?void 0:A[0]),$=(0,D.jsx)(Ja,{overFlow:!0,blockEntry:j},(0,D.jsx)(Bi,Na({},L,{ref:e=>this.controlPaneRef=e,locale:N,t:T,onLocaleChange:this.handleLeftPanelLocaleChange}))),F=(0,D.jsx)(Ja,{overFlow:!this.state.scrollSyncEnabled,blockEntry:j},(0,D.jsx)(Bi,Na({},L,{locale:null==A?void 0:A[1],t:T}))),B=I?(0,Ri.cw)(t,N,M):t,U=(0,D.jsx)(ni.ScrollSync,{enabled:this.state.scrollSyncEnabled},(0,D.jsx)("div",null,(0,D.jsx)(Ha,null),(0,D.jsx)(Va,{maxSize:-100,minSize:400,defaultSize:parseInt(localStorage.getItem(Ua),10)||"50%",onChange:e=>localStorage.setItem(Ua,e),onDragStarted:this.handleSplitPaneDragStart,onDragFinished:this.handleSplitPaneDragFinished},(0,D.jsx)(ni.ScrollSyncPane,null,$),(0,D.jsx)(Ya,{blockEntry:j},(0,D.jsx)(na,{collection:e,entry:B,fields:r,fieldsMetaData:n,locale:N}))))),z=(0,D.jsx)(ni.ScrollSync,{enabled:this.state.scrollSyncEnabled},(0,D.jsx)("div",null,(0,D.jsx)(Va,{maxSize:-100,defaultSize:parseInt(localStorage.getItem(Ua),10)||"50%",onChange:e=>localStorage.setItem(Ua,e),onDragStarted:this.handleSplitPaneDragStart,onDragFinished:this.handleSplitPaneDragFinished},(0,D.jsx)(ni.ScrollSyncPane,null,$),(0,D.jsx)(ni.ScrollSyncPane,null,F)))),W=I&&this.state.i18nVisible,q=R&&this.state.previewVisible,H=W||q;return(0,D.jsx)(Ga,null,(0,D.jsx)(Da,{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:s,onDeleteUnpublishedChanges:l,onChangeStatus:c,showDelete:a,onPublish:u,unPublish:f,onDuplicate:p,onPublishAndNew:()=>this.handleOnPublish({createNew:!0}),onPublishAndDuplicate:()=>this.handleOnPublish({createNew:!0,duplicate:!0}),user:h,hasChanged:g,displayUrl:m,collection:e,hasWorkflow:y,useOpenAuthoring:v,hasUnpublishedChanges:b,isNewEntry:w,isModification:S,currentStatus:x,onLogoutClick:_,loadDeployPreview:O,deployPreview:E,editorBackLink:C}),(0,D.jsx)(Za,{key:k},(0,D.jsx)(Qa,null,I&&(0,D.jsx)(qa,{isActive:W,onClick:this.handleToggleI18n,size:"large",type:"page",title:T("editor.editorInterface.toggleI18n"),marginTop:"70px"}),R&&(0,D.jsx)(qa,{isActive:q,onClick:this.handleTogglePreview,size:"large",type:"eye",title:T("editor.editorInterface.togglePreview")}),H&&(0,D.jsx)(qa,{isActive:P,onClick:this.handleToggleScrollSync,size:"large",type:"scroll",title:T("editor.editorInterface.toggleScrollSync")})),(0,D.jsx)(Xa,{i18nVisible:W,previewVisible:q,editor:$,editorWithEditor:z,editorWithPreview:U})))}}es.propTypes={collection:f().map.isRequired,entry:f().map.isRequired,fields:f().list.isRequired,fieldsMetaData:f().map.isRequired,fieldsErrors:f().map.isRequired,onChange:i().func.isRequired,onValidate:i().func.isRequired,onPersist:i().func.isRequired,showDelete:i().bool.isRequired,onDelete:i().func.isRequired,onDeleteUnpublishedChanges:i().func.isRequired,onPublish:i().func.isRequired,unPublish:i().func.isRequired,onDuplicate:i().func.isRequired,onChangeStatus:i().func.isRequired,user:i().object,hasChanged:i().bool,displayUrl:i().string,hasWorkflow:i().bool,useOpenAuthoring:i().bool,hasUnpublishedChanges:i().bool,isNewEntry:i().bool,isModification:i().bool,currentStatus:i().string,onLogoutClick:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,draftKey:i().string.isRequired,t:i().func.isRequired};const ts=es;function rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ns(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(r),!0).forEach((function(t){os(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function os(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function is(e,t){const{collections:r}=e,n=e.config.publish_mode===Ct.S0,o=r.get(t.match.params.name),i={isEditorialWorkflow:n,showDelete:!t.newEntry&&(0,rr.Zh)(o)};if(n){const r=t.match.params[0],n=(0,bn.Js)(e,o.get("name"),r);n&&(i.unpublishedEntry=!0,i.entry=n)}return i}function as(e,t,r){const{isEditorialWorkflow:n,unpublishedEntry:o}=e,{dispatch:i}=t,a={};return n&&(a.loadEntry=(e,t)=>i((0,Zn.S0)(e,t)),a.persistEntry=e=>i((0,Zn.tH)(e,o))),ns(ns(ns({},r),e),a)}function ss(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class ls extends s().Component{constructor(...e){super(...e),ss(this,"createBackup",Io()((function(e,t){this.props.persistLocalBackup(e,t)}),2e3)),ss(this,"handleChangeDraftField",((e,t,r,n)=>{const o=[this.props.unPublishedEntry,this.props.publishedEntry].filter(Boolean);this.props.changeDraftField({field:e,value:t,metadata:r,entries:o,i18n:n})})),ss(this,"handleChangeStatus",(e=>{const{entryDraft:t,updateUnpublishedEntryStatus:r,collection:n,slug:o,currentStatus:i,t:a}=this.props;if(t.get("hasChanged"))return void window.alert(a("editor.editor.onUpdatingWithUnsavedChanges"));const s=Ct.i7.get(e);r(n.get("name"),o,i,s)})),ss(this,"handlePersistEntry",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e,{persistEntry:n,collection:o,currentStatus:i,hasWorkflow:a,loadEntry:s,slug:l,createDraftDuplicateFromEntry:c,entryDraft:u}=this.props;await n(o),this.deleteBackup(),t?((0,b.Tc)(o.get("name")),r&&c(u.get("entry"))):l&&a&&!i&&s(o,l)})),ss(this,"handlePublishEntry",(async(e={})=>{const{createNew:t=!1,duplicate:r=!1}=e,{publishUnpublishedEntry:n,createDraftDuplicateFromEntry:o,entryDraft:i,collection:a,slug:s,currentStatus:l,t:c}=this.props;l===Ct.i7.last()?i.get("hasChanged")?window.alert(c("editor.editor.onPublishingWithUnsavedChanges")):window.confirm(c("editor.editor.onPublishing"))&&(await n(a.get("name"),s),this.deleteBackup(),t&&(0,b.Tc)(a.get("name")),r&&o(i.get("entry"))):window.alert(c("editor.editor.onPublishingNotReady"))})),ss(this,"handleUnpublishEntry",(async()=>{const{unpublishPublishedEntry:e,collection:t,slug:r,t:n}=this.props;if(window.confirm(n("editor.editor.onUnpublishing")))return await e(t,r),(0,b.db)(t.get("name"))})),ss(this,"handleDuplicateEntry",(()=>{const{createDraftDuplicateFromEntry:e,collection:t,entryDraft:r}=this.props;(0,b.Tc)(t.get("name")),e(r.get("entry"))})),ss(this,"handleDeleteEntry",(()=>{const{entryDraft:e,newEntry:t,collection:r,deleteEntry:n,slug:o,t:i}=this.props;if(e.get("hasChanged")){if(!window.confirm(i("editor.editor.onDeleteWithUnsavedChanges")))return}else if(!window.confirm(i("editor.editor.onDeletePublishedEntry")))return;if(t)return(0,b.db)(r.get("name"));setTimeout((async()=>(await n(r,o),this.deleteBackup(),(0,b.db)(r.get("name")))),0)})),ss(this,"handleDeleteUnpublishedChanges",(async()=>{const{entryDraft:e,collection:t,slug:r,deleteUnpublishedEntry:n,loadEntry:o,isModification:i,t:a}=this.props;e.get("hasChanged")&&!window.confirm(a("editor.editor.onDeleteUnpublishedChangesWithUnsavedChanges"))||window.confirm(a("editor.editor.onDeleteUnpublishedChanges"))&&(await n(t.get("name"),r),this.deleteBackup(),i?o(t,r):(0,b.db)(t.get("name")))}))}componentDidMount(){const{newEntry:e,collection:t,slug:r,loadEntry:n,createEmptyDraft:o,loadEntries:i,retrieveLocalBackup:a,collectionEntriesLoaded:s,t:l}=this.props;a(t,r),e?o(t,this.props.location.search):n(t,r);const c=l("editor.editor.onLeavePage");this.exitBlocker=e=>{if(this.props.entryDraft.get("hasChanged"))return e.returnValue=c,c},window.addEventListener("beforeunload",this.exitBlocker);const u=b.m8.block(((e,r)=>{const n=this.props.entryDraft.getIn(["entry","isPersisting"]),o=this.props.entryDraft.getIn(["entry","newRecord"]),i=`/collections/${t.get("name")}/new`;if(!n||!o||this.props.location.pathname!==i||"PUSH"!==r)return this.props.hasChanged?c:void 0}));this.unlisten=b.m8.listen(((e,r)=>{const n=`/collections/${t.get("name")}/new`,o=`/collections/${t.get("name")}/entries/`,{pathname:i}=e;i.startsWith(n)||i.startsWith(o)&&"PUSH"===r||(this.deleteBackup(),u(),this.unlisten())})),s||i(t)}componentDidUpdate(e){if(!e.localBackup&&this.props.localBackup&&(window.confirm(this.props.t("editor.editor.confirmLoadBackup"))?this.props.loadLocalBackup():this.deleteBackup()),this.props.hasChanged&&this.createBackup(this.props.entryDraft.get("entry"),this.props.collection),e.entry===this.props.entry)return;const{newEntry:t,collection:r}=this.props;t&&e.createEmptyDraft(r,this.props.location.search)}componentWillUnmount(){this.createBackup.flush(),this.props.discardDraft(),window.removeEventListener("beforeunload",this.exitBlocker)}deleteBackup(){const{deleteLocalBackup:e,collection:t,slug:r,newEntry:n}=this.props;this.createBackup.cancel(),e(t,!n&&r)}render(){const{entry:e,entryDraft:t,fields:r,collection:n,changeDraftFieldValidation:o,user:i,hasChanged:a,displayUrl:s,hasWorkflow:l,useOpenAuthoring:c,unpublishedEntry:u,newEntry:f,isModification:p,currentStatus:d,logoutUser:h,deployPreview:g,loadDeployPreview:y,draftKey:v,slug:b,t:w,editorBackLink:S}=this.props,x=!f&&!u;return e&&e.get("error")?(0,D.jsx)("div",null,(0,D.jsx)("h3",null,e.get("error"))):null==t||void 0===t.get("entry")||e&&e.get("isFetching")?(0,D.jsx)(m.Loader,{active:!0},w("editor.editor.loadingEntry")):(0,D.jsx)(ts,{draftKey:v,entry:t.get("entry"),collection:n,fields:r,fieldsMetaData:t.get("fieldsMetaData"),fieldsErrors:t.get("fieldsErrors"),onChange:this.handleChangeDraftField,onValidate:o,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:i,hasChanged:a,displayUrl:s,hasWorkflow:l,useOpenAuthoring:c,hasUnpublishedChanges:u,isNewEntry:f,isModification:p,currentStatus:d,onLogoutClick:h,deployPreview:g,loadDeployPreview:t=>y(n,b,e,x,t),editorBackLink:S,t:w})}}ss(ls,"propTypes",{changeDraftField:i().func.isRequired,changeDraftFieldValidation:i().func.isRequired,collection:f().map.isRequired,createDraftDuplicateFromEntry:i().func.isRequired,createEmptyDraft:i().func.isRequired,discardDraft:i().func.isRequired,entry:f().map,entryDraft:f().map.isRequired,loadEntry:i().func.isRequired,persistEntry:i().func.isRequired,deleteEntry:i().func.isRequired,showDelete:i().bool.isRequired,fields:f().list.isRequired,slug:i().string,newEntry:i().bool.isRequired,displayUrl:i().string,hasWorkflow:i().bool,useOpenAuthoring:i().bool,unpublishedEntry:i().bool,isModification:i().bool,collectionEntriesLoaded:i().bool,updateUnpublishedEntryStatus:i().func.isRequired,publishUnpublishedEntry:i().func.isRequired,deleteUnpublishedEntry:i().func.isRequired,logoutUser:i().func.isRequired,loadEntries:i().func.isRequired,deployPreview:i().object,loadDeployPreview:i().func.isRequired,currentStatus:i().string,user:i().object,location:i().shape({pathname:i().string,search:i().string}),hasChanged:i().bool,t:i().func.isRequired,retrieveLocalBackup:i().func.isRequired,localBackup:f().map,loadLocalBackup:i().func,persistLocalBackup:i().func.isRequired,deleteLocalBackup:i().func});const cs={changeDraftField:Lr.tw,changeDraftFieldValidation:Lr.QM,loadEntry:Lr.KS,loadEntries:Lr.Jw,loadDeployPreview:Do.ed,loadLocalBackup:Lr.SG,retrieveLocalBackup:Lr.RO,persistLocalBackup:Lr.q9,deleteLocalBackup:Lr.$G,createDraftDuplicateFromEntry:Lr.ED,createEmptyDraft:Lr.lK,discardDraft:Lr.vQ,persistEntry:Lr.G4,deleteEntry:Lr.pO,updateUnpublishedEntryStatus:Zn.JY,publishUnpublishedEntry:Zn.Ts,unpublishPublishedEntry:Zn.SX,deleteUnpublishedEntry:Zn.Ty,logoutUser:y.TX},us=(0,p.$j)((function(e,t){const{collections:r,entryDraft:n,auth:o,config:i,entries:a,globalUI:s}=e,l=t.match.params[0],c=r.get(t.match.params.name),u=c.get("name"),f=!0===t.newRecord,p=(0,rr.LY)(c,l),d=f?null:(0,bn.WK)(e,u,l),h=o.user,g=n.get("hasChanged"),m=i.display_url,y=i.publish_mode===Ct.S0,v=s.useOpenAuthoring,b=n.getIn(["entry","isModification"]),w=!!a.getIn(["pages",u]),S=(0,bn.Js)(e,u,l),x=(0,bn.WK)(e,u,l),_=S&&S.get("status"),O=(0,bn.Cz)(e,u,l),E=n.get("localBackup"),k=n.get("key");let C=`/collections/${u}`;if("workflow"===new URLSearchParams(t.location.search).get("ref")&&(C="/workflow"),c.has("nested")&&l){const e=l.split("/");e.length>2&&(C=`${C}/filter/${e.slice(0,-2).join("/")}`)}return{collection:c,collections:r,newEntry:f,entryDraft:n,fields:p,slug:l,entry:d,user:h,hasChanged:g,displayUrl:m,hasWorkflow:y,useOpenAuthoring:v,isModification:b,collectionEntriesLoaded:w,currentStatus:_,deployPreview:O,localBackup:E,draftKey:k,publishedEntry:x,unPublishedEntry:S,editorBackLink:C}}),cs)(function(e){return(0,p.$j)(is,null,as)(class extends s().Component{render(){return(0,D.jsx)(e,this.props)}})}((0,c.Iu)()(ls))),fs=(0,n.Z)("div",{target:"ew40z3q0",label:"NotFoundContainer"})("margin:",m.lengths.pageMargin,";");function ps({t:e}){return(0,D.jsx)(fs,null,(0,D.jsx)("h2",null,e("app.notFoundPage.header")))}ps.propTypes={t:i().func.isRequired};const ds=(0,c.Iu)()(ps);var hs=r(92699);function gs(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ms.apply(this,arguments)}const ys={buttonActive:(0,D.css)("color:",m.colors.active,";;label:buttonActive;")};function vs(e){return(0,D.jsx)("header",ms({css:(0,D.css)(m.shadows.dropMain,";position:sticky;width:100%;top:0;background-color:",m.colors.foreground,";z-index:",m.zIndex.zIndex300,";height:",m.lengths.topBarHeight,";;label:AppHeader;")},e))}const bs=(0,n.Z)("div",{target:"e1rbzf6g0",label:"AppHeaderContent"})({name:"oh6t3a",styles:"display:flex;justify-content:space-between;min-width:800px;max-width:1440px;padding:0 12px;margin:0 auto;"}),ws=(0,n.Z)("button",{target:"e1rbzf6g1",label:"AppHeaderButton"})(m.buttons.button,";background:none;color:#7b8290;font-family:inherit;font-size:16px;font-weight:500;display:inline-flex;padding:16px 20px;align-items:center;",m.Icon,"{margin-right:4px;color:#b3b9c4;}&:hover,&:active,&:focus{",ys.buttonActive,";",m.Icon,"{",ys.buttonActive,";}}",(e=>(0,D.css)("&.",e.activeClassName,"{",ys.buttonActive,";",m.Icon,"{",ys.buttonActive,";}};label:AppHeaderButton;")),";"),Ss=ws.withComponent(Ft,{target:"e1rbzf6g5",label:"AppHeaderNavLink"}),xs=(0,n.Z)("div",{target:"e1rbzf6g2",label:"AppHeaderActions"})({name:"18biwo",styles:"display:inline-flex;align-items:center;"}),_s=(0,n.Z)(m.StyledDropdownButton,{target:"e1rbzf6g3",label:"AppHeaderQuickNewButton"})(m.buttons.button,";",m.buttons.medium,";",m.buttons.gray,";margin-right:8px;&:after{top:11px;}"),Os=(0,n.Z)("ul",{target:"e1rbzf6g4",label:"AppHeaderNavList"})({name:"lsxu3a",styles:"display:flex;margin:0;list-style:none;"});class Es extends s().Component{constructor(...e){super(...e),gs(this,"intervalId",void 0),gs(this,"handleCreatePostClick",(e=>{const{onCreateEntryClick:t}=this.props;t&&t(e)}))}componentDidMount(){this.intervalId=setInterval((()=>{this.props.checkBackendStatus()}),3e5)}componentWillUnmount(){clearInterval(this.intervalId)}render(){const{user:e,collections:t,onLogoutClick:r,openMediaLibrary:n,hasWorkflow:o,displayUrl:i,isTestRepo:a,t:s,showMediaButton:l}=this.props,c=t.filter((e=>e.get("create"))).toList();return(0,D.jsx)(vs,null,(0,D.jsx)(bs,null,(0,D.jsx)("nav",null,(0,D.jsx)(Os,null,(0,D.jsx)("li",null,(0,D.jsx)(Ss,{to:"/",activeClassName:"header-link-active",isActive:(e,t)=>t.pathname.startsWith("/collections/")},(0,D.jsx)(m.Icon,{type:"page"}),s("app.header.content"))),o&&(0,D.jsx)("li",null,(0,D.jsx)(Ss,{to:"/workflow",activeClassName:"header-link-active"},(0,D.jsx)(m.Icon,{type:"workflow"}),s("app.header.workflow"))),l&&(0,D.jsx)("li",null,(0,D.jsx)(ws,{onClick:n},(0,D.jsx)(m.Icon,{type:"media-alt"}),s("app.header.media"))))),(0,D.jsx)(xs,null,c.size>0&&(0,D.jsx)(m.Dropdown,{renderButton:()=>(0,D.jsx)(_s,null," ",s("app.header.quickAdd")),dropdownTopOverlap:"30px",dropdownWidth:"160px",dropdownPosition:"left"},c.map((e=>(0,D.jsx)(m.DropdownItem,{key:e.get("name"),label:e.get("label_singular")||e.get("label"),onClick:()=>this.handleCreatePostClick(e.get("name"))})))),(0,D.jsx)(I.Xp,{displayUrl:i,isTestRepo:a,imageUrl:null==e?void 0:e.avatar_url,onLogoutClick:r}))))}}gs(Es,"propTypes",{user:i().object.isRequired,collections:f().map.isRequired,onCreateEntryClick:i().func.isRequired,onLogoutClick:i().func.isRequired,openMediaLibrary:i().func.isRequired,hasWorkflow:i().bool.isRequired,displayUrl:i().string,isTestRepo:i().bool,t:i().func.isRequired,checkBackendStatus:i().func.isRequired});const ks={checkBackendStatus:hs.oj},Cs=(0,p.$j)(null,ks)((0,c.Iu)()(Es));e=r.hmd(e);const Ts=["collections","render"];function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ps.apply(this,arguments)}g().config({barColors:{0:m.colors.active,"1.0":m.colors.active},shadowBlur:0,barThickness:2});const js=(0,n.Z)("div",{target:"eh2m33j0",label:"AppMainContainer"})({name:"123tny7",styles:"min-width:800px;max-width:1440px;margin:0 auto;"}),Rs=(0,n.Z)("div",{target:"eh2m33j1",label:"ErrorContainer"})({name:"zwiamn",styles:"margin:20px;"}),As=(0,n.Z)("pre",{target:"eh2m33j2",label:"ErrorCodeBlock"})({name:"1v6y79z",styles:"margin-left:20px;font-size:15px;line-height:1.5;"});function Ms(e){const t=e.filter((e=>!0!==e.get("hide"))).first();if(t)return`/collections/${t.get("name")}`;throw new Error("Could not find a non hidden collection")}function Is(e){let{collections:t,render:r}=e,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,Ts);const o=Ms(t);return(0,D.jsx)(d.AW,Ps({},n,{render:e=>t.get(e.match.params.name)?r(e):(0,D.jsx)(d.l_,{to:o})}))}class Ds extends s().Component{configError(e){const t=this.props.t;return(0,D.jsx)(Rs,null,(0,D.jsx)("h1",null,t("app.app.errorHeader")),(0,D.jsx)("div",null,(0,D.jsx)("strong",null,t("app.app.configErrors"),":"),(0,D.jsx)(As,null,e.error),(0,D.jsx)("span",null,t("app.app.checkConfigYml"))))}handleLogin(e){this.props.loginUser(e)}authenticating(){const{auth:e,t}=this.props,r=(0,v.Rg)(this.props.config);return null==r?(0,D.jsx)("div",null,(0,D.jsx)("h1",null,t("app.app.waitingBackend"))):(0,D.jsx)("div",null,(0,D.jsx)(I.Tx,null),s().createElement(r.authComponent(),{onLogin:this.handleLogin.bind(this),error:e.error,inProgress:e.isFetching,siteId:this.props.config.backend.site_domain,base_url:this.props.config.backend.base_url,authEndpoint:this.props.config.backend.auth_endpoint,config:this.props.config,clearHash:()=>b.m8.replace("/"),t}))}handleLinkClick(e,t,...r){e.preventDefault(),t(...r)}render(){const{user:e,config:t,collections:r,logoutUser:n,isFetching:o,publishMode:i,useMediaLibrary:a,openMediaLibrary:l,t:c,showMediaButton:u}=this.props;if(null===t)return null;if(t.error)return this.configError(t);if(t.isFetching)return(0,D.jsx)(m.Loader,{active:!0},c("app.app.loadingConfig"));if(null==e)return this.authenticating(c);const f=Ms(r),p=i===Ct.S0;return(0,D.jsx)(s().Fragment,null,(0,D.jsx)(I.Tx,null),(0,D.jsx)(Cs,{user:e,collections:r,onCreateEntryClick:S,onLogoutClick:n,openMediaLibrary:l,hasWorkflow:p,displayUrl:t.display_url,isTestRepo:"test-repo"===t.backend.name,showMediaButton:u}),(0,D.jsx)(js,null,o&&(0,D.jsx)(g(),null),(0,D.jsx)(d.rs,null,(0,D.jsx)(d.l_,{exact:!0,from:"/",to:f}),(0,D.jsx)(d.l_,{exact:!0,from:"/search/",to:f}),(0,D.jsx)(Is,{exact:!0,collections:r,path:"/collections/:name/search/",render:({match:e})=>(0,D.jsx)(d.l_,{to:`/collections/${e.params.name}`})}),(0,D.jsx)(d.l_,{from:"/error=access_denied&error_description=Signups+not+allowed+for+this+instance",to:f}),p?(0,D.jsx)(d.AW,{path:"/workflow",component:Ao}):null,(0,D.jsx)(Is,{exact:!0,collections:r,path:"/collections/:name",render:e=>(0,D.jsx)(Gn,e)}),(0,D.jsx)(Is,{path:"/collections/:name/new",collections:r,render:e=>(0,D.jsx)(us,Ps({},e,{newRecord:!0}))}),(0,D.jsx)(Is,{path:"/collections/:name/entries/*",collections:r,render:e=>(0,D.jsx)(us,e)}),(0,D.jsx)(Is,{path:"/collections/:name/search/:searchTerm",collections:r,render:e=>(0,D.jsx)(Gn,Ps({},e,{isSearchResults:!0,isSingleSearchResult:!0}))}),(0,D.jsx)(Is,{collections:r,path:"/collections/:name/filter/:filterTerm*",render:e=>(0,D.jsx)(Gn,e)}),(0,D.jsx)(d.AW,{path:"/search/:searchTerm",render:e=>(0,D.jsx)(Gn,Ps({},e,{isSearchResults:!0}))}),(0,D.jsx)(Is,{path:"/edit/:name/:entryName",collections:r,render:({match:e})=>{const{name:t,entryName:r}=e.params;return(0,D.jsx)(d.l_,{to:`/collections/${t}/entries/${r}`})}}),(0,D.jsx)(d.AW,{component:ds})),a?(0,D.jsx)(kt,null):null))}}!function(e,t,r){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(Ds,"propTypes",{auth:i().object.isRequired,config:i().object.isRequired,collections:f().map.isRequired,loginUser:i().func.isRequired,logoutUser:i().func.isRequired,user:i().object,isFetching:i().bool.isRequired,publishMode:i().oneOf([Ct.pt,Ct.S0]),siteId:i().string,useMediaLibrary:i().bool,openMediaLibrary:i().func.isRequired,showMediaButton:i().bool,t:i().func.isRequired});const Ls={openMediaLibrary:x.UN,loginUser:y.pH,logoutUser:y.TX},Ns=(0,l.wU)(e)((0,p.$j)((function(e){const{auth:t,config:r,collections:n,globalUI:o,mediaLibrary:i}=e,a=t.user,s=o.isFetching,l=r.publish_mode,c=!i.get("externalLibrary");return{auth:t,config:r,collections:n,user:a,isFetching:s,publishMode:l,showMediaButton:i.get("showMediaButton"),useMediaLibrary:c}}),Ls)((0,c.Iu)()(Ds)))},64682:(e,t,r)=>{"use strict";r.d(t,{Ej:()=>yr,GR:()=>vr,SV:()=>zr,KH:()=>Wr,XK:()=>br,u_:()=>Yr,Tx:()=>$n,Xp:()=>Gn});var n={};function o(e){var t=null;return function(){return null==t&&(t=e()),t}}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.r(n),r.d(n,{FILE:()=>y,HTML:()=>w,TEXT:()=>b,URL:()=>v});var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"entered",[]),a(this,"isNodeInDocument",void 0),this.isNodeInDocument=t}var t,r;return t=e,(r=[{key:"enter",value:function(e){var t=this,r=this.entered.length;return this.entered=function(e,t){var r=new Set,n=function(e){return r.add(e)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e){return o.push(e)})),o}(this.entered.filter((function(r){return t.isNodeInDocument(r)&&(!r.contains||r.contains(e))})),[e]),0===r&&this.entered.length>0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&i(t.prototype,r),e}(),l=o((function(){return/firefox/i.test(navigator.userAgent)})),c=o((function(){return Boolean(window.safari)}));function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),f(this,"xs",void 0),f(this,"ys",void 0),f(this,"c1s",void 0),f(this,"c2s",void 0),f(this,"c3s",void 0);for(var n=t.length,o=[],i=0;i<n;i++)o.push(i);o.sort((function(e,r){return t[e]<t[r]?-1:1}));for(var a,s,l=[],c=[],u=[],p=0;p<n-1;p++)a=t[p+1]-t[p],s=r[p+1]-r[p],c.push(a),l.push(s),u.push(s/a);for(var d=[u[0]],h=0;h<c.length-1;h++){var g=u[h],m=u[h+1];if(g*m<=0)d.push(0);else{a=c[h];var y=c[h+1],v=a+y;d.push(3*v/((v+y)/g+(v+a)/m))}}d.push(u[u.length-1]);for(var b,w=[],S=[],x=0;x<d.length-1;x++){b=u[x];var _=d[x],O=1/c[x],E=_+d[x+1]-b-b;w.push((b-_-E)*O),S.push(E*O*O)}this.xs=t,this.ys=r,this.c1s=d,this.c2s=w,this.c3s=S}var t,r;return t=e,(r=[{key:"interpolate",value:function(e){var t=this.xs,r=this.ys,n=this.c1s,o=this.c2s,i=this.c3s,a=t.length-1;if(e===t[a])return r[a];for(var s,l=0,c=i.length-1;l<=c;){var u=t[s=Math.floor(.5*(l+c))];if(u<e)l=s+1;else{if(!(u>e))return r[s];c=s-1}}var f=e-t[a=Math.max(0,c)],p=f*f;return r[a]+n[a]*f+o[a]*p+i[a]*f*p}}])&&u(t.prototype,r),e}(),d=1;function h(e){var t=e.nodeType===d?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function g(e){return{x:e.clientX,y:e.clientY}}var m,y="__NATIVE_FILE__",v="__NATIVE_URL__",b="__NATIVE_TEXT__",w="__NATIVE_HTML__";function S(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _=(x(m={},y,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:["Files"]}),x(m,w,{exposeProperties:{html:function(e,t){return S(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Html","text/html"]}),x(m,v,{exposeProperties:{urls:function(e,t){return S(e,t,"").split("\n")},dataTransfer:function(e){return e}},matchesTypes:["Url","text/uri-list"]}),x(m,b,{exposeProperties:{text:function(e,t){return S(e,t,"")},dataTransfer:function(e){return e}},matchesTypes:["Text","text/plain"]}),m);function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var k=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),E(this,"item",void 0),E(this,"config",void 0),this.config=t,this.item={},this.initializeExposedProperties()}var t,r;return t=e,(r=[{key:"initializeExposedProperties",value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach((function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn("Browser doesn't allow reading \"".concat(t,'" until the drop event.')),null}})}))}},{key:"loadDataTransfer",value:function(e){var t=this;if(e){var r={};Object.keys(this.config.exposeProperties).forEach((function(n){r[n]={value:t.config.exposeProperties[n](e,t.config.matchesTypes),configurable:!0,enumerable:!0}})),Object.defineProperties(this.item,r)}}},{key:"canDrag",value:function(){return!0}},{key:"beginDrag",value:function(){return this.item}},{key:"isDragging",value:function(e,t){return t===e.getSourceId()}},{key:"endDrag",value:function(){}}])&&O(t.prototype,r),e}();function C(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(_).filter((function(e){return _[e].matchesTypes.some((function(e){return t.indexOf(e)>-1}))}))[0]||null}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var j=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"ownerDocument",null),P(this,"globalContext",void 0),P(this,"optionsArgs",void 0),this.globalContext=t,this.optionsArgs=r}var t,r;return t=e,(r=[{key:"window",get:function(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}},{key:"document",get:function(){var e;return null!==(e=this.globalContext)&&void 0!==e&&e.document?this.globalContext.document:this.window?this.window.document:void 0}},{key:"rootElement",get:function(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}}])&&T(t.prototype,r),e}();function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){I(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function M(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),I(this,"options",void 0),I(this,"actions",void 0),I(this,"monitor",void 0),I(this,"registry",void 0),I(this,"enterLeaveCounter",void 0),I(this,"sourcePreviewNodes",new Map),I(this,"sourcePreviewNodeOptions",new Map),I(this,"sourceNodes",new Map),I(this,"sourceNodeOptions",new Map),I(this,"dragStartSourceIds",null),I(this,"dropTargetIds",[]),I(this,"dragEnterTargetIds",[]),I(this,"currentNativeSource",null),I(this,"currentNativeHandle",null),I(this,"currentDragSourceNode",null),I(this,"altKeyPressed",!1),I(this,"mouseMoveTimeoutTimer",null),I(this,"asyncEndDragFrameId",null),I(this,"dragOverTargetIds",null),I(this,"lastClientOffset",null),I(this,"hoverRafId",null),I(this,"getSourceClientOffset",(function(e){var t=o.sourceNodes.get(e);return t&&h(t)||null})),I(this,"endDragNativeItem",(function(){o.isDraggingNativeItem()&&(o.actions.endDrag(),o.currentNativeHandle&&o.registry.removeSource(o.currentNativeHandle),o.currentNativeHandle=null,o.currentNativeSource=null)})),I(this,"isNodeInDocument",(function(e){return Boolean(e&&o.document&&o.document.body&&o.document.body.contains(e))})),I(this,"endDragIfSourceWasRemovedFromDOM",(function(){var e=o.currentDragSourceNode;null==e||o.isNodeInDocument(e)||o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleTopDragStartCapture",(function(){o.clearCurrentDragSourceNode(),o.dragStartSourceIds=[]})),I(this,"handleTopDragStart",(function(e){if(!e.defaultPrevented){var t=o.dragStartSourceIds;o.dragStartSourceIds=null;var r=g(e);o.monitor.isDragging()&&o.actions.endDrag(),o.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:o.getSourceClientOffset,clientOffset:r});var n=e.dataTransfer,i=C(n);if(o.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){var a=o.monitor.getSourceId(),s=o.sourceNodes.get(a),u=o.sourcePreviewNodes.get(a)||s;if(u){var f=o.getCurrentSourcePreviewNodeOptions(),d=function(e,t,r,n,o){var i,a,s="IMG"===(i=t).nodeName&&(l()||!(null!==(a=document.documentElement)&&void 0!==a&&a.contains(i))),u=h(s?e:t),f={x:r.x-u.x,y:r.y-u.y},d=e.offsetWidth,g=e.offsetHeight,m=n.anchorX,y=n.anchorY,v=function(e,t,r,n){var o=e?t.width:r,i=e?t.height:n;return c()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(s,t,d,g),b=v.dragPreviewWidth,w=v.dragPreviewHeight,S=o.offsetX,x=o.offsetY,_=0===x||x;return{x:0===S||S?S:new p([0,.5,1],[f.x,f.x/d*b,f.x+b-d]).interpolate(m),y:_?x:function(){var e=new p([0,.5,1],[f.y,f.y/g*w,f.y+w-g]).interpolate(y);return c()&&s&&(e+=(window.devicePixelRatio-1)*w),e}()}}(s,u,r,{anchorX:f.anchorX,anchorY:f.anchorY},{offsetX:f.offsetX,offsetY:f.offsetY});n.setDragImage(u,d.x,d.y)}}try{null==n||n.setData("application/json",{})}catch(e){}o.setCurrentDragSourceNode(e.target),o.getCurrentSourcePreviewNodeOptions().captureDraggingState?o.actions.publishDragSource():setTimeout((function(){return o.actions.publishDragSource()}),0)}else if(i)o.beginDragNativeItem(i);else{if(n&&!n.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}}})),I(this,"handleTopDragEndCapture",(function(){o.clearCurrentDragSourceNode()&&o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleTopDragEnterCapture",(function(e){if(o.dragEnterTargetIds=[],o.enterLeaveCounter.enter(e.target)&&!o.monitor.isDragging()){var t=e.dataTransfer,r=C(t);r&&o.beginDragNativeItem(r,t)}})),I(this,"handleTopDragEnter",(function(e){var t=o.dragEnterTargetIds;o.dragEnterTargetIds=[],o.monitor.isDragging()&&(o.altKeyPressed=e.altKey,t.length>0&&o.actions.hover(t,{clientOffset:g(e)}),t.some((function(e){return o.monitor.canDropOnTarget(e)}))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())))})),I(this,"handleTopDragOverCapture",(function(){o.dragOverTargetIds=[]})),I(this,"handleTopDragOver",(function(e){var t=o.dragOverTargetIds;if(o.dragOverTargetIds=[],!o.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));o.altKeyPressed=e.altKey,o.lastClientOffset=g(e),null===o.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(o.hoverRafId=requestAnimationFrame((function(){o.monitor.isDragging()&&o.actions.hover(t||[],{clientOffset:o.lastClientOffset}),o.hoverRafId=null}))),(t||[]).some((function(e){return o.monitor.canDropOnTarget(e)}))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=o.getCurrentDropEffect())):o.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))})),I(this,"handleTopDragLeaveCapture",(function(e){o.isDraggingNativeItem()&&e.preventDefault(),o.enterLeaveCounter.leave(e.target)&&o.isDraggingNativeItem()&&setTimeout((function(){return o.endDragNativeItem()}),0)})),I(this,"handleTopDropCapture",(function(e){var t;o.dropTargetIds=[],o.isDraggingNativeItem()?(e.preventDefault(),null===(t=o.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):C(e.dataTransfer)&&e.preventDefault(),o.enterLeaveCounter.reset()})),I(this,"handleTopDrop",(function(e){var t=o.dropTargetIds;o.dropTargetIds=[],o.actions.hover(t,{clientOffset:g(e)}),o.actions.drop({dropEffect:o.getCurrentDropEffect()}),o.isDraggingNativeItem()?o.endDragNativeItem():o.monitor.isDragging()&&o.actions.endDrag()})),I(this,"handleSelectStart",(function(e){var t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))})),this.options=new j(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new s(this.isNodeInDocument)}var t,r;return t=e,(r=[{key:"profile",value:function(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}},{key:"window",get:function(){return this.options.window}},{key:"document",get:function(){return this.options.document}},{key:"rootElement",get:function(){return this.options.rootElement}},{key:"setup",value:function(){var e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:"teardown",value:function(){var e,t=this.rootElement;void 0!==t&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(e=this.window)||void 0===e||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}},{key:"connectDragPreview",value:function(e,t,r){var n=this;return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),function(){n.sourcePreviewNodes.delete(e),n.sourcePreviewNodeOptions.delete(e)}}},{key:"connectDragSource",value:function(e,t,r){var n=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);var o=function(t){return n.handleDragStart(t,e)},i=function(e){return n.handleSelectStart(e)};return t.setAttribute("draggable","true"),t.addEventListener("dragstart",o),t.addEventListener("selectstart",i),function(){n.sourceNodes.delete(e),n.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",o),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}},{key:"connectDropTarget",value:function(e,t){var r=this,n=function(t){return r.handleDragEnter(t,e)},o=function(t){return r.handleDragOver(t,e)},i=function(t){return r.handleDrop(t,e)};return t.addEventListener("dragenter",n),t.addEventListener("dragover",o),t.addEventListener("drop",i),function(){t.removeEventListener("dragenter",n),t.removeEventListener("dragover",o),t.removeEventListener("drop",i)}}},{key:"addEventListeners",value:function(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}},{key:"removeEventListeners",value:function(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}},{key:"getCurrentSourceNodeOptions",value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return A({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}},{key:"getCurrentDropEffect",value:function(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}},{key:"getCurrentSourcePreviewNodeOptions",value:function(){var e=this.monitor.getSourceId();return A({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:"isDraggingNativeItem",value:function(){var e=this.monitor.getItemType();return Object.keys(n).some((function(t){return n[t]===e}))}},{key:"beginDragNativeItem",value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){var r=new k(_[e]);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:"setCurrentDragSourceNode",value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout((function(){var e;return null===(e=t.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",t.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}},{key:"clearCurrentDragSourceNode",value:function(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}},{key:"handleDragStart",value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}},{key:"handleDragEnter",value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:"handleDragOver",value:function(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:"handleDrop",value:function(e,t){this.dropTargetIds.unshift(t)}}])&&M(t.prototype,r),e}(),L=function(e,t,r){return new D(e,t,r)};function N(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;(i=new Error(t.replace(/%s/g,(function(){return n[a++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}function $(e,t,r){var n=r.getRegistry(),o=n.addTarget(e,t);return[o,function(){return n.removeTarget(o)}]}function F(e,t,r){var n=r.getRegistry(),o=n.addSource(e,t);return[o,function(){return n.removeSource(o)}]}var B=r(12244),U=r.n(B);function z(e){var t={};return Object.keys(e).forEach((function(r){var n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{var o=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(0,B.isValidElement)(t)){var n=t;return e(n,r),n}var o=t;!function(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}(o);var i=r?function(t){return e(t,r)}:e;return function(e,t){var r=e.ref;return N("string"!=typeof r,"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 <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,B.cloneElement)(e,{ref:function(e){W(r,e),W(t,e)}}):(0,B.cloneElement)(e,{ref:t})}(o,i)}}(n);t[r]=function(){return o}}})),t}function W(e,t){"function"==typeof e?e(t):e.current=t}function q(e){return q="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},q(e)}function H(e){return null!==e&&"object"===q(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function V(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],f=t[c];if(!1===(o=r?r.call(n,u,f,c):void 0)||void 0===o&&u!==f)return!1}return!0}function K(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function G(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),G(this,"hooks",z({dragSource:function(e,t){r.clearDragSource(),r.dragSourceOptions=t||null,H(e)?r.dragSourceRef=e:r.dragSourceNode=e,r.reconnectDragSource()},dragPreview:function(e,t){r.clearDragPreview(),r.dragPreviewOptions=t||null,H(e)?r.dragPreviewRef=e:r.dragPreviewNode=e,r.reconnectDragPreview()}})),G(this,"handlerId",null),G(this,"dragSourceRef",null),G(this,"dragSourceNode",void 0),G(this,"dragSourceOptionsInternal",null),G(this,"dragSourceUnsubscribe",void 0),G(this,"dragPreviewRef",null),G(this,"dragPreviewNode",void 0),G(this,"dragPreviewOptionsInternal",null),G(this,"dragPreviewUnsubscribe",void 0),G(this,"lastConnectedHandlerId",null),G(this,"lastConnectedDragSource",null),G(this,"lastConnectedDragSourceOptions",null),G(this,"lastConnectedDragPreview",null),G(this,"lastConnectedDragPreviewOptions",null),G(this,"backend",void 0),this.backend=t}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();t&&this.disconnectDragPreview(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!V(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!V(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}])&&K(t.prototype,r),e}();function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function J(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=!1,X=!1,ee=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,"internalMonitor",void 0),J(this,"sourceId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){N(!Q,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Q=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Q=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;N(!X,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return X=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{X=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&Y(t.prototype,r),e}();function te(e){return te="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},te(e)}function re(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function ne(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){var t;return"Symbol(react.forward_ref)"===(null==e||null===(t=e.$$typeof)||void 0===t?void 0:t.toString())}(e);var t}function oe(e){return"function"==typeof e}function ie(){}function ae(e){if(!function(e){return"object"===te(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 se(e,t){return"string"==typeof e||"symbol"===te(e)||!!t&&Array.isArray(e)&&e.every((function(e){return se(e,!1)}))}var le=r(52322),ce=(0,B.createContext)({dragDropManager:void 0});function ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pe(e,t,r){return t&&fe(e.prototype,t),r&&fe(e,r),e}function de(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var he=function(){function e(t){ue(this,e),de(this,"isDisposed",!1),de(this,"action",void 0),this.action=oe(t)?t:ie}return pe(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return Boolean(e&&oe(e.dispose))}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();de(he,"empty",{dispose:ie});var ge=function(){function e(){ue(this,e),de(this,"isDisposed",!1),de(this,"disposables",void 0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.disposables=r}return pe(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var r=this.disposables.indexOf(e);-1!==r&&(t=!0,this.disposables.splice(r,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),r=0;r<e;r++)t[r]=this.disposables[r];this.disposables=[];for(var n=0;n<e;n++)t[n].dispose()}}}]),e}(),me=function(){function e(){ue(this,e),de(this,"isDisposed",!1),de(this,"current",void 0)}return pe(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var r=this.current;this.current=e,r&&r.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}(),ye=r(73463),ve=r.n(ye);function be(e){return be="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},be(e)}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Se(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xe(e,t){return xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xe(e,t)}function _e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ke(e){var t=e.DecoratedComponent,r=e.createHandler,n=e.createMonitor,o=e.createConnector,i=e.registerHandler,a=e.containerDisplayName,s=e.getType,l=e.collect,c=e.options.arePropsEqual,u=void 0===c?V:c,f=t,p=t.displayName||t.name||"Component",d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}(g,e);var t,a,c,d,h=(c=g,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Oe(c);if(d){var r=Oe(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _e(e)}(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),Ee(_e(t=h.call(this,e)),"decoratedRef",(0,B.createRef)()),Ee(_e(t),"handlerId",void 0),Ee(_e(t),"manager",void 0),Ee(_e(t),"handlerMonitor",void 0),Ee(_e(t),"handlerConnector",void 0),Ee(_e(t),"handler",void 0),Ee(_e(t),"disposable",void 0),Ee(_e(t),"currentType",void 0),Ee(_e(t),"handleChange",(function(){var e=t.getCurrentState();V(e,t.state)||t.setState(e)})),t.disposable=new me,t.receiveProps(e),t.dispose(),t}return t=g,(a=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return N(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!u(e,this.props)||!V(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new me,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){u(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(s(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=(a=i(e,this.handler,this.manager),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?we(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=t[0],n=t[1];this.handlerId=r,this.handlerMonitor.receiveHandlerId(r),this.handlerConnector.receiveHandlerId(r);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[r]});this.disposable.setDisposable(new ge(new he(o),new he(n)))}var a,s}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?l(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return(0,le.jsx)(ce.Consumer,{children:function(t){var r=t.dragDropManager;return e.receiveDragDropManager(r),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){var t;return null===(t=e.handlerConnector)||void 0===t?void 0:t.reconnect()})),(0,le.jsx)(f,Object.assign({},e.props,e.getCurrentState(),{ref:ne(f)?e.decoratedRef:null}),void 0)}},void 0)}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(N(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",p,p),void 0!==e&&(this.manager=e,this.handlerMonitor=n(e),this.handlerConnector=o(e.getBackend()),this.handler=r(this.handlerMonitor,this.decoratedRef)))}}])&&Se(t.prototype,a),g}(B.Component);return Ee(d,"DecoratedComponent",t),Ee(d,"displayName","".concat(a,"(").concat(p,")")),ve()(d,t)}function Ce(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pe=["canDrag","beginDrag","isDragging","endDrag"],je=["beginDrag"],Re=function(){function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Te(this,"props",null),Te(this,"spec",void 0),Te(this,"monitor",void 0),Te(this,"ref",void 0),Te(this,"beginDrag",(function(){if(o.props)return o.spec.beginDrag(o.props,o.monitor,o.ref.current)})),this.spec=t,this.monitor=r,this.ref=n}var t,r;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,re(this.ref))}}])&&Ce(t.prototype,r),e}();function Ae(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ie=!1,De=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Me(this,"internalMonitor",void 0),Me(this,"targetId",null),this.internalMonitor=t.getMonitor()}var t,r;return t=e,(r=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;N(!Ie,"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 Ie=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ie=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&Ae(t.prototype,r),e}();function Le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $e=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ne(this,"hooks",z({dropTarget:function(e,t){r.clearDropTarget(),r.dropTargetOptions=t,H(e)?r.dropTargetRef=e:r.dropTargetNode=e,r.reconnect()}})),Ne(this,"handlerId",null),Ne(this,"dropTargetRef",null),Ne(this,"dropTargetNode",void 0),Ne(this,"dropTargetOptionsInternal",null),Ne(this,"unsubscribeDropTarget",void 0),Ne(this,"lastConnectedHandlerId",null),Ne(this,"lastConnectedDropTarget",null),Ne(this,"lastConnectedDropTargetOptions",null),Ne(this,"backend",void 0),this.backend=t}var t,r;return t=e,(r=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"reconnect",value: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)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!V(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}])&&Le(t.prototype,r),e}();function Fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Be(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ue=["canDrop","hover","drop"],ze=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Be(this,"props",null),Be(this,"spec",void 0),Be(this,"monitor",void 0),Be(this,"ref",void 0),this.spec=t,this.monitor=r,this.ref=n}var t,r;return t=e,(r=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.props&&this.spec.hover(this.props,this.monitor,re(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&Fe(t.prototype,r),e}();var We="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",He="dnd-core/PUBLISH_DRAG_SOURCE",Ve="dnd-core/HOVER",Ke="dnd-core/DROP",Ge="dnd-core/END_DRAG";function Ze(e,t){return{type:We,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Ye(e){return Ye="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},Ye(e)}function Je(e){return"object"===Ye(e)}var Qe={type:We,payload:{clientOffset:null,sourceClientOffset:null}};function Xe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,o=void 0===n||n,i=r.clientOffset,a=r.getSourceClientOffset,s=e.getMonitor(),l=e.getRegistry();e.dispatch(Ze(i)),function(e,t,r){N(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){N(r.getSource(e),"Expected sourceIds to be registered.")}))}(t,s,l);var c=function(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}(t,s);if(null!==c){var u=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){N("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(c)}e.dispatch(Ze(i,u));var f=l.getSource(c).beginDrag(s,c);if(null!=f){!function(e){N(Je(e),"Item must be an object.")}(f),l.pinSource(c);var p=l.getSourceType(c);return{type:qe,payload:{itemType:p,item:f,sourceId:c,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!o}}}}else e.dispatch(Qe)}}function et(e){return function(){if(e.getMonitor().isDragging())return{type:He}}}function tt(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function rt(e){return function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).clientOffset;!function(e){N(Array.isArray(e),"Expected targetIds to be an array.")}(t);var n=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,r){N(t.isDragging(),"Cannot call hover while not dragging."),N(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var o=e[n];N(e.lastIndexOf(o)===n,"Expected targetIds to be unique in the passed array."),N(r.getTarget(o),"Expected targetIds to be registered.")}}(n,o,i),function(e,t,r){for(var n=e.length-1;n>=0;n--){var o=e[n];tt(t.getTargetType(o),r)||e.splice(n,1)}}(n,i,o.getItemType()),function(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}(n,o,i),{type:Ve,payload:{targetIds:n,clientOffset:r||null}}}}function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){it(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function at(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();!function(e){N(e.isDragging(),"Cannot call drop while not dragging."),N(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(r);var o=function(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(r);o.forEach((function(o,i){var a=function(e,t,r,n){var o=r.getTarget(e),i=o?o.drop(n,e):void 0;return function(e){N(void 0===e||Je(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:n.getDropResult()),i}(o,i,n,r),s={type:Ke,payload:{dropResult:ot(ot({},t),a)}};e.dispatch(s)}))}}function st(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){N(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var n=t.getSourceId();return null!=n&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:Ge}}}function lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ut=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ct(this,"store",void 0),ct(this,"monitor",void 0),ct(this,"backend",void 0),ct(this,"isSetUp",!1),ct(this,"handleRefCountChange",(function(){var e=n.store.getState().refCount>0;n.backend&&(e&&!n.isSetUp?(n.backend.setup(),n.isSetUp=!0):!e&&n.isSetUp&&(n.backend.teardown(),n.isSetUp=!1))})),this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}var t,r;return t=e,r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:Xe(e),publishDragSource:et(e),hover:rt(e),drop:at(e),endDrag:st(e)}}(this);return Object.keys(r).reduce((function(n,o){var i,a=r[o];return n[o]=(i=a,function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];var a=i.apply(e,n);void 0!==a&&t(a)}),n}),{})}},{key:"dispatch",value:function(e){this.store.dispatch(e)}}],r&<(t.prototype,r),e}(),ft=r(74081),pt=function(e,t){return e===t};function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function yt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mt,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case We:case qe:return{initialSourceClientOffset:o.sourceClientOffset,initialClientOffset:o.clientOffset,clientOffset:o.clientOffset};case Ve:return e=r.clientOffset,t=o.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:ht(ht({},r),{},{clientOffset:o.clientOffset});case Ge:case Ke:return mt;default:return r}}var vt="dnd-core/ADD_SOURCE",bt="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",St="dnd-core/REMOVE_TARGET";function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){Ot(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ot(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Et={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function kt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Et,n=arguments.length>1?arguments[1]:void 0,o=n.payload;switch(n.type){case qe:return _t(_t({},r),{},{itemType:o.itemType,item:o.item,sourceId:o.sourceId,isSourcePublic:o.isSourcePublic,dropResult:null,didDrop:!1});case He:return _t(_t({},r),{},{isSourcePublic:!0});case Ve:return _t(_t({},r),{},{targetIds:o.targetIds});case St:return-1===r.targetIds.indexOf(o.targetId)?r:_t(_t({},r),{},{targetIds:(e=r.targetIds,t=o.targetId,e.filter((function(e){return e!==t})))});case Ke:return _t(_t({},r),{},{dropResult:o.dropResult,didDrop:!0,targetIds:[]});case Ge:return _t(_t({},r),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function Ct(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case vt:case bt:return e+1;case wt:case St:return e-1;default:return e}}var Tt=[],Pt=[];function jt(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ve:break;case vt:case bt:case St:case wt:return Tt;default:return Pt}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,o=t.prevTargetIds,i=void 0===o?[]:o,a=function(e,t){var r=new Map,n=function(e){r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var o=[];return r.forEach((function(e,t){1===e&&o.push(t)})),o}(n,i),s=a.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:pt;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}(n,i);if(!s)return Tt;var l=i[i.length-1],c=n[n.length-1];return l!==c&&(l&&a.push(l),c&&a.push(c)),a}function Rt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)+1}function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?At(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dt(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:jt(r.dirtyHandlerIds,{type:n.type,payload:Mt(Mt({},n.payload),{},{prevTargetIds:(e=r,"dragOperation.targetIds",t=[],"dragOperation.targetIds".split(".").reduce((function(e,r){return e&&e[r]?e[r]:t||null}),e))})}),dragOffset:yt(r.dragOffset,n),refCount:Ct(r.refCount,n),dragOperation:kt(r.dragOperation,n),stateId:Rt(r.stateId)}}function Lt(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Tt.__IS_NONE__=!0,Pt.__IS_ALL__=!0;var Ft,Bt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$t(this,"store",void 0),$t(this,"registry",void 0),this.store=t,this.registry=r}var t,r;return t=e,r=[{key:"subscribeToStateChange",value:function(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0}).handlerIds;N("function"==typeof e,"listener must be a function."),N(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");var n=this.store.getState().stateId;return this.store.subscribe((function(){var o=t.store.getState(),i=o.stateId;try{var a=i===n||i===n+1&&!function(e,t){return e!==Tt&&(e===Pt||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}(o.dirtyHandlerIds,r);a||e()}finally{n=i}}))}},{key:"subscribeToOffsetChange",value:function(e){var t=this;N("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return N(t,"Expected to find a valid source. sourceId=".concat(e)),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return N(t,"Expected to find a valid target. targetId=".concat(e)),!(!this.isDragging()||this.didDrop())&&tt(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return N(t,"Expected to find a valid source. sourceId=".concat(e)),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){if(!e)return!1;var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1}).shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),n=this.getItemType();if(n&&!tt(r,n))return!1;var o=this.getTargetIds();if(!o.length)return!1;var i=o.indexOf(e);return t?i===o.length-1:i>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset,t&&r&&n?Lt(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,n),r):null;var e,t,r,n}},{key:"getDifferenceFromInitialOffset",value:function(){return t=(e=this.store.getState().dragOffset).clientOffset,r=e.initialClientOffset,t&&r?Lt(t,r):null;var e,t,r}}],r&&Nt(t.prototype,r),e}(),Ut=0;function zt(e){return zt="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},zt(e)}function Wt(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Wt(e,!1)})):N("string"==typeof e||"symbol"===zt(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(Ft||(Ft={}));const qt="undefined"!=typeof global?global:self,Ht=qt.MutationObserver||qt.WebKitMutationObserver;function Vt(e){return function(){const t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}const Kt="function"==typeof Ht?function(e){let t=1;const r=new Ht(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}:Vt;class Gt{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const Zt=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,r=e.length-this.index;t<r;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Kt(this.flush),this.requestErrorThrow=Vt((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Yt=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new Gt(this.onError,(e=>t[t.length]=e));return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(Zt.registerPendingError);function Jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function er(e){switch(e[0]){case"S":return Ft.SOURCE;case"T":return Ft.TARGET;default:N(!1,"Cannot parse handler ID: ".concat(e))}}function tr(e,t){var r,n,o=e.entries(),i=!1;do{var a=o.next(),s=a.done;if((r=a.value,n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xt(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]===t)return!0;i=!!s}while(!i);return!1}var rr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Qt(this,"types",new Map),Qt(this,"dragSources",new Map),Qt(this,"dropTargets",new Map),Qt(this,"pinnedSourceId",null),Qt(this,"pinnedSource",null),Qt(this,"store",void 0),this.store=t}var t,r;return t=e,r=[{key:"addSource",value:function(e,t){Wt(e),function(e){N("function"==typeof e.canDrag,"Expected canDrag to be a function."),N("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),N("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);var r=this.addHandler(Ft.SOURCE,e,t);return this.store.dispatch(function(e){return{type:vt,payload:{sourceId:e}}}(r)),r}},{key:"addTarget",value:function(e,t){Wt(e,!0),function(e){N("function"==typeof e.canDrop,"Expected canDrop to be a function."),N("function"==typeof e.hover,"Expected hover to be a function."),N("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);var r=this.addHandler(Ft.TARGET,e,t);return this.store.dispatch(function(e){return{type:bt,payload:{targetId:e}}}(r)),r}},{key:"containsHandler",value:function(e){return tr(this.dragSources,e)||tr(this.dropTargets,e)}},{key:"getSource",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return N(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:"getTarget",value:function(e){return N(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return N(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return N(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return er(e)===Ft.SOURCE}},{key:"isTargetId",value:function(e){return er(e)===Ft.TARGET}},{key:"removeSource",value:function(e){var t,r=this;N(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:wt,payload:{sourceId:e}}}(e)),t=function(){r.dragSources.delete(e),r.types.delete(e)},Zt.enqueueTask(Yt.create(t))}},{key:"removeTarget",value:function(e){N(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:St,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);N(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){N(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var n=function(e){var t=(Ut++).toString();switch(e){case Ft.SOURCE:return"S".concat(t);case Ft.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}(e);return this.types.set(n,t),e===Ft.SOURCE?this.dragSources.set(n,r):e===Ft.TARGET&&this.dropTargets.set(n,r),n}}],r&&Jt(t.prototype,r),e}();function nr(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__,(0,ft.MT)(Dt,t&&r&&r({name:"dnd-core",instanceId:"dnd-core"}))),a=new Bt(i,new rr(i)),s=new ut(i,a),l=e(s,n,o);return s.receiveBackend(l),s}var or=["children"];function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ar=0,sr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lr=(0,B.memo)((function(e){var t,r,n=e.children,o=function(e){if("manager"in e)return[{dragDropManager:e.manager},!1];var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=t;return o[sr]||(o[sr]={dragDropManager:nr(e,t,r,n)}),o[sr]}(e.backend,e.context,e.options,e.debugMode);return[t,!e.context]}(function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,or)),i=(r=2,function(e){if(Array.isArray(e))return e}(t=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return ir(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,B.useEffect)((function(){if(s){var e=cr();return++ar,function(){0==--ar&&(e[sr]=null)}}}),[]),(0,le.jsx)(ce.Provider,Object.assign({value:a},{children:n}),void 0)}));function cr(){return void 0!==r.g?r.g:window}var ur=r(32673),fr=r.n(ur),pr=r(62797);const dr=["namespace"],hr=["children","isDragging","connectDragComponent"],gr=["onDrop","namespace"];function mr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function yr(e){let{namespace:t}=e,r=mr(e,dr);const n=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(N(se(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),N(ae(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var i=function(e){return Object.keys(e).forEach((function(t){N(Pe.indexOf(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',Pe.join(", "),t),N("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])})),je.forEach((function(t){N("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,r){return new Re(e,t,r)}}(t);return N("function"==typeof r,'Expected "collect" provided as the third argument to DragSource 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/drag-source',r),N(ae(n),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',r),function(e){return ke({containerDisplayName:"DragSource",createHandler:i,registerHandler:F,createConnector:function(e){return new Z(e)},createMonitor:function(e){return new ee(e)},DecoratedComponent:e,getType:o,collect:r,options:n})}}(t,{beginDrag(e){let{children:t,isDragging:r,connectDragComponent:n}=e;return mr(e,hr)}},(e=>({connectDragComponent:e.dragSource()})))((({children:e,connectDragComponent:t})=>e(t)));return U().createElement(n,r,r.children)}function vr(e){let{onDrop:t,namespace:r}=e,n=mr(e,gr);const o=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(N(se(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),o=function(){return e}),N(ae(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 i=function(e){return Object.keys(e).forEach((function(t){N(Ue.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',Ue.join(", "),t),N("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,r){return new ze(e,t,r)}}(t);return N("function"==typeof r,'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',r),N(ae(n),'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',r),function(e){return ke({containerDisplayName:"DropTarget",createHandler:i,registerHandler:$,createMonitor:function(e){return new De(e)},createConnector:function(e){return new $e(e)},DecoratedComponent:e,getType:o,collect:r,options:n})}}(r,{drop(e,r){t(r.getItem())}},((e,t)=>({connectDropTarget:e.dropTarget(),isHovered:t.isOver()})))((({children:e,connectDropTarget:t,isHovered:r})=>e(t,{isHovered:r})));return U().createElement(o,n,n.children)}function br(e){return class extends U().Component{render(){return(0,pr.jsx)(lr,{backend:L},(0,pr.jsx)(e,this.props))}}}yr.propTypes={namespace:fr().any.isRequired,children:fr().func.isRequired},vr.propTypes={onDrop:fr().func.isRequired,namespace:fr().any.isRequired,children:fr().func.isRequired};var wr=r(34601),Sr=r(36585),xr=r.n(Sr),_r=r(9316),Or=r(60155),Er=r.n(Or),kr=r(85411),Cr=r(24688),Tr=r(53327),Pr=r(67129);const jr=/\s+at.*[(\s](.*)\)?/,Rr=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,Ar=void 0===Pr.homedir?"":Pr.homedir().replace(/\\/g,"/");function Mr(e,{pretty:t=!1,basePath:r}={}){const n=r&&new RegExp(`(at | \\()${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(r.replace(/\\/g,"/"))}`,"g");if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(jr);if(null===t||!t[1])return!0;const r=t[1];return!(r.includes(".app/Contents/Resources/electron.asar")||r.includes(".app/Contents/Resources/default_app.asar")||r.includes("node_modules/electron/dist/resources/electron.asar")||r.includes("node_modules/electron/dist/resources/default_app.asar")||Rr.test(r))})).filter((e=>""!==e.trim())).map((e=>(n&&(e=e.replace(n,"$1")),t&&(e=e.replace(jr,((e,t)=>e.replace(t,t.replace(Ar,"~"))))),e))).join("\n")}function Ir(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Dr="https://github.com/decaporg/decap-cms/issues/new?";function Lr({title:e,config:t}){try{const r=function({config:e}){let t="";"string"==typeof DECAP_CMS_VERSION?t=`decap-cms@${DECAP_CMS_VERSION}`:"string"==typeof DECAP_CMS_APP_VERSION&&(t=`decap-cms-app@${DECAP_CMS_APP_VERSION}`);const r=function({version:e,provider:t,browser:r,config:n}){return`\n**Describe the bug**\n\n**To Reproduce**\n\n**Expected behavior**\n\n**Screenshots**\n\n**Applicable Versions:**\n - Decap CMS version: \`${e}\`\n - Git provider: \`${t}\`\n - Browser version: \`${r}\`\n\n**CMS configuration**\n\`\`\`\n${n}\n\`\`\`\n\n**Additional context**\n`}({version:t,provider:e.backend.name,browser:navigator.userAgent,config:Er().stringify(e)});return r}({config:t}),n=new URLSearchParams;return n.append("title",xr()(e,{length:100})),n.append("body",xr()(r,{length:4e3,omission:"\n..."})),n.append("labels","type: bug"),`${Dr}${n.toString()}`}catch(e){return console.log(e),`${Dr}template=bug_report.md`}}const Nr=(0,wr.Z)("div",{target:"emw4gx70",label:"ErrorBoundaryContainer"})("padding:40px;h1{font-size:28px;color:",Tr.colors.text,";}h2{font-size:20px;}strong{color:",Tr.colors.textLead,";font-weight:500;}hr{width:200px;margin:30px 0;border:0;height:1px;background-color:",Tr.colors.text,";}a{color:",Tr.colors.active,";}"),$r=(0,wr.Z)("span",{target:"emw4gx71",label:"PrivacyWarning"})("color:",Tr.colors.text,";"),Fr=(0,wr.Z)("button",{target:"emw4gx72",label:"CopyButton"})(Tr.buttons.button,";",Tr.buttons.default,";",Tr.buttons.gray,";display:block;margin:12px 0;");function Br({entry:e,t}){return console.log(e),(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)("hr",null),(0,pr.jsx)("h2",null,t("ui.errorBoundary.recoveredEntry.heading")),(0,pr.jsx)("strong",null,t("ui.errorBoundary.recoveredEntry.warning")),(0,pr.jsx)(Fr,{onClick:()=>(0,kr.Z)(e)},t("ui.errorBoundary.recoveredEntry.copyButtonLabel")),(0,pr.jsx)("pre",null,(0,pr.jsx)("code",null,e)))}class Ur extends U().Component{constructor(...e){super(...e),Ir(this,"state",{hasError:!1,errorMessage:"",errorTitle:"",backup:""})}static getDerivedStateFromError(e){return console.error(e),{hasError:!0,errorMessage:Mr(e.stack,{basePath:window.location.origin||""}),errorTitle: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 Cr.localForage.getItem("backup");e&&console.log(e),this.setState({backup:e})}}render(){const{hasError:e,errorMessage:t,backup:r,errorTitle:n}=this.state,{showBackup:o,t:i}=this.props;return e?(0,pr.jsx)(Nr,null,(0,pr.jsx)("h1",null,i("ui.errorBoundary.title")),(0,pr.jsx)("p",null,(0,pr.jsx)("span",null,i("ui.errorBoundary.details")),(0,pr.jsx)("a",{href:Lr({title:n,config:this.props.config}),target:"_blank",rel:"noopener noreferrer","data-testid":"issue-url"},i("ui.errorBoundary.reportIt"))),(0,pr.jsx)("p",null,i("ui.errorBoundary.privacyWarning").split("\n").map(((e,t)=>(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)($r,{key:t},e),(0,pr.jsx)("br",null))))),(0,pr.jsx)("hr",null),(0,pr.jsx)("h2",null,i("ui.errorBoundary.detailsHeading")),(0,pr.jsx)("p",null,t),r&&o&&(0,pr.jsx)(Br,{entry:r,t:i})):this.props.children}}Ir(Ur,"propTypes",{children:fr().node,t:fr().func.isRequired,config:fr().object.isRequired});const zr=(0,_r.Iu)()(Ur);function Wr({label:e,imagesOnly:t,onChange:r,disabled:n,className:o}){return(0,pr.jsx)("label",{tabIndex:"0",className:`nc-fileUploadButton ${o||""}`},(0,pr.jsx)("span",null,e),(0,pr.jsx)("input",{type:"file",accept:t?"image/*":"*/*",onChange:r,disabled:n}))}Wr.propTypes={className:fr().string,label:fr().string.isRequired,imagesOnly:fr().bool,onChange:fr().func.isRequired,disabled:fr().bool};var qr=r(37149),Hr=r.n(qr),Vr={name:"1o9c9d2-ReactModalGlobalStyles",styles:".ReactModal__Body--open{overflow:hidden;};label:ReactModalGlobalStyles;"};function Kr(){return(0,pr.jsx)(pr.Global,{styles:Vr})}const Gr=`\n ${Tr.shadows.dropDeep};\n background-color: #fff;\n border-radius: ${Tr.lengths.borderRadius};\n height: 80%;\n text-align: center;\n max-width: 2200px;\n padding: 20px;\n\n &:focus {\n outline: none;\n }\n `,Zr=`\n z-index: ${Tr.zIndex.zIndex99999};\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 ${Tr.transitions.main}, opacity ${Tr.transitions.main};\n `;class Yr extends U().Component{componentDidMount(){Hr().setAppElement("#nc-root")}render(){const{isOpen:e,children:t,className:r,onClose:n}=this.props;return(0,pr.jsx)(U().Fragment,null,(0,pr.jsx)(Kr,null),(0,pr.jsx)(pr.ClassNames,null,(({css:o,cx:i})=>(0,pr.jsx)(Hr(),{isOpen:e,onRequestClose:n,closeTimeoutMS:300,className:{base:i(o`
|
|
24
24
|
${Gr};
|
|
25
25
|
`,r),afterOpen:"",beforeClose:""},overlayClassName:{base:o`
|
|
26
26
|
${Zr};
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
|| ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=l.Correct){const o=n===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return n===l.Correct?i:(0,a.not)(i);function s(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function p(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let o;const i=(0,s.toHash)(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=(0,a.and)(o,f(e,t,r,n));return o}t.checkDataType=f,t.checkDataTypes=p;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,d)}t.reportTypeError=h},90313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(93487),o=r(76776);function i(e,t,r){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===r)return;const c=n._`${s}${(0,n.getProperty)(t)}`;if(a)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),i.if(u,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},74815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(55667),o=r(50453),i=r(58876),a=r(50453),s=r(90313),l=r(95005),c=r(13099),u=r(93487),f=r(22141),p=r(32531),d=r(76776),h=r(4181);function g({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${m(r,o)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,u._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,u._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,u._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,u._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,u._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,u._`""`),e.var(f.default.parentData,u._`undefined`),e.var(f.default.parentDataProperty,u._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${f.default.data}, ${function(e){return u._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?u._`, ${f.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(m(r,o)).code(i)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return x(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);x(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function S({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${f.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${f.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function x(e,t,r,n){const{gen:o,schema:s,data:l,allErrors:c,opts:p,self:h}=e,{RULES:g}=h;function m(d){(0,i.shouldUseGroup)(s,d)&&(d.type?(o.if((0,a.checkDataType)(d.type,l,p.strictNumbers)),_(e,d),1===t.length&&t[0]===d.type&&r&&(o.else(),(0,a.reportTypeError)(e)),o.endIf()):_(e,d),c||o.if(u._`${f.default.errors} === ${n||0}`))}!s.$ref||!p.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(s,g)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{O(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)O(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&E(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of g.rules)m(e);m(g.post)}))):o.block((()=>C(e,"$ref",g.all.$ref.definition)))}function _(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,s.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&C(e,r.keyword,r.definition,t.type)}))}function O(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;g(e,(()=>{r.$comment&&t.$comment&&S(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(u._`new ${o}(${f.default.vErrors})`))):(t.assign(u._`${n}.errors`,f.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${f.default.errors} === 0`))}(e)}))}(e):g(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class k{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",j(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,a.checkDataTypes)(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),y(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&S(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",f.default.errors);w(e,i),n.var(t,u._`${i} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function C(e,t,r,n){const o=new k(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,l.funcKeywordCode)(o,r):"macro"in r?(0,l.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(o,r)}t.KeywordCxt=k;const T=/^\/(?:[^~]|~0|~1)*$/,P=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return f.default.rootData;if("/"===e[0]){if(!T.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=f.default.rootData}else{const a=P.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(o=a[2],"#"===o){if(s>=t)throw new Error(l("property/index",s));return n[t-s]}if(s>t)throw new Error(l("data",s));if(i=r[t-s],!o)return i}let a=i;const s=o.split("/");for(const e of s)e&&(i=u._`${i}${(0,u.getProperty)((0,d.unescapeJsonPointer)(e))}`,a=u._`${a} && ${i}`);return a;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=j},95005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(93487),o=r(22141),i=r(10412),a=r(4181);function s(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:a,it:s}=e,c=t.macro.call(s.self,i,a,s),u=l(r,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:f,parentSchema:p,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const g=!d&&t.compile?t.compile.call(h.self,f,p,h):t.validate,m=l(c,u,g),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!d||!1===t.schema);c.assign(y,n._`${r}${(0,i.callValidateCode)(e,m,a,s)}`,t.modifying)}function b(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&s(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${m}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&s(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,a.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},13099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(93487),o=r(76776);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:a,errSchemaPath:s,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===a||void 0===s||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:a,dataTypes:s,propertyName:l}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:l}=t;u(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${a}${(0,o.getErrorPath)(r,i,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==a&&(u(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},27159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(74815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(93487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(67426),a=r(6646),s=r(13141),l=r(25173),c=r(93487),u=r(32531),f=r(50453),p=r(76776),d=r(64775),h=r(43589),g=(e,t)=>new RegExp(e,t);g.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,o,i,a,s,l,c,u,f,p,d,m,y,v,b,w,S,x,_,O,E,k,C;const T=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===P||void 0===P?1:P||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:g,A=null!==(o=e.uriResolver)&&void 0!==o?o:h.default;return{strictSchema:null===(a=null!==(i=e.strictSchema)&&void 0!==i?i:T)||void 0===a||a,strictNumbers:null===(l=null!==(s=e.strictNumbers)&&void 0!==s?s:T)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:T)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(f=e.strictTuples)&&void 0!==f?f:T)&&void 0!==p?p:"log",strictRequired:null!==(m=null!==(d=e.strictRequired)&&void 0!==d?d:T)&&void 0!==m&&m,code:e.code?{...e.code,optimize:j,regExp:R}:{optimize:j,regExp:R},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(x=e.schemaId)&&void 0!==x?x:"$id",addUsedSchema:null===(_=e.addUsedSchema)||void 0===_||_,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(k=e.unicodeRegExp)||void 0===k||k,int32range:null===(C=e.int32range)||void 0===C||C,uriResolver:A}}class S{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,v,e,"NOT SUPPORTED"),x.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=C.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),O.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=_.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=_.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>R.call(this,e))),this;M.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=D(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;r=(0,u.normalizeId)(i||r);const c=u.getSchemaRefs.call(this,e,r);return s=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function _(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function O(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function C(){const e={...this.opts};for(const t of m)delete e[t];return e}t.default=S,S.ValidationError=i.default,S.MissingRefError=a.default;const T={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function R(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let a=o?i.post:i.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?A.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function A(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const I={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,I]}}},43510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(69378);n.code='require("ajv/dist/runtime/equal").default',t.default=n},74499:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},43589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(12854);n.code='require("ajv/dist/runtime/uri").default',t.default=n},67426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(93487),o=r(76776),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:i,data:a,keyword:s,it:l}=e;l.items=!0;const c=r.const("len",n._`${a}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(l,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},i),l.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=a,t.default=i},69351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i=r(22141),a=r(76776),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,a.alwaysValidSchema)(u,r))return;const d=(0,n.allSchemaProperties)(s.properties),h=(0,n.allSchemaProperties)(s.patternProperties);function g(e){t.code(o._`delete ${l}[${e}]`)}function m(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)g(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,a.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(y(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),g(n)}))):(y(n,r),f||t.if((0,o.not)(r),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",l,(r=>{d.length||h.length?t.if(function(r){let i;if(d.length>8){const e=(0,a.schemaRefOrVal)(u,s.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=d.length?(0,o.or)(...d.map((e=>o._`${r} === ${e}`))):o.nil;return h.length&&(i=(0,o.or)(i,...h.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>m(r))):m(r)})),e.ok(o._`${c} === ${i.default.errors}`)}};t.default=s},71125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(a)}))}};t.default=o},50019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(10412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},79864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:a,it:s}=e;let l,c;const{minContains:u,maxContains:f}=i;s.opts.next?(l=void 0===u?1:u,c=f):l=1;const p=t.const("len",n._`${a}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,o.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,o.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(s,r)){let t=n._`${p} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}s.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);g(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(d,!1).break())),1===l?t.assign(d,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(d,!0))))}(r)))))}function g(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===l?g(d,(()=>t.if(d,(()=>t.break())))):0===l?(t.let(d,!0),void 0!==c&&t.if(n._`${a}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=i},67772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(93487),o=r(76776),i=r(10412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
|
|
44
44
|
missingProperty: ${o},
|
|
45
45
|
depsCount: ${t},
|
|
46
|
-
deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),l(e,r)}};function s(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,i.propertyInData)(r,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(u,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,i.checkMissingProp)(e,c,s)})`),(0,i.reportMissingProp)(e,s),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,l=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(s,t[c])||(r.if((0,i.propertyInData)(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},89434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,f("then",r),f("else",r))}else s?t.if(u,f("then")):t.if((0,n.not)(u),f("else"));function f(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),o=r(72924),i=r(64665),a=r(1119),s=r(79864),l=r(67772),c=r(33708),u=r(69351),f=r(76239),p=r(12296),d=r(15697),h=r(50019),g=r(14200),m=r(71125),y=r(89434),v=r(66552);t.default=function(e=!1){const t=[d.default,h.default,g.default,m.default,y.default,v.default,c.default,u.default,l.default,f.default,p.default];return e?t.push(o.default,a.default):t.push(n.default,i.default),t.push(s.default),t}},64665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(93487),o=r(76776),i=r(10412),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function s(e,t,r=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const u=i.name("valid"),f=i.const("len",n._`${s}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(i.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(10412),a=r(4783),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(s?(0,a.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}};t.default=s},15697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},14200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&i.discriminator)return;const s=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,i)=>{let s;(0,o.alwaysValidSchema)(a,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},12296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i=r(76776),a=r(76776),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:l,it:c}=e,{opts:u}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:g}=c;function m(e){for(const t in d)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",s,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==g?t.assign(o._`${g}[${i}]`,!0):n||c.allErrors||t.if((0,o.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&m(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},72924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64665),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},76239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(74815),o=r(10412),i=r(76776),a=r(69351),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),c.props));const f=u.filter((e=>!(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,o.propertyInData)(t,l,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=s},33708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:a}=e;if((0,o.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=i},66552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},10412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(93487),o=r(76776),i=r(22141),a=r(76776);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function l(e,t,r){return n._`${s(e)}.call(${t}, ${r})`}function c(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(l(e,t,r))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(c(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=l,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${l(e,t,r)}`:i},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:a,errorPath:s},it:l},c,u,f){const p=f?n._`${e}, ${t}, ${o}${a}`:t,d=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,s)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return u!==n.nil?n._`${c}.call(${u}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,o);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:n._`${"new RegExp"===i.code?f:(0,a.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(a){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},s),t.if((0,n.not)(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},l);t.assign(s,n._`${s} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,n.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},78386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},95684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78386),o=r(28280),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},28280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),o=r(10412),i=r(93487),a=r(22141),s=r(25173),l=r(76776),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:a,schemaEnv:l,validateName:c,opts:p,self:d}=o,{root:h}=l;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(l===h)return f(e,c,l,l.$async);const r=t.scopeValue("root",{ref:h});return f(e,i._`${r}.validate`,h,h.$async)}();const g=s.resolveRef.call(d,h,a,r);if(void 0===g)throw new n.default(o.opts.uriResolver,a,r);return g instanceof s.SchemaEnv?function(t){const r=u(e,t);f(e,r,t,t.$async)}(g):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(g)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:f,opts:p}=c,d=p.passContext?a.default.this:i.nil;function h(e){const t=i._`${e}.errors`;s.assign(a.default.vErrors,i._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,i._`${a.default.vErrors}.length`)}function g(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(s,n.props,c.props));else{const t=s.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,i.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(i._`await ${(0,o.callValidateCode)(e,t,d)}`),g(t),u||s.assign(r,!0)}),(e=>{s.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,d),(()=>g(t)),(()=>h(t)))}t.getValidate=u,t.callRef=f,t.default=c},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(89306),i=r(25173),a=r(76776),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:l,it:c}=e,{oneOf:u}=l;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=s.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;t<u.length;t++){let l=u[t];(null==l?void 0:l.$ref)&&!(0,a.schemaHasRulesButRef)(l,c.self.RULES)&&(l=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==l?void 0:l.$ref),l instanceof i.SchemaEnv&&(l=l.schema));const p=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||o(l)),s(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=s},89306:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},93924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95684),o=r(62649),i=r(8200),a=r(39502),s=r(66167),l=[n.default,o.default,(0,i.default)(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},89651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:f,self:p}=l;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),a=r.const("fDef",n._`${i}[${s}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(l,n._`${a}.type || "string"`).assign(u,n._`${a}.validate`)),(()=>r.assign(l,n._`"string"`).assign(u,a))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${s} && !${u}`,function(){const e=f.$async?n._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const i=p.formats[a];if(!i)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===i)return;const[s,l,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,o=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);s===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${o})`}return"function"==typeof l?n._`${d}(${o})`:n._`${d}.test(${o})`}())}())}};t.default=o},39502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(89651).default];t.default=n},66167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},64693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(43510),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:s,schema:l}=e;a||l&&"object"==typeof l?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${s})`):e.fail(n._`${l} !== ${r}`)}};t.default=a},30966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(43510),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:s,schemaCode:l,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,o.useFunc)(t,i.default);let d;if(u||a)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",l,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);d=(0,n.or)(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(d)}};t.default=a},62649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83983),o=r(90430),i=r(93229),a=r(74336),s=r(90498),l=r(33301),c=r(31687),u=r(82958),f=r(64693),p=r(30966),d=[n.default,o.default,i.default,a.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},31687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},93229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(74499),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:s}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${l} ${a}`)}};t.default=a},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=s},90498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},90430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${o} === 0 || (${s} = ${r}/${o}, ${l}))`)}};t.default=o},74336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:a,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${a}, ${l}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},33301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i=r(76776),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===r.length)return;const f=r.length>=u.loopRequired;if(c.allErrors?function(){if(f||l)e.block$data(o.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(f||l){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(i,(0,n.propertyInData)(t,s,r,u.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,u.ownProperties),(()=>e.error()))}))}}};t.default=a},82958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(50453),o=r(93487),i=r(76776),a=r(43510),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:l,parentSchema:c,schemaCode:u,it:f}=e;if(!s&&!l)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(i,a){const s=t.name("item"),l=(0,n.checkDataTypes)(d,s,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(s,o._`${r}[${i}]`),t.if(l,o._`continue`),d.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,o._`${c}[${s}]`),e.error(),t.assign(p,!1).break()})).code(o._`${c}[${s}] = ${i}`)}))}function g(n,s){const l=(0,i.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${s} = ${n}; ${s}--;`,(()=>t.if(o._`${l}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:g)(n,i)))}),o._`${u} === false`),e.ok(p)}};t.default=s},49461:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,i,a,s,l,c,u,f){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,a,s,l,c,u,f),i){var d=i[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,o,d[h],a+"/"+p+"/"+h,s,a,p,i,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var g in d)r(e,n,o,d[g],a+"/"+p+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),s,a,p,i,g)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,d,a+"/"+p,s,a,p,i)}o(i,a,s,l,c,u,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},12244:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__12244__},53741:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__53741__},62797:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__62797__},34106:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__34106__},78841:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__78841__},18815:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__18815__},32673:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__32673__},24688:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__24688__},75976:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__75976__},53327:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__53327__},67129:()=>{},68906:()=>{},53260:()=>{},57267:()=>{},59255:()=>{},69738:(e,t,r)=>{"use strict";var n=r(67286),o=r(62680),i=n("%TypeError%"),a=r(36013),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");e.exports=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(e,t,r)}},14989:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(99500),i=r(34749),a=r(87919);e.exports=function(e,t){if("Object"!==a(e))throw new n("Assertion failed: Type(O) is not Object");if(!i(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},60845:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(34749),i=r(87919);e.exports=function(e,t){if("Object"!==i(e))throw new n("Assertion failed: `O` must be an Object");if(!o(t))throw new n("Assertion failed: `P` must be a Property Key");return t in e}},36013:(e,t,r)=>{"use strict";e.exports=r(27595)},2685:(e,t,r)=>{"use strict";e.exports=r(9680)},34749:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},98529:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(14989),i=r(55590),a=r(87919);e.exports=function(e){if("Object"!==a(e))throw new n("Assertion failed: `obj` must be an Object");return i(o(e,"length"))}},95339:(e,t,r)=>{"use strict";e.exports=r(94566)},11378:(e,t,r)=>{"use strict";var n=r(67286),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),l=r(62680),c=r(63671),u=l("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),d=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["
","",""].join("")+"]","g")),g=r(11341),m=r(87919);e.exports=function e(t){if("String"!==m(t))throw new a("Assertion failed: `argument` is not a String");if(f(t))return o(s(u(t,2),2));if(p(t))return o(s(u(t,2),8));if(h(t)||d(t))return NaN;var r=g(t);return r!==t?e(r):o(t)}},57278:(e,t,r)=>{"use strict";var n=r(32404),o=r(10557),i=r(95831),a=r(97911),s=r(51832),l=r(79747);e.exports=function(e){var t=i(e);if(a(t)||0===t)return 0;if(!s(t))return t;var r=o(n(t));return 0===r?0:l(t)*r}},55590:(e,t,r)=>{"use strict";var n=r(74339),o=r(57278);e.exports=function(e){var t=o(e);return t<=0?0:t>n?n:t}},95831:(e,t,r)=>{"use strict";var n=r(67286),o=n("%TypeError%"),i=n("%Number%"),a=r(45819),s=r(96591),l=r(11378);e.exports=function(e){var t=a(e)?e:s(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?l(t):i(t)}},14749:(e,t,r)=>{"use strict";var n=r(67286)("%Object%"),o=r(95339);e.exports=function(e){return o(e),n(e)}},96591:(e,t,r)=>{"use strict";var n=r(5885);e.exports=function(e){return arguments.length>1?n(e,arguments[1]):n(e)}},47623:(e,t,r)=>{"use strict";var n=r(67286),o=n("%String%"),i=n("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},87919:(e,t,r)=>{"use strict";var n=r(96222);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},32404:(e,t,r)=>{"use strict";var n=r(67286)("%Math.abs%");e.exports=function(e){return n(e)}},10557:(e,t,r)=>{"use strict";var n=r(87919),o=Math.floor;e.exports=function(e){return"BigInt"===n(e)?e:o(e)}},94566:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%");e.exports=function(e,t){if(null==e)throw new n(t||"Cannot call method on "+e);return e}},96222:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},27595:(e,t,r)=>{"use strict";var n=r(67286)("%Array%"),o=!n.isArray&&r(62680)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===o(e)}},51832:(e,t,r)=>{"use strict";var n=r(97911);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!n(e)&&e!==1/0&&e!==-1/0}},97911:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},45819:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},74339:(e,t,r)=>{"use strict";var n=r(67286),o=n("%Math%"),i=n("%Number%");e.exports=i.MAX_SAFE_INTEGER||o.pow(2,53)-1},79747:e=>{"use strict";e.exports=function(e){return e>=0?1:-1}},60155:(e,t,r)=>{e.exports=r(56093).YAML},82601:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:()=>o})},7896:(e,t,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}r.d(t,{Z:()=>n})},36981:(e,t,r)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}r.d(t,{Z:()=>o})},31461:(e,t,r)=>{"use strict";function n(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,{Z:()=>n})},85411:(e,t,r)=>{"use strict";function n(e,{target:t=document.body}={}){if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const r=document.createElement("textarea"),n=document.activeElement;r.value=e,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);t.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}return r.remove(),i&&(o.removeAllRanges(),o.addRange(i)),n&&n.focus(),a}r.d(t,{Z:()=>n})},76665:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function o(e){return!!e&&!!e[W]}function i(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===q}(e)||Array.isArray(e)||!!e[z]||!!(null===(t=e.constructor)||void 0===t?void 0:t[z])||u(e)||f(e))}function a(e,t,r){void 0===r&&(r=!1),0===s(e)?(r?Object.keys:H)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function s(e){var t=e[W];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:u(e)?2:f(e)?3:0}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function u(e){return $&&e instanceof Map}function f(e){return F&&e instanceof Set}function p(e){return e.o||e.t}function d(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=V(e);delete t[W];for(var r=H(t),n=0;n<r.length;n++){var o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function h(e,t){return void 0===t&&(t=!1),m(e)||o(e)||!i(e)||(s(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,(function(e,t){return h(t,!0)}),!0)),e}function g(){n(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=K[e];return t||n(18,e),t}function v(){return L}function b(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){S(e),e.p.forEach(_),e.p=null}function S(e){e===L&&(L=e.l)}function x(e){return L={p:[],l:L,h:e,m:!0,_:0}}function _(e){var t=e[W];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.O||y("ES5").S(t,e,o),o?(r[W].P&&(w(t),n(4)),i(e)&&(e=E(t,e),t.l||C(t,e)),t.u&&y("Patches").M(r[W].t,e,t.u,t.s)):e=E(t,r,[]),w(t),t.u&&t.v(t.u,t.s),e!==U?e:void 0}function E(e,t,r){if(m(t))return t;var n=t[W];if(!n)return a(t,(function(o,i){return k(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return C(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=d(n.k):n.o,i=o,s=!1;3===n.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(t,i){return k(e,n,o,t,i,r,s)})),C(e,o,!1),r&&e.u&&y("Patches").N(n,r,e.u,e.s)}return n.o}function k(e,t,r,n,a,s,u){if(o(a)){var f=E(e,a,s&&t&&3!==t.i&&!l(t.R,n)?s.concat(n):void 0);if(c(r,n,f),!o(f))return;e.m=!1}else u&&r.add(a);if(i(a)&&!m(a)){if(!e.h.D&&e._<1)return;E(e,a),t&&t.A.l||C(e,a)}}function C(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&h(t,r)}function T(e,t){var r=e[W];return(r?p(r):e)[t]}function P(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function j(e){e.P||(e.P=!0,e.l&&j(e.l))}function R(e){e.o||(e.o=d(e.t))}function A(e,t,r){var n=u(t)?y("MapSet").F(t,r):f(t)?y("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:v(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=G;r&&(o=[n],i=Z);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return n.k=l,n.j=s,l}(t,r):y("ES5").J(t,r);return(r?r.A:v()).p.push(n),n}function M(e){return o(e)||n(22,e),function e(t){if(!i(t))return t;var r,n=t[W],o=s(t);if(n){if(!n.P&&(n.i<4||!y("ES5").K(n)))return n.t;n.I=!0,r=I(t,o),n.I=!1}else r=I(t,o);return a(r,(function(t,o){n&&function(e,t){return 2===s(e)?e.get(t):e[t]}(n.t,t)===o||c(r,t,e(o))})),3===o?new Set(r):r}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return d(e)}r.d(t,{Uy:()=>Q,ZP:()=>X});var D,L,N="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$="undefined"!=typeof Map,F="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,U=N?Symbol.for("immer-nothing"):((D={})["immer-nothing"]=!0,D),z=N?Symbol.for("immer-draftable"):"__$immer_draftable",W=N?Symbol.for("immer-state"):"__$immer_state",q=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,V=Object.getOwnPropertyDescriptors||function(e){var t={};return H(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},K={},G={get:function(e,t){if(t===W)return e;var r=p(e);if(!l(r,t))return function(e,t,r){var n,o=P(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!i(n)?n:n===T(e.t,t)?(R(e),e.o[t]=A(e.A.h,n,e)):n},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,r){var n=P(p(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=T(p(e),t),i=null==o?void 0:o[W];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,o)&&(void 0!==r||l(e.t,t)))return!0;R(e),j(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==T(e.t,t)||t in e.t?(e.R[t]=!1,R(e),j(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=p(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},Z={};a(G,(function(e,t){Z[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(e,t){return Z.set.call(this,e,t,void 0)},Z.set=function(e,t,r){return G.set.call(this,e[0],t,r,e[0])};var Y=function(){function e(e){var t=this;this.O=B,this.D=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var a=r;r=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return s.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(o))}))}}var l;if("function"!=typeof r&&n(6),void 0!==o&&"function"!=typeof o&&n(7),i(e)){var c=x(t),u=A(t,e,void 0),f=!0;try{l=r(u),f=!1}finally{f?w(c):S(c)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return b(c,o),O(e,c)}),(function(e){throw w(c),e})):(b(c,o),O(l,c))}if(!e||"object"!=typeof e){if(void 0===(l=r(e))&&(l=e),l===U&&(l=void 0),t.D&&h(l,!0),o){var p=[],d=[];y("Patches").M(e,l,p,d),o(p,d)}return l}n(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(o))}))};var n,o,i=t.produce(e,r,(function(e,t){n=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,n,o]})):[i,n,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||n(8),o(e)&&(e=M(e));var t=x(this),r=A(this,e,void 0);return r[W].C=!0,S(t),r},t.finishDraft=function(e,t){var r=(e&&e[W]).A;return b(r,t),O(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!B&&n(20),this.O=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var i=y("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),J=new Y,Q=J.produce;J.produceWithPatches.bind(J),J.setAutoFreeze.bind(J),J.setUseProxies.bind(J),J.applyPatches.bind(J),J.createDraft.bind(J),J.finishDraft.bind(J);const X=Q},10362:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=!0,o="Invariant failed";function i(e,t){if(!e){if(n)throw new Error(o);var r="function"==typeof t?t():t,i=r?"".concat(o,": ").concat(r):o;throw new Error(i)}}},56093:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,r){return p=f()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},p.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},d(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?h(e):t}function m(e){var t=f();return function(){var r,n=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}function y(e,t,r){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}},y(e,t,r||e)}function v(e,t){return w(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||S(e,t)||_()}function b(e){return w(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||S(e)||_()}function w(e){if(Array.isArray(e))return e}function S(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=S(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}r.d(t,{YAML:()=>Jt});var E={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},k={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},C="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function P(e){for(var t=[0],r=e.indexOf("\n");-1!==r;)r+=1,t.push(r),r=e.indexOf("\n",r);return t}function j(e){var t,r;return"string"==typeof e?(t=P(e),r=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=P(e.context.src)),t=e.lineStarts,r=e.context.src)),{lineStarts:t,src:r}}function R(e,t){if("number"!=typeof e||e<0)return null;var r=j(t),n=r.lineStarts,o=r.src;if(!n||!o||e>o.length)return null;for(var i=0;i<n.length;++i){var a=n[i];if(e<a)return{line:i,col:e-n[i-1]+1};if(e===a)return{line:i+1,col:1}}var s=n.length;return{line:s,col:e-n[s-1]+1}}var A=function(){function e(t,r){o(this,e),this.start=t,this.end=r||t}return a(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var r=this.start,n=this.end;if(0===e.length||n<=e[0])return this.origStart=r,this.origEnd=n,t;for(var o=t;o<e.length&&!(e[o]>r);)++o;this.origStart=r+o;for(var i=o;o<e.length&&!(e[o]>=n);)++o;return this.origEnd=n+o,i}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),M=function(){function e(t,r,n){o(this,e),Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=r||[],this.type=t,this.value=null}return a(e,[{key:"getPropValue",value:function(e,t,r){if(!this.context)return null;var n=this.context.src,o=this.props[e];return o&&n[o.start]===t?n.slice(o.start+(r?1:0),o.end):null}},{key:"anchor",get:function(){for(var e=0;e<this.props.length;++e){var t=this.getPropValue(e,E.ANCHOR,!0);if(null!=t)return t}return null}},{key:"comment",get:function(){for(var e=[],t=0;t<this.props.length;++t){var r=this.getPropValue(t,E.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var r=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var n=this.valueRange.end;return t!==n||e.atBlank(r,n-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t<this.props.length;++t)if(e[this.props[t].start]===E.COMMENT)return!0;return!1}},{key:"hasProps",get:function(){if(this.context)for(var e=this.context.src,t=0;t<this.props.length;++t)if(e[this.props[t].start]!==E.COMMENT)return!0;return!1}},{key:"includesTrailingLines",get:function(){return!1}},{key:"jsonLike",get:function(){return-1!==[k.FLOW_MAP,k.FLOW_SEQ,k.QUOTE_DOUBLE,k.QUOTE_SINGLE].indexOf(this.type)}},{key:"rangeAsLinePos",get:function(){if(this.range&&this.context){var e=R(this.range.start,this.context.root);if(e)return{start:e,end:R(this.range.end,this.context.root)}}}},{key:"rawValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end;return this.context.src.slice(t,r)}},{key:"tag",get:function(){for(var e=0;e<this.props.length;++e){var t=this.getPropValue(e,E.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};var r=v(t.match(/^(.*!)([^!]*)$/),3);return r[0],{handle:r[1],suffix:r[2]}}}return null}},{key:"valueRangeContainsNewline",get:function(){if(!this.valueRange||!this.context)return!1;for(var e=this.valueRange,t=e.start,r=e.end,n=this.context.src,o=t;o<r;++o)if("\n"===n[o])return!0;return!1}},{key:"parseComment",value:function(t){var r=this.context.src;if(r[t]===E.COMMENT){var n=e.endOfLine(r,t+1),o=new A(t,n);return this.props.push(o),n}return t}},{key:"setOrigRanges",value:function(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((function(r){return r.setOrigRange(e,t)})),t}},{key:"toString",value:function(){var t=this.context.src,r=this.range,n=this.value;if(null!=n)return n;var o=t.slice(r.start,r.end);return e.addStringTerminator(t,r.end,o)}}],[{key:"addStringTerminator",value:function(t,r,n){if("\n"===n[n.length-1])return n;var o=e.endOfWhiteSpace(t,r);return o>=t.length||"\n"===t[o]?n+"\n":n}},{key:"atDocumentBoundary",value:function(e,t,r){var n=e[t];if(!n)return!0;var o=e[t-1];if(o&&"\n"!==o)return!1;if(r){if(n!==r)return!1}else if(n!==E.DIRECTIVES_END&&n!==E.DOCUMENT_END)return!1;var i=e[t+1],a=e[t+2];if(i!==n||a!==n)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var r=e[t],n="<"===r,o=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];r&&-1===o.indexOf(r);)r=e[t+=1];return n&&">"===r&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var r=e[t];" "===r;)r=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var r=e[t];r&&"\n"!==r;)r=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var r=e[t];"\t"===r||" "===r;)r=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var r=e[t-1];if("\n"===r)return t;for(;r&&"\n"!==r;)r=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,r,n){var o=e.endOfIndent(t,n);if(o>n+r)return o;var i=e.endOfWhiteSpace(t,o),a=t[i];return a&&"\n"!==a?null:i}},{key:"atBlank",value:function(e,t,r){var n=e[t];return"\n"===n||"\t"===n||" "===n||r&&!n}},{key:"nextNodeIsIndented",value:function(e,t,r){return!(!e||t<0)&&(t>0||r&&"-"===e)}},{key:"normalizeOffset",value:function(t,r){var n=t[r];return n?"\n"!==n&&"\n"===t[r-1]?r-1:e.endOfWhiteSpace(t,r):r}},{key:"foldNewline",value:function(t,r,n){for(var o=0,i=!1,a="",s=t[r+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":o=0,r+=1,a+="\n";break;case"\t":o<=n&&(i=!0),r=e.endOfWhiteSpace(t,r+2)-1;break;case" ":o+=1,r+=1}s=t[r+1]}return a||(a=" "),s&&o<=n&&(i=!0),{fold:a,offset:r,error:i}}}]),e}(),I=function(e){l(r,e);var t=m(r);function r(e,n,i){var a;if(o(this,r),!(i&&n instanceof M))throw new Error("Invalid arguments for new ".concat(e));return(a=t.call(this)).name=e,a.message=i,a.source=n,a}return a(r,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new A(this.offset,this.offset+1);var t=e&&R(this.offset,e);if(t){var r={line:t.line,col:t.col+1};this.linePos={start:t,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var n=this.linePos.start,o=n.line,i=n.col;this.message+=" at line ".concat(o,", column ").concat(i);var a=e&&function(e,t){var r=e.start,n=e.end,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,i=function(e,t){var r=j(t),n=r.lineStarts,o=r.src;if(!n||!(e>=1)||e>n.length)return null;for(var i=n[e-1],a=n[e];a&&a>i&&"\n"===o[a-1];)--a;return o.slice(i,a)}(r.line,t);if(!i)return null;var a=r.col;if(i.length>o)if(a<=o-10)i=i.substr(0,o-1)+"…";else{var s=Math.round(o/2);i.length>a+s&&(i=i.substr(0,a+s-1)+"…"),a-=i.length-o,i="…"+i.substr(1-o)}var l=1,c="";n&&(n.line===r.line&&a+(n.col-r.col)<=o+1?l=n.col-r.col:(l=Math.min(i.length+1,o)-a,c="…"));var u=a>1?" ".repeat(a-1):"",f="^".repeat(l);return"".concat(i,"\n").concat(u).concat(f).concat(c)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),r}(d(Error)),D=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLReferenceError",e,n)}return r}(I),L=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLSemanticError",e,n)}return r}(I),N=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLSyntaxError",e,n)}return r}(I),$=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLWarning",e,n)}return r}(I),F=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,r=e.end,n=this.context.src,o=n[r-1];t<r&&("\n"===o||"\t"===o||" "===o);)o=n[--r-1];for(var i="",a=t;a<r;++a){var s=n[a];if("\n"===s){var l=M.foldNewline(n,a,-1);i+=l.fold,a=l.offset}else if(" "===s||"\t"===s){for(var c=a,u=n[a+1];a<r&&(" "===u||"\t"===u);)u=n[(a+=1)+1];"\n"!==u&&(i+=a>c?n.slice(c,a+1):s)}else i+=s}var f=n[t];switch(f){case"\t":return{errors:[new L(this,"Plain value cannot start with a tab character")],str:i};case"@":case"`":var p="Plain value cannot start with reserved character ".concat(f);return{errors:[new L(this,p)],str:i};default:return i}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,n=t.indent,o=t.inFlow,i=t.src,a=e,s=e,l=i[a];"\n"===l&&!M.atDocumentBoundary(i,a+1);l=i[a]){var c=M.endOfBlockIndent(i,n,a+1);if(null===c||"#"===i[c])break;a="\n"===i[c]?c:s=r.endOfLine(i,c,o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var n=e.inFlow,o=e.src,i=t,a=o[i];return a&&"#"!==a&&"\n"!==a&&(i=r.endOfLine(o,t,n)),this.valueRange=new A(t,i),i=M.endOfWhiteSpace(o,i),i=this.parseComment(i),this.hasComment&&!this.valueRange.isEmpty()||(i=this.parseBlockValue(i)),i}}],[{key:"endOfLine",value:function(e,t,r){for(var n=e[t],o=t;n&&"\n"!==n&&(!r||"["!==n&&"]"!==n&&"{"!==n&&"}"!==n&&","!==n);){var i=e[o+1];if(":"===n&&(!i||"\n"===i||"\t"===i||" "===i||r&&","===i))break;if((" "===n||"\t"===n)&&"#"===i)break;o+=1,n=i}return o}}]),r}(M),B=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.call(this,k.BLANK_LINE)}return a(r,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new A(t,t+1),t+1}}]),r}(M),U=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).node=null,i}return a(r,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,n=e.src,o=e.atLineStart,i=e.lineStart;o||this.type!==k.SEQ_ITEM||(this.error=new L(this,"Sequence items must not have preceding content on the same line"));for(var a=o?t-i:e.indent,s=M.endOfWhiteSpace(n,t+1),l=n[s],c="#"===l,u=[],f=null;"\n"===l||"#"===l;){if("#"===l){var p=M.endOfLine(n,s+1);u.push(new A(s,p)),s=p}else o=!0,i=s+1,"\n"===n[M.endOfWhiteSpace(n,i)]&&0===u.length&&(i=(f=new B).parse({src:n},i)),s=M.endOfIndent(n,i);l=n[s]}if(M.nextNodeIsIndented(l,s-(i+a),this.type!==k.SEQ_ITEM)?this.node=r({atLineStart:o,inCollection:!1,indent:a,lineStart:i,parent:this},s):l&&i>t+1&&(s=i-1),this.node){if(f){var d=e.parent.items||e.parent.contents;d&&d.push(f)}u.length&&Array.prototype.push.apply(this.props,u),s=this.node.range.end}else if(c){var h=u[0];this.props.push(h),s=h.end}else s=M.endOfLine(n,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new A(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,r=this.range,n=this.value;if(null!=n)return n;var o=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return M.addStringTerminator(e,r.end,o)}}]),r}(M),z=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.call(this,k.COMMENT)}return a(r,[{key:"parse",value:function(e,t){this.context=e;var r=this.parseComment(t);return this.range=new A(t,r),r}}]),r}(M);function W(e){for(var t=e;t instanceof U;)t=t.node;if(!(t instanceof q))return null;for(var r=t.items.length,n=-1,o=r-1;o>=0;--o){var i=t.items[o];if(i.type===k.COMMENT){var a=i.context,s=a.indent,l=a.lineStart;if(s>0&&i.range.start>=l+s)break;n=o}else{if(i.type!==k.BLANK_LINE)break;n=o}}if(-1===n)return null;for(var c=t.items.splice(n,r-n),u=c[0].range.start;t.range.end=u,t.valueRange&&t.valueRange.end>u&&(t.valueRange.end=u),t!==e;)t=t.context.parent;return c}var q=function(e){l(r,e);var t=m(r);function r(e){var n;o(this,r),n=t.call(this,e.type===k.SEQ_ITEM?k.SEQ:k.MAP);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start<e.context.lineStart){n.props=e.props.slice(0,i+1),e.props=e.props.slice(i+1);var a=e.props[0]||e.valueRange;e.range.start=a.start;break}n.items=[e];var s=W(e);return s&&Array.prototype.push.apply(n.items,s),n}return a(r,[{key:"includesTrailingLines",get:function(){return this.items.length>0}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,o=e.src,i=M.startOfLine(o,t),a=this.items[0];a.context.parent=this,this.valueRange=A.copy(a.valueRange);for(var s=a.range.start-a.context.lineStart,l=t,c=o[l=M.normalizeOffset(o,l)],u=M.endOfWhiteSpace(o,i)===l,f=!1;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!f){var p=new B;if(l=p.parse({src:o},l),this.valueRange.end=l,l>=o.length){c=null;break}this.items.push(p),l-=1}else if("#"===c){if(l<i+s&&!r.nextContentHasIndent(o,l,s))return l;var d=new z;if(l=d.parse({indent:s,lineStart:i,src:o},l),this.items.push(d),this.valueRange.end=l,l>=o.length){c=null;break}}if(i=l+1,l=M.endOfIndent(o,i),M.atBlank(o,l)){var h=M.endOfWhiteSpace(o,l),g=o[h];g&&"\n"!==g&&"#"!==g||(l=h)}c=o[l],u=!0}if(!c)break;if(l!==i+s&&(u||":"!==c)){if(l<i+s){i>t&&(l=i);break}this.error||(this.error=new N(this,"All collection items must start at the same column"))}if(a.type===k.SEQ_ITEM){if("-"!==c){i>t&&(l=i);break}}else if("-"===c&&!this.error){var m=o[l+1];m&&"\n"!==m&&"\t"!==m&&" "!==m||(this.error=new N(this,"A collection cannot be both a mapping and a sequence"))}var y=n({atLineStart:u,inCollection:!0,indent:s,lineStart:i,parent:this},l);if(!y)return l;if(this.items.push(y),this.valueRange.end=y.valueRange.end,c=o[l=M.normalizeOffset(o,y.range.end)],u=!1,f=y.includesTrailingLines,c){for(var v=l-1,b=o[v];" "===b||"\t"===b;)b=o[--v];"\n"===b&&(i=v+1,u=!0)}var w=W(y);w&&Array.prototype.push.apply(this.items,w)}return l}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){t=r.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,n=this.value;if(null!=n)return n;for(var o=e.slice(r.start,t[0].range.start)+String(t[0]),i=1;i<t.length;++i){var a=t[i],s=a.context,l=s.atLineStart,c=s.indent;if(l)for(var u=0;u<c;++u)o+=" ";o+=String(a)}return M.addStringTerminator(e,r.end,o)}}],[{key:"nextContentHasIndent",value:function(e,t,n){var o=M.endOfLine(e,t)+1,i=e[t=M.endOfWhiteSpace(e,o)];return!!i&&(t>=o+n||("#"===i||"\n"===i)&&r.nextContentHasIndent(e,t,n))}}]),r}(M),H=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this,k.DIRECTIVE)).name=null,e}return a(r,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"\t"!==n&&" "!==n;)n=t[r+=1];return this.name=t.slice(e,r),r}},{key:"parseParameters",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"#"!==n;)n=t[r+=1];return this.valueRange=new A(e,r),r}},{key:"parse",value:function(e,t){this.context=e;var r=this.parseName(t+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new A(t,r),r}}]),r}(M),V=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this,k.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return a(r,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var n=!0,o=!1,i=e;!M.atDocumentBoundary(t,i,E.DIRECTIVES_END);)switch(t[i=r.startCommentOrEndBlankLine(t,i)]){case"\n":if(n){var a=new B;(i=a.parse({src:t},i))<t.length&&this.directives.push(a)}else i+=1,n=!0;break;case"#":var s=new z;i=s.parse({src:t},i),this.directives.push(s),n=!1;break;case"%":var l=new H;i=l.parse({parent:this,src:t},i),this.directives.push(l),o=!0,n=!1;break;default:return o?this.error=new L(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return t[i]?(this.directivesEndMarker=new A(i,i+3),i+3):(o?this.error=new L(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}},{key:"parseContents",value:function(e){var t=this.context,n=t.parseNode,o=t.src;this.contents||(this.contents=[]);for(var i=e;"-"===o[i-1];)i-=1;var a=M.endOfWhiteSpace(o,e),s=i===e;for(this.valueRange=new A(a);!M.atDocumentBoundary(o,a,E.DOCUMENT_END);){switch(o[a]){case"\n":if(s){var l=new B;(a=l.parse({src:o},a))<o.length&&this.contents.push(l)}else a+=1,s=!0;i=a;break;case"#":var c=new z;a=c.parse({src:o},a),this.contents.push(c),s=!1;break;default:var u=M.endOfIndent(o,a),f=n({atLineStart:s,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},u);if(!f)return this.valueRange.end=u;this.contents.push(f),a=f.range.end,s=!1;var p=W(f);p&&Array.prototype.push.apply(this.contents,p)}a=r.startCommentOrEndBlankLine(o,a)}if(this.valueRange.end=a,o[a]&&(this.documentEndMarker=new A(a,a+3),o[a+=3])){if("#"===o[a=M.endOfWhiteSpace(o,a)]){var d=new z;a=d.parse({src:o},a),this.contents.push(d)}switch(o[a]){case"\n":a+=1;break;case void 0:break;default:this.error=new N(this,"Document end marker line cannot have a non-comment suffix")}}return a}},{key:"parse",value:function(e,t){e.root=this,this.context=e;var r=65279===e.src.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),this.parseContents(r)}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.directives.forEach((function(r){t=r.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((function(r){t=r.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}},{key:"toString",value:function(){var e=this.contents,t=this.directives,r=this.value;if(null!=r)return r;var n=t.join("");return e.length>0&&((t.length>0||e[0].type===k.COMMENT)&&(n+="---\n"),n+=e.join("")),"\n"!==n[n.length-1]&&(n+="\n"),n}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var r=M.endOfWhiteSpace(e,t),n=e[r];return"#"===n||"\n"===n?r:t}}]),r}(M),K=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"parse",value:function(e,t){this.context=e;var r=e.src,n=M.endOfIdentifier(r,t+1);return this.valueRange=new A(t+1,n),n=M.endOfWhiteSpace(r,n),this.parseComment(n)}}]),r}(M),G="KEEP",Z="STRIP",Y=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).blockIndent=null,i.chomping="CLIP",i.header=null,i}return a(r,[{key:"includesTrailingLines",get:function(){return this.chomping===G}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end,n=this.context,o=n.indent,i=n.src;if(this.valueRange.isEmpty())return"";for(var a=null,s=i[r-1];"\n"===s||"\t"===s||" "===s;){if((r-=1)<=t){if(this.chomping===G)break;return""}"\n"===s&&(a=r),s=i[r-1]}var l=r+1;a&&(this.chomping===G?(l=a,r=this.valueRange.end):r=a);for(var c=o+this.blockIndent,u=this.type===k.BLOCK_FOLDED,f=!0,p="",d="",h=!1,g=t;g<r;++g){for(var m=0;m<c&&" "===i[g];++m)g+=1;var y=i[g];if("\n"===y)"\n"===d?p+="\n":d="\n";else{var v=M.endOfLine(i,g),b=i.slice(g,v);g=v,u&&(" "===y||"\t"===y)&&g<l?(" "===d?d="\n":h||f||"\n"!==d||(d="\n\n"),p+=d+b,d=v<r&&i[v]||"",h=!0):(p+=d+b,d=u&&g<l?" ":"\n",h=!1),f&&""!==b&&(f=!1)}}return this.chomping===Z?p:p+"\n"}},{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,r=e+1,n="";;){var o=t[r];switch(o){case"-":this.chomping=Z;break;case"+":this.chomping=G;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n+=o;break;default:return this.blockIndent=Number(n)||null,this.header=new A(e,r),r}r+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,n=t.src,o=!!this.blockIndent,i=e,a=e,s=1,l=n[i];"\n"===l&&(i+=1,!M.atDocumentBoundary(n,i));l=n[i]){var c=M.endOfBlockIndent(n,r,i);if(null===c)break;var u=n[c],f=c-(i+r);if(this.blockIndent){if(u&&"\n"!==u&&f<this.blockIndent){if("#"===n[c])break;if(!this.error){var p="Block scalars must not be less indented than their ".concat(o?"explicit indentation indicator":"first line");this.error=new L(this,p)}}}else"\n"!==n[c]?(f<s&&(this.error=new L(this,"Block scalars with more-indented leading empty lines must use an explicit indentation indicator")),this.blockIndent=f):f>s&&(s=f);i="\n"===n[c]?c:a=M.endOfLine(n,c)}return this.chomping!==G&&(i=n[a]?a+1:a),this.valueRange=new A(e+1,i),i}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,n=this.parseBlockHeader(t);return n=M.endOfWhiteSpace(r,n),n=this.parseComment(n),this.parseBlockValue(n)}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),r}(M),J=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).items=null,i}return a(r,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===k.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,n=e.src,o=e.indent,i=e.lineStart,a=n[t];this.items=[{char:a,offset:t}];var s=M.endOfWhiteSpace(n,t+1);for(a=n[s];a&&"]"!==a&&"}"!==a;){switch(a){case"\n":if(i=s+1,"\n"===n[M.endOfWhiteSpace(n,i)]){var l=new B;i=l.parse({src:n},i),this.items.push(l)}(s=M.endOfIndent(n,i))<=i+o&&(a=n[s],s<i+o||"]"!==a&&"}"!==a)&&(this.error=new L(this,"Insufficient indentation in flow collection"));break;case",":this.items.push({char:a,offset:s}),s+=1;break;case"#":var c=new z;s=c.parse({src:n},s),this.items.push(c);break;case"?":case":":var u=n[s+1];if("\n"===u||"\t"===u||" "===u||","===u||":"===a&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:s}),s+=1;break}default:var f=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:i,parent:this},s);if(!f)return this.valueRange=new A(t,s),s;this.items.push(f),s=M.normalizeOffset(n,f.range.end)}a=n[s=M.endOfWhiteSpace(n,s)]}return this.valueRange=new A(t,s+1),a&&(this.items.push({char:a,offset:s}),s=M.endOfWhiteSpace(n,s+1),s=this.parseComment(s)),s}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){if(r instanceof M)t=r.setOrigRanges(e,t);else if(0===e.length)r.origOffset=r.offset;else{for(var n=t;n<e.length&&!(e[n]>r.offset);)++n;r.origOffset=r.offset+n,t=n}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,n=this.value;if(null!=n)return n;var o=t.filter((function(e){return e instanceof M})),i="",a=r.start;return o.forEach((function(t){var r=e.slice(a,t.range.start);a=t.range.end,"\n"===(i+=r+String(t))[i.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),i+=e.slice(a,r.end),M.addStringTerminator(e,r.end,i)}}]),r}(M),Q=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,n=t.end,o=this.context,i=o.indent,a=o.src;'"'!==a[n-1]&&e.push(new N(this,'Missing closing "quote'));for(var s="",l=r+1;l<n-1;++l){var c=a[l];if("\n"===c){M.atDocumentBoundary(a,l+1)&&e.push(new L(this,"Document boundary indicators are not allowed within string values"));var u=M.foldNewline(a,l,i);s+=u.fold,l=u.offset,u.error&&e.push(new L(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===c)switch(a[l+=1]){case"0":s+="\0";break;case"a":s+="";break;case"b":s+="\b";break;case"e":s+="";break;case"f":s+="\f";break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":case"\t":s+="\t";break;case"v":s+="\v";break;case"N":s+="
";break;case"_":s+=" ";break;case"L":s+="\u2028";break;case"P":s+="\u2029";break;case" ":s+=" ";break;case'"':s+='"';break;case"/":s+="/";break;case"\\":s+="\\";break;case"x":s+=this.parseCharCode(l+1,2,e),l+=2;break;case"u":s+=this.parseCharCode(l+1,4,e),l+=4;break;case"U":s+=this.parseCharCode(l+1,8,e),l+=8;break;case"\n":for(;" "===a[l+1]||"\t"===a[l+1];)l+=1;break;default:e.push(new N(this,"Invalid escape sequence ".concat(a.substr(l-1,2)))),s+="\\"+a[l]}else if(" "===c||"\t"===c){for(var f=l,p=a[l+1];" "===p||"\t"===p;)p=a[(l+=1)+1];"\n"!==p&&(s+=l>f?a.slice(f,l+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}},{key:"parseCharCode",value:function(e,t,r){var n=this.context.src,o=n.substr(e,t),i=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(i)?(r.push(new N(this,"Invalid escape sequence ".concat(n.substr(e-2,t+2)))),n.substr(e-2,t+2)):String.fromCodePoint(i)}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,o=r.endOfQuote(n,t+1);return this.valueRange=new A(t,o),o=M.endOfWhiteSpace(n,o),this.parseComment(o)}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r&&'"'!==r;)r=e[t+="\\"===r?2:1];return t+1}}]),r}(M),X=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,n=t.end,o=this.context,i=o.indent,a=o.src;"'"!==a[n-1]&&e.push(new N(this,"Missing closing 'quote"));for(var s="",l=r+1;l<n-1;++l){var c=a[l];if("\n"===c){M.atDocumentBoundary(a,l+1)&&e.push(new L(this,"Document boundary indicators are not allowed within string values"));var u=M.foldNewline(a,l,i);s+=u.fold,l=u.offset,u.error&&e.push(new L(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===c)s+=c,"'"!==a[l+=1]&&e.push(new N(this,"Unescaped single quote? This should not happen."));else if(" "===c||"\t"===c){for(var f=l,p=a[l+1];" "===p||"\t"===p;)p=a[(l+=1)+1];"\n"!==p&&(s+=l>f?a.slice(f,l+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,o=r.endOfQuote(n,t+1);return this.valueRange=new A(t,o),o=M.endOfWhiteSpace(n,o),this.parseComment(o)}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r;)if("'"===r){if("'"!==e[t+1])break;r=e[t+=2]}else r=e[t+=1];return t+1}}]),r}(M),ee=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.atLineStart,a=n.inCollection,l=n.inFlow,c=n.indent,u=n.lineStart,f=n.parent;o(this,e),s(this,"parseNode",(function(r,n){if(M.atDocumentBoundary(t.src,n))return null;var o=new e(t,r),i=o.parseProps(n),a=i.props,s=i.type,l=i.valueStart,c=function(e,t){switch(e){case k.ALIAS:return new K(e,t);case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:return new Y(e,t);case k.FLOW_MAP:case k.FLOW_SEQ:return new J(e,t);case k.MAP_KEY:case k.MAP_VALUE:case k.SEQ_ITEM:return new U(e,t);case k.COMMENT:case k.PLAIN:return new F(e,t);case k.QUOTE_DOUBLE:return new Q(e,t);case k.QUOTE_SINGLE:return new X(e,t);default:return null}}(s,a),u=c.parse(o,l);if(c.range=new A(n,u),u<=n&&(c.error=new Error("Node#parse consumed no characters"),c.error.parseEnd=u,c.error.source=c,c.range.end=n+1),o.nodeStartsCollection(c)){c.error||o.atLineStart||o.parent.type!==k.DOCUMENT||(c.error=new N(c,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var f=new q(c);return u=f.parse(new e(o),u),f.range=new A(n,u),f}return c})),this.atLineStart=null!=i?i:r.atLineStart||!1,this.inCollection=null!=a?a:r.inCollection||!1,this.inFlow=null!=l?l:r.inFlow||!1,this.indent=null!=c?c:r.indent,this.lineStart=null!=u?u:r.lineStart,this.parent=null!=f?f:r.parent||{},this.root=r.root,this.src=r.src}return a(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,r=this.inFlow,n=this.src;if(t||r)return!1;if(e instanceof U)return!0;var o=e.range.end;return"\n"!==n[o]&&"\n"!==n[o-1]&&":"===n[o=M.endOfWhiteSpace(n,o)]}},{key:"parseProps",value:function(t){for(var r=this.inFlow,n=this.parent,o=this.src,i=[],a=!1,s=o[t=this.atLineStart?M.endOfIndent(o,t):M.endOfWhiteSpace(o,t)];s===E.ANCHOR||s===E.COMMENT||s===E.TAG||"\n"===s;){if("\n"===s){var l=t,c=void 0;do{c=l+1,l=M.endOfIndent(o,c)}while("\n"===o[l]);var u=l-(c+this.indent),f=n.type===k.SEQ_ITEM&&n.context.atLineStart;if("#"!==o[l]&&!M.nextNodeIsIndented(o[l],u,!f))break;this.atLineStart=!0,this.lineStart=c,a=!1,t=l}else if(s===E.COMMENT){var p=M.endOfLine(o,t+1);i.push(new A(t,p)),t=p}else{var d=M.endOfIdentifier(o,t+1);s===E.TAG&&","===o[d]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(o.slice(t+1,d+13))&&(d=M.endOfIdentifier(o,d+5)),i.push(new A(t,d)),a=!0,t=M.endOfWhiteSpace(o,d)}s=o[t]}return a&&":"===s&&M.atBlank(o,t+1,!0)&&(t-=1),{props:i,type:e.parseType(o,t,r),valueStart:t}}}],[{key:"parseType",value:function(e,t,r){switch(e[t]){case"*":return k.ALIAS;case">":return k.BLOCK_FOLDED;case"|":return k.BLOCK_LITERAL;case"{":return k.FLOW_MAP;case"[":return k.FLOW_SEQ;case"?":return!r&&M.atBlank(e,t+1,!0)?k.MAP_KEY:k.PLAIN;case":":return!r&&M.atBlank(e,t+1,!0)?k.MAP_VALUE:k.PLAIN;case"-":return!r&&M.atBlank(e,t+1,!0)?k.SEQ_ITEM:k.PLAIN;case'"':return k.QUOTE_DOUBLE;case"'":return k.QUOTE_SINGLE;default:return k.PLAIN}}}]),e}();function te(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,r){return e.length>1&&t.push(r),"\n"})));var r=[],n=0;do{var o=new V,i=new ee({src:e});n=o.parse(i,n),r.push(o)}while(n<e.length);return r.setOrigRanges=function(){if(0===t.length)return!1;for(var e=1;e<t.length;++e)t[e]-=e;for(var n=0,o=0;o<r.length;++o)n=r[o].setOrigRanges(t,n);return t.splice(0,t.length),!0},r.toString=function(){return r.join("...\n")},r}function re(e,t,r){return r?-1===r.indexOf("\n")?"".concat(e," #").concat(r):"".concat(e,"\n")+r.replace(/^/gm,"".concat(t||"","#")):e}var ne=function e(){o(this,e)};function oe(e,t,r){if(Array.isArray(e))return e.map((function(e,t){return oe(e,String(t),r)}));if(e&&"function"==typeof e.toJSON){var n=r&&r.anchors&&r.anchors.get(e);n&&(r.onCreate=function(e){n.res=e,delete r.onCreate});var o=e.toJSON(t,r);return n&&r.onCreate&&r.onCreate(o),o}return r&&r.keep||"bigint"!=typeof e?e:Number(e)}var ie=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),(n=t.call(this)).value=e,n}return a(r,[{key:"toJSON",value:function(e,t){return t&&t.keep?this.value:oe(this.value,e,t)}},{key:"toString",value:function(){return String(this.value)}}]),r}(ne);function ae(e,t,r){for(var n=r,o=t.length-1;o>=0;--o){var i=t[o];if(Number.isInteger(i)&&i>=0){var a=[];a[i]=n,n=a}else{var s={};Object.defineProperty(s,i,{value:n,writable:!0,enumerable:!0,configurable:!0}),n=s}}return e.createNode(n,!1)}var se=function(e){return null==e||"object"===n(e)&&e[Symbol.iterator]().next().done},le=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),s(h(n=t.call(this)),"items",[]),n.schema=e,n}return a(r,[{key:"addIn",value:function(e,t){if(se(e))this.add(t);else{var n=b(e),o=n[0],i=n.slice(1),a=this.get(o,!0);if(a instanceof r)a.addIn(i,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(i));this.set(o,ae(this.schema,i,t))}}}},{key:"deleteIn",value:function(e){var t=b(e),n=t[0],o=t.slice(1);if(0===o.length)return this.delete(n);var i=this.get(n,!0);if(i instanceof r)return i.deleteIn(o);throw new Error("Expected YAML collection at ".concat(n,". Remaining path: ").concat(o))}},{key:"getIn",value:function(e,t){var n=b(e),o=n[0],i=n.slice(1),a=this.get(o,!0);return 0===i.length?!t&&a instanceof ie?a.value:a:a instanceof r?a.getIn(i,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof ie&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=b(e),n=t[0],o=t.slice(1);if(0===o.length)return this.has(n);var i=this.get(n,!0);return i instanceof r&&i.hasIn(o)}},{key:"setIn",value:function(e,t){var n=b(e),o=n[0],i=n.slice(1);if(0===i.length)this.set(o,t);else{var a=this.get(o,!0);if(a instanceof r)a.setIn(i,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(i));this.set(o,ae(this.schema,i,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,n,o){var i=this,a=t.blockItem,s=t.flowChars,l=t.isMap,c=t.itemIndent,u=e,f=u.indent,p=u.indentStep,d=u.stringify,h=this.type===k.FLOW_MAP||this.type===k.FLOW_SEQ||e.inFlow;h&&(c+=p);var g=l&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:c,inFlow:h,type:null});var m,y=!1,v=!1,b=this.items.reduce((function(t,r,n){var o;r&&(!y&&r.spaceBefore&&t.push({type:"comment",str:""}),r.commentBefore&&r.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),r.comment&&(o=r.comment),h&&(!y&&r.spaceBefore||r.commentBefore||r.comment||r.key&&(r.key.commentBefore||r.key.comment)||r.value&&(r.value.commentBefore||r.value.comment))&&(v=!0)),y=!1;var a=d(r,e,(function(){return o=null}),(function(){return y=!0}));return h&&!v&&a.includes("\n")&&(v=!0),h&&n<i.items.length-1&&(a+=","),a=re(a,c,o),y&&(o||h)&&(y=!1),t.push({type:"item",str:a}),t}),[]);if(0===b.length)m=s.start+s.end;else if(h){var w=s.start,S=s.end,x=b.map((function(e){return e.str}));if(v||x.reduce((function(e,t){return e+t.length+2}),2)>r.maxFlowStringSingleLineLength){m=w;var _,E=O(x);try{for(E.s();!(_=E.n()).done;){var C=_.value;m+=C?"\n".concat(p).concat(f).concat(C):"\n"}}catch(e){E.e(e)}finally{E.f()}m+="\n".concat(f).concat(S)}else m="".concat(w," ").concat(x.join(" ")," ").concat(S)}else{var T=b.map(a);m=T.shift();var P,j=O(T);try{for(j.s();!(P=j.n()).done;){var R=P.value;m+=R?"\n".concat(f).concat(R):"\n"}}catch(e){j.e(e)}finally{j.f()}}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(f,"#")),n&&n()):y&&o&&o(),m}}]),r}(ne);function ce(e){var t=e instanceof ie?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}s(le,"maxFlowStringSingleLineLength",60);var ue=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=ce(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var r=ce(e);if("number"==typeof r){var n=this.items[r];return!t&&n instanceof ie?n.value:n}}},{key:"has",value:function(e){var t=ce(e);return"number"==typeof t&&t<this.items.length}},{key:"set",value:function(e,t){var r=ce(e);if("number"!=typeof r)throw new Error("Expected a valid index, not ".concat(e,"."));this.items[r]=t}},{key:"toJSON",value:function(e,t){var r=[];t&&t.onCreate&&t.onCreate(r);var n,o=0,i=O(this.items);try{for(i.s();!(n=i.n()).done;){var a=n.value;r.push(oe(a,String(o++),t))}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"toString",value:function(e,t,n){return e?y(c(r.prototype),"toString",this).call(this,e,{blockItem:function(e){return"comment"===e.type?e.str:"- ".concat(e.str)},flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}]),r}(le),fe=function(e){l(r,e);var t=m(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(this,r),(n=t.call(this)).key=e,n.value=i,n.type=r.Type.PAIR,n}return a(r,[{key:"commentBefore",get:function(){return this.key instanceof ne?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new ie(null)),!(this.key instanceof ne))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var r=oe(this.key,"",e);if(t instanceof Map){var o=oe(this.value,r,e);t.set(r,o)}else if(t instanceof Set)t.add(r);else{var i=function(e,t,r){return null===t?"":"object"!==n(t)?String(t):e instanceof ne&&r&&r.doc?e.toString({anchors:Object.create(null),doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:!0,inStringifyKey:!0,stringify:r.stringify}):JSON.stringify(t)}(this.key,r,e),a=oe(this.value,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}return t}},{key:"toJSON",value:function(e,t){var r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}},{key:"toString",value:function(e,t,r){if(!e||!e.doc)return JSON.stringify(this);var o=e.doc.options,i=o.indent,a=o.indentSeq,s=o.simpleKeys,l=this.key,c=this.value,u=l instanceof ne&&l.comment;if(s){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(l instanceof le)throw new Error("With simple keys, collection cannot be used as a key value")}var f=!s&&(!l||u||(l instanceof ne?l instanceof le||l.type===k.BLOCK_FOLDED||l.type===k.BLOCK_LITERAL:"object"===n(l))),p=e,d=p.doc,h=p.indent,g=p.indentStep,m=p.stringify;e=Object.assign({},e,{implicitKey:!f,indent:h+g});var y=!1,v=m(l,e,(function(){return u=null}),(function(){return y=!0}));if(v=re(v,e.indent,u),!f&&v.length>1024){if(s)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!s)return this.comment?(v=re(v,e.indent,this.comment),t&&t()):y&&!u&&r&&r(),e.inFlow&&!f?v:"? ".concat(v);v=f?"? ".concat(v,"\n").concat(h,":"):"".concat(v,":"),this.comment&&(v=re(v,e.indent,this.comment),t&&t());var b="",w=null;if(c instanceof ne){if(c.spaceBefore&&(b="\n"),c.commentBefore){var S=c.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));b+="\n".concat(S)}w=c.comment}else c&&"object"===n(c)&&(c=d.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof ie&&(e.indentAtStart=v.length+1),y=!1,!a&&i>=2&&!e.inFlow&&!f&&c instanceof ue&&c.type!==k.FLOW_SEQ&&!c.tag&&!d.anchors.getName(c)&&(e.indent=e.indent.substr(2));var x=m(c,e,(function(){return w=null}),(function(){return y=!0})),_=" ";return b||this.comment?_="".concat(b,"\n").concat(e.indent):!f&&c instanceof le?("["===x[0]||"{"===x[0])&&!x.includes("\n")||(_="\n".concat(e.indent)):"\n"===x[0]&&(_=""),y&&!w&&r&&r(),re(v+_+x,e.indent,w)}}]),r}(ne);s(fe,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var pe=function e(t,r){if(t instanceof de){var n=r.get(t.source);return n.count*n.aliasCount}if(t instanceof le){var o,i=0,a=O(t.items);try{for(a.s();!(o=a.n()).done;){var s=e(o.value,r);s>i&&(i=s)}}catch(e){a.e(e)}finally{a.f()}return i}if(t instanceof fe){var l=e(t.key,r),c=e(t.value,r);return Math.max(l,c)}return 1},de=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),(n=t.call(this)).source=e,n.type=k.ALIAS,n}return a(r,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return oe(this.source,e,t);var r=t.anchors,n=t.maxAliasCount,o=r.get(this.source);if(!o||void 0===o.res){var i="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new D(this.cstNode,i):new ReferenceError(i)}if(n>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=pe(this.source,r)),o.count*o.aliasCount>n)){var a="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new D(this.cstNode,a):new ReferenceError(a)}return o.res}},{key:"toString",value:function(e){return r.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var r=e.range,n=e.source,o=t.anchors,i=t.doc,a=t.implicitKey,s=t.inStringifyKey,l=Object.keys(o).find((function(e){return o[e]===n}));if(!l&&s&&(l=i.anchors.getName(n)||i.anchors.newName()),l)return"*".concat(l).concat(a?" ":"");var c=i.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(c," [").concat(r,"]"))}}]),r}(ne);function he(e,t){var r,n=t instanceof ie?t.value:t,o=O(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i instanceof fe){if(i.key===t||i.key===n)return i;if(i.key&&i.key.value===n)return i}}}catch(e){o.e(e)}finally{o.f()}}s(de,"default",!0);var ge=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"add",value:function(e,t){e?e instanceof fe||(e=new fe(e.key||e,e.value)):e=new fe(e);var r=he(this.items,e.key),n=this.schema&&this.schema.sortMapEntries;if(r){if(!t)throw new Error("Key ".concat(e.key," already set"));r.value=e.value}else if(n){var o=this.items.findIndex((function(t){return n(e,t)<0}));-1===o?this.items.push(e):this.items.splice(o,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=he(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var r=he(this.items,e),n=r&&r.value;return!t&&n instanceof ie?n.value:n}},{key:"has",value:function(e){return!!he(this.items,e)}},{key:"set",value:function(e,t){this.add(new fe(e,t),!0)}},{key:"toJSON",value:function(e,t,r){var n=r?new r:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(n);var o,i=O(this.items);try{for(i.s();!(o=i.n()).done;)o.value.addToJSMap(t,n)}catch(e){i.e(e)}finally{i.f()}return n}},{key:"toString",value:function(e,t,n){if(!e)return JSON.stringify(this);var o,i=O(this.items);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!(a instanceof fe))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(a)," instead"))}}catch(e){i.e(e)}finally{i.f()}return y(c(r.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}]),r}(le),me=function(e){l(r,e);var t=m(r);function r(e){var n;if(o(this,r),e instanceof fe){var i=e.value;i instanceof ue||((i=new ue).items.push(e.value),i.range=e.value.range),(n=t.call(this,e.key,i)).range=e.range}else n=t.call(this,new ie("<<"),new ue);return n.type=fe.Type.MERGE_PAIR,g(n)}return a(r,[{key:"addToJSMap",value:function(e,t){var r,n=O(this.value.items);try{for(n.s();!(r=n.n()).done;){var o=r.value.source;if(!(o instanceof ge))throw new Error("Merge sources must be maps");var i,a=O(o.toJSON(null,e,Map));try{for(a.s();!(i=a.n()).done;){var s=v(i.value,2),l=s[0],c=s[1];t instanceof Map?t.has(l)||t.set(l,c):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0})}}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toString",value:function(e,t){var n=this.value;if(n.items.length>1)return y(c(r.prototype),"toString",this).call(this,e,t);this.value=n.items[0];var o=y(c(r.prototype),"toString",this).call(this,e,t);return this.value=n,o}}]),r}(fe),ye={defaultType:k.BLOCK_LITERAL,lineWidth:76},ve={trueStr:"true",falseStr:"false"},be={asBigInt:!1},we={nullStr:"null"},Se={defaultType:k.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function xe(e,t,r){var n,o=O(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i.format,s=i.test,l=i.resolve;if(s){var c=e.match(s);if(c){var u=l.apply(null,c);return u instanceof ie||(u=new ie(u)),a&&(u.format=a),u}}}}catch(e){o.e(e)}finally{o.f()}return r&&(e=r(e)),new ie(e)}var _e="flow",Oe="block",Ee="quoted",ke=function(e,t){for(var r=e[t+1];" "===r||"\t"===r;){do{r=e[t+=1]}while(r&&"\n"!==r);r=e[t+1]}return t};function Ce(e,t,r,n){var o=n.indentAtStart,i=n.lineWidth,a=void 0===i?80:i,s=n.minContentWidth,l=void 0===s?20:s,c=n.onFold,u=n.onOverflow;if(!a||a<0)return e;var f=Math.max(1+l,1+a-t.length);if(e.length<=f)return e;var p=[],d={},h=a-t.length;"number"==typeof o&&(o>a-Math.max(2,l)?p.push(0):h=a-o);var g,m=void 0,y=void 0,v=!1,b=-1,w=-1,S=-1;for(r===Oe&&-1!==(b=ke(e,b))&&(h=b+f);g=e[b+=1];){if(r===Ee&&"\\"===g){switch(w=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}S=b}if("\n"===g)r===Oe&&(b=ke(e,b)),h=b+f,m=void 0;else{if(" "===g&&y&&" "!==y&&"\n"!==y&&"\t"!==y){var x=e[b+1];x&&" "!==x&&"\n"!==x&&"\t"!==x&&(m=b)}if(b>=h)if(m)p.push(m),h=m+f,m=void 0;else if(r===Ee){for(;" "===y||"\t"===y;)y=g,g=e[b+=1],v=!0;var _=b>S+1?b-2:w-1;if(d[_])return e;p.push(_),d[_]=!0,h=_+f,m=void 0}else v=!0}y=g}if(v&&u&&u(),0===p.length)return e;c&&c();for(var O=e.slice(0,p[0]),E=0;E<p.length;++E){var k=p[E],C=p[E+1]||e.length;0===k?O="\n".concat(t).concat(e.slice(0,C)):(r===Ee&&d[k]&&(O+="".concat(e[k],"\\")),O+="\n".concat(t).concat(e.slice(k+1,C)))}return O}var Te=function(e){var t=e.indentAtStart;return t?Object.assign({indentAtStart:t},Se.fold):Se.fold},Pe=function(e){return/^(%|---|\.\.\.)/m.test(e)};function je(e,t){var r=t.implicitKey,n=Se.doubleQuoted,o=n.jsonEncoding,i=n.minMultiLineLength,a=JSON.stringify(e);if(o)return a;for(var s=t.indent||(Pe(e)?" ":""),l="",c=0,u=0,f=a[u];f;f=a[++u])if(" "===f&&"\\"===a[u+1]&&"n"===a[u+2]&&(l+=a.slice(c,u)+"\\ ",c=u+=1,f="\\"),"\\"===f)switch(a[u+1]){case"u":l+=a.slice(c,u);var p=a.substr(u+2,4);switch(p){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===p.substr(0,2)?l+="\\x"+p.substr(2):l+=a.substr(u,6)}c=(u+=5)+1;break;case"n":if(r||'"'===a[u+2]||a.length<i)u+=1;else{for(l+=a.slice(c,u)+"\n\n";"\\"===a[u+2]&&"n"===a[u+3]&&'"'!==a[u+4];)l+="\n",u+=2;l+=s," "===a[u+2]&&(l+="\\"),c=(u+=1)+1}break;default:u+=1}return l=c?l+a.slice(c):a,r?l:Ce(l,s,Ee,Te(t))}function Re(e,t){if(t.implicitKey){if(/\n/.test(e))return je(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return je(e,t);var r=t.indent||(Pe(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,"$&\n".concat(r))+"'";return t.implicitKey?n:Ce(n,r,_e,Te(t))}function Ae(e,t,r,n){var o=e.comment,i=e.type,a=e.value;if(/\n[\t ]+$/.test(a)||/^\s*$/.test(a))return je(a,t);var s=t.indent||(t.forceBlockIndent||Pe(a)?" ":""),l=s?"2":"1",c=i!==k.BLOCK_FOLDED&&(i===k.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;var n=t-r,o=e.length;if(o<=n)return!1;for(var i=0,a=0;i<o;++i)if("\n"===e[i]){if(i-a>n)return!0;if(o-(a=i+1)<=n)return!1}return!0}(a,Se.fold.lineWidth,s.length)),u=c?"|":">";if(!a)return u+"\n";var f="",p="";if(a=a.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?u+="-":a!==e&&t===e.length-1||(u+="+",n&&n()),p=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(u+=l);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(s))),f&&(f=f.replace(/\n+/g,"$&".concat(s))),o&&(u+=" #"+o.replace(/ ?[\r\n]+/g," "),r&&r()),!a)return"".concat(u).concat(l,"\n").concat(s).concat(p);if(c)return a=a.replace(/\n+/g,"$&".concat(s)),"".concat(u,"\n").concat(s).concat(f).concat(a).concat(p);a=a.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var d=Ce("".concat(f).concat(a).concat(p),s,Oe,Se.fold);return"".concat(u,"\n").concat(s).concat(d)}function Me(e,t,r,n){var o=Se.defaultType,i=t.implicitKey,a=t.inFlow,s=e,l=s.type,c=s.value;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));var u=function(o){switch(o){case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:return Ae(e,t,r,n);case k.QUOTE_DOUBLE:return je(c,t);case k.QUOTE_SINGLE:return Re(c,t);case k.PLAIN:return function(e,t,r,n){var o=e.comment,i=e.type,a=e.value,s=t.actualString,l=t.implicitKey,c=t.indent,u=t.inFlow;if(l&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a))return je(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||u||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?Re(a,t):je(a,t):Ae(e,t,r,n);if(!l&&!u&&i!==k.PLAIN&&-1!==a.indexOf("\n"))return Ae(e,t,r,n);if(""===c&&Pe(a))return t.forceBlockIndent=!0,Ae(e,t,r,n);var f=a.replace(/\n+/g,"$&\n".concat(c));if(s){var p=t.doc.schema.tags;if("string"!=typeof xe(f,p,p.scalarFallback).value)return je(a,t)}var d=l?f:Ce(f,c,_e,Te(t));return!o||u||-1===d.indexOf("\n")&&-1===o.indexOf("\n")?d:(r&&r(),function(e,t,r){if(!r)return e;var n=r.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(n,"\n").concat(t).concat(e)}(d,c,o))}(e,t,r,n);default:return null}};l!==k.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?l=k.QUOTE_DOUBLE:!i&&!a||l!==k.BLOCK_FOLDED&&l!==k.BLOCK_LITERAL||(l=k.QUOTE_DOUBLE);var f=u(l);if(null===f&&null===(f=u(o)))throw new Error("Unsupported default string type ".concat(o));return f}function Ie(e){var t=e.format,r=e.minFractionDigits,n=e.tag,o=e.value;if("bigint"==typeof o)return String(o);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";var i=JSON.stringify(o);if(!t&&r&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){var a=i.indexOf(".");a<0&&(a=i.length,i+=".");for(var s=r-(i.length-a-1);s-- >0;)i+="0"}return i}function De(e,t){var r,n,o;switch(t.type){case k.FLOW_MAP:r="}",n="flow map";break;case k.FLOW_SEQ:r="]",n="flow sequence";break;default:return void e.push(new L(t,"Not a flow collection!?"))}for(var i=t.items.length-1;i>=0;--i){var a=t.items[i];if(!a||a.type!==k.COMMENT){o=a;break}}if(o&&o.char!==r){var s,l="Expected ".concat(n," to end with ").concat(r);"number"==typeof o.offset?(s=new L(t,l)).offset=o.offset+1:(s=new L(o,l),o.range&&o.range.end&&(s.offset=o.range.end-o.range.start)),e.push(s)}}function Le(e,t){var r=t.context.src[t.range.start-1];"\n"!==r&&"\t"!==r&&" "!==r&&e.push(new L(t,"Comments must be separated from other tokens by white space characters"))}function Ne(e,t){var r=String(t),n=r.substr(0,8)+"..."+r.substr(-8);return new L(e,'The "'.concat(n,'" key is too long'))}function $e(e,t){var r,n=O(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.afterKey,a=o.before,s=o.comment,l=e.items[a];l?(i&&l.value&&(l=l.value),void 0===s?!i&&l.commentBefore||(l.spaceBefore=!0):l.commentBefore?l.commentBefore+="\n"+s:l.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}catch(e){n.e(e)}finally{n.f()}}function Fe(e,t){var r=t.strValue;return r?"string"==typeof r?r:(r.errors.forEach((function(r){r.source||(r.source=t),e.errors.push(r)})),r.str):""}function Be(e,t,r){var n,o=e.schema.tags,i=[],a=O(o);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.tag===r){if(!s.test){var l=s.resolve(e,t);return l instanceof le?l:new ie(l)}i.push(s)}}}catch(e){a.e(e)}finally{a.f()}var c=Fe(e,t);return"string"==typeof c&&i.length>0?xe(c,i,o.scalarFallback):null}var Ue=function(e){if(!e)return!1;var t=e.type;return t===k.MAP_KEY||t===k.MAP_VALUE||t===k.SEQ_ITEM};function ze(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var r=function(e,t){var r,n={before:[],after:[]},o=!1,i=!1,a=O(Ue(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s.start,c=s.end;switch(t.context.src[l]){case E.COMMENT:t.commentHasRequiredWhitespace(l)||e.push(new L(t,"Comments must be separated from other tokens by white space characters"));var u=t.header,f=t.valueRange;(f&&(l>f.start||u&&l>u.start)?n.after:n.before).push(t.context.src.slice(l+1,c));break;case E.ANCHOR:o&&e.push(new L(t,"A node can have at most one anchor")),o=!0;break;case E.TAG:i&&e.push(new L(t,"A node can have at most one tag")),i=!0}}}catch(e){a.e(e)}finally{a.f()}return{comments:n,hasAnchor:o,hasTag:i}}(e.errors,t),n=r.comments,o=r.hasAnchor,i=r.hasTag;if(o){var a=e.anchors,s=t.anchor,l=a.getNode(s);l&&(a.map[a.newName(s)]=l),a.map[s]=t}t.type===k.ALIAS&&(o||i)&&e.errors.push(new L(t,"An alias node must not specify any properties"));var c=function(e,t){var r=e.anchors,n=e.errors,o=e.schema;if(t.type===k.ALIAS){var i=t.rawValue,a=r.getNode(i);if(!a){var s="Aliased anchor not found: ".concat(i);return n.push(new D(t,s)),null}var l=new de(a);return r._cstAliases.push(l),l}var c=function(e,t){var r=t.tag,n=t.type,o=!1;if(r){var i=r.handle,a=r.suffix,s=r.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var l="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new L(t,l))}else if("!"!==i||a)try{return function(e,t){var r=t.tag,n=r.handle,o=r.suffix,i=e.tagPrefixes.find((function(e){return e.handle===n}));if(!i){var a=e.getDefaults().tagPrefixes;if(a&&(i=a.find((function(e){return e.handle===n}))),!i)throw new L(t,"The ".concat(n," tag handle is non-default and was not declared."))}if(!o)throw new L(t,"The ".concat(n," tag has no suffix."));if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===o[0])return e.warnings.push(new $(t,"YAML 1.0 ^ tag expansion is not supported")),o;if(/[:/]/.test(o)){var s=o.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(o)}}return i.prefix+decodeURIComponent(o)}(e,t)}catch(t){e.errors.push(t)}else o=!0}switch(n){case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:case k.QUOTE_DOUBLE:case k.QUOTE_SINGLE:return T.STR;case k.FLOW_MAP:case k.MAP:return T.MAP;case k.FLOW_SEQ:case k.SEQ:return T.SEQ;case k.PLAIN:return o?T.STR:null;default:return null}}(e,t);if(c)return function(e,t,r){try{var n=Be(e,t,r);if(n)return r&&t.tag&&(n.tag=r),n}catch(r){return r.source||(r.source=t),e.errors.push(r),null}try{var o=function(e){switch(e.type){case k.FLOW_MAP:case k.MAP:return T.MAP;case k.FLOW_SEQ:case k.SEQ:return T.SEQ;default:return T.STR}}(t);if(!o)throw new Error("The tag ".concat(r," is unavailable"));var i="The tag ".concat(r," is unavailable, falling back to ").concat(o);e.warnings.push(new $(t,i));var a=Be(e,t,o);return a.tag=r,a}catch(r){var s=new D(t,r.message);return s.stack=r.stack,e.errors.push(s),null}}(e,t,c);if(t.type!==k.PLAIN){var u="Failed to resolve ".concat(t.type," node here");return n.push(new N(t,u)),null}try{return xe(Fe(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),n.push(e),null}}(e,t);if(c){c.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(c.cstNode=t),e.options.keepNodeTypes&&(c.type=t.type);var u=n.before.join("\n");u&&(c.commentBefore=c.commentBefore?"".concat(c.commentBefore,"\n").concat(u):u);var f=n.after.join("\n");f&&(c.comment=c.comment?"".concat(c.comment,"\n").concat(f):f)}return t.resolved=c}function We(e,t){if(t.type!==k.MAP&&t.type!==k.FLOW_MAP){var r="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new N(t,r)),null}var n=t.type===k.FLOW_MAP?function(e,t){for(var r=[],n=[],o=void 0,i=!1,a="{",s=0;s<t.items.length;++s){var l=t.items[s];if("string"==typeof l.char){var c=l.char,u=l.offset;if("?"===c&&void 0===o&&!i){i=!0,a=":";continue}if(":"===c){if(void 0===o&&(o=null),":"===a){a=",";continue}}else if(i&&(void 0===o&&","!==c&&(o=null),i=!1),void 0!==o&&(n.push(new fe(o)),o=void 0,","===c)){a=":";continue}if("}"===c){if(s===t.items.length-1)continue}else if(c===a){a=":";continue}var f="Flow map contains an unexpected ".concat(c),p=new N(t,f);p.offset=u,e.errors.push(p)}else l.type===k.BLANK_LINE?r.push({afterKey:!!o,before:n.length}):l.type===k.COMMENT?(Le(e.errors,l),r.push({afterKey:!!o,before:n.length,comment:l.comment})):void 0===o?(","===a&&e.errors.push(new L(l,"Separator , missing in flow map")),o=ze(e,l)):(","!==a&&e.errors.push(new L(l,"Indicator : missing in flow map entry")),n.push(new fe(o,ze(e,l))),o=void 0,i=!1)}return De(e.errors,t),void 0!==o&&n.push(new fe(o)),{comments:r,items:n}}(e,t):function(e,t){for(var r=[],n=[],o=void 0,i=null,a=0;a<t.items.length;++a){var s=t.items[a];switch(s.type){case k.BLANK_LINE:r.push({afterKey:!!o,before:n.length});break;case k.COMMENT:r.push({afterKey:!!o,before:n.length,comment:s.comment});break;case k.MAP_KEY:void 0!==o&&n.push(new fe(o)),s.error&&e.errors.push(s.error),o=ze(e,s.node),i=null;break;case k.MAP_VALUE:if(void 0===o&&(o=null),s.error&&e.errors.push(s.error),!s.context.atLineStart&&s.node&&s.node.type===k.MAP&&!s.node.context.atLineStart){e.errors.push(new L(s.node,"Nested mappings are not allowed in compact mappings"))}var l=s.node;if(!l&&s.props.length>0){(l=new F(k.PLAIN,[])).context={parent:s,src:s.context.src};var c=s.range.start+1;if(l.range={start:c,end:c},l.valueRange={start:c,end:c},"number"==typeof s.range.origStart){var u=s.range.origStart+1;l.range.origStart=l.range.origEnd=u,l.valueRange.origStart=l.valueRange.origEnd=u}}var f=new fe(o,ze(e,l));He(s,f),n.push(f),o&&"number"==typeof i&&s.range.start>i+1024&&e.errors.push(Ne(t,o)),o=void 0,i=null;break;default:void 0!==o&&n.push(new fe(o)),o=ze(e,s),i=s.range.start,s.error&&e.errors.push(s.error);e:for(var p=a+1;;++p){var d=t.items[p];switch(d&&d.type){case k.BLANK_LINE:case k.COMMENT:continue e;case k.MAP_VALUE:break e;default:e.errors.push(new L(s,"Implicit map keys need to be followed by map values"));break e}}if(s.valueRangeContainsNewline){e.errors.push(new L(s,"Implicit map keys need to be on a single line"))}}}return void 0!==o&&n.push(new fe(o)),{comments:r,items:n}}(e,t),o=n.comments,i=n.items,a=new ge;a.items=i,$e(a,o);for(var s=!1,l=0;l<i.length;++l){var c=i[l].key;if(c instanceof le&&(s=!0),e.schema.merge&&c&&"<<"===c.value){i[l]=new me(i[l]);var u=i[l].value.items,f=null;u.some((function(e){if(e instanceof de){var t=e.source.type;return t!==k.MAP&&t!==k.FLOW_MAP&&(f="Merge nodes aliases can only point to maps")}return f="Merge nodes can only have Alias nodes as values"})),f&&e.errors.push(new L(t,f))}else for(var p=l+1;p<i.length;++p){var d=i[p].key;if(c===d||c&&d&&Object.prototype.hasOwnProperty.call(c,"value")&&c.value===d.value){var h='Map keys must be unique; "'.concat(c,'" is repeated');e.errors.push(new L(t,h));break}}}return s&&!e.options.mapAsMap&&e.warnings.push(new $(t,"Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")),t.resolved=a,a}var qe=function(e){var t=e.context,r=t.lineStart,n=t.node,o=t.src,i=e.props;if(0===i.length)return!1;var a=i[0].start;if(n&&a>n.valueRange.start)return!1;if(o[a]!==E.COMMENT)return!1;for(var s=r;s<a;++s)if("\n"===o[s])return!1;return!0};function He(e,t){if(qe(e)){var r=e.getPropValue(0,E.COMMENT,!0),n=!1,o=t.value.commentBefore;if(o&&o.startsWith(r))t.value.commentBefore=o.substr(r.length+1),n=!0;else{var i=t.value.comment;!e.node&&i&&i.startsWith(r)&&(t.value.comment=i.substr(r.length+1),n=!0)}n&&(t.comment=r)}}function Ve(e,t){if(t.type!==k.SEQ&&t.type!==k.FLOW_SEQ){var r="A ".concat(t.type," node cannot be resolved as a sequence");return e.errors.push(new N(t,r)),null}var n=t.type===k.FLOW_SEQ?function(e,t){for(var r=[],n=[],o=!1,i=void 0,a=null,s="[",l=null,c=0;c<t.items.length;++c){var u=t.items[c];if("string"==typeof u.char){var f=u.char,p=u.offset;if(":"===f||!o&&void 0===i||(o&&void 0===i&&(i=s?n.pop():null),n.push(new fe(i)),o=!1,i=void 0,a=null),f===s)s=null;else if(s||"?"!==f){if("["!==s&&":"===f&&void 0===i){if(","===s){if((i=n.pop())instanceof fe){var d=new L(t,"Chaining flow sequence pairs is invalid");d.offset=p,e.errors.push(d)}if(!o&&"number"==typeof a){var h=u.range?u.range.start:u.offset;h>a+1024&&e.errors.push(Ne(t,i));for(var g=l.context.src,m=a;m<h;++m)if("\n"===g[m]){e.errors.push(new L(l,"Implicit keys of flow sequence pairs need to be on a single line"));break}}}else i=null;a=null,o=!1,s=null}else if("["===s||"]"!==f||c<t.items.length-1){var y="Flow sequence contains an unexpected ".concat(f),v=new N(t,y);v.offset=p,e.errors.push(v)}}else o=!0}else if(u.type===k.BLANK_LINE)r.push({before:n.length});else if(u.type===k.COMMENT)Le(e.errors,u),r.push({comment:u.comment,before:n.length});else{if(s){var b="Expected a ".concat(s," in flow sequence");e.errors.push(new L(u,b))}var w=ze(e,u);void 0===i?(n.push(w),l=u):(n.push(new fe(i,w)),i=void 0),a=u.range.start,s=","}}return De(e.errors,t),void 0!==i&&n.push(new fe(i)),{comments:r,items:n}}(e,t):function(e,t){for(var r=[],n=[],o=0;o<t.items.length;++o){var i=t.items[o];switch(i.type){case k.BLANK_LINE:r.push({before:n.length});break;case k.COMMENT:r.push({comment:i.comment,before:n.length});break;case k.SEQ_ITEM:if(i.error&&e.errors.push(i.error),n.push(ze(e,i.node)),i.hasProps){e.errors.push(new L(i,"Sequence items cannot have tags or anchors before the - indicator"))}break;default:i.error&&e.errors.push(i.error),e.errors.push(new N(i,"Unexpected ".concat(i.type," node in sequence")))}}return{comments:r,items:n}}(e,t),o=n.comments,i=n.items,a=new ue;return a.items=i,$e(a,o),!e.options.mapAsMap&&i.some((function(e){return e instanceof fe&&e.key instanceof le}))&&e.warnings.push(new $(t,"Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")),t.resolved=a,a}var Ke=r(48834).Buffer,Ge={identify:function(e){return e instanceof Uint8Array},default:!1,tag:"tag:yaml.org,2002:binary",resolve:function(e,t){var r=Fe(e,t);if("function"==typeof Ke)return Ke.from(r,"base64");if("function"==typeof atob){for(var n=atob(r.replace(/[\n\r]/g,"")),o=new Uint8Array(n.length),i=0;i<n.length;++i)o[i]=n.charCodeAt(i);return o}return e.errors.push(new D(t,"This environment does not support reading binary tags; either Buffer or atob is required")),null},options:ye,stringify:function(e,t,r,n){var o,i=e.comment,a=e.type,s=e.value;if("function"==typeof Ke)o=s instanceof Ke?s.toString("base64"):Ke.from(s.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");for(var l="",c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);o=btoa(l)}if(a||(a=ye.defaultType),a===k.QUOTE_DOUBLE)s=o;else{for(var u=ye.lineWidth,f=Math.ceil(o.length/u),p=new Array(f),d=0,h=0;d<f;++d,h+=u)p[d]=o.substr(h,u);s=p.join(a===k.BLOCK_LITERAL?"\n":" ")}return Me({comment:i,type:a,value:s},t,r,n)}};function Ze(e,t){for(var r=Ve(e,t),n=0;n<r.items.length;++n){var o=r.items[n];if(!(o instanceof fe)){if(o instanceof ge){if(o.items.length>1)throw new L(t,"Each pair must have its own sequence indicator");var i=o.items[0]||new fe;o.commentBefore&&(i.commentBefore=i.commentBefore?"".concat(o.commentBefore,"\n").concat(i.commentBefore):o.commentBefore),o.comment&&(i.comment=i.comment?"".concat(o.comment,"\n").concat(i.comment):o.comment),o=i}r.items[n]=o instanceof fe?o:new fe(o)}}return r}function Ye(e,t,r){var n=new ue(e);n.tag="tag:yaml.org,2002:pairs";var o,i=O(t);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=void 0,l=void 0;if(Array.isArray(a)){if(2!==a.length)throw new TypeError("Expected [key, value] tuple: ".concat(a));s=a[0],l=a[1]}else if(a&&a instanceof Object){var c=Object.keys(a);if(1!==c.length)throw new TypeError("Expected { key: value } tuple: ".concat(a));l=a[s=c[0]]}else s=a;var u=e.createPair(s,l,r);n.items.push(u)}}catch(e){i.e(e)}finally{i.f()}return n}var Je={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ze,createNode:Ye},Qe=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),s(h(e=t.call(this)),"add",ge.prototype.add.bind(h(e))),s(h(e),"delete",ge.prototype.delete.bind(h(e))),s(h(e),"get",ge.prototype.get.bind(h(e))),s(h(e),"has",ge.prototype.has.bind(h(e))),s(h(e),"set",ge.prototype.set.bind(h(e))),e.tag=r.tag,e}return a(r,[{key:"toJSON",value:function(e,t){var r=new Map;t&&t.onCreate&&t.onCreate(r);var n,o=O(this.items);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=void 0,s=void 0;if(i instanceof fe?(a=oe(i.key,"",t),s=oe(i.value,a,t)):a=oe(i,"",t),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,s)}}catch(e){o.e(e)}finally{o.f()}return r}}]),r}(ue);s(Qe,"tag","tag:yaml.org,2002:omap");var Xe={identify:function(e){return e instanceof Map},nodeClass:Qe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var r,n=Ze(e,t),o=[],i=O(n.items);try{for(i.s();!(r=i.n()).done;){var a=r.value.key;if(a instanceof ie){if(o.includes(a.value))throw new L(t,"Ordered maps must not include duplicate keys");o.push(a.value)}}}catch(e){i.e(e)}finally{i.f()}return Object.assign(new Qe,n)},createNode:function(e,t,r){var n=Ye(e,t,r),o=new Qe;return o.items=n.items,o}},et=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this)).tag=r.tag,e}return a(r,[{key:"add",value:function(e){var t=e instanceof fe?e:new fe(e);he(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var r=he(this.items,e);return!t&&r instanceof fe?r.key instanceof ie?r.key.value:r.key:r}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(n(t)));var r=he(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new fe(e))}},{key:"toJSON",value:function(e,t){return y(c(r.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return y(c(r.prototype),"toString",this).call(this,e,t,n);throw new Error("Set items must all have null values")}}]),r}(ge);s(et,"tag","tag:yaml.org,2002:set");var tt={identify:function(e){return e instanceof Set},nodeClass:et,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var r=We(e,t);if(!r.hasAllNullValues())throw new L(t,"Set items must all have null values");return Object.assign(new et,r)},createNode:function(e,t,r){var n,o=new et,i=O(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;o.items.push(e.createPair(a,null,r))}}catch(e){i.e(e)}finally{i.f()}return o}},rt=function(e,t){var r=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-r:r},nt=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Ie(t);var r="";t<0&&(r="-",t=Math.abs(t));var n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),r+n.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},ot={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,r){return rt(t,r.replace(/_/g,""))},stringify:nt},it={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,r){return rt(t,r.replace(/_/g,""))},stringify:nt},at={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,r,n,o,i,a,s,l){s&&(s=(s+"00").substr(1,3));var c=Date.UTC(t,r-1,n,o||0,i||0,a||0,s||0);if(l&&"Z"!==l){var u=rt(l[0],l.slice(1));Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function st(e){var t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function lt(e,t){if(st(!1)){var r="undefined"!=typeof process&&process.emitWarning;r?r(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var ct={},ut={createNode:function(e,t,r){var o=new ge(e);if(t instanceof Map){var i,a=O(t);try{for(a.s();!(i=a.n()).done;){var s=v(i.value,2),l=s[0],c=s[1];o.items.push(e.createPair(l,c,r))}}catch(e){a.e(e)}finally{a.f()}}else if(t&&"object"===n(t))for(var u=0,f=Object.keys(t);u<f.length;u++){var p=f[u];o.items.push(e.createPair(p,t[p],r))}return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o},default:!0,nodeClass:ge,tag:"tag:yaml.org,2002:map",resolve:We},ft={createNode:function(e,t,r){var n=new ue(e);if(t&&t[Symbol.iterator]){var o,i=O(t);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e.createNode(a,r.wrapScalars,null,r);n.items.push(s)}}catch(e){i.e(e)}finally{i.f()}}return n},default:!0,nodeClass:ue,tag:"tag:yaml.org,2002:seq",resolve:Ve},pt=[ut,ft,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Fe,stringify:function(e,t,r,n){return Me(e,t=Object.assign({actualString:!0},t),r,n)},options:Se}],dt=function(e){return"bigint"==typeof e||Number.isInteger(e)},ht=function(e,t,r){return be.asBigInt?BigInt(e):parseInt(t,r)};function gt(e,t,r){var n=e.value;return dt(n)&&n>=0?r+n.toString(t):Ie(e)}var mt={identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:we,stringify:function(){return we.nullStr}},yt={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:ve,stringify:function(e){return e.value?ve.trueStr:ve.falseStr}},vt={identify:function(e){return dt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return ht(e,t,8)},options:be,stringify:function(e){return gt(e,8,"0o")}},bt={identify:dt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return ht(e,e,10)},options:be,stringify:Ie},wt={identify:function(e){return dt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return ht(e,t,16)},options:be,stringify:function(e){return gt(e,16,"0x")}},St={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Ie},xt={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},_t={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,r){var n=t||r,o=new ie(parseFloat(e));return n&&"0"===n[n.length-1]&&(o.minFractionDigits=n.length),o},stringify:Ie},Ot=pt.concat([mt,yt,vt,bt,wt,St,xt,_t]),Et=function(e){return"bigint"==typeof e||Number.isInteger(e)},kt=function(e){var t=e.value;return JSON.stringify(t)},Ct=[ut,ft,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Fe,stringify:kt},{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:kt},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:kt},{identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return be.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return Et(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:kt}];Ct.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var Tt=function(e){return e.value?ve.trueStr:ve.falseStr},Pt=function(e){return"bigint"==typeof e||Number.isInteger(e)};function jt(e,t,r){var n=t.replace(/_/g,"");if(be.asBigInt){switch(r){case 2:n="0b".concat(n);break;case 8:n="0o".concat(n);break;case 16:n="0x".concat(n)}var o=BigInt(n);return"-"===e?BigInt(-1)*o:o}var i=parseInt(n,r);return"-"===e?-1*i:i}function Rt(e,t,r){var n=e.value;if(Pt(n)){var o=n.toString(t);return n<0?"-"+r+o.substr(1):r+o}return Ie(e)}var At=pt.concat([{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:we,stringify:function(){return we.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:ve,stringify:Tt},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:ve,stringify:Tt},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,r){return jt(t,r,2)},stringify:function(e){return Rt(e,2,"0b")}},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,r){return jt(t,r,8)},stringify:function(e){return Rt(e,8,"0")}},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,r){return jt(t,r,10)},stringify:Ie},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,r){return jt(t,r,16)},stringify:function(e){return Rt(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Ie},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var r=new ie(parseFloat(e.replace(/_/g,"")));if(t){var n=t.replace(/_/g,"");"0"===n[n.length-1]&&(r.minFractionDigits=n.length)}return r},stringify:Ie}],Ge,Xe,Je,tt,ot,it,at),Mt={core:Ot,failsafe:pt,json:Ct,yaml11:At},It={binary:Ge,bool:yt,float:_t,floatExp:xt,floatNaN:St,floatTime:it,int:bt,intHex:wt,intOct:vt,intTime:ot,map:ut,null:mt,omap:Xe,pairs:Je,seq:ft,set:tt,timestamp:at};var Dt=function(e,t){return e.key<t.key?-1:e.key>t.key?1:0},Lt=function(){function e(t){var r=t.customTags,n=t.merge,i=t.schema,a=t.sortMapEntries,s=t.tags;o(this,e),this.merge=!!n,this.name=i,this.sortMapEntries=!0===a?Dt:a||null,!r&&s&&function(e,t){if(!ct[e]&&st(!0)){ct[e]=!0;var r="The option '".concat(e,"' will be removed in a future release");lt(r+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,r,n){var o=e[n.replace(/\W/g,"")];if(!o){var i=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(n,'"; use one of ').concat(i))}if(Array.isArray(r)){var a,s=O(r);try{for(s.s();!(a=s.n()).done;){var l=a.value;o=o.concat(l)}}catch(e){s.e(e)}finally{s.f()}}else"function"==typeof r&&(o=r(o.slice()));for(var c=0;c<o.length;++c){var u=o[c];if("string"==typeof u){var f=t[u];if(!f){var p=Object.keys(t).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown custom tag "'.concat(u,'"; use one of ').concat(p))}o[c]=f}}return o}(Mt,It,r||s,i)}return a(e,[{key:"createNode",value:function(t,r,o,i){var a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r};return function(e,t,r){if(e instanceof ne)return e;var o=r.defaultPrefix,i=r.onTagObj,a=r.prevObjects,s=r.schema,l=r.wrapScalars;t&&t.startsWith("!!")&&(t=o+t.slice(2));var c=function(e,t,r){if(t){var n=r.filter((function(e){return e.tag===t})),o=n.find((function(e){return!e.format}))||n[0];if(!o)throw new Error("Tag ".concat(t," not found"));return o}return r.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,s.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==n(e))return l?new ie(e):e;c=e instanceof Map?ut:e[Symbol.iterator]?ft:ut}i&&(i(c),delete r.onTagObj);var u={value:void 0,node:void 0};if(e&&"object"===n(e)&&a){var f=a.get(e);if(f){var p=new de(f);return r.aliasNodes.push(p),p}u.value=e,a.set(e,u)}return u.node=c.createNode?c.createNode(r.schema,e,r):l?new ie(e):e,t&&u.node instanceof ne&&(u.node.tag=t),u.node}(t,o,i?Object.assign(i,a):a)}},{key:"createPair",value:function(e,t,r){r||(r={wrapScalars:!0});var n=this.createNode(e,r.wrapScalars,null,r),o=this.createNode(t,r.wrapScalars,null,r);return new fe(n,o)}}]),e}();s(Lt,"defaultPrefix",C),s(Lt,"defaultTags",T);var Nt={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},$t={get binary(){return ye},set binary(e){Object.assign(ye,e)},get bool(){return ve},set bool(e){Object.assign(ve,e)},get int(){return be},set int(e){Object.assign(be,e)},get null(){return we},set null(e){Object.assign(we,e)},get str(){return Se},set str(e){Object.assign(Se,e)}},Ft={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:C},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:C}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:C}]}};function Bt(e,t){if("1.0"===(e.version||e.options.version)){var r=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(r)return"!"+r[1];var n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?"!".concat(n[1],"/").concat(n[2]):"!".concat(t.replace(/^tag:/,""))}var o=e.tagPrefixes.find((function(e){return 0===t.indexOf(e.prefix)}));if(!o){var i=e.getDefaults().tagPrefixes;o=i&&i.find((function(e){return 0===t.indexOf(e.prefix)}))}if(!o)return"!"===t[0]?t:"!<".concat(t,">");var a=t.substr(o.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return o.handle+a}function Ut(e,t,r,o){var i,a=t.doc,s=a.anchors,l=a.schema;if(!(e instanceof ne)){var c={aliasNodes:[],onTagObj:function(e){return i=e},prevObjects:new Map};e=l.createNode(e,!0,null,c);var u,f=O(c.aliasNodes);try{for(f.s();!(u=f.n()).done;){var p=u.value;p.source=p.source.node;var d=s.getName(p.source);d||(d=s.newName(),s.map[d]=p.source)}}catch(e){f.e(e)}finally{f.f()}}if(e instanceof fe)return e.toString(t,r,o);i||(i=function(e,t){if(t instanceof de)return de;if(t.tag){var r=e.filter((function(e){return e.tag===t.tag}));if(r.length>0)return r.find((function(e){return e.format===t.format}))||r[0]}var o,i;if(t instanceof ie){i=t.value;var a=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));o=a.find((function(e){return e.format===t.format}))||a.find((function(e){return!e.format}))}else i=t,o=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!o){var s=i&&i.constructor?i.constructor.name:n(i);throw new Error("Tag not resolved for ".concat(s," value"))}return o}(l.tags,e));var h=function(e,t,r){var n=r.anchors,o=r.doc,i=[],a=o.anchors.getName(e);return a&&(n[a]=e,i.push("&".concat(a))),e.tag?i.push(Bt(o,e.tag)):t.default||i.push(Bt(o,t.tag)),i.join(" ")}(e,i,t);h.length>0&&(t.indentAtStart=(t.indentAtStart||0)+h.length+1);var g="function"==typeof i.stringify?i.stringify(e,t,r,o):e instanceof ie?Me(e,t,r,o):e.toString(t,r,o);return h?e instanceof ie||"{"===g[0]||"["===g[0]?"".concat(h," ").concat(g):"".concat(h,"\n").concat(t.indent).concat(g):g}var zt=function(){function e(t){o(this,e),s(this,"map",Object.create(null)),this.prefix=t}return a(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new de(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new me,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.value.items=n.map((function(t){if(t instanceof de){if(t.source instanceof ge)return t}else if(t instanceof ge)return e.createAlias(t);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}},{key:"getName",value:function(e){var t=this.map;return Object.keys(t).find((function(r){return t[r]===e}))}},{key:"getNames",value:function(){return Object.keys(this.map)}},{key:"getNode",value:function(e){return this.map[e]}},{key:"newName",value:function(e){e||(e=this.prefix);for(var t=Object.keys(this.map),r=1;;++r){var n="".concat(e).concat(r);if(!t.includes(n))return n}}},{key:"resolveNodes",value:function(){var e=this.map,t=this._cstAliases;Object.keys(e).forEach((function(t){e[t]=e[t].resolved})),t.forEach((function(e){e.source=e.source.resolved})),delete this._cstAliases}},{key:"setAnchor",value:function(t,r){if(null!=t&&!e.validAnchorNode(t))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(r&&/[\x00-\x19\s,[\]{}]/.test(r))throw new Error("Anchor names must not contain whitespace or control characters");var n=this.map,o=t&&Object.keys(n).find((function(e){return n[e]===t}));if(o){if(!r)return o;o!==r&&(delete n[o],n[r]=t)}else{if(!r){if(!t)return null;r=this.newName()}n[r]=t}return r}}],[{key:"validAnchorNode",value:function(e){return e instanceof ie||e instanceof ue||e instanceof ge}}]),e}(),Wt=function e(t,r){if(t&&"object"===n(t)){var o=t.tag;t instanceof le?(o&&(r[o]=!0),t.items.forEach((function(t){return e(t,r)}))):t instanceof fe?(e(t.key,r),e(t.value,r)):t instanceof ie&&o&&(r[o]=!0)}return r},qt=function(e){return Object.keys(Wt(e,{}))};function Ht(e,t){var r=e.tagPrefixes,n=v(t.parameters,2),o=n[0],i=n[1];if(!o||!i)throw new L(t,"Insufficient parameters given for %TAG directive");if(r.some((function(e){return e.handle===o})))throw new L(t,"The %TAG directive must only be given at most once per handle in the same document.");return{handle:o,prefix:i}}function Vt(e,t){var r=v(t.parameters,1)[0];if("YAML:1.0"===t.name&&(r="1.0"),!r)throw new L(t,"Insufficient parameters given for %YAML directive");if(!Ft[r]){var n=e.version||e.options.version,o="Document will be parsed as YAML ".concat(n," rather than YAML ").concat(r);e.warnings.push(new $(t,o))}return r}function Kt(e){if(e instanceof le)return!0;throw new Error("Expected a YAML collection as document contents")}var Gt=function(){function e(t){o(this,e),this.anchors=new zt(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return a(e,[{key:"add",value:function(e){return Kt(this.contents),this.contents.add(e)}},{key:"addIn",value:function(e,t){Kt(this.contents),this.contents.addIn(e,t)}},{key:"delete",value:function(e){return Kt(this.contents),this.contents.delete(e)}},{key:"deleteIn",value:function(e){return se(e)?null!=this.contents&&(this.contents=null,!0):(Kt(this.contents),this.contents.deleteIn(e))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(e,t){return this.contents instanceof le?this.contents.get(e,t):void 0}},{key:"getIn",value:function(e,t){return se(e)?!t&&this.contents instanceof ie?this.contents.value:this.contents:this.contents instanceof le?this.contents.getIn(e,t):void 0}},{key:"has",value:function(e){return this.contents instanceof le&&this.contents.has(e)}},{key:"hasIn",value:function(e){return se(e)?void 0!==this.contents:this.contents instanceof le&&this.contents.hasIn(e)}},{key:"set",value:function(e,t){Kt(this.contents),this.contents.set(e,t)}},{key:"setIn",value:function(e,t){se(e)?this.contents=t:(Kt(this.contents),this.contents.setIn(e,t))}},{key:"setSchema",value:function(e,t){if(e||t||!this.schema){"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);var r=Object.assign({},this.getDefaults(),this.options);this.schema=new Lt(r)}}},{key:"parse",value:function(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");var r=e.directives,n=void 0===r?[]:r,o=e.contents,i=void 0===o?[]:o,a=e.directivesEndMarker,s=e.error,l=e.valueRange;if(s&&(s.source||(s.source=this),this.errors.push(s)),function(e,t,r){var n,o=[],i=!1,a=O(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=s.comment,c=s.name;switch(c){case"TAG":try{e.tagPrefixes.push(Ht(e,s))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":e.version&&e.errors.push(new L(s,"The %YAML directive must only be given at most once per document."));try{e.version=Vt(e,s)}catch(t){e.errors.push(t)}i=!0;break;default:if(c){var u="YAML only supports %TAG and %YAML directives, and not %".concat(c);e.warnings.push(new $(s,u))}}l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}r&&!i&&"1.1"===(e.version||r.version||e.options.version)&&(e.tagPrefixes=r.tagPrefixes.map((function(e){return{handle:e.handle,prefix:e.prefix}})),e.version=r.version),e.commentBefore=o.join("\n")||null}(this,n,t),a&&(this.directivesEndMarker=!0),this.range=l?[l.start,l.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){var r,n={before:[],after:[]},o=void 0,i=!1,a=O(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.valueRange){if(void 0!==o){e.errors.push(new N(s,"Document contains trailing content not separated by a ... or --- line"));break}var l=ze(e,s);i&&(l.spaceBefore=!0,i=!1),o=l}else null!==s.comment?(void 0===o?n.before:n.after).push(s.comment):s.type===k.BLANK_LINE&&(i=!0,void 0===o&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]))}}catch(e){a.e(e)}finally{a.f()}if(e.contents=o||null,o){var c=n.before.join("\n");if(c){var u=o instanceof le&&o.items[0]?o.items[0]:o;u.commentBefore=u.commentBefore?"".concat(c,"\n").concat(u.commentBefore):c}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){var c,u=O(this.errors);try{for(u.s();!(c=u.n()).done;){var f=c.value;f instanceof I&&f.makePretty()}}catch(e){u.e(e)}finally{u.f()}var p,d=O(this.warnings);try{for(d.s();!(p=d.n()).done;){var h=p.value;h instanceof I&&h.makePretty()}}catch(e){d.e(e)}finally{d.f()}}return this}},{key:"listNonDefaultTags",value:function(){return qt(this.contents).filter((function(e){return 0!==e.indexOf(Lt.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var r=this.tagPrefixes.find((function(t){return t.handle===e}));r?r.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var r=this,n=this.options,o=n.keepBlobsInJSON,i=n.mapAsMap,a=n.maxAliasCount,s=o&&("string"!=typeof e||!(this.contents instanceof ie)),l={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!i,maxAliasCount:a,stringify:Ut},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map((function(e){return[r.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var u=oe(this.contents,e,l);if("function"==typeof t&&l.anchors){var f,p=O(l.anchors.values());try{for(p.s();!(f=p.n()).done;){var d=f.value,h=d.count;t(d.res,h)}}catch(e){p.e(e)}finally{p.f()}}return u}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var r=[],n=!1;if(this.version){var o="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?o="%YAML:1.0":"1.1"===this.version&&(o="%YAML 1.1")),r.push(o),n=!0}var i=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,o=e.prefix;i.some((function(e){return 0===e.indexOf(o)}))&&(r.push("%TAG ".concat(t," ").concat(o)),n=!0)})),(n||this.directivesEndMarker)&&r.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||r.unshift(""),r.unshift(this.commentBefore.replace(/^/gm,"#")));var a={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Ut},s=!1,l=null;if(this.contents){this.contents instanceof ne&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&r.push(""),this.contents.commentBefore&&r.push(this.contents.commentBefore.replace(/^/gm,"#")),a.forceBlockIndent=!!this.comment,l=this.contents.comment);var c=l?null:function(){return s=!0},u=Ut(this.contents,a,(function(){return l=null}),c);r.push(re(u,"",l))}else void 0!==this.contents&&r.push(Ut(this.contents,a));return this.comment&&(s&&!l||""===r[r.length-1]||r.push(""),r.push(this.comment.replace(/^/gm,"#"))),r.join("\n")+"\n"}}]),e}();s(Gt,"defaults",Ft);var Zt=function(e){l(r,e);var t=m(r);function r(e){return o(this,r),t.call(this,Object.assign({},Nt,e))}return r}(Gt);function Yt(e,t){var r=te(e),n=new Zt(t).parse(r[0]);return r.length>1&&n.errors.unshift(new L(r[1],"Source contains multiple documents; please use YAML.parseAllDocuments()")),n}var Jt={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;void 0===r&&"string"==typeof t&&(r=t,t=!0);var n=Object.assign({},Gt.defaults[Nt.version],Nt);return new Lt(n).createNode(e,t,r)},defaultOptions:Nt,Document:Zt,parse:function(e,t){var r=Yt(e,t);if(r.warnings.forEach((function(e){return lt(e)})),r.errors.length>0)throw r.errors[0];return r.toJSON()},parseAllDocuments:function(e,t){var r,n,o=[],i=O(te(e));try{for(i.s();!(n=i.n()).done;){var a=n.value,s=new Zt(t);s.parse(a,r),o.push(s),r=s}}catch(e){i.e(e)}finally{i.f()}return o},parseCST:te,parseDocument:Yt,scalarOptions:$t,stringify:function(e,t){var r=new Zt(t);return r.contents=e,String(r)}}},47185:e=>{"use strict";e.exports=JSON.parse('{"classId":"classID","dataType":"datatype","itemId":"itemID","strokeDashArray":"strokeDasharray","strokeDashOffset":"strokeDashoffset","strokeLineCap":"strokeLinecap","strokeLineJoin":"strokeLinejoin","strokeMiterLimit":"strokeMiterlimit","typeOf":"typeof","xLinkActuate":"xlinkActuate","xLinkArcRole":"xlinkArcrole","xLinkHref":"xlinkHref","xLinkRole":"xlinkRole","xLinkShow":"xlinkShow","xLinkTitle":"xlinkTitle","xLinkType":"xlinkType","xmlnsXLink":"xmlnsXlink"}')},64775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";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}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{DecapCmsCore:()=>V});var e=__webpack_require__(12244),t=__webpack_require__.n(e),r=__webpack_require__(53741),n=__webpack_require__(57903),o=__webpack_require__(7267),i=__webpack_require__(53327),a=__webpack_require__(9316),s=__webpack_require__(74081),l=__webpack_require__(58267);function c(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var u=c();u.withExtraArgument=c;const f=u;var p=__webpack_require__(15161),d=__webpack_require__(93324);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const m=(0,s.MT)((0,s.UY)(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},d.ZP)),(0,l.Uo)((0,s.md)(f,p.O)));var y=__webpack_require__(12318),v=__webpack_require__(97166),b=__webpack_require__(36867),w=__webpack_require__(98537),S=__webpack_require__.n(w),x=__webpack_require__(19619);function _(e){return S()({},(0,x.Kd)("en"),(0,x.Kd)(e))}var O=__webpack_require__(86402),E=__webpack_require__(64682),k=__webpack_require__(69456),C=__webpack_require__(78841),T=__webpack_require__.n(C),P=__webpack_require__(32673),j=__webpack_require__.n(P),R=__webpack_require__(62797);function A({field:e,t}){return(0,R.jsx)("div",null,t("editor.editorWidgets.unknownControl.noControl",{widget:e.get("widget")}))}A.propTypes={field:T().map,t:j().func.isRequired};const M=(0,a.Iu)()(A);function I({field:e,t}){return(0,R.jsx)("div",{className:"nc-widgetPreview"},t("editor.editorWidgets.unknownPreview.noPreview",{widget:e.get("widget")}))}I.propTypes={field:T().map,t:j().func.isRequired};const D=(0,a.Iu)()(I);(0,x.jC)("unknown",M,D);var L=__webpack_require__(25291),N=__webpack_require__.n(L),$=__webpack_require__(52977);function F(e){return m.dispatch((0,$.C9)(e,void 0))}const B=N()((async function(e,t){const r=(0,x.ck)(e);if(r){const e=await r.init({options:t,handleInsert:F});m.dispatch((0,$.RF)(e))}else{const t=new Error(`Missing external media library '${e}'. Please use 'registerMediaLibrary' to register it.`);m.dispatch((0,v.rR)(t))}}));m.subscribe((()=>{const e=m.getState();if(e){var t;const r=null===(t=e.config.media_library)||void 0===t?void 0:t.name;if(r&&!e.mediaLibrary.get("externalLibrary")){const t=e.config.media_library;B(r,t)}}})),__webpack_require__(30762);const U="nc-root",z=(0,n.$j)((function(e){return{locale:(0,O.fN)(e.config),config:e.config}}))((function({locale:e,config:t}){return(0,R.jsx)(a.oc,{locale:e,messages:_(e)},(0,R.jsx)(E.SV,{showBackup:!0,config:t},(0,R.jsx)(o.F0,{history:y.m8},(0,R.jsx)(o.AW,{component:k.Z}))))}));function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){H(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const V=q(q({},x.ZP),{},{init:function(e={}){const{config:o}=e;console.log("decap-cms-core 3.2.2"),m.dispatch((0,v.ME)(o,(function(){m.dispatch((0,b.So)())}))),(0,r.render)((0,R.jsx)((function(){return(0,R.jsx)(t().Fragment,null,(0,R.jsx)(i.GlobalStyles,null),(0,R.jsx)(n.zt,{store:m},(0,R.jsx)(z,null)))}),null),function(){const e=document.getElementById(U);if(e)return e;const t=document.createElement("div");return t.id=U,document.body.appendChild(t),t}())}})})(),__webpack_exports__=__webpack_exports__.DecapCmsCore,__webpack_exports__})()));
|
|
46
|
+
deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),l(e,r)}};function s(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,i.propertyInData)(r,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(u,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,i.checkMissingProp)(e,c,s)})`),(0,i.reportMissingProp)(e,s),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,l=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(s,t[c])||(r.if((0,i.propertyInData)(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},89434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,f("then",r),f("else",r))}else s?t.if(u,f("then")):t.if((0,n.not)(u),f("else"));function f(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),o=r(72924),i=r(64665),a=r(1119),s=r(79864),l=r(67772),c=r(33708),u=r(69351),f=r(76239),p=r(12296),d=r(15697),h=r(50019),g=r(14200),m=r(71125),y=r(89434),v=r(66552);t.default=function(e=!1){const t=[d.default,h.default,g.default,m.default,y.default,v.default,c.default,u.default,l.default,f.default,p.default];return e?t.push(o.default,a.default):t.push(n.default,i.default),t.push(s.default),t}},64665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(93487),o=r(76776),i=r(10412),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function s(e,t,r=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const u=i.name("valid"),f=i.const("len",n._`${s}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(i.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(10412),a=r(4783),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(s?(0,a.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}};t.default=s},15697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},14200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&i.discriminator)return;const s=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,i)=>{let s;(0,o.alwaysValidSchema)(a,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},12296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i=r(76776),a=r(76776),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:l,it:c}=e,{opts:u}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:g}=c;function m(e){for(const t in d)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",s,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==g?t.assign(o._`${g}[${i}]`,!0):n||c.allErrors||t.if((0,o.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&m(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},72924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(64665),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},76239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(74815),o=r(10412),i=r(76776),a=r(69351),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),c.props));const f=u.filter((e=>!(0,i.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,o.propertyInData)(t,l,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=s},33708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:a}=e;if((0,o.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=i},66552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(76776),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},10412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(93487),o=r(76776),i=r(22141),a=r(76776);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function l(e,t,r){return n._`${s(e)}.call(${t}, ${r})`}function c(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(l(e,t,r))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(c(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=l,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${l(e,t,r)}`:i},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:a,errorPath:s},it:l},c,u,f){const p=f?n._`${e}, ${t}, ${o}${a}`:t,d=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,s)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&d.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return u!==n.nil?n._`${c}.call(${u}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,o);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:n._`${"new RegExp"===i.code?f:(0,a.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(a){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},s),t.if((0,n.not)(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},l);t.assign(s,n._`${s} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,n.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},78386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},95684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78386),o=r(28280),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},28280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),o=r(10412),i=r(93487),a=r(22141),s=r(25173),l=r(76776),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:a,schemaEnv:l,validateName:c,opts:p,self:d}=o,{root:h}=l;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(l===h)return f(e,c,l,l.$async);const r=t.scopeValue("root",{ref:h});return f(e,i._`${r}.validate`,h,h.$async)}();const g=s.resolveRef.call(d,h,a,r);if(void 0===g)throw new n.default(o.opts.uriResolver,a,r);return g instanceof s.SchemaEnv?function(t){const r=u(e,t);f(e,r,t,t.$async)}(g):function(n){const o=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(g)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:f,opts:p}=c,d=p.passContext?a.default.this:i.nil;function h(e){const t=i._`${e}.errors`;s.assign(a.default.vErrors,i._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,i._`${a.default.vErrors}.length`)}function g(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(s,n.props,c.props));else{const t=s.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,i.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(i._`await ${(0,o.callValidateCode)(e,t,d)}`),g(t),u||s.assign(r,!0)}),(e=>{s.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,d),(()=>g(t)),(()=>h(t)))}t.getValidate=u,t.callRef=f,t.default=c},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(89306),i=r(25173),a=r(76776),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:l,it:c}=e,{oneOf:u}=l;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=s.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;t<u.length;t++){let l=u[t];(null==l?void 0:l.$ref)&&!(0,a.schemaHasRulesButRef)(l,c.self.RULES)&&(l=i.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==l?void 0:l.$ref),l instanceof i.SchemaEnv&&(l=l.schema));const p=null===(e=null==l?void 0:l.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||o(l)),s(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:o.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:o.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=s},89306:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},93924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(95684),o=r(62649),i=r(8200),a=r(39502),s=r(66167),l=[n.default,o.default,(0,i.default)(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},89651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:f,self:p}=l;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),a=r.const("fDef",n._`${i}[${s}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(l,n._`${a}.type || "string"`).assign(u,n._`${a}.validate`)),(()=>r.assign(l,n._`"string"`).assign(u,a))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${s} && !${u}`,function(){const e=f.$async?n._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const i=p.formats[a];if(!i)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===i)return;const[s,l,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,o=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);s===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${o})`}return"function"==typeof l?n._`${d}(${o})`:n._`${d}.test(${o})`}())}())}};t.default=o},39502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(89651).default];t.default=n},66167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},64693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(43510),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:s,schema:l}=e;a||l&&"object"==typeof l?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${s})`):e.fail(n._`${l} !== ${r}`)}};t.default=a},30966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(43510),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:s,schemaCode:l,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,o.useFunc)(t,i.default);let d;if(u||a)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",l,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);d=(0,n.or)(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"==typeof o&&null!==o?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(d)}};t.default=a},62649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83983),o=r(90430),i=r(93229),a=r(74336),s=r(90498),l=r(33301),c=r(31687),u=r(82958),f=r(64693),p=r(30966),d=[n.default,o.default,i.default,a.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},31687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},93229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=r(76776),i=r(74499),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:s}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${l} ${a}`)}};t.default=a},83983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=s},90498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},90430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(93487),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${o} === 0 || (${s} = ${r}/${o}, ${l}))`)}};t.default=o},74336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:a,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${a}, ${l}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},33301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10412),o=r(93487),i=r(76776),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===r.length)return;const f=r.length>=u.loopRequired;if(c.allErrors?function(){if(f||l)e.block$data(o.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(f||l){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(i,(0,n.propertyInData)(t,s,r,u.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,u.ownProperties),(()=>e.error()))}))}}};t.default=a},82958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(50453),o=r(93487),i=r(76776),a=r(43510),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:l,parentSchema:c,schemaCode:u,it:f}=e;if(!s&&!l)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(i,a){const s=t.name("item"),l=(0,n.checkDataTypes)(d,s,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(s,o._`${r}[${i}]`),t.if(l,o._`continue`),d.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,o._`${c}[${s}]`),e.error(),t.assign(p,!1).break()})).code(o._`${c}[${s}] = ${i}`)}))}function g(n,s){const l=(0,i.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${s} = ${n}; ${s}--;`,(()=>t.if(o._`${l}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(p,!0),t.if(o._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:g)(n,i)))}),o._`${u} === false`),e.ok(p)}};t.default=s},49461:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,i,a,s,l,c,u,f){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var p in n(i,a,s,l,c,u,f),i){var d=i[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,o,d[h],a+"/"+p+"/"+h,s,a,p,i,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var g in d)r(e,n,o,d[g],a+"/"+p+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),s,a,p,i,g)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,o,d,a+"/"+p,s,a,p,i)}o(i,a,s,l,c,u,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},12244:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__12244__},53741:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__53741__},62797:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__62797__},34106:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__34106__},78841:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__78841__},18815:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__18815__},32673:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__32673__},24688:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__24688__},75976:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__75976__},53327:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__53327__},67129:()=>{},68906:()=>{},53260:()=>{},57267:()=>{},59255:()=>{},69738:(e,t,r)=>{"use strict";var n=r(67286),o=r(62680),i=n("%TypeError%"),a=r(36013),s=n("%Reflect.apply%",!0)||o("Function.prototype.apply");e.exports=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return s(e,t,r)}},14989:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(99500),i=r(34749),a=r(87919);e.exports=function(e,t){if("Object"!==a(e))throw new n("Assertion failed: Type(O) is not Object");if(!i(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(t));return e[t]}},60845:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(34749),i=r(87919);e.exports=function(e,t){if("Object"!==i(e))throw new n("Assertion failed: `O` must be an Object");if(!o(t))throw new n("Assertion failed: `P` must be a Property Key");return t in e}},36013:(e,t,r)=>{"use strict";e.exports=r(27595)},2685:(e,t,r)=>{"use strict";e.exports=r(9680)},34749:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},98529:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%"),o=r(14989),i=r(55590),a=r(87919);e.exports=function(e){if("Object"!==a(e))throw new n("Assertion failed: `obj` must be an Object");return i(o(e,"length"))}},95339:(e,t,r)=>{"use strict";e.exports=r(94566)},11378:(e,t,r)=>{"use strict";var n=r(67286),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),s=n("%parseInt%"),l=r(62680),c=r(63671),u=l("String.prototype.slice"),f=c(/^0b[01]+$/i),p=c(/^0o[0-7]+$/i),d=c(/^[-+]0x[0-9a-f]+$/i),h=c(new i("["+["
","",""].join("")+"]","g")),g=r(11341),m=r(87919);e.exports=function e(t){if("String"!==m(t))throw new a("Assertion failed: `argument` is not a String");if(f(t))return o(s(u(t,2),2));if(p(t))return o(s(u(t,2),8));if(h(t)||d(t))return NaN;var r=g(t);return r!==t?e(r):o(t)}},57278:(e,t,r)=>{"use strict";var n=r(32404),o=r(10557),i=r(95831),a=r(97911),s=r(51832),l=r(79747);e.exports=function(e){var t=i(e);if(a(t)||0===t)return 0;if(!s(t))return t;var r=o(n(t));return 0===r?0:l(t)*r}},55590:(e,t,r)=>{"use strict";var n=r(74339),o=r(57278);e.exports=function(e){var t=o(e);return t<=0?0:t>n?n:t}},95831:(e,t,r)=>{"use strict";var n=r(67286),o=n("%TypeError%"),i=n("%Number%"),a=r(45819),s=r(96591),l=r(11378);e.exports=function(e){var t=a(e)?e:s(e,i);if("symbol"==typeof t)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?l(t):i(t)}},14749:(e,t,r)=>{"use strict";var n=r(67286)("%Object%"),o=r(95339);e.exports=function(e){return o(e),n(e)}},96591:(e,t,r)=>{"use strict";var n=r(5885);e.exports=function(e){return arguments.length>1?n(e,arguments[1]):n(e)}},47623:(e,t,r)=>{"use strict";var n=r(67286),o=n("%String%"),i=n("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},87919:(e,t,r)=>{"use strict";var n=r(96222);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},32404:(e,t,r)=>{"use strict";var n=r(67286)("%Math.abs%");e.exports=function(e){return n(e)}},10557:(e,t,r)=>{"use strict";var n=r(87919),o=Math.floor;e.exports=function(e){return"BigInt"===n(e)?e:o(e)}},94566:(e,t,r)=>{"use strict";var n=r(67286)("%TypeError%");e.exports=function(e,t){if(null==e)throw new n(t||"Cannot call method on "+e);return e}},96222:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},27595:(e,t,r)=>{"use strict";var n=r(67286)("%Array%"),o=!n.isArray&&r(62680)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===o(e)}},51832:(e,t,r)=>{"use strict";var n=r(97911);e.exports=function(e){return("number"==typeof e||"bigint"==typeof e)&&!n(e)&&e!==1/0&&e!==-1/0}},97911:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},45819:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},74339:(e,t,r)=>{"use strict";var n=r(67286),o=n("%Math%"),i=n("%Number%");e.exports=i.MAX_SAFE_INTEGER||o.pow(2,53)-1},79747:e=>{"use strict";e.exports=function(e){return e>=0?1:-1}},60155:(e,t,r)=>{e.exports=r(56093).YAML},82601:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:()=>o})},7896:(e,t,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}r.d(t,{Z:()=>n})},36981:(e,t,r)=>{"use strict";function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}r.d(t,{Z:()=>o})},31461:(e,t,r)=>{"use strict";function n(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}r.d(t,{Z:()=>n})},85411:(e,t,r)=>{"use strict";function n(e,{target:t=document.body}={}){if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const r=document.createElement("textarea"),n=document.activeElement;r.value=e,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);t.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}return r.remove(),i&&(o.removeAllRanges(),o.addRange(i)),n&&n.focus(),a}r.d(t,{Z:()=>n})},76665:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function o(e){return!!e&&!!e[W]}function i(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===q}(e)||Array.isArray(e)||!!e[z]||!!(null===(t=e.constructor)||void 0===t?void 0:t[z])||u(e)||f(e))}function a(e,t,r){void 0===r&&(r=!1),0===s(e)?(r?Object.keys:H)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function s(e){var t=e[W];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:u(e)?2:f(e)?3:0}function l(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t,r){var n=s(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function u(e){return $&&e instanceof Map}function f(e){return F&&e instanceof Set}function p(e){return e.o||e.t}function d(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=V(e);delete t[W];for(var r=H(t),n=0;n<r.length;n++){var o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function h(e,t){return void 0===t&&(t=!1),m(e)||o(e)||!i(e)||(s(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,(function(e,t){return h(t,!0)}),!0)),e}function g(){n(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=K[e];return t||n(18,e),t}function v(){return L}function b(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){S(e),e.p.forEach(_),e.p=null}function S(e){e===L&&(L=e.l)}function x(e){return L={p:[],l:L,h:e,m:!0,_:0}}function _(e){var t=e[W];0===t.i||1===t.i?t.j():t.g=!0}function O(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.O||y("ES5").S(t,e,o),o?(r[W].P&&(w(t),n(4)),i(e)&&(e=E(t,e),t.l||C(t,e)),t.u&&y("Patches").M(r[W].t,e,t.u,t.s)):e=E(t,r,[]),w(t),t.u&&t.v(t.u,t.s),e!==U?e:void 0}function E(e,t,r){if(m(t))return t;var n=t[W];if(!n)return a(t,(function(o,i){return k(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return C(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=d(n.k):n.o,i=o,s=!1;3===n.i&&(i=new Set(o),o.clear(),s=!0),a(i,(function(t,i){return k(e,n,o,t,i,r,s)})),C(e,o,!1),r&&e.u&&y("Patches").N(n,r,e.u,e.s)}return n.o}function k(e,t,r,n,a,s,u){if(o(a)){var f=E(e,a,s&&t&&3!==t.i&&!l(t.R,n)?s.concat(n):void 0);if(c(r,n,f),!o(f))return;e.m=!1}else u&&r.add(a);if(i(a)&&!m(a)){if(!e.h.D&&e._<1)return;E(e,a),t&&t.A.l||C(e,a)}}function C(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&h(t,r)}function T(e,t){var r=e[W];return(r?p(r):e)[t]}function P(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function j(e){e.P||(e.P=!0,e.l&&j(e.l))}function R(e){e.o||(e.o=d(e.t))}function A(e,t,r){var n=u(t)?y("MapSet").F(t,r):f(t)?y("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:v(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=G;r&&(o=[n],i=Z);var a=Proxy.revocable(o,i),s=a.revoke,l=a.proxy;return n.k=l,n.j=s,l}(t,r):y("ES5").J(t,r);return(r?r.A:v()).p.push(n),n}function M(e){return o(e)||n(22,e),function e(t){if(!i(t))return t;var r,n=t[W],o=s(t);if(n){if(!n.P&&(n.i<4||!y("ES5").K(n)))return n.t;n.I=!0,r=I(t,o),n.I=!1}else r=I(t,o);return a(r,(function(t,o){n&&function(e,t){return 2===s(e)?e.get(t):e[t]}(n.t,t)===o||c(r,t,e(o))})),3===o?new Set(r):r}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return d(e)}r.d(t,{Uy:()=>Q,ZP:()=>X});var D,L,N="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$="undefined"!=typeof Map,F="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,U=N?Symbol.for("immer-nothing"):((D={})["immer-nothing"]=!0,D),z=N?Symbol.for("immer-draftable"):"__$immer_draftable",W=N?Symbol.for("immer-state"):"__$immer_state",q=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),H="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,V=Object.getOwnPropertyDescriptors||function(e){var t={};return H(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},K={},G={get:function(e,t){if(t===W)return e;var r=p(e);if(!l(r,t))return function(e,t,r){var n,o=P(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!i(n)?n:n===T(e.t,t)?(R(e),e.o[t]=A(e.A.h,n,e)):n},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,r){var n=P(p(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=T(p(e),t),i=null==o?void 0:o[W];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,o)&&(void 0!==r||l(e.t,t)))return!0;R(e),j(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==T(e.t,t)||t in e.t?(e.R[t]=!1,R(e),j(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=p(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},Z={};a(G,(function(e,t){Z[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(e,t){return Z.set.call(this,e,t,void 0)},Z.set=function(e,t,r){return G.set.call(this,e[0],t,r,e[0])};var Y=function(){function e(e){var t=this;this.O=B,this.D=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var a=r;r=e;var s=t;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return s.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(o))}))}}var l;if("function"!=typeof r&&n(6),void 0!==o&&"function"!=typeof o&&n(7),i(e)){var c=x(t),u=A(t,e,void 0),f=!0;try{l=r(u),f=!1}finally{f?w(c):S(c)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return b(c,o),O(e,c)}),(function(e){throw w(c),e})):(b(c,o),O(l,c))}if(!e||"object"!=typeof e){if(void 0===(l=r(e))&&(l=e),l===U&&(l=void 0),t.D&&h(l,!0),o){var p=[],d=[];y("Patches").M(e,l,p,d),o(p,d)}return l}n(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(o))}))};var n,o,i=t.produce(e,r,(function(e,t){n=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,n,o]})):[i,n,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||n(8),o(e)&&(e=M(e));var t=x(this),r=A(this,e,void 0);return r[W].C=!0,S(t),r},t.finishDraft=function(e,t){var r=(e&&e[W]).A;return b(r,t),O(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!B&&n(20),this.O=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var i=y("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),J=new Y,Q=J.produce;J.produceWithPatches.bind(J),J.setAutoFreeze.bind(J),J.setUseProxies.bind(J),J.applyPatches.bind(J),J.createDraft.bind(J),J.finishDraft.bind(J);const X=Q},10362:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=!0,o="Invariant failed";function i(e,t){if(!e){if(n)throw new Error(o);var r="function"==typeof t?t():t,i=r?"".concat(o,": ").concat(r):o;throw new Error(i)}}},56093:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function p(e,t,r){return p=f()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},p.apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},d(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?h(e):t}function m(e){var t=f();return function(){var r,n=c(e);if(t){var o=c(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}function y(e,t,r){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}},y(e,t,r||e)}function v(e,t){return w(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(e,t)||S(e,t)||_()}function b(e){return w(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||S(e)||_()}function w(e){if(Array.isArray(e))return e}function S(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=S(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}r.d(t,{YAML:()=>Jt});var E={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},k={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},C="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function P(e){for(var t=[0],r=e.indexOf("\n");-1!==r;)r+=1,t.push(r),r=e.indexOf("\n",r);return t}function j(e){var t,r;return"string"==typeof e?(t=P(e),r=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=P(e.context.src)),t=e.lineStarts,r=e.context.src)),{lineStarts:t,src:r}}function R(e,t){if("number"!=typeof e||e<0)return null;var r=j(t),n=r.lineStarts,o=r.src;if(!n||!o||e>o.length)return null;for(var i=0;i<n.length;++i){var a=n[i];if(e<a)return{line:i,col:e-n[i-1]+1};if(e===a)return{line:i+1,col:1}}var s=n.length;return{line:s,col:e-n[s-1]+1}}var A=function(){function e(t,r){o(this,e),this.start=t,this.end=r||t}return a(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var r=this.start,n=this.end;if(0===e.length||n<=e[0])return this.origStart=r,this.origEnd=n,t;for(var o=t;o<e.length&&!(e[o]>r);)++o;this.origStart=r+o;for(var i=o;o<e.length&&!(e[o]>=n);)++o;return this.origEnd=n+o,i}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),M=function(){function e(t,r,n){o(this,e),Object.defineProperty(this,"context",{value:n||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=r||[],this.type=t,this.value=null}return a(e,[{key:"getPropValue",value:function(e,t,r){if(!this.context)return null;var n=this.context.src,o=this.props[e];return o&&n[o.start]===t?n.slice(o.start+(r?1:0),o.end):null}},{key:"anchor",get:function(){for(var e=0;e<this.props.length;++e){var t=this.getPropValue(e,E.ANCHOR,!0);if(null!=t)return t}return null}},{key:"comment",get:function(){for(var e=[],t=0;t<this.props.length;++t){var r=this.getPropValue(t,E.COMMENT,!0);null!=r&&e.push(r)}return e.length>0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var r=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var n=this.valueRange.end;return t!==n||e.atBlank(r,n-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t<this.props.length;++t)if(e[this.props[t].start]===E.COMMENT)return!0;return!1}},{key:"hasProps",get:function(){if(this.context)for(var e=this.context.src,t=0;t<this.props.length;++t)if(e[this.props[t].start]!==E.COMMENT)return!0;return!1}},{key:"includesTrailingLines",get:function(){return!1}},{key:"jsonLike",get:function(){return-1!==[k.FLOW_MAP,k.FLOW_SEQ,k.QUOTE_DOUBLE,k.QUOTE_SINGLE].indexOf(this.type)}},{key:"rangeAsLinePos",get:function(){if(this.range&&this.context){var e=R(this.range.start,this.context.root);if(e)return{start:e,end:R(this.range.end,this.context.root)}}}},{key:"rawValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end;return this.context.src.slice(t,r)}},{key:"tag",get:function(){for(var e=0;e<this.props.length;++e){var t=this.getPropValue(e,E.TAG,!1);if(null!=t){if("<"===t[1])return{verbatim:t.slice(2,-1)};var r=v(t.match(/^(.*!)([^!]*)$/),3);return r[0],{handle:r[1],suffix:r[2]}}}return null}},{key:"valueRangeContainsNewline",get:function(){if(!this.valueRange||!this.context)return!1;for(var e=this.valueRange,t=e.start,r=e.end,n=this.context.src,o=t;o<r;++o)if("\n"===n[o])return!0;return!1}},{key:"parseComment",value:function(t){var r=this.context.src;if(r[t]===E.COMMENT){var n=e.endOfLine(r,t+1),o=new A(t,n);return this.props.push(o),n}return t}},{key:"setOrigRanges",value:function(e,t){return this.range&&(t=this.range.setOrigRange(e,t)),this.valueRange&&this.valueRange.setOrigRange(e,t),this.props.forEach((function(r){return r.setOrigRange(e,t)})),t}},{key:"toString",value:function(){var t=this.context.src,r=this.range,n=this.value;if(null!=n)return n;var o=t.slice(r.start,r.end);return e.addStringTerminator(t,r.end,o)}}],[{key:"addStringTerminator",value:function(t,r,n){if("\n"===n[n.length-1])return n;var o=e.endOfWhiteSpace(t,r);return o>=t.length||"\n"===t[o]?n+"\n":n}},{key:"atDocumentBoundary",value:function(e,t,r){var n=e[t];if(!n)return!0;var o=e[t-1];if(o&&"\n"!==o)return!1;if(r){if(n!==r)return!1}else if(n!==E.DIRECTIVES_END&&n!==E.DOCUMENT_END)return!1;var i=e[t+1],a=e[t+2];if(i!==n||a!==n)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var r=e[t],n="<"===r,o=n?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];r&&-1===o.indexOf(r);)r=e[t+=1];return n&&">"===r&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var r=e[t];" "===r;)r=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var r=e[t];r&&"\n"!==r;)r=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var r=e[t];"\t"===r||" "===r;)r=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var r=e[t-1];if("\n"===r)return t;for(;r&&"\n"!==r;)r=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,r,n){var o=e.endOfIndent(t,n);if(o>n+r)return o;var i=e.endOfWhiteSpace(t,o),a=t[i];return a&&"\n"!==a?null:i}},{key:"atBlank",value:function(e,t,r){var n=e[t];return"\n"===n||"\t"===n||" "===n||r&&!n}},{key:"nextNodeIsIndented",value:function(e,t,r){return!(!e||t<0)&&(t>0||r&&"-"===e)}},{key:"normalizeOffset",value:function(t,r){var n=t[r];return n?"\n"!==n&&"\n"===t[r-1]?r-1:e.endOfWhiteSpace(t,r):r}},{key:"foldNewline",value:function(t,r,n){for(var o=0,i=!1,a="",s=t[r+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":o=0,r+=1,a+="\n";break;case"\t":o<=n&&(i=!0),r=e.endOfWhiteSpace(t,r+2)-1;break;case" ":o+=1,r+=1}s=t[r+1]}return a||(a=" "),s&&o<=n&&(i=!0),{fold:a,offset:r,error:i}}}]),e}(),I=function(e){l(r,e);var t=m(r);function r(e,n,i){var a;if(o(this,r),!(i&&n instanceof M))throw new Error("Invalid arguments for new ".concat(e));return(a=t.call(this)).name=e,a.message=i,a.source=n,a}return a(r,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new A(this.offset,this.offset+1);var t=e&&R(this.offset,e);if(t){var r={line:t.line,col:t.col+1};this.linePos={start:t,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var n=this.linePos.start,o=n.line,i=n.col;this.message+=" at line ".concat(o,", column ").concat(i);var a=e&&function(e,t){var r=e.start,n=e.end,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,i=function(e,t){var r=j(t),n=r.lineStarts,o=r.src;if(!n||!(e>=1)||e>n.length)return null;for(var i=n[e-1],a=n[e];a&&a>i&&"\n"===o[a-1];)--a;return o.slice(i,a)}(r.line,t);if(!i)return null;var a=r.col;if(i.length>o)if(a<=o-10)i=i.substr(0,o-1)+"…";else{var s=Math.round(o/2);i.length>a+s&&(i=i.substr(0,a+s-1)+"…"),a-=i.length-o,i="…"+i.substr(1-o)}var l=1,c="";n&&(n.line===r.line&&a+(n.col-r.col)<=o+1?l=n.col-r.col:(l=Math.min(i.length+1,o)-a,c="…"));var u=a>1?" ".repeat(a-1):"",f="^".repeat(l);return"".concat(i,"\n").concat(u).concat(f).concat(c)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),r}(d(Error)),D=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLReferenceError",e,n)}return r}(I),L=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLSemanticError",e,n)}return r}(I),N=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLSyntaxError",e,n)}return r}(I),$=function(e){l(r,e);var t=m(r);function r(e,n){return o(this,r),t.call(this,"YAMLWarning",e,n)}return r}(I),F=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,r=e.end,n=this.context.src,o=n[r-1];t<r&&("\n"===o||"\t"===o||" "===o);)o=n[--r-1];for(var i="",a=t;a<r;++a){var s=n[a];if("\n"===s){var l=M.foldNewline(n,a,-1);i+=l.fold,a=l.offset}else if(" "===s||"\t"===s){for(var c=a,u=n[a+1];a<r&&(" "===u||"\t"===u);)u=n[(a+=1)+1];"\n"!==u&&(i+=a>c?n.slice(c,a+1):s)}else i+=s}var f=n[t];switch(f){case"\t":return{errors:[new L(this,"Plain value cannot start with a tab character")],str:i};case"@":case"`":var p="Plain value cannot start with reserved character ".concat(f);return{errors:[new L(this,p)],str:i};default:return i}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,n=t.indent,o=t.inFlow,i=t.src,a=e,s=e,l=i[a];"\n"===l&&!M.atDocumentBoundary(i,a+1);l=i[a]){var c=M.endOfBlockIndent(i,n,a+1);if(null===c||"#"===i[c])break;a="\n"===i[c]?c:s=r.endOfLine(i,c,o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var n=e.inFlow,o=e.src,i=t,a=o[i];return a&&"#"!==a&&"\n"!==a&&(i=r.endOfLine(o,t,n)),this.valueRange=new A(t,i),i=M.endOfWhiteSpace(o,i),i=this.parseComment(i),this.hasComment&&!this.valueRange.isEmpty()||(i=this.parseBlockValue(i)),i}}],[{key:"endOfLine",value:function(e,t,r){for(var n=e[t],o=t;n&&"\n"!==n&&(!r||"["!==n&&"]"!==n&&"{"!==n&&"}"!==n&&","!==n);){var i=e[o+1];if(":"===n&&(!i||"\n"===i||"\t"===i||" "===i||r&&","===i))break;if((" "===n||"\t"===n)&&"#"===i)break;o+=1,n=i}return o}}]),r}(M),B=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.call(this,k.BLANK_LINE)}return a(r,[{key:"includesTrailingLines",get:function(){return!0}},{key:"parse",value:function(e,t){return this.context=e,this.range=new A(t,t+1),t+1}}]),r}(M),U=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).node=null,i}return a(r,[{key:"includesTrailingLines",get:function(){return!!this.node&&this.node.includesTrailingLines}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,n=e.src,o=e.atLineStart,i=e.lineStart;o||this.type!==k.SEQ_ITEM||(this.error=new L(this,"Sequence items must not have preceding content on the same line"));for(var a=o?t-i:e.indent,s=M.endOfWhiteSpace(n,t+1),l=n[s],c="#"===l,u=[],f=null;"\n"===l||"#"===l;){if("#"===l){var p=M.endOfLine(n,s+1);u.push(new A(s,p)),s=p}else o=!0,i=s+1,"\n"===n[M.endOfWhiteSpace(n,i)]&&0===u.length&&(i=(f=new B).parse({src:n},i)),s=M.endOfIndent(n,i);l=n[s]}if(M.nextNodeIsIndented(l,s-(i+a),this.type!==k.SEQ_ITEM)?this.node=r({atLineStart:o,inCollection:!1,indent:a,lineStart:i,parent:this},s):l&&i>t+1&&(s=i-1),this.node){if(f){var d=e.parent.items||e.parent.contents;d&&d.push(f)}u.length&&Array.prototype.push.apply(this.props,u),s=this.node.range.end}else if(c){var h=u[0];this.props.push(h),s=h.end}else s=M.endOfLine(n,t+1);var g=this.node?this.node.valueRange.end:s;return this.valueRange=new A(t,g),s}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.node?this.node.setOrigRanges(e,t):t}},{key:"toString",value:function(){var e=this.context.src,t=this.node,r=this.range,n=this.value;if(null!=n)return n;var o=t?e.slice(r.start,t.range.start)+String(t):e.slice(r.start,r.end);return M.addStringTerminator(e,r.end,o)}}]),r}(M),z=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.call(this,k.COMMENT)}return a(r,[{key:"parse",value:function(e,t){this.context=e;var r=this.parseComment(t);return this.range=new A(t,r),r}}]),r}(M);function W(e){for(var t=e;t instanceof U;)t=t.node;if(!(t instanceof q))return null;for(var r=t.items.length,n=-1,o=r-1;o>=0;--o){var i=t.items[o];if(i.type===k.COMMENT){var a=i.context,s=a.indent,l=a.lineStart;if(s>0&&i.range.start>=l+s)break;n=o}else{if(i.type!==k.BLANK_LINE)break;n=o}}if(-1===n)return null;for(var c=t.items.splice(n,r-n),u=c[0].range.start;t.range.end=u,t.valueRange&&t.valueRange.end>u&&(t.valueRange.end=u),t!==e;)t=t.context.parent;return c}var q=function(e){l(r,e);var t=m(r);function r(e){var n;o(this,r),n=t.call(this,e.type===k.SEQ_ITEM?k.SEQ:k.MAP);for(var i=e.props.length-1;i>=0;--i)if(e.props[i].start<e.context.lineStart){n.props=e.props.slice(0,i+1),e.props=e.props.slice(i+1);var a=e.props[0]||e.valueRange;e.range.start=a.start;break}n.items=[e];var s=W(e);return s&&Array.prototype.push.apply(n.items,s),n}return a(r,[{key:"includesTrailingLines",get:function(){return this.items.length>0}},{key:"parse",value:function(e,t){this.context=e;var n=e.parseNode,o=e.src,i=M.startOfLine(o,t),a=this.items[0];a.context.parent=this,this.valueRange=A.copy(a.valueRange);for(var s=a.range.start-a.context.lineStart,l=t,c=o[l=M.normalizeOffset(o,l)],u=M.endOfWhiteSpace(o,i)===l,f=!1;c;){for(;"\n"===c||"#"===c;){if(u&&"\n"===c&&!f){var p=new B;if(l=p.parse({src:o},l),this.valueRange.end=l,l>=o.length){c=null;break}this.items.push(p),l-=1}else if("#"===c){if(l<i+s&&!r.nextContentHasIndent(o,l,s))return l;var d=new z;if(l=d.parse({indent:s,lineStart:i,src:o},l),this.items.push(d),this.valueRange.end=l,l>=o.length){c=null;break}}if(i=l+1,l=M.endOfIndent(o,i),M.atBlank(o,l)){var h=M.endOfWhiteSpace(o,l),g=o[h];g&&"\n"!==g&&"#"!==g||(l=h)}c=o[l],u=!0}if(!c)break;if(l!==i+s&&(u||":"!==c)){if(l<i+s){i>t&&(l=i);break}this.error||(this.error=new N(this,"All collection items must start at the same column"))}if(a.type===k.SEQ_ITEM){if("-"!==c){i>t&&(l=i);break}}else if("-"===c&&!this.error){var m=o[l+1];m&&"\n"!==m&&"\t"!==m&&" "!==m||(this.error=new N(this,"A collection cannot be both a mapping and a sequence"))}var y=n({atLineStart:u,inCollection:!0,indent:s,lineStart:i,parent:this},l);if(!y)return l;if(this.items.push(y),this.valueRange.end=y.valueRange.end,c=o[l=M.normalizeOffset(o,y.range.end)],u=!1,f=y.includesTrailingLines,c){for(var v=l-1,b=o[v];" "===b||"\t"===b;)b=o[--v];"\n"===b&&(i=v+1,u=!0)}var w=W(y);w&&Array.prototype.push.apply(this.items,w)}return l}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){t=r.setOrigRanges(e,t)})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,n=this.value;if(null!=n)return n;for(var o=e.slice(r.start,t[0].range.start)+String(t[0]),i=1;i<t.length;++i){var a=t[i],s=a.context,l=s.atLineStart,c=s.indent;if(l)for(var u=0;u<c;++u)o+=" ";o+=String(a)}return M.addStringTerminator(e,r.end,o)}}],[{key:"nextContentHasIndent",value:function(e,t,n){var o=M.endOfLine(e,t)+1,i=e[t=M.endOfWhiteSpace(e,o)];return!!i&&(t>=o+n||("#"===i||"\n"===i)&&r.nextContentHasIndent(e,t,n))}}]),r}(M),H=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this,k.DIRECTIVE)).name=null,e}return a(r,[{key:"parameters",get:function(){var e=this.rawValue;return e?e.trim().split(/[ \t]+/):[]}},{key:"parseName",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"\t"!==n&&" "!==n;)n=t[r+=1];return this.name=t.slice(e,r),r}},{key:"parseParameters",value:function(e){for(var t=this.context.src,r=e,n=t[r];n&&"\n"!==n&&"#"!==n;)n=t[r+=1];return this.valueRange=new A(e,r),r}},{key:"parse",value:function(e,t){this.context=e;var r=this.parseName(t+1);return r=this.parseParameters(r),r=this.parseComment(r),this.range=new A(t,r),r}}]),r}(M),V=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this,k.DOCUMENT)).directives=null,e.contents=null,e.directivesEndMarker=null,e.documentEndMarker=null,e}return a(r,[{key:"parseDirectives",value:function(e){var t=this.context.src;this.directives=[];for(var n=!0,o=!1,i=e;!M.atDocumentBoundary(t,i,E.DIRECTIVES_END);)switch(t[i=r.startCommentOrEndBlankLine(t,i)]){case"\n":if(n){var a=new B;(i=a.parse({src:t},i))<t.length&&this.directives.push(a)}else i+=1,n=!0;break;case"#":var s=new z;i=s.parse({src:t},i),this.directives.push(s),n=!1;break;case"%":var l=new H;i=l.parse({parent:this,src:t},i),this.directives.push(l),o=!0,n=!1;break;default:return o?this.error=new L(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i}return t[i]?(this.directivesEndMarker=new A(i,i+3),i+3):(o?this.error=new L(this,"Missing directives-end indicator line"):this.directives.length>0&&(this.contents=this.directives,this.directives=[]),i)}},{key:"parseContents",value:function(e){var t=this.context,n=t.parseNode,o=t.src;this.contents||(this.contents=[]);for(var i=e;"-"===o[i-1];)i-=1;var a=M.endOfWhiteSpace(o,e),s=i===e;for(this.valueRange=new A(a);!M.atDocumentBoundary(o,a,E.DOCUMENT_END);){switch(o[a]){case"\n":if(s){var l=new B;(a=l.parse({src:o},a))<o.length&&this.contents.push(l)}else a+=1,s=!0;i=a;break;case"#":var c=new z;a=c.parse({src:o},a),this.contents.push(c),s=!1;break;default:var u=M.endOfIndent(o,a),f=n({atLineStart:s,indent:-1,inFlow:!1,inCollection:!1,lineStart:i,parent:this},u);if(!f)return this.valueRange.end=u;this.contents.push(f),a=f.range.end,s=!1;var p=W(f);p&&Array.prototype.push.apply(this.contents,p)}a=r.startCommentOrEndBlankLine(o,a)}if(this.valueRange.end=a,o[a]&&(this.documentEndMarker=new A(a,a+3),o[a+=3])){if("#"===o[a=M.endOfWhiteSpace(o,a)]){var d=new z;a=d.parse({src:o},a),this.contents.push(d)}switch(o[a]){case"\n":a+=1;break;case void 0:break;default:this.error=new N(this,"Document end marker line cannot have a non-comment suffix")}}return a}},{key:"parse",value:function(e,t){e.root=this,this.context=e;var r=65279===e.src.charCodeAt(t)?t+1:t;return r=this.parseDirectives(r),this.parseContents(r)}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.directives.forEach((function(r){t=r.setOrigRanges(e,t)})),this.directivesEndMarker&&(t=this.directivesEndMarker.setOrigRange(e,t)),this.contents.forEach((function(r){t=r.setOrigRanges(e,t)})),this.documentEndMarker&&(t=this.documentEndMarker.setOrigRange(e,t)),t}},{key:"toString",value:function(){var e=this.contents,t=this.directives,r=this.value;if(null!=r)return r;var n=t.join("");return e.length>0&&((t.length>0||e[0].type===k.COMMENT)&&(n+="---\n"),n+=e.join("")),"\n"!==n[n.length-1]&&(n+="\n"),n}}],[{key:"startCommentOrEndBlankLine",value:function(e,t){var r=M.endOfWhiteSpace(e,t),n=e[r];return"#"===n||"\n"===n?r:t}}]),r}(M),K=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"parse",value:function(e,t){this.context=e;var r=e.src,n=M.endOfIdentifier(r,t+1);return this.valueRange=new A(t+1,n),n=M.endOfWhiteSpace(r,n),this.parseComment(n)}}]),r}(M),G="KEEP",Z="STRIP",Y=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).blockIndent=null,i.chomping="CLIP",i.header=null,i}return a(r,[{key:"includesTrailingLines",get:function(){return this.chomping===G}},{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=this.valueRange,t=e.start,r=e.end,n=this.context,o=n.indent,i=n.src;if(this.valueRange.isEmpty())return"";for(var a=null,s=i[r-1];"\n"===s||"\t"===s||" "===s;){if((r-=1)<=t){if(this.chomping===G)break;return""}"\n"===s&&(a=r),s=i[r-1]}var l=r+1;a&&(this.chomping===G?(l=a,r=this.valueRange.end):r=a);for(var c=o+this.blockIndent,u=this.type===k.BLOCK_FOLDED,f=!0,p="",d="",h=!1,g=t;g<r;++g){for(var m=0;m<c&&" "===i[g];++m)g+=1;var y=i[g];if("\n"===y)"\n"===d?p+="\n":d="\n";else{var v=M.endOfLine(i,g),b=i.slice(g,v);g=v,u&&(" "===y||"\t"===y)&&g<l?(" "===d?d="\n":h||f||"\n"!==d||(d="\n\n"),p+=d+b,d=v<r&&i[v]||"",h=!0):(p+=d+b,d=u&&g<l?" ":"\n",h=!1),f&&""!==b&&(f=!1)}}return this.chomping===Z?p:p+"\n"}},{key:"parseBlockHeader",value:function(e){for(var t=this.context.src,r=e+1,n="";;){var o=t[r];switch(o){case"-":this.chomping=Z;break;case"+":this.chomping=G;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n+=o;break;default:return this.blockIndent=Number(n)||null,this.header=new A(e,r),r}r+=1}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,n=t.src,o=!!this.blockIndent,i=e,a=e,s=1,l=n[i];"\n"===l&&(i+=1,!M.atDocumentBoundary(n,i));l=n[i]){var c=M.endOfBlockIndent(n,r,i);if(null===c)break;var u=n[c],f=c-(i+r);if(this.blockIndent){if(u&&"\n"!==u&&f<this.blockIndent){if("#"===n[c])break;if(!this.error){var p="Block scalars must not be less indented than their ".concat(o?"explicit indentation indicator":"first line");this.error=new L(this,p)}}}else"\n"!==n[c]?(f<s&&(this.error=new L(this,"Block scalars with more-indented leading empty lines must use an explicit indentation indicator")),this.blockIndent=f):f>s&&(s=f);i="\n"===n[c]?c:a=M.endOfLine(n,c)}return this.chomping!==G&&(i=n[a]?a+1:a),this.valueRange=new A(e+1,i),i}},{key:"parse",value:function(e,t){this.context=e;var r=e.src,n=this.parseBlockHeader(t);return n=M.endOfWhiteSpace(r,n),n=this.parseComment(n),this.parseBlockValue(n)}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.header?this.header.setOrigRange(e,t):t}}]),r}(M),J=function(e){l(r,e);var t=m(r);function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).items=null,i}return a(r,[{key:"prevNodeIsJsonLike",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,t=this.items[e-1];return!!t&&(t.jsonLike||t.type===k.COMMENT&&this.prevNodeIsJsonLike(e-1))}},{key:"parse",value:function(e,t){this.context=e;var r=e.parseNode,n=e.src,o=e.indent,i=e.lineStart,a=n[t];this.items=[{char:a,offset:t}];var s=M.endOfWhiteSpace(n,t+1);for(a=n[s];a&&"]"!==a&&"}"!==a;){switch(a){case"\n":if(i=s+1,"\n"===n[M.endOfWhiteSpace(n,i)]){var l=new B;i=l.parse({src:n},i),this.items.push(l)}(s=M.endOfIndent(n,i))<=i+o&&(a=n[s],s<i+o||"]"!==a&&"}"!==a)&&(this.error=new L(this,"Insufficient indentation in flow collection"));break;case",":this.items.push({char:a,offset:s}),s+=1;break;case"#":var c=new z;s=c.parse({src:n},s),this.items.push(c);break;case"?":case":":var u=n[s+1];if("\n"===u||"\t"===u||" "===u||","===u||":"===a&&this.prevNodeIsJsonLike()){this.items.push({char:a,offset:s}),s+=1;break}default:var f=r({atLineStart:!1,inCollection:!1,inFlow:!0,indent:-1,lineStart:i,parent:this},s);if(!f)return this.valueRange=new A(t,s),s;this.items.push(f),s=M.normalizeOffset(n,f.range.end)}a=n[s=M.endOfWhiteSpace(n,s)]}return this.valueRange=new A(t,s+1),a&&(this.items.push({char:a,offset:s}),s=M.endOfWhiteSpace(n,s+1),s=this.parseComment(s)),s}},{key:"setOrigRanges",value:function(e,t){return t=y(c(r.prototype),"setOrigRanges",this).call(this,e,t),this.items.forEach((function(r){if(r instanceof M)t=r.setOrigRanges(e,t);else if(0===e.length)r.origOffset=r.offset;else{for(var n=t;n<e.length&&!(e[n]>r.offset);)++n;r.origOffset=r.offset+n,t=n}})),t}},{key:"toString",value:function(){var e=this.context.src,t=this.items,r=this.range,n=this.value;if(null!=n)return n;var o=t.filter((function(e){return e instanceof M})),i="",a=r.start;return o.forEach((function(t){var r=e.slice(a,t.range.start);a=t.range.end,"\n"===(i+=r+String(t))[i.length-1]&&"\n"!==e[a-1]&&"\n"===e[a]&&(a+=1)})),i+=e.slice(a,r.end),M.addStringTerminator(e,r.end,i)}}]),r}(M),Q=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,n=t.end,o=this.context,i=o.indent,a=o.src;'"'!==a[n-1]&&e.push(new N(this,'Missing closing "quote'));for(var s="",l=r+1;l<n-1;++l){var c=a[l];if("\n"===c){M.atDocumentBoundary(a,l+1)&&e.push(new L(this,"Document boundary indicators are not allowed within string values"));var u=M.foldNewline(a,l,i);s+=u.fold,l=u.offset,u.error&&e.push(new L(this,"Multi-line double-quoted string needs to be sufficiently indented"))}else if("\\"===c)switch(a[l+=1]){case"0":s+="\0";break;case"a":s+="";break;case"b":s+="\b";break;case"e":s+="";break;case"f":s+="\f";break;case"n":s+="\n";break;case"r":s+="\r";break;case"t":case"\t":s+="\t";break;case"v":s+="\v";break;case"N":s+="
";break;case"_":s+=" ";break;case"L":s+="\u2028";break;case"P":s+="\u2029";break;case" ":s+=" ";break;case'"':s+='"';break;case"/":s+="/";break;case"\\":s+="\\";break;case"x":s+=this.parseCharCode(l+1,2,e),l+=2;break;case"u":s+=this.parseCharCode(l+1,4,e),l+=4;break;case"U":s+=this.parseCharCode(l+1,8,e),l+=8;break;case"\n":for(;" "===a[l+1]||"\t"===a[l+1];)l+=1;break;default:e.push(new N(this,"Invalid escape sequence ".concat(a.substr(l-1,2)))),s+="\\"+a[l]}else if(" "===c||"\t"===c){for(var f=l,p=a[l+1];" "===p||"\t"===p;)p=a[(l+=1)+1];"\n"!==p&&(s+=l>f?a.slice(f,l+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}},{key:"parseCharCode",value:function(e,t,r){var n=this.context.src,o=n.substr(e,t),i=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;return isNaN(i)?(r.push(new N(this,"Invalid escape sequence ".concat(n.substr(e-2,t+2)))),n.substr(e-2,t+2)):String.fromCodePoint(i)}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,o=r.endOfQuote(n,t+1);return this.valueRange=new A(t,o),o=M.endOfWhiteSpace(n,o),this.parseComment(o)}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r&&'"'!==r;)r=e[t+="\\"===r?2:1];return t+1}}]),r}(M),X=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;var e=[],t=this.valueRange,r=t.start,n=t.end,o=this.context,i=o.indent,a=o.src;"'"!==a[n-1]&&e.push(new N(this,"Missing closing 'quote"));for(var s="",l=r+1;l<n-1;++l){var c=a[l];if("\n"===c){M.atDocumentBoundary(a,l+1)&&e.push(new L(this,"Document boundary indicators are not allowed within string values"));var u=M.foldNewline(a,l,i);s+=u.fold,l=u.offset,u.error&&e.push(new L(this,"Multi-line single-quoted string needs to be sufficiently indented"))}else if("'"===c)s+=c,"'"!==a[l+=1]&&e.push(new N(this,"Unescaped single quote? This should not happen."));else if(" "===c||"\t"===c){for(var f=l,p=a[l+1];" "===p||"\t"===p;)p=a[(l+=1)+1];"\n"!==p&&(s+=l>f?a.slice(f,l+1):c)}else s+=c}return e.length>0?{errors:e,str:s}:s}},{key:"parse",value:function(e,t){this.context=e;var n=e.src,o=r.endOfQuote(n,t+1);return this.valueRange=new A(t,o),o=M.endOfWhiteSpace(n,o),this.parseComment(o)}}],[{key:"endOfQuote",value:function(e,t){for(var r=e[t];r;)if("'"===r){if("'"!==e[t+1])break;r=e[t+=2]}else r=e[t+=1];return t+1}}]),r}(M),ee=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.atLineStart,a=n.inCollection,l=n.inFlow,c=n.indent,u=n.lineStart,f=n.parent;o(this,e),s(this,"parseNode",(function(r,n){if(M.atDocumentBoundary(t.src,n))return null;var o=new e(t,r),i=o.parseProps(n),a=i.props,s=i.type,l=i.valueStart,c=function(e,t){switch(e){case k.ALIAS:return new K(e,t);case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:return new Y(e,t);case k.FLOW_MAP:case k.FLOW_SEQ:return new J(e,t);case k.MAP_KEY:case k.MAP_VALUE:case k.SEQ_ITEM:return new U(e,t);case k.COMMENT:case k.PLAIN:return new F(e,t);case k.QUOTE_DOUBLE:return new Q(e,t);case k.QUOTE_SINGLE:return new X(e,t);default:return null}}(s,a),u=c.parse(o,l);if(c.range=new A(n,u),u<=n&&(c.error=new Error("Node#parse consumed no characters"),c.error.parseEnd=u,c.error.source=c,c.range.end=n+1),o.nodeStartsCollection(c)){c.error||o.atLineStart||o.parent.type!==k.DOCUMENT||(c.error=new N(c,"Block collection must not have preceding content here (e.g. directives-end indicator)"));var f=new q(c);return u=f.parse(new e(o),u),f.range=new A(n,u),f}return c})),this.atLineStart=null!=i?i:r.atLineStart||!1,this.inCollection=null!=a?a:r.inCollection||!1,this.inFlow=null!=l?l:r.inFlow||!1,this.indent=null!=c?c:r.indent,this.lineStart=null!=u?u:r.lineStart,this.parent=null!=f?f:r.parent||{},this.root=r.root,this.src=r.src}return a(e,[{key:"nodeStartsCollection",value:function(e){var t=this.inCollection,r=this.inFlow,n=this.src;if(t||r)return!1;if(e instanceof U)return!0;var o=e.range.end;return"\n"!==n[o]&&"\n"!==n[o-1]&&":"===n[o=M.endOfWhiteSpace(n,o)]}},{key:"parseProps",value:function(t){for(var r=this.inFlow,n=this.parent,o=this.src,i=[],a=!1,s=o[t=this.atLineStart?M.endOfIndent(o,t):M.endOfWhiteSpace(o,t)];s===E.ANCHOR||s===E.COMMENT||s===E.TAG||"\n"===s;){if("\n"===s){var l=t,c=void 0;do{c=l+1,l=M.endOfIndent(o,c)}while("\n"===o[l]);var u=l-(c+this.indent),f=n.type===k.SEQ_ITEM&&n.context.atLineStart;if("#"!==o[l]&&!M.nextNodeIsIndented(o[l],u,!f))break;this.atLineStart=!0,this.lineStart=c,a=!1,t=l}else if(s===E.COMMENT){var p=M.endOfLine(o,t+1);i.push(new A(t,p)),t=p}else{var d=M.endOfIdentifier(o,t+1);s===E.TAG&&","===o[d]&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(o.slice(t+1,d+13))&&(d=M.endOfIdentifier(o,d+5)),i.push(new A(t,d)),a=!0,t=M.endOfWhiteSpace(o,d)}s=o[t]}return a&&":"===s&&M.atBlank(o,t+1,!0)&&(t-=1),{props:i,type:e.parseType(o,t,r),valueStart:t}}}],[{key:"parseType",value:function(e,t,r){switch(e[t]){case"*":return k.ALIAS;case">":return k.BLOCK_FOLDED;case"|":return k.BLOCK_LITERAL;case"{":return k.FLOW_MAP;case"[":return k.FLOW_SEQ;case"?":return!r&&M.atBlank(e,t+1,!0)?k.MAP_KEY:k.PLAIN;case":":return!r&&M.atBlank(e,t+1,!0)?k.MAP_VALUE:k.PLAIN;case"-":return!r&&M.atBlank(e,t+1,!0)?k.SEQ_ITEM:k.PLAIN;case'"':return k.QUOTE_DOUBLE;case"'":return k.QUOTE_SINGLE;default:return k.PLAIN}}}]),e}();function te(e){var t=[];-1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,(function(e,r){return e.length>1&&t.push(r),"\n"})));var r=[],n=0;do{var o=new V,i=new ee({src:e});n=o.parse(i,n),r.push(o)}while(n<e.length);return r.setOrigRanges=function(){if(0===t.length)return!1;for(var e=1;e<t.length;++e)t[e]-=e;for(var n=0,o=0;o<r.length;++o)n=r[o].setOrigRanges(t,n);return t.splice(0,t.length),!0},r.toString=function(){return r.join("...\n")},r}function re(e,t,r){return r?-1===r.indexOf("\n")?"".concat(e," #").concat(r):"".concat(e,"\n")+r.replace(/^/gm,"".concat(t||"","#")):e}var ne=function e(){o(this,e)};function oe(e,t,r){if(Array.isArray(e))return e.map((function(e,t){return oe(e,String(t),r)}));if(e&&"function"==typeof e.toJSON){var n=r&&r.anchors&&r.anchors.get(e);n&&(r.onCreate=function(e){n.res=e,delete r.onCreate});var o=e.toJSON(t,r);return n&&r.onCreate&&r.onCreate(o),o}return r&&r.keep||"bigint"!=typeof e?e:Number(e)}var ie=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),(n=t.call(this)).value=e,n}return a(r,[{key:"toJSON",value:function(e,t){return t&&t.keep?this.value:oe(this.value,e,t)}},{key:"toString",value:function(){return String(this.value)}}]),r}(ne);function ae(e,t,r){for(var n=r,o=t.length-1;o>=0;--o){var i=t[o];if(Number.isInteger(i)&&i>=0){var a=[];a[i]=n,n=a}else{var s={};Object.defineProperty(s,i,{value:n,writable:!0,enumerable:!0,configurable:!0}),n=s}}return e.createNode(n,!1)}var se=function(e){return null==e||"object"===n(e)&&e[Symbol.iterator]().next().done},le=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),s(h(n=t.call(this)),"items",[]),n.schema=e,n}return a(r,[{key:"addIn",value:function(e,t){if(se(e))this.add(t);else{var n=b(e),o=n[0],i=n.slice(1),a=this.get(o,!0);if(a instanceof r)a.addIn(i,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(i));this.set(o,ae(this.schema,i,t))}}}},{key:"deleteIn",value:function(e){var t=b(e),n=t[0],o=t.slice(1);if(0===o.length)return this.delete(n);var i=this.get(n,!0);if(i instanceof r)return i.deleteIn(o);throw new Error("Expected YAML collection at ".concat(n,". Remaining path: ").concat(o))}},{key:"getIn",value:function(e,t){var n=b(e),o=n[0],i=n.slice(1),a=this.get(o,!0);return 0===i.length?!t&&a instanceof ie?a.value:a:a instanceof r?a.getIn(i,t):void 0}},{key:"hasAllNullValues",value:function(){return this.items.every((function(e){if(!e||"PAIR"!==e.type)return!1;var t=e.value;return null==t||t instanceof ie&&null==t.value&&!t.commentBefore&&!t.comment&&!t.tag}))}},{key:"hasIn",value:function(e){var t=b(e),n=t[0],o=t.slice(1);if(0===o.length)return this.has(n);var i=this.get(n,!0);return i instanceof r&&i.hasIn(o)}},{key:"setIn",value:function(e,t){var n=b(e),o=n[0],i=n.slice(1);if(0===i.length)this.set(o,t);else{var a=this.get(o,!0);if(a instanceof r)a.setIn(i,t);else{if(void 0!==a||!this.schema)throw new Error("Expected YAML collection at ".concat(o,". Remaining path: ").concat(i));this.set(o,ae(this.schema,i,t))}}}},{key:"toJSON",value:function(){return null}},{key:"toString",value:function(e,t,n,o){var i=this,a=t.blockItem,s=t.flowChars,l=t.isMap,c=t.itemIndent,u=e,f=u.indent,p=u.indentStep,d=u.stringify,h=this.type===k.FLOW_MAP||this.type===k.FLOW_SEQ||e.inFlow;h&&(c+=p);var g=l&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:g,indent:c,inFlow:h,type:null});var m,y=!1,v=!1,b=this.items.reduce((function(t,r,n){var o;r&&(!y&&r.spaceBefore&&t.push({type:"comment",str:""}),r.commentBefore&&r.commentBefore.match(/^.*$/gm).forEach((function(e){t.push({type:"comment",str:"#".concat(e)})})),r.comment&&(o=r.comment),h&&(!y&&r.spaceBefore||r.commentBefore||r.comment||r.key&&(r.key.commentBefore||r.key.comment)||r.value&&(r.value.commentBefore||r.value.comment))&&(v=!0)),y=!1;var a=d(r,e,(function(){return o=null}),(function(){return y=!0}));return h&&!v&&a.includes("\n")&&(v=!0),h&&n<i.items.length-1&&(a+=","),a=re(a,c,o),y&&(o||h)&&(y=!1),t.push({type:"item",str:a}),t}),[]);if(0===b.length)m=s.start+s.end;else if(h){var w=s.start,S=s.end,x=b.map((function(e){return e.str}));if(v||x.reduce((function(e,t){return e+t.length+2}),2)>r.maxFlowStringSingleLineLength){m=w;var _,E=O(x);try{for(E.s();!(_=E.n()).done;){var C=_.value;m+=C?"\n".concat(p).concat(f).concat(C):"\n"}}catch(e){E.e(e)}finally{E.f()}m+="\n".concat(f).concat(S)}else m="".concat(w," ").concat(x.join(" ")," ").concat(S)}else{var T=b.map(a);m=T.shift();var P,j=O(T);try{for(j.s();!(P=j.n()).done;){var R=P.value;m+=R?"\n".concat(f).concat(R):"\n"}}catch(e){j.e(e)}finally{j.f()}}return this.comment?(m+="\n"+this.comment.replace(/^/gm,"".concat(f,"#")),n&&n()):y&&o&&o(),m}}]),r}(ne);function ce(e){var t=e instanceof ie?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),Number.isInteger(t)&&t>=0?t:null}s(le,"maxFlowStringSingleLineLength",60);var ue=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"add",value:function(e){this.items.push(e)}},{key:"delete",value:function(e){var t=ce(e);return"number"==typeof t&&this.items.splice(t,1).length>0}},{key:"get",value:function(e,t){var r=ce(e);if("number"==typeof r){var n=this.items[r];return!t&&n instanceof ie?n.value:n}}},{key:"has",value:function(e){var t=ce(e);return"number"==typeof t&&t<this.items.length}},{key:"set",value:function(e,t){var r=ce(e);if("number"!=typeof r)throw new Error("Expected a valid index, not ".concat(e,"."));this.items[r]=t}},{key:"toJSON",value:function(e,t){var r=[];t&&t.onCreate&&t.onCreate(r);var n,o=0,i=O(this.items);try{for(i.s();!(n=i.n()).done;){var a=n.value;r.push(oe(a,String(o++),t))}}catch(e){i.e(e)}finally{i.f()}return r}},{key:"toString",value:function(e,t,n){return e?y(c(r.prototype),"toString",this).call(this,e,{blockItem:function(e){return"comment"===e.type?e.str:"- ".concat(e.str)},flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},t,n):JSON.stringify(this)}}]),r}(le),fe=function(e){l(r,e);var t=m(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(this,r),(n=t.call(this)).key=e,n.value=i,n.type=r.Type.PAIR,n}return a(r,[{key:"commentBefore",get:function(){return this.key instanceof ne?this.key.commentBefore:void 0},set:function(e){if(null==this.key&&(this.key=new ie(null)),!(this.key instanceof ne))throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.");this.key.commentBefore=e}},{key:"addToJSMap",value:function(e,t){var r=oe(this.key,"",e);if(t instanceof Map){var o=oe(this.value,r,e);t.set(r,o)}else if(t instanceof Set)t.add(r);else{var i=function(e,t,r){return null===t?"":"object"!==n(t)?String(t):e instanceof ne&&r&&r.doc?e.toString({anchors:Object.create(null),doc:r.doc,indent:"",indentStep:r.indentStep,inFlow:!0,inStringifyKey:!0,stringify:r.stringify}):JSON.stringify(t)}(this.key,r,e),a=oe(this.value,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}return t}},{key:"toJSON",value:function(e,t){var r=t&&t.mapAsMap?new Map:{};return this.addToJSMap(t,r)}},{key:"toString",value:function(e,t,r){if(!e||!e.doc)return JSON.stringify(this);var o=e.doc.options,i=o.indent,a=o.indentSeq,s=o.simpleKeys,l=this.key,c=this.value,u=l instanceof ne&&l.comment;if(s){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(l instanceof le)throw new Error("With simple keys, collection cannot be used as a key value")}var f=!s&&(!l||u||(l instanceof ne?l instanceof le||l.type===k.BLOCK_FOLDED||l.type===k.BLOCK_LITERAL:"object"===n(l))),p=e,d=p.doc,h=p.indent,g=p.indentStep,m=p.stringify;e=Object.assign({},e,{implicitKey:!f,indent:h+g});var y=!1,v=m(l,e,(function(){return u=null}),(function(){return y=!0}));if(v=re(v,e.indent,u),!f&&v.length>1024){if(s)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!s)return this.comment?(v=re(v,e.indent,this.comment),t&&t()):y&&!u&&r&&r(),e.inFlow&&!f?v:"? ".concat(v);v=f?"? ".concat(v,"\n").concat(h,":"):"".concat(v,":"),this.comment&&(v=re(v,e.indent,this.comment),t&&t());var b="",w=null;if(c instanceof ne){if(c.spaceBefore&&(b="\n"),c.commentBefore){var S=c.commentBefore.replace(/^/gm,"".concat(e.indent,"#"));b+="\n".concat(S)}w=c.comment}else c&&"object"===n(c)&&(c=d.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof ie&&(e.indentAtStart=v.length+1),y=!1,!a&&i>=2&&!e.inFlow&&!f&&c instanceof ue&&c.type!==k.FLOW_SEQ&&!c.tag&&!d.anchors.getName(c)&&(e.indent=e.indent.substr(2));var x=m(c,e,(function(){return w=null}),(function(){return y=!0})),_=" ";return b||this.comment?_="".concat(b,"\n").concat(e.indent):!f&&c instanceof le?("["===x[0]||"{"===x[0])&&!x.includes("\n")||(_="\n".concat(e.indent)):"\n"===x[0]&&(_=""),y&&!w&&r&&r(),re(v+_+x,e.indent,w)}}]),r}(ne);s(fe,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var pe=function e(t,r){if(t instanceof de){var n=r.get(t.source);return n.count*n.aliasCount}if(t instanceof le){var o,i=0,a=O(t.items);try{for(a.s();!(o=a.n()).done;){var s=e(o.value,r);s>i&&(i=s)}}catch(e){a.e(e)}finally{a.f()}return i}if(t instanceof fe){var l=e(t.key,r),c=e(t.value,r);return Math.max(l,c)}return 1},de=function(e){l(r,e);var t=m(r);function r(e){var n;return o(this,r),(n=t.call(this)).source=e,n.type=k.ALIAS,n}return a(r,[{key:"tag",set:function(e){throw new Error("Alias nodes cannot have tags")}},{key:"toJSON",value:function(e,t){if(!t)return oe(this.source,e,t);var r=t.anchors,n=t.maxAliasCount,o=r.get(this.source);if(!o||void 0===o.res){var i="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new D(this.cstNode,i):new ReferenceError(i)}if(n>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=pe(this.source,r)),o.count*o.aliasCount>n)){var a="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new D(this.cstNode,a):new ReferenceError(a)}return o.res}},{key:"toString",value:function(e){return r.stringify(this,e)}}],[{key:"stringify",value:function(e,t){var r=e.range,n=e.source,o=t.anchors,i=t.doc,a=t.implicitKey,s=t.inStringifyKey,l=Object.keys(o).find((function(e){return o[e]===n}));if(!l&&s&&(l=i.anchors.getName(n)||i.anchors.newName()),l)return"*".concat(l).concat(a?" ":"");var c=i.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error("".concat(c," [").concat(r,"]"))}}]),r}(ne);function he(e,t){var r,n=t instanceof ie?t.value:t,o=O(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;if(i instanceof fe){if(i.key===t||i.key===n)return i;if(i.key&&i.key.value===n)return i}}}catch(e){o.e(e)}finally{o.f()}}s(de,"default",!0);var ge=function(e){l(r,e);var t=m(r);function r(){return o(this,r),t.apply(this,arguments)}return a(r,[{key:"add",value:function(e,t){e?e instanceof fe||(e=new fe(e.key||e,e.value)):e=new fe(e);var r=he(this.items,e.key),n=this.schema&&this.schema.sortMapEntries;if(r){if(!t)throw new Error("Key ".concat(e.key," already set"));r.value=e.value}else if(n){var o=this.items.findIndex((function(t){return n(e,t)<0}));-1===o?this.items.push(e):this.items.splice(o,0,e)}else this.items.push(e)}},{key:"delete",value:function(e){var t=he(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}},{key:"get",value:function(e,t){var r=he(this.items,e),n=r&&r.value;return!t&&n instanceof ie?n.value:n}},{key:"has",value:function(e){return!!he(this.items,e)}},{key:"set",value:function(e,t){this.add(new fe(e,t),!0)}},{key:"toJSON",value:function(e,t,r){var n=r?new r:t&&t.mapAsMap?new Map:{};t&&t.onCreate&&t.onCreate(n);var o,i=O(this.items);try{for(i.s();!(o=i.n()).done;)o.value.addToJSMap(t,n)}catch(e){i.e(e)}finally{i.f()}return n}},{key:"toString",value:function(e,t,n){if(!e)return JSON.stringify(this);var o,i=O(this.items);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(!(a instanceof fe))throw new Error("Map items must all be pairs; found ".concat(JSON.stringify(a)," instead"))}}catch(e){i.e(e)}finally{i.f()}return y(c(r.prototype),"toString",this).call(this,e,{blockItem:function(e){return e.str},flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},t,n)}}]),r}(le),me=function(e){l(r,e);var t=m(r);function r(e){var n;if(o(this,r),e instanceof fe){var i=e.value;i instanceof ue||((i=new ue).items.push(e.value),i.range=e.value.range),(n=t.call(this,e.key,i)).range=e.range}else n=t.call(this,new ie("<<"),new ue);return n.type=fe.Type.MERGE_PAIR,g(n)}return a(r,[{key:"addToJSMap",value:function(e,t){var r,n=O(this.value.items);try{for(n.s();!(r=n.n()).done;){var o=r.value.source;if(!(o instanceof ge))throw new Error("Merge sources must be maps");var i,a=O(o.toJSON(null,e,Map));try{for(a.s();!(i=a.n()).done;){var s=v(i.value,2),l=s[0],c=s[1];t instanceof Map?t.has(l)||t.set(l,c):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:c,writable:!0,enumerable:!0,configurable:!0})}}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toString",value:function(e,t){var n=this.value;if(n.items.length>1)return y(c(r.prototype),"toString",this).call(this,e,t);this.value=n.items[0];var o=y(c(r.prototype),"toString",this).call(this,e,t);return this.value=n,o}}]),r}(fe),ye={defaultType:k.BLOCK_LITERAL,lineWidth:76},ve={trueStr:"true",falseStr:"false"},be={asBigInt:!1},we={nullStr:"null"},Se={defaultType:k.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function xe(e,t,r){var n,o=O(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i.format,s=i.test,l=i.resolve;if(s){var c=e.match(s);if(c){var u=l.apply(null,c);return u instanceof ie||(u=new ie(u)),a&&(u.format=a),u}}}}catch(e){o.e(e)}finally{o.f()}return r&&(e=r(e)),new ie(e)}var _e="flow",Oe="block",Ee="quoted",ke=function(e,t){for(var r=e[t+1];" "===r||"\t"===r;){do{r=e[t+=1]}while(r&&"\n"!==r);r=e[t+1]}return t};function Ce(e,t,r,n){var o=n.indentAtStart,i=n.lineWidth,a=void 0===i?80:i,s=n.minContentWidth,l=void 0===s?20:s,c=n.onFold,u=n.onOverflow;if(!a||a<0)return e;var f=Math.max(1+l,1+a-t.length);if(e.length<=f)return e;var p=[],d={},h=a-t.length;"number"==typeof o&&(o>a-Math.max(2,l)?p.push(0):h=a-o);var g,m=void 0,y=void 0,v=!1,b=-1,w=-1,S=-1;for(r===Oe&&-1!==(b=ke(e,b))&&(h=b+f);g=e[b+=1];){if(r===Ee&&"\\"===g){switch(w=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}S=b}if("\n"===g)r===Oe&&(b=ke(e,b)),h=b+f,m=void 0;else{if(" "===g&&y&&" "!==y&&"\n"!==y&&"\t"!==y){var x=e[b+1];x&&" "!==x&&"\n"!==x&&"\t"!==x&&(m=b)}if(b>=h)if(m)p.push(m),h=m+f,m=void 0;else if(r===Ee){for(;" "===y||"\t"===y;)y=g,g=e[b+=1],v=!0;var _=b>S+1?b-2:w-1;if(d[_])return e;p.push(_),d[_]=!0,h=_+f,m=void 0}else v=!0}y=g}if(v&&u&&u(),0===p.length)return e;c&&c();for(var O=e.slice(0,p[0]),E=0;E<p.length;++E){var k=p[E],C=p[E+1]||e.length;0===k?O="\n".concat(t).concat(e.slice(0,C)):(r===Ee&&d[k]&&(O+="".concat(e[k],"\\")),O+="\n".concat(t).concat(e.slice(k+1,C)))}return O}var Te=function(e){var t=e.indentAtStart;return t?Object.assign({indentAtStart:t},Se.fold):Se.fold},Pe=function(e){return/^(%|---|\.\.\.)/m.test(e)};function je(e,t){var r=t.implicitKey,n=Se.doubleQuoted,o=n.jsonEncoding,i=n.minMultiLineLength,a=JSON.stringify(e);if(o)return a;for(var s=t.indent||(Pe(e)?" ":""),l="",c=0,u=0,f=a[u];f;f=a[++u])if(" "===f&&"\\"===a[u+1]&&"n"===a[u+2]&&(l+=a.slice(c,u)+"\\ ",c=u+=1,f="\\"),"\\"===f)switch(a[u+1]){case"u":l+=a.slice(c,u);var p=a.substr(u+2,4);switch(p){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:"00"===p.substr(0,2)?l+="\\x"+p.substr(2):l+=a.substr(u,6)}c=(u+=5)+1;break;case"n":if(r||'"'===a[u+2]||a.length<i)u+=1;else{for(l+=a.slice(c,u)+"\n\n";"\\"===a[u+2]&&"n"===a[u+3]&&'"'!==a[u+4];)l+="\n",u+=2;l+=s," "===a[u+2]&&(l+="\\"),c=(u+=1)+1}break;default:u+=1}return l=c?l+a.slice(c):a,r?l:Ce(l,s,Ee,Te(t))}function Re(e,t){if(t.implicitKey){if(/\n/.test(e))return je(e,t)}else if(/[ \t]\n|\n[ \t]/.test(e))return je(e,t);var r=t.indent||(Pe(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,"$&\n".concat(r))+"'";return t.implicitKey?n:Ce(n,r,_e,Te(t))}function Ae(e,t,r,n){var o=e.comment,i=e.type,a=e.value;if(/\n[\t ]+$/.test(a)||/^\s*$/.test(a))return je(a,t);var s=t.indent||(t.forceBlockIndent||Pe(a)?" ":""),l=s?"2":"1",c=i!==k.BLOCK_FOLDED&&(i===k.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;var n=t-r,o=e.length;if(o<=n)return!1;for(var i=0,a=0;i<o;++i)if("\n"===e[i]){if(i-a>n)return!0;if(o-(a=i+1)<=n)return!1}return!0}(a,Se.fold.lineWidth,s.length)),u=c?"|":">";if(!a)return u+"\n";var f="",p="";if(a=a.replace(/[\n\t ]*$/,(function(e){var t=e.indexOf("\n");return-1===t?u+="-":a!==e&&t===e.length-1||(u+="+",n&&n()),p=e.replace(/\n$/,""),""})).replace(/^[\n ]*/,(function(e){-1!==e.indexOf(" ")&&(u+=l);var t=e.match(/ +$/);return t?(f=e.slice(0,-t[0].length),t[0]):(f=e,"")})),p&&(p=p.replace(/\n+(?!\n|$)/g,"$&".concat(s))),f&&(f=f.replace(/\n+/g,"$&".concat(s))),o&&(u+=" #"+o.replace(/ ?[\r\n]+/g," "),r&&r()),!a)return"".concat(u).concat(l,"\n").concat(s).concat(p);if(c)return a=a.replace(/\n+/g,"$&".concat(s)),"".concat(u,"\n").concat(s).concat(f).concat(a).concat(p);a=a.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,"$&".concat(s));var d=Ce("".concat(f).concat(a).concat(p),s,Oe,Se.fold);return"".concat(u,"\n").concat(s).concat(d)}function Me(e,t,r,n){var o=Se.defaultType,i=t.implicitKey,a=t.inFlow,s=e,l=s.type,c=s.value;"string"!=typeof c&&(c=String(c),e=Object.assign({},e,{value:c}));var u=function(o){switch(o){case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:return Ae(e,t,r,n);case k.QUOTE_DOUBLE:return je(c,t);case k.QUOTE_SINGLE:return Re(c,t);case k.PLAIN:return function(e,t,r,n){var o=e.comment,i=e.type,a=e.value,s=t.actualString,l=t.implicitKey,c=t.indent,u=t.inFlow;if(l&&/[\n[\]{},]/.test(a)||u&&/[[\]{},]/.test(a))return je(a,t);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return l||u||-1===a.indexOf("\n")?-1!==a.indexOf('"')&&-1===a.indexOf("'")?Re(a,t):je(a,t):Ae(e,t,r,n);if(!l&&!u&&i!==k.PLAIN&&-1!==a.indexOf("\n"))return Ae(e,t,r,n);if(""===c&&Pe(a))return t.forceBlockIndent=!0,Ae(e,t,r,n);var f=a.replace(/\n+/g,"$&\n".concat(c));if(s){var p=t.doc.schema.tags;if("string"!=typeof xe(f,p,p.scalarFallback).value)return je(a,t)}var d=l?f:Ce(f,c,_e,Te(t));return!o||u||-1===d.indexOf("\n")&&-1===o.indexOf("\n")?d:(r&&r(),function(e,t,r){if(!r)return e;var n=r.replace(/[\s\S]^/gm,"$&".concat(t,"#"));return"#".concat(n,"\n").concat(t).concat(e)}(d,c,o))}(e,t,r,n);default:return null}};l!==k.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)?l=k.QUOTE_DOUBLE:!i&&!a||l!==k.BLOCK_FOLDED&&l!==k.BLOCK_LITERAL||(l=k.QUOTE_DOUBLE);var f=u(l);if(null===f&&null===(f=u(o)))throw new Error("Unsupported default string type ".concat(o));return f}function Ie(e){var t=e.format,r=e.minFractionDigits,n=e.tag,o=e.value;if("bigint"==typeof o)return String(o);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";var i=JSON.stringify(o);if(!t&&r&&(!n||"tag:yaml.org,2002:float"===n)&&/^\d/.test(i)){var a=i.indexOf(".");a<0&&(a=i.length,i+=".");for(var s=r-(i.length-a-1);s-- >0;)i+="0"}return i}function De(e,t){var r,n,o;switch(t.type){case k.FLOW_MAP:r="}",n="flow map";break;case k.FLOW_SEQ:r="]",n="flow sequence";break;default:return void e.push(new L(t,"Not a flow collection!?"))}for(var i=t.items.length-1;i>=0;--i){var a=t.items[i];if(!a||a.type!==k.COMMENT){o=a;break}}if(o&&o.char!==r){var s,l="Expected ".concat(n," to end with ").concat(r);"number"==typeof o.offset?(s=new L(t,l)).offset=o.offset+1:(s=new L(o,l),o.range&&o.range.end&&(s.offset=o.range.end-o.range.start)),e.push(s)}}function Le(e,t){var r=t.context.src[t.range.start-1];"\n"!==r&&"\t"!==r&&" "!==r&&e.push(new L(t,"Comments must be separated from other tokens by white space characters"))}function Ne(e,t){var r=String(t),n=r.substr(0,8)+"..."+r.substr(-8);return new L(e,'The "'.concat(n,'" key is too long'))}function $e(e,t){var r,n=O(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,i=o.afterKey,a=o.before,s=o.comment,l=e.items[a];l?(i&&l.value&&(l=l.value),void 0===s?!i&&l.commentBefore||(l.spaceBefore=!0):l.commentBefore?l.commentBefore+="\n"+s:l.commentBefore=s):void 0!==s&&(e.comment?e.comment+="\n"+s:e.comment=s)}}catch(e){n.e(e)}finally{n.f()}}function Fe(e,t){var r=t.strValue;return r?"string"==typeof r?r:(r.errors.forEach((function(r){r.source||(r.source=t),e.errors.push(r)})),r.str):""}function Be(e,t,r){var n,o=e.schema.tags,i=[],a=O(o);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(s.tag===r){if(!s.test){var l=s.resolve(e,t);return l instanceof le?l:new ie(l)}i.push(s)}}}catch(e){a.e(e)}finally{a.f()}var c=Fe(e,t);return"string"==typeof c&&i.length>0?xe(c,i,o.scalarFallback):null}var Ue=function(e){if(!e)return!1;var t=e.type;return t===k.MAP_KEY||t===k.MAP_VALUE||t===k.SEQ_ITEM};function ze(e,t){if(!t)return null;t.error&&e.errors.push(t.error);var r=function(e,t){var r,n={before:[],after:[]},o=!1,i=!1,a=O(Ue(t.context.parent)?t.context.parent.props.concat(t.props):t.props);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=s.start,c=s.end;switch(t.context.src[l]){case E.COMMENT:t.commentHasRequiredWhitespace(l)||e.push(new L(t,"Comments must be separated from other tokens by white space characters"));var u=t.header,f=t.valueRange;(f&&(l>f.start||u&&l>u.start)?n.after:n.before).push(t.context.src.slice(l+1,c));break;case E.ANCHOR:o&&e.push(new L(t,"A node can have at most one anchor")),o=!0;break;case E.TAG:i&&e.push(new L(t,"A node can have at most one tag")),i=!0}}}catch(e){a.e(e)}finally{a.f()}return{comments:n,hasAnchor:o,hasTag:i}}(e.errors,t),n=r.comments,o=r.hasAnchor,i=r.hasTag;if(o){var a=e.anchors,s=t.anchor,l=a.getNode(s);l&&(a.map[a.newName(s)]=l),a.map[s]=t}t.type===k.ALIAS&&(o||i)&&e.errors.push(new L(t,"An alias node must not specify any properties"));var c=function(e,t){var r=e.anchors,n=e.errors,o=e.schema;if(t.type===k.ALIAS){var i=t.rawValue,a=r.getNode(i);if(!a){var s="Aliased anchor not found: ".concat(i);return n.push(new D(t,s)),null}var l=new de(a);return r._cstAliases.push(l),l}var c=function(e,t){var r=t.tag,n=t.type,o=!1;if(r){var i=r.handle,a=r.suffix,s=r.verbatim;if(s){if("!"!==s&&"!!"!==s)return s;var l="Verbatim tags aren't resolved, so ".concat(s," is invalid.");e.errors.push(new L(t,l))}else if("!"!==i||a)try{return function(e,t){var r=t.tag,n=r.handle,o=r.suffix,i=e.tagPrefixes.find((function(e){return e.handle===n}));if(!i){var a=e.getDefaults().tagPrefixes;if(a&&(i=a.find((function(e){return e.handle===n}))),!i)throw new L(t,"The ".concat(n," tag handle is non-default and was not declared."))}if(!o)throw new L(t,"The ".concat(n," tag has no suffix."));if("!"===n&&"1.0"===(e.version||e.options.version)){if("^"===o[0])return e.warnings.push(new $(t,"YAML 1.0 ^ tag expansion is not supported")),o;if(/[:/]/.test(o)){var s=o.match(/^([a-z0-9-]+)\/(.*)/i);return s?"tag:".concat(s[1],".yaml.org,2002:").concat(s[2]):"tag:".concat(o)}}return i.prefix+decodeURIComponent(o)}(e,t)}catch(t){e.errors.push(t)}else o=!0}switch(n){case k.BLOCK_FOLDED:case k.BLOCK_LITERAL:case k.QUOTE_DOUBLE:case k.QUOTE_SINGLE:return T.STR;case k.FLOW_MAP:case k.MAP:return T.MAP;case k.FLOW_SEQ:case k.SEQ:return T.SEQ;case k.PLAIN:return o?T.STR:null;default:return null}}(e,t);if(c)return function(e,t,r){try{var n=Be(e,t,r);if(n)return r&&t.tag&&(n.tag=r),n}catch(r){return r.source||(r.source=t),e.errors.push(r),null}try{var o=function(e){switch(e.type){case k.FLOW_MAP:case k.MAP:return T.MAP;case k.FLOW_SEQ:case k.SEQ:return T.SEQ;default:return T.STR}}(t);if(!o)throw new Error("The tag ".concat(r," is unavailable"));var i="The tag ".concat(r," is unavailable, falling back to ").concat(o);e.warnings.push(new $(t,i));var a=Be(e,t,o);return a.tag=r,a}catch(r){var s=new D(t,r.message);return s.stack=r.stack,e.errors.push(s),null}}(e,t,c);if(t.type!==k.PLAIN){var u="Failed to resolve ".concat(t.type," node here");return n.push(new N(t,u)),null}try{return xe(Fe(e,t),o.tags,o.tags.scalarFallback)}catch(e){return e.source||(e.source=t),n.push(e),null}}(e,t);if(c){c.range=[t.range.start,t.range.end],e.options.keepCstNodes&&(c.cstNode=t),e.options.keepNodeTypes&&(c.type=t.type);var u=n.before.join("\n");u&&(c.commentBefore=c.commentBefore?"".concat(c.commentBefore,"\n").concat(u):u);var f=n.after.join("\n");f&&(c.comment=c.comment?"".concat(c.comment,"\n").concat(f):f)}return t.resolved=c}function We(e,t){if(t.type!==k.MAP&&t.type!==k.FLOW_MAP){var r="A ".concat(t.type," node cannot be resolved as a mapping");return e.errors.push(new N(t,r)),null}var n=t.type===k.FLOW_MAP?function(e,t){for(var r=[],n=[],o=void 0,i=!1,a="{",s=0;s<t.items.length;++s){var l=t.items[s];if("string"==typeof l.char){var c=l.char,u=l.offset;if("?"===c&&void 0===o&&!i){i=!0,a=":";continue}if(":"===c){if(void 0===o&&(o=null),":"===a){a=",";continue}}else if(i&&(void 0===o&&","!==c&&(o=null),i=!1),void 0!==o&&(n.push(new fe(o)),o=void 0,","===c)){a=":";continue}if("}"===c){if(s===t.items.length-1)continue}else if(c===a){a=":";continue}var f="Flow map contains an unexpected ".concat(c),p=new N(t,f);p.offset=u,e.errors.push(p)}else l.type===k.BLANK_LINE?r.push({afterKey:!!o,before:n.length}):l.type===k.COMMENT?(Le(e.errors,l),r.push({afterKey:!!o,before:n.length,comment:l.comment})):void 0===o?(","===a&&e.errors.push(new L(l,"Separator , missing in flow map")),o=ze(e,l)):(","!==a&&e.errors.push(new L(l,"Indicator : missing in flow map entry")),n.push(new fe(o,ze(e,l))),o=void 0,i=!1)}return De(e.errors,t),void 0!==o&&n.push(new fe(o)),{comments:r,items:n}}(e,t):function(e,t){for(var r=[],n=[],o=void 0,i=null,a=0;a<t.items.length;++a){var s=t.items[a];switch(s.type){case k.BLANK_LINE:r.push({afterKey:!!o,before:n.length});break;case k.COMMENT:r.push({afterKey:!!o,before:n.length,comment:s.comment});break;case k.MAP_KEY:void 0!==o&&n.push(new fe(o)),s.error&&e.errors.push(s.error),o=ze(e,s.node),i=null;break;case k.MAP_VALUE:if(void 0===o&&(o=null),s.error&&e.errors.push(s.error),!s.context.atLineStart&&s.node&&s.node.type===k.MAP&&!s.node.context.atLineStart){e.errors.push(new L(s.node,"Nested mappings are not allowed in compact mappings"))}var l=s.node;if(!l&&s.props.length>0){(l=new F(k.PLAIN,[])).context={parent:s,src:s.context.src};var c=s.range.start+1;if(l.range={start:c,end:c},l.valueRange={start:c,end:c},"number"==typeof s.range.origStart){var u=s.range.origStart+1;l.range.origStart=l.range.origEnd=u,l.valueRange.origStart=l.valueRange.origEnd=u}}var f=new fe(o,ze(e,l));He(s,f),n.push(f),o&&"number"==typeof i&&s.range.start>i+1024&&e.errors.push(Ne(t,o)),o=void 0,i=null;break;default:void 0!==o&&n.push(new fe(o)),o=ze(e,s),i=s.range.start,s.error&&e.errors.push(s.error);e:for(var p=a+1;;++p){var d=t.items[p];switch(d&&d.type){case k.BLANK_LINE:case k.COMMENT:continue e;case k.MAP_VALUE:break e;default:e.errors.push(new L(s,"Implicit map keys need to be followed by map values"));break e}}if(s.valueRangeContainsNewline){e.errors.push(new L(s,"Implicit map keys need to be on a single line"))}}}return void 0!==o&&n.push(new fe(o)),{comments:r,items:n}}(e,t),o=n.comments,i=n.items,a=new ge;a.items=i,$e(a,o);for(var s=!1,l=0;l<i.length;++l){var c=i[l].key;if(c instanceof le&&(s=!0),e.schema.merge&&c&&"<<"===c.value){i[l]=new me(i[l]);var u=i[l].value.items,f=null;u.some((function(e){if(e instanceof de){var t=e.source.type;return t!==k.MAP&&t!==k.FLOW_MAP&&(f="Merge nodes aliases can only point to maps")}return f="Merge nodes can only have Alias nodes as values"})),f&&e.errors.push(new L(t,f))}else for(var p=l+1;p<i.length;++p){var d=i[p].key;if(c===d||c&&d&&Object.prototype.hasOwnProperty.call(c,"value")&&c.value===d.value){var h='Map keys must be unique; "'.concat(c,'" is repeated');e.errors.push(new L(t,h));break}}}return s&&!e.options.mapAsMap&&e.warnings.push(new $(t,"Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")),t.resolved=a,a}var qe=function(e){var t=e.context,r=t.lineStart,n=t.node,o=t.src,i=e.props;if(0===i.length)return!1;var a=i[0].start;if(n&&a>n.valueRange.start)return!1;if(o[a]!==E.COMMENT)return!1;for(var s=r;s<a;++s)if("\n"===o[s])return!1;return!0};function He(e,t){if(qe(e)){var r=e.getPropValue(0,E.COMMENT,!0),n=!1,o=t.value.commentBefore;if(o&&o.startsWith(r))t.value.commentBefore=o.substr(r.length+1),n=!0;else{var i=t.value.comment;!e.node&&i&&i.startsWith(r)&&(t.value.comment=i.substr(r.length+1),n=!0)}n&&(t.comment=r)}}function Ve(e,t){if(t.type!==k.SEQ&&t.type!==k.FLOW_SEQ){var r="A ".concat(t.type," node cannot be resolved as a sequence");return e.errors.push(new N(t,r)),null}var n=t.type===k.FLOW_SEQ?function(e,t){for(var r=[],n=[],o=!1,i=void 0,a=null,s="[",l=null,c=0;c<t.items.length;++c){var u=t.items[c];if("string"==typeof u.char){var f=u.char,p=u.offset;if(":"===f||!o&&void 0===i||(o&&void 0===i&&(i=s?n.pop():null),n.push(new fe(i)),o=!1,i=void 0,a=null),f===s)s=null;else if(s||"?"!==f){if("["!==s&&":"===f&&void 0===i){if(","===s){if((i=n.pop())instanceof fe){var d=new L(t,"Chaining flow sequence pairs is invalid");d.offset=p,e.errors.push(d)}if(!o&&"number"==typeof a){var h=u.range?u.range.start:u.offset;h>a+1024&&e.errors.push(Ne(t,i));for(var g=l.context.src,m=a;m<h;++m)if("\n"===g[m]){e.errors.push(new L(l,"Implicit keys of flow sequence pairs need to be on a single line"));break}}}else i=null;a=null,o=!1,s=null}else if("["===s||"]"!==f||c<t.items.length-1){var y="Flow sequence contains an unexpected ".concat(f),v=new N(t,y);v.offset=p,e.errors.push(v)}}else o=!0}else if(u.type===k.BLANK_LINE)r.push({before:n.length});else if(u.type===k.COMMENT)Le(e.errors,u),r.push({comment:u.comment,before:n.length});else{if(s){var b="Expected a ".concat(s," in flow sequence");e.errors.push(new L(u,b))}var w=ze(e,u);void 0===i?(n.push(w),l=u):(n.push(new fe(i,w)),i=void 0),a=u.range.start,s=","}}return De(e.errors,t),void 0!==i&&n.push(new fe(i)),{comments:r,items:n}}(e,t):function(e,t){for(var r=[],n=[],o=0;o<t.items.length;++o){var i=t.items[o];switch(i.type){case k.BLANK_LINE:r.push({before:n.length});break;case k.COMMENT:r.push({comment:i.comment,before:n.length});break;case k.SEQ_ITEM:if(i.error&&e.errors.push(i.error),n.push(ze(e,i.node)),i.hasProps){e.errors.push(new L(i,"Sequence items cannot have tags or anchors before the - indicator"))}break;default:i.error&&e.errors.push(i.error),e.errors.push(new N(i,"Unexpected ".concat(i.type," node in sequence")))}}return{comments:r,items:n}}(e,t),o=n.comments,i=n.items,a=new ue;return a.items=i,$e(a,o),!e.options.mapAsMap&&i.some((function(e){return e instanceof fe&&e.key instanceof le}))&&e.warnings.push(new $(t,"Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")),t.resolved=a,a}var Ke=r(48834).Buffer,Ge={identify:function(e){return e instanceof Uint8Array},default:!1,tag:"tag:yaml.org,2002:binary",resolve:function(e,t){var r=Fe(e,t);if("function"==typeof Ke)return Ke.from(r,"base64");if("function"==typeof atob){for(var n=atob(r.replace(/[\n\r]/g,"")),o=new Uint8Array(n.length),i=0;i<n.length;++i)o[i]=n.charCodeAt(i);return o}return e.errors.push(new D(t,"This environment does not support reading binary tags; either Buffer or atob is required")),null},options:ye,stringify:function(e,t,r,n){var o,i=e.comment,a=e.type,s=e.value;if("function"==typeof Ke)o=s instanceof Ke?s.toString("base64"):Ke.from(s.buffer).toString("base64");else{if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");for(var l="",c=0;c<s.length;++c)l+=String.fromCharCode(s[c]);o=btoa(l)}if(a||(a=ye.defaultType),a===k.QUOTE_DOUBLE)s=o;else{for(var u=ye.lineWidth,f=Math.ceil(o.length/u),p=new Array(f),d=0,h=0;d<f;++d,h+=u)p[d]=o.substr(h,u);s=p.join(a===k.BLOCK_LITERAL?"\n":" ")}return Me({comment:i,type:a,value:s},t,r,n)}};function Ze(e,t){for(var r=Ve(e,t),n=0;n<r.items.length;++n){var o=r.items[n];if(!(o instanceof fe)){if(o instanceof ge){if(o.items.length>1)throw new L(t,"Each pair must have its own sequence indicator");var i=o.items[0]||new fe;o.commentBefore&&(i.commentBefore=i.commentBefore?"".concat(o.commentBefore,"\n").concat(i.commentBefore):o.commentBefore),o.comment&&(i.comment=i.comment?"".concat(o.comment,"\n").concat(i.comment):o.comment),o=i}r.items[n]=o instanceof fe?o:new fe(o)}}return r}function Ye(e,t,r){var n=new ue(e);n.tag="tag:yaml.org,2002:pairs";var o,i=O(t);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=void 0,l=void 0;if(Array.isArray(a)){if(2!==a.length)throw new TypeError("Expected [key, value] tuple: ".concat(a));s=a[0],l=a[1]}else if(a&&a instanceof Object){var c=Object.keys(a);if(1!==c.length)throw new TypeError("Expected { key: value } tuple: ".concat(a));l=a[s=c[0]]}else s=a;var u=e.createPair(s,l,r);n.items.push(u)}}catch(e){i.e(e)}finally{i.f()}return n}var Je={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ze,createNode:Ye},Qe=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),s(h(e=t.call(this)),"add",ge.prototype.add.bind(h(e))),s(h(e),"delete",ge.prototype.delete.bind(h(e))),s(h(e),"get",ge.prototype.get.bind(h(e))),s(h(e),"has",ge.prototype.has.bind(h(e))),s(h(e),"set",ge.prototype.set.bind(h(e))),e.tag=r.tag,e}return a(r,[{key:"toJSON",value:function(e,t){var r=new Map;t&&t.onCreate&&t.onCreate(r);var n,o=O(this.items);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=void 0,s=void 0;if(i instanceof fe?(a=oe(i.key,"",t),s=oe(i.value,a,t)):a=oe(i,"",t),r.has(a))throw new Error("Ordered maps must not include duplicate keys");r.set(a,s)}}catch(e){o.e(e)}finally{o.f()}return r}}]),r}(ue);s(Qe,"tag","tag:yaml.org,2002:omap");var Xe={identify:function(e){return e instanceof Map},nodeClass:Qe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:function(e,t){var r,n=Ze(e,t),o=[],i=O(n.items);try{for(i.s();!(r=i.n()).done;){var a=r.value.key;if(a instanceof ie){if(o.includes(a.value))throw new L(t,"Ordered maps must not include duplicate keys");o.push(a.value)}}}catch(e){i.e(e)}finally{i.f()}return Object.assign(new Qe,n)},createNode:function(e,t,r){var n=Ye(e,t,r),o=new Qe;return o.items=n.items,o}},et=function(e){l(r,e);var t=m(r);function r(){var e;return o(this,r),(e=t.call(this)).tag=r.tag,e}return a(r,[{key:"add",value:function(e){var t=e instanceof fe?e:new fe(e);he(this.items,t.key)||this.items.push(t)}},{key:"get",value:function(e,t){var r=he(this.items,e);return!t&&r instanceof fe?r.key instanceof ie?r.key.value:r.key:r}},{key:"set",value:function(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not ".concat(n(t)));var r=he(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new fe(e))}},{key:"toJSON",value:function(e,t){return y(c(r.prototype),"toJSON",this).call(this,e,t,Set)}},{key:"toString",value:function(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return y(c(r.prototype),"toString",this).call(this,e,t,n);throw new Error("Set items must all have null values")}}]),r}(ge);s(et,"tag","tag:yaml.org,2002:set");var tt={identify:function(e){return e instanceof Set},nodeClass:et,default:!1,tag:"tag:yaml.org,2002:set",resolve:function(e,t){var r=We(e,t);if(!r.hasAllNullValues())throw new L(t,"Set items must all have null values");return Object.assign(new et,r)},createNode:function(e,t,r){var n,o=new et,i=O(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;o.items.push(e.createPair(a,null,r))}}catch(e){i.e(e)}finally{i.f()}return o}},rt=function(e,t){var r=t.split(":").reduce((function(e,t){return 60*e+Number(t)}),0);return"-"===e?-r:r},nt=function(e){var t=e.value;if(isNaN(t)||!isFinite(t))return Ie(t);var r="";t<0&&(r="-",t=Math.abs(t));var n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),r+n.map((function(e){return e<10?"0"+String(e):String(e)})).join(":").replace(/000000\d*$/,"")},ot={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:function(e,t,r){return rt(t,r.replace(/_/g,""))},stringify:nt},it={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:function(e,t,r){return rt(t,r.replace(/_/g,""))},stringify:nt},at={identify:function(e){return e instanceof Date},default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"),resolve:function(e,t,r,n,o,i,a,s,l){s&&(s=(s+"00").substr(1,3));var c=Date.UTC(t,r-1,n,o||0,i||0,a||0,s||0);if(l&&"Z"!==l){var u=rt(l[0],l.slice(1));Math.abs(u)<30&&(u*=60),c-=6e4*u}return new Date(c)},stringify:function(e){return e.value.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")}};function st(e){var t="undefined"!=typeof process&&process.env||{};return e?"undefined"!=typeof YAML_SILENCE_DEPRECATION_WARNINGS?!YAML_SILENCE_DEPRECATION_WARNINGS:!t.YAML_SILENCE_DEPRECATION_WARNINGS:"undefined"!=typeof YAML_SILENCE_WARNINGS?!YAML_SILENCE_WARNINGS:!t.YAML_SILENCE_WARNINGS}function lt(e,t){if(st(!1)){var r="undefined"!=typeof process&&process.emitWarning;r?r(e,t):console.warn(t?"".concat(t,": ").concat(e):e)}}var ct={},ut={createNode:function(e,t,r){var o=new ge(e);if(t instanceof Map){var i,a=O(t);try{for(a.s();!(i=a.n()).done;){var s=v(i.value,2),l=s[0],c=s[1];o.items.push(e.createPair(l,c,r))}}catch(e){a.e(e)}finally{a.f()}}else if(t&&"object"===n(t))for(var u=0,f=Object.keys(t);u<f.length;u++){var p=f[u];o.items.push(e.createPair(p,t[p],r))}return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o},default:!0,nodeClass:ge,tag:"tag:yaml.org,2002:map",resolve:We},ft={createNode:function(e,t,r){var n=new ue(e);if(t&&t[Symbol.iterator]){var o,i=O(t);try{for(i.s();!(o=i.n()).done;){var a=o.value,s=e.createNode(a,r.wrapScalars,null,r);n.items.push(s)}}catch(e){i.e(e)}finally{i.f()}}return n},default:!0,nodeClass:ue,tag:"tag:yaml.org,2002:seq",resolve:Ve},pt=[ut,ft,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Fe,stringify:function(e,t,r,n){return Me(e,t=Object.assign({actualString:!0},t),r,n)},options:Se}],dt=function(e){return"bigint"==typeof e||Number.isInteger(e)},ht=function(e,t,r){return be.asBigInt?BigInt(e):parseInt(t,r)};function gt(e,t,r){var n=e.value;return dt(n)&&n>=0?r+n.toString(t):Ie(e)}var mt={identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:we,stringify:function(){return we.nullStr}},yt={identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:function(e){return"t"===e[0]||"T"===e[0]},options:ve,stringify:function(e){return e.value?ve.trueStr:ve.falseStr}},vt={identify:function(e){return dt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:function(e,t){return ht(e,t,8)},options:be,stringify:function(e){return gt(e,8,"0o")}},bt={identify:dt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:function(e){return ht(e,e,10)},options:be,stringify:Ie},wt={identify:function(e){return dt(e)&&e>=0},default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:function(e,t){return ht(e,t,16)},options:be,stringify:function(e){return gt(e,16,"0x")}},St={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Ie},xt={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e)},stringify:function(e){var t=e.value;return Number(t).toExponential()}},_t={identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve:function(e,t,r){var n=t||r,o=new ie(parseFloat(e));return n&&"0"===n[n.length-1]&&(o.minFractionDigits=n.length),o},stringify:Ie},Ot=pt.concat([mt,yt,vt,bt,wt,St,xt,_t]),Et=function(e){return"bigint"==typeof e||Number.isInteger(e)},kt=function(e){var t=e.value;return JSON.stringify(t)},Ct=[ut,ft,{identify:function(e){return"string"==typeof e},default:!0,tag:"tag:yaml.org,2002:str",resolve:Fe,stringify:kt},{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:function(){return null},stringify:kt},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:function(e){return"true"===e},stringify:kt},{identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:function(e){return be.asBigInt?BigInt(e):parseInt(e,10)},stringify:function(e){var t=e.value;return Et(t)?t.toString():JSON.stringify(t)}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:function(e){return parseFloat(e)},stringify:kt}];Ct.scalarFallback=function(e){throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(e)))};var Tt=function(e){return e.value?ve.trueStr:ve.falseStr},Pt=function(e){return"bigint"==typeof e||Number.isInteger(e)};function jt(e,t,r){var n=t.replace(/_/g,"");if(be.asBigInt){switch(r){case 2:n="0b".concat(n);break;case 8:n="0o".concat(n);break;case 16:n="0x".concat(n)}var o=BigInt(n);return"-"===e?BigInt(-1)*o:o}var i=parseInt(n,r);return"-"===e?-1*i:i}function Rt(e,t,r){var n=e.value;if(Pt(n)){var o=n.toString(t);return n<0?"-"+r+o.substr(1):r+o}return Ie(e)}var At=pt.concat([{identify:function(e){return null==e},createNode:function(e,t,r){return r.wrapScalars?new ie(null):null},default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:function(){return null},options:we,stringify:function(){return we.nullStr}},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:function(){return!0},options:ve,stringify:Tt},{identify:function(e){return"boolean"==typeof e},default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:function(){return!1},options:ve,stringify:Tt},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:function(e,t,r){return jt(t,r,2)},stringify:function(e){return Rt(e,2,"0b")}},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:function(e,t,r){return jt(t,r,8)},stringify:function(e){return Rt(e,8,"0")}},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:function(e,t,r){return jt(t,r,10)},stringify:Ie},{identify:Pt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:function(e,t,r){return jt(t,r,16)},stringify:function(e){return Rt(e,16,"0x")}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:function(e,t){return t?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY},stringify:Ie},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:function(e){return parseFloat(e.replace(/_/g,""))},stringify:function(e){var t=e.value;return Number(t).toExponential()}},{identify:function(e){return"number"==typeof e},default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve:function(e,t){var r=new ie(parseFloat(e.replace(/_/g,"")));if(t){var n=t.replace(/_/g,"");"0"===n[n.length-1]&&(r.minFractionDigits=n.length)}return r},stringify:Ie}],Ge,Xe,Je,tt,ot,it,at),Mt={core:Ot,failsafe:pt,json:Ct,yaml11:At},It={binary:Ge,bool:yt,float:_t,floatExp:xt,floatNaN:St,floatTime:it,int:bt,intHex:wt,intOct:vt,intTime:ot,map:ut,null:mt,omap:Xe,pairs:Je,seq:ft,set:tt,timestamp:at};var Dt=function(e,t){return e.key<t.key?-1:e.key>t.key?1:0},Lt=function(){function e(t){var r=t.customTags,n=t.merge,i=t.schema,a=t.sortMapEntries,s=t.tags;o(this,e),this.merge=!!n,this.name=i,this.sortMapEntries=!0===a?Dt:a||null,!r&&s&&function(e,t){if(!ct[e]&&st(!0)){ct[e]=!0;var r="The option '".concat(e,"' will be removed in a future release");lt(r+=t?", use '".concat(t,"' instead."):".","DeprecationWarning")}}("tags","customTags"),this.tags=function(e,t,r,n){var o=e[n.replace(/\W/g,"")];if(!o){var i=Object.keys(e).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown schema "'.concat(n,'"; use one of ').concat(i))}if(Array.isArray(r)){var a,s=O(r);try{for(s.s();!(a=s.n()).done;){var l=a.value;o=o.concat(l)}}catch(e){s.e(e)}finally{s.f()}}else"function"==typeof r&&(o=r(o.slice()));for(var c=0;c<o.length;++c){var u=o[c];if("string"==typeof u){var f=t[u];if(!f){var p=Object.keys(t).map((function(e){return JSON.stringify(e)})).join(", ");throw new Error('Unknown custom tag "'.concat(u,'"; use one of ').concat(p))}o[c]=f}}return o}(Mt,It,r||s,i)}return a(e,[{key:"createNode",value:function(t,r,o,i){var a={defaultPrefix:e.defaultPrefix,schema:this,wrapScalars:r};return function(e,t,r){if(e instanceof ne)return e;var o=r.defaultPrefix,i=r.onTagObj,a=r.prevObjects,s=r.schema,l=r.wrapScalars;t&&t.startsWith("!!")&&(t=o+t.slice(2));var c=function(e,t,r){if(t){var n=r.filter((function(e){return e.tag===t})),o=n.find((function(e){return!e.format}))||n[0];if(!o)throw new Error("Tag ".concat(t," not found"));return o}return r.find((function(t){return(t.identify&&t.identify(e)||t.class&&e instanceof t.class)&&!t.format}))}(e,t,s.tags);if(!c){if("function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!==n(e))return l?new ie(e):e;c=e instanceof Map?ut:e[Symbol.iterator]?ft:ut}i&&(i(c),delete r.onTagObj);var u={value:void 0,node:void 0};if(e&&"object"===n(e)&&a){var f=a.get(e);if(f){var p=new de(f);return r.aliasNodes.push(p),p}u.value=e,a.set(e,u)}return u.node=c.createNode?c.createNode(r.schema,e,r):l?new ie(e):e,t&&u.node instanceof ne&&(u.node.tag=t),u.node}(t,o,i?Object.assign(i,a):a)}},{key:"createPair",value:function(e,t,r){r||(r={wrapScalars:!0});var n=this.createNode(e,r.wrapScalars,null,r),o=this.createNode(t,r.wrapScalars,null,r);return new fe(n,o)}}]),e}();s(Lt,"defaultPrefix",C),s(Lt,"defaultTags",T);var Nt={anchorPrefix:"a",customTags:null,indent:2,indentSeq:!0,keepCstNodes:!1,keepNodeTypes:!0,keepBlobsInJSON:!0,mapAsMap:!1,maxAliasCount:100,prettyErrors:!1,simpleKeys:!1,version:"1.2"},$t={get binary(){return ye},set binary(e){Object.assign(ye,e)},get bool(){return ve},set bool(e){Object.assign(ve,e)},get int(){return be},set int(e){Object.assign(be,e)},get null(){return we},set null(e){Object.assign(we,e)},get str(){return Se},set str(e){Object.assign(Se,e)}},Ft={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:C},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:C}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:C}]}};function Bt(e,t){if("1.0"===(e.version||e.options.version)){var r=t.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(r)return"!"+r[1];var n=t.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return n?"!".concat(n[1],"/").concat(n[2]):"!".concat(t.replace(/^tag:/,""))}var o=e.tagPrefixes.find((function(e){return 0===t.indexOf(e.prefix)}));if(!o){var i=e.getDefaults().tagPrefixes;o=i&&i.find((function(e){return 0===t.indexOf(e.prefix)}))}if(!o)return"!"===t[0]?t:"!<".concat(t,">");var a=t.substr(o.prefix.length).replace(/[!,[\]{}]/g,(function(e){return{"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"}[e]}));return o.handle+a}function Ut(e,t,r,o){var i,a=t.doc,s=a.anchors,l=a.schema;if(!(e instanceof ne)){var c={aliasNodes:[],onTagObj:function(e){return i=e},prevObjects:new Map};e=l.createNode(e,!0,null,c);var u,f=O(c.aliasNodes);try{for(f.s();!(u=f.n()).done;){var p=u.value;p.source=p.source.node;var d=s.getName(p.source);d||(d=s.newName(),s.map[d]=p.source)}}catch(e){f.e(e)}finally{f.f()}}if(e instanceof fe)return e.toString(t,r,o);i||(i=function(e,t){if(t instanceof de)return de;if(t.tag){var r=e.filter((function(e){return e.tag===t.tag}));if(r.length>0)return r.find((function(e){return e.format===t.format}))||r[0]}var o,i;if(t instanceof ie){i=t.value;var a=e.filter((function(e){return e.identify&&e.identify(i)||e.class&&i instanceof e.class}));o=a.find((function(e){return e.format===t.format}))||a.find((function(e){return!e.format}))}else i=t,o=e.find((function(e){return e.nodeClass&&i instanceof e.nodeClass}));if(!o){var s=i&&i.constructor?i.constructor.name:n(i);throw new Error("Tag not resolved for ".concat(s," value"))}return o}(l.tags,e));var h=function(e,t,r){var n=r.anchors,o=r.doc,i=[],a=o.anchors.getName(e);return a&&(n[a]=e,i.push("&".concat(a))),e.tag?i.push(Bt(o,e.tag)):t.default||i.push(Bt(o,t.tag)),i.join(" ")}(e,i,t);h.length>0&&(t.indentAtStart=(t.indentAtStart||0)+h.length+1);var g="function"==typeof i.stringify?i.stringify(e,t,r,o):e instanceof ie?Me(e,t,r,o):e.toString(t,r,o);return h?e instanceof ie||"{"===g[0]||"["===g[0]?"".concat(h," ").concat(g):"".concat(h,"\n").concat(t.indent).concat(g):g}var zt=function(){function e(t){o(this,e),s(this,"map",Object.create(null)),this.prefix=t}return a(e,[{key:"createAlias",value:function(e,t){return this.setAnchor(e,t),new de(e)}},{key:"createMergePair",value:function(){for(var e=this,t=new me,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.value.items=n.map((function(t){if(t instanceof de){if(t.source instanceof ge)return t}else if(t instanceof ge)return e.createAlias(t);throw new Error("Merge sources must be Map nodes or their Aliases")})),t}},{key:"getName",value:function(e){var t=this.map;return Object.keys(t).find((function(r){return t[r]===e}))}},{key:"getNames",value:function(){return Object.keys(this.map)}},{key:"getNode",value:function(e){return this.map[e]}},{key:"newName",value:function(e){e||(e=this.prefix);for(var t=Object.keys(this.map),r=1;;++r){var n="".concat(e).concat(r);if(!t.includes(n))return n}}},{key:"resolveNodes",value:function(){var e=this.map,t=this._cstAliases;Object.keys(e).forEach((function(t){e[t]=e[t].resolved})),t.forEach((function(e){e.source=e.source.resolved})),delete this._cstAliases}},{key:"setAnchor",value:function(t,r){if(null!=t&&!e.validAnchorNode(t))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(r&&/[\x00-\x19\s,[\]{}]/.test(r))throw new Error("Anchor names must not contain whitespace or control characters");var n=this.map,o=t&&Object.keys(n).find((function(e){return n[e]===t}));if(o){if(!r)return o;o!==r&&(delete n[o],n[r]=t)}else{if(!r){if(!t)return null;r=this.newName()}n[r]=t}return r}}],[{key:"validAnchorNode",value:function(e){return e instanceof ie||e instanceof ue||e instanceof ge}}]),e}(),Wt=function e(t,r){if(t&&"object"===n(t)){var o=t.tag;t instanceof le?(o&&(r[o]=!0),t.items.forEach((function(t){return e(t,r)}))):t instanceof fe?(e(t.key,r),e(t.value,r)):t instanceof ie&&o&&(r[o]=!0)}return r},qt=function(e){return Object.keys(Wt(e,{}))};function Ht(e,t){var r=e.tagPrefixes,n=v(t.parameters,2),o=n[0],i=n[1];if(!o||!i)throw new L(t,"Insufficient parameters given for %TAG directive");if(r.some((function(e){return e.handle===o})))throw new L(t,"The %TAG directive must only be given at most once per handle in the same document.");return{handle:o,prefix:i}}function Vt(e,t){var r=v(t.parameters,1)[0];if("YAML:1.0"===t.name&&(r="1.0"),!r)throw new L(t,"Insufficient parameters given for %YAML directive");if(!Ft[r]){var n=e.version||e.options.version,o="Document will be parsed as YAML ".concat(n," rather than YAML ").concat(r);e.warnings.push(new $(t,o))}return r}function Kt(e){if(e instanceof le)return!0;throw new Error("Expected a YAML collection as document contents")}var Gt=function(){function e(t){o(this,e),this.anchors=new zt(t.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=t,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}return a(e,[{key:"add",value:function(e){return Kt(this.contents),this.contents.add(e)}},{key:"addIn",value:function(e,t){Kt(this.contents),this.contents.addIn(e,t)}},{key:"delete",value:function(e){return Kt(this.contents),this.contents.delete(e)}},{key:"deleteIn",value:function(e){return se(e)?null!=this.contents&&(this.contents=null,!0):(Kt(this.contents),this.contents.deleteIn(e))}},{key:"getDefaults",value:function(){return e.defaults[this.version]||e.defaults[this.options.version]||{}}},{key:"get",value:function(e,t){return this.contents instanceof le?this.contents.get(e,t):void 0}},{key:"getIn",value:function(e,t){return se(e)?!t&&this.contents instanceof ie?this.contents.value:this.contents:this.contents instanceof le?this.contents.getIn(e,t):void 0}},{key:"has",value:function(e){return this.contents instanceof le&&this.contents.has(e)}},{key:"hasIn",value:function(e){return se(e)?void 0!==this.contents:this.contents instanceof le&&this.contents.hasIn(e)}},{key:"set",value:function(e,t){Kt(this.contents),this.contents.set(e,t)}},{key:"setIn",value:function(e,t){se(e)?this.contents=t:(Kt(this.contents),this.contents.setIn(e,t))}},{key:"setSchema",value:function(e,t){if(e||t||!this.schema){"number"==typeof e&&(e=e.toFixed(1)),"1.0"===e||"1.1"===e||"1.2"===e?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&"string"==typeof e&&(this.options.schema=e),Array.isArray(t)&&(this.options.customTags=t);var r=Object.assign({},this.getDefaults(),this.options);this.schema=new Lt(r)}}},{key:"parse",value:function(e,t){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");var r=e.directives,n=void 0===r?[]:r,o=e.contents,i=void 0===o?[]:o,a=e.directivesEndMarker,s=e.error,l=e.valueRange;if(s&&(s.source||(s.source=this),this.errors.push(s)),function(e,t,r){var n,o=[],i=!1,a=O(t);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=s.comment,c=s.name;switch(c){case"TAG":try{e.tagPrefixes.push(Ht(e,s))}catch(t){e.errors.push(t)}i=!0;break;case"YAML":case"YAML:1.0":e.version&&e.errors.push(new L(s,"The %YAML directive must only be given at most once per document."));try{e.version=Vt(e,s)}catch(t){e.errors.push(t)}i=!0;break;default:if(c){var u="YAML only supports %TAG and %YAML directives, and not %".concat(c);e.warnings.push(new $(s,u))}}l&&o.push(l)}}catch(e){a.e(e)}finally{a.f()}r&&!i&&"1.1"===(e.version||r.version||e.options.version)&&(e.tagPrefixes=r.tagPrefixes.map((function(e){return{handle:e.handle,prefix:e.prefix}})),e.version=r.version),e.commentBefore=o.join("\n")||null}(this,n,t),a&&(this.directivesEndMarker=!0),this.range=l?[l.start,l.end]:null,this.setSchema(),this.anchors._cstAliases=[],function(e,t){var r,n={before:[],after:[]},o=void 0,i=!1,a=O(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.valueRange){if(void 0!==o){e.errors.push(new N(s,"Document contains trailing content not separated by a ... or --- line"));break}var l=ze(e,s);i&&(l.spaceBefore=!0,i=!1),o=l}else null!==s.comment?(void 0===o?n.before:n.after).push(s.comment):s.type===k.BLANK_LINE&&(i=!0,void 0===o&&n.before.length>0&&!e.commentBefore&&(e.commentBefore=n.before.join("\n"),n.before=[]))}}catch(e){a.e(e)}finally{a.f()}if(e.contents=o||null,o){var c=n.before.join("\n");if(c){var u=o instanceof le&&o.items[0]?o.items[0]:o;u.commentBefore=u.commentBefore?"".concat(c,"\n").concat(u.commentBefore):c}e.comment=n.after.join("\n")||null}else e.comment=n.before.concat(n.after).join("\n")||null}(this,i),this.anchors.resolveNodes(),this.options.prettyErrors){var c,u=O(this.errors);try{for(u.s();!(c=u.n()).done;){var f=c.value;f instanceof I&&f.makePretty()}}catch(e){u.e(e)}finally{u.f()}var p,d=O(this.warnings);try{for(d.s();!(p=d.n()).done;){var h=p.value;h instanceof I&&h.makePretty()}}catch(e){d.e(e)}finally{d.f()}}return this}},{key:"listNonDefaultTags",value:function(){return qt(this.contents).filter((function(e){return 0!==e.indexOf(Lt.defaultPrefix)}))}},{key:"setTagPrefix",value:function(e,t){if("!"!==e[0]||"!"!==e[e.length-1])throw new Error("Handle must start and end with !");if(t){var r=this.tagPrefixes.find((function(t){return t.handle===e}));r?r.prefix=t:this.tagPrefixes.push({handle:e,prefix:t})}else this.tagPrefixes=this.tagPrefixes.filter((function(t){return t.handle!==e}))}},{key:"toJSON",value:function(e,t){var r=this,n=this.options,o=n.keepBlobsInJSON,i=n.mapAsMap,a=n.maxAliasCount,s=o&&("string"!=typeof e||!(this.contents instanceof ie)),l={doc:this,indentStep:" ",keep:s,mapAsMap:s&&!!i,maxAliasCount:a,stringify:Ut},c=Object.keys(this.anchors.map);c.length>0&&(l.anchors=new Map(c.map((function(e){return[r.anchors.map[e],{alias:[],aliasCount:0,count:1}]}))));var u=oe(this.contents,e,l);if("function"==typeof t&&l.anchors){var f,p=O(l.anchors.values());try{for(p.s();!(f=p.n()).done;){var d=f.value,h=d.count;t(d.res,h)}}catch(e){p.e(e)}finally{p.f()}}return u}},{key:"toString",value:function(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");var e=this.options.indent;if(!Number.isInteger(e)||e<=0){var t=JSON.stringify(e);throw new Error('"indent" option must be a positive integer, not '.concat(t))}this.setSchema();var r=[],n=!1;if(this.version){var o="%YAML 1.2";"yaml-1.1"===this.schema.name&&("1.0"===this.version?o="%YAML:1.0":"1.1"===this.version&&(o="%YAML 1.1")),r.push(o),n=!0}var i=this.listNonDefaultTags();this.tagPrefixes.forEach((function(e){var t=e.handle,o=e.prefix;i.some((function(e){return 0===e.indexOf(o)}))&&(r.push("%TAG ".concat(t," ").concat(o)),n=!0)})),(n||this.directivesEndMarker)&&r.push("---"),this.commentBefore&&(!n&&this.directivesEndMarker||r.unshift(""),r.unshift(this.commentBefore.replace(/^/gm,"#")));var a={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Ut},s=!1,l=null;if(this.contents){this.contents instanceof ne&&(this.contents.spaceBefore&&(n||this.directivesEndMarker)&&r.push(""),this.contents.commentBefore&&r.push(this.contents.commentBefore.replace(/^/gm,"#")),a.forceBlockIndent=!!this.comment,l=this.contents.comment);var c=l?null:function(){return s=!0},u=Ut(this.contents,a,(function(){return l=null}),c);r.push(re(u,"",l))}else void 0!==this.contents&&r.push(Ut(this.contents,a));return this.comment&&(s&&!l||""===r[r.length-1]||r.push(""),r.push(this.comment.replace(/^/gm,"#"))),r.join("\n")+"\n"}}]),e}();s(Gt,"defaults",Ft);var Zt=function(e){l(r,e);var t=m(r);function r(e){return o(this,r),t.call(this,Object.assign({},Nt,e))}return r}(Gt);function Yt(e,t){var r=te(e),n=new Zt(t).parse(r[0]);return r.length>1&&n.errors.unshift(new L(r[1],"Source contains multiple documents; please use YAML.parseAllDocuments()")),n}var Jt={createNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0;void 0===r&&"string"==typeof t&&(r=t,t=!0);var n=Object.assign({},Gt.defaults[Nt.version],Nt);return new Lt(n).createNode(e,t,r)},defaultOptions:Nt,Document:Zt,parse:function(e,t){var r=Yt(e,t);if(r.warnings.forEach((function(e){return lt(e)})),r.errors.length>0)throw r.errors[0];return r.toJSON()},parseAllDocuments:function(e,t){var r,n,o=[],i=O(te(e));try{for(i.s();!(n=i.n()).done;){var a=n.value,s=new Zt(t);s.parse(a,r),o.push(s),r=s}}catch(e){i.e(e)}finally{i.f()}return o},parseCST:te,parseDocument:Yt,scalarOptions:$t,stringify:function(e,t){var r=new Zt(t);return r.contents=e,String(r)}}},47185:e=>{"use strict";e.exports=JSON.parse('{"classId":"classID","dataType":"datatype","itemId":"itemID","strokeDashArray":"strokeDasharray","strokeDashOffset":"strokeDashoffset","strokeLineCap":"strokeLinecap","strokeLineJoin":"strokeLinejoin","strokeMiterLimit":"strokeMiterlimit","typeOf":"typeof","xLinkActuate":"xlinkActuate","xLinkArcRole":"xlinkArcrole","xLinkHref":"xlinkHref","xLinkRole":"xlinkRole","xLinkShow":"xlinkShow","xLinkTitle":"xlinkTitle","xLinkType":"xlinkType","xmlnsXLink":"xmlnsXlink"}')},64775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:e=>{"use strict";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}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{DecapCmsCore:()=>V});var e=__webpack_require__(12244),t=__webpack_require__.n(e),r=__webpack_require__(53741),n=__webpack_require__(57903),o=__webpack_require__(7267),i=__webpack_require__(53327),a=__webpack_require__(9316),s=__webpack_require__(74081),l=__webpack_require__(58267);function c(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var u=c();u.withExtraArgument=c;const f=u;var p=__webpack_require__(15161),d=__webpack_require__(93324);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const m=(0,s.MT)((0,s.UY)(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},d.ZP)),(0,l.Uo)((0,s.md)(f,p.O)));var y=__webpack_require__(12318),v=__webpack_require__(97166),b=__webpack_require__(36867),w=__webpack_require__(98537),S=__webpack_require__.n(w),x=__webpack_require__(19619);function _(e){return S()({},(0,x.Kd)("en"),(0,x.Kd)(e))}var O=__webpack_require__(86402),E=__webpack_require__(64682),k=__webpack_require__(69456),C=__webpack_require__(78841),T=__webpack_require__.n(C),P=__webpack_require__(32673),j=__webpack_require__.n(P),R=__webpack_require__(62797);function A({field:e,t}){return(0,R.jsx)("div",null,t("editor.editorWidgets.unknownControl.noControl",{widget:e.get("widget")}))}A.propTypes={field:T().map,t:j().func.isRequired};const M=(0,a.Iu)()(A);function I({field:e,t}){return(0,R.jsx)("div",{className:"nc-widgetPreview"},t("editor.editorWidgets.unknownPreview.noPreview",{widget:e.get("widget")}))}I.propTypes={field:T().map,t:j().func.isRequired};const D=(0,a.Iu)()(I);(0,x.jC)("unknown",M,D);var L=__webpack_require__(25291),N=__webpack_require__.n(L),$=__webpack_require__(52977);function F(e){return m.dispatch((0,$.C9)(e,void 0))}const B=N()((async function(e,t){const r=(0,x.ck)(e);if(r){const e=await r.init({options:t,handleInsert:F});m.dispatch((0,$.RF)(e))}else{const t=new Error(`Missing external media library '${e}'. Please use 'registerMediaLibrary' to register it.`);m.dispatch((0,v.rR)(t))}}));m.subscribe((()=>{const e=m.getState();if(e){var t;const r=null===(t=e.config.media_library)||void 0===t?void 0:t.name;if(r&&!e.mediaLibrary.get("externalLibrary")){const t=e.config.media_library;B(r,t)}}})),__webpack_require__(30762);const U="nc-root",z=(0,n.$j)((function(e){return{locale:(0,O.fN)(e.config),config:e.config}}))((function({locale:e,config:t}){return(0,R.jsx)(a.oc,{locale:e,messages:_(e)},(0,R.jsx)(E.SV,{showBackup:!0,config:t},(0,R.jsx)(o.F0,{history:y.m8},(0,R.jsx)(o.AW,{component:k.Z}))))}));function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){H(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const V=q(q({},x.ZP),{},{init:function(e={}){const{config:o}=e;console.log("decap-cms-core 3.2.3"),m.dispatch((0,v.ME)(o,(function(){m.dispatch((0,b.So)())}))),(0,r.render)((0,R.jsx)((function(){return(0,R.jsx)(t().Fragment,null,(0,R.jsx)(i.GlobalStyles,null),(0,R.jsx)(n.zt,{store:m},(0,R.jsx)(z,null)))}),null),function(){const e=document.getElementById(U);if(e)return e;const t=document.createElement("div");return t.id=U,document.body.appendChild(t),t}())}})})(),__webpack_exports__=__webpack_exports__.DecapCmsCore,__webpack_exports__})()));
|
|
47
47
|
//# sourceMappingURL=decap-cms-core.js.map
|