decap-cms-core 3.2.0 → 3.2.2
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 +2 -2
- package/dist/decap-cms-core.js.map +1 -1
- package/dist/esm/bootstrap.js +2 -2
- package/dist/esm/components/Editor/EditorToolbar.js +32 -31
- package/dist/esm/components/UI/ErrorBoundary.js +2 -2
- package/package.json +7 -7
- package/src/components/Editor/EditorToolbar.js +1 -0
- package/src/components/Editor/__tests__/__snapshots__/EditorToolbar.spec.js.snap +15 -15
package/dist/decap-cms-core.js
CHANGED
|
@@ -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",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});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.0"),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.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__})()));
|
|
47
47
|
//# sourceMappingURL=decap-cms-core.js.map
|