diff --git a/public/css/app.css b/public/css/app.css index 9996543..565dbc6 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1 +1 @@ -html{font-size:62.5%}*{box-sizing:border-box;font-size:100%;font-style:inherit;margin:0;padding:0}*,a{font-weight:inherit}a{color:inherit;text-decoration:none}a img{border:0}li{list-style:none}button,fieldset{border:0}button{background:transparent;text-align:left}:focus{outline:none}button,input,textarea{font:inherit}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:85%;overflow-y:scroll}body{background-color:#fff;color:#464646;font-family:Poppins,sans-serif}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 30px #fff!important}input:-webkit-autofill{-webkit-text-fill-color:var(--primary-color)!important}*{-webkit-tap-highlight-color:transparent}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-thumb{background:var(--fill-color-alt-2);border:2px solid #fff;border-radius:var(--border-radius)}::-webkit-scrollbar-thumb:hover{background:var(--primary-color)}::-moz-selection{background:var(--primary-color);color:#fff}::selection{background:var(--primary-color);color:#fff}@keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes slidein{0%{opacity:0;transform:translateY(100%)}}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulseup{0%{opacity:0;transform:translateY(.6666666667rem)}50%{opacity:1}to{opacity:0;transform:translateY(-.6666666667rem)}}.cmf:before{background-color:#fff;border:1px solid var(--fill-color);border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);height:4rem;margin-left:-2rem;margin-top:-2rem;transform:scale(.25);transition:transform .2s,opacity .1s;width:4rem}.cmf:after,.cmf:before{content:"";display:block;left:50%;opacity:0;pointer-events:none;position:fixed;top:3rem;z-index:9999}.cmf:after{border:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;box-sizing:border-box;height:1.3333333333rem;margin-left:-.6666666667rem;margin-top:-.6666666667rem;width:1.3333333333rem}body.api-loading .cmf:before{opacity:1;transform:scale(1);transition-delay:.2s}body.api-loading .cmf:after{animation:spin .5s linear infinite both;opacity:1;transition:opacity .2s;transition-delay:.2s}.cmf__header{border-bottom:1px solid var(--fill-color-alt-1);justify-content:space-between;width:100%}.cmf__header,.cmf__logo{align-items:center;display:flex}.cmf__logo{cursor:pointer;height:100%;padding:1rem;width:250px}.cmf__user{padding-right:1rem}@media screen and (min-width:900px){.cmf__user{padding-right:2rem}}.cmf__main{display:flex;min-height:100vh;padding-top:1rem}.cmf__nav{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:10rem;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;flex-shrink:0;left:50%;margin-left:-37.5vw;max-height:50vh;opacity:0;overflow-y:scroll;padding:1rem;pointer-events:none;position:fixed;transform:scale(.9) translateY(30%);width:74vw;z-index:9999}.cmf__nav,body.open-nav .cmf__nav{transition:opacity .25s,transform .25s}body.open-nav .cmf__nav{opacity:1;pointer-events:all;transform:none}@media screen and (min-width:900px){.cmf__nav{border:0;border-radius:0;box-shadow:none;margin-left:0;max-height:none;opacity:1;overflow-y:auto;padding:0 0 2rem 1rem;pointer-events:all;position:static;transform:none;width:250px;z-index:auto}}.cmf__nav-trigger{align-items:center;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:50%;bottom:2rem;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);cursor:pointer;display:flex;height:6rem;justify-content:center;left:50%;margin-left:-3rem;position:fixed;width:6rem}@media screen and (min-width:900px){.cmf__nav-trigger{display:none}}.cmf__content{flex-grow:1}.cmf__module{padding:1rem 0}@media screen and (min-width:900px){.cmf__module{padding:0 0 2rem}}.cmf__footer{padding-bottom:1rem}.logo,.logo__emblem{align-items:center;display:flex}.logo__emblem{background-color:var(--primary-color);border-radius:var(--border-radius);color:var(--fill-color);font-size:1.5rem;font-weight:900;height:3rem;justify-content:center;letter-spacing:-.02em;line-height:1.5;width:3rem}.logo__emblem,.logo__name{font-family:Poppins,sans-serif}.logo__name{color:var(--primary-color-alt-3);font-size:1rem;font-weight:500;line-height:1;margin-left:1rem;text-transform:none}.logo__name span{color:#000}.user-panel,.user-panel__avatar{align-items:center;display:flex}.user-panel__avatar{background-color:var(--fill-color-alt-1);border-radius:50%;height:2.5rem;justify-content:center;margin-right:1rem;overflow:hidden;width:2.5rem}.user-panel__avatar img{display:block;height:2.5rem;width:2.5rem}.user-panel__name{color:#000;margin-right:1rem}.user-panel__logout{margin-top:.6666666667rem}.nav__subnav{display:none}.nav__subnav--open{display:block}.nav-item{align-items:center;border-radius:var(--border-radius);color:#000;cursor:pointer;display:flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;padding:.5rem 1rem;transition:color .25s,background-color .5s;width:100%}.nav-item--active,.nav-item:hover{background-color:var(--fill-color-alt-1)}.nav-item__icon{margin-right:1rem;transition:opacity .25s}.subnav-item{align-items:center;border-radius:var(--border-radius);color:#000;cursor:pointer;display:flex;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.3333333333rem 1rem;transition:color .25s;width:100%}.subnav-item--active{color:var(--primary-color)}.subnav-item__icon{margin-right:1rem;opacity:0;transition:opacity .25s}.page{display:flex;flex-direction:column;min-height:100vh}.page:before{background-color:#fff;border:1px solid var(--fill-color);border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);height:4rem;margin-left:-2rem;margin-top:-2rem;transform:scale(.25);transition:transform .2s,opacity .1s;width:4rem}.page:after,.page:before{content:"";display:block;left:50%;opacity:0;pointer-events:none;position:fixed;top:3rem;z-index:9999}.page:after{border:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;box-sizing:border-box;height:1.3333333333rem;margin-left:-.6666666667rem;margin-top:-.6666666667rem;width:1.3333333333rem}body.api-loading .page:before{opacity:1;transform:scale(1);transition-delay:.2s}body.api-loading .page:after{animation:spin .5s linear infinite both;opacity:1;transition:opacity .2s;transition-delay:.2s}@media screen and (min-width:900px){.page{flex-direction:row}}.page__visual{align-items:flex-start;background-color:#fff;background-image:var(--theme-image-src);background-position:50%;background-size:cover;color:#fff;display:flex;flex-direction:column;justify-content:flex-start;min-height:40vh;padding:2rem;position:relative;width:100%;z-index:1}@media screen and (min-width:900px){.page__visual{min-height:100vh;padding-left:10%;padding-right:15%;padding-top:58vh;width:65%}}.page__visual:after{background-image:linear-gradient(120deg,var(--primary-color-alt-3) 0,transparent 100%);content:"";display:block;height:100%;opacity:.75;position:absolute;right:0;top:0;width:100%;z-index:-1}.page__content{align-items:flex-start;display:flex;flex-direction:column;justify-content:space-between;padding:2rem;position:relative}@media screen and (min-width:900px){.page__content{min-height:100vh;padding:58vh 5% 2rem;width:35%}}.page__logo{margin-bottom:4rem;position:static}@media screen and (min-width:900px){.page__logo{margin-bottom:0;position:absolute;top:5%}}.page__box{width:100%}.page__footer{margin-top:4rem}.module__header{display:flex;justify-content:space-between;margin-bottom:1rem;padding:0 2rem}.module__header-components{display:flex}.module__header-component{align-items:center;display:flex;margin-left:.6666666667rem}.module__header-component:first-child{margin-left:0}.module__main{padding:0 .6666666667rem}@media screen and (min-width:900px){.module__main{padding:0 2rem}}.index-row{display:flex;flex-grow:1;padding:1rem 2rem;transition:background-color .25s}.index-row:hover{background-color:var(--fill-color)}.index-row--selected,.index-row--selected:hover{background-color:var(--fill-color-alt-1)}.index-row--clickable{cursor:pointer}.index-row--grid{padding:0}.index-row__checkbox{align-items:center;display:flex;margin-right:1rem}.index-row__content{grid-gap:1rem;display:grid;flex-grow:1}.index-row__actions{align-items:center;display:flex;gap:1rem}.index-row__component{display:flex}.window{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);max-width:450px;padding:0 .6666666667rem .6666666667rem}.window--modal{left:50%;max-width:none;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);width:60vw;z-index:9999}.window--wide{width:80vw}.window--fixed-size{max-width:none}.window__header{align-items:center;display:flex;height:6rem;justify-content:space-between;padding:1rem 1rem 1rem 2rem}.window__title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.window__actions,.window__title{align-items:center;display:flex;gap:1rem}.window__toolbar{display:block;padding:0 2rem 1rem}.window__content{display:block;margin-bottom:1rem;padding:0 2rem}.window--modal .window__content{margin-bottom:0;max-height:calc(75vh - 12rem);overflow-y:scroll;padding-bottom:1rem}.window--wide .window__content{height:calc(75vh - 12rem)}.window--fixed-size .window__content{height:500px;margin-bottom:0;overflow-y:scroll;width:500px}.window__footer{align-items:flex-end;display:flex;gap:1rem;height:6rem;justify-content:flex-end;padding:1rem 2rem}.window--fixed-size .window__footer{padding:.5rem 2rem}.divider{background-color:var(--fill-color-alt-1);border:0;height:1px;margin:.5rem 0}.hero{color:#fff;font-family:Poppins,sans-serif;font-size:3rem;font-weight:700;letter-spacing:-.02em;line-height:1}@media screen and (min-width:900px){.hero{font-family:Poppins,sans-serif;font-size:5rem;font-weight:700;letter-spacing:-.02em;line-height:1}}.title{color:#000;font-size:2.75rem;font-weight:900;letter-spacing:-.02em;line-height:1.5}.title,.title--small{font-family:Poppins,sans-serif}.title--small{font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.dropdown{display:inline-block;position:relative}.dropdown__button{-webkit-appearance:none;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 2.5rem .5rem 1.3333333333rem;position:relative;transition:background-color .25s}.dropdown__button:hover{background-color:var(--fill-color-alt-2)}.dropdown--primary .dropdown__button{background-color:var(--primary-color);color:#fff}.dropdown--primary .dropdown__button:hover{background-color:var(--primary-color-alt-1)}.dropdown--small .dropdown__button{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.6666666667rem 2.5rem .6666666667rem 1.3333333333rem}.dropdown__label{color:#7b7d85;margin-right:.6666666667rem}.dropdown__icon{align-items:center;display:flex;height:2rem;justify-content:center;margin-top:-1rem;opacity:.65;pointer-events:none;position:absolute;right:.5rem;top:50%;width:2rem}.dropdown__content{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:none;margin-top:.6666666667rem;max-height:45vh;overflow-y:auto;padding:.6666666667rem;position:absolute;right:0;width:20rem;z-index:9999}.dropdown--left .dropdown__content{right:0}.dropdown--right .dropdown__content{left:0;right:auto}.dropdown--up .dropdown__content{margin-top:0;top:-.6666666667rem;transform:translateY(-100%)}.dropdown--open .dropdown__content,.icon{display:block}.icon{word-wrap:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga";direction:ltr;font-family:Material Icons Outlined;font-size:20px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1;text-rendering:optimizeLegibility;text-transform:none;white-space:nowrap}.icon--mini{font-size:14px}.icon--small{font-size:18px}.icon--alt{color:var(--primary-color)}.icon--soft{opacity:.75}.icon--medium{font-size:30px}.icon--large{font-size:40px}.icon--extra-large{font-size:75px}.icon--placeholder{color:var(--fill-color-alt-1);font-size:60px}.icon--clickable{color:#000;opacity:.5;transition:opacity .25s}.icon--clickable:hover{opacity:1}.form,.form__content{position:relative}.form__content{align-items:flex-start;display:flex;width:100%}.form__inputs{flex:1}.form__sidebar{background-color:var(--fill-color);margin-left:2rem;padding:2rem 1rem;position:sticky;top:1rem;width:375px}.form__sidebar-save{margin-bottom:2rem}.form__sidebar-input{border-bottom:1px solid var(--fill-color-alt-1);margin-bottom:.6666666667rem;padding-bottom:.6666666667rem}.form__sidebar-input:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.form__input{margin-bottom:2rem}.form__input:last-child{margin-bottom:0}.form__footer{display:flex;justify-content:flex-end;margin-top:2rem}.form--submitting:after{background-color:hsla(0,0%,100%,.5);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.field{display:block;width:100%}.field__header{align-items:center;display:flex;justify-content:flex-start;margin-bottom:.5rem}.field__label{display:block}.field--has-error .field__label{color:var(--primary-color-alt-1)}.field__tooltip{margin-left:.5rem}.field__error{background-color:var(--primary-color-alt-1);border-radius:var(--border-radius);color:#fff;display:inline-block;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:1.25;margin-top:.6666666667rem;padding:.3333333333rem .6666666667rem}.label,.label--primary{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;text-transform:uppercase}.notification{animation:slidein .25s;background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;display:block;margin-bottom:.6666666667rem;opacity:.9;padding:1rem 2rem;transition:transform .25s,opacity .25s}.notification:last-child{margin-bottom:0}.notification--hidden{opacity:0;pointer-events:none;transform:translateY(100%)}.notification-stack{bottom:2rem;display:block;pointer-events:none;position:fixed;right:2rem;width:20rem;z-index:9999}.pagination{gap:1rem;width:100%}.pagination,.pagination__status{align-items:center;display:flex;justify-content:center}.pagination__status{gap:.6666666667rem;text-align:center}.pagination__controls,.pagination__next,.pagination__prev{display:flex;gap:.5rem}.search{display:block;position:relative}.search__icon{align-items:center;display:flex;height:2rem;justify-content:center;left:.6666666667rem;margin-top:-1rem;pointer-events:none;position:absolute;top:50%;width:2rem;z-index:2}.search__input{-webkit-appearance:none;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 1.3333333333rem .5rem 3rem;position:relative;transition:background-color .25s;width:100%;z-index:1}.search__input:focus{border-color:var(--fill-color-alt-2)}.search__clear{align-items:center;display:flex;height:2rem;justify-content:center;margin-top:-1rem;opacity:0;pointer-events:none;position:absolute;right:.6666666667rem;top:50%;transition:opacity .25s;width:2rem;z-index:2}.search--searching .search__clear{opacity:1;pointer-events:all}.placeholder{border:1px dashed var(--fill-color-alt-1);border-radius:var(--border-radius);display:flex;flex-direction:column;justify-content:center;padding:2rem .5rem;text-align:center;width:100%}.placeholder__icon{display:block}.placeholder__text{color:#7b7d85;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.placeholder__button{margin-top:1rem}.placeholder--clickable{cursor:pointer}.placeholder--clickable:hover{border-color:var(--fill-color-alt-2)}.wizard{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;width:100%}.wizard__nav{border-bottom:1px solid var(--fill-color-alt-1);display:flex;justify-content:center;padding:2rem 0;width:100%}.wizard__steps{display:flex}.wizard__step{align-items:center;color:var(--fill-color-alt-2);display:flex;flex-direction:column;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5;padding:0 4rem;position:relative}.wizard__step:after{background-color:var(--fill-color-alt-2);content:"";display:block;height:1px;left:0;position:absolute;right:0;top:1.5rem}.wizard__step:first-child:after{left:50%}.wizard__step:last-child:after{right:50%}.wizard__step span{align-items:center;background-color:var(--fill-color-alt-2);border:1px solid var(--fill-color-alt-2);border-radius:50%;color:#fff;content:"";display:flex;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;height:3rem;justify-content:center;line-height:1.35;margin-bottom:.6666666667rem;position:relative;text-transform:none;transition:background-color .25s;width:3rem;z-index:1}.wizard__step--active{color:var(--primary-color)}.wizard__step--active span{border-color:var(--primary-color)}.wizard__step--active span,.wizard__step--active:after{background-color:var(--primary-color)}.wizard__content{padding:4rem 20% 2rem}.wizard__component{margin-bottom:2rem}.wizard__component:last-child{margin-bottom:0}.wizard__footer{display:flex;justify-content:flex-end;padding:2rem}.wizard__footer-component{align-items:center;display:flex;margin-left:1rem}.wizard__footer-component:first-child{margin-left:0}.select-list__option{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-list__option:last-child{margin-bottom:0}.select-list__option:hover{background-color:var(--fill-color)}.select-list__option--selected,.select-list__option--selected:hover{background-color:var(--fill-color-alt-1)}.select-list__option-icon{align-items:center;display:flex;justify-content:center;margin-right:.6666666667rem;pointer-events:none}.link-list__button{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem .6666666667rem .6666666667rem 1rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.link-list--warning .link-list__button{color:#b61313}.link-list__button:last-child{margin-bottom:0}.link-list__button:hover{background-color:var(--fill-color)}.directory{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;padding:1rem;transition:background-color .25s}.directory--compact-list{padding:.6666666667rem .5rem}.directory--grid{align-items:center;border:1px solid var(--fill-color-alt-1);flex-direction:column}.directory--grid:hover{border-color:var(--fill-color-alt-2)}.directory:hover{background-color:var(--fill-color)}.directory__icon{align-items:center;display:flex;flex-grow:0;flex-shrink:0;justify-content:center;margin-right:1rem;width:4rem}.directory--compact-list .directory__icon{width:2rem}.directory--grid .directory__icon{flex-grow:1;margin-bottom:1rem;margin-right:0;order:2;width:100%}.directory__content{grid-gap:.6666666667rem;display:grid;flex-grow:1;grid-template-columns:repeat(3,33.33%)}.directory--grid .directory__content{display:block;order:3;width:100%}.directory__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.directory--grid .directory__name{text-align:center}.directory__type{color:#7b7d85;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.directory--grid .directory__type{display:none}.file{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;flex-grow:1;justify-content:flex-start;padding:.6666666667rem 1rem;transition:background-color .25s}.file--compact-list{padding:.6666666667rem .5rem}.file--grid{align-items:flex-start;border:1px solid var(--fill-color-alt-1);flex-direction:column}.file--grid:hover{border-color:var(--fill-color-alt-2)}.file:hover{background-color:var(--fill-color)}.file--selected{border-color:var(--fill-color-alt-2)}.file--selected,.file--selected:hover{background-color:var(--fill-color-alt-1)}.file__preview{align-items:center;display:flex;flex-grow:0;justify-content:center;margin-right:1rem;width:4rem}.file--compact-list .file__preview{width:2rem}.file--grid .file__preview{flex-grow:1;margin-bottom:1rem;margin-right:0;order:2;width:100%}.file__content{grid-gap:.6666666667rem;display:grid;flex-grow:1;grid-template-columns:repeat(3,33.33%)}.file--grid .file__content{display:block;order:3;width:100%}.file--minimal .file__content{display:block;overflow:hidden;width:100%}.file__checkbox{flex-grow:0;margin-right:1rem}.file--compact-list .file__checkbox{display:none}.file--grid .file__checkbox{background-color:var(--fill-color);border:1px solid var(--fill-color-alt-1);border-bottom-right-radius:var(--border-radius);border-top-left-radius:var(--border-radius);left:0;margin-right:0;position:absolute;top:0;z-index:1}.file__actions{flex-grow:0}.file__name,.file__type{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file__type{color:#7b7d85}.file--grid .file__type,.file--minimal .file__type{display:none}.file__size{color:#7b7d85;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file--minimal .file__size{display:none}.file__label{top:50%;transform:translateY(-50%)}.file--grid .file__label,.file__label{position:absolute;right:1.3333333333rem}.file--grid .file__label{top:1rem;transform:none}.item{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;justify-content:flex-start;padding:.6666666667rem 1rem;transition:background-color .25s}.item:hover{background-color:var(--fill-color)}.item--selected,.item--selected:hover{background-color:var(--fill-color-alt-1)}.item__content{flex-grow:1;padding:1rem}.item__row{grid-gap:1rem;display:grid}.item__checkbox{flex-grow:0;margin-right:1rem}.item__actions{flex-grow:0}.item__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1}.overlay{align-items:center;background-color:var(--fill-color);bottom:0;display:flex;justify-content:center;left:0;opacity:.75;position:fixed;right:0;top:0;z-index:9998}.confirm{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:50%;max-width:450px;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);z-index:9999}.confirm__header{display:block;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}.confirm__content{display:block;margin-bottom:1rem;padding:0 2rem}.confirm__footer{display:flex;gap:1rem;justify-content:flex-end;padding:1rem 2rem}.prompt{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:50%;max-width:450px;min-width:400px;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);z-index:9999}.prompt__header{display:block;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}.prompt__content{display:block;padding:0 2rem}.prompt__content,.prompt__text{margin-bottom:1rem}.prompt__input{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;resize:vertical;width:100%}.prompt__input:focus{border-color:var(--fill-color-alt-2)}.prompt__footer{display:flex;justify-content:flex-end;padding:1rem 2rem}.prompt__footer>*{margin-left:1rem}.prompt__footer>:first-child{margin-left:0}.directory-list{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.directory-list--grid{grid-gap:.6666666667rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.directory-list--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 450px){.directory-list--grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 650px){.directory-list--grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 800px){.directory-list--grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 900px){.directory-list--grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1000px){.directory-list--grid{grid-template-columns:repeat(7,minmax(0,1fr))}}@container (min-width: 1280px){.directory-list--grid{grid-template-columns:repeat(8,minmax(0,1fr))}}.directory-list__item{margin-bottom:1px}.directory-list__item:last-child{margin-bottom:0}.file-list{-webkit-user-select:none;-moz-user-select:none;user-select:none}.file-list--grid{grid-gap:.6666666667rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.file-list--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 450px){.file-list--grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 650px){.file-list--grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 800px){.file-list--grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 900px){.file-list--grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1000px){.file-list--grid{grid-template-columns:repeat(7,minmax(0,1fr))}}@container (min-width: 1280px){.file-list--grid{grid-template-columns:repeat(8,minmax(0,1fr))}}.file-list__item{margin-bottom:1px}.file-list__item:last-child{margin-bottom:0}.thumb{background-color:var(--fill-color-alt-1);height:0;padding-top:100%;position:relative;width:100%}.thumb:before{animation:spin .25s linear infinite;border-bottom:2px solid transparent;border-left:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;border-top:2px solid var(--primary-color);box-sizing:border-box;content:"";display:block;height:1.3333333333rem;left:50%;margin-left:-.6666666667rem;margin-top:-.6666666667rem;position:absolute;top:50%;width:1.3333333333rem;z-index:9999}.thumb--loaded{height:auto;padding-top:0}.thumb--loaded:before{display:none}.thumb__img{display:block;opacity:0;transition:opacity .25s;width:100%}.thumb--loaded .thumb__img{opacity:1}.file-preview{border-radius:var(--border-radius);display:block;height:3.5rem;overflow:hidden;width:3.5rem}.file-preview--compact-list{height:1.75rem;width:1.75rem}.file-preview__textual{align-items:center;background-color:#fff;border:1px solid var(--color);border-radius:var(--border-radius);color:var(--color);display:flex;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;height:3.5rem;justify-content:center;line-height:1;overflow:hidden;position:relative;text-transform:uppercase;width:3.5rem}.file-preview--compact-list .file-preview__textual{font-size:.5rem;height:1.75rem;width:1.75rem}.file-preview--grid .file-preview__textual{padding-top:100%}.file-preview--grid .file-preview__textual span{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;text-align:center;top:0}.file-preview__textual:after{background-color:var(--color);bottom:0;content:"";left:0;opacity:.1;position:absolute;right:0;top:0}.file-preview--full .file-preview__textual{width:100%}.file-preview--full{height:auto;width:100%}.file-view{padding:1rem}.file-view__content,.file-view__header,.file-view__preview{margin-bottom:2rem}.file-view__actions{display:flex;flex-direction:column;gap:.5rem}.file-view__footer{margin-top:1rem}.multi-file-view{padding:1rem}.multi-file-view__header{margin-bottom:.5rem}.multi-file-view__content{margin-bottom:2rem}.multi-file-view__actions{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.multi-file-view__footer{margin-top:1rem}.file-picker-widget{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;height:80vh;left:50%;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);width:80vw;z-index:9999}.file-picker-widget__header{align-items:center;display:flex;padding:1rem 2rem}.file-picker-widget__header,.file-picker-widget__header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.file-picker-widget__header-options{align-items:center;display:flex;flex-grow:1;gap:.6666666667rem;justify-content:flex-end}.file-picker-widget__content{display:flex;flex-grow:1;overflow-y:scroll}.file-picker-widget__footer{align-items:center;display:flex;gap:.6666666667rem;justify-content:flex-end;padding:1rem 2rem}.file-picker-widget__main{width:75%}.file-picker-widget__side{padding-top:2rem;position:sticky;top:0;width:25%}.file-picker-widget__selection{background-color:var(--fill-color);border-radius:var(--border-radius);padding-top:1rem}.file-picker-widget__selection-header{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;margin-bottom:1rem;padding-left:1rem;text-transform:uppercase}.file-picker-widget__file{position:relative}.item-picker-widget__footer{align-items:center;display:flex;gap:1rem;justify-content:flex-end;width:100%}.item-picker-widget__footer-pagination{width:75%}.item-picker-widget__footer-actions{display:flex;gap:1rem;height:100%;justify-content:flex-end;width:25%}.item-picker-widget__row{margin-bottom:1px}.item-picker-widget__row:last-child{margin-bottom:0}.item-picker-widget__selection-header{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;margin-bottom:1rem;padding-left:1rem;text-transform:uppercase}.icon-button{align-items:center;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;cursor:pointer;display:flex;height:2.3rem;justify-content:center;padding:.5rem 1.3333333333rem;transition:background-color .25s;width:2rem}.icon-button--active,.icon-button:hover{background-color:var(--fill-color-alt-2)}.icon-button--grouped{border-radius:0}.icon-button--transparent,.icon-button--transparent:hover{background-color:transparent}.icon-button--disabled{cursor:default;opacity:.2}.file-thumb__preview{margin-bottom:1rem}.file-thumb__name{color:#7b7d85;line-height:1;line-height:2;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.definition-list,.file-thumb__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500}.definition-list{line-height:1;line-height:1.2}.definition-list__item{display:flex;margin-bottom:.5714285714rem;position:relative;transition:opacity .1s}.definition-list__item--editable{cursor:pointer}.definition-list__item--editable:hover{opacity:.75}.definition-list__item:last-child{margin-bottom:0}.definition-list__key{color:#7b7d85;display:block;padding-right:.6666666667rem;width:40%}.definition-list__value{display:block;width:60%}.definition-list__edit{left:0;position:absolute;top:0}.upload-status{align-items:center;background-color:#fff;border:1px solid #fff;border-radius:var(--border-radius);display:flex;height:3.5rem;justify-content:center;overflow:hidden;width:3.5rem}.upload-status--queued .upload-status__icon{opacity:.25}.upload-status--uploading .upload-status__icon{animation:pulseup 1s ease-in infinite}.file-placeholder{align-items:center;background-color:var(--fill-color);border-radius:var(--border-radius);display:flex;flex-wrap:wrap;justify-content:flex-start;padding:.6666666667rem 1rem;position:relative;transition:background-color .25s}.file-placeholder__status{flex-grow:0;margin-right:1rem}.file-placeholder__content{flex-grow:1}.file-placeholder__name{margin-bottom:.5rem}.file-placeholder__name,.file-placeholder__size{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1}.file-placeholder__size{color:#7b7d85}.file-placeholder__progress{margin-top:.5rem;width:100%}.file-placeholder__progress-bar{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;height:3px;width:100%}.file-placeholder__progress-bar::-webkit-progress-bar{background-color:#fff}.file-placeholder__progress-bar::-webkit-progress-value{background-color:var(--primary-color)}.tags{display:flex;flex-wrap:wrap}.tags__tag{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;margin:.1666666667rem .3333333333rem .1666666667rem 0;padding:.25rem .6666666667rem;position:relative}.tags__tag:last-child{margin-right:0}.tags__tag--clickable{cursor:pointer}.tooltip{cursor:default;display:block;position:relative}.tooltip__text{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:var(--fill-color);border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);left:0;max-width:300px;padding:.3333333333rem .6666666667rem;position:fixed;top:0;z-index:9999}.select{position:relative}.select__field{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);cursor:pointer;justify-content:space-between;padding:.6666666667rem;width:100%}.select__field,.select__icon{align-items:center;display:flex}.select__icon{height:2rem;justify-content:center;margin-top:-1rem;opacity:.65;pointer-events:none;position:absolute;right:.5rem;top:50%;width:2rem}.select__dropdown{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.5rem;padding:.6666666667rem;position:absolute;right:0;top:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2}.select__search{margin-bottom:.6666666667rem}.select__list{max-height:30vh;overflow-y:auto}.select__footer{margin-top:.6666666667rem}.tag-label{background-color:rgba(0,0,0,.35);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.25rem .6666666667rem}.tag-label--small{font-size:.75rem;padding:.25rem .3333333333rem}.tags-browser__selected{margin-bottom:1rem}.tags-browser__available,.tags-browser__selected{border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius);padding:.5rem}.file-browser__placeholder{display:flex;height:30vh;padding:.6666666667rem}.file-browser__content{container-type:inline-size;display:flex;flex-direction:column;gap:.6666666667rem;padding-top:0}.directory-tree{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.directory-tree__children{padding-left:1.3333333333rem}.tree-item{cursor:pointer}.tree-item,.tree-item__content,.tree-item__toggle{align-items:center;display:flex}.tree-item__content{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.3333333333rem .6666666667rem;transition:background-color .25s}.tree-item__content:hover{background-color:var(--fill-color)}.tree-item--selected .tree-item__content{background-color:var(--fill-color-alt-1)}.tree-item__icon{align-items:center;display:flex;margin-right:.6666666667rem}.tree-item__text{align-items:center;display:flex;white-space:nowrap}.sticky-sidebar{display:flex;gap:1rem}.sticky-sidebar__content{width:75%}.sticky-sidebar__side{flex-grow:0;flex-shrink:0;height:100%;padding-top:2rem;position:sticky;top:0;width:25%}.filters-tool,.filters-tool__filters{align-items:center;display:flex;gap:1rem}.boolean-filter{align-items:center;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#7b7d85;cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 1.3333333333rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.boolean-filter__label{margin-right:.6666666667rem}.index{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);transition:opacity .5s}.index--loading{opacity:0}.index--grid .index__rows{grid-gap:2rem;display:grid;grid-template-columns:repeat(5,1fr);padding:0 2rem}.index__row{border-bottom:1px solid var(--fill-color)}.index--grid .index__row{background-color:#fff;border:0;display:flex;padding:0}.index--grid .index__row:hover{background-color:#fff}.index--grid .index__component{display:flex;flex-grow:1}.index__placeholder{background-color:var(--fill-color);border-radius:var(--border-radius);margin:0 1rem 1rem;padding:1rem 2rem;text-align:center}.index__header{display:flex;flex-direction:column;gap:1rem;padding:1rem 2rem}@media screen and (min-width:900px){.index__header{align-items:center;flex-direction:row}}.index__header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.index__header-options{align-items:center;display:flex;flex-grow:1;gap:1rem;justify-content:flex-start}@media screen and (min-width:900px){.index__header-options{justify-content:flex-end}}.index__header-filter{margin-left:1rem}.index__header-filter:first-child{margin-left:0}.index__header-filters-tool{align-items:center;display:flex}.index__header-clear-filters{margin-left:1rem}.index__footer{padding:1rem 2rem;width:100%}.edit{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:2rem;transition:opacity .5s}.edit--loading{opacity:0}.create{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:2rem;transition:opacity .5s}.create--loading{opacity:0}.create-wizard{display:flex;justify-content:center}.create-wizard__wizard{width:100%}.export{padding:1rem 2rem}.delete,.export{background-color:#fff;border-radius:var(--border-radius)}.delete{border:1px solid var(--fill-color);padding:2rem}.delete__footer{display:flex;margin-top:2rem}.delete__confirm{margin-right:.6666666667rem}.custom-controller{background-color:#fff;border-radius:var(--border-radius);padding:1rem 2rem}.custom-controller iframe{border:0;width:100%}.view-media-directory{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);transition:opacity .5s}.view-media-directory--loading{opacity:0}.view-media-directory__header{align-items:center;display:flex;padding:1rem 2rem}.view-media-directory__header-title{align-items:center;display:flex;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;gap:1rem;line-height:1.5}.view-media-directory__header-options{align-items:center;display:flex;flex-grow:1;gap:.6666666667rem;justify-content:flex-end}.view-media-directory__content{display:flex}.view-media-directory__main{padding:1rem;width:60%}@media screen and (min-width:1150px){.view-media-directory__main{width:75%}}.view-media-directory__side{position:relative;width:40%}@media screen and (min-width:1150px){.view-media-directory__side{width:25%}}.view-media-directory__side>*{position:sticky;top:0}.select-one{background-color:#fff;border:1px solid var(--fill-color);border-radius:var(--border-radius);padding:2rem}.select-one--grid .select-one__component{display:flex;flex-grow:1}.select-one__options{display:grid;gap:2rem;grid-template-columns:repeat(4,1fr)}.select-one__option{border:1px solid var(--fill-color);cursor:pointer;padding:2rem;transition:background-color .25s}.select-one__option:hover{background-color:var(--fill-color)}.select-one__option--selected,.select-one__option--selected:hover{background-color:var(--fill-color-alt-1)}.select-one__footer{display:flex;margin-top:2rem}.select-one__confirm{margin-right:.6666666667rem}.number-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;width:100%}.number-field:focus{border-color:var(--fill-color-alt-2)}.number-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.time-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;width:100%}.time-field:focus{border-color:var(--fill-color-alt-2)}.time-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.text-literal__link{text-decoration:underline}.text-literal--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.tags-field__wrap{align-items:center;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:flex;padding:.6666666667rem;position:relative;width:100%}.tags-field__input{flex-grow:1}.tags-field__browse{position:absolute;right:0}.tags-field__input-field{border:0;padding-left:.5rem;width:100%}.tags-field__autosuggest{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:100%;width:100%;z-index:1}.tags-field__autosuggestion{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem .6666666667rem .6666666667rem 1rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.tags-field__autosuggestion:last-child{margin-bottom:0}.tags-field__autosuggestion:hover{background-color:var(--fill-color)}.link{border-bottom:1px solid var(--primary-color);color:var(--primary-color);cursor:pointer;line-height:1;white-space:nowrap}.link:hover{border-bottom:none}.link--alt{border-bottom:1px solid var(--fill-color-alt-3);color:var(--fill-color-alt-3)}.link--disabled{color:var(--fill-color-alt-2);cursor:default}.link--disabled,.link--disabled:hover{border-bottom:1px solid var(--fill-color-alt-2)}.text-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;resize:vertical;width:100%}.text-field:focus{border-color:var(--fill-color-alt-2)}.text-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.file-select-field{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);cursor:pointer;display:block;padding:1rem;position:relative;width:100%}.file-select-field--small{max-width:300px}.file-select-field:after{background-color:hsla(0,0%,100%,.2);bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .25s}.file-select-field:hover{border-color:var(--fill-color-alt-2)}.file-select-field:hover:after{opacity:1}.file-select-field__icon{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;opacity:0;position:absolute;right:0;top:0;z-index:1}.file-select-field__selected-file{width:100%}.card{border:1px solid #e8e8f1;border-radius:var(--border-radius);display:flex;flex-direction:column;flex-grow:1}.card__photo{background-position:50%;background-size:cover;border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);height:0;overflow:hidden;padding-top:66.66%;position:relative;width:100%}.card__photo:after{background-color:hsla(228,4%,50%,.1);background-image:linear-gradient(180deg,rgba(0,0,0,.6),transparent 75%);content:"";display:block;height:100%;position:absolute;top:0;width:100%}.card__main{padding:1.3333333333rem 1.3333333333rem 1rem}.card__label{background-color:rgba(0,0,0,.5);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.25rem .6666666667rem;right:.6666666667rem}.card__boolean,.card__label{position:absolute;top:.5rem;z-index:1}.card__boolean{left:1rem}.card__title{color:#000;font-size:1.15rem;font-weight:700;line-height:1.35}.card__subtitle,.card__title{font-family:Poppins,sans-serif;text-transform:none}.card__subtitle{color:#7b7d85;font-size:1rem;font-weight:500;line-height:1;line-height:1.25;margin-top:.3333333333rem}.card__content{margin-top:1.1428571429rem}.card__component{margin-bottom:.6666666667rem}.card__component:last-child{margin-bottom:0}.card__footer{border-top:1px solid #e8e8f1;display:flex;gap:.6666666667rem;margin-top:auto;padding:.6666666667rem 1.3333333333rem}.text-to-slug-field__slug{margin-top:.6666666667rem}.text-to-slug-field__slug-prefix{color:#7b7d85}.text-to-slug-field__slug-slug{color:#7b7d85;cursor:pointer;text-decoration:underline}.text-to-slug-field__slug-slug:hover{color:#464646}.text-to-slug-field__slug-placeholder{color:#e8e8f1}.text-view{align-items:center;display:flex}.text-view__label{flex-grow:0;margin-right:2rem;opacity:.75;width:25%}.text-view__value{align-items:center;display:inline-flex;flex-grow:1;width:75%}.text-view__url{text-decoration:underline}.text-view__copy{margin-left:.4rem}.text-view--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.enum-field{padding:.5rem}.enum-field,.enum-field2{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;width:100%}.enum-field2{background-color:#fff;padding:.6666666667rem}.enum-switch-field__content{margin-top:2rem}.enum-switch-field__component{margin-bottom:2rem}.enum-switch-field__component:last-child{margin-bottom:0}.boolean-view{background-color:var(--fill-color-alt-2);border-radius:100%;display:block;height:.6666666667rem;margin-top:.5rem;transition:background-color .25s;width:.6666666667rem}.boolean-view--checked{background-color:#67bd1d;color:#fff}.button-field{align-items:center;display:flex;gap:.6666666667rem;justify-content:flex-start}.button-field__wrap{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:inline-block;padding:.5rem}.button-field__entry{align-items:center;display:flex}.button-field__button{background-color:var(--fill-color-alt-1);border-radius:2rem;display:inline-block;padding:.3333333333rem 1rem}.button-field__url{color:var(--fill-color-alt-3);font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;margin-top:.6666666667rem;text-decoration:underline}.action-component__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.action-component__header-components{display:flex}.action-component__header-component{align-items:center;display:flex;margin-left:.6666666667rem}.action-component__header-component:first-child{margin-left:0}.section{background-color:var(--fill-color);border-radius:var(--border-radius)}.section__content{padding:1rem}.section--closed .section__content{display:none}.section__component{margin-bottom:2rem}.section__component:last-child{margin-bottom:0}.section__header{display:flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;justify-content:space-between;line-height:1;padding:1rem;text-transform:none}.section__collapse-button{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.section__collapse-button:after{border-left:.4rem solid transparent;border-right:.4rem solid transparent;border-top:.4rem solid var(--fill-color-alt-2);content:"";display:block;height:0;opacity:.5;transform:rotate(180deg);transition:opacity .25s;width:0}.section--closed .section__collapse-button:after{opacity:1;transform:none}.stack{grid-gap:2rem;display:grid}.stack--horizontal{grid-template-columns:repeat(2,1fr)}.stack--gapless{grid-gap:0}.tabs__nav{border-bottom:1px solid var(--fill-color-alt-1);display:flex;justify-content:flex-start}.tabs__content{padding-top:2rem}.tabs__component{margin-bottom:2rem}.tabs__component:last-child{margin-bottom:0}.tabs__nav-item{color:#000;cursor:pointer;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;margin-right:2rem;padding:.6666666667rem 0;position:relative;text-transform:none}.tabs__nav-item:last-child{margin-right:0}.tabs__nav-item--active{color:var(--primary-color)}.tabs__nav-item--active:after{background-color:var(--primary-color);bottom:-1px;content:"";height:1px;left:0;position:absolute;right:0}.custom-number__icon{display:flex;margin-bottom:2rem}.custom-number__title{color:#7b7d85;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;line-height:1;text-transform:none}.custom-number--medium{font-size:1.75rem;font-weight:500}.custom-number--large,.custom-number--medium{color:#000;font-family:Poppins,sans-serif;letter-spacing:-.02em;line-height:1.5}.custom-number--large{font-size:2.75rem;font-weight:900}.color-view{background-color:#dfe0e2;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;height:3rem;width:3rem}.color-field{position:relative}.color-field__color{background-color:#f8f8fb;border:1px solid #e8e8f1;border-radius:var(--border-radius);display:block;padding:.6666666667rem;transition:background-color .5s;width:100%}.color-field__input{bottom:0;cursor:pointer;display:block;height:100%;left:0;opacity:0;position:absolute;right:0;top:0;width:100%}.file-upload{background-color:#f2f5f7;border-radius:var(--border-radius);display:block;padding:1rem 2rem;text-align:center}.translatable{display:block;width:100%}.translatable__tabs{display:flex;gap:.5rem;justify-content:flex-end;padding-right:.6666666667rem}.translatable__components{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:none;padding:1.3333333333rem .6666666667rem .6666666667rem}.translatable__components--active{display:block}.translatable__component{margin-bottom:2rem}.translatable__component:last-child{margin-bottom:0}.translatable__button{border-radius:var(--border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--fill-color-alt-3);cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;margin-bottom:-1px;padding:.3333333333rem .5rem;text-transform:uppercase;transition:color .25s,background-color .25s}.translatable__button--active{border:1px solid var(--fill-color-alt-1);border-bottom:1px solid #fff;color:var(--primary-color)}.translatable__button:hover{color:var(--primary-color)}.image-upload{position:relative}.image-upload__thumbnail{border:1px solid #dfe0e2;border-radius:var(--border-radius);padding:.5rem;position:relative}.image-upload__thumbnail img{display:block;width:100%}.image-upload__placeholder{position:relative}.image-upload__input{border:0;cursor:pointer;display:block;height:100%;left:0;opacity:0;position:absolute;right:0;top:0;width:100%}.image-upload__options{background-color:rgba(232,232,241,.85);border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);bottom:0;display:none;justify-content:flex-end;left:0;padding:1rem 2rem;position:absolute;right:0}.image-upload:hover .image-upload__options{display:flex}.image-upload:hover .image-upload__thumbnail{border-color:#e8e8f1}.date-time-field,.image-view img{display:block;width:100%}.date-time-field{border:1px solid #dfe0e2;border-radius:var(--border-radius);padding:.5rem}.date-time-field:focus{border-color:#e8e8f1}.date-field{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.date-field:focus{border-color:#e8e8f1}.belongs-to-field{display:flex;flex-wrap:wrap}.belongs-to-field__field{flex-grow:1}.belongs-to-field__select{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.thumbnail{background-color:#f2f5f7;border-radius:var(--border-radius);height:5rem;overflow:hidden;width:5rem}.thumbnail img{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.thumb-component{background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;height:3.5rem;overflow:hidden;width:3.5rem}.richtext-field trix-editor strong{font-weight:700}.richtext-field trix-editor em{font-style:italic}.richtext-field trix-editor sup{font-size:.85em;vertical-align:super}.richtext-field trix-editor blockquote,.richtext-field trix-editor div,.richtext-field trix-editor ol,.richtext-field trix-editor pre,.richtext-field trix-editor ul{border:1px dashed #dfe0e2;margin-bottom:.5rem;padding:.5rem}.richtext-field trix-editor blockquote:last-child,.richtext-field trix-editor div:last-child,.richtext-field trix-editor ol:last-child,.richtext-field trix-editor pre:last-child,.richtext-field trix-editor ul:last-child{margin-bottom:0}.richtext-field trix-editor blockquote{text-align:center}.richtext-field trix-editor ol li,.richtext-field trix-editor ul li{list-style:square;margin-left:1rem;padding-left:1rem}.richtext-field trix-editor ol li{list-style-type:decimal}.richtext-field trix-editor h1{border:1px dashed #dfe0e2;font-size:1.25rem;font-weight:700;margin-bottom:.5rem;padding:.5rem}.richtext-field trix-editor h1:last-child{margin-bottom:0}.richtext-field trix-editor a{text-decoration:underline}.content-blocks__footer{margin-top:1rem}.content-blocks__item{margin-bottom:.5rem}.content-blocks__item:last-child{margin-bottom:0}.gallery-field{container-type:inline-size;position:relative}.gallery-field__content{margin-top:1rem}.gallery-field__grid{grid-gap:1rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.gallery-field__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 650px){.gallery-field__grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 1000px){.gallery-field__grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 1100px){.gallery-field__grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 1280px){.gallery-field__grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1400px){.gallery-field__grid{grid-template-columns:repeat(7,minmax(0,1fr))}}.gallery-field__item{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:.5rem;position:relative}.gallery-field__item:hover .gallery-field__item-actions{opacity:1}.gallery-field__item:hover .gallery-field__item-overlay{opacity:.9}.gallery-field__item-overlay{background-color:var(--fill-color)}.gallery-field__item-actions,.gallery-field__item-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .2s}.gallery-field__item-actions{align-items:center;justify-content:center}.gallery-field__item-delete{padding:.6666666667rem;position:absolute;right:0;top:0}.gallery-field__item-order{bottom:0;display:flex;gap:.3333333333rem;left:0;padding:.6666666667rem;position:absolute;right:0}.many-to-many-field{position:relative}.many-to-many-field__content{margin-top:1rem}.many-to-many-field__list{display:flex;flex-direction:column;gap:.5rem}.many-to-many-select-field{display:flex;flex-wrap:wrap}.many-to-many-select-field__field{flex-grow:1;margin-right:.6666666667rem}.many-to-many-select-field__btn{flex-grow:0}.many-to-many-select-field__select{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.many-to-many-select-field__create{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;max-height:80vh;padding:.6666666667rem;width:60vw}.many-to-many-select-field__create-header{align-items:center;display:flex;padding:1rem 2rem}.many-to-many-select-field__create-header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.many-to-many-select-field__create-header-options{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.many-to-many-select-field__create-header-options>*{margin-left:.6666666667rem}.many-to-many-select-field__create-header-options>:first-child{margin-left:0}.many-to-many-select-field__create-content{flex-grow:1;overflow-y:scroll;padding:1rem 2rem}.json-field__item{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);display:flex;margin-bottom:.6666666667rem;padding:.5rem}.json-field__item:last-child{margin-bottom:0}.json-field__item-content{flex-grow:1;margin-right:.6666666667rem}.json-field__item-actions{align-items:center;display:flex;gap:.6666666667rem}.json-field__component{margin-bottom:1rem}.json-field__component:last-child{margin-bottom:0}.json-field__footer{margin-top:.6666666667rem}.manual-order-controls{display:flex;gap:.5rem}.inline-frame,.inline-frame iframe{display:block;width:100%}.inline-frame iframe{border:0} +html{font-size:62.5%}*{box-sizing:border-box;font-size:100%;font-style:inherit;margin:0;padding:0}*,a{font-weight:inherit}a{color:inherit;text-decoration:none}a img{border:0}li{list-style:none}button,fieldset{border:0}button{background:transparent;text-align:left}:focus{outline:none}button,input,textarea{font:inherit}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:85%;overflow-y:scroll}body{background-color:#fff;color:#464646;font-family:Poppins,sans-serif}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 30px #fff!important}input:-webkit-autofill{-webkit-text-fill-color:var(--primary-color)!important}*{-webkit-tap-highlight-color:transparent}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-thumb{background:var(--fill-color-alt-2);border:2px solid #fff;border-radius:var(--border-radius)}::-webkit-scrollbar-thumb:hover{background:var(--primary-color)}::-moz-selection{background:var(--primary-color);color:#fff}::selection{background:var(--primary-color);color:#fff}@keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes slidein{0%{opacity:0;transform:translateY(100%)}}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulseup{0%{opacity:0;transform:translateY(.6666666667rem)}50%{opacity:1}to{opacity:0;transform:translateY(-.6666666667rem)}}.cmf:before{background-color:#fff;border:1px solid var(--fill-color);border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);height:4rem;margin-left:-2rem;margin-top:-2rem;transform:scale(.25);transition:transform .2s,opacity .1s;width:4rem}.cmf:after,.cmf:before{content:"";display:block;left:50%;opacity:0;pointer-events:none;position:fixed;top:3rem;z-index:9999}.cmf:after{border:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;box-sizing:border-box;height:1.3333333333rem;margin-left:-.6666666667rem;margin-top:-.6666666667rem;width:1.3333333333rem}body.api-loading .cmf:before{opacity:1;transform:scale(1);transition-delay:.2s}body.api-loading .cmf:after{animation:spin .5s linear infinite both;opacity:1;transition:opacity .2s;transition-delay:.2s}.cmf__header{border-bottom:1px solid var(--fill-color-alt-1);justify-content:space-between;width:100%}.cmf__header,.cmf__logo{align-items:center;display:flex}.cmf__logo{cursor:pointer;height:100%;padding:1rem;width:250px}.cmf__user{padding-right:1rem}@media screen and (min-width:900px){.cmf__user{padding-right:2rem}}.cmf__main{display:flex;min-height:100vh;padding-top:1rem}.cmf__nav{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:10rem;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;flex-shrink:0;left:50%;margin-left:-37.5vw;max-height:50vh;opacity:0;overflow-y:scroll;padding:1rem;pointer-events:none;position:fixed;transform:scale(.9) translateY(30%);width:74vw;z-index:9999}.cmf__nav,body.open-nav .cmf__nav{transition:opacity .25s,transform .25s}body.open-nav .cmf__nav{opacity:1;pointer-events:all;transform:none}@media screen and (min-width:900px){.cmf__nav{border:0;border-radius:0;box-shadow:none;margin-left:0;max-height:none;opacity:1;overflow-y:auto;padding:0 0 2rem 1rem;pointer-events:all;position:static;transform:none;width:250px;z-index:auto}}.cmf__nav-trigger{align-items:center;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:50%;bottom:2rem;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);cursor:pointer;display:flex;height:6rem;justify-content:center;left:50%;margin-left:-3rem;position:fixed;width:6rem}@media screen and (min-width:900px){.cmf__nav-trigger{display:none}}.cmf__content{flex-grow:1}.cmf__module{padding:1rem 0}@media screen and (min-width:900px){.cmf__module{padding:0 0 2rem}}.cmf__footer{padding-bottom:1rem}.logo,.logo__emblem{align-items:center;display:flex}.logo__emblem{background-color:var(--primary-color);border-radius:var(--border-radius);color:var(--fill-color);font-size:1.5rem;font-weight:900;height:3rem;justify-content:center;letter-spacing:-.02em;line-height:1.5;width:3rem}.logo__emblem,.logo__name{font-family:Poppins,sans-serif}.logo__name{color:var(--primary-color-alt-3);font-size:1rem;font-weight:500;line-height:1;margin-left:1rem;text-transform:none}.logo__name span{color:#000}.user-panel,.user-panel__avatar{align-items:center;display:flex}.user-panel__avatar{background-color:var(--fill-color-alt-1);border-radius:50%;height:2.5rem;justify-content:center;margin-right:1rem;overflow:hidden;width:2.5rem}.user-panel__avatar img{display:block;height:2.5rem;width:2.5rem}.user-panel__name{color:#000;margin-right:1rem}.user-panel__logout{margin-top:.6666666667rem}.nav__subnav{display:none}.nav__subnav--open{display:block}.nav-item{align-items:center;border-radius:var(--border-radius);color:#000;cursor:pointer;display:flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;padding:.5rem 1rem;transition:color .25s,background-color .5s;width:100%}.nav-item--active,.nav-item:hover{background-color:var(--fill-color-alt-1)}.nav-item__icon{margin-right:1rem;transition:opacity .25s}.subnav-item{align-items:center;border-radius:var(--border-radius);color:#000;cursor:pointer;display:flex;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.3333333333rem 1rem;transition:color .25s;width:100%}.subnav-item--active{color:var(--primary-color)}.subnav-item__icon{margin-right:1rem;opacity:0;transition:opacity .25s}.page{display:flex;flex-direction:column;min-height:100vh}.page:before{background-color:#fff;border:1px solid var(--fill-color);border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);height:4rem;margin-left:-2rem;margin-top:-2rem;transform:scale(.25);transition:transform .2s,opacity .1s;width:4rem}.page:after,.page:before{content:"";display:block;left:50%;opacity:0;pointer-events:none;position:fixed;top:3rem;z-index:9999}.page:after{border:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;box-sizing:border-box;height:1.3333333333rem;margin-left:-.6666666667rem;margin-top:-.6666666667rem;width:1.3333333333rem}body.api-loading .page:before{opacity:1;transform:scale(1);transition-delay:.2s}body.api-loading .page:after{animation:spin .5s linear infinite both;opacity:1;transition:opacity .2s;transition-delay:.2s}@media screen and (min-width:900px){.page{flex-direction:row}}.page__visual{align-items:flex-start;background-color:#fff;background-image:var(--theme-image-src);background-position:50%;background-size:cover;color:#fff;display:flex;flex-direction:column;justify-content:flex-start;min-height:40vh;padding:2rem;position:relative;width:100%;z-index:1}@media screen and (min-width:900px){.page__visual{min-height:100vh;padding-left:10%;padding-right:15%;padding-top:58vh;width:65%}}.page__visual:after{background-image:linear-gradient(120deg,var(--primary-color-alt-3) 0,transparent 100%);content:"";display:block;height:100%;opacity:.75;position:absolute;right:0;top:0;width:100%;z-index:-1}.page__content{align-items:flex-start;display:flex;flex-direction:column;justify-content:space-between;padding:2rem;position:relative}@media screen and (min-width:900px){.page__content{min-height:100vh;padding:58vh 5% 2rem;width:35%}}.page__logo{margin-bottom:4rem;position:static}@media screen and (min-width:900px){.page__logo{margin-bottom:0;position:absolute;top:5%}}.page__box{width:100%}.page__footer{margin-top:4rem}.module__header{display:flex;justify-content:space-between;margin-bottom:1rem;padding:0 2rem}.module__header-components{display:flex}.module__header-component{align-items:center;display:flex;margin-left:.6666666667rem}.module__header-component:first-child{margin-left:0}.module__main{padding:0 .6666666667rem}@media screen and (min-width:900px){.module__main{padding:0 2rem}}.index-row{display:flex;flex-grow:1;padding:1rem 2rem;transition:background-color .25s}.index-row:hover{background-color:var(--fill-color)}.index-row--selected,.index-row--selected:hover{background-color:var(--fill-color-alt-1)}.index-row--clickable{cursor:pointer}.index-row--grid{padding:0}.index-row__checkbox{align-items:center;display:flex;margin-right:1rem}.index-row__content{grid-gap:1rem;display:grid;flex-grow:1}.index-row__actions{align-items:center;display:flex;gap:1rem}.index-row__component{display:flex}.window{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);max-width:450px;padding:0 .6666666667rem .6666666667rem}.window--modal{left:50%;max-width:none;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);width:60vw;z-index:9999}.window--wide{width:80vw}.window--fixed-size{max-width:none}.window__header{align-items:center;display:flex;height:6rem;justify-content:space-between;padding:1rem 1rem 1rem 2rem}.window__title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.window__actions,.window__title{align-items:center;display:flex;gap:1rem}.window__toolbar{display:block;padding:0 2rem 1rem}.window__content{display:block;margin-bottom:1rem;padding:0 2rem}.window--modal .window__content{margin-bottom:0;max-height:calc(75vh - 12rem);overflow-y:scroll;padding-bottom:1rem}.window--wide .window__content{height:calc(75vh - 12rem)}.window--fixed-size .window__content{height:500px;margin-bottom:0;overflow-y:scroll;width:500px}.window__footer{align-items:flex-end;display:flex;gap:1rem;height:6rem;justify-content:flex-end;padding:1rem 2rem}.window--fixed-size .window__footer{padding:.5rem 2rem}.divider{background-color:var(--fill-color-alt-1);border:0;height:1px;margin:.5rem 0}.hero{color:#fff;font-family:Poppins,sans-serif;font-size:3rem;font-weight:700;letter-spacing:-.02em;line-height:1}@media screen and (min-width:900px){.hero{font-family:Poppins,sans-serif;font-size:5rem;font-weight:700;letter-spacing:-.02em;line-height:1}}.title{color:#000;font-size:2.75rem;font-weight:900;letter-spacing:-.02em;line-height:1.5}.title,.title--small{font-family:Poppins,sans-serif}.title--small{font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.dropdown{display:inline-block;position:relative}.dropdown__button{-webkit-appearance:none;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 2.5rem .5rem 1.3333333333rem;position:relative;transition:background-color .25s}.dropdown__button:hover{background-color:var(--fill-color-alt-2)}.dropdown--primary .dropdown__button{background-color:var(--primary-color);color:#fff}.dropdown--primary .dropdown__button:hover{background-color:var(--primary-color-alt-1)}.dropdown--small .dropdown__button{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.6666666667rem 2.5rem .6666666667rem 1.3333333333rem}.dropdown__label{color:#7b7d85;margin-right:.6666666667rem}.dropdown__icon{align-items:center;display:flex;height:2rem;justify-content:center;margin-top:-1rem;opacity:.65;pointer-events:none;position:absolute;right:.5rem;top:50%;width:2rem}.dropdown__content{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:none;margin-top:.6666666667rem;max-height:45vh;overflow-y:auto;padding:.6666666667rem;position:absolute;right:0;width:20rem;z-index:9999}.dropdown--left .dropdown__content{right:0}.dropdown--right .dropdown__content{left:0;right:auto}.dropdown--up .dropdown__content{margin-top:0;top:-.6666666667rem;transform:translateY(-100%)}.dropdown--open .dropdown__content,.icon{display:block}.icon{word-wrap:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga";direction:ltr;font-family:Material Icons Outlined;font-size:20px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1;text-rendering:optimizeLegibility;text-transform:none;white-space:nowrap}.icon--mini{font-size:14px}.icon--small{font-size:18px}.icon--alt{color:var(--primary-color)}.icon--soft{opacity:.75}.icon--medium{font-size:30px}.icon--large{font-size:40px}.icon--extra-large{font-size:75px}.icon--placeholder{color:var(--fill-color-alt-1);font-size:60px}.icon--clickable{color:#000;opacity:.5;transition:opacity .25s}.icon--clickable:hover{opacity:1}.form,.form__content{position:relative}.form__content{align-items:flex-start;display:flex;width:100%}.form__inputs{flex:1}.form__sidebar{background-color:var(--fill-color);margin-left:2rem;padding:2rem 1rem;position:sticky;top:1rem;width:375px}.form__sidebar-save{margin-bottom:2rem}.form__sidebar-input{border-bottom:1px solid var(--fill-color-alt-1);margin-bottom:.6666666667rem;padding-bottom:.6666666667rem}.form__sidebar-input:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}.form__input{margin-bottom:2rem}.form__input:last-child{margin-bottom:0}.form__footer{display:flex;justify-content:flex-end;margin-top:2rem}.form--submitting:after{background-color:hsla(0,0%,100%,.5);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}.field{display:block;width:100%}.field__header{align-items:center;display:flex;justify-content:flex-start;margin-bottom:.5rem}.field__label{display:block}.field--has-error .field__label{color:var(--primary-color-alt-1)}.field__tooltip{margin-left:.5rem}.field__error{background-color:var(--primary-color-alt-1);border-radius:var(--border-radius);color:#fff;display:inline-block;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:1.25;margin-top:.6666666667rem;padding:.3333333333rem .6666666667rem}.label,.label--primary{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;text-transform:uppercase}.notification{animation:slidein .25s;background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;display:block;margin-bottom:.6666666667rem;opacity:.9;padding:1rem 2rem;transition:transform .25s,opacity .25s}.notification:last-child{margin-bottom:0}.notification--hidden{opacity:0;pointer-events:none;transform:translateY(100%)}.notification-stack{bottom:2rem;display:block;pointer-events:none;position:fixed;right:2rem;width:20rem;z-index:9999}.pagination{gap:1rem;width:100%}.pagination,.pagination__status{align-items:center;display:flex;justify-content:center}.pagination__status{gap:.6666666667rem;text-align:center}.pagination__controls,.pagination__next,.pagination__prev{display:flex;gap:.5rem}.search{display:block;position:relative}.search__icon{align-items:center;display:flex;height:2rem;justify-content:center;left:.6666666667rem;margin-top:-1rem;pointer-events:none;position:absolute;top:50%;width:2rem;z-index:2}.search__input{-webkit-appearance:none;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 1.3333333333rem .5rem 3rem;position:relative;transition:background-color .25s;width:100%;z-index:1}.search__input:focus{border-color:var(--fill-color-alt-2)}.search__clear{align-items:center;display:flex;height:2rem;justify-content:center;margin-top:-1rem;opacity:0;pointer-events:none;position:absolute;right:.6666666667rem;top:50%;transition:opacity .25s;width:2rem;z-index:2}.search--searching .search__clear{opacity:1;pointer-events:all}.placeholder{border:1px dashed var(--fill-color-alt-1);border-radius:var(--border-radius);display:flex;flex-direction:column;justify-content:center;padding:2rem .5rem;text-align:center;width:100%}.placeholder__icon{display:block}.placeholder__text{color:#7b7d85;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.placeholder__button{margin-top:1rem}.placeholder--clickable{cursor:pointer}.placeholder--clickable:hover{border-color:var(--fill-color-alt-2)}.wizard{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;width:100%}.wizard__nav{border-bottom:1px solid var(--fill-color-alt-1);display:flex;justify-content:center;padding:2rem 0;width:100%}.wizard__steps{display:flex}.wizard__step{align-items:center;color:var(--fill-color-alt-2);display:flex;flex-direction:column;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5;padding:0 4rem;position:relative}.wizard__step:after{background-color:var(--fill-color-alt-2);content:"";display:block;height:1px;left:0;position:absolute;right:0;top:1.5rem}.wizard__step:first-child:after{left:50%}.wizard__step:last-child:after{right:50%}.wizard__step span{align-items:center;background-color:var(--fill-color-alt-2);border:1px solid var(--fill-color-alt-2);border-radius:50%;color:#fff;content:"";display:flex;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;height:3rem;justify-content:center;line-height:1.35;margin-bottom:.6666666667rem;position:relative;text-transform:none;transition:background-color .25s;width:3rem;z-index:1}.wizard__step--active{color:var(--primary-color)}.wizard__step--active span{border-color:var(--primary-color)}.wizard__step--active span,.wizard__step--active:after{background-color:var(--primary-color)}.wizard__content{padding:4rem 20% 2rem}.wizard__component{margin-bottom:2rem}.wizard__component:last-child{margin-bottom:0}.wizard__footer{display:flex;justify-content:flex-end;padding:2rem}.wizard__footer-component{align-items:center;display:flex;margin-left:1rem}.wizard__footer-component:first-child{margin-left:0}.select-list__option{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-list__option:last-child{margin-bottom:0}.select-list__option:hover{background-color:var(--fill-color)}.select-list__option--selected,.select-list__option--selected:hover{background-color:var(--fill-color-alt-1)}.select-list__option-icon{align-items:center;display:flex;justify-content:center;margin-right:.6666666667rem;pointer-events:none}.link-list__button{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem .6666666667rem .6666666667rem 1rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.link-list--warning .link-list__button{color:#b61313}.link-list__button:last-child{margin-bottom:0}.link-list__button:hover{background-color:var(--fill-color)}.directory{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;padding:1rem;transition:background-color .25s}.directory--compact-list{padding:.6666666667rem .5rem}.directory--grid{align-items:center;border:1px solid var(--fill-color-alt-1);flex-direction:column}.directory--grid:hover{border-color:var(--fill-color-alt-2)}.directory:hover{background-color:var(--fill-color)}.directory__icon{align-items:center;display:flex;flex-grow:0;flex-shrink:0;justify-content:center;margin-right:1rem;width:4rem}.directory--compact-list .directory__icon{width:2rem}.directory--grid .directory__icon{flex-grow:1;margin-bottom:1rem;margin-right:0;order:2;width:100%}.directory__content{grid-gap:.6666666667rem;display:grid;flex-grow:1;grid-template-columns:repeat(3,33.33%)}.directory--grid .directory__content{display:block;order:3;width:100%}.directory__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.directory--grid .directory__name{text-align:center}.directory__type{color:#7b7d85;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.directory--grid .directory__type{display:none}.file{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;flex-grow:1;justify-content:flex-start;padding:.6666666667rem 1rem;transition:background-color .25s}.file--compact-list{padding:.6666666667rem .5rem}.file--grid{align-items:flex-start;border:1px solid var(--fill-color-alt-1);flex-direction:column}.file--grid:hover{border-color:var(--fill-color-alt-2)}.file:hover{background-color:var(--fill-color)}.file--selected{border-color:var(--fill-color-alt-2)}.file--selected,.file--selected:hover{background-color:var(--fill-color-alt-1)}.file__preview{align-items:center;display:flex;flex-grow:0;justify-content:center;margin-right:1rem;width:4rem}.file--compact-list .file__preview{width:2rem}.file--grid .file__preview{flex-grow:1;margin-bottom:1rem;margin-right:0;order:2;width:100%}.file__content{grid-gap:.6666666667rem;display:grid;flex-grow:1;grid-template-columns:repeat(3,33.33%)}.file--grid .file__content{display:block;order:3;width:100%}.file--minimal .file__content{display:block;overflow:hidden;width:100%}.file__checkbox{flex-grow:0;margin-right:1rem}.file--compact-list .file__checkbox{display:none}.file--grid .file__checkbox{background-color:var(--fill-color);border:1px solid var(--fill-color-alt-1);border-bottom-right-radius:var(--border-radius);border-top-left-radius:var(--border-radius);left:0;margin-right:0;position:absolute;top:0;z-index:1}.file__actions{flex-grow:0}.file__name,.file__type{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file__type{color:#7b7d85}.file--grid .file__type,.file--minimal .file__type{display:none}.file__size{color:#7b7d85;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file--minimal .file__size{display:none}.file__label{top:50%;transform:translateY(-50%)}.file--grid .file__label,.file__label{position:absolute;right:1.3333333333rem}.file--grid .file__label{top:1rem;transform:none}.item{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;justify-content:flex-start;padding:.6666666667rem 1rem;transition:background-color .25s}.item:hover{background-color:var(--fill-color)}.item--selected,.item--selected:hover{background-color:var(--fill-color-alt-1)}.item__content{flex-grow:1;padding:1rem}.item__row{grid-gap:1rem;display:grid}.item__checkbox{flex-grow:0;margin-right:1rem}.item__actions{flex-grow:0}.item__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1}.overlay{align-items:center;background-color:var(--fill-color);bottom:0;display:flex;justify-content:center;left:0;opacity:.75;position:fixed;right:0;top:0;z-index:9998}.confirm{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:50%;max-width:450px;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);z-index:9999}.confirm__header{display:block;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}.confirm__content{display:block;margin-bottom:1rem;padding:0 2rem}.confirm__footer{display:flex;gap:1rem;justify-content:flex-end;padding:1rem 2rem}.prompt{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:50%;max-width:450px;min-width:400px;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);z-index:9999}.prompt__header{display:block;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}.prompt__content{display:block;padding:0 2rem}.prompt__content,.prompt__text{margin-bottom:1rem}.prompt__input{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;resize:vertical;width:100%}.prompt__input:focus{border-color:var(--fill-color-alt-2)}.prompt__footer{display:flex;justify-content:flex-end;padding:1rem 2rem}.prompt__footer>*{margin-left:1rem}.prompt__footer>:first-child{margin-left:0}.directory-list{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.directory-list--grid{grid-gap:.6666666667rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.directory-list--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 450px){.directory-list--grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 650px){.directory-list--grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 800px){.directory-list--grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 900px){.directory-list--grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1000px){.directory-list--grid{grid-template-columns:repeat(7,minmax(0,1fr))}}@container (min-width: 1280px){.directory-list--grid{grid-template-columns:repeat(8,minmax(0,1fr))}}.directory-list__item{margin-bottom:1px}.directory-list__item:last-child{margin-bottom:0}.file-list{-webkit-user-select:none;-moz-user-select:none;user-select:none}.file-list--grid{grid-gap:.6666666667rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.file-list--grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 450px){.file-list--grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 650px){.file-list--grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 800px){.file-list--grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 900px){.file-list--grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1000px){.file-list--grid{grid-template-columns:repeat(7,minmax(0,1fr))}}@container (min-width: 1280px){.file-list--grid{grid-template-columns:repeat(8,minmax(0,1fr))}}.file-list__item{margin-bottom:1px}.file-list__item:last-child{margin-bottom:0}.thumb{background-color:var(--fill-color-alt-1);height:0;padding-top:100%;position:relative;width:100%}.thumb:before{animation:spin .25s linear infinite;border-bottom:2px solid transparent;border-left:2px solid var(--primary-color);border-radius:50%;border-right:2px solid transparent;border-top:2px solid var(--primary-color);box-sizing:border-box;content:"";display:block;height:1.3333333333rem;left:50%;margin-left:-.6666666667rem;margin-top:-.6666666667rem;position:absolute;top:50%;width:1.3333333333rem;z-index:9999}.thumb--loaded{height:auto;padding-top:0}.thumb--loaded:before{display:none}.thumb__img{display:block;opacity:0;transition:opacity .25s;width:100%}.thumb--loaded .thumb__img{opacity:1}.file-preview{border-radius:var(--border-radius);display:block;height:3.5rem;overflow:hidden;width:3.5rem}.file-preview--compact-list{height:1.75rem;width:1.75rem}.file-preview__textual{align-items:center;background-color:#fff;border:1px solid var(--color);border-radius:var(--border-radius);color:var(--color);display:flex;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;height:3.5rem;justify-content:center;line-height:1;overflow:hidden;position:relative;text-transform:uppercase;width:3.5rem}.file-preview--compact-list .file-preview__textual{font-size:.5rem;height:1.75rem;width:1.75rem}.file-preview--grid .file-preview__textual{padding-top:100%}.file-preview--grid .file-preview__textual span{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;text-align:center;top:0}.file-preview__textual:after{background-color:var(--color);bottom:0;content:"";left:0;opacity:.1;position:absolute;right:0;top:0}.file-preview--full .file-preview__textual{width:100%}.file-preview--full{height:auto;width:100%}.file-view{padding:1rem}.file-view__content,.file-view__header,.file-view__preview{margin-bottom:2rem}.file-view__actions{display:flex;flex-direction:column;gap:.5rem}.file-view__footer{margin-top:1rem}.multi-file-view{padding:1rem}.multi-file-view__header{margin-bottom:.5rem}.multi-file-view__content{margin-bottom:2rem}.multi-file-view__actions{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.multi-file-view__footer{margin-top:1rem}.file-picker-widget{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;height:80vh;left:50%;padding:.6666666667rem;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%);width:80vw;z-index:9999}.file-picker-widget__header{align-items:center;display:flex;padding:1rem 2rem}.file-picker-widget__header,.file-picker-widget__header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.file-picker-widget__header-options{align-items:center;display:flex;flex-grow:1;gap:.6666666667rem;justify-content:flex-end}.file-picker-widget__content{display:flex;flex-grow:1;overflow-y:scroll}.file-picker-widget__footer{align-items:center;display:flex;gap:.6666666667rem;justify-content:flex-end;padding:1rem 2rem}.file-picker-widget__main{width:75%}.file-picker-widget__side{padding-top:2rem;position:sticky;top:0;width:25%}.file-picker-widget__selection{background-color:var(--fill-color);border-radius:var(--border-radius);padding-top:1rem}.file-picker-widget__selection-header{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;margin-bottom:1rem;padding-left:1rem;text-transform:uppercase}.file-picker-widget__file{position:relative}.item-picker-widget__footer{align-items:center;display:flex;gap:1rem;justify-content:flex-end;width:100%}.item-picker-widget__footer-pagination{width:75%}.item-picker-widget__footer-actions{display:flex;gap:1rem;height:100%;justify-content:flex-end;width:25%}.item-picker-widget__row{margin-bottom:1px}.item-picker-widget__row:last-child{margin-bottom:0}.item-picker-widget__selection-header{font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;line-height:1;margin-bottom:1rem;padding-left:1rem;text-transform:uppercase}.icon-button{align-items:center;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#464646;cursor:pointer;display:flex;height:2.3rem;justify-content:center;padding:.5rem 1.3333333333rem;transition:background-color .25s;width:2rem}.icon-button--active,.icon-button:hover{background-color:var(--fill-color-alt-2)}.icon-button--grouped{border-radius:0}.icon-button--transparent,.icon-button--transparent:hover{background-color:transparent}.icon-button--disabled{cursor:default;opacity:.2}.file-thumb__preview{margin-bottom:1rem}.file-thumb__name{color:#7b7d85;line-height:1;line-height:2;margin-bottom:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.definition-list,.file-thumb__name{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500}.definition-list{line-height:1;line-height:1.2}.definition-list__item{display:flex;margin-bottom:.5714285714rem;position:relative;transition:opacity .1s}.definition-list__item--editable{cursor:pointer}.definition-list__item--editable:hover{opacity:.75}.definition-list__item:last-child{margin-bottom:0}.definition-list__key{color:#7b7d85;display:block;padding-right:.6666666667rem;width:40%}.definition-list__value{display:block;width:60%}.definition-list__edit{left:0;position:absolute;top:0}.upload-status{align-items:center;background-color:#fff;border:1px solid #fff;border-radius:var(--border-radius);display:flex;height:3.5rem;justify-content:center;overflow:hidden;width:3.5rem}.upload-status--queued .upload-status__icon{opacity:.25}.upload-status--uploading .upload-status__icon{animation:pulseup 1s ease-in infinite}.file-placeholder{align-items:center;background-color:var(--fill-color);border-radius:var(--border-radius);display:flex;flex-wrap:wrap;justify-content:flex-start;padding:.6666666667rem 1rem;position:relative;transition:background-color .25s}.file-placeholder__status{flex-grow:0;margin-right:1rem}.file-placeholder__content{flex-grow:1}.file-placeholder__name{margin-bottom:.5rem}.file-placeholder__name,.file-placeholder__size{font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1}.file-placeholder__size{color:#7b7d85}.file-placeholder__progress{margin-top:.5rem;width:100%}.file-placeholder__progress-bar{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;height:3px;width:100%}.file-placeholder__progress-bar::-webkit-progress-bar{background-color:#fff}.file-placeholder__progress-bar::-webkit-progress-value{background-color:var(--primary-color)}.tags{display:flex;flex-wrap:wrap}.tags__tag{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;margin:.1666666667rem .3333333333rem .1666666667rem 0;padding:.25rem .6666666667rem;position:relative}.tags__tag:last-child{margin-right:0}.tags__tag--clickable{cursor:pointer}.tooltip{cursor:default;display:block;position:relative}.tooltip__text{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:var(--fill-color);border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);left:0;max-width:300px;padding:.3333333333rem .6666666667rem;position:fixed;top:0;z-index:9999}.select{position:relative}.select__field{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);cursor:pointer;justify-content:space-between;padding:.6666666667rem;width:100%}.select__field,.select__icon{align-items:center;display:flex}.select__icon{height:2rem;justify-content:center;margin-top:-1rem;opacity:.65;pointer-events:none;position:absolute;right:.5rem;top:50%;width:2rem}.select__dropdown{background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.5rem;padding:.6666666667rem;position:absolute;right:0;top:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2}.select__search{margin-bottom:.6666666667rem}.select__list{max-height:30vh;overflow-y:auto}.select__footer{margin-top:.6666666667rem}.tag-label{background-color:rgba(0,0,0,.35);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.25rem .6666666667rem}.tag-label--small{font-size:.75rem;padding:.25rem .3333333333rem}.tags-browser__selected{margin-bottom:1rem}.tags-browser__available,.tags-browser__selected{border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius);padding:.5rem}.file-browser__placeholder{display:flex;height:30vh;padding:.6666666667rem}.file-browser__content{container-type:inline-size;display:flex;flex-direction:column;gap:.6666666667rem;padding-top:0}.directory-tree{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.directory-tree__children{padding-left:1.3333333333rem}.tree-item{cursor:pointer}.tree-item,.tree-item__content,.tree-item__toggle{align-items:center;display:flex}.tree-item__content{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.3333333333rem .6666666667rem;transition:background-color .25s}.tree-item__content:hover{background-color:var(--fill-color)}.tree-item--selected .tree-item__content{background-color:var(--fill-color-alt-1)}.tree-item__icon{align-items:center;display:flex;margin-right:.6666666667rem}.tree-item__text{align-items:center;display:flex;white-space:nowrap}.sticky-sidebar{display:flex;gap:1rem}.sticky-sidebar__content{width:75%}.sticky-sidebar__side{flex-grow:0;flex-shrink:0;height:100%;padding-top:2rem;position:sticky;top:0;width:25%}.filters-tool,.filters-tool__filters{align-items:center;display:flex;gap:1rem}.boolean-filter{align-items:center;background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);color:#7b7d85;cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;line-height:normal;padding:.5rem 1.3333333333rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.boolean-filter__label{margin-right:.6666666667rem}.index{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);transition:opacity .5s}.index--loading{opacity:0}.index--grid .index__rows{grid-gap:2rem;display:grid;grid-template-columns:repeat(5,1fr);padding:0 2rem}.index__row{border-bottom:1px solid var(--fill-color)}.index--grid .index__row{background-color:#fff;border:0;display:flex;padding:0}.index--grid .index__row:hover{background-color:#fff}.index--grid .index__component{display:flex;flex-grow:1}.index__placeholder{background-color:var(--fill-color);border-radius:var(--border-radius);margin:0 1rem 1rem;padding:1rem 2rem;text-align:center}.index__header{display:flex;flex-direction:column;gap:1rem;padding:1rem 2rem}@media screen and (min-width:900px){.index__header{align-items:center;flex-direction:row}}.index__header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.index__header-options{align-items:center;display:flex;flex-grow:1;gap:1rem;justify-content:flex-start}@media screen and (min-width:900px){.index__header-options{justify-content:flex-end}}.index__header-filter{margin-left:1rem}.index__header-filter:first-child{margin-left:0}.index__header-filters-tool{align-items:center;display:flex}.index__header-clear-filters{margin-left:1rem}.index__footer{padding:1rem 2rem;width:100%}.edit{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:2rem;transition:opacity .5s}.edit--loading{opacity:0}.create{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:2rem;transition:opacity .5s}.create--loading{opacity:0}.create-wizard{display:flex;justify-content:center}.create-wizard__wizard{width:100%}.export{padding:1rem 2rem}.delete,.export{background-color:#fff;border-radius:var(--border-radius)}.delete{border:1px solid var(--fill-color);padding:2rem}.delete__footer{display:flex;margin-top:2rem}.delete__confirm{margin-right:.6666666667rem}.custom-controller{background-color:#fff;border-radius:var(--border-radius);padding:1rem 2rem}.custom-controller iframe{border:0;width:100%}.view-media-directory{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);transition:opacity .5s}.view-media-directory--loading{opacity:0}.view-media-directory__header{align-items:center;display:flex;padding:1rem 2rem}.view-media-directory__header-title{align-items:center;display:flex;font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;gap:1rem;line-height:1.5}.view-media-directory__header-options{align-items:center;display:flex;flex-grow:1;gap:.6666666667rem;justify-content:flex-end}.view-media-directory__content{display:flex}.view-media-directory__main{padding:1rem;width:60%}@media screen and (min-width:1150px){.view-media-directory__main{width:75%}}.view-media-directory__side{position:relative;width:40%}@media screen and (min-width:1150px){.view-media-directory__side{width:25%}}.view-media-directory__side>*{position:sticky;top:0}.select-one{background-color:#fff;border:1px solid var(--fill-color);border-radius:var(--border-radius);padding:2rem}.select-one--grid .select-one__component{display:flex;flex-grow:1}.select-one__options{display:grid;gap:2rem;grid-template-columns:repeat(4,1fr)}.select-one__option{border:1px solid var(--fill-color);cursor:pointer;padding:2rem;transition:background-color .25s}.select-one__option:hover{background-color:var(--fill-color)}.select-one__option--selected,.select-one__option--selected:hover{background-color:var(--fill-color-alt-1)}.select-one__footer{display:flex;margin-top:2rem}.select-one__confirm{margin-right:.6666666667rem}.number-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;width:100%}.number-field:focus{border-color:var(--fill-color-alt-2)}.number-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.time-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;width:100%}.time-field:focus{border-color:var(--fill-color-alt-2)}.time-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.text-literal__link{text-decoration:underline}.text-literal--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.tags-field__wrap{align-items:center;background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:flex;padding:.6666666667rem;position:relative;width:100%}.tags-field__input{flex-grow:1}.tags-field__browse{position:absolute;right:0}.tags-field__input-field{border:0;padding-left:.5rem;width:100%}.tags-field__autosuggest{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:100%;width:100%;z-index:1}.tags-field__autosuggestion{align-items:center;border-radius:var(--border-radius);cursor:pointer;display:flex;margin-bottom:1px;padding:.6666666667rem .6666666667rem .6666666667rem 1rem;transition:background-color .25s;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.tags-field__autosuggestion:last-child{margin-bottom:0}.tags-field__autosuggestion:hover{background-color:var(--fill-color)}.link{border-bottom:1px solid var(--primary-color);color:var(--primary-color);cursor:pointer;line-height:1;white-space:nowrap}.link:hover{border-bottom:none}.link--alt{border-bottom:1px solid var(--fill-color-alt-3);color:var(--fill-color-alt-3)}.link--disabled{color:var(--fill-color-alt-2);cursor:default}.link--disabled,.link--disabled:hover{border-bottom:1px solid var(--fill-color-alt-2)}.text-field{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;padding:.6666666667rem;resize:vertical;width:100%}.text-field:focus{border-color:var(--fill-color-alt-2)}.text-field--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.file-select-field{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);cursor:pointer;display:block;padding:1rem;position:relative;width:100%}.file-select-field--small{max-width:300px}.file-select-field:after{background-color:hsla(0,0%,100%,.2);bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .25s}.file-select-field:hover{border-color:var(--fill-color-alt-2)}.file-select-field:hover:after{opacity:1}.file-select-field__icon{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;opacity:0;position:absolute;right:0;top:0;z-index:1}.file-select-field__selected-file{width:100%}.card{border:1px solid #e8e8f1;border-radius:var(--border-radius);display:flex;flex-direction:column;flex-grow:1}.card__photo{background-position:50%;background-size:cover;border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);height:0;overflow:hidden;padding-top:66.66%;position:relative;width:100%}.card__photo:after{background-color:hsla(228,4%,50%,.1);background-image:linear-gradient(180deg,rgba(0,0,0,.6),transparent 75%);content:"";display:block;height:100%;position:absolute;top:0;width:100%}.card__main{padding:1.3333333333rem 1.3333333333rem 1rem}.card__label{background-color:rgba(0,0,0,.5);border-radius:var(--border-radius);color:#fff;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;padding:.25rem .6666666667rem;right:.6666666667rem}.card__boolean,.card__label{position:absolute;top:.5rem;z-index:1}.card__boolean{left:1rem}.card__title{color:#000;font-size:1.15rem;font-weight:700;line-height:1.35}.card__subtitle,.card__title{font-family:Poppins,sans-serif;text-transform:none}.card__subtitle{color:#7b7d85;font-size:1rem;font-weight:500;line-height:1;line-height:1.25;margin-top:.3333333333rem}.card__content{margin-top:1.1428571429rem}.card__component{margin-bottom:.6666666667rem}.card__component:last-child{margin-bottom:0}.card__footer{border-top:1px solid #e8e8f1;display:flex;gap:.6666666667rem;margin-top:auto;padding:.6666666667rem 1.3333333333rem}.text-to-slug-field__slug{margin-top:.6666666667rem}.text-to-slug-field__slug-prefix{color:#7b7d85}.text-to-slug-field__slug-slug{color:#7b7d85;cursor:pointer;text-decoration:underline}.text-to-slug-field__slug-slug:hover{color:#464646}.text-to-slug-field__slug-placeholder{color:#e8e8f1}.text-view{align-items:center;display:flex}.text-view__label{flex-grow:0;margin-right:2rem;opacity:.75;width:25%}.text-view__value{align-items:center;display:inline-flex;flex-grow:1;width:75%}.text-view__url{text-decoration:underline}.text-view__copy{margin-left:.4rem}.text-view--primary{color:#000;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;text-transform:none}.enum-field{padding:.5rem}.enum-field,.enum-field2{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;width:100%}.enum-field2{background-color:#fff;padding:.6666666667rem}.enum-switch-field__content{margin-top:2rem}.enum-switch-field__component{margin-bottom:2rem}.enum-switch-field__component:last-child{margin-bottom:0}.boolean-view{background-color:var(--fill-color-alt-2);border-radius:100%;display:block;height:.6666666667rem;margin-top:.5rem;transition:background-color .25s;width:.6666666667rem}.boolean-view--checked{background-color:#67bd1d;color:#fff}.button-field{align-items:center;display:flex;gap:.6666666667rem;justify-content:flex-start}.button-field__wrap{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:inline-block;padding:.5rem}.button-field__entry{align-items:center;display:flex}.button-field__button{background-color:var(--fill-color-alt-1);border-radius:2rem;display:inline-block;padding:.3333333333rem 1rem}.button-field__url{color:var(--fill-color-alt-3);font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;margin-top:.6666666667rem;text-decoration:underline}.action-component__header{align-items:center;display:flex;justify-content:space-between;margin-bottom:1rem}.action-component__header-components{display:flex}.action-component__header-component{align-items:center;display:flex;margin-left:.6666666667rem}.action-component__header-component:first-child{margin-left:0}.section{background-color:var(--fill-color);border-radius:var(--border-radius)}.section__content{padding:1rem}.section--closed .section__content{display:none}.section__component{margin-bottom:2rem}.section__component:last-child{margin-bottom:0}.section__header{display:flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;justify-content:space-between;line-height:1;padding:1rem;text-transform:none}.section__collapse-button{align-items:center;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none}.section__collapse-button:after{border-left:.4rem solid transparent;border-right:.4rem solid transparent;border-top:.4rem solid var(--fill-color-alt-2);content:"";display:block;height:0;opacity:.5;transform:rotate(180deg);transition:opacity .25s;width:0}.section--closed .section__collapse-button:after{opacity:1;transform:none}.stack{grid-gap:2rem;display:grid}.stack--horizontal{grid-template-columns:repeat(2,1fr)}.stack--gapless{grid-gap:0}.tabs__nav{border-bottom:1px solid var(--fill-color-alt-1);display:flex;justify-content:flex-start}.tabs__content{padding-top:2rem}.tabs__component{margin-bottom:2rem}.tabs__component:last-child{margin-bottom:0}.tabs__nav-item{color:#000;cursor:pointer;font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;margin-right:2rem;padding:.6666666667rem 0;position:relative;text-transform:none}.tabs__nav-item:last-child{margin-right:0}.tabs__nav-item--active{color:var(--primary-color)}.tabs__nav-item--active:after{background-color:var(--primary-color);bottom:-1px;content:"";height:1px;left:0;position:absolute;right:0}.custom-number__icon{display:flex;margin-bottom:2rem}.custom-number__title{color:#7b7d85;font-family:Poppins,sans-serif;font-size:1rem;font-weight:500;line-height:1;text-transform:none}.custom-number--medium{font-size:1.75rem;font-weight:500}.custom-number--large,.custom-number--medium{color:#000;font-family:Poppins,sans-serif;letter-spacing:-.02em;line-height:1.5}.custom-number--large{font-size:2.75rem;font-weight:900}.color-view{background-color:#dfe0e2;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;height:3rem;width:3rem}.color-field{position:relative}.color-field__color{background-color:#f8f8fb;border:1px solid #e8e8f1;border-radius:var(--border-radius);display:block;padding:.6666666667rem;transition:background-color .5s;width:100%}.color-field__input{bottom:0;cursor:pointer;display:block;height:100%;left:0;opacity:0;position:absolute;right:0;top:0;width:100%}.file-upload{background-color:#f2f5f7;border-radius:var(--border-radius);display:block;padding:1rem 2rem;text-align:center}.translatable{display:block;width:100%}.translatable__tabs{display:flex;gap:.5rem;justify-content:flex-end;padding-right:.6666666667rem}.translatable__components{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);display:none;padding:1.3333333333rem .6666666667rem .6666666667rem}.translatable__components--active{display:block}.translatable__component{margin-bottom:2rem}.translatable__component:last-child{margin-bottom:0}.translatable__button{border-radius:var(--border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--fill-color-alt-3);cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;margin-bottom:-1px;padding:.3333333333rem .5rem;text-transform:uppercase;transition:color .25s,background-color .25s}.translatable__button--active{border:1px solid var(--fill-color-alt-1);border-bottom:1px solid #fff;color:var(--primary-color)}.translatable__button:hover{color:var(--primary-color)}.image-upload{position:relative}.image-upload__thumbnail{border:1px solid #dfe0e2;border-radius:var(--border-radius);padding:.5rem;position:relative}.image-upload__thumbnail img{display:block;width:100%}.image-upload__placeholder{position:relative}.image-upload__input{border:0;cursor:pointer;display:block;height:100%;left:0;opacity:0;position:absolute;right:0;top:0;width:100%}.image-upload__options{background-color:rgba(232,232,241,.85);border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius);bottom:0;display:none;justify-content:flex-end;left:0;padding:1rem 2rem;position:absolute;right:0}.image-upload:hover .image-upload__options{display:flex}.image-upload:hover .image-upload__thumbnail{border-color:#e8e8f1}.date-time-field,.image-view img{display:block;width:100%}.date-time-field{border:1px solid #dfe0e2;border-radius:var(--border-radius);padding:.5rem}.date-time-field:focus{border-color:#e8e8f1}.date-field{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.date-field:focus{border-color:#e8e8f1}.belongs-to-field{display:flex;flex-wrap:wrap}.belongs-to-field__field{flex-grow:1}.belongs-to-field__select{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.thumbnail{background-color:#f2f5f7;border-radius:var(--border-radius);height:5rem;overflow:hidden;width:5rem}.thumbnail img{display:block;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.thumb-component{background-color:var(--fill-color-alt-1);border-radius:var(--border-radius);display:block;height:3.5rem;overflow:hidden;width:3.5rem}.richtext-field trix-editor strong{font-weight:700}.richtext-field trix-editor em{font-style:italic}.richtext-field trix-editor sup{font-size:.85em;vertical-align:super}.richtext-field trix-editor blockquote,.richtext-field trix-editor div,.richtext-field trix-editor ol,.richtext-field trix-editor pre,.richtext-field trix-editor ul{border:1px dashed #dfe0e2;margin-bottom:.5rem;padding:.5rem}.richtext-field trix-editor blockquote:last-child,.richtext-field trix-editor div:last-child,.richtext-field trix-editor ol:last-child,.richtext-field trix-editor pre:last-child,.richtext-field trix-editor ul:last-child{margin-bottom:0}.richtext-field trix-editor blockquote{text-align:center}.richtext-field trix-editor ol li,.richtext-field trix-editor ul li{list-style:square;margin-left:1rem;padding-left:1rem}.richtext-field trix-editor ol li{list-style-type:decimal}.richtext-field trix-editor h1{border:1px dashed #dfe0e2;font-size:1.25rem;font-weight:700;margin-bottom:.5rem;padding:.5rem}.richtext-field trix-editor h1:last-child{margin-bottom:0}.richtext-field trix-editor a{text-decoration:underline}.content-blocks__footer{margin-top:1rem}.content-blocks__item{margin-bottom:.5rem}.content-blocks__item:last-child{margin-bottom:0}.gallery-field{container-type:inline-size;position:relative}.gallery-field__content{margin-top:1rem}.gallery-field__grid{grid-gap:1rem;display:grid;grid-template-columns:repeat(1,minmax(0,1fr))}@container (min-width: 300px){.gallery-field__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (min-width: 650px){.gallery-field__grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@container (min-width: 1000px){.gallery-field__grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@container (min-width: 1100px){.gallery-field__grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@container (min-width: 1280px){.gallery-field__grid{grid-template-columns:repeat(6,minmax(0,1fr))}}@container (min-width: 1400px){.gallery-field__grid{grid-template-columns:repeat(7,minmax(0,1fr))}}.gallery-field__item{border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);padding:.5rem;position:relative}.gallery-field__item:hover .gallery-field__item-actions{opacity:1}.gallery-field__item:hover .gallery-field__item-overlay{opacity:.9}.gallery-field__item-overlay{background-color:var(--fill-color)}.gallery-field__item-actions,.gallery-field__item-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .2s}.gallery-field__item-actions{align-items:center;justify-content:center}.gallery-field__item-delete{padding:.6666666667rem;position:absolute;right:0;top:0}.gallery-field__item-order{bottom:0;display:flex;gap:.3333333333rem;left:0;padding:.6666666667rem;position:absolute;right:0}.many-to-many-field{position:relative}.many-to-many-field__content{margin-top:1rem}.many-to-many-field__list{display:flex;flex-direction:column;gap:.5rem}.many-to-many-select-field{display:flex;flex-wrap:wrap}.many-to-many-select-field__field{flex-grow:1;margin-right:.6666666667rem}.many-to-many-select-field__btn{flex-grow:0}.many-to-many-select-field__select{border:1px solid #dfe0e2;border-radius:var(--border-radius);display:block;padding:.5rem;width:100%}.many-to-many-select-field__create{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);display:flex;flex-direction:column;max-height:80vh;padding:.6666666667rem;width:60vw}.many-to-many-select-field__create-header{align-items:center;display:flex;padding:1rem 2rem}.many-to-many-select-field__create-header-title{font-family:Poppins,sans-serif;font-size:1.25rem;font-weight:500;line-height:1.5}.many-to-many-select-field__create-header-options{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.many-to-many-select-field__create-header-options>*{margin-left:.6666666667rem}.many-to-many-select-field__create-header-options>:first-child{margin-left:0}.many-to-many-select-field__create-content{flex-grow:1;overflow-y:scroll;padding:1rem 2rem}.json-field__item{background-color:#fff;border:1px solid #e8e8f1;border-radius:var(--border-radius);display:flex;margin-bottom:.6666666667rem;padding:.5rem}.json-field__item:last-child{margin-bottom:0}.json-field__item-content{flex-grow:1;margin-right:.6666666667rem}.json-field__item-actions{align-items:center;display:flex;gap:.6666666667rem}.json-field__component{margin-bottom:1rem}.json-field__component:last-child{margin-bottom:0}.json-field__footer{margin-top:.6666666667rem}.manual-order-controls{display:flex;gap:.5rem}.inline-frame,.inline-frame iframe{display:block;width:100%}.inline-frame iframe{border:0}.foreign{grid-gap:2rem;display:grid} diff --git a/public/js/app.js b/public/js/app.js index 123aca5..7d0232d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[773],{5410:(t,e,r)=>{"use strict";var n={};r.r(n),r.d(n,{FILE:()=>Rg,HTML:()=>Ig,TEXT:()=>Ng,URL:()=>Dg});var o=r(7294),i=r(745),a=r(1688),s=r(2798),u=r(3935);let c=function(t){t()};const l=()=>c,f=(0,o.createContext)(null);function p(){return(0,o.useContext)(f)}let d=()=>{throw new Error("uSES not initialized!")};const h=(t,e)=>t===e;function y(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(t,r=h){const{store:n,subscription:i,getServerState:a}=e(),s=d(i.addNestedSub,n.getState,a||n.getState,t,r);return(0,o.useDebugValue)(s),s}}const m=y();r(8679),r(2973);const v={notify(){},get:()=>[]};function b(t,e){let r,n=v;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){const t=l();let e=null,r=null;return{clear(){e=null,r=null},notify(){t((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){let t=[],r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(t){let n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}const a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=v)},getListeners:()=>n};return a}const g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?o.useLayoutEffect:o.useEffect;let w=null;const O=function({store:t,context:e,children:r,serverState:n}){const i=(0,o.useMemo)((()=>{const e=b(t);return{store:t,subscription:e,getServerState:n?()=>n:void 0}}),[t,n]),a=(0,o.useMemo)((()=>t.getState()),[t]);g((()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[i,a]);const s=e||f;return o.createElement(s.Provider,{value:i},r)};function j(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(){const{store:t}=e();return t}}const S=j();function x(t=f){const e=t===f?S:j(t);return function(){return e().dispatch}}const P=x();var _,E;_=s.useSyncExternalStoreWithSelector,d=_,(t=>{w=t})(a.useSyncExternalStore),E=u.unstable_batchedUpdates,c=E;var k=r(4890);function C(t){return function(e){var r=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(r,n,t):e(o)}}}}var T=C();T.withExtraArgument=C;const R=T;function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:A,e=arguments.length>1?arguments[1]:void 0;return"cmf/update"===e.type?I(I({},t),{},{title:e.payload.title,version:e.payload.version}):t},auth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"auth/loggedin":return B(B({},t),{},{isLoggedIn:!0,user:e.payload});case"auth/loggedout":return B(B({},t),{},{isLoggedIn:!1,user:null});default:return t}},location:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"location/refresh":return X(X({},t),{},{refresh:!0});case"location/stop-refresh":return X(X({},t),{},{refresh:!1});case"location/update":var r=X(X({},t.current),e.payload);return X(X({},t),{},{previous:X({},t.current),current:X({},r)});default:return t}},media:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"media/init":return st(st({},t),{},{isInitialised:!0,directory:e.payload.directory,path:e.payload.path,directories:e.payload.directories,files:e.payload.files});case"media/path/update":return st(st({},t),{},{path:e.payload});case"media/directory/update":return st(st({},t),{},{directory:e.payload});case"media/directories/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))}):st({},t);case"media/directories/update":return st(st({},t),{},{directories:e.payload});case"media/directories/rename":var r=ot(t.directories).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{directories:r});case"media/directories/delete":return st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))});case"media/directories/add":return st(st({},t),{},{directories:[].concat(ot(t.directories),[e.payload]).sort((function(t,e){return t.name.toLowerCase()>e.name.toLowerCase()?1:-1}))});case"media/files/label":var n=ot(t.files).map((function(t){return st(st({},t),{},{label:t.id===e.fileId?e.label:t.label})}));return st(st({},t),{},{files:n});case"media/files/changeProperties":var o=ot(t.files).map((function(t){return t[e.property]=e.fileIds.includes(t.id)?e.value:t[e.property],t}));return st(st({},t),{},{files:o});case"media/files/changeProperty":var i=ot(t.files).map((function(t){return t[e.property]=t.id===e.fileId?e.value:t[e.property],t}));return st(st({},t),{},{files:i});case"media/files/delete":return st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))});case"media/files/add":return st(st({},t),{},{files:[].concat(ot(t.files),[e.payload])});case"media/files/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))}):st({},t);case"media/files/rename":var a=ot(t.files).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{files:a});case"media/files/update":return st(st({},t),{},{files:e.payload});case"media/view/update":return st(st({},t),{},{viewMode:e.payload});default:return t}},modules:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,e=arguments.length>1?arguments[1]:void 0;return"modules/update"===e.type?H(H({},t),{},{all:e.payload.all,primary:e.payload.primary,secondary:e.payload.secondary}):t},language:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt,e=arguments.length>1?arguments[1]:void 0;return"language/update"===e.type?tt(tt({},t),{},{language:e.payload}):t}});const ft=lt;const pt={get:function(t){var e=document.querySelector('meta[name="'+t+'"]');return e?e.getAttribute("content"):null}},dt={get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=window.localStorage.getItem(t);return r||null===e?r:e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},clear:function(){window.localStorage.clear()}};var ht=function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=t.split("."),n=window.i18n,o=0;o1&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("button");return r.setAttribute("type","button"),r.classList.add("button"),r.textContent=t,e&&r.addEventListener("click",e),r},i18nNotify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.notify(vt.get(t,e))},notify:function(t){var e=this;this.notificationStackEl||(this.notificationStackEl=document.createElement("div"),this.notificationStackEl.classList.add("notification-stack"),document.body.appendChild(this.notificationStackEl));var r=document.createElement("div");r.classList.add("notification"),r.textContent=bt.toUpperCaseFirst(t),this.notificationStackEl.appendChild(r),setTimeout((function(){r.classList.add("notification--hidden"),setTimeout((function(){return e.notificationStackEl.removeChild(r)}),250)}),3e3)},copyText:function(t,e){var r=document.createElement("textarea");r.value=t,r.style.top=0,r.style.left=0,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")&&e()}catch(t){console.error("Fallback: Oops, unable to copy text to clipboard",t)}document.body.removeChild(r)}};var wt=r(3379),Ot=r.n(wt),jt=r(5709),St={insert:"head",singleton:!1};Ot()(jt.Z,St);jt.Z.locals;const xt={scrollTop:function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},className:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return t;if("string"==typeof e&&(e=[e]),!e.length)return t;var r=" "+t+"--";return t+(e?r+e.join(r):"")},shallowEqual:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0,i=r;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ee(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}const re={path:pt.get("cmf:path"),currentPath:{},history:[],parseLocation:function(t){var e="/"+this.path+"/",r=t.search,n=new URLSearchParams(r),o=Object.fromEntries(n),i=t.pathname,a=(i.startsWith(e)?i.slice(e.length):"").split("/");return{module:a[0],action:a[1],params:o}},update:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};yt.dispatch({type:"location/update",payload:{module:t,action:e,params:r}})},goTo:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Jt.query(r),i="".concat(this.path,"/").concat(t,"/").concat(e)+(o?"?"+o:"");n?window.open(i):(window.history.pushState({},"",i),this.history.push({module:t,action:e,params:r}),this.update(t,e,r))},refresh:function(){yt.dispatch(function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ee(i,n,o,a,s,"next",t)}function s(t){ee(i,n,o,a,s,"throw",t)}a(void 0)}))}}(te().mark((function t(e){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"location/refresh"});case 2:e({type:"location/stop-refresh"});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},goBack:function(){var t=this.history[this.history.length-2],e=t.module,r=t.action,n=t.params;this.goTo(e,r,n)},handleRedirect:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.refresh?this.refresh():t.redirectBack?this.goBack():t.redirect&&this.goTo(t.path.module,t.redirect,e)}};function ne(t){var e=m((function(t){return t.modules.primary})),r=function(e){t.onModuleSwitch&&t.onModuleSwitch(),re.goTo(e.id,"index")},n=function(t,e){"open"===t?r(e):"open_new"===t&&window.open(e.url)},i=function(e){if(t.activeModule&&t.activeModule.id===e.id)return!0;for(var r=0;re=>{const r=vr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wr=t=>(t=t.toLowerCase(),e=>gr(e)===t),Or=t=>e=>typeof e===t,{isArray:jr}=Array,Sr=Or("undefined");const xr=wr("ArrayBuffer");const Pr=Or("string"),_r=Or("function"),Er=Or("number"),kr=t=>null!==t&&"object"==typeof t,Cr=t=>{if("object"!==gr(t))return!1;const e=br(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Tr=wr("Date"),Rr=wr("File"),Dr=wr("Blob"),Nr=wr("FileList"),Ir=wr("URLSearchParams");function Lr(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),jr(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Mr=t=>!Sr(t)&&t!==Fr;const Br=(Ur="undefined"!=typeof Uint8Array&&br(Uint8Array),t=>Ur&&t instanceof Ur);var Ur;const Vr=wr("HTMLFormElement"),zr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Gr=wr("RegExp"),Hr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Lr(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},Wr="abcdefghijklmnopqrstuvwxyz",Yr="0123456789",qr={DIGIT:Yr,ALPHA:Wr,ALPHA_DIGIT:Wr+Wr.toUpperCase()+Yr};const $r={isArray:jr,isArrayBuffer:xr,isBuffer:function(t){return null!==t&&!Sr(t)&&null!==t.constructor&&!Sr(t.constructor)&&_r(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||vr.call(t)===e||_r(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&xr(t.buffer),e},isString:Pr,isNumber:Er,isBoolean:t=>!0===t||!1===t,isObject:kr,isPlainObject:Cr,isUndefined:Sr,isDate:Tr,isFile:Rr,isBlob:Dr,isRegExp:Gr,isFunction:_r,isStream:t=>kr(t)&&_r(t.pipe),isURLSearchParams:Ir,isTypedArray:Br,isFileList:Nr,forEach:Lr,merge:function t(){const{caseless:e}=Mr(this)&&this||{},r={},n=(n,o)=>{const i=e&&Ar(r,o)||o;Cr(r[i])&&Cr(n)?r[i]=t(r[i],n):Cr(n)?r[i]=t({},n):jr(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(Lr(e,((e,n)=>{r&&_r(e)?t[n]=mr(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&br(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:gr,kindOfTest:wr,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(jr(t))return t;let e=t.length;if(!Er(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Vr,hasOwnProperty:zr,hasOwnProp:zr,reduceDescriptors:Hr,freezeMethods:t=>{Hr(t,((e,r)=>{if(_r(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];_r(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return jr(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Ar,global:Fr,isContextDefined:Mr,ALPHABET:qr,generateString:(t=16,e=qr.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&_r(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(kr(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=jr(t)?[]:{};return Lr(t,((t,e)=>{const i=r(t,n+1);!Sr(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function Xr(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}$r.inherits(Xr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$r.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kr=Xr.prototype,Zr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Zr[t]={value:t}})),Object.defineProperties(Xr,Zr),Object.defineProperty(Kr,"isAxiosError",{value:!0}),Xr.from=(t,e,r,n,o,i)=>{const a=Object.create(Kr);return $r.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Xr.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Jr=Xr,Qr=null;var tn=r(8764).lW;function en(t){return $r.isPlainObject(t)||$r.isArray(t)}function rn(t){return $r.endsWith(t,"[]")?t.slice(0,-2):t}function nn(t,e,r){return t?t.concat(e).map((function(t,e){return t=rn(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const on=$r.toFlatObject($r,{},null,(function(t){return/^is[A-Z]/.test(t)}));const an=function(t,e,r){if(!$r.isObject(t))throw new TypeError("target must be an object");e=e||new(Qr||FormData);const n=(r=$r.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!$r.isUndefined(e[t])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&$r.isSpecCompliantForm(e);if(!$r.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if($r.isDate(t))return t.toISOString();if(!s&&$r.isBlob(t))throw new Jr("Blob is not supported. Use a Buffer instead.");return $r.isArrayBuffer(t)||$r.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):tn.from(t):t}function c(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if($r.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if($r.isArray(t)&&function(t){return $r.isArray(t)&&!t.some(en)}(t)||($r.isFileList(t)||$r.endsWith(r,"[]"))&&(s=$r.toArray(t)))return r=rn(r),s.forEach((function(t,n){!$r.isUndefined(t)&&null!==t&&e.append(!0===a?nn([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!en(t)||(e.append(nn(o,r,i),u(t)),!1)}const l=[],f=Object.assign(on,{defaultVisitor:c,convertValue:u,isVisitable:en});if(!$r.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!$r.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),$r.forEach(r,(function(r,i){!0===(!($r.isUndefined(r)||null===r)&&o.call(e,r,$r.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function sn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function un(t,e){this._pairs=[],t&&an(t,this,e)}const cn=un.prototype;cn.append=function(t,e){this._pairs.push([t,e])},cn.toString=function(t){const e=t?function(e){return t.call(this,e,sn)}:sn;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ln=un;function fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pn(t,e,r){if(!e)return t;const n=r&&r.encode||fn,o=r&&r.serialize;let i;if(i=o?o(e,r):$r.isURLSearchParams(e)?e.toString():new ln(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const dn=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$r.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},hn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn="undefined"!=typeof URLSearchParams?URLSearchParams:ln,mn=FormData,vn=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),bn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:mn,Blob},isStandardBrowserEnv:vn,isStandardBrowserWebWorkerEnv:bn,protocols:["http","https","file","blob","url","data"]};const wn=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&$r.isArray(n)?n.length:i,s)return $r.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&$r.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&$r.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return $r.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},On={"Content-Type":void 0};const jn={transitional:hn,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=$r.isObject(t);o&&$r.isHTMLForm(t)&&(t=new FormData(t));if($r.isFormData(t))return n&&n?JSON.stringify(wn(t)):t;if($r.isArrayBuffer(t)||$r.isBuffer(t)||$r.isStream(t)||$r.isFile(t)||$r.isBlob(t))return t;if($r.isArrayBufferView(t))return t.buffer;if($r.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return an(t,new gn.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return gn.isNode&&$r.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=$r.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return an(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if($r.isString(t))try{return(e||JSON.parse)(t),$r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||jn.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&$r.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw Jr.from(t,Jr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};$r.forEach(["delete","get","head"],(function(t){jn.headers[t]={}})),$r.forEach(["post","put","patch"],(function(t){jn.headers[t]=$r.merge(On)}));const Sn=jn,xn=$r.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pn=Symbol("internals");function _n(t){return t&&String(t).trim().toLowerCase()}function En(t){return!1===t||null==t?t:$r.isArray(t)?t.map(En):String(t)}function kn(t,e,r,n){return $r.isFunction(n)?n.call(this,e,r):$r.isString(e)?$r.isString(n)?-1!==e.indexOf(n):$r.isRegExp(n)?n.test(e):void 0:void 0}class Cn{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=_n(e);if(!o)throw new Error("header name must be a non-empty string");const i=$r.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=En(t))}const i=(t,e)=>$r.forEach(t,((t,r)=>o(t,r,e)));return $r.isPlainObject(t)||t instanceof this.constructor?i(t,e):$r.isString(t)&&(t=t.trim())&&!function(t){return/^[-_a-zA-Z]+$/.test(t.trim())}(t)?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&xn[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=_n(t)){const r=$r.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if($r.isFunction(e))return e.call(this,t,r);if($r.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_n(t)){const r=$r.findKey(this,t);return!(!r||void 0===this[r]||e&&!kn(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=_n(t)){const o=$r.findKey(r,t);!o||e&&!kn(0,r[o],o,e)||(delete r[o],n=!0)}}return $r.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!kn(0,this[o],o,t)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return $r.forEach(this,((n,o)=>{const i=$r.findKey(r,o);if(i)return e[i]=En(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=En(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $r.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&$r.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[Pn]=this[Pn]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=_n(t);e[n]||(!function(t,e){const r=$r.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return $r.isArray(t)?t.forEach(n):n(t),this}}Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$r.freezeMethods(Cn.prototype),$r.freezeMethods(Cn);const Tn=Cn;function Rn(t,e){const r=this||Sn,n=e||r,o=Tn.from(n.headers);let i=n.data;return $r.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Dn(t){return!(!t||!t.__CANCEL__)}function Nn(t,e,r){Jr.call(this,null==t?"canceled":t,Jr.ERR_CANCELED,e,r),this.name="CanceledError"}$r.inherits(Nn,Jr,{__CANCEL__:!0});const In=Nn;const Ln=gn.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),$r.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$r.isString(n)&&a.push("path="+n),$r.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function An(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Fn=gn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=$r.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Mn=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Un="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Tn.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}$r.isFormData(n)&&(gn.isStandardBrowserEnv||gn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const c=An(t.baseURL,t.url);function l(){if(!u)return;const n=Tn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Jr("Request failed with status code "+r.status,[Jr.ERR_BAD_REQUEST,Jr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),s()}),(function(t){r(t),s()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),pn(c,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new Jr("Request aborted",Jr.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new Jr("Network Error",Jr.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||hn;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new Jr(e,n.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,t,u)),u=null},gn.isStandardBrowserEnv){const e=(t.withCredentials||Fn(c))&&t.xsrfCookieName&&Ln.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&$r.forEach(o.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),$r.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&"json"!==i&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",Bn(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Bn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{u&&(r(!e||e.type?new In(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);f&&-1===gn.protocols.indexOf(f)?r(new Jr("Unsupported protocol "+f+":",Jr.ERR_BAD_REQUEST,t)):u.send(n||null)}))},Vn={http:Qr,xhr:Un};$r.forEach(Vn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const zn={getAdapter:t=>{t=$r.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;ot instanceof Tn?t.toJSON():t;function Yn(t,e){e=e||{};const r={};function n(t,e,r){return $r.isPlainObject(t)&&$r.isPlainObject(e)?$r.merge.call({caseless:r},t,e):$r.isPlainObject(e)?$r.merge({},e):$r.isArray(e)?e.slice():e}function o(t,e,r){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!$r.isUndefined(e))return n(void 0,e)}function a(t,e){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Wn(t),Wn(e),!0)};return $r.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=u[n]||o,a=i(t[n],e[n],n);$r.isUndefined(a)&&i!==s||(r[n]=a)})),r}const qn="1.3.2",$n={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{$n[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Xn={};$n.transitional=function(t,e,r){function n(t,e){return"[Axios v"+qn+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new Jr(n(o," has been removed"+(e?" in "+e:"")),Jr.ERR_DEPRECATED);return e&&!Xn[o]&&(Xn[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const Kn={assertOptions:function(t,e,r){if("object"!=typeof t)throw new Jr("options must be an object",Jr.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new Jr("option "+i+" must be "+r,Jr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Jr("Unknown option "+i,Jr.ERR_BAD_OPTION)}},validators:$n},Zn=Kn.validators;class Jn{constructor(t){this.defaults=t,this.interceptors={request:new dn,response:new dn}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yn(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Kn.assertOptions(r,{silentJSONParsing:Zn.transitional(Zn.boolean),forcedJSONParsing:Zn.transitional(Zn.boolean),clarifyTimeoutError:Zn.transitional(Zn.boolean)},!1),void 0!==n&&Kn.assertOptions(n,{encode:Zn.function,serialize:Zn.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&$r.merge(o.common,o[e.method]),i&&$r.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Tn.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Hn.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new In(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new to((function(e){t=e}));return{token:e,cancel:t}}}const eo=to;const ro={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ro).forEach((([t,e])=>{ro[e]=t}));const no=ro;const oo=function t(e){const r=new Qn(e),n=mr(Qn.prototype.request,r);return $r.extend(n,Qn.prototype,r,{allOwnKeys:!0}),$r.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Yn(e,r))},n}(Sn);oo.Axios=Qn,oo.CanceledError=In,oo.CancelToken=eo,oo.isCancel=Dn,oo.VERSION=qn,oo.toFormData=an,oo.AxiosError=Jr,oo.Cancel=oo.CanceledError,oo.all=function(t){return Promise.all(t)},oo.spread=function(t){return function(e){return t.apply(null,e)}},oo.isAxiosError=function(t){return $r.isObject(t)&&!0===t.isAxiosError},oo.mergeConfig=Yn,oo.AxiosHeaders=Tn,oo.formToJSON=t=>wn($r.isHTMLForm(t)?new FormData(t):t),oo.HttpStatusCode=no,oo.default=oo;const io=oo;function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function so(){so=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ao(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function co(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n={file:t};return e&&(n.directory=e),ho.post("cmf/api/media/upload",Jt.formData(n),{onUploadProgress:r})},yo.media.uploadChunk=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i={status:t,filename:e,chunk:n};return r&&(i.path=r),o&&(i.directory=o),ho.post("cmf/api/media/upload-chunk",Jt.formData(i))},yo.media.path=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/path",{params:e})},yo.media.loadDirectories=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-directories",{params:e})},yo.media.loadFiles=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-files",{params:e})},yo.media.createDirectory=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={name:t};return e&&(r.directory=e),ho.post("cmf/api/media/create-directory",r)},yo.media.renameDirectory=function(t,e){return ho.post("cmf/api/media/rename-directory",{name:t,directory:e})},yo.media.deleteDirectory=function(t){return ho.post("cmf/api/media/delete-directory",{directory:t})},yo.media.moveDirectory=function(t,e){return ho.post("cmf/api/media/move-directory",{directory:t,id:e})},yo.media.renameFile=function(t,e){return ho.post("cmf/api/media/rename-file",{name:t,file:e})},yo.media.deleteFile=function(t){return ho.post("cmf/api/media/delete-file",{file:t})},yo.media.deleteFiles=function(t){return ho.post("cmf/api/media/delete-files",{files:JSON.stringify(t)})},yo.media.labelFile=function(t,e){return ho.post("cmf/api/media/label-file",{label:t,file:e})},yo.media.updateFileDescription=function(t,e){return ho.post("cmf/api/media/update-file-description",{description:t,file:e})},yo.media.updateFileCopyright=function(t,e){return ho.post("cmf/api/media/update-file-copyright",{copyright:t,file:e})},yo.media.updateFileVisibility=function(t,e){return ho.post("cmf/api/media/update-file-visibility",{visibility:t,file:e})},yo.media.updateFilesDescription=function(t,e){return ho.post("cmf/api/media/update-files-description",{description:t,files:JSON.stringify(e)})},yo.media.updateFilesCopyright=function(t,e){return ho.post("cmf/api/media/update-files-copyright",{copyright:t,files:JSON.stringify(e)})},yo.media.moveFile=function(t,e){return ho.post("cmf/api/media/move-file",{directory:t,file:e})},yo.media.moveFiles=function(t,e){return ho.post("cmf/api/media/move-files",{directory:t,files:JSON.stringify(e)})},yo.modules.index=function(){return ho.get("cmf/api/modules")},yo.modules.action=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action),{params:e})},yo.modules.get=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),{params:r})},yo.modules.post=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),Jt.formData(r))},yo.execute.get=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),{params:n})},yo.execute.post=function(t,e,r,n){return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),Jt.formData(n))};const mo=yo;function vo(t){return vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(t)}function bo(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1])&&(wi.set(t),gi.trigger("language.switch",{id:this.props.id,prevLanguage:this.state.language,language:t})),this.setState({language:t})}},{key:"renderLanguageSwitcher",value:function(){var t=this;return this.props.languages.map((function(e){return(0,Pt.jsx)("button",{type:"button",onClick:function(r){return t.switchLanguage(e)},className:"translatable__button"+(e===t.state.language?" translatable__button--active":""),children:e},e)}))}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"translatable",id:"language-"+this.props.id,children:[(0,Pt.jsx)("div",{className:"translatable__tabs",children:this.renderLanguageSwitcher()}),this.renderTranslatedComponents()]})}}],r&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);ki(Ti,"defaultProps",{id:null,components:[],path:{},data:{},languages:[],errors:{}});const Ri=Ti;function Di(t){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(t)}function Ni(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e5&&(t=(0,Pt.jsx)("div",{className:"select__search",children:(0,Pt.jsx)(Qi,{debounce:100,onSearch:function(t){return e.search(t)}})})),(0,Pt.jsxs)("div",{className:"select__dropdown",children:[t,(0,Pt.jsx)("div",{className:"select__list",children:(0,Pt.jsx)(zi,{nullable:this.props.nullable,multiple:this.props.multiple,defaultValues:this.props.multiple?this.state.value:[this.state.value],options:this.state.isSearching?this.state.searchResults:this.props.options,onChange:function(t){return e.handleSelectionChange(t)}})}),this.renderDropdownChildren()]})):null}},{key:"render",value:function(){var t,e=this;return t=this.props.multiple?this.state.value.length?this.state.value.map((function(t){return e.props.options[t]})).join(", "):this.props.nullText:this.props.options[this.state.value]?this.props.options[this.state.value]:this.props.nullText,(0,Pt.jsxs)("div",{className:"select",ref:this.selectRef,children:[(0,Pt.jsxs)("div",{className:"select__field",onClick:this.toggle.bind(this),children:[(0,Pt.jsx)("div",{className:"select__value",children:t}),(0,Pt.jsx)("div",{className:"select__icon",children:(0,Pt.jsx)(qt,{name:this.state.isOpen?this.props.closeIcon:this.props.openIcon})})]}),this.renderDropdown()]})}}],r&&ra(e.prototype,r),n&&ra(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=sa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ua,"defaultProps",{options:{},multiple:!1,value:"",search:!0,nullable:!1,nullText:"",onChange:function(t){},openIcon:"expand_more",closeIcon:"expand_less"});const ca=ua;function la(t){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(t)}function fa(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]}));var i=n.length?n[0].id:"",a=t.state.value?t.state.value:t.props.nullable?"":i;t.setState({value:a,options:o},(function(){e&&e()}))}))}},{key:"handleChange",value:function(t){this.setState({value:t})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,value:t.data.data.id})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Zv.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Zv.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"belongs-to-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:[(0,Pt.jsx)("div",{className:"belongs-to-field",children:(0,Pt.jsx)("div",{className:"belongs-to-field__field",children:(0,Pt.jsx)(ca,{nullable:this.props.nullable,nullText:"– "+vt.get("snippets.no_singular_selected",{singular:this.props.singular})+" –",options:this.state.options,value:this.state.value,onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Bu(e.prototype,r),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gu(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hu,"defaultProps",{data:{},label:"",name:"",titleColumn:"",nullable:!1,plural:"",singular:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const Wu=Hu;function Yu(t){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(t)}function qu(t,e){for(var r=0;rA2');var n=e.querySelector(".trix-button-group--block-tools");n&&n.remove();var o=e.querySelector(".trix-button-group--file-tools");o&&o.remove()}},{key:"componentDidMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(t){this.props.data[this.props.name]!==t.data[this.props.name]&&this.setState({redrawKey:this.state.redrawKey+1,value:this.props.data[this.props.name]||""})}},{key:"handleChange",value:function(t,e){this.setState({value:t})}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.value||""}},{key:"getData",value:function(t){return t[this.props.name]=this.state.value||"",t}},{key:"render",value:function(){return(0,Pt.jsx)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"richtext-field",children:(0,Pt.jsx)(rc.TrixEditor,{value:this.props.data[this.props.name]||"",onChange:this.handleChange.bind(this),onEditorReady:this.handleEditorReady.bind(this)},this.state.redrawKey)})})}}])&&ic(e.prototype,r),n&&ic(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}function pc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rr?"left":"right",t.clientY>e?"up":"down")}}},{key:"open",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"down";this.setState({isOpen:!0,dropDirectionX:e,dropDirectionY:r},(function(){t.bindDocumentClick()}))}},{key:"close",value:function(){var t=this;this.setState({isOpen:!1},(function(){t.unbindDocumentClick()}))}},{key:"onContentClick",value:function(t){t.target.classList.contains("dropdown__content")||this.close()}},{key:"render",value:function(){var t=(0,Pt.jsx)(Je,{stopPropagation:this.props.stopPropagation,text:this.props.text,label:this.props.label,style:[].concat(Jc(this.props.style),["small"]),onClick:this.toggle.bind(this),icon:this.state.isOpen?this.props.closeIcon:this.props.openIcon});return this.props.text||(t=(0,Pt.jsx)(Ro,{stopPropagation:this.props.stopPropagation,name:this.state.isOpen?this.props.closeIcon:this.props.openIcon,iconStyle:"small",onClick:this.toggle.bind(this)})),(0,Pt.jsxs)("div",{className:xt.className("dropdown",this.props.style)+(this.state.isOpen?" dropdown--open":"")+" dropdown--"+this.state.dropDirectionX+" dropdown--"+this.state.dropDirectionY,ref:this.dropdownRef,children:[(0,Pt.jsx)("div",{className:"dropdown__trigger",children:t}),(0,Pt.jsx)("div",{className:"dropdown__content",onClick:this.onContentClick.bind(this),children:this.props.children})]})}}],r&&tl(e.prototype,r),n&&tl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(al,"defaultProps",{label:"",text:"",style:[],autoClose:!1,openIcon:"expand_more",closeIcon:"expand_less",stopPropagation:!0});const sl=al;function ul(t){return function(t){if(Array.isArray(t))return cl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return cl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cl(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Tl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Rl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Tl(i,n,o,a,s,"next",t)}function s(t){Tl(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Dl(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;this.props.onDirectoryClick(t)}},{key:"load",value:(i=Rl(Cl().mark((function t(){var e=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(this.props.directory).then((function(t){e.setState({directories:t.data.data})}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"loadChildren",value:(o=Rl(Cl().mark((function t(e){var r=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(e).then((function(t){var n=r.state.directoriesMap;n[e]=t.data.data,r.setState({directoriesMap:n})}));case 2:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"toggleCollapse",value:function(t){if(this.state.directoriesMap[t]){var e=this.state.directoriesMap;delete e[t],this.setState({directoriesMap:e})}else this.loadChildren(t)}},{key:"renderChildren",value:function(t){var e=this;return this.state.directoriesMap[t]?this.state.directoriesMap[t].map((function(t){return e.renderDirectory(t)})):null}},{key:"renderDirectory",value:function(t){var e=this;return(0,Pt.jsxs)("div",{className:"directory-tree__item",children:[(0,Pt.jsx)(El,{icon:"folder",text:t.name,style:this.props.selectedDirectory===t.id?"selected":"default",onToggle:function(){return e.toggleCollapse(t.id)},onClick:function(){return e.select(t.id)}}),(0,Pt.jsx)("div",{className:"directory-tree__children",children:this.renderChildren(t.id)})]},t.id)}},{key:"render",value:function(){var t=this;return this.state.directories.length?(0,Pt.jsxs)("div",{className:"directory-tree",children:[(0,Pt.jsx)(El,{icon:"home",text:vt.get("snippets.files_root"),style:null===this.props.selectedDirectory?"selected":"default",collapsible:!1,onClick:function(){return t.select()}}),this.state.directories.map((function(e){return t.renderDirectory(e)}))]}):null}}],r&&Dl(e.prototype,r),n&&Dl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.Component);!function(t,e,r){(e=Al(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Fl,"defaultProps",{directory:null,selectedDirectory:null,onDirectoryClick:function(t){}});const Ml=Fl;function Bl(t){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(t)}function Ul(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r186?"#000000":"#ffffff"};function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function hf(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(e=[[vt.get("snippets.move_files",{amount:this.props.selectedFileIds.length}),"multi-move"],[vt.get("snippets.delete_files",{amount:this.props.selectedFileIds.length}),"multi-delete"]]),(0,Pt.jsx)(xf,{files:this.state.files,fileLabels:this.props.fileLabels,selection:this.props.selectedFileIds,selectionMode:this.props.selectionMode,contextMenuLinks:e,onClick:function(e,r){return t.handleFileClick(e,r)},onContextClick:function(e,r){return t.onFileContextClick(e,r)}})}},{key:"renderDirectories",value:function(){var t=this;return this.props.directories.length?(0,Pt.jsx)(Pt.Fragment,{children:(0,Pt.jsx)(kf,{directories:this.props.directories,contextMenuLinks:[[vt.get("snippets.rename"),"rename"],[vt.get("snippets.move"),"move"],[vt.get("snippets.delete"),"delete"]],onContextClick:function(e,r){return t.onDirectoryContextClick(e,r)},onClick:function(e,r){return t.props.onDirectoryClick(r.id)}})}):null}},{key:"renderContent",value:function(){return this.state.uploads.length||this.props.directories.length||this.state.files.length?(0,Pt.jsxs)("div",{className:"file-browser__content",children:[this.renderUploads(),this.renderDirectories(),this.renderFiles()]}):(0,Pt.jsx)("div",{className:"file-browser__content",children:(0,Pt.jsx)("div",{className:"file-browser__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.directory_is_empty")})})})}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"file-browser",children:[this.renderContent(),this.renderMoveWidget()]})}}],r&&Df(e.prototype,r),n&&Df(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);!function(t,e,r){(e=Ff(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Mf,"defaultProps",{files:[],directories:[],currentDirectory:null,fileLabels:{},selectionMode:!1,selectedFileIds:[],selectedFiles:[],onDirectoryClick:function(t){},onFileClick:function(t){},onDirectoryDelete:function(t){},onDirectoryRename:function(t,e){},onDirectoryMove:function(t,e){},onFileDelete:function(t){},onFileRename:function(t){},onFileMove:function(t,e){},onFileOpen:function(t){},onSelectionChange:function(t,e){},onSelectionDelete:function(t,e){},onSelectionMove:function(t,e){}});const Bf=Mf;var Uf=r(4195),Vf={insert:"head",singleton:!1};Ot()(Uf.Z,Vf);Uf.Z.locals;function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Gf(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:function(){},n=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:function(){};Qf++,Jf.push([Qf,t,e,r]),gi.trigger("media.upload.queued",{id:Qf,size:t.size,filename:t.name}),Zf||this.process()},process:function(){var t=this;if(Jf.length){Zf=!0;var e=Jf[0];this.processChunkUpload(e[1],e[2],(function(t){gi.trigger("media.upload.start",{id:e[0],size:e[1].size,filename:t})}),(function(t){gi.trigger("media.upload.progress",{id:e[0],progress:t})}),(function(r){Zf=!1,Jf.shift(),t.process(),gi.trigger("media.upload.success",{id:e[0],file:r}),e[3](r)}),(function(){gi.trigger("media.upload.fail",{id:e[0]}),Zf=!1,Jf.shift(),t.process()}))}},isDone:function(){return 0===Jf.length},processChunkUpload:function(t,e,r,n,o,i){var a,s,u,c=524288,l=Math.ceil(t.size/c),f=0,p=t.name;!function d(){(s=f*c)>t.size&&(s=u+1),u=s+c>=t.size?t.size:s+c;var h=0===f?"start":f===l?"end":"progress";"start"===h&&r(p),mo.media.uploadChunk(h,p,a||null,t.slice(s,u),e).then((function(t){var e=t.data;("created"===e.status&&(a=e.path),++f<=l)?(n(f/l*100),d()):o(e.data)}),(function(t){i()}))}()}};function ep(t){var e=function(e){tp.queueMultiple(e,t.directory,(function(e){t.onFileUploaded(e),tp.isDone()&&t.onUploadDone()}))};return(0,Pt.jsxs)("div",{className:"file-uploader",children:[(0,Pt.jsx)("div",{className:"file-uploader__input",children:(0,Pt.jsx)("input",{type:"file",name:"file-uploader",multiple:!0,onChange:function(t){e(t.target.files)}.bind(this)})}),(0,Pt.jsx)("div",{className:"file-uploader__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.select_files_from_computer")})})]})}ep.defaultProps={directory:null,onUploadDone:function(){},onFileUploaded:function(t){}};const rp=ep;function np(t){return np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(t)}function op(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;t.isFile?t.file((function(t){".DS_Store"!==t.name&&e.upload(t,r)})):t.isDirectory&&mo.media.createDirectory(t.name,r).then((function(r){var n=r.data.data;e.props.onCreateDirectory(n),t.createReader().readEntries((function(t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ap(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Fp(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ap(i,n,o,a,s,"next",t)}function s(t){Ap(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Mp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bp(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var a=t.data.data,s=e.data.data,u=o.data.data,c=a[a.length-1];i({type:"media/init",payload:{directory:c,path:a,directories:s,files:u}}),n(Bp(Bp({},r),{},{isLoading:!1}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),d=function(e,o){n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o})),t.onSelectionChange(e,o)},h=function(){t.onSelectionConfirm(r.selectedFileIds,r.selectedFiles)},y=function(t){var e=r.selectedFileIds.filter((function(e){return e!==t})),o=r.selectedFiles.filter((function(e){return e.id!==t}));n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o}))},v=function(){t.onCancel()},b=function(t){p(t)},g=function(){gt.i18nNotify("snippets.files_uploaded")},w=function(t){!function(t){n(Bp(Bp({},r),{},{selectedFileIds:[].concat(Ip(r.selectedFileIds),[t.id]),selectedFiles:[].concat(Ip(r.selectedFiles),[t])}))}(t),i({type:"media/files/add",payload:t})},O=function(){var t=Fp(Lp().mark((function t(e){var r,n;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.createDirectory(e,c?c.id:null);case 4:r=t.sent,n=r.data.data,gt.i18nNotify("snippets.directory_created"),i({type:"media/directories/add",payload:n}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/files/rename",payload:o}),gt.i18nNotify("snippets.file_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),S=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/directories/rename",payload:o}),gt.i18nNotify("snippets.directory_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),x=function(t,e){mo.media.moveFiles(t,e).then((function(t){gt.i18nNotify("snippets.files_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},_=function(t,e){mo.media.moveFile(t,e).then((function(t){gt.i18nNotify("snippets.file_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},E=function(){gt.prompt({title:vt.get("snippets.new_directory"),confirmButtonText:vt.get("snippets.confirm"),cancelButtonText:vt.get("snippets.cancel"),confirm:function(t){return O(t)}})},k=function(){var t=[[vt.get("snippets.deselect"),"deselect"],[vt.get("snippets.jump_to_folder"),"jump_to"]];return r.selectedFiles.length?(0,Pt.jsxs)("div",{className:"file-picker-widget__selection",children:[(0,Pt.jsxs)("div",{className:"file-picker-widget__selection-header",children:[vt.get("snippets.your_selection")," (",r.selectedFiles.length,")"]}),r.selectedFiles.map((function(e,r){return(0,Pt.jsx)("div",{className:"file-picker-widget__file",children:(0,Pt.jsx)(Wt,{links:t,onClick:function(t){return function(t,e){"jump_to"===t?p(e.directory?e.directory.id:null):"deselect"===t&&y(e.id)}(t,e)},children:(0,Pt.jsx)(jf,{file:e,viewMode:"minimal",actions:[(0,Pt.jsx)(Ro,{name:"delete",style:"transparent",onClick:function(t){return y(e.id)}},"delete")]})})},r)}))]}):(0,Pt.jsx)(Su,{icon:"checklist",children:vt.get("snippets.your_selection_is_empty")})};return(0,Pt.jsx)(Bo,{style:["modal","wide"],closeable:!0,onClose:v,title:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return b(t)}})},"path"),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?b(t.id):b()}},"breadcrumbs")],actions:[(0,Pt.jsx)(Rp,{},"view-switcher"),(0,Pt.jsx)(Je,{text:vt.get("snippets.new_directory"),style:["secondary","small"],onClick:E},"new-dir"),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onFileUploaded:w,onUploadDone:g})},"upload")],footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:v},"cancel"),(0,Pt.jsx)(Je,{text:t.selectionMode?vt.get("snippets.confirm_selection"):vt.get("snippets.select_file"),style:r.selectedFileIds.length?[]:["disabled"],onClick:r.selectedFileIds.length?h:null},"confirm")],children:r.isLoading?null:(0,Pt.jsx)(cp,{sidebar:k(),children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:O,onUploadDone:g,children:(0,Pt.jsx)(Bf,{fileLabels:t.fileLabels,currentDirectory:c,selectionMode:t.selectionMode,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,directories:l,files:f,onDirectoryRename:S,onFileRename:j,onFileMove:_,onDirectoryClick:function(t){return b(t)},onSelectionChange:d,onSelectionMove:x})})})})}Hp.defaultProps={multiple:!1,onSelectionChange:function(t,e){},onSelectionConfirm:function(t,e){},onCancel:function(){},defaultDirectoryId:null,defaultSelectedFileIds:[],defaultSelectedFiles:[],selectionMode:!1,fileLabels:{}};const Wp=Hp;function Yp(t){return Yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yp(t)}function qp(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedBlocks.length-1)){var e=this.syncBlocksData(),r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedBlocks:e}),gt.notify(vt.get("snippets.order_changed"))}}},{key:"removeBlock",value:function(t,e){var r=this;gt.confirm({title:vt.get("snippets.delete_singular_title",{singular:this.props.singular}),text:vt.get("snippets.delete_singular_text",{singular:this.props.singular}),confirm:function(){var n=r.state.blocksToRemoveById,o=r.state.blocksToRemoveByOrder,i=r.syncBlocksData();i.splice(t,1),e?n.push(e):o.push(t),r.setState({addedBlocks:i,blocksToRemoveById:n,blocksToRemoveByOrder:o}),gt.notify(vt.get("snippets.singular_deleted",{singular:r.props.singular}))}})}},{key:"addBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getBlockDefinition(t),n=this.state.addedBlocks,o={id:null,name:r.name,type:r.type,components:r.components,data:{}};null!==e?(n.splice(e,0,o),gt.notify(vt.get("snippets.singular_inserted",{singular:this.props.singular}))):(n.push(o),gt.notify(vt.get("snippets.singular_added",{singular:this.props.singular}))),this.setState({addedBlocks:n})}},{key:"renderAddBlockDropdown",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.getOwnPropertyNames(this.props.blocks);return n.length?1===n.length?t?(0,Pt.jsx)(Je,{icon:"add",style:["small","secondary"],text:t,stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(Ro,{name:"post_add",iconStyle:"small",stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(sl,{style:["secondary"],autoClose:!0,text:t,openIcon:"post_add",closeIcon:"post_add",children:(0,Pt.jsx)(At,{stopPropagation:!1,links:this.getTypeLinks(),onClick:function(t){return e.addBlock(t,r)}})},r):null}},{key:"optionDropdownClick",value:function(t,e,r){"delete"===t&&this.removeBlock(e,r)}},{key:"getTypeLinks",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[t.props.blocks[e].name,e]}))}},{key:"getTypeLinksInsertBelow",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[vt.get("snippets.insert_singular_below",{singular:t.props.blocks[e].name}),e]}))}},{key:"renderContentBlocks",value:function(){var t=this;return this.componentLists=[],this.state.addedBlocks.length?this.state.addedBlocks.map((function(e,r){if(!e)return null;var n=Zv.renderComponentsWith(e.components,e.data,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0);return t.componentLists.push([n,e.id,e.type]),(0,Pt.jsx)("div",{className:"content-blocks__item",children:(0,Pt.jsx)(md,{title:e.name,actions:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}},0),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Md(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Bd(t,e){for(var r=0;re?1:e>t?-1:0})),e.setState({tags:r,isLoading:!1})}));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"onCancel",value:function(){this.props.onCancel()}},{key:"onConfirm",value:function(){this.props.onConfirm(this.state.selectedTags)}},{key:"onTagClick",value:function(t){this.setState({selectedTags:[].concat(Ld(this.state.selectedTags),[t])})}},{key:"onSelectedTagClick",value:function(t){var e=this.state.selectedTags.filter((function(e){return e!==t}));this.setState({selectedTags:e})}},{key:"renderContent",value:function(){return this.state.isLoading?null:this.state.tags.length?(this.state.selectedTags.length&&(t=(0,Pt.jsxs)("div",{className:"tags-browser__selected",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.selected_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.selectedTags,onClick:this.onSelectedTagClick.bind(this)})]})),this.state.tags.length&&(e=(0,Pt.jsxs)("div",{className:"tags-browser__available",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.available_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.tags,onClick:this.onTagClick.bind(this)})]})),(0,Pt.jsxs)("div",{className:"tags-browser__tags",children:[t,e]})):(0,Pt.jsx)(Su,{children:vt.get("snippets.no_tags_available")});var t,e}},{key:"render",value:function(){return(0,Pt.jsx)(Bo,{style:"modal",title:vt.get("snippets.tags"),closeable:!0,onClose:this.onCancel.bind(this),footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:this.onCancel.bind(this)},0),(0,Pt.jsx)(Je,{text:vt.get("snippets.confirm"),onClick:this.onConfirm.bind(this)},1)],children:(0,Pt.jsx)("div",{className:"tags-browser",children:(0,Pt.jsx)("div",{className:"tags-browser__content",children:this.renderContent()})})})}}],r&&Bd(e.prototype,r),n&&Bd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hd,"defaultProps",{id:0,path:{},selectedTags:[],onCancel:function(){},onConfirm:function(t){}});const Wd=Hd;function Yd(t){return Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(t)}function qd(t){return function(t){if(Array.isArray(t))return $d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:function(){};clearTimeout(this.searchTimeout),t&&this.setState({autosuggestIsOpen:!1,tags:[].concat(qd(this.state.tags),[t])},e)}},{key:"removeLastTag",value:function(){this.setState({tags:this.state.tags.slice(0,-1)})}},{key:"autosuggest",value:function(t){var e=this;t.length>1&&mo.execute.get(this.props.path,this.props.id,"autosuggest",{search:t}).then((function(t){e.setState({autosuggestIsOpen:!0,autosuggest:t.data})}))}},{key:"openBrowser",value:function(){this.setState({browserIsOpen:!0})}},{key:"closeBrowser",value:function(){this.setState({browserIsOpen:!1})}},{key:"confirmBrowser",value:function(t){this.setState({tags:t,browserIsOpen:!1})}},{key:"render",value:function(){var t,e,r=this;return this.state.autosuggestIsOpen&&this.state.autosuggest.length&&(e=(0,Pt.jsx)("div",{className:"tags-field__autosuggest",children:this.state.autosuggest.map((function(t,e){return(0,Pt.jsx)("div",{className:"tags-field__autosuggestion",onClick:function(e){return r.handleSuggestionClick(t)},children:t},e)}))})),this.state.browserIsOpen&&(t=(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Wd,{id:this.props.id,path:this.props.path,selectedTags:this.state.tags,onCancel:this.closeBrowser.bind(this),onConfirm:function(t){return r.confirmBrowser(t)}})})),(0,Pt.jsx)(we,{name:this.props.name,required:this.props.showRequiredIndicator,label:this.props.label,errors:this.props.errors,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"tags-field",children:(0,Pt.jsxs)("div",{className:"tags-field__wrap",children:[(0,Pt.jsx)("div",{className:"tags-field__browse",children:(0,Pt.jsx)(Ro,{style:"transparent",name:"fact_check",onClick:this.openBrowser.bind(this)})}),(0,Pt.jsx)("div",{className:"tags-field__tags",children:(0,Pt.jsx)(Nd,{tags:this.state.tags})}),(0,Pt.jsx)("div",{className:"tags-field__input",children:(0,Pt.jsx)("input",{className:"tags-field__input-field",ref:this.inputRef,onChange:this.handleChange.bind(this),onKeyUp:this.handleKeyUp.bind(this),onKeyDown:this.handleKeyDown.bind(this),onBlur:this.handleBlur.bind(this)})}),e,t]})})})}}],r&&Xd(e.prototype,r),n&&Xd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}function rh(t,e){for(var r=0;r1,r=this.props.currentPaget.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:t.options,defaultValues:r.values,onChange:a,onClear:a})})})}Bh.defaultProps={id:0,type:"",options:{},field:"",label:"",data:{},onChange:function(){}};const Uh=Bh;function Vh(t){return Vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(t)}function zh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gh(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:r.options,defaultValues:r.values,onChange:a,onClear:a})})})}qh.defaultProps={id:0,type:"",field:"",label:"",titleColumn:"",data:{},onChange:function(){}};const $h=qh;function Xh(t){return Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(t)}function Kh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(e){return t.state.options[e]}));this.setState({humanReadableValue:r.length?r.join(", "):vt.get("snippets.tags_all")}),this.props.onChange(this.props.id,e.join(","))}},{key:"clear",value:function(){this.selectListRef.current.clear()}},{key:"onCtxMenuClick",value:function(t){"clear"===t&&this.clear()}},{key:"render",value:function(){var t=this.props.label?this.props.label:vt.get("snippets.tag");return(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(Wt,{onClick:this.onCtxMenuClick.bind(this),links:[["Clear this filter","clear"]],children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:t,text:this.state.humanReadableValue,children:(0,Pt.jsx)(zi,{options:this.state.options,onChange:this.handleChange.bind(this),onClear:this.handleChange.bind(this),ref:this.selectListRef})})})})}}],r&&Kh(e.prototype,r),n&&Kh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=ty(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ey,"defaultProps",{id:0,type:"",label:"",onChange:function(){}});const ry=ey;function ny(t){return ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(t)}function oy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function iy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5];return t.map((function(t,s){var u=a?o.createRef():null,c=ly[t.type];return{filter:n((0,Pt.jsx)(c,dy(dy({},t),{},{data:e,path:r,onChange:i})),s),ref:u}}))}};function my(t){return my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(t)}function vy(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function by(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{};this.state.searchKeyword&&(e.search=this.state.searchKeyword);for(var r=!1,n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]})),t.setState({items:n,options:o},(function(){e&&e()}))}))}},{key:"getData",value:function(t){return t[this.props.name]=this.state.selectedItems||[],t}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.selectedItemsIds||[]}},{key:"handleChange",value:function(t){this.setState({selectedItemsIds:t,selectedItems:this.state.items.filter((function(e){return t.includes("".concat(e.id))}))})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,selectedItemsIds:[].concat(qy(e.state.selectedItemsIds),[t.data.data.id])})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return Zv.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return Zv.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"many-to-many-select-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,errors:this.props.errors,children:[(0,Pt.jsx)("div",{className:"many-to-many-select-field",children:(0,Pt.jsx)("div",{className:"many-to-many-select-field__field",children:(0,Pt.jsx)(ca,{multiple:!0,value:this.state.selectedItemsIds,options:this.state.options,nullText:"– "+vt.get("snippets.no_plural_selected",{plural:this.props.plural})+" –",onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Xy(e.prototype,r),n&&Xy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Qy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(tm,"defaultProps",{path:{},data:{},label:"",name:"",style:"",singular:"",plural:"",titleColumn:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const em=tm;function rm(t){return rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(t)}function nm(t){return function(t){if(Array.isArray(t))return om(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return om(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return om(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function om(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedItems.length-1)){var e=this.state.addedItems,r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedItems:e})}}},{key:"removeItem",value:function(t){var e=this.state.addedItems;e.splice(t,1),this.setState({addedItems:e})}},{key:"renderItems",value:function(){var t=this;return this.componentLists=[],this.state.addedItems.length?this.state.addedItems.map((function(e,r){var n=Zv.renderComponentsWith(t.props.components,e,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"json-field__component",children:t},e)}),!0,t.props.errors);return t.componentLists.push(n),(0,Pt.jsxs)("div",{className:"json-field__item",children:[(0,Pt.jsx)("div",{className:"json-field__item-content",children:n.map((function(t){return t.component}))}),(0,Pt.jsxs)("div",{className:"json-field__item-actions",children:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}}),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null,e={},r={};this.componentList.forEach((function(t){t.ref.current.getData&&t.ref.current.getData(e),t.ref.current.handleSubmit&&t.ref.current.handleSubmit(r)})),this.setState({isStored:!0,data:e,submitData:r,isOpen:!1},(function(){t&&t()}))}},{key:"renderComponents",value:function(){return this.componentList=Zv.renderComponentsWith(this.props.components,this.state.isStored?this.state.data:this.props.data,this.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0),this.componentList.map((function(t){return t.component}))}},{key:"renderWidget",value:function(){var t=this;return(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:this.props.title,style:"modal",closeable:!0,onClose:this.close.bind(this),footer:[(0,Pt.jsx)(Je,{text:"Confirm",onClick:function(){t.store()}},"confirm")],children:this.renderComponents()})})}},{key:"render",value:function(){return(0,Pt.jsxs)(o.Fragment,{children:[(0,Pt.jsx)(we,{label:this.props.label,tooltip:this.props.tooltip,children:"link"===this.props.style?(0,Pt.jsx)(ar,{style:this.props.style,onClick:this.open.bind(this),text:this.props.title}):(0,Pt.jsx)(Je,{style:["small","secondary"],text:this.props.title,onClick:this.open.bind(this)})}),(0,Pt.jsx)("div",{style:{display:this.state.isOpen?"block":"none"},children:this.renderWidget()})]})}}],r&&jv(e.prototype,r),n&&jv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=_v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Ev,"defaultProps",{title:"",label:"",components:[],path:{},data:{},errors:{},style:null});const kv=Ev;function Cv(t){return Cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cv(t)}function Tv(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return t.map((function(t,s){var u=null;i&&(u=o.createRef());var c=Yv[t.type];return{component:n((0,Pt.jsx)(c,Xv(Xv({},t),{},{data:e,errors:a,path:r,ref:u})),s),ref:u}}))}};var Jv=r(2151),Qv={insert:"head",singleton:!1};Ot()(Jv.Z,Qv);Jv.Z.locals;function tb(t){return(0,Pt.jsx)("div",{className:xt.className("checkbox",t.style)+(t.checked?" checkbox--checked":""),onClick:t.onClick})}tb.defaultProps={style:[],checked:!1,onClick:function(){}};const eb=tb;function rb(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ub(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==f[0]?f[0]:{},i=!1,s=0;st&&t[e]?t[e]:r||null),t)}function Ob(t){return"object"==typeof t}const jb="dnd-core/INIT_COORDS",Sb="dnd-core/BEGIN_DRAG",xb="dnd-core/PUBLISH_DRAG_SOURCE",Pb="dnd-core/HOVER",_b="dnd-core/DROP",Eb="dnd-core/END_DRAG";function kb(t,e){return{type:jb,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Cb={type:jb,payload:{clientOffset:null,sourceClientOffset:null}};function Tb(t){return function(e=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:i}=r,a=t.getMonitor(),s=t.getRegistry();t.dispatch(kb(o)),function(t,e,r){gb(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){gb(r.getSource(t),"Expected sourceIds to be registered.")}))}(e,a,s);const u=function(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,a);if(null==u)return void t.dispatch(Cb);let c=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(t){gb("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),c=i(u)}t.dispatch(kb(o,c));const l=s.getSource(u).beginDrag(a,u);if(null==l)return;!function(t){gb(Ob(t),"Item must be an object.")}(l),s.pinSource(u);const f=s.getSourceType(u);return{type:Sb,payload:{itemType:f,item:l,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!n}}}}function Rb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Db(t){for(var e=1;e{const a=function(t,e,r,n){const o=r.getTarget(t);let i=o?o.drop(n,t):void 0;(function(t){gb(void 0===t||Ob(t),"Drop result must either be an object or undefined.")})(i),void 0===i&&(i=0===e?{}:n.getDropResult());return i}(o,i,n,r),s={type:_b,payload:{dropResult:Db({},e,a)}};t.dispatch(s)}))}}function Ib(t){return function(){const e=t.getMonitor(),r=t.getRegistry();!function(t){gb(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);const n=e.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(e,n),r.unpinSource()}return{type:Eb}}}function Lb(t,e){return null===e?null===t:Array.isArray(t)?t.some((t=>t===e)):t===e}function Ab(t){return function(e,{clientOffset:r}={}){!function(t){gb(Array.isArray(t),"Expected targetIds to be an array.")}(e);const n=e.slice(0),o=t.getMonitor(),i=t.getRegistry();return function(t,e,r){for(let n=t.length-1;n>=0;n--){const o=t[n];Lb(e.getTargetType(o),r)||t.splice(n,1)}}(n,i,o.getItemType()),function(t,e,r){gb(e.isDragging(),"Cannot call hover while not dragging."),gb(!e.didDrop(),"Cannot call hover after drop.");for(let e=0;e{const i=r[o];var a;return n[o]=(a=i,(...r)=>{const n=a.apply(t,r);void 0!==n&&e(n)}),n}),{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const t=this.store.getState().refCount>0;this.backend&&(t&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!t&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function Bb(t,e){return{x:t.x-e.x,y:t.y-e.y}}const Ub=[],Vb=[];Ub.__IS_NONE__=!0,Vb.__IS_ALL__=!0;class zb{subscribeToStateChange(t,e={}){const{handlerIds:r}=e;gb("function"==typeof t,"listener must be a function."),gb(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const e=this.store.getState(),o=e.stateId;try{const i=o===n||o===n+1&&!function(t,e){return t!==Ub&&(t===Vb||void 0===e||(r=t,e.filter((t=>r.indexOf(t)>-1))).length>0);var r}(e.dirtyHandlerIds,r);i||t()}finally{n=o}}))}subscribeToOffsetChange(t){gb("function"==typeof t,"listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==e&&(e=r,t())}))}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return gb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);if(gb(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;return Lb(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);if(gb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:r}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Lb(n,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(t);return r?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return e&&r&&n?Bb(function(t,e){return{x:t.x+e.x,y:t.y+e.y}}(e,n),r):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:r}=t;return e&&r?Bb(e,r):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const Gb="undefined"!=typeof global?global:self,Hb=Gb.MutationObserver||Gb.WebKitMutationObserver;function Wb(t){return function(){const e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}const Yb="function"==typeof Hb?function(t){let e=1;const r=new Hb(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}:Wb;class qb{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const $b=new class{enqueueTask(t){const{queue:e,requestFlush:r}=this;e.length||(r(),this.flushing=!0),e[e.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let e=0,r=t.length-this.index;e{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Yb(this.flush),this.requestErrorThrow=Wb((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},Xb=new class{create(t){const e=this.freeTasks,r=e.length?e.pop():new qb(this.onError,(t=>e[e.length]=t));return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}($b.registerPendingError);const Kb="dnd-core/ADD_SOURCE",Zb="dnd-core/ADD_TARGET",Jb="dnd-core/REMOVE_SOURCE",Qb="dnd-core/REMOVE_TARGET";function tg(t,e){e&&Array.isArray(t)?t.forEach((t=>tg(t,!1))):gb("string"==typeof t||"symbol"==typeof t,e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var eg;!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(eg||(eg={}));let rg=0;function ng(t){const e=(rg++).toString();switch(t){case eg.SOURCE:return`S${e}`;case eg.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function og(t){switch(t[0]){case"S":return eg.SOURCE;case"T":return eg.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function ig(t,e){const r=t.entries();let n=!1;do{const{done:t,value:[,o]}=r.next();if(o===e)return!0;n=!!t}while(!n);return!1}class ag{addSource(t,e){tg(t),function(t){gb("function"==typeof t.canDrag,"Expected canDrag to be a function."),gb("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),gb("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);const r=this.addHandler(eg.SOURCE,t,e);return this.store.dispatch(function(t){return{type:Kb,payload:{sourceId:t}}}(r)),r}addTarget(t,e){tg(t,!0),function(t){gb("function"==typeof t.canDrop,"Expected canDrop to be a function."),gb("function"==typeof t.hover,"Expected hover to be a function."),gb("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);const r=this.addHandler(eg.TARGET,t,e);return this.store.dispatch(function(t){return{type:Zb,payload:{targetId:t}}}(r)),r}containsHandler(t){return ig(this.dragSources,t)||ig(this.dropTargets,t)}getSource(t,e=!1){gb(this.isSourceId(t),"Expected a valid source ID.");return e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return gb(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return gb(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return gb(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return og(t)===eg.SOURCE}isTargetId(t){return og(t)===eg.TARGET}removeSource(t){var e;gb(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:Jb,payload:{sourceId:t}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},$b.enqueueTask(Xb.create(e))}removeTarget(t){gb(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:Qb,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);gb(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){gb(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,r){const n=ng(t);return this.types.set(n,e),t===eg.SOURCE?this.dragSources.set(n,r):t===eg.TARGET&&this.dropTargets.set(n,r),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const sg=(t,e)=>t===e;function ug(t=Ub,e){switch(e.type){case Pb:break;case Kb:case Zb:case Qb:case Jb:return Ub;default:return Vb}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,o=function(t,e){const r=new Map,n=t=>{r.set(t,r.has(t)?r.get(t)+1:1)};t.forEach(n),e.forEach(n);const o=[];return r.forEach(((t,e)=>{1===t&&o.push(e)})),o}(r,n),i=o.length>0||!function(t,e,r=sg){if(t.length!==e.length)return!1;for(let n=0;nt!==o)))});case _b:return dg({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Eb:return dg({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}var n,o}function mg(t=0,e){switch(e.type){case Kb:case Zb:return t+1;case Jb:case Qb:return t-1;default:return t}}function vg(t=0){return t+1}function bg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gg(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}let xg=0;const Pg=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var _g=(0,o.memo)((function(t){var{children:e}=t,r=Sg(t,["children"]);const[n,i]=function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}const e=function(t,e=Eg(),r,n){const o=e;o[Pg]||(o[Pg]={dragDropManager:Og(t,e,r,n)});return o[Pg]}(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}(r);return(0,o.useEffect)((()=>{if(i){const t=Eg();return++xg,()=>{0==--xg&&(t[Pg]=null)}}}),[]),(0,Pt.jsx)(jg.Provider,{value:n,children:e})}));function Eg(){return"undefined"!=typeof global?global:window}function kg(t){let e=null;return()=>(null==e&&(e=t()),e)}class Cg{enter(t){const e=this.entered.length;return this.entered=function(t,e){const r=new Set,n=t=>r.add(t);t.forEach(n),e.forEach(n);const o=[];return r.forEach((t=>o.push(t))),o}(this.entered.filter((e=>this.isNodeInDocument(e)&&(!e.contains||e.contains(t)))),[t]),0===e&&this.entered.length>0}leave(t){const e=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=t,r.filter((t=>t!==n))),e>0&&0===this.entered.length}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Tg{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})}))}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach((r=>{const n=this.config.exposeProperties[r];null!=n&&(e[r]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Rg="__NATIVE_FILE__",Dg="__NATIVE_URL__",Ng="__NATIVE_TEXT__",Ig="__NATIVE_HTML__";function Lg(t,e,r){const n=e.reduce(((e,r)=>e||t.getData(r)),"");return null!=n?n:r}const Ag={[Rg]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Ig]:{exposeProperties:{html:(t,e)=>Lg(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Dg]:{exposeProperties:{urls:(t,e)=>Lg(t,e,"").split("\n"),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Ng]:{exposeProperties:{text:(t,e)=>Lg(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Fg(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ag).filter((t=>{const r=Ag[t];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some((t=>e.indexOf(t)>-1))}))[0]||null}const Mg=kg((()=>/firefox/i.test(navigator.userAgent))),Bg=kg((()=>Boolean(window.safari)));class Ug{interpolate(t){const{xs:e,ys:r,c1s:n,c2s:o,c3s:i}=this;let a=e.length-1;if(t===e[a])return r[a];let s,u=0,c=i.length-1;for(;u<=c;){s=Math.floor(.5*(u+c));const n=e[s];if(nt))return r[s];c=s-1}}a=Math.max(0,c);const l=t-e[a],f=l*l;return r[a]+n[a]*l+o[a]*f+i[a]*l*f}constructor(t,e){const{length:r}=t,n=[];for(let t=0;tt[e]{let t=new Ug([0,.5,1],[c.y,c.y/f*y,c.y+y-f]).interpolate(d);return Bg()&&i&&(t+=(window.devicePixelRatio-1)*y),t})()}}class Wg{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.globalContext)||void 0===t?void 0:t.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}constructor(t,e){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=e}}function Yg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qg(t){for(var e=1;e{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,r){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);const n=e=>this.handleDragStart(e,t),o=t=>this.handleSelectStart(t);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",o),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const r=e=>this.handleDragEnter(e,t),n=e=>this.handleDragOver(e,t),o=e=>this.handleDrop(e,t);return e.addEventListener("dragenter",r),e.addEventListener("dragover",n),e.addEventListener("drop",o),()=>{e.removeEventListener("dragenter",r),e.removeEventListener("dragover",n),e.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return qg({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return qg({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(n).some((e=>n[e]===t))}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){const r=Ag[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new Tg(r);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;this.mouseMoveTimeoutTimer=setTimeout((()=>{var t;return null===(t=this.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;if(this.currentDragSourceNode=null,this.rootElement)null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&zg(e)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=t=>Boolean(t&&this.document&&this.document.body&&this.document.body.contains(t)),this.endDragIfSourceWasRemovedFromDOM=()=>{const t=this.currentDragSourceNode;null==t||this.isNodeInDocument(t)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=t=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(t||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=t=>{if(t.defaultPrevented)return;const{dragStartSourceIds:e}=this;this.dragStartSourceIds=null;const r=Gg(t);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=t,o=Fg(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const t=this.monitor.getSourceId(),e=this.sourceNodes.get(t),o=this.sourcePreviewNodes.get(t)||e;if(o){const{anchorX:t,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),u=Hg(e,o,r,{anchorX:t,anchorY:i},{offsetX:a,offsetY:s});n.setDragImage(o,u.x,u.y)}}try{null==n||n.setData("application/json",{})}catch(t){}this.setCurrentDragSourceNode(t.target);const{captureDraggingState:e}=this.getCurrentSourcePreviewNodeOptions();e?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(o)this.beginDragNativeItem(o);else{if(n&&!n.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=t=>{var e;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer));if(!this.enterLeaveCounter.enter(t.target)||this.monitor.isDragging())return;const{dataTransfer:r}=t,n=Fg(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=t=>{const{dragEnterTargetIds:e}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=t.altKey,e.length>0&&this.actions.hover(e,{clientOffset:Gg(t)});e.some((t=>this.monitor.canDropOnTarget(t)))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=t=>{var e;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer))},this.handleTopDragOver=t=>{const{dragOverTargetIds:e}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));this.altKeyPressed=t.altKey,this.lastClientOffset=Gg(t),this.scheduleHover(e);(e||[]).some((t=>this.monitor.canDropOnTarget(t)))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=t=>{this.isDraggingNativeItem()&&t.preventDefault();this.enterLeaveCounter.leave(t.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=t=>{var e;(this.dropTargetIds=[],this.isDraggingNativeItem())?(t.preventDefault(),null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):Fg(t.dataTransfer)&&t.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=t=>{const{dropTargetIds:e}=this;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:Gg(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=t=>{const e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},this.options=new Wg(e,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Cg(this.isNodeInDocument)}}const Xg=function(t,e,r){return new $g(t,e,r)};let Kg;var Zg,Jg=[],Qg="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Zg||(Zg={}));var tw,ew=function(t){return Object.freeze(t)},rw=function(t,e){this.inlineSize=t,this.blockSize=e,ew(this)},nw=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ew(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),ow=function(t){return t instanceof SVGElement&&"getBBox"in t},iw=function(t){if(ow(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},aw=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},sw="undefined"!=typeof window?window:{},uw=new WeakMap,cw=/auto|scroll/,lw=/^tb|vertical/,fw=/msie|trident/i.test(sw.navigator&&sw.navigator.userAgent),pw=function(t){return parseFloat(t||"0")},dw=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new rw((r?e:t)||0,(r?t:e)||0)},hw=ew({devicePixelContentBoxSize:dw(),borderBoxSize:dw(),contentBoxSize:dw(),contentRect:new nw(0,0,0,0)}),yw=function(t,e){if(void 0===e&&(e=!1),uw.has(t)&&!e)return uw.get(t);if(iw(t))return uw.set(t,hw),hw;var r=getComputedStyle(t),n=ow(t)&&t.ownerSVGElement&&t.getBBox(),o=!fw&&"border-box"===r.boxSizing,i=lw.test(r.writingMode||""),a=!n&&cw.test(r.overflowY||""),s=!n&&cw.test(r.overflowX||""),u=n?0:pw(r.paddingTop),c=n?0:pw(r.paddingRight),l=n?0:pw(r.paddingBottom),f=n?0:pw(r.paddingLeft),p=n?0:pw(r.borderTopWidth),d=n?0:pw(r.borderRightWidth),h=n?0:pw(r.borderBottomWidth),y=f+c,m=u+l,v=(n?0:pw(r.borderLeftWidth))+d,b=p+h,g=s?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-v-t.clientWidth:0,O=o?y+v:0,j=o?m+b:0,S=n?n.width:pw(r.width)-O-w,x=n?n.height:pw(r.height)-j-g,P=S+y+w+v,_=x+m+g+b,E=ew({devicePixelContentBoxSize:dw(Math.round(S*devicePixelRatio),Math.round(x*devicePixelRatio),i),borderBoxSize:dw(P,_,i),contentBoxSize:dw(S,x,i),contentRect:new nw(f,u,S,x)});return uw.set(t,E),E},mw=function(t,e,r){var n=yw(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case Zg.DEVICE_PIXEL_CONTENT_BOX:return a;case Zg.BORDER_BOX:return o;default:return i}},vw=function(t){var e=yw(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=ew([e.borderBoxSize]),this.contentBoxSize=ew([e.contentBoxSize]),this.devicePixelContentBoxSize=ew([e.devicePixelContentBoxSize])},bw=function(t){if(iw(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},gw=function(){var t=1/0,e=[];Jg.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new vw(e.target),o=bw(e.target);n.push(r),e.lastReportedSize=mw(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},Ow=function(){var t,e=0;for(ww(e);Jg.some((function(t){return t.activeTargets.length>0}));)e=gw(),ww(e);return Jg.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:Qg}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=Qg),window.dispatchEvent(t)),e>0},jw=[],Sw=function(t){if(!tw){var e=0,r=document.createTextNode("");new MutationObserver((function(){return jw.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),tw=function(){r.textContent="".concat(e?e--:e++)}}jw.push(t),tw()},xw=0,Pw={attributes:!0,characterData:!0,childList:!0,subtree:!0},_w=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ew=function(t){return void 0===t&&(t=0),Date.now()+t},kw=!1,Cw=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!kw){kw=!0;var r=Ew(t);!function(t){Sw((function(){requestAnimationFrame(t)}))}((function(){var n=!1;try{n=Ow()}finally{if(kw=!1,t=r-Ew(),!xw)return;n?e.run(1e3):t>0?e.run(t):e.start()}}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,Pw)};document.body?e():sw.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),_w.forEach((function(e){return sw.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),_w.forEach((function(e){return sw.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),Tw=new Cw,Rw=function(t){!xw&&t>0&&Tw.start(),!(xw+=t)&&Tw.stop()},Dw=function(){function t(t,e){this.target=t,this.observedBox=e||Zg.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=mw(this.target,this.observedBox,!0);return t=this.target,ow(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Nw=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Iw=new WeakMap,Lw=function(t,e){for(var r=0;r=0&&(o&&Jg.splice(Jg.indexOf(r),1),r.observationTargets.splice(n,1),Rw(-1))},t.disconnect=function(t){var e=this,r=Iw.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Fw=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Aw.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aw(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Aw.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!aw(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Aw.unobserve(this,t)},t.prototype.disconnect=function(){Aw.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Mw=function(t,e){return Mw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Mw(t,e)};function Bw(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Mw(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Uw=function(){return Uw=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Gw(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o-1||/[A-Z]/.test(t))}var EO={};var kO=["","X","Y","Z"],CO=["transformPerspective","x","y","z"];function TO(t,e){return CO.indexOf(t)-CO.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return kO.forEach((function(e){return CO.push(t+e)}))}));var RO=new Set(CO);function DO(t){return RO.has(t)}var NO=new Set(["originX","originY","originZ"]);function IO(t){return NO.has(t)}function LO(t,e){var r=e.layout,n=e.layoutId;return DO(t)||IO(t)||(r||void 0!==n)&&(!!EO[t]||"opacity"===t)}var AO=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},FO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function MO(t){return t.startsWith("--")}var BO=function(t,e){return e&&"number"==typeof t?e.transform(t):t};const UO=(t,e)=>r=>Math.max(Math.min(r,e),t),VO=t=>t%1?Number(t.toFixed(5)):t,zO=/(-)?([\d]*\.?[\d])+/g,GO=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,HO=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function WO(t){return"string"==typeof t}const YO=t=>({test:e=>WO(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),qO=YO("deg"),$O=YO("%"),XO=YO("px"),KO=YO("vh"),ZO=YO("vw"),JO=Object.assign(Object.assign({},$O),{parse:t=>$O.parse(t)/100,transform:t=>$O.transform(100*t)}),QO={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},tj=Object.assign(Object.assign({},QO),{transform:UO(0,1)}),ej=Object.assign(Object.assign({},QO),{default:1});var rj=Uw(Uw({},QO),{transform:Math.round}),nj={borderWidth:XO,borderTopWidth:XO,borderRightWidth:XO,borderBottomWidth:XO,borderLeftWidth:XO,borderRadius:XO,radius:XO,borderTopLeftRadius:XO,borderTopRightRadius:XO,borderBottomRightRadius:XO,borderBottomLeftRadius:XO,width:XO,maxWidth:XO,height:XO,maxHeight:XO,size:XO,top:XO,right:XO,bottom:XO,left:XO,padding:XO,paddingTop:XO,paddingRight:XO,paddingBottom:XO,paddingLeft:XO,margin:XO,marginTop:XO,marginRight:XO,marginBottom:XO,marginLeft:XO,rotate:qO,rotateX:qO,rotateY:qO,rotateZ:qO,scale:ej,scaleX:ej,scaleY:ej,scaleZ:ej,skew:qO,skewX:qO,skewY:qO,distance:XO,translateX:XO,translateY:XO,translateZ:XO,x:XO,y:XO,z:XO,perspective:XO,transformPerspective:XO,opacity:tj,originX:JO,originY:JO,originZ:XO,zIndex:rj,fillOpacity:tj,strokeOpacity:tj,numOctaves:rj};function oj(t,e,r,n){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,c=t.transformOrigin;u.length=0;var l=!1,f=!1,p=!0;for(var d in e){var h=e[d];if(MO(d))a[d]=h;else{var y=nj[d],m=BO(h,y);if(DO(d)){if(l=!0,s[d]=m,u.push(d),!p)continue;h!==(null!==(o=y.default)&&void 0!==o?o:0)&&(p=!1)}else IO(d)?(c[d]=m,f=!0):i[d]=m}}l?i.transform=function(t,e,r,n){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,c=void 0===u||u,l="";i.sort(TO);for(var f=!1,p=i.length,d=0;dr=>e(t(r)),lS=(...t)=>t.reduce(cS);var fS=new Set;var pS=new WeakMap,dS=new WeakMap,hS=function(t){var e;null===(e=pS.get(t.target))||void 0===e||e(t)},yS=function(t){t.forEach(hS)};function mS(t,e,r){var n=function(t){var e=t.root,r=Vw(t,["root"]),n=e||document;dS.has(n)||dS.set(n,{});var o=dS.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(yS,Uw({root:e},r))),o[i]}(e);return pS.set(t,r),n.observe(t),function(){pS.delete(t),n.unobserve(t)}}var vS={some:0,all:1};function bS(t,e,r,n){var i=n.root,a=n.margin,s=n.amount,u=void 0===s?"some":s,c=n.once;(0,o.useEffect)((function(){if(t){var n={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof u?u:vS[u]};return mS(r.getInstance(),n,(function(t){var n,o=t.isIntersecting;if(e.isInView!==o&&(e.isInView=o,!c||o||!e.hasEnteredView)){o&&(e.hasEnteredView=!0),null===(n=r.animationState)||void 0===n||n.setActive(Lj.InView,o);var i=r.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,u])}function gS(t,e,r,n){var i=n.fallback,a=void 0===i||i;(0,o.useEffect)((function(){var n,o;t&&a&&("production"!==Ww&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||fS.has(n)||(console.warn(n),o&&console.warn(o),fS.add(n))),requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var n=r.getProps().onViewportEnter;null==n||n(null),null===(t=r.animationState)||void 0===t||t.setActive(Lj.InView,!0)})))}),[t])}var wS=function(t){return function(e){return t(e),null}},OS={inView:wS((function(t){var e=t.visualElement,r=t.whileInView,n=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=(0,o.useRef)({hasEnteredView:!1,isInView:!1}),c=Boolean(r||n||i);s.once&&u.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?gS:bS)(c,u.current,e,s)})),tap:wS((function(t){var e=t.onTap,r=t.onTapStart,n=t.onTapCancel,i=t.whileTap,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(!1),c=(0,o.useRef)(null),l={passive:!(r||e||n||y)};function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function p(){var t;return f(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(Lj.Tap,!1),!iS()}function d(t,r){p()&&(sS(a.getInstance(),t.target)?null==e||e(t,r):null==n||n(t,r))}function h(t,e){p()&&(null==n||n(t,e))}function y(t,e){var n;f(),u.current||(u.current=!0,c.current=lS(Qj(window,"pointerup",d,l),Qj(window,"pointercancel",h,l)),null===(n=a.animationState)||void 0===n||n.setActive(Lj.Tap,!0),null==r||r(t,e))}tS(a,"pointerdown",s?y:void 0,l),uS(f)})),focus:wS((function(t){var e=t.whileFocus,r=t.visualElement;Bj(r,"focus",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Lj.Focus,!0)}:void 0),Bj(r,"blur",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Lj.Focus,!1)}:void 0)})),hover:wS((function(t){var e=t.onHoverStart,r=t.onHoverEnd,n=t.whileHover,o=t.visualElement;tS(o,"pointerenter",e||n?aS(o,!0,e):void 0,{passive:!e}),tS(o,"pointerleave",r||n?aS(o,!1,r):void 0,{passive:!r})}))},jS=0,SS=function(){return jS++},xS=function(){return vO(SS)};function PS(){var t=(0,o.useContext)(eO);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,n=t.register,i=xS();(0,o.useEffect)((function(){return n(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function _S(t,e){if(!Array.isArray(e))return!1;var r=e.length;if(r!==t.length)return!1;for(var n=0;nMath.min(Math.max(r,t),e),kS=.001,CS=.01,TS=10,RS=.05,DS=1;function NS({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let o,i;$w(t<=1e3*TS,"Spring duration must be 10 seconds or less");let a=1-e;a=ES(RS,DS,a),t=ES(CS,TS,t/1e3),a<1?(o=e=>{const n=e*a,o=n*t,i=n-r,s=LS(e,a),u=Math.exp(-o);return kS-i/s*u},i=e=>{const n=e*a*t,i=n*r+r,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-n),c=LS(Math.pow(e,2),a);return(-o(e)+kS>0?-1:1)*((i-s)*u)/c}):(o=e=>Math.exp(-e*t)*((e-r)*t+1)-kS,i=e=>Math.exp(-e*t)*(t*t*(r-e)));const s=function(t,e,r){let n=r;for(let r=1;rvoid 0!==t[e]))}function BS(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:o}=t,i=Vw(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:s,damping:u,mass:c,velocity:l,duration:f,isResolvedFromDuration:p}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!MS(t,FS)&&MS(t,AS)){const r=NS(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),d=US,h=US;function y(){const t=l?-l/1e3:0,n=r-e,i=u/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(r-e)/100,.4)),i<1){const e=LS(a,i);d=o=>{const s=Math.exp(-i*a*o);return r-s*((t+i*a*n)/e*Math.sin(e*o)+n*Math.cos(e*o))},h=r=>{const o=Math.exp(-i*a*r);return i*a*o*(Math.sin(e*r)*(t+i*a*n)/e+n*Math.cos(e*r))-o*(Math.cos(e*r)*(t+i*a*n)-e*n*Math.sin(e*r))}}else if(1===i)d=e=>r-Math.exp(-a*e)*(n+(t+a*n)*e);else{const e=a*Math.sqrt(i*i-1);d=o=>{const s=Math.exp(-i*a*o),u=Math.min(e*o,300);return r-s*((t+i*a*n)*Math.sinh(u)+e*n*Math.cosh(u))/e}}}return y(),{next:t=>{const e=d(t);if(p)a.done=t>=f;else{const i=1e3*h(t),s=Math.abs(i)<=n,u=Math.abs(r-e)<=o;a.done=s&&u}return a.value=a.done?r:e,a},flipTarget:()=>{l=-l,[e,r]=[r,e],y()}}}BS.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const US=t=>0,VS=(t,e,r)=>{const n=e-t;return 0===n?1:(r-t)/n},zS=(t,e,r)=>-r*t+r*e+t,GS=(t,e)=>r=>Boolean(WO(r)&&HO.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),HS=(t,e,r)=>n=>{if(!WO(n))return n;const[o,i,a,s]=n.match(zO);return{[t]:parseFloat(o),[e]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},WS=UO(0,255),YS=Object.assign(Object.assign({},QO),{transform:t=>Math.round(WS(t))}),qS={test:GS("rgb","red"),parse:HS("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+YS.transform(t)+", "+YS.transform(e)+", "+YS.transform(r)+", "+VO(tj.transform(n))+")"};const $S={test:GS("#"),parse:function(t){let e="",r="",n="",o="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),o=t.substr(4,1),e+=e,r+=r,n+=n,o+=o),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:qS.transform},XS={test:GS("hsl","hue"),parse:HS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+$O.transform(VO(e))+", "+$O.transform(VO(r))+", "+VO(tj.transform(n))+")"};function KS(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ZS({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,r/=100;let o=0,i=0,a=0;if(e/=100){const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;o=KS(s,n,t+1/3),i=KS(s,n,t),a=KS(s,n,t-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}const JS=(t,e,r)=>{const n=t*t,o=e*e;return Math.sqrt(Math.max(0,r*(o-n)+n))},QS=[$S,qS,XS],tx=t=>QS.find((e=>e.test(t))),ex=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,rx=(t,e)=>{let r=tx(t),n=tx(e);Xw(!!r,ex(t)),Xw(!!n,ex(e));let o=r.parse(t),i=n.parse(e);r===XS&&(o=ZS(o),r=qS),n===XS&&(i=ZS(i),n=qS);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=JS(o[e],i[e],t));return a.alpha=zS(o.alpha,i.alpha,t),r.transform(a)}},nx={test:t=>qS.test(t)||$S.test(t)||XS.test(t),parse:t=>qS.test(t)?qS.parse(t):XS.test(t)?XS.parse(t):$S.parse(t),transform:t=>WO(t)?t:t.hasOwnProperty("red")?qS.transform(t):XS.transform(t)},ox="${c}",ix="${n}";function ax(t){"number"==typeof t&&(t=`${t}`);const e=[];let r=0;const n=t.match(GO);n&&(r=n.length,t=t.replace(GO,ox),e.push(...n.map(nx.parse)));const o=t.match(zO);return o&&(t=t.replace(zO,ix),e.push(...o.map(QO.parse))),{values:e,numColors:r,tokenised:t}}function sx(t){return ax(t).values}function ux(t){const{values:e,numColors:r,tokenised:n}=ax(t),o=e.length;return t=>{let e=n;for(let n=0;n"number"==typeof t?0:t;const lx={test:function(t){var e,r,n,o;return isNaN(t)&&WO(t)&&(null!==(r=null===(e=t.match(zO))||void 0===e?void 0:e.length)&&void 0!==r?r:0)+(null!==(o=null===(n=t.match(GO))||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0},parse:sx,createTransformer:ux,getAnimatableNone:function(t){const e=sx(t);return ux(t)(e.map(cx))}},fx=t=>"number"==typeof t;function px(t,e){return fx(t)?r=>zS(t,e,r):nx.test(t)?rx(t,e):mx(t,e)}const dx=(t,e)=>{const r=[...t],n=r.length,o=t.map(((t,r)=>px(t,e[r])));return t=>{for(let e=0;e{const r=Object.assign(Object.assign({},t),e),n={};for(const o in r)void 0!==t[o]&&void 0!==e[o]&&(n[o]=px(t[o],e[o]));return t=>{for(const e in n)r[e]=n[e](t);return r}};function yx(t){const e=lx.parse(t),r=e.length;let n=0,o=0,i=0;for(let t=0;t{const r=lx.createTransformer(e),n=yx(t),o=yx(e);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?lS(dx(n.parsed,o.parsed),r):($w(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),r=>`${r>0?e:t}`)},vx=(t,e)=>r=>zS(t,e,r);function bx(t,e,r){const n=[],o=r||("number"==typeof(i=t[0])?vx:"string"==typeof i?nx.test(i)?rx:mx:Array.isArray(i)?dx:"object"==typeof i?hx:void 0);var i;const a=t.length-1;for(let r=0;rt[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=bx(e,n,o),s=2===i?function([t,e],[r]){return n=>r(VS(t,e,n))}(t,a):function(t,e){const r=t.length,n=r-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[n]&&(i=n-1,a=!0),!a){let e=1;for(;eo||e===n);e++);i=e-1}const s=VS(t[i],t[i+1],o);return e[i](s)}}(t,a);return r?e=>s(ES(t[0],t[i-1],e)):s}const wx=t=>e=>1-t(1-e),Ox=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jx=t=>e=>e*e*((t+1)*e-t),Sx=t=>t,xx=(Px=2,t=>Math.pow(t,Px));var Px;const _x=wx(xx),Ex=Ox(xx),kx=t=>1-Math.sin(Math.acos(t)),Cx=wx(kx),Tx=Ox(Cx),Rx=jx(1.525),Dx=wx(Rx),Nx=Ox(Rx),Ix=(t=>{const e=jx(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Lx=t=>{if(1===t||0===t)return t;const e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Ax=wx(Lx);function Fx(t,e){return t.map((()=>e||Ex)).splice(0,t.length-1)}function Mx({from:t=0,to:e=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map((t=>t*e))}(n&&n.length===a.length?n:function(t){const e=t.length;return t.map(((t,r)=>0!==r?r/(e-1):0))}(a),o);function u(){return gx(s,a,{ease:Array.isArray(r)?r:Fx(a,r)})}let c=u();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=u()}}}const Bx={keyframes:Mx,spring:BS,decay:function({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let s=r*t;const u=e+s,c=void 0===i?u:i(u);return c!==u&&(s=c-e),{next:t=>{const e=-s*Math.exp(-t/n);return a.done=!(e>o||e<-o),a.value=a.done?c:c+e,a},flipTarget:()=>{}}}};const Ux=1/60*1e3,Vx="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),zx="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout((()=>t(Vx())),Ux);let Gx=!0,Hx=!1,Wx=!1;const Yx={delta:0,timestamp:0},qx=["read","update","preRender","render","postRender"],$x=qx.reduce(((t,e)=>(t[e]=function(t){let e=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,c=u?e:r;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),u&&o&&(n=e.length)),t},cancel:t=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1),a.delete(t)},process:u=>{if(o)i=!0;else{if(o=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let r=0;rHx=!0)),t)),{}),Xx=qx.reduce(((t,e)=>{const r=$x[e];return t[e]=(t,e=!1,n=!1)=>(Hx||tP(),r.schedule(t,e,n)),t}),{}),Kx=qx.reduce(((t,e)=>(t[e]=$x[e].cancel,t)),{}),Zx=qx.reduce(((t,e)=>(t[e]=()=>$x[e].process(Yx),t)),{}),Jx=t=>$x[t].process(Yx),Qx=t=>{Hx=!1,Yx.delta=Gx?Ux:Math.max(Math.min(t-Yx.timestamp,40),1),Yx.timestamp=t,Wx=!0,qx.forEach(Jx),Wx=!1,Hx&&(Gx=!1,zx(Qx))},tP=()=>{Hx=!0,Gx=!0,Wx||zx(Qx)},eP=()=>Yx,rP=Xx;function nP(t,e,r=0){return t-e-r}const oP=t=>{const e=({delta:e})=>t(e);return{start:()=>rP.update(e,!0),stop:()=>Kx.update(e)}};function iP(t){var e,r,{from:n,autoplay:o=!0,driver:i=oP,elapsed:a=0,repeat:s=0,repeatType:u="loop",repeatDelay:c=0,onPlay:l,onStop:f,onComplete:p,onRepeat:d,onUpdate:h}=t,y=Vw(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let m,v,b,{to:g}=y,w=0,O=y.duration,j=!1,S=!0;const x=function(t){if(Array.isArray(t.to))return Mx;if(Bx[t.type])return Bx[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Mx:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?BS:Mx}(y);(null===(r=(e=x).needsInterpolation)||void 0===r?void 0:r.call(e,n,g))&&(b=gx([0,100],[n,g],{clamp:!1}),n=0,g=100);const P=x(Object.assign(Object.assign({},y),{from:n,to:g}));function _(){w++,"reverse"===u?(S=w%2==0,a=function(t,e,r=0,n=!0){return n?nP(e+-t,e,r):e-(t-e)+r}(a,O,c,S)):(a=nP(a,O,c),"mirror"===u&&P.flipTarget()),j=!1,d&&d()}function E(t){if(S||(t=-t),a+=t,!j){const t=P.next(Math.max(0,a));v=t.value,b&&(v=b(v)),j=S?t.done:a<=0}null==h||h(v),j&&(0===w&&(null!=O||(O=a)),w=e+r:t<=-r}(a,O,c,S)&&_():(m.stop(),p&&p()))}return o&&(null==l||l(),m=i(E),m.start()),{stop:()=>{null==f||f(),m.stop()}}}function aP(t,e){return e?t*(1e3/e):0}var sP=function(t){return 1e3*t};const uP=(t,e)=>1-3*e+3*t,cP=(t,e)=>3*e-6*t,lP=t=>3*t,fP=(t,e,r)=>((uP(e,r)*t+cP(e,r))*t+lP(e))*t,pP=(t,e,r)=>3*uP(e,r)*t*t+2*cP(e,r)*t+lP(e),dP=1e-7,hP=10;const yP=8,mP=.001;const vP=11,bP=1/(vP-1);function gP(t,e,r,n){if(t===e&&r===n)return Sx;const o=new Float32Array(vP);for(let e=0;e=mP?function(t,e,r,n){for(let o=0;o0?r=a:e=a}while(Math.abs(i)>dP&&++s0===t||1===t?t:fP(i(t),e,n)}var wP={linear:Sx,easeIn:xx,easeInOut:Ex,easeOut:_x,circIn:kx,circInOut:Tx,circOut:Cx,backIn:Rx,backInOut:Nx,backOut:Dx,anticipate:Ix,bounceIn:Ax,bounceInOut:t=>t<.5?.5*(1-Lx(1-2*t)):.5*Lx(2*t-1)+.5,bounceOut:Lx},OP=function(t){if(Array.isArray(t)){Xw(4===t.length,"Cubic bezier arrays must contain four numerical values.");var e=zw(t,4);return gP(e[0],e[1],e[2],e[3])}return"string"==typeof t?(Xw(void 0!==wP[t],"Invalid easing type '".concat(t,"'")),wP[t]):t},jP=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},SP=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!lx.test(e)||e.startsWith("url(")))},xP=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},PP=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},_P=function(){return{type:"keyframes",ease:"linear",duration:.3}},EP=function(t){return{type:"keyframes",duration:.8,values:t}},kP={x:xP,y:xP,z:xP,rotate:xP,rotateX:xP,rotateY:xP,rotateZ:xP,scaleX:PP,scaleY:PP,scale:PP,opacity:_P,backgroundColor:_P,color:_P,default:PP},CP=function(t,e){var r;return r=kj(e)?EP:kP[t]||kP.default,Uw({to:e},r(e))};const TP=new Set(["brightness","contrast","saturate","opacity"]);function RP(t){let[e,r]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=r.match(zO)||[];if(!n)return t;const o=r.replace(n,"");let i=TP.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+o+")"}const DP=/([a-z-]*)\(.*?\)/g,NP=Object.assign(Object.assign({},lx),{getAnimatableNone:t=>{const e=t.match(DP);return e?e.map(RP).join(" "):t}});var IP=Uw(Uw({},nj),{color:nx,backgroundColor:nx,outlineColor:nx,fill:nx,stroke:nx,borderColor:nx,borderTopColor:nx,borderRightColor:nx,borderBottomColor:nx,borderLeftColor:nx,filter:NP,WebkitFilter:NP}),LP=function(t){return IP[t]};function AP(t,e){var r,n=LP(t);return n!==NP&&(n=lx),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,e)}var FP={current:!1};var MP=!1;function BP(t,e,r){var n;return Array.isArray(e.to)&&(null!==(n=t.duration)&&void 0!==n||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Gw([],zw(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Vw(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Uw(Uw({},t),CP(r,e.to))),Uw(Uw({},e),function(t){var e=t.ease,r=t.times,n=t.yoyo,o=t.flip,i=t.loop,a=Vw(t,["ease","times","yoyo","flip","loop"]),s=Uw({},a);return r&&(s.offset=r),a.duration&&(s.duration=sP(a.duration)),a.repeatDelay&&(s.repeatDelay=sP(a.repeatDelay)),e&&(s.ease=jP(e)?e.map(OP):OP(e)),"tween"===a.type&&(s.type="keyframes"),(n||i||o)&&($w(!MP,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),MP=!0,n?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||n||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}(t))}function UP(t,e,r,n,o){var i,a=GP(n,t),s=null!==(i=a.from)&&void 0!==i?i:e.get(),u=SP(t,r);"none"===s&&u&&"string"==typeof r?s=AP(t,r):VP(s)&&"string"==typeof r?s=zP(r):!Array.isArray(r)&&VP(r)&&"string"==typeof s&&(r=zP(s));var c=SP(t,s);return $w(c===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(r,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(r," via the `style` property.")),c&&u&&!1!==a.type?function(){var n={from:s,to:r,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function({from:t=0,velocity:e=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:p,onStop:d}){let h;function y(t){return void 0!==r&&tn}function m(t){return void 0===r?n:void 0===n||Math.abs(r-t){var r;null==f||f(e),null===(r=t.onUpdate)||void 0===r||r.call(t,e)},onComplete:p,onStop:d}))}function b(t){v(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(y(t))b({from:t,velocity:e,to:m(t)});else{let n=o*e+t;void 0!==c&&(n=c(n));const a=m(n),s=a===r?-1:1;let l,f;const p=t=>{l=f,f=t,e=aP(t-l,eP().delta),(1===s&&t>a||-1===s&&tnull==h?void 0:h.stop()}}(Uw(Uw({},n),a)):iP(Uw(Uw({},BP(a,n,t)),{onUpdate:function(t){var e;n.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;n.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t,n,i=Tj(r);return e.set(i),o(),null===(t=null==a?void 0:a.onUpdate)||void 0===t||t.call(a,i),null===(n=null==a?void 0:a.onComplete)||void 0===n||n.call(a),{stop:function(){}}}}function VP(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function zP(t){return"number"==typeof t?0:AP("",t)}function GP(t,e){return t[e]||t.default||t}function HP(t,e,r,n){return void 0===n&&(n={}),FP.current&&(n={type:!1}),e.start((function(o){var i,a,s=UP(t,e,r,n,o),u=function(t,e){var r,n;return null!==(n=null!==(r=(GP(t,e)||{}).delay)&&void 0!==r?r:t.delay)&&void 0!==n?n:0}(n,t),c=function(){return a=s()};return u?i=window.setTimeout(c,sP(u)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var WP=function(t){return/^\-?\d*\.?\d+$/.test(t)},YP=function(t){return/^0[^.\s]+$/.test(t)};function qP(t,e){-1===t.indexOf(e)&&t.push(e)}function $P(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)}var XP=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return qP(this.subscriptions,t),function(){return $P(e.subscriptions,t)}},t.prototype.notify=function(t,e,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,r);else for(var o=0;oh&&v,j=Array.isArray(m)?m:[m],S=j.reduce(a,{});!1===b&&(S={});var x=y.prevResolvedValues,P=void 0===x?{}:x,_=Uw(Uw({},P),S),E=function(t){O=!0,p.delete(t),y.needsAnimating[t]=!0};for(var k in _){var C=S[k],T=P[k];d.hasOwnProperty(k)||(C!==T?kj(C)&&kj(T)?!_S(C,T)||w?E(k):y.protectedKeys[k]=!0:void 0!==C?E(k):p.add(k):void 0!==C&&p.has(k)?E(k):y.protectedKeys[k]=!0)}y.prevProp=m,y.prevResolvedValues=S,y.isActive&&(d=Uw(Uw({},d),S)),i&&t.blockInitialAnimation&&(O=!1),O&&!g&&f.push.apply(f,Gw([],zw(j.map((function(t){return{animation:t,options:Uw({type:o},e)}}))),!1))},m=0;mt.hasOwnProperty("x")&&t.hasOwnProperty("y"),g_=t=>b_(t)&&t.hasOwnProperty("z"),w_=(t,e)=>Math.abs(t-e);function O_(t,e){if(fx(t)&&fx(e))return w_(t,e);if(b_(t)&&b_(e)){const r=w_(t.x,e.x),n=w_(t.y,e.y),o=g_(t)&&g_(e)?w_(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}var j_=function(){function t(t,e,r){var n=this,o=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var t=P_(n.lastMoveEventInfo,n.history),e=null!==n.startEvent,r=O_(t.offset,{x:0,y:0})>=3;if(e||r){var o=t.point,i=eP().timestamp;n.history.push(Uw(Uw({},o),{timestamp:i}));var a=n.handlers,s=a.onStart,u=a.onMove;e||(s&&s(n.lastMoveEvent,t),n.startEvent=n.lastMoveEvent),u&&u(n.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){n.lastMoveEvent=t,n.lastMoveEventInfo=S_(e,n.transformPagePoint),Uj(t)&&0===t.buttons?n.handlePointerUp(t,e):rP.update(n.updatePoint,!0)},this.handlePointerUp=function(t,e){n.end();var r=n.handlers,o=r.onEnd,i=r.onSessionEnd,a=P_(S_(e,n.transformPagePoint),n.history);n.startEvent&&o&&o(t,a),i&&i(t,a)},!(Vj(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var i=S_(Wj(t),this.transformPagePoint),a=i.point,s=eP().timestamp;this.history=[Uw(Uw({},a),{timestamp:s})];var u=e.onSessionStart;u&&u(t,P_(i,this.history)),this.removeListeners=lS(Qj(window,"pointermove",this.handlePointerMove),Qj(window,"pointerup",this.handlePointerUp),Qj(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),Kx.update(this.updatePoint)},t}();function S_(t,e){return e?{point:e(t.point)}:t}function x_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function P_(t,e){var r=t.point;return{point:r,delta:x_(r,E_(e)),offset:x_(r,__(e)),velocity:k_(e,.1)}}function __(t){return t[0]}function E_(t){return t[t.length-1]}function k_(t,e){if(t.length<2)return{x:0,y:0};for(var r=t.length-1,n=null,o=E_(t);r>=0&&(n=t[r],!(o.timestamp-n.timestamp>sP(e)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function C_(t){return t.max-t.min}function T_(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),O_(t,e)e?r="y":Math.abs(t.x)>e&&(r="x");return r}(u),void(null!==r.currentDirection&&(null==a||a(r.currentDirection)));r.updateAxis("x",e.point,u),r.updateAxis("y",e.point,u),r.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return r.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var r=this.isDragging;if(this.cancel(),r){var n=e.velocity;this.startAnimation(n);var o=this.getProps().onDragEnd;null==o||o(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Lj.Drag,!1)},t.prototype.updateAxis=function(t,e,r){var n=this.getProps().drag;if(r&&sE(t,n,this.currentDirection)){var o,i,a,s,u,c=this.getAxisMotionValue(t),l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=l,i=this.constraints[t],a=this.elastic[t],s=i.min,u=i.max,void 0!==s&&ou&&(o=a?zS(u,o,a.max):Math.min(o,u)),l=o),c.set(l)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),r=e.dragConstraints,n=e.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;r&&uO(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!r||!o)&&function(t,e){var r=e.top,n=e.left,o=e.bottom,i=e.right;return{x:A_(t.x,n,i),y:A_(t.y,r,o)}}(o.actual,r),this.elastic=function(t){return void 0===t&&(t=M_),!1===t?t=0:!0===t&&(t=M_),{x:B_(t,"left","right"),y:B_(t,"top","bottom")}}(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&G_((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var r={};return void 0!==e.min&&(r.min=e.min-t.min),void 0!==e.max&&(r.max=e.max-t.min),r}(o.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,r=t.onMeasureDragConstraints;if(!e||!uO(e))return!1;var n=e.current;Xw(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(t,e,r){var n=oE(t,r),o=e.scroll;return o&&(Q_(n.x,o.x),Q_(n.y,o.y)),n}(n,o.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:F_(t.x,e.x),y:F_(t.y,e.y)}}(o.layout.actual,i);if(r){var s=r(function(t){var e=t.x,r=t.y;return{top:r.min,right:e.max,bottom:r.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=H_(s))}return a},t.prototype.startAnimation=function(t){var e=this,r=this.getProps(),n=r.drag,o=r.dragMomentum,i=r.dragElastic,a=r.dragTransition,s=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},l=G_((function(r){var u;if(sE(r,n,e.currentDirection)){var l=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{};s&&(l={min:0,max:0});var f=i?200:1e6,p=i?40:1e7,d=Uw(Uw({type:"inertia",velocity:o?t[r]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},a),l);return e.startAxisValueAnimation(r,d)}}));return Promise.all(l).then(u)},t.prototype.startAxisValueAnimation=function(t,e){return HP(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;G_((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,r,n="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[n];return o||this.visualElement.getValue(t,null!==(r=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==r?r:0)},t.prototype.snapToCursor=function(t){var e=this;G_((function(r){if(sE(r,e.getProps().drag,e.currentDirection)){var n=e.visualElement.projection,o=e.getAxisMotionValue(r);if(n&&n.layout){var i=n.layout.actual[r],a=i.min,s=i.max;o.set(t[r]-zS(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,r=this.getProps(),n=r.drag,o=r.dragConstraints,i=this.visualElement.projection;if(uO(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};G_((function(t){var r,n,o,i,s,u=e.getAxisMotionValue(t);if(u){var c=u.get();a[t]=(r={min:c,max:c},n=e.constraints[t],o=.5,i=C_(r),(s=C_(n))>i?o=VS(n.min,n.max-i,r.min):i>s&&(o=VS(r.min,r.max-s,n.min)),ES(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),G_((function(t){if(sE(t,n,null)){var r=e.getAxisMotionValue(t),o=e.constraints[t],i=o.min,s=o.max;r.set(zS(i,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;iE.set(this.visualElement,this);var r=Qj(this.visualElement.getInstance(),"pointerdown",(function(t){var r=e.getProps(),n=r.drag,o=r.dragListener;n&&(void 0===o||o)&&e.start(t)})),n=function(){uO(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();var a=Mj(window,"resize",(function(){return e.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(t){var r=t.delta,n=t.hasLayoutChanged;e.isDragging&&n&&(G_((function(t){var n=e.getAxisMotionValue(t);n&&(e.originPoint[t]+=r[t].translate,n.set(n.get()+r[t].translate))})),e.visualElement.syncRender())})),function(){a(),r(),i()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,r=void 0!==e&&e,n=t.dragDirectionLock,o=void 0!==n&&n,i=t.dragPropagation,a=void 0!==i&&i,s=t.dragConstraints,u=void 0!==s&&s,c=t.dragElastic,l=void 0===c?M_:c,f=t.dragMomentum,p=void 0===f||f;return Uw(Uw({},t),{drag:r,dragDirectionLock:o,dragPropagation:a,dragConstraints:u,dragElastic:l,dragMomentum:p})},t}();function sE(t,e,r){return!(!0!==e&&e!==t||null!==r&&r!==t)}var uE={pan:wS((function(t){var e=t.onPan,r=t.onPanStart,n=t.onPanEnd,i=t.onPanSessionStart,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(null),c=(0,o.useContext)(Qw).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,e){u.current=null,n&&n(t,e)}};(0,o.useEffect)((function(){null!==u.current&&u.current.updateHandlers(l)})),tS(a,"pointerdown",s&&function(t){u.current=new j_(t,l,{transformPagePoint:c})}),uS((function(){return u.current&&u.current.end()}))})),drag:wS((function(t){var e=t.dragControls,r=t.visualElement,n=vO((function(){return new aE(r)}));(0,o.useEffect)((function(){return e&&e.subscribe(n)}),[n,e]),(0,o.useEffect)((function(){return n.addListeners()}),[n])}))},cE=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var lE=function(t){var e=t.treeType,r=void 0===e?"":e,n=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,c=t.removeValueFromRenderState,l=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(t,e){var p=t.parent,d=t.props,h=t.presenceId,y=t.blockInitialAnimation,m=t.visualState,v=t.shouldReduceMotion;void 0===e&&(e={});var b,g,w=!1,O=m.latestValues,j=m.renderState,S=function(){var t=cE.map((function(){return new XP})),e={},r={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){cE.forEach((function(n){var o,i="on"+n,a=t[i];null===(o=e[n])||void 0===o||o.call(e),a&&(e[n]=r[i](a))}))}};return t.forEach((function(t,e){r["on"+cE[e]]=function(e){return t.add(e)},r["notify"+cE[e]]=function(){for(var e=[],r=0;r=0?window.pageYOffset:null,c=function(t,e,r){var n=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),r.forEach((function(t){s[t]=EE[t](n,i)})),e.syncRender();var u=e.measureViewportBox();return r.forEach((function(r){var n=e.getValue(r);OE(n,s[r]),t[r]=EE[r](u,i)})),t}(e,t,s);return i.length&&i.forEach((function(e){var r=zw(e,2),n=r[0],o=r[1];t.getValue(n).set(o)})),t.syncRender(),null!==u&&window.scrollTo({top:u}),{target:c,transitionEnd:n}}return{target:e,transitionEnd:n}};var CE=function(t,e,r,n){var o=function(t,e,r){var n,o=Vw(e,[]),i=t.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:r};for(var a in r&&(r=Uw({},r)),t.forEachValue((function(t){var e=t.get();if(dE(e)){var r=mE(e,i);r&&t.set(r)}})),o){var s=o[a];if(dE(s)){var u=mE(s,i);u&&(o[a]=u,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:o,transitionEnd:r}}(t,e,n);return function(t,e,r,n){return wE(e)?kE(t,e,r,n):{target:e,transitionEnd:n}}(t,e=o.target,r,n=o.transitionEnd)};var TE={treeType:"dom",readValueFromInstance:function(t,e){if(DO(e)){var r=LP(e);return r&&r.default||0}var n,o=(n=t,window.getComputedStyle(n));return(MO(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var r;return null===(r=t.style)||void 0===r?void 0:r[e]},measureViewportBox:function(t,e){return oE(t,e.transformPagePoint)},resetTransform:function(t,e,r){var n=r.transformTemplate;e.style.transform=n?n({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var r=e.vars,n=e.style;delete r[t],delete n[t]},makeTargetAnimatable:function(t,e,r,n){var o=r.transformValues;void 0===n&&(n=!0);var i=e.transition,a=e.transitionEnd,s=Vw(e,["transition","transitionEnd"]),u=function(t,e,r){var n,o,i={};for(var a in t)i[a]=null!==(n=a_(a,e))&&void 0!==n?n:null===(o=r.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},t);if(o&&(a&&(a=o(a)),s&&(s=o(s)),u&&(u=o(u))),n){!function(t,e,r){var n,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var c=0;c5)return o;var u=lx.createTransformer(t),c="number"!=typeof s[0]?1:0,l=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=l,s[1+c]/=f;var p=zS(l,f,.5);"number"==typeof s[2+c]&&(s[2+c]/=p),"number"==typeof s[3+c]&&(s[3+c]/=p);var d=u(s);if(i){var h=0;d=d.replace(AE,(function(){var t=a[h];return h++,t}))}return d}},ME=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bw(e,t),e.prototype.componentDidMount=function(){var t,e=this,r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=r.layoutId,s=n.projection;t=BE,Object.assign(EO,t),s&&((null==o?void 0:o.group)&&o.group.add(s),(null==i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions(Uw(Uw({},s.options),{onExitComplete:function(){return e.safeToRemove()}}))),bO.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,r=this.props,n=r.layoutDependency,o=r.visualElement,i=r.drag,a=r.isPresent,s=o.projection;return s?(s.isPresent=a,i||t.layoutDependency!==n||void 0===n?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||rP.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,r=t.layoutGroup,n=t.switchLayoutGroup,o=e.projection;o&&(o.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(o.Component);var BE={borderRadius:Uw(Uw({},LE),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:LE,borderTopRightRadius:LE,borderBottomLeftRadius:LE,borderBottomRightRadius:LE,boxShadow:FE},UE={measureLayout:function(t){var e=zw(PS(),2),r=e[0],n=e[1],i=(0,o.useContext)(wO);return o.createElement(ME,Uw({},t,{layoutGroup:i,switchLayoutGroup:(0,o.useContext)(OO),isPresent:r,safeToRemove:n}))}};var VE=["TopLeft","TopRight","BottomLeft","BottomRight"],zE=VE.length,GE=function(t){return"string"==typeof t?parseFloat(t):t},HE=function(t){return"number"==typeof t||XO.test(t)};function WE(t,e){var r;return null!==(r=t[e])&&void 0!==r?r:t.borderRadius}var YE=$E(0,.5,Cx),qE=$E(.5,.95,Sx);function $E(t,e,r){return function(n){return ne?1:r(VS(t,e,n))}}function XE(t,e){t.min=e.min,t.max=e.max}function KE(t,e){XE(t.x,e.x),XE(t.y,e.y)}function ZE(t,e,r,n,o){return t=X_(t-=e,1/r,n),void 0!==o&&(t=X_(t,1/o,n)),t}function JE(t,e,r,n,o){var i=zw(r,3),a=i[0],s=i[1],u=i[2];!function(t,e,r,n,o,i,a){if(void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5),void 0===i&&(i=t),void 0===a&&(a=t),$O.test(e)&&(e=parseFloat(e),e=zS(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=zS(i.min,i.max,n);t===i&&(s-=e),t.min=ZE(t.min,e,r,s,o),t.max=ZE(t.max,e,r,s,o)}}(t,e[a],e[s],e[u],e.scale,n,o)}var QE=["x","scaleX","originX"],tk=["y","scaleY","originY"];function ek(t,e,r,n){JE(t.x,e,QE,null==r?void 0:r.x,null==n?void 0:n.x),JE(t.y,e,tk,null==r?void 0:r.y,null==n?void 0:n.y)}function rk(t){return 0===t.translate&&1===t.scale}function nk(t){return rk(t.x)&&rk(t.y)}function ok(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var ik=function(){function t(){this.members=[]}return t.prototype.add=function(t){qP(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if($P(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,r=this.members.findIndex((function(e){return t===e}));if(0===r)return!1;for(var n=r;n>=0;n--){var o=this.members[n];if(!1!==o.isPresent){e=o;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var r,n=this.lead;t!==n&&(this.prevLead=n,this.lead=t,t.show(),n&&(n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues,t.snapshot.isShared=!0),(null===(r=t.root)||void 0===r?void 0:r.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&n.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,r,n,o,i;null===(r=(e=t.options).onExitComplete)||void 0===r||r.call(e),null===(i=null===(n=t.resumingFrom)||void 0===n?void 0:(o=n.options).onExitComplete)||void 0===i||i.call(o)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),ak="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function sk(t,e,r){var n=t.x.translate/e.x,o=t.y.translate/e.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),r){var a=r.rotate,s=r.rotateX,u=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),u&&(i+="rotateY(".concat(u,"deg) "))}var c=t.x.scale*e.x,l=t.y.scale*e.y;return(i+="scale(".concat(c,", ").concat(l,")"))===ak?"none":i}var uk=function(t,e){return t.depth-e.depth},ck=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){qP(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){$P(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(uk),this.isDirty=!1,this.children.forEach(t)},t}(),lk=1e3;function fk(t){var e=t.attachResizeListener,r=t.defaultParent,n=t.measureScroll,o=t.checkIsScrollRoot,i=t.resetTransform;return function(){function t(t,e,n){var o=this;void 0===e&&(e={}),void 0===n&&(n=null==r?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(bk),o.nodes.forEach(gk)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?Gw(Gw([],zw(n.path),!1),[n],!1):[],this.parent=n,this.depth=n?n.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var i=0;i=0;n--)if(Boolean(t.path[n].instance)){r=t.path[n];break}var o=(r&&r!==t.root?r.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));o&&t.mount(o,!0)}function Ek(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function kk(t){Ek(t.x),Ek(t.y)}var Ck=fk({attachResizeListener:function(t,e){return Mj(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Tk={current:void 0},Rk=fk({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!Tk.current){var t=new Ck(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Tk.current=t}return Tk.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"},checkIsScrollRoot:function(t){return Boolean("fixed"===window.getComputedStyle(t).position)}}),Dk=Uw(Uw(Uw(Uw({},v_),OS),uE),UE),Nk=xO((function(t,e){return function(t,e,r,n,o){var i=e.forwardMotionProps,a=void 0!==i&&i,s=_O(t)?Aj:Fj;return Uw(Uw({},s),{preloadedFeatures:r,useRender:gj(a),createVisualElement:n,projectionNodeConstructor:o,Component:t})}(t,e,Dk,NE,Rk)}));var Ik=r(296),Lk=r.n(Ik);function Ak(t){let{debounce:e,scroll:r,polyfill:n,offsetSize:i}=void 0===t?{debounce:0,scroll:!1,offsetSize:!1}:t;const a=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,u]=(0,o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),l=e?"number"==typeof e?e:e.scroll:null,f=e?"number"==typeof e?e:e.resize:null,p=(0,o.useRef)(!1);(0,o.useEffect)((()=>(p.current=!0,()=>{p.current=!1})));const[d,h,y]=(0,o.useMemo)((()=>{const t=()=>{if(!c.current.element)return;const{left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l}=c.current.element.getBoundingClientRect(),f={left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l};c.current.element instanceof HTMLElement&&i&&(f.height=c.current.element.offsetHeight,f.width=c.current.element.offsetWidth),Object.freeze(f),p.current&&!Bk(c.current.lastBounds,f)&&u(c.current.lastBounds=f)};return[t,f?Lk()(t,f):t,l?Lk()(t,l):t]}),[u,i,l,f]);function m(){c.current.scrollContainers&&(c.current.scrollContainers.forEach((t=>t.removeEventListener("scroll",y,!0))),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function v(){c.current.element&&(c.current.resizeObserver=new a(y),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach((t=>t.addEventListener("scroll",y,{capture:!0,passive:!0}))))}var b,g,w;return b=y,g=Boolean(r),(0,o.useEffect)((()=>{if(g){const t=b;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}}),[b,g]),w=h,(0,o.useEffect)((()=>{const t=w;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[w]),(0,o.useEffect)((()=>{m(),v()}),[r,y,h]),(0,o.useEffect)((()=>m),[]),[t=>{t&&t!==c.current.element&&(m(),c.current.element=t,c.current.scrollContainers=Fk(t),v())},s,d]}function Fk(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(t);return[r,n,o].some((t=>"auto"===t||"scroll"===t))&&e.push(t),[...e,...Fk(t.parentElement)]}const Mk=["x","y","top","bottom","left","right","width","height"],Bk=(t,e)=>Mk.every((r=>t[r]===e[r]));function Uk(){const{dragDropManager:t}=(0,o.useContext)(jg);return gb(null!=t,"Expected drag drop context"),t}var Vk=r(4063);const zk="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function Gk(t,e,r){const[n,i]=(0,o.useState)((()=>e(t))),a=(0,o.useCallback)((()=>{const o=e(t);Vk(n,o)||(i(o),r&&r())}),[n,t,r]);return zk(a),[n,a]}function Hk(t,e,r){return function(t,e,r){const[n,o]=Gk(t,e,r);return zk((function(){const e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(o,{handlerIds:[e]})}),[t,o]),n}(e,t||(()=>({})),(()=>r.reconnect()))}function Wk(t,e){const r=[...e||[]];return null==e&&"function"!=typeof t&&r.push(t),(0,o.useMemo)((()=>"function"==typeof t?t():t),r)}function Yk(t){return(0,o.useMemo)((()=>t.hooks.dragSource()),[t])}function qk(t){return(0,o.useMemo)((()=>t.hooks.dragPreview()),[t])}function $k(t,e,r,n){let o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(e);for(let a=0;a{if(!(0,o.isValidElement)(e)){const n=e;return t(n,r),n}const n=e;!function(t){if("string"==typeof t.type)return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a
, or turn it into a drag source or a drop target itself.`)}(n);return function(t,e){const r=t.ref;return gb("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 or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,o.cloneElement)(t,{ref:t=>{Jk(r,t),Jk(e,t)}}):(0,o.cloneElement)(t,{ref:e})}(n,r?e=>t(e,r):t)}}function Zk(t){const e={};return Object.keys(t).forEach((r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const t=Kk(n);e[r]=()=>t}})),e}function Jk(t,e){"function"==typeof t?t(e):t.current=e}class Qk{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(e?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!$k(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!$k(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Zk({dragSource:(t,e)=>{this.clearDragSource(),this.dragSourceOptions=e||null,Xk(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,e)=>{this.clearDragPreview(),this.dragPreviewOptions=e||null,Xk(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}let tC=!1,eC=!1;class rC{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){gb(!tC,"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 tC=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{tC=!1}}isDragging(){if(!this.sourceId)return!1;gb(!eC,"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 eC=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{eC=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}class nC{beginDrag(){const t=this.spec,e=this.monitor;let r=null;return r="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(e):{},null!=r?r:null}canDrag(){const t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}isDragging(t,e){const r=this.spec,n=this.monitor,{isDragging:o}=r;return o?o(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,r=this.connector,{end:n}=t;n&&n(e.getItem(),e),r.reconnect()}constructor(t,e,r){this.spec=t,this.monitor=e,this.connector=r}}function oC(t,e,r){const n=Uk(),i=function(t,e,r){const n=(0,o.useMemo)((()=>new nC(t,e,r)),[e,r]);return(0,o.useEffect)((()=>{n.spec=t}),[t]),n}(t,e,r),a=function(t){return(0,o.useMemo)((()=>{const e=t.type;return gb(null!=e,"spec.type must be defined"),e}),[t])}(t);zk((function(){if(null!=a){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addSource(t,e);return[o,()=>n.removeSource(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}}),[n,e,r,i,a])}function iC(t,e){const r=Wk(t,e);gb(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=function(){const t=Uk();return(0,o.useMemo)((()=>new rC(t)),[t])}(),i=function(t,e){const r=Uk(),n=(0,o.useMemo)((()=>new Qk(r.getBackend())),[r]);return zk((()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource())),[n,t]),zk((()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview())),[n,e]),n}(r.options,r.previewOptions);return oC(r,n,i),[Hk(r.collect,n,i),Yk(i),qk(i)]}function aC(t){return(0,o.useMemo)((()=>t.hooks.dropTarget()),[t])}class sC{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!$k(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Zk({dropTarget:(t,e)=>{this.clearDropTarget(),this.dropTargetOptions=e,Xk(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}let uC=!1;class cC{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;gb(!uC,"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 uC=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{uC=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}class lC{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function fC(t,e,r){const n=Uk(),i=function(t,e){const r=(0,o.useMemo)((()=>new lC(t,e)),[e]);return(0,o.useEffect)((()=>{r.spec=t}),[t]),r}(t,e),a=function(t){const{accept:e}=t;return(0,o.useMemo)((()=>(gb(null!=t.accept,"accept must be defined"),Array.isArray(e)?e:[e])),[e])}(t);zk((function(){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addTarget(t,e);return[o,()=>n.removeTarget(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}),[n,e,i,r,a.map((t=>t.toString())).join("|")])}function pC(t,e){const r=Wk(t,e),n=function(){const t=Uk();return(0,o.useMemo)((()=>new cC(t)),[t])}(),i=function(t){const e=Uk(),r=(0,o.useMemo)((()=>new sC(e.getBackend())),[e]);return zk((()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget())),[t]),r}(r.options);return fC(r,n,i),[Hk(r.collect,n,i),aC(i)]}const dC=(t,e)=>({event:t,check:e}),hC=dC("touchstart",(t=>{const e=t;return null!==e.touches&&void 0!==e.touches})),yC=(dC("dragstart",(t=>-1!==t.type.indexOf("drag")||-1!==t.type.indexOf("drop"))),dC("mousedown",(t=>-1===t.type.indexOf("touch")&&-1!==t.type.indexOf("mouse"))),dC("pointerdown",(t=>"mouse"==t.pointerType)));function mC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function bC(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,wC(t,e,"get"))}function gC(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,wC(t,e,"set"),r),r}function wC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var OC=new WeakMap;class jC{constructor(){vC(this,OC,{writable:!0,value:void 0}),mC(this,"register",(t=>{bC(this,OC).push(t)})),mC(this,"unregister",(t=>{let e;for(;-1!==(e=bC(this,OC).indexOf(t));)bC(this,OC).splice(e,1)})),mC(this,"backendChanged",(t=>{for(const e of bC(this,OC))e.backendChanged(t)})),gC(this,OC,[])}}function SC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function xC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PC(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,EC(t,e,"get"))}function _C(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,EC(t,e,"set"),r),r}function EC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var kC=new WeakMap,CC=new WeakMap,TC=new WeakMap,RC=new WeakMap,DC=new WeakMap,NC=new WeakMap,IC=new WeakMap,LC=new WeakMap,AC=new WeakMap,FC=new WeakMap,MC=new WeakMap;class BC{constructor(t,e,r){if(SC(this,kC,{writable:!0,value:void 0}),SC(this,CC,{writable:!0,value:void 0}),SC(this,TC,{writable:!0,value:void 0}),SC(this,RC,{writable:!0,value:void 0}),SC(this,DC,{writable:!0,value:void 0}),SC(this,NC,{writable:!0,value:(t,e,r)=>{var n,o;if(!r.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(r)));const i=r.backend(t,e,r.options);let a=r.id;const s=!r.id&&i&&i.constructor;if(s&&(a=i.constructor.name),!a)throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(r),"\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));if(s&&console.warn("Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend."),PC(this,TC)[a])throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(r)," (conflicts with: ").concat(JSON.stringify(PC(this,TC)[a]),")"));return{id:a,instance:i,preview:null!==(n=r.preview)&&void 0!==n&&n,transition:r.transition,skipDispatchOnTransition:null!==(o=r.skipDispatchOnTransition)&&void 0!==o&&o}}}),xC(this,"setup",(()=>{if("undefined"!=typeof window){if(BC.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");BC.isSetUp=!0,PC(this,IC).call(this,window),PC(this,TC)[PC(this,kC)].instance.setup()}})),xC(this,"teardown",(()=>{"undefined"!=typeof window&&(BC.isSetUp=!1,PC(this,LC).call(this,window),PC(this,TC)[PC(this,kC)].instance.teardown())})),xC(this,"connectDragSource",((t,e,r)=>PC(this,MC).call(this,"connectDragSource",t,e,r))),xC(this,"connectDragPreview",((t,e,r)=>PC(this,MC).call(this,"connectDragPreview",t,e,r))),xC(this,"connectDropTarget",((t,e,r)=>PC(this,MC).call(this,"connectDropTarget",t,e,r))),xC(this,"profile",(()=>PC(this,TC)[PC(this,kC)].instance.profile())),xC(this,"previewEnabled",(()=>PC(this,TC)[PC(this,kC)].preview)),xC(this,"previewsList",(()=>PC(this,CC))),xC(this,"backendsList",(()=>PC(this,RC))),SC(this,IC,{writable:!0,value:t=>{PC(this,RC).forEach((e=>{e.transition&&t.addEventListener(e.transition.event,PC(this,AC))}))}}),SC(this,LC,{writable:!0,value:t=>{PC(this,RC).forEach((e=>{e.transition&&t.removeEventListener(e.transition.event,PC(this,AC))}))}}),SC(this,AC,{writable:!0,value:t=>{const e=PC(this,kC);if(PC(this,RC).some((e=>!(e.id===PC(this,kC)||!e.transition||!e.transition.check(t))&&(_C(this,kC,e.id),!0))),PC(this,kC)!==e){var r;PC(this,TC)[e].instance.teardown(),Object.keys(PC(this,DC)).forEach((t=>{const e=PC(this,DC)[t];e.unsubscribe(),e.unsubscribe=PC(this,FC).call(this,e.func,...e.args)})),PC(this,CC).backendChanged(this);const n=PC(this,TC)[PC(this,kC)];if(n.instance.setup(),n.skipDispatchOnTransition)return;const o=new(0,t.constructor)(t.type,t);null===(r=t.target)||void 0===r||r.dispatchEvent(o)}}}),SC(this,FC,{writable:!0,value:(t,e,r,n)=>PC(this,TC)[PC(this,kC)].instance[t](e,r,n)}),SC(this,MC,{writable:!0,value:(t,e,r,n)=>{const o="".concat(t,"_").concat(e),i=PC(this,FC).call(this,t,e,r,n);return PC(this,DC)[o]={func:t,args:[e,r,n],unsubscribe:i},()=>{PC(this,DC)[o].unsubscribe(),delete PC(this,DC)[o]}}}),!r||!r.backends||r.backends.length<1)throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");_C(this,CC,new jC),_C(this,TC,{}),_C(this,RC,[]),r.backends.forEach((r=>{const n=PC(this,NC).call(this,t,e,r);PC(this,TC)[n.id]=n,PC(this,RC).push(n)})),_C(this,kC,PC(this,RC)[0].id),_C(this,DC,{})}}xC(BC,"isSetUp",!1);const UC=(t,e,r)=>new BC(t,e,r);var VC;!function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"}(VC||(VC={}));class zC{get delay(){var t;return null!==(t=this.args.delay)&&void 0!==t?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return null!==(t=this.args.ignoreContextMenu)&&void 0!==t&&t}get enableHoverOutsideTarget(){var t;return null!==(t=this.args.enableHoverOutsideTarget)&&void 0!==t&&t}get enableKeyboardEvents(){var t;return null!==(t=this.args.enableKeyboardEvents)&&void 0!==t&&t}get enableMouseEvents(){var t;return null!==(t=this.args.enableMouseEvents)&&void 0!==t&&t}get enableTouchEvents(){var t;return null===(t=this.args.enableTouchEvents)||void 0===t||t}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayTouchStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get delayMouseStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayMouseStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get window(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.context)||void 0===t?void 0:t.document)?this.context.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.args)||void 0===t?void 0:t.rootElement)||this.document}constructor(t,e){this.args=t,this.context=e}}const GC={Left:1,Right:2,Center:4},HC={Left:0,Center:1,Right:2};function WC(t){return void 0===t.button||t.button===HC.Left}function YC(t){return!!t.targetTouches}const qC=1;function $C(t,e){return YC(t)?function(t,e){return 1===t.targetTouches.length?$C(t.targetTouches[0]):e&&1===t.touches.length&&t.touches[0].target===e.target?$C(t.touches[0]):void 0}(t,e):{x:t.clientX,y:t.clientY}}const XC=(()=>{let t=!1;try{addEventListener("test",(()=>{}),Object.defineProperty({},"passive",{get:()=>(t=!0,!0)}))}catch(t){}return t})(),KC={[VC.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[VC.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[VC.keyboard]:{keydown:"keydown"}};class ZC{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(gb(!ZC.isSetUp,"Cannot have two Touch backends at the same time."),ZC.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(ZC.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,e,r,n=!1){const o=XC?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=KC[n][e];i&&t.addEventListener(i,r,o)}))}removeEventListener(t,e,r,n=!1){const o=XC?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=KC[n][e];i&&t.removeEventListener(i,r,o)}))}connectDragSource(t,e){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,e),this.addEventListener(e,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(e,"start",r)}}connectDragPreview(t,e,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,e){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const n=n=>{if(!this.document||!r||!this.monitor.isDragging())return;let o;switch(n.type){case KC.mouse.move:o={x:n.clientX,y:n.clientY};break;case KC.touch.move:var i,a;o={x:(null===(i=n.touches[0])||void 0===i?void 0:i.clientX)||0,y:(null===(a=n.touches[0])||void 0===a?void 0:a.clientY)||0}}const s=null!=o?this.document.elementFromPoint(o.x,o.y):void 0,u=s&&e.contains(s);return s===e||u?this.handleMove(n,t):void 0};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(t,e),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",n))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver((()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())})),t&&t.parentElement&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,e,r){this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&function(t){const e=t.nodeType===qC?t:t.parentElement;if(!e)return;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}(e)},this.handleTopMoveStartCapture=t=>{WC(t)&&(this.moveStartSourceIds=[])},this.handleMoveStart=t=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(t)},this.handleTopMoveStart=t=>{if(!WC(t))return;const e=$C(t);e&&(YC(t)&&(this.lastTargetTouchFallback=t.targetTouches[0]),this._mouseClientOffset=e),this.waitingForDelay=!1},this.handleTopMoveStartDelay=t=>{if(!WC(t))return;const e=t.type===KC.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,t),e),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(t,e)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(e)},this.handleTopMove=t=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:e,dragOverTargetIds:r}=this,n=this.options.enableHoverOutsideTarget,o=$C(t,this.lastTargetTouchFallback);if(!o)return;if(this._isScrolling||!this.monitor.isDragging()&&function(t,e,r,n,o){if(!o)return!1;const i=180*Math.atan2(n-e,r-t)/Math.PI+180;for(let t=0;t=e.start)&&(null==e.end||i<=e.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,o.x,o.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var i,a,s,u;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&e&&(i=this._mouseClientOffset.x||0,a=this._mouseClientOffset.y||0,s=o.x,u=o.y,Math.sqrt(Math.pow(Math.abs(s-i),2)+Math.pow(Math.abs(u-a),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(e,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const c=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(c),this.actions.publishDragSource(),t.cancelable&&t.preventDefault();const l=(r||[]).map((t=>this.targetNodes.get(t))).filter((t=>!!t)),f=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(o.x,o.y,l):this.document.elementsFromPoint(o.x,o.y),p=[];for(const t in f){if(!f.hasOwnProperty(t))continue;let e=f[t];for(null!=e&&p.push(e);e;)e=e.parentElement,e&&-1===p.indexOf(e)&&p.push(e)}const d=p.filter((t=>l.indexOf(t)>-1)).map((t=>this._getDropTargetId(t))).filter((t=>!!t)).filter(((t,e,r)=>r.indexOf(t)===e));if(n)for(const t in this.targetNodes){const e=this.targetNodes.get(t);if(c&&e&&e.contains(c)&&-1===d.indexOf(t)){d.unshift(t);break}}d.reverse(),this.actions.hover(d,{clientOffset:o})},this._getDropTargetId=t=>{const e=this.targetNodes.keys();let r=e.next();for(;!1===r.done;){const n=r.value;if(t===this.targetNodes.get(n))return n;r=e.next()}},this.handleTopMoveEndCapture=t=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(t){return void 0===t.buttons||0==(t.buttons&GC.Left)}(t)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(t.cancelable&&t.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=t=>{"Escape"===t.key&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new zC(r,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(VC.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(VC.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(VC.keyboard)}}const JC=function(t,e={},r={}){return new ZC(t,e,r)};var QC=function(){return QC=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.text?1:t.texto?i-1:i]},lT=function(t,e){var r="",n=0;return t.forEach((function(o,i){var a,s=function(t,e){var r=t.getBoundingClientRect();return e>r.top+r.height/2?"down":"up"}(o,(null===(a=e.getClientOffset())||void 0===a?void 0:a.y)||0);""===r?r=s:r!==s&&(r=s,n=i),i===t.length-1&&"down"===s&&(n=i+1)})),n},fT=function(t,e,r){var n=e.closest('[role="list"]'),o=null==n?void 0:n.querySelectorAll(':scope > [role="listitem"]');return o?lT(o,r):null},pT=function(t,e,r,n){var o;if(!e)return null;if(null===t){var i=e.querySelectorAll(':scope > [role="listitem"]');return{id:n.rootId,index:lT(i,r)}}var a=r.getItem(),s=e.querySelector('[role="list"]'),u=function(t,e,r){var n=t.getBoundingClientRect(),o=r.dropTargetOffset,i=n.top+o;return e>n.bottom-o?"lower":e [role="listitem"]');return{id:t.id,index:lT(i,r)}}return"middle"===u?{id:t.id,index:0}:sT(a,t.parent,n)?null===(c=fT(0,e,r))?null:{id:t.parent,index:c}:null};var dT=function(t){return void 0===t&&(t={}),{backends:[{id:"html5",backend:Xg,options:t.html5,transition:yC},{id:"touch",backend:JC,options:t.touch||{enableMouseEvents:!0},preview:!0,transition:hC}]}},hT=function(t,e){return t.some((function(t){return t.parent===e}))},yT=(0,o.createContext)({}),mT=function(t){var e=CT(t.tree,t.initialOpen),r=e[0],n=e[1],i=n.handleToggle,a=n.handleCloseAll,s=n.handleOpenAll,u=n.handleOpen,c=n.handleClose;(0,o.useImperativeHandle)(t.treeRef,(function(){return{open:function(e){return u(e,t.onChangeOpen)},close:function(e){return c(e,t.onChangeOpen)},openAll:function(){return s(t.onChangeOpen)},closeAll:function(){return a(t.onChangeOpen)}}}));var l=Uk().getMonitor(),f=t.canDrop,p=t.canDrag,d=QC(QC({extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},t),{openIds:r,onDrop:function(e,r,n){if(e){a={dragSourceId:e.id,dropTargetId:r,dragSource:e,dropTarget:oT(t.tree,r),monitor:l};var o=t.tree;if(oT(o,e.id)||(o=tT(tT([],o,!0),[e],!1)),!1===t.sort){var i=cT(o,e.id,r,n)[1];return a.destinationIndex=i,a.relativeIndex=n,void t.onDrop(function(t,e,r,n){var o=cT(t,e,r,n),i=o[0],a=o[1],s=tT([],t,!0);return function(t,e,r){var n=e<0?t.length+e:e;if(n>=0&&ne.subscribeToOffsetChange(n))),(0,o.useEffect)((()=>e.subscribeToStateChange(n))),r}((function(t){var e=t.getItemType();return{item:t.getItem(),clientOffset:t.getClientOffset(),isDragging:t.isDragging()&&e===xT.TREE_ITEM}}))},RT=function(){var t=(0,o.useContext)(yT);if(!t)throw new Error("useTreeContext must be used under TreeProvider");return t},DT=function(t){var e,r,n=RT(),i=(0,o.useContext)(wT),a=(0,o.useRef)(null),s=(0,o.useRef)(null),u=n.tree.find((function(e){return e.id===t.id})),c=n.openIds,l=n.classes,f=n.enableAnimateExpand,p=c.includes(t.id),d=function(t,e){var r=RT();(0,o.useEffect)((function(){var t=e.current;return null==t||t.addEventListener("dragstart",ET),null==t||t.addEventListener("touchstart",kT,{passive:!0}),function(){null==t||t.removeEventListener("dragstart",ET),null==t||t.removeEventListener("touchstart",kT)}}),[e]);var n=iC({type:xT.TREE_ITEM,item:function(n){var o=QC({ref:e},t);return r.onDragStart&&r.onDragStart(o,n),o},end:function(t,e){var n=t;r.onDragEnd&&r.onDragEnd(n,e)},canDrag:function(){var n=r.canDrag;return PT===e.current&&(!n||n(t.id))},collect:function(t){return{isDragging:t.isDragging()}}});return[n[0].isDragging,n[1],n[2]]}(u,a),h=d[0],y=d[1],m=d[2],v=function(t,e){var r=RT(),n=(0,o.useContext)(wT),i=pC({accept:tT([xT.TREE_ITEM],r.extraAcceptTypes,!0),drop:function(t,e){var o=n.dropTargetId,i=n.index;e.isOver({shallow:!0})&&void 0!==o&&void 0!==i&&r.onDrop(aT(t)?t:null,o,i),n.hidePlaceholder()},canDrop:function(n,o){if(o.isOver({shallow:!0})){var i=pT(t,e.current,o,r);return null!==i&&sT(n,i.id,r)}return!1},hover:function(o,i){if(i.isOver({shallow:!0})){var a=n.dropTargetId,s=n.index,u=n.showPlaceholder,c=n.hidePlaceholder,l=pT(t,e.current,i,r);if(null===l||!sT(o,l.id,r))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),a=i[0];return[a.isOver,a.dragSource,i[1]]}(u,a),b=v[0],g=v[1],w=v[2];!function(t,e,r){e.current?r(e):r(t),(0,o.useEffect)((function(){e.current?r(e):r(t)}),[e.current])}(a,s,y),sT(g,t.id,n)&&w(a),(0,o.useEffect)((function(){n.dragPreviewRender?m((Kg||(Kg=new Image,Kg.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Kg),{captureDraggingState:!0}):s.current&&m(a)}),[m,n.dragPreviewRender]),e=a,r=(0,o.useContext)(vT),(0,o.useEffect)((function(){if(e.current){var t=e.current,n=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.lock()},o=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.unlock()},i=function(t){return n(t)},a=function(t){return o(t)},s=function(t){return n(t)},u=function(t){return o(t)},c=new MutationObserver((function(){document.activeElement===document.body&&r.unlock()}));return c.observe(t,{subtree:!0,childList:!0}),t.addEventListener("mouseover",i),t.addEventListener("mouseout",a),t.addEventListener("focusin",s),t.addEventListener("focusout",u),function(){c.disconnect(),t.removeEventListener("mouseover",i),t.removeEventListener("mouseout",a),t.removeEventListener("focusin",s),t.removeEventListener("focusout",u)}}}),[e,r]),(0,o.useEffect)((function(){var t;null===(t=e.current)||void 0===t||t.setAttribute("draggable",r.isLock?"false":"true")}),[e,r.isLock]);var O=n.listItemComponent,j=(null==l?void 0:l.listItem)||"";b&&(null==l?void 0:l.dropTarget)&&(j="".concat(j," ").concat(l.dropTarget)),h&&(null==l?void 0:l.draggingSource)&&(j="".concat(j," ").concat(l.draggingSource));var S=!n.canDrag||n.canDrag(t.id),x=i.dropTargetId===t.id,P={depth:t.depth,isOpen:p,isDragging:h,isDropTarget:x,draggable:S,hasChild:hT(n.tree,t.id),containerRef:a,handleRef:s,onToggle:function(){return n.onToggle(u.id)}};return o.createElement(O,{ref:a,className:j,role:"listitem"},n.render(u,P),f&&P.hasChild&&o.createElement(eT,{isVisible:p},o.createElement(IT,{parentId:t.id,depth:t.depth+1})),!f&&P.hasChild&&p&&o.createElement(IT,{parentId:t.id,depth:t.depth+1}))},NT=function(t){var e=RT(),r=e.placeholderRender,n=e.placeholderComponent,i=e.classes,a=(0,o.useContext)(wT),s=Uk().getMonitor().getItem();return r&&s&&t.dropTargetId===a.dropTargetId&&(t.index===a.index||void 0===t.index&&t.listCount===a.index)?o.createElement(n,{className:(null==i?void 0:i.placeholder)||""},r(s,{depth:t.depth})):null},IT=function(t){var e=RT(),r=(0,o.useRef)(null),n=e.tree.filter((function(e){return e.parent===t.parentId})),i=n,a="function"==typeof e.sort?e.sort:nT;if(e.insertDroppableFirst){var s=n.filter((function(t){return t.droppable})),u=n.filter((function(t){return!t.droppable}));!1===e.sort||(s=s.sort(a),u=u.sort(a)),i=tT(tT([],s,!0),u,!0)}else!1!==e.sort&&(i=n.sort(a));var c=function(t){var e=RT(),r=(0,o.useContext)(wT),n=pC({accept:tT([xT.TREE_ITEM],e.extraAcceptTypes,!0),drop:function(t,n){var o=e.rootId,i=e.onDrop,a=r.dropTargetId,s=r.index;n.isOver({shallow:!0})&&void 0!==a&&void 0!==s&&i(aT(t)?t:null,o,s),r.hidePlaceholder()},canDrop:function(t,r){var n=e.rootId;return!!r.isOver({shallow:!0})&&void 0!==t&&sT(t,n,e)},hover:function(n,o){if(o.isOver({shallow:!0})){var i=e.rootId,a=r.dropTargetId,s=r.index,u=r.showPlaceholder,c=r.hidePlaceholder,l=pT(null,t.current,o,e);if(null===l||!sT(n,i,e))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),i=n[0];return[i.isOver,i.dragSource,n[1]]}(r),l=c[0],f=c[1],p=c[2];t.parentId===e.rootId&&sT(f,e.rootId,e)&&p(r);var d=function(t,e){var r=RT(),n=r.rootId,o=r.rootProps,i=r.classes,a=(null==i?void 0:i.container)||"";return e&&(null==i?void 0:i.dropTarget)&&(a="".concat(a," ").concat(i.dropTarget)),t===n&&(null==i?void 0:i.root)&&(a="".concat(a," ").concat(i.root)),t===n&&(null==o?void 0:o.className)&&(a="".concat(a," ").concat(o.className)),a.trim()}(t.parentId,l),h=e.rootProps||{},y=e.listComponent;return o.createElement(y,QC({ref:r,role:"list"},h,{className:d}),i.map((function(e,r){return o.createElement(o.Fragment,{key:e.id},o.createElement(NT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId,index:r}),o.createElement(DT,{id:e.id,depth:t.depth}))})),o.createElement(NT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId}))},LT={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},AT=function(t){var e=t.clientOffset;if(!e)return{};var r=e.x,n=e.y;return{pointerEvents:"none",transform:"translate(".concat(r,"px, ").concat(n,"px)")}},FT=function(){var t=RT(),e=TT(),r=e.isDragging,n=e.clientOffset;return r&&n?o.createElement("div",{style:LT},o.createElement("div",{style:AT(e)},t.dragPreviewRender&&t.dragPreviewRender(e))):null};var MT=(0,o.forwardRef)((function(t,e){return o.createElement(ST,QC({},t,{treeRef:e}),t.dragPreviewRender&&o.createElement(FT,null),o.createElement(IT,{parentId:t.rootId,depth:0}))})),BT=r(3518),UT={insert:"head",singleton:!1};Ot()(BT.Z,UT);BT.Z.locals;const VT=function(){return(0,Pt.jsx)("div",{className:"drag-insert-placeholder"})};var zT=r(5293),GT={insert:"head",singleton:!1};Ot()(zT.Z,GT);zT.Z.locals;const HT=function(t){var e=t.text;return(0,Pt.jsx)("span",{className:"drag-placeholder",children:e})};function WT(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return YT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YT(t,e)}(t,e)||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 YT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ZT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function JT(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==a[0]?a[0]:{},e.next=3,mo.execute.get(t.path,t.id,"load",o);case 3:i=e.sent,n(JT(JT({},r),{},{isLoading:!1,rows:i.data.data}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s=function(){var e=eR(KT().mark((function e(r,n){var o,i=arguments;return KT().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>2&&void 0!==i[2]?i[2]:[],e.next=3,mo.execute.get(t.path,t.id,"updateParent",{id:r,parentId:n,children:o});case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),u=function(){var e=eR(KT().mark((function e(){var r,n=arguments;return KT().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:[],e.next=3,mo.execute.get(t.path,t.id,"updateOrder",{children:r});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=function(e){re.goTo(t.path.module,t.action,{id:e.id})},l=function(){return r.rows.length?(0,Pt.jsx)($T,{data:r.rows,onParentChange:s,onOrderChange:u,onClick:c}):(0,Pt.jsx)("div",{className:"index__placeholder",children:vt.get("snippets.no_plural_found",{plural:t.plural})})};return(0,Pt.jsxs)("div",{className:"index index--"+t.style+(r.isLoading?" index--loading":""),children:[(0,Pt.jsx)("div",{className:"index__header",children:(0,Pt.jsx)("div",{className:"index__header-title",children:bt.toUpperCaseFirst(t.plural)})}),l()]})}oR.defaultProps={type:"",components:[],path:{},id:0,data:{},params:{},action:"",plural:"",singular:""};const iR=oR;function aR(t){return aR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aR(t)}function sR(t,e){for(var r=0;r0?(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(ar,{onClick:this.goToPrev.bind(this),text:"Previous"})},1):null,(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(Je,{style:"large",onClick:this.goToNext.bind(this),text:this.isLastStep()?vt.get("snippets.create"):vt.get("snippets.next")})},2)]}},{key:"renderWizardContent",value:function(){var t=this;return this.props.steps.map((function(e,r){return(0,Pt.jsx)("div",{className:"wizard__step-content",style:{display:r===t.state.currentStepIndex?"block":"none"},children:t.componentLists[r].map((function(t){return t.component}))},r)}))}},{key:"isLastStep",value:function(){return this.state.currentStepIndex===this.props.steps.length-1}},{key:"goTo",value:function(t){(t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ID(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function LD(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var i=t.data.data,a=e.data.data,s=o.data.data,u=i[i.length-1];p({type:"media/init",payload:{directory:u,path:i,directories:a,files:s}}),n(LD(LD({},r),{},{isLoading:!1,currentFile:null,selectedFiles:[],selectedFileIds:[]}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){i.current.params.directory?d(i.current.params.directory):d()},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?re.goTo(i.current.module,i.current.action,{directory:t}):re.goTo(i.current.module,i.current.action)},v=function(){n(LD(LD({},r),{},{currentFile:null,selectedFiles:[],selectedFileIds:[]}))},b=function(t,e){e.length?1===e.length?n(LD(LD({},r),{},{currentFile:e[0],selectedFiles:e,selectedFileIds:t})):n(LD(LD({},r),{},{currentFile:null,selectedFiles:e,selectedFileIds:t})):v()},g=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteDirectory(e);case 3:p({type:"media/directories/delete",directoryIds:[e]}),gt.i18nNotify("snippets.directory_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.directory_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),w=function(){var t=MD(ND().mark((function t(e,r){var n;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,p({type:"media/directories/rename",payload:n.data.data}),gt.i18nNotify("snippets.directory_renamed"),v(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var t=MD(ND().mark((function t(e,r){var n;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=12;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,p({type:"media/files/rename",payload:n.data.data}),gt.i18nNotify("snippets.file_renamed"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}(),j=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFile(e);case 3:p({type:"media/files/delete",fileIds:[e]}),gt.i18nNotify("snippets.file_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.notify(vt.get("snippets.file_not_deleted"));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=MD(ND().mark((function t(e){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFiles(e);case 3:p({type:"media/files/delete",fileIds:e}),gt.i18nNotify("snippets.amount_files_deleted",{amount:e.length}),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.files_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.labelFile(e,r);case 3:p({type:"media/files/label",fileId:r,label:e}),gt.i18nNotify("snippets.changes_successful"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.i18nNotify("snippets.changes_unsuccessful");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),_=function(){var t=MD(ND().mark((function t(e,r,n){var o;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFile"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperty",fileId:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),E=function(){var t=MD(ND().mark((function t(e,r,n){var o;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFiles"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperties",fileIds:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),k=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveDirectory(e,r);case 3:p({type:"media/directories/move",moveToId:e,directoryIds:[r]}),gt.notify(vt.get("snippets.directory_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),C=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFile(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:[r]}),gt.notify(vt.get("snippets.file_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),T=function(){var t=MD(ND().mark((function t(e,r){return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFiles(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:r}),gt.notify(vt.get("snippets.files_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),R=function(t){window.open(t.url)},D=function(){h()},N=function(t){(!i.current.params.directory&&!t.directory||t.directory&&i.current.params.directory&&t.directory.id===i.current.params.directory)&&h()},I=function(){var t;gt.prompt({title:vt.get("snippets.new_directory_title"),confirmButtonText:vt.get("snippets.create"),cancelButtonText:vt.get("snippets.cancel"),confirm:(t=MD(ND().mark((function t(e){var r;return ND().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.createDirectory(e,i.current.params.directory);case 2:r=t.sent,p({type:"media/directories/add",payload:r.data.data}),gt.notify(vt.get("snippets.directory_created"));case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})})},L=function(t,e){gt.confirm({title:vt.get("snippets.delete_files_title",{amount:t.length}),text:vt.get("snippets.delete_files_text"),confirmButtonText:vt.get("snippets.delete_files_confirm",{amount:t.length}),cancelButtonText:vt.get("snippets.delete_files_cancel"),confirm:function(){return S(t)}})};return(0,Pt.jsxs)("div",{className:"view-media-directory"+(r.isLoading?" view-media-directory--loading":"")+(r.isDragOver?" view-media-directory--drag-over":""),children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header",children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header-title",children:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return y(t)}})}),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?y(t.id):y()}})]}),(0,Pt.jsxs)("div",{className:"view-media-directory__header-options",children:[(0,Pt.jsx)(Rp,{}),(0,Pt.jsx)(Je,{style:["secondary","small"],onClick:I,text:vt.get("snippets.new_directory")}),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],autoClose:!0,children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onUploadDone:D})})]})]}),(0,Pt.jsx)("div",{className:"view-media-directory__content",children:r.isLoading?null:(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{className:"view-media-directory__main",children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:N,onUploadDone:D,children:(0,Pt.jsx)(Bf,{viewMode:s,currentDirectory:c,directories:l,files:f,fileLabels:t.fileLabels,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,onDirectoryClick:y,onDirectoryDelete:g,onDirectoryRename:w,onDirectoryMove:k,onFileDelete:j,onFileRename:O,onFileOpen:R,onFileMove:C,onSelectionMove:T,onSelectionChange:b,onSelectionDelete:L})})}),(0,Pt.jsx)("div",{className:"view-media-directory__side",children:r.currentFile?(0,Pt.jsx)(vD,{file:r.currentFile,fileLabels:t.fileLabels,onLabelFile:function(t){return x(t,r.currentFile.id)},onChangeFileProperty:function(t,e){return _(t,e,r.currentFile.id)},onDeleteFile:function(){gt.confirm({title:vt.get("snippets.delete_file_title"),text:vt.get("snippets.delete_file_text"),confirmButtonText:vt.get("snippets.delete_file_confirm"),cancelButtonText:vt.get("snippets.delete_file_cancel"),confirm:function(){return j(r.currentFile.id)}})},onRenameFile:function(){gt.prompt({title:vt.get("snippets.rename_file_title"),defaultValue:r.currentFile.name,confirmButtonText:vt.get("snippets.rename_file_confirm"),cancelButtonText:vt.get("snippets.rename_file_cancel"),confirm:function(t){mo.media.renameFile(t,r.currentFile.id).then((function(t){n(LD(LD({},r),{},{currentFile:t.data.data}),(function(){gt.notify(vt.get("snippets.file_renamed")),h()}))}))}})},onMoveFile:C}):r.selectedFiles.length?(0,Pt.jsx)(xD,{files:r.selectedFiles,onDeleteFiles:function(){return L(r.selectedFileIds,r.selectedFiles)},onChangeFilesProperty:function(t,e){return E(t,e,r.selectedFileIds)},onMoveFiles:T}):c?(0,Pt.jsx)(kD,{directory:c}):(0,Pt.jsx)(RD,{})})]})})]})}VD.defaultProps={type:"",path:{},id:0,data:{},fileLabels:{}};const zD=VD;function GD(t){return GD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GD(t)}function HD(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function QD(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function lN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function fN(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pN(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pN(t,e)}(t,e)||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 pN(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>32-e}function r(t,e){var r,n,o,i,a;return o=2147483648&t,i=2147483648&e,a=(1073741823&t)+(1073741823&e),(r=1073741824&t)&(n=1073741824&e)?2147483648^a^o^i:r|n?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function n(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&e|~t&r}(n,o,i),a),u)),r(e(t,s),n)}function o(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&r|e&~r}(n,o,i),a),u)),r(e(t,s),n)}function i(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t^e^r}(n,o,i),a),u)),r(e(t,s),n)}function a(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return e^(t|~r)}(n,o,i),a),u)),r(e(t,s),n)}function s(t){var e,r="",n="";for(e=0;e<=3;e++)r+=(n="0"+(t>>>8*e&255).toString(16)).substr(n.length-2,2);return r}var u,c,l,f,p,d,h,y,m,v=Array();for(v=function(t){for(var e,r=t.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1),a=0,s=0;s>>29,i}(t=function(t){t=t.replace(/rn/g,"n");for(var e="",r=0;r127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(t)),d=1732584193,h=4023233417,y=2562383102,m=271733878,u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function AN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function FN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){AN(i,n,o,a,s,"next",t)}function s(t){AN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function MN(t){var e=P(),r=m((function(t){return t.auth})).user,n=m((function(t){return t.modules.secondary})),o=function(){var t=FN(LN().mark((function t(){return LN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:gt.confirm({title:vt.get("snippets.logout"),confirmButtonText:vt.get("snippets.logout_confirm"),confirm:function(){var t=FN(LN().mark((function t(){return LN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.auth.logout();case 2:e({type:"auth/loggedout"}),gt.notify("User logged out");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,Pt.jsxs)("div",{className:"user-panel",children:[(0,Pt.jsx)("div",{className:"user-panel__avatar",children:(0,Pt.jsx)("img",{src:NN.get(r.email),alt:r.name})}),(0,Pt.jsx)("div",{className:"user-panel__name",children:r.name}),(0,Pt.jsx)("div",{className:"user-panel__actions",children:(0,Pt.jsxs)(sl,{style:["secondary"],children:[(0,Pt.jsx)(At,{stopPropagation:!1,links:n.map((function(t){return[t.title,t.id]})),onClick:function(t){return e=t,void re.goTo(e,"index");var e}}),(0,Pt.jsx)("div",{className:"user-panel__logout",children:(0,Pt.jsx)(Je,{stopPropagation:!1,onClick:o,style:["full","small"],text:vt.get("snippets.logout")})})]})})]})}function BN(){return(0,Pt.jsxs)("div",{className:"module",children:[(0,Pt.jsx)("div",{className:"module__header",children:(0,Pt.jsx)("div",{className:"module__title",children:(0,Pt.jsx)(us,{children:"Not found"})})}),(0,Pt.jsx)("div",{className:"module__main",children:"Are you sure you're trying to access the correct URL? No module or action was found for this request."})]})}function UN(t){return UN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UN(t)}function VN(){VN=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==UN(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function zN(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function GN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],s=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,i,a=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict";var n=r(9742),o=r(645),i=r(5826);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),l=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return O(this,t,e,r);case"latin1":case"binary":return j(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function A(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||A(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||A(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},5399:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".footer-text{color:var(--fill-color-alt-3);display:block;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;text-align:center;width:100%}.footer-text a{text-decoration:underline;transition:color .5s}.footer-text a:hover{color:var(--primary-color);text-decoration:none}",""]);const i=o},9451:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.boolean-switcher{background-color:var(--fill-color-alt-1);border-radius:1.3333333333rem;cursor:pointer;display:inline-block;height:1.6666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:3.3333333333rem}.boolean-switcher:after{background-color:#fff;border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:1.3333333333rem;left:.1666666667rem;position:absolute;top:.1666666667rem;transition:transform .25s;width:1.3333333333rem}.boolean-switcher--alt{background-color:#fff}.boolean-switcher--alt:after{background-color:var(--fill-color-alt-2)}.boolean-switcher--alt.boolean-switcher--checked:after{background-color:#fff}.boolean-switcher--checked{background-color:var(--primary-color-alt-1)}.boolean-switcher--checked:after{transform:translateX(1.6666666667rem)}.boolean-switcher--small{height:1rem;width:2.3333333333rem}.boolean-switcher--small:after{height:.6666666667rem;width:.6666666667rem}.boolean-switcher--small.boolean-switcher--checked:after{transform:translateX(1.3333333333rem)}',""]);const i=o},4195:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'@charset "UTF-8";.breadcrumbs__list{display:flex}.breadcrumbs__list li{color:#7b7d85}.breadcrumbs__list li:after{content:"›";margin-left:.6666666667rem;margin-right:.6666666667rem}.breadcrumbs__list li:last-child{color:#464646}.breadcrumbs__list li:last-child span{cursor:default}.breadcrumbs__list li:last-child span:hover{border-bottom:0}.breadcrumbs__list li:last-child:after{display:none}.breadcrumbs__list li span{cursor:pointer}.breadcrumbs__list li span:hover{border-bottom:1px solid hsla(228,4%,50%,.5)}',""]);const i=o},2314:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".button-group{border-radius:var(--border-radius);display:flex;flex-wrap:nowrap;overflow:hidden}",""]);const i=o},9151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.button{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;overflow:hidden;padding:1rem 2rem;position:relative;transition:background-color .25s;white-space:nowrap}.button:after{bottom:0;box-shadow:inset 0 -2px 0 var(--primary-color-alt-1);content:"";left:0;opacity:.5;position:absolute;right:0;top:0}.button:before{border:1px solid var(--fill-color);border-radius:var(--border-radius);bottom:2px;content:"";left:2px;opacity:0;position:absolute;right:2px;top:2px;transition:opacity 1s}.button:active:before,.button:focus:before{opacity:.25}.button:hover{background-color:var(--primary-color-alt-1)}.button__icon{margin-right:.5rem}.button__label{color:#7b7d85;margin-right:.6666666667rem}.button--grouped{border-radius:0}.button--has-icon{align-items:center;display:inline-flex}.button--disabled{box-shadow:none;cursor:not-allowed;overflow:hidden}.button--disabled:after{background-color:var(--fill-color);bottom:0;box-shadow:none;content:"";left:0;opacity:.75;position:absolute;right:0;top:0}.button--secondary{background-color:var(--fill-color-alt-1);color:#464646}.button--secondary:after{display:none}.button--active,.button--secondary:hover{background-color:var(--fill-color-alt-2)}.button--outline{background-color:#fff;border:1px solid var(--fill-color-alt-1);color:var(--primary-color-alt-1)}.button--outline:after{display:none}.button--outline:hover{background-color:#fff}.button--full{justify-content:center;text-align:center;width:100%}.button--small{height:2.3rem;padding:.6666666667rem 1.3333333333rem}.button--small:after{display:none}.button--large{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}',""]);const i=o},2151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.checkbox{background-color:var(--fill-color-alt-1);cursor:pointer;display:inline-block;height:1.1666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:1.1666666667rem}.checkbox,.checkbox:after{border-radius:var(--border-radius)}.checkbox:after{background-color:#fff;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:.6666666667rem;left:.25rem;position:absolute;top:.25rem;transform:scale(0);transition:transform .25s;width:.6666666667rem}.checkbox--checked{background-color:var(--primary-color-alt-1)}.checkbox--checked:after{transform:scale(1)}',""]);const i=o},8554:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".collapsible{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);margin-bottom:1rem}.collapsible__header{align-items:center;background-color:var(--fill-color);display:flex;justify-content:space-between;padding:.3333333333rem .6666666667rem}.collapsible__title{padding-left:1rem;text-align:left;width:100%}.collapsible__content{display:flex;flex-direction:column;gap:2rem;padding:.6666666667rem}.collapsible--closed .collapsible__content{display:none}.collapsible__actions{align-items:center;display:flex;gap:.6666666667rem}.collapsible__component{margin-bottom:2rem}.collapsible__component:last-child{margin-bottom:0}",""]);const i=o},5709:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.ctx-overlay{position:fixed}.ctx-mount,.ctx-overlay{bottom:0;left:0;right:0;top:0;z-index:9999}.ctx-mount{position:absolute}@keyframes context-menu{0%{transform:scaleY(.85) scaleX(.85);transform-origin:0 0}to{transform:scaleY(1) scaleX(1);transform-origin:0 0}}.context-menu{width:100%}.context-menu__menu{animation:context-menu .25s;background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:0;width:20rem;z-index:1}.context-menu__wrap{position:relative;width:100%}.context-menu--open .context-menu__wrap:after{border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}',""]);const i=o},6279:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},3518:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-insert-placeholder{background-color:var(--primary-color);height:2px;width:100%}",""]);const i=o},5293:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-placeholder{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;padding:.3333333333rem .6666666667rem}",""]);const i=o},7374:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.file-drop-zone{border:1px solid transparent;border-radius:var(--border-radius);display:block;width:100%}.file-drop-zone__overlay{align-items:center;bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;z-index:9998}.file-drop-zone--drag-over .file-drop-zone__overlay{opacity:1;transition:opacity .5s}.file-drop-zone--drag-over{border:1px dashed var(--primary-color);cursor:copy;position:relative}.file-drop-zone--drag-over:after{background-color:var(--fill-color);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;opacity:.85;pointer-events:none;position:absolute;right:0;top:0}',""]);const i=o},3359:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".file-uploader{position:relative}.file-uploader__input{bottom:0;left:0;position:absolute;right:0;top:0}.file-uploader__input:has(input:hover){border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius)}.file-uploader__input input{cursor:pointer;height:100%;opacity:0;width:100%}",""]);const i=o},3668:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},8122:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".tree-row{cursor:pointer;padding:.6666666667rem 2rem;transition:background-color .25s}.tree-row--drop-target{background-color:var(--fill-color-alt-1)}.tree-row:hover{background-color:var(--fill-color)}.tree-row__content{display:flex}.tree-row__toggle{margin-right:1rem}",""]);const i=o},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{function e(t,e,r){var n,o,i,a,s;function u(){var c=Date.now()-a;c=0?n=setTimeout(u,e-c):(n=null,r||(s=t.apply(i,o),i=o=null))}null==e&&(e=100);var c=function(){i=this,o=arguments,a=Date.now();var c=r&&!n;return n||(n=setTimeout(u,e)),c&&(s=t.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=t.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}e.debounce=e,t.exports=e},4063:t=>{"use strict";t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r}},8679:(t,e,r)=>{"use strict";var n=r(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return n.isMemo(t)?a:s[t.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=d(r);o&&o!==h&&t(e,o,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var s=u(e),y=u(r),m=0;m{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,p=r?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;t[r+d]=255&a,d+=h,a/=256,c-=8);t[r+d-h]|=128*y}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},7425:()=>{},4155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case s:case a:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case m:case y:case u:return t;default:return e}}case o:return e}}}function j(t){return O(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=c,e.ContextProvider=u,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=y,e.Portal=o,e.Profiler=s,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return j(t)||O(t)===l},e.isConcurrentMode=j,e.isContextConsumer=function(t){return O(t)===c},e.isContextProvider=function(t){return O(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return O(t)===p},e.isFragment=function(t){return O(t)===i},e.isLazy=function(t){return O(t)===m},e.isMemo=function(t){return O(t)===y},e.isPortal=function(t){return O(t)===o},e.isProfiler=function(t){return O(t)===s},e.isStrictMode=function(t){return O(t)===a},e.isSuspense=function(t){return O(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===s||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===y||t.$$typeof===u||t.$$typeof===c||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===w||t.$$typeof===v)},e.typeOf=O},9864:(t,e,r)=>{"use strict";t.exports=r(9921)},8359:(t,e)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case i:case s:case a:case p:case d:return t;default:switch(t=t&&t.$$typeof){case l:case c:case f:case y:case h:case u:return t;default:return e}}case o:return e}}}r=Symbol.for("react.module.reference")},2973:(t,e,r)=>{"use strict";r(8359)},53:(t,e)=>{"use strict";function r(t,e){var r=t.length;t.push(e);t:for(;0>>1,o=t[n];if(!(0>>1;ni(u,r))ci(l,u)?(t[n]=l,t[c]=r,n=c):(t[n]=u,t[s]=r,n=s);else{if(!(ci(l,r)))break t;t[n]=l,t[c]=r,n=c}}}return e}function i(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],f=1,p=null,d=3,h=!1,y=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(t){for(var e=n(l);null!==e;){if(null===e.callback)o(l);else{if(!(e.startTime<=t))break;o(l),e.sortIndex=e.expirationTime,r(c,e)}e=n(l)}}function O(t){if(m=!1,w(t),!y)if(null!==n(c))y=!0,N(j);else{var e=n(l);null!==e&&I(O,e.startTime-t)}}function j(t,r){y=!1,m&&(m=!1,b(_),_=-1),h=!0;var i=d;try{for(w(r),p=n(c);null!==p&&(!(p.expirationTime>r)||t&&!C());){var a=p.callback;if("function"==typeof a){p.callback=null,d=p.priorityLevel;var s=a(p.expirationTime<=r);r=e.unstable_now(),"function"==typeof s?p.callback=s:p===n(c)&&o(c),w(r)}else o(c);p=n(c)}if(null!==p)var u=!0;else{var f=n(l);null!==f&&I(O,f.startTime-r),u=!1}return u}finally{p=null,d=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,P=null,_=-1,E=5,k=-1;function C(){return!(e.unstable_now()-kt||125a?(t.sortIndex=i,r(l,t),null===n(c)&&t===n(l)&&(m?(b(_),_=-1):m=!0,I(O,i-a))):(t.sortIndex=s,r(c,t),y||h||(y=!0,N(j))),t},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(t){var e=d;return function(){var r=d;d=e;try{return t.apply(this,arguments)}finally{d=r}}}},3840:(t,e,r)=>{"use strict";t.exports=r(53)},3379:(t,e,r)=>{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function s(t){for(var e=-1,r=0;r{"use strict";var n=r(7294);var o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,u=n.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!o(t,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=i({inst:{value:r,getSnapshot:e}}),o=n[0].inst,l=n[1];return s((function(){o.value=r,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,r,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),u(r),r};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},139:(t,e,r)=>{"use strict";var n=r(7294),o=r(1688);var i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},a=o.useSyncExternalStore,s=n.useRef,u=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var f=s(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=c((function(){function t(t){if(!u){if(u=!0,a=t,t=n(t),void 0!==o&&p.hasValue){var e=p.value;if(o(e,t))return s=e}return s=t}if(e=s,i(a,t))return e;var r=n(t);return void 0!==o&&o(e,r)?e:(a=t,s=r)}var a,s,u=!1,c=void 0===r?null:r;return[function(){return t(e())},null===c?void 0:function(){return t(c())}]}),[e,r,n,o]);var d=a(t,f[0],f[1]);return u((function(){p.hasValue=!0,p.value=d}),[d]),l(d),d}},1688:(t,e,r)=>{"use strict";t.exports=r(3250)},2798:(t,e,r)=>{"use strict";t.exports=r(139)},1328:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;es})}},t=>{var e=e=>t(t.s=e);t.O(0,[555,170],(()=>(e(5410),e(7425))));t.O()}]); \ No newline at end of file +(self.webpackChunk=self.webpackChunk||[]).push([[773],{5327:(t,e,r)=>{"use strict";var n={};r.r(n),r.d(n,{FILE:()=>Bg,HTML:()=>zg,TEXT:()=>Vg,URL:()=>Ug});var o=r(7294),i=r(745),a=r(1688),s=r(2798),u=r(3935);let c=function(t){t()};const l=()=>c,f=(0,o.createContext)(null);function p(){return(0,o.useContext)(f)}let d=()=>{throw new Error("uSES not initialized!")};const h=(t,e)=>t===e;function y(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(t,r=h){const{store:n,subscription:i,getServerState:a}=e(),s=d(i.addNestedSub,n.getState,a||n.getState,t,r);return(0,o.useDebugValue)(s),s}}const m=y();r(8679),r(2973);const v={notify(){},get:()=>[]};function b(t,e){let r,n=v;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){const t=l();let e=null,r=null;return{clear(){e=null,r=null},notify(){t((()=>{let t=e;for(;t;)t.callback(),t=t.next}))},get(){let t=[],r=e;for(;r;)t.push(r),r=r.next;return t},subscribe(t){let n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}const a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=v)},getListeners:()=>n};return a}const g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?o.useLayoutEffect:o.useEffect;let w=null;const O=function({store:t,context:e,children:r,serverState:n}){const i=(0,o.useMemo)((()=>{const e=b(t);return{store:t,subscription:e,getServerState:n?()=>n:void 0}}),[t,n]),a=(0,o.useMemo)((()=>t.getState()),[t]);g((()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}}),[i,a]);const s=e||f;return o.createElement(s.Provider,{value:i},r)};function j(t=f){const e=t===f?p:()=>(0,o.useContext)(t);return function(){const{store:t}=e();return t}}const S=j();function x(t=f){const e=t===f?S:j(t);return function(){return e().dispatch}}const P=x();var _,E;_=s.useSyncExternalStoreWithSelector,d=_,(t=>{w=t})(a.useSyncExternalStore),E=u.unstable_batchedUpdates,c=E;var k=r(4890);function C(t){return function(e){var r=e.dispatch,n=e.getState;return function(e){return function(o){return"function"==typeof o?o(r,n,t):e(o)}}}}var T=C();T.withExtraArgument=C;const R=T;function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function I(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:A,e=arguments.length>1?arguments[1]:void 0;return"cmf/update"===e.type?I(I({},t),{},{title:e.payload.title,version:e.payload.version}):t},auth:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"auth/loggedin":return B(B({},t),{},{isLoggedIn:!0,user:e.payload});case"auth/loggedout":return B(B({},t),{},{isLoggedIn:!1,user:null});default:return t}},location:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"location/refresh":return X(X({},t),{},{refresh:!0});case"location/stop-refresh":return X(X({},t),{},{refresh:!1});case"location/update":var r=X(X({},t.current),e.payload);return X(X({},t),{},{previous:X({},t.current),current:X({},r)});default:return t}},media:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"media/init":return st(st({},t),{},{isInitialised:!0,directory:e.payload.directory,path:e.payload.path,directories:e.payload.directories,files:e.payload.files});case"media/path/update":return st(st({},t),{},{path:e.payload});case"media/directory/update":return st(st({},t),{},{directory:e.payload});case"media/directories/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))}):st({},t);case"media/directories/update":return st(st({},t),{},{directories:e.payload});case"media/directories/rename":var r=ot(t.directories).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{directories:r});case"media/directories/delete":return st(st({},t),{},{directories:t.directories.filter((function(t){return!e.directoryIds.includes(t.id)}))});case"media/directories/add":return st(st({},t),{},{directories:[].concat(ot(t.directories),[e.payload]).sort((function(t,e){return t.name.toLowerCase()>e.name.toLowerCase()?1:-1}))});case"media/files/label":var n=ot(t.files).map((function(t){return st(st({},t),{},{label:t.id===e.fileId?e.label:t.label})}));return st(st({},t),{},{files:n});case"media/files/changeProperties":var o=ot(t.files).map((function(t){return t[e.property]=e.fileIds.includes(t.id)?e.value:t[e.property],t}));return st(st({},t),{},{files:o});case"media/files/changeProperty":var i=ot(t.files).map((function(t){return t[e.property]=t.id===e.fileId?e.value:t[e.property],t}));return st(st({},t),{},{files:i});case"media/files/delete":return st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))});case"media/files/add":return st(st({},t),{},{files:[].concat(ot(t.files),[e.payload])});case"media/files/move":return t.directory&&t.directory.id!==e.moveToId||!t.directory&&e.moveToId?st(st({},t),{},{files:t.files.filter((function(t){return!e.fileIds.includes(t.id)}))}):st({},t);case"media/files/rename":var a=ot(t.files).map((function(t){return st(st({},t),{},{name:t.id===e.payload.id?e.payload.name:t.name})}));return st(st({},t),{},{files:a});case"media/files/update":return st(st({},t),{},{files:e.payload});case"media/view/update":return st(st({},t),{},{viewMode:e.payload});default:return t}},modules:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,e=arguments.length>1?arguments[1]:void 0;return"modules/update"===e.type?H(H({},t),{},{all:e.payload.all,primary:e.payload.primary,secondary:e.payload.secondary}):t},language:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt,e=arguments.length>1?arguments[1]:void 0;return"language/update"===e.type?tt(tt({},t),{},{language:e.payload}):t}});const ft=lt;const pt={get:function(t){var e=document.querySelector('meta[name="'+t+'"]');return e?e.getAttribute("content"):null}},dt={get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=window.localStorage.getItem(t);return r||null===e?r:e},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)},clear:function(){window.localStorage.clear()}};var ht=function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=t.split("."),n=window.i18n,o=0;o1&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("button");return r.setAttribute("type","button"),r.classList.add("button"),r.textContent=t,e&&r.addEventListener("click",e),r},i18nNotify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.notify(vt.get(t,e))},notify:function(t){var e=this;this.notificationStackEl||(this.notificationStackEl=document.createElement("div"),this.notificationStackEl.classList.add("notification-stack"),document.body.appendChild(this.notificationStackEl));var r=document.createElement("div");r.classList.add("notification"),r.textContent=bt.toUpperCaseFirst(t),this.notificationStackEl.appendChild(r),setTimeout((function(){r.classList.add("notification--hidden"),setTimeout((function(){return e.notificationStackEl.removeChild(r)}),250)}),3e3)},copyText:function(t,e){var r=document.createElement("textarea");r.value=t,r.style.top=0,r.style.left=0,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")&&e()}catch(t){console.error("Fallback: Oops, unable to copy text to clipboard",t)}document.body.removeChild(r)}};var wt=r(3379),Ot=r.n(wt),jt=r(5709),St={insert:"head",singleton:!1};Ot()(jt.Z,St);jt.Z.locals;const xt={scrollTop:function(){document.body.scrollTop=0,document.documentElement.scrollTop=0},className:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return t;if("string"==typeof e&&(e=[e]),!e.length)return t;var r=" "+t+"--";return t+(e?r+e.join(r):"")},shallowEqual:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0,i=r;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ee(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}const re={path:pt.get("cmf:path"),currentPath:{},history:[],parseLocation:function(t){var e="/"+this.path+"/",r=t.search,n=new URLSearchParams(r),o=Object.fromEntries(n),i=t.pathname,a=(i.startsWith(e)?i.slice(e.length):"").split("/");return{module:a[0],action:a[1],params:o}},update:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};yt.dispatch({type:"location/update",payload:{module:t,action:e,params:r}})},goTo:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Jt.query(r),i="".concat(this.path,"/").concat(t,"/").concat(e)+(o?"?"+o:"");n?window.open(i):(window.history.pushState({},"",i),this.history.push({module:t,action:e,params:r}),this.update(t,e,r))},refresh:function(){yt.dispatch(function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ee(i,n,o,a,s,"next",t)}function s(t){ee(i,n,o,a,s,"throw",t)}a(void 0)}))}}(te().mark((function t(e){return te().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"location/refresh"});case 2:e({type:"location/stop-refresh"});case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},goBack:function(){var t=this.history[this.history.length-2],e=t.module,r=t.action,n=t.params;this.goTo(e,r,n)},handleRedirect:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.refresh?this.refresh():t.redirectBack?this.goBack():t.redirect&&this.goTo(t.path.module,t.redirect,e)}};function ne(t){var e=m((function(t){return t.modules.primary})),r=function(e){t.onModuleSwitch&&t.onModuleSwitch(),re.goTo(e.id,"index")},n=function(t,e){"open"===t?r(e):"open_new"===t&&window.open(e.url)},i=function(e){if(t.activeModule&&t.activeModule.id===e.id)return!0;for(var r=0;re=>{const r=vr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),wr=t=>(t=t.toLowerCase(),e=>gr(e)===t),Or=t=>e=>typeof e===t,{isArray:jr}=Array,Sr=Or("undefined");const xr=wr("ArrayBuffer");const Pr=Or("string"),_r=Or("function"),Er=Or("number"),kr=t=>null!==t&&"object"==typeof t,Cr=t=>{if("object"!==gr(t))return!1;const e=br(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Tr=wr("Date"),Rr=wr("File"),Dr=wr("Blob"),Nr=wr("FileList"),Ir=wr("URLSearchParams");function Lr(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),jr(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const Fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Mr=t=>!Sr(t)&&t!==Fr;const Br=(Ur="undefined"!=typeof Uint8Array&&br(Uint8Array),t=>Ur&&t instanceof Ur);var Ur;const Vr=wr("HTMLFormElement"),zr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Gr=wr("RegExp"),Hr=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Lr(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},Wr="abcdefghijklmnopqrstuvwxyz",Yr="0123456789",qr={DIGIT:Yr,ALPHA:Wr,ALPHA_DIGIT:Wr+Wr.toUpperCase()+Yr};const $r={isArray:jr,isArrayBuffer:xr,isBuffer:function(t){return null!==t&&!Sr(t)&&null!==t.constructor&&!Sr(t.constructor)&&_r(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||vr.call(t)===e||_r(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&xr(t.buffer),e},isString:Pr,isNumber:Er,isBoolean:t=>!0===t||!1===t,isObject:kr,isPlainObject:Cr,isUndefined:Sr,isDate:Tr,isFile:Rr,isBlob:Dr,isRegExp:Gr,isFunction:_r,isStream:t=>kr(t)&&_r(t.pipe),isURLSearchParams:Ir,isTypedArray:Br,isFileList:Nr,forEach:Lr,merge:function t(){const{caseless:e}=Mr(this)&&this||{},r={},n=(n,o)=>{const i=e&&Ar(r,o)||o;Cr(r[i])&&Cr(n)?r[i]=t(r[i],n):Cr(n)?r[i]=t({},n):jr(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(Lr(e,((e,n)=>{r&&_r(e)?t[n]=mr(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&br(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:gr,kindOfTest:wr,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(jr(t))return t;let e=t.length;if(!Er(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Vr,hasOwnProperty:zr,hasOwnProp:zr,reduceDescriptors:Hr,freezeMethods:t=>{Hr(t,((e,r)=>{if(_r(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];_r(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return jr(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Ar,global:Fr,isContextDefined:Mr,ALPHABET:qr,generateString:(t=16,e=qr.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&_r(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(kr(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=jr(t)?[]:{};return Lr(t,((t,e)=>{const i=r(t,n+1);!Sr(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function Xr(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}$r.inherits(Xr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$r.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Kr=Xr.prototype,Zr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Zr[t]={value:t}})),Object.defineProperties(Xr,Zr),Object.defineProperty(Kr,"isAxiosError",{value:!0}),Xr.from=(t,e,r,n,o,i)=>{const a=Object.create(Kr);return $r.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Xr.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Jr=Xr,Qr=null;var tn=r(8764).lW;function en(t){return $r.isPlainObject(t)||$r.isArray(t)}function rn(t){return $r.endsWith(t,"[]")?t.slice(0,-2):t}function nn(t,e,r){return t?t.concat(e).map((function(t,e){return t=rn(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const on=$r.toFlatObject($r,{},null,(function(t){return/^is[A-Z]/.test(t)}));const an=function(t,e,r){if(!$r.isObject(t))throw new TypeError("target must be an object");e=e||new(Qr||FormData);const n=(r=$r.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!$r.isUndefined(e[t])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&$r.isSpecCompliantForm(e);if(!$r.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if($r.isDate(t))return t.toISOString();if(!s&&$r.isBlob(t))throw new Jr("Blob is not supported. Use a Buffer instead.");return $r.isArrayBuffer(t)||$r.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):tn.from(t):t}function c(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if($r.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if($r.isArray(t)&&function(t){return $r.isArray(t)&&!t.some(en)}(t)||($r.isFileList(t)||$r.endsWith(r,"[]"))&&(s=$r.toArray(t)))return r=rn(r),s.forEach((function(t,n){!$r.isUndefined(t)&&null!==t&&e.append(!0===a?nn([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!en(t)||(e.append(nn(o,r,i),u(t)),!1)}const l=[],f=Object.assign(on,{defaultVisitor:c,convertValue:u,isVisitable:en});if(!$r.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!$r.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),$r.forEach(r,(function(r,i){!0===(!($r.isUndefined(r)||null===r)&&o.call(e,r,$r.isString(i)?i.trim():i,n,f))&&t(r,n?n.concat(i):[i])})),l.pop()}}(t),e};function sn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function un(t,e){this._pairs=[],t&&an(t,this,e)}const cn=un.prototype;cn.append=function(t,e){this._pairs.push([t,e])},cn.toString=function(t){const e=t?function(e){return t.call(this,e,sn)}:sn;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ln=un;function fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pn(t,e,r){if(!e)return t;const n=r&&r.encode||fn,o=r&&r.serialize;let i;if(i=o?o(e,r):$r.isURLSearchParams(e)?e.toString():new ln(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const dn=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$r.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},hn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yn="undefined"!=typeof URLSearchParams?URLSearchParams:ln,mn=FormData,vn=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),bn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,gn={isBrowser:!0,classes:{URLSearchParams:yn,FormData:mn,Blob},isStandardBrowserEnv:vn,isStandardBrowserWebWorkerEnv:bn,protocols:["http","https","file","blob","url","data"]};const wn=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&$r.isArray(n)?n.length:i,s)return $r.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&$r.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&$r.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return $r.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},On={"Content-Type":void 0};const jn={transitional:hn,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=$r.isObject(t);o&&$r.isHTMLForm(t)&&(t=new FormData(t));if($r.isFormData(t))return n&&n?JSON.stringify(wn(t)):t;if($r.isArrayBuffer(t)||$r.isBuffer(t)||$r.isStream(t)||$r.isFile(t)||$r.isBlob(t))return t;if($r.isArrayBufferView(t))return t.buffer;if($r.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return an(t,new gn.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return gn.isNode&&$r.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=$r.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return an(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if($r.isString(t))try{return(e||JSON.parse)(t),$r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||jn.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&$r.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw Jr.from(t,Jr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};$r.forEach(["delete","get","head"],(function(t){jn.headers[t]={}})),$r.forEach(["post","put","patch"],(function(t){jn.headers[t]=$r.merge(On)}));const Sn=jn,xn=$r.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Pn=Symbol("internals");function _n(t){return t&&String(t).trim().toLowerCase()}function En(t){return!1===t||null==t?t:$r.isArray(t)?t.map(En):String(t)}function kn(t,e,r,n){return $r.isFunction(n)?n.call(this,e,r):$r.isString(e)?$r.isString(n)?-1!==e.indexOf(n):$r.isRegExp(n)?n.test(e):void 0:void 0}class Cn{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=_n(e);if(!o)throw new Error("header name must be a non-empty string");const i=$r.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=En(t))}const i=(t,e)=>$r.forEach(t,((t,r)=>o(t,r,e)));return $r.isPlainObject(t)||t instanceof this.constructor?i(t,e):$r.isString(t)&&(t=t.trim())&&!function(t){return/^[-_a-zA-Z]+$/.test(t.trim())}(t)?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&xn[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=_n(t)){const r=$r.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if($r.isFunction(e))return e.call(this,t,r);if($r.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=_n(t)){const r=$r.findKey(this,t);return!(!r||void 0===this[r]||e&&!kn(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=_n(t)){const o=$r.findKey(r,t);!o||e&&!kn(0,r[o],o,e)||(delete r[o],n=!0)}}return $r.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!kn(0,this[o],o,t)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return $r.forEach(this,((n,o)=>{const i=$r.findKey(r,o);if(i)return e[i]=En(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=En(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $r.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&$r.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[Pn]=this[Pn]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=_n(t);e[n]||(!function(t,e){const r=$r.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return $r.isArray(t)?t.forEach(n):n(t),this}}Cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$r.freezeMethods(Cn.prototype),$r.freezeMethods(Cn);const Tn=Cn;function Rn(t,e){const r=this||Sn,n=e||r,o=Tn.from(n.headers);let i=n.data;return $r.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Dn(t){return!(!t||!t.__CANCEL__)}function Nn(t,e,r){Jr.call(this,null==t?"canceled":t,Jr.ERR_CANCELED,e,r),this.name="CanceledError"}$r.inherits(Nn,Jr,{__CANCEL__:!0});const In=Nn;const Ln=gn.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),$r.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$r.isString(n)&&a.push("path="+n),$r.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function An(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Fn=gn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=$r.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Mn=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const u=Date.now(),c=n[a];o||(o=u),r[i]=s,n[i]=u;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,u=n(s);r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Un="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Tn.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}$r.isFormData(n)&&(gn.isStandardBrowserEnv||gn.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let u=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const c=An(t.baseURL,t.url);function l(){if(!u)return;const n=Tn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new Jr("Request failed with status code "+r.status,[Jr.ERR_BAD_REQUEST,Jr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),s()}),(function(t){r(t),s()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:t,request:u}),u=null}if(u.open(t.method.toUpperCase(),pn(c,t.params,t.paramsSerializer),!0),u.timeout=t.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(new Jr("Request aborted",Jr.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new Jr("Network Error",Jr.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||hn;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new Jr(e,n.clarifyTimeoutError?Jr.ETIMEDOUT:Jr.ECONNABORTED,t,u)),u=null},gn.isStandardBrowserEnv){const e=(t.withCredentials||Fn(c))&&t.xsrfCookieName&&Ln.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&$r.forEach(o.toJSON(),(function(t,e){u.setRequestHeader(e,t)})),$r.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),i&&"json"!==i&&(u.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&u.addEventListener("progress",Bn(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Bn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{u&&(r(!e||e.type?new In(null,t,u):e),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);f&&-1===gn.protocols.indexOf(f)?r(new Jr("Unsupported protocol "+f+":",Jr.ERR_BAD_REQUEST,t)):u.send(n||null)}))},Vn={http:Qr,xhr:Un};$r.forEach(Vn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const zn={getAdapter:t=>{t=$r.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;ot instanceof Tn?t.toJSON():t;function Yn(t,e){e=e||{};const r={};function n(t,e,r){return $r.isPlainObject(t)&&$r.isPlainObject(e)?$r.merge.call({caseless:r},t,e):$r.isPlainObject(e)?$r.merge({},e):$r.isArray(e)?e.slice():e}function o(t,e,r){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!$r.isUndefined(e))return n(void 0,e)}function a(t,e){return $r.isUndefined(e)?$r.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Wn(t),Wn(e),!0)};return $r.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=u[n]||o,a=i(t[n],e[n],n);$r.isUndefined(a)&&i!==s||(r[n]=a)})),r}const qn="1.3.2",$n={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{$n[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Xn={};$n.transitional=function(t,e,r){function n(t,e){return"[Axios v"+qn+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new Jr(n(o," has been removed"+(e?" in "+e:"")),Jr.ERR_DEPRECATED);return e&&!Xn[o]&&(Xn[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};const Kn={assertOptions:function(t,e,r){if("object"!=typeof t)throw new Jr("options must be an object",Jr.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new Jr("option "+i+" must be "+r,Jr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Jr("Unknown option "+i,Jr.ERR_BAD_OPTION)}},validators:$n},Zn=Kn.validators;class Jn{constructor(t){this.defaults=t,this.interceptors={request:new dn,response:new dn}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Yn(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Kn.assertOptions(r,{silentJSONParsing:Zn.transitional(Zn.boolean),forcedJSONParsing:Zn.transitional(Zn.boolean),clarifyTimeoutError:Zn.transitional(Zn.boolean)},!1),void 0!==n&&Kn.assertOptions(n,{encode:Zn.function,serialize:Zn.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&$r.merge(o.common,o[e.method]),i&&$r.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Tn.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Hn.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new In(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new to((function(e){t=e}));return{token:e,cancel:t}}}const eo=to;const ro={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ro).forEach((([t,e])=>{ro[e]=t}));const no=ro;const oo=function t(e){const r=new Qn(e),n=mr(Qn.prototype.request,r);return $r.extend(n,Qn.prototype,r,{allOwnKeys:!0}),$r.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Yn(e,r))},n}(Sn);oo.Axios=Qn,oo.CanceledError=In,oo.CancelToken=eo,oo.isCancel=Dn,oo.VERSION=qn,oo.toFormData=an,oo.AxiosError=Jr,oo.Cancel=oo.CanceledError,oo.all=function(t){return Promise.all(t)},oo.spread=function(t){return function(e){return t.apply(null,e)}},oo.isAxiosError=function(t){return $r.isObject(t)&&!0===t.isAxiosError},oo.mergeConfig=Yn,oo.AxiosHeaders=Tn,oo.formToJSON=t=>wn($r.isHTMLForm(t)?new FormData(t):t),oo.HttpStatusCode=no,oo.default=oo;const io=oo;function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function so(){so=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==ao(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function uo(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function co(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n={file:t};return e&&(n.directory=e),ho.post("cmf/api/media/upload",Jt.formData(n),{onUploadProgress:r})},yo.media.uploadChunk=function(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i={status:t,filename:e,chunk:n};return r&&(i.path=r),o&&(i.directory=o),ho.post("cmf/api/media/upload-chunk",Jt.formData(i))},yo.media.path=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/path",{params:e})},yo.media.loadDirectories=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-directories",{params:e})},yo.media.loadFiles=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};return t&&(e.directory=t),ho.get("cmf/api/media/load-files",{params:e})},yo.media.createDirectory=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={name:t};return e&&(r.directory=e),ho.post("cmf/api/media/create-directory",r)},yo.media.renameDirectory=function(t,e){return ho.post("cmf/api/media/rename-directory",{name:t,directory:e})},yo.media.deleteDirectory=function(t){return ho.post("cmf/api/media/delete-directory",{directory:t})},yo.media.moveDirectory=function(t,e){return ho.post("cmf/api/media/move-directory",{directory:t,id:e})},yo.media.renameFile=function(t,e){return ho.post("cmf/api/media/rename-file",{name:t,file:e})},yo.media.deleteFile=function(t){return ho.post("cmf/api/media/delete-file",{file:t})},yo.media.deleteFiles=function(t){return ho.post("cmf/api/media/delete-files",{files:JSON.stringify(t)})},yo.media.labelFile=function(t,e){return ho.post("cmf/api/media/label-file",{label:t,file:e})},yo.media.updateFileDescription=function(t,e){return ho.post("cmf/api/media/update-file-description",{description:t,file:e})},yo.media.updateFileCopyright=function(t,e){return ho.post("cmf/api/media/update-file-copyright",{copyright:t,file:e})},yo.media.updateFileVisibility=function(t,e){return ho.post("cmf/api/media/update-file-visibility",{visibility:t,file:e})},yo.media.updateFilesDescription=function(t,e){return ho.post("cmf/api/media/update-files-description",{description:t,files:JSON.stringify(e)})},yo.media.updateFilesCopyright=function(t,e){return ho.post("cmf/api/media/update-files-copyright",{copyright:t,files:JSON.stringify(e)})},yo.media.moveFile=function(t,e){return ho.post("cmf/api/media/move-file",{directory:t,file:e})},yo.media.moveFiles=function(t,e){return ho.post("cmf/api/media/move-files",{directory:t,files:JSON.stringify(e)})},yo.modules.index=function(){return ho.get("cmf/api/modules")},yo.modules.action=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action),{params:e})},yo.modules.get=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),{params:r})},yo.modules.post=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e),Jt.formData(r))},yo.execute.get=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return ho.get("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),{params:n})},yo.execute.post=function(t,e,r,n){return ho.post("cmf/api/modules/".concat(t.module,"/").concat(t.action,"/").concat(e,"/").concat(r),Jt.formData(n))};const mo=yo;function vo(t){return vo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(t)}function bo(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1])&&(wi.set(t),gi.trigger("language.switch",{id:this.props.id,prevLanguage:this.state.language,language:t})),this.setState({language:t})}},{key:"renderLanguageSwitcher",value:function(){var t=this;return this.props.languages.map((function(e){return(0,Pt.jsx)("button",{type:"button",onClick:function(r){return t.switchLanguage(e)},className:"translatable__button"+(e===t.state.language?" translatable__button--active":""),children:e},e)}))}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"translatable",id:"language-"+this.props.id,children:[(0,Pt.jsx)("div",{className:"translatable__tabs",children:this.renderLanguageSwitcher()}),this.renderTranslatedComponents()]})}}],r&&xi(e.prototype,r),n&&xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);ki(Ti,"defaultProps",{id:null,components:[],path:{},data:{},languages:[],errors:{}});const Ri=Ti;function Di(t){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(t)}function Ni(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ii(t){for(var e=1;e5&&(t=(0,Pt.jsx)("div",{className:"select__search",children:(0,Pt.jsx)(Qi,{debounce:100,onSearch:function(t){return e.search(t)}})})),(0,Pt.jsxs)("div",{className:"select__dropdown",children:[t,(0,Pt.jsx)("div",{className:"select__list",children:(0,Pt.jsx)(zi,{nullable:this.props.nullable,multiple:this.props.multiple,defaultValues:this.props.multiple?this.state.value:[this.state.value],options:this.state.isSearching?this.state.searchResults:this.props.options,onChange:function(t){return e.handleSelectionChange(t)}})}),this.renderDropdownChildren()]})):null}},{key:"render",value:function(){var t,e=this;return t=this.props.multiple?this.state.value.length?this.state.value.map((function(t){return e.props.options[t]})).join(", "):this.props.nullText:this.props.options[this.state.value]?this.props.options[this.state.value]:this.props.nullText,(0,Pt.jsxs)("div",{className:"select",ref:this.selectRef,children:[(0,Pt.jsxs)("div",{className:"select__field",onClick:this.toggle.bind(this),children:[(0,Pt.jsx)("div",{className:"select__value",children:t}),(0,Pt.jsx)("div",{className:"select__icon",children:(0,Pt.jsx)(qt,{name:this.state.isOpen?this.props.closeIcon:this.props.openIcon})})]}),this.renderDropdown()]})}}],r&&ra(e.prototype,r),n&&ra(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=sa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ua,"defaultProps",{options:{},multiple:!1,value:"",search:!0,nullable:!1,nullText:"",onChange:function(t){},openIcon:"expand_more",closeIcon:"expand_less"});const ca=ua;function la(t){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(t)}function fa(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]}));var i=n.length?n[0].id:"",a=t.state.value?t.state.value:t.props.nullable?"":i;t.setState({value:a,options:o},(function(){e&&e()}))}))}},{key:"handleChange",value:function(t){this.setState({value:t})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,value:t.data.data.id})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return ib.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return ib.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"belongs-to-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:[(0,Pt.jsx)("div",{className:"belongs-to-field",children:(0,Pt.jsx)("div",{className:"belongs-to-field__field",children:(0,Pt.jsx)(ca,{nullable:this.props.nullable,nullText:"– "+vt.get("snippets.no_singular_selected",{singular:this.props.singular})+" –",options:this.state.options,value:this.state.value,onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Bu(e.prototype,r),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gu(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hu,"defaultProps",{data:{},label:"",name:"",titleColumn:"",nullable:!1,plural:"",singular:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const Wu=Hu;function Yu(t){return Yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(t)}function qu(t,e){for(var r=0;rA2');var n=e.querySelector(".trix-button-group--block-tools");n&&n.remove();var o=e.querySelector(".trix-button-group--file-tools");o&&o.remove()}},{key:"componentDidMount",value:function(){}},{key:"componentWillUnmount",value:function(){}},{key:"componentDidUpdate",value:function(t){this.props.data[this.props.name]!==t.data[this.props.name]&&this.setState({redrawKey:this.state.redrawKey+1,value:this.props.data[this.props.name]||""})}},{key:"handleChange",value:function(t,e){this.setState({value:t})}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.value||""}},{key:"getData",value:function(t){return t[this.props.name]=this.state.value||"",t}},{key:"render",value:function(){return(0,Pt.jsx)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"richtext-field",children:(0,Pt.jsx)(rc.TrixEditor,{value:this.props.data[this.props.name]||"",onChange:this.handleChange.bind(this),onEditorReady:this.handleEditorReady.bind(this)},this.state.redrawKey)})})}}])&&ic(e.prototype,r),n&&ic(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);function fc(t){return fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(t)}function pc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rr?"left":"right",t.clientY>e?"up":"down")}}},{key:"open",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"down";this.setState({isOpen:!0,dropDirectionX:e,dropDirectionY:r},(function(){t.bindDocumentClick()}))}},{key:"close",value:function(){var t=this;this.setState({isOpen:!1},(function(){t.unbindDocumentClick()}))}},{key:"onContentClick",value:function(t){t.target.classList.contains("dropdown__content")||this.close()}},{key:"render",value:function(){var t=(0,Pt.jsx)(Je,{stopPropagation:this.props.stopPropagation,text:this.props.text,label:this.props.label,style:[].concat(Jc(this.props.style),["small"]),onClick:this.toggle.bind(this),icon:this.state.isOpen?this.props.closeIcon:this.props.openIcon});return this.props.text||(t=(0,Pt.jsx)(Ro,{stopPropagation:this.props.stopPropagation,name:this.state.isOpen?this.props.closeIcon:this.props.openIcon,iconStyle:"small",onClick:this.toggle.bind(this)})),(0,Pt.jsxs)("div",{className:xt.className("dropdown",this.props.style)+(this.state.isOpen?" dropdown--open":"")+" dropdown--"+this.state.dropDirectionX+" dropdown--"+this.state.dropDirectionY,ref:this.dropdownRef,children:[(0,Pt.jsx)("div",{className:"dropdown__trigger",children:t}),(0,Pt.jsx)("div",{className:"dropdown__content",onClick:this.onContentClick.bind(this),children:this.props.children})]})}}],r&&tl(e.prototype,r),n&&tl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=il(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(al,"defaultProps",{label:"",text:"",style:[],autoClose:!1,openIcon:"expand_more",closeIcon:"expand_less",stopPropagation:!0});const sl=al;function ul(t){return function(t){if(Array.isArray(t))return cl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return cl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cl(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Tl(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Rl(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Tl(i,n,o,a,s,"next",t)}function s(t){Tl(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Dl(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;this.props.onDirectoryClick(t)}},{key:"load",value:(i=Rl(Cl().mark((function t(){var e=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(this.props.directory).then((function(t){e.setState({directories:t.data.data})}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"loadChildren",value:(o=Rl(Cl().mark((function t(e){var r=this;return Cl().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.loadDirectories(e).then((function(t){var n=r.state.directoriesMap;n[e]=t.data.data,r.setState({directoriesMap:n})}));case 2:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"toggleCollapse",value:function(t){if(this.state.directoriesMap[t]){var e=this.state.directoriesMap;delete e[t],this.setState({directoriesMap:e})}else this.loadChildren(t)}},{key:"renderChildren",value:function(t){var e=this;return this.state.directoriesMap[t]?this.state.directoriesMap[t].map((function(t){return e.renderDirectory(t)})):null}},{key:"renderDirectory",value:function(t){var e=this;return(0,Pt.jsxs)("div",{className:"directory-tree__item",children:[(0,Pt.jsx)(El,{icon:"folder",text:t.name,style:this.props.selectedDirectory===t.id?"selected":"default",onToggle:function(){return e.toggleCollapse(t.id)},onClick:function(){return e.select(t.id)}}),(0,Pt.jsx)("div",{className:"directory-tree__children",children:this.renderChildren(t.id)})]},t.id)}},{key:"render",value:function(){var t=this;return this.state.directories.length?(0,Pt.jsxs)("div",{className:"directory-tree",children:[(0,Pt.jsx)(El,{icon:"home",text:vt.get("snippets.files_root"),style:null===this.props.selectedDirectory?"selected":"default",collapsible:!1,onClick:function(){return t.select()}}),this.state.directories.map((function(e){return t.renderDirectory(e)}))]}):null}}],r&&Dl(e.prototype,r),n&&Dl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.Component);!function(t,e,r){(e=Al(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Fl,"defaultProps",{directory:null,selectedDirectory:null,onDirectoryClick:function(t){}});const Ml=Fl;function Bl(t){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(t)}function Ul(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r186?"#000000":"#ffffff"};function df(t){return df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(t)}function hf(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(e=[[vt.get("snippets.move_files",{amount:this.props.selectedFileIds.length}),"multi-move"],[vt.get("snippets.delete_files",{amount:this.props.selectedFileIds.length}),"multi-delete"]]),(0,Pt.jsx)(xf,{files:this.state.files,fileLabels:this.props.fileLabels,selection:this.props.selectedFileIds,selectionMode:this.props.selectionMode,contextMenuLinks:e,onClick:function(e,r){return t.handleFileClick(e,r)},onContextClick:function(e,r){return t.onFileContextClick(e,r)}})}},{key:"renderDirectories",value:function(){var t=this;return this.props.directories.length?(0,Pt.jsx)(Pt.Fragment,{children:(0,Pt.jsx)(kf,{directories:this.props.directories,contextMenuLinks:[[vt.get("snippets.rename"),"rename"],[vt.get("snippets.move"),"move"],[vt.get("snippets.delete"),"delete"]],onContextClick:function(e,r){return t.onDirectoryContextClick(e,r)},onClick:function(e,r){return t.props.onDirectoryClick(r.id)}})}):null}},{key:"renderContent",value:function(){return this.state.uploads.length||this.props.directories.length||this.state.files.length?(0,Pt.jsxs)("div",{className:"file-browser__content",children:[this.renderUploads(),this.renderDirectories(),this.renderFiles()]}):(0,Pt.jsx)("div",{className:"file-browser__content",children:(0,Pt.jsx)("div",{className:"file-browser__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.directory_is_empty")})})})}},{key:"render",value:function(){return(0,Pt.jsxs)("div",{className:"file-browser",children:[this.renderContent(),this.renderMoveWidget()]})}}],r&&Df(e.prototype,r),n&&Df(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(o.Component);!function(t,e,r){(e=Ff(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Mf,"defaultProps",{files:[],directories:[],currentDirectory:null,fileLabels:{},selectionMode:!1,selectedFileIds:[],selectedFiles:[],onDirectoryClick:function(t){},onFileClick:function(t){},onDirectoryDelete:function(t){},onDirectoryRename:function(t,e){},onDirectoryMove:function(t,e){},onFileDelete:function(t){},onFileRename:function(t){},onFileMove:function(t,e){},onFileOpen:function(t){},onSelectionChange:function(t,e){},onSelectionDelete:function(t,e){},onSelectionMove:function(t,e){}});const Bf=Mf;var Uf=r(4195),Vf={insert:"head",singleton:!1};Ot()(Uf.Z,Vf);Uf.Z.locals;function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Gf(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:function(){},n=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:function(){};Qf++,Jf.push([Qf,t,e,r]),gi.trigger("media.upload.queued",{id:Qf,size:t.size,filename:t.name}),Zf||this.process()},process:function(){var t=this;if(Jf.length){Zf=!0;var e=Jf[0];this.processChunkUpload(e[1],e[2],(function(t){gi.trigger("media.upload.start",{id:e[0],size:e[1].size,filename:t})}),(function(t){gi.trigger("media.upload.progress",{id:e[0],progress:t})}),(function(r){Zf=!1,Jf.shift(),t.process(),gi.trigger("media.upload.success",{id:e[0],file:r}),e[3](r)}),(function(){gi.trigger("media.upload.fail",{id:e[0]}),Zf=!1,Jf.shift(),t.process()}))}},isDone:function(){return 0===Jf.length},processChunkUpload:function(t,e,r,n,o,i){var a,s,u,c=524288,l=Math.ceil(t.size/c),f=0,p=t.name;!function d(){(s=f*c)>t.size&&(s=u+1),u=s+c>=t.size?t.size:s+c;var h=0===f?"start":f===l?"end":"progress";"start"===h&&r(p),mo.media.uploadChunk(h,p,a||null,t.slice(s,u),e).then((function(t){var e=t.data;("created"===e.status&&(a=e.path),++f<=l)?(n(f/l*100),d()):o(e.data)}),(function(t){i()}))}()}};function ep(t){var e=function(e){tp.queueMultiple(e,t.directory,(function(e){t.onFileUploaded(e),tp.isDone()&&t.onUploadDone()}))};return(0,Pt.jsxs)("div",{className:"file-uploader",children:[(0,Pt.jsx)("div",{className:"file-uploader__input",children:(0,Pt.jsx)("input",{type:"file",name:"file-uploader",multiple:!0,onChange:function(t){e(t.target.files)}.bind(this)})}),(0,Pt.jsx)("div",{className:"file-uploader__placeholder",children:(0,Pt.jsx)(Su,{children:vt.get("snippets.select_files_from_computer")})})]})}ep.defaultProps={directory:null,onUploadDone:function(){},onFileUploaded:function(t){}};const rp=ep;function np(t){return np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},np(t)}function op(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;t.isFile?t.file((function(t){".DS_Store"!==t.name&&e.upload(t,r)})):t.isDirectory&&mo.media.createDirectory(t.name,r).then((function(r){var n=r.data.data;e.props.onCreateDirectory(n),t.createReader().readEntries((function(t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Ap(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Fp(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ap(i,n,o,a,s,"next",t)}function s(t){Ap(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Mp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bp(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var a=t.data.data,s=e.data.data,u=o.data.data,c=a[a.length-1];i({type:"media/init",payload:{directory:c,path:a,directories:s,files:u}}),n(Bp(Bp({},r),{},{isLoading:!1}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),d=function(e,o){n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o})),t.onSelectionChange(e,o)},h=function(){t.onSelectionConfirm(r.selectedFileIds,r.selectedFiles)},y=function(t){var e=r.selectedFileIds.filter((function(e){return e!==t})),o=r.selectedFiles.filter((function(e){return e.id!==t}));n(Bp(Bp({},r),{},{selectedFileIds:e,selectedFiles:o}))},v=function(){t.onCancel()},b=function(t){p(t)},g=function(){gt.i18nNotify("snippets.files_uploaded")},w=function(t){!function(t){n(Bp(Bp({},r),{},{selectedFileIds:[].concat(Ip(r.selectedFileIds),[t.id]),selectedFiles:[].concat(Ip(r.selectedFiles),[t])}))}(t),i({type:"media/files/add",payload:t})},O=function(){var t=Fp(Lp().mark((function t(e){var r,n;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.createDirectory(e,c?c.id:null);case 4:r=t.sent,n=r.data.data,gt.i18nNotify("snippets.directory_created"),i({type:"media/directories/add",payload:n}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e){return t.apply(this,arguments)}}(),j=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/files/rename",payload:o}),gt.i18nNotify("snippets.file_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),S=function(){var t=Fp(Lp().mark((function t(e,r){var n,o;return Lp().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,o=n.data.data,i({type:"media/directories/rename",payload:o}),gt.i18nNotify("snippets.directory_renamed"),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),x=function(t,e){mo.media.moveFiles(t,e).then((function(t){gt.i18nNotify("snippets.files_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},_=function(t,e){mo.media.moveFile(t,e).then((function(t){gt.i18nNotify("snippets.file_moved"),p(c?c.id:null)}),(function(t){gt.i18nNotify("snippets.file_not_moved")}))},E=function(){gt.prompt({title:vt.get("snippets.new_directory"),confirmButtonText:vt.get("snippets.confirm"),cancelButtonText:vt.get("snippets.cancel"),confirm:function(t){return O(t)}})},k=function(){var t=[[vt.get("snippets.deselect"),"deselect"],[vt.get("snippets.jump_to_folder"),"jump_to"]];return r.selectedFiles.length?(0,Pt.jsxs)("div",{className:"file-picker-widget__selection",children:[(0,Pt.jsxs)("div",{className:"file-picker-widget__selection-header",children:[vt.get("snippets.your_selection")," (",r.selectedFiles.length,")"]}),r.selectedFiles.map((function(e,r){return(0,Pt.jsx)("div",{className:"file-picker-widget__file",children:(0,Pt.jsx)(Wt,{links:t,onClick:function(t){return function(t,e){"jump_to"===t?p(e.directory?e.directory.id:null):"deselect"===t&&y(e.id)}(t,e)},children:(0,Pt.jsx)(jf,{file:e,viewMode:"minimal",actions:[(0,Pt.jsx)(Ro,{name:"delete",style:"transparent",onClick:function(t){return y(e.id)}},"delete")]})})},r)}))]}):(0,Pt.jsx)(Su,{icon:"checklist",children:vt.get("snippets.your_selection_is_empty")})};return(0,Pt.jsx)(Bo,{style:["modal","wide"],closeable:!0,onClose:v,title:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return b(t)}})},"path"),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?b(t.id):b()}},"breadcrumbs")],actions:[(0,Pt.jsx)(Rp,{},"view-switcher"),(0,Pt.jsx)(Je,{text:vt.get("snippets.new_directory"),style:["secondary","small"],onClick:E},"new-dir"),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onFileUploaded:w,onUploadDone:g})},"upload")],footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:v},"cancel"),(0,Pt.jsx)(Je,{text:t.selectionMode?vt.get("snippets.confirm_selection"):vt.get("snippets.select_file"),style:r.selectedFileIds.length?[]:["disabled"],onClick:r.selectedFileIds.length?h:null},"confirm")],children:r.isLoading?null:(0,Pt.jsx)(cp,{sidebar:k(),children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:O,onUploadDone:g,children:(0,Pt.jsx)(Bf,{fileLabels:t.fileLabels,currentDirectory:c,selectionMode:t.selectionMode,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,directories:l,files:f,onDirectoryRename:S,onFileRename:j,onFileMove:_,onDirectoryClick:function(t){return b(t)},onSelectionChange:d,onSelectionMove:x})})})})}Hp.defaultProps={multiple:!1,onSelectionChange:function(t,e){},onSelectionConfirm:function(t,e){},onCancel:function(){},defaultDirectoryId:null,defaultSelectedFileIds:[],defaultSelectedFiles:[],selectionMode:!1,fileLabels:{}};const Wp=Hp;function Yp(t){return Yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yp(t)}function qp(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedBlocks.length-1)){var e=this.syncBlocksData(),r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedBlocks:e}),gt.notify(vt.get("snippets.order_changed"))}}},{key:"removeBlock",value:function(t,e){var r=this;gt.confirm({title:vt.get("snippets.delete_singular_title",{singular:this.props.singular}),text:vt.get("snippets.delete_singular_text",{singular:this.props.singular}),confirm:function(){var n=r.state.blocksToRemoveById,o=r.state.blocksToRemoveByOrder,i=r.syncBlocksData();i.splice(t,1),e?n.push(e):o.push(t),r.setState({addedBlocks:i,blocksToRemoveById:n,blocksToRemoveByOrder:o}),gt.notify(vt.get("snippets.singular_deleted",{singular:r.props.singular}))}})}},{key:"addBlock",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.getBlockDefinition(t),n=this.state.addedBlocks,o={id:null,name:r.name,type:r.type,components:r.components,data:{}};null!==e?(n.splice(e,0,o),gt.notify(vt.get("snippets.singular_inserted",{singular:this.props.singular}))):(n.push(o),gt.notify(vt.get("snippets.singular_added",{singular:this.props.singular}))),this.setState({addedBlocks:n})}},{key:"renderAddBlockDropdown",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.getOwnPropertyNames(this.props.blocks);return n.length?1===n.length?t?(0,Pt.jsx)(Je,{icon:"add",style:["small","secondary"],text:t,stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(Ro,{name:"post_add",iconStyle:"small",stopPropagation:!1,onClick:function(t){return e.addBlock(n[0],r)}}):(0,Pt.jsx)(sl,{style:["secondary"],autoClose:!0,text:t,openIcon:"post_add",closeIcon:"post_add",children:(0,Pt.jsx)(At,{stopPropagation:!1,links:this.getTypeLinks(),onClick:function(t){return e.addBlock(t,r)}})},r):null}},{key:"optionDropdownClick",value:function(t,e,r){"delete"===t&&this.removeBlock(e,r)}},{key:"getTypeLinks",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[t.props.blocks[e].name,e]}))}},{key:"getTypeLinksInsertBelow",value:function(){var t=this;return Object.getOwnPropertyNames(this.props.blocks).map((function(e){return[vt.get("snippets.insert_singular_below",{singular:t.props.blocks[e].name}),e]}))}},{key:"renderContentBlocks",value:function(){var t=this;return this.componentLists=[],this.state.addedBlocks.length?this.state.addedBlocks.map((function(e,r){if(!e)return null;var n=ib.renderComponentsWith(e.components,e.data,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0);return t.componentLists.push([n,e.id,e.type]),(0,Pt.jsx)("div",{className:"content-blocks__item",children:(0,Pt.jsx)(md,{title:e.name,actions:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}},0),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Md(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function Bd(t,e){for(var r=0;re?1:e>t?-1:0})),e.setState({tags:r,isLoading:!1})}));case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"onCancel",value:function(){this.props.onCancel()}},{key:"onConfirm",value:function(){this.props.onConfirm(this.state.selectedTags)}},{key:"onTagClick",value:function(t){this.setState({selectedTags:[].concat(Ld(this.state.selectedTags),[t])})}},{key:"onSelectedTagClick",value:function(t){var e=this.state.selectedTags.filter((function(e){return e!==t}));this.setState({selectedTags:e})}},{key:"renderContent",value:function(){return this.state.isLoading?null:this.state.tags.length?(this.state.selectedTags.length&&(t=(0,Pt.jsxs)("div",{className:"tags-browser__selected",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.selected_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.selectedTags,onClick:this.onSelectedTagClick.bind(this)})]})),this.state.tags.length&&(e=(0,Pt.jsxs)("div",{className:"tags-browser__available",children:[(0,Pt.jsx)("div",{className:"tags-browser__title",children:vt.get("snippets.available_tags")}),(0,Pt.jsx)(Nd,{tags:this.state.tags,onClick:this.onTagClick.bind(this)})]})),(0,Pt.jsxs)("div",{className:"tags-browser__tags",children:[t,e]})):(0,Pt.jsx)(Su,{children:vt.get("snippets.no_tags_available")});var t,e}},{key:"render",value:function(){return(0,Pt.jsx)(Bo,{style:"modal",title:vt.get("snippets.tags"),closeable:!0,onClose:this.onCancel.bind(this),footer:[(0,Pt.jsx)(Je,{text:vt.get("snippets.cancel"),style:["secondary"],onClick:this.onCancel.bind(this)},0),(0,Pt.jsx)(Je,{text:vt.get("snippets.confirm"),onClick:this.onConfirm.bind(this)},1)],children:(0,Pt.jsx)("div",{className:"tags-browser",children:(0,Pt.jsx)("div",{className:"tags-browser__content",children:this.renderContent()})})})}}],r&&Bd(e.prototype,r),n&&Bd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Gd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Hd,"defaultProps",{id:0,path:{},selectedTags:[],onCancel:function(){},onConfirm:function(t){}});const Wd=Hd;function Yd(t){return Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(t)}function qd(t){return function(t){if(Array.isArray(t))return $d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:function(){};clearTimeout(this.searchTimeout),t&&this.setState({autosuggestIsOpen:!1,tags:[].concat(qd(this.state.tags),[t])},e)}},{key:"removeLastTag",value:function(){this.setState({tags:this.state.tags.slice(0,-1)})}},{key:"autosuggest",value:function(t){var e=this;t.length>1&&mo.execute.get(this.props.path,this.props.id,"autosuggest",{search:t}).then((function(t){e.setState({autosuggestIsOpen:!0,autosuggest:t.data})}))}},{key:"openBrowser",value:function(){this.setState({browserIsOpen:!0})}},{key:"closeBrowser",value:function(){this.setState({browserIsOpen:!1})}},{key:"confirmBrowser",value:function(t){this.setState({tags:t,browserIsOpen:!1})}},{key:"render",value:function(){var t,e,r=this;return this.state.autosuggestIsOpen&&this.state.autosuggest.length&&(e=(0,Pt.jsx)("div",{className:"tags-field__autosuggest",children:this.state.autosuggest.map((function(t,e){return(0,Pt.jsx)("div",{className:"tags-field__autosuggestion",onClick:function(e){return r.handleSuggestionClick(t)},children:t},e)}))})),this.state.browserIsOpen&&(t=(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Wd,{id:this.props.id,path:this.props.path,selectedTags:this.state.tags,onCancel:this.closeBrowser.bind(this),onConfirm:function(t){return r.confirmBrowser(t)}})})),(0,Pt.jsx)(we,{name:this.props.name,required:this.props.showRequiredIndicator,label:this.props.label,errors:this.props.errors,tooltip:this.props.tooltip,children:(0,Pt.jsx)("div",{className:"tags-field",children:(0,Pt.jsxs)("div",{className:"tags-field__wrap",children:[(0,Pt.jsx)("div",{className:"tags-field__browse",children:(0,Pt.jsx)(Ro,{style:"transparent",name:"fact_check",onClick:this.openBrowser.bind(this)})}),(0,Pt.jsx)("div",{className:"tags-field__tags",children:(0,Pt.jsx)(Nd,{tags:this.state.tags})}),(0,Pt.jsx)("div",{className:"tags-field__input",children:(0,Pt.jsx)("input",{className:"tags-field__input-field",ref:this.inputRef,onChange:this.handleChange.bind(this),onKeyUp:this.handleKeyUp.bind(this),onKeyDown:this.handleKeyDown.bind(this),onBlur:this.handleBlur.bind(this)})}),e,t]})})})}}],r&&Xd(e.prototype,r),n&&Xd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);function eh(t){return eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eh(t)}function rh(t,e){for(var r=0;r1,r=this.props.currentPaget.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:t.options,defaultValues:r.values,onChange:a,onClear:a})})})}Bh.defaultProps={id:0,type:"",options:{},field:"",label:"",data:{},onChange:function(){}};const Uh=Bh;function Vh(t){return Vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(t)}function zh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gh(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];t.onChange(t.id,e.join(","))};return i=t.label?t.label:bt.toUpperCaseFirst(t.field),(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:i,text:r.humanReadableValue,children:(0,Pt.jsx)(zi,{options:r.options,defaultValues:r.values,onChange:a,onClear:a})})})}qh.defaultProps={id:0,type:"",field:"",label:"",titleColumn:"",data:{},onChange:function(){}};const $h=qh;function Xh(t){return Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xh(t)}function Kh(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=e.map((function(e){return t.state.options[e]}));this.setState({humanReadableValue:r.length?r.join(", "):vt.get("snippets.tags_all")}),this.props.onChange(this.props.id,e.join(","))}},{key:"clear",value:function(){this.selectListRef.current.clear()}},{key:"onCtxMenuClick",value:function(t){"clear"===t&&this.clear()}},{key:"render",value:function(){var t=this.props.label?this.props.label:vt.get("snippets.tag");return(0,Pt.jsx)("div",{className:"enum-filter",children:(0,Pt.jsx)(Wt,{onClick:this.onCtxMenuClick.bind(this),links:[["Clear this filter","clear"]],children:(0,Pt.jsx)(sl,{stopPropagation:!1,style:["secondary"],label:t,text:this.state.humanReadableValue,children:(0,Pt.jsx)(zi,{options:this.state.options,onChange:this.handleChange.bind(this),onClear:this.handleChange.bind(this),ref:this.selectListRef})})})})}}],r&&Kh(e.prototype,r),n&&Kh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=ty(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ey,"defaultProps",{id:0,type:"",label:"",onChange:function(){}});const ry=ey;function ny(t){return ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ny(t)}function oy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function iy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5];return t.map((function(t,s){var u=a?o.createRef():null,c=ly[t.type];return{filter:n((0,Pt.jsx)(c,dy(dy({},t),{},{data:e,path:r,onChange:i})),s),ref:u}}))}};function my(t){return my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},my(t)}function vy(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function by(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gy(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{};this.state.searchKeyword&&(e.search=this.state.searchKeyword);for(var r=!1,n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null;mo.execute.get(this.props.path,this.props.id,"load",this.props.path.params).then((function(r){var n=r.data.data,o={};n.forEach((function(e){return o[e.id]=e[t.props.titleColumn]})),t.setState({items:n,options:o},(function(){e&&e()}))}))}},{key:"getData",value:function(t){return t[this.props.name]=this.state.selectedItems||[],t}},{key:"handleSubmit",value:function(t){t[this.props.name]=this.state.selectedItemsIds||[]}},{key:"handleChange",value:function(t){this.setState({selectedItemsIds:t,selectedItems:this.state.items.filter((function(e){return t.includes("".concat(e.id))}))})}},{key:"open",value:function(){this.setState({isOpen:!0})}},{key:"close",value:function(){this.setState({isOpen:!1})}},{key:"create",value:function(t){var e=this;mo.execute.post(this.props.path,this.props.id,"create",t).then((function(t){e.createFormRef.current.ready(),e.load((function(){e.setState({isOpen:!1,selectedItemsIds:[].concat(qy(e.state.selectedItemsIds),[t.data.data.id])})})),gt.notify(vt.get("snippets.singular_created_selected",{singular:e.props.singular}))}),(function(t){var r=t.response;e.createFormRef.current.ready(),e.setState({createFormErrors:r.data.errors}),gt.notify(r.data.message)}))}},{key:"renderSidebarComponents",value:function(){return ib.renderComponents(this.props.sidebarComponents,{},this.props.path)}},{key:"renderCreateComponents",value:function(){return ib.renderComponents(this.props.createComponents,{},this.props.path)}},{key:"renderCreateWidget",value:function(){return this.state.isOpen?(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:vt.get("snippets.new_singular",{singular:this.props.singular}),style:"modal",closeable:!0,onClose:this.close.bind(this),children:(0,Pt.jsx)(Ko,{ref:this.createFormRef,errors:this.state.createFormErrors,realForm:!1,onSubmit:this.create.bind(this),submitButtonText:vt.get("snippets.create_singular",{singular:this.props.singular}),sidebar:this.renderSidebarComponents(),children:this.renderCreateComponents()})})}):null}},{key:"renderCreate",value:function(){return this.props.create?(0,Pt.jsx)("div",{className:"many-to-many-select-field__btn",children:(0,Pt.jsx)(Je,{icon:"add",style:["full","small","secondary"],text:vt.get("snippets.new_singular",{singular:this.props.singular}),onClick:this.open.bind(this)})}):null}},{key:"render",value:function(){var t=this;return(0,Pt.jsxs)(we,{name:this.props.name,label:this.props.label,tooltip:this.props.tooltip,errors:this.props.errors,children:[(0,Pt.jsx)("div",{className:"many-to-many-select-field",children:(0,Pt.jsx)("div",{className:"many-to-many-select-field__field",children:(0,Pt.jsx)(ca,{multiple:!0,value:this.state.selectedItemsIds,options:this.state.options,nullText:"– "+vt.get("snippets.no_plural_selected",{plural:this.props.plural})+" –",onChange:function(e){return t.handleChange(e)},children:this.renderCreate()})})}),this.renderCreateWidget()]})}}],r&&Xy(e.prototype,r),n&&Xy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=Qy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(tm,"defaultProps",{path:{},data:{},label:"",name:"",style:"",singular:"",plural:"",titleColumn:"",tooltip:"",create:!1,createComponents:[],sidebarComponents:[]});const em=tm;function rm(t){return rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rm(t)}function nm(t){return function(t){if(Array.isArray(t))return om(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return om(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return om(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function om(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=this.state.addedItems.length-1)){var e=this.state.addedItems,r=t+1,n=[e[r],e[t]];e[t]=n[0],e[r]=n[1],this.setState({addedItems:e})}}},{key:"removeItem",value:function(t){var e=this.state.addedItems;e.splice(t,1),this.setState({addedItems:e})}},{key:"renderItems",value:function(){var t=this;return this.componentLists=[],this.state.addedItems.length?this.state.addedItems.map((function(e,r){var n=ib.renderComponentsWith(t.props.components,e,t.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"json-field__component",children:t},e)}),!0,t.props.errors);return t.componentLists.push(n),(0,Pt.jsxs)("div",{className:"json-field__item",children:[(0,Pt.jsx)("div",{className:"json-field__item-content",children:n.map((function(t){return t.component}))}),(0,Pt.jsxs)("div",{className:"json-field__item-actions",children:[(0,Pt.jsx)(Ro,{style:["transparent",r>0?"enabled":"disabled"],iconStyle:"mini",name:"arrow_upward",onClick:function(e){return t.sortUp(r)}}),(0,Pt.jsx)(Ro,{style:["transparent",rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:null,e={},r={};this.componentList.forEach((function(t){t.ref.current.getData&&t.ref.current.getData(e),t.ref.current.handleSubmit&&t.ref.current.handleSubmit(r)})),this.setState({isStored:!0,data:e,submitData:r,isOpen:!1},(function(){t&&t()}))}},{key:"renderComponents",value:function(){return this.componentList=ib.renderComponentsWith(this.props.components,this.state.isStored?this.state.data:this.props.data,this.props.path,(function(t,e){return(0,Pt.jsx)("div",{className:"content-blocks__component",children:t},e)}),!0),this.componentList.map((function(t){return t.component}))}},{key:"renderWidget",value:function(){var t=this;return(0,Pt.jsx)(So,{children:(0,Pt.jsx)(Bo,{title:this.props.title,style:"modal",closeable:!0,onClose:this.close.bind(this),footer:[(0,Pt.jsx)(Je,{text:"Confirm",onClick:function(){t.store()}},"confirm")],children:this.renderComponents()})})}},{key:"render",value:function(){return(0,Pt.jsxs)(o.Fragment,{children:[(0,Pt.jsx)(we,{label:this.props.label,tooltip:this.props.tooltip,children:"link"===this.props.style?(0,Pt.jsx)(ar,{style:this.props.style,onClick:this.open.bind(this),text:this.props.title}):(0,Pt.jsx)(Je,{style:["small","secondary"],text:this.props.title,onClick:this.open.bind(this)})}),(0,Pt.jsx)("div",{style:{display:this.state.isOpen?"block":"none"},children:this.renderWidget()})]})}}],r&&jv(e.prototype,r),n&&jv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Component);!function(t,e,r){(e=_v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Ev,"defaultProps",{title:"",label:"",components:[],path:{},data:{},errors:{},style:null});const kv=Ev;function Cv(t){return Cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cv(t)}function Tv(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return t.map((function(t,s){var u=null;i&&(u=o.createRef());var c=tb[t.type];return{component:n((0,Pt.jsx)(c,nb(nb({},t),{},{data:e,errors:a,path:r,ref:u})),s),ref:u}}))}};var ab=r(2151),sb={insert:"head",singleton:!1};Ot()(ab.Z,sb);ab.Z.locals;function ub(t){return(0,Pt.jsx)("div",{className:xt.className("checkbox",t.style)+(t.checked?" checkbox--checked":""),onClick:t.onClick})}ub.defaultProps={style:[],checked:!1,onClick:function(){}};const cb=ub;function lb(t){var e,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mb(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==f[0]?f[0]:{},i=!1,s=0;st&&t[e]?t[e]:r||null),t)}function Cb(t){return"object"==typeof t}const Tb="dnd-core/INIT_COORDS",Rb="dnd-core/BEGIN_DRAG",Db="dnd-core/PUBLISH_DRAG_SOURCE",Nb="dnd-core/HOVER",Ib="dnd-core/DROP",Lb="dnd-core/END_DRAG";function Ab(t,e){return{type:Tb,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const Fb={type:Tb,payload:{clientOffset:null,sourceClientOffset:null}};function Mb(t){return function(e=[],r={publishSource:!0}){const{publishSource:n=!0,clientOffset:o,getSourceClientOffset:i}=r,a=t.getMonitor(),s=t.getRegistry();t.dispatch(Ab(o)),function(t,e,r){Eb(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach((function(t){Eb(r.getSource(t),"Expected sourceIds to be registered.")}))}(e,a,s);const u=function(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}(e,a);if(null==u)return void t.dispatch(Fb);let c=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(t){Eb("function"==typeof t,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),c=i(u)}t.dispatch(Ab(o,c));const l=s.getSource(u).beginDrag(a,u);if(null==l)return;!function(t){Eb(Cb(t),"Item must be an object.")}(l),s.pinSource(u);const f=s.getSourceType(u);return{type:Rb,payload:{itemType:f,item:l,sourceId:u,clientOffset:o||null,sourceClientOffset:c||null,isSourcePublic:!!n}}}}function Bb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ub(t){for(var e=1;e{const a=function(t,e,r,n){const o=r.getTarget(t);let i=o?o.drop(n,t):void 0;(function(t){Eb(void 0===t||Cb(t),"Drop result must either be an object or undefined.")})(i),void 0===i&&(i=0===e?{}:n.getDropResult());return i}(o,i,n,r),s={type:Ib,payload:{dropResult:Ub({},e,a)}};t.dispatch(s)}))}}function zb(t){return function(){const e=t.getMonitor(),r=t.getRegistry();!function(t){Eb(t.isDragging(),"Cannot call endDrag while not dragging.")}(e);const n=e.getSourceId();if(null!=n){r.getSource(n,!0).endDrag(e,n),r.unpinSource()}return{type:Lb}}}function Gb(t,e){return null===e?null===t:Array.isArray(t)?t.some((t=>t===e)):t===e}function Hb(t){return function(e,{clientOffset:r}={}){!function(t){Eb(Array.isArray(t),"Expected targetIds to be an array.")}(e);const n=e.slice(0),o=t.getMonitor(),i=t.getRegistry();return function(t,e,r){for(let n=t.length-1;n>=0;n--){const o=t[n];Gb(e.getTargetType(o),r)||t.splice(n,1)}}(n,i,o.getItemType()),function(t,e,r){Eb(e.isDragging(),"Cannot call hover while not dragging."),Eb(!e.didDrop(),"Cannot call hover after drop.");for(let e=0;e{const i=r[o];var a;return n[o]=(a=i,(...r)=>{const n=a.apply(t,r);void 0!==n&&e(n)}),n}),{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const t=this.store.getState().refCount>0;this.backend&&(t&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!t&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function qb(t,e){return{x:t.x-e.x,y:t.y-e.y}}const $b=[],Xb=[];$b.__IS_NONE__=!0,Xb.__IS_ALL__=!0;class Kb{subscribeToStateChange(t,e={}){const{handlerIds:r}=e;Eb("function"==typeof t,"listener must be a function."),Eb(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe((()=>{const e=this.store.getState(),o=e.stateId;try{const i=o===n||o===n+1&&!function(t,e){return t!==$b&&(t===Xb||void 0===e||(r=t,e.filter((t=>r.indexOf(t)>-1))).length>0);var r}(e.dirtyHandlerIds,r);i||t()}finally{n=o}}))}subscribeToOffsetChange(t){Eb("function"==typeof t,"listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe((()=>{const r=this.store.getState().dragOffset;r!==e&&(e=r,t())}))}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return Eb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);if(Eb(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;return Gb(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);if(Eb(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:r}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Gb(n,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(t);return r?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return e&&r&&n?qb(function(t,e){return{x:t.x+e.x,y:t.y+e.y}}(e,n),r):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:r}=t;return e&&r?qb(e,r):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const Zb="undefined"!=typeof global?global:self,Jb=Zb.MutationObserver||Zb.WebKitMutationObserver;function Qb(t){return function(){const e=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(e),clearInterval(r),t()}}}const tg="function"==typeof Jb?function(t){let e=1;const r=new Jb(t),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){e=-e,n.data=e}}:Qb;class eg{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const rg=new class{enqueueTask(t){const{queue:e,requestFlush:r}=this;e.length||(r(),this.flushing=!0),e[e.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let e=0,r=t.length-this.index;e{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=tg(this.flush),this.requestErrorThrow=Qb((()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()}))}},ng=new class{create(t){const e=this.freeTasks,r=e.length?e.pop():new eg(this.onError,(t=>e[e.length]=t));return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}(rg.registerPendingError);const og="dnd-core/ADD_SOURCE",ig="dnd-core/ADD_TARGET",ag="dnd-core/REMOVE_SOURCE",sg="dnd-core/REMOVE_TARGET";function ug(t,e){e&&Array.isArray(t)?t.forEach((t=>ug(t,!1))):Eb("string"==typeof t||"symbol"==typeof t,e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var cg;!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(cg||(cg={}));let lg=0;function fg(t){const e=(lg++).toString();switch(t){case cg.SOURCE:return`S${e}`;case cg.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function pg(t){switch(t[0]){case"S":return cg.SOURCE;case"T":return cg.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function dg(t,e){const r=t.entries();let n=!1;do{const{done:t,value:[,o]}=r.next();if(o===e)return!0;n=!!t}while(!n);return!1}class hg{addSource(t,e){ug(t),function(t){Eb("function"==typeof t.canDrag,"Expected canDrag to be a function."),Eb("function"==typeof t.beginDrag,"Expected beginDrag to be a function."),Eb("function"==typeof t.endDrag,"Expected endDrag to be a function.")}(e);const r=this.addHandler(cg.SOURCE,t,e);return this.store.dispatch(function(t){return{type:og,payload:{sourceId:t}}}(r)),r}addTarget(t,e){ug(t,!0),function(t){Eb("function"==typeof t.canDrop,"Expected canDrop to be a function."),Eb("function"==typeof t.hover,"Expected hover to be a function."),Eb("function"==typeof t.drop,"Expected beginDrag to be a function.")}(e);const r=this.addHandler(cg.TARGET,t,e);return this.store.dispatch(function(t){return{type:ig,payload:{targetId:t}}}(r)),r}containsHandler(t){return dg(this.dragSources,t)||dg(this.dropTargets,t)}getSource(t,e=!1){Eb(this.isSourceId(t),"Expected a valid source ID.");return e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Eb(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Eb(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Eb(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return pg(t)===cg.SOURCE}isTargetId(t){return pg(t)===cg.TARGET}removeSource(t){var e;Eb(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(t){return{type:ag,payload:{sourceId:t}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},rg.enqueueTask(ng.create(e))}removeTarget(t){Eb(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(t){return{type:sg,payload:{targetId:t}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);Eb(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){Eb(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,r){const n=fg(t);return this.types.set(n,e),t===cg.SOURCE?this.dragSources.set(n,r):t===cg.TARGET&&this.dropTargets.set(n,r),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const yg=(t,e)=>t===e;function mg(t=$b,e){switch(e.type){case Nb:break;case og:case ig:case sg:case ag:return $b;default:return Xb}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,o=function(t,e){const r=new Map,n=t=>{r.set(t,r.has(t)?r.get(t)+1:1)};t.forEach(n),e.forEach(n);const o=[];return r.forEach(((t,e)=>{1===t&&o.push(e)})),o}(r,n),i=o.length>0||!function(t,e,r=yg){if(t.length!==e.length)return!1;for(let n=0;nt!==o)))});case Ib:return Og({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Lb:return Og({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}var n,o}function xg(t=0,e){switch(e.type){case og:case ig:return t+1;case ag:case sg:return t-1;default:return t}}function Pg(t=0){return t+1}function _g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Eg(t){for(var e=1;e=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}let Dg=0;const Ng=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ig=(0,o.memo)((function(t){var{children:e}=t,r=Rg(t,["children"]);const[n,i]=function(t){if("manager"in t){return[{dragDropManager:t.manager},!1]}const e=function(t,e=Lg(),r,n){const o=e;o[Ng]||(o[Ng]={dragDropManager:Cg(t,e,r,n)});return o[Ng]}(t.backend,t.context,t.options,t.debugMode),r=!t.context;return[e,r]}(r);return(0,o.useEffect)((()=>{if(i){const t=Lg();return++Dg,()=>{0==--Dg&&(t[Ng]=null)}}}),[]),(0,Pt.jsx)(Tg.Provider,{value:n,children:e})}));function Lg(){return"undefined"!=typeof global?global:window}function Ag(t){let e=null;return()=>(null==e&&(e=t()),e)}class Fg{enter(t){const e=this.entered.length;return this.entered=function(t,e){const r=new Set,n=t=>r.add(t);t.forEach(n),e.forEach(n);const o=[];return r.forEach((t=>o.push(t))),o}(this.entered.filter((e=>this.isNodeInDocument(e)&&(!e.contains||e.contains(t)))),[t]),0===e&&this.entered.length>0}leave(t){const e=this.entered.length;var r,n;return this.entered=(r=this.entered.filter(this.isNodeInDocument),n=t,r.filter((t=>t!==n))),e>0&&0===this.entered.length}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Mg{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach((t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})}))}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach((r=>{const n=this.config.exposeProperties[r];null!=n&&(e[r]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})})),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Bg="__NATIVE_FILE__",Ug="__NATIVE_URL__",Vg="__NATIVE_TEXT__",zg="__NATIVE_HTML__";function Gg(t,e,r){const n=e.reduce(((e,r)=>e||t.getData(r)),"");return null!=n?n:r}const Hg={[Bg]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[zg]:{exposeProperties:{html:(t,e)=>Gg(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Ug]:{exposeProperties:{urls:(t,e)=>Gg(t,e,"").split("\n"),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Vg]:{exposeProperties:{text:(t,e)=>Gg(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Wg(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Hg).filter((t=>{const r=Hg[t];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some((t=>e.indexOf(t)>-1))}))[0]||null}const Yg=Ag((()=>/firefox/i.test(navigator.userAgent))),qg=Ag((()=>Boolean(window.safari)));class $g{interpolate(t){const{xs:e,ys:r,c1s:n,c2s:o,c3s:i}=this;let a=e.length-1;if(t===e[a])return r[a];let s,u=0,c=i.length-1;for(;u<=c;){s=Math.floor(.5*(u+c));const n=e[s];if(nt))return r[s];c=s-1}}a=Math.max(0,c);const l=t-e[a],f=l*l;return r[a]+n[a]*l+o[a]*f+i[a]*l*f}constructor(t,e){const{length:r}=t,n=[];for(let t=0;tt[e]{let t=new $g([0,.5,1],[c.y,c.y/f*y,c.y+y-f]).interpolate(d);return qg()&&i&&(t+=(window.devicePixelRatio-1)*y),t})()}}class Qg{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.globalContext)||void 0===t?void 0:t.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.optionsArgs)||void 0===t?void 0:t.rootElement)||this.window}constructor(t,e){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=e}}function tw(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ew(t){for(var e=1;e{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,r){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,r);const n=e=>this.handleDragStart(e,t),o=t=>this.handleSelectStart(t);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",o),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const r=e=>this.handleDragEnter(e,t),n=e=>this.handleDragOver(e,t),o=e=>this.handleDrop(e,t);return e.addEventListener("dragenter",r),e.addEventListener("dragover",n),e.addEventListener("drop",o),()=>{e.removeEventListener("dragenter",r),e.removeEventListener("dragover",n),e.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return ew({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return ew({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(n).some((e=>n[e]===t))}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(t,e){const r=Hg[t];if(!r)throw new Error(`native type ${t} has no configuration`);const n=new Mg(r);return n.loadDataTransfer(e),n}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;this.mouseMoveTimeoutTimer=setTimeout((()=>{var t;return null===(t=this.rootElement)||void 0===t?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}),1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;if(this.currentDragSourceNode=null,this.rootElement)null===(t=this.window)||void 0===t||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&Kg(e)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=t=>Boolean(t&&this.document&&this.document.body&&this.document.body.contains(t)),this.endDragIfSourceWasRemovedFromDOM=()=>{const t=this.currentDragSourceNode;null==t||this.isNodeInDocument(t)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=t=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame((()=>{this.monitor.isDragging()&&this.actions.hover(t||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null})))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=t=>{if(t.defaultPrevented)return;const{dragStartSourceIds:e}=this;this.dragStartSourceIds=null;const r=Zg(t);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(e||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:n}=t,o=Wg(n);if(this.monitor.isDragging()){if(n&&"function"==typeof n.setDragImage){const t=this.monitor.getSourceId(),e=this.sourceNodes.get(t),o=this.sourcePreviewNodes.get(t)||e;if(o){const{anchorX:t,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),u=Jg(e,o,r,{anchorX:t,anchorY:i},{offsetX:a,offsetY:s});n.setDragImage(o,u.x,u.y)}}try{null==n||n.setData("application/json",{})}catch(t){}this.setCurrentDragSourceNode(t.target);const{captureDraggingState:e}=this.getCurrentSourcePreviewNodeOptions();e?this.actions.publishDragSource():setTimeout((()=>this.actions.publishDragSource()),0)}else if(o)this.beginDragNativeItem(o);else{if(n&&!n.types&&(t.target&&!t.target.hasAttribute||!t.target.hasAttribute("draggable")))return;t.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=t=>{var e;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer));if(!this.enterLeaveCounter.enter(t.target)||this.monitor.isDragging())return;const{dataTransfer:r}=t,n=Wg(r);n&&this.beginDragNativeItem(n,r)},this.handleTopDragEnter=t=>{const{dragEnterTargetIds:e}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=t.altKey,e.length>0&&this.actions.hover(e,{clientOffset:Zg(t)});e.some((t=>this.monitor.canDropOnTarget(t)))&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=t=>{var e;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer))},this.handleTopDragOver=t=>{const{dragOverTargetIds:e}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return t.preventDefault(),void(t.dataTransfer&&(t.dataTransfer.dropEffect="none"));this.altKeyPressed=t.altKey,this.lastClientOffset=Zg(t),this.scheduleHover(e);(e||[]).some((t=>this.monitor.canDropOnTarget(t)))?(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?t.preventDefault():(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=t=>{this.isDraggingNativeItem()&&t.preventDefault();this.enterLeaveCounter.leave(t.target)&&(this.isDraggingNativeItem()&&setTimeout((()=>this.endDragNativeItem()),0),this.cancelHover())},this.handleTopDropCapture=t=>{var e;(this.dropTargetIds=[],this.isDraggingNativeItem())?(t.preventDefault(),null===(e=this.currentNativeSource)||void 0===e||e.loadDataTransfer(t.dataTransfer)):Wg(t.dataTransfer)&&t.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=t=>{const{dropTargetIds:e}=this;this.dropTargetIds=[],this.actions.hover(e,{clientOffset:Zg(t)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=t=>{const e=t.target;"function"==typeof e.dragDrop&&("INPUT"===e.tagName||"SELECT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable||(t.preventDefault(),e.dragDrop()))},this.options=new Qg(e,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Fg(this.isNodeInDocument)}}const nw=function(t,e,r){return new rw(t,e,r)};let ow;var iw,aw=[],sw="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(iw||(iw={}));var uw,cw=function(t){return Object.freeze(t)},lw=function(t,e){this.inlineSize=t,this.blockSize=e,cw(this)},fw=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,cw(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),pw=function(t){return t instanceof SVGElement&&"getBBox"in t},dw=function(t){if(pw(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},hw=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},yw="undefined"!=typeof window?window:{},mw=new WeakMap,vw=/auto|scroll/,bw=/^tb|vertical/,gw=/msie|trident/i.test(yw.navigator&&yw.navigator.userAgent),ww=function(t){return parseFloat(t||"0")},Ow=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new lw((r?e:t)||0,(r?t:e)||0)},jw=cw({devicePixelContentBoxSize:Ow(),borderBoxSize:Ow(),contentBoxSize:Ow(),contentRect:new fw(0,0,0,0)}),Sw=function(t,e){if(void 0===e&&(e=!1),mw.has(t)&&!e)return mw.get(t);if(dw(t))return mw.set(t,jw),jw;var r=getComputedStyle(t),n=pw(t)&&t.ownerSVGElement&&t.getBBox(),o=!gw&&"border-box"===r.boxSizing,i=bw.test(r.writingMode||""),a=!n&&vw.test(r.overflowY||""),s=!n&&vw.test(r.overflowX||""),u=n?0:ww(r.paddingTop),c=n?0:ww(r.paddingRight),l=n?0:ww(r.paddingBottom),f=n?0:ww(r.paddingLeft),p=n?0:ww(r.borderTopWidth),d=n?0:ww(r.borderRightWidth),h=n?0:ww(r.borderBottomWidth),y=f+c,m=u+l,v=(n?0:ww(r.borderLeftWidth))+d,b=p+h,g=s?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-v-t.clientWidth:0,O=o?y+v:0,j=o?m+b:0,S=n?n.width:ww(r.width)-O-w,x=n?n.height:ww(r.height)-j-g,P=S+y+w+v,_=x+m+g+b,E=cw({devicePixelContentBoxSize:Ow(Math.round(S*devicePixelRatio),Math.round(x*devicePixelRatio),i),borderBoxSize:Ow(P,_,i),contentBoxSize:Ow(S,x,i),contentRect:new fw(f,u,S,x)});return mw.set(t,E),E},xw=function(t,e,r){var n=Sw(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case iw.DEVICE_PIXEL_CONTENT_BOX:return a;case iw.BORDER_BOX:return o;default:return i}},Pw=function(t){var e=Sw(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=cw([e.borderBoxSize]),this.contentBoxSize=cw([e.contentBoxSize]),this.devicePixelContentBoxSize=cw([e.devicePixelContentBoxSize])},_w=function(t){if(dw(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},Ew=function(){var t=1/0,e=[];aw.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new Pw(e.target),o=_w(e.target);n.push(r),e.lastReportedSize=xw(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},Cw=function(){var t,e=0;for(kw(e);aw.some((function(t){return t.activeTargets.length>0}));)e=Ew(),kw(e);return aw.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:sw}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=sw),window.dispatchEvent(t)),e>0},Tw=[],Rw=function(t){if(!uw){var e=0,r=document.createTextNode("");new MutationObserver((function(){return Tw.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),uw=function(){r.textContent="".concat(e?e--:e++)}}Tw.push(t),uw()},Dw=0,Nw={attributes:!0,characterData:!0,childList:!0,subtree:!0},Iw=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Lw=function(t){return void 0===t&&(t=0),Date.now()+t},Aw=!1,Fw=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!Aw){Aw=!0;var r=Lw(t);!function(t){Rw((function(){requestAnimationFrame(t)}))}((function(){var n=!1;try{n=Cw()}finally{if(Aw=!1,t=r-Lw(),!Dw)return;n?e.run(1e3):t>0?e.run(t):e.start()}}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,Nw)};document.body?e():yw.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Iw.forEach((function(e){return yw.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Iw.forEach((function(e){return yw.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),Mw=new Fw,Bw=function(t){!Dw&&t>0&&Mw.start(),!(Dw+=t)&&Mw.stop()},Uw=function(){function t(t,e){this.target=t,this.observedBox=e||iw.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=xw(this.target,this.observedBox,!0);return t=this.target,pw(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Vw=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},zw=new WeakMap,Gw=function(t,e){for(var r=0;r=0&&(o&&aw.splice(aw.indexOf(r),1),r.observationTargets.splice(n,1),Bw(-1))},t.disconnect=function(t){var e=this,r=zw.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Ww=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Hw.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hw(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hw.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hw(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hw.unobserve(this,t)},t.prototype.disconnect=function(){Hw.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}(),Yw=function(t,e){return Yw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Yw(t,e)};function qw(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Yw(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var $w=function(){return $w=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Zw(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o-1||/[A-Z]/.test(t))}var LO={};var AO=["","X","Y","Z"],FO=["transformPerspective","x","y","z"];function MO(t,e){return FO.indexOf(t)-FO.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return AO.forEach((function(e){return FO.push(t+e)}))}));var BO=new Set(FO);function UO(t){return BO.has(t)}var VO=new Set(["originX","originY","originZ"]);function zO(t){return VO.has(t)}function GO(t,e){var r=e.layout,n=e.layoutId;return UO(t)||zO(t)||(r||void 0!==n)&&(!!LO[t]||"opacity"===t)}var HO=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},WO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function YO(t){return t.startsWith("--")}var qO=function(t,e){return e&&"number"==typeof t?e.transform(t):t};const $O=(t,e)=>r=>Math.max(Math.min(r,e),t),XO=t=>t%1?Number(t.toFixed(5)):t,KO=/(-)?([\d]*\.?[\d])+/g,ZO=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,JO=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function QO(t){return"string"==typeof t}const tj=t=>({test:e=>QO(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ej=tj("deg"),rj=tj("%"),nj=tj("px"),oj=tj("vh"),ij=tj("vw"),aj=Object.assign(Object.assign({},rj),{parse:t=>rj.parse(t)/100,transform:t=>rj.transform(100*t)}),sj={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},uj=Object.assign(Object.assign({},sj),{transform:$O(0,1)}),cj=Object.assign(Object.assign({},sj),{default:1});var lj=$w($w({},sj),{transform:Math.round}),fj={borderWidth:nj,borderTopWidth:nj,borderRightWidth:nj,borderBottomWidth:nj,borderLeftWidth:nj,borderRadius:nj,radius:nj,borderTopLeftRadius:nj,borderTopRightRadius:nj,borderBottomRightRadius:nj,borderBottomLeftRadius:nj,width:nj,maxWidth:nj,height:nj,maxHeight:nj,size:nj,top:nj,right:nj,bottom:nj,left:nj,padding:nj,paddingTop:nj,paddingRight:nj,paddingBottom:nj,paddingLeft:nj,margin:nj,marginTop:nj,marginRight:nj,marginBottom:nj,marginLeft:nj,rotate:ej,rotateX:ej,rotateY:ej,rotateZ:ej,scale:cj,scaleX:cj,scaleY:cj,scaleZ:cj,skew:ej,skewX:ej,skewY:ej,distance:nj,translateX:nj,translateY:nj,translateZ:nj,x:nj,y:nj,z:nj,perspective:nj,transformPerspective:nj,opacity:uj,originX:aj,originY:aj,originZ:nj,zIndex:lj,fillOpacity:uj,strokeOpacity:uj,numOctaves:lj};function pj(t,e,r,n){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,c=t.transformOrigin;u.length=0;var l=!1,f=!1,p=!0;for(var d in e){var h=e[d];if(YO(d))a[d]=h;else{var y=fj[d],m=qO(h,y);if(UO(d)){if(l=!0,s[d]=m,u.push(d),!p)continue;h!==(null!==(o=y.default)&&void 0!==o?o:0)&&(p=!1)}else zO(d)?(c[d]=m,f=!0):i[d]=m}}l?i.transform=function(t,e,r,n){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,c=void 0===u||u,l="";i.sort(MO);for(var f=!1,p=i.length,d=0;dr=>e(t(r)),bS=(...t)=>t.reduce(vS);var gS=new Set;var wS=new WeakMap,OS=new WeakMap,jS=function(t){var e;null===(e=wS.get(t.target))||void 0===e||e(t)},SS=function(t){t.forEach(jS)};function xS(t,e,r){var n=function(t){var e=t.root,r=Xw(t,["root"]),n=e||document;OS.has(n)||OS.set(n,{});var o=OS.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(SS,$w({root:e},r))),o[i]}(e);return wS.set(t,r),n.observe(t),function(){wS.delete(t),n.unobserve(t)}}var PS={some:0,all:1};function _S(t,e,r,n){var i=n.root,a=n.margin,s=n.amount,u=void 0===s?"some":s,c=n.once;(0,o.useEffect)((function(){if(t){var n={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof u?u:PS[u]};return xS(r.getInstance(),n,(function(t){var n,o=t.isIntersecting;if(e.isInView!==o&&(e.isInView=o,!c||o||!e.hasEnteredView)){o&&(e.hasEnteredView=!0),null===(n=r.animationState)||void 0===n||n.setActive(Gj.InView,o);var i=r.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,u])}function ES(t,e,r,n){var i=n.fallback,a=void 0===i||i;(0,o.useEffect)((function(){var n,o;t&&a&&("production"!==Qw&&(n="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||gS.has(n)||(console.warn(n),o&&console.warn(o),gS.add(n))),requestAnimationFrame((function(){var t;e.hasEnteredView=!0;var n=r.getProps().onViewportEnter;null==n||n(null),null===(t=r.animationState)||void 0===t||t.setActive(Gj.InView,!0)})))}),[t])}var kS=function(t){return function(e){return t(e),null}},CS={inView:kS((function(t){var e=t.visualElement,r=t.whileInView,n=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=(0,o.useRef)({hasEnteredView:!1,isInView:!1}),c=Boolean(r||n||i);s.once&&u.current.hasEnteredView&&(c=!1),("undefined"==typeof IntersectionObserver?ES:_S)(c,u.current,e,s)})),tap:kS((function(t){var e=t.onTap,r=t.onTapStart,n=t.onTapCancel,i=t.whileTap,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(!1),c=(0,o.useRef)(null),l={passive:!(r||e||n||y)};function f(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function p(){var t;return f(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(Gj.Tap,!1),!dS()}function d(t,r){p()&&(yS(a.getInstance(),t.target)?null==e||e(t,r):null==n||n(t,r))}function h(t,e){p()&&(null==n||n(t,e))}function y(t,e){var n;f(),u.current||(u.current=!0,c.current=bS(sS(window,"pointerup",d,l),sS(window,"pointercancel",h,l)),null===(n=a.animationState)||void 0===n||n.setActive(Gj.Tap,!0),null==r||r(t,e))}uS(a,"pointerdown",s?y:void 0,l),mS(f)})),focus:kS((function(t){var e=t.whileFocus,r=t.visualElement;qj(r,"focus",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Gj.Focus,!0)}:void 0),qj(r,"blur",e?function(){var t;null===(t=r.animationState)||void 0===t||t.setActive(Gj.Focus,!1)}:void 0)})),hover:kS((function(t){var e=t.onHoverStart,r=t.onHoverEnd,n=t.whileHover,o=t.visualElement;uS(o,"pointerenter",e||n?hS(o,!0,e):void 0,{passive:!e}),uS(o,"pointerleave",r||n?hS(o,!1,r):void 0,{passive:!r})}))},TS=0,RS=function(){return TS++},DS=function(){return PO(RS)};function NS(){var t=(0,o.useContext)(cO);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,n=t.register,i=DS();(0,o.useEffect)((function(){return n(i)}),[]);return!e&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}function IS(t,e){if(!Array.isArray(e))return!1;var r=e.length;if(r!==t.length)return!1;for(var n=0;nMath.min(Math.max(r,t),e),AS=.001,FS=.01,MS=10,BS=.05,US=1;function VS({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let o,i;rO(t<=1e3*MS,"Spring duration must be 10 seconds or less");let a=1-e;a=LS(BS,US,a),t=LS(FS,MS,t/1e3),a<1?(o=e=>{const n=e*a,o=n*t,i=n-r,s=GS(e,a),u=Math.exp(-o);return AS-i/s*u},i=e=>{const n=e*a*t,i=n*r+r,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-n),c=GS(Math.pow(e,2),a);return(-o(e)+AS>0?-1:1)*((i-s)*u)/c}):(o=e=>Math.exp(-e*t)*((e-r)*t+1)-AS,i=e=>Math.exp(-e*t)*(t*t*(r-e)));const s=function(t,e,r){let n=r;for(let r=1;rvoid 0!==t[e]))}function qS(t){var{from:e=0,to:r=1,restSpeed:n=2,restDelta:o}=t,i=Xw(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:s,damping:u,mass:c,velocity:l,duration:f,isResolvedFromDuration:p}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!YS(t,WS)&&YS(t,HS)){const r=VS(t);e=Object.assign(Object.assign(Object.assign({},e),r),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),d=$S,h=$S;function y(){const t=l?-l/1e3:0,n=r-e,i=u/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(r-e)/100,.4)),i<1){const e=GS(a,i);d=o=>{const s=Math.exp(-i*a*o);return r-s*((t+i*a*n)/e*Math.sin(e*o)+n*Math.cos(e*o))},h=r=>{const o=Math.exp(-i*a*r);return i*a*o*(Math.sin(e*r)*(t+i*a*n)/e+n*Math.cos(e*r))-o*(Math.cos(e*r)*(t+i*a*n)-e*n*Math.sin(e*r))}}else if(1===i)d=e=>r-Math.exp(-a*e)*(n+(t+a*n)*e);else{const e=a*Math.sqrt(i*i-1);d=o=>{const s=Math.exp(-i*a*o),u=Math.min(e*o,300);return r-s*((t+i*a*n)*Math.sinh(u)+e*n*Math.cosh(u))/e}}}return y(),{next:t=>{const e=d(t);if(p)a.done=t>=f;else{const i=1e3*h(t),s=Math.abs(i)<=n,u=Math.abs(r-e)<=o;a.done=s&&u}return a.value=a.done?r:e,a},flipTarget:()=>{l=-l,[e,r]=[r,e],y()}}}qS.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const $S=t=>0,XS=(t,e,r)=>{const n=e-t;return 0===n?1:(r-t)/n},KS=(t,e,r)=>-r*t+r*e+t,ZS=(t,e)=>r=>Boolean(QO(r)&&JO.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),JS=(t,e,r)=>n=>{if(!QO(n))return n;const[o,i,a,s]=n.match(KO);return{[t]:parseFloat(o),[e]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},QS=$O(0,255),tx=Object.assign(Object.assign({},sj),{transform:t=>Math.round(QS(t))}),ex={test:ZS("rgb","red"),parse:JS("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+tx.transform(t)+", "+tx.transform(e)+", "+tx.transform(r)+", "+XO(uj.transform(n))+")"};const rx={test:ZS("#"),parse:function(t){let e="",r="",n="",o="";return t.length>5?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),o=t.substr(4,1),e+=e,r+=r,n+=n,o+=o),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:ex.transform},nx={test:ZS("hsl","hue"),parse:JS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+rj.transform(XO(e))+", "+rj.transform(XO(r))+", "+XO(uj.transform(n))+")"};function ox(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ix({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,r/=100;let o=0,i=0,a=0;if(e/=100){const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;o=ox(s,n,t+1/3),i=ox(s,n,t),a=ox(s,n,t-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}const ax=(t,e,r)=>{const n=t*t,o=e*e;return Math.sqrt(Math.max(0,r*(o-n)+n))},sx=[rx,ex,nx],ux=t=>sx.find((e=>e.test(t))),cx=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,lx=(t,e)=>{let r=ux(t),n=ux(e);nO(!!r,cx(t)),nO(!!n,cx(e));let o=r.parse(t),i=n.parse(e);r===nx&&(o=ix(o),r=ex),n===nx&&(i=ix(i),n=ex);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=ax(o[e],i[e],t));return a.alpha=KS(o.alpha,i.alpha,t),r.transform(a)}},fx={test:t=>ex.test(t)||rx.test(t)||nx.test(t),parse:t=>ex.test(t)?ex.parse(t):nx.test(t)?nx.parse(t):rx.parse(t),transform:t=>QO(t)?t:t.hasOwnProperty("red")?ex.transform(t):nx.transform(t)},px="${c}",dx="${n}";function hx(t){"number"==typeof t&&(t=`${t}`);const e=[];let r=0;const n=t.match(ZO);n&&(r=n.length,t=t.replace(ZO,px),e.push(...n.map(fx.parse)));const o=t.match(KO);return o&&(t=t.replace(KO,dx),e.push(...o.map(sj.parse))),{values:e,numColors:r,tokenised:t}}function yx(t){return hx(t).values}function mx(t){const{values:e,numColors:r,tokenised:n}=hx(t),o=e.length;return t=>{let e=n;for(let n=0;n"number"==typeof t?0:t;const bx={test:function(t){var e,r,n,o;return isNaN(t)&&QO(t)&&(null!==(r=null===(e=t.match(KO))||void 0===e?void 0:e.length)&&void 0!==r?r:0)+(null!==(o=null===(n=t.match(ZO))||void 0===n?void 0:n.length)&&void 0!==o?o:0)>0},parse:yx,createTransformer:mx,getAnimatableNone:function(t){const e=yx(t);return mx(t)(e.map(vx))}},gx=t=>"number"==typeof t;function wx(t,e){return gx(t)?r=>KS(t,e,r):fx.test(t)?lx(t,e):xx(t,e)}const Ox=(t,e)=>{const r=[...t],n=r.length,o=t.map(((t,r)=>wx(t,e[r])));return t=>{for(let e=0;e{const r=Object.assign(Object.assign({},t),e),n={};for(const o in r)void 0!==t[o]&&void 0!==e[o]&&(n[o]=wx(t[o],e[o]));return t=>{for(const e in n)r[e]=n[e](t);return r}};function Sx(t){const e=bx.parse(t),r=e.length;let n=0,o=0,i=0;for(let t=0;t{const r=bx.createTransformer(e),n=Sx(t),o=Sx(e);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?bS(Ox(n.parsed,o.parsed),r):(rO(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),r=>`${r>0?e:t}`)},Px=(t,e)=>r=>KS(t,e,r);function _x(t,e,r){const n=[],o=r||("number"==typeof(i=t[0])?Px:"string"==typeof i?fx.test(i)?lx:xx:Array.isArray(i)?Ox:"object"==typeof i?jx:void 0);var i;const a=t.length-1;for(let r=0;rt[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=_x(e,n,o),s=2===i?function([t,e],[r]){return n=>r(XS(t,e,n))}(t,a):function(t,e){const r=t.length,n=r-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[n]&&(i=n-1,a=!0),!a){let e=1;for(;eo||e===n);e++);i=e-1}const s=XS(t[i],t[i+1],o);return e[i](s)}}(t,a);return r?e=>s(LS(t[0],t[i-1],e)):s}const kx=t=>e=>1-t(1-e),Cx=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tx=t=>e=>e*e*((t+1)*e-t),Rx=t=>t,Dx=(Nx=2,t=>Math.pow(t,Nx));var Nx;const Ix=kx(Dx),Lx=Cx(Dx),Ax=t=>1-Math.sin(Math.acos(t)),Fx=kx(Ax),Mx=Cx(Fx),Bx=Tx(1.525),Ux=kx(Bx),Vx=Cx(Bx),zx=(t=>{const e=Tx(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),Gx=t=>{if(1===t||0===t)return t;const e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Hx=kx(Gx);function Wx(t,e){return t.map((()=>e||Lx)).splice(0,t.length-1)}function Yx({from:t=0,to:e=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map((t=>t*e))}(n&&n.length===a.length?n:function(t){const e=t.length;return t.map(((t,r)=>0!==r?r/(e-1):0))}(a),o);function u(){return Ex(s,a,{ease:Array.isArray(r)?r:Wx(a,r)})}let c=u();return{next:t=>(i.value=c(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),c=u()}}}const qx={keyframes:Yx,spring:qS,decay:function({velocity:t=0,from:e=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let s=r*t;const u=e+s,c=void 0===i?u:i(u);return c!==u&&(s=c-e),{next:t=>{const e=-s*Math.exp(-t/n);return a.done=!(e>o||e<-o),a.value=a.done?c:c+e,a},flipTarget:()=>{}}}};const $x=1/60*1e3,Xx="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Kx="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout((()=>t(Xx())),$x);let Zx=!0,Jx=!1,Qx=!1;const tP={delta:0,timestamp:0},eP=["read","update","preRender","render","postRender"],rP=eP.reduce(((t,e)=>(t[e]=function(t){let e=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,c=u?e:r;return i&&a.add(t),-1===c.indexOf(t)&&(c.push(t),u&&o&&(n=e.length)),t},cancel:t=>{const e=r.indexOf(t);-1!==e&&r.splice(e,1),a.delete(t)},process:u=>{if(o)i=!0;else{if(o=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let r=0;rJx=!0)),t)),{}),nP=eP.reduce(((t,e)=>{const r=rP[e];return t[e]=(t,e=!1,n=!1)=>(Jx||uP(),r.schedule(t,e,n)),t}),{}),oP=eP.reduce(((t,e)=>(t[e]=rP[e].cancel,t)),{}),iP=eP.reduce(((t,e)=>(t[e]=()=>rP[e].process(tP),t)),{}),aP=t=>rP[t].process(tP),sP=t=>{Jx=!1,tP.delta=Zx?$x:Math.max(Math.min(t-tP.timestamp,40),1),tP.timestamp=t,Qx=!0,eP.forEach(aP),Qx=!1,Jx&&(Zx=!1,Kx(sP))},uP=()=>{Jx=!0,Zx=!0,Qx||Kx(sP)},cP=()=>tP,lP=nP;function fP(t,e,r=0){return t-e-r}const pP=t=>{const e=({delta:e})=>t(e);return{start:()=>lP.update(e,!0),stop:()=>oP.update(e)}};function dP(t){var e,r,{from:n,autoplay:o=!0,driver:i=pP,elapsed:a=0,repeat:s=0,repeatType:u="loop",repeatDelay:c=0,onPlay:l,onStop:f,onComplete:p,onRepeat:d,onUpdate:h}=t,y=Xw(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let m,v,b,{to:g}=y,w=0,O=y.duration,j=!1,S=!0;const x=function(t){if(Array.isArray(t.to))return Yx;if(qx[t.type])return qx[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Yx:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?qS:Yx}(y);(null===(r=(e=x).needsInterpolation)||void 0===r?void 0:r.call(e,n,g))&&(b=Ex([0,100],[n,g],{clamp:!1}),n=0,g=100);const P=x(Object.assign(Object.assign({},y),{from:n,to:g}));function _(){w++,"reverse"===u?(S=w%2==0,a=function(t,e,r=0,n=!0){return n?fP(e+-t,e,r):e-(t-e)+r}(a,O,c,S)):(a=fP(a,O,c),"mirror"===u&&P.flipTarget()),j=!1,d&&d()}function E(t){if(S||(t=-t),a+=t,!j){const t=P.next(Math.max(0,a));v=t.value,b&&(v=b(v)),j=S?t.done:a<=0}null==h||h(v),j&&(0===w&&(null!=O||(O=a)),w=e+r:t<=-r}(a,O,c,S)&&_():(m.stop(),p&&p()))}return o&&(null==l||l(),m=i(E),m.start()),{stop:()=>{null==f||f(),m.stop()}}}function hP(t,e){return e?t*(1e3/e):0}var yP=function(t){return 1e3*t};const mP=(t,e)=>1-3*e+3*t,vP=(t,e)=>3*e-6*t,bP=t=>3*t,gP=(t,e,r)=>((mP(e,r)*t+vP(e,r))*t+bP(e))*t,wP=(t,e,r)=>3*mP(e,r)*t*t+2*vP(e,r)*t+bP(e),OP=1e-7,jP=10;const SP=8,xP=.001;const PP=11,_P=1/(PP-1);function EP(t,e,r,n){if(t===e&&r===n)return Rx;const o=new Float32Array(PP);for(let e=0;e=xP?function(t,e,r,n){for(let o=0;o0?r=a:e=a}while(Math.abs(i)>OP&&++s0===t||1===t?t:gP(i(t),e,n)}var kP={linear:Rx,easeIn:Dx,easeInOut:Lx,easeOut:Ix,circIn:Ax,circInOut:Mx,circOut:Fx,backIn:Bx,backInOut:Vx,backOut:Ux,anticipate:zx,bounceIn:Hx,bounceInOut:t=>t<.5?.5*(1-Gx(1-2*t)):.5*Gx(2*t-1)+.5,bounceOut:Gx},CP=function(t){if(Array.isArray(t)){nO(4===t.length,"Cubic bezier arrays must contain four numerical values.");var e=Kw(t,4);return EP(e[0],e[1],e[2],e[3])}return"string"==typeof t?(nO(void 0!==kP[t],"Invalid easing type '".concat(t,"'")),kP[t]):t},TP=function(t){return Array.isArray(t)&&"number"!=typeof t[0]},RP=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!bx.test(e)||e.startsWith("url(")))},DP=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},NP=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},IP=function(){return{type:"keyframes",ease:"linear",duration:.3}},LP=function(t){return{type:"keyframes",duration:.8,values:t}},AP={x:DP,y:DP,z:DP,rotate:DP,rotateX:DP,rotateY:DP,rotateZ:DP,scaleX:NP,scaleY:NP,scale:NP,opacity:IP,backgroundColor:IP,color:IP,default:NP},FP=function(t,e){var r;return r=Aj(e)?LP:AP[t]||AP.default,$w({to:e},r(e))};const MP=new Set(["brightness","contrast","saturate","opacity"]);function BP(t){let[e,r]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=r.match(KO)||[];if(!n)return t;const o=r.replace(n,"");let i=MP.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+o+")"}const UP=/([a-z-]*)\(.*?\)/g,VP=Object.assign(Object.assign({},bx),{getAnimatableNone:t=>{const e=t.match(UP);return e?e.map(BP).join(" "):t}});var zP=$w($w({},fj),{color:fx,backgroundColor:fx,outlineColor:fx,fill:fx,stroke:fx,borderColor:fx,borderTopColor:fx,borderRightColor:fx,borderBottomColor:fx,borderLeftColor:fx,filter:VP,WebkitFilter:VP}),GP=function(t){return zP[t]};function HP(t,e){var r,n=GP(t);return n!==VP&&(n=bx),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,e)}var WP={current:!1};var YP=!1;function qP(t,e,r){var n;return Array.isArray(e.to)&&(null!==(n=t.duration)&&void 0!==n||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=Zw([],Kw(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=Xw(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=$w($w({},t),FP(r,e.to))),$w($w({},e),function(t){var e=t.ease,r=t.times,n=t.yoyo,o=t.flip,i=t.loop,a=Xw(t,["ease","times","yoyo","flip","loop"]),s=$w({},a);return r&&(s.offset=r),a.duration&&(s.duration=yP(a.duration)),a.repeatDelay&&(s.repeatDelay=yP(a.repeatDelay)),e&&(s.ease=TP(e)?e.map(CP):CP(e)),"tween"===a.type&&(s.type="keyframes"),(n||i||o)&&(rO(!YP,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),YP=!0,n?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||n||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}(t))}function $P(t,e,r,n,o){var i,a=ZP(n,t),s=null!==(i=a.from)&&void 0!==i?i:e.get(),u=RP(t,r);"none"===s&&u&&"string"==typeof r?s=HP(t,r):XP(s)&&"string"==typeof r?s=KP(r):!Array.isArray(r)&&XP(r)&&"string"==typeof s&&(r=KP(s));var c=RP(t,s);return rO(c===u,"You are trying to animate ".concat(t,' from "').concat(s,'" to "').concat(r,'". ').concat(s," is not an animatable value - to enable this animation set ").concat(s," to a value animatable to ").concat(r," via the `style` property.")),c&&u&&!1!==a.type?function(){var n={from:s,to:r,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function({from:t=0,velocity:e=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:c,driver:l,onUpdate:f,onComplete:p,onStop:d}){let h;function y(t){return void 0!==r&&tn}function m(t){return void 0===r?n:void 0===n||Math.abs(r-t){var r;null==f||f(e),null===(r=t.onUpdate)||void 0===r||r.call(t,e)},onComplete:p,onStop:d}))}function b(t){v(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(y(t))b({from:t,velocity:e,to:m(t)});else{let n=o*e+t;void 0!==c&&(n=c(n));const a=m(n),s=a===r?-1:1;let l,f;const p=t=>{l=f,f=t,e=hP(t-l,cP().delta),(1===s&&t>a||-1===s&&tnull==h?void 0:h.stop()}}($w($w({},n),a)):dP($w($w({},qP(a,n,t)),{onUpdate:function(t){var e;n.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;n.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t,n,i=Mj(r);return e.set(i),o(),null===(t=null==a?void 0:a.onUpdate)||void 0===t||t.call(a,i),null===(n=null==a?void 0:a.onComplete)||void 0===n||n.call(a),{stop:function(){}}}}function XP(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function KP(t){return"number"==typeof t?0:HP("",t)}function ZP(t,e){return t[e]||t.default||t}function JP(t,e,r,n){return void 0===n&&(n={}),WP.current&&(n={type:!1}),e.start((function(o){var i,a,s=$P(t,e,r,n,o),u=function(t,e){var r,n;return null!==(n=null!==(r=(ZP(t,e)||{}).delay)&&void 0!==r?r:t.delay)&&void 0!==n?n:0}(n,t),c=function(){return a=s()};return u?i=window.setTimeout(c,yP(u)):c(),function(){clearTimeout(i),null==a||a.stop()}}))}var QP=function(t){return/^\-?\d*\.?\d+$/.test(t)},t_=function(t){return/^0[^.\s]+$/.test(t)};function e_(t,e){-1===t.indexOf(e)&&t.push(e)}function r_(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)}var n_=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return e_(this.subscriptions,t),function(){return r_(e.subscriptions,t)}},t.prototype.notify=function(t,e,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,r);else for(var o=0;oh&&v,j=Array.isArray(m)?m:[m],S=j.reduce(a,{});!1===b&&(S={});var x=y.prevResolvedValues,P=void 0===x?{}:x,_=$w($w({},P),S),E=function(t){O=!0,p.delete(t),y.needsAnimating[t]=!0};for(var k in _){var C=S[k],T=P[k];d.hasOwnProperty(k)||(C!==T?Aj(C)&&Aj(T)?!IS(C,T)||w?E(k):y.protectedKeys[k]=!0:void 0!==C?E(k):p.add(k):void 0!==C&&p.has(k)?E(k):y.protectedKeys[k]=!0)}y.prevProp=m,y.prevResolvedValues=S,y.isActive&&(d=$w($w({},d),S)),i&&t.blockInitialAnimation&&(O=!1),O&&!g&&f.push.apply(f,Zw([],Kw(j.map((function(t){return{animation:t,options:$w({type:o},e)}}))),!1))},m=0;mt.hasOwnProperty("x")&&t.hasOwnProperty("y"),E_=t=>__(t)&&t.hasOwnProperty("z"),k_=(t,e)=>Math.abs(t-e);function C_(t,e){if(gx(t)&&gx(e))return k_(t,e);if(__(t)&&__(e)){const r=k_(t.x,e.x),n=k_(t.y,e.y),o=E_(t)&&E_(e)?k_(t.z,e.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}var T_=function(){function t(t,e,r){var n=this,o=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var t=N_(n.lastMoveEventInfo,n.history),e=null!==n.startEvent,r=C_(t.offset,{x:0,y:0})>=3;if(e||r){var o=t.point,i=cP().timestamp;n.history.push($w($w({},o),{timestamp:i}));var a=n.handlers,s=a.onStart,u=a.onMove;e||(s&&s(n.lastMoveEvent,t),n.startEvent=n.lastMoveEvent),u&&u(n.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){n.lastMoveEvent=t,n.lastMoveEventInfo=R_(e,n.transformPagePoint),$j(t)&&0===t.buttons?n.handlePointerUp(t,e):lP.update(n.updatePoint,!0)},this.handlePointerUp=function(t,e){n.end();var r=n.handlers,o=r.onEnd,i=r.onSessionEnd,a=N_(R_(e,n.transformPagePoint),n.history);n.startEvent&&o&&o(t,a),i&&i(t,a)},!(Xj(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=o;var i=R_(Qj(t),this.transformPagePoint),a=i.point,s=cP().timestamp;this.history=[$w($w({},a),{timestamp:s})];var u=e.onSessionStart;u&&u(t,N_(i,this.history)),this.removeListeners=bS(sS(window,"pointermove",this.handlePointerMove),sS(window,"pointerup",this.handlePointerUp),sS(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),oP.update(this.updatePoint)},t}();function R_(t,e){return e?{point:e(t.point)}:t}function D_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function N_(t,e){var r=t.point;return{point:r,delta:D_(r,L_(e)),offset:D_(r,I_(e)),velocity:A_(e,.1)}}function I_(t){return t[0]}function L_(t){return t[t.length-1]}function A_(t,e){if(t.length<2)return{x:0,y:0};for(var r=t.length-1,n=null,o=L_(t);r>=0&&(n=t[r],!(o.timestamp-n.timestamp>yP(e)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function F_(t){return t.max-t.min}function M_(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=.01),C_(t,e)e?r="y":Math.abs(t.x)>e&&(r="x");return r}(u),void(null!==r.currentDirection&&(null==a||a(r.currentDirection)));r.updateAxis("x",e.point,u),r.updateAxis("y",e.point,u),r.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return r.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var r=this.isDragging;if(this.cancel(),r){var n=e.velocity;this.startAnimation(n);var o=this.getProps().onDragEnd;null==o||o(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Gj.Drag,!1)},t.prototype.updateAxis=function(t,e,r){var n=this.getProps().drag;if(r&&yE(t,n,this.currentDirection)){var o,i,a,s,u,c=this.getAxisMotionValue(t),l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=l,i=this.constraints[t],a=this.elastic[t],s=i.min,u=i.max,void 0!==s&&ou&&(o=a?KS(u,o,a.max):Math.min(o,u)),l=o),c.set(l)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),r=e.dragConstraints,n=e.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;r&&mO(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!r||!o)&&function(t,e){var r=e.top,n=e.left,o=e.bottom,i=e.right;return{x:H_(t.x,n,i),y:H_(t.y,r,o)}}(o.actual,r),this.elastic=function(t){return void 0===t&&(t=Y_),!1===t?t=0:!0===t&&(t=Y_),{x:q_(t,"left","right"),y:q_(t,"top","bottom")}}(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Z_((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var r={};return void 0!==e.min&&(r.min=e.min-t.min),void 0!==e.max&&(r.max=e.max-t.min),r}(o.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,r=t.onMeasureDragConstraints;if(!e||!mO(e))return!1;var n=e.current;nO(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(t,e,r){var n=pE(t,r),o=e.scroll;return o&&(sE(n.x,o.x),sE(n.y,o.y)),n}(n,o.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:W_(t.x,e.x),y:W_(t.y,e.y)}}(o.layout.actual,i);if(r){var s=r(function(t){var e=t.x,r=t.y;return{top:r.min,right:e.max,bottom:r.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=J_(s))}return a},t.prototype.startAnimation=function(t){var e=this,r=this.getProps(),n=r.drag,o=r.dragMomentum,i=r.dragElastic,a=r.dragTransition,s=r.dragSnapToOrigin,u=r.onDragTransitionEnd,c=this.constraints||{},l=Z_((function(r){var u;if(yE(r,n,e.currentDirection)){var l=null!==(u=null==c?void 0:c[r])&&void 0!==u?u:{};s&&(l={min:0,max:0});var f=i?200:1e6,p=i?40:1e7,d=$w($w({type:"inertia",velocity:o?t[r]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},a),l);return e.startAxisValueAnimation(r,d)}}));return Promise.all(l).then(u)},t.prototype.startAxisValueAnimation=function(t,e){return JP(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;Z_((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,r,n="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[n];return o||this.visualElement.getValue(t,null!==(r=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==r?r:0)},t.prototype.snapToCursor=function(t){var e=this;Z_((function(r){if(yE(r,e.getProps().drag,e.currentDirection)){var n=e.visualElement.projection,o=e.getAxisMotionValue(r);if(n&&n.layout){var i=n.layout.actual[r],a=i.min,s=i.max;o.set(t[r]-KS(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,r=this.getProps(),n=r.drag,o=r.dragConstraints,i=this.visualElement.projection;if(mO(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};Z_((function(t){var r,n,o,i,s,u=e.getAxisMotionValue(t);if(u){var c=u.get();a[t]=(r={min:c,max:c},n=e.constraints[t],o=.5,i=F_(r),(s=F_(n))>i?o=XS(n.min,n.max-i,r.min):i>s&&(o=XS(r.min,r.max-s,n.min)),LS(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Z_((function(t){if(yE(t,n,null)){var r=e.getAxisMotionValue(t),o=e.constraints[t],i=o.min,s=o.max;r.set(KS(i,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;dE.set(this.visualElement,this);var r=sS(this.visualElement.getInstance(),"pointerdown",(function(t){var r=e.getProps(),n=r.drag,o=r.dragListener;n&&(void 0===o||o)&&e.start(t)})),n=function(){mO(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();var a=Yj(window,"resize",(function(){return e.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(t){var r=t.delta,n=t.hasLayoutChanged;e.isDragging&&n&&(Z_((function(t){var n=e.getAxisMotionValue(t);n&&(e.originPoint[t]+=r[t].translate,n.set(n.get()+r[t].translate))})),e.visualElement.syncRender())})),function(){a(),r(),i()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,r=void 0!==e&&e,n=t.dragDirectionLock,o=void 0!==n&&n,i=t.dragPropagation,a=void 0!==i&&i,s=t.dragConstraints,u=void 0!==s&&s,c=t.dragElastic,l=void 0===c?Y_:c,f=t.dragMomentum,p=void 0===f||f;return $w($w({},t),{drag:r,dragDirectionLock:o,dragPropagation:a,dragConstraints:u,dragElastic:l,dragMomentum:p})},t}();function yE(t,e,r){return!(!0!==e&&e!==t||null!==r&&r!==t)}var mE={pan:kS((function(t){var e=t.onPan,r=t.onPanStart,n=t.onPanEnd,i=t.onPanSessionStart,a=t.visualElement,s=e||r||n||i,u=(0,o.useRef)(null),c=(0,o.useContext)(sO).transformPagePoint,l={onSessionStart:i,onStart:r,onMove:e,onEnd:function(t,e){u.current=null,n&&n(t,e)}};(0,o.useEffect)((function(){null!==u.current&&u.current.updateHandlers(l)})),uS(a,"pointerdown",s&&function(t){u.current=new T_(t,l,{transformPagePoint:c})}),mS((function(){return u.current&&u.current.end()}))})),drag:kS((function(t){var e=t.dragControls,r=t.visualElement,n=PO((function(){return new hE(r)}));(0,o.useEffect)((function(){return e&&e.subscribe(n)}),[n,e]),(0,o.useEffect)((function(){return n.addListeners()}),[n])}))},vE=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var bE=function(t){var e=t.treeType,r=void 0===e?"":e,n=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,a=t.measureViewportBox,s=t.render,u=t.readValueFromInstance,c=t.removeValueFromRenderState,l=t.sortNodePosition,f=t.scrapeMotionValuesFromProps;return function(t,e){var p=t.parent,d=t.props,h=t.presenceId,y=t.blockInitialAnimation,m=t.visualState,v=t.shouldReduceMotion;void 0===e&&(e={});var b,g,w=!1,O=m.latestValues,j=m.renderState,S=function(){var t=vE.map((function(){return new n_})),e={},r={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){vE.forEach((function(n){var o,i="on"+n,a=t[i];null===(o=e[n])||void 0===o||o.call(e),a&&(e[n]=r[i](a))}))}};return t.forEach((function(t,e){r["on"+vE[e]]=function(e){return t.add(e)},r["notify"+vE[e]]=function(){for(var e=[],r=0;r=0?window.pageYOffset:null,c=function(t,e,r){var n=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),r.forEach((function(t){s[t]=LE[t](n,i)})),e.syncRender();var u=e.measureViewportBox();return r.forEach((function(r){var n=e.getValue(r);CE(n,s[r]),t[r]=LE[r](u,i)})),t}(e,t,s);return i.length&&i.forEach((function(e){var r=Kw(e,2),n=r[0],o=r[1];t.getValue(n).set(o)})),t.syncRender(),null!==u&&window.scrollTo({top:u}),{target:c,transitionEnd:n}}return{target:e,transitionEnd:n}};var FE=function(t,e,r,n){var o=function(t,e,r){var n,o=Xw(e,[]),i=t.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:r};for(var a in r&&(r=$w({},r)),t.forEachValue((function(t){var e=t.get();if(OE(e)){var r=xE(e,i);r&&t.set(r)}})),o){var s=o[a];if(OE(s)){var u=xE(s,i);u&&(o[a]=u,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=s)))}}return{target:o,transitionEnd:r}}(t,e,n);return function(t,e,r,n){return kE(e)?AE(t,e,r,n):{target:e,transitionEnd:n}}(t,e=o.target,r,n=o.transitionEnd)};var ME={treeType:"dom",readValueFromInstance:function(t,e){if(UO(e)){var r=GP(e);return r&&r.default||0}var n,o=(n=t,window.getComputedStyle(n));return(YO(e)?o.getPropertyValue(e):o[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var r;return null===(r=t.style)||void 0===r?void 0:r[e]},measureViewportBox:function(t,e){return pE(t,e.transformPagePoint)},resetTransform:function(t,e,r){var n=r.transformTemplate;e.style.transform=n?n({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var r=e.vars,n=e.style;delete r[t],delete n[t]},makeTargetAnimatable:function(t,e,r,n){var o=r.transformValues;void 0===n&&(n=!0);var i=e.transition,a=e.transitionEnd,s=Xw(e,["transition","transitionEnd"]),u=function(t,e,r){var n,o,i={};for(var a in t)i[a]=null!==(n=h_(a,e))&&void 0!==n?n:null===(o=r.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},t);if(o&&(a&&(a=o(a)),s&&(s=o(s)),u&&(u=o(u))),n){!function(t,e,r){var n,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var c=0;c5)return o;var u=bx.createTransformer(t),c="number"!=typeof s[0]?1:0,l=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=l,s[1+c]/=f;var p=KS(l,f,.5);"number"==typeof s[2+c]&&(s[2+c]/=p),"number"==typeof s[3+c]&&(s[3+c]/=p);var d=u(s);if(i){var h=0;d=d.replace(HE,(function(){var t=a[h];return h++,t}))}return d}},YE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return qw(e,t),e.prototype.componentDidMount=function(){var t,e=this,r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=r.layoutId,s=n.projection;t=qE,Object.assign(LO,t),s&&((null==o?void 0:o.group)&&o.group.add(s),(null==i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions($w($w({},s.options),{onExitComplete:function(){return e.safeToRemove()}}))),_O.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,r=this.props,n=r.layoutDependency,o=r.visualElement,i=r.drag,a=r.isPresent,s=o.projection;return s?(s.isPresent=a,i||t.layoutDependency!==n||void 0===n?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||lP.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,r=t.layoutGroup,n=t.switchLayoutGroup,o=e.projection;o&&(o.scheduleCheckAfterUnmount(),(null==r?void 0:r.group)&&r.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(o.Component);var qE={borderRadius:$w($w({},GE),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:GE,borderTopRightRadius:GE,borderBottomLeftRadius:GE,borderBottomRightRadius:GE,boxShadow:WE},$E={measureLayout:function(t){var e=Kw(NS(),2),r=e[0],n=e[1],i=(0,o.useContext)(kO);return o.createElement(YE,$w({},t,{layoutGroup:i,switchLayoutGroup:(0,o.useContext)(CO),isPresent:r,safeToRemove:n}))}};var XE=["TopLeft","TopRight","BottomLeft","BottomRight"],KE=XE.length,ZE=function(t){return"string"==typeof t?parseFloat(t):t},JE=function(t){return"number"==typeof t||nj.test(t)};function QE(t,e){var r;return null!==(r=t[e])&&void 0!==r?r:t.borderRadius}var tk=rk(0,.5,Fx),ek=rk(.5,.95,Rx);function rk(t,e,r){return function(n){return ne?1:r(XS(t,e,n))}}function nk(t,e){t.min=e.min,t.max=e.max}function ok(t,e){nk(t.x,e.x),nk(t.y,e.y)}function ik(t,e,r,n,o){return t=nE(t-=e,1/r,n),void 0!==o&&(t=nE(t,1/o,n)),t}function ak(t,e,r,n,o){var i=Kw(r,3),a=i[0],s=i[1],u=i[2];!function(t,e,r,n,o,i,a){if(void 0===e&&(e=0),void 0===r&&(r=1),void 0===n&&(n=.5),void 0===i&&(i=t),void 0===a&&(a=t),rj.test(e)&&(e=parseFloat(e),e=KS(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=KS(i.min,i.max,n);t===i&&(s-=e),t.min=ik(t.min,e,r,s,o),t.max=ik(t.max,e,r,s,o)}}(t,e[a],e[s],e[u],e.scale,n,o)}var sk=["x","scaleX","originX"],uk=["y","scaleY","originY"];function ck(t,e,r,n){ak(t.x,e,sk,null==r?void 0:r.x,null==n?void 0:n.x),ak(t.y,e,uk,null==r?void 0:r.y,null==n?void 0:n.y)}function lk(t){return 0===t.translate&&1===t.scale}function fk(t){return lk(t.x)&&lk(t.y)}function pk(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var dk=function(){function t(){this.members=[]}return t.prototype.add=function(t){e_(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if(r_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,r=this.members.findIndex((function(e){return t===e}));if(0===r)return!1;for(var n=r;n>=0;n--){var o=this.members[n];if(!1!==o.isPresent){e=o;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var r,n=this.lead;t!==n&&(this.prevLead=n,this.lead=t,t.show(),n&&(n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues,t.snapshot.isShared=!0),(null===(r=t.root)||void 0===r?void 0:r.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&n.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,r,n,o,i;null===(r=(e=t.options).onExitComplete)||void 0===r||r.call(e),null===(i=null===(n=t.resumingFrom)||void 0===n?void 0:(o=n.options).onExitComplete)||void 0===i||i.call(o)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}(),hk="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yk(t,e,r){var n=t.x.translate/e.x,o=t.y.translate/e.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),r){var a=r.rotate,s=r.rotateX,u=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),u&&(i+="rotateY(".concat(u,"deg) "))}var c=t.x.scale*e.x,l=t.y.scale*e.y;return(i+="scale(".concat(c,", ").concat(l,")"))===hk?"none":i}var mk=function(t,e){return t.depth-e.depth},vk=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){e_(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){r_(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(mk),this.isDirty=!1,this.children.forEach(t)},t}(),bk=1e3;function gk(t){var e=t.attachResizeListener,r=t.defaultParent,n=t.measureScroll,o=t.checkIsScrollRoot,i=t.resetTransform;return function(){function t(t,e,n){var o=this;void 0===e&&(e={}),void 0===n&&(n=null==r?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(_k),o.nodes.forEach(Ek)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?Zw(Zw([],Kw(n.path),!1),[n],!1):[],this.parent=n,this.depth=n?n.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var i=0;i=0;n--)if(Boolean(t.path[n].instance)){r=t.path[n];break}var o=(r&&r!==t.root?r.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));o&&t.mount(o,!0)}function Lk(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ak(t){Lk(t.x),Lk(t.y)}var Fk=gk({attachResizeListener:function(t,e){return Yj(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Mk={current:void 0},Bk=gk({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!Mk.current){var t=new Fk(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Mk.current=t}return Mk.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"},checkIsScrollRoot:function(t){return Boolean("fixed"===window.getComputedStyle(t).position)}}),Uk=$w($w($w($w({},P_),CS),mE),$E),Vk=DO((function(t,e){return function(t,e,r,n,o){var i=e.forwardMotionProps,a=void 0!==i&&i,s=IO(t)?Hj:Wj;return $w($w({},s),{preloadedFeatures:r,useRender:Ej(a),createVisualElement:n,projectionNodeConstructor:o,Component:t})}(t,e,Uk,VE,Bk)}));var zk=r(296),Gk=r.n(zk);function Hk(t){let{debounce:e,scroll:r,polyfill:n,offsetSize:i}=void 0===t?{debounce:0,scroll:!1,offsetSize:!1}:t;const a=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,u]=(0,o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),l=e?"number"==typeof e?e:e.scroll:null,f=e?"number"==typeof e?e:e.resize:null,p=(0,o.useRef)(!1);(0,o.useEffect)((()=>(p.current=!0,()=>{p.current=!1})));const[d,h,y]=(0,o.useMemo)((()=>{const t=()=>{if(!c.current.element)return;const{left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l}=c.current.element.getBoundingClientRect(),f={left:t,top:e,width:r,height:n,bottom:o,right:a,x:s,y:l};c.current.element instanceof HTMLElement&&i&&(f.height=c.current.element.offsetHeight,f.width=c.current.element.offsetWidth),Object.freeze(f),p.current&&!qk(c.current.lastBounds,f)&&u(c.current.lastBounds=f)};return[t,f?Gk()(t,f):t,l?Gk()(t,l):t]}),[u,i,l,f]);function m(){c.current.scrollContainers&&(c.current.scrollContainers.forEach((t=>t.removeEventListener("scroll",y,!0))),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function v(){c.current.element&&(c.current.resizeObserver=new a(y),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach((t=>t.addEventListener("scroll",y,{capture:!0,passive:!0}))))}var b,g,w;return b=y,g=Boolean(r),(0,o.useEffect)((()=>{if(g){const t=b;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}}),[b,g]),w=h,(0,o.useEffect)((()=>{const t=w;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[w]),(0,o.useEffect)((()=>{m(),v()}),[r,y,h]),(0,o.useEffect)((()=>m),[]),[t=>{t&&t!==c.current.element&&(m(),c.current.element=t,c.current.scrollContainers=Wk(t),v())},s,d]}function Wk(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(t);return[r,n,o].some((t=>"auto"===t||"scroll"===t))&&e.push(t),[...e,...Wk(t.parentElement)]}const Yk=["x","y","top","bottom","left","right","width","height"],qk=(t,e)=>Yk.every((r=>t[r]===e[r]));function $k(){const{dragDropManager:t}=(0,o.useContext)(Tg);return Eb(null!=t,"Expected drag drop context"),t}var Xk=r(4063);const Kk="undefined"!=typeof window?o.useLayoutEffect:o.useEffect;function Zk(t,e,r){const[n,i]=(0,o.useState)((()=>e(t))),a=(0,o.useCallback)((()=>{const o=e(t);Xk(n,o)||(i(o),r&&r())}),[n,t,r]);return Kk(a),[n,a]}function Jk(t,e,r){return function(t,e,r){const[n,o]=Zk(t,e,r);return Kk((function(){const e=t.getHandlerId();if(null!=e)return t.subscribeToStateChange(o,{handlerIds:[e]})}),[t,o]),n}(e,t||(()=>({})),(()=>r.reconnect()))}function Qk(t,e){const r=[...e||[]];return null==e&&"function"!=typeof t&&r.push(t),(0,o.useMemo)((()=>"function"==typeof t?t():t),r)}function tC(t){return(0,o.useMemo)((()=>t.hooks.dragSource()),[t])}function eC(t){return(0,o.useMemo)((()=>t.hooks.dragPreview()),[t])}function rC(t,e,r,n){let o=r?r.call(n,t,e):void 0;if(void 0!==o)return!!o;if(t===e)return!0;if("object"!=typeof t||!t||"object"!=typeof e||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(e);for(let a=0;a{if(!(0,o.isValidElement)(e)){const n=e;return t(n,r),n}const n=e;!function(t){if("string"==typeof t.type)return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a
, or turn it into a drag source or a drop target itself.`)}(n);return function(t,e){const r=t.ref;return Eb("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 or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,o.cloneElement)(t,{ref:t=>{aC(r,t),aC(e,t)}}):(0,o.cloneElement)(t,{ref:e})}(n,r?e=>t(e,r):t)}}function iC(t){const e={};return Object.keys(t).forEach((r=>{const n=t[r];if(r.endsWith("Ref"))e[r]=t[r];else{const t=oC(n);e[r]=()=>t}})),e}function aC(t,e){"function"==typeof t?t(e):t.current=e}class sC{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(e?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!rC(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!rC(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=iC({dragSource:(t,e)=>{this.clearDragSource(),this.dragSourceOptions=e||null,nC(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,e)=>{this.clearDragPreview(),this.dragPreviewOptions=e||null,nC(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}let uC=!1,cC=!1;class lC{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Eb(!uC,"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 uC=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{uC=!1}}isDragging(){if(!this.sourceId)return!1;Eb(!cC,"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 cC=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{cC=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}class fC{beginDrag(){const t=this.spec,e=this.monitor;let r=null;return r="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(e):{},null!=r?r:null}canDrag(){const t=this.spec,e=this.monitor;return"boolean"==typeof t.canDrag?t.canDrag:"function"!=typeof t.canDrag||t.canDrag(e)}isDragging(t,e){const r=this.spec,n=this.monitor,{isDragging:o}=r;return o?o(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,r=this.connector,{end:n}=t;n&&n(e.getItem(),e),r.reconnect()}constructor(t,e,r){this.spec=t,this.monitor=e,this.connector=r}}function pC(t,e,r){const n=$k(),i=function(t,e,r){const n=(0,o.useMemo)((()=>new fC(t,e,r)),[e,r]);return(0,o.useEffect)((()=>{n.spec=t}),[t]),n}(t,e,r),a=function(t){return(0,o.useMemo)((()=>{const e=t.type;return Eb(null!=e,"spec.type must be defined"),e}),[t])}(t);Kk((function(){if(null!=a){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addSource(t,e);return[o,()=>n.removeSource(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}}),[n,e,r,i,a])}function dC(t,e){const r=Qk(t,e);Eb(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=function(){const t=$k();return(0,o.useMemo)((()=>new lC(t)),[t])}(),i=function(t,e){const r=$k(),n=(0,o.useMemo)((()=>new sC(r.getBackend())),[r]);return Kk((()=>(n.dragSourceOptions=t||null,n.reconnect(),()=>n.disconnectDragSource())),[n,t]),Kk((()=>(n.dragPreviewOptions=e||null,n.reconnect(),()=>n.disconnectDragPreview())),[n,e]),n}(r.options,r.previewOptions);return pC(r,n,i),[Jk(r.collect,n,i),tC(i),eC(i)]}function hC(t){return(0,o.useMemo)((()=>t.hooks.dropTarget()),[t])}class yC{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!rC(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=iC({dropTarget:(t,e)=>{this.clearDropTarget(),this.dropTargetOptions=e,nC(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}let mC=!1;class vC{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;Eb(!mC,"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 mC=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{mC=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}class bC{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function gC(t,e,r){const n=$k(),i=function(t,e){const r=(0,o.useMemo)((()=>new bC(t,e)),[e]);return(0,o.useEffect)((()=>{r.spec=t}),[t]),r}(t,e),a=function(t){const{accept:e}=t;return(0,o.useMemo)((()=>(Eb(null!=t.accept,"accept must be defined"),Array.isArray(e)?e:[e])),[e])}(t);Kk((function(){const[t,o]=function(t,e,r){const n=r.getRegistry(),o=n.addTarget(t,e);return[o,()=>n.removeTarget(o)]}(a,i,n);return e.receiveHandlerId(t),r.receiveHandlerId(t),o}),[n,e,i,r,a.map((t=>t.toString())).join("|")])}function wC(t,e){const r=Qk(t,e),n=function(){const t=$k();return(0,o.useMemo)((()=>new vC(t)),[t])}(),i=function(t){const e=$k(),r=(0,o.useMemo)((()=>new yC(e.getBackend())),[e]);return Kk((()=>(r.dropTargetOptions=t||null,r.reconnect(),()=>r.disconnectDropTarget())),[t]),r}(r.options);return gC(r,n,i),[Jk(r.collect,n,i),hC(i)]}const OC=(t,e)=>({event:t,check:e}),jC=OC("touchstart",(t=>{const e=t;return null!==e.touches&&void 0!==e.touches})),SC=(OC("dragstart",(t=>-1!==t.type.indexOf("drag")||-1!==t.type.indexOf("drop"))),OC("mousedown",(t=>-1===t.type.indexOf("touch")&&-1!==t.type.indexOf("mouse"))),OC("pointerdown",(t=>"mouse"==t.pointerType)));function xC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function _C(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,kC(t,e,"get"))}function EC(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,kC(t,e,"set"),r),r}function kC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var CC=new WeakMap;class TC{constructor(){PC(this,CC,{writable:!0,value:void 0}),xC(this,"register",(t=>{_C(this,CC).push(t)})),xC(this,"unregister",(t=>{let e;for(;-1!==(e=_C(this,CC).indexOf(t));)_C(this,CC).splice(e,1)})),xC(this,"backendChanged",(t=>{for(const e of _C(this,CC))e.backendChanged(t)})),EC(this,CC,[])}}function RC(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function DC(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NC(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,LC(t,e,"get"))}function IC(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,LC(t,e,"set"),r),r}function LC(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}var AC=new WeakMap,FC=new WeakMap,MC=new WeakMap,BC=new WeakMap,UC=new WeakMap,VC=new WeakMap,zC=new WeakMap,GC=new WeakMap,HC=new WeakMap,WC=new WeakMap,YC=new WeakMap;class qC{constructor(t,e,r){if(RC(this,AC,{writable:!0,value:void 0}),RC(this,FC,{writable:!0,value:void 0}),RC(this,MC,{writable:!0,value:void 0}),RC(this,BC,{writable:!0,value:void 0}),RC(this,UC,{writable:!0,value:void 0}),RC(this,VC,{writable:!0,value:(t,e,r)=>{var n,o;if(!r.backend)throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(r)));const i=r.backend(t,e,r.options);let a=r.id;const s=!r.id&&i&&i.constructor;if(s&&(a=i.constructor.name),!a)throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(r),"\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));if(s&&console.warn("Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend."),NC(this,MC)[a])throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(r)," (conflicts with: ").concat(JSON.stringify(NC(this,MC)[a]),")"));return{id:a,instance:i,preview:null!==(n=r.preview)&&void 0!==n&&n,transition:r.transition,skipDispatchOnTransition:null!==(o=r.skipDispatchOnTransition)&&void 0!==o&&o}}}),DC(this,"setup",(()=>{if("undefined"!=typeof window){if(qC.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");qC.isSetUp=!0,NC(this,zC).call(this,window),NC(this,MC)[NC(this,AC)].instance.setup()}})),DC(this,"teardown",(()=>{"undefined"!=typeof window&&(qC.isSetUp=!1,NC(this,GC).call(this,window),NC(this,MC)[NC(this,AC)].instance.teardown())})),DC(this,"connectDragSource",((t,e,r)=>NC(this,YC).call(this,"connectDragSource",t,e,r))),DC(this,"connectDragPreview",((t,e,r)=>NC(this,YC).call(this,"connectDragPreview",t,e,r))),DC(this,"connectDropTarget",((t,e,r)=>NC(this,YC).call(this,"connectDropTarget",t,e,r))),DC(this,"profile",(()=>NC(this,MC)[NC(this,AC)].instance.profile())),DC(this,"previewEnabled",(()=>NC(this,MC)[NC(this,AC)].preview)),DC(this,"previewsList",(()=>NC(this,FC))),DC(this,"backendsList",(()=>NC(this,BC))),RC(this,zC,{writable:!0,value:t=>{NC(this,BC).forEach((e=>{e.transition&&t.addEventListener(e.transition.event,NC(this,HC))}))}}),RC(this,GC,{writable:!0,value:t=>{NC(this,BC).forEach((e=>{e.transition&&t.removeEventListener(e.transition.event,NC(this,HC))}))}}),RC(this,HC,{writable:!0,value:t=>{const e=NC(this,AC);if(NC(this,BC).some((e=>!(e.id===NC(this,AC)||!e.transition||!e.transition.check(t))&&(IC(this,AC,e.id),!0))),NC(this,AC)!==e){var r;NC(this,MC)[e].instance.teardown(),Object.keys(NC(this,UC)).forEach((t=>{const e=NC(this,UC)[t];e.unsubscribe(),e.unsubscribe=NC(this,WC).call(this,e.func,...e.args)})),NC(this,FC).backendChanged(this);const n=NC(this,MC)[NC(this,AC)];if(n.instance.setup(),n.skipDispatchOnTransition)return;const o=new(0,t.constructor)(t.type,t);null===(r=t.target)||void 0===r||r.dispatchEvent(o)}}}),RC(this,WC,{writable:!0,value:(t,e,r,n)=>NC(this,MC)[NC(this,AC)].instance[t](e,r,n)}),RC(this,YC,{writable:!0,value:(t,e,r,n)=>{const o="".concat(t,"_").concat(e),i=NC(this,WC).call(this,t,e,r,n);return NC(this,UC)[o]={func:t,args:[e,r,n],unsubscribe:i},()=>{NC(this,UC)[o].unsubscribe(),delete NC(this,UC)[o]}}}),!r||!r.backends||r.backends.length<1)throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");IC(this,FC,new TC),IC(this,MC,{}),IC(this,BC,[]),r.backends.forEach((r=>{const n=NC(this,VC).call(this,t,e,r);NC(this,MC)[n.id]=n,NC(this,BC).push(n)})),IC(this,AC,NC(this,BC)[0].id),IC(this,UC,{})}}DC(qC,"isSetUp",!1);const $C=(t,e,r)=>new qC(t,e,r);var XC;!function(t){t.mouse="mouse",t.touch="touch",t.keyboard="keyboard"}(XC||(XC={}));class KC{get delay(){var t;return null!==(t=this.args.delay)&&void 0!==t?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return null!==(t=this.args.ignoreContextMenu)&&void 0!==t&&t}get enableHoverOutsideTarget(){var t;return null!==(t=this.args.enableHoverOutsideTarget)&&void 0!==t&&t}get enableKeyboardEvents(){var t;return null!==(t=this.args.enableKeyboardEvents)&&void 0!==t&&t}get enableMouseEvents(){var t;return null!==(t=this.args.enableMouseEvents)&&void 0!==t&&t}get enableTouchEvents(){var t;return null===(t=this.args.enableTouchEvents)||void 0===t||t}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayTouchStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get delayMouseStart(){var t,e,r,n;return null!==(n=null!==(r=null===(t=this.args)||void 0===t?void 0:t.delayMouseStart)&&void 0!==r?r:null===(e=this.args)||void 0===e?void 0:e.delay)&&void 0!==n?n:0}get window(){return this.context&&this.context.window?this.context.window:"undefined"!=typeof window?window:void 0}get document(){var t;return(null===(t=this.context)||void 0===t?void 0:t.document)?this.context.document:this.window?this.window.document:void 0}get rootElement(){var t;return(null===(t=this.args)||void 0===t?void 0:t.rootElement)||this.document}constructor(t,e){this.args=t,this.context=e}}const ZC={Left:1,Right:2,Center:4},JC={Left:0,Center:1,Right:2};function QC(t){return void 0===t.button||t.button===JC.Left}function tT(t){return!!t.targetTouches}const eT=1;function rT(t,e){return tT(t)?function(t,e){return 1===t.targetTouches.length?rT(t.targetTouches[0]):e&&1===t.touches.length&&t.touches[0].target===e.target?rT(t.touches[0]):void 0}(t,e):{x:t.clientX,y:t.clientY}}const nT=(()=>{let t=!1;try{addEventListener("test",(()=>{}),Object.defineProperty({},"passive",{get:()=>(t=!0,!0)}))}catch(t){}return t})(),oT={[XC.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[XC.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[XC.keyboard]:{keydown:"keydown"}};class iT{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(Eb(!iT.isSetUp,"Cannot have two Touch backends at the same time."),iT.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(iT.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,e,r,n=!1){const o=nT?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=oT[n][e];i&&t.addEventListener(i,r,o)}))}removeEventListener(t,e,r,n=!1){const o=nT?{capture:n,passive:!1}:n;this.listenerTypes.forEach((function(n){const i=oT[n][e];i&&t.removeEventListener(i,r,o)}))}connectDragSource(t,e){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,e),this.addEventListener(e,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(e,"start",r)}}connectDragPreview(t,e,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,e){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const n=n=>{if(!this.document||!r||!this.monitor.isDragging())return;let o;switch(n.type){case oT.mouse.move:o={x:n.clientX,y:n.clientY};break;case oT.touch.move:var i,a;o={x:(null===(i=n.touches[0])||void 0===i?void 0:i.clientX)||0,y:(null===(a=n.touches[0])||void 0===a?void 0:a.clientY)||0}}const s=null!=o?this.document.elementFromPoint(o.x,o.y):void 0,u=s&&e.contains(s);return s===e||u?this.handleMove(n,t):void 0};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(t,e),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",n))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver((()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())})),t&&t.parentElement&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,e,r){this.getSourceClientOffset=t=>{const e=this.sourceNodes.get(t);return e&&function(t){const e=t.nodeType===eT?t:t.parentElement;if(!e)return;const{top:r,left:n}=e.getBoundingClientRect();return{x:n,y:r}}(e)},this.handleTopMoveStartCapture=t=>{QC(t)&&(this.moveStartSourceIds=[])},this.handleMoveStart=t=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(t)},this.handleTopMoveStart=t=>{if(!QC(t))return;const e=rT(t);e&&(tT(t)&&(this.lastTargetTouchFallback=t.targetTouches[0]),this._mouseClientOffset=e),this.waitingForDelay=!1},this.handleTopMoveStartDelay=t=>{if(!QC(t))return;const e=t.type===oT.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,t),e),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(t,e)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(e)},this.handleTopMove=t=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:e,dragOverTargetIds:r}=this,n=this.options.enableHoverOutsideTarget,o=rT(t,this.lastTargetTouchFallback);if(!o)return;if(this._isScrolling||!this.monitor.isDragging()&&function(t,e,r,n,o){if(!o)return!1;const i=180*Math.atan2(n-e,r-t)/Math.PI+180;for(let t=0;t=e.start)&&(null==e.end||i<=e.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,o.x,o.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var i,a,s,u;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&e&&(i=this._mouseClientOffset.x||0,a=this._mouseClientOffset.y||0,s=o.x,u=o.y,Math.sqrt(Math.pow(Math.abs(s-i),2)+Math.pow(Math.abs(u-a),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(e,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const c=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(c),this.actions.publishDragSource(),t.cancelable&&t.preventDefault();const l=(r||[]).map((t=>this.targetNodes.get(t))).filter((t=>!!t)),f=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(o.x,o.y,l):this.document.elementsFromPoint(o.x,o.y),p=[];for(const t in f){if(!f.hasOwnProperty(t))continue;let e=f[t];for(null!=e&&p.push(e);e;)e=e.parentElement,e&&-1===p.indexOf(e)&&p.push(e)}const d=p.filter((t=>l.indexOf(t)>-1)).map((t=>this._getDropTargetId(t))).filter((t=>!!t)).filter(((t,e,r)=>r.indexOf(t)===e));if(n)for(const t in this.targetNodes){const e=this.targetNodes.get(t);if(c&&e&&e.contains(c)&&-1===d.indexOf(t)){d.unshift(t);break}}d.reverse(),this.actions.hover(d,{clientOffset:o})},this._getDropTargetId=t=>{const e=this.targetNodes.keys();let r=e.next();for(;!1===r.done;){const n=r.value;if(t===this.targetNodes.get(n))return n;r=e.next()}},this.handleTopMoveEndCapture=t=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(t){return void 0===t.buttons||0==(t.buttons&ZC.Left)}(t)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(t.cancelable&&t.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=t=>{"Escape"===t.key&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new KC(r,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(XC.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(XC.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(XC.keyboard)}}const aT=function(t,e={},r={}){return new iT(t,e,r)};var sT=function(){return sT=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.text?1:t.texto?i-1:i]},bT=function(t,e){var r="",n=0;return t.forEach((function(o,i){var a,s=function(t,e){var r=t.getBoundingClientRect();return e>r.top+r.height/2?"down":"up"}(o,(null===(a=e.getClientOffset())||void 0===a?void 0:a.y)||0);""===r?r=s:r!==s&&(r=s,n=i),i===t.length-1&&"down"===s&&(n=i+1)})),n},gT=function(t,e,r){var n=e.closest('[role="list"]'),o=null==n?void 0:n.querySelectorAll(':scope > [role="listitem"]');return o?bT(o,r):null},wT=function(t,e,r,n){var o;if(!e)return null;if(null===t){var i=e.querySelectorAll(':scope > [role="listitem"]');return{id:n.rootId,index:bT(i,r)}}var a=r.getItem(),s=e.querySelector('[role="list"]'),u=function(t,e,r){var n=t.getBoundingClientRect(),o=r.dropTargetOffset,i=n.top+o;return e>n.bottom-o?"lower":e [role="listitem"]');return{id:t.id,index:bT(i,r)}}return"middle"===u?{id:t.id,index:0}:yT(a,t.parent,n)?null===(c=gT(0,e,r))?null:{id:t.parent,index:c}:null};var OT=function(t){return void 0===t&&(t={}),{backends:[{id:"html5",backend:nw,options:t.html5,transition:SC},{id:"touch",backend:aT,options:t.touch||{enableMouseEvents:!0},preview:!0,transition:jC}]}},jT=function(t,e){return t.some((function(t){return t.parent===e}))},ST=(0,o.createContext)({}),xT=function(t){var e=FT(t.tree,t.initialOpen),r=e[0],n=e[1],i=n.handleToggle,a=n.handleCloseAll,s=n.handleOpenAll,u=n.handleOpen,c=n.handleClose;(0,o.useImperativeHandle)(t.treeRef,(function(){return{open:function(e){return u(e,t.onChangeOpen)},close:function(e){return c(e,t.onChangeOpen)},openAll:function(){return s(t.onChangeOpen)},closeAll:function(){return a(t.onChangeOpen)}}}));var l=$k().getMonitor(),f=t.canDrop,p=t.canDrag,d=sT(sT({extraAcceptTypes:[],listComponent:"ul",listItemComponent:"li",placeholderComponent:"li",sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},t),{openIds:r,onDrop:function(e,r,n){if(e){a={dragSourceId:e.id,dropTargetId:r,dragSource:e,dropTarget:pT(t.tree,r),monitor:l};var o=t.tree;if(pT(o,e.id)||(o=uT(uT([],o,!0),[e],!1)),!1===t.sort){var i=vT(o,e.id,r,n)[1];return a.destinationIndex=i,a.relativeIndex=n,void t.onDrop(function(t,e,r,n){var o=vT(t,e,r,n),i=o[0],a=o[1],s=uT([],t,!0);return function(t,e,r){var n=e<0?t.length+e:e;if(n>=0&&ne.subscribeToOffsetChange(n))),(0,o.useEffect)((()=>e.subscribeToStateChange(n))),r}((function(t){var e=t.getItemType();return{item:t.getItem(),clientOffset:t.getClientOffset(),isDragging:t.isDragging()&&e===DT.TREE_ITEM}}))},BT=function(){var t=(0,o.useContext)(ST);if(!t)throw new Error("useTreeContext must be used under TreeProvider");return t},UT=function(t){var e,r,n=BT(),i=(0,o.useContext)(kT),a=(0,o.useRef)(null),s=(0,o.useRef)(null),u=n.tree.find((function(e){return e.id===t.id})),c=n.openIds,l=n.classes,f=n.enableAnimateExpand,p=c.includes(t.id),d=function(t,e){var r=BT();(0,o.useEffect)((function(){var t=e.current;return null==t||t.addEventListener("dragstart",LT),null==t||t.addEventListener("touchstart",AT,{passive:!0}),function(){null==t||t.removeEventListener("dragstart",LT),null==t||t.removeEventListener("touchstart",AT)}}),[e]);var n=dC({type:DT.TREE_ITEM,item:function(n){var o=sT({ref:e},t);return r.onDragStart&&r.onDragStart(o,n),o},end:function(t,e){var n=t;r.onDragEnd&&r.onDragEnd(n,e)},canDrag:function(){var n=r.canDrag;return NT===e.current&&(!n||n(t.id))},collect:function(t){return{isDragging:t.isDragging()}}});return[n[0].isDragging,n[1],n[2]]}(u,a),h=d[0],y=d[1],m=d[2],v=function(t,e){var r=BT(),n=(0,o.useContext)(kT),i=wC({accept:uT([DT.TREE_ITEM],r.extraAcceptTypes,!0),drop:function(t,e){var o=n.dropTargetId,i=n.index;e.isOver({shallow:!0})&&void 0!==o&&void 0!==i&&r.onDrop(hT(t)?t:null,o,i),n.hidePlaceholder()},canDrop:function(n,o){if(o.isOver({shallow:!0})){var i=wT(t,e.current,o,r);return null!==i&&yT(n,i.id,r)}return!1},hover:function(o,i){if(i.isOver({shallow:!0})){var a=n.dropTargetId,s=n.index,u=n.showPlaceholder,c=n.hidePlaceholder,l=wT(t,e.current,i,r);if(null===l||!yT(o,l.id,r))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),a=i[0];return[a.isOver,a.dragSource,i[1]]}(u,a),b=v[0],g=v[1],w=v[2];!function(t,e,r){e.current?r(e):r(t),(0,o.useEffect)((function(){e.current?r(e):r(t)}),[e.current])}(a,s,y),yT(g,t.id,n)&&w(a),(0,o.useEffect)((function(){n.dragPreviewRender?m((ow||(ow=new Image,ow.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ow),{captureDraggingState:!0}):s.current&&m(a)}),[m,n.dragPreviewRender]),e=a,r=(0,o.useContext)(PT),(0,o.useEffect)((function(){if(e.current){var t=e.current,n=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.lock()},o=function(t){var e=t.target;(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&r.unlock()},i=function(t){return n(t)},a=function(t){return o(t)},s=function(t){return n(t)},u=function(t){return o(t)},c=new MutationObserver((function(){document.activeElement===document.body&&r.unlock()}));return c.observe(t,{subtree:!0,childList:!0}),t.addEventListener("mouseover",i),t.addEventListener("mouseout",a),t.addEventListener("focusin",s),t.addEventListener("focusout",u),function(){c.disconnect(),t.removeEventListener("mouseover",i),t.removeEventListener("mouseout",a),t.removeEventListener("focusin",s),t.removeEventListener("focusout",u)}}}),[e,r]),(0,o.useEffect)((function(){var t;null===(t=e.current)||void 0===t||t.setAttribute("draggable",r.isLock?"false":"true")}),[e,r.isLock]);var O=n.listItemComponent,j=(null==l?void 0:l.listItem)||"";b&&(null==l?void 0:l.dropTarget)&&(j="".concat(j," ").concat(l.dropTarget)),h&&(null==l?void 0:l.draggingSource)&&(j="".concat(j," ").concat(l.draggingSource));var S=!n.canDrag||n.canDrag(t.id),x=i.dropTargetId===t.id,P={depth:t.depth,isOpen:p,isDragging:h,isDropTarget:x,draggable:S,hasChild:jT(n.tree,t.id),containerRef:a,handleRef:s,onToggle:function(){return n.onToggle(u.id)}};return o.createElement(O,{ref:a,className:j,role:"listitem"},n.render(u,P),f&&P.hasChild&&o.createElement(cT,{isVisible:p},o.createElement(zT,{parentId:t.id,depth:t.depth+1})),!f&&P.hasChild&&p&&o.createElement(zT,{parentId:t.id,depth:t.depth+1}))},VT=function(t){var e=BT(),r=e.placeholderRender,n=e.placeholderComponent,i=e.classes,a=(0,o.useContext)(kT),s=$k().getMonitor().getItem();return r&&s&&t.dropTargetId===a.dropTargetId&&(t.index===a.index||void 0===t.index&&t.listCount===a.index)?o.createElement(n,{className:(null==i?void 0:i.placeholder)||""},r(s,{depth:t.depth})):null},zT=function(t){var e=BT(),r=(0,o.useRef)(null),n=e.tree.filter((function(e){return e.parent===t.parentId})),i=n,a="function"==typeof e.sort?e.sort:fT;if(e.insertDroppableFirst){var s=n.filter((function(t){return t.droppable})),u=n.filter((function(t){return!t.droppable}));!1===e.sort||(s=s.sort(a),u=u.sort(a)),i=uT(uT([],s,!0),u,!0)}else!1!==e.sort&&(i=n.sort(a));var c=function(t){var e=BT(),r=(0,o.useContext)(kT),n=wC({accept:uT([DT.TREE_ITEM],e.extraAcceptTypes,!0),drop:function(t,n){var o=e.rootId,i=e.onDrop,a=r.dropTargetId,s=r.index;n.isOver({shallow:!0})&&void 0!==a&&void 0!==s&&i(hT(t)?t:null,o,s),r.hidePlaceholder()},canDrop:function(t,r){var n=e.rootId;return!!r.isOver({shallow:!0})&&void 0!==t&&yT(t,n,e)},hover:function(n,o){if(o.isOver({shallow:!0})){var i=e.rootId,a=r.dropTargetId,s=r.index,u=r.showPlaceholder,c=r.hidePlaceholder,l=wT(null,t.current,o,e);if(null===l||!yT(n,i,e))return void c();l.id===a&&l.index===s||u(l.id,l.index)}},collect:function(t){var e=t.getItem();return{isOver:t.isOver({shallow:!0})&&t.canDrop(),dragSource:e}}}),i=n[0];return[i.isOver,i.dragSource,n[1]]}(r),l=c[0],f=c[1],p=c[2];t.parentId===e.rootId&&yT(f,e.rootId,e)&&p(r);var d=function(t,e){var r=BT(),n=r.rootId,o=r.rootProps,i=r.classes,a=(null==i?void 0:i.container)||"";return e&&(null==i?void 0:i.dropTarget)&&(a="".concat(a," ").concat(i.dropTarget)),t===n&&(null==i?void 0:i.root)&&(a="".concat(a," ").concat(i.root)),t===n&&(null==o?void 0:o.className)&&(a="".concat(a," ").concat(o.className)),a.trim()}(t.parentId,l),h=e.rootProps||{},y=e.listComponent;return o.createElement(y,sT({ref:r,role:"list"},h,{className:d}),i.map((function(e,r){return o.createElement(o.Fragment,{key:e.id},o.createElement(VT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId,index:r}),o.createElement(UT,{id:e.id,depth:t.depth}))})),o.createElement(VT,{depth:t.depth,listCount:i.length,dropTargetId:t.parentId}))},GT={height:"100%",left:0,pointerEvents:"none",position:"fixed",top:0,width:"100%",zIndex:100},HT=function(t){var e=t.clientOffset;if(!e)return{};var r=e.x,n=e.y;return{pointerEvents:"none",transform:"translate(".concat(r,"px, ").concat(n,"px)")}},WT=function(){var t=BT(),e=MT(),r=e.isDragging,n=e.clientOffset;return r&&n?o.createElement("div",{style:GT},o.createElement("div",{style:HT(e)},t.dragPreviewRender&&t.dragPreviewRender(e))):null};var YT=(0,o.forwardRef)((function(t,e){return o.createElement(RT,sT({},t,{treeRef:e}),t.dragPreviewRender&&o.createElement(WT,null),o.createElement(zT,{parentId:t.rootId,depth:0}))})),qT=r(3518),$T={insert:"head",singleton:!1};Ot()(qT.Z,$T);qT.Z.locals;const XT=function(){return(0,Pt.jsx)("div",{className:"drag-insert-placeholder"})};var KT=r(5293),ZT={insert:"head",singleton:!1};Ot()(KT.Z,ZT);KT.Z.locals;const JT=function(t){var e=t.text;return(0,Pt.jsx)("span",{className:"drag-placeholder",children:e})};function QT(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return tR(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tR(t,e)}(t,e)||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 tR(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function iR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function aR(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==a[0]?a[0]:{},e.next=3,mo.execute.get(t.path,t.id,"load",o);case 3:i=e.sent,n(aR(aR({},r),{},{isLoading:!1,rows:i.data.data}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),s=function(){var e=cR(oR().mark((function e(r,n){var o,i=arguments;return oR().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=i.length>2&&void 0!==i[2]?i[2]:[],e.next=3,mo.execute.get(t.path,t.id,"updateParent",{id:r,parentId:n,children:o});case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),u=function(){var e=cR(oR().mark((function e(){var r,n=arguments;return oR().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>0&&void 0!==n[0]?n[0]:[],e.next=3,mo.execute.get(t.path,t.id,"updateOrder",{children:r});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=function(e){re.goTo(t.path.module,t.action,{id:e.id})},l=function(){return r.rows.length?(0,Pt.jsx)(rR,{data:r.rows,onParentChange:s,onOrderChange:u,onClick:c}):(0,Pt.jsx)("div",{className:"index__placeholder",children:vt.get("snippets.no_plural_found",{plural:t.plural})})};return(0,Pt.jsxs)("div",{className:"index index--"+t.style+(r.isLoading?" index--loading":""),children:[(0,Pt.jsx)("div",{className:"index__header",children:(0,Pt.jsx)("div",{className:"index__header-title",children:bt.toUpperCaseFirst(t.plural)})}),l()]})}pR.defaultProps={type:"",components:[],path:{},id:0,data:{},params:{},action:"",plural:"",singular:""};const dR=pR;function hR(t){return hR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hR(t)}function yR(t,e){for(var r=0;r0?(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(ar,{onClick:this.goToPrev.bind(this),text:"Previous"})},1):null,(0,Pt.jsx)("div",{className:"wizard__footer-component",children:(0,Pt.jsx)(Je,{style:"large",onClick:this.goToNext.bind(this),text:this.isLastStep()?vt.get("snippets.create"):vt.get("snippets.next")})},2)]}},{key:"renderWizardContent",value:function(){var t=this;return this.props.steps.map((function(e,r){return(0,Pt.jsx)("div",{className:"wizard__step-content",style:{display:r===t.state.currentStepIndex?"block":"none"},children:t.componentLists[r].map((function(t){return t.component}))},r)}))}},{key:"isLastStep",value:function(){return this.state.currentStepIndex===this.props.steps.length-1}},{key:"goTo",value:function(t){(t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function zD(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function GD(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==o[0]?o[0]:null,t.next=3,io.all([mo.media.path(e),mo.media.loadDirectories(e),mo.media.loadFiles(e)]).then(io.spread((function(t,e,o){var i=t.data.data,a=e.data.data,s=o.data.data,u=i[i.length-1];p({type:"media/init",payload:{directory:u,path:i,directories:a,files:s}}),n(GD(GD({},r),{},{isLoading:!1,currentFile:null,selectedFiles:[],selectedFileIds:[]}))})));case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),h=function(){i.current.params.directory?d(i.current.params.directory):d()},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?re.goTo(i.current.module,i.current.action,{directory:t}):re.goTo(i.current.module,i.current.action)},v=function(){n(GD(GD({},r),{},{currentFile:null,selectedFiles:[],selectedFileIds:[]}))},b=function(t,e){e.length?1===e.length?n(GD(GD({},r),{},{currentFile:e[0],selectedFiles:e,selectedFileIds:t})):n(GD(GD({},r),{},{currentFile:null,selectedFiles:e,selectedFileIds:t})):v()},g=function(){var t=YD(VD().mark((function t(e){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteDirectory(e);case 3:p({type:"media/directories/delete",directoryIds:[e]}),gt.i18nNotify("snippets.directory_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.directory_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),w=function(){var t=YD(VD().mark((function t(e,r){var n;return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=13;break}return t.prev=1,t.next=4,mo.media.renameDirectory(e,r);case 4:n=t.sent,p({type:"media/directories/rename",payload:n.data.data}),gt.i18nNotify("snippets.directory_renamed"),v(),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 13:case"end":return t.stop()}}),t,null,[[1,10]])})));return function(e,r){return t.apply(this,arguments)}}(),O=function(){var t=YD(VD().mark((function t(e,r){var n;return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=12;break}return t.prev=1,t.next=4,mo.media.renameFile(e,r);case 4:n=t.sent,p({type:"media/files/rename",payload:n.data.data}),gt.i18nNotify("snippets.file_renamed"),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),gt.i18nNotify("snippets.changes_unsuccessful");case 12:case"end":return t.stop()}}),t,null,[[1,9]])})));return function(e,r){return t.apply(this,arguments)}}(),j=function(){var t=YD(VD().mark((function t(e){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFile(e);case 3:p({type:"media/files/delete",fileIds:[e]}),gt.i18nNotify("snippets.file_deleted"),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.notify(vt.get("snippets.file_not_deleted"));case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),S=function(){var t=YD(VD().mark((function t(e){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.deleteFiles(e);case 3:p({type:"media/files/delete",fileIds:e}),gt.i18nNotify("snippets.amount_files_deleted",{amount:e.length}),v(),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),gt.i18nNotify("snippets.files_not_deleted");case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=YD(VD().mark((function t(e,r){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.labelFile(e,r);case 3:p({type:"media/files/label",fileId:r,label:e}),gt.i18nNotify("snippets.changes_successful"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.i18nNotify("snippets.changes_unsuccessful");case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),_=function(){var t=YD(VD().mark((function t(e,r,n){var o;return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFile"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperty",fileId:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),E=function(){var t=YD(VD().mark((function t(e,r,n){var o;return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=e.toLowerCase(),!["visibility","description","copyright"].includes(e)){t.next=13;break}return o=mo.media["updateFiles"+bt.toUpperCaseFirst(e)],t.prev=3,t.next=6,o(r,n);case 6:p({type:"media/files/changeProperties",fileIds:n,property:e,value:r}),gt.notify(vt.get("snippets.changes_successful")),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),gt.notify(vt.get("snippets.changes_unsuccessful"));case 13:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,r,n){return t.apply(this,arguments)}}(),k=function(){var t=YD(VD().mark((function t(e,r){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveDirectory(e,r);case 3:p({type:"media/directories/move",moveToId:e,directoryIds:[r]}),gt.notify(vt.get("snippets.directory_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),C=function(){var t=YD(VD().mark((function t(e,r){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFile(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:[r]}),gt.notify(vt.get("snippets.file_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),T=function(){var t=YD(VD().mark((function t(e,r){return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,mo.media.moveFiles(e,r);case 3:p({type:"media/files/move",moveToId:e,fileIds:r}),gt.notify(vt.get("snippets.files_moved")),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),gt.notify(vt.get("snippets.changes_unsuccessful"));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e,r){return t.apply(this,arguments)}}(),R=function(t){window.open(t.url)},D=function(){h()},N=function(t){(!i.current.params.directory&&!t.directory||t.directory&&i.current.params.directory&&t.directory.id===i.current.params.directory)&&h()},I=function(){var t;gt.prompt({title:vt.get("snippets.new_directory_title"),confirmButtonText:vt.get("snippets.create"),cancelButtonText:vt.get("snippets.cancel"),confirm:(t=YD(VD().mark((function t(e){var r;return VD().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.media.createDirectory(e,i.current.params.directory);case 2:r=t.sent,p({type:"media/directories/add",payload:r.data.data}),gt.notify(vt.get("snippets.directory_created"));case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})})},L=function(t,e){gt.confirm({title:vt.get("snippets.delete_files_title",{amount:t.length}),text:vt.get("snippets.delete_files_text"),confirmButtonText:vt.get("snippets.delete_files_confirm",{amount:t.length}),cancelButtonText:vt.get("snippets.delete_files_cancel"),confirm:function(){return S(t)}})};return(0,Pt.jsxs)("div",{className:"view-media-directory"+(r.isLoading?" view-media-directory--loading":"")+(r.isDragOver?" view-media-directory--drag-over":""),children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header",children:[(0,Pt.jsxs)("div",{className:"view-media-directory__header-title",children:[(0,Pt.jsx)(sl,{style:["primary","small"],openIcon:"folder",closeIcon:"folder",children:(0,Pt.jsx)(Ml,{selectedDirectory:c?c.id:null,onDirectoryClick:function(t){return y(t)}})}),(0,Pt.jsx)($f,{items:u,onClick:function(t){t?y(t.id):y()}})]}),(0,Pt.jsxs)("div",{className:"view-media-directory__header-options",children:[(0,Pt.jsx)(Rp,{}),(0,Pt.jsx)(Je,{style:["secondary","small"],onClick:I,text:vt.get("snippets.new_directory")}),(0,Pt.jsx)(sl,{text:vt.get("snippets.upload"),style:["primary","small"],autoClose:!0,children:(0,Pt.jsx)(rp,{directory:c?c.id:null,onUploadDone:D})})]})]}),(0,Pt.jsx)("div",{className:"view-media-directory__content",children:r.isLoading?null:(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{className:"view-media-directory__main",children:(0,Pt.jsx)(wp,{directory:c?c.id:null,onCreateDirectory:N,onUploadDone:D,children:(0,Pt.jsx)(Bf,{viewMode:s,currentDirectory:c,directories:l,files:f,fileLabels:t.fileLabels,selectedFiles:r.selectedFiles,selectedFileIds:r.selectedFileIds,onDirectoryClick:y,onDirectoryDelete:g,onDirectoryRename:w,onDirectoryMove:k,onFileDelete:j,onFileRename:O,onFileOpen:R,onFileMove:C,onSelectionMove:T,onSelectionChange:b,onSelectionDelete:L})})}),(0,Pt.jsx)("div",{className:"view-media-directory__side",children:r.currentFile?(0,Pt.jsx)(PD,{file:r.currentFile,fileLabels:t.fileLabels,onLabelFile:function(t){return x(t,r.currentFile.id)},onChangeFileProperty:function(t,e){return _(t,e,r.currentFile.id)},onDeleteFile:function(){gt.confirm({title:vt.get("snippets.delete_file_title"),text:vt.get("snippets.delete_file_text"),confirmButtonText:vt.get("snippets.delete_file_confirm"),cancelButtonText:vt.get("snippets.delete_file_cancel"),confirm:function(){return j(r.currentFile.id)}})},onRenameFile:function(){gt.prompt({title:vt.get("snippets.rename_file_title"),defaultValue:r.currentFile.name,confirmButtonText:vt.get("snippets.rename_file_confirm"),cancelButtonText:vt.get("snippets.rename_file_cancel"),confirm:function(t){mo.media.renameFile(t,r.currentFile.id).then((function(t){n(GD(GD({},r),{},{currentFile:t.data.data}),(function(){gt.notify(vt.get("snippets.file_renamed")),h()}))}))}})},onMoveFile:C}):r.selectedFiles.length?(0,Pt.jsx)(DD,{files:r.selectedFiles,onDeleteFiles:function(){return L(r.selectedFileIds,r.selectedFiles)},onChangeFilesProperty:function(t,e){return E(t,e,r.selectedFileIds)},onMoveFiles:T}):c?(0,Pt.jsx)(AD,{directory:c}):(0,Pt.jsx)(BD,{})})]})})]})}XD.defaultProps={type:"",path:{},id:0,data:{},fileLabels:{}};const KD=XD;function ZD(t){return ZD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ZD(t)}function JD(t,e){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function sN(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function bN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function gN(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return wN(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wN(t,e)}(t,e)||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 wN(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>32-e}function r(t,e){var r,n,o,i,a;return o=2147483648&t,i=2147483648&e,a=(1073741823&t)+(1073741823&e),(r=1073741824&t)&(n=1073741824&e)?2147483648^a^o^i:r|n?1073741824&a?3221225472^a^o^i:1073741824^a^o^i:a^o^i}function n(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&e|~t&r}(n,o,i),a),u)),r(e(t,s),n)}function o(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t&r|e&~r}(n,o,i),a),u)),r(e(t,s),n)}function i(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return t^e^r}(n,o,i),a),u)),r(e(t,s),n)}function a(t,n,o,i,a,s,u){return t=r(t,r(r(function(t,e,r){return e^(t|~r)}(n,o,i),a),u)),r(e(t,s),n)}function s(t){var e,r="",n="";for(e=0;e<=3;e++)r+=(n="0"+(t>>>8*e&255).toString(16)).substr(n.length-2,2);return r}var u,c,l,f,p,d,h,y,m,v=Array();for(v=function(t){for(var e,r=t.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1),a=0,s=0;s>>29,i}(t=function(t){t=t.replace(/rn/g,"n");for(var e="",r=0;r127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(63&n|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(63&n|128))}return e}(t)),d=1732584193,h=4023233417,y=2562383102,m=271733878,u=0;u=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function HN(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function WN(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){HN(i,n,o,a,s,"next",t)}function s(t){HN(i,n,o,a,s,"throw",t)}a(void 0)}))}}function YN(t){var e=P(),r=m((function(t){return t.auth})).user,n=m((function(t){return t.modules.secondary})),o=function(){var t=WN(GN().mark((function t(){return GN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:gt.confirm({title:vt.get("snippets.logout"),confirmButtonText:vt.get("snippets.logout_confirm"),confirm:function(){var t=WN(GN().mark((function t(){return GN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mo.auth.logout();case 2:e({type:"auth/loggedout"}),gt.notify("User logged out");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,Pt.jsxs)("div",{className:"user-panel",children:[(0,Pt.jsx)("div",{className:"user-panel__avatar",children:(0,Pt.jsx)("img",{src:VN.get(r.email),alt:r.name})}),(0,Pt.jsx)("div",{className:"user-panel__name",children:r.name}),(0,Pt.jsx)("div",{className:"user-panel__actions",children:(0,Pt.jsxs)(sl,{style:["secondary"],children:[(0,Pt.jsx)(At,{stopPropagation:!1,links:n.map((function(t){return[t.title,t.id]})),onClick:function(t){return e=t,void re.goTo(e,"index");var e}}),(0,Pt.jsx)("div",{className:"user-panel__logout",children:(0,Pt.jsx)(Je,{stopPropagation:!1,onClick:o,style:["full","small"],text:vt.get("snippets.logout")})})]})})]})}function qN(){return(0,Pt.jsxs)("div",{className:"module",children:[(0,Pt.jsx)("div",{className:"module__header",children:(0,Pt.jsx)("div",{className:"module__title",children:(0,Pt.jsx)(us,{children:"Not found"})})}),(0,Pt.jsx)("div",{className:"module__main",children:"Are you sure you're trying to access the correct URL? No module or action was found for this request."})]})}function $N(t){return $N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$N(t)}function XN(){XN=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new P(o||[]);return n(a,"_invoke",{value:O(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function p(){}function d(){}function h(){}var y={};u(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(_([])));v&&v!==e&&r.call(v,i)&&(y=v);var b=h.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var u=l(t[n],t,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==$N(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function O(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=j(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function KN(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ZN(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],s=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,i,a=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict";var n=r(9742),o=r(645),i=r(5826);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return _(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var f=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function _(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),l=t.slice(e,r),f=0;fo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return O(this,t,e,r);case"latin1":case"binary":return j(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function k(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function A(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||A(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return i||A(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},5399:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".footer-text{color:var(--fill-color-alt-3);display:block;font-family:Poppins,sans-serif;font-size:.85rem;font-weight:500;letter-spacing:-.02em;line-height:1;text-align:center;width:100%}.footer-text a{text-decoration:underline;transition:color .5s}.footer-text a:hover{color:var(--primary-color);text-decoration:none}",""]);const i=o},9451:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.boolean-switcher{background-color:var(--fill-color-alt-1);border-radius:1.3333333333rem;cursor:pointer;display:inline-block;height:1.6666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:3.3333333333rem}.boolean-switcher:after{background-color:#fff;border-radius:50%;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:1.3333333333rem;left:.1666666667rem;position:absolute;top:.1666666667rem;transition:transform .25s;width:1.3333333333rem}.boolean-switcher--alt{background-color:#fff}.boolean-switcher--alt:after{background-color:var(--fill-color-alt-2)}.boolean-switcher--alt.boolean-switcher--checked:after{background-color:#fff}.boolean-switcher--checked{background-color:var(--primary-color-alt-1)}.boolean-switcher--checked:after{transform:translateX(1.6666666667rem)}.boolean-switcher--small{height:1rem;width:2.3333333333rem}.boolean-switcher--small:after{height:.6666666667rem;width:.6666666667rem}.boolean-switcher--small.boolean-switcher--checked:after{transform:translateX(1.3333333333rem)}',""]);const i=o},4195:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'@charset "UTF-8";.breadcrumbs__list{display:flex}.breadcrumbs__list li{color:#7b7d85}.breadcrumbs__list li:after{content:"›";margin-left:.6666666667rem;margin-right:.6666666667rem}.breadcrumbs__list li:last-child{color:#464646}.breadcrumbs__list li:last-child span{cursor:default}.breadcrumbs__list li:last-child span:hover{border-bottom:0}.breadcrumbs__list li:last-child:after{display:none}.breadcrumbs__list li span{cursor:pointer}.breadcrumbs__list li span:hover{border-bottom:1px solid hsla(228,4%,50%,.5)}',""]);const i=o},2314:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".button-group{border-radius:var(--border-radius);display:flex;flex-wrap:nowrap;overflow:hidden}",""]);const i=o},9151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.button{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;cursor:pointer;font-family:Poppins,sans-serif;font-size:.95rem;font-weight:500;line-height:1;overflow:hidden;padding:1rem 2rem;position:relative;transition:background-color .25s;white-space:nowrap}.button:after{bottom:0;box-shadow:inset 0 -2px 0 var(--primary-color-alt-1);content:"";left:0;opacity:.5;position:absolute;right:0;top:0}.button:before{border:1px solid var(--fill-color);border-radius:var(--border-radius);bottom:2px;content:"";left:2px;opacity:0;position:absolute;right:2px;top:2px;transition:opacity 1s}.button:active:before,.button:focus:before{opacity:.25}.button:hover{background-color:var(--primary-color-alt-1)}.button__icon{margin-right:.5rem}.button__label{color:#7b7d85;margin-right:.6666666667rem}.button--grouped{border-radius:0}.button--has-icon{align-items:center;display:inline-flex}.button--disabled{box-shadow:none;cursor:not-allowed;overflow:hidden}.button--disabled:after{background-color:var(--fill-color);bottom:0;box-shadow:none;content:"";left:0;opacity:.75;position:absolute;right:0;top:0}.button--secondary{background-color:var(--fill-color-alt-1);color:#464646}.button--secondary:after{display:none}.button--active,.button--secondary:hover{background-color:var(--fill-color-alt-2)}.button--outline{background-color:#fff;border:1px solid var(--fill-color-alt-1);color:var(--primary-color-alt-1)}.button--outline:after{display:none}.button--outline:hover{background-color:#fff}.button--full{justify-content:center;text-align:center;width:100%}.button--small{height:2.3rem;padding:.6666666667rem 1.3333333333rem}.button--small:after{display:none}.button--large{border-radius:var(--border-radius);font-family:Poppins,sans-serif;font-size:1.15rem;font-weight:700;line-height:1.35;padding:1rem 2rem;text-transform:none}',""]);const i=o},2151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.checkbox{background-color:var(--fill-color-alt-1);cursor:pointer;display:inline-block;height:1.1666666667rem;padding:.3333333333rem;position:relative;transition:background-color .25s;width:1.1666666667rem}.checkbox,.checkbox:after{border-radius:var(--border-radius)}.checkbox:after{background-color:#fff;box-shadow:0 5px 15px 0 rgba(70,70,70,.1);content:"";height:.6666666667rem;left:.25rem;position:absolute;top:.25rem;transform:scale(0);transition:transform .25s;width:.6666666667rem}.checkbox--checked{background-color:var(--primary-color-alt-1)}.checkbox--checked:after{transform:scale(1)}',""]);const i=o},8554:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".collapsible{background-color:#fff;border:1px solid var(--fill-color-alt-1);border-radius:var(--border-radius);margin-bottom:1rem}.collapsible__header{align-items:center;background-color:var(--fill-color);display:flex;justify-content:space-between;padding:.3333333333rem .6666666667rem}.collapsible__title{padding-left:1rem;text-align:left;width:100%}.collapsible__content{display:flex;flex-direction:column;gap:2rem;padding:.6666666667rem}.collapsible--closed .collapsible__content{display:none}.collapsible__actions{align-items:center;display:flex;gap:.6666666667rem}.collapsible__component{margin-bottom:2rem}.collapsible__component:last-child{margin-bottom:0}",""]);const i=o},5709:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.ctx-overlay{position:fixed}.ctx-mount,.ctx-overlay{bottom:0;left:0;right:0;top:0;z-index:9999}.ctx-mount{position:absolute}@keyframes context-menu{0%{transform:scaleY(.85) scaleX(.85);transform-origin:0 0}to{transform:scaleY(1) scaleX(1);transform-origin:0 0}}.context-menu{width:100%}.context-menu__menu{animation:context-menu .25s;background-color:#fff;border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);box-shadow:0 5px 15px 0 rgba(70,70,70,.1);left:0;margin-top:.6666666667rem;padding:.6666666667rem;position:absolute;top:0;width:20rem;z-index:1}.context-menu__wrap{position:relative;width:100%}.context-menu--open .context-menu__wrap:after{border:1px solid var(--fill-color-alt-2);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0}',""]);const i=o},6279:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},3518:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-insert-placeholder{background-color:var(--primary-color);height:2px;width:100%}",""]);const i=o},5293:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".drag-placeholder{background-color:var(--primary-color);border-radius:var(--border-radius);color:#fff;padding:.3333333333rem .6666666667rem}",""]);const i=o},7374:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.file-drop-zone{border:1px solid transparent;border-radius:var(--border-radius);display:block;width:100%}.file-drop-zone__overlay{align-items:center;bottom:0;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;z-index:9998}.file-drop-zone--drag-over .file-drop-zone__overlay{opacity:1;transition:opacity .5s}.file-drop-zone--drag-over{border:1px dashed var(--primary-color);cursor:copy;position:relative}.file-drop-zone--drag-over:after{background-color:var(--fill-color);border-radius:var(--border-radius);bottom:0;content:"";display:block;left:0;opacity:.85;pointer-events:none;position:absolute;right:0;top:0}',""]);const i=o},3359:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".file-uploader{position:relative}.file-uploader__input{bottom:0;left:0;position:absolute;right:0;top:0}.file-uploader__input:has(input:hover){border:1px dashed var(--fill-color-alt-2);border-radius:var(--border-radius)}.file-uploader__input input{cursor:pointer;height:100%;opacity:0;width:100%}",""]);const i=o},3668:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".directory-view{padding:1rem}.directory-view__content,.directory-view__header{margin-bottom:2rem}",""]);const i=o},8122:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".tree-row{cursor:pointer;padding:.6666666667rem 2rem;transition:background-color .25s}.tree-row--drop-target{background-color:var(--fill-color-alt-1)}.tree-row:hover{background-color:var(--fill-color)}.tree-row__content{display:flex}.tree-row__toggle{margin-right:1rem}",""]);const i=o},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{function e(t,e,r){var n,o,i,a,s;function u(){var c=Date.now()-a;c=0?n=setTimeout(u,e-c):(n=null,r||(s=t.apply(i,o),i=o=null))}null==e&&(e=100);var c=function(){i=this,o=arguments,a=Date.now();var c=r&&!n;return n||(n=setTimeout(u,e)),c&&(s=t.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=t.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}e.debounce=e,t.exports=e},4063:t=>{"use strict";t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r}},8679:(t,e,r)=>{"use strict";var n=r(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return n.isMemo(t)?a:s[t.$$typeof]||o}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=d(r);o&&o!==h&&t(e,o,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var s=u(e),y=u(r),m=0;m{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,l=-7,f=r?o-1:0,p=r?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-l)-1,d>>=-l,l+=s;l>0;i=256*i+t[e+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,h=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,o),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;t[r+d]=255&a,d+=h,a/=256,c-=8);t[r+d-h]|=128*y}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},7425:()=>{},4155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(s=u,u=[];++l1)for(var r=1;r{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,g=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case f:case i:case s:case a:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case m:case y:case u:return t;default:return e}}case o:return e}}}function j(t){return O(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=c,e.ContextProvider=u,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=y,e.Portal=o,e.Profiler=s,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return j(t)||O(t)===l},e.isConcurrentMode=j,e.isContextConsumer=function(t){return O(t)===c},e.isContextProvider=function(t){return O(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return O(t)===p},e.isFragment=function(t){return O(t)===i},e.isLazy=function(t){return O(t)===m},e.isMemo=function(t){return O(t)===y},e.isPortal=function(t){return O(t)===o},e.isProfiler=function(t){return O(t)===s},e.isStrictMode=function(t){return O(t)===a},e.isSuspense=function(t){return O(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===s||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===y||t.$$typeof===u||t.$$typeof===c||t.$$typeof===p||t.$$typeof===b||t.$$typeof===g||t.$$typeof===w||t.$$typeof===v)},e.typeOf=O},9864:(t,e,r)=>{"use strict";t.exports=r(9921)},8359:(t,e)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case i:case s:case a:case p:case d:return t;default:switch(t=t&&t.$$typeof){case l:case c:case f:case y:case h:case u:return t;default:return e}}case o:return e}}}r=Symbol.for("react.module.reference")},2973:(t,e,r)=>{"use strict";r(8359)},53:(t,e)=>{"use strict";function r(t,e){var r=t.length;t.push(e);t:for(;0>>1,o=t[n];if(!(0>>1;ni(u,r))ci(l,u)?(t[n]=l,t[c]=r,n=c):(t[n]=u,t[s]=r,n=s);else{if(!(ci(l,r)))break t;t[n]=l,t[c]=r,n=c}}}return e}function i(t,e){var r=t.sortIndex-e.sortIndex;return 0!==r?r:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],f=1,p=null,d=3,h=!1,y=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,g="undefined"!=typeof setImmediate?setImmediate:null;function w(t){for(var e=n(l);null!==e;){if(null===e.callback)o(l);else{if(!(e.startTime<=t))break;o(l),e.sortIndex=e.expirationTime,r(c,e)}e=n(l)}}function O(t){if(m=!1,w(t),!y)if(null!==n(c))y=!0,N(j);else{var e=n(l);null!==e&&I(O,e.startTime-t)}}function j(t,r){y=!1,m&&(m=!1,b(_),_=-1),h=!0;var i=d;try{for(w(r),p=n(c);null!==p&&(!(p.expirationTime>r)||t&&!C());){var a=p.callback;if("function"==typeof a){p.callback=null,d=p.priorityLevel;var s=a(p.expirationTime<=r);r=e.unstable_now(),"function"==typeof s?p.callback=s:p===n(c)&&o(c),w(r)}else o(c);p=n(c)}if(null!==p)var u=!0;else{var f=n(l);null!==f&&I(O,f.startTime-r),u=!1}return u}finally{p=null,d=i,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,P=null,_=-1,E=5,k=-1;function C(){return!(e.unstable_now()-kt||125a?(t.sortIndex=i,r(l,t),null===n(c)&&t===n(l)&&(m?(b(_),_=-1):m=!0,I(O,i-a))):(t.sortIndex=s,r(c,t),y||h||(y=!0,N(j))),t},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(t){var e=d;return function(){var r=d;d=e;try{return t.apply(this,arguments)}finally{d=r}}}},3840:(t,e,r)=>{"use strict";t.exports=r(53)},3379:(t,e,r)=>{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function s(t){for(var e=-1,r=0;r{"use strict";var n=r(7294);var o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,u=n.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!o(t,r)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=i({inst:{value:r,getSnapshot:e}}),o=n[0].inst,l=n[1];return s((function(){o.value=r,o.getSnapshot=e,c(o)&&l({inst:o})}),[t,r,e]),a((function(){return c(o)&&l({inst:o}),t((function(){c(o)&&l({inst:o})}))}),[t]),u(r),r};e.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},139:(t,e,r)=>{"use strict";var n=r(7294),o=r(1688);var i="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},a=o.useSyncExternalStore,s=n.useRef,u=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var f=s(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=c((function(){function t(t){if(!u){if(u=!0,a=t,t=n(t),void 0!==o&&p.hasValue){var e=p.value;if(o(e,t))return s=e}return s=t}if(e=s,i(a,t))return e;var r=n(t);return void 0!==o&&o(e,r)?e:(a=t,s=r)}var a,s,u=!1,c=void 0===r?null:r;return[function(){return t(e())},null===c?void 0:function(){return t(c())}]}),[e,r,n,o]);var d=a(t,f[0],f[1]);return u((function(){p.hasValue=!0,p.value=d}),[d]),l(d),d}},1688:(t,e,r)=>{"use strict";t.exports=r(3250)},2798:(t,e,r)=>{"use strict";t.exports=r(139)},1328:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;es})}},t=>{var e=e=>t(t.s=e);t.O(0,[555,170],(()=>(e(5327),e(7425))));t.O()}]); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 86025a0..4b18751 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,6 +1,6 @@ { - "/js/app.js": "/js/app.js?id=82c6422f61e56e2fcf4f223d37ae20ba", + "/js/app.js": "/js/app.js?id=2ac5d4ba555b3dee9bab9b39626c201f", "/js/manifest.js": "/js/manifest.js?id=35aa9d461e033ff05abe890341153838", "/js/vendor.js": "/js/vendor.js?id=b53083a0bb34e922d0d09ba0e52241c6", - "/css/app.css": "/css/app.css?id=d75c395a1c5c29d8b4c39d09727b550c" + "/css/app.css": "/css/app.css?id=e23eef270fc9a2679846e04a9a6e0a85" } diff --git a/resources/js/components/all.js b/resources/js/components/all.js index 04f4144..6a71b8b 100644 --- a/resources/js/components/all.js +++ b/resources/js/components/all.js @@ -50,6 +50,7 @@ import HasManyField from "./has-many-field"; import Modal from "./modal"; import ManualOrderControls from "./manual-order-controls"; import TreeOrderControls from "./tree-order-controls"; +import Foreign from "./foreign"; export default { 'text-literal': TextLiteral, @@ -104,4 +105,5 @@ export default { 'modal': Modal, 'manual-order-controls': ManualOrderControls, 'tree-order-controls': TreeOrderControls, + 'foreign': Foreign, }; diff --git a/resources/js/components/foreign.js b/resources/js/components/foreign.js new file mode 100644 index 0000000..9138af6 --- /dev/null +++ b/resources/js/components/foreign.js @@ -0,0 +1,51 @@ +import React from 'react'; +import components from "../rendering/components"; + +class Foreign extends React.Component { + + static defaultProps = { + components: [], + path: {}, + data: {}, + }; + + constructor(props) { + super(props); + + this.componentList = []; + } + + handleSubmit(data) { + this.componentList.forEach(obj => { + obj.ref.current.handleSubmit(data); + }); + } + + getData(data) { + this.componentList.forEach(obj => { + obj.ref.current.getData(data); + }); + return data; + } + + render() { + + this.componentList = components.renderComponentsWith(this.props.components, this.props.data, this.props.path, (component, i) => { + return ( +
+ {component} +
+ ); + }, true, this.props.errors); + + let componentListRenders = this.componentList.map(obj => obj.component); + + return ( +
+ {componentListRenders} +
+ ); + } +} + +export default Foreign; diff --git a/resources/js/filters/enum-filter.js b/resources/js/filters/enum-filter.js index a0a6352..a2473d9 100644 --- a/resources/js/filters/enum-filter.js +++ b/resources/js/filters/enum-filter.js @@ -14,11 +14,12 @@ function EnumFilter(props) { useEffect(() => { const values = props.data['filter_'+props.id] ? props.data['filter_'+props.id].split(',') : []; + const readableValues = values.map(value => props.options[value]).filter(value => value); setState({ ...state, values, - humanReadableValue: (values.length ? values.join(', ') : 'All') + humanReadableValue: (readableValues.length ? readableValues.join(', ') : 'All') }); }, [props.data]); diff --git a/resources/sass/app.scss b/resources/sass/app.scss index 56a2c91..18960d4 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -122,3 +122,4 @@ @import 'cmf/components/json-field'; @import 'cmf/components/manual-order-controls'; @import 'cmf/components/inline-frame'; +@import 'cmf/components/foreign'; diff --git a/resources/sass/cmf/components/_foreign.scss b/resources/sass/cmf/components/_foreign.scss new file mode 100644 index 0000000..b321530 --- /dev/null +++ b/resources/sass/cmf/components/_foreign.scss @@ -0,0 +1,5 @@ +@include block(foreign) +{ + display: grid; + grid-gap: $rule; +} diff --git a/src/Components/Foreign.php b/src/Components/Foreign.php new file mode 100644 index 0000000..6c9430e --- /dev/null +++ b/src/Components/Foreign.php @@ -0,0 +1,65 @@ +relationship = $relationship; + + parent::__construct($components); + } + + /** + * @return string + */ + public function type(): string + { + return 'foreign'; + } + + /** + * @param ModelResource $model + * @param array $attributes + * @return void + * @throws \ReinVanOyen\Cmf\Exceptions\CouldntGuessMetaException + */ + public function provision(ModelResource $model, array &$attributes) + { + $foreignModel = $model->{$this->relationship}; + $modelResource = new ModelResource($foreignModel); + + foreach ($this->components as $component) { + $component->provision($modelResource, $attributes); + } + } + + /** + * @param Model $model + * @param \Illuminate\Http\Request $request + */ + public function save(Model $model, $request) + { + $foreignModel = $model->{$this->relationship}; + + foreach ($this->components as $component) { + $component->save($foreignModel, $request); + } + + $foreignModel->save(); + } +}