Portal code only; editorial content lives in the ctao/content repo on the demo machine's Gitea and is overlaid at build time (see README.md and deploy/README.md). Live demo: https://astro.isl-dev.grid.cyfronet.pl
3418 lines
2.0 MiB
Plaintext
3418 lines
2.0 MiB
Plaintext
(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=s((e=>{
|
||
/**
|
||
* @license React
|
||
* react.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var le=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ue={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,le)}catch(e){le(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),d=s(((e,t)=>{t.exports=u()})),f=s(((e,t)=>{
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/
|
||
var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),p=s(((e,t)=>{var n=f(),r={};function i(e,t,n,r,i,a,o,s){if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}var a=`mixins`;function o(e){return e}function s(e,t,s){var c=[],l={mixins:`DEFINE_MANY`,statics:`DEFINE_MANY`,propTypes:`DEFINE_MANY`,contextTypes:`DEFINE_MANY`,childContextTypes:`DEFINE_MANY`,getDefaultProps:`DEFINE_MANY_MERGED`,getInitialState:`DEFINE_MANY_MERGED`,getChildContext:`DEFINE_MANY_MERGED`,render:`DEFINE_ONCE`,componentWillMount:`DEFINE_MANY`,componentDidMount:`DEFINE_MANY`,componentWillReceiveProps:`DEFINE_MANY`,shouldComponentUpdate:`DEFINE_ONCE`,componentWillUpdate:`DEFINE_MANY`,componentDidUpdate:`DEFINE_MANY`,componentWillUnmount:`DEFINE_MANY`,UNSAFE_componentWillMount:`DEFINE_MANY`,UNSAFE_componentWillReceiveProps:`DEFINE_MANY`,UNSAFE_componentWillUpdate:`DEFINE_MANY`,updateComponent:`OVERRIDE_BASE`},u={getDerivedStateFromProps:`DEFINE_MANY_MERGED`},d={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)p(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=n({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=n({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps=e.getDefaultProps?g(e.getDefaultProps,t):t},propTypes:function(e,t){e.propTypes=n({},e.propTypes,t)},statics:function(e,t){m(e,t)},autobind:function(){}};function f(e,t){var n=l.hasOwnProperty(t)?l[t]:null;S.hasOwnProperty(t)&&i(n===`OVERRIDE_BASE`,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&i(n===`DEFINE_MANY`||n===`DEFINE_MANY_MERGED`,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function p(e,n){if(n){i(typeof n!=`function`,`ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object.`),i(!t(n),`ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.`);var r=e.prototype,o=r.__reactAutoBindPairs;for(var s in n.hasOwnProperty(a)&&d.mixins(e,n.mixins),n)if(n.hasOwnProperty(s)&&s!==a){var c=n[s],u=r.hasOwnProperty(s);if(f(u,s),d.hasOwnProperty(s))d[s](e,c);else{var p=l.hasOwnProperty(s);if(typeof c==`function`&&!p&&!u&&n.autobind!==!1)o.push(s,c),r[s]=c;else if(u){var m=l[s];i(p&&(m===`DEFINE_MANY_MERGED`||m===`DEFINE_MANY`),`ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.`,m,s),m===`DEFINE_MANY_MERGED`?r[s]=g(r[s],c):m===`DEFINE_MANY`&&(r[s]=_(r[s],c))}else r[s]=c}}}}function m(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(i(!(n in d),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e){i((u.hasOwnProperty(n)?u[n]:null)===`DEFINE_MANY_MERGED`,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=g(e[n],r);return}e[n]=r}}}function h(e,t){for(var n in i(e&&t&&typeof e==`object`&&typeof t==`object`,`mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.`),t)t.hasOwnProperty(n)&&(i(e[n]===void 0,"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function g(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(n==null)return r;if(r==null)return n;var i={};return h(i,n),h(i,r),i}}function _(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function v(e,t){return t.bind(e)}function y(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=v(e,i)}}var b={componentDidMount:function(){this.__isMounted=!0}},x={componentWillUnmount:function(){this.__isMounted=!1}},S={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},C=function(){};n(C.prototype,e.prototype,S);function w(e){var t=o(function(e,n,a){this.__reactAutoBindPairs.length&&y(this),this.props=e,this.context=n,this.refs=r,this.updater=a||s,this.state=null;var o=this.getInitialState?this.getInitialState():null;i(typeof o==`object`&&!Array.isArray(o),`%s.getInitialState(): must return an object or null`,t.displayName||`ReactCompositeComponent`),this.state=o});for(var n in t.prototype=new C,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],c.forEach(p.bind(null,t)),p(t,b),p(t,e),p(t,x),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),i(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),l)t.prototype[n]||(t.prototype[n]=null);return t}return w}t.exports=s})),m=l(s(((e,t)=>{var n=d(),r=p();if(n===void 0)throw Error(`create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.`);var i=new n.Component().updater;t.exports=r(n.Component,n.isValidElement,i)}))(),1);
|
||
/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */
|
||
function h(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e){if(Array.isArray(e))return e}function _(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function v(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(e,t){return g(e)||_(e,t)||b(e,t)||v()}function b(e,t){if(e){if(typeof e==`string`)return h(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}var x=Object.entries,S=Object.setPrototypeOf,C=Object.isFrozen,w=Object.getPrototypeOf,T=Object.getOwnPropertyDescriptor,E=Object.freeze,ee=Object.seal,te=Object.create,ne=typeof Reflect<`u`&&Reflect,re=ne.apply,ie=ne.construct;E||=function(e){return e},ee||=function(e){return e},re||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},ie||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var ae=Te(Array.prototype.forEach),oe=Te(Array.prototype.lastIndexOf),se=Te(Array.prototype.pop),ce=Te(Array.prototype.push),le=Te(Array.prototype.splice),ue=Array.isArray,de=Te(String.prototype.toLowerCase),fe=Te(String.prototype.toString),pe=Te(String.prototype.match),me=Te(String.prototype.replace),he=Te(String.prototype.indexOf),ge=Te(String.prototype.trim),_e=Te(Number.prototype.toString),ve=Te(Boolean.prototype.toString),ye=typeof BigInt>`u`?null:Te(BigInt.prototype.toString),be=typeof Symbol>`u`?null:Te(Symbol.prototype.toString),xe=Te(Object.prototype.hasOwnProperty),Se=Te(Object.prototype.toString),Ce=Te(RegExp.prototype.test),we=Ee(TypeError);function Te(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return re(e,t,r)}}function Ee(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return ie(e,n)}}function De(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:de;if(S&&S(e,null),!ue(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(C(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Oe(e){for(let t=0;t<e.length;t++)xe(e,t)||(e[t]=null);return e}function ke(e){let t=te(null);for(let r of x(e)){var n=y(r,2);let i=n[0],a=n[1];xe(e,i)&&(t[i]=ue(a)?Oe(a):a&&typeof a==`object`&&a.constructor===Object?ke(a):a)}return t}function Ae(e){switch(typeof e){case`string`:return e;case`number`:return _e(e);case`boolean`:return ve(e);case`bigint`:return ye?ye(e):`0`;case`symbol`:return be?be(e):`Symbol()`;case`undefined`:return Se(e);case`function`:case`object`:{if(e===null)return Se(e);let t=e,n=je(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Se(e)}return Se(e)}default:return Se(e)}}function je(e,t){for(;e!==null;){let n=T(e,t);if(n){if(n.get)return Te(n.get);if(typeof n.value==`function`)return Te(n.value)}e=w(e)}function n(){return null}return n}function Me(e){try{return Ce(e,``),!0}catch{return!1}}var Ne=E(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Pe=E(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Fe=E([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ie=E([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Le=E(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Re=E([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),ze=E([`#text`]),Be=E(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ve=E(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),He=E(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ue=E([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),We=ee(/{{[\w\W]*|^[\w\W]*}}/g),Ge=ee(/<%[\w\W]*|^[\w\W]*%>/g),Ke=ee(/\${[\w\W]*/g),qe=ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),Je=ee(/^aria-[\-\w]+$/),Ye=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Xe=ee(/^(?:\w+script|data):/i),Ze=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qe=ee(/^html$/i),$e=ee(/^[a-z][.\w]*(-[.\w]+)+$/i),et=ee(/<[/\w!]/g),tt=ee(/<[/\w]/g),nt=ee(/<\/no(script|embed|frames)/i),rt=ee(/\/>/i),it={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},at=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],ot=E(De({},at)),st=function(){let e={};return ae(at,t=>{e[t]=ee(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),E(e)}(),ct=function(){return typeof window>`u`?null:window},lt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ut=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},dt=function(e,t,n,r){return xe(e,t)&&ue(e[t])?De(r.base?ke(r.base):{},e[t],r.transform):n},ft=function(e,t,n){let r=xe(e,t)?e[t]:void 0;return r&&typeof r==`object`?ke(r):n()};function pt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ct(),t=e=>pt(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==it.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=je(d,`cloneNode`),p=je(d,`remove`),m=je(d,`nextSibling`),h=je(d,`childNodes`),g=je(d,`parentNode`),_=je(d,`shadowRoot`),v=je(d,`attributes`),y=o&&o.prototype?je(o.prototype,`nodeType`):null,b=o&&o.prototype?je(o.prototype,`nodeName`):null,S=o&&o.prototype?je(o.prototype,`ownerDocument`):null,C=function(e){return y?y(e):e.nodeType},w=function(e){return b?b(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,ne=``,re,ie=!1,_e=0,ve=function(){if(_e>0)throw we(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ye=function(e){ve(),_e++;try{return T.createHTML(e)}finally{_e--}},be=function(e){ve(),_e++;try{return T.createScriptURL(e)}finally{_e--}},Se=function(){return ie||=(re=lt(u,i),!0),re},Te=n,Ee=Te.implementation,Oe=Te.createNodeIterator,at=Te.createDocumentFragment,mt=Te.getElementsByTagName,ht=r.importNode,gt=ut();t.isSupported=typeof x==`function`&&typeof g==`function`&&Ee&&Ee.createHTMLDocument!==void 0;let _t=We,vt=Ge,yt=Ke,bt=qe,xt=Je,St=Xe,Ct=Ze,wt=$e,Tt=Ye,Et=null,Dt=De({},[...Ne,...Pe,...Fe,...Le,...ze]),Ot=null,kt=De({},[...Be,...Ve,...He,...Ue]),At=Object.seal(te(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jt=null,Mt=null,Nt=Object.seal(te(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Pt=!0,Ft=!0,It=!1,Lt=!0,Rt=!1,zt=!0,Bt=!1,Vt=!1,Ht=null,Ut=null,Wt=!1,Gt=!1,Kt=!1,qt=!1,Jt=!0,Yt=!1,Xt=`user-content-`,Zt=!0,Qt=!1,$t={},en=null,tn=De({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),nn=null,rn=De({},[`audio`,`video`,`img`,`source`,`image`,`track`]),an=null,on=De({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),sn=`http://www.w3.org/1998/Math/MathML`,cn=`http://www.w3.org/2000/svg`,ln=`http://www.w3.org/1999/xhtml`,un=ln,dn=!1,fn=null,pn=De({},[sn,cn,ln],fe),mn=E([`mi`,`mo`,`mn`,`ms`,`mtext`]),hn=De({},mn),gn=E([`annotation-xml`]),_n=De({},gn),vn=De({},[`title`,`style`,`font`,`a`,`script`]),yn=null,bn=[`application/xhtml+xml`,`text/html`],xn=null,Sn=null,Cn=n.createElement(`form`),wn=function(e){return e instanceof RegExp||e instanceof Function},Tn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Sn&&Sn===e)return;(!e||typeof e!=`object`)&&(e={}),e=ke(e),yn=bn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,xn=yn===`application/xhtml+xml`?fe:de,Et=dt(e,`ALLOWED_TAGS`,Dt,{transform:xn}),Ot=dt(e,`ALLOWED_ATTR`,kt,{transform:xn}),fn=dt(e,`ALLOWED_NAMESPACES`,pn,{transform:fe}),an=dt(e,`ADD_URI_SAFE_ATTR`,on,{transform:xn,base:on}),nn=dt(e,`ADD_DATA_URI_TAGS`,rn,{transform:xn,base:rn}),en=dt(e,`FORBID_CONTENTS`,tn,{transform:xn}),jt=dt(e,`FORBID_TAGS`,ke({}),{transform:xn}),Mt=dt(e,`FORBID_ATTR`,ke({}),{transform:xn}),$t=xe(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ke(e.USE_PROFILES):e.USE_PROFILES:!1,Pt=e.ALLOW_ARIA_ATTR!==!1,Ft=e.ALLOW_DATA_ATTR!==!1,It=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rt=e.SAFE_FOR_TEMPLATES||!1,zt=e.SAFE_FOR_XML!==!1,Bt=e.WHOLE_DOCUMENT||!1,Gt=e.RETURN_DOM||!1,Kt=e.RETURN_DOM_FRAGMENT||!1,qt=e.RETURN_TRUSTED_TYPE||!1,Wt=e.FORCE_BODY||!1,Jt=e.SANITIZE_DOM!==!1,Yt=e.SANITIZE_NAMED_PROPS||!1,Zt=e.KEEP_CONTENT!==!1,Qt=e.IN_PLACE||!1,Tt=Me(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ye,un=typeof e.NAMESPACE==`string`?e.NAMESPACE:ln,hn=ft(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>De({},mn)),_n=ft(e,`HTML_INTEGRATION_POINTS`,()=>De({},gn));let t=ft(e,`CUSTOM_ELEMENT_HANDLING`,()=>te(null));if(At=te(null),xe(t,`tagNameCheck`)&&wn(t.tagNameCheck)&&(At.tagNameCheck=t.tagNameCheck),xe(t,`attributeNameCheck`)&&wn(t.attributeNameCheck)&&(At.attributeNameCheck=t.attributeNameCheck),xe(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(At.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),ee(At),Rt&&(Ft=!1),Kt&&(Gt=!0),$t&&(Et=De({},ze),Ot=te(null),$t.html===!0&&(De(Et,Ne),De(Ot,Be)),$t.svg===!0&&(De(Et,Pe),De(Ot,Ve),De(Ot,Ue)),$t.svgFilters===!0&&(De(Et,Fe),De(Ot,Ve),De(Ot,Ue)),$t.mathMl===!0&&(De(Et,Le),De(Ot,He),De(Ot,Ue))),Nt.tagCheck=null,Nt.attributeCheck=null,xe(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Nt.tagCheck=e.ADD_TAGS:ue(e.ADD_TAGS)&&(Et===Dt&&(Et=ke(Et)),De(Et,e.ADD_TAGS,xn))),xe(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Nt.attributeCheck=e.ADD_ATTR:ue(e.ADD_ATTR)&&(Ot===kt&&(Ot=ke(Ot)),De(Ot,e.ADD_ATTR,xn))),xe(e,`ADD_FORBID_CONTENTS`)&&ue(e.ADD_FORBID_CONTENTS)&&(en===tn&&(en=ke(en)),De(en,e.ADD_FORBID_CONTENTS,xn)),Zt&&(Et[`#text`]=!0),Bt&&De(Et,[`html`,`head`,`body`]),Et.table&&(De(Et,[`tbody`]),delete jt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw we(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw we(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{ne=ye(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,ne=``):(T===void 0&&(T=Se()),T&&typeof ne==`string`&&(ne=ye(``)));E&&E(e),Sn=e},En=De({},[...Pe,...Fe,...Ie]),Dn=De({},[...Le,...Re]),On=function(e,t,n){return t.namespaceURI===ln?e===`svg`:t.namespaceURI===sn?e===`svg`&&(n===`annotation-xml`||hn[n]):!!En[e]},kn=function(e,t,n){return t.namespaceURI===ln?e===`math`:t.namespaceURI===cn?e===`math`&&_n[n]:!!Dn[e]},An=function(e,t,n){return t.namespaceURI===cn&&!_n[n]||t.namespaceURI===sn&&!hn[n]?!1:!Dn[e]&&(vn[e]||!En[e])},jn=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:un,tagName:`template`});let n=de(e.tagName),r=de(t.tagName);return fn[e.namespaceURI]?e.namespaceURI===cn?On(n,t,r):e.namespaceURI===sn?kn(n,t,r):e.namespaceURI===ln?An(n,t,r):!!(yn===`application/xhtml+xml`&&fn[e.namespaceURI]):!1},Mn=function(e){ce(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw we(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Nn=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},Pn=function(e){Ln(e);let t=h(e);if(t){let e=[];ae(t,t=>{ce(e,t)}),ae(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&Nn(e,r,i)}},Fn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ce(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Gt||Kt)try{Mn(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},In=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||Ot[xn(i)]||Nn(e,r,i)}},Ln=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===it.element&&In(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Rn=function(e,t){return zt?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},zn=function(e){if(!zt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===it.processingInstruction||n===it.comment&&Ce(tt,e.data)){try{p(e)}catch{}continue}if(n===it.element){let t=e,n=xn(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Rn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Bn=function(e){let t=null,r=null;if(Wt)e=`<remove></remove>`+e;else{let t=pe(e,/^[\r\n\t ]+/);r=t&&t[0]}yn===`application/xhtml+xml`&&un===ln&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ye(e):e;if(un===ln)try{t=new l().parseFromString(i,yn)}catch{}if(!t||!t.documentElement){t=Ee.createDocument(un,`template`,null);try{t.documentElement.innerHTML=dn?ne:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),un===ln?mt.call(t,Bt?`html`:`body`)[0]:Bt?t.documentElement:a},Vn=function(e){let t=S?S(e):e.ownerDocument;return Oe.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Hn=function(e){return e=me(e,_t,` `),e=me(e,vt,` `),e=me(e,yt,` `),e},Un=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=Oe.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Hn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ae(i,e=>{Gn(e.content)&&Un(e.content)})},Wn=function(e){let t=b?b(e):null;return typeof t!=`string`||xn(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Gn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===it.documentFragment}catch{return!1}},Kn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function qn(e,n,r){e.length!==0&&ae(e,e=>{e.call(t,n,r,Sn)})}let Jn=function(e,t){return!!(zt&&e.hasChildNodes()&&!Kn(e.firstElementChild)&&Ce(et,e.textContent)&&Ce(et,e.innerHTML)||zt&&e.namespaceURI===ln&&ot[t]&&(Kn(e.firstElementChild)||typeof e.textContent==`string`&&Ce(st[t],e.textContent))||e.nodeType===it.processingInstruction||zt&&e.nodeType===it.comment&&Ce(tt,e.data))},Yn=function(e,t){if(e instanceof RegExp)return Ce(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Xn=function(e,t,n){if(!jt[t]&&nr(t)&&Yn(At.tagNameCheck,t))return!1;if(Zt&&!en[t]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,m(e))}}}return Mn(e),!0},Zn=function(e,t,n,r){return e.length===0?t:t===n||t===r?ke(t):t},Qn=function(e,t){return e===t||g(e)!==null?!1:(Qt&&Ln(e),!0)},$n=function(e,n){if(qn(gt.beforeSanitizeElements,e,null),Qn(e,n))return!0;if(Wn(e))return Mn(e),!0;let r=xn(w(e));if(Et=Zn(gt.uponSanitizeElement,Et,Dt,Ht),qn(gt.uponSanitizeElement,e,{tagName:r,allowedTags:Et}),Qn(e,n))return!0;if(Jn(e,r))return Mn(e),!0;if(jt[r]||!(Nt.tagCheck instanceof Function&&Nt.tagCheck(r))&&!Et[r]){let t=Xn(e,r,n);return t===!1&&qn(gt.afterSanitizeElements,e,null),t}if(C(e)===it.element&&!jn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Ce(nt,e.innerHTML))return Mn(e),!0;if(Rt&&e.nodeType===it.text){let n=Hn(e.textContent);e.textContent!==n&&(ce(t.removed,{element:e.cloneNode()}),e.textContent=n)}return qn(gt.afterSanitizeElements,e,null),!1},er=function(e,t,r){if(Mt[t]||Rn(t,e)||Jt&&(t===`id`||t===`name`)&&(r in n||r in Cn))return!1;let i=Ot[t]||Nt.attributeCheck instanceof Function&&Nt.attributeCheck(t,e);return Ft&&Ce(bt,t)||Pt&&Ce(xt,t)?!0:i?an[t]||Ce(Tt,me(r,Ct,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&he(r,`data:`)===0&&nn[e]||It&&!Ce(St,me(r,Ct,``))?!0:!r:nr(e)&&Yn(At.tagNameCheck,e)&&Yn(At.attributeNameCheck,t,e)||t===`is`&&At.allowCustomizedBuiltInElements&&Yn(At.tagNameCheck,r)},tr=De({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),nr=function(e){return!tr[de(e)]&&Ce(wt,e)},rr=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ye(r);case`TrustedScriptURL`:return be(r)}return r},ir=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),Wn(e)?Mn(e):se(t.removed)}catch{Fn(n,e)}},ar=function(e){qn(gt.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||Wn(e))return;Ot=Zn(gt.uponSanitizeAttribute,Ot,kt,Ut);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:Ot,forceKeepAttr:void 0},r=t.length,i=xn(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=xn(o),u=c,d=o===`value`?u:ge(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,qn(gt.uponSanitizeAttribute,e,n),d=n.attrValue,Yt&&(l===`id`||l===`name`)&&he(d,Xt)!==0&&(Fn(o,e,a),d=Xt+d),zt&&Ce(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Fn(o,e,a);continue}if(l===`attributename`&&pe(d,`href`)){Fn(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Fn(o,e,a);continue}if(!Lt&&Ce(rt,d)){Fn(o,e,a);continue}if(Rt&&(d=Hn(d)),!er(i,l,d)){Fn(o,e,a);continue}d=rr(i,l,s,d),d!==u&&ir(e,o,s,d)}}qn(gt.afterSanitizeAttributes,e,null)},or=function(e){let t=null,n=Vn(e);for(qn(gt.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(qn(gt.uponSanitizeShadowNode,t,null),$n(t,e),ar(t),Gn(t.content)&&or(t.content),C(t)===it.element){let e=_(t);Gn(e)&&(sr(e),or(e))}qn(gt.afterSanitizeShadowDOM,e,null)},sr=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){or(e.shadow);continue}let n=e.node,r=C(n)===it.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&xn(e)===`template`){let e=n.content;Gn(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Gn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(dn=!e,dn&&(e=`<!-->`),typeof e!=`string`&&!Kn(e)&&(e=Ae(e),typeof e!=`string`))throw we(`dirty is not a string, aborting`);if(!t.isSupported)return e;Vt?(Et=Ht,Ot=Ut):Tn(n),(gt.uponSanitizeElement.length>0||gt.uponSanitizeAttribute.length>0)&&(Et=ke(Et)),gt.uponSanitizeAttribute.length>0&&(Ot=ke(Ot)),t.removed=[];let c=Qt&&typeof e!=`string`&&Kn(e);if(c){zn(e);let t=w(e);if(typeof t==`string`){let n=xn(t);if(!Et[n]||jt[n])throw Pn(e),we(`root node is forbidden and cannot be sanitized in-place`)}if(Wn(e))throw Pn(e),we(`root node is clobbered and cannot be sanitized in-place`);try{sr(e)}catch(t){throw Pn(e),t}}else if(Kn(e))i=Bn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===it.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),sr(a);else{if(!Gt&&!Rt&&!Bt&&e.indexOf(`<`)===-1)return T&&qt?ye(e):e;if(i=Bn(e),!i)return Gt?null:qt?ne:``}i&&Wt&&Mn(i.firstChild);let l=c?e:i;try{let e=Vn(l);for(;o=e.nextNode();)$n(o,l),ar(o),Gn(o.content)&&or(o.content)}catch(n){throw c&&(Pn(e),ae(t.removed,e=>{e.element&&Ln(e.element)})),n}if(c)return ae(t.removed,e=>{e.element&&Ln(e.element)}),Rt&&Un(e),e;if(Gt){if(Rt&&Un(i),Kt)for(s=at.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(Ot.shadowroot||Ot.shadowrootmode)&&(s=ht.call(r,s,!0)),s}let u=Bt?i.outerHTML:i.innerHTML;return Bt&&Et[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ce(Qe,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
||
`+u),Rt&&(u=Hn(u)),T&&qt?ye(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tn(e),Vt=!0,Ht=Et,Ut=Ot},t.clearConfig=function(){Sn=null,Vt=!1,Ht=null,Ut=null,T=re,ne=``},t.isValidAttribute=function(e,t,n){Sn||Tn({});let r=xn(e),i=xn(t);return er(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&xe(gt,e)&&ce(gt[e],t)},t.removeHook=function(e,t){if(xe(gt,e)){if(t!==void 0){let n=oe(gt[e],t);return n===-1?void 0:le(gt[e],n,1)[0]}return se(gt[e])}},t.removeHooks=function(e){xe(gt,e)&&(gt[e]=[])},t.removeAllHooks=function(){gt=ut()},t}var mt=pt(),ht=mt,gt=mt.sanitize.bind(mt);mt.isSupported,mt.addHook.bind(mt),mt.removeHook.bind(mt),mt.removeHooks.bind(mt),mt.removeAllHooks.bind(mt),mt.setConfig.bind(mt),mt.clearConfig.bind(mt),mt.isValidAttribute.bind(mt),mt.version,mt.removed;function _t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var vt=_t();function yt(e){vt=e}var bt={exec:()=>null};function xt(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function St(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(wt.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ct=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:xt(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:xt(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:xt(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:xt(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:xt(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:xt(e=>RegExp(`^ {0,${e}}>`))},Tt=/^(?:[ \t]*(?:\n|$))+/,Et=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Dt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ot=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,At=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,jt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Mt=St(jt).replace(/bull/g,At).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Nt=St(jt).replace(/bull/g,At).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ft=/^[^\n]+/,It=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Lt=St(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,It).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rt=St(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,At).getRegex(),zt=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Bt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Vt=St(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Bt).replace(`tag`,zt).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ht=e=>St(Pt).replace(`hr`,Ot).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,zt).getRegex(),Ut=Ht(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Wt=Ht(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Gt={blockquote:St(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Wt).getRegex(),code:Et,def:Lt,fences:Dt,heading:kt,hr:Ot,html:Vt,lheading:Mt,list:Rt,newline:Tt,paragraph:Ut,table:bt,text:Ft},Kt=St(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Ot).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,zt).getRegex(),qt={...Gt,lheading:Nt,table:Kt,paragraph:St(Pt).replace(`hr`,Ot).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Kt).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,zt).getRegex()},Jt={...Gt,html:St(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Bt).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:St(Pt).replace(`hr`,Ot).replace(`heading`,` *#{1,6} *[^
|
||
]`).replace(`lheading`,Mt).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Yt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Xt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zt=/^( {2,}|\\)\n(?!\s*$)/,Qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$t=/[\p{P}\p{S}]/u,en=/[\s\p{P}\p{S}]/u,tn=/[^\s\p{P}\p{S}]/u,nn=St(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,en).getRegex(),rn=/[\p{Pi}\p{Ps}"']/u,an=/(?!~)[\p{P}\p{S}]/u,on=/(?!~)[\s\p{P}\p{S}]/u,sn=/(?:[^\s\p{P}\p{S}]|~)/u,cn=St(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ct?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),ln=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,un=St(ln,`u`).replace(/punct/g,$t).getRegex(),dn=St(ln,`u`).replace(/punct/g,an).getRegex(),fn=St(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,rn).replace(/punct/g,$t).getRegex(),pn=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,mn=St(pn,`gu`).replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,$t).getRegex(),hn=St(pn,`gu`).replace(/notPunctSpace/g,sn).replace(/punctSpace/g,on).replace(/punct/g,an).getRegex(),gn=St(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,$t).getRegex(),_n=St(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,$t).getRegex(),vn=St(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,$t).getRegex(),yn=St(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,$t).getRegex(),bn=St(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,tn).replace(/punctSpace/g,en).replace(/punct/g,$t).getRegex(),xn=St(/\\(punct)/,`gu`).replace(/punct/g,$t).getRegex(),Sn=St(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cn=St(Bt).replace(`(?:-->|$)`,`-->`).getRegex(),wn=St(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Cn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Tn=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,En=St(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Tn).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Dn=St(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Tn).replace(`ref`,It).getRegex(),On=St(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,It).getRegex(),kn=St(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Dn).replace(`nolink`,On).getRegex(),An=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,jn={_backpedal:bt,anyPunctuation:xn,autolink:Sn,blockSkip:cn,br:Zt,code:Xt,del:bt,delLDelim:bt,delRDelim:bt,emStrongLDelim:un,emStrongRDelimAst:mn,emStrongRDelimUnd:_n,escape:Yt,link:En,nolink:On,punctuation:nn,reflink:Dn,reflinkSearch:kn,tag:wn,text:Qt,url:bt},Mn={...jn,emStrongLDelim:fn,emStrongRDelimAst:gn,emStrongRDelimUnd:vn,link:St(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Tn).getRegex(),reflink:St(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Tn).getRegex()},Nn={...jn,emStrongRDelimAst:hn,emStrongLDelim:dn,delLDelim:yn,delRDelim:bn,url:St(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,An).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:St(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,An).getRegex()},Pn={...Nn,br:St(Zt).replace(`{2,}`,`*`).getRegex(),text:St(Nn.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Fn={normal:Gt,gfm:qt,pedantic:Jt},In={normal:jn,gfm:Nn,breaks:Pn,pedantic:Mn},Ln={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Rn=e=>Ln[e];function zn(e,t){if(t){if(wt.escapeTest.test(e))return e.replace(wt.escapeReplace,Rn)}else if(wt.escapeTestNoEncode.test(e))return e.replace(wt.escapeReplaceNoEncode,Rn);return e}function Bn(e){try{e=encodeURI(e).replace(wt.percentDecode,`%`)}catch{return null}return e}function Vn(e,t){let n=e.replace(wt.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(wt.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(wt.slashPipe,`|`);return n}function Hn(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Un(e){let t=e.split(`
|
||
`),n=t.length-1;for(;n>=0&&wt.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
||
`)}function Wn(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Gn(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Kn(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function qn(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
||
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
||
`)}var Jn=class{options;rules;lexer;constructor(e){this.options=e||vt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Un(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=qn(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Hn(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Hn(t[0],`
|
||
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Hn(t[0],`
|
||
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Hn(t[0],`
|
||
`).split(`
|
||
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
||
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
||
${s}`:s,r=r?`${r}
|
||
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
||
`),o=t.raw+`
|
||
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s,n=`${n}
|
||
${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
||
`+e.join(`
|
||
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
||
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Gn(t[2].split(`
|
||
`,1)[0],t[1].length),l=e.split(`
|
||
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
||
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
||
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
||
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
||
`+l}u=!l.trim(),r+=p+`
|
||
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Un(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Hn(t[0],`
|
||
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Vn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
||
`):[],a={type:`table`,raw:Hn(t[0],`
|
||
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Vn(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Hn(t[0],`
|
||
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
||
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Hn(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Wn(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Kn(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Kn(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Yn=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||vt,this.options.tokenizer=this.options.tokenizer||new Jn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:wt,block:Fn.normal,inline:In.normal};this.options.pedantic?(t.block=Fn.pedantic,t.inline=In.pedantic):this.options.gfm&&(t.block=Fn.gfm,t.inline=this.options.breaks?In.breaks:In.gfm),this.tokenizer.rules=t}static get rules(){return{block:Fn,inline:In}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(wt.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(wt.tabCharGlobal,` `).replace(wt.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
||
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
||
`)?``:`
|
||
`)+i.raw,n.text+=`
|
||
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
||
`)?``:`
|
||
`)+i.raw,n.text+=`
|
||
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
||
`)?``:`
|
||
`)+i.raw,r.text+=`
|
||
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
||
`)?``:`
|
||
`)+i.raw,n.text+=`
|
||
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(!(e.charAt(0)===`!`||!Object.hasOwn(this.tokens.links,e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,n.slice(r+1,-1)))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Xn=class{options;parser;constructor(e){this.options=e||vt}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(wt.notSpaceStart)?.[0],i=e.replace(wt.endingNewline,``)+`
|
||
`;return r?`<pre><code class="language-`+zn(r)+`">`+(n?i:zn(i,!0))+`</code></pre>
|
||
`:`<pre><code>`+(n?i:zn(i,!0))+`</code></pre>
|
||
`}blockquote({tokens:e}){return`<blockquote>
|
||
${this.parser.parse(e)}</blockquote>
|
||
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
||
`}hr(e){return`<hr>
|
||
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
||
`+r+`</`+i+`>
|
||
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
||
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
||
<thead>
|
||
`+t+`</thead>
|
||
`+r+`</table>
|
||
`}tablerow({text:e}){return`<tr>
|
||
${e}</tr>
|
||
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${zn(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Bn(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+zn(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Bn(e);if(i===null)return zn(n);e=i;let a=`<img src="${e}" alt="${zn(n)}"`;return t&&(a+=` title="${zn(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:zn(e.text)}},Zn=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Qn=class e{options;renderer;textRenderer;constructor(e){this.options=e||vt,this.options.renderer=this.options.renderer||new Xn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Zn}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},$n=class{options;block;constructor(e){this.options=e||vt}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Yn.lex:Yn.lexInline}provideParser(e=this.block){return e?Qn.parse:Qn.parseInline}},er=new class{defaults=_t();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Qn;Renderer=Xn;TextRenderer=Zn;Lexer=Yn;Tokenizer=Jn;Hooks=$n;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Xn(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Jn(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new $n;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=$n.passThroughHooks.has(n)?e=>{if(this.defaults.async&&$n.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Yn.lex(e,t??this.defaults)}parser(e,t){return Qn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Yn.lex:Yn.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Qn.parse:Qn.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Yn.lex:Yn.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Qn.parse:Qn.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+zn(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function tr(e,t){return er.parse(e,t)}tr.options=tr.setOptions=function(e){return er.setOptions(e),tr.defaults=er.defaults,yt(tr.defaults),tr},tr.getDefaults=_t,tr.defaults=vt;function nr(...e){return er.use(...e),tr.defaults=er.defaults,yt(tr.defaults),tr}tr.use=nr,tr.walkTokens=function(e,t){return er.walkTokens(e,t)},tr.parseInline=er.parseInline,tr.Parser=Qn,tr.parser=Qn.parse,tr.Renderer=Xn,tr.TextRenderer=Zn,tr.Lexer=Yn,tr.lexer=Yn.lex,tr.Tokenizer=Jn,tr.Hooks=$n,tr.parse=tr,tr.options,tr.setOptions,tr.walkTokens;var rr=tr.parseInline,ir=tr;Qn.parse,Yn.lex;var ar=d(),or=e=>typeof e==`object`&&!!e&&!Array.isArray(e),sr=e=>JSON.parse(JSON.stringify(e)),cr=Array.isArray,lr=Array.prototype.indexOf,ur=Array.prototype.includes,dr=Array.from,fr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,hr=Object.prototype,gr=Array.prototype,_r=Object.getPrototypeOf,vr=Object.isExtensible;function yr(e){return typeof e==`function`}var br=()=>{};function xr(e){return typeof e?.then==`function`}function Sr(e){for(var t=0;t<e.length;t++)e[t]()}function Cr(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function wr(e,t,n=!1){return e===void 0?n?t():t:e}function Tr(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var Er=1<<24,Dr=1024,Or=2048,kr=4096,Ar=8192,jr=16384,Mr=32768,Nr=1<<25,Pr=65536,Fr=1<<18,Ir=1<<19,Lr=1<<20,Rr=1<<25,zr=65536,Br=1<<21,Vr=1<<22,Hr=1<<23,Ur=Symbol(`$state`),Wr=Symbol(`component`),Gr=Symbol(`legacy props`),Kr=Symbol(``),qr=Symbol(`attributes`),Jr=Symbol(`class`),Yr=Symbol(`style`),Xr=Symbol(`text`),Zr=Symbol(`form reset`),Qr=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},$r=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),ei={},ti=Symbol(`uninitialized`),ni=`http://www.w3.org/1999/xhtml`,ri=`http://www.w3.org/2000/svg`,ii=`http://www.w3.org/1998/Math/MathML`;function ai(){console.warn(`https://svelte.dev/e/derived_inert`)}function oi(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function si(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function ci(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var li=!1;function ui(e){li=e}var di;function fi(e){if(e===null)throw oi(),ei;return di=e}function pi(){return fi(_o(di))}function D(e){if(li){if(_o(di)!==null)throw oi(),ei;di=e}}function mi(e=1){if(li){for(var t=e,n=di;t--;)n=_o(n);di=n}}function hi(e=!0){for(var t=0,n=di;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=_o(n);e&&n.remove(),n=i}}function gi(e){if(!e||e.nodeType!==8)throw oi(),ei;return e.data}function _i(e){return e===this.v}function vi(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function yi(e){return!vi(e,this.v)}function bi(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xi(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Si(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ci(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function wi(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ti(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ei(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Di(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Oi(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function ki(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ai(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function ji(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Mi=[];function Ni(e,t=!1,n=!1){return Pi(e,new Map,``,Mi,null,n)}function Pi(e,t,n,r,i=null,a=!1){if(typeof e==`object`&&e){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(cr(e)){var s=Array(e.length);t.set(e,s),i!==null&&t.set(i,s);for(var c=0;c<e.length;c+=1){var l=e[c];c in e&&(s[c]=Pi(l,t,n,r,null,a))}return s}if(_r(e)===hr){s={},t.set(e,s),i!==null&&t.set(i,s);for(var u of Object.keys(e))s[u]=Pi(e[u],t,n,r,null,a);return s}if(e instanceof Date)return e.getTime(),structuredClone(e);if(typeof e.toJSON==`function`&&!a)return Pi(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}function Fi(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function Ii(e,t){return e===null&&bi(t),e.c??=new Map(Fi(e)||void 0)}var Li=null;function Ri(e){Li=e}function zi(e){return Ii(Li,`getContext`).get(e)}function Bi(e,t){return Ii(Li,`setContext`).set(e,t),t}function Vi(){return Ii(Li,`getAllContexts`)}function O(e,t=!1,n){Li={p:Li,i:!1,c:null,e:null,s:e,x:null,r:is,l:null}}function k(e){var t=Li,n=t.e;if(n!==null){t.e=null;for(var r of n)ko(r)}return e!==void 0&&(t.x=e),t.i=!0,Li=t.p,Hi(e)}function Hi(e={}){return fr(e,Wr,{value:!0}),e}function Ui(){return!0}var Wi=[];function Gi(){var e=Wi;Wi=[],Sr(e)}function Ki(e){if(Wi.length===0&&!Ia){var t=Wi;queueMicrotask(()=>{t===Wi&&Gi()})}Wi.push(e)}function qi(){for(;Wi.length>0;)Gi()}var Ji=~(Or|kr|Dr);function Yi(e,t){e.f=e.f&Ji|t}function Xi(e){e.f&512||e.deps===null?Yi(e,Dr):Yi(e,kr)}function Zi(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=zr,Zi(t.deps))}function Qi(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Zi(e.deps),Yi(e,Dr)}function $i(e,t,n){if(e==null)return t(void 0),n&&n(void 0),br;let r=Ds(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var ea=[];function ta(e,t){return{subscribe:na(e,t).subscribe}}function na(e,t=br){let n=null,r=new Set;function i(t){if(vi(e,t)&&(e=t,n)){let t=!ea.length;for(let t of r)t[1](),ea.push(t,e);if(t){for(let e=0;e<ea.length;e+=2)ea[e][0](ea[e+1]);ea.length=0}}}function a(t){i(t(e))}function o(o,s=br){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||br),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function ra(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return ta(n,(e,n)=>{let o=!1,s=[],c=0,l=br,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:br},d=i.map((e,t)=>$i(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){Sr(d),l(),o=!1}})}function A(e){let t;return $i(e,e=>t=e)(),t}var ia=!1,aa=!1,oa=Symbol(`unmounted`);function j(e,t,n){let r=n[t]??={store:null,source:eo(void 0),unsubscribe:br};if(r.store!==e&&!(oa in n)){if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=br;else{var i=!0;r.unsubscribe=$i(e,e=>{i?r.source.v=e:F(r.source,e)}),i=!1}}return e&&oa in n?A(e):H(r.source)}function M(e,t){return ca(e,t),t}function sa(){let e={};function t(){Oo(()=>{for(var t in e)e[t].unsubscribe();fr(e,oa,{enumerable:!1,value:!0})})}return[e,t]}function ca(e,t){ia=!0;try{e.set(t)}finally{ia=!1}}function la(e,t,n){return ca(e,n),t}function ua(){aa=!0}function da(e){var t=aa;try{return aa=!1,[e(),aa]}finally{aa=t}}function fa(e,t){if(t){let t=document.body;e.autofocus=!0,Ki(()=>{document.activeElement===t&&e.focus()})}}function pa(e){li&&go(e)!==null&&vo(e)}var ma=!1;function ha(){ma||(ma=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Zr]?.()})},{capture:!0}))}function ga(e){var t=ts,n=is;rs(null),as(null);try{return e()}finally{rs(t),as(n)}}function _a(e,t,n,r=n){e.addEventListener(t,()=>ga(n));let i=e[Zr];e[Zr]=i?()=>{i(),r(!0)}:()=>r(!0),ha()}function va(e,t,n,r){let i=Ui()?Sa:Ta;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=is,c=ya(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Co(e,s)}ba()}}var d=xa();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>wa(e))).then(u).catch(e=>Co(e,s)).finally(d)}l?l.then(()=>{c(),f(),ba()}):f()}function ya(){var e=is,t=ts,n=Li,r=Ma;return function(i=!0){as(e),rs(t),Ri(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function ba(e=!0){as(null),rs(null),Ri(null),e&&Ma?.deactivate()}function xa(){var e=is,t=e.b,n=Ma,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Sa(e){var t=2|Or;return is!==null&&(is.f|=Ir),{ctx:Li,deps:null,effects:null,equals:_i,f:t,fn:e,reactions:null,rv:0,v:ti,wv:0,parent:is,ac:null}}var Ca=Symbol(`obsolete`);function wa(e,t,n){let r=is;r===null&&xi();var i=void 0,a=$a(ti),o=!ts,s=new Set;return Po(()=>{var t=is,n=Cr();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Qr&&n.reject(e)}).finally(ba)}catch(e){n.reject(e),ba()}var c=Ma;if(o){if(t.f&32768)var l=xa();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Ca);else for(let e of s.values())e.reject(Ca);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Ca&&(c.activate(),t?(a.f|=Hr,to(a,t)):(a.f&8388608&&(a.f^=Hr),to(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Oo(()=>{for(let e of s)e.reject(Ca)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function N(e){let t=Sa(e);return ss(t),t}function Ta(e){let t=Sa(e);return t.equals=yi,t}function Ea(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Uo(t[n])}}function Da(e){var t,n=is,r=e.parent;if(!$o&&r!==null&&e.v!==ti&&r.f&24576)return ai(),e.v;as(r);try{e.f&=~zr,Ea(e),t=ys(e)}finally{as(n)}return t}function Oa(e){var t=Da(e);if(!e.equals(t)&&(e.wv=gs(),(!Ma?.is_fork||e.deps===null)&&(Ma===null?e.v=t:(Ma.capture(e,t,!0),Na?.capture(e,t,!0)),e.deps===null))){Yi(e,Dr);return}$o||(Pa===null?Xi(e):(Do()||Ma?.is_fork)&&Pa.set(e,t))}function ka(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&ga(()=>{t.ac.abort(Qr),t.ac=null}),t.fn!==null&&(t.teardown=br),Ss(t,0),Vo(t))}function Aa(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Cs(t)}var ja=null,Ma=null,Na=null,Pa=null,Fa=null,Ia=!1,La=!1,Ra=null,za=null,Ba=0,Va=1,Ha=class e{id=Va++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){ja===null?ja=this:(ja.#n=this,this.#t=ja),ja=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)Yi(r,Or),t(r);for(r of n.m)Yi(r,kr),t(r)}this.#p.add(e)}#g(){this.#e=!0,Ba++>1e3&&(this.#x(),Wa());for(let e of this.#u)this.#d.delete(e),Yi(e,Or),this.schedule(e);for(let e of this.#d)Yi(e,kr),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ra=[],r=[],i=za=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Ya(e),this.#h()||this.discard(),t}if(Ma=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ra=null,za=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Ja(e,t);i.length>0&&Ma.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Na=this,Ka(r),Ka(n),Na=null,this.#s?.resolve();var s=Ma;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0){if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this}s!==null&&(Za.clear(),s.#g())}#_(e,t,n){e.f^=Dr;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=Dr:i&4?t.push(r):_s(r)&&(i&16&&this.#d.add(r),Cs(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),Yi(i,Or),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),Ma=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)Qi(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==ti&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Pa?.set(e,t)),this.is_fork||(e.v=t)}activate(){Ma=this}deactivate(){Ma=null,Pa=null}flush(){try{La=!0,Ma=this,this.#g()}finally{Ba=0,Fa=null,Ra=null,za=null,La=!1,Ma=null,Pa=null,Za.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(Ca);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ki(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=Cr()).promise}static ensure(){if(Ma===null){let t=Ma=new e;!La&&!Ia&&Ki(()=>{t.#e||t.flush()})}return Ma}apply(){Pa=null}schedule(e){if(Fa=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ra!==null&&t===is&&(ts===null||!(ts.f&2))&&!ia)return;if(n&96){if(!(n&1024))return;t.f^=Dr}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?ja=e:t.#t=e,this.linked=!1}}};function Ua(e){var t=Ia;Ia=!0;try{var n;for(e&&(Ma!==null&&!Ma.is_fork&&Ma.flush(),n=e());;){if(qi(),Ma===null)return n;Ma.flush()}}finally{Ia=t}}function Wa(){try{Ei()}catch(e){Co(e,Fa)}}var Ga=null;function Ka(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&_s(r)&&(Ga=new Set,Cs(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Go(r),Ga?.size>0)){Za.clear();for(let e of Ga){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Ga.has(n)&&(Ga.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Cs(n)}}Ga.clear()}}Ga=null}}function qa(e){Ma.schedule(e)}function Ja(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Yi(e,Dr);for(var n=e.first;n!==null;)Ja(n,t),n=n.next}}function Ya(e){Yi(e,Dr);for(var t=e.first;t!==null;)Ya(t),t=t.next}var Xa=new Set,Za=new Map,Qa=!1;function $a(e,t){return{f:0,v:e,reactions:null,equals:_i,rv:0,wv:0}}function P(e,t){let n=$a(e,t);return ss(n),n}function eo(e,t=!1,n=!0){let r=$a(e);return t||(r.equals=yi),r}function F(e,t,n=!1){return ts!==null&&(!ns||ts.f&131072)&&Ui()&&ts.f&4325394&&(os===null||!os.has(e))&&Ai(),to(e,n?ao(t):t,za)}function to(e,t,n=null){if(!e.equals(t)){$o?Za.set(e,t):Za.has(e)||Za.set(e,e.v);var r=Ha.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Da(t),Pa===null&&Xi(t)}e.wv=gs(),io(e,Or,n),Ui()&&is!==null&&is.f&1024&&!(is.f&96)&&(us===null?ds([e]):us.push(e)),!r.is_fork&&Xa.size>0&&!Qa&&no()}return t}function no(){Qa=!1;for(let e of Xa){e.f&1024&&Yi(e,kr);let t;try{t=_s(e)}catch{t=!0}t&&Cs(e)}Xa.clear()}function ro(e){F(e,e.v+1)}function io(e,t,n){var r=e.reactions;if(r!==null)for(var i=Ui(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===is)){var l=(c&Or)===0;if(l&&Yi(s,t),c&131072)Xa.add(s);else if(c&2){var u=s;Pa?.delete(u),c&65536||(c&512&&(is===null||!(is.f&2097152))&&(s.f|=zr),io(u,kr,n))}else if(l){var d=s;c&16&&Ga!==null&&Ga.add(d),n===null?qa(d):n.push(d)}}}}function ao(e){if(typeof e!=`object`||!e||Ur in e||Wr in e)return e;let t=_r(e);if(t!==hr&&t!==gr)return e;var n=new Map,r=cr(e),i=P(0),a=null,o=ms,s=e=>{if(ms===o)return e();var t=ts,n=ms;rs(null),hs(o);var r=e();return rs(t),hs(n),r};return r&&n.set(`length`,P(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Oi();var i=n.get(t);return i===void 0?s(()=>{var e=P(r.value,a);return n.set(t,e),e}):F(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>P(ti,a));n.set(t,e),ro(i)}}else F(r,ti),ro(i);return!0},get(t,r,i){if(r===Ur)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||pr(t,r)?.writable)&&(o=s(()=>P(ao(c?t[r]:ti),a)),n.set(r,o)),o!==void 0){var l=H(o);return l===ti?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=H(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==ti)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Ur)return!0;var r=n.get(t),i=r!==void 0&&r.v!==ti||Reflect.has(e,t);return(r!==void 0||is!==null&&(!i||pr(e,t)?.writable))&&(r===void 0&&(r=s(()=>P(i?ao(e[t]):ti,a)),n.set(t,r)),H(r)===ti)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>P(ti,a)),n.set(d+``,f)):F(f,ti)}if(l===void 0)(!u||pr(e,t)?.writable)&&(l=s(()=>P(void 0,a)),F(l,ao(o)),n.set(t,l));else{u=l.v!==ti;var p=s(()=>ao(o));F(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&F(h,g+1)}ro(i)}return!0},ownKeys(e){H(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==ti});for(var[r,a]of n)a.v!==ti&&!(r in e)&&t.push(r);return t},setPrototypeOf(){ki()}})}function oo(e){try{if(typeof e==`object`&&e&&Ur in e)return e[Ur]}catch{}return e}function so(e,t){return Object.is(oo(e),oo(t))}var co,lo,uo,fo,po;function mo(){if(co===void 0){co=window,lo=document,uo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;fo=pr(t,`firstChild`).get,po=pr(t,`nextSibling`).get,vr(e)&&(e[Jr]=void 0,e[qr]=null,e[Yr]=void 0,e.__e=void 0),vr(n)&&(n[Xr]=void 0)}}function ho(e=``){return document.createTextNode(e)}function go(e){return fo.call(e)}function _o(e){return po.call(e)}function I(e,t){if(!li)return go(e);var n=go(di);if(n===null)n=di.appendChild(ho());else if(t&&n.nodeType!==3){var r=ho();return n?.before(r),fi(r),r}return t&&xo(n),fi(n),n}function L(e,t=!1){if(!li){var n=go(e);return n instanceof Comment&&n.data===``?_o(n):n}if(t){if(di?.nodeType!==3){var r=ho();return di?.before(r),fi(r),r}xo(di)}return di}function R(e,t=!1){if(!li)return go(e);var n=I(e,t);return D(e),n}function z(e,t=1,n=!1){let r=li?di:e;for(var i;t--;)i=r,r=_o(r);if(!li)return r;if(n){if(r?.nodeType!==3){var a=ho();return r===null?i?.after(a):r.before(a),fi(a),a}xo(r)}return fi(r),r}function vo(e){e.textContent=``}function yo(){return!1}function bo(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function xo(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function So(e){var t=is;if(t===null)return ts.f|=Hr,e;if(!(t.f&32768)&&!(t.f&4))throw e;Co(e,t)}function Co(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function wo(e){is===null&&(ts===null&&Ti(e),wi()),$o&&Ci(e)}function To(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Eo(e,t){var n=is;n!==null&&n.f&8192&&(e|=Ar);var r={ctx:Li,deps:null,nodes:null,f:e|Or|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Ma?.register_created_effect(r);var i=r;if(e&4)Ra===null?Ha.ensure().schedule(r):Ra.push(r);else if(t!==null){try{Cs(r)}catch(e){throw Uo(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=Pr))}if(i!==null&&(i.parent=n,n!==null&&To(i,n),ts!==null&&ts.f&2&&!(e&64))){var a=ts;(a.effects??=[]).push(i)}return r}function Do(){return ts!==null&&!ns}function Oo(e){let t=Eo(8,null);return Yi(t,Dr),t.teardown=e,t}function B(e){wo(`$effect`);var t=is.f;if(!ts&&t&32&&Li!==null&&!Li.i){var n=Li;(n.e??=[]).push(e)}else return ko(e)}function ko(e){return Eo(4|Lr,e)}function Ao(e){return wo(`$effect.pre`),Eo(8|Lr,e)}function jo(e){Ha.ensure();let t=Eo(64|Ir,e);return()=>{Uo(t)}}function Mo(e){Ha.ensure();let t=Eo(64|Ir,e);return(e={})=>new Promise(n=>{e.outro?Ko(t,()=>{Uo(t),n(void 0)}):(Uo(t),n(void 0))})}function No(e){return Eo(4,e)}function Po(e){return Eo(Vr|Ir,e)}function Fo(e,t=0){return Eo(8|t,e)}function V(e,t=[],n=[],r=[]){va(r,t,n,t=>{Eo(8,()=>{e(...t.map(H))})})}function Io(e,t=[],n=[],r=[]){va(r,t,n,t=>{Eo(4,()=>e(...t.map(H)))})}function Lo(e,t=0){return Eo(16|t,e)}function Ro(e,t=0){return Eo(Er|t,e)}function zo(e){return Eo(32|Ir,e)}function Bo(e){var t=e.teardown;if(t!==null){let n=$o,r=ts;es(!0),rs(null);try{t.call(null)}catch(t){Co(t,e.parent)}finally{es(n),rs(r)}}}function Vo(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&ga(()=>{e.abort(Qr)});var r=n.next;n.f&64?n.parent=null:Uo(n,t),n=r}}function Ho(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Uo(t),t=n}}function Uo(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Wo(e.nodes.start,e.nodes.end),n=!0),e.f|=Nr,Vo(e,t&&!n),Ss(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Bo(e),e.f^=Nr,e.f|=jr;var i=e.parent;i!==null&&i.first!==null&&Go(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Wo(e,t){for(;e!==null;){var n=e===t?null:_o(e);e.remove(),e=n}}function Go(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Ko(e,t,n=!0){var r=[];e.f|=256,qo(e,r,!0);var i=()=>{n&&Uo(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function qo(e,t,n){if(!(e.f&8192)){e.f^=Ar;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);qo(i,t,o?n:!1)}i=a}}}function Jo(e){e.f&=-257,Yo(e,!0)}function Yo(e,t){if(!(e.f&256)&&e.f&8192){e.f^=Ar,e.f&1024||(Yi(e,Or),Ha.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Yo(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Xo(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:_o(n);t.append(n),n=i}}var Zo=null,Qo=!1,$o=!1;function es(e){$o=e}var ts=null,ns=!1;function rs(e){ts=e}var is=null;function as(e){is=e}var os=null;function ss(e){ts!==null&&(os??=new Set).add(e)}var cs=null,ls=0,us=null;function ds(e){us=e}var fs=1,ps=0,ms=ps;function hs(e){ms=e}function gs(){return++fs}function _s(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~zr),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(_s(a)&&Oa(a),a.wv>e.wv)return!0}t&512&&Pa===null&&Yi(e,Dr)}return!1}function vs(e,t,n=!0){var r=e.reactions;if(r!==null&&!(os!==null&&os.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?vs(a,t,!1):t===a&&(n?Yi(a,Or):a.f&1024&&Yi(a,kr),qa(a))}}function ys(e){var t=cs,n=ls,r=us,i=ts,a=os,o=Li,s=ns,c=ms,l=e.f;cs=null,ls=0,us=null,ts=l&96?null:e,os=null,Ri(e.ctx),ns=!1,ms=++ps,e.ac!==null&&(ga(()=>{e.ac.abort(Qr)}),e.ac=null);try{e.f|=Br;var u=e.fn,d=u();e.f|=Mr;var f=bs(e);if(Ui()&&us!==null&&!ns&&f!==null&&!(e.f&6146))for(var p=0;p<us.length;p++)vs(us[p],e);if(i!==null&&i!==e){if(ps++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=ps;if(t!==null)for(let e of t)e.rv=ps;us!==null&&(r===null?r=us:r.push(...us))}return e.f&8388608&&(e.f^=Hr),d}catch(t){return bs(e),So(t)}finally{e.f^=Br,cs=t,ls=n,us=r,ts=i,os=a,Ri(o),ns=s,ms=c}}function bs(e){var t=e.deps,n=Ma?.is_fork;if(cs!==null){var r;if(n||Ss(e,ls),t!==null&&ls>0)for(t.length=ls+cs.length,r=0;r<cs.length;r++)t[ls+r]=cs[r];else e.deps=t=cs;if(Do()&&e.f&512)for(r=ls;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&ls<t.length&&(Ss(e,ls),t.length=ls);return t}function xs(e,t){let n=t.reactions;if(n!==null){var r=lr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(cs===null||!ur.call(cs,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~zr),a.v!==ti&&Xi(a),a.ac!==null&&ga(()=>{a.ac.abort(Qr),a.ac=null,Yi(a,Or)}),ka(a),Ss(a,0)}}function Ss(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)xs(e,n[r])}function Cs(e){var t=e.f;if(!(t&16384)){Yi(e,Dr);var n=is,r=Qo;is=e,Qo=!(t&96);try{t&16777232?Ho(e):Vo(e),Bo(e);var i=ys(e);e.teardown=typeof i==`function`?i:null,e.wv=fs}finally{Qo=r,is=n}}}async function ws(){await Promise.resolve(),Ua()}function H(e){var t=!!(e.f&2);if(Zo?.add(e),ts!==null&&!ns&&!(is!==null&&is.f&16384)&&(os===null||!os.has(e))){var n=ts.deps;if(ts.f&2097152)e.rv<ps&&(e.rv=ps,cs===null&&n!==null&&n[ls]===e?ls++:cs===null?cs=[e]:cs.push(e));else{ts.deps??=[],ur.call(ts.deps,e)||ts.deps.push(e);var r=e.reactions;r===null?e.reactions=[ts]:ur.call(r,ts)||r.push(ts)}}if($o&&Za.has(e))return Za.get(e);if(t){var i=e;if($o){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Es(i))&&(a=Da(i)),Za.set(i,a),a}var o=!(i.f&512)&&!ns&&ts!==null&&(Qo||!!(ts.f&512)),s=(i.f&Mr)===0;_s(i)&&(o&&(i.f|=512),Oa(i)),o&&!s&&(Aa(i),Ts(i))}if(Pa?.has(e))return Pa.get(e);if(e.f&8388608)throw e.v;return e.v}function Ts(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Aa(t),Ts(t))}function Es(e){if(e.v===ti)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Za.has(t)||t.f&2&&Es(t))return!0;return!1}function Ds(e){var t=ns;try{return ns=!0,e()}finally{ns=t}}function Os(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var ks=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function As(e){return ks.includes(e)}var js=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Ms={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Ns(e){return e=e.toLowerCase(),Ms[e]??e}[...js];var Ps=[`touchstart`,`touchmove`];function Fs(e){return Ps.includes(e)}var Is=[`textarea`,`script`,`style`,`title`];function Ls(e){return Is.includes(e)}var Rs=Symbol(`events`),zs=new Set,Bs=new Set;function Vs(e){if(!li)return;e.removeAttribute(`onload`),e.removeAttribute(`onerror`);let t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function Hs(e,t,n,r={}){function i(e){if(r.capture||Ys.call(t,e),!e.cancelBubble)return ga(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Ki(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Us(e,t,n,r={}){var i=Hs(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function Ws(e,t,n,r,i){var a={capture:r,passive:i},o=Hs(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Oo(()=>{t.removeEventListener(e,o,a)})}function Gs(e,t,n){(t[Rs]??={})[e]=n}function Ks(e){for(var t=0;t<e.length;t++)zs.add(e[t]);for(var n of Bs)n(e)}var qs=null,Js=!1;function Ys(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;qs=e,Js||(Js=!0,setTimeout(()=>{Js=!1,qs=null}));var o=0,s=qs===e&&e[Rs];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Rs]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){fr(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=ts,d=is;rs(null),as(null);try{for(var f,p=[];a!==null&&a!==t;){try{var m=a[Rs]?.[r];m!=null&&(!a.disabled||e.target===a)&&m.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Rs]=t,delete e.currentTarget,rs(u),as(d)}}}var Xs=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Zs(e){return Xs?.createHTML(e)??e}function Qs(e){var t=bo(`template`);return t.innerHTML=Zs(e.replaceAll(`<!>`,`<!---->`)),t.content}function $s(e,t){var n=is;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function U(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(li)return $s(di,null),di;i===void 0&&(i=Qs(a?e:`<!>`+e),n||(i=go(i)));var t=r||uo?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=go(t),s=t.lastChild;$s(o,s)}else $s(t,t);return t}}function ec(e=``){if(!li){var t=ho(e+``);return $s(t,t),t}var n=di;return n.nodeType===3?xo(n):(n.before(n=ho()),fi(n)),$s(n,n),n}function W(){if(li)return $s(di,null),di;var e=document.createDocumentFragment(),t=document.createComment(``),n=ho();return e.append(t,n),$s(t,n),e}function G(e,t){if(li){var n=is;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=di),pi();return}e!==null&&e.before(t)}function tc(){if(li&&di&&di.nodeType===8&&di.textContent?.startsWith(`$`)){let e=di.textContent.substring(1);return pi(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function nc(e){let t=0,n=$a(0),r;return()=>{Do()&&(H(n),Fo(()=>(t===0&&(r=Ds(()=>e(()=>ro(n)))),t+=1,()=>{Ki(()=>{--t,t===0&&(r?.(),r=void 0,ro(n))})})))}}var rc=Pr|Ir;function ic(e,t,n,r){new ac(e,t,n,r)}var ac=class{parent;is_pending=!1;transform_error;#e;#t=li?di:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=nc(()=>(this.#m=$a(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=is;t.b=this,t.f|=128,n(e)},this.parent=is.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Lo(()=>{if(li){let e=this.#t;pi();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},rc),li&&(this.#e=di)}#g(){try{this.#a=zo(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ki(r),t&&(this.#s=zo(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){ci();return}t=!0,n&&ji(),this.#s!==null&&Ko(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){Co(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=zo(()=>e(this.#e)),Ki(()=>{var e=this.#c=document.createDocumentFragment(),t=ho(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return zo(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){Co(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(Ma);return}this.#u===0&&(this.#e.before(e),this.#c=null,Ko(this.#o,()=>{this.#o=null}),this.#x(Ma))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=zo(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Xo(this.#a,e);let t=this.#n.pending;this.#o=zo(()=>t(this.#e))}else this.#x(Ma)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Qi(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=is,n=ts,r=Li;as(this.#i),rs(this.#i),Ri(this.#i.ctx);try{return Ha.ensure(),e()}finally{as(t),rs(n),Ri(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Ko(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ki(()=>{this.#d=!1,this.#m&&to(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;Ma?.is_fork?(this.#a&&Ma.skip_effect(this.#a),this.#o&&Ma.skip_effect(this.#o),this.#s&&Ma.skip_effect(this.#s),Ma.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(Uo(this.#a),null),this.#o&&=(Uo(this.#o),null),this.#s&&=(Uo(this.#s),null),li&&(fi(this.#t),mi(),fi(hi()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return zo(()=>{var r=is;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return Co(e,this.#i.parent),null}}))};Ki(()=>{var t;try{t=this.transform_error(e)}catch(e){Co(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>Co(e,this.#i&&this.#i.parent)):n(t)})}};function K(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[Xr]??=e.nodeValue)&&(e[Xr]=n,e.nodeValue=`${n}`)}function oc(e,t){return cc(e,t)}var sc=new Map;function cc(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){mo();var c=void 0,l=Mo(()=>{var o=n??t.appendChild(ho());ic(o,{pending:()=>{}},t=>{O({});var n=Li;if(a&&(n.c=a),i&&(r.$$events=i),li&&$s(t,null),c=e(t,r)||Hi(),li&&(is.nodes.end=di,di===null||di.nodeType!==8||di.data!==`]`))throw oi(),ei;k()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=Fs(r);for(let e of[t,document]){var a=sc.get(e);a===void 0&&(a=new Map,sc.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Ys,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(dr(zs)),Bs.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=sc.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Ys),r.delete(e),r.size===0&&sc.delete(n)):r.set(e,i)}Bs.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return lc.set(c,l),c}var lc=new WeakMap;function uc(e,t){let n=lc.get(e);return n?(lc.delete(e),n(t)):Promise.resolve()}var dc=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Jo(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Jo(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Uo(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Xo(r,t),t.append(ho()),this.#n.set(e,{effect:r,fragment:t})}else Uo(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Ko(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Uo(n.effect),this.#n.delete(e))};ensure(e,t){var n=Ma,r=yo();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=ho();i.append(a),this.#n.set(e,{effect:zo(()=>t(a)),fragment:i})}else this.#t.set(e,zo(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else li&&(this.anchor=di),this.#a(n)}},fc=0,pc=1,mc=2;function hc(e,t,n,r,i){li&&pi();var a=Ui(),o=ti,s=a?$a(o):eo(o,!1,!1),c=a?$a(o):eo(o,!1,!1),l=new dc(e);Lo(()=>{var a=Ma,o=t(),u=!1;let d=li&&xr(o)===(e.data===`[!`);if(d&&(fi(hi()),ui(!1)),xr(o)){var f=ya(),p=!1;let e=e=>{if(!u){p=!0,f(!1),Ma===a&&a.deactivate(),Ha.ensure();try{e()}finally{ba(!1),Ia||Ua()}}};o.then(t=>{e(()=>{to(s,t),l.ensure(pc,r&&(e=>r(e,s)))})},t=>{e(()=>{if(to(c,t),l.ensure(mc,i&&(e=>i(e,c))),!i)throw c.v})}),li?l.ensure(fc,n):Ki(()=>{p||e(()=>{l.ensure(fc,n)})})}else to(s,o),l.ensure(pc,r&&(e=>r(e,s)));return d&&ui(!0),()=>{u=!0}})}function q(e,t,n=!1){var r;li&&(r=di,pi());var i=new dc(e),a=n?Pr:0;function o(e,t){if(li){var n=gi(r);if(e!==parseInt(n.substring(1))){var a=hi();fi(a),i.anchor=a,ui(!1),i.ensure(e,t),ui(!0);return}}i.ensure(e,t)}Lo(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var gc=Symbol(`NaN`);function _c(e,t,n){li&&pi();var r=new dc(e),i=!Ui();Lo(()=>{var e=t();e!==e&&(e=gc),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function vc(e,t){li&&fi(go(e)),Fo(()=>{var n=t();for(var r in n){var i=n[r];i==null||i===``?e.style.removeProperty(r):e.style.setProperty(r,i)}})}function yc(e,t){return t}function bc(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Ko(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;xc(e,dr(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null&&e.pending.size===0;if(c){var l=n,u=l.parentNode;vo(u),u.append(l),e.items.clear()}xc(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function xc(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=Rr,Xo(a,document.createDocumentFragment())):Uo(t[i],n)}}var Sc;function Cc(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=li?fi(go(c)):c.appendChild(ho())}li&&pi();var l=null,u=Ta(()=>{var e=n();return cr(e)?e:e==null?[]:dr(e)}),d,f=new Map,p=!0;function m(e){g.effect.f&16384||(g.pending.delete(e),g.fallback=l,Tc(g,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=Rr,Dc(l,null,o)):Jo(l):Ko(l,()=>{l=null})))}function h(e){g.pending.delete(e)}var g={effect:Lo(()=>{d=H(u);var e=d.length;let c=!1;li&&gi(o)===`[!`!=(e===0)&&(o=hi(),fi(o),ui(!1),c=!0);for(var g=new Set,_=Ma,v=yo(),y=0;y<e;y+=1){li&&di.nodeType===8&&di.data===`]`&&(o=di,c=!0,ui(!1));var b=d[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&to(S.v,b),S.i&&to(S.i,y),v&&_.unskip_effect(S.e)):(S=Ec(s,p?o:Sc??=ho(),b,x,y,i,t,n),p||(S.e.f|=Rr),s.set(x,S)),g.add(x)}if(e===0&&a&&!l&&(p?l=zo(()=>a(o)):(l=zo(()=>a(Sc??=ho())),l.f|=Rr)),e>g.size&&Si(``,``,``),li&&e>0&&fi(hi()),!p){if(f.set(_,g),v){for(let[e,t]of s)g.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(h)}else m(_)}c&&ui(!0),H(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,li&&(o=di)}function wc(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Tc(e,t,n,r,i){var a=!!(r&8),o=t.length,s=e.items,c=wc(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(Jo(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432){if(g.f^=Rr,g===c)Dc(g,null,n);else{var v=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Oc(e,u,g),Oc(e,g,v),Dc(g,v,n),u=g,f=[],p=[],c=wc(u.next);continue}}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var y=p[0],b;u=y.prev;var x=f[0],S=f[f.length-1];for(b=0;b<f.length;b+=1)Dc(f[b],y,n);for(b=0;b<p.length;b+=1)l.delete(p[b]);Oc(e,x.prev,S.next),Oc(e,u,x),Oc(e,S,y),c=y,u=S,--_,f=[],p=[]}else l.delete(g),Dc(g,c,n),Oc(e,g.prev,g.next),Oc(e,g,u===null?e.effect.first:u.next),Oc(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=wc(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=wc(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(xc(e,dr(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var C=[];if(l!==void 0)for(g of l)g.f&8192||C.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&C.push(c),c=wc(c.next);var w=C.length;if(w>0){var T=r&4&&o===0?n:null;if(a){for(_=0;_<w;_+=1)C[_].nodes?.a?.measure();for(_=0;_<w;_+=1)C[_].nodes?.a?.fix()}bc(e,C,T)}}a&&Ki(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Ec(e,t,n,r,i,a,o,s){var c=o&1?o&16?$a(n):eo(n,!1,!1):null,l=o&2?$a(i):null;return{v:c,i:l,e:zo(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Dc(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=_o(r);if(a.before(r),r===i)return;r=o}}function Oc(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function kc(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;li&&(o=fi(go(c)))}V(()=>{var e=is;if(s===(s=t()??``)){li&&pi();return}if(n&&!li){e.nodes=null,c.innerHTML=s,s!==``&&$s(go(c),c.lastChild);return}if(e.nodes!==null&&(Wo(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(li){for(var a=di.data,l=pi(),u=l;l!==null&&(l.nodeType!==8||l.data!==``);)u=l,l=_o(l);if(l===null)throw oi(),ei;$s(di,u),o=fi(l);return}var d=bo(r?`svg`:i?`math`:`template`,r?ri:i?ii:void 0);d.innerHTML=s;var f=r||i?d:d.content;if($s(go(f),f.lastChild),r||i)for(;go(f);)o.before(go(f));else o.before(f)}})}function Ac(e,t,...n){var r=new dc(e);Lo(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},Pr)}function jc(e,t,n){var r;li&&(r=di,pi());var i=new dc(e);Lo(()=>{var e=t()??null;if(li&&gi(r)===`[`!=(e!==null)){var a=hi();fi(a),i.anchor=a,ui(!1),i.ensure(e,e&&(t=>n(t,e))),ui(!0);return}i.ensure(e,e&&(t=>n(t,e)))},Pr)}var Mc=()=>performance.now(),Nc={tick:e=>requestAnimationFrame(e),now:()=>Mc(),tasks:new Set};function Pc(){let e=Nc.now();Nc.tasks.forEach(t=>{t.c(e)||(Nc.tasks.delete(t),t.f())}),Nc.tasks.size!==0&&Nc.tick(Pc)}function Fc(e){let t;return Nc.tasks.size===0&&Nc.tick(Pc),{promise:new Promise(n=>{Nc.tasks.add(t={c:e,f:n})}),abort(){Nc.tasks.delete(t)}}}function Ic(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Lc(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Ic(n.trim());t[i]=r.trim()}return t}var Rc=e=>e,zc=null;function Bc(e){zc=e}function Vc(e,t,n){var r=(zc??is).nodes,i,a,o,s=null;r.a??={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o?.abort(),a=this.element.getBoundingClientRect(),i.left!==a.left||i.right!==a.right||i.top!==a.top||i.bottom!==a.bottom){let e=t()(this.element,{from:i,to:a},n?.());o=Hc(this.element,e,void 0,1,()=>{},()=>{o?.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:t,width:n,height:r}=getComputedStyle(e);if(t!==`absolute`&&t!==`fixed`){var a=e.style;s={position:a.position,width:a.width,height:a.height,transform:a.transform},a.position=`absolute`,a.width=n,a.height=r;var o=e.getBoundingClientRect();if(i.left!==o.left||i.top!==o.top){var c=`translate(${i.left-o.left}px, ${i.top-o.top}px)`;a.transform=a.transform?`${a.transform} ${c}`:c}}}},unfix(){if(s){var t=e.style;t.position=s.position,t.width=s.width,t.height=s.height,t.transform=s.transform}}},r.a.element=e}function Hc(e,t,n,r,i,a){var o=r===1,s=!1;if(yr(t)){var c;return Ki(()=>{s||(c=Hc(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{s=!0,c?.abort()},deactivate:()=>c.deactivate(),reset:()=>c.reset(),t:()=>c.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:br,deactivate:br,reset:br,t:()=>r};let{delay:l=0,css:u,tick:d,easing:f=Rc}=t;var p,m=()=>1-r;return Ki(()=>{if(!s){var c=[];if(o&&n===void 0&&(d&&d(0,1),u)){var h=Lc(u(0,1));c.push(h,h)}p=e.animate(c,{duration:l,fill:`forwards`}),p.onfinish=()=>{p.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var h=!1;if(u)for(var g=Math.ceil(c/(1e3/60)),_=0;_<=g;_+=1){var v=o+s*f(_/g),y=Lc(u(v,1-v));l.push(y),h||=y.overflow===`hidden`}h&&(e.style.overflow=`hidden`),m=()=>{var e=p.currentTime;return o+s*f(e/c)},d&&Fc(()=>{if(p.playState!==`running`)return!1;var e=m();return d(e,1-e),!0})}p=e.animate(l,{duration:c,fill:`forwards`}),p.onfinish=()=>{m=()=>r,d?.(r,1-r),a()}}}}),{abort:()=>{s=!0,p&&(p.cancel(),p.effect=null,p.onfinish=br)},deactivate:()=>{a=br},reset:()=>{r===0&&d?.(1,0)},t:()=>m()}}function Uc(e,t,n,r,i,a){let o=li;li&&pi();var s=null;li&&di.nodeType===1&&(s=di,pi());var c=li?di:e,l=is,u=new dc(c,!1);Lo(()=>{let e=t()||null;var a=i?i():n||e===`svg`?ri:void 0;if(e===null){u.ensure(null,null);return}return u.ensure(e,t=>{if(e){if(s=li?s:bo(e,a),$s(s,s),r){var n=null;li&&Ls(e)&&s.append(n=document.createComment(``));var i=li?go(s):s.appendChild(ho());li&&(i===null?ui(!1):fi(i)),Bc(l),r(s,i),n?.remove(),Bc(null)}is.nodes.end=s,t.before(s)}li&&fi(t)}),()=>{}},Pr),Oo(()=>{}),o&&(ui(!0),fi(c))}function Wc(e,t){let n=null,r=li;var i;if(li){n=di;for(var a=go(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=_o(a);if(a===null)ui(!1);else{var o=_o(a);a.remove(),fi(o)}}li||(i=document.head.appendChild(ho()));try{Lo(()=>{var e=zo(()=>t(i));e.f|=Fr,li||(e.nodes===null?e.nodes={start:i,end:i,a:null,t:null}:e.nodes.end=i)})}finally{r&&(ui(!0),fi(n))}}function J(e,t){No(()=>{e=is?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=bo(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}function Gc(e,t){var n=void 0,r;Ro(()=>{n!==(n=t())&&(r&&=(Uo(r),null),n&&(r=zo(()=>{No(()=>n(e))})))})}function Kc(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kc(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function qc(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kc(e))&&(r&&(r+=` `),r+=t);return r}function Jc(e){return typeof e==`object`?qc(e):e??``}var Yc=[...`
|
||
\r\f\xA0\v`];function Xc(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Yc.includes(r[o-1]))&&(s===r.length||Yc.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Zc(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Qc(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function $c(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Qc)),i&&c.push(...Object.keys(i).map(Qc));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Qc(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Zc(r)),i&&(n+=Zc(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function el(e,t,n,r,i,a){var o=e[Jr];if(li||o!==n||o===void 0){var s=Xc(n,r,a);(!li||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[Jr]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function tl(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function nl(e,t,n,r){var i=e[Yr];if(li||i!==t){var a=$c(t,r);(!li||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[Yr]=t}else r&&(Array.isArray(r)?(tl(e,n?.[0],r[0]),tl(e,n?.[1],r[1],`important`)):tl(e,n,r));return r}function rl(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function il(e,t){var n=!(`__defaultValue`in e);!n&&e.__defaultValue===t||(e.__defaultValue=t,al(e,!n||`__value`in e))}function al(e,t){var n=e.__defaultValue,r=e.multiple,i=r?n??[]:null;if(!(r&&!cr(i))){var a=e.selectedIndex,o=t&&r?new Set(e.selectedOptions):null;for(var s of e.options){var c=cl(s);rl(s,r?i.includes(c):so(c,n))}if(t){if(o!==null)for(s of e.options){var l=o.has(s);s.selected!==l&&(s.selected=l)}else e.selectedIndex!==a&&(e.selectedIndex=a)}}}function ol(e,t,n=!1){if(e.multiple){if(t==null)return;if(!cr(t))return si();for(var r of e.options)r.selected=t.includes(cl(r));return}for(r of e.options)if(so(cl(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function sl(e){var t=new MutationObserver(t=>{t.every(ll)||(`__defaultValue`in e&&al(e,!1),`__value`in e&&ol(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Oo(()=>{t.disconnect()})}function cl(e){return`__value`in e?e.__value:e.value}function ll(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var ul=Symbol(`class`),dl=Symbol(`style`),fl=Symbol(`is custom element`),pl=Symbol(`is html`),ml=$r?`link`:`LINK`,hl=$r?`input`:`INPUT`,gl=$r?`option`:`OPTION`,_l=$r?`select`:`SELECT`;function vl(e){if(li){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Y(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Y(e,`checked`,null),e.checked=r}}};e[Zr]=n,Ki(n),ha()}}function Y(e,t,n,r){var i=xl(e);li&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ml)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Kr]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Cl(e).has(t)?e[t]=n:e.setAttribute(t,n))}function yl(e,t,n,r,i=!1,a=!1){li&&i&&e.nodeName===hl&&(`defaultValue`in n||`defaultChecked`in n||vl(e));var o=xl(e),s=o[fl],c=!o[pl];let l=li&&s;l&&ui(!1);var u=t||{},d=e.nodeName===gl,f=e.nodeName===_l;for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=Jc(n.class):(r||n[ul])&&(n.class=null),n[dl]&&(n.style??=null);var m=Cl(e);if(e.nodeName===hl&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==u.type||h===void 0&&e.hasAttribute(`type`))&&(u.type=h,Y(e,`type`,h,a))}for(let i in n){let l=n[i];if(d&&i===`value`&&l==null){e.value=e.__value=``,u[i]=l;continue}if(i===`class`){el(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[ul],n[ul]),u[i]=l,u[ul]=n[ul];continue}if(i===`style`){nl(e,l,t?.[dl],n[dl]),u[i]=l,u[dl]=n[dl];continue}var g=u[i];if(!(l===g&&!(l===void 0&&e.hasAttribute(i)))){u[i]=l;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=As(r);if(Os(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;e.removeEventListener(r,u[n],t),u[n]=null}if(v)Gs(r,e,l),Ks([r]);else if(l!=null){function y(e){u[i].call(this,e)}u[n]=Hs(r,e,y,t)}}else if(i===`style`)Y(e,i,l);else if(i===`autofocus`)fa(e,!!l);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.value=e.__value=l;else if(i===`selected`&&d)rl(e,l);else{var b=i;c||(b=Ns(b));var x=b===`defaultValue`||b===`defaultChecked`;if(f&&b===`defaultValue`)continue;if(l==null&&!s&&!x){if(o[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||(s||typeof l!=`string`)&&m.has(b)?(e[b]=l,b in o&&(o[b]=ti)):typeof l!=`function`&&Y(e,b,l,a)}}}}return l&&ui(!0),u}function bl(e,t,n=[],r=[],i=[],a,o=!1,s=!1){va(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===_l,l=!1;if(Ro(()=>{var u=t(...n.map(H)),d=yl(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&il(f,u.defaultValue),`value`in u&&ol(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||Uo(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description===`@attach`&&(!r||p!==r[t])&&(i[t]&&Uo(i[t]),i[t]=zo(()=>Gc(e,()=>p))),d[t]=p}r=d}),c){var u=e;No(()=>{var e=r;`defaultValue`in e&&il(u,e.defaultValue),ol(u,e.value,!0),sl(u)})}l=!0})}function xl(e){return e[qr]??={[fl]:e.nodeName.includes(`-`),[pl]:e.namespaceURI===ni}}var Sl=new Map;function Cl(e){var t=e.getAttribute(`is`)||e.nodeName,n=Sl.get(t);if(n)return n;Sl.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=mr(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=_r(i)}return n}function wl(e,t,n=t){var r=new WeakSet;_a(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Tl(e)?El(a):a,n(a),Ma!==null&&r.add(Ma),await ws(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(li&&e.defaultValue!==e.value||Ds(t)==null&&e.value)&&(n(Tl(e)?El(e.value):e.value),Ma!==null&&r.add(Ma)),Fo(()=>{var n=t();if(e===document.activeElement){var i=Ma;if(r.has(i))return}Tl(e)&&n===El(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function Tl(e){var t=e.type;return t===`number`||t===`range`}function El(e){return e===``?null:+e}function Dl(e,t){return e===t||e?.[Ur]===t}function Ol(e=Hi(),t,n,r){var i=Li.r,a=is;return No(()=>{var o,s;return Fo(()=>{o=s,s=r?.()||[],Ds(()=>{Dl(n(...s),e)||(t(e,...s),o&&Dl(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Dl(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var kl={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Al(e,t,n){return new Proxy({props:e,exclude:t},kl)}var jl={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(yr(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];yr(i)&&(i=i());let a=pr(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(yr(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=pr(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===Ur||t===Gr)return!1;for(let n of e.props)if(yr(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(yr(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Ml(...e){return new Proxy({props:e},jl)}function X(e,t,n,r){var i=!0,a=!!(n&8),o=!!(n&16),s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Sa(r),H(l)):(c&&(c=!1,s=o?Ds(r):r),s);let d;if(a){var f=Ur in e||Gr in e;d=pr(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=da(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Di(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?Sa:Ta)(()=>(_=!1,h()));a&&H(v);var y=is;return(function(e,t){if(arguments.length>0){let n=t?H(v):i&&a?ao(e):e;return F(v,n),_=!0,s!==void 0&&(s=n),e}return $o&&_||y.f&16384?v.v:H(v)})}function Nl(e){Li===null&&bi(`onMount`),B(()=>{let t=Ds(e);if(typeof t==`function`)return t})}function Pl(e){Li===null&&bi(`onDestroy`),Nl(()=>()=>Ds(e))}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var Fl=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`name`]),Il=U(`<span> </span>`),Ll={hash:`svelte-185w1m9`,code:`.icon.small-arrow.svelte-185w1m9 {overflow:hidden;width:12px;text-indent:-6px;}`};function Rl(e,t){J(e,Ll);let n=Al(t,Fl);var r=Il();bl(r,()=>({...n,class:`sui icon material-symbols-outlined ${t.class??``}`,"aria-hidden":!(`aria-label`in n)}),void 0,void 0,void 0,`svelte-185w1m9`);var i=R(r,!0);V(()=>K(i,t.name)),G(e,r)}var zl=new Set([`$$slots`,`$$events`,`$$legacy`,`status`,`ariaLive`,`children`,`icon`]),Bl=U(`<div><!> <!></div>`),Vl={hash:`svelte-4a0yep`,code:`.alert.svelte-4a0yep {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-4a0yep {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-4a0yep {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-4a0yep {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-4a0yep {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}`};function Hl(e,t){J(e,Vl);let n=X(t,`ariaLive`,3,`assertive`),r=Al(t,zl);var i=Bl();bl(i,()=>({...r,role:`alert`,class:`sui alert ${t.status??``}`,"aria-live":n()}),void 0,void 0,void 0,`svelte-4a0yep`);var a=I(i),o=e=>{var n=W();Ac(L(n),()=>t.icon),G(e,n)},s=e=>{{let n=N(()=>t.status===`success`?`check_circle`:t.status);Rl(e,{get name(){return H(n)}})}};q(a,e=>{t.icon?e(o):e(s,-1)}),Ac(z(a,2),()=>t.children??br),D(i),G(e,i)}var Ul=/^[\u061c\u200e\u200f\u2066-\u2069]+/,Wl=/^[-.+0-9A-Z_a-z\u{a1}-\u{61b}\u{61d}-\u{167f}\u{1681}-\u{1fff}\u{200b}-\u{200d}\u{2010}-\u{2027}\u{2030}-\u{205e}\u{2060}-\u{2065}\u{206a}-\u{2fff}\u{3001}-\u{d7ff}\u{e000}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{1fffd}\u{20000}-\u{2fffd}\u{30000}-\u{3fffd}\u{40000}-\u{4fffd}\u{50000}-\u{5fffd}\u{60000}-\u{6fffd}\u{70000}-\u{7fffd}\u{80000}-\u{8fffd}\u{90000}-\u{9fffd}\u{a0000}-\u{afffd}\u{b0000}-\u{bfffd}\u{c0000}-\u{cfffd}\u{d0000}-\u{dfffd}\u{e0000}-\u{efffd}\u{f0000}-\u{ffffd}\u{100000}-\u{10fffd}]+/u,Gl=/^[-.0-9]/;function Kl(e,t){let n=t,r=e.slice(n).match(Ul);r&&(n+=r[0].length);let i=e.slice(n).match(Wl);if(!i)return null;let a=i[0];if(Gl.test(a))return null;n+=a.length;let o=e.slice(n).match(Ul);return o&&(n+=o[0].length),{value:a.normalize(),end:n}}var ql=(e,t)=>e.slice(t).match(Wl)?.[0]??``,Jl=Symbol.for(`CST`),Yl=class extends Error{type;constructor(e,t){super(t),this.type=e}},Xl=class extends Yl{start;end;constructor(e,t,n,r){let i=r?`Missing ${r}`:e;t>=0&&(i+=` at ${t}`),super(e,i),this.start=t,this.end=n??t+1}},Zl=class extends Xl{constructor(e,t){let{start:n,end:r}=t[Jl]??{start:-1,end:-1};super(e,n,r)}},Ql=class extends Yl{source;cause;constructor(e,t,n,r){super(e,t),this.source=n,r!==void 0&&(this.cause=r)}},$l=class extends Yl{source;cause;constructor(e,t){super(e,t),this.source=`�`}},eu=new Set(``),tu=new Set(`
|
||
\r `),nu,ru,iu=(e,t)=>new Xl(`missing-syntax`,e,e+t.length,t),au=(...e)=>new Xl(...e);function ou(e,t){if(ru.startsWith(e,nu))t&&(nu+=e.length);else throw iu(nu,e)}function su(e){nu=0,ru=e;let t=du();if(ru.startsWith(`.match`,nu))return cu(t);let n=t.length>0||ru.startsWith(`{{`,nu);!n&&nu>0&&(nu=0);let r=uu(n);if(n&&(wu(),nu<ru.length))throw au(`extra-content`,nu,ru.length);return{type:`message`,declarations:t,pattern:r}}function cu(e){nu+=6,wu(!0);let t=[];for(;ru[nu]===`$`;)t.push(yu()),wu(!0);if(t.length===0)throw au(`empty-token`,nu);let n=[];for(;nu<ru.length;)n.push(lu()),wu();return{type:`select`,declarations:e,selectors:t,variants:n}}function lu(){let e=[];for(;nu<ru.length;){wu(e.length?`{`:!1);let t=ru[nu];if(t===`{`)break;if(t===`*`)e.push({type:`*`}),nu+=1;else{let t=bu(!0);t.value=t.value.normalize(),e.push(t)}}return{keys:e,value:uu(!0)}}function uu(e){if(e){if(ru.startsWith(`{{`,nu))nu+=2;else throw iu(nu,`{{`)}let t=[];loop:for(;nu<ru.length;)switch(ru[nu]){case`{`:t.push(mu(!0));break;case`}`:if(!e)throw au(`parse-error`,nu);break loop;default:t.push(_u())}if(e){if(ru.startsWith(`}}`,nu))nu+=2;else throw iu(nu,`}}`)}return t}function du(){let e=[];wu();loop:for(;ru[nu]===`.`;){switch(ru.substr(nu,6)){case`.input`:e.push(fu());break;case`.local`:e.push(pu());break;case`.match`:break loop;default:throw au(`parse-error`,nu)}wu()}return e}function fu(){nu+=6,wu(),ou(`{`,!1);let e=nu,t=mu(!1);if(t.type===`expression`&&t.arg?.type===`variable`)return{type:`input`,name:t.arg.name,value:t};throw au(`bad-input-expression`,e,nu)}function pu(){nu+=6,wu(!0),ou(`$`,!0);let e=Cu();return wu(),ou(`=`,!0),wu(),ou(`{`,!1),{type:`local`,name:e,value:mu(!1)}}function mu(e){let t=nu;nu+=1,wu();let n=vu(!1);n&&wu(`}`);let r=ru[nu],i,a;switch(r){case`@`:case`}`:break;case`:`:{nu+=1,i={type:`function`,name:Su()};let e=hu();e&&(i.options=e);break}case`#`:case`/`:{if(n||!e)throw au(`parse-error`,nu);nu+=1,a={type:`markup`,kind:r===`#`?`open`:`close`,name:Su()};let t=hu();t&&(a.options=t);break}default:throw au(`parse-error`,nu)}let o=gu();if(a?.kind===`open`&&ru[nu]===`/`&&(a.kind=`standalone`,nu+=1),ou(`}`,!0),i){let e=n?{type:`expression`,arg:n,functionRef:i}:{type:`expression`,functionRef:i};return o&&(e.attributes=o),e}if(a)return o&&(a.attributes=o),a;if(!n)throw au(`empty-token`,t,nu);return o?{type:`expression`,arg:n,attributes:o}:{type:`expression`,arg:n}}function hu(){wu(`/}`);let e={},t=!0;for(;nu<ru.length;){let n=ru[nu];if(n===`@`||n===`/`||n===`}`)break;let r=nu,i=Su();if(Object.hasOwn(e,i))throw au(`duplicate-option-name`,r,nu);wu(),ou(`=`,!0),wu(),e[i]=vu(!0),t=!1,wu(`/}`)}return t?null:e}function gu(){let e={},t=!0;for(;ru[nu]===`@`;){let n=nu;nu+=1;let r=Su();if(Object.hasOwn(e,r))throw au(`duplicate-attribute`,n,nu);wu(`=/}`),ru[nu]===`=`?(nu+=1,wu(),e[r]=bu(!0),wu(`/}`)):e[r]=!0,t=!1}return t?null:e}function _u(){let e=``,t=nu;loop:for(;t<ru.length;++t)switch(ru[t]){case`\\`:{let n=ru[t+1];if(!`\\{|}`.includes(n))throw au(`bad-escape`,t,t+2);e+=ru.substring(nu,t)+n,t+=1,nu=t+1;break}case`{`:case`}`:break loop}return e+=ru.substring(nu,t),nu=t,e}function vu(e){return ru[nu]===`$`?yu():bu(e)}function yu(){return nu+=1,{type:`variable`,name:Cu()}}function bu(e){if(ru[nu]===`|`)return xu();let t=ql(ru,nu);if(!t){if(e)throw au(`empty-token`,nu);return}return nu+=t.length,{type:`literal`,value:t}}function xu(){nu+=1;let e=``;for(let t=nu;t<ru.length;++t)switch(ru[t]){case`\\`:{let n=ru[t+1];if(!`\\{|}`.includes(n))throw au(`bad-escape`,t,t+2);e+=ru.substring(nu,t)+n,t+=1,nu=t+1;break}case`|`:return e+=ru.substring(nu,t),nu=t+1,{type:`literal`,value:e}}throw iu(ru.length,`|`)}function Su(){let e=Cu();return ru[nu]===`:`?(nu+=1,e+`:`+Cu()):e}function Cu(){let e=Kl(ru,nu);if(!e)throw au(`empty-token`,nu);return nu=e.end,e.value}function wu(e=!1){let t=ru[nu],n=!1;if(e){for(;eu.has(t);)t=ru[++nu];for(;tu.has(t);)t=ru[++nu],n=!0}for(;eu.has(t)||tu.has(t);)t=ru[++nu];if(e&&!n&&(e===!0||!e.includes(ru[nu])))throw iu(nu,`' '`)}function Tu(e,t){let{node:n,pattern:r}=t,{functionRef:i=n,attributes:a=null,declaration:o=n,expression:s=n,key:c=n,markup:l=n,options:u=null,value:d=n,variant:f=n}=t,p=(e,t)=>{if(e){let n=u?.(e,t);if(d)for(let n of Object.values(e))d(n,t,`option`);n?.()}},m=(e,t)=>{if(e){let n=a?.(e,t);if(d)for(let n of Object.values(e))n!==!0&&d(n,t,`attribute`);n?.()}},h=(e,t)=>{if(typeof e==`object`){let n;switch(e.type){case`expression`:if(n=s?.(e,t),e.arg&&d?.(e.arg,t,`arg`),e.functionRef){let n=i?.(e.functionRef,t,e.arg);p(e.functionRef.options,t),n?.()}m(e.attributes,t);break;case`markup`:n=l?.(e,t),p(e.options,t),m(e.attributes,t)}n?.()}},g=e=>{let t=r?.(e);for(let t of e)h(t,`placeholder`);t?.()};for(let t of e.declarations){let e=o?.(t);t.value&&h(t.value,`declaration`),e?.()}if(e.type===`message`)g(e.pattern);else{if(d)for(let t of e.selectors)d(t,`selector`,`arg`);for(let t of e.variants){let e=f?.(t);c&&t.keys.forEach(c),g(t.value),e?.()}}}function Eu(e,t=(e,t)=>{throw new Zl(e,t)}){let n=0,r=null,i=new Set,a=new Set,o=new Set,s=new Set,c=new Set,l=new Set,u=!0;Tu(e,{declaration(e){if(e.name)return(e.value.functionRef||e.type===`local`&&e.value.arg?.type===`variable`&&i.has(e.value.arg.name))&&i.add(e.name),e.type===`local`&&s.add(e.name),u=e.type===`local`,()=>{a.has(e.name)?t(`duplicate-declaration`,e):a.add(e.name)}},expression({functionRef:e}){e&&o.add(e.name)},value(e,o,s){if(e.type===`variable`)switch(c.add(e.name),o){case`declaration`:(s!==`arg`||u)&&a.add(e.name);break;case`selector`:n+=1,r=e,i.has(e.name)||t(`missing-selector-annotation`,e)}},variant(e){let{keys:i}=e;i.length!==n&&t(`key-mismatch`,e);let a=JSON.stringify(i.map(e=>e.type===`literal`?e.value:0));l.has(a)?t(`duplicate-variant`,e):l.add(a),r&&=i.every(e=>e.type===`*`)?null:e}}),r&&t(`missing-fallback`,r);for(let e of s)c.delete(e);return{functions:o,variables:c}}var Du=`Adlm,Arab,Hebr,Mand,Nkoo,Rohg,Syrc,Thaa`;function Ou(e){if(e)try{typeof e==`string`&&(e=new Intl.Locale(e));let t=e.getTextInfo?.()??e.textInfo;if(t?.direction)return t.direction;let n=e.maximize().script;if(n)return Du.includes(n)?`rtl`:`ltr`}catch{}return`auto`}function ku(e){if(e&&typeof e==`object`&&(e=e.valueOf()),typeof e==`boolean`)return e;if(e&&typeof e==`object`&&(e=String(e)),e===`true`)return!0;if(e===`false`)return!1;throw RangeError(`Not a boolean`)}function Au(e){if(e&&typeof e==`object`&&(e=e.valueOf()),e&&typeof e==`object`&&(e=String(e)),typeof e==`string`&&/^(0|[1-9][0-9]*)$/.test(e)&&(e=Number(e)),typeof e==`number`&&e>=0&&Number.isInteger(e))return e;throw RangeError(`Not a positive integer`)}function ju(e){if(e&&typeof e==`object`&&(e=e.valueOf()),typeof e==`string`)return e;if(e&&typeof e==`object`)return String(e);throw RangeError(`Not a string`)}function Mu(e){let t;if(typeof e==`object`){let n=e?.valueOf;typeof n==`function`&&(t=e.options,e=n.call(e))}if(typeof e==`string`)try{e=JSON.parse(e)}catch{}if(typeof e!=`bigint`&&typeof e!=`number`)throw new $l(`bad-operand`,`Input is not numeric`);return{value:e,options:t}}function Nu(e,t,n,r){let{dir:i,locales:a}=e;n.useGrouping===`never`&&(n.useGrouping=!1),r&&`select`in n&&!e.literalOptionKeys.has(`select`)&&(e.onError(`bad-option`,`The option select may only be set by a literal value`),r=!1);let o,s,c,l;return{type:`number`,get dir(){return i??=(o??=Intl.NumberFormat.supportedLocalesOf(a,n)[0],Ou(o)),i},get options(){return{...n}},selectKey:r?e=>{let r=t;n.style===`percent`&&(r*=typeof r==`bigint`?100n:100);let i=String(r);if(e.has(i))return i;if(n.select===`exact`)return null;let o=n.select?{...n,select:void 0,type:n.select}:n;return c??=new Intl.PluralRules(a,o).select(Number(r)),e.has(c)?c:null}:void 0,toParts(){s??=new Intl.NumberFormat(a,n);let e=s.formatToParts(t);return o??=s.resolvedOptions().locale,i??=Ou(o),i===`ltr`||i===`rtl`?[{type:`number`,dir:i,locale:o,parts:e}]:[{type:`number`,locale:o,parts:e}]},toString(){return s??=new Intl.NumberFormat(a,n),l??=s.format(t),l},valueOf:()=>t}}function Pu(e,t,n){let r=Mu(n),i=r.value,a=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`decimal`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`minimumIntegerDigits`:case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:a[n]=Au(r);break;case`roundingMode`:case`roundingPriority`:case`select`:case`signDisplay`:case`trailingZeroDisplay`:case`useGrouping`:a[n]=ju(r)}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :number option ${n}`)}return Nu(e,i,a,!0)}function Fu(e,t,n){let r=Mu(n),i=Number.isFinite(r.value)?Math.round(r.value):r.value,a=Object.assign({},r.options,{maximumFractionDigits:0,minimumFractionDigits:void 0,minimumSignificantDigits:void 0,style:`decimal`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`minimumIntegerDigits`:case`maximumSignificantDigits`:a[n]=Au(r);break;case`select`:case`signDisplay`:case`useGrouping`:a[n]=ju(r)}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :integer option ${n}`)}return Nu(e,i,a,!0)}function Iu(e,t,n){let r=Mu(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`currency`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`currency`:case`currencySign`:case`roundingMode`:case`roundingPriority`:case`trailingZeroDisplay`:case`useGrouping`:i[n]=ju(r);break;case`minimumIntegerDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:i[n]=Au(r);break;case`currencyDisplay`:{let t=ju(r);t===`never`?e.onError(`unsupported-operation`,`Currency display "never" is not yet supported`):i[n]=t;break}case`fractionDigits`:{let e=ju(r);if(e===`auto`)i.minimumFractionDigits=void 0,i.maximumFractionDigits=void 0;else{let t=Au(e);i.minimumFractionDigits=t,i.maximumFractionDigits=t}break}}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :currency option ${n}`)}if(!i.currency)throw new $l(`bad-operand`,`A currency code is required for :currency`);return Nu(e,r.value,i,!1)}var Lu=new Set([`weekday`,`day-weekday`,`month-day`,`month-day-weekday`,`year-month-day`,`year-month-day-weekday`]),Ru=new Set([`long`,`medium`,`short`]),zu=new Set([`hour`,`minute`,`second`]),Bu=new Set([`long`,`short`]),Vu=(e,t,n)=>Wu(`datetime`,e,t,n),Hu=(e,t,n)=>Wu(`date`,e,t,n),Uu=(e,t,n)=>Wu(`time`,e,t,n);function Wu(e,t,n,r){let i={localeMatcher:t.localeMatcher},a=r;if(typeof a==`object`&&a){let t=a.options;t&&(i.calendar=t.calendar,e!==`date`&&(i.hour12=t.hour12),i.timeZone=t.timeZone),typeof a.valueOf==`function`&&(a=a.valueOf())}switch(typeof a){case`number`:case`string`:a=new Date(a)}if(!(a instanceof Date)||isNaN(a.getTime()))throw new $l(`bad-operand`,`Input is not a valid date`);if(n.calendar!==void 0)try{i.calendar=ju(n.calendar)}catch{t.onError(`bad-option`,`Invalid :${e} calendar option value`)}if(n.hour12!==void 0&&e!==`date`)try{i.hour12=ku(n.hour12)}catch{t.onError(`bad-option`,`Invalid :${e} hour12 option value`)}if(n.timeZone!==void 0){let r;try{r=ju(n.timeZone)}catch{t.onError(`bad-option`,`Invalid :${e} timeZone option value`)}if(r===`input`)i.timeZone===void 0&&t.onError(`bad-operand`,`Missing input timeZone value for :${e}`);else if(r!==void 0){if(i.timeZone!==void 0&&r!==i.timeZone)throw new $l(`bad-option`,`Time zone conversion is not supported`);i.timeZone=r}}if(e!==`time`){let r=e===`date`?`fields`:`dateFields`,a=e===`date`?`length`:`dateLength`,o=Gu(t,n,r,Lu)??`year-month-day`,s=Gu(t,n,a,Ru),c=new Set(o.split(`-`));c.has(`year`)&&(i.year=`numeric`),c.has(`month`)&&(i.month=s===`long`?`long`:s===`short`?`numeric`:`short`),c.has(`day`)&&(i.day=`numeric`),c.has(`weekday`)&&(i.weekday=s===`long`?`long`:`short`)}if(e!==`date`){switch(Gu(t,n,e===`time`?`precision`:`timePrecision`,zu)){case`hour`:i.hour=`numeric`;break;case`second`:i.hour=`numeric`,i.minute=`numeric`,i.second=`numeric`;break;default:i.hour=`numeric`,i.minute=`numeric`}i.timeZoneName=Gu(t,n,`timeZoneStyle`,Bu)}let o=new Intl.DateTimeFormat(t.locales,i),s=t.dir,c,l;return{type:`datetime`,get dir(){return s??=(c??=o.resolvedOptions().locale,Ou(c)),s},get options(){return{...i}},toParts(){let e=o.formatToParts(a);return c??=o.resolvedOptions().locale,s??=Ou(c),s===`ltr`||s===`rtl`?[{type:`datetime`,dir:s,locale:c,parts:e}]:[{type:`datetime`,locale:c,parts:e}]},toString(){return l??=o.format(a),l},valueOf:()=>a}}function Gu(e,t,n,r){let i=t[n];if(i!==void 0)try{let e=ju(i);if(r&&!r.has(e))throw Error();return e}catch{e.onError(`bad-option`,`Invalid value for ${n} option`)}}function Ku(e,t,n){let{value:r,options:i}=Mu(n),a;try{a=`add`in t?Au(t.add):-1}catch{throw new $l(`bad-option`,`Value ${t.add} is not valid for :offset option add`)}let o;try{o=`subtract`in t?Au(t.subtract):-1}catch{throw new $l(`bad-option`,`Value ${t.subtract} is not valid for :offset option subtract`)}if(a<0==o<0)throw new $l(`bad-option`,`Exactly one of "add" or "subtract" is required as an :offset option`);let s=a<0?-o:a;return r+=typeof r==`number`?s:BigInt(s),Pu(e,{},{valueOf:()=>r,options:i})}function qu(e,t,n){let r=Mu(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`percent`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`roundingMode`:case`roundingPriority`:case`signDisplay`:case`trailingZeroDisplay`:case`useGrouping`:i[n]=ju(r);break;case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:i[n]=Au(r)}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :percent option ${n}`)}return Nu(e,r.value,i,!0)}function Ju(e,t,n){let r=n===void 0?``:String(n),i=r.normalize();return{type:`string`,dir:e.dir??`auto`,selectKey:e=>e.has(i)?i:null,toParts(){let{dir:t}=e,n=e.locales[0];return t===`ltr`||t===`rtl`?[{type:`string`,dir:t,locale:n,value:r}]:[{type:`string`,locale:n,value:r}]},toString:()=>r,valueOf:()=>r}}function Yu(e,t,n){let r=Mu(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`unit`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`signDisplay`:case`roundingMode`:case`roundingPriority`:case`trailingZeroDisplay`:case`unit`:case`unitDisplay`:case`useGrouping`:i[n]=ju(r);break;case`minimumIntegerDigits`:case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:i[n]=Au(r)}}catch(t){t instanceof Yl?e.onError(t):e.onError(`bad-option`,`Value ${r} is not valid for :currency option ${n}`)}if(!i.unit)throw new $l(`bad-operand`,`A unit identifier is required for :unit`);return Nu(e,r.value,i,!1)}var Xu={integer:Fu,number:Pu,offset:Ku,string:Ju};Xu=Object.freeze(Object.assign(Object.create(null),Xu));var Zu={currency:Iu,date:Hu,datetime:Vu,percent:qu,time:Uu,unit:Yu};Zu=Object.freeze(Object.assign(Object.create(null),Zu));var Qu=Symbol(`bidi-isolate`),$u=(e=`�`)=>({type:`fallback`,source:e,toParts:()=>[{type:`fallback`,source:e}],toString:()=>`{${e}}`}),ed=(e,t)=>({type:`unknown`,source:e,dir:`auto`,toParts:()=>[{type:`unknown`,value:t}],toString:()=>String(t),valueOf:()=>t}),td=class{#e;#t;#n;dir;id;constructor(e,t,n){this.#e=e,this.#n=t,this.dir=void 0;let r=n&&Object.hasOwn(n,`u:dir`)?n[`u:dir`]:void 0;if(r){let t=String(ud(e,r));if(t===`ltr`||t===`rtl`||t===`auto`)this.dir=t;else if(t!==`inherit`){let t=new $l(`bad-option`,`Unsupported value for u:dir option`);t.source=dd(r),e.onError(t)}}let i=n&&Object.hasOwn(n,`u:id`)?n[`u:id`]:void 0;if(this.id=i?String(ud(e,i)):void 0,n){this.#t=new Set;for(let[e,t]of Object.entries(n))t.type===`literal`&&this.#t.add(e)}}get literalOptionKeys(){return new Set(this.#t)}get localeMatcher(){return this.#e.localeMatcher}get locales(){return this.#e.locales.map(String)}onError(e,t){let n;e instanceof $l?n=e:typeof e==`string`&&typeof t==`string`?n=new $l(e,t):(n=new $l(`function-error`,String(e)),n.cause=e),n.source=this.#n,this.#e.onError(n)}};function nd(e,t,{name:n,options:r}){let i=`:${n}`,a=dd(t)??i;try{let o=t?[ud(e,t)]:[],s=e.functions[n];if(!s)throw new Ql(`unknown-function`,`Unknown function ${i}`,a);let c=new td(e,a,r),l=s(c,rd(e,r),...o);if(typeof l!=`object`||!l||typeof l.type!=`string`)throw new Ql(`bad-function-result`,`Function ${i} did not return a MessageValue`,a);let u={source:a};return c.dir&&(u.dir=c.dir,u[Qu]=!0),c.id&&typeof l.toParts==`function`&&(u.toParts=()=>{let e=l.toParts();for(let t of e)t.id=c.id;return e}),{...l,...u}}catch(t){return e.onError(t instanceof Yl?t:new Ql(`bad-function-result`,String(t),a,t)),$u(a)}}function rd(e,t){let n=Object.create(null);if(t)for(let[r,i]of Object.entries(t))r.startsWith(`u:`)||(n[r]=ud(e,i));return n}function id(e,{arg:t,functionRef:n}){if(n)return nd(e,t,n);switch(t?.type){case`literal`:{let n=`|${t.value}|`,r=Ju(new td(e,n),{},t.value);return r.source=n,r}case`variable`:return ld(e,t);default:throw Error(`Unsupported expression: ${t?.type}`)}}var ad=class{expression;scope;constructor(e,t){this.expression=e,this.scope=t}},od=e=>e!==null&&(typeof e==`object`||typeof e==`function`);function sd(e,t){if(od(e)){if(t in e)return e[t];let n=t.split(`.`);for(let t=n.length-1;t>0;--t){let r=n.slice(0,t).join(`.`);if(r in e){let i=n.slice(t).join(`.`);return sd(e[r],i)}}for(let[n,r]of Object.entries(e))if(n.normalize()===t)return r}}function cd(e,{name:t}){let n=sd(e.scope,t);if(n===void 0){let n=`$`+t,r=`Variable not available: ${n}`;e.onError(new Ql(`unresolved-variable`,r,n))}else if(n instanceof ad){let r=id(n.scope?{...e,scope:n.scope}:e,n.expression);return e.scope[t]=r,e.localVars.add(r),r}return n}function ld(e,t){let n=`$`+t.name,r=cd(e,t);if(r===void 0)return $u(n);let i=typeof r;if(i===`object`){let t=r;if(t.type===`fallback`)return $u(n);if(e.localVars.has(t))return t.source=n,t;r instanceof Number?i=`number`:r instanceof String&&(i=`string`)}let a;switch(i){case`bigint`:case`number`:a=e.functions.number;break;case`string`:a=e.functions.string;break;default:return ed(n,r)}let o=new td(e,n),s=a(o,{},r);return s.source=n,s}function ud(e,t){switch(t.type){case`literal`:return t.value;case`variable`:return cd(e,t);default:throw Error(`Unsupported value: ${t.type}`)}}function dd(e){switch(e?.type){case`literal`:return`|`+e.value.replaceAll(`\\`,`\\\\`).replaceAll(`|`,`\\|`)+`|`;case`variable`:return`$`+e.name;default:return}}function fd(e,{kind:t,name:n,options:r}){let i={type:`markup`,kind:t,name:n},a=r?Object.entries(r):null;if(a?.length){i.options={};for(let[t,n]of a)if(t===`u:dir`){let r=new $l(`bad-option`,`The option ${t} is not valid for markup`);r.source=dd(n),e.onError(r)}else{let r=ud(e,n);typeof r==`object`&&typeof r?.valueOf==`function`&&(r=r.valueOf()),t===`u:id`?i.id=String(r):i.options[t]=r}}return i}function pd(e,t){if(t.type===`message`)return t.pattern;let n=t.selectors.map(t=>{let n=ld(e,t),r;return typeof n.selectKey==`function`?r=n.selectKey.bind(n):(e.onError(new Ql(`bad-selector`,`Selector does not support selection`,n.source)),r=()=>null),{selectKey:r,source:n.source,best:null,keys:null}}),r=t.variants;loop:for(let i=0;i<n.length;++i){let a=n[i];if(!a.keys){a.keys=new Set;for(let{keys:e}of r){let t=e[i];if(!t)break loop;t.type!==`*`&&a.keys.add(t.value)}}try{a.best=a.keys.size?a.selectKey(a.keys):null}catch(t){e.onError(new Ql(`bad-selector`,`Selection failed`,a.source,t)),a.selectKey=()=>null,a.best=null}if(r=r.filter(e=>{let t=e.keys[i];return t.type===`*`?a.best==null:a.best===t.value}),r.length===0){if(i===0)break;let e=n[i-1];e.best==null?e.keys?.clear():e.keys?.delete(e.best);for(let e=i;e<n.length;++e)n[e].keys=null;r=t.variants,i=-1}}let i=r[0];return i?i.value:(e.onError(new Ql(`no-match`,`No variant was selected!?`,`.match`)),[])}var md=class{#e;#t;#n;#r;#i;#a;constructor(e,t,n){this.#e=n?.bidiIsolation!==`none`,this.#n=n?.localeMatcher??`best fit`,this.#r=Array.isArray(e)?e.map(e=>new Intl.Locale(e)):e?[new Intl.Locale(e)]:[],this.#t=n?.dir??Ou(this.#r[0]),this.#i=typeof t==`string`?su(t):t,Eu(this.#i),this.#a=n?.functions?Object.assign(Object.create(null),Xu,n.functions):Xu}format(e,t){let n=this.#o(e,t),r=``;for(let e of pd(n,this.#i))if(typeof e==`string`)r+=e;else if(e.type===`markup`)fd(n,e);else{let t;try{if(t=id(n,e),typeof t.toString==`function`){if(this.#e&&(this.#t!==`ltr`||t.dir!==`ltr`||t[Qu])){let e=t.dir===`ltr`?``:t.dir===`rtl`?``:``;r+=e+t.toString()+``}else r+=t.toString()}else{let e=new $l(`not-formattable`,`Message part is not formattable`);throw e.source=t.source,e}}catch(e){n.onError(e);let i=`{${t?.source??`�`}}`;r+=this.#e?``+i+``:i}}return r}formatToParts(e,t){let n=this.#o(e,t),r=[];for(let e of pd(n,this.#i))if(typeof e==`string`)r.push({type:`text`,value:e});else if(e.type===`markup`)r.push(fd(n,e));else{let t;try{if(t=id(n,e),typeof t.toParts==`function`){let e=t.toParts();if(this.#e&&(this.#t!==`ltr`||t.dir!==`ltr`||t[Qu])){let n=t.dir===`ltr`?``:t.dir===`rtl`?``:``;r.push({type:`bidiIsolation`,value:n},...e,{type:`bidiIsolation`,value:``})}else r.push(...e)}else{let e=new $l(`not-formattable`,`Message part is not formattable`);throw e.source=t.source,e}}catch(e){n.onError(e);let i={type:`fallback`,source:t?.source??`�`};this.#e?r.push({type:`bidiIsolation`,value:``},i,{type:`bidiIsolation`,value:``}):r.push(i)}}return r}#o(e,t=e=>{try{process.emitWarning(e)}catch{console.warn(e)}}){let n={...e};for(let t of this.#i.declarations)n[t.name]=new ad(t.value,t.type===`input`?e??{}:void 0);return{onError:t,localeMatcher:this.#n,locales:this.#r,localVars:new WeakSet,functions:this.#a,scope:n}}},hd=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],gd=[`difference`,`intersection`,`symmetricDifference`,`union`],_d=!1,vd=class e extends Set{#e=new Map;#t=P(0);#n=P(0);#r=ms||-1;constructor(e){if(super(),e){for(var t of e)super.add(t);this.#n.v=super.size}_d||this.#a()}#i(e){return ms===this.#r?P(e):$a(e)}#a(){_d=!0;var t=e.prototype,n=Set.prototype;for(let e of hd)t[e]=function(...t){return H(this.#t),n[e].apply(this,t)};for(let r of gd)t[r]=function(...t){H(this.#t);var i=n[r].apply(this,t);return new e(i)}}has(e){var t=super.has(e),n=this.#e,r=n.get(e);if(r===void 0){if(!t)return H(this.#t),!1;r=this.#i(!0),n.set(e,r)}return H(r),t}add(e){return super.has(e)||(super.add(e),F(this.#n,super.size),ro(this.#t)),this}delete(e){var t=super.delete(e),n=this.#e,r=n.get(e);return r!==void 0&&(n.delete(e),F(r,!1)),t&&(F(this.#n,super.size),ro(this.#t)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var t of e.values())F(t,!1);e.clear(),F(this.#n,0),ro(this.#t)}}keys(){return this.values()}values(){return H(this.#t),super.values()}entries(){return H(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return H(this.#n)}},yd=class extends Map{#e=new Map;#t=P(0);#n=P(0);#r=ms||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return ms===this.#r?P(e):$a(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return H(this.#t),!1}return H(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{H(this.#t);return}}return H(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),F(this.#n,super.size),ro(o);else if(i!==t){ro(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&ro(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),F(n,-1)),r&&(F(this.#n,super.size),ro(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;F(this.#n,0);for(var t of e.values())F(t,-1);ro(this.#t),e.clear()}}#a(){H(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)H(n)}keys(){return H(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return H(this.#n),super.size}};Intl.MessageFormat??=md;var bd=P(``),xd=ao([]),Sd=ao({}),Cd=``,wd=``,Td,Ed={},Dd={},Od,kd=(e,t)=>{if(typeof t!=`string`||!t)throw TypeError(`${e} must be a non-empty string (got ${JSON.stringify(t)})`)},Ad=(e,t)=>{if(typeof t!=`string`)throw TypeError(`${e} must be a string (got ${typeof t})`)},jd=(e,t)=>{if(typeof t!=`function`)throw TypeError(`${e} must be a function (got ${typeof t})`)},Md=new Map,Nd=e=>{if(!Md.has(e))try{let t=new Intl.Locale(e),{language:n,script:r,region:i}=t;Md.set(e,{language:n,script:r??t.maximize().script,anyScript:!r&&!i})}catch{Md.set(e,void 0)}return Md.get(e)},Pd=(e,t)=>{if(!e||!t.length||t.includes(e))return e;let n=Nd(e);if(!n)return e;let{language:r,script:i,anyScript:a}=n;return t.find(e=>{let t=Nd(e);return!!t&&t.language===r&&(a||t.script===i)})??e},Fd=(e,t=``)=>Object.entries(e).reduce((e,[n,r])=>{let i=t?`${t}.${n}`:n;return typeof r==`object`&&r&&!Array.isArray(r)?Object.assign(e,Fd(r,i)):e[i]=r,e},Object.create(null)),Id=e=>{xd.includes(e)||(xd.push(e),wd=Pd(Cd,xd))},Ld=()=>{H(bd)&&!xd.includes(H(bd))&&Ud.set(H(bd))},Rd=(e,...t)=>{kd(`addMessages: localeCode`,e),t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`addMessages: maps[${t}] must be a plain object (got ${Array.isArray(e)?`array`:typeof e})`)}),Id(e),Sd[e]??={};let n=Sd[e],r={...$d,...Dd};t.forEach(t=>{Object.entries(Fd(t)).forEach(([t,i])=>{n[t]=new Intl.MessageFormat(e,String(i),{functions:r})})}),Ld()},zd=new yd,Bd=new yd,Vd=(e=H(bd))=>{if(Ad(`waitLocale: localeCode`,e),!e)return Promise.resolve();if(!Bd.has(e)){let t=zd.get(e);if(t){let n=Promise.resolve(t()).then(t=>{Rd(e,t)},()=>{Bd.delete(e),H(bd)===e&&!Sd[e]&&wd&&F(bd,wd,!0)});Bd.set(e,n)}else Bd.set(e,Promise.resolve())}return Bd.get(e)??Promise.resolve()},Hd=(e=H(bd))=>Ou(e)===`rtl`,Ud={get current(){return H(bd)},set(e){Ad(`locale.set: value`,e);let t=xd.length?Pd(e,xd):e;if(e&&xd.length&&!xd.includes(t)&&wd&&xd.includes(wd)&&(t=wd),F(bd,t,!0),typeof document<`u`&&t){document.documentElement.lang=t;let e=Ou(t);e!==`auto`&&(document.documentElement.dir=e)}return Vd(t)}},Wd=(e,t)=>{kd(`register: localeCode`,e),jd(`register: loader`,t),zd.set(e,t),Bd.delete(e),Id(e),Ld()},Gd=()=>{if(typeof navigator>`u`)return;let e=navigator.languages?.length?navigator.languages:[navigator.language];return e.map(e=>Pd(e,xd)).find(e=>xd.includes(e))??e[0]},Kd=e=>{if(!e||typeof e.fallbackLocale!=`string`)throw TypeError(`init: fallbackLocale must be a string (got ${JSON.stringify(e?.fallbackLocale)})`);e.initialLocale!==void 0&&Ad(`init: initialLocale`,e.initialLocale),e.handleMissingMessage!==void 0&&jd(`init: handleMissingMessage`,e.handleMissingMessage),Cd=e.fallbackLocale,wd=Pd(Cd,xd),Td=e.handleMissingMessage,Ed=e.formats??{},e.initialLocale&&Ud.set(e.initialLocale)},Z=(e,{values:t={},locale:n,default:r,formats:i}={})=>{if(e==null)throw TypeError(`format: key must be a string or message object (got ${JSON.stringify(e)})`);if(typeof e==`object`){let{id:t,values:n={},locale:r,default:i,formats:a}=e;return Z(t,{values:n,locale:r,default:i,formats:a})}let a=n??H(bd),o=wd;Od=i;let s;try{s=Sd[a]?.[e]?.format(t)??(a===o?void 0:Sd[o]?.[e]?.format(t))}finally{Od=void 0}if(s!==void 0)return s;if(Td){let t=Td(e,a,r);if(t!==void 0)return t}return r??e},qd=`_default`,Jd={date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}},number:{currency:{style:`currency`},percent:{style:`percent`},scientific:{notation:`scientific`},engineering:{notation:`engineering`},compactLong:{notation:`compact`,compactDisplay:`long`},compactShort:{notation:`compact`,compactDisplay:`short`}}},Yd=(e,t)=>Ed[e]?.[t]??Jd[e]?.[t],Xd=e=>{let t=Od?.[e];return(typeof t==`string`?Yd(e,t):t)??Ed[e]?.[qd]},Zd=(e,t,n)=>{let r=e.valueOf();return{...e,dir:n?Ou(n):e.dir,toString:()=>t.format(r)}},Qd=(e,t,n)=>(r,i,a)=>{let o=e(r,i,a),s=Xd(t);if(!s)return o;let{locale:c,...l}=s;return Zd(o,new n(c??r.locales,l),c)},$d={...Zu,date:Qd(Zu.date,`date`,Intl.DateTimeFormat),time:Qd(Zu.time,`time`,Intl.DateTimeFormat),datetime:Qd(Zu.datetime,`datetime`,Intl.DateTimeFormat),number:Qd(Xu.number,`number`,Intl.NumberFormat),integer:Qd(Xu.integer,`number`,Intl.NumberFormat)},ef,tf=()=>(ef??=navigator.userAgentData?.platform===`macOS`||navigator.platform.startsWith(`Mac`),ef),nf=[`Ctrl`,`Meta`,`Alt`,`Shift`],rf=new Set([`Space`,`Enter`,`Escape`,`Tab`,`Backspace`,`Delete`,`Insert`,`Home`,`End`,`PageUp`,`PageDown`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,...Array.from({length:24},(e,t)=>`F${t+1}`)]),af=(e,t)=>/^\d$/.test(e)?t.code===`Digit${e}`:rf.has(e)?t.code===e:e.toLowerCase()===t.key.toLowerCase(),of=e=>e.replace(/\bAccel\b/g,tf()?`Meta`:`Ctrl`),sf=new Map,cf=e=>{let t=sf.get(e);return t||(t=of(e).split(/\s+/).map(e=>{let t=e.split(`+`);return{ctrl:t.includes(`Ctrl`),meta:t.includes(`Meta`),alt:t.includes(`Alt`),shift:t.includes(`Shift`),tokens:t.filter(e=>!nf.includes(e))}}),sf.set(e,t)),t},lf=(e,t)=>{let{ctrlKey:n,metaKey:r,altKey:i,shiftKey:a,key:o,code:s}=e;return!o&&!s?!1:t.some(({ctrl:t,meta:o,alt:s,shift:c,tokens:l})=>t===n&&o===r&&s===i&&c===a&&l.every(t=>af(t,e)))},uf=(e,t)=>lf(e,cf(t)),df=new Map,ff=(e,t)=>{let{disabled:n}=e;if(!e.getClientRects().length)return;let{top:r,left:i}=e.getBoundingClientRect();n&&e.style.setProperty(`pointer-events`,`auto`);let a=document.elementsFromPoint(i+4,r+4).includes(e);n&&e.style.removeProperty(`pointer-events`),a&&(t.preventDefault(),n||(e.focus(),e.click()))},pf=e=>{df.forEach((t,n)=>{lf(e,t)&&ff(n,e)})},mf=(e=``)=>{let t=e?of(e):void 0;if(!t)return()=>()=>{};let n=cf(t);return e=>(df.size||globalThis.addEventListener(`keydown`,pf,{capture:!0}),df.set(e,n),e.setAttribute(`aria-keyshortcuts`,t),()=>{df.delete(e),e.removeAttribute(`aria-keyshortcuts`),df.size||globalThis.removeEventListener(`keydown`,pf,{capture:!0})})},hf=U(`<span role="none" class="sui truncated-text svelte-1090dfu"><!></span>`),gf={hash:`svelte-1090dfu`,code:`.truncated-text.svelte-1090dfu {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}`};function _f(e,t){J(e,gf);let n=X(t,`lines`,3,1),r=X(t,`children`,3,void 0);var i=hf();Ac(I(i),()=>r()??br),D(i),V(()=>nl(i,`-webkit-line-clamp: ${n()??``}; line-clamp: ${n()??``};`)),G(e,i)}var vf=(e=0)=>new Promise(t=>{globalThis.setTimeout(()=>{t(void 0)},e)});function yf(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var bf=`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`,xf=`0123456789ABCDEFGHIJKLMNOPQRSTUV`,Sf=`0123456789ABCDEFGHJKMNPQRSTVWXYZ`;function Cf(e,t,n){n||={};let r,i;switch(t){case`RFC3548`:case`RFC4648`:r=bf,i=!0;break;case`RFC4648-HEX`:r=xf,i=!0;break;case`Crockford`:r=Sf,i=!1;break;default:throw Error(`Unknown base32 variant: `+t)}let a=n.padding===void 0?i:n.padding,o=yf(e),s=0,c=0,l=``;for(let e=0;e<o.byteLength;e++)for(c=c<<8|o.getUint8(e),s+=8;s>=5;)l+=r[c>>>s-5&31],s-=5;if(s>0&&(l+=r[c<<5-s&31]),a)for(;l.length%8!=0;)l+=`=`;return l}var wf=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Tf=e=>{let t=globalThis.crypto.randomUUID();return e===`short`?t.split(`-`).pop():e===`shorter`?t.split(`-`).shift():typeof e==`number`?t.split(`-`).join(``).slice(0,e):t},Ef=()=>{let e=Tf().replaceAll(`-`,``),{buffer:t}=new Uint8Array(e.match(/../g).map(e=>parseInt(e,16)));return Cf(t,`RFC4648`,{padding:!1}).toLowerCase()},Df=async(e,{algorithm:t=`SHA-1`,format:n=`hex`}={})=>{let r;if(typeof e==`string`){let t=new TextEncoder().encode(e);r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}else if(e instanceof ArrayBuffer)r=e;else if(ArrayBuffer.isView(e)){let t=e;r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}else if(e&&typeof e.arrayBuffer==`function`)r=await e.arrayBuffer();else throw Error(`Unsupported input type for getHash`);let i=await globalThis.crypto.subtle.digest(t,r);return n===`binary`?Array.from(new Uint8Array(i),e=>String.fromCharCode(e)).join(``):Array.from(new Uint8Array(i),e=>e.toString(16).padStart(2,`0`)).join(``)},Of,kf,Af=(e=`e`,t=7)=>[e,Tf(t)].join(`-`),jf=e=>{Of?.delete(e),kf?.unobserve(e)},Mf=()=>{if(`IntersectionObserver`in globalThis)return kf||(Of=new WeakMap,kf=new IntersectionObserver(e=>{e.forEach(({isIntersecting:e,target:t})=>{if(!e||!(t instanceof HTMLElement))return;let n=Of?.get(t);n&&(n(),jf(t))})}),kf)},Nf=e=>{let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=globalThis;return r>0&&i>0&&t<a&&n<o},Pf=e=>{if(`requestAnimationFrame`in globalThis){globalThis.requestAnimationFrame(e);return}globalThis.setTimeout(e,16)},Ff=e=>{let t=Mf();if(t)return Nf(e)?Promise.resolve(void 0):new Promise(n=>{Of?.set(e,n),Pf(()=>{t.observe(e)})})},If=class{#e=P(!1);get open(){return H(this.#e)}set open(e){F(this.#e,e,!0),e?this.checkPosition():this.anchorElement.getAttribute(`aria-expanded`)===`true`&&window.requestAnimationFrame(()=>{let{activeElement:e}=document;(!e||e===document.body||this.popupElement?.contains(e))&&this.anchorElement.focus()}),this.anchorElement.setAttribute(`aria-expanded`,String(e))}#t=P(ao({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0}));get style(){return H(this.#t)}set style(e){F(this.#t,e,!0)}popupElement=void 0;contentElement=void 0;#n=void 0;constructor(e,t,n,r){this.anchorElement=e,this.position=n,this.positionBaseElement=r??e,this.id=Af(`popup`),this.anchorElement.setAttribute(`aria-expanded`,`false`),Us(e,`click`,()=>{!this.isDisabled&&!this.isReadOnly&&(this.open=!this.open)}),Us(e,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e,o=i||a||n||r;!this.isDisabled&&!this.isReadOnly&&[`Enter`,` `].includes(t)&&!o&&(e.preventDefault(),e.stopPropagation(),this.open=!this.open)}),Us(e,`transitionstart`,()=>{this.anchorElement.closest(`.hiding, .hidden, [hidden]`)&&this.hideImmediately()}),this.intersectionObserver=new IntersectionObserver(([e])=>{!e.isIntersecting&&this.open&&this.hideImmediately()}),this.intersectionObserver.observe(this.anchorElement),this.resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>this.checkPosition())}),this.resizeObserver.observe(this.positionBaseElement),this.viewportResizeObserver=new ResizeObserver(()=>{this.open&&this.checkPosition()}),t&&this.attachPopupElement(t)}attachPopupElement(e,t){if(this.popupElement===e&&this.contentElement===t)return;this.detachPopupElement(),this.popupElement=e,this.contentElement=t,this.viewportResizeObserver.observe(e);let n=t??e;n.id=this.id,this.anchorElement.setAttribute(`aria-controls`,this.id);let r=Us(e,`click`,e=>{e.stopPropagation();let t=e.target;this.open&&(t===this.popupElement||t.matches(`[role^="menuitem"], [role="option"]`))&&(this.open=!1)}),i=Us(e,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e;t===`Escape`&&!(i||a||n||r)&&(e.preventDefault(),e.stopPropagation(),this.open=!1)});this.#n=()=>{r(),i()}}detachPopupElement(){this.#n?.(),this.#n=void 0,this.popupElement&&this.viewportResizeObserver.unobserve(this.popupElement),this.anchorElement.getAttribute(`aria-controls`)===this.id&&this.anchorElement.removeAttribute(`aria-controls`),this.popupElement=void 0,this.contentElement=void 0}get isDisabled(){return this.anchorElement.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.anchorElement.matches(`[aria-readonly="true"]`)}checkPosition(){if(!this.popupElement)return;let e=this.contentElement??this.popupElement?.querySelector(`.content`)??null;if(!e)return;let t=this.positionBaseElement.getBoundingClientRect(),n={width:window.innerWidth,height:window.innerHeight},r={top:Math.max(t.top,0),left:Math.max(t.left,0),right:Math.min(t.right,n.width),bottom:Math.min(t.bottom,n.height),width:0,height:0};r.width=Math.max(0,r.right-r.left),r.height=Math.max(0,r.bottom-r.top);let{maxHeight:i,maxWidth:a}=e.style;e.style.maxHeight=``,e.style.maxWidth=``;let{scrollHeight:o,scrollWidth:s}=e;e.style.maxHeight=i,e.style.maxWidth=a;let c=r.top-8,l=n.height-r.bottom-8,{position:u}=this,d;Hd()&&(u.endsWith(`-left`)?u=u.replace(`-left`,`-right`):u.endsWith(`-right`)&&(u=u.replace(`-right`,`-left`)),u.startsWith(`left-`)?u=u.replace(`left-`,`right-`):u.startsWith(`right-`)&&(u=u.replace(`right-`,`left-`))),u.startsWith(`bottom-`)&&o>l&&(c>l?(u=u.replace(`bottom-`,`top-`),d=c):d=l),u.endsWith(`-left`)&&r.left+s>n.width-8&&(u=u.replace(`-left`,`-right`)),u.endsWith(`-right`)&&r.right-s<8&&(u=u.replace(`-right`,`-left`));let f={inset:[u.startsWith(`bottom-`)?`${Math.round(r.bottom)}px`:u.endsWith(`-top`)?`${Math.round(r.top)}px`:`auto`,u.startsWith(`left-`)?`${Math.round(n.width-r.left)}px`:u.endsWith(`-right`)?`${Math.round(n.width-r.right)}px`:`auto`,u.startsWith(`top-`)?`${Math.round(n.height-r.top)}px`:u.endsWith(`-bottom`)?`${Math.round(n.height-r.bottom)}px`:`auto`,u.startsWith(`right-`)?`${Math.round(r.right)}px`:u.endsWith(`-left`)?`${Math.round(r.left)}px`:`auto`].join(` `),zIndex:1e3,minWidth:`${Math.round(r.width)}px`,maxWidth:u.endsWith(`-left`)?`${Math.round(n.width-r.left-8)}px`:`${Math.round(r.right-8)}px`,height:d?`${Math.round(d)}px`:void 0};(f.inset!==this.style.inset||f.zIndex!==this.style.zIndex||f.minWidth!==this.style.minWidth||f.maxWidth!==this.style.maxWidth||f.height!==this.style.height)&&(this.style=f)}async hideImmediately(){this.popupElement&&(this.popupElement.hidden=!0),this.open=!1,await vf(50),this.popupElement&&(this.popupElement.hidden=!1)}destroy(){this.detachPopupElement(),this.intersectionObserver?.disconnect(),this.resizeObserver?.disconnect(),this.viewportResizeObserver?.disconnect(),this._rafId&&cancelAnimationFrame(this._rafId)}},Lf=(...e)=>new If(...e);function Rf(e,t){var n=W();Ac(L(n),()=>t.children??br),G(e,n)}var zf=Symbol(`sui-modal-retainer`),Bf=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`dialog`,`class`,`role`,`showBackdrop`,`lightDismiss`,`escapeDismiss`,`keepContent`,`restoreFocus`,`children`,`extraContent`,`onOpening`,`onOpen`,`onClosing`,`onOk`,`onCancel`,`onClose`]),Vf=U(`<dialog><!> <!></dialog>`),Hf={hash:`svelte-1yio8qw`,code:`dialog.svelte-1yio8qw {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-1yio8qw::backdrop {background:transparent;}dialog.backdrop.svelte-1yio8qw {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-1yio8qw {transition-duration:50ms;opacity:1;}dialog.svelte-1yio8qw:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-1yio8qw {transition-duration:1ms !important;}dialog.svelte-1yio8qw:not(.active) {pointer-events:none !important;}dialog.svelte-1yio8qw:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}`};function Uf(e,t){O(t,!0),J(e,Hf);let n=e=>{var n=W(),l=L(n),u=e=>{var n=Vf(),l=({target:e})=>{i()&&s()&&e?.matches(`dialog`)&&(i(i().returnValue=`cancel`,!0),r(!1))},u=e=>{e.preventDefault(),i()&&c()&&(i(i().returnValue=`cancel`,!0),r(!1))};bl(n,()=>({tabindex:`-1`,...d,inert:!H(m),role:a(),class:`sui modal ${t.class??``}`,onclick:l,oncancel:u,[ul]:{backdrop:o(),open:H(m),active:H(h)}}),void 0,void 0,void 0,`svelte-1yio8qw`);var f=I(n);Ac(f,()=>t.extraContent??br),Ac(z(f,2),()=>t.children??br),D(n),Ol(n,e=>i(e),()=>i()),G(e,n)};q(l,e=>{H(y)&&e(u)}),G(e,n)},r=X(t,`open`,15,!1),i=X(t,`dialog`,15),a=X(t,`role`,3,`dialog`),o=X(t,`showBackdrop`,3,!1),s=X(t,`lightDismiss`,3,!1),c=X(t,`escapeDismiss`,3,!0),l=X(t,`keepContent`,3,!1),u=X(t,`restoreFocus`,3,!0),d=Al(t,Bf),f=()=>{i()?.focus()},p=e=>{i()&&(i(i().returnValue=e,!0),r(!1))},m=P(!1),h=P(!1),g=P(!1),_=P(0),v=zi(zf);Bi(zf,{retain:()=>{Ds(()=>{F(_,H(_)+1)})},release:()=>{Ds(()=>{F(_,H(_)-1)})}});let y=N(()=>l()||H(g)||H(_)>0),b=!1,x=0,S,C,w=()=>{let e=S;S=void 0,!(!u()||!e)&&(C=window.setTimeout(()=>{let{activeElement:t}=document;e.isConnected&&(!t||t===document.body||i()?.contains(t))&&e.focus()}))},T=e=>Math.max(0,...e.split(`,`).map(e=>Number.parseFloat(e)||0))*1e3,E=async()=>{if(await ws(),!i())return;let{transitionDuration:e,transitionDelay:t}=getComputedStyle(i()),n=T(e)+T(t)+100,r=new AbortController,{signal:a}=r;i().addEventListener(`transitionend`,e=>{e.target===i()&&r.abort()},{signal:a});let o=window.setTimeout(()=>r.abort(),n);await new Promise(e=>{a.addEventListener(`abort`,()=>e(void 0))}),window.clearTimeout(o)},ee=async()=>{if(b)return;b=!0,x+=1;let e=x,{activeElement:n}=document;window.clearTimeout(C),S=n instanceof HTMLElement?n:void 0,t.onOpening?.(new CustomEvent(`Opening`)),F(g,!0),await ws(),!(e!==x||!i()||i().open)&&(i().showModal(),t.onOpen?.(new CustomEvent(`Open`)),i().getBoundingClientRect(),F(m,!0),await ws(),!(e!==x||!i())&&(i().contains(document.activeElement)||f(),await E(),e===x&&F(h,!0)))},te=async()=>{if(!b)return;b=!1,x+=1;let e=x,n=H(m),r=i()?.returnValue??``;t.onClosing?.(new CustomEvent(`Closing`)),i()?.open&&(document.body.inert=!0,i().close(),document.body.inert=!1),w(),F(h,!1),F(m,!1),n&&await E(),e===x&&(F(g,!1),r===`ok`&&t.onOk?.(new CustomEvent(`Ok`)),r===`cancel`&&t.onCancel?.(new CustomEvent(`Cancel`)),t.onClose?.(new CustomEvent(`Close`,{detail:{returnValue:r}})),i()&&i(i().returnValue=``,!0))},ne=Vi();return Nl(()=>{let e=oc(Rf,{target:document.querySelector(`.sui.app-shell`)??document.body,props:{children:n},context:ne});return()=>{window.clearTimeout(C),i()?.close(),uc(e)}}),B(()=>{r()?ee():te()}),B(()=>{if(H(g))return v?.retain(),()=>{v?.release()}}),k({focus:f,close:p})}var Wf=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`hovered`,`content`,`class`,`showBackdrop`,`anchor`,`position`,`positionBaseElement`,`parentDialogElement`,`touchOptimized`,`children`,`onOpen`]),Gf=U(`<div role="none"><!></div>`),Kf={hash:`svelte-1niynd`,code:`.content.svelte-1niynd {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-1niynd {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-1niynd .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-1niynd {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-1niynd .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.tree.svelte-1niynd {border-width:var(--sui-tree-border-width, 1px);border-style:var(--sui-tree-border-style, solid);border-color:var(--sui-tree-border-color, var(--sui-secondary-border-color));border-radius:var(--sui-tree-border-radius, 4px);padding:var(--sui-tree-padding, 4px);}.content.tree.svelte-1niynd .sui.tree {margin:0;border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.combobox.svelte-1niynd {display:flex;flex-direction:column;overflow:hidden;}.content.touch.svelte-1niynd {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-1niynd {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-1niynd {transform:scale(90%);}.content.touch.combobox.svelte-1niynd .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-1niynd {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-1niynd {transition-duration:300ms;opacity:0;transform:translateY(-8px);}`};function qf(e,t){O(t,!0),J(e,Kf);let n=e=>{var n=Gf();let o,s;Ac(I(n),()=>t.children??br),D(n),Ol(n,e=>a(e),()=>a()),V(()=>{Y(n,`hidden`,!r()),o=el(n,1,`content ${t.class??``} ${H(m)??``}`,`svelte-1niynd`,o,{touch:H(_)}),s=nl(n,``,s,{inset:H(h)?.style.inset,"z-index":H(h)?.style.zIndex,"min-width":H(h)?.style.minWidth,"max-width":H(h)?.style.maxWidth,"max-height":H(h)?.style.height,visibility:H(h)?.style.inset?void 0:`hidden`})}),Ws(`mouseenter`,n,()=>{i(!0),l()&&window.clearTimeout(g)}),Ws(`mouseleave`,n,()=>{i(!1),l()&&(g=window.setTimeout(()=>{r(!1)},200))}),G(e,n)},r=X(t,`open`,15,!1),i=X(t,`hovered`,15,!1),a=X(t,`content`,15,void 0),o=X(t,`showBackdrop`,3,void 0),s=X(t,`position`,3,`bottom-left`),c=X(t,`positionBaseElement`,3,void 0),l=X(t,`parentDialogElement`,3,void 0),u=X(t,`touchOptimized`,3,!1),d=Al(t,Wf),f=P(void 0),p=P(!1),m=P(void 0),h=P(void 0),g=0;B(()=>{H(h)&&r(H(h).open)}),B(()=>{l()&&!H(f)&&a()&&(F(f,l()),H(f).append(a()))}),B(()=>{t.anchor&&!H(h)&&(F(h,Lf(t.anchor,void 0,s(),c()),!0),F(m,t.anchor.getAttribute(`aria-haspopup`)??void 0,!0))}),B(()=>{if(H(h)&&H(f)&&a())return H(h).attachPopupElement(H(f),a()),()=>{H(h)?.detachPopupElement()}}),B(()=>{r()&&H(f)&&H(h)?.checkPosition()});let _=N(()=>u()&&H(p));Nl(()=>(F(p,globalThis.matchMedia(`(pointer: coarse)`).matches,!0),()=>{H(h)?.destroy?.(),globalThis.clearTimeout(g)}));var v=W(),y=L(v),b=e=>{n(e)},x=e=>{{let i=N(()=>o()??H(_));Uf(e,Ml(()=>d,{role:`none`,class:`popup`,get showBackdrop(){return H(i)},lightDismiss:!0,onOpen:async e=>{if(t.onOpen?.(e),await vf(100),!a())return;let n=a().querySelector(`[tabindex="0"]:not([aria-disabled="true"])`)??a().querySelector(`[tabindex]:not([aria-disabled="true"])`);n?n.focus():(a(a().tabIndex=-1,!0),a().focus())},get dialog(){return H(f)},set dialog(e){F(f,e,!0)},get open(){return r()},set open(e){r(e)},children:(e,t)=>{n(e)},$$slots:{default:!0}}))}};q(y,e=>{l()?e(b):e(x,-1)}),G(e,v),k()}var Jf=new Set(`$$slots.$$events.$$legacy.element.class.type.role.name.value.valueType.hidden.disabled.readonly.pressed.keyShortcuts.label.labelDir.lines.variant.size.iconic.pill.flex.popupPosition.showPopupBackdrop.children.startIcon.endIcon.popup`.split(`.`)),Yf=U(`<span role="none" class="label svelte-2k4xxn"><!></span>`),Xf=U(`<!> <!>`,1),Zf=U(`<button><!> <!> <!></button> <!>`,1),Qf={hash:`svelte-2k4xxn`,code:`button.svelte-2k4xxn {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-2k4xxn {display:none !important;}button.svelte-2k4xxn:not(:disabled):focus-visible {z-index:1;}button.svelte-2k4xxn:is(.primary:where(.svelte-2k4xxn), .secondary:where(.svelte-2k4xxn), .tertiary:where(.svelte-2k4xxn), .ghost:where(.svelte-2k4xxn)) {justify-content:center;border-width:1px;}button.svelte-2k4xxn:is(.primary:where(.svelte-2k4xxn), .secondary:where(.svelte-2k4xxn), .tertiary:where(.svelte-2k4xxn), .ghost:where(.svelte-2k4xxn)) .label:where(.svelte-2k4xxn):only-child {padding:0 4px;}button.primary.svelte-2k4xxn {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-2k4xxn:is(:where(.svelte-2k4xxn):hover, :where(.svelte-2k4xxn):focus-visible, [aria-expanded=true]:where(.svelte-2k4xxn)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-2k4xxn:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-2k4xxn {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-2k4xxn:is(:where(.svelte-2k4xxn):hover, :where(.svelte-2k4xxn):focus-visible, [aria-expanded=true]:where(.svelte-2k4xxn)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-2k4xxn:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-2k4xxn {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-2k4xxn {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-2k4xxn:is(:where(.svelte-2k4xxn):hover, :where(.svelte-2k4xxn):focus-visible, [aria-expanded=true]:where(.svelte-2k4xxn)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-2k4xxn:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-2k4xxn {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-2k4xxn {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-2k4xxn:is(:where(.svelte-2k4xxn):hover, :where(.svelte-2k4xxn):focus-visible, [aria-expanded=true]:where(.svelte-2k4xxn)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-2k4xxn:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-2k4xxn {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-2k4xxn {margin:0;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-2k4xxn .label:where(.svelte-2k4xxn) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links='true'] button.link.svelte-2k4xxn .label:where(.svelte-2k4xxn) {text-decoration:underline;}button.small.svelte-2k4xxn {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-2k4xxn .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-2k4xxn {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-2k4xxn {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-2k4xxn {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-2k4xxn:not([hidden]) {display:inline-flex;flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-2k4xxn {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-2k4xxn {background-color:var(--sui-error-background-color);}button.svelte-2k4xxn .label:where(.svelte-2k4xxn) {padding:0 4px;}button.svelte-2k4xxn > * {pointer-events:none;}button.svelte-2k4xxn :has([slot=start-icon] + [slot=end-icon]) {gap:0;}`};function $f(e,t){O(t,!0),J(e,Qf);let n=X(t,`element`,15),r=X(t,`class`,3,``),i=X(t,`type`,3,`button`),a=X(t,`role`,3,`button`),o=X(t,`name`,3,void 0),s=X(t,`value`,3,void 0),c=X(t,`valueType`,19,()=>typeof s()),l=X(t,`hidden`,3,!1),u=X(t,`disabled`,3,!1),d=X(t,`readonly`,3,!1),f=X(t,`pressed`,3,void 0),p=X(t,`keyShortcuts`,3,void 0),m=X(t,`label`,3,``),h=X(t,`labelDir`,3,void 0),g=X(t,`lines`,3,1),_=X(t,`variant`,3,void 0),v=X(t,`size`,3,`medium`),y=X(t,`iconic`,3,!1),b=X(t,`pill`,3,!1),x=X(t,`flex`,3,!1),S=X(t,`popupPosition`,3,`bottom-left`),C=X(t,`showPopupBackdrop`,3,!1),w=Al(t,Jf);var T=Zf(),E=L(T);bl(E,()=>({...w,class:`sui button ${_()??``} ${v()??``} ${r()??``}`,type:i(),name:o(),value:s(),hidden:l(),disabled:u(),role:a(),"aria-hidden":l(),"aria-disabled":u(),"aria-readonly":d(),"aria-pressed":f(),"data-type":c(),"data-name":o(),"data-label":m(),"data-value":s(),[ul]:{iconic:y(),pill:b(),flex:x()}}),void 0,void 0,void 0,`svelte-2k4xxn`);var ee=I(E);Ac(ee,()=>t.startIcon??br);var te=z(ee,2),ne=e=>{var n=W(),r=L(n),i=e=>{var t=Yf();_f(I(t),{get lines(){return g()},children:(e,t)=>{mi();var n=ec();V(()=>K(n,m())),G(e,n)},$$slots:{default:!0}}),D(t),V(()=>{Y(t,`dir`,h()),t.dir=t.dir}),G(e,t)},a=e=>{var n=Yf();Ac(I(n),()=>t.children??br),D(n),G(e,n)};q(r,e=>{m()?e(i):e(a,-1)}),G(e,n)},re=e=>{var n=Xf(),r=L(n),i=e=>{var t=Yf();_f(I(t),{get lines(){return g()},children:(e,t)=>{mi();var n=ec();V(()=>K(n,m())),G(e,n)},$$slots:{default:!0}}),D(t),V(()=>{Y(t,`dir`,h()),t.dir=t.dir}),G(e,t)};q(r,e=>{m()&&e(i)}),Ac(z(r,2),()=>t.children??br),G(e,n)};q(te,e=>{_()===`link`?e(ne):e(re,-1)}),Ac(z(te,2),()=>t.endIcon??br),D(E),Ol(E,e=>n(e),()=>n()),Gc(E,()=>p()&&mf(p()));var ie=z(E,2),ae=e=>{qf(e,{get anchor(){return n()},get position(){return S()},get showBackdrop(){return C()},touchOptimized:!0,children:(e,n)=>{var r=W();Ac(L(r),()=>t.popup),G(e,r)},$$slots:{default:!0}})};q(ie,e=>{t.popup&&e(ae)}),G(e,T),k()}var ep=U(`<div role="none"><!></div>`),tp=U(`<div role="none"><div role="alert" class="message svelte-1b8y4qi"><!> <!></div> <!></div>`),np={hash:`svelte-1b8y4qi`,code:`.infobar.svelte-1b8y4qi {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-1b8y4qi {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-1b8y4qi {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-1b8y4qi {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-1b8y4qi {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-1b8y4qi {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, start);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 6px);}.message.svelte-1b8y4qi button {font-size:inherit !important;}.message.svelte-1b8y4qi .icon {font-size:16px; /* !hardcoded */}`};function rp(e,t){O(t,!0),J(e,np);let n=X(t,`show`,15,!0),r=X(t,`dismissible`,3,!0),i=X(t,`status`,3,`info`),a=X(t,`ariaLive`,3,`polite`),o=X(t,`children`,3,void 0),s=X(t,`icon`,3,void 0);var c=W(),l=L(c),u=e=>{var c=tp(),l=I(c),u=I(l),d=e=>{var t=W();Ac(L(t),s),G(e,t)},f=e=>{{let t=N(()=>i()===`success`?`check_circle`:i());Rl(e,{get name(){return H(t)}})}};q(u,e=>{s()?e(d):e(f,-1)}),Ac(z(u,2),()=>o()??br),D(l);var p=z(l,2),m=e=>{var r=ep(),i=I(r);{let e=N(()=>Z(`_sui.dismiss`));$f(i,{iconic:!0,size:`small`,variant:`ghost`,get"aria-label"(){return H(e)},onclick:()=>{n(!1),t.onDismiss?.()},children:(e,t)=>{Rl(e,{name:`close`})},$$slots:{default:!0}})}D(r),G(e,r)};q(p,e=>{r()&&e(m)}),D(c),V(()=>{el(c,1,`infobar ${i()??``}`,`svelte-1b8y4qi`),Y(l,`aria-live`,a())}),G(e,c)};q(l,e=>{n()&&e(u)}),G(e,c),k()}var ip=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),ap=U(`<div><!></div>`),op={hash:`svelte-1iykgjh`,code:`.bottom-navigation.svelte-1iykgjh {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-1iykgjh:is([inert]:where(.svelte-1iykgjh), [hidden]:where(.svelte-1iykgjh)) {display:none;}.bottom-navigation.svelte-1iykgjh .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}`};function sp(e,t){J(e,op);let n=Al(t,ip);var r=ap();bl(r,()=>({role:`none`,class:`sui bottom-navigation ${t.class??``}`,...n}),void 0,void 0,void 0,`svelte-1iykgjh`),Ac(I(r),()=>t.children??br),D(r),G(e,r)}var cp=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`ariaLabel`,`children`]),lp=U(`<div><!></div>`),up={hash:`svelte-12uu615`,code:`.button-group.svelte-12uu615 {flex:none;display:inline-flex;align-items:center;}`};function dp(e,t){J(e,up);let n=X(t,`ariaLabel`,3,void 0),r=Al(t,cp);var i=lp();bl(i,()=>({...r,role:`group`,class:`sui button-group ${t.class??``}`,"aria-label":n()}),void 0,void 0,void 0,`svelte-12uu615`),Ac(I(i),()=>t.children??br),D(i),G(e,i)}var fp=U(`<div role="none" class="sui floating-action-button-wrapper svelte-u065az"><!></div>`),pp={hash:`svelte-u065az`,code:`.floating-action-button-wrapper.svelte-u065az {display:contents;}
|
||
@media (width < 768px) {.floating-action-button-wrapper.svelte-u065az {display:block;position:fixed;inset-inline-end:16px;inset-block-end:72px;z-index:100;}.floating-action-button-wrapper.svelte-u065az button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-u065az button .icon {font-size:32px;}
|
||
}`};function mp(e,t){J(e,pp);let n=X(t,`children`,3,void 0);var r=fp();Ac(I(r),()=>n()??br),D(r),G(e,r)}var hp=Symbol(`sui-option-registry`),gp=class{#e=P(!1);get expanded(){return H(this.#e)}set expanded(e){F(this.#e,e,!0)}#t=P([]);get count(){return H(this.#t).length}get selectedEntry(){return H(this.#t).find(e=>e.selected)}register(e){return F(this.#t,[...H(this.#t),e]),()=>{F(this.#t,H(this.#t).filter(t=>t!==e))}}find(e){return H(this.#t).find(t=>t.value===e)}selectOnly(e){H(this.#t).forEach(t=>{let n=t.value===e;t.selected!==n&&(t.selected=n)})}},_p=()=>Bi(hp,new gp),vp=()=>zi(hp),yp=e=>{let{type:t=`string`,name:n,label:r}=e.dataset,{value:i}=e.dataset;return t===`number`?(i=Number(i),Number.isNaN(i)&&(i=null)):t===`boolean`?i=i===`true`:t===`string`&&(i=i?String(i):``),{target:e,type:t,name:n,label:r,value:i}},bp=/\p{Diacritic}/gu,xp=e=>(e=e.trim(),e?e.normalize(`NFD`).replace(bp,``).toLocaleLowerCase():``),Sp={grid:{orientation:`vertical`,childRoles:[`row`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0,controlsPanel:!1,rovingTabStop:`selected`},listbox:{orientation:`vertical`,childRoles:[`option`],childSelectedAttr:`aria-selected`,focusChild:!1,selectFirst:!1,controlsPanel:!1,rovingTabStop:`selected`},menu:{orientation:`vertical`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1,controlsPanel:!1,rovingTabStop:`first`},menubar:{orientation:`horizontal`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1,controlsPanel:!1,rovingTabStop:`first`},radiogroup:{orientation:`horizontal`,childRoles:[`radio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1,controlsPanel:!1,rovingTabStop:`selected`},tablist:{orientation:`horizontal`,childRoles:[`tab`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0,controlsPanel:!0,rovingTabStop:`selected`}},Cp=`a[href], button, input, select, textarea, summary, [tabindex]`,wp=(e,t)=>{let n=[...document.querySelectorAll(Cp)].filter(t=>t===e||t.tabIndex>=0&&!t.matches(`:disabled, [aria-disabled="true"], [hidden], [inert], [inert] *`)),r=n.indexOf(e);if(r===-1)return;let i=t?-1:1;for(let e=r+i;e>=0&&e<n.length;e+=i)if(n[e].getClientRects().length){n[e].focus();return}},Tp=e=>{let t=e;for(;t;){if(t.id){let e=document.querySelector(`[aria-haspopup="menu"][aria-controls="${CSS.escape(t.id)}"]`);if(e)return e}t=t.parentElement}return null},Ep=class{#e=void 0;#t=new WeakMap;#n=new WeakMap;#r(e){let t=e.dataset.searchValue??e.dataset.label??e.querySelector(`.label`)?.textContent??e.textContent,n=this.#t.get(e);if(n?.raw===t)return n.normalized;let r=xp(t);return this.#t.set(e,{raw:t,normalized:r}),r}constructor(e,{clickToSelect:t=!0}={}){e.dispatchEvent(new CustomEvent(`Initializing`)),this.parent=e,this.role=e.getAttribute(`role`),this.multi=this.parent.getAttribute(`aria-multiselectable`)===`true`,this.id=Af(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=t,this._onClick=e=>{this.onClick(e)},this._onKeyDown=e=>{this.onKeyDown(e)};let{orientation:n,childRoles:r,childSelectedAttr:i,focusChild:a,selectFirst:o,controlsPanel:s,rovingTabStop:c}=Sp[this.role];this.orientation=this.grid?`horizontal`:this.parent.getAttribute(`aria-orientation`)??n,this.childRoles=r,this.childSelectedAttr=i,this.childSelectedProp=i.replace(`aria-`,``),this.focusChild=a,this.selectFirst=o,this.controlsPanel=s,this.rovingTabStop=c,this.parent.tabIndex=a?-1:0,this.observer=new globalThis.MutationObserver(()=>{this.#e=void 0}),this.observer.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`aria-disabled`,`aria-hidden`]}),(async()=>{await vf(100),this.activate()})()}activate(){let{parent:e,allMembers:t,selected:n}=this;t.forEach((e,t)=>{let r=e.getAttribute(this.childSelectedAttr)===`true`||(n?e===n:this.selectFirst&&t===0),i=this.controlsPanel?document.querySelector(`#${e.getAttribute(`aria-controls`)}`):null;e.id||=`${this.id}-item-${t+1}`,e.setAttribute(this.childSelectedAttr,String(r)),i&&(i.inert=!r,i.setAttribute(`aria-labelledby`,e.id),i.setAttribute(`aria-hidden`,String(!r)),r&&globalThis.setTimeout(()=>{try{i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{i.scrollIntoView(!0)}},300))}),this.updateTabStop(),e.addEventListener(`click`,this._onClick),e.addEventListener(`keydown`,this._onKeyDown),e.dispatchEvent(new CustomEvent(`Initialized`))}updateTabStop(){let{allMembers:e,activeMembers:t}=this;if(!this.focusChild){e.forEach(e=>{e.tabIndex=-1});return}let n=this.rovingTabStop===`selected`?t.find(e=>e.getAttribute(this.childSelectedAttr)===`true`)??t[0]:t[0];e.forEach(e=>{e.tabIndex=e===n?0:-1})}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(`,`)}get#i(){if(this.observer.takeRecords().length&&(this.#e=void 0),!this.#e){let e=[...this.parent.querySelectorAll(this.selector)];this.#e={all:e,active:e.filter(e=>!e.matches(`[aria-disabled="true"], [aria-hidden="true"]`))}}return this.#e}get allMembers(){return this.#i.all}get activeMembers(){return this.#i.active}get opener(){return Tp(this.parent)}get parentMenuItem(){let{opener:e}=this;return e?.matches(`[role^="menuitem"]`)?e:null}closeMenuChain(){let{opener:e}=this,t=e,n=null;for(let e=0;e<10&&t;e+=1){n=t,t.getAttribute(`aria-expanded`)===`true`&&t.click();let e=t.closest(`[role="menu"], [role="menubar"]`);t=e?Tp(e):null}return n}async leaveMenu(e){let t=this.closeMenuChain();t&&(t.focus(),await vf(50),wp(t,e))}async enterSubmenu(e){let t=e.getAttribute(`aria-controls`);if(!t)return;e.getAttribute(`aria-expanded`)!==`true`&&e.click();let n=document.getElementById(t);for(let e=0;e<20;e+=1){let e=[...n?.querySelectorAll(this.selector)??[]].find(e=>!e.matches(`[aria-disabled="true"], [aria-hidden="true"]`));if(e?.focus(),e&&document.activeElement===e)return;await vf(20)}}leaveSubmenu(e){e.getAttribute(`aria-expanded`)===`true`&&e.click(),e.focus()}get selected(){return this.activeMembers.find(e=>e.getAttribute(this.childSelectedAttr)===`true`)}get isDisabled(){return this.parent.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.parent.matches(`[aria-readonly="true"]`)}get grid(){return this.role===`grid`||this.role===`listbox`&&this.parent.matches(`.grid`)}selectTarget(e,t){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}let n=t.getAttribute(`role`),r=t.closest(this.parentGroupSelector),i=e.type===`click`,a=e.type===`keydown`&&e.key===` `,o=[],s=!1;this.activeMembers.forEach(c=>{let l=c.getAttribute(`role`),u=l===`menuitemcheckbox`,d=l===`menuitemradio`;if((u||d)&&(l!==n||c.closest(this.parentGroupSelector)!==r))return;let f=u||this.multi,p=d||!f,m=c===t,h=c.getAttribute(this.childSelectedAttr)===`true`,g=this.controlsPanel?c.getAttribute(`aria-controls`):null,_=g?document.getElementById(g):null;o.push(c),s||=m,f&&m&&(i||a)&&(c.setAttribute(this.childSelectedAttr,String(!h)),c.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:!h}})),h||c.dispatchEvent(new CustomEvent(`Select`))),p&&h!==m&&(!d||a||i)&&(c.setAttribute(this.childSelectedAttr,String(m)),c.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:m}})),m&&(e.type===`keydown`&&l===`radio`&&c.click(),c.dispatchEvent(new CustomEvent(`Select`)))),this.focusChild||(c.classList.toggle(`focused`,m),m&&c.dispatchEvent(new CustomEvent(`Focus`))),_&&(_.inert=!m,_.setAttribute(`aria-hidden`,String(!m)),m&&globalThis.setTimeout(()=>{try{_.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{_.scrollIntoView(!0)}},300)),m&&(this.parent.setAttribute(`aria-activedescendant`,c.id),globalThis.setTimeout(()=>{try{c.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{c.scrollIntoView(!0)}},300))}),this.focusChild&&globalThis.requestAnimationFrame(()=>{o.forEach(e=>{e.tabIndex=e===t?0:-1}),s&&(t.focus(),t.dispatchEvent(new CustomEvent(`Focus`)))}),this.parent.dispatchEvent(new CustomEvent(`Change`,{detail:yp(t)}))}onClick(e){let t=e.target,n=t.matches(this.selector)?t:t.closest(this.selector);!n||e.button!==0||!this.clickToSelect||this.selectTarget(e,n)}onKeyDown(e){let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e,o=i||a||n||r,s=this.childRoles.includes(`menuitem`);if(t===`Tab`&&s&&!n&&!r&&!a){e.preventDefault(),this.leaveMenu(i);return}if(o)return;let c=e.target,{allMembers:l,activeMembers:u}=this,d=(()=>{if(!this.focusChild)return u.find(e=>e.matches(`.focused`));if(c.matches(this.selector))return c})();if([`Enter`,` `,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(t)&&e.preventDefault(),t===`Enter`){d?.click();return}if(t===` `){d&&this.selectTarget(e,d);return}if(t===`Escape`&&s){let{parentMenuItem:t}=this;if(t){e.preventDefault(),e.stopPropagation(),this.leaveSubmenu(t);return}}if(this.orientation===`vertical`&&s){let e=Hd()?`ArrowLeft`:`ArrowRight`,n=Hd()?`ArrowRight`:`ArrowLeft`;if(t===e&&d?.getAttribute(`aria-haspopup`)===`menu`){this.enterSubmenu(d);return}if(t===n){let{parentMenuItem:e}=this;if(e){this.leaveSubmenu(e);return}}}let f,p;if(this.grid){let e=Math.floor(this.parent.clientWidth/u[0].clientWidth),n=Hd();f=d?l.indexOf(d):-1,t===`ArrowUp`&&f>0&&(p=l[f-e]),t===`ArrowDown`&&f<l.length-1&&(p=l[f+e]),t===`ArrowLeft`&&f>0&&(p=l[f+(n?1:-1)]),t===`ArrowRight`&&f<l.length-1&&(p=l[f+(n?-1:1)]),p?.matches(`[aria-disabled="true"], [aria-hidden="true"]`)&&(p=void 0)}else{f=d?u.indexOf(d):-1;let e=Hd(),n=this.orientation===`horizontal`?e?`ArrowRight`:`ArrowLeft`:`ArrowUp`,r=this.orientation===`horizontal`?e?`ArrowLeft`:`ArrowRight`:`ArrowDown`;t===n&&(f>0&&(p=u[f-1]),f<=0&&(p=u[u.length-1])),t===r&&(f<u.length-1&&(p=u[f+1]),f===u.length-1&&([p]=u))}p&&p!==d&&this.selectTarget(e,p)}destroy(){this.observer.disconnect(),this.parent.removeEventListener(`click`,this._onClick),this.parent.removeEventListener(`keydown`,this._onKeyDown)}onUpdate({searchTerms:e}){let t=xp(e),n=t?t.split(/\s+/):[],{allMembers:r,parent:i}=this,a=r.map(e=>{let t=this.#r(e),r=!n.every(e=>t.includes(e));return this.#n.get(e)!==r&&(this.#n.set(e,r),e.dispatchEvent(new CustomEvent(`Toggle`,{detail:{hidden:r}}))),r}).filter(e=>!e).length;i.dispatchEvent(new CustomEvent(`Filter`,{detail:{matched:a,total:r.length}}))}},Dp=e=>t=>{let n=typeof e==`function`,r=new Ep(t,n?e():e);return n&&B(()=>{r.onUpdate(e())}),()=>{r.destroy()}},Op=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`ariaLabel`,`children`]),kp=U(`<div><div role="none" class="inner svelte-1g8yx0s"><!></div></div>`),Ap={hash:`svelte-1g8yx0s`,code:`.select-button-group.svelte-1g8yx0s {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-1g8yx0s:focus-visible {outline-width:0 !important;}.select-button-group.svelte-1g8yx0s button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-1g8yx0s button:first-child {border-start-start-radius:4px !important;border-end-start-radius:4px !important;}.select-button-group.svelte-1g8yx0s button:not(:first-child) {border-inline-start-width:0;}.select-button-group.svelte-1g8yx0s button:last-child {border-start-end-radius:4px !important;border-end-end-radius:4px !important;}.select-button-group.svelte-1g8yx0s button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-1g8yx0s [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-1g8yx0s [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-1g8yx0s [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-1g8yx0s {display:contents;}`};function jp(e,t){O(t,!0),J(e,Ap);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`readonly`,3,!1),a=X(t,`required`,3,!1),o=X(t,`invalid`,3,!1),s=X(t,`ariaLabel`,3,void 0),c=Al(t,Op);var l=kp();bl(l,()=>({...c,role:`radiogroup`,class:`sui select-button-group ${t.class??``}`,hidden:n(),tabindex:`-1`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-label":s()}),void 0,void 0,void 0,`svelte-1g8yx0s`);var u=I(l);Ac(I(u),()=>t.children??br),D(u),D(l),Gc(l,Dp),V(()=>u.inert=r()),G(e,l),k()}var Mp=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`class`,`onChange`]);function Np(e,t){O(t,!0);let n=X(t,`selected`,15,!1),r=Al(t,Mp);$f(e,Ml(()=>r,{role:`radio`,get class(){return`sui select-button ${t.class??``}`},get"aria-checked"(){return n()},onChange:e=>{n(e.detail.selected),t.onChange?.(e)}})),k()}var Pp=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`popupPosition`,`popupPositionBaseElement`,`showPopupBackdrop`,`label`,`variant`,`size`,`iconic`,`children`,`startIcon`,`endIcon`,`popup`]),Fp=U(`<!> <!>`,1);function Ip(e,t){O(t,!0);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`popupPosition`,3,`bottom-left`),a=X(t,`popupPositionBaseElement`,3,void 0),o=X(t,`showPopupBackdrop`,3,!1),s=X(t,`label`,3,``),c=X(t,`variant`,3,void 0),l=X(t,`size`,3,`medium`),u=X(t,`iconic`,3,!1),d=Al(t,Pp),f=P(void 0);var p={focus:()=>{H(f)?.focus()}},m=Fp(),h=L(m);return $f(h,Ml(()=>d,{get class(){return`sui menu-button ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get label(){return s()},get variant(){return c()},get size(){return l()},get iconic(){return u()},"aria-haspopup":`menu`,get element(){return H(f)},set element(e){F(f,e,!0)},startIcon:e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},children:e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)},endIcon:e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.endIcon),G(e,n)},a=e=>{Rl(e,{name:`more_vert`})},o=e=>{Rl(e,{name:`arrow_drop_down`,class:`small-arrow`})};q(r,e=>{t.endIcon?e(i):u()?e(a,1):e(o,-1)}),G(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),qf(z(h,2),{get anchor(){return H(f)},get position(){return i()},get positionBaseElement(){return a()},get showBackdrop(){return o()},children:(e,n)=>{var r=W();Ac(L(r),()=>t.popup??br),G(e,r)},$$slots:{default:!0}}),G(e,m),k(p)}var Lp=new Set([`$$slots`,`$$events`,`$$legacy`,`hidden`,`disabled`,`label`,`variant`,`size`,`popupPosition`,`showPopupBackdrop`,`chevronIcon`,`popup`]),Rp=U(`<div role="group" class="sui split-button svelte-1jwabg8"><!> <!></div>`),zp={hash:`svelte-1jwabg8`,code:`.split-button.svelte-1jwabg8 {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-1jwabg8 button {margin:0;}.split-button.svelte-1jwabg8 button.menu-button {border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0;aspect-ratio:3/4;}.split-button.svelte-1jwabg8 button:not(.menu-button) {border-start-end-radius:0;border-end-end-radius:0;}`};function Bp(e,t){O(t,!0),J(e,zp);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`label`,3,``),a=X(t,`variant`,3,void 0),o=X(t,`size`,3,`medium`),s=X(t,`popupPosition`,3,`bottom-left`),c=X(t,`showPopupBackdrop`,3,!1),l=Al(t,Lp),u=P(void 0);var d=Rp(),f=I(d);$f(f,Ml(()=>l,{get hidden(){return n()},get disabled(){return r()},get label(){return i()},get variant(){return a()},get size(){return o()}}));var p=z(f,2);{let e=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.chevronIcon),G(e,n)},a=e=>{Rl(e,{name:`arrow_drop_down`,class:`small-arrow`})};q(r,e=>{t.chevronIcon?e(i):e(a,-1)}),G(e,n)},i=e=>{var n=W();Ac(L(n),()=>t.popup??br),G(e,n)},l=N(()=>Z(`_sui.split_button.more_options`));Ip(p,{iconic:!0,get hidden(){return n()},get disabled(){return r()},get variant(){return a()},get size(){return o()},get"aria-label"(){return H(l)},get popupPosition(){return s()},get popupPositionBaseElement(){return H(u)},get showPopupBackdrop(){return c()},endIcon:e,popup:i,$$slots:{endIcon:!0,popup:!0}})}D(d),Ol(d,e=>F(u,e),()=>H(u)),V(e=>{Y(d,`hidden`,n()),Y(d,`aria-hidden`,n()),Y(d,`aria-disabled`,r()),Y(d,`aria-label`,e)},[()=>Z(`_sui.split_button.x_options`,{values:{name:i()}})]),G(e,d),k()}var eee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`orientation`,`ariaLabel`]),Vp=U(`<div></div>`),tee={hash:`svelte-atmyy1`,code:`.divider.svelte-atmyy1 {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-atmyy1 {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-atmyy1 {margin:0 8px;width:1px;height:100%;}`};function Hp(e,t){J(e,tee);let n=X(t,`hidden`,3,!1),r=X(t,`orientation`,3,`horizontal`),i=X(t,`ariaLabel`,3,void 0),a=Al(t,eee);var o=Vp();bl(o,()=>({...a,role:`separator`,class:`sui divider ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r(),"aria-label":i()}),void 0,void 0,void 0,`svelte-atmyy1`),G(e,o)}var nee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`flex`]),ree=U(`<div></div>`),Up={hash:`svelte-1n4x3kw`,code:`.spacer.flex.svelte-1n4x3kw:not([hidden]) {display:block;flex:auto;}.spacer.svelte-1n4x3kw:not(.flex) {width:8px;height:8px;}`};function Wp(e,t){J(e,Up);let n=X(t,`flex`,3,!1),r=Al(t,nee);var i=ree();bl(i,()=>({...r,role:`none`,class:`sui spacer ${t.class??``}`,[ul]:{flex:n()}}),void 0,void 0,void 0,`svelte-1n4x3kw`),G(e,i)}var Gp=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`ariaLabel`,`children`]),Kp=U(`<div><div role="none" class="inner svelte-x2onpr"><!></div></div>`),qp={hash:`svelte-x2onpr`,code:`.checkbox-group.svelte-x2onpr {display:inline-flex;}.checkbox-group.horizontal.svelte-x2onpr {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-x2onpr {gap:4px;flex-direction:column;}
|
||
@media (pointer: coarse) {.checkbox-group.vertical.svelte-x2onpr {gap:8px;}
|
||
}.inner.svelte-x2onpr {display:contents;}`};function iee(e,t){J(e,qp);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`orientation`,3,`horizontal`),a=X(t,`ariaLabel`,3,void 0),o=Al(t,Gp);var s=Kp();bl(s,()=>({...o,role:`group`,class:`sui checkbox-group ${t.class??``} ${i()??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-roledescription":`checkbox group`,"aria-label":a()}),void 0,void 0,void 0,`svelte-x2onpr`);var c=I(s);Ac(I(c),()=>t.children??br),D(c),D(s),V(()=>c.inert=r()),G(e,s)}var aee=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`name`,`value`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`label`,`ariaLabel`,`group`,`onChange`,`children`,`checkIcon`]),oee=U(`<label class="svelte-cwqhg1"><!></label>`),see=U(`<div role="none"><div role="none" class="inner svelte-cwqhg1"><!> <!></div></div>`),cee={hash:`svelte-cwqhg1`,code:`.checkbox.svelte-cwqhg1 {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.checkbox.svelte-cwqhg1:hover button {background-color:var(--sui-hover-background-color);}.checkbox.svelte-cwqhg1:hover button[aria-checked=true] {background-color:var(--sui-primary-accent-color-light);}.checkbox.svelte-cwqhg1:active button {background-color:var(--sui-active-background-color);}.checkbox.svelte-cwqhg1:active button[aria-checked=true] {background-color:var(--sui-primary-accent-color-dark);}.checkbox.svelte-cwqhg1 button {flex:none;align-items:center;justify-content:center;overflow:hidden;margin:0 !important;border-width:var(--sui-checkbox-border-width, 1.5px);border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-border-radius);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);color:var(--sui-primary-accent-text-color);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.checkbox.svelte-cwqhg1 button[aria-checked=true] {border-color:var(--sui-checkbox-border-color-checked, var(--sui-primary-accent-color));color:var(--sui-checkbox-foreground-color-checked, var(--sui-primary-accent-color-inverted));background-color:var(--sui-checkbox-background-color-checked, var(--sui-primary-accent-color));}.checkbox.svelte-cwqhg1 button[aria-invalid=true] {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);}.checkbox.svelte-cwqhg1 button[aria-checked=true][aria-invalid=true] {background-color:var(--sui-checkbox-background-color);}.checkbox.svelte-cwqhg1 button .icon {font-size:calc(var(--sui-checkbox-height) - 2px);}.checkbox.svelte-cwqhg1 label:where(.svelte-cwqhg1) {cursor:inherit;}.inner.svelte-cwqhg1 {display:contents;}`};function Jp(e,t){let n=tc();O(t,!0),J(e,cee);let r=X(t,`checked`,15),i=X(t,`name`,3,void 0),a=X(t,`value`,3,void 0),o=X(t,`hidden`,3,!1),s=X(t,`disabled`,3,!1),c=X(t,`readonly`,3,!1),l=X(t,`required`,3,!1),u=X(t,`invalid`,3,!1),d=X(t,`label`,3,void 0),f=X(t,`ariaLabel`,3,void 0),p=X(t,`group`,15),m=Al(t,aee),h=P(void 0),g=N(()=>r()===`mixed`);B(()=>{Array.isArray(p())&&(p().includes(a())?r()!==!0&&r(!0):r()!==!1&&r(!1))});var _=see();let v;var y=I(_),b=I(y);{let e=e=>{var n=W(),i=L(n),a=e=>{var n=W();Ac(L(n),()=>t.checkIcon),G(e,n)},o=e=>{Rl(e,{name:`remove`})},s=e=>{Rl(e,{name:`check`})};q(i,e=>{t.checkIcon?e(a):H(g)?e(o,1):r()&&e(s,2)}),G(e,n)},d=N(()=>f()||void 0),_=N(()=>f()?void 0:`${n}-label`);$f(b,Ml(()=>m,{role:`checkbox`,get id(){return n},get name(){return i()},get value(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get"aria-invalid"(){return u()},get"aria-checked"(){return r()},get"aria-label"(){return H(d)},get"aria-labelledby"(){return H(_)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!(s()||c())&&(r(H(g)?!0:!r()),Array.isArray(p())&&(r()?p().includes(a())||p([...p(),a()]):p().includes(a())&&p(p().filter(e=>e!==a()))),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:r()}})))},get element(){return H(h)},set element(e){F(h,e,!0)},startIcon:e,$$slots:{startIcon:!0}}))}var x=z(b,2),S=e=>{var r=oee(),i=I(r),a=e=>{var n=W();Ac(L(n),()=>t.children),G(e,n)},o=e=>{var t=ec();V(()=>K(t,d())),G(e,t)};q(i,e=>{t.children?e(a):e(o,-1)}),D(r),V(()=>Y(r,`id`,`${n}-label`)),G(e,r)};q(x,e=>{(t.children||d())&&e(S)}),D(y),D(_),V(()=>{v=el(_,1,`sui checkbox ${t.class??``}`,`svelte-cwqhg1`,v,{checked:r(),indeterminate:H(g),disabled:s(),readonly:c()}),Y(_,`hidden`,o()),y.inert=s()}),Gs(`click`,_,e=>{e.preventDefault(),e.stopPropagation(),e.target.matches(`button`)||H(h)?.click()}),G(e,_),k()}Ks([`click`]);var lee=new Set(`$$slots.$$events.$$legacy.open.value.title.role.size.class.showClose.showOk.showCancel.okLabel.okShortcuts.okDisabled.cancelLabel.cancelShortcuts.cancelDisabled.focusInput.children.header.headerExtra.footer.footerExtra.closeIcon.input`.split(`.`)),uee=U(`<div role="none" class="title svelte-142yikz"> </div> <!> <!> <!>`,1),dee=U(`<div role="none" class="header svelte-142yikz"><!></div>`),fee=U(`<!> <!> <!> <!>`,1),pee=U(`<div role="none" class="footer svelte-142yikz"><!></div>`),mee=U(`<div role="none"><!> <div role="none" class="body svelte-142yikz"><!></div> <!></div>`),hee={hash:`svelte-142yikz`,code:`.content.svelte-142yikz {position:relative;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--sui-dialog-content-border-radius, 4px);max-width:calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);background-color:var(--sui-dialog-content-background-color, var(--sui-secondary-background-color-translucent));box-shadow:var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));-webkit-backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));transition-property:transform;}dialog.open .content.svelte-142yikz {transition-duration:150ms;transform:scale(100%);}dialog:not(.open) .content.svelte-142yikz {transition-duration:300ms;transform:scale(90%);}.content.small.svelte-142yikz {width:var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));max-height:var(--sui-dialog-small-content-max-height, var(--sui-dialog-content-max-height, 400px));}
|
||
@media (max-height: 400px) {.content.small.svelte-142yikz {max-height:calc(100dvh - 32px);}
|
||
}.content.medium.svelte-142yikz {width:var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));max-height:var(--sui-dialog-medium-content-max-height, var(--sui-dialog-content-max-height, 600px));}
|
||
@media (max-height: 600px) {.content.medium.svelte-142yikz {max-height:calc(100dvh - 32px);}
|
||
}.content.large.svelte-142yikz {width:var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));max-height:var(--sui-dialog-large-content-max-height, var(--sui-dialog-content-max-height, 800px));}
|
||
@media (max-height: 800px) {.content.large.svelte-142yikz {max-height:calc(100dvh - 32px);}
|
||
}.content.x-large.svelte-142yikz {width:var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));max-height:var(--sui-dialog-x-large-content-max-height, var(--sui-dialog-content-max-height, 1000px));}
|
||
@media (max-height: 1000px) {.content.x-large.svelte-142yikz {max-height:calc(100dvh - 32px);}
|
||
}:is(.header.svelte-142yikz, .footer.svelte-142yikz) {display:flex;align-items:center;gap:4px;}.header.svelte-142yikz {box-sizing:content-box;margin:var(--sui-dialog-header-margin, 0 16px);border-width:var(--sui-dialog-header-border-width, 0 0 1px);border-color:var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));padding:var(--sui-dialog-header-padding, 16px 8px);height:var(--sui-dialog-header-height, 32px);}.header.svelte-142yikz .title:where(.svelte-142yikz) {font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-bold);}.footer.svelte-142yikz {margin:var(--sui-dialog-footer-margin, 0 24px 24px);}
|
||
@media (width < 768px) {.footer.svelte-142yikz {margin:var(--sui-dialog-footer-margin, 0 16px 16px);}
|
||
}.body.svelte-142yikz {overflow:auto;margin:var(--sui-dialog-body-margin, 24px 24px);white-space:normal;line-height:var(--sui-line-height-compact);}
|
||
@media (width < 768px) {.body.svelte-142yikz {margin:var(--sui-dialog-body-margin, 16px 16px);}
|
||
}`};function Yp(e,t){let n=tc();O(t,!0),J(e,hee);let r=X(t,`open`,15,!1);X(t,`value`,11,``);let i=X(t,`role`,3,`dialog`),a=X(t,`size`,3,`medium`),o=X(t,`showClose`,3,!1),s=X(t,`showOk`,3,!0),c=X(t,`showCancel`,3,!0),l=X(t,`okLabel`,3,``),u=X(t,`okShortcuts`,3,void 0),d=X(t,`okDisabled`,3,!1),f=X(t,`cancelLabel`,3,``),p=X(t,`cancelShortcuts`,3,void 0),m=X(t,`cancelDisabled`,3,!1),h=X(t,`focusInput`,3,!0),g=Al(t,lee),_=P(void 0),v=P(void 0);B(()=>{if(r()&&H(v)){let e=!1;return(async()=>{if(await vf(50),e)return;let t=h()?H(v)?.querySelector(`input, button.primary`):null;t?(t.focus(),t instanceof HTMLInputElement&&t.select()):(!h()||!H(v)?.contains(document.activeElement))&&H(_)?.focus()})(),()=>{e=!0}}});{let h=N(()=>t.header?void 0:t.title),y=N(()=>t.header?t.title:`${n}-title`);Ol(Uf(e,Ml(()=>g,{get role(){return i()},get id(){return n},class:`dialog`,get"aria-label"(){return H(h)},get"aria-labelledby"(){return H(y)},get"aria-describedby"(){return`${n}-body`},showBackdrop:!0,get open(){return r()},set open(e){r(e)},children:(e,r)=>{var i=mee(),h=I(i),g=e=>{var r=dee(),i=I(r),a=e=>{var n=W();Ac(L(n),()=>t.header),G(e,n)},s=e=>{var r=uee(),i=L(r),a=R(i,!0),s=z(i,2);Wp(s,{flex:!0});var c=z(s,2);Ac(c,()=>t.headerExtra??br);var l=z(c,2),u=e=>{{let r=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.closeIcon),G(e,n)},a=e=>{Rl(e,{name:`close`})};q(r,e=>{t.closeIcon?e(i):e(a,-1)}),G(e,n)},i=N(()=>Z(`_sui.close`));$f(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return H(i)},get"aria-controls"(){return n},onclick:()=>{H(_)?.close(`close`)},startIcon:r,$$slots:{startIcon:!0}})}};q(l,e=>{o()&&e(u)}),V(()=>{Y(i,`id`,`${n}-title`),K(a,t.title)}),G(e,r)};q(i,e=>{t.header?e(a):e(s,-1)}),D(r),G(e,r)};q(h,e=>{(t.title||o()||t.header||t.headerExtra)&&e(g)});var y=z(h,2);Ac(I(y),()=>t.children??br),D(y);var b=z(y,2),x=e=>{var n=pee(),r=I(n),i=e=>{var n=W();Ac(L(n),()=>t.footer??br),G(e,n)},a=e=>{var n=fee(),r=L(n);Ac(r,()=>t.footerExtra??br);var i=z(r,2);Wp(i,{flex:!0});var a=z(i,2),o=e=>{{let t=N(()=>l()||Z(`_sui.ok`));$f(e,{variant:`primary`,get label(){return H(t)},get keyShortcuts(){return u()},get disabled(){return d()},onclick:()=>{H(_)?.close(`ok`)}})}};q(a,e=>{s()&&e(o)});var h=z(a,2),g=e=>{{let t=N(()=>f()||Z(`_sui.cancel`));$f(e,{variant:`secondary`,get label(){return H(t)},get keyShortcuts(){return p()},get disabled(){return m()},onclick:()=>{H(_)?.close(`cancel`)}})}};q(h,e=>{c()&&e(g)}),G(e,n)};q(r,e=>{t.footer?e(i):e(a,-1)}),D(n),G(e,n)};q(b,e=>{(s()||c()||t.footer||t.footerExtra)&&e(x)}),D(i),Ol(i,e=>F(v,e),()=>H(v)),V(()=>{el(i,1,`content ${t.class??``} ${a()??``}`,`svelte-142yikz`),Y(y,`id`,`${n}-body`)}),G(e,i)},$$slots:{default:!0}})),e=>F(_,e,!0),()=>H(_))}k()}var gee=new Set([`$$slots`,`$$events`,`$$legacy`,`open`]);function Xp(e,t){O(t,!0);let n=X(t,`open`,15,!1),r=Al(t,gee);Yp(e,Ml(()=>r,{role:`alertdialog`,showCancel:!1,get open(){return n()},set open(e){n(e)}})),k()}var _ee=new Set([`$$slots`,`$$events`,`$$legacy`,`open`]);function Zp(e,t){O(t,!0);let n=X(t,`open`,15,!1),r=Al(t,_ee);Yp(e,Ml(()=>r,{role:`alertdialog`,get open(){return n()},set open(e){n(e)}})),k()}var vee=`boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.paddingTop.paddingRight.paddingBottom.paddingLeft.fontFamily.fontSize.fontStretch.fontStyle.fontVariant.fontWeight.letterSpacing.lineHeight.tabSize.textAlign.textIndent.textTransform.wordBreak.wordSpacing.overflowWrap.direction`.split(`.`),yee=(e,t,n)=>{let r=e.getBoundingClientRect();if(!r.width&&!r.height)return;let i=globalThis.getComputedStyle(e),a=e.tagName===`INPUT`,o=document.createElement(`div`),s=document.createElement(`span`);vee.forEach(e=>{o.style[e]=i[e]}),Object.assign(o.style,{position:`absolute`,top:`0`,left:`0`,height:`auto`,minHeight:`0`,maxHeight:`none`,overflow:`hidden`,visibility:`hidden`,pointerEvents:`none`,whiteSpace:a?`pre`:`pre-wrap`}),o.setAttribute(`aria-hidden`,`true`),o.textContent=e.value.slice(0,t),s.textContent=e.value.slice(t,n)||``,o.append(s),document.body.append(o);let c=o.getBoundingClientRect(),l=s.getClientRects(),u=l[l.length-1]??s.getBoundingClientRect(),d=u.top-c.top,f=u.left-c.left,p=u.right-c.left,m=u.height||Number.parseFloat(i.lineHeight)||0;o.remove();let h=r.top+d-e.scrollTop,g=r.left+f-e.scrollLeft,_=r.left+p-e.scrollLeft;return{top:h,bottom:h+m,left:g,right:_}},bee=`😀 grinning face
|
||
😃 smiley smiling face open mouth
|
||
😄 smile smiling face open mouth eyes
|
||
😁 grin grinning face smiling eyes
|
||
😆 laughing satisfied smiling face open mouth tightly-closed eyes
|
||
😅 sweat_smile smiling face open mouth cold
|
||
🤣 rolling_on_the_floor_laughing
|
||
😂 joy face tears
|
||
🙂 slightly_smiling_face
|
||
🙃 upside_down_face upside-down
|
||
🫠 melting_face
|
||
😉 wink winking face
|
||
😊 blush smiling face eyes
|
||
😇 innocent smiling face halo
|
||
🥰 smiling_face_with_3_hearts eyes three
|
||
😍 heart_eyes smiling face heart-shaped
|
||
🤩 star-struck grinning_face_with_star_eyes
|
||
😘 kissing_heart face throwing kiss
|
||
😗 kissing face
|
||
☺️ relaxed white smiling face
|
||
😚 kissing_closed_eyes face
|
||
😙 kissing_smiling_eyes face
|
||
🥲 smiling_face_with_tear
|
||
😋 yum face savouring delicious food
|
||
😛 stuck_out_tongue face stuck-out
|
||
😜 stuck_out_tongue_winking_eye face stuck-out
|
||
🤪 zany_face grinning_face_with_one_large_and_one_small_eye
|
||
😝 stuck_out_tongue_closed_eyes face stuck-out tightly-closed
|
||
🤑 money_mouth_face money-mouth
|
||
🤗 hugging_face
|
||
🤭 face_with_hand_over_mouth smiling_face_with_smiling_eyes_and_hand_covering_mouth
|
||
🫢 face_with_open_eyes_and_hand_over_mouth
|
||
🫣 face_with_peeking_eye
|
||
🤫 shushing_face face_with_finger_covering_closed_lips
|
||
🤔 thinking_face
|
||
🫡 saluting_face
|
||
🤐 zipper_mouth_face zipper-mouth
|
||
🤨 face_with_raised_eyebrow face_with_one_eyebrow_raised
|
||
😐 neutral_face
|
||
😑 expressionless face
|
||
😶 no_mouth face without
|
||
🫥 dotted_line_face
|
||
😶🌫️ face_in_clouds
|
||
😏 smirk smirking face
|
||
😒 unamused face
|
||
🙄 face_with_rolling_eyes
|
||
😬 grimacing face
|
||
😮💨 face_exhaling
|
||
🤥 lying_face
|
||
🫨 shaking_face
|
||
🙂↔️ head_shaking_horizontally
|
||
🙂↕️ head_shaking_vertically
|
||
😌 relieved face
|
||
😔 pensive face
|
||
😪 sleepy face
|
||
🤤 drooling_face
|
||
😴 sleeping face
|
||
face_with_bags_under_eyes
|
||
😷 mask face medical
|
||
🤒 face_with_thermometer
|
||
🤕 face_with_head_bandage head-bandage
|
||
🤢 nauseated_face
|
||
🤮 face_vomiting face_with_open_mouth_vomiting
|
||
🤧 sneezing_face
|
||
🥵 hot_face overheated
|
||
🥶 cold_face freezing
|
||
🥴 woozy_face uneven eyes wavy mouth
|
||
😵 dizzy_face
|
||
😵💫 face_with_spiral_eyes
|
||
🤯 exploding_head shocked_face_with_exploding_head
|
||
🤠 face_with_cowboy_hat
|
||
🥳 partying_face party horn hat
|
||
🥸 disguised_face
|
||
😎 sunglasses smiling face
|
||
🤓 nerd_face
|
||
🧐 face_with_monocle
|
||
😕 confused face
|
||
🫤 face_with_diagonal_mouth
|
||
😟 worried face
|
||
🙁 slightly_frowning_face
|
||
☹️ white_frowning_face
|
||
😮 open_mouth face
|
||
😯 hushed face
|
||
😲 astonished face
|
||
😳 flushed face
|
||
🥺 pleading_face eyes
|
||
🥹 face_holding_back_tears
|
||
😦 frowning face open mouth
|
||
😧 anguished face
|
||
😨 fearful face
|
||
😰 cold_sweat face open mouth
|
||
😥 disappointed_relieved but face
|
||
😢 cry crying face
|
||
😭 sob loudly crying face
|
||
😱 scream face screaming fear
|
||
😖 confounded face
|
||
😣 persevere persevering face
|
||
😞 disappointed face
|
||
😓 sweat face cold
|
||
😩 weary face
|
||
😫 tired_face
|
||
🥱 yawning_face
|
||
😤 triumph face look
|
||
😡 rage pouting face
|
||
😠 angry face
|
||
🤬 face_with_symbols_on_mouth serious_face_with_symbols_covering_mouth
|
||
😈 smiling_imp face horns
|
||
👿 imp
|
||
💀 skull
|
||
☠️ skull_and_crossbones
|
||
💩 hankey poop shit pile poo
|
||
🤡 clown_face
|
||
👹 japanese_ogre
|
||
👺 japanese_goblin
|
||
👻 ghost
|
||
👽 alien extraterrestrial
|
||
👾 space_invader alien monster
|
||
🤖 robot_face
|
||
😺 smiley_cat smiling face open mouth
|
||
😸 smile_cat grinning face smiling eyes
|
||
😹 joy_cat face tears
|
||
😻 heart_eyes_cat smiling face heart-shaped
|
||
😼 smirk_cat face wry smile
|
||
😽 kissing_cat face closed eyes
|
||
🙀 scream_cat weary face
|
||
😿 crying_cat_face
|
||
😾 pouting_cat face
|
||
🙈 see_no_evil see-no-evil monkey
|
||
🙉 hear_no_evil hear-no-evil monkey
|
||
🙊 speak_no_evil speak-no-evil monkey
|
||
💌 love_letter
|
||
💘 cupid heart arrow
|
||
💝 gift_heart ribbon
|
||
💖 sparkling_heart
|
||
💗 heartpulse growing heart
|
||
💓 heartbeat beating heart
|
||
💞 revolving_hearts
|
||
💕 two_hearts
|
||
💟 heart_decoration
|
||
❣️ heavy_heart_exclamation_mark_ornament
|
||
💔 broken_heart
|
||
❤️🔥 heart_on_fire
|
||
❤️🩹 mending_heart
|
||
❤️ heart heavy black
|
||
🩷 pink_heart
|
||
🧡 orange_heart
|
||
💛 yellow_heart
|
||
💚 green_heart
|
||
💙 blue_heart
|
||
🩵 light_blue_heart
|
||
💜 purple_heart
|
||
🤎 brown_heart
|
||
🖤 black_heart
|
||
🩶 grey_heart
|
||
🤍 white_heart
|
||
💋 kiss mark
|
||
💯 100 hundred points symbol
|
||
💢 anger symbol
|
||
💥 boom collision symbol
|
||
💫 dizzy symbol
|
||
💦 sweat_drops splashing symbol
|
||
💨 dash symbol
|
||
🕳️ hole
|
||
💬 speech_balloon
|
||
👁️🗨️ eye-in-speech-bubble
|
||
🗨️ left_speech_bubble
|
||
🗯️ right_anger_bubble
|
||
💭 thought_balloon
|
||
💤 zzz sleeping symbol
|
||
👋 wave waving hand sign
|
||
🤚 raised_back_of_hand
|
||
🖐️ raised_hand_with_fingers_splayed
|
||
✋ hand raised_hand
|
||
🖖 spock-hand raised part between middle ring fingers
|
||
🫱 rightwards_hand
|
||
🫲 leftwards_hand
|
||
🫳 palm_down_hand
|
||
🫴 palm_up_hand
|
||
🫷 leftwards_pushing_hand
|
||
🫸 rightwards_pushing_hand
|
||
👌 ok_hand sign
|
||
🤌 pinched_fingers
|
||
🤏 pinching_hand
|
||
✌️ v victory hand
|
||
🤞 crossed_fingers hand_with_index_and_middle_fingers_crossed
|
||
🫰 hand_with_index_finger_and_thumb_crossed
|
||
🤟 i_love_you_hand_sign
|
||
🤘 the_horns sign_of_the_horns
|
||
🤙 call_me_hand
|
||
👈 point_left white pointing backhand index
|
||
👉 point_right white pointing backhand index
|
||
👆 point_up_2 white pointing backhand index
|
||
🖕 middle_finger reversed_hand_with_middle_finger_extended
|
||
👇 point_down white pointing backhand index
|
||
☝️ point_up white pointing index
|
||
🫵 index_pointing_at_the_viewer
|
||
👍 +1 thumbsup thumbs up sign
|
||
👎 -1 thumbsdown thumbs down sign
|
||
✊ fist raised
|
||
👊 facepunch punch fisted hand sign
|
||
🤛 left-facing_fist left-facing
|
||
🤜 right-facing_fist right-facing
|
||
👏 clap clapping hands sign
|
||
🙌 raised_hands person raising both celebration
|
||
🫶 heart_hands
|
||
👐 open_hands sign
|
||
🤲 palms_up_together
|
||
🤝 handshake
|
||
🙏 pray person folded hands
|
||
✍️ writing_hand
|
||
💅 nail_care polish
|
||
🤳 selfie
|
||
💪 muscle flexed biceps
|
||
🦾 mechanical_arm
|
||
🦿 mechanical_leg
|
||
🦵 leg
|
||
🦶 foot
|
||
👂 ear
|
||
🦻 ear_with_hearing_aid
|
||
👃 nose
|
||
🧠 brain
|
||
🫀 anatomical_heart
|
||
🫁 lungs
|
||
🦷 tooth
|
||
🦴 bone
|
||
👀 eyes
|
||
👁️ eye
|
||
👅 tongue
|
||
👄 lips mouth
|
||
🫦 biting_lip
|
||
👶 baby
|
||
🧒 child
|
||
👦 boy
|
||
👧 girl
|
||
🧑 adult
|
||
👱 person_with_blond_hair
|
||
👨 man
|
||
🧔 bearded_person
|
||
🧔♂️ man_with_beard
|
||
🧔♀️ woman_with_beard
|
||
👨🦰 red_haired_man hair
|
||
👨🦱 curly_haired_man hair
|
||
👨🦳 white_haired_man hair
|
||
👨🦲 bald_man
|
||
👩 woman
|
||
👩🦰 red_haired_woman hair
|
||
🧑🦰 red_haired_person hair
|
||
👩🦱 curly_haired_woman hair
|
||
🧑🦱 curly_haired_person hair
|
||
👩🦳 white_haired_woman hair
|
||
🧑🦳 white_haired_person hair
|
||
👩🦲 bald_woman
|
||
🧑🦲 bald_person
|
||
👱♀️ blond-haired-woman hair
|
||
👱♂️ blond-haired-man hair
|
||
🧓 older_adult
|
||
👴 older_man
|
||
👵 older_woman
|
||
🙍 person_frowning
|
||
🙍♂️ man-frowning
|
||
🙍♀️ woman-frowning
|
||
🙎 person_with_pouting_face
|
||
🙎♂️ man-pouting
|
||
🙎♀️ woman-pouting
|
||
🙅 no_good face gesture
|
||
🙅♂️ man-gesturing-no
|
||
🙅♀️ woman-gesturing-no
|
||
🙆 ok_woman face gesture
|
||
🙆♂️ man-gesturing-ok
|
||
🙆♀️ woman-gesturing-ok
|
||
💁 information_desk_person
|
||
💁♂️ man-tipping-hand
|
||
💁♀️ woman-tipping-hand
|
||
🙋 raising_hand happy person one
|
||
🙋♂️ man-raising-hand
|
||
🙋♀️ woman-raising-hand
|
||
🧏 deaf_person
|
||
🧏♂️ deaf_man
|
||
🧏♀️ deaf_woman
|
||
🙇 bow person bowing deeply
|
||
🙇♂️ man-bowing
|
||
🙇♀️ woman-bowing
|
||
🤦 face_palm
|
||
🤦♂️ man-facepalming
|
||
🤦♀️ woman-facepalming
|
||
🤷 shrug
|
||
🤷♂️ man-shrugging
|
||
🤷♀️ woman-shrugging
|
||
🧑⚕️ health_worker
|
||
👨⚕️ male-doctor man health worker
|
||
👩⚕️ female-doctor woman health worker
|
||
🧑🎓 student
|
||
👨🎓 male-student man
|
||
👩🎓 female-student woman
|
||
🧑🏫 teacher
|
||
👨🏫 male-teacher man
|
||
👩🏫 female-teacher woman
|
||
🧑⚖️ judge
|
||
👨⚖️ male-judge man
|
||
👩⚖️ female-judge woman
|
||
🧑🌾 farmer
|
||
👨🌾 male-farmer man
|
||
👩🌾 female-farmer woman
|
||
🧑🍳 cook
|
||
👨🍳 male-cook man
|
||
👩🍳 female-cook woman
|
||
🧑🔧 mechanic
|
||
👨🔧 male-mechanic man
|
||
👩🔧 female-mechanic woman
|
||
🧑🏭 factory_worker
|
||
👨🏭 male-factory-worker man
|
||
👩🏭 female-factory-worker woman
|
||
🧑💼 office_worker
|
||
👨💼 male-office-worker man
|
||
👩💼 female-office-worker woman
|
||
🧑🔬 scientist
|
||
👨🔬 male-scientist man
|
||
👩🔬 female-scientist woman
|
||
🧑💻 technologist
|
||
👨💻 male-technologist man
|
||
👩💻 female-technologist woman
|
||
🧑🎤 singer
|
||
👨🎤 male-singer man
|
||
👩🎤 female-singer woman
|
||
🧑🎨 artist
|
||
👨🎨 male-artist man
|
||
👩🎨 female-artist woman
|
||
🧑✈️ pilot
|
||
👨✈️ male-pilot man
|
||
👩✈️ female-pilot woman
|
||
🧑🚀 astronaut
|
||
👨🚀 male-astronaut man
|
||
👩🚀 female-astronaut woman
|
||
🧑🚒 firefighter
|
||
👨🚒 male-firefighter man
|
||
👩🚒 female-firefighter woman
|
||
👮 cop police officer
|
||
👮♂️ male-police-officer man
|
||
👮♀️ female-police-officer woman
|
||
🕵️ sleuth_or_spy detective
|
||
🕵️♂️ male-detective man
|
||
🕵️♀️ female-detective woman
|
||
💂 guardsman
|
||
💂♂️ male-guard man
|
||
💂♀️ female-guard woman
|
||
🥷 ninja
|
||
👷 construction_worker
|
||
👷♂️ male-construction-worker man
|
||
👷♀️ female-construction-worker woman
|
||
🫅 person_with_crown
|
||
🤴 prince
|
||
👸 princess
|
||
👳 man_with_turban
|
||
👳♂️ man-wearing-turban
|
||
👳♀️ woman-wearing-turban
|
||
👲 man_with_gua_pi_mao
|
||
🧕 person_with_headscarf
|
||
🤵 person_in_tuxedo man
|
||
🤵♂️ man_in_tuxedo
|
||
🤵♀️ woman_in_tuxedo
|
||
👰 bride_with_veil
|
||
👰♂️ man_with_veil
|
||
👰♀️ woman_with_veil
|
||
🤰 pregnant_woman
|
||
🫃 pregnant_man
|
||
🫄 pregnant_person
|
||
🤱 breast-feeding
|
||
👩🍼 woman_feeding_baby
|
||
👨🍼 man_feeding_baby
|
||
🧑🍼 person_feeding_baby
|
||
👼 angel baby
|
||
🎅 santa father christmas
|
||
🤶 mrs_claus mother_christmas
|
||
🧑🎄 mx_claus
|
||
🦸 superhero
|
||
🦸♂️ male_superhero man
|
||
🦸♀️ female_superhero woman
|
||
🦹 supervillain
|
||
🦹♂️ male_supervillain man
|
||
🦹♀️ female_supervillain woman
|
||
🧙 mage
|
||
🧙♂️ male_mage man
|
||
🧙♀️ female_mage woman
|
||
🧚 fairy
|
||
🧚♂️ male_fairy man
|
||
🧚♀️ female_fairy woman
|
||
🧛 vampire
|
||
🧛♂️ male_vampire man
|
||
🧛♀️ female_vampire woman
|
||
🧜 merperson
|
||
🧜♂️ merman
|
||
🧜♀️ mermaid
|
||
🧝 elf
|
||
🧝♂️ male_elf man
|
||
🧝♀️ female_elf woman
|
||
🧞 genie
|
||
🧞♂️ male_genie man
|
||
🧞♀️ female_genie woman
|
||
🧟 zombie
|
||
🧟♂️ male_zombie man
|
||
🧟♀️ female_zombie woman
|
||
🧌 troll
|
||
💆 massage face
|
||
💆♂️ man-getting-massage
|
||
💆♀️ woman-getting-massage
|
||
💇 haircut
|
||
💇♂️ man-getting-haircut
|
||
💇♀️ woman-getting-haircut
|
||
🚶 walking pedestrian
|
||
🚶♂️ man-walking
|
||
🚶♀️ woman-walking
|
||
🚶➡️ person_walking_facing_right
|
||
🚶♀️➡️ woman_walking_facing_right
|
||
🚶♂️➡️ man_walking_facing_right
|
||
🧍 standing_person
|
||
🧍♂️ man_standing
|
||
🧍♀️ woman_standing
|
||
🧎 kneeling_person
|
||
🧎♂️ man_kneeling
|
||
🧎♀️ woman_kneeling
|
||
🧎➡️ person_kneeling_facing_right
|
||
🧎♀️➡️ woman_kneeling_facing_right
|
||
🧎♂️➡️ man_kneeling_facing_right
|
||
🧑🦯 person_with_probing_cane white
|
||
🧑🦯➡️ person_with_white_cane_facing_right
|
||
👨🦯 man_with_probing_cane white
|
||
👨🦯➡️ man_with_white_cane_facing_right
|
||
👩🦯 woman_with_probing_cane white
|
||
👩🦯➡️ woman_with_white_cane_facing_right
|
||
🧑🦼 person_in_motorized_wheelchair
|
||
🧑🦼➡️ person_in_motorized_wheelchair_facing_right
|
||
👨🦼 man_in_motorized_wheelchair
|
||
👨🦼➡️ man_in_motorized_wheelchair_facing_right
|
||
👩🦼 woman_in_motorized_wheelchair
|
||
👩🦼➡️ woman_in_motorized_wheelchair_facing_right
|
||
🧑🦽 person_in_manual_wheelchair
|
||
🧑🦽➡️ person_in_manual_wheelchair_facing_right
|
||
👨🦽 man_in_manual_wheelchair
|
||
👨🦽➡️ man_in_manual_wheelchair_facing_right
|
||
👩🦽 woman_in_manual_wheelchair
|
||
👩🦽➡️ woman_in_manual_wheelchair_facing_right
|
||
🏃 runner running
|
||
🏃♂️ man-running
|
||
🏃♀️ woman-running
|
||
🏃➡️ person_running_facing_right
|
||
🏃♀️➡️ woman_running_facing_right
|
||
🏃♂️➡️ man_running_facing_right
|
||
💃 dancer
|
||
🕺 man_dancing
|
||
🕴️ man_in_business_suit_levitating person
|
||
👯 dancers woman bunny ears
|
||
👯♂️ men-with-bunny-ears-partying man-with-bunny-ears-partying
|
||
👯♀️ women-with-bunny-ears-partying woman-with-bunny-ears-partying
|
||
🧖 person_in_steamy_room
|
||
🧖♂️ man_in_steamy_room
|
||
🧖♀️ woman_in_steamy_room
|
||
🧗 person_climbing
|
||
🧗♂️ man_climbing
|
||
🧗♀️ woman_climbing
|
||
🤺 fencer
|
||
🏇 horse_racing
|
||
⛷️ skier
|
||
🏂 snowboarder
|
||
🏌️ golfer person golfing
|
||
🏌️♂️ man-golfing
|
||
🏌️♀️ woman-golfing
|
||
🏄 surfer
|
||
🏄♂️ man-surfing
|
||
🏄♀️ woman-surfing
|
||
🚣 rowboat
|
||
🚣♂️ man-rowing-boat
|
||
🚣♀️ woman-rowing-boat
|
||
🏊 swimmer
|
||
🏊♂️ man-swimming
|
||
🏊♀️ woman-swimming
|
||
⛹️ person_with_ball bouncing
|
||
⛹️♂️ man-bouncing-ball
|
||
⛹️♀️ woman-bouncing-ball
|
||
🏋️ weight_lifter person lifting weights
|
||
🏋️♂️ man-lifting-weights
|
||
🏋️♀️ woman-lifting-weights
|
||
🚴 bicyclist
|
||
🚴♂️ man-biking
|
||
🚴♀️ woman-biking
|
||
🚵 mountain_bicyclist
|
||
🚵♂️ man-mountain-biking
|
||
🚵♀️ woman-mountain-biking
|
||
🤸 person_doing_cartwheel
|
||
🤸♂️ man-cartwheeling
|
||
🤸♀️ woman-cartwheeling
|
||
🤼 wrestlers
|
||
🤼♂️ man-wrestling men
|
||
🤼♀️ woman-wrestling women
|
||
🤽 water_polo
|
||
🤽♂️ man-playing-water-polo
|
||
🤽♀️ woman-playing-water-polo
|
||
🤾 handball
|
||
🤾♂️ man-playing-handball
|
||
🤾♀️ woman-playing-handball
|
||
🤹 juggling
|
||
🤹♂️ man-juggling
|
||
🤹♀️ woman-juggling
|
||
🧘 person_in_lotus_position
|
||
🧘♂️ man_in_lotus_position
|
||
🧘♀️ woman_in_lotus_position
|
||
🛀 bath
|
||
🛌 sleeping_accommodation
|
||
🧑🤝🧑 people_holding_hands
|
||
👭 two_women_holding_hands women_holding_hands
|
||
👫 man_and_woman_holding_hands woman_and_man_holding_hands couple
|
||
👬 two_men_holding_hands men_holding_hands
|
||
💏 couplekiss kiss
|
||
👩❤️💋👨 woman-kiss-man
|
||
👨❤️💋👨 man-kiss-man
|
||
👩❤️💋👩 woman-kiss-woman
|
||
💑 couple_with_heart
|
||
👩❤️👨 woman-heart-man couple
|
||
👨❤️👨 man-heart-man couple
|
||
👩❤️👩 woman-heart-woman couple
|
||
👨👩👦 man-woman-boy family
|
||
👨👩👧 man-woman-girl family
|
||
👨👩👧👦 man-woman-girl-boy family
|
||
👨👩👦👦 man-woman-boy-boy family
|
||
👨👩👧👧 man-woman-girl-girl family
|
||
👨👨👦 man-man-boy family
|
||
👨👨👧 man-man-girl family
|
||
👨👨👧👦 man-man-girl-boy family
|
||
👨👨👦👦 man-man-boy-boy family
|
||
👨👨👧👧 man-man-girl-girl family
|
||
👩👩👦 woman-woman-boy family
|
||
👩👩👧 woman-woman-girl family
|
||
👩👩👧👦 woman-woman-girl-boy family
|
||
👩👩👦👦 woman-woman-boy-boy family
|
||
👩👩👧👧 woman-woman-girl-girl family
|
||
👨👦 man-boy family
|
||
👨👦👦 man-boy-boy family
|
||
👨👧 man-girl family
|
||
👨👧👦 man-girl-boy family
|
||
👨👧👧 man-girl-girl family
|
||
👩👦 woman-boy family
|
||
👩👦👦 woman-boy-boy family
|
||
👩👧 woman-girl family
|
||
👩👧👦 woman-girl-boy family
|
||
👩👧👧 woman-girl-girl family
|
||
🗣️ speaking_head_in_silhouette
|
||
👤 bust_in_silhouette
|
||
👥 busts_in_silhouette
|
||
🫂 people_hugging
|
||
👪 family
|
||
🧑🧑🧒 family_adult_adult_child
|
||
🧑🧑🧒🧒 family_adult_adult_child_child
|
||
🧑🧒 family_adult_child
|
||
🧑🧒🧒 family_adult_child_child
|
||
👣 footprints
|
||
fingerprint
|
||
🐵 monkey_face
|
||
🐒 monkey
|
||
🦍 gorilla
|
||
🦧 orangutan
|
||
🐶 dog face
|
||
🐕 dog2 dog
|
||
🦮 guide_dog
|
||
🐕🦺 service_dog
|
||
🐩 poodle
|
||
🐺 wolf face
|
||
🦊 fox_face
|
||
🦝 raccoon
|
||
🐱 cat face
|
||
🐈 cat2 cat
|
||
🐈⬛ black_cat
|
||
🦁 lion_face
|
||
🐯 tiger face
|
||
🐅 tiger2 tiger
|
||
🐆 leopard
|
||
🐴 horse face
|
||
🫎 moose
|
||
🫏 donkey
|
||
🐎 racehorse horse
|
||
🦄 unicorn_face
|
||
🦓 zebra_face
|
||
🦌 deer
|
||
🦬 bison
|
||
🐮 cow face
|
||
🐂 ox
|
||
🐃 water_buffalo
|
||
🐄 cow2 cow
|
||
🐷 pig face
|
||
🐖 pig2 pig
|
||
🐗 boar
|
||
🐽 pig_nose
|
||
🐏 ram
|
||
🐑 sheep
|
||
🐐 goat
|
||
🐪 dromedary_camel
|
||
🐫 camel bactrian
|
||
🦙 llama
|
||
🦒 giraffe_face
|
||
🐘 elephant
|
||
🦣 mammoth
|
||
🦏 rhinoceros
|
||
🦛 hippopotamus
|
||
🐭 mouse face
|
||
🐁 mouse2 mouse
|
||
🐀 rat
|
||
🐹 hamster face
|
||
🐰 rabbit face
|
||
🐇 rabbit2 rabbit
|
||
🐿️ chipmunk
|
||
🦫 beaver
|
||
🦔 hedgehog
|
||
🦇 bat
|
||
🐻 bear face
|
||
🐻❄️ polar_bear
|
||
🐨 koala
|
||
🐼 panda_face
|
||
🦥 sloth
|
||
🦦 otter
|
||
🦨 skunk
|
||
🦘 kangaroo
|
||
🦡 badger
|
||
🐾 feet paw_prints
|
||
🦃 turkey
|
||
🐔 chicken
|
||
🐓 rooster
|
||
🐣 hatching_chick
|
||
🐤 baby_chick
|
||
🐥 hatched_chick front-facing baby
|
||
🐦 bird
|
||
🐧 penguin
|
||
🕊️ dove_of_peace
|
||
🦅 eagle
|
||
🦆 duck
|
||
🦢 swan
|
||
🦉 owl
|
||
🦤 dodo
|
||
🪶 feather
|
||
🦩 flamingo
|
||
🦚 peacock
|
||
🦜 parrot
|
||
🪽 wing
|
||
🐦⬛ black_bird
|
||
🪿 goose
|
||
🐦🔥 phoenix
|
||
🐸 frog face
|
||
🐊 crocodile
|
||
🐢 turtle
|
||
🦎 lizard
|
||
🐍 snake
|
||
🐲 dragon_face
|
||
🐉 dragon
|
||
🦕 sauropod
|
||
🦖 t-rex
|
||
🐳 whale spouting
|
||
🐋 whale2 whale
|
||
🐬 dolphin flipper
|
||
🦭 seal
|
||
🐟 fish
|
||
🐠 tropical_fish
|
||
🐡 blowfish
|
||
🦈 shark
|
||
🐙 octopus
|
||
🐚 shell spiral
|
||
🪸 coral
|
||
🪼 jellyfish
|
||
🦀 crab
|
||
🦞 lobster
|
||
🦐 shrimp
|
||
🦑 squid
|
||
🦪 oyster
|
||
🐌 snail
|
||
🦋 butterfly
|
||
🐛 bug
|
||
🐜 ant
|
||
🐝 bee honeybee
|
||
🪲 beetle
|
||
🐞 ladybug lady_beetle
|
||
🦗 cricket
|
||
🪳 cockroach
|
||
🕷️ spider
|
||
🕸️ spider_web
|
||
🦂 scorpion
|
||
🦟 mosquito
|
||
🪰 fly
|
||
🪱 worm
|
||
🦠 microbe
|
||
💐 bouquet
|
||
🌸 cherry_blossom
|
||
💮 white_flower
|
||
🪷 lotus
|
||
🏵️ rosette
|
||
🌹 rose
|
||
🥀 wilted_flower
|
||
🌺 hibiscus
|
||
🌻 sunflower
|
||
🌼 blossom
|
||
🌷 tulip
|
||
🪻 hyacinth
|
||
🌱 seedling
|
||
🪴 potted_plant
|
||
🌲 evergreen_tree
|
||
🌳 deciduous_tree
|
||
🌴 palm_tree
|
||
🌵 cactus
|
||
🌾 ear_of_rice
|
||
🌿 herb
|
||
☘️ shamrock
|
||
🍀 four_leaf_clover
|
||
🍁 maple_leaf
|
||
🍂 fallen_leaf
|
||
🍃 leaves leaf fluttering wind
|
||
🪹 empty_nest
|
||
🪺 nest_with_eggs
|
||
🍄 mushroom
|
||
leafless_tree
|
||
🍇 grapes
|
||
🍈 melon
|
||
🍉 watermelon
|
||
🍊 tangerine
|
||
🍋 lemon
|
||
🍋🟩 lime
|
||
🍌 banana
|
||
🍍 pineapple
|
||
🥭 mango
|
||
🍎 apple red
|
||
🍏 green_apple
|
||
🍐 pear
|
||
🍑 peach
|
||
🍒 cherries
|
||
🍓 strawberry
|
||
🫐 blueberries
|
||
🥝 kiwifruit
|
||
🍅 tomato
|
||
🫒 olive
|
||
🥥 coconut
|
||
🥑 avocado
|
||
🍆 eggplant aubergine
|
||
🥔 potato
|
||
🥕 carrot
|
||
🌽 corn ear maize
|
||
🌶️ hot_pepper
|
||
🫑 bell_pepper
|
||
🥒 cucumber
|
||
🥬 leafy_green
|
||
🥦 broccoli
|
||
🧄 garlic
|
||
🧅 onion
|
||
🥜 peanuts
|
||
🫘 beans
|
||
🌰 chestnut
|
||
🫚 ginger_root
|
||
🫛 pea_pod
|
||
🍄🟫 brown_mushroom
|
||
root_vegetable
|
||
🍞 bread
|
||
🥐 croissant
|
||
🥖 baguette_bread
|
||
🫓 flatbread
|
||
🥨 pretzel
|
||
🥯 bagel
|
||
🥞 pancakes
|
||
🧇 waffle
|
||
🧀 cheese_wedge
|
||
🍖 meat_on_bone
|
||
🍗 poultry_leg
|
||
🥩 cut_of_meat
|
||
🥓 bacon
|
||
🍔 hamburger
|
||
🍟 fries french
|
||
🍕 pizza slice
|
||
🌭 hotdog hot dog
|
||
🥪 sandwich
|
||
🌮 taco
|
||
🌯 burrito
|
||
🫔 tamale
|
||
🥙 stuffed_flatbread
|
||
🧆 falafel
|
||
🥚 egg
|
||
🍳 fried_egg cooking
|
||
🥘 shallow_pan_of_food
|
||
🍲 stew pot food
|
||
🫕 fondue
|
||
🥣 bowl_with_spoon
|
||
🥗 green_salad
|
||
🍿 popcorn
|
||
🧈 butter
|
||
🧂 salt shaker
|
||
🥫 canned_food
|
||
🍱 bento box
|
||
🍘 rice_cracker
|
||
🍙 rice_ball
|
||
🍚 rice cooked
|
||
🍛 curry rice
|
||
🍜 ramen steaming bowl
|
||
🍝 spaghetti
|
||
🍠 sweet_potato roasted
|
||
🍢 oden
|
||
🍣 sushi
|
||
🍤 fried_shrimp
|
||
🍥 fish_cake swirl design
|
||
🥮 moon_cake
|
||
🍡 dango
|
||
🥟 dumpling
|
||
🥠 fortune_cookie
|
||
🥡 takeout_box
|
||
🍦 icecream soft ice cream
|
||
🍧 shaved_ice
|
||
🍨 ice_cream
|
||
🍩 doughnut
|
||
🍪 cookie
|
||
🎂 birthday cake
|
||
🍰 cake shortcake
|
||
🧁 cupcake
|
||
🥧 pie
|
||
🍫 chocolate_bar
|
||
🍬 candy
|
||
🍭 lollipop
|
||
🍮 custard
|
||
🍯 honey_pot
|
||
🍼 baby_bottle
|
||
🥛 glass_of_milk
|
||
☕ coffee hot beverage
|
||
🫖 teapot
|
||
🍵 tea teacup without handle
|
||
🍶 sake bottle cup
|
||
🍾 champagne bottle popping cork
|
||
🍷 wine_glass
|
||
🍸 cocktail glass
|
||
🍹 tropical_drink
|
||
🍺 beer mug
|
||
🍻 beers clinking beer mugs
|
||
🥂 clinking_glasses
|
||
🥃 tumbler_glass
|
||
🫗 pouring_liquid
|
||
🥤 cup_with_straw
|
||
🧋 bubble_tea
|
||
🧃 beverage_box
|
||
🧉 mate_drink
|
||
🧊 ice_cube
|
||
🥢 chopsticks
|
||
🍽️ knife_fork_plate
|
||
🍴 fork_and_knife
|
||
🥄 spoon
|
||
🔪 hocho knife
|
||
🫙 jar
|
||
🏺 amphora
|
||
🌍 earth_africa globe europe-africa
|
||
🌎 earth_americas globe
|
||
🌏 earth_asia globe asia-australia
|
||
🌐 globe_with_meridians
|
||
🗺️ world_map
|
||
🗾 japan silhouette
|
||
🧭 compass
|
||
🏔️ snow_capped_mountain snow-capped
|
||
⛰️ mountain
|
||
🌋 volcano
|
||
🗻 mount_fuji
|
||
🏕️ camping
|
||
🏖️ beach_with_umbrella
|
||
🏜️ desert
|
||
🏝️ desert_island
|
||
🏞️ national_park
|
||
🏟️ stadium
|
||
🏛️ classical_building
|
||
🏗️ building_construction
|
||
🧱 bricks brick
|
||
🪨 rock
|
||
🪵 wood
|
||
🛖 hut
|
||
🏘️ house_buildings houses
|
||
🏚️ derelict_house_building
|
||
🏠 house building
|
||
🏡 house_with_garden
|
||
🏢 office building
|
||
🏣 post_office japanese
|
||
🏤 european_post_office
|
||
🏥 hospital
|
||
🏦 bank
|
||
🏨 hotel
|
||
🏩 love_hotel
|
||
🏪 convenience_store
|
||
🏫 school
|
||
🏬 department_store
|
||
🏭 factory
|
||
🏯 japanese_castle
|
||
🏰 european_castle
|
||
💒 wedding
|
||
🗼 tokyo_tower
|
||
🗽 statue_of_liberty
|
||
⛪ church
|
||
🕌 mosque
|
||
🛕 hindu_temple
|
||
🕍 synagogue
|
||
⛩️ shinto_shrine
|
||
🕋 kaaba
|
||
⛲ fountain
|
||
⛺ tent
|
||
🌁 foggy
|
||
🌃 night_with_stars
|
||
🏙️ cityscape
|
||
🌄 sunrise_over_mountains
|
||
🌅 sunrise
|
||
🌆 city_sunset cityscape at dusk
|
||
🌇 city_sunrise sunset over buildings
|
||
🌉 bridge_at_night
|
||
♨️ hotsprings hot springs
|
||
🎠 carousel_horse
|
||
🛝 playground_slide
|
||
🎡 ferris_wheel
|
||
🎢 roller_coaster
|
||
💈 barber pole
|
||
🎪 circus_tent
|
||
🚂 steam_locomotive
|
||
🚃 railway_car
|
||
🚄 bullettrain_side high-speed train
|
||
🚅 bullettrain_front high-speed train bullet nose
|
||
🚆 train2 train
|
||
🚇 metro
|
||
🚈 light_rail
|
||
🚉 station
|
||
🚊 tram
|
||
🚝 monorail
|
||
🚞 mountain_railway
|
||
🚋 train tram car
|
||
🚌 bus
|
||
🚍 oncoming_bus
|
||
🚎 trolleybus
|
||
🚐 minibus
|
||
🚑 ambulance
|
||
🚒 fire_engine
|
||
🚓 police_car
|
||
🚔 oncoming_police_car
|
||
🚕 taxi
|
||
🚖 oncoming_taxi
|
||
🚗 car red_car automobile
|
||
🚘 oncoming_automobile
|
||
🚙 blue_car recreational vehicle
|
||
🛻 pickup_truck
|
||
🚚 truck delivery
|
||
🚛 articulated_lorry
|
||
🚜 tractor
|
||
🏎️ racing_car
|
||
🏍️ racing_motorcycle
|
||
🛵 motor_scooter
|
||
🦽 manual_wheelchair
|
||
🦼 motorized_wheelchair
|
||
🛺 auto_rickshaw
|
||
🚲 bike bicycle
|
||
🛴 scooter
|
||
🛹 skateboard
|
||
🛼 roller_skate
|
||
🚏 busstop bus stop
|
||
🛣️ motorway
|
||
🛤️ railway_track
|
||
🛢️ oil_drum
|
||
⛽ fuelpump fuel pump
|
||
🛞 wheel
|
||
🚨 rotating_light police cars revolving
|
||
🚥 traffic_light horizontal
|
||
🚦 vertical_traffic_light
|
||
🛑 octagonal_sign
|
||
🚧 construction sign
|
||
⚓ anchor
|
||
🛟 ring_buoy
|
||
⛵ boat sailboat
|
||
🛶 canoe
|
||
🚤 speedboat
|
||
🛳️ passenger_ship
|
||
⛴️ ferry
|
||
🛥️ motor_boat
|
||
🚢 ship
|
||
✈️ airplane
|
||
🛩️ small_airplane
|
||
🛫 airplane_departure
|
||
🛬 airplane_arriving
|
||
🪂 parachute
|
||
💺 seat
|
||
🚁 helicopter
|
||
🚟 suspension_railway
|
||
🚠 mountain_cableway
|
||
🚡 aerial_tramway
|
||
🛰️ satellite
|
||
🚀 rocket
|
||
🛸 flying_saucer
|
||
🛎️ bellhop_bell
|
||
🧳 luggage
|
||
⌛ hourglass
|
||
⏳ hourglass_flowing_sand
|
||
⌚ watch
|
||
⏰ alarm_clock
|
||
⏱️ stopwatch
|
||
⏲️ timer_clock
|
||
🕰️ mantelpiece_clock
|
||
🕛 clock12 clock face twelve oclock
|
||
🕧 clock1230 clock face twelve-thirty
|
||
🕐 clock1 clock face one oclock
|
||
🕜 clock130 clock face one-thirty
|
||
🕑 clock2 clock face two oclock
|
||
🕝 clock230 clock face two-thirty
|
||
🕒 clock3 clock face three oclock
|
||
🕞 clock330 clock face three-thirty
|
||
🕓 clock4 clock face four oclock
|
||
🕟 clock430 clock face four-thirty
|
||
🕔 clock5 clock face five oclock
|
||
🕠 clock530 clock face five-thirty
|
||
🕕 clock6 clock face six oclock
|
||
🕡 clock630 clock face six-thirty
|
||
🕖 clock7 clock face seven oclock
|
||
🕢 clock730 clock face seven-thirty
|
||
🕗 clock8 clock face eight oclock
|
||
🕣 clock830 clock face eight-thirty
|
||
🕘 clock9 clock face nine oclock
|
||
🕤 clock930 clock face nine-thirty
|
||
🕙 clock10 clock face ten oclock
|
||
🕥 clock1030 clock face ten-thirty
|
||
🕚 clock11 clock face eleven oclock
|
||
🕦 clock1130 clock face eleven-thirty
|
||
🌑 new_moon symbol
|
||
🌒 waxing_crescent_moon symbol
|
||
🌓 first_quarter_moon symbol
|
||
🌔 moon waxing_gibbous_moon symbol
|
||
🌕 full_moon symbol
|
||
🌖 waning_gibbous_moon symbol
|
||
🌗 last_quarter_moon symbol
|
||
🌘 waning_crescent_moon symbol
|
||
🌙 crescent_moon
|
||
🌚 new_moon_with_face
|
||
🌛 first_quarter_moon_with_face
|
||
🌜 last_quarter_moon_with_face
|
||
🌡️ thermometer
|
||
☀️ sunny black sun rays
|
||
🌝 full_moon_with_face
|
||
🌞 sun_with_face
|
||
🪐 ringed_planet
|
||
⭐ star white medium
|
||
🌟 star2 glowing star
|
||
🌠 stars shooting star
|
||
🌌 milky_way
|
||
☁️ cloud
|
||
⛅ partly_sunny sun behind cloud
|
||
⛈️ thunder_cloud_and_rain lightning
|
||
🌤️ mostly_sunny sun_small_cloud behind
|
||
🌥️ barely_sunny sun_behind_cloud large
|
||
🌦️ partly_sunny_rain sun_behind_rain_cloud
|
||
🌧️ rain_cloud
|
||
🌨️ snow_cloud
|
||
🌩️ lightning lightning_cloud
|
||
🌪️ tornado tornado_cloud
|
||
🌫️ fog
|
||
🌬️ wind_blowing_face
|
||
🌀 cyclone
|
||
🌈 rainbow
|
||
🌂 closed_umbrella
|
||
☂️ umbrella
|
||
☔ umbrella_with_rain_drops
|
||
⛱️ umbrella_on_ground
|
||
⚡ zap high voltage sign
|
||
❄️ snowflake
|
||
☃️ snowman
|
||
⛄ snowman_without_snow
|
||
☄️ comet
|
||
🔥 fire
|
||
💧 droplet
|
||
🌊 ocean water wave
|
||
🎃 jack_o_lantern jack-o-lantern
|
||
🎄 christmas_tree
|
||
🎆 fireworks
|
||
🎇 sparkler firework
|
||
🧨 firecracker
|
||
✨ sparkles
|
||
🎈 balloon
|
||
🎉 tada party popper
|
||
🎊 confetti_ball
|
||
🎋 tanabata_tree
|
||
🎍 bamboo pine decoration
|
||
🎎 dolls japanese
|
||
🎏 flags carp streamer
|
||
🎐 wind_chime
|
||
🎑 rice_scene moon viewing ceremony
|
||
🧧 red_envelope gift
|
||
🎀 ribbon
|
||
🎁 gift wrapped present
|
||
🎗️ reminder_ribbon
|
||
🎟️ admission_tickets
|
||
🎫 ticket
|
||
🎖️ medal military
|
||
🏆 trophy
|
||
🏅 sports_medal
|
||
🥇 first_place_medal
|
||
🥈 second_place_medal
|
||
🥉 third_place_medal
|
||
⚽ soccer ball
|
||
⚾ baseball
|
||
🥎 softball
|
||
🏀 basketball hoop
|
||
🏐 volleyball
|
||
🏈 football american
|
||
🏉 rugby_football
|
||
🎾 tennis racquet ball
|
||
🥏 flying_disc
|
||
🎳 bowling
|
||
🏏 cricket_bat_and_ball
|
||
🏑 field_hockey_stick_and_ball
|
||
🏒 ice_hockey_stick_and_puck
|
||
🥍 lacrosse stick ball
|
||
🏓 table_tennis_paddle_and_ball
|
||
🏸 badminton_racquet_and_shuttlecock
|
||
🥊 boxing_glove
|
||
🥋 martial_arts_uniform
|
||
🥅 goal_net
|
||
⛳ golf flag hole
|
||
⛸️ ice_skate
|
||
🎣 fishing_pole_and_fish
|
||
🤿 diving_mask
|
||
🎽 running_shirt_with_sash
|
||
🎿 ski boot
|
||
🛷 sled
|
||
🥌 curling_stone
|
||
🎯 dart direct hit
|
||
🪀 yo-yo
|
||
🪁 kite
|
||
🔫 gun pistol
|
||
🎱 8ball billiards
|
||
🔮 crystal_ball
|
||
🪄 magic_wand
|
||
🎮 video_game
|
||
🕹️ joystick
|
||
🎰 slot_machine
|
||
🎲 game_die
|
||
🧩 jigsaw puzzle piece
|
||
🧸 teddy_bear
|
||
🪅 pinata
|
||
🪩 mirror_ball
|
||
🪆 nesting_dolls
|
||
♠️ spades black spade suit
|
||
♥️ hearts black heart suit
|
||
♦️ diamonds black diamond suit
|
||
♣️ clubs black club suit
|
||
♟️ chess_pawn
|
||
🃏 black_joker playing card
|
||
🀄 mahjong tile red dragon
|
||
🎴 flower_playing_cards
|
||
🎭 performing_arts
|
||
🖼️ frame_with_picture framed
|
||
🎨 art artist palette
|
||
🧵 thread spool
|
||
🪡 sewing_needle
|
||
🧶 yarn ball
|
||
🪢 knot
|
||
👓 eyeglasses
|
||
🕶️ dark_sunglasses
|
||
🥽 goggles
|
||
🥼 lab_coat
|
||
🦺 safety_vest
|
||
👔 necktie
|
||
👕 shirt tshirt t-shirt
|
||
👖 jeans
|
||
🧣 scarf
|
||
🧤 gloves
|
||
🧥 coat
|
||
🧦 socks
|
||
👗 dress
|
||
👘 kimono
|
||
🥻 sari
|
||
🩱 one-piece_swimsuit one-piece
|
||
🩲 briefs
|
||
🩳 shorts
|
||
👙 bikini
|
||
👚 womans_clothes
|
||
🪭 folding_hand_fan
|
||
👛 purse
|
||
👜 handbag
|
||
👝 pouch
|
||
🛍️ shopping_bags
|
||
🎒 school_satchel
|
||
🩴 thong_sandal
|
||
👞 mans_shoe shoe
|
||
👟 athletic_shoe
|
||
🥾 hiking_boot
|
||
🥿 womans_flat_shoe
|
||
👠 high_heel high-heeled shoe
|
||
👡 sandal womans
|
||
🩰 ballet_shoes
|
||
👢 boot womans boots
|
||
🪮 hair_pick
|
||
👑 crown
|
||
👒 womans_hat
|
||
🎩 tophat top hat
|
||
🎓 mortar_board graduation cap
|
||
🧢 billed_cap
|
||
🪖 military_helmet
|
||
⛑️ helmet_with_white_cross rescue worker s
|
||
📿 prayer_beads
|
||
💄 lipstick
|
||
💍 ring
|
||
💎 gem stone
|
||
🔇 mute speaker cancellation stroke
|
||
🔈 speaker
|
||
🔉 sound speaker one wave
|
||
🔊 loud_sound speaker three waves
|
||
📢 loudspeaker public address
|
||
📣 mega cheering megaphone
|
||
📯 postal_horn
|
||
🔔 bell
|
||
🔕 no_bell cancellation stroke
|
||
🎼 musical_score
|
||
🎵 musical_note
|
||
🎶 notes multiple musical
|
||
🎙️ studio_microphone
|
||
🎚️ level_slider
|
||
🎛️ control_knobs
|
||
🎤 microphone
|
||
🎧 headphones headphone
|
||
📻 radio
|
||
🎷 saxophone
|
||
🪗 accordion
|
||
🎸 guitar
|
||
🎹 musical_keyboard
|
||
🎺 trumpet
|
||
🎻 violin
|
||
🪕 banjo
|
||
🥁 drum_with_drumsticks
|
||
🪘 long_drum
|
||
🪇 maracas
|
||
🪈 flute
|
||
harp
|
||
📱 iphone mobile phone
|
||
📲 calling mobile phone rightwards arrow at left
|
||
☎️ phone telephone black
|
||
📞 telephone_receiver
|
||
📟 pager
|
||
📠 fax machine
|
||
🔋 battery
|
||
🪫 low_battery
|
||
🔌 electric_plug
|
||
💻 computer personal
|
||
🖥️ desktop_computer
|
||
🖨️ printer
|
||
⌨️ keyboard
|
||
🖱️ three_button_mouse computer
|
||
🖲️ trackball
|
||
💽 minidisc
|
||
💾 floppy_disk
|
||
💿 cd optical disc
|
||
📀 dvd
|
||
🧮 abacus
|
||
🎥 movie_camera
|
||
🎞️ film_frames
|
||
📽️ film_projector
|
||
🎬 clapper board
|
||
📺 tv television
|
||
📷 camera
|
||
📸 camera_with_flash
|
||
📹 video_camera
|
||
📼 vhs videocassette
|
||
🔍 mag left-pointing magnifying glass
|
||
🔎 mag_right right-pointing magnifying glass
|
||
🕯️ candle
|
||
💡 bulb electric light
|
||
🔦 flashlight electric torch
|
||
🏮 izakaya_lantern lantern
|
||
🪔 diya_lamp
|
||
📔 notebook_with_decorative_cover
|
||
📕 closed_book
|
||
📖 book open_book
|
||
📗 green_book
|
||
📘 blue_book
|
||
📙 orange_book
|
||
📚 books
|
||
📓 notebook
|
||
📒 ledger
|
||
📃 page_with_curl
|
||
📜 scroll
|
||
📄 page_facing_up
|
||
📰 newspaper
|
||
🗞️ rolled_up_newspaper rolled-up
|
||
📑 bookmark_tabs
|
||
🔖 bookmark
|
||
🏷️ label
|
||
💰 moneybag money bag
|
||
🪙 coin
|
||
💴 yen banknote sign
|
||
💵 dollar banknote sign
|
||
💶 euro banknote sign
|
||
💷 pound banknote sign
|
||
💸 money_with_wings
|
||
💳 credit_card
|
||
🧾 receipt
|
||
💹 chart upwards trend yen sign
|
||
✉️ email envelope
|
||
📧 e-mail symbol
|
||
📨 incoming_envelope
|
||
📩 envelope_with_arrow downwards above
|
||
📤 outbox_tray
|
||
📥 inbox_tray
|
||
📦 package
|
||
📫 mailbox closed raised flag
|
||
📪 mailbox_closed lowered flag
|
||
📬 mailbox_with_mail open raised flag
|
||
📭 mailbox_with_no_mail open lowered flag
|
||
📮 postbox
|
||
🗳️ ballot_box_with_ballot
|
||
✏️ pencil2 pencil
|
||
✒️ black_nib
|
||
🖋️ lower_left_fountain_pen
|
||
🖊️ lower_left_ballpoint_pen
|
||
🖌️ lower_left_paintbrush
|
||
🖍️ lower_left_crayon
|
||
📝 memo pencil
|
||
💼 briefcase
|
||
📁 file_folder
|
||
📂 open_file_folder
|
||
🗂️ card_index_dividers
|
||
📅 date calendar
|
||
📆 calendar tear-off
|
||
🗒️ spiral_note_pad notepad
|
||
🗓️ spiral_calendar_pad
|
||
📇 card_index
|
||
📈 chart_with_upwards_trend
|
||
📉 chart_with_downwards_trend
|
||
📊 bar_chart
|
||
📋 clipboard
|
||
📌 pushpin
|
||
📍 round_pushpin
|
||
📎 paperclip
|
||
🖇️ linked_paperclips
|
||
📏 straight_ruler
|
||
📐 triangular_ruler
|
||
✂️ scissors black
|
||
🗃️ card_file_box
|
||
🗄️ file_cabinet
|
||
🗑️ wastebasket
|
||
🔒 lock
|
||
🔓 unlock open lock
|
||
🔏 lock_with_ink_pen
|
||
🔐 closed_lock_with_key
|
||
🔑 key
|
||
🗝️ old_key
|
||
🔨 hammer
|
||
🪓 axe
|
||
⛏️ pick
|
||
⚒️ hammer_and_pick
|
||
🛠️ hammer_and_wrench
|
||
🗡️ dagger_knife
|
||
⚔️ crossed_swords
|
||
💣 bomb
|
||
🪃 boomerang
|
||
🏹 bow_and_arrow
|
||
🛡️ shield
|
||
🪚 carpentry_saw
|
||
🔧 wrench
|
||
🪛 screwdriver
|
||
🔩 nut_and_bolt
|
||
⚙️ gear
|
||
🗜️ compression clamp
|
||
⚖️ scales balance scale
|
||
🦯 probing_cane
|
||
🔗 link symbol
|
||
⛓️💥 broken_chain
|
||
⛓️ chains
|
||
🪝 hook
|
||
🧰 toolbox
|
||
🧲 magnet
|
||
🪜 ladder
|
||
shovel
|
||
⚗️ alembic
|
||
🧪 test_tube
|
||
🧫 petri_dish
|
||
🧬 dna double helix
|
||
🔬 microscope
|
||
🔭 telescope
|
||
📡 satellite_antenna
|
||
💉 syringe
|
||
🩸 drop_of_blood
|
||
💊 pill
|
||
🩹 adhesive_bandage
|
||
🩼 crutch
|
||
🩺 stethoscope
|
||
🩻 x-ray
|
||
🚪 door
|
||
🛗 elevator
|
||
🪞 mirror
|
||
🪟 window
|
||
🛏️ bed
|
||
🛋️ couch_and_lamp
|
||
🪑 chair
|
||
🚽 toilet
|
||
🪠 plunger
|
||
🚿 shower
|
||
🛁 bathtub
|
||
🪤 mouse_trap
|
||
🪒 razor
|
||
🧴 lotion_bottle
|
||
🧷 safety_pin
|
||
🧹 broom
|
||
🧺 basket
|
||
🧻 roll_of_paper
|
||
🪣 bucket
|
||
🧼 soap bar
|
||
🫧 bubbles
|
||
🪥 toothbrush
|
||
🧽 sponge
|
||
🧯 fire_extinguisher
|
||
🛒 shopping_trolley
|
||
🚬 smoking symbol
|
||
⚰️ coffin
|
||
🪦 headstone
|
||
⚱️ funeral_urn
|
||
🧿 nazar_amulet
|
||
🪬 hamsa
|
||
🗿 moyai
|
||
🪧 placard
|
||
🪪 identification_card
|
||
🏧 atm automated teller machine
|
||
🚮 put_litter_in_its_place symbol
|
||
🚰 potable_water symbol
|
||
♿ wheelchair symbol
|
||
🚹 mens symbol
|
||
🚺 womens symbol
|
||
🚻 restroom
|
||
🚼 baby_symbol
|
||
🚾 wc water closet
|
||
🛂 passport_control
|
||
🛃 customs
|
||
🛄 baggage_claim
|
||
🛅 left_luggage
|
||
⚠️ warning sign
|
||
🚸 children_crossing
|
||
⛔ no_entry
|
||
🚫 no_entry_sign
|
||
🚳 no_bicycles
|
||
🚭 no_smoking symbol
|
||
🚯 do_not_litter symbol
|
||
🚱 non-potable_water non-potable symbol
|
||
🚷 no_pedestrians
|
||
📵 no_mobile_phones
|
||
🔞 underage no one under eighteen symbol
|
||
☢️ radioactive_sign
|
||
☣️ biohazard_sign
|
||
⬆️ arrow_up upwards black
|
||
↗️ arrow_upper_right north east
|
||
➡️ arrow_right black rightwards
|
||
↘️ arrow_lower_right south east
|
||
⬇️ arrow_down downwards black
|
||
↙️ arrow_lower_left south west
|
||
⬅️ arrow_left leftwards black
|
||
↖️ arrow_upper_left north west
|
||
↕️ arrow_up_down
|
||
↔️ left_right_arrow
|
||
↩️ leftwards_arrow_with_hook
|
||
↪️ arrow_right_hook rightwards
|
||
⤴️ arrow_heading_up pointing rightwards then curving upwards
|
||
⤵️ arrow_heading_down pointing rightwards then curving downwards
|
||
🔃 arrows_clockwise downwards upwards open circle
|
||
🔄 arrows_counterclockwise anticlockwise downwards upwards open circle
|
||
🔙 back leftwards arrow above
|
||
🔚 end leftwards arrow above
|
||
🔛 on exclamation mark left right arrow above
|
||
🔜 soon rightwards arrow above
|
||
🔝 top upwards arrow above
|
||
🛐 place_of_worship
|
||
⚛️ atom_symbol
|
||
🕉️ om_symbol
|
||
✡️ star_of_david
|
||
☸️ wheel_of_dharma
|
||
☯️ yin_yang
|
||
✝️ latin_cross
|
||
☦️ orthodox_cross
|
||
☪️ star_and_crescent
|
||
☮️ peace_symbol
|
||
🕎 menorah_with_nine_branches
|
||
🔯 six_pointed_star middle dot
|
||
🪯 khanda
|
||
♈ aries
|
||
♉ taurus
|
||
♊ gemini
|
||
♋ cancer
|
||
♌ leo
|
||
♍ virgo
|
||
♎ libra
|
||
♏ scorpius
|
||
♐ sagittarius
|
||
♑ capricorn
|
||
♒ aquarius
|
||
♓ pisces
|
||
⛎ ophiuchus
|
||
🔀 twisted_rightwards_arrows
|
||
🔁 repeat clockwise rightwards leftwards open circle arrows
|
||
🔂 repeat_one clockwise rightwards leftwards open circle arrows circled overlay
|
||
▶️ arrow_forward black right-pointing triangle
|
||
⏩ fast_forward black right-pointing double triangle
|
||
⏭️ black_right_pointing_double_triangle_with_vertical_bar next track button
|
||
⏯️ black_right_pointing_triangle_with_double_vertical_bar play pause button
|
||
◀️ arrow_backward black left-pointing triangle
|
||
⏪ rewind black left-pointing double triangle
|
||
⏮️ black_left_pointing_double_triangle_with_vertical_bar last track button
|
||
🔼 arrow_up_small up-pointing red triangle
|
||
⏫ arrow_double_up black up-pointing triangle
|
||
🔽 arrow_down_small down-pointing red triangle
|
||
⏬ arrow_double_down black down-pointing triangle
|
||
⏸️ double_vertical_bar pause button
|
||
⏹️ black_square_for_stop button
|
||
⏺️ black_circle_for_record button
|
||
⏏️ eject button
|
||
🎦 cinema
|
||
🔅 low_brightness symbol
|
||
🔆 high_brightness symbol
|
||
📶 signal_strength antenna bars
|
||
🛜 wireless
|
||
📳 vibration_mode
|
||
📴 mobile_phone_off
|
||
♀️ female_sign
|
||
♂️ male_sign
|
||
⚧️ transgender_symbol
|
||
✖️ heavy_multiplication_x
|
||
➕ heavy_plus_sign
|
||
➖ heavy_minus_sign
|
||
➗ heavy_division_sign
|
||
🟰 heavy_equals_sign
|
||
♾️ infinity
|
||
‼️ bangbang double exclamation mark
|
||
⁉️ interrobang exclamation question mark
|
||
❓ question black mark ornament
|
||
❔ grey_question white mark ornament
|
||
❕ grey_exclamation white mark ornament
|
||
❗ exclamation heavy_exclamation_mark symbol
|
||
〰️ wavy_dash
|
||
💱 currency_exchange
|
||
💲 heavy_dollar_sign
|
||
⚕️ medical_symbol staff_of_aesculapius
|
||
♻️ recycle black universal recycling symbol
|
||
⚜️ fleur_de_lis fleur-de-lis
|
||
🔱 trident emblem
|
||
📛 name_badge
|
||
🔰 beginner japanese symbol
|
||
⭕ o heavy large circle
|
||
✅ white_check_mark heavy
|
||
☑️ ballot_box_with_check
|
||
✔️ heavy_check_mark
|
||
❌ x cross mark
|
||
❎ negative_squared_cross_mark
|
||
➰ curly_loop
|
||
➿ loop double curly
|
||
〽️ part_alternation_mark
|
||
✳️ eight_spoked_asterisk
|
||
✴️ eight_pointed_black_star
|
||
❇️ sparkle
|
||
©️ copyright sign
|
||
®️ registered sign
|
||
™️ tm trade mark sign
|
||
splatter
|
||
#️⃣ hash key
|
||
*️⃣ keycap_star
|
||
0️⃣ zero keycap 0
|
||
1️⃣ one keycap 1
|
||
2️⃣ two keycap 2
|
||
3️⃣ three keycap 3
|
||
4️⃣ four keycap 4
|
||
5️⃣ five keycap 5
|
||
6️⃣ six keycap 6
|
||
7️⃣ seven keycap 7
|
||
8️⃣ eight keycap 8
|
||
9️⃣ nine keycap 9
|
||
🔟 keycap_ten
|
||
🔠 capital_abcd input symbol latin letters
|
||
🔡 abcd input symbol latin small letters
|
||
🔢 1234 input symbol numbers
|
||
🔣 symbols input symbol
|
||
🔤 abc input symbol latin letters
|
||
🅰️ a negative squared latin capital letter
|
||
🆎 ab negative squared
|
||
🅱️ b negative squared latin capital letter
|
||
🆑 cl squared
|
||
🆒 cool squared
|
||
🆓 free squared
|
||
ℹ️ information_source
|
||
🆔 id squared
|
||
Ⓜ️ m circled latin capital letter
|
||
🆕 new squared
|
||
🆖 ng squared
|
||
🅾️ o2 negative squared latin capital letter o
|
||
🆗 ok squared
|
||
🅿️ parking negative squared latin capital letter p
|
||
🆘 sos squared
|
||
🆙 up squared exclamation mark
|
||
🆚 vs squared
|
||
🈁 koko squared katakana
|
||
🈂️ sa squared katakana
|
||
🈷️ u6708 squared cjk unified ideograph-6708
|
||
🈶 u6709 squared cjk unified ideograph-6709
|
||
🈯 u6307 squared cjk unified ideograph-6307
|
||
🉐 ideograph_advantage circled
|
||
🈹 u5272 squared cjk unified ideograph-5272
|
||
🈚 u7121 squared cjk unified ideograph-7121
|
||
🈲 u7981 squared cjk unified ideograph-7981
|
||
🉑 accept circled ideograph
|
||
🈸 u7533 squared cjk unified ideograph-7533
|
||
🈴 u5408 squared cjk unified ideograph-5408
|
||
🈳 u7a7a squared cjk unified ideograph-7a7a
|
||
㊗️ congratulations circled ideograph congratulation
|
||
㊙️ secret circled ideograph
|
||
🈺 u55b6 squared cjk unified ideograph-55b6
|
||
🈵 u6e80 squared cjk unified ideograph-6e80
|
||
🔴 red_circle large
|
||
🟠 large_orange_circle
|
||
🟡 large_yellow_circle
|
||
🟢 large_green_circle
|
||
🔵 large_blue_circle
|
||
🟣 large_purple_circle
|
||
🟤 large_brown_circle
|
||
⚫ black_circle medium
|
||
⚪ white_circle medium
|
||
🟥 large_red_square
|
||
🟧 large_orange_square
|
||
🟨 large_yellow_square
|
||
🟩 large_green_square
|
||
🟦 large_blue_square
|
||
🟪 large_purple_square
|
||
🟫 large_brown_square
|
||
⬛ black_large_square
|
||
⬜ white_large_square
|
||
◼️ black_medium_square
|
||
◻️ white_medium_square
|
||
◾ black_medium_small_square
|
||
◽ white_medium_small_square
|
||
▪️ black_small_square
|
||
▫️ white_small_square
|
||
🔶 large_orange_diamond
|
||
🔷 large_blue_diamond
|
||
🔸 small_orange_diamond
|
||
🔹 small_blue_diamond
|
||
🔺 small_red_triangle up-pointing
|
||
🔻 small_red_triangle_down down-pointing
|
||
💠 diamond_shape_with_a_dot_inside
|
||
🔘 radio_button
|
||
🔳 white_square_button
|
||
🔲 black_square_button
|
||
🏁 checkered_flag chequered
|
||
🚩 triangular_flag_on_post
|
||
🎌 crossed_flags
|
||
🏴 waving_black_flag
|
||
🏳️ waving_white_flag
|
||
🏳️🌈 rainbow-flag
|
||
🏳️⚧️ transgender_flag
|
||
🏴☠️ pirate_flag
|
||
🇦🇨 flag-ac ascension island
|
||
🇦🇩 flag-ad andorra
|
||
🇦🇪 flag-ae united arab emirates
|
||
🇦🇫 flag-af afghanistan
|
||
🇦🇬 flag-ag antigua barbuda
|
||
🇦🇮 flag-ai anguilla
|
||
🇦🇱 flag-al albania
|
||
🇦🇲 flag-am armenia
|
||
🇦🇴 flag-ao angola
|
||
🇦🇶 flag-aq antarctica
|
||
🇦🇷 flag-ar argentina
|
||
🇦🇸 flag-as american samoa
|
||
🇦🇹 flag-at austria
|
||
🇦🇺 flag-au australia
|
||
🇦🇼 flag-aw aruba
|
||
🇦🇽 flag-ax land islands
|
||
🇦🇿 flag-az azerbaijan
|
||
🇧🇦 flag-ba bosnia herzegovina
|
||
🇧🇧 flag-bb barbados
|
||
🇧🇩 flag-bd bangladesh
|
||
🇧🇪 flag-be belgium
|
||
🇧🇫 flag-bf burkina faso
|
||
🇧🇬 flag-bg bulgaria
|
||
🇧🇭 flag-bh bahrain
|
||
🇧🇮 flag-bi burundi
|
||
🇧🇯 flag-bj benin
|
||
🇧🇱 flag-bl st barth lemy
|
||
🇧🇲 flag-bm bermuda
|
||
🇧🇳 flag-bn brunei
|
||
🇧🇴 flag-bo bolivia
|
||
🇧🇶 flag-bq caribbean netherlands
|
||
🇧🇷 flag-br brazil
|
||
🇧🇸 flag-bs bahamas
|
||
🇧🇹 flag-bt bhutan
|
||
🇧🇻 flag-bv bouvet island
|
||
🇧🇼 flag-bw botswana
|
||
🇧🇾 flag-by belarus
|
||
🇧🇿 flag-bz belize
|
||
🇨🇦 flag-ca canada
|
||
🇨🇨 flag-cc cocos keeling islands
|
||
🇨🇩 flag-cd congo - kinshasa
|
||
🇨🇫 flag-cf central african republic
|
||
🇨🇬 flag-cg congo - brazzaville
|
||
🇨🇭 flag-ch switzerland
|
||
🇨🇮 flag-ci c te d ivoire
|
||
🇨🇰 flag-ck cook islands
|
||
🇨🇱 flag-cl chile
|
||
🇨🇲 flag-cm cameroon
|
||
🇨🇳 cn flag-cn china
|
||
🇨🇴 flag-co colombia
|
||
🇨🇵 flag-cp clipperton island
|
||
🇨🇶 flag-sark
|
||
🇨🇷 flag-cr costa rica
|
||
🇨🇺 flag-cu cuba
|
||
🇨🇻 flag-cv cape verde
|
||
🇨🇼 flag-cw cura ao
|
||
🇨🇽 flag-cx christmas island
|
||
🇨🇾 flag-cy cyprus
|
||
🇨🇿 flag-cz czechia
|
||
🇩🇪 de flag-de germany
|
||
🇩🇬 flag-dg diego garcia
|
||
🇩🇯 flag-dj djibouti
|
||
🇩🇰 flag-dk denmark
|
||
🇩🇲 flag-dm dominica
|
||
🇩🇴 flag-do dominican republic
|
||
🇩🇿 flag-dz algeria
|
||
🇪🇦 flag-ea ceuta melilla
|
||
🇪🇨 flag-ec ecuador
|
||
🇪🇪 flag-ee estonia
|
||
🇪🇬 flag-eg egypt
|
||
🇪🇭 flag-eh western sahara
|
||
🇪🇷 flag-er eritrea
|
||
🇪🇸 es flag-es spain
|
||
🇪🇹 flag-et ethiopia
|
||
🇪🇺 flag-eu european union
|
||
🇫🇮 flag-fi finland
|
||
🇫🇯 flag-fj fiji
|
||
🇫🇰 flag-fk falkland islands
|
||
🇫🇲 flag-fm micronesia
|
||
🇫🇴 flag-fo faroe islands
|
||
🇫🇷 fr flag-fr france
|
||
🇬🇦 flag-ga gabon
|
||
🇬🇧 gb uk flag-gb united kingdom
|
||
🇬🇩 flag-gd grenada
|
||
🇬🇪 flag-ge georgia
|
||
🇬🇫 flag-gf french guiana
|
||
🇬🇬 flag-gg guernsey
|
||
🇬🇭 flag-gh ghana
|
||
🇬🇮 flag-gi gibraltar
|
||
🇬🇱 flag-gl greenland
|
||
🇬🇲 flag-gm gambia
|
||
🇬🇳 flag-gn guinea
|
||
🇬🇵 flag-gp guadeloupe
|
||
🇬🇶 flag-gq equatorial guinea
|
||
🇬🇷 flag-gr greece
|
||
🇬🇸 flag-gs south georgia sandwich islands
|
||
🇬🇹 flag-gt guatemala
|
||
🇬🇺 flag-gu guam
|
||
🇬🇼 flag-gw guinea-bissau
|
||
🇬🇾 flag-gy guyana
|
||
🇭🇰 flag-hk hong kong sar china
|
||
🇭🇲 flag-hm heard mcdonald islands
|
||
🇭🇳 flag-hn honduras
|
||
🇭🇷 flag-hr croatia
|
||
🇭🇹 flag-ht haiti
|
||
🇭🇺 flag-hu hungary
|
||
🇮🇨 flag-ic canary islands
|
||
🇮🇩 flag-id indonesia
|
||
🇮🇪 flag-ie ireland
|
||
🇮🇱 flag-il israel
|
||
🇮🇲 flag-im isle man
|
||
🇮🇳 flag-in india
|
||
🇮🇴 flag-io british indian ocean territory
|
||
🇮🇶 flag-iq iraq
|
||
🇮🇷 flag-ir iran
|
||
🇮🇸 flag-is iceland
|
||
🇮🇹 it flag-it italy
|
||
🇯🇪 flag-je jersey
|
||
🇯🇲 flag-jm jamaica
|
||
🇯🇴 flag-jo jordan
|
||
🇯🇵 jp flag-jp japan
|
||
🇰🇪 flag-ke kenya
|
||
🇰🇬 flag-kg kyrgyzstan
|
||
🇰🇭 flag-kh cambodia
|
||
🇰🇮 flag-ki kiribati
|
||
🇰🇲 flag-km comoros
|
||
🇰🇳 flag-kn st kitts nevis
|
||
🇰🇵 flag-kp north korea
|
||
🇰🇷 kr flag-kr south korea
|
||
🇰🇼 flag-kw kuwait
|
||
🇰🇾 flag-ky cayman islands
|
||
🇰🇿 flag-kz kazakhstan
|
||
🇱🇦 flag-la laos
|
||
🇱🇧 flag-lb lebanon
|
||
🇱🇨 flag-lc st lucia
|
||
🇱🇮 flag-li liechtenstein
|
||
🇱🇰 flag-lk sri lanka
|
||
🇱🇷 flag-lr liberia
|
||
🇱🇸 flag-ls lesotho
|
||
🇱🇹 flag-lt lithuania
|
||
🇱🇺 flag-lu luxembourg
|
||
🇱🇻 flag-lv latvia
|
||
🇱🇾 flag-ly libya
|
||
🇲🇦 flag-ma morocco
|
||
🇲🇨 flag-mc monaco
|
||
🇲🇩 flag-md moldova
|
||
🇲🇪 flag-me montenegro
|
||
🇲🇫 flag-mf st martin
|
||
🇲🇬 flag-mg madagascar
|
||
🇲🇭 flag-mh marshall islands
|
||
🇲🇰 flag-mk north macedonia
|
||
🇲🇱 flag-ml mali
|
||
🇲🇲 flag-mm myanmar burma
|
||
🇲🇳 flag-mn mongolia
|
||
🇲🇴 flag-mo macao sar china
|
||
🇲🇵 flag-mp northern mariana islands
|
||
🇲🇶 flag-mq martinique
|
||
🇲🇷 flag-mr mauritania
|
||
🇲🇸 flag-ms montserrat
|
||
🇲🇹 flag-mt malta
|
||
🇲🇺 flag-mu mauritius
|
||
🇲🇻 flag-mv maldives
|
||
🇲🇼 flag-mw malawi
|
||
🇲🇽 flag-mx mexico
|
||
🇲🇾 flag-my malaysia
|
||
🇲🇿 flag-mz mozambique
|
||
🇳🇦 flag-na namibia
|
||
🇳🇨 flag-nc new caledonia
|
||
🇳🇪 flag-ne niger
|
||
🇳🇫 flag-nf norfolk island
|
||
🇳🇬 flag-ng nigeria
|
||
🇳🇮 flag-ni nicaragua
|
||
🇳🇱 flag-nl netherlands
|
||
🇳🇴 flag-no norway
|
||
🇳🇵 flag-np nepal
|
||
🇳🇷 flag-nr nauru
|
||
🇳🇺 flag-nu niue
|
||
🇳🇿 flag-nz new zealand
|
||
🇴🇲 flag-om oman
|
||
🇵🇦 flag-pa panama
|
||
🇵🇪 flag-pe peru
|
||
🇵🇫 flag-pf french polynesia
|
||
🇵🇬 flag-pg papua new guinea
|
||
🇵🇭 flag-ph philippines
|
||
🇵🇰 flag-pk pakistan
|
||
🇵🇱 flag-pl poland
|
||
🇵🇲 flag-pm st pierre miquelon
|
||
🇵🇳 flag-pn pitcairn islands
|
||
🇵🇷 flag-pr puerto rico
|
||
🇵🇸 flag-ps palestinian territories
|
||
🇵🇹 flag-pt portugal
|
||
🇵🇼 flag-pw palau
|
||
🇵🇾 flag-py paraguay
|
||
🇶🇦 flag-qa qatar
|
||
🇷🇪 flag-re r union
|
||
🇷🇴 flag-ro romania
|
||
🇷🇸 flag-rs serbia
|
||
🇷🇺 ru flag-ru russia
|
||
🇷🇼 flag-rw rwanda
|
||
🇸🇦 flag-sa saudi arabia
|
||
🇸🇧 flag-sb solomon islands
|
||
🇸🇨 flag-sc seychelles
|
||
🇸🇩 flag-sd sudan
|
||
🇸🇪 flag-se sweden
|
||
🇸🇬 flag-sg singapore
|
||
🇸🇭 flag-sh st helena
|
||
🇸🇮 flag-si slovenia
|
||
🇸🇯 flag-sj svalbard jan mayen
|
||
🇸🇰 flag-sk slovakia
|
||
🇸🇱 flag-sl sierra leone
|
||
🇸🇲 flag-sm san marino
|
||
🇸🇳 flag-sn senegal
|
||
🇸🇴 flag-so somalia
|
||
🇸🇷 flag-sr suriname
|
||
🇸🇸 flag-ss south sudan
|
||
🇸🇹 flag-st s o tom pr ncipe
|
||
🇸🇻 flag-sv el salvador
|
||
🇸🇽 flag-sx sint maarten
|
||
🇸🇾 flag-sy syria
|
||
🇸🇿 flag-sz eswatini
|
||
🇹🇦 flag-ta tristan da cunha
|
||
🇹🇨 flag-tc turks caicos islands
|
||
🇹🇩 flag-td chad
|
||
🇹🇫 flag-tf french southern territories
|
||
🇹🇬 flag-tg togo
|
||
🇹🇭 flag-th thailand
|
||
🇹🇯 flag-tj tajikistan
|
||
🇹🇰 flag-tk tokelau
|
||
🇹🇱 flag-tl timor-leste
|
||
🇹🇲 flag-tm turkmenistan
|
||
🇹🇳 flag-tn tunisia
|
||
🇹🇴 flag-to tonga
|
||
🇹🇷 flag-tr t rkiye
|
||
🇹🇹 flag-tt trinidad tobago
|
||
🇹🇻 flag-tv tuvalu
|
||
🇹🇼 flag-tw taiwan
|
||
🇹🇿 flag-tz tanzania
|
||
🇺🇦 flag-ua ukraine
|
||
🇺🇬 flag-ug uganda
|
||
🇺🇲 flag-um u s outlying islands
|
||
🇺🇳 flag-un united nations
|
||
🇺🇸 us flag-us united states
|
||
🇺🇾 flag-uy uruguay
|
||
🇺🇿 flag-uz uzbekistan
|
||
🇻🇦 flag-va vatican city
|
||
🇻🇨 flag-vc st vincent grenadines
|
||
🇻🇪 flag-ve venezuela
|
||
🇻🇬 flag-vg british virgin islands
|
||
🇻🇮 flag-vi u s virgin islands
|
||
🇻🇳 flag-vn vietnam
|
||
🇻🇺 flag-vu vanuatu
|
||
🇼🇫 flag-wf wallis futuna
|
||
🇼🇸 flag-ws samoa
|
||
🇽🇰 flag-xk kosovo
|
||
🇾🇪 flag-ye yemen
|
||
🇾🇹 flag-yt mayotte
|
||
🇿🇦 flag-za south africa
|
||
🇿🇲 flag-zm zambia
|
||
🇿🇼 flag-zw zimbabwe
|
||
🏴 flag-england
|
||
🏴 flag-scotland
|
||
🏴 flag-wales`,Qp=/(?<=^|[\s([{"'«])(?::)(?<query>[a-zA-Z0-9_+-]{1,64})$/,$p=/[-_]/,em,tm=e=>e.split(`
|
||
`).map(e=>{let[t,n,r=``]=e.split(` `),[i,...a]=n.split(` `);return{emoji:t,name:i,aliases:[...a,...r?r.split(` `):[]]}}),nm=(e,t)=>{let n=e.split($p);return e===t?0:e.startsWith(t)&&$p.test(e.charAt(t.length))?1:n.includes(t)?2:e.startsWith(t)||n.some(e=>e.startsWith(t))?4:9},rm=(e,t)=>e.includes(t)?3:e.some(e=>e.startsWith(t))?5:9,im=({name:e,aliases:t},n)=>{let r=nm(e,n),i=rm(t,n);return{rank:Math.min(r,i),nameRank:r}},am=({name:e,aliases:t},n)=>{if(nm(e,n)<9)return e.split($p).length;let r=t.findIndex(e=>e===n||e.startsWith(n));return(r>-1?r:t.length)*100+t.length},om=e=>{let t=e.toLowerCase();return t?(em??=tm(bee),em.map(e=>{let{rank:n,nameRank:r}=im(e,t);return{entry:e,rank:n,nameRank:r,centrality:am(e,t)}}).filter(({rank:e})=>e<9).sort((e,t)=>e.rank-t.rank||e.nameRank-t.nameRank||e.centrality-t.centrality).slice(0,50).map(({entry:e})=>e)):[]},sm=(e,t)=>/^\s/.test(t)?e:`${e} `,cm=e=>e.match(Qp)?.groups?.query,lm=U(`<div role="option" class="option svelte-1ra4ohl" tabindex="-1"><span role="none" class="emoji svelte-1ra4ohl"> </span> <span role="none" class="name svelte-1ra4ohl"> </span></div>`),xee=U(`<div role="listbox" class="sui emoji-suggestions svelte-1ra4ohl" popover="manual"></div>`),See={hash:`svelte-1ra4ohl`,code:`.emoji-suggestions.svelte-1ra4ohl {position:fixed;inset:auto;z-index:1000;display:flex;flex-direction:column;overflow-y:auto;margin:0;border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);width:280px;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;}.option.svelte-1ra4ohl {flex:none;display:flex;align-items:center;gap:8px;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);min-height:var(--sui-option-height);cursor:default;}.option[aria-selected=true].svelte-1ra4ohl {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.option.svelte-1ra4ohl .emoji:where(.svelte-1ra4ohl) {flex:none;width:1.5em;font-size:var(--sui-font-size-large);text-align:center;}.option.svelte-1ra4ohl .name:where(.svelte-1ra4ohl) {flex:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}`};function um(e,t){let n=tc();O(t,!0),J(e,See);let r=X(t,`ariaOwner`,3,void 0),i=P(void 0),a=P(ao([])),o=P(0),s=P(void 0),c=P(void 0),l=P(void 0),u=N(()=>!!H(i)&&!!H(a).length),d=P(0),f=P(0),p=N(()=>H(d)?H(d)*5+H(f):180),m=N(()=>{if(!H(s))return;let{innerWidth:e,innerHeight:t}=window,n=t-H(s).bottom,r=H(s).top,i=n<H(p)+8&&r>n,a=Hd()?H(s).right-280:H(s).left;return{top:i?void 0:`${Math.round(H(s).bottom+4)}px`,bottom:i?`${Math.round(t-H(s).top+4)}px`:void 0,left:`${Math.round(Math.max(8,Math.min(a,e-280-8)))}px`,maxHeight:`${Math.round(Math.min(H(p),(i?r:n)-4-8))}px`}}),h=()=>H(u),g=(e=!1)=>{Ds(()=>{F(l,e&&H(i)?H(i).id:void 0,!0),F(i,void 0),F(a,[],!0),F(o,0),F(s,void 0)})},_=e=>{if(!e){(H(i)||H(l))&&g();return}if(H(l)===e.id)return;let{id:n,query:r}=e;if(F(l,void 0),F(s,t.getAnchorRect(e),!0),H(i)?.id===n&&H(i).query===r){F(i,e,!0);return}F(i,e,!0),F(a,om(r),!0),F(o,0)},v=e=>{let{length:t}=H(a);t&&F(o,(H(o)+e+t)%t)},y=()=>{let e=H(a)[H(o)];e&&H(i)&&t.onSelect(e,H(i)),g()},b=e=>{let{key:t,altKey:n,ctrlKey:r,metaKey:i,shiftKey:a}=e;if(!H(u)||n||r||i)return!1;if(t===`ArrowDown`||t===`ArrowUp`)v(t===`ArrowDown`?1:-1);else if((t===`Enter`||t===`Tab`)&&!a)y();else if(t===`Escape`)g(!0);else return!1;return e.preventDefault(),!0};B(()=>{if(H(a),!H(c))return;H(c).matches(`:popover-open`)||H(c).showPopover?.();let e=H(c).querySelector(`.option`);if(e){let{paddingTop:t,paddingBottom:n,borderTopWidth:r,borderBottomWidth:i}=getComputedStyle(H(c));F(d,e.getBoundingClientRect().height,!0),F(f,Number.parseFloat(t)+Number.parseFloat(n)+Number.parseFloat(r)+Number.parseFloat(i))}}),B(()=>{if(!r())return;let e=r();return e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-haspopup`,`listbox`),()=>{e.removeAttribute(`aria-autocomplete`),e.removeAttribute(`aria-haspopup`)}}),B(()=>{if(!r())return;let e=r();return H(u)?(e.setAttribute(`aria-controls`,n),e.setAttribute(`aria-activedescendant`,`${n}-option-${H(o)}`)):(e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-activedescendant`)),()=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-activedescendant`)}}),B(()=>{H(o),H(c)?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`,behavior:`instant`})}),Nl(()=>{let e=()=>{H(i)&&F(s,t.getAnchorRect(H(i)),!0)},n=({target:e})=>{let t=e;!H(u)||H(c)?.contains(t)||r()?.contains(t)||g()};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),window.addEventListener(`resize`,e,{passive:!0}),document.addEventListener(`pointerdown`,n,{capture:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0}),window.removeEventListener(`resize`,e),document.removeEventListener(`pointerdown`,n,{capture:!0})}});var x={isOpen:h,close:g,update:_,moveSelection:v,selectHighlighted:y,handleKeyDown:b},S=W(),C=L(S),w=e=>{var t=xee();let r;Cc(t,23,()=>H(a),e=>e.emoji,(e,t,r)=>{var i=lm(),a=I(i),s=R(a,!0),c=R(z(a,2));D(i),V(()=>{Y(i,`id`,`${n}-option-${H(r)??``}`),Y(i,`aria-selected`,H(r)===H(o)),K(s,H(t).emoji),K(c,`:${H(t).name??``}:`)}),Ws(`mouseenter`,i,()=>{F(o,H(r),!0)}),Gs(`mousedown`,i,e=>{e.preventDefault(),F(o,H(r),!0),y()}),G(e,i)}),D(t),Ol(t,e=>F(c,e),()=>H(c)),V(e=>{Y(t,`id`,n),Y(t,`aria-label`,e),r=nl(t,``,r,{top:H(m).top,bottom:H(m).bottom,left:H(m).left,"max-height":H(m).maxHeight})},[()=>Z(`_sui.emoji_suggestions`)]),G(e,t)};return q(C,e=>{H(u)&&H(m)&&e(w)}),G(e,S),k(x)}Ks([`mousedown`]);function dm(e,t){O(t,!0);let n=X(t,`element`,3,void 0),r=P(void 0),i=()=>{if(!n()||n().disabled||n().readOnly)return;let{value:e,selectionStart:t,selectionEnd:r}=n();if(t===null||t!==r)return;let i=cm(e.slice(0,t));if(i===void 0)return;let a=t-i.length-1;return{id:String(a),query:i,start:a,end:t}};B(()=>{if(!n()||!H(r))return;let e=n(),t=()=>{H(r)?.update(i())},a=e=>{H(r)?.handleKeyDown(e)},o=()=>{H(r)?.close()};return e.addEventListener(`keydown`,a),e.addEventListener(`keyup`,t),e.addEventListener(`input`,t),e.addEventListener(`mouseup`,t),e.addEventListener(`blur`,o),()=>{e.removeEventListener(`keydown`,a),e.removeEventListener(`keyup`,t),e.removeEventListener(`input`,t),e.removeEventListener(`mouseup`,t),e.removeEventListener(`blur`,o),H(r)?.close()}}),Ol(um(e,{getAnchorRect:e=>{let{start:t,end:r}=e;return n()?yee(n(),t,r):void 0},onSelect:(e,t)=>{let{query:r,start:i,end:a}=t;if(!n()||n().value.slice(i,a)!==`:${r}`)return;let o=sm(e.emoji,n().value.slice(a));n().focus(),n().setSelectionRange(i,a);let s=!1;try{s=document.execCommand(`insertText`,!1,o)}catch{s=!1}s||(n().setRangeText(o,i,a,`end`),n().dispatchEvent(new Event(`input`,{bubbles:!0})))},get ariaOwner(){return n()}}),e=>F(r,e,!0),()=>H(r)),k()}var Cee=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`element`,`role`,`keyShortcuts`,`dir`,`name`,`showInlineLabel`,`inputmode`,`flex`,`monospace`,`debounce`,`useEmojiAutocomplete`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`ariaLabel`,`children`,`oninput`]),wee=U(`<span aria-hidden="true"><!></span>`),Tee=U(`<div role="none"><input/> <!> <!></div>`),Eee={hash:`svelte-nm78dz`,code:`.text-input.svelte-nm78dz {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.text-input.flex.svelte-nm78dz:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.text-input.monospace.svelte-nm78dz {--sui-textbox-font-family: var(--sui-font-family-monospace, monospace);}input.svelte-nm78dz:is(:where(.svelte-nm78dz):-webkit-autofill, :where(.svelte-nm78dz):-webkit-autofill:focus) {transition:background-color 0s 600000s, color 0s 600000s;}input.svelte-nm78dz {display:inline-block;flex:auto;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-singleline-padding);min-width:0;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-singleline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}input.svelte-nm78dz:focus {color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}input.svelte-nm78dz:read-only {color:var(--sui-tertiary-foreground-color);border-color:var(--sui-textbox-border-color) !important;}input.svelte-nm78dz:is(:where(.svelte-nm78dz):disabled, :where(.svelte-nm78dz):read-only) {background-color:var(--sui-disabled-background-color);}input[aria-invalid=true].svelte-nm78dz {border-color:var(--sui-error-border-color);}input.svelte-nm78dz ~ button {flex:none;margin-inline-start:-1px;border-width:1px;border-color:var(--sui-textbox-border-color);height:var(--sui-textbox-height);aspect-ratio:1/1;}input.svelte-nm78dz ~ button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}input.svelte-nm78dz ~ button .icon {font-size:var(--sui-font-size-xx-large);}.label.svelte-nm78dz {position:absolute;inset:var(--sui-textbox-singleline-padding);z-index:2;display:flex;align-items:center;justify-content:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));pointer-events:none;}.label.hidden.svelte-nm78dz {opacity:0;}input.svelte-nm78dz:focus + .label:where(.svelte-nm78dz) {opacity:0;}input.svelte-nm78dz::placeholder,
|
||
.label.svelte-nm78dz {color:var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));opacity:var(--sui-textbox-placeholder-opacity, 0.5);font-family:var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));font-size:var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));line-height:var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));font-weight:var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal)));text-align:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));text-indent:var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));letter-spacing:var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));}`};function fm(e,t){let n=tc();O(t,!0),J(e,Eee);let r=X(t,`value`,15),i=X(t,`element`,15),a=X(t,`role`,3,`textbox`),o=X(t,`keyShortcuts`,3,void 0),s=X(t,`dir`,3,void 0),c=X(t,`name`,3,void 0),l=X(t,`showInlineLabel`,3,!1),u=X(t,`inputmode`,3,`text`),d=X(t,`flex`,3,!1),f=X(t,`monospace`,3,!1),p=X(t,`debounce`,3,!1),m=X(t,`useEmojiAutocomplete`,3,!1),h=X(t,`hidden`,3,!1),g=X(t,`disabled`,3,!1),_=X(t,`readonly`,3,!1),v=X(t,`required`,3,!1),y=X(t,`invalid`,3,!1),b=X(t,`ariaLabel`,3,void 0),x=Al(t,Cee),S=N(()=>typeof p()==`number`?p():300),C=0;B(()=>()=>{clearTimeout(C)});let w=e=>{r(i()?.value),t.oninput?.(e)},T=e=>{let t=e;p()?(clearTimeout(C),C=setTimeout(()=>{w(t)},H(S))):w(t)};var E=Tee();let ee;var te=I(E);bl(te,()=>({...x,value:r(),type:`text`,role:a(),dir:s(),name:c(),tabindex:g()?-1:0,disabled:g()||void 0,readonly:_()||void 0,inputmode:u(),"aria-label":b(),"aria-hidden":h(),"aria-disabled":g(),"aria-readonly":_(),"aria-required":v(),"aria-invalid":y(),oninputcapture:T}),void 0,void 0,void 0,`svelte-nm78dz`,!0),Ol(te,e=>i(e),()=>i()),Gc(te,()=>mf(o()));var ne=z(te,2),re=e=>{dm(e,{get element(){return i()}})};q(ne,e=>{m()&&!g()&&!_()&&e(re)});var ie=z(ne,2),ae=e=>{var t=wee();let i;_f(I(t),{children:(e,t)=>{mi();var n=ec();V(()=>K(n,b())),G(e,n)},$$slots:{default:!0}}),D(t),V(()=>{Y(t,`id`,`${n}-label`),i=el(t,1,`label svelte-nm78dz`,null,i,{hidden:!!r()})}),G(e,t)};q(ie,e=>{b()&&l()&&e(ae)}),D(E),V(()=>{ee=el(E,1,`sui text-input ${t.class??``}`,`svelte-nm78dz`,ee,{flex:d(),monospace:f(),disabled:g(),readonly:_()}),Y(E,`hidden`,h()),te.dir=te.dir}),G(e,E),k()}var Dee=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`,`textboxAttrs`,`children`,`input`,`onkeydown`,`onkeyup`,`onkeypress`,`oninput`]),Oee=U(`<!> <div class="input-outer svelte-vrh0iw"><!></div>`,1),kee={hash:`svelte-vrh0iw`,code:`.input-outer.svelte-vrh0iw {margin:12px 0 0;}`};function pm(e,t){O(t,!0),J(e,kee);let n=X(t,`open`,15,!1),r=X(t,`value`,15,``),i=X(t,`textboxAttrs`,19,()=>({})),a=Al(t,Dee);Yp(e,Ml(()=>a,{role:`alertdialog`,get open(){return n()},set open(e){n(e)},children:(e,n)=>{var a=Oee(),o=L(a);Ac(o,()=>t.children??br);var s=z(o,2),c=I(s),l=e=>{var n=W();Ac(L(n),()=>t.input),G(e,n)},u=e=>{fm(e,Ml({dir:`auto`,flex:!0,autofocus:!0},i,{get onkeydown(){return t.onkeydown},get onkeyup(){return t.onkeyup},get onkeypress(){return t.onkeypress},get oninput(){return t.oninput},get value(){return r()},set value(e){r(e)}}))};q(c,e=>{t.input?e(l):e(u,-1)}),D(s),G(e,a)},$$slots:{default:!0}})),k()}var Aee=U(`<input class="sui file-picker" type="file" hidden=""/>`);function mm(e,t){O(t,!0);let n=X(t,`accept`,3,void 0),r=X(t,`multiple`,3,!1),i=X(t,`onSelect`,3,void 0),a=X(t,`onCancel`,3,void 0),o=P(void 0);var s={open:()=>{H(o)?.click()}},c=Aee();return Ol(c,e=>F(o,e),()=>H(o)),V(()=>{Y(c,`accept`,n()),c.multiple=r()}),Gs(`change`,c,({target:e})=>{let t=[...e.files];i()?.({files:t,file:t[0]})}),Ws(`cancel`,c,e=>{e.stopPropagation(),a()?.()}),G(e,c),k(s)}Ks([`change`]);var jee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`label`,`children`]),Mee=U(`<div role="row" class="row-group-caption svelte-jdf39m"><!></div>`),Nee=U(`<div><!> <!></div>`),Pee={hash:`svelte-jdf39m`,code:`[role=rowgroup].svelte-jdf39m {display:table-row-group;}[role=row].svelte-jdf39m {display:table-row;}[role=columnheader].svelte-jdf39m {display:table-cell;padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);text-align:start;}`};function hm(e,t){let n=tc();J(e,Pee);let r=X(t,`label`,3,``),i=Al(t,jee);var a=Nee();bl(a,()=>({...i,role:`rowgroup`,class:`sui grid-body row-group ${t.class??``}`,"aria-labelledby":r()?`${n}-label`:void 0,"aria-roledescription":`grid body`}),void 0,void 0,void 0,`svelte-jdf39m`);var o=I(a),s=e=>{var t=Mee();Uc(I(t),()=>`th`,!1,(e,t)=>{bl(e,()=>({role:`columnheader`,id:`${n}-label`,colspan:`9999`,class:``}),void 0,void 0,void 0,`svelte-jdf39m`);var i=ec();V(()=>K(i,r())),G(t,i)}),D(t),G(e,t)};q(o,e=>{r()&&e(s)}),Ac(z(o,2),()=>t.children??br),D(a),G(e,a)}var Fee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Iee=U(`<div><!></div>`),Lee={hash:`svelte-1a9ntmu`,code:`.grid-cell.svelte-1a9ntmu {display:table-cell;}`};function gm(e,t){J(e,Lee);let n=Al(t,Fee);var r=Iee();bl(r,()=>({...n,role:`gridcell`,class:`sui grid-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-1a9ntmu`),Ac(I(r),()=>t.children??br),D(r),G(e,r)}var Ree=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`selected`,`children`]),zee=U(`<div><!></div>`),Bee={hash:`svelte-1y33zqm`,code:`.grid-row.svelte-1y33zqm {display:table-row;height:var(--sui-primary-row-height);}`};function _m(e,t){J(e,Bee);let n=X(t,`selected`,3,!1),r=Al(t,Ree);var i=zee();bl(i,()=>({...r,role:`row`,class:`sui grid-row ${t.class??``}`,tabindex:`0`,"aria-selected":n()}),void 0,void 0,void 0,`svelte-1y33zqm`),Ac(I(i),()=>t.children??br),D(i),G(e,i)}var Vee=new Set([`$$slots`,`$$events`,`$$legacy`,`element`,`class`,`multiple`,`clickToSelect`,`ariaLabel`,`children`,`onChange`]),Hee=U(`<div><!></div>`),Uee={hash:`svelte-1rjzrmj`,code:`.grid.svelte-1rjzrmj {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.grid.data.svelte-1rjzrmj {border-collapse:collapse;}.grid.data.svelte-1rjzrmj :is(.grid-col-header, .grid-row-header, .grid-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`};function Wee(e,t){O(t,!0),J(e,Uee);let n=X(t,`element`,15),r=X(t,`multiple`,3,!1),i=X(t,`clickToSelect`,3,!0),a=X(t,`ariaLabel`,3,void 0),o=Al(t,Vee);var s=Hee(),c=e=>{t.onChange?.(e)};bl(s,()=>({...o,role:`grid`,class:`sui grid ${t.class??``}`,"aria-multiselectable":r(),"aria-label":a(),onChange:c}),void 0,void 0,void 0,`svelte-1rjzrmj`),Ac(I(s),()=>t.children??br),D(s),Ol(s,e=>n(e),()=>n()),Gc(s,()=>Dp({clickToSelect:i()})),G(e,s),k()}var Gee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`multiple`,`searchTerms`,`ariaLabel`,`children`,`onFilter`]),Kee=U(`<div><div role="none" class="inner svelte-5lby7x"><!></div></div>`),qee={hash:`svelte-5lby7x`,code:`[role=listbox].svelte-5lby7x {display:flex;flex-direction:column;margin:var(--sui-focus-ring-width);border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);min-width:var(--sui-listbox-min-width, calc(var(--sui-option-height) * 5));color:var(--sui-listbox-foreground-color);background-color:var(--sui-listbox-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}
|
||
@media (pointer: coarse) {[role=listbox].svelte-5lby7x {gap:8px 0;}
|
||
}[role=listbox].svelte-5lby7x [role=separator] {margin:4px 0;background-color:var(--sui-control-border-color);}[role=listbox][aria-invalid=true].svelte-5lby7x {border-color:var(--sui-error-border-color);}[role=listbox].tabs.svelte-5lby7x {padding:0;border-block-start-width:0;border-block-end-width:0;border-inline-end-width:1px;border-inline-start-width:0;border-color:var(--sui-control-border-color);}[role=listbox].tabs.svelte-5lby7x .option button {justify-content:flex-start;border-width:0;border-inline-end-width:2px;border-color:transparent;padding:0 12px;border-start-end-radius:0;border-end-end-radius:0;height:var(--sui-tab-medium-height);}[role=listbox].tabs.svelte-5lby7x .option button[aria-selected=true] {border-color:var(--sui-primary-accent-color-light);}[role=listbox].tabs.svelte-5lby7x .option button .icon {display:none;}[role=listbox].in-combobox.svelte-5lby7x:focus-visible {outline-color:transparent;}[role=listbox].filtered.svelte-5lby7x [role=separator] {display:none;}.inner.svelte-5lby7x {display:contents;}`};function vm(e,t){O(t,!0),J(e,qee);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`readonly`,3,!1),a=X(t,`required`,3,!1),o=X(t,`invalid`,3,!1),s=X(t,`multiple`,3,!1),c=X(t,`searchTerms`,3,``),l=X(t,`ariaLabel`,3,void 0),u=Al(t,Gee),d=P(!1);var f=Kee(),p=e=>{let{detail:{matched:n,total:r}}=e;F(d,n!==r),t.onFilter?.(e)};bl(f,()=>({...u,role:`listbox`,class:`sui listbox ${t.class??``}`,tabindex:r()?-1:0,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-multiselectable":s(),"aria-label":l(),onFilter:p,[ul]:{filtered:H(d)}}),void 0,void 0,void 0,`svelte-5lby7x`);var m=I(f);Ac(I(m),()=>t.children??br),D(m),D(f),Gc(f,()=>Dp(()=>({searchTerms:c()}))),V(()=>m.inert=r()),G(e,f),k()}var Jee=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`label`,`children`]),Yee=U(`<div><div role="none" class="label svelte-abkykl"><!></div> <div role="none" class="inner svelte-abkykl"><!></div></div>`),Xee={hash:`svelte-abkykl`,code:`.option-group.svelte-abkykl:not(:first-child) {margin:12px 0 0;}.label.svelte-abkykl {margin:8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.inner.svelte-abkykl {display:contents;}`};function ym(e,t){let n=tc();J(e,Xee);let r=X(t,`hidden`,3,!1),i=X(t,`disabled`,3,!1),a=X(t,`label`,3,``),o=Al(t,Jee);var s=Yee();bl(s,()=>({...o,role:`group`,id:n,class:`sui option-group ${t.class??``}`,hidden:r(),"aria-hidden":r(),"aria-disabled":i(),"aria-labelledby":`${n}-label`,"aria-roledescription":`option group`}),void 0,void 0,void 0,`svelte-abkykl`);var c=I(s);_f(I(c),{children:(e,t)=>{mi();var n=ec();V(()=>K(n,a())),G(e,n)},$$slots:{default:!0}}),D(c);var l=z(c,2);Ac(I(l),()=>t.children??br),D(l),D(s),V(()=>{Y(c,`id`,`${n}-label`),l.inert=i()}),G(e,s)}var Zee=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`hidden`,`class`,`disabled`,`label`,`value`,`searchValue`,`wrap`,`children`,`checkIcon`,`startIcon`,`onChange`,`onToggle`]),Qee=U(`<!> <!>`,1),$ee=U(`<div role="none"><!></div>`),ete={hash:`svelte-yamxib`,code:`.option.svelte-yamxib {display:contents;}.option.svelte-yamxib:focus-visible {outline-width:0 !important;}.option.svelte-yamxib .wrap button {white-space:normal;}.option.svelte-yamxib button {flex:none;display:flex;gap:4px;margin:0 !important;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);width:100%;height:auto;min-height:var(--sui-option-height);}.option.svelte-yamxib button:active {background-color:var(--sui-active-background-color);}.option.svelte-yamxib button[aria-selected=true] .icon.check {color:var(--sui-primary-accent-color-text);}.option.svelte-yamxib button * {flex:none;}.option.svelte-yamxib button .label {flex:auto;}.option.svelte-yamxib :is(.focused, button:hover) {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.option.svelte-yamxib .icon.check {margin:-2px;}`};function bm(e,t){let n=tc();O(t,!0),J(e,ete);let r=X(t,`selected`,15,!1),i=X(t,`hidden`,15,!1),a=X(t,`disabled`,3,!1),o=X(t,`value`,19,()=>t.label),s=X(t,`searchValue`,19,()=>t.label),c=X(t,`wrap`,3,!1),l=Al(t,Zee),u=vp();u&&Pl(u.register({get value(){return o()},get label(){return t.label},get name(){return t.name},get type(){return t.valueType??typeof o()},get selected(){return r()},set selected(e){r(e)},get disabled(){return a()}}));let d=N(()=>!u||u.expanded);var f=W(),p=L(f),m=e=>{var u=$ee();let d;var f=I(u);{let e=e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},c=N(()=>t.id??n);$f(f,Ml(()=>l,{role:`option`,get id(){return H(c)},tabindex:`-1`,get"aria-selected"(){return r()},get label(){return t.label},get value(){return o()},get hidden(){return i()},get disabled(){return a()},get"data-search-value"(){return s()},onChange:e=>{r(e.detail.selected),t.onChange?.(e)},onToggle:e=>{i(e.detail.hidden),i()&&r(!1),t.onToggle?.(e)},startIcon:e,children:(e,n)=>{var i=Qee(),a=L(i),o=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.checkIcon),G(e,n)},a=e=>{Rl(e,{class:`check`,name:`check`})};q(r,e=>{t.checkIcon?e(i):e(a,-1)}),G(e,n)};q(a,e=>{r()&&e(o)}),Ac(z(a,2),()=>t.children??br),G(e,i)},$$slots:{startIcon:!0,default:!0}}))}D(u),V(()=>{d=el(u,1,`sui option ${t.class??``}`,`svelte-yamxib`,d,{wrap:c()}),Y(u,`hidden`,i())}),G(e,u)};q(p,e=>{H(d)&&e(m)}),G(e,f),k()}var tte=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`ariaLabel`,`children`,`onChange`]),nte=U(`<div><!></div>`),rte={hash:`svelte-1k0a4nt`,code:`.menu.svelte-1k0a4nt {display:flex;flex-direction:column;margin:0;border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}
|
||
@media (pointer: coarse) {.menu.svelte-1k0a4nt {gap:8px 0;}
|
||
}.menu.svelte-1k0a4nt [role=separator] {margin:var(--sui-menu-divider-margin, 4px);background-color:var(--sui-menu-divider-color, var(--sui-control-border-color));}`};function xm(e,t){O(t,!0),J(e,rte);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`ariaLabel`,3,void 0),a=Al(t,tte);var o=nte(),s=e=>{t.onChange?.(e)};bl(o,()=>({...a,role:`menu`,class:`sui menu ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-label":i(),onChange:s}),void 0,void 0,void 0,`svelte-1k0a4nt`),Ac(I(o),()=>t.children??br),D(o),Gc(o,Dp),G(e,o),k()}var ite=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`hidden`,`disabled`,`label`,`labelDir`,`popupPosition`,`children`,`startIcon`,`endIcon`,`chevronIcon`,`items`,`onmouseenter`,`onmouseleave`,`onclick`,`onChange`,`onSelect`]),ate=U(`<span role="none" class="icon-outer svelte-1y34ukh"><!></span>`),ote=U(`<div role="none"><!></div> <!>`,1),ste=U(`<div role="none"><!> <!></div>`),cte={hash:`svelte-1y34ukh`,code:`.menuitem.svelte-1y34ukh {position:relative;}.menuitem.svelte-1y34ukh button {display:flex;gap:var(--sui-menuitem-gap, 4px);align-items:var(--sui-menuitem-align-items, center);border-radius:var(--sui-menuitem-border-radius, var(--sui-option-border-radius, 4px));margin:0 !important;padding:var(--sui-menuitem-padding, 0 16px);width:100%;min-width:var(--sui-menuitem-min-width, 160px);height:var(--sui-menuitem-height, var(--sui-option-height));color:var(--sui-menuitem-foreground-color, var(--sui-control-foreground-color, inherit));background-color:var(--sui-menuitem-background-color, transparent);font-size:var(--sui-menuitem-font-size, var(--sui-option-font-size));font-weight:var(--sui-menuitem-font-weight, var(--sui-option-font-weight, var(--sui-font-weight-normal, normal)));}.menuitem.svelte-1y34ukh button[aria-checked=true] .icon {color:var(--sui-primary-accent-color-text);}.menuitem.svelte-1y34ukh button:hover {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.menuitem.svelte-1y34ukh button:active {background-color:var(--sui-active-background-color);}.menuitem.svelte-1y34ukh :hover > [role=menu] {opacity:1;}.menuitem.svelte-1y34ukh > [role=menu] {position:absolute;inset-block-start:2px;inset-block-end:auto;inset-inline-start:calc(100% + 4px);inset-inline-end:auto;}.menuitem.svelte-1y34ukh > [role=menu]:hover {opacity:1;}.content.svelte-1y34ukh {flex:auto;}.icon-outer.svelte-1y34ukh {flex:none;width:24px;height:24px;}`};function Sm(e,t){O(t,!0),J(e,cte);let n=X(t,`role`,3,`menuitem`),r=X(t,`hidden`,3,!1),i=X(t,`disabled`,3,!1),a=X(t,`label`,3,``),o=X(t,`labelDir`,3,void 0),s=X(t,`popupPosition`,3,`right-top`),c=Al(t,ite),l=P(!1),u=P(!1),d=P(void 0),f=P(void 0),p=N(()=>n()===`menuitem`&&!!t.items);Nl(()=>{F(f,H(d)?.closest(`dialog`)??void 0,!0)});var m=ste(),h=I(m);{let e=e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},s=e=>{var n=ote(),r=L(n);let i;var s=I(r),c=e=>{var t=ec();V(()=>K(t,a())),G(e,t)},l=e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)};q(s,e=>{a()?e(c):e(l,-1)}),D(r);var u=z(r,2),d=e=>{var n=ate(),r=I(n),i=e=>{var n=W();Ac(L(n),()=>t.chevronIcon),G(e,n)},a=e=>{{let t=N(()=>Hd()?`chevron_left`:`chevron_right`);Rl(e,{get name(){return H(t)}})}};q(r,e=>{t.chevronIcon?e(i):e(a,-1)}),D(n),G(e,n)};q(u,e=>{H(p)&&e(d)}),V(()=>{i=el(r,1,`content svelte-1y34ukh`,null,i,{label:!!a()}),Y(r,`dir`,a()?o():void 0),r.dir=r.dir}),G(e,n)},f=e=>{var n=W();Ac(L(n),()=>t.endIcon??br),G(e,n)},m=N(()=>H(p)?`menu`:void 0),g=N(()=>H(p)?H(l):void 0);$f(h,Ml(()=>c,{get role(){return n()},get hidden(){return r()},get disabled(){return i()},get"aria-haspopup"(){return H(m)},get"aria-expanded"(){return H(g)},onmouseenter:e=>{H(p)&&window.setTimeout(()=>{F(l,!0)},200),t.onmouseenter?.(e)},onmouseleave:e=>{H(p)&&window.setTimeout(()=>{H(u)||F(l,!1)},200),t.onmouseleave?.(e)},onclick:e=>{H(p)&&(e.preventDefault(),e.stopPropagation(),F(l,!H(l))),t.onclick?.(e)},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return H(d)},set element(e){F(d,e,!0)},startIcon:e,children:s,endIcon:f,$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var g=z(h,2),_=e=>{qf(e,{get anchor(){return H(d)},get parentDialogElement(){return H(f)},get position(){return s()},get open(){return H(l)},set open(e){F(l,e,!0)},get hovered(){return H(u)},set hovered(e){F(u,e,!0)},children:(e,n)=>{xm(e,{children:(e,n)=>{var r=W();Ac(L(r),()=>t.items??br),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(g,e=>{H(p)&&H(d)&&H(f)&&e(_)}),D(m),V(()=>{el(m,1,`sui menuitem ${t.class??``}`,`svelte-1y34ukh`),Y(m,`hidden`,r())}),G(e,m),k()}var lte=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`]);function Cm(e,t){O(t,!0);let n=X(t,`checked`,15),r=X(t,`hidden`,3,!1),i=X(t,`disabled`,3,!1),a=X(t,`label`,3,``),o=Al(t,lte);Sm(e,Ml(()=>o,{role:`menuitemcheckbox`,get class(){return`sui menu-item-checkbox ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},children:e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)},endIcon:e=>{var t=W(),r=L(t),i=e=>{Rl(e,{name:`check`})};q(r,e=>{n()&&e(i)}),G(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var ute=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`]);function wm(e,t){O(t,!0);let n=X(t,`checked`,15),r=X(t,`hidden`,3,!1),i=X(t,`disabled`,3,!1),a=X(t,`label`,3,``),o=Al(t,ute);Sm(e,Ml(()=>o,{role:`menuitemradio`,get class(){return`sui menu-item-radio ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},children:e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)},endIcon:e=>{var t=W(),r=L(t),i=e=>{Rl(e,{name:`check`})};q(r,e=>{n()&&e(i)}),G(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var dte=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`now`,`min`,`max`,`text`,`ariaLabel`]),fte=U(`<div><div role="none" class="svelte-38wdod"></div></div>`),pte={hash:`svelte-38wdod`,code:`.progressbar.svelte-38wdod {overflow:hidden;border-width:var(--sui-progressbar-border-width, 1px);border-style:var(--sui-progressbar-border-style, solid);border-color:var(--sui-progressbar-border-color, var(--sui-control-border-color));border-radius:var(--sui-progressbar-border-radius, 16px);width:var(--sui-progressbar-width, 240px);height:var(--sui-progressbar-height, 10px);background-color:var(--sui-progressbar-background-color, var(--sui-secondary-background-color));}.progressbar.svelte-38wdod div:where(.svelte-38wdod) {height:100%;background-color:var(--sui-progressbar-foreground-color, var(--sui-primary-accent-color-light));transition:width 250ms;}`};function mte(e,t){J(e,pte);let n=X(t,`now`,3,0),r=X(t,`min`,3,0),i=X(t,`max`,3,100),a=X(t,`ariaLabel`,3,void 0),o=Al(t,dte);var s=fte();bl(s,()=>({...o,role:`progressbar`,class:`sui progressbar ${t.class??``}`,"aria-valuenow":n(),"aria-valuemin":r(),"aria-valuemax":i(),"aria-valuetext":t.text,"aria-label":a()}),void 0,void 0,void 0,`svelte-38wdod`);var c=I(s);let l;D(s),V(()=>l=nl(c,``,l,{width:`${n()??``}%`})),G(e,s)}var hte=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`orientation`,`ariaLabel`,`children`,`onChange`]),gte=U(`<div><div role="none" class="inner svelte-8hy3lz"><!></div></div>`),_te={hash:`svelte-8hy3lz`,code:`.radio-group.svelte-8hy3lz {display:inline-flex;}.radio-group.svelte-8hy3lz:focus-visible {outline-width:0 !important;}.radio-group.horizontal.svelte-8hy3lz {gap:8px;align-items:center;flex-wrap:wrap;}.radio-group.vertical.svelte-8hy3lz {gap:4px;flex-direction:column;}
|
||
@media (pointer: coarse) {.radio-group.vertical.svelte-8hy3lz {gap:8px;}
|
||
}.radio-group.svelte-8hy3lz [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-8hy3lz [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-8hy3lz [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-8hy3lz {display:contents;}`};function Tm(e,t){O(t,!0),J(e,_te);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`readonly`,3,!1),a=X(t,`required`,3,!1),o=X(t,`invalid`,3,!1),s=X(t,`orientation`,3,`horizontal`),c=X(t,`ariaLabel`,3,void 0),l=Al(t,hte);var u=gte(),d=e=>{t.onChange?.(e)};bl(u,()=>({...l,role:`radiogroup`,class:`sui radio-group ${t.class??``} ${s()??``}`,tabindex:`-1`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-orientation":s(),"aria-label":c(),onChange:d}),void 0,void 0,void 0,`svelte-8hy3lz`);var f=I(u);Ac(I(f),()=>t.children??br),D(f),D(u),Gc(u,Dp),V(()=>f.inert=r()),G(e,u),k()}var vte=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`name`,`value`,`valueType`,`label`,`group`,`children`,`onChange`,`onSelect`]),yte=U(`<label class="svelte-btjepd"><!></label>`),bte=U(`<span><!> <!></span>`),xte={hash:`svelte-btjepd`,code:`.radio.svelte-btjepd {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-btjepd :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-btjepd :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-btjepd :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-btjepd :active button {background-color:var(--sui-active-background-color);}.radio.svelte-btjepd :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-btjepd button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-btjepd button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-btjepd button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-btjepd button[aria-checked=true]::before {opacity:1;}.radio.svelte-btjepd label:where(.svelte-btjepd) {cursor:inherit;}`};function Em(e,t){let n=tc();O(t,!0),J(e,xte);let r=X(t,`checked`,7,!1),i=X(t,`hidden`,3,!1),a=X(t,`disabled`,3,!1),o=X(t,`name`,3,void 0),s=X(t,`value`,3,void 0),c=X(t,`valueType`,3,void 0),l=X(t,`label`,3,void 0),u=X(t,`group`,15),d=Al(t,vte),f=P(void 0);B(()=>{typeof u()==`string`&&(u()===s()?r()||r(!0):r()&&r(!1))});var p=bte(),m=e=>{e.target.matches(`button`)||H(f)?.click()};bl(p,()=>({...d,role:`none`,class:`sui radio ${t.class??``}`,hidden:i(),onclick:m,[ul]:{disabled:a()}}),void 0,void 0,void 0,`svelte-btjepd`);var h=I(p);$f(h,{role:`radio`,get id(){return n},get hidden(){return i()},get disabled(){return a()},get name(){return o()},get value(){return s()},get valueType(){return c()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:e=>{e.preventDefault(),!(a()||r())&&(r(!0),typeof u()==`string`&&u(s()))},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return H(f)},set element(e){F(f,e,!0)}});var g=z(h,2),_=e=>{var r=yte(),i=I(r),a=e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)},o=e=>{var t=ec();V(()=>K(t,l())),G(e,t)};q(i,e=>{t.children?e(a):e(o,-1)}),D(r),V(()=>Y(r,`id`,`${n}-label`)),G(e,r)};q(g,e=>{(t.children||l())&&e(_)}),D(p),G(e,p),k()}var Ste=new Set([`$$slots`,`$$events`,`$$legacy`,`disabled`,`showHandleBar`,`class`,`ariaLabel`,`children`,`onResizeStart`,`onResizeEnd`]),Cte=U(`<div role="none" class="handle-bar svelte-ao4tur"></div>`),wte=U(`<div><!></div>`),Tte={hash:`svelte-ao4tur`,code:`.resizable-handle.svelte-ao4tur {position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;touch-action:none;outline-offset:0;background-color:transparent;transition:background-color 200ms;}.resizable-handle.svelte-ao4tur:focus-visible, .resizable-handle.svelte-ao4tur:hover, .resizable-handle.dragging.svelte-ao4tur {outline:none;z-index:1;background-color:var(--sui-primary-accent-color-translucent-light);}.resizable-handle.svelte-ao4tur:focus-visible .handle-bar:where(.svelte-ao4tur), .resizable-handle.svelte-ao4tur:hover .handle-bar:where(.svelte-ao4tur), .resizable-handle.dragging.svelte-ao4tur .handle-bar:where(.svelte-ao4tur) {background-color:var(--sui-primary-accent-color);}.resizable-handle.disabled.svelte-ao4tur {pointer-events:none;opacity:0.4;}.resizable-handle.horizontal.svelte-ao4tur {width:var(--sui-resizable-handle-size, 4px);height:100%;cursor:col-resize;}.resizable-handle.horizontal.svelte-ao4tur .handle-bar:where(.svelte-ao4tur) {width:2px;height:40%;min-height:20px;}.resizable-handle.vertical.svelte-ao4tur {width:100%;height:var(--sui-resizable-handle-size, 4px);cursor:row-resize;}.resizable-handle.vertical.svelte-ao4tur .handle-bar:where(.svelte-ao4tur) {height:2px;width:40%;min-width:20px;}.resizable-handle.svelte-ao4tur .handle-bar:where(.svelte-ao4tur) {border-radius:1px;background-color:hsl(var(--sui-border-color-1-hsl));transition:background-color 200ms;}`};function Dm(e,t){O(t,!0),J(e,Tte);let n=X(t,`disabled`,3,!1),r=X(t,`showHandleBar`,3,!1),i=X(t,`ariaLabel`,3,void 0),a=Al(t,Ste),o=zi(`paneGroup`);if(!o)throw Error(`<ResizableHandle> must be used inside a <ResizablePaneGroup>`);let s=o.registerHandle(),c=N(()=>o.direction===`horizontal`),l=N(()=>o.sizes),u=N(()=>H(l)[s]??0),d=N(()=>o.getPaneConstraints(s)),f=N(()=>Math.max(H(d).minSize,100-o.paneDefs.reduce((e,t,n)=>e+(n===s?0:o.getPaneConstraints(n).maxSize),0))),p=N(()=>Math.min(H(d).maxSize,100-o.paneDefs.reduce((e,t,n)=>e+(n===s?0:o.getPaneConstraints(n).minSize),0))),m=P(void 0),h=P(!1),g=P(0),_=P(0),v=P(!1),y=0,b=()=>{let e=H(m)?.closest(`.resizable-pane-group`);return e?H(c)?e.clientWidth:e.clientHeight:0},x=e=>{let{screenX:t,screenY:r,pointerId:i}=e;if(n()||!H(h)||i!==H(_))return;e.preventDefault(),e.stopPropagation();let a=H(c)?t:r,l=a-H(g);if(!y)return;let u=l/y*100;H(c)&&Hd()&&(u=-u),F(g,a,!0),o.resize(s,u)},S=e=>{let{pointerId:n}=e;!H(h)||n!==H(_)||(H(m)?.releasePointerCapture(n),F(h,!1),F(g,0),F(_,0),t.onResizeEnd?.(),document.removeEventListener(`pointermove`,x),document.removeEventListener(`pointerup`,S),document.removeEventListener(`pointercancel`,S))},C=e=>{if(n())return;e.preventDefault(),e.stopPropagation();let{screenX:r,screenY:i,pointerId:a}=e;F(h,!0),F(g,H(c)?r:i,!0),F(_,a,!0),y=b(),H(m)?.setPointerCapture(a),t.onResizeStart?.(),document.addEventListener(`pointermove`,x),document.addEventListener(`pointerup`,S),document.addEventListener(`pointercancel`,S)},w=e=>{if(n())return;let{key:r,shiftKey:i}=e,a=i?10:1,l=0;if(r===`Enter`){e.preventDefault(),e.stopPropagation(),o.toggleCollapse(s);return}if(r===`Home`){e.preventDefault(),e.stopPropagation(),o.resize(s,-100);return}if(r===`End`){e.preventDefault(),e.stopPropagation(),o.resize(s,100);return}if(H(c)){let e=Hd();if(r===`ArrowLeft`)l=e?a:-a;else if(r===`ArrowRight`)l=e?-a:a;else return}else if(r===`ArrowUp`)l=-a;else if(r===`ArrowDown`)l=a;else return;e.preventDefault(),e.stopPropagation(),H(v)||(F(v,!0),t.onResizeStart?.()),o.resize(s,l)},T=()=>{H(v)&&(F(v,!1),t.onResizeEnd?.())};var E=wte();bl(E,e=>({...a,role:`separator`,tabindex:n()?-1:0,"aria-orientation":H(c)?`vertical`:`horizontal`,"aria-valuenow":e,"aria-valuemin":H(f),"aria-valuemax":H(p),"aria-controls":o.paneDefs[s]?.id,"aria-disabled":n()||void 0,"aria-label":i(),class:`sui resizable-handle ${t.class??``??``}`,onpointerdown:C,onkeydown:w,onblur:T,[ul]:{horizontal:H(c),vertical:!H(c),disabled:n(),dragging:H(h)}}),[()=>Math.round(H(u))],void 0,void 0,`svelte-ao4tur`);var ee=I(E),te=e=>{var n=W();Ac(L(n),()=>t.children),G(e,n)},ne=e=>{G(e,Cte())};q(ee,e=>{t.children?e(te):r()&&e(ne,1)}),D(E),Ol(E,e=>F(m,e),()=>H(m)),G(e,E),k()}var Ete=new Set([`$$slots`,`$$events`,`$$legacy`,`direction`,`class`,`children`,`onResize`]),Dte=U(`<div><!></div>`),Ote={hash:`svelte-98z4bd`,code:`.resizable-pane-group.svelte-98z4bd {display:flex;overflow:hidden;}.resizable-pane-group.horizontal.svelte-98z4bd {flex-direction:row;width:100%;height:100%;}.resizable-pane-group.vertical.svelte-98z4bd {flex-direction:column;width:100%;height:100%;}`};function Om(e,t){O(t,!0),J(e,Ote);let n=X(t,`direction`,3,`horizontal`),r=Al(t,Ete),i=ao([]),a=P(void 0),o=ao([]),s=ao([]),c=0,l=()=>H(a)?n()===`horizontal`?H(a).clientWidth:H(a).clientHeight:0,u=(e,t)=>{if(typeof e==`number`)return e;if(!e||typeof e!=`string`)return t;let n=e.trim(),r=n.match(/^(-?\d+(?:\.\d+)?)%$/);if(r)return Number(r[1]);let i=l();if(!i)return t;let a=n.match(/^(-?\d+(?:\.\d+)?)px$/i);if(a)return Number(a[1])/i*100;let o=n.match(/^(-?\d+(?:\.\d+)?)(dvw|vw|dvh|vh)$/i);if(o){let e=Number(o[1]),t=o[2].toLowerCase().endsWith(`w`)?window.innerWidth:window.innerHeight;return e/100*t/i*100}return t},d=e=>{let t=i[e];if(!t)return{minSize:0,maxSize:100};let n=Math.max(0,u(t.minSize,0)),r=Math.min(100,u(t.maxSize,100));return{minSize:n,maxSize:Math.max(n,r)}},f=()=>{if(!i.length)return;let e=i.map(e=>e.defaultSize===void 0?NaN:u(e.defaultSize,NaN)),t=e.filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0),n=e.filter(e=>Number.isNaN(e)).length,r=Math.max(0,100-t),a=n>0?r/n:0,s=e.map(e=>Number.isNaN(e)?a:e);o.splice(0,o.length,...s)},p=(e,n)=>{let r=e,i=e+1;if(r<0||i>=o.length)return;let{minSize:a,maxSize:s}=d(r),{minSize:c,maxSize:l}=d(i),u=o[r],f=o[i],p=Math.min(s-u,f-c),m=Math.min(u-a,l-f),h=n>0?Math.min(n,p):-Math.min(-n,m);o[r]=u+h,o[i]=f-h,t.onResize?.({sizes:o.map(e=>Number(e.toFixed(1)))})};Bi(`paneGroup`,{get direction(){return n()},sizes:o,registerPane:({id:e,defaultSize:t,minSize:n,maxSize:r})=>{let a=i.length;return i.push({id:e,defaultSize:t,minSize:n,maxSize:r}),{index:a}},registerHandle:()=>{let e=c;return c+=1,e},resize:p,toggleCollapse:e=>{let{minSize:t}=d(e);if(s[e]!==void 0){let t=s[e]-o[e];s[e]=void 0,p(e,t)}else s[e]=o[e],p(e,-(o[e]-t))},getPaneConstraints:d,paneDefs:i}),B(()=>{i.length&&!o.length&&f()});var m=Dte();bl(m,()=>({...r,role:`none`,class:`sui resizable-pane-group ${n()??``} ${t.class??``??``}`,"data-direction":n()}),void 0,void 0,void 0,`svelte-98z4bd`),Ac(I(m),()=>t.children??br),D(m),Ol(m,e=>F(a,e),()=>H(a)),G(e,m),k()}var kte=new Set([`$$slots`,`$$events`,`$$legacy`,`defaultSize`,`minSize`,`maxSize`,`class`,`children`,`onResize`]),Ate=U(`<div><!></div>`);function km(e,t){let n=tc();O(t,!0);let r=X(t,`defaultSize`,3,void 0),i=X(t,`minSize`,3,0),a=X(t,`maxSize`,3,100),o=Al(t,kte),s=zi(`paneGroup`);if(!s)throw Error(`<ResizablePane> must be used inside a <ResizablePaneGroup>`);let{index:c}=s.registerPane({id:n,defaultSize:r(),minSize:i(),maxSize:a()}),l=N(()=>s.direction),u=N(()=>s.sizes[c]),d=N(()=>H(u)===void 0?typeof r()==`number`?`${r()}%`:r()??`0%`:`${H(u)}%`);B(()=>{H(u)!==void 0&&Ds(()=>t.onResize?.({size:Number(H(u).toFixed(1))}))});var f=Ate();bl(f,()=>({...o,id:n,role:`none`,class:`sui resizable-pane ${t.class??``??``}`,[dl]:{"flex-basis":H(d),"flex-grow":`0`,"flex-shrink":`0`,"overflow-x":H(l)===`horizontal`?`auto`:void 0,"overflow-y":H(l)===`vertical`?`auto`:void 0}})),Ac(I(f),()=>t.children??br),D(f),G(e,f),k()}var jte=U(`<div role="none" class="spinner svelte-mujl6m"></div>`),Mte=U(`<!> <!>`,1),Nte={hash:`svelte-mujl6m`,code:`.spinner.svelte-mujl6m {height:1px;}`};function Am(e,t){O(t,!0),J(e,Nte);let n=X(t,`itemChunkSize`,3,25),r=P(ao(n())),i=P(void 0),a=N(()=>t.items.length>H(r)),o=new IntersectionObserver(([{isIntersecting:e}])=>{e&&(H(a)?F(r,H(r)+n()):o.disconnect())});B(()=>{H(i)&&o.observe(H(i))});var s=Mte(),c=L(s);Cc(c,19,()=>t.items.slice(0,H(r)),(e,n)=>e[t.itemKey]??n,(e,n,r)=>{var i=W();Ac(L(i),()=>t.renderItem,()=>H(n),()=>H(r)),G(e,i)});var l=z(c,2),u=e=>{var t=jte();Ol(t,e=>F(i,e),()=>H(i)),G(e,t)};q(l,e=>{H(a)&&e(u)}),G(e,s),k()}var jm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`searchIcon`,`closeIcon`,`onClear`]),Mm=U(`<div><span role="none" class="svelte-1qqyq61"><!></span> <!> <!></div>`),Nm={hash:`svelte-1qqyq61`,code:`.search-bar.svelte-1qqyq61 {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-1qqyq61:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-1qqyq61 > span:where(.svelte-1qqyq61) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-1qqyq61 .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-1qqyq61 > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-1qqyq61 .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-1qqyq61 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-1qqyq61 input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}`};function Pm(e,t){let n=tc();O(t,!0),J(e,Nm);let r=X(t,`value`,15),i=X(t,`flex`,3,!1),a=X(t,`hidden`,3,!1),o=X(t,`disabled`,3,!1),s=X(t,`readonly`,3,!1),c=X(t,`required`,3,!1),l=X(t,`invalid`,3,!1),u=Al(t,jm),d=P(void 0);var f={focus:()=>{H(d)?.focus()}},p=Mm();let m;var h=I(p),g=I(h),_=e=>{var n=W();Ac(L(n),()=>t.searchIcon),G(e,n)},v=e=>{Rl(e,{name:`search`})};q(g,e=>{t.searchIcon?e(_):e(v,-1)}),D(h);var y=z(h,2);fm(y,Ml({dir:`auto`},()=>u,{role:`searchbox`,get id(){return n},get flex(){return i()},get hidden(){return a()},get disabled(){return o()},get readonly(){return s()},get required(){return c()},get invalid(){return l()},inputmode:`search`,get element(){return H(d)},set element(e){F(d,e,!0)},get value(){return r()},set value(e){r(e)}}));var b=z(y,2),x=e=>{{let i=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.closeIcon),G(e,n)},a=e=>{Rl(e,{name:`close`})};q(r,e=>{t.closeIcon?e(i):e(a,-1)}),G(e,n)},a=N(()=>Z(`_sui.clear`));$f(e,{iconic:!0,get"aria-label"(){return H(a)},get"aria-controls"(){return n},onclick:()=>{r(``),H(d)?.focus(),t.onClear?.()},startIcon:i,$$slots:{startIcon:!0}})}};return q(b,e=>{r()&&e(x)}),D(p),V(()=>{Y(p,`role`,a()?void 0:`none`),m=el(p,1,`sui search-bar ${t.class??``}`,`svelte-1qqyq61`,m,{flex:i(),disabled:o(),readonly:s()}),Y(p,`hidden`,a()),Y(p,`aria-hidden`,a())}),G(e,p),k(f)}var Fm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`editable`,`position`,`filterThreshold`,`ariaLabel`,`children`,`chevronIcon`,`onChange`]),Im=U(`<div><div role="none" class="label svelte-1ykby1k"><!></div></div>`),Lm=U(`<div role="alert" class="no-options svelte-1ykby1k" aria-live="assertive"> </div>`),Rm=U(`<div role="none" class="combobox-inner svelte-1ykby1k"><!> <div role="none" class="listbox-slot svelte-1ykby1k"></div> <!></div>`),zm=U(`<div><!> <!></div> <div role="none" class="idle-host" hidden=""><div role="none" class="option-host svelte-1ykby1k"><!></div></div> <!>`,1),Bm={hash:`svelte-1ykby1k`,code:`:is(.option-host.svelte-1ykby1k, .listbox-slot.svelte-1ykby1k) {display:contents;}.combobox.svelte-1ykby1k {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-1ykby1k div[role=combobox]:where(.svelte-1ykby1k) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-1ykby1k div[role=combobox]:where(.svelte-1ykby1k):not(.selected) {font-style:italic;}.combobox.svelte-1ykby1k div[role=combobox]:where(.svelte-1ykby1k):is(:where(.svelte-1ykby1k):hover, :where(.svelte-1ykby1k):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-1ykby1k div[role=combobox][aria-invalid=true]:where(.svelte-1ykby1k) {border-color:var(--sui-error-border-color);}.combobox.svelte-1ykby1k div[role=combobox]:where(.svelte-1ykby1k) .label:where(.svelte-1ykby1k) {width:100%;}.combobox.svelte-1ykby1k .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-1ykby1k > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-1ykby1k > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-1ykby1k > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-1ykby1k :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-1ykby1k .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-1ykby1k input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-1ykby1k + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
|
||
/* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-1ykby1k + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-1ykby1k {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-1ykby1k .sui.search-bar {flex:none;margin-bottom:calc(8px - var(--sui-focus-ring-width));}.combobox-inner.svelte-1ykby1k .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-1ykby1k .no-options:where(.svelte-1ykby1k) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`};function Vm(e,t){let n=tc();O(t,!0),J(e,Bm);let r=X(t,`value`,15),i=X(t,`hidden`,3,!1),a=X(t,`disabled`,3,!1),o=X(t,`readonly`,3,!1),s=X(t,`required`,3,!1),c=X(t,`invalid`,3,!1),l=X(t,`editable`,3,!0),u=X(t,`position`,3,`bottom-left`),d=X(t,`filterThreshold`,3,5),f=X(t,`ariaLabel`,3,void 0),p=Al(t,Fm),m=P(!1),h=P(void 0),g=P(void 0),_=P(void 0),v=P(void 0),y=P(void 0),b=P(void 0),x=P(``),S=P(!1),C=P(``),w=P(0),T=N(()=>!H(C)||H(w)>0),E=N(()=>H(h)??H(g)),ee=_p(),te=()=>{let e=ee.find(r());e&&(F(x,e.label,!0),ee.selectOnly(r()))},ne=e=>{let n=yp(e);r(n.value),te(),t.onChange?.(new CustomEvent(`Change`,{detail:n}))},re=()=>H(y)?.querySelector(`[role="listbox"]`),ie=()=>{let e=re(),t=e?.querySelector(`[role="option"][aria-selected="true"]`);!e||!t||(t.classList.add(`focused`),e.setAttribute(`aria-activedescendant`,t.id),t.scrollIntoView(!0))};B(()=>{ee.expanded=H(m)}),B(()=>{if(!H(m))return;let e=globalThis.setTimeout(ie,150);return()=>{globalThis.clearTimeout(e),re()?.removeAttribute(`aria-activedescendant`)}}),B(()=>{if(!H(y))return;let e=H(m)?H(b):H(v);e&&H(y).parentElement!==e&&e.append(H(y))}),Nl(()=>{let e=ee.selectedEntry;e&&(r(e.value),F(x,e.label,!0),t.onChange?.(new CustomEvent(`Change`,{detail:{target:void 0,type:e.type,name:e.name,label:e.label,value:e.value}})))}),B(()=>{r(),te()});var ae=zm(),oe=L(ae);bl(oe,()=>({...p,role:`none`,class:`sui combobox ${t.class??``}`,hidden:i(),[ul]:{editable:l()}}),void 0,void 0,void 0,`svelte-1ykby1k`);var se=I(oe),ce=e=>{var t=Im();bl(t,()=>({...p,role:`combobox`,id:n,tabindex:a()?-1:0,"aria-expanded":H(m),"aria-hidden":i(),"aria-disabled":a(),"aria-readonly":o(),"aria-required":s(),"aria-invalid":c(),"aria-haspopup":`listbox`,"aria-label":f(),[ul]:{selected:r()!==void 0}}),void 0,void 0,void 0,`svelte-1ykby1k`);var l=I(t);_f(I(l),{children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>r()===void 0?Z(`_sui.combobox.select_an_option`):H(x)]),G(e,n)},$$slots:{default:!0}}),D(l),D(t),Ol(t,e=>F(h,e),()=>H(h)),G(e,t)},le=e=>{{let t=N(()=>r()===void 0?``:String(r()));fm(e,Ml(()=>p,{dir:`auto`,role:`combobox`,get id(){return n},get value(){return H(t)},get hidden(){return i()},get disabled(){return a()},get readonly(){return o()},get required(){return s()},get invalid(){return c()},get"aria-expanded"(){return H(m)},"aria-haspopup":`listbox`,get"aria-label"(){return f()},get element(){return H(g)},set element(e){F(g,e,!0)}}))}};q(se,e=>{l()?e(le,-1):e(ce)});var ue=z(se,2);{let e=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.chevronIcon),G(e,n)},a=e=>{Rl(e,{name:`expand_more`})};q(r,e=>{t.chevronIcon?e(i):e(a,-1)}),G(e,n)},r=N(()=>!l()||o()||a()?-1:0),s=N(()=>H(m)?Z(`_sui.collapse`):Z(`_sui.expand`)),c=N(()=>H(m)?`${n}-popup`:void 0);$f(ue,{variant:`ghost`,iconic:!0,get hidden(){return i()},get disabled(){return a()},get tabindex(){return H(r)},get"aria-label"(){return H(s)},get"aria-controls"(){return H(c)},get"aria-expanded"(){return H(m)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!a()&&!o()&&F(m,!H(m))},startIcon:e,$$slots:{startIcon:!0}})}D(oe);var de=z(oe,2),fe=I(de);vm(I(fe),{get id(){return`${n}-listbox`},class:`in-combobox`,get searchTerms(){return H(C)},onclick:e=>{e.target.matches(`[role="option"]`)&&ne(e.target)},onFilter:e=>{F(w,e.detail.matched,!0)},children:(e,n)=>{var r=W();Ac(L(r),()=>t.children??br),G(e,r)},$$slots:{default:!0}}),D(fe),Ol(fe,e=>F(y,e),()=>H(y)),D(de),Ol(de,e=>F(v,e),()=>H(v)),qf(z(de,2),{get id(){return`${n}-popup`},class:`combobox`,get anchor(){return H(E)},get position(){return u()},touchOptimized:!0,onOpen:()=>{F(S,d()!==-1&&ee.count>d(),!0),F(C,``)},get content(){return H(_)},set content(e){F(_,e,!0)},get open(){return H(m)},set open(e){F(m,e,!0)},children:(e,t)=>{var r=Rm(),i=I(r),a=e=>{{let t=N(()=>Z(`_sui.combobox.filter_options`));Pm(e,{flex:!0,get"aria-label"(){return H(t)},get"aria-controls"(){return`${n}-listbox`},onkeydown:e=>{[`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),H(_)?.querySelector(`.sui.listbox`)?.dispatchEvent(new KeyboardEvent(`keydown`,e)))},get value(){return H(C)},set value(e){F(C,e,!0)}})}};q(i,e=>{H(S)&&e(a)});var o=z(i,2);Ol(o,e=>F(b,e),()=>H(b));var s=z(o,2),c=e=>{var t=Lm(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`_sui.combobox.no_matching_options`)]),G(e,t)};q(s,e=>{H(T)||e(c)}),D(r),G(e,r)},$$slots:{default:!0}}),G(e,ae),k()}function Hm(e){let t=e-1;return t*t*t+1}function Um(e,{from:t,to:n},r={}){var{delay:i=0,duration:a=e=>Math.sqrt(e)*120,easing:o=Hm}=r,s=getComputedStyle(e),c=s.transform===`none`?``:s.transform,[l,u]=s.transformOrigin.split(` `).map(parseFloat);l/=e.clientWidth,u/=e.clientHeight;var d=Wm(e),f=e.clientWidth/n.width/d,p=e.clientHeight/n.height/d,m=t.left+t.width*l,h=t.top+t.height*u,g=n.left+n.width*l,_=n.top+n.height*u,v=(m-g)*f,y=(h-_)*p,b=t.width/n.width,x=t.height/n.height;return{delay:i,duration:typeof a==`function`?a(Math.sqrt(v*v+y*y)):a,easing:o,css:(e,t)=>`transform: ${c} translate(${t*v}px, ${t*y}px) scale(${e+t*b}, ${e+t*x});`}}function Wm(e){if(`currentCSSZoom`in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var Gm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onChange`]);function Km(e,t){O(t,!0);let n=X(t,`value`,15),r=X(t,`hidden`,3,!1),i=X(t,`disabled`,3,!1),a=X(t,`readonly`,3,!1),o=X(t,`required`,3,!1),s=X(t,`invalid`,3,!1),c=Al(t,Gm);Vm(e,Ml(()=>c,{get class(){return`sui select ${t.class??``}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return a()},get required(){return o()},get invalid(){return s()},get onChange(){return t.onChange},editable:!1,get value(){return n()},set value(e){n(e)},children:(e,n)=>{var r=W();Ac(L(r),()=>t.children??br),G(e,r)},$$slots:{default:!0}})),k()}var qm=new Set([`$$slots`,`$$events`,`$$legacy`,`values`,`options`,`max`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onAddValue`,`onRemoveValue`,`onReorder`]),Jm=U(`<span role="none"><span class="label svelte-1pseghx" role="option" aria-selected="true"> </span> <!></span>`),Ym=U(`<div role="none"><span role="listbox" aria-multiselectable="true" class="svelte-1pseghx"></span> <!></div>`),Xm={hash:`svelte-1pseghx`,code:`.select-tags.svelte-1pseghx {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-1pseghx {pointer-events:none;}.select-tags.disabled.svelte-1pseghx > :where(.svelte-1pseghx) {opacity:0.5;}.select-tags.svelte-1pseghx span[role=listbox]:where(.svelte-1pseghx) {display:contents;}.select-tags.svelte-1pseghx span[draggable]:where(.svelte-1pseghx) {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);cursor:grab;outline:none;}.select-tags.svelte-1pseghx span[draggable]:where(.svelte-1pseghx):focus-within {outline:var(--sui-focus-ring-width) solid var(--sui-focus-ring-color);}.select-tags.svelte-1pseghx span[draggable].drag-source:where(.svelte-1pseghx) {opacity:0.4;cursor:grabbing;}.select-tags.svelte-1pseghx span[draggable].drop-before:where(.svelte-1pseghx)::before, .select-tags.svelte-1pseghx span[draggable].drop-after:where(.svelte-1pseghx)::after {content:"";position:absolute;top:0;bottom:0;margin-inline-start:-1px;border-radius:1px;width:4px;background-color:var(--sui-primary-accent-color);pointer-events:none;}.select-tags.svelte-1pseghx span[draggable].drop-before:where(.svelte-1pseghx)::before {inset-inline-start:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-1pseghx span[draggable].drop-after:where(.svelte-1pseghx)::after {inset-inline-end:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-1pseghx span[draggable]:where(.svelte-1pseghx) .label:where(.svelte-1pseghx) {outline:none;}.select-tags.svelte-1pseghx span[draggable]:where(.svelte-1pseghx) button {outline-offset:-2px;}.select-tags.svelte-1pseghx span[draggable]:where(.svelte-1pseghx) .icon {font-size:var(--sui-font-size-large);}`};function Zm(e,t){O(t,!0),J(e,Xm);let n=X(t,`values`,31,()=>ao([])),r=X(t,`max`,3,void 0),i=X(t,`hidden`,3,!1),a=X(t,`disabled`,3,!1),o=X(t,`readonly`,3,!1),s=X(t,`required`,3,!1),c=X(t,`invalid`,3,!1),l=Al(t,qm),u=N(()=>new Map(t.options.map(e=>[e.value,e]))),d=N(()=>new Set(n())),f=N(()=>Hd()?`ArrowRight`:`ArrowLeft`),p=N(()=>Hd()?`ArrowLeft`:`ArrowRight`),m=P(void 0),h=P(void 0),g=P(void 0),_=P(void 0),v=(e,r)=>{if(e===r)return;let i=[...n()],[a]=i.splice(e,1);i.splice(r,0,a),n(i),t.onReorder?.(new CustomEvent(`Reorder`,{detail:{values:i}}))},y=async(e,t)=>{v(e,t),await ws(),(H(m)?.querySelectorAll(`.label[tabindex]`)?.[t])?.focus()};var b=Ym();let x;var S=I(b);Cc(S,30,n,e=>e,(e,r,i)=>{let s=N(()=>H(u).get(r)),c=N(()=>H(s)?.label||H(s)?.value||r);var l=Jm();let d;var m=I(l),h=R(m,!0),v=z(m,2),b=e=>{{let i=e=>{Rl(e,{name:`close`})},s=N(()=>a()||o()),l=N(()=>Z(`_sui.select_tags.remove_x`,{values:{name:H(c)}}));$f(e,{iconic:!0,size:`small`,get disabled(){return H(s)},get"aria-label"(){return H(l)},onclick:()=>{n(n().filter(e=>e!==r)),t.onRemoveValue?.(new CustomEvent(`RemoveValue`,{detail:{value:r}}))},startIcon:i,$$slots:{startIcon:!0}})}};q(v,e=>{H(s)&&e(b)}),D(l),V(()=>{Y(l,`draggable`,!a()&&!o()),d=el(l,1,`svelte-1pseghx`,null,d,{"drag-source":H(g)===H(i),"drop-before":H(_)===H(i)&&H(g)!==H(i)&&H(g)!==H(i)-1,"drop-after":H(_)===n().length&&H(i)===n().length-1&&H(g)!==n().length-1}),Y(m,`tabindex`,a()||o()?void 0:0),K(h,H(c))}),Ws(`dragstart`,l,e=>{F(g,H(i),!0),e.dataTransfer&&(e.dataTransfer.setData(`text/plain`,H(c)),e.dataTransfer.effectAllowed=`move`)}),Ws(`dragover`,l,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=e.currentTarget.getBoundingClientRect(),n=e.clientX<t.left+t.width/2;F(_,n===Hd()?H(i)+1:H(i),!0)}),Ws(`drop`,l,async e=>{e.preventDefault();let t=H(g),n=H(_);F(g,void 0),F(_,void 0),t!==void 0&&n!==void 0&&n!==t&&n!==t+1&&await y(t,n>t?n-1:n)}),Ws(`dragend`,l,()=>{F(g,void 0),F(_,void 0)}),Gs(`keydown`,m,async e=>{let{key:t}=e,r=t===H(f)&&H(i)>0?H(i)-1:t===H(p)&&H(i)<n().length-1?H(i)+1:t===`Home`&&H(i)>0?0:t===`End`&&H(i)<n().length-1?n().length-1:-1;r!==-1&&(e.preventDefault(),await y(H(i),r))}),Vc(l,()=>Um,()=>({duration:200})),G(e,l)}),D(S);var C=z(S,2),w=e=>{{let r=N(()=>a()||o());Km(e,Ml(()=>l,{get disabled(){return H(r)},get readonly(){return o()},get required(){return s()},get invalid(){return c()},onChange:()=>{H(h)&&(n([...n(),H(h)]),t.onAddValue?.(new CustomEvent(`AddValue`,{detail:{value:H(h)}})),F(h,void 0))},get value(){return H(h)},set value(e){F(h,e,!0)},children:(e,n)=>{var r=W();Cc(L(r),17,()=>t.options,({label:e,value:t,searchValue:n})=>t,(e,t)=>{let n=()=>H(t).label,r=()=>H(t).value,i=()=>H(t).searchValue;var a=W(),o=L(a),s=e=>{bm(e,{get label(){return n()},get value(){return r()},get searchValue(){return i()}})},c=N(()=>!H(d).has(r()));q(o,e=>{H(c)&&e(s)}),G(e,a)}),G(e,r)},$$slots:{default:!0}}))}};q(C,e=>{(typeof r()!=`number`||n().length<r())&&n().length<t.options.length&&e(w)}),D(b),Ol(b,e=>F(m,e),()=>H(m)),V(e=>{x=el(b,1,`sui select-tags ${t.class??``}`,`svelte-1pseghx`,x,{disabled:a()||o()}),Y(b,`hidden`,i()),Y(S,`aria-label`,e)},[()=>Z(`_sui.select_tags.selected_options`)]),G(e,b),k()}Ks([`keydown`]);var Qm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`min`,`max`,`sliderLabel`,`values`,`sliderLabels`,`step`,`optionLabels`,`class`,`hidden`,`disabled`,`readonly`,`invalid`,`children`,`onChange`]),$m=U(`<div role="slider" class="svelte-feoi75"></div>`),eh=U(`<span role="none" class="label svelte-feoi75"> </span>`),th=U(`<div><div role="none" class="base svelte-feoi75"><div role="none" class="base-bar svelte-feoi75"></div> <div class="slider-bar svelte-feoi75"></div> <div role="slider" class="svelte-feoi75"></div> <!> <!></div></div>`),nh={hash:`svelte-feoi75`,code:`.slider.svelte-feoi75 {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-feoi75:hover .base-bar:where(.svelte-feoi75) {background-color:var(--sui-hover-background-color);}.slider.svelte-feoi75:active .base-bar:where(.svelte-feoi75) {background-color:var(--sui-active-background-color);}.base.svelte-feoi75 {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-feoi75 {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-feoi75 {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-feoi75 .slider-bar:where(.svelte-feoi75) {background-color:var(--sui-error-border-color);}[role=slider].svelte-feoi75 {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-feoi75:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-feoi75:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-feoi75 [role=slider]:where(.svelte-feoi75) {border-color:var(--sui-error-border-color);}.label.svelte-feoi75 {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-feoi75:dir(ltr) {transform:translateX(-50%);}.label.svelte-feoi75:dir(rtl) {transform:translateX(50%);}`};function rh(e,t){O(t,!0),J(e,nh);let n=X(t,`value`,15,0),r=X(t,`min`,3,0),i=X(t,`max`,3,100),a=X(t,`sliderLabel`,3,``),o=X(t,`values`,15,void 0),s=X(t,`sliderLabels`,3,void 0),c=X(t,`step`,3,1),l=X(t,`optionLabels`,19,()=>[]),u=X(t,`hidden`,3,!1),d=X(t,`disabled`,3,!1),f=X(t,`readonly`,3,!1),p=X(t,`invalid`,3,!1),m=Al(t,Qm),h=N(()=>Array.isArray(o())),g=P(void 0),_=P(0),v=P(ao([])),y=P(ao([])),b=P(0),x=P(0),S=ao([0,0]),C=P(!1),w=P(0),T=P(0),E=e=>{let t=Math.min(H(_),Math.max(0,Hd()?H(_)-e:e)),r=H(v).findLastIndex(e=>e<=t),i=H(v).findIndex(e=>t<=e),a;a=r===-1?i:i===-1||Math.abs(H(v)[r]-t)<Math.abs(H(v)[i]-t)?r:i,!(S[H(T)]===H(v)[a]||H(h)&&(H(T)===0&&S[1]<=H(v)[a]||H(T)===1&&S[0]>=H(v)[a]))&&(H(h)?(o(o()[H(T)]=H(y)[a],!0),o([...o()])):n(H(y)[a]))},ee=(e,t=0)=>{let{key:a,ctrlKey:s,metaKey:c,shiftKey:l,altKey:u}=e,p=l||u||s||c;if(d()||f()||p)return;let m=H(h)?o()[t]:n(),g=-1,_=Hd(),b=_?[`ArrowDown`,`ArrowRight`]:[`ArrowDown`,`ArrowLeft`],x=_?[`ArrowUp`,`ArrowLeft`]:[`ArrowUp`,`ArrowRight`];if(b.includes(a)&&(m>r()&&(g=H(y).indexOf(m)-1),e.preventDefault(),e.stopPropagation()),x.includes(a)&&(m<i()&&(g=H(y).indexOf(m)+1),e.preventDefault(),e.stopPropagation()),g>-1){if(H(h)&&(t===0&&S[1]<=H(v)[g]||t===1&&S[0]>=H(v)[g]))return;H(h)?(o(o()[t]=H(y)[g],!0),o([...o()])):n(H(y)[g])}},te=e=>{let{screenX:t,pointerId:n}=e;if(d()||f()||!H(C)||n!==H(w))return;e.preventDefault(),e.stopPropagation();let r=t-H(x),i=H(b)+r;E(i)},ne=e=>{let{pointerId:t,target:n}=e;if(d()||f()||!H(C)||t!==H(w))return;e.stopPropagation();let r=n;if(r.matches(`.base-bar, .slider-bar`)){let t=H(g).getBoundingClientRect(),n=e.clientX-t.left;E(n)}r.releasePointerCapture(t),F(C,!1),F(b,0),F(x,0),F(w,0),F(T,0),document.removeEventListener(`pointermove`,te),document.removeEventListener(`pointerup`,ne),document.removeEventListener(`pointercancel`,ne)},re=(e,t=0)=>{if(d()||f())return;e.preventDefault(),e.stopPropagation(),F(C,!0);let{clientX:n,screenX:r,pointerId:i,target:a}=e,o=a,s=H(g).getBoundingClientRect();F(b,n-s.left),F(x,r,!0),F(w,i,!0),F(T,t,!0),o.setPointerCapture(i),document.addEventListener(`pointermove`,te),document.addEventListener(`pointerup`,ne),document.addEventListener(`pointercancel`,ne)},ie=()=>{if(H(h)){let[e,n]=o();S[0]=H(v)[H(y).indexOf(e)],S[1]=H(v)[H(y).indexOf(n)],t.onChange?.({values:o()})}else S[0]=H(v)[H(y).indexOf(n())],t.onChange?.({value:n()})},ae=()=>{if(!H(g))return;F(_,H(g).clientWidth,!0);let e=(i()-r())/c()+1,t=H(_)/(e-1),n=Array.from({length:e});F(y,n.map((e,t)=>t*c()+r(),10),!0),F(v,n.map((e,n)=>n*t),!0),ie()};Nl(()=>{let e=new ResizeObserver(()=>ae()),t=globalThis.matchMedia(`(pointer: coarse)`);return e.observe(H(g)),t.addEventListener(`change`,ae),ae(),()=>{e.disconnect(),t.removeEventListener(`change`,ae)}}),B(()=>{n(),o(),ie()});var oe=th();Ws(`click`,lo.body,()=>{F(C,!1)}),bl(oe,()=>({...m,role:`none`,class:`sui slider ${t.class??``}`,hidden:u(),[ul]:{disabled:d(),readonly:f(),invalid:p()}}),void 0,void 0,void 0,`svelte-feoi75`);var se=I(oe),ce=z(I(se),2);let le;var ue=z(ce,2);let de;var fe=z(ue,2),pe=e=>{var t=$m();let n;V(()=>{Y(t,`tabindex`,d()?-1:0),Y(t,`aria-label`,s()?.[1]),Y(t,`aria-hidden`,u()),Y(t,`aria-disabled`,d()),Y(t,`aria-readonly`,f()),Y(t,`aria-invalid`,p()),Y(t,`aria-valuemin`,r()),Y(t,`aria-valuemax`,i()),Y(t,`aria-valuenow`,o()?.[1]),n=nl(t,``,n,{"inset-inline-start":`${S[1]??``}px`})}),Gs(`pointerdown`,t,e=>re(e,1)),Gs(`keydown`,t,e=>ee(e,1)),G(e,t)};q(fe,e=>{H(h)&&e(pe)});var me=z(fe,2),he=e=>{var t=W();Cc(L(t),19,l,(e,t)=>`${t}-${e}`,(e,t,n)=>{var r=eh();let i;var a=R(r,!0);V(()=>{i=nl(r,``,i,{"inset-inline-start":`${H(_)/(l().length-1)*H(n)}px`}),K(a,H(t))}),G(e,r)}),G(e,t)};q(me,e=>{l().length&&e(he)}),D(se),Ol(se,e=>F(g,e),()=>H(g)),D(oe),V(()=>{le=nl(ce,``,le,{"inset-inline-start":`${(H(h)?S[0]:0)??``}px`,width:`${(H(h)?S[1]-S[0]:S[0])??``}px`}),Y(ue,`tabindex`,d()?-1:0),Y(ue,`aria-label`,H(h)?s()?.[0]:a()),Y(ue,`aria-hidden`,u()),Y(ue,`aria-disabled`,d()),Y(ue,`aria-readonly`,f()),Y(ue,`aria-invalid`,p()),Y(ue,`aria-valuemin`,r()),Y(ue,`aria-valuemax`,i()),Y(ue,`aria-valuenow`,H(h)?o()?.[0]:n()),de=nl(ue,``,de,{"inset-inline-start":`${S[0]??``}px`})}),Gs(`pointerdown`,se,e=>re(e)),Gs(`pointerdown`,ue,e=>re(e,0)),Gs(`keydown`,ue,e=>ee(e,0)),G(e,oe),k()}Ks([`pointerdown`,`keydown`]);var ih=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`label`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`ariaLabel`,`children`,`onChange`]),ah=U(`<button><span role="none" class="svelte-7ayydv"></span> <!></button>`),oh={hash:`svelte-7ayydv`,code:`button.svelte-7ayydv {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-7ayydv:focus-visible {outline:0;}button.svelte-7ayydv:focus-visible span:where(.svelte-7ayydv) {outline-color:var(--sui-focus-ring-color);}button[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-7ayydv span:where(.svelte-7ayydv):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-7ayydv {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-7ayydv::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}`};function sh(e,t){O(t,!0),J(e,oh);let n=X(t,`checked`,15),r=X(t,`label`,3,void 0),i=X(t,`hidden`,3,!1),a=X(t,`disabled`,3,!1),o=X(t,`readonly`,3,!1),s=X(t,`required`,3,!1),c=X(t,`invalid`,3,!1),l=X(t,`ariaLabel`,3,void 0),u=Al(t,ih);var d=ah(),f=()=>{!a()&&!o()&&(n(!n()),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:n()}})))};bl(d,()=>({...u,role:`switch`,class:`sui switch ${t.class??``}`,type:`button`,hidden:i(),disabled:a()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":a(),"aria-readonly":o(),"aria-required":s(),"aria-invalid":c(),"aria-label":l(),onclick:f}),void 0,void 0,void 0,`svelte-7ayydv`);var p=z(I(d),2),m=e=>{var t=ec();V(()=>K(t,r())),G(e,t)},h=e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)};q(p,e=>{r()?e(m):e(h,-1)}),D(d),G(e,d),k()}var ch=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),lh=U(`<div><!></div>`),uh={hash:`svelte-yic6ww`,code:`.table-cell.svelte-yic6ww {display:table-cell;}`};function dh(e,t){J(e,uh);let n=Al(t,ch);var r=lh();bl(r,()=>({...n,role:`cell`,class:`sui table-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-yic6ww`),Ac(I(r),()=>t.children??br),D(r),G(e,r)}var fh=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),ph=U(`<div><!></div>`),mh={hash:`svelte-loo4eg`,code:`.table-row.svelte-loo4eg {display:table-row;height:var(--sui-primary-row-height);}`};function hh(e,t){J(e,mh);let n=Al(t,fh);var r=ph();bl(r,()=>({...n,role:`row`,class:`sui table-row ${t.class??``}`}),void 0,void 0,void 0,`svelte-loo4eg`),Ac(I(r),()=>t.children??br),D(r),G(e,r)}var gh=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`ariaLabel`,`children`]),_h=U(`<div><!></div>`),vh={hash:`svelte-1g2ahsl`,code:`.table.svelte-1g2ahsl {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-1g2ahsl {border-collapse:collapse;}.table.data.svelte-1g2ahsl :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`};function yh(e,t){J(e,vh);let n=X(t,`ariaLabel`,3,void 0),r=Al(t,gh);var i=_h();bl(i,()=>({...r,role:`table`,class:`sui table ${t.class??``}`,"aria-label":n()}),void 0,void 0,void 0,`svelte-1g2ahsl`),Ac(I(i),()=>t.children??br),D(i),G(e,i)}var bh=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`name`,`ariaLabel`,`children`,`onChange`]),xh=U(`<div><div role="none" class="inner svelte-u1xql5"><!></div> <div role="none" class="indicator svelte-u1xql5"></div></div>`),Sh={hash:`svelte-u1xql5`,code:`.tab-list.svelte-u1xql5 {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-u1xql5 {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-u1xql5 button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-u1xql5 .indicator:where(.svelte-u1xql5) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-u1xql5 {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-u1xql5 button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-u1xql5 .indicator:where(.svelte-u1xql5) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-u1xql5 button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-u1xql5 {display:contents;}.indicator.svelte-u1xql5 {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}`};function Ch(e,t){O(t,!0),J(e,Sh);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`orientation`,3,`horizontal`),a=X(t,`name`,3,void 0),o=X(t,`ariaLabel`,3,void 0),s=Al(t,bh),c=P(void 0),l=P(void 0),u=()=>{globalThis.requestAnimationFrame(()=>{let e=H(c)?.querySelector(`[role="tab"][aria-selected="true"]`);if(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;F(l,Object.entries({top:t,left:n,width:r,height:i}).map(([e,t])=>`${e}: ${t}px`).join(`; `),!0)}else F(l,void 0)})};Nl(()=>{let e=new ResizeObserver(()=>{u()});return e.observe(H(c)),()=>{e.disconnect()}});var d=xh(),f=()=>{u()},p=e=>{u(),t.onChange?.(e)};bl(d,()=>({...s,role:`tablist`,class:`sui tab-list ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"aria-label":o(),"data-name":a()||void 0,onInitialized:f,onChange:p}),void 0,void 0,void 0,`svelte-u1xql5`);var m=I(d);Ac(I(m),()=>t.children??br),D(m);var h=z(m,2);D(d),Ol(d,e=>F(c,e),()=>H(c)),Gc(d,Dp),V(()=>{m.inert=r(),nl(h,H(l))}),G(e,d),k()}var wh=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Th=U(`<div><!></div>`),Eh={hash:`svelte-1o79dsj`,code:`.tab-panel.svelte-1o79dsj {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-1o79dsj, .tab-panel.svelte-1o79dsj:not([aria-hidden]) {display:none;}`};function Dh(e,t){J(e,Eh);let n=Al(t,wh);var r=Th();bl(r,()=>({...n,role:`tabpanel`,class:`sui tab-panel ${t.class??``}`}),void 0,void 0,void 0,`svelte-1o79dsj`),Ac(I(r),()=>t.children??br),D(r),G(e,r)}var Oh=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`selected`,`children`,`startIcon`,`endIcon`]);function kh(e,t){let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`selected`,3,!1),a=Al(t,Oh);$f(e,Ml(()=>a,{role:`tab`,get class(){return`sui tab ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:e=>{var n=W();Ac(L(n),()=>t.startIcon??br),G(e,n)},children:e=>{var n=W();Ac(L(n),()=>t.children??br),G(e,n)},endIcon:e=>{var n=W();Ac(L(n),()=>t.endIcon??br),G(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var Ah=new Set([`$$slots`,`$$events`,`$$legacy`,`show`,`id`,`duration`,`position`,`children`]),jh=U(`<div role="none" class="sui toast-base svelte-5aswi1"></div> <div><!></div>`,1),Mh={hash:`svelte-5aswi1`,code:`.toast-base.svelte-5aswi1 {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-5aswi1 {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-5aswi1 {display:block;opacity:0;}.toast.top-left.svelte-5aswi1 {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-5aswi1 {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-5aswi1:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-5aswi1:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-5aswi1 {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-5aswi1 {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-5aswi1 {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-5aswi1:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-5aswi1:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-5aswi1 {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}`};function Nh(e,t){O(t,!0),J(e,Mh);let n=X(t,`show`,15,!1),r=X(t,`id`,3,void 0),i=X(t,`duration`,3,5e3),a=X(t,`position`,7,`auto`),o=Al(t,Ah),s=P(void 0),c=P(void 0),l=P(void 0),u=P(0);Nl(()=>(F(c,document.querySelector(`.sui.toast-base.enabled`)??void 0,!0),H(c)?H(s)?.remove():(F(c,H(s),!0),H(c)&&(H(c).classList.add(`enabled`),(document.querySelector(`.sui.app-shell`)??document.body).appendChild(H(c)),H(c).showPopover&&(H(c).popover=`manual`,H(c).showPopover()))),()=>{H(l)?.remove()})),Nl(()=>{if(a()!==`auto`)return;let e=globalThis.matchMedia(`(width < 1024px)`),t=()=>{a(e.matches?`bottom-center`:`bottom-right`)};return t(),e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}),B(()=>{H(c)&&H(l)&&H(c).appendChild(H(l))}),B(()=>{r(),n(),i(),Ds(()=>{globalThis.clearTimeout(H(u))}),n()&&i()&&F(u,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var d=jh(),f=L(d);Ol(f,e=>F(s,e),()=>H(s));var p=z(f,2);bl(p,()=>({...o,class:`sui toast ${a()??``}`,"aria-hidden":!n()}),void 0,void 0,void 0,`svelte-5aswi1`),Ac(I(p),()=>t.children??br),D(p),Ol(p,e=>F(l,e),()=>H(l)),G(e,d),k()}function Ph(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Fh(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var Ih=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Lh=Ih&&`documentMode`in document?document.documentMode:null,Rh=Ih&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),zh=Ih&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Bh=!(!Ih||!(`InputEvent`in window)||Lh)&&`getTargetRanges`in new window.InputEvent(`input`),Vh=Ih&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Hh=Ih&&/Android/.test(navigator.userAgent),Uh=Ih&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!Hh,Wh=Ih&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Gh=Ih&&Hh&&Wh,Kh=Ih&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Rh&&!Wh,Pte=0,Fte=1,Ite=2,Lte=1,Rte=2,zte=3,Bte=4,Vte=5,Hte=6,qh=Uh||Vh||Kh?`\xA0`:``,Jh=`
|
||
|
||
`,Yh=zh?`\xA0`:qh,Xh=`֑-߿יִ-﷽ﹰ-ﻼ`,Zh=`A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--`,Ute=RegExp(`^[^`+Zh+`]*[`+Xh+`]`),Wte=RegExp(`^[^`+Xh+`]*[`+Zh+`]`),Qh={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Gte={directionless:1,unmergeable:2},$h={center:2,end:6,justify:4,left:1,right:3,start:5},Kte={[Rte]:`center`,[Hte]:`end`,[Bte]:`justify`,[Lte]:`left`,[zte]:`right`,[Vte]:`start`},qte={normal:0,segmented:2,token:1},Jte={[Pte]:`normal`,[Ite]:`segmented`,[Fte]:`token`},eg=`$config`;function tg(){return uC()._blockCursorElement}function Yte(e){return e!==null&&e.nodeType===1&&e.hasAttribute(`data-lexical-slot`)}var ng=class e{element;before;after;constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}insertChild(e){let t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&Ph(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&Ph(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&Ph(359),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,n){if(this.element===e)return t===e&&n===0?`before`:`after`;let r=rg(e,this.element);if(r===null)return`after`;let i=Array.prototype.indexOf.call(e.childNodes,r);if(i<0)return`after`;if(t===e)return n<=i?`before`:`after`;let a=rg(e,t);if(a===null)return`after`;let o=Array.prototype.indexOf.call(e.childNodes,a);return o>=0&&o<=i?`before`:`after`}getInsertionAnchor(){return this.before}};function rg(e,t){let n=t;for(;n!==null&&n.parentNode!==e;)n=n.parentNode;return n}var ig=class e extends ng{withBefore(t){return new e(this.element,t,this.after)}withAfter(t){return new e(this.element,this.before,t)}withElement(t){return this.element===t?this:new e(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;Yte(t);)e=t,t=t.nextSibling;let n=e?e.nextSibling:this.element.firstChild;return n!==null&&n===tg()?n:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{let t=e===`decorator`&&(Kh||Vh||Uh);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,n=e.nodeName===`IMG`?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===(t.nodeName===`IMG`))return;this.removeManagedLineBreak()}let n=this.element,r=this.before,i=ZS().createElement(`br`);if(i.setAttribute(`data-lexical-managed-linebreak`,`true`),n.insertBefore(i,r),e){let e=ZS().createElement(`img`);e.setAttribute(`data-lexical-managed-linebreak`,`true`),e.style.setProperty(`display`,`inline`,`important`),e.style.setProperty(`border`,`0px`,`important`),e.style.setProperty(`margin`,`0px`,`important`),e.alt=``,n.insertBefore(e,i),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=i}getFirstChildOffset(){let e=this.getFirstChild(),t=this.getInsertionAnchor(),n=0;for(let r=this.element.firstChild;r!==null&&r!==e&&r!==t;r=r.nextSibling)n++;return n}resolveChildIndex(e,t,n,r){if(n===this.element){let t=this.getFirstChildOffset(),n=tg(),i=this.element.childNodes,a=Math.min(r,i.length),o=0;for(let e=t;e<a;e++)i[e]!==n&&o++;return[e,Math.min(o,e.getChildrenSize())]}let i=ag(t,n);i.push(r);let a=ag(t,this.element),o=e.getIndexWithinParent();for(let e=0;e<a.length;e++){let t=i[e],n=a[e];if(t===void 0||t<n)break;if(t>n){o+=1;break}}return[e.getParentOrThrow(),o]}};function ag(e,t){let n=[],r=t;for(;r!==e&&r!==null;r=r.parentNode){let e=0;for(let t=r.previousSibling;t!==null;t=t.previousSibling)e++;n.push(e)}return r!==e&&Ph(225),n.reverse()}var og;try{og=`0.49.0+prod.esm`}catch{}var sg=og??`"<unknown>+source"`,cg=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){let e=Array.from(this._front).reverse();for(let t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}},lg=null;function ug(e,t=1e3){return e instanceof dg?e.clone():e.size<t?new Map(e):new dg().init(new Map(e),void 0,e.size)}var dg=class e{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new e().init(this._old,this._nursery,this._size)}init(e,t,n){return this._old=e,this._nursery=t,this._size=n,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){let t=this._nursery&&this._nursery.get(e);return t===void 0?this._old&&this._old.get(e):t}get(e){let t=this.getWithTombstone(e);return t===lg?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){let e=new Map(this._old);for(let[t,n]of this._nursery)n===lg?e.delete(t):e.set(t,n);this._old=e,this._nursery=void 0}return this._mutable=!1,this}set(e,t){let n=this.getWithTombstone(e);if(n===t)return this;let r=this.getNursery();return n!==lg&&n!==void 0||(this._size++,n===lg&&r.delete(e)),r.set(e,t),this}delete(e){let t=this.has(e);return t&&(this.getNursery().set(e,lg),this._size--),t}getOrInsert(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}getOrInsertComputed(e,t){let n=this.get(e);if(n!==void 0)return n;let r=t(e);return this.set(e,r),r}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(let e of this.entries())yield e[0]}*values(){for(let e of this.entries())yield e[1]}*entries(){let e=this._nursery,t=this._old;if(t)for(let n of t){let t=n[0],r=e?e.get(t):void 0;r!==lg&&(r!==void 0&&(n[1]=r),yield n)}if(e)for(let n of e)n[1]===lg||t&&t.has(n[0])||(yield n)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(let[t,n]of this.entries())e(n,t,this)}get[Symbol.toStringTag](){return`GenMap`}[Symbol.iterator](){return this.entries()}};function fg(e,t,n,r,i,a){if($(e)){let o=e.getFirstChild();for(;o!==null;){let e=o.__key;o.__parent===t&&(($(o)||NC(o)&&o.__slots!==null)&&fg(o,e,n,r,i,a),n.has(e)||a.delete(e),i.push(e)),o=o.getNextSibling()}}for(let o of NC(e)&&e.__slots!==null?e.__slots.values():[]){let e=r.get(o);e!==void 0&&PC(e)&&e.__slotHost===t&&(($(e)||NC(e)&&e.__slots!==null)&&fg(e,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o))}}var pg=!1,mg=0;function Xte(e){mg=e.timeStamp}function hg(e,t,n){let r=e.nodeName===`BR`,i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Qx(e,n)!==void 0}function Zte(e,t,n){let r=WS(NS(n)),i=r&&$S(r,n._rootElement),a=null,o=null;i!==null&&i.anchorNode===e&&(a=i.anchorOffset,o=i.focusOffset);let s=e.nodeValue;s!==null&&dS(t,s,a,o,!1)}function Qte(e,t,n){if(Q(e)){let t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return zx(t)&&n.isAttached()}function $te(e,t,n){for(let r=e;r&&!xC(r);r=DS(r)){let e=Qx(r,t);if(e!==void 0){let t=Yx(e,n);if(t)return Xb(t)||!iC(r)?void 0:[r,t]}}}function gg(e,t,n){pg=!0;let r=performance.now()-mg>100;try{Kb(e,()=>{let i=ib()||function(e){return e.read(`latest`,()=>{let e=ib();return e===null?null:e.clone()})}(e),a=new Map,o=e._editorState,s=e._blockCursorElement,c=!1,l=``;for(let n=0;n<t.length;n++){let u=t[n],d=u.type,f=u.target,p=$te(f,e,o);if(!p)continue;let[m,h]=p;if(d===`characterData`)r&&Cy(h)&&zx(f)&&Qte(i,f,h)&&Zte(f,h,e);else if(d===`childList`){c=!0;let t=u.addedNodes;for(let n=0;n<t.length;n++){let r=t[n],i=Xx(r),a=r.parentNode;if(!(a==null||r===s||i!==null||hg(r,a,e)||e._slotsUsed&&iC(r)&&r.hasAttribute(`data-lexical-slot`)||xC(r))){if(zh){let e=(iC(r)?r.innerText:null)||r.nodeValue;e&&(l+=e)}a.removeChild(r)}}let n=u.removedNodes,r=n.length;if(r>0){let t=0;for(let i=0;i<r;i++){let r=n[i];(hg(r,f,e)||s===r)&&(f.appendChild(r),t++)}r!==t&&a.set(m,h)}}}if(a.size>0)for(let[t,n]of a)n.reconcileObservedMutation(t,e);let u=n.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let n=u[t],r=n.addedNodes,i=n.target;for(let t=0;t<r.length;t++){let n=r[t],a=n.parentNode;a==null||n.nodeName!==`BR`||hg(n,i,e)||a.removeChild(n)}}n.takeRecords()}i!==null&&(c&&rS(i),zh&&wS(e)&&i.insertRawText(l))})}finally{pg=!1}}function _g(e){let t=e._observer;t!==null&&gg(e,t.takeRecords(),t)}function vg(e){(function(e){mg===0&&NS(e).addEventListener(`textInput`,Xte,!0)})(e),e._observer=new MutationObserver((t,n)=>{gg(e,t,n)})}var ene=`latest`,tne=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||ine).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function yg(e,t){return new tne(e,t)}function bg(e,t,n=ene){let r=(n===`latest`?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function xg(e,t,n){let r;if(kb(),typeof n==`function`){let i=e.getLatest(),a=bg(i,t);if(r=n(a),t.isEqual(a,r))return i}else r=n;let i=e.getWritable();return Cg(i).updateFromKnown(t,r),i}function nne(e){let t=new Map,n=new Set;for(let{ownNodeConfig:r}of DC(typeof e==`function`?e:e.replace))if(r&&r.stateConfigs)for(let e of r.stateConfigs){let r;`stateConfig`in e?(r=e.stateConfig,e.flat&&n.add(r.key)):r=e,t.set(r.key,r)}return{flatKeys:n,sharedConfigMap:t}}var Sg=new Set([`__proto__`,`constructor`,`prototype`]),rne=class e{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,n=void 0,r=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=n,this.knownState=r;let{sharedConfigMap:a}=this.sharedNodeState,o=i===void 0?function(e,t,n){let r=n.size;if(t)for(let i in t){let t=e.get(i);t&&n.has(t)||r++}return r}(a,n,r):i;this.size=o}getValue(e){let t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let n=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];t!==void 0&&(n=e.parse(t)),this.updateFromKnown(e,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,n]of this.knownState)t.isEqual(n,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(n);for(let n of this.sharedNodeState.flatKeys)n in e&&(t[n]=e[n],delete e[n]);return Tg(e)&&(t.$=e),t}getWritable(t){if(this.node===t)return this;let{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new e(t,n,function(e,t,n){let r;if(n)for(let[i,a]of Object.entries(n)){if(Sg.has(i))continue;let n=e.get(i);n?t.has(n)||t.set(n,n.parse(a)):(r||={},r[i]=a)}return r}(n.sharedConfigMap,i,r),i,this.size)}resetOnCopyNode(){for(let e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){let n=e.key;this.sharedNodeState.sharedConfigMap.set(n,e);let{knownState:r,unknownState:i}=this;r.has(e)||i&&n in i||(i&&(delete i[n],this.unknownState=Tg(i)),this.size++),r.set(e,t)}updateFromUnknown(e,t){if(Sg.has(e))return;let n=this.sharedNodeState.sharedConfigMap.get(e);n?this.updateFromKnown(n,n.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,n]of Object.entries(e))this.updateFromUnknown(t,n)}};function Cg(e){let t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new rne(t,wg(t));return t.__state=n,n}function wg(e){return e.__state?e.__state.sharedNodeState:Ox(uC(),e.getType()).sharedNodeState}function Tg(e){if(e)for(let t in e)return e}function ine(e){return e}function Eg(e,t,n){for(let[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=n?n.getValue(r):r.defaultValue;if(t!==i&&!r.isEqual(t,i))return!0}return!1}function Dg(e,t,n){let{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(let[t,n]of Object.entries(r))if(!e.has(t)&&(e.add(t),n!==(i?i[t]:void 0)))return!0}return!1}function Og(e,t){let n=e.__state;return n&&n.node===e?n.getWritable(t):n}function kg(e,t){let n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,o=t.__format,s=t.__style,c=e.__state,l=t.__state;return(n===null||n===a)&&(r===null||r===o)&&(i===null||i===s)&&(e.__state===null||c===l||function(e,t){if(e===t)return!0;let n=new Set;return!(e&&Eg(n,e,t)||t&&Eg(n,t,e)||e&&Dg(n,e,t)||t&&Dg(n,t,e))}(c,l))}function Ag(e,t){let n=e.mergeWithSibling(t),r=Mb()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function jg(e){let t,n,r=e;if(r.__text!==``||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&Cy(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==``){if(kg(t,r)){r=Ag(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&Cy(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==``){if(kg(r,n)){r=Ag(r,n);break}break}n.remove()}}else r.remove()}function Mg(e){return Ng(e.anchor),Ng(e.focus),e}function Ng(e){for(;e.type===`element`;){let t=e.getNode(),n=e.offset,r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),Cy(r)){e.set(r.__key,i?r.getTextContentSize():0,`text`,!0);break}if(!$(r))break;e.set(r.__key,i?r.getChildrenSize():0,`element`,!0)}}var Pg=Symbol.for(`@lexical/CachedTextSize`);function Fg(e,t){return Zg.read(()=>{let n=0,r=e;for(let e=0;e<t&&r!==null;e++){let i=Xg.get(r);if(i===void 0&&Ph(345,r),$(i)){let a=Qg.get(r);if(a!==void 0&&$(a)&&a.__parent!==i.__parent)n+=i.getTextContentSize();else{let e=$g.get(r),t=e&&e.__lexicalTextContent;typeof t!=`string`&&Ph(346,i.getType()),n+=t.length}e<t-1&&!i.isInline()&&(n+=2)}else{let e=i[Pg];e===void 0&&Ph(347,i.getType(),r),n+=e}r=i.__next}return n},{editor:Rg})}function Ig(e){$(e)||e[Pg]===void 0&&(e[Pg]=Cy(e)?e.__text.length:e.getTextContentSize())}var ane=4,Lg,Rg,zg,Bg=``,Vg=null,Hg=null,Ug=null;function Wg(){return{firstTextKey:Ug,format:Vg,style:Hg}}function Gg(e){e.firstTextKey!==null&&(Vg=e.format,Hg=e.style,Ug=e.firstTextKey)}function Kg(e){if(Ug!==null)return;let t=e.__lexicalFirstTextKey;if(t===void 0&&Ph(348),t===null)return;let n=Qg.get(t);Cy(n)&&(Vg=n.getFormat(),Hg=n.getStyle(),Ug=t)}var qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_=!1,i_=!1;function a_(e,t){let n=Xg.get(e),r=Qg.has(e);if(t!==null){let n=D_(e);n.parentNode===t&&t.removeChild(n)}if(!r){if(Rg._keyToDOMMap.delete(e),$(n)){let e=AC(n,Xg);o_(e,0,e.length-1,null)}if(n!==void 0){for(let e of m_(n).values()){let t=g_(e);a_(e,null),t!==null&&t.remove()}xS(t_,zg,qg,n,`destroyed`)}}}function o_(e,t,n,r){for(let i=t;i<=n;++i){let t=e[i];t!==void 0&&a_(t,r)}}function s_(e,t){e.setProperty(`text-align`,t)}var one=`40px`;function c_(e,t){let n=Lg.theme.indent;if(typeof n==`string`){let r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}e.style.setProperty(`padding-inline-start`,t===0?``:`calc(${t} * var(--lexical-indent-base-value, ${one}))`)}function l_(e,t){let n=e.style;t===0?s_(n,``):t===1?s_(n,`left`):t===2?s_(n,`center`):t===3?s_(n,`right`):t===4?s_(n,`justify`):t===5?s_(n,`start`):t===6&&s_(n,`end`)}function u_(e,t){let n=function(e){let t=e.__dir;if(t!==null)return t;if(Qb(e))return null;let n=e.getParent();return n===null||LS(n)&&n.__dir===null?`auto`:null}(t);n===null?e.removeAttribute(`dir`):e.dir=n}function d_(e){let t=ZS().createElement(`div`);return t.setAttribute(`data-lexical-slot`,e),t.style.display=`none`,t}function f_(e,t,n){t||e.contentEditable===`false`?Lne(n,Rg):n.removeAttribute(`contenteditable`)}function p_(e,t,n){let r=Bg,i=Wg();Bg=``;let a=``,o=Xb(e);for(let[r,i]of n){let n=d_(r);f_(t,o,n),t.appendChild(n),Bg=``;let s=Wg();v_(i,fC(e,n,Rg)),Gg(s),h_(e,r,t,n),a+=Bg}return Gg(i),Bg=r,a}function m_(e){return NC(e)&&e.__slots!==null?e.__slots:MC}function h_(e,t,n,r){let i=n_.$getSlotTargetElement(e,t,n,Rg);i!==null&&(r.parentElement!==i&&i.appendChild(r),r.style.display=``)}function g_(e){let t=$g.get(e);return t===void 0?null:t.parentElement}function __(e,t,n){let r=m_(e),i=m_(t);for(let[e,t]of r)if(!i.has(e)){let e=g_(t);a_(t,null),e!==null&&e.remove()}let a=Bg,o=Wg(),s=``,c=null,l=Xb(t);for(let[e,a]of i){let i=r.get(e),o=i===void 0?null:g_(i);Bg=``;let u=Wg();if(o===null){o=d_(e);let r=null;for(let e of n.children)if(!e.hasAttribute(`data-lexical-slot`)){r=e;break}n.insertBefore(o,r),v_(a,fC(t,o,Rg))}else i===a?S_(a,o):(i!==void 0&&a_(i,o),v_(a,fC(t,o,Rg)));if(Gg(u),f_(n,l,o),h_(t,e,n,o),s+=Bg,o.parentElement===n){let e=c===null?n.firstChild:c.nextSibling;e!==o&&n.insertBefore(o,e),c=o}}return Gg(o),Bg=a,s}function v_(e,t){let n=Qg.get(e);if(n===void 0&&Ph(60),t!==null){let r=Xg.get(e);if(r!==void 0){let i=$g.get(e);if(i!==void 0){let a=PC(r)?r.__slotHost:null,o=PC(n)?n.__slotHost:null,s=r.__parent!==n.__parent||a!==o,c=o!==null&&i.parentElement!==t.element;if(s||c)return t.insertChild(i),S_(e,t.element)}}}let r=n_.$createDOM(n,Rg);if(function(e,t,n){let r=n._keyToDOMMap;Zx(t,n,e),r.set(e,t)}(e,r,Rg),Cy(n)?r.setAttribute(`data-lexical-text`,`true`):Xb(n)&&(r.setAttribute(`data-lexical-decorator`,`true`),bC(r,{captureSelection:!0})),$(n)){let e=n.__indent,t=n.__size;u_(r,n),e!==0&&c_(r,e);let i=m_(n),a=i.size>0?p_(n,r,i):``;if(t===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,Bg+=a,i.size>0&&(r.__lexicalSlotTextLength=a.length);else{let e=Bg,o=t-1;if(y_(AC(n,Qg),n,0,o,fC(n,r,Rg)),a!==``){let t=r.__lexicalTextContent||``;r.__lexicalTextContent=a+t,Bg=e+a+t}i.size>0&&(r.__lexicalSlotTextLength=a.length)}let o=n.__format;o!==0&&l_(r,o),n.isInline()||b_(null,n,r)}else{let t=n.getTextContent();if(Xb(n)){let t=n.decorate(Rg,Lg);t!==null&&C_(e,t),r.contentEditable=`false`;let i=m_(n);i.size>0&&p_(n,r,i)}Bg+=t}return t!==null&&t.insertChild(r),n_.$decorateDOM(n,null,r,Rg),Ig(n),xS(t_,zg,qg,n,`created`),r}function y_(e,t,n,r,i){let a=Bg,o=Wg();Bg=``,Vg=null,Hg=null,Ug=null;let s=n;for(;s<=r;++s){let t=Wg();v_(e[s],i);let n=Qg.get(e[s]);n!==null&&Cy(n)?Vg===null&&(Vg=n.getFormat(),Hg=n.getStyle(),Ug=n.__key):$(n)&&s<r&&!n.isInline()&&(Bg+=Jh),Gg(t)}let c=Rg._keyToDOMMap.get(t.__key);c===void 0&&Ph(349,t.__key),c.__lexicalTextContent=Bg,c.__lexicalFirstTextKey=Ug,Bg=a+Bg,Gg(o)}function b_(e,t,n){let r=fC(t,n,Rg),i=r.element.__lexicalLastChildKind??null,a=function(e,t){if(e){let n=e.__last;if(n){let e=t.get(n);if(e)return cx(e)?`line-break`:Xb(e)&&e.isInline()?`decorator`:null}return m_(e).size>0?null:`empty`}return null}(t,Qg);i!==a&&r.setManagedLineBreak(a)}function sne(e,t,n){var r;Vg=null,Hg=null,Ug=null,function(e,t,n){let r=Bg,i=e.__size,a=t.__size;Bg=``;let o=n.element,s=Rg._keyToDOMMap.get(t.__key);s===void 0&&Ph(351,t.__key);let c=a-i;if(!r_&&Math.abs(c)<=1&&i>=ane&&e.__first===t.__first&&(c!==0||!Rg._cloneNotNeeded.has(e.__key))){let i=s.__lexicalTextContent,l=e_.get(e.__key);if(!r_&&typeof i==`string`&&l!==void 0){let a=function(e,t){let n=t.size;if(n===0||n>=e.__size)return null;let r=e.__last,i=null,a=0;for(;r!==null&&a<n;){if(!t.has(r))return null;i=r;let e=Qg.get(r);if(e===void 0)return null;r=e.__prev,a++}return a!==n||r!==null&&t.has(r)?null:i}(t,l);if(a!==null){let u=l.size;if(c===0){let e=Fg(a,u),n=a,c=0;for(;n!==null&&c<u;){let e=Qg.get(n);if(e===void 0)break;let t=Wg();S_(n,o),Cy(e)&&Vg===null&&(Vg=e.getFormat(),Hg=e.getStyle(),Ug=e.__key),Gg(t),n=e.__next,c++}let d=``;for(n=a,c=0;n!==null&&c<u;){let e=Qg.get(n);if(e===void 0)break;let t;if($(e)){let r=Rg._keyToDOMMap.get(n),i=r&&r.__lexicalTextContent;typeof i!=`string`&&Ph(352,e.getType()),t=i}else t=e.getTextContent();d+=t,c<u-1&&$(e)&&!e.isInline()&&(d+=Jh),n=e.__next,c++}let f=s.__lexicalSlotTextLength||0,p=f>0?i.slice(f):i,m=p.slice(0,p.length-e)+d;s.__lexicalTextContent=m,Bg=r+m,x_(t,s,l);return}if(function(e,t,n,r,i,a,o,s){if(s!==1&&s!==-1||o!==(s===1?2:1))return!1;let c=o-s,l=e.__last;for(let e=0;e<c-1;e++){if(l===null)return!1;let e=Xg.get(l);if(e===void 0)return!1;l=e.__prev}if(l===null)return!1;let u=Qg.get(a),d=Xg.get(l);if(u===void 0||d===void 0||u.__prev!==d.__prev)return!1;let f=[],p=a;for(let e=0;e<o;e++){if(p===null)return!1;f.push(p);let e=Qg.get(p);p=e?e.__next:null}let m=[];p=l;for(let e=0;e<c;e++){if(p===null)return!1;m.push(p);let e=Xg.get(p);p=e?e.__next:null}let h=new Set(m),g=new Set(f),_=[],v=0,y=0;for(;v<c&&y<o;)if(f[y]===m[v])_.push({key:f[y],kind:`reconcile`}),v++,y++;else if(g.has(m[v])){if(h.has(f[y]))return!1;_.push({key:f[y],kind:`create`,nextIndex:y}),y++}else _.push({key:m[v],kind:`destroy`}),v++;for(;v<c;)_.push({key:m[v++],kind:`destroy`});for(;y<o;)_.push({key:f[y],kind:`create`,nextIndex:y}),y++;let b=Fg(l,c);for(let e of _){let t=Wg();if(e.kind===`reconcile`)S_(e.key,n.element);else if(e.kind===`destroy`)a_(e.key,n.element);else{let t=null;for(let n=e.nextIndex+1;n<o;n++){let e=Rg._keyToDOMMap.get(f[n]);if(e!==void 0){t=e;break}}v_(e.key,n.withBefore(t??n.before))}if(e.kind!==`destroy`){let t=Qg.get(e.key);t&&Cy(t)&&Vg===null&&(Vg=t.getFormat(),Hg=t.getStyle(),Ug=t.__key)}Gg(t)}let x=``;for(let e=0;e<o;e++){let t=Qg.get(f[e]);if(t===void 0)return!1;let n;if($(t)){let r=Rg._keyToDOMMap.get(f[e]),i=r&&r.__lexicalTextContent;typeof i!=`string`&&Ph(350,t.getType()),n=i}else n=t.getTextContent();x+=n,e<o-1&&$(t)&&!t.isInline()&&(x+=Jh)}let S=r.__lexicalSlotTextLength||0,C=S>0?i.slice(S):i;return r.__lexicalTextContent=C.slice(0,C.length-b)+x,!0}(e,0,n,s,i,a,u,c)){let e=s.__lexicalTextContent;typeof e!=`string`&&Ph(353),Bg=r+e,x_(t,s,l);return}}}if(c===0){let t=e.__first,n=0;for(;t!==null;){let e=Qg.get(t);if(e===void 0)break;let r=r_||Yg.has(t)||Jg.has(t),i=Wg();if(r)S_(t,o);else{let n,r;if($(e)){r=$g.get(t);let i=r&&r.__lexicalTextContent;typeof i!=`string`&&Ph(354,e.getType()),n=i}else n=e.getTextContent();Bg+=n,r!==void 0&&Kg(r)}Cy(e)?Vg===null&&(Vg=e.getFormat(),Hg=e.getStyle(),Ug=e.__key):$(e)&&n<a-1&&!e.isInline()&&(Bg+=Jh),Gg(i),t=e.__next,n++}s.__lexicalTextContent=Bg,s.__lexicalFirstTextKey=Ug,Bg=r+Bg;return}}if(i===1&&a===1){let r=e.__first,i=t.__first;if(r===i)S_(r,o);else{let e=D_(r),t=v_(i,null);try{e.parentNode===o?o.replaceChild(t,e):n.insertChild(t)}catch(n){if(typeof n==`object`&&n){let a=`${n.toString()} Parent: ${o.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw Error(a)}throw n}a_(r,null)}let a=Qg.get(i);Cy(a)&&Vg===null&&(Vg=a.getFormat(),Hg=a.getStyle(),Ug=a.__key)}else{let r=AC(e,Xg),s=AC(t,Qg);if(r.length!==i&&Ph(227),s.length!==a&&Ph(228),i===0)a!==0&&y_(s,t,0,a-1,n);else if(a===0){if(i!==0){let e=n.after==null&&n.before==null&&m_(t).size===0&&n.element.__lexicalLineBreak==null;o_(r,0,i-1,e?null:o),e&&(o.textContent=``)}}else(function(e,t,n,r,i,a){let o=r-1,s=i-1,c,l,u=a.getFirstChild(),d=0,f=0;for(;d<=o&&f<=s;){let e=t[d],r=n[f],i=Wg();if(e===r)u=w_(S_(r,a.element)),d++,f++;else{if(l===void 0&&(l=T_(n,f)),c===void 0)c=T_(t,d);else if(!c.has(e)){d++,Gg(i);continue}if(!l.has(e)){u=w_(D_(e)),a_(e,a.element),d++,c.delete(e),Gg(i);continue}if(c.has(r)){let e=ES(Rg,r);e!==u&&a.withBefore(u??a.before).insertChild(e),u=w_(S_(r,a.element)),d++,f++}else v_(r,a.withBefore(u??a.before)),f++}let o=Qg.get(r);o!==null&&Cy(o)?Vg===null&&(Vg=o.getFormat(),Hg=o.getStyle(),Ug=o.__key):$(o)&&f<=s&&!o.isInline()&&(Bg+=Jh),Gg(i)}let p=d>o,m=f>s;if(p&&!m){let t=n[s+1],r=t===void 0?null:Rg.getElementByKey(t);y_(n,e,f,s,a.withBefore(r??a.before))}else m&&!p&&o_(t,d,o,a.element)})(t,r,s,i,a,n)}s.__lexicalTextContent=Bg,s.__lexicalFirstTextKey=Ug,Bg=r+Bg}(e,t,fC(t,n,Rg)),LS(t)||(r=t,Vg==null||Vg===r.__textFormat||i_||r.setTextFormat(Vg),function(e){Hg==null||Hg===e.__textStyle||i_||e.setTextStyle(Hg)}(t))}function x_(e,t,n){let r=t.__lexicalFirstTextKey;if(r!=null){let t=e.__key,i=r;for(;i!==null;){let e=Qg.get(i);if(e===void 0){i=null;break}if(e.__parent===t)break;i=e.__parent}if(i!==null&&!n.has(i)){let e=Qg.get(r);if(Cy(e))return Vg=e.getFormat(),void(Hg=e.getStyle())}}t.__lexicalFirstTextKey=Ug}function S_(e,t){let n=Xg.get(e),r=Qg.get(e);n!==void 0&&r!==void 0||Ph(61);let i=r_||Yg.has(e)||Jg.has(e),a=ES(Rg,e);if(n===r&&!i){let e;if($(n)){let t=a.__lexicalTextContent;typeof t!=`string`&&Ph(355,n.getType()),e=t,Kg(a)}else e=n.getTextContent();return Bg+=e,a}if(n!==r&&i&&xS(t_,zg,qg,r,`updated`),n_.$updateDOM(r,n,a,Rg)){let n=v_(e,null);return t===null&&Ph(62),t.replaceChild(n,a),a_(e,null),n}if($(n)){$(r)||Ph(334,e);let t=r.__indent;(r_||t!==n.__indent)&&c_(a,t);let o=r.__format;(r_||o!==n.__format)&&l_(a,o);let s=i&&(m_(r).size>0||m_(n).size>0)?__(n,r,a):``;if(i){let e=Bg;if(sne(n,r,a),Qb(r)||r.isInline()||b_(0,r,a),s!==``){let t=a.__lexicalTextContent||``;a.__lexicalTextContent=s+t,Bg=e+s+t,a.__lexicalSlotTextLength=s.length}else(m_(r).size>0||m_(n).size>0)&&(a.__lexicalSlotTextLength=0)}else{let e=a.__lexicalTextContent;typeof e!=`string`&&Ph(356,n.getType()),Bg+=e,Kg(a)}if((r_||r.__dir!==n.__dir||r.__parent!==n.__parent)&&(u_(a,r),Qb(r)&&!r_))for(let e of r.getChildren())$(e)&&u_(ES(Rg,e.getKey()),e)}else{let t=r.getTextContent();if(Xb(r)){let t=r.decorate(Rg,Lg);t!==null&&C_(e,t),i&&(m_(r).size>0||m_(n).size>0)&&__(n,r,a)}Bg+=t}if(!i_&&Qb(r)){let e=r.getLatest();if(e.__cachedText!==Bg){let t=e.getWritable();t.__cachedText=Bg,r=t}}return n_.$decorateDOM(r,n,a,Rg),Ig(r),a}function C_(e,t){let n=Rg._pendingDecorators,r=Rg._decorators;if(n===null){if(r[e]===t)return;n=eS(Rg)}n[e]=t}function w_(e){let t=e.nextSibling;return t!==null&&t===Rg._blockCursorElement&&(t=t.nextSibling),t}function T_(e,t){let n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function E_(e,t,n,r,i,a){Bg=``,Vg=null,Hg=null,Ug=null,r_=r===2,Rg=n,Lg=n._config,n_=n._config.dom||yx,zg=n._nodes,qg=Rg._listeners.mutation,Jg=i,Yg=a,Xg=e._nodeMap,Zg=e,Qg=t._nodeMap,i_=t._readOnly,$g=ug(n._keyToDOMMap),e_=function(){let e=new Map,t=t=>{for(let n of t){let t=Qg.get(n);if(t===void 0)continue;let r=t.__parent;if(r===null)continue;let i=e.get(r);i===void 0&&(i=new Set,e.set(r,i)),i.add(n)}};return t(Jg.keys()),t(Yg),e}();let o=new Map;return t_=o,S_(`root`,null),Rg=void 0,zg=void 0,Jg=void 0,Yg=void 0,Xg=void 0,Zg=void 0,Qg=void 0,Lg=void 0,$g=void 0,e_=void 0,t_=void 0,n_=yx,o}function D_(e){let t=$g.get(e);return t===void 0&&Ph(75,e),t}function O_(e){return{type:e}}var k_=O_(`SELECTION_CHANGE_COMMAND`),A_=O_(`SELECTION_INSERT_CLIPBOARD_NODES_COMMAND`),j_=O_(`CLICK_COMMAND`),M_=O_(`BEFORE_INPUT_COMMAND`),N_=O_(`INPUT_COMMAND`),P_=O_(`COMPOSITION_START_COMMAND`),F_=O_(`COMPOSITION_END_COMMAND`),I_=O_(`DELETE_CHARACTER_COMMAND`),L_=O_(`INSERT_LINE_BREAK_COMMAND`),R_=O_(`INSERT_PARAGRAPH_COMMAND`),z_=O_(`CONTROLLED_TEXT_INSERTION_COMMAND`),B_=O_(`PASTE_COMMAND`),V_=O_(`REMOVE_TEXT_COMMAND`),H_=O_(`DELETE_WORD_COMMAND`),U_=O_(`DELETE_LINE_COMMAND`),W_=O_(`FORMAT_TEXT_COMMAND`),G_=O_(`SET_TEXT_FORMAT_COMMAND`),K_=O_(`UNDO_COMMAND`),q_=O_(`REDO_COMMAND`),J_=O_(`KEYDOWN_COMMAND`),Y_=O_(`KEY_ARROW_RIGHT_COMMAND`),X_=O_(`MOVE_TO_END`),Z_=O_(`KEY_ARROW_LEFT_COMMAND`),Q_=O_(`MOVE_TO_START`),$_=O_(`KEY_ARROW_UP_COMMAND`),ev=O_(`KEY_ARROW_DOWN_COMMAND`),tv=O_(`KEY_ENTER_COMMAND`),nv=O_(`KEY_SPACE_COMMAND`),rv=O_(`KEY_BACKSPACE_COMMAND`),iv=O_(`KEY_ESCAPE_COMMAND`),av=O_(`KEY_DELETE_COMMAND`),ov=O_(`KEY_TAB_COMMAND`),sv=O_(`INSERT_TAB_COMMAND`),cv=O_(`INDENT_CONTENT_COMMAND`),lv=O_(`OUTDENT_CONTENT_COMMAND`),uv=O_(`DROP_COMMAND`),dv=O_(`FORMAT_ELEMENT_COMMAND`),fv=O_(`DRAGSTART_COMMAND`),pv=O_(`DRAGOVER_COMMAND`),mv=O_(`DRAGEND_COMMAND`),hv=O_(`COPY_COMMAND`),gv=O_(`CUT_COMMAND`),_v=O_(`SELECT_ALL_COMMAND`),vv=O_(`CLEAR_EDITOR_COMMAND`),yv=O_(`CLEAR_HISTORY_COMMAND`),bv=O_(`CAN_REDO_COMMAND`),xv=O_(`CAN_UNDO_COMMAND`),Sv=O_(`FOCUS_COMMAND`),Cv=O_(`BLUR_COMMAND`),wv=O_(`KEY_MODIFIER_COMMAND`);function Tv(e){let t=new Map;return{dispose(){for(let e of t.values())e.dispose();t.clear()},register(n,r){let i=t.get(n);i===void 0&&(i={dispose:e(n,r),holders:new Set},t.set(n,i));let a=()=>{let e=t.get(n);e&&e.holders.delete(a)&&e.holders.size===0&&(t.delete(n),e.dispose())};return i.holders.add(a),a}}}function Ev(e,t,n,r){return e.addEventListener(t,n,r),e.removeEventListener.bind(e,t,n,r)}var Dv=Object.freeze({}),Ov=[[`keydown`,function(e,t){let n=t._inputState;n.lastKeyDownTimeStamp=e.timeStamp,n.lastKeyCode=e.key,e.key!==`Backspace`&&zv(n),!t.isComposing()&&TS(t,J_,e)}],[`pointerdown`,function(e,t){let n=nC(e),r=e.pointerType;aC(n)&&r!==`touch`&&r!==`pen`&&e.button===0&&Kb(t,()=>{SC(n,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],[`compositionstart`,function(e,t){TS(t,P_,e)}],[`compositionend`,function(e,t){let n=t._inputState;zh?n.compositionPhase=`ending-firefox`:Vh||!Uh&&!Kh?TS(t,F_,e):(n.compositionPhase=`ending-safari`,n.compositionEndData=e.data)}],[`input`,function(e,t){e.stopPropagation();let n=t._inputState;zv(n),Kb(t,()=>{Vv(e,t)||t.dispatchCommand(N_,e)},{event:e}),n.unprocessedBeforeInputData=null}],[`click`,function(e,t){Kb(t,()=>{let n=ib(),r=WS(NS(t)),i=ab();if(r){if(Q(n)){let e=n.anchor,t=e.getNode();e.type===`element`&&e.offset===0&&n.isCollapsed()&&!Qb(t)&&nS().getChildrenSize()===1&&t.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)&&(r.removeAllRanges(),n.dirty=!0)}else if(e.pointerType===`touch`||e.pointerType===`pen`){let n=$S(r,t._rootElement).anchorNode;(iC(n)||zx(n))&&rS(rb(i,r,t,e))}}if(zh&&r!==null&&r.rangeCount===0){let n=t._rootElement;if(n!==null&&e.target===n){let a=e.clientY,o=n.childNodes.length;for(let e=0;e<n.childNodes.length;e++){let t=n.childNodes[e];if(iC(t)){let n=t.getBoundingClientRect();if(a<=(n.top+n.bottom)/2){o=e;break}}}r.setBaseAndExtent(n,o,n,o);let s=rb(i,r,t,e);s===null?r.removeAllRanges():rS(s)}}TS(t,j_,e)})}],[`cut`,Dv],[`copy`,Dv],[`dragstart`,Dv],[`dragover`,Dv],[`dragend`,Dv],[`paste`,Dv],[`focus`,Dv],[`blur`,Dv],[`drop`,Dv]];Bh&&Ov.push([`beforeinput`,(e,t)=>function(e,t){let n=e.inputType;n===`deleteCompositionText`||zh&&wS(t)||n!==`insertCompositionText`&&Kb(t,()=>{Vv(e,t)||TS(t,M_,e)},{event:e})}(e,t)]);var kv=new WeakMap,Av=new WeakMap,jv=Tv(e=>(e.addEventListener(`selectionchange`,Zv),()=>e.removeEventListener(`selectionchange`,Zv)));function Mv(e,t,n,r,i,a){let o=e.anchor,s=e.focus,c=o.getNode(),l=Mb(),u;if(a!==void 0)u=a;else{let e=WS(NS(l));u=e===null?null:$S(e,l._rootElement)}let d=u===null?null:u.anchorNode,f=o.key,p=l.getElementByKey(f),m=n.length;return f!==s.key||!Cy(c)||(!i&&(!Bh||l._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||c.isDirty()&&m<2||oS(n))&&o.offset!==s.offset&&!c.isComposing()||Rx(c)||c.isDirty()&&m>1||(i||!Bh)&&p!==null&&!c.isComposing()&&d!==pC(c,p,l)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!c.isComposing()&&(c.getFormat()!==e.format||c.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let n=e.anchor.offset,r=t.getParentOrThrow(),i=Lx(t);return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(Cy(t)||$(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}(e,c)}function Nv(e,t){return zx(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function Pv(e,t,n){let{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:o}=$S(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,Nv(r,i)&&Nv(a,o)&&!s.postDeleteSelectionToRestore)||Kb(t,()=>{if(!n)return void rS(null);if(!Mx(t,r,a))return;let c=ib();if(s.postDeleteSelectionToRestore&&Q(c)&&c.isCollapsed()){let e=c.anchor,t=s.postDeleteSelectionToRestore.anchor;(e.key===t.key&&e.offset===t.offset+1||e.offset===1&&t.getNode().is(e.getNode().getPreviousSibling()))&&(c=s.postDeleteSelectionToRestore.clone(),rS(c))}if(s.postDeleteSelectionToRestore=null,Q(c)){let n=c.anchor,l=n.getNode();if(c.isCollapsed()){e.type===`Range`&&r===a&&(c.dirty=!0);let i=NS(t).event,o=i?i.timeStamp:performance.now(),{format:u,style:d,offset:f,key:p,timeStamp:m}=s.collapsedSelectionFormat,h=nS(),g=!1===t.isComposing()&&h.getTextContent()===``;if(o<m+200&&n.offset===f&&n.key===p)Fv(c,u,d);else if(n.type===`text`)Cy(l)||Ph(141),Iv(c,l);else if(n.type===`element`&&!g){$(l)||Ph(259);let e=n.getNode();e.isEmpty()?function(e,t){Fv(e,t.getTextFormat(),t.getTextStyle())}(c,e):Fv(c,c.format,``)}}else{let e=n.key,t=c.focus.key,r=c.getNodes(),a=r.length,s=c.isBackward(),l=s?o:i,u=s?i:o,d=s?t:e,f=s?e:t,p=2047,m=!1;for(let e=0;e<a;e++){let t=r[e],n=t.getTextContentSize();if(Cy(t)&&n!==0&&!(e===0&&t.__key===d&&l===n||e===a-1&&t.__key===f&&u===0)&&(m=!0,p&=t.getFormat(),p===0))break}c.format=m?p:0}}TS(t,k_)})}function Fv(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function Iv(e,t){Fv(e,t.getFormat(),t.getStyle())}function Lv(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return t.length===0?null:t[0]}function Rv(e){let{lastKeyCode:t}=Mb()._inputState;if(e==null||e.length<=1||t==null)return;let n=t.length===1?t:t===`Enter`?`
|
||
`:t===`Tab`?` `:null;if(!n)return;let r=ib();if(!Q(r)||!r.isCollapsed())return;let i=r.anchor.getNode();if(!Cy(i))return;let{offset:a}=r.anchor;if(i.getTextContentSize()===a){let e=i.getNextSibling();if(n===`
|
||
`){if(cx(e))e.selectEnd();else if(!e){let e=kC(i,$y),t=e&&e.getNextSibling();$(t)&&t.selectStart()}}else n===` `?Dy(e)&&e.selectEnd():Cy(e)&&e.getTextContent()[0]===n&&e.select(1,1)}else i.getTextContent()[a]===n&&i.select(a+1,a+1)}function zv(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function Bv(e){zv(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>zv(e),0)}function Vv(e,t){let n=nC(e);if(iC(n)&&SC(n,t))return!0;let r=t.getRootElement();if(r===null)return!1;let i=tC(r.ownerDocument);return i!==null&&r.contains(i)&&SC(i,t)}function Hv(e){let t=e.inputType,n=Lv(e),r=Mb(),i=r._inputState,a=ib();if(t===`insertText`&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(zv(i),e.preventDefault(),Q(a)&&!a.isCollapsed()){let e=a.isBackward()?a.anchor:a.focus;a.anchor.set(e.key,e.offset,e.type),a.focus.set(e.key,e.offset,e.type)}return!0}if(t===`deleteContentBackward`){if(a===null){let e=ab();if(!Q(e))return!0;rS(e.clone())}if(Q(a)){let t=a.anchor.key===a.focus.key;if(function(e,t){return e.lastKeyCode===`MediaLast`&&t<e.lastKeyDownTimeStamp+30}(i,e.timeStamp)&&r.isComposing()&&t){if(qx(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Kb(r,()=>{qx(null)})},30),Q(a)){let e=a.anchor.getNode();e.markDirty(),Cy(e)||Ph(142),Iv(a,e)}}else{if(qx(null),Vh&&n!==null&&!n.collapsed&&(a.applyDOMRange(n),!a.isCollapsed()))return e.preventDefault(),a.removeText(),!0;e.preventDefault();let o=a.anchor.getNode(),s=o.getTextContent(),c=o.canInsertTextAfter(),l=a.anchor.offset===0&&a.focus.offset===s.length,u=Gh&&t&&!l&&c;if(u&&a.isCollapsed()&&(u=!Xb(CS(a.anchor,!0))),!u){TS(r,I_,!0);let e=ib();Gh&&Q(e)&&e.isCollapsed()&&(i.postDeleteSelectionToRestore=e,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!Q(a))return!0;let o=e.data;i.unprocessedBeforeInputData!==null&&uS(!1,r,i.unprocessedBeforeInputData),a.dirty&&i.unprocessedBeforeInputData===null||!a.isCollapsed()||Qb(a.anchor.getNode())||n===null||a.applyDOMRange(n),i.unprocessedBeforeInputData=null;let s=a.anchor,c=a.focus,l=s.getNode(),u=c.getNode();if(t===`insertText`||t===`insertTranspose`){if(o===`
|
||
`)e.preventDefault(),TS(r,L_,!1);else if(o===Jh)e.preventDefault(),TS(r,R_);else if(o==null&&e.dataTransfer){let t=e.dataTransfer.getData(`text/plain`);e.preventDefault(),a.insertRawText(t)}else o!=null&&Mv(a,n,o,e.timeStamp,!0)?(e.preventDefault(),TS(r,z_,o),Rv(o)):i.unprocessedBeforeInputData=o;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case`insertFromYank`:case`insertFromDrop`:case`insertReplacementText`:TS(r,z_,e),Rv((e.dataTransfer?e.dataTransfer.getData(`text/plain`):null)??e.data);break;case`insertFromComposition`:{let t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;let n=r._compositionKey;qx(null),t||TS(r,z_,e),Kv(n);break}case`insertLineBreak`:qx(null),TS(r,L_,!1);break;case`insertParagraph`:qx(null),i.isInsertLineBreak&&!Vh?(i.isInsertLineBreak=!1,TS(r,L_,!1)):TS(r,R_);break;case`insertFromPaste`:case`insertFromPasteAsQuotation`:TS(r,B_,e);break;case`deleteByComposition`:(function(e,t){return e!==t||$(e)||$(t)||!Lx(e)||!Lx(t)})(l,u)&&TS(r,V_,e);break;case`deleteByDrag`:kS(une),TS(r,V_,e);break;case`deleteByCut`:TS(r,V_,e);break;case`deleteContent`:TS(r,I_,!1);break;case`deleteWordBackward`:TS(r,H_,!0);break;case`deleteWordForward`:TS(r,H_,!1);break;case`deleteHardLineBackward`:case`deleteSoftLineBackward`:TS(r,U_,!0);break;case`deleteContentForward`:case`deleteHardLineForward`:case`deleteSoftLineForward`:TS(r,U_,!1);break;case`formatStrikeThrough`:TS(r,W_,`strikethrough`);break;case`formatBold`:TS(r,W_,`bold`);break;case`formatItalic`:TS(r,W_,`italic`);break;case`formatUnderline`:TS(r,W_,`underline`);break;case`historyUndo`:TS(r,K_);break;case`historyRedo`:TS(r,q_)}return!0}function Uv(e){let t=Mb(),n=t._inputState,r=ib(),i=e.data,a=Lv(e),o=!1;if(i!=null&&Q(r)){let s=WS(NS(t)),c=s===null?null:$S(s,t._rootElement),l=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&!t.isComposing();l&&(n.hadOrphanedCompositionEvents=!0);let u=r.anchor.getNode(),d=e.inputType===`insertCompositionText`&&n.compositionPhase!==`ending-firefox`&&t.isComposing()&&Cy(u)&&Rx(u);if(!l&&!d&&Mv(r,a,i,e.timeStamp,!1,c)){if(o=!0,n.compositionPhase===`ending-firefox`){let e=qv(t,i);if(n.compositionPhase=`idle`,e)return kS(cy),iS(),!0}let a=r.anchor.getNode();if(s===null||c===null)return!0;let l=r.isBackward(),u=l?r.anchor.offset:r.focus.offset,d=l?r.focus.offset:r.anchor.offset;Bh&&!r.isCollapsed()&&Cy(a)&&c.anchorNode!==null&&a.getTextContent().slice(0,u)+i+a.getTextContent().slice(u+d)===lS(c.anchorNode)||TS(t,z_,i);let f=i.length;zh&&f>1&&e.inputType===`insertCompositionText`&&!t.isComposing()&&(r.anchor.offset-=f,r._cachedNodes=null,r._cachedIsBackward=null),Gh&&t.isComposing()&&(n.lastKeyDownTimeStamp=0,qx(null))}}return o||(uS(!1,t,i===null?void 0:i),n.compositionPhase===`ending-firefox`&&(qv(t,i||void 0),kS(`composition-end`),n.compositionPhase=`idle`)),iS(),!0}function Wv(e){let t=Mb(),n=t._inputState,r=ib();if(Q(r)&&!t.isComposing()){n.compositionPhase=`composing`,n.hadOrphanedCompositionEvents=!1;let i=r.anchor,a=r.anchor.getNode();if(qx(i.key),kS(`composition-start`),e.timeStamp<n.lastKeyDownTimeStamp+30||i.type===`element`||!r.isCollapsed()||!Gh&&(a.getFormat()!==r.format||Cy(a)&&a.getStyle()!==r.style)||Cy(a)&&(Rx(a)||i.offset===0&&!a.canInsertTextBefore()||i.offset===a.getTextContentSize()&&!a.canInsertTextAfter())){TS(t,z_,Yh);let e=ib();Q(e)&&qx(e.anchor.key)}}return!0}function Gv(e){let t=Mb();return t._inputState.compositionPhase=`idle`,qv(t,e.data),kS(cy),!0}function Kv(e){if(e===null)return;let t=Yx(e);if(!Cy(t)||t.getType()===`text`||Rx(t)||!t.isAttached())return;let n=ib(),r=Q(n)&&n.anchor.key===e?n.anchor.offset:null,i=Sy(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),r!==null){let e=Math.min(r,i.getTextContentSize());i.select(e,e)}}function qv(e,t){let n=e._compositionKey;if(qx(null),n!==null&&t!=null){if(t===``){let t=Yx(n),r=e.getElementByKey(n),i=r!==null&&Cy(t)?pC(t,r,e):null;if(i!==null&&i.nodeValue!==null&&Cy(t)){let n=WS(NS(e)),r=n&&$S(n,e._rootElement),a=null,o=null;r!==null&&r.anchorNode===i&&(a=r.anchorOffset,o=r.focusOffset),dS(t,i.nodeValue,a,o,!0)}return Kv(n),!1}if(t[t.length-1]===`
|
||
`){let t=ib();if(Q(t)||Iy(t)){if(Q(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return TS(e,tv,null),Kv(n),!1}}let r=Yx(n);if(r!==null&&Cy(r)&&Rx(r)){r.markDirty();let e=ib(),i=r.getTextContentSize(),a=Q(e)&&e.anchor.key===n?e.anchor.offset:i;return r.select(a,a).insertText(t),!0}}return uS(!0,e,t),Kv(n),!1}function Jv(e){let t=Mb(),n=t._inputState;if(e.key==null)return!0;if(n.compositionPhase===`ending-safari`){let r=vS(e);if(r&&Kb(t,()=>{qv(t,n.compositionEndData)}),n.compositionPhase=`idle`,n.compositionEndData=``,r)return!0}if(function(e){return hS(e,`ArrowRight`,{shiftKey:`any`})}(e))TS(t,Y_,e);else if(function(e){return hS(e,`ArrowRight`,{...gS,shiftKey:`any`})}(e))TS(t,X_,e);else if(function(e){return hS(e,`ArrowLeft`,{shiftKey:`any`})}(e))TS(t,Z_,e);else if(function(e){return hS(e,`ArrowLeft`,{...gS,shiftKey:`any`})}(e))TS(t,Q_,e);else if(function(e){return hS(e,`ArrowUp`,{altKey:`any`,shiftKey:`any`})}(e))TS(t,$_,e);else if(function(e){return hS(e,`ArrowDown`,{altKey:`any`,shiftKey:`any`})}(e))TS(t,ev,e);else if(function(e){return hS(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`,shiftKey:!0})}(e))n.isInsertLineBreak=!0,TS(t,tv,e);else if(function(e){return e.key===` `}(e))TS(t,nv,e);else if(function(e){return Rh&&hS(e,`o`,{ctrlKey:!0})}(e))e.preventDefault(),n.isInsertLineBreak=!0,TS(t,L_,!0);else if(function(e){return hS(e,`Enter`,{altKey:`any`,ctrlKey:`any`,metaKey:`any`})}(e))n.isInsertLineBreak=!1,TS(t,tv,e);else if(function(e){return hS(e,`Backspace`,{shiftKey:`any`})||Rh&&hS(e,`h`,{ctrlKey:!0})}(e))vS(e)?TS(t,rv,e)&&Bv(n):(e.preventDefault(),TS(t,I_,!0));else if(function(e){return e.key===`Escape`}(e))TS(t,iv,e);else if(function(e){return hS(e,`Delete`,{})||Rh&&hS(e,`d`,{ctrlKey:!0})}(e))(function(e){return e.key===`Delete`})(e)?TS(t,av,e):(e.preventDefault(),TS(t,I_,!1));else if(function(e){return hS(e,`Backspace`,_S)}(e))e.preventDefault(),TS(t,H_,!0);else if(function(e){return hS(e,`Delete`,_S)}(e))e.preventDefault(),TS(t,H_,!1);else if(function(e){return Rh&&hS(e,`Backspace`,{metaKey:!0})}(e))e.preventDefault(),TS(t,U_,!0);else if(function(e){return Rh&&(hS(e,`Delete`,{metaKey:!0})||hS(e,`k`,{ctrlKey:!0}))}(e))e.preventDefault(),TS(t,U_,!1);else if(function(e){return hS(e,`b`,gS)}(e))e.preventDefault(),TS(t,W_,`bold`);else if(function(e){return hS(e,`u`,gS)}(e))e.preventDefault(),TS(t,W_,`underline`);else if(function(e){return hS(e,`i`,gS)}(e))e.preventDefault(),TS(t,W_,`italic`);else if(function(e){return hS(e,`Tab`,{shiftKey:`any`})}(e))TS(t,ov,e);else if(function(e){return hS(e,`z`,gS)}(e))e.preventDefault(),TS(t,K_);else if(function(e){return Rh?hS(e,`z`,{metaKey:!0,shiftKey:!0}):hS(e,`y`,{ctrlKey:!0})||hS(e,`z`,{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),TS(t,q_);else{let r=t._editorState._selection;(function(e){return hS(e,`a`,gS)})(e)?(e.preventDefault(),TS(t,_v,e)&&Bv(n)):r===null||Q(r)||(function(e){return hS(e,`c`,gS)}(e)?(e.preventDefault(),TS(t,hv,e)):function(e){return hS(e,`x`,gS)}(e)&&(e.preventDefault(),TS(t,gv,e)))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(wv,e),!0}function Yv(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}var Xv=new Map;function Zv(e){let t=GS(e.target);if(t===null)return;let n=OS(e.target),r=null,i=null,a=n===null?void 0:Av.get(n);if(n!==null){if(a!==void 0){let e=a.editors,n=a.hasShadowEditor;if(n===void 0){n=!1;for(let t of e)if(t._rootElement!==null&&KS(t._rootElement.getRootNode())){n=!0;break}a.hasShadowEditor=n}if(n){let n=null,a=null;for(let o of e){let e=o._rootElement;if(e===null)continue;let s=$S(t,e).anchorNode;if(s!==null&&Px(s)===o){if(KS(e.getRootNode())){r=o,i=s;break}n===null&&(n=o,a=s)}}r===null&&n!==null&&(r=n,i=a)}else{let e=t.anchorNode;e===null||iC(e)&&e.shadowRoot!==null||(r=Px(e),r!==null&&(i=e))}}if(r===null){let e=tC(n);r=e===null?null:Px(e)}}if(r===null)return;if(r._inputState.isSelectionChangeFromMouseDown){if(a!==void 0)for(let e of a.editors)e._inputState.isSelectionChangeFromMouseDown=!1;Kb(r,()=>{let n=ab(),a=i??$S(t,r._rootElement).anchorNode;(iC(a)||zx(a))&&rS(rb(n,t,r,e))})}let o=sS(r),s=o[o.length-1],c=s._key,l=Xv.get(c),u=l||s;u!==r&&Pv(t,u,!1),Pv(t,r,!0),r===s?l&&Xv.delete(c):Xv.set(c,r)}function Qv(e){e._lexicalHandled=!0}function $v(e){return!0===e._lexicalHandled}function cne(e){let t=kv.get(e);if(t===void 0)return;let n=Av.get(t);if(n===void 0)return;kv.delete(e);let r=Fx(e);Nx(r)?(function(e){if(e._parentEditor!==null){let t=sS(e),n=t[t.length-1]._key;Xv.get(n)===e&&Xv.delete(n)}else Xv.delete(e._key)}(r),n.editors.delete(r),n.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&Ph(198);let i=Yv(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}function ey(e,t,n){kb();let r=e.__key,i=e.getParent();if(i===null)return void(FC(e)!==null&&Ph(367,r,String(FC(e))));let a=function(e){let t=ib();if(!Q(t)||!$(e))return t;let{anchor:n,focus:r}=t,i=n.getNode(),a=r.getNode();return jS(i,e)&&n.set(e.__key,0,`element`),jS(a,e)&&r.set(e.__key,0,`element`),t}(e),o=!1;if(Q(a)&&t){let t=a.anchor,n=a.focus;t.key===r&&(cb(t,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0),n.key===r&&(cb(n,e,i,e.getPreviousSibling(),e.getNextSibling()),o=!0)}else Iy(a)&&t&&e.isSelected()&&e.selectPrevious();if(Q(a)&&t&&!o){let t=e.getIndexWithinParent();Gx(e),ob(a,i,t,-1)}else Gx(e);n||LS(i)||i.canBeEmpty()||!i.isEmpty()||ey(i,t),t&&a&&Qb(i)&&i.isEmpty()&&i.selectEnd()}function ty(e){return e}var ny=Symbol.for(`ephemeral`);function ry(e){return e[ny]||!1}var iy={configurable:!0,enumerable:!1,value:void 0,writable:!0},ay=class{__type;__key;__parent;__prev;__next;__state;[Pg];static getType(){let{ownNodeType:e}=EC(this);return e===void 0&&Ph(64,this.name),e}static clone(e){Ph(65,this.name)}$config(){return{}}config(e,t){let n=t.extends||jC(this.constructor);return Object.assign(t,{extends:n}),typeof e==`string`&&Object.assign(t,{type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}resetOnCopyNodeFrom(e){this.__state&&=this.__state.getWritable(this).resetOnCopyNode()}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",iy),Object.defineProperty(this,Pg,iy),Wx(this,e)}getType(){return this.__type}isInline(){Ph(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e===`root`)return!0;let t=Yx(e);if(t===null)break;e=t.__parent===null?FC(t):t.__parent}return!1}isSelected(e){let t=e||ib();if(t==null)return!1;let n=t.getNodes().some(e=>e.__key===this.__key);if(Cy(this))return n;if(Q(t)&&t.anchor.type===`element`&&t.focus.type===`element`){if(t.isCollapsed())return!1;let e=this.getParent();if(Xb(this)&&this.isInline()&&e){let n=t.isBackward()?t.focus:t.anchor;if(e.is(n.getNode())&&n.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:Yx(e)}getParentOrThrow(){let e=this.getParent();return e===null&&Ph(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let t=e.getParent();if(LS(t)||FC(e)!==null)return $(e)||e===this&&Xb(e)||Ph(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&Ph(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Yx(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(t===null)return e;let n=t.getFirstChild();for(;n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Yx(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=$(this)?this:this.getParent(),n=$(e)?e:e.getParent(),r=t&&n?_w(t,n):null;return r?r.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){let t=_w(this,e);return t!==null&&(t.type===`descendant`||(t.type===`branch`?mw(t)===-1:(t.type!==`same`&&t.type!==`ancestor`&&Ph(279),!1)))}isParentOf(e){return jS(e,this)}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set,i=this;for(;i!==null;){let a=i.__key;if(r.has(a)||(r.add(a),n.push(i)),i===e)break;let o=$(i)?t?i.getFirstChild():i.getLastChild():null;if(o!==null){i=o;continue}let s=t?i.getNextSibling():i.getPreviousSibling();if(s!==null){i=s;continue}let c=i.getParentOrThrow();if(r.has(c.__key)||n.push(c),c===e)break;let l=null,u=c;do{if(u===null&&Ph(68),l=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),u===null)break;l!==null||r.has(u.__key)||n.push(u)}while(l===null);i=l}return t||n.reverse(),n}isDirty(){let e=Mb()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(ry(this))return this;let e=Yx(this.__key);return e===null&&Ph(113),e}getWritable(){if(ry(this))return this;kb();let e=jb(),t=Mb(),n=e._nodeMap,r=this.__key,i=this.getLatest(),a=t._cloneNotNeeded,o=ib();if(o!==null&&o.setCachedNodes(null),a.has(r))return Kx(i),i;let s=gC(i);return a.add(r),Kx(s),n.set(r,s),s}getTextContent(){return WC(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){Ph(70)}updateDOM(e,t,n){Ph(71)}getDOMSlot(e){return new ng(e)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){Ph(18,this.name)}updateFromJSON(e){return function(e,t){let n=e.getWritable(),r=t.$,i=r;for(let e of wg(n).flatKeys)e in t&&(i!==void 0&&i!==r||(i={...r}),i[e]=t[e]);return(n.__state||i)&&Cg(e).updateFromJSON(i),n}(this,e)}static transform(){return null}remove(e){ey(this,!0,e)}replace(e,t){kb();let n=ib();n!==null&&(n=n.clone()),BS(this,e);let r=this.getLatest(),i=this.__key,a=e.__key,o=e.getWritable(),s=this.getParentOrThrow().getWritable(),c=s.__size,l=o.getParent(),u=l===null?-1:o.getIndexWithinParent();Gx(o),l!==null&&Q(n)&&ob(n,l,u,-1);let d=r.getPreviousSibling(),f=r.getNextSibling(),p=r.__prev,m=r.__next,h=r.__parent;ey(r,!1,!0),d===null?s.__first=a:d.getWritable().__next=a,o.__prev=p,f===null?s.__last=a:f.getWritable().__prev=a,o.__next=m,o.__parent=h,s.__size=c;let g=0;t&&($(this)&&$(o)||Ph(139),g=o.getChildrenSize(),o.splice(g,0,this.getChildren()));let _=zC(this);if(_.length>0){NC(this)&&NC(o)||Ph(368,this.__key,o.__key);for(let e of _){let t=BC(this,e);t!==null&&(Une(this,e),KC(o,e,t))}}if(Q(n)){rS(n);let e=n.anchor,r=n.focus;e.key===i&&(t&&e.type===`element`?e.set(o.__key,g+e.offset,`element`):Ay(e,o)),r.key===i&&(t&&r.type===`element`?r.set(o.__key,g+r.offset,`element`):Ay(r,o))}return Jx()===i&&qx(a),o}insertAfter(e,t=!0){kb(),BS(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.getParent(),a=ib(),o=!1,s=!1;if(i!==null){let n=e.getIndexWithinParent();if(Q(a)){let e=i.__key,t=a.anchor,r=a.focus;o=t.type===`element`&&t.key===e&&t.offset===n+1,s=r.type===`element`&&r.key===e&&r.offset===n+1}Gx(r),t&&Q(a)&&ob(a,i,n,-1)}else Gx(r);let c=this.getNextSibling(),l=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(c===null?l.__last=u:c.getWritable().__prev=u,l.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Q(a)){let e=this.getIndexWithinParent();ob(a,l,e+1);let t=l.__key;o&&a.anchor.set(t,e+2,`element`),s&&a.focus.set(t,e+2,`element`)}return e}insertBefore(e,t=!0){kb(),BS(this,e);let n=this.getWritable(),r=e.getWritable();this.getParentOrThrow();let i=r.__key,a=ib(),o=r.getParent(),s=o===null?-1:r.getIndexWithinParent();Gx(r),o!==null&&t&&Q(a)&&ob(a,o,s,-1);let c=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),u=n.__prev,d=this.getIndexWithinParent();return c===null?l.__first=i:c.getWritable().__next=i,l.__size++,n.__prev=i,r.__prev=u,r.__next=n.__key,r.__parent=n.__parent,t&&Q(a)&&ob(a,this.getParentOrThrow(),d),e}isParentRequired(){return!1}createParentElementNode(){return mx()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){kb();let n=IC(this);if(n!==null)return n.selectPrevious(e,t);let r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if($(r))return r.select();if(!Cy(r)){let e=r.getIndexWithinParent()+1;return i.select(e,e)}return r.select(e,t)}selectNext(e,t){kb();let n=IC(this);if(n!==null)return n.selectNext(e,t);let r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if($(r))return r.select(0,0);if(!Cy(r)){let e=r.getIndexWithinParent();return i.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}};function oy(e){return e instanceof ay}var lne=`history-push`,sy=`history-merge`,une=`skip-selection-focus`,cy=`composition-end`,dne=`!important`;function ly(e){let t={};if(!e)return t;let n=``,r=``,i=null,a=!1,o=!1,s=!1,c=0,l=e.length,u=-1;for(let d=0;d<l;d++){let l=e[d];if(a)l===`*`&&e[d+1]===`/`&&(a=!1,d++);else if(o)u===-1&&(u=d),o=!1;else if(i===null){if(l!==`/`||e[d+1]!==`*`){if(l!==`"`&&l!==`'`){if(l!==`(`){if(l!==`)`){if(s||l!==`:`||c!==0){if(l===`;`&&c===0){u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1);let i=n.trim(),a=r.trim();i!==``&&a!==``&&(t[i]=a),n=``,r=``,s=!1;continue}u===-1&&(u=d)}else u!==-1&&(n+=e.slice(u,d),u=-1),s=!0}else u===-1&&(u=d),c=Math.max(0,c-1)}else u===-1&&(u=d),c++}else u===-1&&(u=d),i=l}else u!==-1&&(s?r+=e.slice(u,d):n+=e.slice(u,d),u=-1),a=!0,d++}else u===-1&&(u=d),l===`\\`?o=!0:l===i&&(i=null)}u!==-1&&(s?r+=e.slice(u,l):n+=e.slice(u,l));let d=n.trim(),f=r.trim();return d!==``&&f!==``&&(t[d]=f),t}function fne(e,t,n){let r=n.trimEnd(),i=r.length-10;i>=0&&r.slice(i).toLowerCase()===dne?e.setProperty(t,r.slice(0,i).trim(),`important`):e.setProperty(t,n,``)}function uy(e,t,n=``){if(t===n)return;let r=ly(n),i=ly(t);for(let t in i)delete r[t],fne(e,t,i[t]);for(let t in r)e.removeProperty(t)}function dy(e,t){return 16&t?`code`:t&128?`mark`:32&t?`sub`:64&t?`sup`:null}function fy(e,t){return 1&t?`strong`:2&t?`em`:`span`}function py(e,t,n,r,i){let a=r.classList,o=bS(i,`base`);o!==void 0&&a.add(...o),o=bS(i,`underlineStrikethrough`);let s=!1,c=8&t&&4&t;o!==void 0&&(8&n&&4&n?(s=!0,c||a.add(...o)):c&&a.remove(...o));for(let e in Qh){let r=Qh[e];if(o=bS(i,e),o!==void 0){if(n&r){if(s&&(e===`underline`||e===`strikethrough`)){t&r&&a.remove(...o);continue}((t&r)===0||c&&e===`underline`||e===`strikethrough`)&&a.add(...o)}else t&r&&a.remove(...o)}}}function my(e,t,n){let r=n.isComposing(),i=e+(r?qh:``),a=uC(),o=dC(a).$getDOMSlot(n,t,a),s=o.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void o.insertChild(ZS().createTextNode(i));let c=s,l=c.nodeValue;if(l!==i){if(r||zh){let[e,t,n]=function(e,t){let n=e.length,r=t.length,i=0,a=0;for(;i<n&&i<r&&e[i]===t[i];)i++;for(;a+i<n&&a+i<r&&e[n-a-1]===t[r-a-1];)a++;return[i,n-i-a,t.slice(i,r-a)]}(l,i);t!==0&&c.deleteData(e,t),c.insertData(e,n)}else c.nodeValue=i}}function hy(e,t,n,r,i,a){my(i,e,t);let o=a.theme.text;o!==void 0&&py(0,0,r,e,o)}function gy(e,t){let n=ZS().createElement(t);return n.appendChild(e),n}function _y(e){return e!=null&&!0===e.__isInlineFormattable}var vy=class extends ay{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}$config(){return this.config(`text`,{importDOM:{"#text":()=>({conversion:gne,priority:0}),b:()=>({conversion:mne,priority:0}),code:()=>({conversion:xy,priority:0}),em:()=>({conversion:xy,priority:0}),i:()=>({conversion:xy,priority:0}),mark:()=>({conversion:xy,priority:0}),s:()=>({conversion:xy,priority:0}),span:()=>({conversion:pne,priority:0}),strong:()=>({conversion:xy,priority:0}),sub:()=>({conversion:xy,priority:0}),sup:()=>({conversion:xy,priority:0}),u:()=>({conversion:xy,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e=``,t){super(t),this.__text=e,this.__format=0,this.__style=``,this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return Jte[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Jx()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=Qh[e];return(this.getFormat()&t)!==0}isSimpleText(){return this.__type===`text`&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Hx(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let n=this.__format,r=dy(0,n),i=fy(0,n),a=r===null?i:r,o=ZS().createElement(a),s=o;this.hasFormat(`code`)&&o.setAttribute(`spellcheck`,`false`),r!==null&&(s=ZS().createElement(i),o.appendChild(s)),hy(s,this,0,n,this.__text,e);let c=this.__style;return c!==``&&uy(o.style,c),o}updateDOM(e,t,n){let r=this.__text,i=e.__format,a=this.__format,o=dy(0,i),s=dy(0,a),c=fy(0,i),l=fy(0,a);if((o===null?c:o)!==(s===null?l:s))return!0;if(o===s&&c!==l){let e=t.firstChild;e??Ph(48);let i=ZS().createElement(l);return hy(i,this,0,a,r,n),t.replaceChild(i,e),!1}let u=t;s!==null&&o!==null&&(u=t.firstChild,u??Ph(49)),my(r,u,this);let d=n.theme.text;d!==void 0&&i!==a&&py(0,i,a,u,d);let f=e.__style,p=this.__style;return f!==p&&uy(t.style,p,f),!1}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return iC(t)||Ph(132),t.style.whiteSpace=`pre-wrap`,this.hasFormat(`lowercase`)?t.style.textTransform=`lowercase`:this.hasFormat(`uppercase`)?t.style.textTransform=`uppercase`:this.hasFormat(`capitalize`)&&(t.style.textTransform=`capitalize`),this.hasFormat(`bold`)&&(t=gy(t,`b`)),this.hasFormat(`italic`)&&(t=gy(t,`i`)),this.hasFormat(`strikethrough`)&&(t=gy(t,`s`)),this.hasFormat(`underline`)&&(t=gy(t,`u`)),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format=typeof e==`string`?Qh[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail=typeof e==`string`?Gte[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=Hx(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=qte[e];if(this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){kb();let n=e,r=t,i=ib(),a=this.getTextContent(),o=this.__key;if(typeof a==`string`){let e=a.length;n===void 0&&(n=e),r===void 0&&(r=e)}else n=0,r=0;if(!Q(i))return eb(o,n,o,r,`text`,`text`);{let e=Jx();e!==i.anchor.key&&e!==i.focus.key||qx(o),i.setTextNodeRange(this,n,this,r)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),a=i.__text,o=n.length,s=e;s<0&&(s=o+s,s<0&&(s=0));let c=ib();if(r&&Q(c)){let t=e+o;c.setTextNodeRange(i,t,i,t)}return i.__text=a.slice(0,s)+n+a.slice(s+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){kb();let t=this.getLatest(),n=t.getTextContent();if(n===``)return[];let r=t.__key,i=Jx(),a=n.length;e.sort((e,t)=>e-t),e.push(a);let o=[],s=e.length;for(let t=0,r=0;t<a&&r<=s;r++){let i=e[r];i>t&&(o.push(n.slice(t,i)),t=i)}let c=o.length;if(c===1)return[t];let l=o[0],u=t.getParent(),d,f=t.getFormat(),p=t.getStyle(),m=t.__detail,h=!1,g=null,_=null,v=ib();if(Q(v)){let[e,t]=v.isBackward()?[v.focus,v.anchor]:[v.anchor,v.focus];e.type===`text`&&e.key===r&&(g=e),t.type===`text`&&t.key===r&&(_=t)}t.isSegmented()?(d=Sy(l),d.__format=f,d.__style=p,d.__detail=m,d.__state=Og(t,d),h=!0):d=t.setTextContent(l);let y=[d];for(let e=1;e<c;e++){let n=Sy(o[e]);n.__format=f,n.__style=p,n.__detail=m,n.__state=Og(t,n);let a=n.__key;i===r&&qx(a),y.push(n)}let b=g?g.offset:null,x=_?_.offset:null,S=0;for(let e of y){if(!g&&!_)break;let t=S+e.getTextContentSize();if(g!==null&&b!==null&&b<=t&&b>=S&&(g.set(e.getKey(),b-S,`text`),b<t&&(g=null)),_!==null&&x!==null&&x<=t&&x>=S){_.set(e.getKey(),x-S,`text`);break}S=t}if(u!==null){(function(e){let t=e.getPreviousSibling(),n=e.getNextSibling();t!==null&&Kx(t),n!==null&&Kx(n)})(this);let e=u.getWritable(),t=this.getIndexWithinParent();h?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),Q(v)&&ob(v,u,t,c-1)}return y}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Ph(50);let n=this.__key,r=e.__key,i=this.__text,a=i.length;Jx()===r&&qx(n);let o=ib();if(Q(o)){let i=o.anchor,s=o.focus;i!==null&&i.key===r&&lb(i,t,n,e,a),s!==null&&s.key===r&&lb(s,t,n,e,a)}let s=e.__text,c=t?s+i:i+s;this.setTextContent(c);let l=this.getWritable();return e.remove(),l}isTextEntity(){return!1}};function pne(e){return{forChild:wy(e.style),node:null}}function mne(e){let t=e,n=t.style.fontWeight===`normal`;return{forChild:wy(t.style,n?void 0:`bold`),node:null}}var yy=new WeakMap;function hne(e){if(!iC(e))return!1;if(e.nodeName===`PRE`)return!0;let t=e.style.whiteSpace;return typeof t==`string`&&t.startsWith(`pre`)}function gne(e){let t=e;e.parentElement===null&&Ph(129);let n=t.textContent||``;if(function(e){let t,n=e.parentNode,r=[e];for(;n!==null&&(t=yy.get(n))===void 0&&!hne(n);)r.push(n),n=n.parentNode;let i=t===void 0?n:t;for(let e=0;e<r.length;e++)yy.set(r[e],i);return i}(t)!==null)return{node:mb(n)};if(n=n.replace(/\r/g,``).replace(/[ \t\n]+/g,` `),n===``)return{node:null};if(n[0]===` `){let e=t,r=!0;for(;e!==null&&(e=by(e,!1))!==null;){let t=e.textContent||``;if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(n[n.length-1]===` `){let e=t,r=!0;for(;e!==null&&(e=by(e,!0))!==null;)if((e.textContent||``).replace(/^( |\t|\r?\n)+/,``).length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return n===``?{node:null}:{node:Sy(n)}}function by(e,t){let n=e;for(;;){let e;for(;(e=t?n.nextSibling:n.previousSibling)===null;){let e=n.parentElement;if(e===null)return null;n=e}if(n=e,iC(n)){let e=n.style.display;if(e===``&&!sC(n)||e!==``&&!e.startsWith(`inline`))return null}let r=n;for(;(r=t?n.firstChild:n.lastChild)!==null;)n=r;if(zx(n))return n;if(n.nodeName===`BR`)return null}}var _ne={code:`code`,em:`italic`,i:`italic`,mark:`highlight`,s:`strikethrough`,strong:`bold`,sub:`subscript`,sup:`superscript`,u:`underline`};function xy(e){let t=_ne[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:wy(e.style,t),node:null}}function Sy(e=``){return zS(new vy(e))}function Cy(e){return e instanceof vy}function wy(e,t){let n=e.fontWeight,r=e.textDecoration.split(` `),i=n===`700`||n===`bold`,a=r.includes(`line-through`),o=e.fontStyle===`italic`,s=r.includes(`underline`),c=e.verticalAlign;return e=>Cy(e)||_y(e)?(i&&!e.hasFormat(`bold`)&&e.toggleFormat(`bold`),a&&!e.hasFormat(`strikethrough`)&&e.toggleFormat(`strikethrough`),o&&!e.hasFormat(`italic`)&&e.toggleFormat(`italic`),s&&!e.hasFormat(`underline`)&&e.toggleFormat(`underline`),c!==`sub`||e.hasFormat(`subscript`)||e.toggleFormat(`subscript`),c!==`super`||e.hasFormat(`superscript`)||e.toggleFormat(`superscript`),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}var Ty=class extends vy{$config(){return this.config(`tab`,{extends:vy})}constructor(e=void 0){super(` `,e),this.__detail=2}createDOM(e){let t=super.createDOM(e),n=bS(e.theme,`tab`);return n!==void 0&&t.classList.add(...n),t}setTextContent(e){return super.setTextContent(` `)}spliceText(e,t,n,r){return n===``&&t===0||n===` `&&t===1||Ph(286),this}setDetail(e){return e!==2&&Ph(127),this}setMode(e){return e!==`normal`&&Ph(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}};function Ey(){return zS(new Ty)}function Dy(e){return e instanceof Ty}var vne=class{key;offset;type;_selection;constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:pw(Ew(vw(this,`next`)),Ew(vw(e,`next`)))<0}getNode(){let e=Yx(this.key);return e===null&&Ph(20),e}set(e,t,n,r){let i=this._selection,a=this.key;r&&this.key===e&&this.offset===t&&this.type===n||(this.key=e,this.offset=t,this.type=n,Ob()||(Jx()===a&&qx(e),i!==null&&(i.setCachedNodes(null),Q(i)&&(i._cachedIsBackward=null),i.dirty=!0)))}};function Oy(e,t,n){return new vne(e,t,n)}function ky(e,t){let n=t.__key,r=e.offset,i=`element`;if(Cy(t)){i=`text`;let e=t.getTextContentSize();r>e&&(r=e)}else if(!$(t)){let e=t.getNextSibling();if(Cy(e))n=e.__key,r=0,i=`text`;else{let e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function Ay(e,t){if($(t)){let n=t.getLastDescendant();$(n)||Cy(n)?ky(e,n):ky(e,t)}else ky(e,t)}function jy(e,t,n,r){let i=e.getNode(),a=i.getChildAtIndex(e.offset),o=Sy();if(o.setFormat(n),o.setStyle(r),hx(a))a.splice(0,0,[o]);else if(a!==null){let e=LS(i)?mx().append(o):o;a.insertBefore(e)}else if(LS(i)){let e=i.getLastChild();$(e)&&!e.isInline()&&e.isEmpty()?e.append(o):i.append(mx().append(o))}else i.append(o);e.is(t)&&t.set(o.__key,0,`text`),e.set(o.__key,0,`text`)}function My(e,t,n,r){let i=e.anchor.getNode();Cy(i)||Ph(398);let a=e.anchor.offset,o=Sy(t);o.setFormat(n),o.setStyle(r);let s=i.getParentOrThrow();if(a===0)s.isInline()&&!i.__prev?s.insertBefore(o):i.insertBefore(o,!1);else if(a===i.getTextContentSize())s.isInline()&&!i.__next?s.insertAfter(o):i.insertAfter(o,!1);else{let[e]=i.splitText(a);e.insertAfter(o,!1)}i.getTextContent()===``&&i.isAttached()&&i.remove(),o.selectEnd(),o.isComposing()&&e.anchor.type===`text`&&e.anchor.set(e.anchor.key,e.anchor.offset-t.length,e.anchor.type)}var Ny=class e{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Iy(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every(e=>n.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t=this.getNodes().filter(e=>FC(e)===null),n=t.length;if(n===0)return;let r=t[n-1],i;if(Cy(r))i=r.select();else{let e=r.getIndexWithinParent()+1;i=r.getParentOrThrow().select(e,e)}i.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=this._nodes,n=[];for(let e of t){let t=Yx(e);t!==null&&n.push(t)}return Ob()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),t=``;for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}deleteNodes(){let e=this.getNodes().filter(e=>FC(e)===null);if((ib()||ab())===this&&e[0]){let t=rw(e[0],`next`);bw(dw(t,t))}for(let t of e)t.remove();Py()}};function Py(){let e=nS();if(e.isEmpty()){let t=mx();e.append(t),t.select()}}function Q(e){return e instanceof Fy}var Fy=class e{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Q(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(e!==null)return e;let t=function(e){let t=[],[n,r]=e.getTextSlices();n&&t.push(n.caret.origin);let i=new Set,a=new Set;for(let n of e)if(nw(n)){let{origin:e}=n;t.length===0?i.add(e):(a.add(e),t.push(e))}else{let{origin:e}=n;$(e)&&a.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),tw(e.focus)&&$(e.focus.origin)&&e.focus.getNodeAtCaret()===null)for(let n=sw(e.focus.origin,`previous`);nw(n)&&i.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(t[t.length-1]);n=cw(n))i.delete(n.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!$(e)||a.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(t.length===0&&e.isCollapsed()){let n=Ew(e.anchor),r=Ew(e.anchor.getFlipped()),i=e=>ew(e)?e.origin:e.getNodeAtCaret(),a=i(n)||i(r)||(e.anchor.getNodeAtCaret()?n.origin:r.origin);t.push(a)}return t}(kw(Sw(this),`next`));return Ob()||(this._cachedNodes=t),t}setTextNodeRange(e,t,n,r){return this.anchor.set(e.__key,t,`text`),this.focus.set(n.__key,r,`text`),this}getTextContent(){let e=this.getNodes();if(e.length===0)return``;let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,a=r.isBefore(i),[o,s]=By(this),c=``,l=!0;for(let u=0;u<e.length;u++){let d=e[u];if($(d)&&!d.isInline()){l||(c+=`
|
||
`);let e=``;for(let t of zC(d)){let n=BC(d,t);n!==null&&(e+=n.getTextContent())}e===``?l=!d.isEmpty():(c+=e,l=!1)}else if(l=!1,Cy(d)){let e=d.getTextContent();d===t?d===n?r.type===`element`&&i.type===`element`&&i.offset!==r.offset||(e=o<s?e.slice(o,s):e.slice(s,o)):e=a?e.slice(o):e.slice(s):d===n&&(e=a?e.slice(0,s):e.slice(0,o)),c+=e}else!Xb(d)&&!cx(d)||d===n&&this.isCollapsed()||(c+=d.getTextContent())}return c}applyDOMRange(e){let t=Mb(),n=t.getEditorState()._selection,r=Qy(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(r===null)return;let[i,a,o]=r;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(a.key,a.offset,a.type,!0),o&&(this.dirty=!0),Mg(this)}clone(){let t=this.anchor,n=this.focus;return new e(Oy(t.key,t.offset,t.type),Oy(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=Hx(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=Qh[e];return(this.format&t)!==0}insertRawText(e){this.insertNodes(mb(e))}insertText(e){let t=this.format,n=this.style;if(!this.isCollapsed()){let r=(this.focus.isBefore(this.anchor)?this.focus:this.anchor).getNode();if(Cy(r)&&(t=r.getFormat(),n=r.getStyle()),this.removeText(),this.format=t,this.style=n,e===``)return;if(Jx()===null)return this.anchor.type===`element`&&jy(this.anchor,this.focus,t,n),void My(this,e,t,n)}this.anchor.type===`element`&&jy(this.anchor,this.focus,t,n);let r=this.anchor.getNode();Cy(r)||Ph(398);let i=this.anchor.offset,a=r.getParentOrThrow(),o=r.getTextContentSize();if(Rx(r)||i===0&&(!r.canInsertTextBefore()||!a.canInsertTextBefore()&&!r.__prev)||i===o&&(!r.canInsertTextAfter()||!a.canInsertTextAfter()&&!r.__next)){if(r.isSegmented()&&i!==0&&i!==o){if(Jx()!==null)r.setMode(`normal`).setFormat(t).setStyle(n);else{let e=Sy(r.getTextContent());e.setFormat(t),e.setStyle(n),r.replace(e),e.select(i,i)}e!==``&&this.insertText(e);return}if(e===``)return;if(i===0){let i=r.getPreviousSibling();if(Cy(i)&&i.canInsertTextAfter()&&!Rx(i))i.select();else{let e=Sy();e.setFormat(t),e.setStyle(n),a.canInsertTextBefore()?r.insertBefore(e):a.insertBefore(e),e.select()}this.insertText(e);return}if(i===o){let i=r.getNextSibling();if(Cy(i)&&i.canInsertTextBefore()&&!Rx(i))i.select(0,0);else{let e=Sy();e.setFormat(t),e.setStyle(n),a.canInsertTextAfter()?r.insertAfter(e):a.insertAfter(e),e.select(0,0)}this.insertText(e);return}let s=Sy(e);s.setFormat(t),s.setStyle(n),r.replace(s),s.select();return}if(e===``)return;let s=a.isInline()&&i===0&&!r.__prev,c=a.isInline()&&i===o&&!r.__next,l=r.getFormat()!==t||r.getStyle()!==n;if(s||c||l){if(r.getTextContent()!==``||s||c)return void My(this,e,t,n);r.setFormat(t),r.setStyle(n)}r.spliceText(i,0,e,!0),r.isComposing()&&this.anchor.type===`text`&&this.anchor.set(this.anchor.key,this.anchor.offset-e.length,this.anchor.type)}removeText(){let e=ib()===this;xw(this,Qne(Sw(this))),e&&ib()!==this&&rS(this)}formatText(e,t=null){Ry(this,e,t)}insertNodes(e){if(e.length===0)return;this.isCollapsed()||this.removeText();let t=this.anchor.getNode();if(this.anchor.type===`element`&&$(t)&&FC(t)!==null){let n=t.isShadowRoot()?t.getFirstChild()??t.append(mx()).getFirstChild():t.getFirstChild();if(t.isShadowRoot()&&n!==null&&!$(n)){let e=mx();n.insertBefore(e),n=e}if(n!==null){n.selectStart();let t=ib();return Q(t)||Ph(369),t.insertNodes(e)}}if(this.anchor.type===`element`&&LS(t)){let n=vb(e),r=n.getLastDescendant();t.splice(this.anchor.offset,0,n.getChildren()),r!==null&&r.selectEnd();return}let n=(this.isBackward()?this.focus:this.anchor).getNode(),r=kC(n,lC),i=e[e.length-1];if($(r)&&`__language`in r){if(`__language`in e[0])this.insertText(e[0].getTextContent());else{let t=gb(this);r.splice(t,0,e),i.selectEnd()}return}if(!e.some(e=>($(e)||Xb(e))&&!e.isInline())){$(r)||Ph(211,n.constructor.name,n.getType());let t=gb(this);r.splice(t,0,e),i.selectEnd();return}if($(r)&&FC(r)!==null){let t=gb(this),n=hb(e);r.splice(t,0,n);let i=n[n.length-1];i===void 0?r.select(t,t):i.selectEnd();return}if(r===null){let t=vb(e),n=t.getLastDescendant(),r=vw(this.anchor,`next`);for(let e of t.getChildren())r=Mw(e,r);n!==null&&n.selectEnd();return}if($(r)&&!r.isParentRequired()&&!LS(r.getParentOrThrow())){let t=gb(this),n=hb(e);r.splice(t,0,n);let i=n[n.length-1];i===void 0?r.select(t,t):i.selectEnd();return}let a=vb(e),o=a.getLastDescendant(),s=a.getChildren(),c=!$(r)||!r.isEmpty()?this.insertParagraph():null;c&&!r.isAttached()&&(n=this.anchor.getNode(),r=kC(n,lC));let l=s[s.length-1],u=s[0];var d;$(d=u)&&lC(d)&&!d.isEmpty()&&$(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&($(r)||Ph(211,n.constructor.name,n.getType()),r.append(...u.getChildren()),u=s[1]),u&&(r===null&&Ph(212,n.constructor.name,n.getType()),function(e,t){let n=t.getParentOrThrow().getLastChild(),r=t,i=[t];for(;r!==n;)r.getNextSibling()||Ph(140),r=r.getNextSibling(),i.push(r);let a=e;for(let e of i)a=a.insertAfter(e)}(r,u));let f=kC(o,lC);c&&$(f)&&(c.canMergeWhenEmpty()||lC(l))&&(f.append(...c.getChildren()),c.remove()),$(r)&&r.isEmpty()&&r.remove(),o.selectEnd();let p=$(r)?r.getLastChild():null;cx(p)&&f!==r&&p.remove()}insertParagraph(){let e=this.anchor.getNode();if(this.anchor.type===`element`&&LS(e)){let t=mx();return e.splice(this.anchor.offset,0,[t]),t.select(),t}let t=gb(this),n=kC(this.anchor.getNode(),lC);if(n!==null&&FC(n)!==null)return null;$(n)||Ph(213);let r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(e){let t=sx();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){let e=[...this.getNodes()],t=e.length,n=e[0],r=e[t-1],[i,a]=By(this),o=this.isBackward(),[s,c]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[l,u]=o?[a,i]:[i,a];if(t===0)return[];if(t===1){if(Cy(n)&&!this.isCollapsed()){let e=n.splitText(l,u),t=l===0?e[0]:e[1];return t?(s.set(t.getKey(),0,`text`),c.set(t.getKey(),t.getTextContentSize(),`text`),[t]):[]}return[n]}if(Cy(n)&&(l===n.getTextContentSize()?e.shift():l!==0&&([,n]=n.splitText(l),e[0]=n,s.set(n.getKey(),0,`text`))),Cy(r)){let t=r.getTextContent().length;u===0?e.pop():u!==t&&([r]=r.splitText(u),e[e.length-1]=r,c.set(r.getKey(),r.getTextContentSize(),`text`))}return e}modify(e,t,n){if(yb(this,e,t,n))return;let r=e===`move`,i=Mb(),a=WS(NS(i));if(!a)return;let o=i._blockCursorElement,s=i._rootElement,c=this.focus.getNode();s===null||o===null||!$(c)||c.isInline()||c.canBeEmpty()||US(o,i,s);let l=ES(i,this.focus.key),u=l;if(this.focus.type===`text`&&(u=Cy(c)?pC(c,l,i):null),this.dirty){let e=ES(i,this.anchor.key),t=e;if(this.anchor.type===`text`){let n=this.anchor.getNode();t=Cy(n)?pC(n,e,i):null}t&&u&&ub(a,t,this.anchor.offset,u,this.focus.offset)}if(n===`character`&&Cy(c)&&c.isUnmergeable()&&(t?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){let e=rw(c,t?`previous`:`next`).getNodeAtCaret();if(Cy(e)){if(!r){let n=e.getTextContentSize();t?this.focus.set(e.__key,n-1,`text`):this.focus.set(e.__key,1,`text`),this.dirty=!0;return}{let n=i.getElementByKey(e.getKey()),r=n?pC(e,n,i):null;if(r){let e=t?r.length:0;ub(a,r,e,r,e)}}}}if(Uy(a,e,t?`backward`:`forward`,n),a.rangeCount>0){let e=QS(a,i._rootElement),n=e||a.getRangeAt(0),o=this.anchor.getNode(),s=Qb(o)?o:FS(o);this.applyDOMRange(n),this.dirty=!0,!r&&(Wy(this,t,s),(e?a.direction!==`backward`:a.anchorNode===n.startContainer&&a.anchorOffset===n.startOffset)||Hy(this))}n===`lineboundary`&&yb(this,e,t,n,`decorators`)}forwardDeletion(e,t,n){if(!n&&(e.type===`element`&&$(t)&&e.offset===t.getChildrenSize()||e.type===`text`&&e.offset===t.getTextContentSize())){let e=t.getParent(),n=t.getNextSibling()||(e===null?null:e.getNextSibling());if($(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;let r=lw(vw(t,e?`previous`:`next`));if(r.getTextSlices().every(e=>e===null||e.distance===0)){let e={type:`initial`};for(let t of r.iterNodeCarets(`shadowRoot`))if(nw(t)){if(!t.origin.isInline()){if(t.origin.isShadowRoot()){if(e.type===`merge-block`)break;if($(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=Ew(t);xw(this,dw(e,e)),r.anchor.origin.remove()}return}e.type!==`merge-next-block`&&e.type!==`merge-block`||(e={block:e.block,caret:t,type:`merge-block`})}}else{if(e.type===`merge-block`)break;if(tw(t)){if($(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:`merge-next-block`};continue}if(Xb(t.origin)){if(!t.origin.isIsolated()){if(zC(t.origin).length>0){if($(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=nb();e.add(t.origin.getKey()),rS(e)}}else if(e.type===`merge-next-block`&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&$(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=nb();e.add(t.origin.getKey()),rS(e)}else t.origin.remove()}return}break}}if(e.type===`merge-block`){let{caret:t,block:n}=e;return zC(n).length>0?void 0:t.origin.isEmpty()&&!n.isEmpty()&&t.origin.getParent()===n.getParent()?void t.origin.remove(!0):(xw(this,dw(!t.origin.isEmpty()&&n.isEmpty()?Cw(rw(n,t.direction)):r.anchor,t)),this.removeText())}for(let e=t.getNode();e!==null;){if(FC(e)!==null)return;if($(e)&&e.isShadowRoot())break;e=e.getParent()}}let i=this.focus;if(Gy(this,e,`character`),this.isCollapsed()){if(e&&t.offset===0&&Vy(this,t.getNode()))return}else{let r=i.type===`text`?i.getNode():null;if(n=t.type===`text`?t.getNode():null,r!==null&&r.isSegmented()){let t=i.offset,a=r.getTextContentSize();if(r.is(n)||e&&t!==a||!e&&t!==0)return void Ky(r,e,t)}else if(n!==null&&n.isSegmented()){let i=t.offset,a=n.getTextContentSize();if(n.is(r)||e&&i!==0||!e&&i!==a)return void Ky(n,e,i)}(function(e,t){let n=e.anchor,r=e.focus,i=n.getNode();if(i===r.getNode()&&n.type===`text`&&r.type===`text`){let e=n.offset,a=r.offset,o=e<a,s=o?e:a,c=o?a:e,l=c-1;s!==l&&(function(e){return!(oS(e)||bne(e))})(i.getTextContent().slice(s,c))&&(t?r.set(r.key,l,r.type):n.set(n.key,l,n.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type===`element`&&this.anchor.offset===0){let e=this.anchor.getNode();e.isEmpty()&&Qb(e.getParent())&&e.getPreviousSibling()===null&&Vy(this,e),Py()}}deleteLine(e){let t=Yy(this.anchor);if(t!==null&&Xb(IC(t)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(e);this.isCollapsed()&&Gy(this,e,`lineboundary`),this.isCollapsed()?this.deleteCharacter(e):kC(this.anchor.getNode(),lC)===kC(this.focus.getNode(),lC)?this.removeText():(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(e))}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;Gy(this,e,`word`)}this.isCollapsed()?this.deleteCharacter(e):this.removeText()}isBackward(){let e=this._cachedIsBackward;if(e!==null)return e;let t=this.focus.isBefore(this.anchor);return Ob()||(this._cachedIsBackward=t),t}getStartEndPoints(){return[this.anchor,this.focus]}};function Iy(e){return e instanceof Ny}function Ly(e,t){if(Iy(e)){for(let n of e.getNodes())_y(n)&&n.setFormat(t(n.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void qx(null);let n=[];for(let r of e.getNodes())Cy(r)?n.push(r):$(r)?r.setTextFormat(t(r.getTextFormat())):_y(r)&&r.setFormat(t(r.getFormat()));let r=n.length;if(r===0)return e.setFormat(t(e.format)),void qx(null);let i=e.anchor,a=e.focus,o=e.isBackward(),s=o?a:i,c=o?i:a,l=0,u=n[0],d=s.type===`element`?0:s.offset;if(s.type===`text`&&d===u.getTextContentSize()&&(l=1,u=n[1],d=0),u==null)return;let f=r-1,p=n[f],m=c.type===`text`?c.offset:p.getTextContentSize();if(u.is(p)){if(d===m)return;let n=t(u.getFormat());if(Rx(u)||d===0&&m===u.getTextContentSize())u.setFormat(n);else{let e=u.splitText(d,m),t=d===0?e[0]:e[1];t.setFormat(n),s.type===`text`&&s.set(t.__key,0,`text`),c.type===`text`&&c.set(t.__key,m-d,`text`)}e.format=n;return}d===0||Rx(u)||([,u]=u.splitText(d),d=0);let h=t(u.getFormat());u.setFormat(h);let g=t(p.getFormat());m>0&&(m===p.getTextContentSize()||Rx(p)||([p]=p.splitText(m)),p.setFormat(g));for(let e=l+1;e<f;e++){let r=n[e];r.setFormat(t(r.getFormat()))}s.type===`text`&&s.set(u.__key,d,`text`),c.type===`text`&&c.set(p.__key,m,`text`),e.format=h|g}function yne(e,t){let n=[];for(let[e,r]of Object.entries(t))typeof r==`boolean`&&n.push([e,r]);n.length!==0&&Ly(e,e=>{for(let[t,r]of n)e=Hx(e,t,r?Qh[t]:0);return e})}function Ry(e,t,n=null){let r=n===null&&Q(e)?Hx(e.format,t,null):n;Ly(e,e=>Hx(e,t,r))}function zy(e){let t=e.offset;if(e.type===`text`)return t;let n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function By(e){let t=e.getStartEndPoints();if(t===null)return[0,0];let[n,r]=t;return n.type===`element`&&r.type===`element`&&n.key===r.key&&n.offset===r.offset?[0,0]:[zy(n),zy(r)]}function Vy(e,t){for(let n=t;n;n=n.getParent()){if($(n)){if(n.collapseAtStart(e))return!0;if(LS(n))break}if(n.getPreviousSibling())break}return!1}function Hy(e){let t=e.focus,n=e.anchor,r=n.key,i=n.offset,a=n.type;n.set(t.key,t.offset,t.type,!0),t.set(r,i,a,!0)}function Uy(e,t,n,r){e.modify(t,n,r)}function Wy(e,t,n){let r=e.getNodes(),i=r.filter(e=>jS(e,n));if(i.length===0||i.length===r.length)return!1;let a=t?i[0]:i[i.length-1],o=$(a)?a:a.getParentOrThrow();return t?o.selectStart():o.selectEnd(),!0}function Gy(e,t,n){if(yb(e,`extend`,t,n))return;let r=Mb(),i=WS(NS(r));if(!i||typeof i.modify!=`function`)return;let a=r._blockCursorElement,o=r._rootElement,s=e.anchor,c=e.focus.getNode();o===null||a===null||!$(c)||c.isInline()||c.canBeEmpty()||US(a,r,o);let l=e=>{let t=e.getNode(),n=r.getElementByKey(e.key);return n!==null&&e.type===`text`&&Cy(t)?pC(t,n,r):n},u=s.getNode(),d=l(s);if(d===null)return;let f=s.offset,p=e.isCollapsed(),m=e.focus,h=p?d:l(m);if(h===null)return;let g=m.offset;if(ub(i,h,g,h,g),Uy(i,`move`,t?`backward`:`forward`,n),i.rangeCount===0)return;let _=QS(i,o)||i.getRangeAt(0),v=_.startContainer,y=_.startOffset;if(p&&n===`character`&&s.type===`text`&&Cy(u)&&u.isUnmergeable()&&f===(t?0:u.getTextContentSize())){let n=rw(u,t?`previous`:`next`).getNodeAtCaret();if(Cy(n)){let r=t?n.getTextContentSize()-1:1;e.focus.set(n.__key,r,`text`),e.dirty=!0;return}}if(p&&n===`character`&&s.type===`text`){let n=t?0:u.getTextContentSize(),r=v===d?y:f===n?-1:n;if(r>=0)return void(r!==f&&(e.focus.set(s.key,r,`text`),e.dirty=!0))}let[b,x,S,C]=t?[v,y,d,f]:[d,f,v,y],w=Qb(u)?u:FS(u);e.applyDOMRange({collapsed:!1,endContainer:S,endOffset:C,startContainer:b,startOffset:x}),e.dirty=!0,!Wy(e,t,w)&&t&&Hy(e),n===`lineboundary`&&yb(e,`extend`,t,n,`decorators`)}var bne=(()=>{try{let e=RegExp(`\\p{Emoji}`,`u`),t=e.test.bind(e);if(t(`❤️`)&&t(`#️⃣`)&&t(`👍`))return t}catch{}return()=>!1})();function Ky(e,t,n){let r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length,o=0,s=0;for(let e=0;e<a;e++){let r=e===a-1;if(s=o,o+=i[e].length,t&&o===n||o>n||r){i.splice(e,1),r&&(s=void 0);break}}let c=i.join(``).trim();c===``?r.remove():(r.setTextContent(c),r.select(s,s))}function qy(e,t,n,r){let i,a=t,o=!1;if(iC(e)){let s=!1,c=e.childNodes,l=c.length,u=r._blockCursorElement;a===l&&l>0&&(s=!0,a=l-1),Qx(e,r)!==void 0||SC(e,r)||(o=!0);let d=c[a],f=!1;if(d===u)d=c[a+1],f=!0;else if(u!==null){let n=u.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,u)&&a--}if(i=aS(d),Cy(i))a=aw(i,s?`next`:`previous`);else{let c=aS(e);if(c===null)return null;if($(c)){let o=r.getElementByKey(c.getKey());o===null&&Ph(214);let l=fC(c,o,r);[c,a]=l.resolveChildIndex(c,o,e,t),$(c)||Ph(215),s&&a>=c.getChildrenSize()&&(a=Math.max(0,c.getChildrenSize()-1));let u=c.getChildAtIndex(a);if($(u)&&function(e,t,n){let r=e.getParent();return n===null||r===null||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){let e=s?u.getLastDescendant():u.getFirstDescendant();e===null?c=u:(u=e,c=$(u)?u:u.getParentOrThrow()),a=0}Cy(u)?(i=u,c=null,a=aw(u,s?`next`:`previous`)):u!==c&&s&&!f&&($(c)||Ph(216),a=Math.min(c.getChildrenSize(),a+1))}else{let n=IC(c),i=n===null?c:n,o=i.getIndexWithinParent(),s=r.getElementByKey(c.getKey()),l=`after`;if(s!==null&&aS(e)===c){let n=fC(c,s,r);n.element===s?t===0&&Xb(c)&&(l=`before`):l=n.resolveLeafPosition(s,e,t)}a=l===`before`?o:o+1,c=i.getParentOrThrow()}if($(c))return[Oy(c.__key,a,`element`),o]}}else i=aS(e);return Cy(i)?[Oy(i.__key,aw(i,a,`clamp`),`text`),o]:null}function Jy(e,t,n){let r=e.offset,i=e.getNode();if(r===0){let r=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&r===null&&$(a)&&a.isInline()){let t=a.getPreviousSibling();Cy(t)&&e.set(t.__key,t.getTextContent().length,`text`)}}else $(r)&&!n&&r.isInline()?e.set(r.__key,r.getChildrenSize(),`element`):Cy(r)&&!i.isUnmergeable()&&e.set(r.__key,r.getTextContent().length,`text`)}else if(r===i.getTextContent().length){let r=i.getNextSibling(),a=i.getParent();if(t&&$(r)&&r.isInline())e.set(r.__key,0,`element`);else if((n||t)&&r===null&&$(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){let t=a.getNextSibling();Cy(t)&&e.set(t.__key,0,`text`)}}}function Yy(e){let t=Yx(e.key);return t===null?null:LC(t)}function Xy(e,t,n){let r=Yy(e),i=Yy(t);if(r===i||r!==null&&i!==null&&r.is(i))return!1;let a=n(r,i);if(r!==null)return $(r)?t.set(r.getKey(),a?r.getChildrenSize():0,`element`):t.set(r.getKey(),a?r.getTextContentSize():0,`text`),!0;let o=IC(i);if(o===null)return!1;let s=o.getParent();if(s===null)return!1;let c=o.getIndexWithinParent();return t.set(s.getKey(),a?c+1:c,`element`),!0}function Zy(e){let t=Xy(e.anchor,e.focus,(t,n)=>function(e,t,n,r){if(n!==null&&r!==null){let e=IC(n),t=IC(r);if(e!==null&&e.is(t)){for(let t of RC(e).values()){if(t===n.getKey())return!0;if(t===r.getKey())return!1}return!0}return e===null||t===null||e.isBefore(t)}if(n!==null){let e=IC(n),r=Yx(t.key);return e===null||r===null||!(!e.is(r)&&!e.isParentOf(r))||e.isBefore(r)}let i=IC(r),a=Yx(e.key);return i!==null&&a!==null&&!i.is(a)&&!i.isParentOf(a)&&a.isBefore(i)}(e.anchor,e.focus,t,n));return t&&(e.dirty=!0),t}function Qy(e,t,n,r,i,a){if(e===null||n===null||!Mx(i,e,n))return null;let o=qy(e,t,Q(a)?a.anchor:null,i);if(o===null)return null;let s=qy(n,r,Q(a)?a.focus:null,i);if(s===null)return null;let[c,l]=o,[u,d]=s;if(c.type===`element`&&u.type===`element`){let t=aS(e),r=aS(n);if(Xb(t)&&Xb(r))return null}let f=i._slotsUsed&&Xy(c,u,()=>(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return function(e,t){if(e.type===`text`&&t.type===`text`){let n=e.isBefore(t),r=e.is(t);Jy(e,n,r),Jy(t,!n,r),r&&t.set(e.key,e.offset,e.type)}}(c,u),[c,u,l||d||f]}function $y(e){return $(e)&&!e.isInline()}function eb(e,t,n,r,i,a){let o=jb(),s=new Fy(Oy(e,t,i),Oy(n,r,a),0,``);return s.dirty=!0,o._selection=s,s}function tb(){return new Fy(Oy(`root`,0,`element`),Oy(`root`,0,`element`),0,``)}function nb(){return new Ny(new Set)}function rb(e,t,n,r){let i=n._window;if(i===null)return null;let a=r||i.event,o=a?a.type:void 0,s=o===`selectionchange`,c=!pg&&(s||o===`beforeinput`||o===`compositionstart`||o===`compositionend`||o===`click`&&a&&a.detail===3||o===`drop`||o===void 0),l,u,d,f;if(Q(e)&&!c)return e.clone();{if(t===null)return null;let r=$S(t,n._rootElement);if(l=r.anchorNode,u=r.focusNode,d=r.anchorOffset,f=r.focusOffset,(s||o===void 0)&&Q(e)&&!Mx(n,l,u))return e.clone()}let p=Qy(l,d,u,f,n,e);if(p===null)return null;let[m,h,g]=p,_=0,v=``;if(Q(e)){let t=e.anchor;if(m.key===t.key)_=e.format,v=e.style;else{let e=m.getNode();Cy(e)?(_=e.getFormat(),v=e.getStyle()):$(e)&&(_=e.getTextFormat(),v=e.getTextStyle())}}let y=new Fy(m,h,_,v);return g&&(y.dirty=!0),y}function ib(){return jb()._selection}function ab(){return Mb()._editorState._selection}function ob(e,t,n,r=1){let i=e.anchor,a=e.focus,o=i.getNode(),s=a.getNode();if(!t.is(o)&&!t.is(s))return;let c=t.__key;if(e.isCollapsed()){let t=i.offset;if(n<=t&&r>0||n<t&&r<0){let n=Math.max(0,t+r);i.set(c,n,`element`),a.set(c,n,`element`),sb(e)}}else{let o=e.isBackward(),s=o?a:i,l=s.getNode(),u=o?i:a,d=u.getNode();if(t.is(l)){let e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(c,Math.max(0,e+r),`element`)}if(t.is(d)){let e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(c,Math.max(0,e+r),`element`)}}sb(e)}function sb(e){let t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),o=r.getNode();if(e.isCollapsed()){if(!$(a))return;let e=a.getChildrenSize(),i=n>=e,o=i?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(Cy(o)){let e=0;i&&(e=o.getTextContentSize()),t.set(o.__key,e,`text`),r.set(o.__key,e,`text`)}return}if($(a)){let e=a.getChildrenSize(),r=n>=e,i=r?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(Cy(i)){let e=0;r&&(e=i.getTextContentSize()),t.set(i.__key,e,`text`)}}if($(o)){let e=o.getChildrenSize(),t=i>=e,n=t?o.getChildAtIndex(e-1):o.getChildAtIndex(i);if(Cy(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,`text`)}}}function cb(e,t,n,r,i){let a=null,o=0,s=null;r===null?i!==null&&(a=i.__key,Cy(i)?s=`text`:$(i)&&(s=`element`)):(a=r.__key,Cy(r)?(o=r.getTextContentSize(),s=`text`):$(r)&&(o=r.getChildrenSize(),s=`element`)),a!==null&&s!==null?e.set(a,o,s):(o=t.getIndexWithinParent(),o===-1&&(o=n.getChildrenSize()),e.set(n.__key,o,`element`))}function lb(e,t,n,r,i){e.type===`text`?e.set(n,e.offset+(t?0:i),`text`):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,`element`)}function ub(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function db(e,t,n){let r=ES(e,t.getKey());if($(t)){let i=fC(t,r,e);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function xne(e,t,n,r,i,a){let o=a.getRootNode(),s=Bx(o)||KS(o)?tC(o):null;if(i.has(`collaboration`)&&s!==a||s!==null&&jx(s,s))return;let c=$S(r,a),l;if(!Q(t))return void(e!==null&&Mx(n,c.anchorNode,c.focusNode)&&r.removeAllRanges());let u=t.anchor,d=t.focus,f=u.getNode(),p=d.getNode(),[m,h]=db(n,f,u.offset),[g,_]=db(n,p,d.offset),v=t.format,y=t.style,b=t.isCollapsed(),x=m,S=g,C=!1;if(u.type===`text`?(x=Cy(f)?pC(f,m,n):null,C=f.getFormat()!==v||f.getStyle()!==y):Q(e)&&e.anchor.type===`text`&&(C=!0),d.type===`text`&&(S=Cy(p)?pC(p,g,n):null),x!==null&&S!==null){if(b&&(e===null||C||Q(e)&&(e.format!==v||e.style!==y))&&function(e,t,n,r,i,a){e._inputState.collapsedSelectionFormat={format:t,key:i,offset:r,style:n,timeStamp:a}}(n,v,y,h,u.key,performance.now()),(r.type!==`Range`||!b)&&c.anchorOffset===h&&c.focusOffset===_&&c.anchorNode===x&&c.focusNode===S){if(s===null||!a.contains(s)){let e=s===null?null:Px(s);e!==null&&e!==n||i.has(`skip-selection-focus`)||a.focus({preventScroll:!0})}if(u.type!==`element`)return}if(ub(r,x,h,S,_),zh&&t.isCollapsed()&&a!==null&&!i.has(`skip-selection-focus`)){let e=eC(a);if(e===null||!a.contains(e)){let e=tC(a.ownerDocument),t=e===null?null:Px(e);t!==null&&t!==n||a.focus({preventScroll:!0})}}if(!i.has(`skip-scroll-into-view`)&&t.isCollapsed()&&a!==null&&a===eC(a)){let e=Q(t)&&t.anchor.type===`element`?x.childNodes[h]||null:(l===void 0&&(l=One(r,a)),l);if(e!==null){let t;if(zx(e)){let n=e.ownerDocument.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();(function(e,t,n){let r=OS(n),i=MS(r);if(r===null||i===null)return;let a=n.getBoundingClientRect();if(t.bottom<a.top)return;let{top:o,bottom:s}=t,c=0,l=0,u=n;for(;u!==null;){let t=u===r.body;if(t){let t=i.visualViewport;if(t){let e=t.offsetTop;c=e,l=e+t.height}else c=0,l=NS(e).innerHeight;let n=i.getComputedStyle(r.documentElement),a=parseFloat(n.scrollPaddingTop),o=parseFloat(n.scrollPaddingBottom);isFinite(a)&&(c+=a),isFinite(o)&&(l-=o)}else{let e=u===n?a:u.getBoundingClientRect();c=e.top,l=e.bottom}let d=0;if(o<c?d=-(c-o):s>l&&(d=s-l),d!==0){if(t)i.scrollBy(0,d);else{let e=u.scrollTop;u.scrollTop+=d;let t=u.scrollTop-e;o-=t,s-=t}}if(t)break;u=DS(u)}})(n,t,a)}}(function(e){e._inputState.isSelectionChangeFromDOMUpdate=!0})(n)}}function fb(e){let t=ib()||ab();t===null&&(t=nS().selectEnd()),t.insertNodes(e)}function pb(e,t){for(let n of e.split(/(\r?\n|\t)/))n===`
|
||
`||n===`\r
|
||
`?t.linebreak():n===` `?t.tab():n!==``&&t.text(n)}function mb(e){let t=[];return pb(e,{linebreak:()=>t.push(sx()),tab:()=>t.push(Ey()),text:e=>t.push(Sy(e))}),t}function Sne(){let e=ib();return e===null?``:e.getTextContent()}function hb(e){let t=[];for(let n of e)cx(n)||(!$(n)&&!Xb(n)||n.isInline()?t.push(n):$(n)&&t.push(...hb(n.getChildren())));return t}function gb(e){let t=e;e.isCollapsed()||t.removeText();let n=ib();Q(n)&&(t=n),Q(t)||Ph(161);let r=t.anchor,i=r.getNode(),a=r.offset;for(;!lC(i)&&FC(i)===null;){let e=i;if([i,a]=Cne(i,a),e.is(i))break}return a}function Cne(e,t){let n=e.getParent();if(!n){let e=mx();return nS().append(e),e.select(),[nS(),0]}if(Cy(e)){let r=e.splitText(t);if(r.length===0)return[n,e.getIndexWithinParent()];let i=t===0?0:1;return[n,r[0].getIndexWithinParent()+i]}if(!$(e)||t===0)return[n,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let n=new Fy(Oy(e.__key,t,`element`),Oy(e.__key,t,`element`),0,``),i=e.insertNewAfter(n);i&&i.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function _b(e){return cx(e)||PS(e)||Cy(e)||e.isParentRequired()}function vb(e){let t=mx(),n=null;for(let r=0;r<e.length;r++){let i=e[r];if(_b(i)){if(n===null){n=i.createParentElementNode(),t.append(n);let a=e[r+1];if(cx(i)&&(a===void 0||!_b(a)))continue}n.append(i)}else t.append(i),n=null}return t}function yb(e,t,n,r,i=`decorators-and-blocks`){if(t===`move`&&r===`character`&&!e.isCollapsed()){let[t,r]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let a=vw(e.focus,n?`previous`:`next`),o=r===`lineboundary`,s=t===`move`,c=a,l=i===`decorators-and-blocks`;if(!Dw(c)){for(let e of c){l=!1;let{origin:t}=e;if(!Xb(t)||t.isIsolated()||(c=e,!o||!t.isInline()))break}if(l)for(let e of lw(a).iterNodeCarets(t===`extend`?`shadowRoot`:`root`)){if(nw(e))e.origin.isInline()||(c=e);else{if($(e.origin))continue;Xb(e.origin)&&!e.origin.isInline()&&(c=e)}break}}if(c===a)return!1;if(s&&!o&&Xb(c.origin)&&c.origin.isKeyboardSelectable()){let e=nb();return e.add(c.origin.getKey()),rS(e),!0}return c=Ew(c),s&&yw(e.anchor,c),yw(e.focus,c),l||!o}var bb=null,xb=null,Sb=!1,Cb=!1,wb=!1,Tb=new Set,Eb=0,Db={characterData:!0,childList:!0,subtree:!0};function Ob(){return Sb||bb!==null&&bb._readOnly}function kb(){Sb&&Ph(13)}function Ab(){Eb>99&&Ph(14)}function jb(){return bb===null&&Ph(195,Nb()),bb}function wne(e){jb()!==null&&xb===null&&(xb=e),xb!==e&&Fh(378)}function Mb(){return xb===null&&Ph(337,Nb()),xb}function Tne(){Mb()._dirtyType=2}function Nb(){let e=0,t=new Set,n=Cx.version;if(typeof window<`u`)for(let r of YS(document)){let i=Fx(r);if(Nx(i))e++;else if(i){let e=String(i.constructor.version||`<0.17.1`);e===n&&(e+=` (separately built, likely a bundler configuration issue)`),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(`, `)}`),r}function Pb(){return xb}function Fb(e,t,n){let r=t.__type,i=Ox(e,r),a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));let o=a.length;for(let e=0;e<o&&(a[e](t),t.isAttached());e++);}function Ib(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function Lb(e,t){if(!t)return;let n=e._updateTags,r=t;Array.isArray(t)||(r=[t]);for(let e of r)n.add(e)}function Ene(e){return Rb(e,Mb()._nodes)}function Rb(e,t){let n=e.type,r=t.get(n);r===void 0&&Ph(17,n);let i=r.klass;e.type!==i.getType()&&Ph(18,i.name);let a=i.importJSON(e),o=e.children;if($(a)&&Array.isArray(o))for(let e=0;e<o.length;e++){let n=Rb(o[e],t);a.append(n)}let s=e.$slots;if(s){NC(a)||Ph(379,i.name);for(let e in s)KC(a,e,Rb(s[e],t))}return a}function zb(e,t,n){let r=bb,i=Sb,a=xb;bb=t,Sb=!0,xb=e;try{return n()}finally{bb=r,Sb=i,xb=a}}function Bb(e,t){let n=wb;wb=!0;try{(function(e,t){let n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return void(!e._updating&&e._deferred.length>0&&Ub(e,e._deferred));let a=e._editorState,o=a._selection,s=n._selection,c=e._dirtyType!==0,l=bb,u=Sb,d=xb,f=e._updating,p=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!i&&c&&p!==null){xb=e,bb=n,Sb=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,i=e._dirtyLeaves;p.disconnect(),m=E_(a,n,e,t,r,i)}catch(t){if(t instanceof Error&&e._onError(t),Cb)throw t;_x(e,null,r,n),vg(e),e._dirtyType=2,Cb=!0,Bb(e,a),Cb=!1;return}finally{p.observe(r,Db),e._updating=f,bb=l,Sb=u,xb=d}}n._readOnly||=!0;let h=e._dirtyLeaves,g=e._dirtyElements,_=e._normalizedNodes,v=e._updateTags;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set),e._updateTags=new Set,function(e,t){let n=e._decorators,r=e._pendingDecorators||n,i=t._nodeMap,a;for(a in r)i.has(a)||(r===n&&(r=eS(e)),delete r[a])}(e,n);let y=i?null:WS(NS(e));if(e._editable&&y!==null&&(c||s===null||s.dirty||!s.is(o))&&r!==null&&!v.has(`skip-dom-selection`)){xb=e,bb=n;try{if(p!==null&&p.disconnect(),c||s===null||s.dirty){let t=e._blockCursorElement;t!==null&&US(t,e,r),xne(o,s,e,y,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(Q(n)&&n.isCollapsed()&&n.anchor.type===`element`&&t.contains(eC(t))){let i=n.anchor,a=i.getNode(),o=i.offset,s=!1,c=null;if(o===a.getChildrenSize())HS(a.getChildAtIndex(o-1))&&(s=!0);else{let t=a.getChildAtIndex(o);if(t!==null&&HS(t)){let n=t.getPreviousSibling();(n===null||HS(n))&&(s=!0,c=e.getElementByKey(t.__key))}}if(s){let n=fC(a,e.getElementByKey(a.__key),e).element;r===null&&(e._blockCursorElement=r=function(e){let t=e.theme,n=ZS().createElement(`div`);n.contentEditable=`false`,n.setAttribute(`data-lexical-cursor`,`true`);let r=t.blockCursor;return r!==void 0&&(typeof r==`string`&&(r=t.blockCursor=Iw(r)),r!==void 0&&n.classList.add(...r)),n}(e._config)),t.style.caretColor=`transparent`,c===null?n.appendChild(r):n.insertBefore(r,c);return}}r!==null&&US(r,e,t)})(e,r,s)}finally{p!==null&&p.observe(r,Db),xb=d,bb=l}}m!==null&&function(e,t,n,r,i){let a=Array.from(e._listeners.mutation),o=a.length;for(let e=0;e<o;e++){let[o,s]=a[e];for(let e of s){let a=t.get(e);a!==void 0&&o(a,{dirtyLeaves:r,prevEditorState:i,updateTags:n})}}}(e,m,v,h,a),Q(s)||s===null||o!==null&&o.is(s)||e.dispatchCommand(k_);let b=e._pendingDecorators;b!==null&&(e._decorators=b,e._pendingDecorators=null,Vb(`decorator`,e,!0,b)),function(e,t,n){let r=tS(t),i=tS(n);r!==i&&Vb(`textcontent`,e,!0,i)}(e,t||a,n),Vb(`update`,e,!0,{dirtyElements:g,dirtyLeaves:h,editorState:n,mutatedNodes:m,normalizedNodes:_,prevEditorState:t||a,tags:v}),!f&&Ub(e,e._deferred),(function(e){let t=e._updates;if(t.length===0)return void(e._cascadeCount=0);if(function(e){Tb.has(e)||(Tb.add(e),setTimeout(()=>{Tb.delete(e),e._cascadeCount=0},0))}(e),e._cascadeCount++>99)return e._updates=[],e._cascadeCount=0,void e._onWarn(Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${e._config.namespace}`));let n=t.shift();if(n){let[t,r]=n;Gb(e,t,r)}})(e)})(e,t)}finally{wb=n}}function Vb(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=t._listeners[e],i=Array.from(n);for(let[e,t]of i){t&&t();let i=e(...r);n.has(e)?n.set(e,i):i&&i()}}finally{t._updating=i}}function Hb(e,t,n,r){let i=sS(e),a;if(!wb)for(let e=0;e<i.length;e++)i[e]._updating||(i[e]._cascadeCount=0);for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let s=i[o];if(o>0&&s._updating){a=s;break}let c=s._commands.get(t);if(c!==void 0){let t=c[e];if(t.size>0){let e=!1;if(Kb(s,()=>{for(let i of t)if(i(n,r))return void(e=!0)}),e)return e}}}return a&&a.update(()=>{Hb(a,t,n,r)}),!1}function Ub(e,t){if(e._deferred=[],t.length!==0){let n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}function Wb(e,t){let n=e._updates,r=t||!1;for(;n.length!==0;){let t=n.shift();if(t){let[n,i]=t,a=e._pendingEditorState,o;i!==void 0&&(o=i.onUpdate,i.skipTransforms&&(r=!0),i.discrete&&(a===null&&Ph(191),a._flushSync=!0),o&&e._deferred.push(o),Lb(e,i.tag)),a==null?Gb(e,n,i):n()}}return r}function Gb(e,t,n){let r=e._updateTags,i,a=!1,o=!1;n!==void 0&&(i=n.onUpdate,Lb(e,n.tag),a=n.skipTransforms||!1,o=n.discrete||!1),i&&e._deferred.push(i);let s=e._editorState,c=e._pendingEditorState,l=!1;(c===null||c._readOnly)&&(c=e._pendingEditorState=$b(c||s),l=!0),c._flushSync=o;let u=bb,d=Sb,f=xb,p=e._updating;bb=c,Sb=!1,e._updating=!0,xb=e;let m=e._headless||e.getRootElement()===null;Tx(null);try{l&&(m?s._selection!==null&&(c._selection=s._selection.clone()):c._selection=function(e,t){let n=e.getEditorState()._selection,r=WS(NS(e));return Q(n)||n==null?rb(n,r,e,t):n.clone()}(e,n&&n.event||null));let r=e._compositionKey;t(),a=Wb(e,a),function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(Q(r)){let e=r.anchor,t=r.focus,i;if(e.type===`text`&&(i=e.getNode(),i.selectionTransform(n,r)),t.type===`text`){let e=t.getNode();i!==e&&e.selectionTransform(n,r)}}}(c,e),e._dirtyType!==0&&(a?function(e,t){let n=t._dirtyLeaves,r=e._nodeMap;for(let e of n){let t=r.get(e);Cy(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&jg(t)}}(c,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements,i=e._nodeMap,a=Jx(),o=new Map,s=n,c=s.size,l=r,u=l.size;for(;c>0||u>0;){if(c>0){t._dirtyLeaves=new Set;for(let e of s){let r=i.get(e);Cy(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&jg(r),r!==void 0&&Ib(r,a)&&Fb(t,r,o),n.add(e)}if(s=t._dirtyLeaves,c=s.size,c>0){Eb++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map,l.delete(`root`)&&l.set(`root`,!0);for(let e of l){let n=e[0],s=e[1];if(r.set(n,s),!s)continue;let c=i.get(n);c!==void 0&&Ib(c,a)&&Fb(t,c,o)}s=t._dirtyLeaves,c=s.size,l=t._dirtyElements,u=l.size,Eb++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Wb(e),function(e,t,n,r){let i=e._nodeMap,a=t._nodeMap,o=[];for(let[e]of r){let t=a.get(e);t!==void 0&&(t.isAttached()||($(t)&&fg(t,e,i,a,o,r),i.has(e)||r.delete(e),o.push(e)))}for(let e of n){let t=a.get(e);t===void 0||t.isAttached()||(NC(t)&&t.__slots!==null&&fg(t,e,i,a,o,n),i.has(e)||n.delete(e),o.push(e))}for(let e of o)a.delete(e);let s=Mb(),c=s._compositionKey;c===null||a.has(c)||(s._compositionKey=null)}(s,c,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(c._flushSync=!0);let i=c._selection;if(Q(i)){e._slotsUsed&&Zy(i);let t=c._nodeMap,n=i.anchor.key,r=i.focus.key;t.get(n)!==void 0&&t.get(r)!==void 0||Ph(19)}else Iy(i)&&i._nodes.size===0&&(c._selection=null)}catch(t){t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),Bb(e);return}finally{bb=u,Sb=d,xb=f,e._updating=p,Eb=0}e._dirtyType!==0||e._deferred.length>0||function(e,t){let n=t.getEditorState()._selection,r=e._selection;if(r!==null){if(r.dirty||!r.is(n))return!0}else if(n!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Bb(e)):l&&Ax(()=>{Bb(e)}):(c._flushSync=!1,l&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Kb(e,t,n){xb===e&&n===void 0?Ob()?Gb(e,t,n):t():Gb(e,t,n)}function Dne(e){if(LS(e)){let t=null;for(let n of e.getChildren())t=n.isInline()?(t||n.replace(n.createParentElementNode())).append(n):null}}var qb=class extends ay{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for(`ElementNode`),{$transform:Dne,extends:ay})}constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style=``,this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=``,this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&Ph(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return Kte[this.getFormat()]||``}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;t!==null;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&zC(this).length===0}isDirty(){let e=Mb()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return t!==null&&t.is(e)}getAllTextNodes(){let e=[];for(let t of zC(this)){let n=BC(this,t);$(n)&&e.push(...n.getAllTextNodes())}let t=this.getFirstChild();for(;t!==null;){if(Cy(t)&&e.push(t),$(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;$(e);){let t=e.getFirstChild();if(t===null)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;$(e);){let t=e.getLastChild();if(t===null)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;if(e>=n){let e=t[n-1];return $(e)&&e.getLastDescendant()||e||null}let r=t[e];return $(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return e===null?null:Yx(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&Ph(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:Yx(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&Ph(96,this.__key),e}getChildAtIndex(e){let t=this.getChildrenSize(),n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;n!==null&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;n!==null&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e=WC(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),$(i)&&r!==n-1&&!i.isInline()&&(e+=Jh)}return e}getTextContentSize(){let e=function(e){let t=0;for(let n of zC(e)){let r=BC(e,n);r!==null&&(t+=r.getTextContentSize())}return t}(this),t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),$(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(e!==``){let t=$h[e];return(this.getFormat()&t)!==0}return!1}hasTextFormat(e){let t=Qh[e];return(this.getTextFormat()&t)!==0}getFormatFlags(e,t){return Hx(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){kb();let n=ib(),r=e,i=t,a=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&t===0){let e=this.getFirstChild();if(Cy(e)||$(e))return e.select(0,0)}else if(!(e!==void 0&&e!==a||t!==void 0&&t!==a)){let e=this.getLastChild();if(Cy(e)||$(e))return e.select()}}r===void 0&&(r=a),i===void 0&&(i=a);let o=this.__key;return Q(n)?(n.anchor.set(o,r,`element`),n.focus.set(o,i,`element`),n.dirty=!0,n):eb(o,r,o,i,`element`,`element`)}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=e!==``&&$h[e]||0,this}setStyle(e){return this.getWritable().__style=e||``,this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){ry(this)&&Ph(324,this.__key,this.__type);let r=this.getChildrenSize(),i=this.getWritable();e+t<=r||Ph(226,String(e),String(t),String(r));for(let e of n);let a=i.__key,o=[],s=[],c=this.getChildAtIndex(e+t),l=null,u=r-t+n.length;if(e!==0){if(e===r)l=this.getLastChild();else{let t=this.getChildAtIndex(e);t!==null&&(l=t.getPreviousSibling())}}if(t>0){let e=l===null?this.getFirstChild():l.getNextSibling();for(let n=0;n<t;n++){e===null&&Ph(100);let t=e.getNextSibling(),n=e.__key;Gx(e.getWritable()),s.push(n),e=t}}let d=l;for(let e of n){d!==null&&e.is(d)&&(l=d=d.getPreviousSibling());let t=e.getWritable();t.__parent===a&&u--,Gx(t);let n=e.__key;if(d===null)i.__first=n,t.__prev=null;else{let e=d.getWritable();e.__next=n,t.__prev=e.__key}e.__key===a&&Ph(76),t.__parent=a,o.push(n),d=e}if(e+t===r)d!==null&&(d.getWritable().__next=null,i.__last=d.__key);else if(c!==null){let e=c.getWritable();if(d!==null){let t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=u,s.length){let e=ib();if(Q(e)){let t=new Set(s),n=new Set(o),{anchor:r,focus:i}=e;Jb(r,t,n)&&cb(r,r.getNode(),this,l,c),Jb(i,t,n)&&cb(i,i.getNode(),this,l,c),u!==0||this.canBeEmpty()||LS(this)||this.remove()}}return i}getDOMSlot(e){return new ig(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(iC(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+`px`,t.setAttribute(`data-lexical-indent`,String(e)));let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return t===0&&n===``||LS(this)||this.getChildren().some(Cy)||(t!==0&&(e.textFormat=t),n!==``&&(e.textStyle=n)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||``)}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let n=fC(this,e,t),r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());i!==null&&(r==null?(n.insertChild(i),r=i):r!==i&&n.replaceChild(i,r),r=r.nextSibling)}}};function $(e){return e instanceof qb}function Jb(e,t,n){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}var Yb=class extends ay{__slotHost;__slots;constructor(e){super(e),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,this.__slotHost!==null&&this.__parent!==null&&Ph(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}};function Xb(e){return e instanceof Yb}var Zb=class extends qb{__cachedText;$config(){return this.config(`root`,{extends:qb})}constructor(){super(`root`),this.__cachedText=null}getTopLevelElementOrThrow(){Ph(51)}getTextContent(){let e=this.__cachedText;return e===null||!Ob()&&Mb()._dirtyType!==0?super.getTextContent():e}remove(){Ph(52)}replace(e){Ph(53)}insertBefore(e){Ph(54)}insertAfter(e){Ph(55)}updateDOM(e,t){return!1}splice(e,t,n){for(let e of n)$(e)||Xb(e)||Ph(282);return super.splice(e,t,n)}static importJSON(e){return nS().updateFromJSON(e)}collapseAtStart(){return!0}};function Qb(e){return e instanceof Zb}function $b(e){return new rx(ug(e._nodeMap),null,e._slotsUsed)}function ex(){return new rx(new Map([[`root`,new Zb]]),null,!1)}function tx(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Ph(130,n.name),$(e)){let r=t.children;Array.isArray(r)||Ph(59,n.name);let i=e.getChildren();for(let e=0;e<i.length;e++){let t=tx(i[e]);r.push(t)}}let r=zC(e);if(r.length>0){let i={};for(let t of r){let r=BC(e,t);r===null&&Ph(366,n.name,t),i[t]=tx(r)}t.$slots=i}return t}function nx(e){return e instanceof rx}var rx=class e{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(e,t=null,n=!1){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return zb(t&&t.editor||null,this,e)}clone(t){let n=new e(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return n._readOnly=!0,n}toJSON(){return zb(null,this,()=>({root:tx(nS())}))}},ix=class extends qb{$config(){return this.config(`artificial`,{extends:qb})}createDOM(e){return ZS().createElement(`div`)}},ax=class extends ay{$config(){return this.config(`linebreak`,{importDOM:{br:e=>lx(e)||ux(e)?null:{conversion:ox,priority:0}}})}getTextContent(){return`
|
||
`}createDOM(){return ZS().createElement(`br`)}updateDOM(){return!1}isInline(){return!0}};function ox(e){return{node:sx()}}function sx(){return zS(new ax)}function cx(e){return e instanceof ax}function lx(e){let t=e.parentElement;if(t!==null&&cC(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&dx(n)){let n=t.lastChild;if(n===e||n.previousSibling===e&&dx(n))return!0}}return!1}function ux(e){let t=e.parentElement;if(t!==null&&cC(t)){let n=t.firstChild;if(n===e||n.nextSibling===e&&dx(n))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&dx(r))return!0}return!1}function dx(e){return zx(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||``)}var fx=class extends qb{$config(){return this.config(`paragraph`,{extends:qb,importDOM:{p:()=>({conversion:px,priority:0})}})}createDOM(e){let t=ZS().createElement(`p`),n=bS(e.theme,`paragraph`);return n!==void 0&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(iC(t)){this.isEmpty()&&t.append(ZS().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}exportJSON(){let e=super.exportJSON();if(e.textFormat===void 0||e.textStyle===void 0){let t=this.getChildren().find(Cy);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let n=mx();n.setTextFormat(e.format),n.setTextStyle(e.style);let r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,t),n}collapseAtStart(){let e=this.getChildren();if(e.length===0||Cy(e[0])&&e[0].getTextContent().trim()===``){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}};function px(e){let t=mx();if(yC(t,e),_C(e,t),t.getFormatType()===``){let n=e.getAttribute(`align`);n&&n&&n in $h&&t.setFormat(n)}return vC(t,e),{node:t}}function mx(){return zS(new fx)}function hx(e){return e instanceof fx}function gx(e){console.warn(e)}function _x(e,t,n,r,i){let a=e._keyToDOMMap;a.clear(),e._editorState=ex(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};let o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=``,function(e,t){let n=`__lexicalKey_${t._key}`;delete e[n]}(t,e)),n!==null&&(n.textContent=``,a.set(`root`,n),Zx(n,e,`root`))}function vx(e){let t=new Set,n=new Set;for(let{klass:r,ownNodeConfig:i}of DC(e)){let e=r.transform;if(!n.has(e)){n.add(e);let i=r.transform();i&&t.add(i)}if(i){let e=i.$transform;e&&t.add(e)}}return t}var yx={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,n,r)=>{},$exportDOM:(e,t)=>{let n=kx(t,e.getType());return n&&n.exportDOM!==void 0?n.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,n,r,i)=>$(e)&&e.extractWithChild(t,n,r),$getDOMSlot:(e,t,n)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,n,r)=>null,$shouldExclude:(e,t,n)=>$(e)&&e.excludeFromCopy(`html`),$shouldInclude:(e,t,n)=>!t||e.isSelected(t),$updateDOM:(e,t,n,r)=>e.updateDOM(t,n,r._config)};function bx(e){let t=e||{},n=Pb(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,o=ex(),s=t.namespace||(i===null?cS():i._config.namespace),c=t.editorState,l=[Zb,vy,ax,Ty,fx,ix,...t.nodes||[]],{onError:u,onWarn:d,html:f}=t,p=t.editable===void 0||t.editable,m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let e=0;e<l.length;e++){let n=l[e],r=null,i=null;if(n&&typeof n==`object`){let e=n;n=e.replace,r=e.with,i=e.withKlass||null}if(typeof n!=`function`||!n.prototype||!(n===ay||n.prototype instanceof ay)){let r=`<unknown>`;try{r=JSON.parse(sg)}catch{}Ph(365,String(e-l.length+(t.nodes?t.nodes.length:0)),typeof n==`function`?`${n.name}${typeof n.getType==`function`?` (type ${String(n.getType())})`:``}`:String(n),String(r))}EC(n);let a=n.getType(),o=vx(n);m.set(a,{exportDOM:f&&f.export?f.export.get(n):void 0,klass:n,replace:r,replaceWithKlass:i,sharedNodeState:nne(l[e]),transforms:o})}}let h=new Cx(o,i,m,{disableEvents:a,dom:{...yx,...e&&e.dom},namespace:s,theme:r},u||console.error,d||gx,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach(t=>{let r=n.get(t);r===void 0&&(r=[],n.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(t==null||r.has(t))return;r.add(t);let n=t.call(e.klass);n!==null&&i(n)}),t&&i(t),n}(m,f?f.import:void 0),p,e);return c!==void 0&&(h._pendingEditorState=c,h._dirtyType=2),function(e){e.registerCommand(M_,Hv,0),e.registerCommand(N_,Uv,0),e.registerCommand(P_,Wv,0),e.registerCommand(F_,Gv,0),e.registerCommand(J_,Jv,0)}(h),h}function xx(e,t){let n=e.get(t);e.delete(t),n&&n()}function Sx(e,t,n){return e.set(t,n),xx.bind(null,e,t)}var Cx=class{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(e,t,n,r,i,a,o,s,c){this._createEditorArgs=c,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new dg,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=cS(),this._onError=i,this._onWarn=a,this._htmlConversions=o,this._editable=s,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:`root`,offset:0,style:``,timeStamp:0},compositionEndData:``,compositionPhase:`idle`,hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){return Sx(this._listeners.update,e)}registerEditableListener(e){return Sx(this._listeners.editable,e)}registerDecoratorListener(e){return Sx(this._listeners.decorator,e)}registerTextContentListener(e){return Sx(this._listeners.textcontent,e)}registerRootListener(e){let t=this._listeners.root;return zw(Sx(t,e,e(this._rootElement,null)||void 0),()=>function(e,t,n){let r=e.get(t);r&&r(),e.set(t,t(...n)||void 0)}(t,e,[null,this._rootElement]))}registerCommand(e,t,n){n===void 0&&Ph(35);let r=this._commands;r.has(e)||r.set(e,[new cg,new cg,new cg,new cg,new cg]);let i=r.get(e);i===void 0&&Ph(36,String(e));let a=function(e){return 7&e}(n),o=i[a];return a===n?o.addBack(t):o.addFront(t),()=>{o.delete(t),i.every(e=>e.size===0)&&r.delete(e)}}registerMutationListener(e,t,n){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation,a=i.get(t);a===void 0&&(a=new Set,i.set(t,a)),a.add(r);let o=n&&n.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(t,r),()=>{a.delete(r),a.size===0&&i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return t===void 0&&Ph(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let n=this._editorState,r=hC(n).get(t.getType());if(!r)return;let i=new Map;for(let e of r.keys())i.set(e,`created`);i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set([`registerMutationListener`])})}registerNodeTransformToKlass(e,t){let n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){let n=this.registerNodeTransformToKlass(e,t),r=[n],i=n.replaceWithKlass;if(i!=null){let e=this.registerNodeTransformToKlass(i,t);r.push(e)}return function(e,t){let n=hC(e.getEditorState()),r=[];for(let e of t){let t=n.get(e);t&&r.push(t)}r.length!==0&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=Yx(t);e&&e.markDirty()}},e._pendingEditorState===null?{tag:sy}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,...t){return TS(this,e,...t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let n=bS(this._config.theme,`root`),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,_x(this,t,e,r,{preserveUpdateQueue:!0}),t!==null&&(this._config.disableEvents||cne(t),n!=null&&t.classList.remove(...n)),e!==null){let t=MS(e),r=e.style;r.userSelect=`text`,r.whiteSpace=`pre-wrap`,r.wordBreak=`break-word`,e.setAttribute(`data-lexical-editor`,`true`),this._window=t,this._dirtyType=2,vg(this),this._updateTags.add(sy),Bb(this),this._config.disableEvents||function(e,t){let n=e.ownerDocument;kv.set(e,n);let r=Av.get(n);r===void 0&&(r={editors:new Set,hasShadowEditor:void 0},Av.set(n,r)),r.editors.add(t),r.hasShadowEditor=void 0,e.__lexicalEditor=t;let i=Yv(e);i.push(jv.register(n));for(let n=0;n<Ov.length;n++){let[r,a]=Ov[n],o=typeof a==`function`?e=>{$v(e)||(Qv(e),(t.isEditable()||r===`click`)&&a(e,t))}:e=>{if($v(e))return;Qv(e);let n=t.isEditable();switch(r){case`cut`:return n&&TS(t,gv,e);case`copy`:return TS(t,hv,e);case`paste`:return n&&TS(t,B_,e);case`dragstart`:return n&&TS(t,fv,e);case`dragover`:return n&&TS(t,pv,e);case`dragend`:return n&&TS(t,mv,e);case`focus`:return n&&TS(t,Sv,e);case`blur`:return n&&TS(t,Cv,e);case`drop`:return n&&TS(t,uv,e)}};i.push(Ev(e,r,o))}}(e,this),n!=null&&e.classList.add(...n)}else this._window=null,this._updateTags.add(sy),Bb(this);Vb(`root`,this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Ph(38);let n=e;n._readOnly&&(n=$b(e),n._selection=e._selection?e._selection.clone():null),_g(this);let r=this._pendingEditorState,i=t===void 0?null:t.tag;r===null||r.isEmpty()||(i!=null&&this._updateTags.add(i),Bb(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set(`root`,!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Kb(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(let[e,t]of n._nodeMap.entries())$(t)?this._dirtyElements.set(e,!0):this._dirtyLeaves.add(e)},{discrete:!this._updating||void 0})}parseEditorState(e,t){return function(e,t,n){let r=ex(),i=bb,a=Sb,o=xb,s=t._dirtyElements,c=t._dirtyLeaves,l=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,bb=r,Sb=!1,xb=t,Tx(null);try{let i=t._nodes;Rb(e.root,i),n&&n(),r._readOnly=!0,r._parsed=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=c,t._cloneNotNeeded=l,t._dirtyType=u,bb=i,Sb=a,xb=o}return r}(typeof e==`string`?JSON.parse(e):e,this,t)}read(...e){let[t,n]=e.length===1?[`force-commit`,e[0]]:e;return t===`force-commit`&&Bb(this),(t===`pending`?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(e,t){(function(e,t,n){e._updating?e._updates.push([t,n]):Gb(e,t,n)})(this,e,t)}focus(e,t={}){let n=this._rootElement;n!==null&&(n.setAttribute(`autocapitalize`,`off`),Kb(this,()=>{let r=ib(),i=nS();r===null?i.getChildrenSize()!==0&&(t.defaultSelection===`rootStart`?i.selectStart():i.selectEnd()):r.dirty||rS(r.clone()),kS(`focus`),AS(()=>{n.removeAttribute(`autocapitalize`),e&&e()})}),this._pendingEditorState===null&&n.removeAttribute(`autocapitalize`))}blur(){let e=this._rootElement;e!==null&&e.blur();let t=WS(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Vb(`editable`,this,!0,e),this._slotsUsed&&this.update(()=>Tne()))}toJSON(){return{editorState:this._editorState.toJSON()}}};Cx.version=sg;var wx=null;function Tx(e){wx=e}var Ex=Symbol(`INTERNAL_SKIP_AFTER_CLONE_FROM`),Dx=1;function Ox(e,t){let n=kx(e,t);return n===void 0&&Ph(30,t),n}function kx(e,t){return e._nodes.get(t)}var Ax=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)};function jx(e,t){let n=t===void 0?(()=>{let t=e.getRootNode();return Bx(t)||KS(t)?tC(t):null})():t;if(!iC(n)||n.hasAttribute(`data-lexical-slot`))return!1;let r=$x(n),i=n.nodeName;return oy(r)&&(i===`INPUT`||i===`TEXTAREA`||n.contentEditable===`true`&&Fx(n)==null)}function Mx(e,t,n){let r=e.getRootElement();if(!r)return!1;try{if(!t||!r.contains(t)||!r.contains(n))return!1}catch{return!1}return Px(t)===e&&e.read(`latest`,()=>!jx(t))}function Nx(e){return e instanceof Cx}function Px(e){let t=e;for(;t!=null;){let e=Fx(t);if(Nx(e))return e;t=DS(t)}return null}function Fx(e){return e?e.__lexicalEditor:null}function Ix(e){return Ute.test(e)?`rtl`:Wte.test(e)?`ltr`:null}function Lx(e){return Dy(e)||e.isToken()}function Rx(e){return Lx(e)||e.isSegmented()}function zx(e){return aC(e)&&e.nodeType===3}function Bx(e){return aC(e)&&e.nodeType===9}function Vx(e){let t=e;for(;t!=null;){if(zx(t))return t;t=t.firstChild}return null}function Hx(e,t,n){let r=Qh[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t===`subscript`?i&=~Qh.superscript:t===`superscript`?i&=~Qh.subscript:t===`lowercase`?(i&=~Qh.uppercase,i&=~Qh.capitalize):t===`uppercase`?(i&=~Qh.lowercase,i&=~Qh.capitalize):t===`capitalize`&&(i&=~Qh.lowercase,i&=~Qh.uppercase),i}function Ux(e){return Cy(e)||cx(e)||Xb(e)}function Wx(e,t){let n=function(){let e=wx;return wx=null,e}();if((t||=n&&n.__key)!=null)return void(e.__key=t);kb(),Ab();let r=Mb(),i=jb(),a=``+Dx++;i._nodeMap.set(a,e),$(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType===0&&(r._dirtyType=1),e.__key=a}function Gx(e){FC(e)!==null&&Ph(380,e.__key,String(FC(e)));let t=e.getParent();if(t!==null){let n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),o=a===null?null:a.__key,s=i===null?null:i.__key,c=i===null?null:i.getWritable(),l=a===null?null:a.getWritable();i===null&&(r.__first=o),a===null&&(r.__last=s),c!==null&&(c.__next=o),l!==null&&(l.__prev=s),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function Kx(e){Ab(),ry(e)&&Ph(323,e.__key,e.__type);let t=e.getLatest(),n=t.__parent===null?PC(t)?t.__slotHost:null:t.__parent,r=jb(),i=Mb(),a=r._nodeMap,o=i._dirtyElements;n!==null&&function(e,t,n){let r=e;for(;r!==null;){if(n.has(r))return;let e=t.get(r);if(e===void 0)break;n.set(r,!1),r=e.__parent===null?PC(e)?e.__slotHost:null:e.__parent}}(n,a,o);let s=t.__key;i._dirtyType===0&&(i._dirtyType=1),$(e)?o.set(s,!0):i._dirtyLeaves.add(s)}function qx(e){kb();let t=Mb(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){let e=Yx(n);e!==null&&e.getWritable()}if(e!==null){let t=Yx(e);t!==null&&t.getWritable()}}}function Jx(){return Ob()?null:Mb()._compositionKey}function Yx(e,t){let n=(t||jb())._nodeMap.get(e);return n===void 0?null:n}function Xx(e,t){let n=Qx(e,Mb());return n===void 0?null:Yx(n,t)}function Zx(e,t,n){e[`__lexicalKey_${t._key}`]=n}function Qx(e,t){return e[`__lexicalKey_${t._key}`]}function $x(e,t){let n=e;for(;n!=null;){let e=Xx(n,t);if(e!==null)return e;n=DS(n)}return null}function eS(e){let t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function tS(e){return e.read(()=>nS().getTextContent())}function nS(){return jb()._nodeMap.get(`root`)}function rS(e){kb();let t=jb();e!==null&&(e.dirty=!0,e.setCachedNodes(null),Q(e)&&Mb()._slotsUsed&&Zy(e)),t._selection=e}function iS(){kb(),_g(Mb())}function aS(e){let t=function(e,t){let n=e;for(;n!=null;){let e=Qx(n,t);if(e!==void 0)return e;n=DS(n)}return null}(e,Mb());return t===null?null:Yx(t)}function oS(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function sS(e){let t=[];for(let n=e;n!==null;n=n._parentEditor)t.push(n);return t}function cS(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substring(0,5)}function lS(e){return zx(e)?e.nodeValue:null}function uS(e,t,n){let r=WS(NS(t));if(r===null)return;let i=$S(r,t._rootElement),a=i.anchorNode,{anchorOffset:o,focusOffset:s}=i;if(a!==null){let t=lS(a),r=$x(a);if(t!==null&&Cy(r)){if((t===qh||t===Yh)&&n){let e=n.length;t=n,o=e,s=e}t!==null&&dS(r,t,o,s,e)}}}function dS(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){let o=a.isComposing();if(a.isToken()&&o)return;let s=t;if((o||i)&&(t.endsWith(qh)&&(s=t.slice(0,-qh.length)),i)){let e=Yh,t;for(;(t=s.indexOf(e))!==-1;)s=s.slice(0,t)+s.slice(t+e.length),n!==null&&n>t&&(n=Math.max(t,n-e.length)),r!==null&&r>t&&(r=Math.max(t,r-e.length))}let c=a.getTextContent();if(i||s!==c){let t=ib();if(s===``){if(qx(null),Uh||Vh||Kh)a.remove();else{let e=Mb();fS(a,``,t),setTimeout(()=>{e.update(()=>{a.isAttached()&&a.getTextContent()===``&&a.remove()})},20)}return}let i=a.getParent(),c=ab(),l=a.getTextContentSize(),u=Jx(),d=a.getKey();if(a.isToken()&&!o||u!==null&&d===u&&!o||Q(c)&&(i!==null&&!i.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!a.canInsertTextBefore()&&!o||c.focus.key===e.__key&&c.focus.offset===l&&!a.canInsertTextAfter()&&!o))return void a.markDirty();if(!Q(t)||n===null||r===null)return void fS(a,s,t);if(t.setTextNodeRange(a,n,a,r),a.isSegmented()){let e=Sy(a.getTextContent());a.replace(e),a=e}fS(a,s,t)}}}function fS(e,t,n){if(e.setTextContent(t),Q(n)){let t=e.getKey(),r=!1;for(let i of[`anchor`,`focus`]){let a=n[i];a.type===`text`&&a.key===t&&(a.offset=aw(e,a.offset,`clamp`),r=!0)}r&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function pS(e,t,n){let r=t[n]||!1;return r===`any`||r===e[n]}function mS(e,t){return pS(e,t,`altKey`)&&pS(e,t,`ctrlKey`)&&pS(e,t,`shiftKey`)&&pS(e,t,`metaKey`)}function hS(e,t,n){if(!mS(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith(`Digit`)&&/^\d$/.test(t))return e.code===`Digit${t}`;let r=`Key`+t.toUpperCase();return e.code===r}var gS={ctrlKey:!Rh,metaKey:Rh},_S={altKey:Rh,ctrlKey:!Rh};function vS(e){return e.key===`Backspace`}function yS(e){let t=nS();if(Q(e)){let t=e.anchor,n=e.focus,r=t.getNode();if(Qb(r))return t.set(r.getKey(),0,`element`),n.set(r.getKey(),r.getChildrenSize(),`element`),Mg(e),e;let i=r.getTopLevelElementOrThrow(),a=i.getParent();if(a===null)return $(i)&&(t.set(i.getKey(),0,`element`),n.set(i.getKey(),i.getChildrenSize(),`element`),Mg(e)),e;let o=a;return t.set(o.getKey(),0,`element`),n.set(o.getKey(),o.getChildrenSize(),`element`),Mg(e),e}{let e=t.select(0,t.getChildrenSize());return rS(Mg(e)),e}}function bS(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;let i=e[t];if(typeof i==`string`){let e=Iw(i);return n[t]=e,e}return i}function xS(e,t,n,r,i){if(n.size===0)return;let a=r.__type,o=r.__key,s=t.get(a);s===void 0&&Ph(33,a);let c=s.klass,l=e.get(c);l===void 0&&(l=new Map,e.set(c,l));let u=l.get(o),d=u===`destroyed`&&i===`created`;(u===void 0||d)&&l.set(o,d?`updated`:i)}function SS(e,t,n){let r=e.getParent(),i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function CS(e,t){let n=e.offset;if(e.type===`element`)return SS(e.getNode(),t,n);{let r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return e===null?SS(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function wS(e){let t=NS(e).event,n=t&&t.inputType;return n===`insertFromPaste`||n===`insertFromPasteAsQuotation`}function TS(e,t,...n){return Hb(e,t,n[0],e)}function ES(e,t){let n=e._keyToDOMMap.get(t);return n===void 0&&Ph(75,t),n}function DS(e){let t=e.assignedSlot||e.parentElement;if(t!==null)return t;let n=e.parentNode;return KS(n)?n.host:null}function OS(e){return Bx(e)?e:iC(e)?e.ownerDocument:null}function kS(e){kb(),Mb()._updateTags.add(e)}function AS(e){kb(),Mb()._deferred.push(e)}function jS(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function MS(e){let t=OS(e);return t?t.defaultView:null}function NS(e){let t=e._window;return t===null&&Ph(78),t}function PS(e){return $(e)&&e.isInline()||Xb(e)&&e.isInline()}function FS(e){let t=e.getLatest();for(;t!==null;){if(FC(t)!==null&&$(t))return t;let e=t.getParentOrThrow();if(LS(e))return e;t=e}return t}function IS(e){return $(e)&&e.isShadowRoot()}function LS(e){return Qb(e)||IS(e)}function RS(e,t=!1){let n=e.constructor.clone(e,Ex);return Wx(n,null),n.afterCloneFrom(e),t||n.resetOnCopyNodeFrom(e),n}function zS(e){let t=Mb(),n=e.getType(),r=kx(t,n);r===void 0&&Ph(200,e.constructor.name,n);let{replace:i,replaceWithKlass:a}=r;if(i!==null){let t=i(e),r=t.constructor;return a===null?t instanceof e.constructor&&r!==e.constructor||Ph(202,r.name,r.getType(),e.constructor.name,n):t instanceof a||Ph(201,a.name,a.getType(),r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&Ph(203,e.constructor.name,n,r.name,r.getType()),t}return e}function BS(e,t){!Qb(e.getParent())||$(t)||Xb(t)||Ph(99)}function VS(e){let t=Yx(e);return t===null&&Ph(63,e),t}function HS(e){if(!e||e.isInline())return!1;if(Xb(e))return!0;if($(e)){if(e.isShadowRoot()){let t=e.getParent();return!($(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function US(e,t,n){n.style.removeProperty(`caret-color`),t._blockCursorElement=null;let r=e.parentElement;r!==null&&r.removeChild(e)}function WS(e){return Ih?(e||window).getSelection():null}function GS(e){let t=MS(e);return t?t.getSelection():null}function KS(e){return oC(e)&&`host`in e}var qS=[];function JS(e){let t=e.getRootNode();if(t===e||!KS(t))return qS;let n=[t],r=t.host;for(;;){let e=r.getRootNode();if(e===r||!KS(e))break;n.push(e),r=e.host}return n}function*YS(e){let t=[e],n;for(;n=t.pop();){yield*n.querySelectorAll(`[data-lexical-editor="true"]`);let e=(Bx(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),r;for(;r=e.nextNode();)r.shadowRoot&&t.push(r.shadowRoot)}}function XS(e){return e===null?document:e.ownerDocument}function ZS(){let e=Pb();return XS(e===null?null:e._rootElement)}function QS(e,t){if(t===null||typeof e.getComposedRanges!=`function`)return null;let n=JS(t);if(n.length===0)return null;let r=e.getComposedRanges;try{let t=r.call(e,{shadowRoots:n})[0];if(t!==void 0)return t}catch{}try{let t=r.apply(e,n)[0];if(t!==void 0)return t}catch{}return null}function One(e,t){let n=QS(e,t);if(n!==null){let e=kne(n);if(e!==null)return e}return e.rangeCount>0?e.getRangeAt(0):null}function $S(e,t){let n=QS(e,t);return n===null?e:Ane(n,jne(e))}function kne(e){let t=e.startContainer.ownerDocument;if(t===null)return null;let n=t.createRange();try{return n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),n}catch{return null}}function Ane(e,t){let{startContainer:n,startOffset:r,endContainer:i,endOffset:a}=e;return t===`backward`?{anchorNode:i,anchorOffset:a,direction:t,focusNode:n,focusOffset:r}:{anchorNode:n,anchorOffset:r,direction:t,focusNode:i,focusOffset:a}}function jne(e){return e.direction}function eC(e){let t=e.getRootNode();return Bx(t)||KS(t)?t.activeElement:null}function tC(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){let e=t.shadowRoot.activeElement;if(e===null)break;t=e}return t}function nC(e){let t=e.target;if(t!==null&&iC(t)&&t.shadowRoot!==null&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0)return t[0]}return t}function rC(e){return iC(e)&&e.tagName===`A`}function iC(e){return aC(e)&&e.nodeType===1}function aC(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function oC(e){return aC(e)&&e.nodeType===11}var Mne=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function sC(e){return!(!iC(e)||!e.style.display.startsWith(`inline`))||Mne.test(e.nodeName)}var Nne=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function cC(e){return(!iC(e)||!e.style.display.startsWith(`inline`))&&Nne.test(e.nodeName)}function lC(e){if(Xb(e)&&!e.isInline())return!0;if(!$(e)||LS(e))return!1;let t=e.getFirstChild(),n=t===null||cx(t)||Cy(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function uC(){return Mb()}function dC(e=uC()){return e._config.dom||yx}function fC(e,t,n=uC()){let r=dC(n).$getDOMSlot(e,t,n);return $(e)&&(Pne(r)||Ph(344,e.getKey(),e.getType())),r}function Pne(e){return e instanceof ig}function pC(e,t,n=uC()){return Vx(fC(e,t,n).element)}var mC=new WeakMap,Fne=new Map;function hC(e){if(!e._readOnly&&e.isEmpty())return Fne;e._readOnly||Ph(192);let t=mC.get(e);return t||(t=function(e){let t=new Map;for(let[n,r]of e._nodeMap){let e=r.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)}return t}(e),mC.set(e,t)),t}function gC(e){let t=e.constructor.clone(e,Ex);return t.afterCloneFrom(e),t}function Ine(e){return(t=gC(e))[ny]=!0,t;var t}function _C(e,t){let n=e.getAttribute(`data-lexical-indent`);if(n!==null){let e=parseInt(n,10);if(Number.isFinite(e)&&e>=0)return void t.setIndent(e)}let r=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(r/40);t.setIndent(i)}function vC(e,t){let n=t.getAttribute(`dir`);return n===`ltr`||n===`rtl`?e.setDirection(n):e}function yC(e,t){let n=t.style.textAlign;return n&&n in $h?e.setFormat(n):e}function bC(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function xC(e){return!0===e.__lexicalUnmanaged}function Lne(e,t=uC()){let n=t.isEditable();e.contentEditable=n?`true`:`false`,n?e.__lexicalEditor=t:delete e.__lexicalEditor}function SC(e,t){let n=e;for(;n!=null;){if(!0===n.__lexicalCapturedSelection)return!0;if(iC(n)&&n.hasAttribute(`data-lexical-slot`)||Qx(n,t)!==void 0)return!1;n=DS(n)}return!1}function CC(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&e[t]!==ay[t]}var wC=new WeakMap,TC=Symbol(`lexical.synthesizedGetType`);function EC(e){let t=wC.get(e);if(t)return t;let n=e.prototype!=null&&eg in e.prototype?e.prototype[eg]():void 0,r=function(e){if(!(e===ay||e.prototype instanceof ay)){let t=`<unknown>`,n=`<unknown>`;try{t=e.getType()}catch{}try{Cx.version&&(n=JSON.parse(Cx.version))}catch{}Ph(290,e.name,t,n)}return e===Yb||e===qb||e===ay}(e),i=!r&&CC(e,`getType`)?e.getType:void 0,a=i&&!(TC in i)?i.call(e):void 0,o,s=a;if(n){if(a)o=n[a];else{for(let[e,t]of Object.entries(n))s=e,o=t;if(!o)for(let e of Object.getOwnPropertySymbols(n)){let t=n[e];if(t){o=t;break}}}}if(!r&&s){if(!CC(e,`getType`)){let t=e,n=function(){return this===t?s:ay.getType.call(this)};n[TC]=!0,e.getType=n}if(CC(e,`clone`)||(e.clone=(t,n)=>{Tx(t);let r=new e;return n!==Ex&&r.afterCloneFrom(t),r}),CC(e,`importJSON`)||(e.importJSON=o&&o.$importJSON||(t=>new e().updateFromJSON(t))),!CC(e,`importDOM`)&&o){let{importDOM:t}=o;t&&(e.importDOM=()=>t)}}let c={klass:e,ownNodeConfig:o,ownNodeType:s};return wC.set(e,c),c}function*DC(e){for(let t=e;t&&(t===ay||oy(t.prototype));){let e=EC(t);yield e,t=e.ownNodeConfig&&e.ownNodeConfig.extends||jC(t)}}function OC(e){let t=uC();return kb(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}var kC=(e,t)=>{let n=e;for(;n!=null&&!Qb(n);){if(t(n))return n;n=n.getParent()}return null};function AC(e,t){let n=[],r=e.__first;for(;r!==null;){let e=t===null?Yx(r):t.get(r);e??Ph(174),n.push(r),r=e.__next}return n}function jC(e){let t=Object.getPrototypeOf(e);if(typeof t==`function`&&t!==Function.prototype)return t;let n=e.prototype&&Object.getPrototypeOf(e.prototype);return n?n.constructor:null}var MC=new Map;function NC(e){return $(e)||Xb(e)}function PC(e){return $(e)||Xb(e)}function FC(e){let t=e.getLatest();return PC(t)?t.__slotHost:null}function IC(e){let t=FC(e);if(t===null)return null;let n=Yx(t);return $(n)||Xb(n)||Ph(370),n}function Rne(e){let t=IC(e);if(t===null)return null;let n=e.getLatest().__key;for(let[e,r]of RC(t))if(r===n)return e;return null}function LC(e){let t=e.getLatest();for(;t!==null;){if(FC(t)!==null)return t;t=t.getParent()}return null}function RC(e){let t=e.getLatest();return NC(t)&&t.__slots!==null?t.__slots:MC}function zC(e){return Array.from(RC(e).keys())}function BC(e,t){let n=RC(e).get(t);return n===void 0?null:Yx(n)}var zne=[`__proto__`,`constructor`,`prototype`],VC=Symbol(`slotMapOwner`);function HC(e){let t=e.__slots;return t!==null&&t[VC]===e||(t=new Map(t),t[VC]=e,e.__slots=t),t}var UC=new WeakMap,Bne=[];function Vne(e){for(let{ownNodeConfig:t}of DC(e)){let e=t&&t.slots;if(e)return e}return Bne}function WC(e){let t=``;for(let n of zC(e)){let r=BC(e,n);r!==null&&(t+=r.getTextContent())}return t}function GC(e,t,n){let r=n.get(e),i=n.get(t);return r===void 0?i===void 0?e<t?-1:+(e>t):1:i===void 0?-1:r-i}function Hne(e){let t=e.__slots;if(t===null||t.size<2)return;let n=function(e){let t=UC.get(e);if(t===void 0){let n=Vne(e),r=new Map;for(let t of n)zne.includes(t)&&Ph(371,e.name,t),r.has(t)&&Ph(372,e.name,t),r.set(t,r.size);t=r,UC.set(e,t)}return t}(e.constructor),r=null,i=!0;for(let e of t.keys()){if(r!==null&&GC(r,e,n)>0){i=!1;break}r=e}if(i)return;let a=Array.from(t).sort(([e],[t])=>GC(e,t,n));t.clear();for(let[e,n]of a)t.set(e,n)}function KC(e,t,n){t!==`__proto__`&&t!==`constructor`&&t!==`prototype`||Ph(373,t);let r=e.getLatest();if(r.__slots!==null&&r.__slots.get(t)===n.getLatest().__key)return r;(!$(n)&&!Xb(n)||n.isInline())&&Ph(374,n.__key);let i=e.getWritable(),a=HC(i),o=a.get(t);o!==void 0&&qC(o);let s=n.getWritable(),c=IC(s);if(c!==null){let e=Rne(s);e!==null&&HC(c.getWritable()).delete(e),s.__slotHost=null}return Gx(s),s.__slotHost=i.__key,a.set(t,s.__key),Hne(i),function(){let e=uC();e._slotsUsed=!0,e._pendingEditorState&&(e._pendingEditorState._slotsUsed=!0)}(),i}function Une(e,t){let n=e.getWritable();if(n.__slots===null)return n;let r=n.__slots.get(t);return r!==void 0&&(qC(r),HC(n).delete(t)),n}function qC(e){let t=Yx(e);if(t===null)return;let n=t.getWritable();PC(n)||Ph(377,e),n.__slotHost=null,n.remove()}var Wne={next:`previous`,previous:`next`},JC=class{origin;constructor(e){this.origin=e}[Symbol.iterator](){return fw({hasNext:tw,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return rw(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return rw(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let n=this.getNodeAtCaret();return e.is(this.origin)||e.is(n)||(n===null?this.insert(e):n.replace(e,t)),this}splice(e,t,n=`next`){let r=n===this.direction?t:Array.from(t).reverse(),i=this,a=this.getParentAtCaret(),o=new Map;for(let t=i.getAdjacentCaret();t!==null&&o.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();o.set(e.getKey(),e)}for(let e of r){if(o.size>0){let t=i.getNodeAtCaret();if(t){if(o.delete(t.getKey()),o.delete(e.getKey()),!(t.is(e)||i.origin.is(e))){let n=e.getParent();n&&n.is(a)&&e.remove(),t.replace(e)}}else t===null&&Ph(263,Array.from(o).join(` `))}else i.insert(e);i=rw(e,this.direction)}for(let e of o.values())e.remove();return this}},YC=class e extends JC{type=`child`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:sw(e,this.direction)}getParentCaret(e=`root`){return rw(ZC(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=XC(this.direction);return rw(this.getNodeAtCaret(),e)||sw(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}},Gne={root:Qb,shadowRoot:LS};function XC(e){return Wne[e]}function ZC(e,t=`root`){return e===null||Gne[t](e)?null:FC(e)===null?e:null}var QC=class e extends JC{type=`sibling`;getLatest(){let e=this.origin.getLatest();return e===this.origin?this:rw(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return $(this.origin)?sw(this.origin,this.direction):null}getParentCaret(e=`root`){return rw(ZC(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=XC(this.direction);return rw(this.getNodeAtCaret(),e)||sw(this.origin.getParentOrThrow(),e)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof e||t instanceof $C)&&this.direction===t.direction&&this.origin.is(t.origin)}},$C=class e extends JC{type=`text`;offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:iw(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e=`root`){return rw(ZC(this.getParentAtCaret(),e),this.direction)}getFlipped(){return iw(this.origin,XC(this.direction),this.offset)}isSamePointCaret(t){return t instanceof e&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof QC||t instanceof e)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return rw(this.origin,this.direction)}};function ew(e){return e instanceof $C}function tw(e){return e instanceof QC}function nw(e){return e instanceof YC}var Kne={next:class extends $C{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends $C{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},qne={next:class extends QC{direction=`next`;getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends QC{direction=`previous`;getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},Jne={next:class extends YC{direction=`next`;getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends YC{direction=`previous`;getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function rw(e,t){return e?new qne[t](e):null}function iw(e,t,n){return e?new Kne[t](e,aw(e,n)):null}function aw(e,t,n=`error`){let r=e.getTextContentSize(),i=t===`next`?r:t===`previous`?0:t;return(i<0||i>r)&&(n!==`clamp`&&Fh(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function ow(e,t){return new Zne(e,t)}function sw(e,t){return $(e)?new Jne[t](e):null}function Yne(e){return e&&e.getChildCaret()||e}function cw(e){return e&&Yne(e.getAdjacentCaret())}var Xne=class e{type=`node-caret-range`;direction;anchor;focus;constructor(e,t,n){this.anchor=e,this.focus=t,this.direction=n}getLatest(){let t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new e(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return ew(t)?function(e,t){let{direction:n,origin:r}=e;return ow(e,aw(r,t===`focus`?XC(n):n)-e.offset)}(t,e):null},t=e(`anchor`),n=e(`focus`);if(t&&n){let{caret:e}=t,{caret:r}=n;if(e.isSameNodeCaret(r))return[ow(e,r.offset-e.offset),null]}return[t,n]}iterNodeCarets(e=`root`){let t=ew(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),r=ew(n),i=t=>t.isSameNodeCaret(n)?null:cw(t)||t.getParentCaret(e);return fw({hasNext:e=>e!==null&&!(r&&n.isSameNodeCaret(e)),initial:t.isSameNodeCaret(n)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets(`root`)}},Zne=class{type=`slice`;caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,n=t+e;return n<t?[n,t]:[t,n]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[n,r]=this.getSliceIndices(),i=e.getTextContent();return iw(e.setTextContent(i.slice(0,n)+i.slice(r)),t,n)}};function lw(e){return dw(e,rw(nS(),e.direction))}function uw(e){return dw(e,e)}function dw(e,t){return e.direction!==t.direction&&Ph(265),new Xne(e,t,e.direction)}function fw(e){let{initial:t,hasNext:n,step:r,map:i}=e,a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};let e={done:!1,value:i(a)};return a=r(a),e}}}function pw(e,t){let n=_w(e.origin,t.origin);switch(n===null&&Ph(275,e.origin.getKey(),t.origin.getKey()),n.type){case`same`:{let n=e.type===`text`,r=t.type===`text`;return n&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:n?-1:r?1:e.type===`child`?-1:1}case`ancestor`:return e.type===`child`?-1:1;case`descendant`:return t.type===`child`?1:-1;case`branch`:return mw(n)}}function mw(e){let{a:t,b:n}=e,r=t.__key,i=n.__key,a=t,o=n;for(;a&&o;a=a.getNextSibling(),o=o.getNextSibling()){if(a.__key===i)return-1;if(o.__key===r)return 1}return a===null?1:-1}function hw(e,t){return t.is(e)}function gw(e){return $(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function _w(e,t){if(e.is(t))return{commonAncestor:e,type:`same`};let n=new Map;for(let[t,r]=gw(e);t;r=t,t=t.getParent())n.set(t,r);for(let[r,i]=gw(t);r;i=r,r=r.getParent()){let a=n.get(r);if(a!==void 0)return a===null?(hw(e,r)||Ph(276),{commonAncestor:r,type:`ancestor`}):i===null?(hw(t,r)||Ph(277),{commonAncestor:r,type:`descendant`}):(($(a)||hw(e,a))&&($(i)||hw(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||Ph(278),{a,b:i,commonAncestor:r,type:`branch`})}return null}function vw(e,t){let{type:n,key:r,offset:i}=e,a=VS(e.key);return n===`text`?(Cy(a)||Ph(266,a.getType(),r),iw(a,t,i)):($(a)||Ph(267,a.getType(),r),Aw(a,e.offset,t))}function yw(e,t){let{origin:n,direction:r}=t,i=r===`next`;ew(t)?e.set(n.getKey(),t.offset,`text`):tw(t)?Cy(n)?e.set(n.getKey(),aw(n,r),`text`):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+ +!!i,`element`):(nw(t)&&$(n)||Ph(268),e.set(n.getKey(),i?0:n.getChildrenSize(),`element`))}function bw(e){let t=ib(),n=Q(t)?t:tb();return xw(n,e),rS(n),n}function xw(e,t){yw(e.anchor,t.anchor),yw(e.focus,t.focus)}function Sw(e){let{anchor:t,focus:n}=e,r=vw(t,`next`),i=vw(n,`next`),a=pw(r,i)<=0?`next`:`previous`;return dw(Ow(r,a),Ow(i,a))}function Cw(e){let{direction:t,origin:n}=e,r=rw(n,XC(t)).getNodeAtCaret();return r?rw(r,t):sw(n.getParentOrThrow(),t)}function ww(e,t=`root`){let n=[e];for(let r=nw(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(Cw(r));return n}function Tw(e){return!!e&&e.origin.isAttached()}function Qne(e,t=`removeEmptySlices`){if(e.isCollapsed())return e;let n=`root`,r=`next`,i=t,a=kw(e,r),o=ww(a.anchor,n),s=ww(a.focus.getFlipped(),n),c=new Set,l=[];for(let e of a.iterNodeCarets(n))if(nw(e))c.add(e.origin.getKey());else if(tw(e)){let{origin:t}=e;$(t)&&!c.has(t.getKey())||l.push(t)}let u=new Set;for(let e of l){let t=e.getParent();t===null||c.has(t.getKey())||u.add(t),Gx(e)}for(let e of u)!e.canBeEmpty()&&!LS(e)&&e.isEmpty()&&e.isAttached()&&e.remove();for(let e of a.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,n=t.getTextContentSize(),a=Cw(rw(t,r)),c=t.getMode();if(Math.abs(e.distance)===n&&i===`removeEmptySlices`||c===`token`&&e.distance!==0)a.remove();else if(e.distance!==0){i=`removeEmptySlices`;let t=e.removeTextSlice(),n=e.caret.origin;if(c===`segmented`){let e=t.origin,n=Sy(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());a.replaceOrInsert(n),t=iw(n,r,t.offset)}n.is(o[0].origin)&&(o[0]=t),n.is(s[0].origin)&&(s[0]=t.getFlipped())}}let d,f;for(let e of o)if(Tw(e)){d=Ew(e);break}for(let e of s)if(Tw(e)){f=Ew(e);break}let p=function(e,t,n){if(!e||!t)return null;let r=e.getParentAtCaret(),i=t.getParentAtCaret();if(!r||!i)return null;let a=r.getParents().reverse();a.push(r);let o=i.getParents().reverse();o.push(i);let s=Math.min(a.length,o.length),c;for(c=0;c<s&&a[c]===o[c];c++);let l=(e,t)=>{let n;for(let r=c;r<e.length;r++){let i=e[r];if(LS(i))return;!n&&t(i)&&(n=i)}return n},u=l(a,lC),d=u&&l(o,e=>n.has(e.getKey())&&lC(e));return d&&zC(d).length>0?null:u&&d?[u,d]:null}(d,f,c);if(p){let[e,t]=p;sw(e,`previous`).splice(0,t.getChildren());let n=t.getParent();for(t.remove(!0);n&&n.isEmpty();){let e=n;n=n.getParent(),e.remove(!0)}}else if(f){let e=function(e){if(nw(e)){let t=e.origin;if(lC(t))return t}else{let t=e.getParentAtCaret();if(t&&lC(t))return t}return null}(f),t=e&&e.getParent(),n=e&&e.getParents().findLast(IS);if(e&&t&&!Qb(t)&&e.isEmpty()&&c.has(e.getKey())&&zC(e).length===0&&(!n||c.has(n.getKey()))){e.remove(!0);let n=t;for(;n&&!Qb(n)&&n.isEmpty();){let e=n.getParent();if(e&&Qb(e)&&e.getChildrenSize()<=1)break;let t=n;n=e,t.remove(!0)}}}let m=[d,f,...o,...s].find(Tw);if(m)return uw(Ow(Ew(m),e.direction));Ph(269,JSON.stringify(o.map(e=>e.origin.__key)))}function Ew(e){let t=function(e){let t=e;for(;nw(t);){let e=cw(t);if(!nw(e))break;t=e}return t}(e.getLatest()),{direction:n}=t;if(Cy(t.origin))return ew(t)?t:iw(t.origin,n,n);let r=t.getAdjacentCaret();return tw(r)&&Cy(r.origin)?iw(r.origin,n,XC(n)):t}function Dw(e){return ew(e)&&e.offset!==aw(e.origin,e.direction)}function Ow(e,t){return e.direction===t?e:e.getFlipped()}function kw(e,t){return e.direction===t?e:dw(Ow(e.focus,t),Ow(e.anchor,t))}function Aw(e,t,n){let r=sw(e,`next`);for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(e===null)break;r=e}return Ow(r,n)}function $ne(e){let{origin:t,offset:n,direction:r}=e;if(n===aw(t,r))return e.getSiblingCaret();if(n===aw(t,XC(r)))return Cw(e.getSiblingCaret());let[i]=t.splitText(n);return Cy(i)||Ph(281),Ow(rw(i,`next`),r)}function ere(e,t){return!0}function jw(e,{$copyElementNode:t=RS,$splitTextPointCaretNext:n=$ne,rootMode:r=`shadowRoot`,$shouldSplit:i=ere,removeEmptyDestination:a=!1}={}){if(ew(e))return n(e);let o=e.getParentCaret(r);if(o){let{origin:n}=o;if(nw(e)){let e=Cw(o);if(a&&n.isEmpty())return n.remove(),e;if(!n.canBeEmpty()||!i(n,`first`))return e}let r=function(e){let t=[];for(let n=e.getAdjacentCaret();n;n=n.getAdjacentCaret())t.push(n.origin);return t}(e);(r.length>0||!a&&n.canBeEmpty()&&i(n,`last`))&&o.insert(t(n).splice(0,0,r))}return o}function Mw(e,t,n){let r=Ow(t,`next`);ew(r)&&(r.offset===0?r=rw(r.origin,`previous`).getFlipped():r.offset===r.origin.getTextContentSize()&&(r=rw(r.origin,`next`))),r.origin.is(e)&&(tw(r)||Ph(342,e.getKey(),e.getType()),r=Cw(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let e=r;e;e=jw(e,n))r=e;return ew(r)&&Ph(283),r.insert(e.isInline()?mx().append(e):e),Ow(rw(e.getLatest(),`next`),t.direction)}function Nw(e){return e}function Pw(e){return e}function Fw(e,t){if(!t||e===t)return e;for(let n in t)if(e[n]!==t[n])return{...e,...t};return e}function Iw(...e){let t=[];for(let n of e)if(n&&typeof n==`string`)for(let[e]of n.matchAll(/\S+/g))t.push(e);return t}function Lw(e,...t){let n=Iw(...t);n.length>0&&e.classList.add(...n)}function Rw(e,...t){let n=Iw(...t);n.length>0&&e.classList.remove(...n)}function zw(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function Bw(e){let t=uC().getElementByKey(e.getKey());if(t===null)return null;let n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function Vw(e){return Bw(Qb(e)?e:e.getParentOrThrow())}function Hw(e){let t=Vw(e);return t!==null&&t.direction===`rtl`}function Uw(e,t,n=`self`){let r=e.getStartEndPoints();if(t.isSelected(e)&&!Rx(t)&&r!==null){let[i,a]=r,o=e.isBackward(),s=i.getNode(),c=a.getNode(),l=t.is(s),u=t.is(c);if(l||u){let[r,i]=By(e),a=s.is(c),l=t.is(o?c:s),u=t.is(o?s:c),d,f=0;a?(f=r>i?i:r,d=r>i?r:i):l?(f=o?i:r,d=void 0):u&&(f=0,d=o?r:i);let p=t.__text.slice(f,d);p!==t.__text&&(n===`clone`&&(t=Ine(t)),t.__text=p)}}return t}function tre(e,t){let n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function Ww(e,t,n){let r=vw(e,n);if(Dw(r))return!1;for(;r;r=r.getParentCaret()){let e=r.getParentAtCaret();if(!e||r.getNodeAtCaret())return!1;if(t.is(e))return!0}return!1}function Gw(e,t,n=tre){if(!e)return;let r=e.getStartEndPoints(),i=!1,a=null,o=new Map;if(r){let[t,n]=r,s=kC(t.getNode(),lC);a=kC(n.getNode(),lC);let c=e.isBackward()?`previous`:`next`;i=$(a)&&!a.is(s)&&function(e,t,n){let r=e.getNode();return(!$(r)||!r.isEmpty())&&Ww(e,t,n)}(n,a,XC(c)),$(s)&&o.set(s.getKey(),s),$(a)&&!i&&o.set(a.getKey(),a)}for(let t of e.getNodes())if($(t)&&lC(t)){if(i&&t.is(a))continue;o.set(t.getKey(),t)}else if(!r){let e=kC(t,lC);$(e)&&o.set(e.getKey(),e)}for(let e of o.values()){let r=t();n(e,r),e.replace(r,!0)}}function Kw(e){let t=qw(e);return t!==null&&t.writingMode===`vertical-rl`}function qw(e){let t=e.anchor.getNode();return $(t)?Bw(t):Vw(t)}function Jw(e,t){let n=Kw(e)?!t:t;Yw(e)&&(n=!n);let r=vw(e.focus,n?`previous`:`next`);if(Dw(r))return!1;if(ew(r)&&!Dy(r.origin)&&r.origin.isUnmergeable()){let e=r.getNodeAtCaret();if(Cy(e)&&!Dy(e))return!0}for(let e of lw(r)){if(nw(e))return!e.origin.isInline();if(!$(e.origin)){if(Xb(e.origin))return!0;break}}return!1}function nre(e,t,n,r){e.modify(t?`extend`:`move`,n,r)}function Yw(e){let t=qw(e);return t!==null&&t.direction===`rtl`}function Xw(e,t,n){let r=Yw(e),i;i=Kw(e)||r?!n:n,nre(e,t,i,`character`)}function rre(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Zw(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function ire(e){let t=kC(e,e=>$(e)&&!e.isInline());return $(t)||rre(4,e.__key),t}function Qw(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function $w(e){let t=null;if(Qw(e,DragEvent)?t=e.dataTransfer:Qw(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];let n=t.types,r=n.includes(`Files`),i=n.includes(`text/html`)||n.includes(`text/plain`);return[r,Array.from(t.files),i]}function eT(e){let t=ib();if(!Q(t))return!1;let n=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let i=r[t],a=i.getKey();if(n.has(a))continue;let o=kC(i,e=>$(e)&&!e.isInline());if(o===null)continue;let s=o.getKey();o.canIndent()&&!n.has(s)&&(n.add(s),e(o))}return n.size>0}function tT(e,t){let n=[],r=Array.from(e).reverse();for(let e=r.pop();e!==void 0;e=r.pop())if(t(e))n.push(e);else if($(e))for(let t of are(e))r.push(t);return n}function are(e){return ore(sw(e,`previous`))}function ore(e){return fw({hasNext:tw,initial:e.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}function nT(e,t){let n=ib();if(Q(n)&&n.isCollapsed()){let r=kC(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getFirstChild()===r&&sre(n.anchor,r))return r.insertBefore(mx()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function rT(e,t){let n=ib();if(Q(n)&&n.isCollapsed()){let r=kC(n.anchor.getNode(),e);if(r){let e=r.getParent();if(e!==null&&e.getLastChild()===r&&cre(n.anchor,r))return r.insertAfter(mx()).selectEnd(),t&&t.preventDefault(),!0}}return!1}function sre(e,t){return Ww(e,t,`previous`)}function cre(e,t){return Ww(e,t,`next`)}var lre=Symbol.for(`preact-signals`);function iT(){if(lT>1)return void lT--;let e,t=!1;for(function(){let e=cT;for(cT=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();oT!==void 0;){let n=oT;for(oT=void 0,uT++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&gT(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(uT=0,lT--,t)throw e}var aT,oT;function sT(e){let t=aT;aT=void 0;try{return e()}finally{aT=t}}var cT,lT=0,uT=0,dT=0,fT=0;function pT(e){if(aT===void 0)return;let t=e.n;return t===void 0||t.t!==aT?(t={i:0,S:e,p:aT.s,n:void 0,t:aT,e:void 0,x:void 0,r:t},aT.s!==void 0&&(aT.s.n=t),aT.s=t,e.n=t,32&aT.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=aT.s,t.n=void 0,aT.s.n=t,aT.s=t),t):void 0}function mT(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function hT(e,t){return new mT(e,t)}function gT(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function _T(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function vT(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function yT(e,t){mT.call(this,void 0),this.x=e,this.s=void 0,this.g=fT-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function bT(e){let t=e.m;if(e.m=void 0,typeof t==`function`){lT++;let n=aT;aT=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,xT(e),t}finally{aT=n,iT()}}}function xT(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,bT(e)}function ure(e){if(aT!==this)throw Error(`Out-of-order effect`);vT(this),aT=e,this.f&=-2,8&this.f&&xT(this),iT()}function ST(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function CT(e,t){let n=new ST(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}mT.prototype.brand=lre,mT.prototype.h=function(){return!0},mT.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?sT(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},mT.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&sT(()=>{var e;(e=this.Z)==null||e.call(this)}))}},mT.prototype.subscribe=function(e){return CT(()=>{let t=this.value,n=aT;aT=void 0;try{e(t)}finally{aT=n}},{name:`sub`})},mT.prototype.valueOf=function(){return this.value},mT.prototype.toString=function(){return this.value+``},mT.prototype.toJSON=function(){return this.value},mT.prototype.peek=function(){let e=aT;aT=void 0;try{return this.value}finally{aT=e}},Object.defineProperty(mT.prototype,"value",{get(){let e=pT(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(uT>100)throw Error(`Cycle detected`);(function(e){lT!==0&&uT===0&&e.l!==dT&&(e.l=dT,cT={S:e,v:e.v,i:e.i,o:cT})})(this),this.v=e,this.i++,fT++,lT++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{iT()}}}}),yT.prototype=new mT,yT.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fT))return!0;if(this.g=fT,this.f|=1,this.i>0&&!gT(this))return this.f&=-2,!0;let e=aT;try{_T(this),aT=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return aT=e,vT(this),this.f&=-2,!0},yT.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}mT.prototype.S.call(this,e)},yT.prototype.U=function(e){if(this.t!==void 0&&(mT.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},yT.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(yT.prototype,"value",{get(){if(1&this.f)throw Error(`Cycle detected`);let e=pT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),ST.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},ST.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,bT(this),_T(this),lT++;let e=aT;return aT=this,ure.bind(this,e)},ST.prototype.N=function(){2&this.f||(this.f|=2,this.u=oT,oT=this)},ST.prototype.d=function(){this.f|=8,1&this.f||xT(this)},ST.prototype.dispose=function(){this.d()};function wT(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}function TT(e,t){let n;return hT(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}function ET(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var DT;try{DT=`0.49.0+prod.esm`}catch{}var OT=DT??`"<unknown>+source"`,kT=new Set([`__proto__`,`constructor`,`prototype`]);function AT(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)!kT.has(e)&&Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=AT(n[e],r[e]));return e}return t}var jT=0,MT=1,NT=2,PT=3,FT=4,IT=5,LT=6,RT=7;function zT(e){return e.id===jT}function BT(e){return e.id===NT}function VT(e){return function(e){return e.id===MT}(e)||ET(305,String(e.id),String(MT)),Object.assign(e,{id:NT})}var HT=new Set,UT=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:jT}}mergeConfigs(){let e=this.extension.config||{},t=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):Fw;for(let n of this.configs)e=t(e,n);return e}init(e){let t=this.state;BT(t)||ET(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:PT,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:FT,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==FT&&ET(307,String(t.id),String(IT)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:IT,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==IT&&ET(308,String(n.id),String(IT));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:LT})}(n),()=>{let e=this.state;e.id!==RT&&ET(309,String(n.id),String(RT)),this.state=function(e){return Object.assign(e,{id:IT})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==LT&&ET(310,String(t.id),String(LT)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:RT})}(t),n}getSignal(){return this._signal===void 0&&ET(311),this._signal}getInitResult(){this.extension.init===void 0&&ET(312,this.extension.name);let e=this.state;return function(e){return e.id>=FT}(e)||ET(313,String(e.id),String(FT)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=PT}(e)||ET(314,String(e.id),String(PT)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&ET(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&ET(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=RT}(e)||ET(316,String(e.id),String(RT)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||HT}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=IT})(e)||ET(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},WT={tag:sy};function GT(){let e=nS();e.isEmpty()&&e.append(mx())}var KT=Nw({config:Pw({setOptions:WT,updateOptions:WT}),init:({$initialEditorState:e=GT})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){let i=r.getInitResult();if(!i.initialized){i.initialized=!0;let{$initialEditorState:r}=i;if(nx(r))e.setEditorState(r,n);else if(typeof r==`function`)e.update(()=>{r(e)},t);else if(r&&(typeof r==`string`||typeof r==`object`)){let t=e.parseEditorState(r);e.setEditorState(t,n)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[Zb,vy,ax,Ty,fx]}),qT=Symbol.for(`@lexical/extension/LexicalBuilder`);function JT(){}function YT(e){throw e}function XT(e){return Array.isArray(e)?e:[e]}var ZT=OT,QT=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ZT,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[XT(KT)];for(let e of t)n.push(XT(e));return new e(n)}static maybeFromEditor(t){let n=t[qT];return n&&(n.PACKAGE_VERSION!==ZT&&ET(292,n.PACKAGE_VERSION,ZT),n instanceof e||ET(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&ET(294),n}constructEditor(){let{$initialEditorState:e,onError:t,onWarn:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(bx({...r,...t?{onError:e=>{t(e,i)}}:{},...n?{onWarn:e=>{n(e,i)}}:{}}),{[qT]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=JT;function t(){try{e()}finally{e=JT}}let n=Object.assign(this.constructEditor(),{dispose:t,[Symbol.dispose]:t});return e=zw(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&ET(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&ET(296);let[t]=XT(e);typeof t.name!=`string`&&ET(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&ET(298,t.name),!n){n=new UT(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&ET(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&ET(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=XT(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(BT(i))return;let a=n.extension.name;var o;zT(i)||ET(300,a,r||`[unknown]`),zT(o=i)||ET(304,String(o.id),String(jT)),i=Object.assign(o,{id:MT}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=VT(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())zT(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&ET(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let t=this.sortedExtensionReps(),n=new AbortController,r=[()=>n.abort()],i=n.signal;for(let n of t){let t=n.register(e,i);t&&r.push(t)}for(let n of t){let t=n.afterRegistration(e);t&&r.push(t)}return zw(...r)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.onWarn!==void 0&&(e.onWarn=o.onWarn),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of wT(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&ET(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&AT(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=YT,e}};function $T(e,t){let n=QT.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function eE(e){return $T(uC(),e)}var tE=class extends Yb{$config(){return this.config(`horizontalrule`,{importDOM:{hr:()=>({conversion:nE,priority:0})}})}exportDOM(){return{element:ZS().createElement(`hr`)}}createDOM(e){let t=ZS().createElement(`hr`);return Lw(t,e.theme.hr),t}getTextContent(){return`
|
||
`}isInline(){return!1}updateDOM(){return!1}};function nE(){return{node:rE()}}function rE(){return OC(tE)}function iE(e){return e instanceof tE}Date.now;function aE(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var oE;function sE(e,t){let{key:n}=t;return e&&n in e?e[n]:t.defaultValue}function cE(e){return oE&&oE.editor===e?oE:void 0}function lE(e,t){if(`cfg`in t){let{cfg:n,updater:r}=t;return[n,r(sE(e,n))]}return t}function uE(e,t){let n=t;for(let r of e){let[e,i]=lE(n,r),a=e.key;if(n===t&&sE(n,e)===i)continue;let o=n===t||n===void 0?dE(t):n;o[a]=i,n=o}return n}function dE(e){return Object.create(e||null)}function fE(e,t){return[e,t]}function pE(e,t,n,r=uC()){let i=oE,a=cE(r);try{return oE={...a,editor:r,[e]:t},n()}finally{oE=i}}function mE(e,t=()=>{}){return(n,r=uC())=>i=>{let a=cE(r),o=a&&a[e],s=uE(n,o||t(r));return s&&s!==o?pE(e,s,i,r):i()}}function hE(e,t,n,r){return Object.assign(yg(Symbol(t),{isEqual:r,parse:n}),{[e]:!0})}function gE(e){if(!Bx(e))return;let t=e;if(t.querySelector(`style`)===null)return;let n=new Map;function r(e){let t=n.get(e);if(t===void 0){t=new Set;for(let n=0;n<e.style.length;n++)t.add(e.style[n]);n.set(e,t)}return t}try{for(let e of Array.from(t.styleSheets)){let n;try{n=e.cssRules}catch{continue}for(let e of Array.from(n)){if(!Qw(e,CSSStyleRule))continue;let n;try{n=t.querySelectorAll(e.selectorText)}catch{continue}for(let t of Array.from(n)){if(!iC(t))continue;let n=r(t);for(let r=0;r<e.style.length;r++){let i=e.style[r];n.has(i)||t.style.setProperty(i,e.style.getPropertyValue(i),e.style.getPropertyPriority(i))}}}}}catch{}}var _E=`@lexical/html/DOM`,vE=Symbol.for(`@lexical/html/DOMExportContext`);function yE(e,t,n){return hE(vE,e,t,n)}var bE=yE(`isExport`,Boolean);function xE(e){let t=$T(e,_E);return t?t.output.defaults:void 0}function SE(e){let t=$T(e,_E);return t?t.output.runtime:void 0}function CE(e=uC()){let t=SE(e);return t?t.getSessionConfig():dC(e)}var wE=mE(vE,xE),TE=Symbol.for(`@lexical/html/SelectorImpl`);function EE(e,t){let n={kind:`element`,predicate:(r=t,r.length===0?iC:r.length===1?r[0]:(e,t)=>{for(let n of r)if(!n(e,t))return!1;return!0}),tags:e};var r;let i=n=>EE(e,[...t,n]);return{[TE]:n,attr:(e,t,n)=>i(kE(e,t,n)),classAll:(...e)=>i(OE(e)),classAny:(...e)=>i(function(e){let t=DE(e);return t.length===0?()=>!1:e=>{if(!iC(e))return!1;let n=e.classList;for(let e of t)if(n.contains(e))return!0;return!1}}(e)),styleAny:(e,t,n)=>i(function(e,t,n){if(typeof t==`string`)return n=>iC(n)&&n.style.getPropertyValue(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!iC(t))return!1;let a=t.style.getPropertyValue(e);if(!a)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}aE(362,JSON.stringify(e))}(e,t,n))}}function DE(e){let t=[];for(let n of e)n&&t.push(n);return t}function OE(e){let t=DE(e);return t.length===0?()=>!0:e=>{if(!iC(e))return!1;let n=e.classList;for(let e of t)if(!n.contains(e))return!1;return!0}}function kE(e,t,n){if(!0===t)return t=>iC(t)&&t.hasAttribute(e);if(typeof t==`string`)return n=>iC(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){let r=n&&n.capture,i=t;return(t,n)=>{if(!iC(t))return!1;let a=t.getAttribute(e);if(a==null)return!1;let o=a.match(i);return o!==null&&(r!==void 0&&(n[r]=o),!0)}}aE(361,JSON.stringify(e))}var AE={kind:`text`,predicate:zx,tags:new Set},jE={[TE]:AE},ME={kind:`comment`,predicate:e=>e.nodeType===8,tags:new Set},NE={[TE]:ME},PE={any:()=>EE(new Set,[]),comment:()=>NE,tag(...e){e.length>0||aE(363);let t=new Set;for(let n of e)t.add(n.toUpperCase());return EE(t,[])},text:()=>jE},FE=/[A-Za-z0-9_-]/,IE=class{constructor(e,t){this.source=e,this.pos=t}peek(e=0){return this.source[this.pos+e]||``}consume(){return this.source[this.pos++]||``}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){let e=this.pos;for(;!this.eof()&&FE.test(this.peek());)this.pos++;return this.source.slice(e,this.pos)}readQuoted(){let e=this.consume();this.assert(e===`"`||e===`'`,`expected quote`);let t=this.pos;for(;!this.eof()&&this.peek()!==e;)this.peek()===`\\`?this.pos+=2:this.pos++;this.assert(!this.eof(),`unterminated string`);let n=this.source.slice(t,this.pos);return this.pos++,n.replace(/\\(.)/g,`$1`)}assert(e,t){e||aE(364,String(this.pos+1),t,this.source)}};function LE(e){let t=new Set,n=[],r=[];if(e.skipWhitespace(),e.peek()===`*`)e.consume();else if(FE.test(e.peek())){let n=e.readIdent();n&&t.add(n.toUpperCase())}for(;!e.eof();){let t=e.peek();if(t===`.`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected class name after "."`),r.push(t)}else if(t===`#`){e.consume();let t=e.readIdent();e.assert(t!==``,`expected id after "#"`),n.push(kE(`id`,t))}else{if(t!==`[`)break;{e.consume(),e.skipWhitespace();let t=e.readIdent();e.assert(t!==``,`expected attribute name after "["`),e.skipWhitespace();let r=!0;if(e.peek()===`=`){e.consume(),e.skipWhitespace();let t=e.peek();t===`"`||t===`'`?r=e.readQuoted():(r=e.readIdent(),e.assert(r!==``,`expected attribute value`)),e.skipWhitespace()}e.assert(e.peek()===`]`,`expected "]"`),e.consume(),n.push(kE(t,r))}}}return r.length>0&&n.push(OE(r)),{predicates:n,tags:t}}function RE(e){let t=new IE(e,0),n=[];for(;;){let e=LE(t);if(n.push(e),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===`,`,`expected "," (selector lists are the only supported combinator)`),t.consume(),t.skipWhitespace()}if(n.length===1)return EE(n[0].tags,n[0].predicates);let r=new Set;if(n.every(e=>e.tags.size>0))for(let e of n)for(let t of e.tags)r.add(t);return EE(r,[(e,t)=>{for(let r of n){let n=e.nodeName;if(r.tags.size>0&&!r.tags.has(n))continue;let i=!0;for(let n of r.predicates)if(!n(e,t)){i=!1;break}if(i)return!0}return!1}])}var zE=PE;zE.tag(`b`,`strong`,`em`,`i`,`code`,`mark`,`s`,`sub`,`sup`,`u`,`span`),zE.text(),zE.tag(`script`,`style`),zE.tag(`br`),zE.tag(`p`),zE.tag(`hr`),zE.any(),Object.freeze([]),Object.freeze({}),PE.any();var BE={any:PE.any,comment:PE.comment,css:RE,tag:PE.tag,text:PE.text},VE=new Set([`STYLE`,`SCRIPT`]);function HE(e,t){gE(t);let n=Bx(t)?t.body.childNodes:t.childNodes,r=[],i=[];for(let t of n)if(!VE.has(t.nodeName)){let n=KE(t,e,i,!1);if(n!==null)for(let e of n)r.push(e)}return function(e){for(let t of e)t.getParent()&&t.getNextSibling()instanceof ix&&t.insertAfter(sx());for(let t of e){let e=t.getParent();e&&e.splice(t.getIndexWithinParent(),1,t.getChildren())}}(i),r}function UE(e,t=null,n=uC()){return wE([fE(bE,!0)],n)(()=>{let r=nS(),i=CE(n),a=Q(t)?LC(t.anchor.getNode()):null,o=e.append.bind(e);for(let e of($(a)?a:r).getChildren())GE(n,e,o,t,i);return e})}function WE(e,t=null){return(typeof document>`u`||typeof window>`u`&&global.window===void 0)&&aE(338),wne(e),UE(ZS().createElement(`div`),t,e).innerHTML}function GE(e,t,n,r=null,i=dC(e)){let a=i.$shouldInclude(t,r,e),o=i.$shouldExclude(t,r,e),s=t;r!==null&&Cy(t)&&(s=Uw(r,t,`clone`));let{element:c,after:l,append:u,$getChildNodes:d}=i.$exportDOM(s,e);if(!c)return!1;let f=ZS().createDocumentFragment(),p=d?d():$(s)?s.getChildren():[],m=a&&Iy(r)&&$(t)?null:r,h=f.append.bind(f);for(let n of p){let o=GE(e,n,h,m,i);!a&&o&&i.$extractWithChild(t,n,r,`html`,e)&&(a=!0)}if(a&&!o){if((iC(c)||oC(c))&&(u?u(f):c.append(f)),n(c),l){let e=l.call(s,c);e&&(oC(c)?c.replaceChildren(e):c.replaceWith(e))}}else n(f);return a}function KE(e,t,n,r,i=new Map,a){let o=[];if(VE.has(e.nodeName))return o;let s=null,c=function(e,t){let{nodeName:n}=e,r=t._htmlConversions.get(n.toLowerCase()),i=null;if(r!==void 0)for(let t of r){let n=t(e);n!==null&&(i===null||(i.priority||0)<=(n.priority||0))&&(i=n)}return i===null?null:i.conversion}(e,t),l=c?c(e):null,u=null;if(l!==null){u=l.after;let t=l.node;if(s=Array.isArray(t)?t[t.length-1]:t,s!==null){for(let[,e]of i)if(s=e(s,a),!s)break;s&&o.push(...Array.isArray(t)?t:[s])}l.forChild!=null&&i.set(e.nodeName,l.forChild)}let d=e.childNodes,f=[],p=(s==null||!LS(s))&&(s!=null&&$y(s)||r);for(let e=0;e<d.length;e++)f.push(...KE(d[e],t,n,p,new Map(i),s));if(u!=null&&(f=u(f)),cC(e)&&(f=qE(e,f,p?()=>{let e=new ix;return n.push(e),e}:mx)),s==null){if(f.length>0)for(let e of f)o.push(e);else cC(e)&&function(e){return e.nextSibling==null||e.previousSibling==null?!1:sC(e.nextSibling)&&sC(e.previousSibling)}(e)&&o.push(sx())}else $(s)&&s.append(...f);return o}function qE(e,t,n){let r=e.style.textAlign,i=[],a=[];for(let e=0;e<t.length;e++){let o=t[e];if($y(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),e===t.length-1||e<t.length-1&&$y(t[e+1])){let e=n();e.setFormat(r),e.append(...a),i.push(e),a=[]}}return i}function JE(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function YE(e,t){let n=e;for(let r=rw(e,t);r&&(xD(r.origin)||Dy(r.origin));r=r.getAdjacentCaret())n=r.origin;return n}function XE(e){return YE(e,`previous`)}function ZE(e){return YE(e,`next`)}function QE(e){let t=XE(e),n=ZE(e),r=t;for(;r!==null;){if(xD(r)){let e=Ix(r.getTextContent());if(e!==null)return e}if(r===n)break;r=r.getNextSibling()}let i=t.getParent();if($(i)){let e=i.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function $E(e,t){let n=null,r=null,i=e,a=t,o=e.getTextContent();for(;;){if(a===0){let e=i.getPreviousSibling();if(e===null){i=null;break}if(xD(e)||Dy(e)||cx(e)||JE(167),i=e,cx(i)){n={node:i,offset:1};break}a=Math.max(0,i.getTextContentSize()-1),o=i.getTextContent()}else a--;let e=o[a];xD(i)&&e!==` `&&(r={node:i,offset:a})}if(r!==null)return r;let s=null;if(t<e.getTextContentSize())xD(e)&&(s=e.getTextContent()[t]);else{let t=e.getNextSibling();xD(t)&&(s=t.getTextContent()[0])}if(s!==null&&s!==` `)return n;{let r=function(e,t){let n=e,r=t,i=e.getTextContent(),a=e.getTextContentSize();for(;;){if(!xD(n)||r===a){if(n=n.getNextSibling(),n===null||cx(n))return null;xD(n)&&(r=0,i=n.getTextContent(),a=n.getTextContentSize())}if(xD(n)){if(i[r]!==` `)return{node:n,offset:r};r++}}}(e,t);return r===null?n:r}}function eD(e){let t=ZE(e);return cx(t)&&JE(168),t}function tD(e){let t=[];return pb(e,{linebreak:()=>t.push(sx()),tab:()=>t.push(Ey()),text:e=>t.push(bD(e))}),t}function nD(e,t,n){if(!Number.isInteger(t)||t<=0)return!1;let r=e.getTextContent(),i=/^ +/.exec(r);if(!i)return!1;let a=Math.min(t,i[0].length),o=e.getKey(),s=n.anchor.key===o&&n.anchor.type===`text`?n.anchor.offset:null,c=n.focus.key===o&&n.focus.type===`text`?n.focus.offset:null;return e.spliceText(0,a,``),s!==null&&n.anchor.set(o,Math.max(0,s-a),`text`),c!==null&&n.focus.set(o,Math.max(0,c-a),`text`),!0}var rD=`javascript`;function iD(e,t){for(let n of e.childNodes)if(iC(n)&&n.tagName===t||iD(n,t))return!0;return!1}var aD=`data-language`,oD=`data-highlight-language`,sD=`data-theme`,cD=class extends qb{__language;__theme;__isSyntaxHighlightSupported;$config(){return this.config(`code`,{extends:qb,importDOM:{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||iD(e,`BR`))?{conversion:dD,priority:1}:null,div:()=>({conversion:fD,priority:1}),pre:()=>({conversion:dD,priority:0}),table:e=>gD(e)?{conversion:pD,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&gD(n)?{conversion:mD,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&gD(t)?{conversion:mD,priority:3}:null}}})}constructor(e=void 0,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let t=ZS().createElement(`code`);Lw(t,e.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(aD,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(oD,n));let r=this.getTheme();r&&t.setAttribute(sD,r);let i=this.getStyle();return i&&uy(t.style,i),t}updateDOM(e,t,n){let r=this.__language,i=e.__language;r?r!==i&&t.setAttribute(aD,r):i&&t.removeAttribute(aD);let a=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&i?a&&r?r!==i&&t.setAttribute(oD,r):t.removeAttribute(oD):a&&r&&t.setAttribute(oD,r);let o=this.__theme,s=e.__theme;o?o!==s&&t.setAttribute(sD,o):s&&t.removeAttribute(sD);let c=this.__style,l=e.__style;return c!==l&&uy(t.style,c,l),!1}exportDOM(e){let t=ZS().createElement(`pre`);Lw(t,e._config.theme.code),t.setAttribute(`spellcheck`,`false`);let n=this.getLanguage();n&&(t.setAttribute(aD,n),this.getIsSyntaxHighlightSupported()&&t.setAttribute(oD,n));let r=this.getTheme();r&&t.setAttribute(sD,r);let i=this.getStyle();return i&&uy(t.style,i),{element:t}}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,t=!0){if(!$T(uC(),`@lexical/code`)){let t=_D(e);if(t)return t}let{anchor:n,focus:r}=e,i=(n.isBefore(r)?n:r).getNode();if(Cy(i)){let e=XE(i),t=[];for(;;)if(Dy(e))t.push(Ey()),e=e.getNextSibling();else{if(!xD(e))break;{let n=0,r=e.getTextContent(),i=e.getTextContentSize();for(;n<i&&r[n]===` `;)n++;if(n!==0&&t.push(bD(` `.repeat(n))),n!==i)break;e=e.getNextSibling()}}let r=i.splitText(n.offset)[0],a=n.offset===0?0:1,o=r.getIndexWithinParent()+a,s=i.getParentOrThrow(),c=[sx(),...t];s.splice(o,0,c);let l=t[t.length-1];l?l.select():n.offset===0?r.selectPrevious():r.getNextSibling().selectNext(0,0)}if(uD(i)){let{offset:t}=e.anchor;i.splice(t,0,[sx()]),i.select(t+1,t+1)}return null}canIndent(){return!1}collapseAtStart(){let e=mx();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}};function lD(e,t){return OC(cD).setLanguage(e).setTheme(t)}function uD(e){return e instanceof cD}function dD(e){return{node:lD(e.getAttribute(aD))}}function fD(e){let t=e,n=hD(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(hD(t))return!0;t=t.parentElement}return!1}(t)?{node:n?lD():null}:{node:null}}function pD(){return{node:lD()}}function mD(){return{node:null}}function hD(e){return e.style.fontFamily.match(`monospace`)!==null}function gD(e){return e.classList.contains(`js-file-line-container`)}function _D(e){let{anchor:t}=e;if(e.isCollapsed()&&t.type===`element`){let e=t.getNode();if(uD(e)){let n=e.getChildrenSize();if(n>=2&&t.offset===n){let t=e.getLastChild();if(cx(t)&&cx(t.getPreviousSibling())){let t=mx();return e.splice(n-2,2,[]).insertAfter(t,!1),t.select(),t}}}}return null}var vD=class extends vy{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}$config(){return this.config(`code-highlight`,{extends:vy})}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let t=super.createDOM(e);return Lw(t,yD(e.theme,this.__highlightType)),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n),i=yD(n.theme,e.__highlightType),a=yD(n.theme,this.__highlightType);return i!==a&&(i&&Rw(t,i),a&&Lw(t,a)),r}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return lD()}};function yD(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function bD(e=``,t){return zS(new vD(e,t))}function xD(e){return e instanceof vD}BE.tag(`tr`,`td`),BE.tag(`pre`),BE.tag(`code`),BE.tag(`div`),BE.tag(`div`,`br`),BE.tag(`div`),BE.tag(`table`).classAll(`js-file-line-container`),BE.tag(`td`).classAll(`js-file-line`);function SD(e){if(!Q(e))return!1;let t=e.anchor.getNode(),n=uD(t)?t:t.getParent(),r=e.focus.getNode(),i=uD(r)?r:r.getParent();return uD(n)&&n.is(i)}function CD(e){let t=e.getNodes(),n=[];if(t.length===1&&uD(t[0]))return n;let r=[];for(let e=0;e<t.length;e++){let i=t[e];xD(i)||Dy(i)||cx(i)||JE(169),cx(i)?r.length>0&&(n.push(r),r=[]):r.push(i)}if(r.length>0){let t=e.isBackward()?e.anchor:e.focus,i=Oy(r[0].getKey(),0,`text`);t.is(i)||n.push(r)}return n}function wD(e,t){let n=ib();if(!Q(n)||!SD(n))return!1;let r=CD(n),i=r.length;if(i===0&&n.isCollapsed())return e===cv&&n.insertNodes([Ey()]),!0;if(i===0&&e===cv&&n.getTextContent()===`
|
||
`){let e=Ey(),t=sx(),r=n.isBackward()?`previous`:`next`;return n.insertNodes([e,t]),bw(kw(dw(iw(e,`next`,0),Ew(rw(t,`next`))),r)),!0}for(let a=0;a<i;a++){let i=r[a];if(i.length>0){let r=i[0];if(a===0&&(r=XE(r)),e===cv){let e=Ey();if(r.insertBefore(e),a===0){let t=n.isBackward()?`focus`:`anchor`,i=Oy(r.getKey(),0,`text`);n[t].is(i)&&n[t].set(e.getKey(),0,`text`)}}else Dy(r)?r.remove():t!==void 0&&xD(r)&&nD(r,t,n)}}return!0}function TD(e,t){let n=ib();if(!Q(n))return!1;let{anchor:r,focus:i}=n,a=r.offset,o=i.offset,s=r.getNode(),c=i.getNode(),l=e===$_;if(!SD(n)||!xD(s)&&!Dy(s)||!xD(c)&&!Dy(c))return!1;if(!t.altKey){if(n.isCollapsed()){let e=s.getParentOrThrow();if(l&&a===0&&s.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),t.preventDefault(),!1}else if(!l&&a===s.getTextContentSize()&&s.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),t.preventDefault(),!1}return!1}let u,d;if(s.isBefore(c)?(u=XE(s),d=ZE(c)):(u=XE(c),d=ZE(s)),u==null||d==null)return!1;let f=u.getNodesBetween(d);for(let e=0;e<f.length;e++){let t=f[e];if(!xD(t)&&!Dy(t)&&!cx(t))return!1}t.preventDefault(),t.stopPropagation();let p=l?u.getPreviousSibling():d.getNextSibling();if(!cx(p))return!0;let m=l?p.getPreviousSibling():p.getNextSibling();if(m==null)return!0;let h=(xD(m)||Dy(m)||cx(m)?l?XE(m):ZE(m):null)??m;return p.remove(),f.forEach(e=>e.remove()),e===$_?(f.forEach(e=>h.insertBefore(e)),h.insertBefore(p)):(h.insertAfter(p),h=p,f.forEach(e=>{h.insertAfter(e),h=e})),n.setTextNodeRange(s,a,c,o),!0}function ED(e,t){let n=ib();if(!Q(n))return!1;let{anchor:r,focus:i}=n,a=r.getNode(),o=i.getNode(),s=e===Q_;if(!SD(n)||!xD(a)&&!Dy(a)||!xD(o)&&!Dy(o))return!1;let c=o,l=QE(c)===`rtl`?!s:s,u=r.key,d=r.offset,f=r.type;if(l){let e=$E(c,i.offset);if(e!==null){let{node:t,offset:r}=e;cx(t)?t.selectNext(0,0):n.setTextNodeRange(t,r,t,r)}else c.getParentOrThrow().selectStart()}else eD(c).select();return t.shiftKey&&n.anchor.set(u,d,f),t.preventDefault(),t.stopPropagation(),!0}function DD(e,t,n){return zw(...n?[e.registerCommand(ev,e=>!e.altKey&&rT(uD,e),1),e.registerCommand(Y_,e=>rT(uD,e),1),e.registerCommand($_,e=>!e.altKey&&nT(uD,e),1),e.registerCommand(Z_,e=>nT(uD,e),1)]:[],e.registerCommand(ov,t=>{let n=function(e){let t=ib();if(!Q(t)||!SD(t))return null;let n=e?lv:cv,r=e?lv:sv,i=t.anchor,a=t.focus;if(i.is(a))return r;let o=CD(t);if(o.length!==1)return n;let s=o[0],c,l;s.length===0&&JE(285),t.isBackward()?(c=a,l=i):(c=i,l=a);let u=XE(s[0]),d=ZE(s[0]),f=Oy(u.getKey(),0,`text`),p=Oy(d.getKey(),d.getTextContentSize(),`text`);return c.isBefore(f)||p.isBefore(l)?n:f.isBefore(c)||l.isBefore(p)?r:n}(t.shiftKey);return n!==null&&(t.preventDefault(),e.dispatchCommand(n),!0)},1),e.registerCommand(sv,()=>!!SD(ib())&&(fb([Ey()]),!0),1),e.registerCommand(cv,()=>wD(cv),1),e.registerCommand(lv,()=>wD(lv,t),1),e.registerCommand($_,e=>{let t=ib();if(!Q(t))return!1;let{anchor:n}=t,r=n.getNode();if(!SD(t))return!1;let i=r.getParent();return t.isCollapsed()&&n.offset===0&&r.getPreviousSibling()===null&&uD(i)&&i.getPreviousSibling()===null?(e.preventDefault(),!0):TD($_,e)},1),e.registerCommand(ev,e=>{let t=ib();if(!Q(t))return!1;let{anchor:n}=t,r=n.getNode();return!!SD(t)&&(t.isCollapsed()&&n.offset===r.getTextContentSize()&&r.getNextSibling()===null&&uD(r.getParentOrThrow())&&r.getParentOrThrow().getNextSibling()===null?(e.preventDefault(),!0):TD(ev,e))},1),e.registerCommand(Q_,e=>ED(Q_,e),1),e.registerCommand(X_,e=>ED(X_,e),1))}var OD={bold:`bold`,italic:`italic`,strikeThrough:`strikethrough`,subscript:`subscript`,superscript:`superscript`,underline:`underline`},kD=Symbol.for(`@lexical/dragon/WindowState`);function AD(e,t,n){let r=function(e){let t=e[kD];return t===void 0&&(t={dispose:()=>{},editors:new Map,installs:new Set},e[kD]=t),t}(e);if(r.installs.size===0){let t=PD.bind(e);e.addEventListener(`message`,t,!0),r.dispose=()=>{e.removeEventListener(`message`,t,!0)}}if(r.installs.add(t),n){let e=r.editors.get(n)||new Set;e.add(t),r.editors.set(n,e)}return jD.bind(null,e,r,t,n)}function jD(e,t,n,r){if(r){let e=t.editors.get(r);e&&e.delete(n)&&e.size===0&&t.editors.delete(r)}t.installs.delete(n)&&t.installs.size===0&&(t.dispose(),delete e[kD])}function MD(e){return e&&e.ownerDocument.defaultView}function ND(e){let t=TT(()=>MD(e.getRootElement()),t=>e.registerRootListener(e=>{t.value=MD(e)}));return CT(()=>{let n=t.value;if(n)return AD(n,Symbol(`@lexical/dragon/editorInstall`),e)})}function PD(e){if(e.origin!==this.location.origin)return;let t=function(e){let t=e[kD];if(t===void 0)return null;let n=Fx(tC(e.document));return Nx(n)&&t.editors.has(n)?n:null}(this);if(t===null)return;let n=e.data;if(typeof n==`string`){let r;try{r=JSON.parse(n)}catch{return}if(r&&r.protocol===`nuanria_messaging`&&r.type===`request`){let n=r.payload;if(n&&n.functionId===`makeChanges`){let r=n.args;if(Array.isArray(r)){let[n,i,a,o,s,c]=r;if(![n,i,o,s].every(Number.isFinite)||typeof a!=`string`&&a!==-1)return;t.update(()=>{let t=ib();if(Q(t)){let r=t.anchor,l=r.getNode(),u=0,d=0;if(Cy(l)&&n>=0&&i>=0&&(u=n,d=n+i,t.setTextNodeRange(l,u,l,d)),typeof a!=`string`||u===d&&a===``||(t.insertRawText(a),l=r.getNode()),Cy(l)){let e=l.getTextContentSize();u=Math.min(Math.max(o,0),e),d=o<0||s<0?u:Math.min(o+s,e),t.setTextNodeRange(l,u,l,d)}if(typeof c==`string`&&s>0&&!t.isCollapsed()){let e=OD[c];e!==void 0&&t.formatText(e)}e.stopImmediatePropagation()}})}}}}}function FD(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;let a=t._selection,o=e._selection;if(i)return 1;if(!(Q(a)&&Q(o)&&o.isCollapsed()&&a.isCollapsed()))return 0;let s=function(e,t,n){let r=e._nodeMap,i=[];for(let e of t){let t=r.get(e);t!==void 0&&i.push(t)}for(let[e,t]of n){if(!t)continue;let n=r.get(e);n===void 0||Qb(n)||i.push(n)}return i}(t,n,r);if(s.length===0)return 0;if(s.length>1){let n=t._nodeMap,r=n.get(a.anchor.key),i=n.get(o.anchor.key);return r&&i&&!e._nodeMap.has(r.__key)&&Cy(r)&&r.__text.length===1&&a.anchor.offset===1?2:0}let c=s[0],l=e._nodeMap.get(c.__key);if(!Cy(l)||!Cy(c)||l.__mode!==c.__mode)return 0;let u=l.__text,d=c.__text;if(u===d)return 0;let f=a.anchor,p=o.anchor;if(f.key!==p.key||f.type!==`text`)return 0;let m=f.offset,h=p.offset,g=d.length-u.length;return g===1&&h===m-1?2:g===-1&&h===m+1?3:g===-1&&h===m?4:0}function ID(e,t,n){let r=n(),i=0,a=r,o=0,s=null;return(c,l,u,d,f,p)=>{let m=n();if(p.has(`composition-start`)&&(a=r,o=i,s=c),p.has(`historic`))return i=0,r=m,2;p.has(`composition-end`)&&s&&(r=a,i=o,c=s);let h=p.has(`paste`)||p.has(`cut`)?0:FD(c,l,d,f,e.isComposing()),g=(()=>{let n=u===null||u.editor===e,a=p.has(lne);if(!a&&n&&p.has(`history-merge`))return 0;if(h===1)return 2;if(c===null)return 1;let o=l._selection;if(!(d.size>0||f.size>0))return o===null?2:0;let s=typeof t==`number`?t:t.peek();return!1===a&&h!==0&&h===i&&m<r+s&&n||d.size===1&&function(e,t,n){let r=t._nodeMap.get(e),i=n._nodeMap.get(e),a=t._selection,o=n._selection;return!(Q(a)&&Q(o)&&a.anchor.type===`element`&&a.focus.type===`element`&&o.anchor.type===`text`&&o.focus.type===`text`||!Cy(r)||!Cy(i)||r.__parent!==i.__parent)&&JSON.stringify(t.read(()=>r.exportJSON()))===JSON.stringify(n.read(()=>i.exportJSON()))}(Array.from(d)[0],c,l)?0:1})();return r=m,i=h,g}}function LD(e,t){e.undoStack=[],e.redoStack=[],e.current=null,t&&t(e)}function RD(e,t,n,r=Date.now,i,a=null){let o=ID(e,n,r),s=()=>{i&&i(t)};return s(),zw(e.registerCommand(K_,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(i.length!==0){let a=t.current,o=i.pop();a!==null&&(r.push(a),e.dispatchCommand(bv,!0)),i.length===0&&e.dispatchCommand(xv,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(q_,()=>(function(e,t,n){let r=t.redoStack,i=t.undoStack;if(r.length!==0){let a=t.current;a!==null&&(i.push(a),e.dispatchCommand(xv,!0));let o=r.pop();r.length===0&&e.dispatchCommand(bv,!1),t.current=o||null,n&&n(t),o&&o.editor.setEditorState(o.editorState,{tag:`historic`})}}(e,t,i),!0),0),e.registerCommand(vv,()=>(LD(t,i),!1),0),e.registerCommand(yv,()=>(LD(t,i),e.dispatchCommand(bv,!1),e.dispatchCommand(xv,!1),!0),0),e.registerUpdateListener(({editorState:n,prevEditorState:r,dirtyLeaves:i,dirtyElements:c,tags:l})=>{let u=t.current,d=t.redoStack,f=t.undoStack,p=u===null?null:u.editorState;if(u!==null&&n===p)return;let m=o(r,n,u,i,c,l);if(m===1){if(d.length!==0&&(t.redoStack=[],e.dispatchCommand(bv,!1)),u!==null){f.push({...u});let t=typeof a==`number`||a===null?a:a.peek();t!==null&&f.length>t&&f.splice(0,f.length-t),e.dispatchCommand(xv,!0)}}else if(m===2)return;t.current={editor:e,editorState:n},s()}))}function zD(){return{current:null,redoStack:[],undoStack:[]}}Date.now;var BD=new Set([`http:`,`https:`,`mailto:`,`sms:`,`tel:`]),VD=class extends qb{__url;__target;__rel;__title;$config(){return this.config(`link`,{extends:qb,importDOM:{a:()=>({conversion:HD,priority:1})}})}constructor(e=``,t={},n){super(n);let{target:r=null,rel:i=null,title:a=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=a}afterCloneFrom(e){super.afterCloneFrom(e),this.__url=e.__url,this.__rel=e.__rel,this.__target=e.__target,this.__title=e.__title}createDOM(e){let t=ZS().createElement(`a`);return this.updateLinkDOM(null,t,e),Lw(t,e.theme.link),t}updateLinkDOM(e,t,n){if(rC(t)){e&&e.__url===this.__url||(t.href=this.sanitizeUrl(this.__url));for(let n of[`target`,`rel`,`title`]){let r=`__${n}`,i=this[r];e&&e[r]===i||(i?t[n]=i:t.removeAttribute(n))}}}updateDOM(e,t,n){return this.updateLinkDOM(e,t,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){let t=e;e=QD(e);try{let t=new URL(QD(e));if(!BD.has(t.protocol))return`about:blank`}catch{let e=t.replace(/[\u0000-\u001F\u007F\s]/g,``).match(/^([a-z][a-z0-9+.-]*):/i);if(e!=null&&!BD.has(`${e[1].toLowerCase()}:`))return`about:blank`}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let n=RS(this);return this.insertAfter(n,t),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,n){if(!Q(t))return!1;let r=t.anchor.getNode(),i=t.focus.getNode();return(this.is(r)||this.isParentOf(r))&&(this.is(i)||this.isParentOf(i))&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith(`mailto:`)}isWebSiteURI(){return this.__url.startsWith(`https://`)||this.__url.startsWith(`http://`)}shouldMergeAdjacentLink(e){return this.getType()===e.getType()&&this.__url===e.__url&&this.__target===e.__target&&this.__rel===e.__rel&&this.__title===e.__title}};function HD(e){let t=null;if(rC(e)){let n=e.textContent;(n!==null&&n!==``||e.children.length>0)&&(t=UD(e.getAttribute(`href`)||``,{rel:e.getAttribute(`rel`),target:e.getAttribute(`target`),title:e.getAttribute(`title`)}))}return{node:t}}function UD(e=``,t){return zS(new VD(e,t))}function WD(e){return e instanceof VD}var GD=class extends VD{__isUnlinked;constructor(e=``,t={},n){super(e,t,n),this.__isUnlinked=t.isUnlinked!==void 0&&t.isUnlinked!==null&&t.isUnlinked}afterCloneFrom(e){super.afterCloneFrom(e),this.__isUnlinked=e.__isUnlinked}$config(){return this.config(`autolink`,{extends:VD})}shouldMergeAdjacentLink(e){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?ZS().createElement(`span`):super.createDOM(e)}updateDOM(e,t,n){return super.updateDOM(e,t,n)||e.__isUnlinked!==this.__isUnlinked}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let n=KD(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,t),n}};function KD(e=``,t){return zS(new GD(e,t))}function qD(e){return e instanceof GD}var JD=O_(`TOGGLE_LINK_COMMAND`);function YD(e,t){if(e.type===`element`){let n=e.getNode();return $(n)||function(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function XD(e,t={}){let n;if(e&&typeof e==`object`){let{url:r,...i}=e;n=r,t={...i,...t}}else n=e;let{target:r,title:i}=t,a=t.rel===void 0?`noreferrer`:t.rel,o=ib();if(o===null||!Q(o)&&!Iy(o))return;if(Iy(o)){let e=o.getNodes();if(e.length===0)return;e.forEach(e=>{if(n===null){let t=kC(e,e=>!qD(e)&&WD(e));t&&(t.insertBefore(e),t.getChildren().length===0&&t.remove())}else{let t=kC(e,e=>!qD(e)&&WD(e));if(t)t.setURL(n),r!==void 0&&t.setTarget(r),a!==void 0&&t.setRel(a);else{let t=UD(n,{rel:a,target:r});e.insertBefore(t),t.append(e)}}});return}if(o.isCollapsed()&&n===null)for(let e of o.getNodes()){let t=kC(e,e=>!qD(e)&&WD(e));t!==null&&(t.getParentOrThrow().splice(t.getIndexWithinParent(),0,t.getChildren()),t.remove());return}let s=o.extract();if(n===null){let e=new Set;s.forEach(t=>{let n=kC(t,e=>!qD(e)&&WD(e));if(n!==null){let t=n.getKey();if(e.has(t))return;(function(e,t){let n=new Set(t.filter(t=>e.isParentOf(t)).map(e=>e.getKey())),r=e.getChildren(),i=r=>n.has(r.getKey())||$(r)&&t.some(t=>e.isParentOf(t)&&r.isParentOf(t)),a=r.filter(i);if(a.length===r.length)return r.forEach(t=>e.insertBefore(t)),void e.remove();let o=r.findIndex(i),s=r.findLastIndex(i),c=o===0,l=s===r.length-1;if(c)a.forEach(t=>e.insertBefore(t));else if(l)for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);else{for(let t=a.length-1;t>=0;t--)e.insertAfter(a[t]);let t=r.slice(s+1);if(t.length>0){let n=RS(e);a[a.length-1].insertAfter(n),t.forEach(e=>n.append(e))}}})(n,s),e.add(t)}});return}let c=new Set,l=e=>{c.has(e.getKey())||(c.add(e.getKey()),e.setURL(n),r!==void 0&&e.setTarget(r),a!==void 0&&e.setRel(a),i!==void 0&&e.setTitle(i))};if(s.length===1){let e=s[0],t=kC(e,WD);if(t!==null)return l(t)}(function(e){let t=ib();if(!Q(t))return e();let n=Mg(t),r=n.isBackward(),i=YD(n.anchor,r?-1:0),a=YD(n.focus,r?0:-1);if(e(),i||a){let e=ib();if(Q(e)){let t=e.clone();if(i){let e=i.getParent();e&&t.anchor.set(e.getKey(),i.getIndexWithinParent()+ +!!r,`element`)}if(a){let e=a.getParent();e&&t.focus.set(e.getKey(),a.getIndexWithinParent()+ +!r,`element`)}rS(Mg(t))}}})(()=>{let e=null;for(let t of s){if(!t.isAttached())continue;let o=kC(t,WD);if(o){l(o);continue}if($(t)){if(!t.isInline())continue;if(WD(t)){if(!(qD(t)||e!==null&&e.getParentOrThrow().isParentOf(t))){l(t),e=t;continue}for(let e of t.getChildren())t.insertBefore(e);t.remove();continue}}let s=t.getPreviousSibling();WD(s)&&s.is(e)?s.append(t):(e=UD(n,{rel:a,target:r,title:i}),t.insertAfter(e),e.append(t))}})}var ZD=/^\+?[0-9\s()-]{5,}$/;function QD(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes(`@`)?`mailto:${e}`:ZD.test(e)?`tel:${e}`:`https://${e}`}BE.tag(`a`);function $D(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function eO(e){let t=1,n=e.getParent();for(;n!=null;){if(_O(n)){let e=n.getParent();if(CO(e)){t++,n=e.getParent();continue}$D(40)}return t}return t}function tO(e){let t=e.getParent();CO(t)||$D(40);let n=t,r=t;for(;r!==null;)r=r.getParent(),CO(r)&&(n=r);return n}function nO(e){return _O(e)&&CO(e.getFirstChild())}function rO(e,t){return _O(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function iO(e){let t=ib();if(t!==null){let n=t.getNodes();if(Q(t)){let[r]=t.getStartEndPoints(),i=r.getNode(),a=i.getParent();if(LS(i)){let e=i.getFirstChild();if(e)n=e.selectStart().getNodes();else{let e=mx();i.append(e),n=e.select().getNodes()}}else if(rO(i,n)){let t=SO(e);if(LS(a)){i.replace(t);let e=gO();$(i)&&(e.setFormat(i.getFormatType()),e.setIndent(i.getIndent())),t.append(e)}else if(_O(i)){let e=i.getParentOrThrow();aO(t,e.getChildren()),e.replace(t)}return}}let r=new Set;for(let t=0;t<n.length;t++){let i=n[t];if($(i)&&i.isEmpty()&&!_O(i)&&!r.has(i.getKey())){oO(i,e);continue}let a=Ux(i)?i.getParent():_O(i)&&i.isEmpty()?i:null;for(;a!=null;){let t=a.getKey();if(CO(a)){if(!r.has(t)){let n=SO(e);aO(n,a.getChildren()),a.replace(n),r.add(t)}break}{let n=a.getParent();if(LS(n)&&!r.has(t)){r.add(t),oO(a,e);break}a=n}}}}}function aO(e,t){e.splice(e.getChildrenSize(),0,t)}function oO(e,t){if(CO(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=gO(),a;if(aO(i,e.getChildren()),CO(n)&&t===n.getListType())n.append(i),CO(r)&&t===r.getListType()&&(aO(n,r.getChildren()),r.remove()),a=n;else if(CO(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{let n=SO(t);n.append(i),e.replace(n),a=n}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());let o=ib();return Q(o)&&(a.getKey()===o.anchor.key&&o.anchor.set(i.getKey(),o.anchor.offset,`element`),a.getKey()===o.focus.key&&o.focus.set(i.getKey(),o.focus.offset,`element`)),e.remove(),a}function sO(e,t){let n=e.getLastChild(),r=t.getFirstChild();n&&r&&nO(n)&&nO(r)&&(sO(n.getFirstChild(),r.getFirstChild()),r.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function cO(e){let t=e.getListType()!==`check`,n=e.getStart();for(let r of e.getChildren())_O(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),CO(r.getFirstChild())||n++)}function lO(e){let t=new Set;if(nO(e)||t.has(e.getKey()))return;let n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(nO(r)&&nO(i)){let n=i.getFirstChild();if(CO(n)){n.append(e);let i=r.getFirstChild();CO(i)&&(aO(n,i.getChildren()),r.remove(),t.add(r.getKey()))}}else if(nO(r)){let t=r.getFirstChild();if(CO(t)){let n=t.getFirstChild();n!==null&&n.insertBefore(e)}}else if(nO(i)){let t=i.getFirstChild();CO(t)&&t.append(e)}else if(CO(n)){let t=RS(e),a=RS(n);t.append(a),a.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function uO(e){if(nO(e))return;let t=e.getParent(),n=t?t.getParent():void 0;if(CO(n?n.getParent():void 0)&&_O(n)&&CO(t)){let r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{let r=RS(e),i=RS(t);r.append(i),e.getPreviousSiblings().forEach(e=>i.append(e));let a=RS(e),o=RS(t);a.append(o),aO(o,e.getNextSiblings()),n.insertBefore(r),n.insertAfter(a),n.replace(e)}}}function dO(e=!1){let t=ib();if(!Q(t)||!t.isCollapsed())return!1;let n=t.anchor.getNode(),r=null;if(_O(n)&&n.getChildrenSize()===0)r=n;else if(Cy(n)){let e=n.getParent();_O(e)&&e.getChildren().every(e=>Cy(e)&&e.getTextContent().trim()===``)&&(r=e)}if(r===null)return!1;let i=tO(r),a=r.getParent();CO(a)||$D(40);let o=a.getParent(),s;if(LS(o))s=mx(),i.insertAfter(s);else{if(!_O(o))return!1;s=RS(o),o.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=e?function(e,t){return e.getStart()+t.getIndexWithinParent()}(a,r):1,n=RS(a).setStart(t);if(_O(s)){let e=RS(s);e.append(n),s.insertAfter(e)}else s.insertAfter(n);n.append(...c)}return function(e){let t=e;for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!_O(e)&&!CO(e))break;t=e}t.remove()}(r),!0}var fO=class extends qb{__value;__checked;$config(){return this.config(`listitem`,{$transform:e=>{let t=e.getParent();if(CO(t))t.getListType()!==`check`&&e.getChecked()!=null&&e.setChecked(void 0);else if(t){let n=e.createParentElementNode();CO(n)||$D(340);let r=[e];for(let t of[`previous`,`next`]){r.reverse();for(let{origin:n}of rw(e,t)){if(!_O(n))break;r.push(n)}}e.insertBefore(n),n.splice(0,0,r),LS(t)||(Mw(n,Cw(rw(n,`next`)),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),t.isEmpty()&&t.isAttached()&&t.remove())}},extends:qb,importDOM:ty({li:()=>({conversion:pO,priority:0})})})}constructor(e=1,t=void 0,n){super(n),this.__value=e===void 0?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=ZS().createElement(`li`);return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,n){(function(e,t){let n=t.getParent();!CO(n)||n.getListType()!==`check`||CO(t.getFirstChild())?(e.removeAttribute(`role`),e.removeAttribute(`tabIndex`),e.removeAttribute(`aria-checked`)):(e.setAttribute(`role`,`checkbox`),e.setAttribute(`tabIndex`,`-1`),e.setAttribute(`aria-checked`,t.getChecked()?`true`:`false`))})(t,this),t.value=this.__value,function(e,t,n){let r=t.list;if(!r)return;let i=r.listitem,a=r.nested&&r.nested.listitem,o=n.getParent(),s=CO(o)&&o.getListType()===`check`,c=n.getChecked(),l=n.getChildren().some(e=>CO(e)),u=[];r.listitemChecked!==void 0&&u.push(r.listitemChecked),r.listitemUnchecked!==void 0&&u.push(r.listitemUnchecked),a!==void 0&&u.push(...Iw(a)),u.length>0&&Rw(e,...u);let d=[];if(i!==void 0&&d.push(...Iw(i)),s){let e=c?r.listitemChecked:r.listitemUnchecked;e!==void 0&&d.push(e)}a!==void 0&&l&&d.push(...Iw(a)),d.length>0&&Lw(e,...d)}(t,n.theme,this);let r=e?e.__style:``,i=this.__style;r!==i&&uy(t.style,i,r),function(e,t,n){let r=t.__textStyle,i=n?n.__textStyle:``;if(n!==null&&i===r)return;let a=ly(r);for(let t in a)e.style.setProperty(`--listitem-marker-${t}`,a[t]);if(i!==``)for(let t in ly(i))t in a||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,n){let r=t;return this.updateListItemDOM(e,r,n),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),n=this.getFormatType();n&&(t.style.textAlign=n);let r=this.getDirection();return r&&(t.dir=r),nO(this)?{after(e){if(iC(e)){let t=e.previousElementSibling;if(iC(t)&&t.nodeName===`LI`){for(;e.firstChild;)t.append(e.firstChild);e.remove()}}return e},element:t}:{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let n=e[t];if($(n)&&this.canMergeWith(n)){let e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(_O(e))return super.replace(e);this.setIndent(0);let n=this.getParentOrThrow();if(!CO(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{let t=RS(n),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}let r=this.__key,i=0;if(t&&($(e)||$D(139),i=e.getChildrenSize(),e.splice(i,0,this.getChildren())),t&&$(e)){let t=ib();if(Q(t))for(let n of t.getStartEndPoints())n.key===r&&n.type===`element`&&n.set(e.getKey(),i+n.offset,`element`)}return this.remove(),n.getChildrenSize()===0&&n.remove(),e}insertAfter(e,t=!0){let n=this.getParentOrThrow();if(CO(n)||$D(39),_O(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(n.insertAfter(e,t),r.length!==0){let i=RS(n);r.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&nO(t)&&nO(n)&&(sO(t.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(e){super.resetOnCopyNodeFrom(e),e.getChecked()&&this.setChecked(!1)}insertNewAfter(e,t=!0){let n=RS(this);return this.insertAfter(n,t),n}collapseAtStart(e){if(nO(this))return!1;let t=this.getParentOrThrow();if(_O(t.getParentOrThrow()))return uO(this),!0;let n=mx().append(...this.getChildren()),r=this.getNextSiblings();if(r.length>0){let e=RS(t);e.append(...r),t.insertAfter(e)}return t.insertAfter(n),this.remove(),t.getChildrenSize()===0&&t.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e=this.getLatest(),t,n=this.getParent();return CO(n)&&(t=n.getListType()),t===`check`?!!e.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(e===null||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;_O(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e!=`number`&&$D(117),(e=Math.floor(e))>=0||$D(199);let t=this.getIndent();for(;t!==e;)t<e?(lO(this),t++):(uO(this),t--);return this}canInsertAfter(e){return _O(e)}canReplaceWith(e){return _O(e)}canMergeWith(e){return _O(e)||hx(e)}extractWithChild(e,t){if(!Q(t))return!1;let n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return SO(`bullet`)}canMergeWhenEmpty(){return!0}};function pO(e){if(e.classList.contains(`task-list-item`)){for(let t of e.children)if(t.tagName===`INPUT`)return mO(t)}if(e.classList.contains(`joplin-checkbox`)){for(let t of e.children)if(t.classList.contains(`checkbox-wrapper`)&&t.children.length>0&&t.children[0].tagName===`INPUT`)return mO(t.children[0])}let t=e.getAttribute(`aria-checked`),n=gO(t===`true`||t!==`false`&&void 0);return yC(n,e),{after:hO.bind(null,n),node:vC(n,e)}}function mO(e){if(e.getAttribute(`type`)!==`checkbox`)return{node:null};let t=gO(e.hasAttribute(`checked`));return{after:hO.bind(null,t),node:t}}function hO(e,t){let n=t[0];return t.length===1&&hx(n)&&!e.getFormatType()&&n.getFormatType()?(e.setFormat(n.getFormatType()),n.getChildren()):t}function gO(e){return zS(new fO(void 0,e))}function _O(e){return e instanceof fO}var vO=class extends qb{__tag;__start;__listType;$config(){return this.config(`list`,{$transform:e=>{(function(e){let t=e.getNextSibling();CO(t)&&e.getListType()===t.getListType()&&sO(e,t)})(e),cO(e)},extends:qb,importDOM:ty({ol:()=>({conversion:bO,priority:0}),ul:()=>({conversion:bO,priority:0})})})}constructor(e=`number`,t=1,n){super(n);let r=xO[e]||e;this.__listType=r,this.__tag=r===`number`?`ol`:`ul`,this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag=e===`number`?`ol`:`ul`,t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let n=this.__tag,r=ZS().createElement(n);return this.__start!==1&&r.setAttribute(`start`,String(this.__start)),r.__lexicalListType=this.__listType,yO(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||e.__listType!==this.__listType||(yO(t,n.theme,this),e.__start!==this.__start&&t.setAttribute(`start`,String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return iC(t)&&(this.__start!==1&&t.setAttribute(`start`,String(this.__start)),this.__listType===`check`&&t.setAttribute(`__lexicalListType`,`check`)),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,n){let r=n;for(let e=0;e<n.length;e++){let t=n[e];_O(t)||(r===n&&(r=[...n]),r[e]=this.createListItemNode().append(!$(t)||CO(t)||t.isInline()?t:Sy(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return _O(e)}createListItemNode(){return gO()}};function yO(e,t,n){let r=[],i=[],a=t.list;if(a!==void 0){let e=a[`${n.__tag}Depth`]||[],t=eO(n)-1,o=t%e.length,s=e[o],c=a[n.__tag],l,u=a.nested,d=a.checklist;if(u!==void 0&&u.list&&(l=u.list),c!==void 0&&r.push(c),d!==void 0&&n.__listType===`check`&&r.push(d),s!==void 0){r.push(...Iw(s));for(let t=0;t<e.length;t++)t!==o&&i.push(n.__tag+t)}if(l!==void 0){let e=Iw(l);t>1?r.push(...e):i.push(...e)}}i.length>0&&Rw(e,...i),r.length>0&&Lw(e,...r)}function bO(e){let t;if(function(e){return iC(e)&&e.nodeName.toLowerCase()===`ol`}(e)){let n=e.start;t=SO(`number`,n)}else t=function(e){if(e.getAttribute(`__lexicallisttype`)===`check`||e.classList.contains(`contains-task-list`)||e.getAttribute(`data-is-checklist`)===`1`)return!0;for(let t of e.childNodes)if(iC(t)&&t.hasAttribute(`aria-checked`))return!0;return!1}(e)?SO(`check`):SO(`bullet`);return vC(t,e),{after:e=>function(e,t){let n=t.createListItemNode.bind(t),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(_O(i)){r.push(i);let e=i.getChildren();e.length>1&&e.forEach(e=>{CO(e)&&r.push(n().append(e))})}else r.push(n().append(i))}return r}(e,t),node:t}}var xO={ol:`number`,ul:`bullet`};function SO(e=`number`,t=1){return zS(new vO(e,t))}function CO(e){return e instanceof vO}BE.tag(`ol`,`ul`),BE.tag(`li`),BE.tag(`li`).classAll(`task-list-item`),BE.tag(`li`).classAll(`joplin-checkbox`);var wO=O_(`INSERT_UNORDERED_LIST_COMMAND`),TO=O_(`INSERT_ORDERED_LIST_COMMAND`);function EO(e,t,n=null){let r=XS(n),i=n?JS(n):[],a=n!==null&&i.length>0;if(a&&typeof r.caretPositionFromPoint==`function`){let a=r.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&function(e,t){for(let n=e;n!==null;){if(n===t)return!0;n=DS(n)}return!1}(a.offsetNode,n))return{node:a.offsetNode,offset:a.offset}}if(a){let i=n.getRootNode();if(KS(i)){let a=i.elementFromPoint(e,t);if(a!==null&&n.contains(a)){let n=function(e,t,n,r){let i=r.createRange(),a=e=>t<e.top?e.top-t:t>e.bottom?t-e.bottom:0,o=t=>e<t.left?t.left-e:e>t.right?e-t.right:0,s=r.createTreeWalker(n,NodeFilter.SHOW_TEXT),c=null,l=1/0,u=1/0;for(let e=s.nextNode();e;e=s.nextNode()){i.selectNodeContents(e);for(let t of i.getClientRects()){let n=a(t),r=o(t);(n<l||n===l&&r<u)&&(l=n,u=r,c=e)}}if(c===null)return null;let d=0,f=1/0,p=1/0;for(let t=0;t<=c.length;t++){i.setStart(c,t),i.collapse(!0);let n=i.getBoundingClientRect(),r=a(n),o=Math.abs(e-n.left);(r<f||r===f&&o<p)&&(f=r,p=o,d=t)}return{node:c,offset:d}}(e,t,a,r);if(n!==null)return n}}}if(typeof r.caretRangeFromPoint==`function`){let n=r.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(typeof r.caretPositionFromPoint==`function`){let n=r.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}function DO(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var OO={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function kO(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy(`lexical`,{createHTML:e=>e}).createHTML(e):e}var AO=(e,t)=>{if(!Q(t))return t.insertRawText(e),!0;let n=e=>{let t=ib();Q(t)&&e(t)};return pb(e,{linebreak:()=>n(e=>e.insertParagraph()),tab:()=>n(e=>e.insertNodes([Ey()])),text:e=>n(t=>t.insertText(e))}),!0},jO={"application/x-lexical-editor":[(e,t,n)=>{try{let n=uC(),r=JSON.parse(e);if(r&&r.namespace===n._config.namespace&&Array.isArray(r.nodes))return RO(n,_re(r.nodes),t),!0}catch(e){console.error(e)}return n()}],"text/html":[(e,t,n)=>{try{let n=uC();return RO(n,HE(n,new DOMParser().parseFromString(kO(e),`text/html`)),t),!0}catch(e){return console.error(e),n()}}],"text/plain":[AO],"text/uri-list":[AO]};function MO(e,t,n,r){if(!e)return!1;let i=a=>!!e[a]&&e[a](t,n,i.bind(null,a-1),r);return i(e.length-1)}function NO(e,t,n){let r=t.getData(`text/plain`);for(let i of function(e){return Object.keys(e.$importMimeType).filter(t=>e.$importMimeType[t]!==void 0).sort((t,n)=>{let r=e.priority[t],i=e.priority[n];return r===void 0&&i===void 0?t<n?-1:+(t>n):r===void 0?1:i===void 0?-1:r-i})}(e)){let a=t.getData(i);if(a&&(i!==`text/html`||a!==r)&&MO(e.$importMimeType[i],a,n,t))return!0}return!1}var dre={$importMimeType:jO,$insertDataTransfer:(e,t)=>NO({$importMimeType:jO,priority:OO},e,t),priority:OO},fre=Nw({build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(e,n)=>NO(t,e,n),priority:t.priority}),config:Pw({$importMimeType:jO,priority:OO}),mergeConfig(e,t){let n=Fw(e,t);if(t.$importMimeType){let r={...e.$importMimeType};for(let[e,n]of Object.entries(t.$importMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$importMimeType=r}return t.priority&&(n.priority={...e.priority,...t.priority}),n},name:`@lexical/clipboard/Import`});function PO(e,t=ib()){return t??DO(166),Q(t)&&t.isCollapsed()||t.getNodes().length===0?``:WE(e,t)}function FO(e,t=ib()){return t??DO(166),Q(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(gre(e,t))}function IO(e,t,n){(function(){let e=eE(fre.name);return e?e.output:dre})().$insertDataTransfer(e,t)}var LO=`application/x-lexical-drag`;function pre(e,t){let n={editorKey:t.getKey()};e.setData(LO,JSON.stringify(n))}function mre(e,t,n){let r=e.dataTransfer;if(r===null)return!1;let i=function(e){let t=e.getData(LO);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}return(r=n)!==null&&typeof r==`object`&&`editorKey`in r&&typeof r.editorKey==`string`?n:null;var r}(r);if(i===null)return!1;let a=function(e,t){let n=EO(e.clientX,e.clientY,t.getRootElement());if(n===null)return null;let r=$x(n.node);if(r===null)return null;if(Cy(r))return iw(r,`next`,n.offset);if($(r))return Aw(r,n.offset,`next`);let i=r.getParent();return i===null?null:Aw(i,r.getIndexWithinParent()+1,`next`)}(e,t);if(a===null)return!1;let o=jw(a);if(o===null)return!1;let s=i.editorKey===t.getKey(),c=ib();if(s){if(!Q(c)||c.isCollapsed())return!1;if(function(e,t){let{anchor:n,focus:r}=kw(Sw(t),`next`);return pw(n,e)<0&&pw(e,r)<0}(a,c))return e.preventDefault(),!0;c.removeText()}if(!o.origin.isAttached())return e.preventDefault(),!0;if(n(r,bw(uw(o)),t),!s){let e=t.getRootElement(),n=e?e.ownerDocument:null,r=n?function(e,t){for(let n of YS(t)){let t=Fx(n);if(Nx(t)&&t.getKey()===e&&iC(n))return n}return null}(i.editorKey,n):null;r!==null&&r.dispatchEvent(new InputEvent(`beforeinput`,{bubbles:!0,cancelable:!0,inputType:`deleteByDrag`}))}return e.preventDefault(),!0}function hre(e,t){return mre(e,t,IO)}function RO(e,t,n){e.dispatchCommand(A_,{nodes:t,selection:n})||(n.insertNodes(t),function(e){if(Q(e)&&e.isCollapsed()){let t=e.anchor,n=null,r=vw(t,`previous`);if(r){if(ew(r))n=r.origin;else{let e=dw(r,sw(nS(),`next`).getFlipped());for(let t of e){if(Cy(t.origin)){n=t.origin;break}if($(t.origin)&&!t.origin.isInline())break}}}if(n&&Cy(n)){let t=n.getFormat(),r=n.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(n))}function zO(e,t,n,r=[]){let i=t===null||n.isSelected(t),a=$(n)&&n.excludeFromCopy(`html`),o=n;t!==null&&Cy(o)&&(o=Uw(t,o,`clone`));let s=$(o)?o.getChildren():[],c=function(e){let t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&DO(58,n.name),$(e)){let e=t.children;Array.isArray(e)||DO(59,n.name)}return t}(o);Cy(o)&&o.getTextContentSize()===0&&(i=!1);let l=i&&Iy(t)&&$(n)?null:t;for(let r=0;r<s.length;r++){let a=s[r],o=zO(e,l,a,c.children);!i&&$(n)&&o&&n.extractWithChild(a,t,`clone`)&&(i=!0)}if(i&&!a){let t=zC(o);if(t.length>0){let n={};for(let r of t){let t=BC(o,r);t===null&&DO(366,o.constructor.name,r);let i=[];zO(e,null,t,i),i.length===1&&i[0].type===t.getType()||DO(385,r,o.constructor.name,String(i.length),String(i.length>0?i[0].type:`none`)),n[r]=i[0]}c.$slots=n}}if(i&&!a)r.push(c);else if(Array.isArray(c.children))for(let e=0;e<c.children.length;e++){let t=c.children[e];r.push(t)}return i}function gre(e,t){let n=[],r=nS(),i=Q(t)?t.anchor.getNode():Iy(t)?t.getNodes()[0]??null:null,a=i===null?null:LC(i),o=($(a)?a:r).getChildren();for(let r=0;r<o.length;r++)zO(e,t,o[r],n);return{namespace:e._config.namespace,nodes:n}}function _re(e){let t=[];for(let n of e)t.push(Ene(n));return t}var BO=null;async function VO(e,t,n){if(BO!==null)return!1;if(t!==null)return new Promise((r,i)=>{e.update(()=>{r(HO(e,t,n))})});let r=e.getRootElement(),i=e._window||window,a=i.document,o=WS(i);if(r===null||o===null)return!1;let s=a.createElement(`span`);s.style.position=`fixed`,s.style.top=`-1000px`,s.append(a.createTextNode(`#`)),r.append(s);let c=a.createRange();return c.setStart(s,0),c.setEnd(s,1),o.removeAllRanges(),o.addRange(c),new Promise((t,r)=>{let o=e.registerCommand(hv,r=>(Qw(r,ClipboardEvent)&&(o(),BO!==null&&(i.clearTimeout(BO),BO=null),t(HO(e,r,n))),!0),4);BO=i.setTimeout(()=>{o(),BO=null,t(!1)},50),a.execCommand(`copy`),s.remove()})}function HO(e,t,n){if(n===void 0){let t=WS(e._window),r=ib();if(!r||r.isCollapsed()||!t)return!1;let i=$S(t,e.getRootElement()),a=i.anchorNode,o=i.focusNode;if(a!==null&&o!==null&&!Mx(e,a,o))return!1;n=UO(r)}t.preventDefault();let r=t.clipboardData;return r!==null&&(WO(r,n),!0)}var vre=[[`text/html`,PO],[`application/x-lexical-editor`,FO]];function UO(e=ib()){return function(e,t){let n={"text/plain":``};for(let[r,i]of Object.entries(e))if(i){let e=bre(i,t);e!==null&&(n[r]=e)}return n}(yre(),e)}function WO(e,t){for(let[n]of vre)t[n]===void 0&&e.setData(n,``);for(let n in t){let r=t[n];r!==void 0&&e.setData(n,r)}}function yre(e=uC()){let t=$T(e,xre.name);return t?t.output:GO}var GO={"application/x-lexical-editor":[(e,t)=>e?FO(uC(),e):t()],"text/html":[(e,t)=>e?PO(uC(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function bre(e,t){let n=r=>e[r]?e[r](t,n.bind(null,r-1)):null;return n(e.length-1)}var xre=Nw({build:(e,t,n)=>t.$exportMimeType,config:Pw({$exportMimeType:GO}),mergeConfig(e,t){let n=Fw(e,t);if(t.$exportMimeType){let r={...e.$exportMimeType};for(let[e,n]of Object.entries(t.$exportMimeType))if(n){let t=r[e];r[e]=t?[...t,...n]:n}n.$exportMimeType=r}return n},name:`@lexical/clipboard/GetClipboardData`});BE.tag(`h1`,`h2`,`h3`,`h4`,`h5`,`h6`),BE.tag(`blockquote`),BE.tag(`blockquote`),BE.tag(`p`),BE.tag(`span`);var KO=O_(`DRAG_DROP_PASTE_FILE`),qO=yg(`shadowRoot`,{parse:Boolean}),JO=class extends qb{$config(){return this.config(`quote`,{extends:qb,importDOM:{blockquote:()=>({conversion:Sre,priority:0})},stateConfigs:[{flat:!0,stateConfig:qO}]})}isShadowRoot(){return bg(this,qO)}setIsShadowRoot(e){return xg(this,qO,e)}createDOM(e){let t=ZS().createElement(`blockquote`);return Lw(t,e.theme.quote),t}updateDOM(e,t,n){return!1}exportDOM(e){let{element:t}=super.exportDOM(e);if(iC(t)){this.isEmpty()&&t.append(ZS().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}exportJSON(){return super.exportJSON()}static importJSON(e){return YO().updateFromJSON(e)}insertNewAfter(e,t){let n=mx(),r=this.getDirection();return n.setDirection(r),this.insertAfter(n,t),n}collapseAtStart(){if(this.isShadowRoot()){for(let e of this.getChildren())this.insertBefore(e);return this.remove(),!0}let e=mx();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}};function YO(e){let t=zS(new JO);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function XO(e){return e instanceof JO}var ZO=class extends qb{__tag;$config(){return this.config(`heading`,{extends:qb,importDOM:{h1:()=>({conversion:$O,priority:0}),h2:()=>({conversion:$O,priority:0}),h3:()=>({conversion:$O,priority:0}),h4:()=>({conversion:$O,priority:0}),h5:()=>({conversion:$O,priority:0}),h6:()=>({conversion:$O,priority:0}),p:e=>{let t=e.firstChild;return t!==null&&QO(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>QO(e)?{conversion:()=>({node:ek(`h1`)}),priority:3}:null}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__tag=e.__tag}constructor(e=`h1`,t){super(t),this.__tag=e}getTag(){return this.getLatest().__tag}setTag(e){let t=this.getWritable();return t.__tag=e,t}createDOM(e){let t=this.__tag,n=ZS().createElement(t),r=e.theme.heading;if(r!==void 0){let e=r[t];Lw(n,e)}return n}updateDOM(e,t,n){return e.__tag!==this.__tag}exportDOM(e){let{element:t}=super.exportDOM(e);if(iC(t)){this.isEmpty()&&t.append(ZS().createElement(`br`));let e=this.getFormatType();e&&(t.style.textAlign=e);let n=this.getDirection();n&&(t.dir=n)}return{element:t}}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,r=this.getLastDescendant(),i=!r||e&&e.anchor.key===r.getKey()&&n===r.getTextContentSize()||!e?mx():ek(this.getTag()),a=this.getDirection();if(i.setDirection(a),this.insertAfter(i,t),n===0&&!this.isEmpty()&&e){let e=mx();e.select(),this.replace(e,!0)}return i}collapseAtStart(){if(this.isEmpty()){let e=mx();this.getChildren().forEach(t=>e.append(t)),this.replace(e)}return!0}extractWithChild(){return!0}};function QO(e){return e.nodeName.toLowerCase()===`span`&&e.style.fontSize===`26pt`}function $O(e){let t=e.nodeName.toLowerCase(),n=null;return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`||(n=ek(t),_C(e,n),yC(n,e),vC(n,e)),{node:n}}function Sre(e){let t=YO();return yC(t,e),_C(e,t),vC(t,e),{node:t}}function ek(e=`h1`){return zS(new ZO(e))}function tk(e){return e instanceof ZO}function nk(e){return Xb($x(e))}function rk(e,t,n,r){let i=!1,a=null;if(e.isCollapsed()&&e.anchor.type===`text`){let t=e.anchor.getNode();if(Cy(t)){a=t;let r=e.anchor.offset,o=r===t.getTextContentSize()&&t.getNextSibling()===null,s=r===0&&t.getPreviousSibling()===null;i=n===`end`&&o||n===`start`&&s||n===`both`&&(o||s)}}let o=!1;for(let[n,s]of Object.entries(r)){if(s==null||!s[t])continue;let r=n;if(s.onlyAtBoundary){if(!(i&&a&&Cy(a)&&a.hasFormat(r)))continue;o=!0}e.hasFormat(r)&&e.toggleFormat(r)}o&&e.setStyle(``)}var Cre={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function ik(e,t){return function(e,t){if(!e.isCollapsed())return!1;let n=vw(e.focus,t),r=kC(n.origin,IS);if(!r)return!1;let i=e.focus.getNode();if(!r.is(i)&&!jS(i,r))return!1;let a=dw(n,rw(r,t));if(a.getTextSlices().some(e=>e&&e.getTextContentSize()>0))return!1;let o=dw(a.anchor.getSiblingCaret(),a.focus),s=o.anchor.origin;for(let e of o){if(!tw(e)||!e.origin.is(s.getParent()))return!1;s=e.origin}let c=r;for(let e of lw(rw(r,t))){if(!e.origin.is(c.getParent())){if(HS(e.origin)){let e=rw(c,t);return bw(dw(e,e)),!0}break}if(!IS(e.origin))break;c=e.origin}return!1}(e,t)||function(e,t){if(!e.isCollapsed()||e.anchor.type!==`element`)return!1;let n=vw(e.anchor,t).getNodeAtCaret();return!(!IS(n)||n.isInline()||(bw(uw(Ew(sw(n,t)))),0))}(e,t)}function ak(e){return Xb(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function ok(e){let t=nb();t.add(e),rS(t)}function sk(e,t){if(!e.isCollapsed())return!1;let n=e.focus,r=n.getNode(),i=t?`previous`:`next`,a=vw(n,i);if(n.type===`element`&&$(r)&&LS(r)){let e=a.getNodeAtCaret();return!(e===null||!ak(e))&&(ok(e.__key),!0)}let o=kC($(r)?r:r.getParentOrThrow(),e=>$(e)&&!e.isInline()&&LS(e.getParent()));if(o===null)return!1;let s=rw(o,i).getNodeAtCaret();if(s===null||!ak(s))return!1;if(o.getTextContentSize()===0)return ok(s.__key),!0;let c=uC().getRootElement();if(c===null)return!1;let l=WS(c.ownerDocument.defaultView);if(l===null||l.rangeCount===0)return!1;let u=l.anchorNode,d=l.anchorOffset,f=l.focusNode,p=l.focusOffset;l.modify(`move`,t?`backward`:`forward`,`line`);let m=l.anchorNode,h=l.anchorOffset;if(m===null)return ck(l,u,d,f,p),!1;let g=$x(m);return ck(l,u,d,f,p),g!==null&&(m===u&&h===d||!g.is(o)&&!jS(g,o))&&(ok(s.__key),!0)}function ck(e,t,n,r,i){t!==null&&r!==null&&e.setBaseAndExtent(t,n,r,i)}function lk(e,t){if(!e.isCollapsed())return!1;let n=e.focus.getNode(),r=kC($(n)?n:n.getParentOrThrow(),e=>$(e)&&!e.isInline());if(r===null)return!1;let i=uC(),a=i.getRootElement();if(a===null)return!1;let o=a.ownerDocument.defaultView;if(o===null)return!1;let s=!1;for(let e of r.getChildren())if($(e)&&e.isInline()){let t=i.getElementByKey(e.getKey());if(t!==null){let e=o.getComputedStyle(t).display;if(e===`inline-grid`||e===`inline-flex`){s=!0;break}}}if(!s)return!1;let c=rw(r,t?`previous`:`next`).getNodeAtCaret();if(c===null||!$(c)){if(t){let e=r.getFirstDescendant();Cy(e)?e.select(0,0):r.select(0,0)}else{let e=r.getLastDescendant();if(Cy(e)){let t=e.getTextContentSize();e.select(t,t)}else{let e=r.getChildrenSize();r.select(e,e)}}return!0}let l=i.getElementByKey(c.getKey());if(l===null)return!1;let u=WS(o);if(u===null||u.rangeCount===0)return!1;let d=u.getRangeAt(0).cloneRange();d.collapse(!0);let f=d.getBoundingClientRect(),p=l.getBoundingClientRect(),m=p.top+p.height/2;if(f.height>0){let t=EO(f.left,m,a);if(t!==null&&l.contains(t.node)){let n=a.ownerDocument.createRange();return n.setStart(t.node,t.offset),n.collapse(!0),e.applyDOMRange(n),e.dirty=!0,!0}}let h=t?c.getLastDescendant():c.getFirstDescendant();if(Cy(h)){let e=t?h.getTextContentSize():0;h.select(e,e)}else{let e=c.getChildrenSize();c.select(t?e:0,t?e:0)}return!0}function uk(e,t){let n=rw(e,t),r=n.getAdjacentCaret();r!==null&&$(r.origin)&&!r.origin.isInline()&&r.origin.isShadowRoot()?bw(uw(n)):t===`next`?e.selectNext(0,0):e.selectPrevious()}function dk(e,t,n){n.preventDefault(),n.stopPropagation();let r=e.getNodes();if(r.length===0)return!0;let i=r.map(e=>rw(e,`next`)).sort(pw),a=(t?i[0]:i[i.length-1]).origin,o=kC(a,e=>e!==a&&$(e)&&!e.isInline())??nS(),s=t?0:o.getChildrenSize();return o.select(s,s),!0}function wre(e,t=hT(Cre)){return zw(e.registerCommand(j_,()=>{let e=ib();return Iy(e)?(e.clear(),!0):(Q(e)&&rk(e,`click`,`both`,t.peek()),!1)},0),e.registerCommand(I_,e=>{let t=ib();return Q(t)?(t.deleteCharacter(e),!0):!!Iy(t)&&(t.deleteNodes(),!0)},0),e.registerCommand(H_,e=>{let t=ib();return!!Q(t)&&(t.deleteWord(e),!0)},0),e.registerCommand(U_,e=>{let t=ib();return!!Q(t)&&(t.deleteLine(e),!0)},0),e.registerCommand(z_,t=>{let n=ib();if(typeof t==`string`)n!==null&&n.insertText(t);else{if(n===null)return!1;let r=t.dataTransfer;if(r!=null)IO(r,n,e);else if(Q(n)){let e=t.data;return e&&n.insertText(e),!0}}return!0},0),e.registerCommand(V_,()=>{let e=ib();return!!Q(e)&&(e.removeText(),!0)},0),e.registerCommand(W_,e=>{let t=ib();return!(!Q(t)&&!Iy(t))&&(Ry(t,e),!0)},0),e.registerCommand(G_,e=>{let t=ib();return!(!Q(t)&&!Iy(t))&&(yne(t,e),!0)},0),e.registerCommand(dv,e=>{let t=ib();if(!Q(t)&&!Iy(t))return!1;let n=t.getNodes();for(let t of n){let n=kC(t,e=>$(e)&&!e.isInline());n!==null&&n.setFormat(e)}return!0},0),e.registerCommand(L_,e=>{let t=ib();return!!Q(t)&&(t.insertLineBreak(e),!0)},0),e.registerCommand(R_,()=>{let e=ib();return!!Q(e)&&(e.insertParagraph(),!0)},0),e.registerCommand(sv,()=>{let e=Ey(),t=ib();return Q(t)&&(e.setFormat(t.format),e.setStyle(t.style)),fb([e]),!0},0),e.registerCommand(cv,()=>eT(e=>{let t=e.getIndent();e.setIndent(t+1)}),0),e.registerCommand(lv,()=>eT(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),0),e.registerCommand($_,e=>{let t=ib();if(Iy(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),uk(n[0],`previous`),!0}else if(Q(t)&&(function(e){let t=e.focus;return t.key===`root`&&t.offset===0}(t)||!e.shiftKey&&ik(t,`previous`)||!e.shiftKey&&sk(t,!0)||!e.shiftKey&&lk(t,!0)))return e.preventDefault(),!0;return!1},0),e.registerCommand(ev,e=>{let t=ib();if(Iy(t)){let n=t.getNodes();if(n.length>0)return e.preventDefault(),uk(n[0],`next`),!0}else if(Q(t)&&(function(e){let t=e.focus;return t.key===`root`&&t.offset===nS().getChildrenSize()}(t)||!e.shiftKey&&ik(t,`next`)||!e.shiftKey&&sk(t,!1)||!e.shiftKey&&lk(t,!1)))return e.preventDefault(),!0;return!1},0),e.registerCommand(Z_,e=>{let n=ib();if(Iy(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),uk(t[0],Hw(t[0])?`next`:`previous`),!0}if(!Q(n))return!1;if(!e.shiftKey&&ik(n,Hw(n.anchor.getNode())?`next`:`previous`))return e.preventDefault(),!0;if(e.shiftKey||rk(n,`arrow`,`start`,t.peek()),Jw(n,!0)){let t=e.shiftKey;return e.preventDefault(),Xw(n,t,!0),!0}return!1},0),e.registerCommand(Y_,e=>{let n=ib();if(Iy(n)){let t=n.getNodes();if(t.length>0)return e.preventDefault(),uk(t[0],Hw(t[0])?`previous`:`next`),!0}if(!Q(n))return!1;if(!e.shiftKey&&ik(n,Hw(n.anchor.getNode())?`previous`:`next`))return e.preventDefault(),!0;if(e.shiftKey||rk(n,`arrow`,`end`,t.peek()),Jw(n,!1)){let t=e.shiftKey;return e.preventDefault(),Xw(n,t,!1),!0}return!1},0),e.registerCommand(rv,t=>{let n=ib();if(!Iy(n)&&nk(t.target))return!1;if(Q(n)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(t.offset!==0)return!1;let n=t.getNode();if(Qb(n))return!1;let r=ire(n);return r.getIndent()>0&&(r.is(n)||n.is(r.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(lv);if(Vh&&Bh)return!1}else if(!Iy(n))return!1;return t.preventDefault(),e.dispatchCommand(I_,!0)},0),e.registerCommand(av,t=>{let n=ib();return!(!Iy(n)&&nk(t.target))&&!(!Q(n)&&!Iy(n))&&(t.preventDefault(),e.dispatchCommand(I_,!1))},0),e.registerCommand(tv,n=>{let r=ib();if(Iy(r)){let e=r.getNodes();e.length===1&&Xb(e[0])&&!e[0].isInline()&&(r=e[0].selectNext())}if(!Q(r))return!1;if(rk(r,`enter`,`both`,t.peek()),n!==null){if((Vh||Uh||Kh)&&Bh)return!1;if(n.preventDefault(),n.shiftKey)return e.dispatchCommand(L_,!1)}return e.dispatchCommand(R_)},0),e.registerCommand(iv,()=>!!Q(ib())&&(e.blur(),!0),0),e.registerCommand(uv,t=>{let[,n]=$w(t);if(n.length>0){let r=t.clientX,i=t.clientY,a=EO(r,i,e.getRootElement());if(a!==null){let{offset:t,node:r}=a,i=$x(r);if(i!==null){let e=tb();if(Cy(i))e.anchor.set(i.getKey(),t,`text`),e.focus.set(i.getKey(),t,`text`);else{let t=i.getParentOrThrow().getKey(),n=i.getIndexWithinParent()+1;e.anchor.set(t,n,`element`),e.focus.set(t,n,`element`)}rS(Mg(e))}e.dispatchCommand(KO,n)}return t.preventDefault(),!0}return hre(t,e)},0),e.registerCommand(fv,t=>{let[n]=$w(t),r=ib();return!(n&&!Q(r))&&(Q(r)&&!r.isCollapsed()&&t.dataTransfer!==null&&(WO(t.dataTransfer,UO(r)),pre(t.dataTransfer,e)),!0)},0),e.registerCommand(pv,t=>{let[n]=$w(t),r=ib();if(n&&!Q(r))return!1;let i=t.clientX,a=t.clientY,o=EO(i,a,e.getRootElement());return o!==null&&Xb($x(o.node))&&t.preventDefault(),!0},0),e.registerCommand(_v,()=>{let e=ib();return yS(Q(e)&&LC(e.anchor.getNode())!==null?e:null),!0},0),e.registerCommand(hv,t=>(VO(e,Qw(t,ClipboardEvent)?t:null),!0),0),e.registerCommand(gv,t=>(async function(e,t){await VO(t,Qw(e,ClipboardEvent)?e:null),t.update(()=>{let e=ib();Q(e)?e.removeText():Iy(e)&&e.getNodes().forEach(e=>e.remove())},{tag:`cut`})}(t,e),!0),0),e.registerCommand(B_,t=>{let[,n,r]=$w(t);return n.length>0&&!r?(e.dispatchCommand(KO,n),!0):aC(t.target)&&jx(t.target)?!1:ib()!==null&&(function(e,t){e.preventDefault(),t.update(()=>{let n=ib(),r=Qw(e,InputEvent)||Qw(e,KeyboardEvent)?null:e.clipboardData;r!=null&&n!==null&&IO(r,n,t)},{tag:`paste`})}(t,e),!0)},0),e.registerCommand(nv,()=>{let e=ib();return Q(e)&&rk(e,`space`,`both`,t.peek()),!1},0),e.registerCommand(ov,()=>{let e=ib();return Q(e)&&rk(e,`tab`,`both`,t.peek()),!1},0),e.registerCommand(X_,e=>{let t=ib();if(Iy(t))return dk(t,!1,e);if(!Q(t))return!1;let{anchor:n}=t;if(n.type!==`element`||n.offset!==0)return!1;let r=n.getNode();if(!$(r))return!1;let i=r.getFirstChild();if(!Xb(i)||!i.isInline())return!1;let a=r.getKey(),o=r.selectEnd();return e.shiftKey&&o.anchor.set(a,0,`element`),e.preventDefault(),e.stopPropagation(),!0},0),e.registerCommand(Q_,e=>{let t=ib();if(Iy(t))return dk(t,!0,e);if(!Q(t))return!1;let{anchor:n,focus:r}=t,i=kC(r.getNode(),e=>$(e)&&!e.isInline());if(i===null)return!1;let a=i.getFirstChild();if(!Xb(a)||!a.isInline()||kC(n.getNode(),e=>$(e)&&!e.isInline())!==i)return!1;let o=i.getKey();return(r.type!==`element`||r.key!==o||r.offset!==0)&&(t.focus.set(o,0,`element`),e.shiftKey||t.anchor.set(o,0,`element`),e.preventDefault(),e.stopPropagation(),!0)},0))}function fk(e,t){let n={};for(let r of e){let e=t(r);e&&(n[e]?n[e].push(r):n[e]=[r])}return n}function pk(e){let t=fk(e,e=>e.type);return{element:t.element||[],multilineElement:t[`multiline-element`]||[],textFormat:t[`text-format`]||[],textMatch:t[`text-match`]||[]}}var mk=/[!-/:-@[-`{-~\s]/,hk=/\s/,gk=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,Tre=/^\s{0,3}$/;function _k(e){if(!hx(e))return!1;let t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&Cy(t)&&Tre.test(t.getTextContent())}function vk(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`).replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t)))}var yk=/^(\s*)(\d{1,})\.\s/,bk=/^(\s*)[-*+]\s/,Ere=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,xk=/^(#{1,6})\s/,Sk=/^>\s/,Ck=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,wk=/^[ \t]*`{3,}$/,Dre=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Ore=/^(?:\|)(.+)(?:\|)\s?$/;function kre(e){if(e[0]!==`|`)return!1;let{length:t}=e,n=1,r=0;for(;n<t;){let t=n;for(e[t]===` `&&t++,e[t]===`:`&&t++;e[t]===`-`;)t++;if(e[t]===`:`&&t++,e[t]===` `&&t++,e[t]!==`|`)break;r++,n=t+1}return r>0&&(n===t||n===t-1&&/\s/.test(e[n]))}var Tk=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,Ek=/^<\/[a-z_][\w-]*\s*>/i,Dk=e=>RegExp(`(?:${e.source})$`,e.flags),Ok=yg(`mdListMarker`,{parse:e=>typeof e==`string`&&/^[-*+]$/.test(e)?e:`-`,resetOnCopyNode:!0}),kk=yg(`mdCodeFence`,{parse:e=>typeof e==`string`&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),Ak=yg(`mdHardLineBreak`,{parse:e=>typeof e==`string`&&/^(\\| {2,})$/.test(e)?e:``,resetOnCopyNode:!0});function jk(e){if(e.endsWith(`\\`))return[e.slice(0,-1),`\\`];let t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function Are(e){let t=e.getChildren(),n=t.length-1,r=t[n];if(!Cy(r))return null;let i=r.getTextContent(),a=jk(i);if(a!==null){let[e,t]=a;return r.setTextContent(e),t}return/^ {2,}$/.test(i)&&function(e,t){for(let n=t-1;n>=0;n--){if(cx(e[n]))return!1;if(/\S/.test(e[n].getTextContent()))return!0}return!1}(t,n)?(r.setTextContent(``),i):null}function Mk(e){let t=sx(),n=Are(e);return n!==null&&xg(t,Ak,n),t}var Nk=e=>(t,n,r,i)=>{let a=e(r);a.append(...n),t.replace(a),i||a.select(0,0)},Pk=e=>(t,n,r,i)=>{if(tk(t))return!1;let a=t.getPreviousSibling(),o=t.getNextSibling(),s=gO(e===`check`?r[3]===`x`:void 0),c=r[0].trim()[0],l=e!==`bullet`&&e!==`check`||c!==Ok.parse(c)?void 0:c;if(CO(o)&&o.getListType()===e){l&&xg(o,Ok,l);let n=o.getFirstChild();n===null?o.append(s):n.insertBefore(s),e===`number`&&o.setStart(Number(r[2])),t.remove()}else if(CO(a)&&a.getListType()===e)l&&xg(a,Ok,l),a.append(s),t.remove();else{let n=SO(e,e===`number`?Number(r[2]):void 0);l&&xg(n,Ok,l),n.append(s),t.replace(n)}s.append(...n),i||s.select(0,0);let u=function(e){let t=e.match(/\t/g),n=e.match(/ /g),r=0;return t&&(r+=t.length),n&&(r+=Math.floor(n.length/4)),r}(r[1]);u&&s.setIndent(u)},Fk=(e,t,n,r)=>{let i=[],a=e.getChildren(),o=0;for(let s of a)if(_O(s)){if(s.getChildrenSize()===1){let e=s.getFirstChild();if(CO(e)){let a=Fk(e,t,n+1,r);a&&i.push(a);continue}}if(r&&!s.getChildren().some(e=>e.isSelected(r)))continue;let a=` `.repeat(4*n),c=e.getListType(),l=bg(e,Ok),u=c===`number`?`${e.getStart()+o}. `:c===`check`?`${l} [${s.getChecked()?`x`:` `}] `:l+` `,d=t(s);c!==`number`&&(d=d.replace(/^(\s{0,3}\d+)(\.\s)/,`$1\\$2`)),i.push(a+u+d),o++}return i.join(`
|
||
`)},Ik={dependencies:[ZO],export:(e,t)=>{if(!tk(e))return null;let n=Number(e.getTag().slice(1));return`#`.repeat(n)+` `+t(e)},regExp:xk,replace:Nk(e=>ek(`h`+e[1].length)),triggerOnEnter:!0,type:`element`},Lk={dependencies:[JO],export:(e,t)=>{if(!XO(e))return null;let n=t(e).split(`
|
||
`),r=[];for(let e of n)r.push(`> `+e);return r.join(`
|
||
`)},regExp:Sk,replace:(e,t,n,r)=>{if(r){let n=e.getPreviousSibling();if(XO(n))return n.splice(n.getChildrenSize(),0,[Mk(n),...t]),void e.remove()}let i=YO();i.append(...t),e.replace(i),r||i.select(0,0)},triggerOnEnter:!0,type:`element`},Rk={dependencies:[cD],export:e=>{if(!uD(e))return null;let t=e.getTextContent(),n=bg(e,kk);if(t.indexOf(n)>-1){let e=t.match(/`{3,}/g);if(e){let t=Math.max(...e.map(e=>e.length));n="`".repeat(t+1)}}return n+(e.getLanguage()||``)+(t?`
|
||
`+t:``)+`
|
||
`+n},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:n,startMatch:r})=>{let i=r[1],a=i.trim().length,o=e[n],s=r.index+i.length,c=o.slice(s),l=RegExp(`\`{${a},}$`);if(l.test(c)){let e=c.match(l),i=c.slice(0,c.lastIndexOf(e[0])),a=[...r];return a[2]=``,Rk.replace(t,null,a,e,[i],!0),[!0,n]}let u=RegExp(`^[ \\t]*\`{${a},}$`);for(let i=n+1;i<e.length;i++){let a=e[i];if(u.test(a)){let s=a.match(u),c=e.slice(n+1,i),l=o.slice(r[0].length);return l.length>0&&c.unshift(l),Rk.replace(t,null,r,s,c,!0),[!0,i]}}let d=e.slice(n+1),f=o.slice(r[0].length);return f.length>0&&d.unshift(f),Rk.replace(t,null,r,null,d,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:wk},regExpStart:Ck,replace:(e,t,n,r,i,a)=>{let o,s,c=n[1]?n[1].trim():"```",l=n[2]||void 0;if(!t&&i){if(i.length===1)r?(o=lD(l),s=i[0]):(o=lD(l),s=i[0].startsWith(` `)?i[0].slice(1):i[0]);else{for(o=lD(l),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(` `)&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
|
||
`)}xg(o,kk,c);let t=Sy(s);o.append(t),e.append(o)}else t&&Nk(e=>lD(e?e[2]:void 0))(e,t,n,a)},type:`multiline-element`},zk={dependencies:[vO,fO],export:(e,t,n)=>CO(e)?Fk(e,t,0,n):null,regExp:bk,replace:Pk(`bullet`),triggerOnEnter:!0,type:`element`},Bk={dependencies:[vO,fO],export:(e,t,n)=>CO(e)?Fk(e,t,0,n):null,regExp:yk,replace:Pk(`number`),triggerOnEnter:!0,type:`element`},Vk={format:[`code`],tag:"`",type:`text-format`},jre={format:[`highlight`],tag:`==`,type:`text-format`},Hk={format:[`bold`,`italic`],tag:`***`,type:`text-format`},Uk={format:[`bold`,`italic`],intraword:!1,tag:`___`,type:`text-format`},Wk={format:[`bold`],tag:`**`,type:`text-format`},Gk={format:[`bold`],intraword:!1,tag:`__`,type:`text-format`},Kk={format:[`strikethrough`],tag:`~~`,type:`text-format`},qk={format:[`italic`],tag:`*`,type:`text-format`},Jk={format:[`italic`],intraword:!1,tag:`_`,type:`text-format`},Yk={dependencies:[VD],export:(e,t,n)=>{if(!WD(e)||qD(e))return null;let r=t(e),i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,`\\$1`)),i?`[${r}](${e.getURL()} "${i}")`:`[${r}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{if(kC(e,WD))return;let[,n,r,i]=t,a=UD(r==null?void 0:vk(r),{title:i==null?void 0:vk(i)}),o=n.split(`[`).length-1,s=n.split(`]`).length-1,c=n,l=``;if(o<s)return;if(o>s){let e=n.split(`[`);l=`[`+e[0],c=e.slice(1).join(`[`)}let u=Sy(c);return u.setFormat(e.getFormat()),a.append(u),e.replace(a),l&&a.insertBefore(Sy(l)),u},trigger:`)`,type:`text-match`},Mre=[Ik,Lk,zk,Bk],Nre=[Rk],Pre=[Vk,Hk,Uk,Wk,Gk,jre,qk,Jk,Kk],Fre=[Yk],Xk=[...Mre,...Nre,...Pre,...Fre];function Ire(e,t=!1){let n=e.split(`
|
||
`),r=0,i=[];for(let e=0;e<n.length;e++){let a=n[e],o=a.trimEnd(),s=i[i.length-1],c=e<n.length-1?jk(a):null,l=s!==void 0&&jk(s)!==null;if(Dre.test(o))i.push(o);else if(r===0){{let e=o.match(Ck);if(e){r=e[1].trim().length,i.push(o);continue}}o===``||s===``||!s||xk.test(s)||xk.test(o)||Sk.test(o)||yk.test(o)||bk.test(o)||Ere.test(o)||Ore.test(o)||kre(o)||l||!t||Tk.test(o)||Ek.test(o)||Dk(Ek).test(s)||Dk(Tk).test(s)||wk.test(s)?i.push(!t&&o!==``||c!==null?a:o):i[i.length-1]=s+` `+(c===null?o:a).trimStart()}else{if(wk.test(o)&&o.trim().length>=r){r=0,i.push(o);continue}i.push(a)}}return i.join(`
|
||
`)}function Lre(e,t,n,r,i){for(let a of t){if(!a.export)continue;let t=a.export(e,e=>Zk(e,n,r,void 0,void 0,i));if(t!=null)return t}return $(e)?Zk(e,n,r,void 0,void 0,i):Xb(e)?e.getTextContent():null}function Zk(e,t,n,r,i,a=!1){let o=[],s=e.getChildren();r||=[],i||=[];t:for(let e of s){for(let s of n){if(!s.export)continue;let c=s.export(e,e=>Zk(e,t,n,r,[...i,...r],a),(e,n)=>Qk(e,n,t,r,i,a));if(c!=null){o.push(c);continue t}}cx(e)?o.push(Rre(e)):Cy(e)?o.push(Qk(e,e.getTextContent(),t,r,i,a)):$(e)?o.push(Zk(e,t,n,r,i,a)):Xb(e)&&o.push(e.getTextContent())}return o.join(``)}function Rre(e){return bg(e,Ak)+`
|
||
`}function Qk(e,t,n,r,i,a=!1){let o=e.hasFormat(`code`),s,c,l,u,d=t;if(o||(d=a?d.replace(/([*_`~])/g,`\\$1`):d.replace(/([*_`~\\])/g,`\\$1`)),o){let{fence:e,padded:n}=function(e){let t=e.match(/`+/g),n=t?Math.max(...t.map(e=>e.length)):0;return{fence:"`".repeat(n+1),padded:e.length===0||e.includes("`")||/^\s/.test(e)&&/\s$/.test(e)?` ${e} `:e}}(t);s=``,l=``,c=e+n+e,u=!1}else{let e=d.match(/^(\s*)(.*?)(\s*)$/s)||[``,``,d,``];s=e[1],c=e[2],l=e[3],u=c===``}let f=``,p=``,m=``,h=$k(e,!0),g=$k(e,!1),_=new Set;for(let t of n){let n=t.format[0],i=t.tag;n!==`code`&&tA(e,n)&&!_.has(n)&&(_.add(n),tA(h,n)&&r.find(e=>e.tag===i)||(r.push({format:n,tag:i}),f+=i))}for(let t=0;t<r.length;t++){let n=eA(e,r[t].format),a=eA(g,r[t].format);if(n&&a)continue;let o=[...r];for(;o.length>t;){let e=o.pop();i&&e&&i.find(t=>t.tag===e.tag)||(e&&typeof e.tag==`string`&&(n?a||(m+=e.tag):p+=e.tag),r.pop())}break}return u&&!e.hasFormat(`code`)?p+d:p+s+f+c+m+l}function $k(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();return Cy(n)?n:null}function eA(e,t){return Cy(e)&&e.hasFormat(t)}function tA(e,t){return!!eA(e,t)&&(t===`code`||!e||!/^\s*$/.test(e.getTextContent()))}function zre(e,t){let n=e.getTextContent(),r=t.transformersByTag["`"],i=[],a=null;if(r){let e=function(e){let t=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1},n=[],r=0;for(;r<e.length;)if(e[r]==="`"){let t=1;for(;r+t<e.length&&e[r+t]==="`";)t++;n.push({index:r,length:t}),r+=t}else r++;let i=[],a=0;for(;a<n.length;){let r=n[a];if(t(r.index)){a++;continue}let o=-1;for(let e=a+1;e<n.length;e++)if(n[e].length===r.length){o=e;break}if(o===-1){a++;continue}let s=n[o],c=e.slice(r.index+r.length,s.index);c.length>=2&&c.startsWith(` `)&&c.endsWith(` `)&&/[^ ]/.test(c)&&(c=c.slice(1,-1)),i.push({content:c,endIndex:s.index+s.length,startIndex:r.index}),a=o+1}return i}(n);for(let t of e)a||={content:t.content,endIndex:t.endIndex,startIndex:t.startIndex,tag:"`"},i.push({end:t.endIndex,start:t.startIndex})}let o=function(e,t,n=[]){let r=[],i=new Set(Object.keys(t.transformersByTag).filter(e=>e[0]!=="`").map(e=>e[0])),a=t=>{let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n%2==1},o=e=>n.some(t=>e>=t.start&&e<t.end),s=0;for(;s<e.length;){let t=e[s];if(!i.has(t)||a(s)||o(s)){s++;continue}let n=1;for(;s+n<e.length&&e[s+n]===t;)n++;let c=nA(t,e,s,n,!0),l=nA(t,e,s,n,!1);(c||l)&&r.push({active:!0,canClose:l,canOpen:c,char:t,index:s,length:n}),s+=n}return r}(n,t,i),s=o.length>0?function(e,t,n){let r={},i=0,a=null;for(;i<t.length;){let o=t[i];if(!o.active||!o.canClose||o.length===0){i++;continue}let s=`${o.char}${o.canOpen}${o.length%3}`,c=r[s]??-1,l=!1;for(let r=i-1;r>c;r--){let s=t[r];if(!s.active||!s.canOpen||s.length===0||s.char!==o.char||(s.canClose||o.canOpen)&&(s.length+o.length)%3==0&&s.length%3!=0&&o.length%3!=0)continue;let c=Math.min(s.length,o.length),u=Object.keys(n.transformersByTag).filter(e=>e[0]===s.char&&e.length<=c).sort((e,t)=>t.length-e.length)[0];if(!u)continue;l=!0;let d=u.length,f={content:e.slice(s.index+s.length,o.index),endIndex:o.index+d,startIndex:s.index+(s.length-d),tag:u};(!a||f.startIndex<a.startIndex||f.startIndex===a.startIndex&&f.endIndex>a.endIndex)&&(a=f);for(let e=r+1;e<i;e++)t[e].active=!1;s.length-=d,o.length-=d,s.active=s.length>0,o.length>0?o.index+=d:(o.active=!1,i++);break}l||(r[s]=i-1,o.canOpen||(o.active=!1),i++)}return a}(n,o,t):null,c=null,l=null;if(a&&s?s.startIndex<=a.startIndex&&s.endIndex>=a.endIndex?(c=s,l=t.transformersByTag[s.tag]):(c=a,l=r):a?(c=a,l=r):s&&(c=s,l=t.transformersByTag[s.tag]),!c||!l)return null;let u=[n.slice(c.startIndex,c.endIndex),c.tag,c.content];return u.index=c.startIndex,u.input=n,{endIndex:c.endIndex,isCodeSpan:l===r,match:u,startIndex:c.startIndex,transformer:l}}function nA(e,t,n,r,i){if(!rA(t,n,r,i))return!1;if(e===`*`)return!0;if(e===`_`){if(!rA(t,n,r,!i))return!0;let e=i?t[n-1]:t[n+r];return e!==void 0&&gk.test(e)}return!0}function rA(e,t,n,r){let i=e[t-1],a=e[t+n],[o,s]=r?[a,i]:[i,a];return o!==void 0&&!hk.test(o)&&(!gk.test(o)||s===void 0||hk.test(s)||gk.test(s))}function iA(e){return Cy(e)&&!e.hasFormat(`code`)}function aA(e,t,n){let r=zre(e,t),i=function(e,t){let n=e,r,i,a,o;for(let e of t){if(!e.replace||!e.importRegExp)continue;let t=n.getTextContent().match(e.importRegExp);if(!t)continue;let s=t.index||0,c=e.getEndIndex?e.getEndIndex(n,t):s+t[0].length;!1!==c&&(r===void 0||i===void 0||s<r&&(c>i||c<=r))&&(r=s,i=c,a=e,o=t)}return r===void 0||i===void 0||a===void 0||o===void 0?null:{endIndex:i,match:o,startIndex:r,transformer:a}}(e,n);if(r&&i&&(r.isCodeSpan?i.startIndex<=r.startIndex&&i.endIndex>=r.endIndex?r=null:i=null:r.startIndex<=i.startIndex&&r.endIndex>=i.endIndex||i.startIndex>r.endIndex?i=null:r=null),r){let i=function(e,t,n,r,i){let a=e.getTextContent(),o,s,c;if(i[0]===a?o=e:t===0?[o,s]=e.splitText(n):[c,o,s]=e.splitText(t,n),o.setTextContent(i[2]),r)for(let e of r.format)o.hasFormat(e)||o.toggleFormat(e);return{nodeAfter:s,nodeBefore:c,transformedNode:o}}(e,r.startIndex,r.endIndex,r.transformer,r.match);iA(i.nodeAfter)&&aA(i.nodeAfter,t,n),iA(i.nodeBefore)&&aA(i.nodeBefore,t,n),iA(i.transformedNode)&&aA(i.transformedNode,t,n)}else if(i){let r=function(e,t,n,r,i){let a,o,s;return t===0?[a,o]=e.splitText(n):[s,a,o]=e.splitText(t,n),r.replace?{nodeAfter:o,nodeBefore:s,transformedNode:r.replace(a,i)||void 0}:null}(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!r)return;iA(r.nodeAfter)&&aA(r.nodeAfter,t,n),iA(r.nodeBefore)&&aA(r.nodeBefore,t,n),iA(r.transformedNode)&&aA(r.transformedNode,t,n)}let a=vk(e.getTextContent());e.setTextContent(a)}function Bre(e,t,n,r=!1){let i=pk(n),a=function(e){let t={},n={},r=[];for(let i of e){let{tag:e}=i;t[e]=i;let a=e.replace(/(\*|\^|\+)/g,`\\$1`);r.push(a),n[e]=e.length===1?RegExp(e==="`"?"(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)":`(^|[^\\\\${a}])(${a})((\\\\${a})?.*?[^${a}\\s](\\\\${a})?)(${a})(?![\\\\${a}])`):RegExp(`(^|[^\\\\])(${a})((\\\\${a})?.*?[^\\s](\\\\${a})?)(${a})(?!\\\\)`)}return{fullMatchRegExpByTag:n,openTagsRegExp:RegExp(`(${r.join(`|`)})`,`g`),transformersByTag:t}}(i.textFormat),o=e.split(`
|
||
`),s=o.length;for(let e=0;e<s;e++){let n=o[e],[s,c]=Vre(o,e,i.multilineElement,t);s?e=c:Hre(n,t,i.element,a,i.textMatch,r)}let c=t.getChildren();for(let e of c)if(!r&&_k(e)&&t.getChildrenSize()>1)e.remove();else if($(e))for(let t of e.getAllTextNodes())Ure(t)}function Vre(e,t,n,r){for(let i of n){let{handleImportAfterStartMatch:n,regExpEnd:a,regExpStart:o,replace:s}=i,c=e[t].match(o);if(!c)continue;if(n){let a=n({lines:e,rootNode:r,startLineIndex:t,startMatch:c,transformer:i});if(a===null)continue;if(a)return a}let l=typeof a==`object`&&`regExp`in a?a.regExp:a,u=a&&typeof a==`object`&&`optional`in a?a.optional:!a,d=t,f=e.length;for(;d<f;){let n=l?e[d].match(l):null;if(!n&&(!u||u&&d<f-1)){d++;continue}if(n&&t===d&&n.index===c.index){d++;continue}let i=[];if(n&&t===d)i.push(e[t].slice(c[0].length,-n[0].length));else for(let r=t;r<=d;r++)if(r===t){let t=e[r].slice(c[0].length);i.push(t)}else if(r===d&&n){let t=e[r].slice(0,-n[0].length);i.push(t)}else i.push(e[r]);if(!1!==s(r,null,c,n,i,!0))return[!0,d];break}}return[!1,t]}function Hre(e,t,n,r,i,a){let o=Sy(e),s=mx();s.append(o),t.append(s);for(let{regExp:t,replace:r}of n){let n=e.match(t);if(n&&(o.setTextContent(e.slice(n[0].length)),!1!==r(s,[o],n,!0)))break}if(aA(o,r,i),s.getParent()!==null&&e.length>0){let e=s.getPreviousSibling();if(!a&&(hx(e)||XO(e)||CO(e))){let t=e;if(CO(e)){let n=e.getLastDescendant();t=n==null?null:kC(n,_O)}t!=null&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[Mk(t),...s.getChildren()]),s.remove())}}}function Ure(e){let t=new Set,n=e.getTextContent(),r=n.indexOf(` `);for(;r!==-1;)t.add(r),t.add(r+1),r=n.indexOf(` `,r+1);e.splitText(...t).forEach(e=>{e.getTextContent()===` `&&e.replace(Ey())})}function Wre(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function oA(e,t,n,r,i){if(!LS(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExp:o,replace:s}of r){let r=a.match(o),c=i||r&&r[0].endsWith(` `)?n:n-1;if(r&&r[0].length===c){let i=t.getNextSiblings(),[a,o]=t.splitText(n);if(!1!==s(e,o?[o,...i]:i,r,!1))return a.remove(),!0}}return!1}function sA(e,t,n,r,i){if(!LS(e.getParent())||e.getFirstChild()!==t)return!1;let a=t.getTextContent();if(!i&&a[n-1]!==` `)return!1;for(let{regExpStart:o,replace:s,regExpEnd:c}of r){if(c&&!(`optional`in c)||c&&`optional`in c&&!c.optional)continue;let r=a.match(o);if(r){let a=i||r[0].endsWith(` `)?n:n-1;if(r[0].length!==a)continue;let o=t.getNextSiblings(),[c,l]=t.splitText(n);if(!1!==s(e,l?[l,...o]:o,r,null,null,!1))return c.remove(),!0}}return!1}function Gre(e,t){let n=0,r=e.getTextContent();for(let e=0;e<t;e++)r[e]==="`"&&n++;return n%2!=0}function cA(e,t,n){let r=n.length;for(let i=t;i>=r;i--){let t=i-r;if(lA(e,t,n,0,r)&&e[t+r]!==` `)return t}return-1}function lA(e,t,n,r,i){for(let a=0;a<i;a++)if(e[t+a]!==n[r+a])return!1;return!0}function Kre(e,t=Xk){let n=pk(t),r=n.element.filter(e=>e.triggerOnEnter),i=fk(n.textFormat,({tag:e})=>e[e.length-1]),a=fk(n.textMatch,({trigger:e})=>e),o=new Set([` `]);for(let e of n.textFormat)o.add(e.tag.slice(-1));for(let e of n.textMatch)e.trigger!==void 0&&o.add(e.trigger);for(let n of t){let t=n.type;if(t===`element`||t===`text-match`||t===`multiline-element`){let t=n.dependencies;for(let n of t)e.hasNode(n)||Wre(173,n.getType())}}let s=(e,t,r)=>!!oA(e,t,r,n.element)||!!sA(e,t,r,n.multilineElement)||!!function(e,t,n){let r=e.getTextContent(),i=n[r[t-1]];if(i==null)return!1;t<r.length&&(r=r.slice(0,t));for(let t of i){if(!t.replace||!t.regExp)continue;let n=r.match(t.regExp);if(n===null)continue;let i=n.index||0,a=i+n[0].length,o;return i===0?[o]=e.splitText(a):[,o]=e.splitText(i,a),o.selectNext(0,0),t.replace(o,n),!0}return!1}(t,r,a)||!!function(e,t,n){let r=e.getTextContent(),i=t-1,a=r[i],o=n[a];if(!o)return!1;for(let t of o){let{tag:n}=t,o=n.length,s=i-o+1;if(o>1&&!lA(r,s,n,0,o)||r[s-1]===` `)continue;let c=r[i+1];if(!1===t.intraword&&c&&!mk.test(c))continue;let l=e,u=l,d=cA(r,s,n),f=u;for(;d<0&&(f=f.getPreviousSibling())&&!cx(f);)if(Cy(f)){if(f.hasFormat(`code`))continue;let e=f.getTextContent();u=f,d=cA(e,e.length,n)}if(d<0||u===l&&d+o===s)continue;let p=u.getTextContent();if(d>0&&p[d-1]===a)continue;let m=p[d-1];if(!1===t.intraword&&m&&!mk.test(m)||!t.format.includes(`code`)&&Gre(u,d))continue;let h=l.getTextContent(),g=h.slice(0,s)+h.slice(i+1);l.setTextContent(g);let _=u===l?g:p;u.setTextContent(_.slice(0,d)+_.slice(d+o));let v=ib(),y=tb();rS(y);let b=i-o*(u===l?2:1)+1;y.anchor.set(u.__key,d,`text`),y.focus.set(l.__key,b,`text`);for(let e of t.format)y.formatText(e,Qh[e]);y.anchor.set(y.focus.key,y.focus.offset,y.focus.type);for(let e of t.format)y.hasFormat(e)&&y.toggleFormat(e);return Q(v)&&(y.format=v.format),!0}return!1}(t,r,i);return zw(e.registerUpdateListener(({tags:t,dirtyLeaves:n,editorState:r,prevEditorState:i})=>{if(t.has(`collaboration`)||t.has(`historic`)||e.isComposing())return;let a=t.has(cy),c=r.read(ib),l=i.read(ib);if(!Q(l)||!Q(c)||!c.isCollapsed()||c.is(l)&&!a)return;let u=c.anchor.key,d=c.anchor.offset,f=r._nodeMap.get(u);if(Cy(f)&&n.has(u)&&(a||d===1||!(d>l.anchor.offset+1))){if(a){let e=r.read(()=>f.getTextContent())[d-1];if(!o.has(e))return}e.update(()=>{if(!iA(f))return;let e=f.getParent();e===null||uD(e)||s(e,f,c.anchor.offset)&&kS(`history-push`)})}}),e.registerCommand(tv,e=>{if(e!==null&&e.shiftKey)return!1;let t=ib();if(!Q(t)||!t.isCollapsed())return!1;let i=t.anchor.offset,a=t.anchor.getNode();if(!Cy(a)||!iA(a))return!1;let o=a.getParent();return o===null||uD(o)?!1:i===a.getTextContent().length&&!(!sA(o,a,i,n.multilineElement,!0)&&!oA(o,a,i,r,!0))&&(e!==null&&e.preventDefault(),!0)},1))}function uA(e,t=Xk,n,r=!1,i=!1){let a=r?e:Ire(e,i),o=n||nS();o.clear(),Bre(a,o,t,r),ib()!==null&&o.selectStart()}function dA(e=Xk,t,n=!1){return function(e,t=!1){let n=pk(e),r=[...n.multilineElement,...n.element],i=!t,a=n.textFormat.filter(e=>e.format.length===1).sort((e,t)=>Number(e.format.includes(`code`))-Number(t.format.includes(`code`)));return e=>{let o=[],s=(e||nS()).getChildren();for(let e=0;e<s.length;e++){let c=s[e],l=Lre(c,r,a,n.textMatch,t);l!=null&&o.push(i&&e>0&&!_k(c)&&!_k(s[e-1])?`
|
||
${l}`:l)}return o.join(`
|
||
`)}}(e,n)(t)}var fA=/^(\d+(?:\.\d+)?)px$/,pA={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1},mA=class extends qb{__colSpan;__rowSpan;__headerState;__width;__backgroundColor;__verticalAlign;$config(){return this.config(`tablecell`,{extends:qb,importDOM:{td:()=>({conversion:gA,priority:0}),th:()=>({conversion:gA,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign,this.__colSpan=e.__colSpan,this.__headerState=e.__headerState,this.__width=e.__width}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroundColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=pA.NO_STATUS,t=1,n,r){super(r),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=n,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){let t=ZS().createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(t.style.backgroundColor=this.__backgroundColor),hA(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),Lw(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){let t=super.exportDOM(e);if(iC(t.element)){let e=t.element;e.setAttribute(`data-temporary-table-cell-lexical-key`,this.getKey()),e.style.border=`1px solid black`,this.__colSpan>1&&(e.colSpan=this.__colSpan),this.__rowSpan>1&&(e.rowSpan=this.__rowSpan),e.style.width=`${this.getWidth()||75}px`,e.style.verticalAlign=this.getVerticalAlign()||`top`,e.style.textAlign=`start`,this.__backgroundColor===null&&this.hasHeader()&&(e.style.backgroundColor=`#f2f3f5`)}return t}exportJSON(){return{...super.exportJSON(),...hA(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){let t=this.getWritable();return t.__colSpan=e,t}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){let t=this.getWritable();return t.__rowSpan=e,t}getTag(){return this.hasHeader()?`th`:`td`}setHeaderStyles(e,t=pA.BOTH){let n=this.getWritable();return n.__headerState=e&t|n.__headerState&~t,n}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){let t=this.getWritable();return t.__width=e,t}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){let t=this.getWritable();return t.__backgroundColor=e,t}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){let t=this.getWritable();return t.__verticalAlign=e||void 0,t}toggleHeaderStyle(e){let t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==pA.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}};function hA(e){return e===`middle`||e===`bottom`}function gA(e){let t=e,n=e.nodeName.toLowerCase(),r;fA.test(t.style.width)&&(r=parseFloat(t.style.width));let i=pA.NO_STATUS;if(n===`th`){let e=t.getAttribute(`scope`);if(e===`col`)i=pA.COLUMN;else if(e===`row`)i=pA.ROW;else{let e=t.parentElement,n=iC(e)&&e.nodeName.toLowerCase()===`tr`&&iC(e.parentElement)&&(e.parentElement.nodeName.toLowerCase()===`thead`||e.rowIndex===0),r=t.cellIndex===0;n&&(i|=pA.ROW),r&&(i|=pA.COLUMN),i===pA.NO_STATUS&&(i=pA.ROW)}}let a=_A(i,t.colSpan,r);a.__rowSpan=t.rowSpan;let o=t.style.backgroundColor;o!==``&&(a.__backgroundColor=o);let s=t.style.verticalAlign;hA(s)&&(a.__verticalAlign=s);let c=t.style,l=(c&&c.textDecoration||``).split(` `),u=c.fontWeight===`700`||c.fontWeight===`bold`,d=l.includes(`line-through`),f=c.fontStyle===`italic`,p=l.includes(`underline`),m=c.color;return{after:e=>{let t=[],n=null,r=()=>{if(n){let e=n.getFirstChild();cx(e)&&n.getChildrenSize()===1&&e.remove()}};for(let i of e)if(PS(i)||Cy(i)||cx(i)){if(Cy(i)&&(u&&i.toggleFormat(`bold`),d&&i.toggleFormat(`strikethrough`),f&&i.toggleFormat(`italic`),p&&i.toggleFormat(`underline`),m)){let e=i.getStyle();e.includes(`color:`)||i.setStyle(e+`color: ${m};`)}n?n.append(i):(n=mx().append(i),t.push(n))}else t.push(i),r(),n=null;return r(),t.length===0&&t.push(mx()),t},node:a}}function _A(e=pA.NO_STATUS,t=1,n){return zS(new mA(e,t,n))}function vA(e){return e instanceof mA}function yA(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}var bA=class extends qb{__height;$config(){return this.config(`tablerow`,{extends:qb,importDOM:{tr:()=>({conversion:qre,priority:0})}})}afterCloneFrom(e){super.afterCloneFrom(e),this.__height=e.__height}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e=void 0,t){super(t),this.__height=e}exportJSON(){let e=this.getHeight();return{...super.exportJSON(),...e===void 0?void 0:{height:e}}}createDOM(e){let t=ZS().createElement(`tr`);return this.__height&&(t.style.height=`${this.__height}px`),Lw(t,e.theme.tableRow),t}extractWithChild(e,t,n){return n===`html`}isShadowRoot(){return!0}setHeight(e){let t=this.getWritable();return t.__height=e,t}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}};function qre(e){let t=e,n;return fA.test(t.style.height)&&(n=parseFloat(t.style.height)),{after:e=>tT(e,vA),node:xA(n)}}function xA(e){return zS(new bA(e))}function SA(e){return e instanceof bA}function Jre(e,t,n){let r=[],i=null,a=null;function o(e){let t=r[e];return t===void 0&&(r[e]=t=[]),t}let s=e.getChildren();for(let e=0;e<s.length;e++){let r=s[e];SA(r)||yA(209);let c=o(e);for(let l=r.getFirstChild(),u=0;l!=null;l=l.getNextSibling()){for(vA(l)||yA(147);c[u]!==void 0;)u++;let r={cell:l,startColumn:u,startRow:e},{__rowSpan:d,__colSpan:f}=l;for(let t=0;t<d&&!(e+t>=s.length);t++){let n=o(e+t);for(let e=0;e<f;e++)n[u+e]=r}t!==null&&i===null&&t.is(l)&&(i=r),n!==null&&a===null&&n.is(l)&&(a=r)}}return[r,i,a]}function CA(e){return iC(e)&&e.nodeName===`TABLE`}function wA(e,t){if(!t)return t;let n=CA(t)?t:t.querySelector(`table`);return CA(n)||yA(341,e.constructor.name,e.getType(),e.getKey(),t.nodeName),n}function Yre(e,t){for(let n=t,r=null;n!==null;n=n.getParent()){if(e.is(n))return r;vA(n)&&(r=n)}return null}function Xre(e,t,n){return Yre(e,$x(t,n))}function TA(e){return iC(e)&&e.nodeName===`DIV`}function EA(e,t,n){let r=e.querySelector(`:scope > colgroup`);if(!n)return void(r&&r.remove());r||(r=ZS().createElement(`colgroup`),bC(r),e.insertBefore(r,e.firstChild));let i=[];for(let e=0;e<t;e++){let t=ZS().createElement(`col`),r=n[e];r&&(t.style.width=`${r}px`),i.push(t)}r.replaceChildren(...i)}function DA(e,t,n){if(!t.theme.tableAlignment)return;let r=[],i=[];for(let e of[`center`,`right`]){let a=t.theme.tableAlignment[e];a&&(e===n?i:r).push(a)}Rw(e,...r),Lw(e,...i)}var Zre=new WeakSet;function OA(e=uC()){return Zre.has(e)}function kA(e=uC()){let t=$T(e,`@lexical/table/Table`);return!!t&&t.output.hasStickyScrollbar.peek()&&t.output.hasHorizontalScroll.peek()}var AA=class extends qb{__rowStriping=!1;__frozenColumnCount=0;__frozenRowCount=0;__colWidths=void 0;$config(){return this.config(`table`,{extends:qb,importDOM:{table:()=>({conversion:Qre,priority:1})}})}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){let t=this.getWritable();return t.__colWidths=e,t}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,t,n){return n===`html`}getDOMSlot(e){let t=CA(e)?e:e.querySelector(`table`);return CA(t)||yA(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector(`:scope > colgroup`))}createDOM(e,t){let n=ZS().createElement(`table`);if(this.__style&&uy(n.style,this.__style),this.getColWidths()){let e=ZS().createElement(`colgroup`);n.appendChild(e),bC(e)}if(Lw(n,e.theme.table),this.updateTableElement(null,n,e),OA(t)){let r=kA(t),i=function(e,t,n){let r=ZS().createElement(`div`),i=t.theme.tableScrollableWrapper;return i?Lw(r,i):r.style.overflowX=`auto`,n&&(r.style.scrollbarWidth=`none`),r.appendChild(e),r}(n,e,r);if(this.updateTableWrapper(null,i,n,e),r){let t=function(e){let t=ZS(),n=t.createElement(`div`),r=e.theme.tableStickyScrollbar;r?Lw(n,r):(n.style.position=`sticky`,n.style.bottom=`0`,n.style.overflowX=`scroll`,n.style.overflowY=`hidden`),n.style.display=`none`,n.setAttribute(`aria-hidden`,`true`),n.tabIndex=-1;let i=t.createElement(`div`);return i.style.height=`1px`,i.style.width=`0px`,n.appendChild(i),n}(e),n=ZS().createElement(`div`);return n.setAttribute(`data-lexical-sticky-scrollbar`,`true`),n.appendChild(i),n.appendChild(t),bC(t),n}return i}return n}updateTableWrapper(e,t,n,r){this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&function(e,t,n,r){r>0?(Lw(e,n.theme.tableFrozenColumn),t.setAttribute(`data-lexical-frozen-column`,`true`)):(Rw(e,n.theme.tableFrozenColumn),t.removeAttribute(`data-lexical-frozen-column`))}(t,n,r,this.__frozenColumnCount),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&function(e,t,n,r){r>0?(Lw(e,n.theme.tableFrozenRow),t.setAttribute(`data-lexical-frozen-row`,`true`)):(Rw(e,n.theme.tableFrozenRow),t.removeAttribute(`data-lexical-frozen-row`))}(t,n,r,this.__frozenRowCount)}updateTableElement(e,t,n){this.__style!==(e?e.__style:``)&&uy(t.style,this.__style,e?e.__style:``),this.__rowStriping!==(!!e&&e.__rowStriping)&&function(e,t,n){n?(Lw(e,t.theme.tableRowStriping),e.setAttribute(`data-lexical-row-striping`,`true`)):(Rw(e,t.theme.tableRowStriping),e.removeAttribute(`data-lexical-row-striping`))}(t,n,this.__rowStriping);let r=e?e.getColumnCount():0,i=e?e.__colWidths:void 0;this.getColumnCount()===r&&this.getColWidths()===i||EA(t,this.getColumnCount(),this.getColWidths()),DA(t,n,this.getFormatType())}updateDOM(e,t,n){let r=wA(this,t);if(t===r===OA())return!0;if(TA(t)){if(t.hasAttribute(`data-lexical-sticky-scrollbar`)!==kA())return!0;let i=r.parentElement;TA(i)&&this.updateTableWrapper(e,i,r,n)}return this.updateTableElement(e,r,n),!1}scaleDOMColWidths(e,t){let n=this.getColWidths();n&&EA(wA(this,e),this.getColumnCount(),n.map(e=>e*t))}exportDOM(e){let t=super.exportDOM(e),{element:n}=t;return{after:n=>{if(t.after&&(n=t.after(n)),!CA(n)&&iC(n)&&(n=n.querySelector(`table`)),!CA(n))return null;DA(n,e._config,this.getFormatType());let[r]=Jre(this,null,null),i=new Map;for(let e of r)for(let t of e){let e=t.cell.getKey();i.has(e)||i.set(e,{colSpan:t.cell.getColSpan(),startColumn:t.startColumn})}let a=new Set;for(let e of n.querySelectorAll(`:scope > tr > [data-temporary-table-cell-lexical-key]`)){let t=e.getAttribute(`data-temporary-table-cell-lexical-key`);if(t){let n=i.get(t);if(e.removeAttribute(`data-temporary-table-cell-lexical-key`),n){i.delete(t);for(let e=0;e<n.colSpan;e++)a.add(e+n.startColumn)}}}let o=n.querySelector(`:scope > colgroup`);if(o){let e=Array.from(n.querySelectorAll(`:scope > colgroup > col`)).filter((e,t)=>a.has(t));o.replaceChildren(...e)}let s=n.querySelectorAll(`:scope > tr`);if(s.length>0){let e=ZS().createElement(`tbody`);for(let t of s)e.appendChild(t);n.append(e)}return n},element:!CA(n)&&iC(n)?n.querySelector(`table`):n}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){let{rows:n,domRows:r}=t;for(let t=0;t<n;t++){let n=r[t];if(n!=null)for(let r=0;r<n.length;r++){let i=n[r];if(i==null)continue;let{elem:a}=i,o=Xre(this,a);if(o!==null&&e.is(o))return{x:r,y:t}}}throw Error(`Cell not found in table.`)}getDOMCellFromCords(e,t,n){let{domRows:r}=n,i=r[t];return i==null?null:i[e<i.length?e:i.length-1]??null}getDOMCellFromCordsOrThrow(e,t,n){let r=this.getDOMCellFromCords(e,t,n);if(!r)throw Error(`Cell not found at cords.`);return r}getCellNodeFromCords(e,t,n){let r=this.getDOMCellFromCords(e,t,n);if(r==null)return null;let i=$x(r.elem);return vA(i)?i:null}getCellNodeFromCordsOrThrow(e,t,n){let r=this.getCellNodeFromCords(e,t,n);if(!r)throw Error(`Node at cords not TableCellNode.`);return r}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){let t=this.getWritable();return t.__rowStriping=e,t}setFrozenColumns(e){let t=this.getWritable();return t.__frozenColumnCount=e,t}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){let t=this.getWritable();return t.__frozenRowCount=e,t}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){let e=this.getFirstChild();if(!SA(e))return 0;let t=0;return e.getChildren().forEach(e=>{vA(e)&&(t+=e.getColSpan())}),t}};function Qre(e){let t=jA();e.hasAttribute(`data-lexical-row-striping`)&&t.setRowStriping(!0),e.hasAttribute(`data-lexical-frozen-column`)&&t.setFrozenColumns(1),e.hasAttribute(`data-lexical-frozen-row`)&&t.setFrozenRows(1);let n=e.querySelector(`:scope > colgroup`);if(n){let e=[];for(let t of n.querySelectorAll(`:scope > col`)){let n=t.style.width||``;if(!fA.test(n)&&(n=t.getAttribute(`width`)||``,!/^\d+$/.test(n))){e=void 0;break}e.push(parseFloat(n))}e&&t.setColWidths(e)}return{after:e=>tT(e,SA),node:t}}function jA(){return zS(new AA)}function MA(e){return e instanceof AA}BE.tag(`table`),BE.tag(`tr`),BE.tag(`td`,`th`);var NA=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),PA=(e,t,{ellipsis:n=`…`}={})=>{if(e.length<=t)return e.trim();let r=[...e.slice(0,t*2)];return`${r.slice(0,t).join(``).trim()}${r.length>t||e.length>t*2?n:``}`},FA=e=>e.replace(/^\/+/,``).replace(/\/+$/,``),IA,$re=e=>(IA??=new DOMParser,IA.parseFromString(e,`text/html`).body.textContent),LA=e=>{if(/\s/.test(e))return!1;if(typeof URL.canParse==`function`)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}},RA=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}).compare,eie={text:{italic:`italic`,strikethrough:`strikethrough`},list:{nested:{listitem:`nested`}},code:`code-block`},zA={bold:{labelKey:`bold`,icon:`format_bold`,inline:!0},italic:{labelKey:`italic`,icon:`format_italic`,inline:!0},strikethrough:{labelKey:`strikethrough`,icon:`strikethrough_s`,inline:!0},code:{labelKey:`code`,icon:`code`,inline:!0},link:{labelKey:`link`,icon:`link`,inline:!0},paragraph:{labelKey:`paragraph`,icon:`format_paragraph`,inline:!1},"heading-1":{labelKey:`heading_1`,icon:`format_h1`,inline:!1},"heading-2":{labelKey:`heading_2`,icon:`format_h2`,inline:!1},"heading-3":{labelKey:`heading_3`,icon:`format_h3`,inline:!1},"heading-4":{labelKey:`heading_4`,icon:`format_h4`,inline:!1},"heading-5":{labelKey:`heading_5`,icon:`format_h5`,inline:!1},"heading-6":{labelKey:`heading_6`,icon:`format_h6`,inline:!1},"bulleted-list":{labelKey:`bulleted_list`,icon:`format_list_bulleted`,inline:!1},"numbered-list":{labelKey:`numbered_list`,icon:`format_list_numbered`,inline:!1},blockquote:{labelKey:`blockquote`,icon:`format_quote`,inline:!1},"code-block":{labelKey:`code_block`,icon:`code_blocks`,inline:!1}},BA=[`bold`,`italic`,`strikethrough`,`code`],VA=[...BA,`link`],HA=[`paragraph`,`heading-1`,`heading-2`,`heading-3`,`heading-4`,`heading-5`,`heading-6`,`bulleted-list`,`numbered-list`,`blockquote`,`code-block`],tie={"heading-1":[ZO],"heading-2":[ZO],"heading-3":[ZO],"heading-4":[ZO],"heading-5":[ZO],"heading-6":[ZO],"bulleted-list":[vO,fO],"numbered-list":[vO,fO],blockquote:[JO],"code-block":[cD,vD],link:[VD]},nie={"heading-1":[Ik],"heading-2":[Ik],"heading-3":[Ik],"heading-4":[Ik],"heading-5":[Ik],"heading-6":[Ik],"bulleted-list":[zk],"numbered-list":[Bk],blockquote:[Lk],"code-block":[Rk],code:[Vk],bold:[Wk,Gk,Hk,Uk],italic:[Jk,qk,Hk,Uk],strikethrough:[Kk],link:[Yk]},rie=[`*`,`__`,`***`,`___`],iie=e=>e.replace(/(\s+)_([^_\n]+?)\n([^_\n]+?)_(\s+)/gm,`$1_$2_
|
||
_$3_$4`).replace(/(\s+)\*\*([^*\n]+?)\n([^*\n]+?)\*\*(\s+)/gm,`$1**$2**
|
||
**$3**$4`).replace(/(\s+)~~([^~\n]+?)\n([^~\n]+?)~~(\s+)/gm,`$1~~$2~~
|
||
~~$3~~$4`).replace(/(\s+)`([^`\n]+?)\n([^`\n]+?)`(\s+)/gm,"$1`$2`\n`$3`$4"),aie=e=>{if(!e.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m))return e;let t=!1;return e.split(`
|
||
`).map(e=>/^(`{3,}|~{3,})/.test(e)?(t=!t,e):t?e:e.replace(/^(\s+)(-|\+|\*|\d+\.)/,(e,t,n)=>`${` `.repeat(t.length*2)}${n}`)).join(`
|
||
`)},UA=class{#e;#t;#n=``;#r=``;#i={};#a=[];constructor(e,t,{keyPath:n,autoIncrement:r,indexes:i=[]}={}){this.#e=void 0,this.#n=e,this.#r=t,this.#i={keyPath:n,autoIncrement:r},this.#a=i}async#o(e){return new Promise((t,n)=>{let r=globalThis.indexedDB.open(this.#n,e);r.onupgradeneeded=()=>{let e=r.result,t=this.#r,n=e.objectStoreNames.contains(t)?r.transaction.objectStore(t):e.createObjectStore(t,this.#i);this.#a.forEach(({name:e,keyPath:t,options:r})=>{n.indexNames.contains(e)||n.createIndex(e,t,r)})},r.onsuccess=()=>{t(r.result)},r.onerror=()=>{n(r.error)}})}async#s(){let e=!1,t=await this.#o(),{version:n,objectStoreNames:r}=t,i=this.#r;if(r.contains(i)){let n=t.transaction(i).objectStore(i);e=this.#a.some(({name:e})=>!n.indexNames.contains(e))}else e=!0;return e&&(t.close(),t=await this.#o(n+1)),t.onversionchange=()=>{t.close(),this.#e=void 0},t}async#c(e,{mode:t=`readonly`}={}){if(!this.#e){this.#t??=this.#s();try{this.#e=await this.#t}finally{this.#t=void 0}}let n=this.#e,r=this.#r,i=n.transaction(r,t),a=e(i.objectStore(r));return new Promise((e,n)=>{if(i.onerror=()=>{n(i.error)},i.onabort=()=>{n(i.error)},t===`readwrite`){let t;a&&(a.onsuccess=()=>{t=a.result}),i.oncomplete=()=>{e(t)}}else a?a.onsuccess=()=>{e(a.result)}:i.oncomplete=()=>{e(void 0)}})}async set(e,t){return this.#c(n=>n.put(t,e),{mode:`readwrite`})}async put(e){return this.#c(t=>t.put(e),{mode:`readwrite`})}async saveEntries(e){return this.#c(t=>{e.forEach(([e,n])=>{t.put(n,e)})},{mode:`readwrite`})}async get(e){return this.#c(t=>t.get(e))}async keys(){return this.#c(e=>e.getAllKeys())}async values(){return this.#c(e=>e.getAll())}async entries(){return new Promise((e,t)=>{this.#c(t=>{let n=t.openCursor(),r=[];n.onsuccess=()=>{let t=n.result;t?(r.push([t.key,t.value]),t.continue()):e(r)}}).catch(t)})}async#l({callback:e=void 0,index:t=void 0,query:n=void 0,direction:r=`next`,multiple:i=!1}){return new Promise((a,o)=>{this.#c(o=>{let s=(t?o.index(t):o).openCursor(n,r),c=[];s.onsuccess=()=>{let t=s.result;if(t){let{value:n}=t;typeof e!=`function`||e(n)?i?(c.push(n),t.continue()):a(n):t.continue()}else a(i?c:void 0)}}).catch(o)})}async find(e,{index:t,query:n}={}){return this.#l({callback:e,index:t,query:n})}async findLast(e,{index:t,query:n}={}){return this.#l({callback:e,index:t,query:n,direction:`prev`})}async filter(e,{index:t,query:n}={}){return this.#l({callback:e,index:t,query:n,multiple:!0})}async delete(e){await this.#c(t=>t.delete(e),{mode:`readwrite`})}async deleteEntries(e){await this.#c(t=>{e.forEach(e=>{t.delete(e)})},{mode:`readwrite`})}async clear(){await this.#c(e=>e.clear(),{mode:`readwrite`})}},WA=e=>{try{return JSON.parse(e)}catch{return null}},GA=class{static async set(e,t){if(t===void 0){globalThis.localStorage.removeItem(e);return}globalThis.localStorage.setItem(e,JSON.stringify(t))}static async get(e){let t=globalThis.localStorage.getItem(e);return t?WA(t):null}static async delete(e){globalThis.localStorage.removeItem(e)}static async clear(){globalThis.localStorage.clear()}static async keys(){return Object.keys(globalThis.localStorage)}static async values(){return Object.values(globalThis.localStorage).map(WA)}static async entries(){return Object.entries(globalThis.localStorage).map(([e,t])=>[e,WA(t)])}},KA=`4.4.3`,qA=[{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`]},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`]},{id:`abap`,name:`ABAP`},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`]},{id:`ada`,name:`Ada`},{id:`angular-html`,name:`Angular HTML`},{id:`angular-ts`,name:`Angular TypeScript`},{id:`apache`,name:`Apache Conf`},{id:`apex`,name:`Apex`},{id:`apl`,name:`APL`},{id:`applescript`,name:`AppleScript`},{id:`ara`,name:`Ara`},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`]},{id:`razor`,name:`ASP.NET Razor`},{id:`asm`,name:`Assembly`},{id:`astro`,name:`Astro`},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`]},{id:`ahk2`,name:`AutoHotkey2`},{id:`awk`,name:`AWK`},{id:`ballerina`,name:`Ballerina`},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`]},{id:`beancount`,name:`Beancount`},{id:`berry`,name:`Berry`,aliases:[`be`]},{id:`bibtex`,name:`BibTeX`},{id:`bicep`,name:`Bicep`},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`]},{id:`blade`,name:`Blade`},{id:`c`,name:`C`},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`]},{id:`cpp`,name:`C++`,aliases:[`c++`]},{id:`c3`,name:`C3`},{id:`cadence`,name:`Cadence`,aliases:[`cdc`]},{id:`cairo`,name:`Cairo`},{id:`chapel`,name:`Chapel`,aliases:[`chpl`]},{id:`clarity`,name:`Clarity`},{id:`clojure`,name:`Clojure`,aliases:[`clj`]},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`]},{id:`cmake`,name:`CMake`},{id:`cobol`,name:`COBOL`},{id:`codeowners`,name:`CODEOWNERS`},{id:`codeql`,name:`CodeQL`,aliases:[`ql`]},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`]},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`]},{id:`crystal`,name:`Crystal`},{id:`css`,name:`CSS`},{id:`csv`,name:`CSV`},{id:`cue`,name:`CUE`},{id:`cypher`,name:`Cypher`,aliases:[`cql`]},{id:`d`,name:`D`},{id:`dart`,name:`Dart`},{id:`dax`,name:`DAX`},{id:`desktop`,name:`Desktop`},{id:`diff`,name:`Diff`},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`]},{id:`dotenv`,name:`dotEnv`},{id:`dream-maker`,name:`Dream Maker`},{id:`edge`,name:`Edge`},{id:`elixir`,name:`Elixir`},{id:`elm`,name:`Elm`},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`]},{id:`erb`,name:`ERB`},{id:`erlang`,name:`Erlang`,aliases:[`erl`]},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`]},{id:`fennel`,name:`Fennel`},{id:`fish`,name:`Fish`},{id:`fluent`,name:`Fluent`,aliases:[`ftl`]},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`]},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`]},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`]},{id:`gdscript`,name:`GDScript`,aliases:[`gd`]},{id:`gdshader`,name:`GDShader`},{id:`genie`,name:`Genie`},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`]},{id:`gherkin`,name:`Gherkin`},{id:`git-commit`,name:`Git Commit Message`},{id:`git-rebase`,name:`Git Rebase Message`},{id:`gleam`,name:`Gleam`},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`]},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`]},{id:`glsl`,name:`GLSL`},{id:`gn`,name:`GN`},{id:`smalltalk`,name:`GNU Smalltalk`},{id:`gnuplot`,name:`Gnuplot`},{id:`go`,name:`Go`},{id:`graphql`,name:`GraphQL`,aliases:[`gql`]},{id:`groovy`,name:`Groovy`},{id:`hack`,name:`Hack`},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`]},{id:`hcl`,name:`HashiCorp HCL`},{id:`haskell`,name:`Haskell`,aliases:[`hs`]},{id:`haxe`,name:`Haxe`},{id:`hjson`,name:`Hjson`},{id:`hlsl`,name:`HLSL`},{id:`html`,name:`HTML`},{id:`html-derivative`,name:`HTML (Derivative)`},{id:`http`,name:`HTTP`},{id:`hurl`,name:`Hurl`},{id:`hxml`,name:`HXML`},{id:`hy`,name:`Hy`},{id:`imba`,name:`Imba`},{id:`ini`,name:`INI`,aliases:[`properties`]},{id:`java`,name:`Java`},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`]},{id:`jinja`,name:`Jinja`},{id:`jison`,name:`Jison`},{id:`json`,name:`JSON`},{id:`jsonl`,name:`JSON Lines`},{id:`jsonc`,name:`JSON with Comments`},{id:`json5`,name:`JSON5`},{id:`jsonnet`,name:`Jsonnet`},{id:`jssm`,name:`JSSM`,aliases:[`fsl`]},{id:`jsx`,name:`JSX`},{id:`julia`,name:`Julia`,aliases:[`jl`]},{id:`just`,name:`Just`,aliases:[`justfile`]},{id:`kdl`,name:`KDL`},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`]},{id:`kusto`,name:`Kusto`,aliases:[`kql`]},{id:`latex`,name:`LaTeX`},{id:`lean`,name:`Lean 4`,aliases:[`lean4`]},{id:`less`,name:`Less`},{id:`liquid`,name:`Liquid`},{id:`llvm`,name:`LLVM IR`},{id:`log`,name:`Log file`},{id:`logo`,name:`Logo`},{id:`lua`,name:`Lua`},{id:`luau`,name:`Luau`},{id:`make`,name:`Makefile`,aliases:[`makefile`]},{id:`markdown`,name:`Markdown`,aliases:[`md`]},{id:`marko`,name:`Marko`},{id:`matlab`,name:`MATLAB`},{id:`mdc`,name:`MDC`},{id:`mdx`,name:`MDX`},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`]},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`]},{id:`mojo`,name:`Mojo`},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`]},{id:`move`,name:`Move`},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`]},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`]},{id:`nextflow-groovy`,name:`Nextflow Groovy`},{id:`nginx`,name:`Nginx`},{id:`nim`,name:`Nim`},{id:`nix`,name:`Nix`},{id:`nsis`,name:`NSIS`},{id:`nushell`,name:`nushell`,aliases:[`nu`]},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`]},{id:`objective-cpp`,name:`Objective-C++`},{id:`ocaml`,name:`OCaml`},{id:`odin`,name:`Odin`},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`]},{id:`org`,name:`Org Markup`},{id:`pascal`,name:`Pascal`},{id:`perl`,name:`Perl`},{id:`php`,name:`PHP`},{id:`pkl`,name:`Pkl`},{id:`plsql`,name:`PL/SQL`},{id:`polar`,name:`Polar`},{id:`postcss`,name:`PostCSS`},{id:`powerquery`,name:`PowerQuery`},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`]},{id:`prisma`,name:`Prisma`},{id:`prolog`,name:`Prolog`},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`]},{id:`pug`,name:`Pug`,aliases:[`jade`]},{id:`puppet`,name:`Puppet`},{id:`purescript`,name:`PureScript`},{id:`python`,name:`Python`,aliases:[`py`]},{id:`qml`,name:`QML`},{id:`qmldir`,name:`QML Directory`},{id:`qss`,name:`Qt Style Sheets`},{id:`r`,name:`R`},{id:`racket`,name:`Racket`},{id:`raku`,name:`Raku`,aliases:[`perl6`]},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`]},{id:`regexp`,name:`RegExp`,aliases:[`regex`]},{id:`rel`,name:`Rel`},{id:`rst`,name:`reStructuredText`},{id:`riscv`,name:`RISC-V`},{id:`coq`,name:`Rocq`},{id:`ron`,name:`RON`},{id:`rosmsg`,name:`ROS Interface`},{id:`ruby`,name:`Ruby`,aliases:[`rb`]},{id:`haml`,name:`Ruby Haml`},{id:`rust`,name:`Rust`,aliases:[`rs`]},{id:`sas`,name:`SAS`},{id:`sass`,name:`Sass`},{id:`scala`,name:`Scala`},{id:`scheme`,name:`Scheme`},{id:`scss`,name:`SCSS`},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`]},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`]},{id:`shellsession`,name:`Shell Session`,aliases:[`console`]},{id:`smithy`,name:`Smithy`},{id:`solidity`,name:`Solidity`},{id:`sparql`,name:`SPARQL`},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`]},{id:`sql`,name:`SQL`},{id:`ssh-config`,name:`SSH Config`},{id:`stata`,name:`Stata`},{id:`stylus`,name:`Stylus`,aliases:[`styl`]},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`]},{id:`svelte`,name:`Svelte`},{id:`swift`,name:`Swift`},{id:`systemd`,name:`Systemd Units`},{id:`system-verilog`,name:`SystemVerilog`},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`]},{id:`tasl`,name:`Tasl`},{id:`tcl`,name:`Tcl`},{id:`templ`,name:`Templ`},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`]},{id:`tex`,name:`TeX`},{id:`toml`,name:`TOML`},{id:`tsv`,name:`TSV`},{id:`tsx`,name:`TSX`},{id:`turtle`,name:`Turtle`},{id:`twig`,name:`Twig`},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`]},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`]},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`]},{id:`typst`,name:`Typst`,aliases:[`typ`]},{id:`v`,name:`V`},{id:`vala`,name:`Vala`},{id:`verilog`,name:`Verilog`},{id:`vhdl`,name:`VHDL`},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`]},{id:`vb`,name:`Visual Basic`},{id:`vue`,name:`Vue`},{id:`vue-html`,name:`Vue HTML`},{id:`vue-vine`,name:`Vue Vine`},{id:`vyper`,name:`Vyper`,aliases:[`vy`]},{id:`wasm`,name:`WebAssembly`},{id:`wit`,name:`WebAssembly Interface Types`},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`]},{id:`wgsl`,name:`WGSL`},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`]},{id:`reg`,name:`Windows Registry Script`},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`]},{id:`xml`,name:`XML`},{id:`xsl`,name:`XSL`},{id:`yaml`,name:`YAML`,aliases:[`yml`]},{id:`zenscript`,name:`ZenScript`},{id:`zig`,name:`Zig`}],oie=[{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`},{id:`github-light`,displayName:`GitHub Light`,type:`light`},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`},{id:`horizon`,displayName:`Horizon`,type:`dark`},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`},{id:`houston`,displayName:`Houston`,type:`dark`},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`},{id:`laserwave`,displayName:`LaserWave`,type:`dark`},{id:`light-plus`,displayName:`Light Plus`,type:`light`},{id:`material-theme`,displayName:`Material Theme`,type:`dark`},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`},{id:`min-dark`,displayName:`Min Dark`,type:`dark`},{id:`min-light`,displayName:`Min Light`,type:`light`},{id:`monokai`,displayName:`Monokai`,type:`dark`},{id:`night-owl`,displayName:`Night Owl`,type:`dark`},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`},{id:`nord`,displayName:`Nord`,type:`dark`},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`},{id:`one-light`,displayName:`One Light`,type:`light`},{id:`plastic`,displayName:`Plastic`,type:`dark`},{id:`poimandres`,displayName:`Poimandres`,type:`dark`},{id:`red`,displayName:`Red`,type:`dark`},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`},{id:`vesper`,displayName:`Vesper`,type:`dark`},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`}],sie=`sveltia-ui`,cie=`shiki`,JA,YA,XA=!0,ZA=(e,t)=>`${KA}/${e}/${t}`,QA=()=>(JA===void 0&&(JA=typeof indexedDB>`u`?null:new UA(sie,cie)),JA),lie=async e=>(YA??=(async()=>{let t=(await e.keys()).filter(e=>typeof e==`string`&&!e.startsWith(`4.4.3/`));t.length&&await e.deleteEntries(t)})(),YA),uie=async(e,t)=>{let n=XA?QA():null;if(n)try{return await lie(n),await n.get(ZA(e,t))}catch{return}},die=async(e,t,n)=>{let r=XA?QA():null;if(r)try{await r.set(ZA(e,t),n)}catch{}},fie=`0.69.1`,$A=function(e,t,n){let r=Promise.resolve();function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ej=`https://unpkg.com/@shikijs`,pie=`https://unpkg.com/@sveltia/ui`,mie=()=>`${pie}@${fie}/dist/shiki-engine.js`,hie=e=>`${ej}/langs@${KA}/dist/${e}.mjs`,gie=e=>`${ej}/themes@${KA}/dist/${e}.mjs`,_ie={loadEngine:async()=>$A(()=>import(mie()),void 0),loadLanguage:async e=>$A(()=>import(hie(e)),void 0),loadTheme:async e=>$A(()=>import(gie(e)),void 0)},tj=()=>_ie,nj=`github-light`,rj=`github-dark`,ij=()=>{if(typeof document>`u`)return nj;let{theme:e}=document.documentElement.dataset;return e?e===`dark`?rj:nj:window.matchMedia(`(prefers-color-scheme: dark)`).matches?rj:nj},vie=e=>{if(typeof document>`u`)return()=>void 0;let t=()=>{let t=ij();e.update(()=>{nS().getChildren().forEach(e=>{uD(e)&&e.getTheme()!==t&&(e.setTheme(t),e.markDirty())})},{tag:sy})},n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]});let r=window.matchMedia(`(prefers-color-scheme: dark)`);return r.addEventListener(`change`,t),()=>{n.disconnect(),r.removeEventListener(`change`,t)}},yie=[``,`plain`,`plaintext`,`text`,`txt`],bie=/^diff-([\w-]+)/i,aj=null,oj=null,sj=!1,cj=e=>bie.exec(e)?.[1]??null,lj=e=>yie.includes(e??``),uj=()=>!!oj,xie=()=>sj,dj=e=>{if(!oj)return!1;let t=cj(e)??e;return aj.isSpecialLang(t)?!0:oj.getLoadedLanguages().includes(t)},Sie=(e,t)=>{e.update(()=>{let e=Yx(t);if(!uD(e))return;let n=e.getLanguage();n&&dj(n)&&!e.getIsSyntaxHighlightSupported()&&e.setIsSyntaxHighlightSupported(!0),e.markDirty()},{tag:sy})},fj=new Map,pj=(e,t,n,r)=>{let i=fj.get(e);if(!i){let n=new Map;i={promise:(async()=>{try{await t()}catch{}fj.delete(e),n.forEach((e,t)=>Sie(e,t))})(),targets:n},fj.set(e,i)}return n&&r&&i.targets.set(r,n),i.promise},mj=(e,t)=>{if(!(oj||sj))return pj(`engine`,async()=>{try{aj=await tj().loadEngine(),oj=aj.createHighlighterCoreSync({engine:aj.createJavaScriptRegexEngine(),langs:[],themes:[]})}catch{sj=!0}},e,t)},hj=async(e,t,n)=>{let r=await uie(e,t);if(r)return r;let i=await n();if(!i)return;let a=i.default??i;return await die(e,t,a),a},gj=e=>qA.find(({id:t,aliases:n})=>t===e||n?.includes(e))?.id??e,_j=(e,t,n)=>{let r=cj(e)??e;if(!oj||dj(r))return;let i=qA.find(({id:e,aliases:t})=>e===r||t?.includes(r));if(i)return pj(`lang/${i.id}`,async()=>{let e=await hj(`lang`,i.id,()=>tj().loadLanguage(i.id));e&&await oj.loadLanguage(e)},t,n)},vj=e=>oj?aj.isSpecialTheme(e)||oj.getLoadedThemes().includes(e):!1,yj=(e,t,n)=>{if(!(!oj||vj(e))&&oie.some(({id:t})=>t===e))return pj(`theme/${e}`,async()=>{let t=await hj(`theme`,e,()=>tj().loadTheme(e));t&&await oj.loadTheme(t)},t,n)},Cie=(e,t)=>{let n=[];return e.forEach((e,r)=>{r&&n.push(sx()),e.forEach((e,r)=>{let{content:i}=e;if(t&&r===0&&i.length>0){let e=[`+`,`-`,`>`,`<`,` `],t=[`inserted`,`deleted`,`inserted`,`deleted`,`unchanged`],r=e.indexOf(i[0]);r!==-1&&(n.push(bD(e[r],t[r])),i=i.slice(1))}let a=aj.stringifyTokenStyle(e.htmlStyle||aj.getTokenStyleObject(e));pb(i,{linebreak:()=>n.push(sx()),tab:()=>n.push(Ey()),text:e=>{let t=bD(e);t.setStyle(a),n.push(t)}})})}),n},wie=(e,t)=>{let n=cj(t),{tokens:r}=oj.codeToTokens(e.getTextContent(),{lang:n??t,theme:e.getTheme()});return Cie(r,!!n)},Tie=(e,t,{theme:n}={})=>{let r=gj(cj(t)??t);if(!oj||lj(r)||!dj(r))return;let i=n??ij();if(vj(i))return oj.codeToHtml(e,{lang:r,theme:i})},bj={defaultLanguage:rD,defaultTheme:`github-light`,tokenize(e,t){let n=t||this.defaultLanguage;return n===null||lj(n)||!uj()?tD(e.getTextContent()):wie(e,n)}},Eie=(e,t)=>{let n=t.getElementByKey(e.getKey());if(n===null)return;let r=e.getChildren(),i=r.length;if(i===n.__cachedChildrenLength)return;n.__cachedChildrenLength=i;let a=`1`,o=1;for(let e=0;e<i;e+=1)cx(r[e])&&(o+=1,a+=`\n${o}`);n.setAttribute(`data-gutter`,a)},xj=(e,t)=>xD(e)&&xD(t)&&e.__text===t.__text&&e.__highlightType===t.__highlightType&&e.__style===t.__style||Dy(e)&&Dy(t)||cx(e)&&cx(t),Die=(e,t)=>{let n=0;for(;n<e.length&&xj(e[n],t[n]);)n+=1;let r=e.length,i=t.length,a=Math.min(r,i)-n,o=0;for(;o<a;)if(o+=1,!xj(e[r-o],t[i-o])){--o;break}return{from:n,to:r-o,nodesForReplacement:t.slice(n,i-o)}},Oie=(e,t)=>{let n=Yx(e);if(!uD(n)||!n.isAttached())return;let r=ib();if(!Q(r)){t();return}let{anchor:i}=r,a=i.offset,o=i.type===`element`&&cx(n.getChildAtIndex(i.offset-1)),s=0;if(o||(s=a+i.getNode().getPreviousSiblings().reduce((e,t)=>e+t.getTextContentSize(),0)),t()){if(o){i.getNode().select(a,a);return}n.getChildren().some(e=>{let t=Cy(e);if(t||cx(e)){let n=e.getTextContentSize();if(t&&n>=s)return e.select(s,s),!0;s-=n}return!1})}},Sj=(e,t,n,r)=>{let i=r.getKey(),{nodesCurrentlyHighlighting:a}=n,o=r.getLanguage();!o&&t.defaultLanguage!==null&&(o=t.defaultLanguage,r.setLanguage(o));let s=r.getTheme();s||(s=t.defaultTheme,r.setTheme(s));let c=!o||lj(o),l=!1;if(c||!o||xie()?r.getIsSyntaxHighlightSupported()&&r.setIsSyntaxHighlightSupported(!1):uj()?(vj(s)||(yj(s,e,i),l=!0),dj(o)?r.getIsSyntaxHighlightSupported()||r.setIsSyntaxHighlightSupported(!0):(!_j(o,e,i)&&r.getIsSyntaxHighlightSupported()&&r.setIsSyntaxHighlightSupported(!1),l=!0)):(mj(e,i),l=!0),!l){if(a.has(i)){n.pendingRefresh.has(i)||(n.pendingRefresh.add(i),AS(()=>{n.pendingRefresh.delete(i),e.update(()=>{let e=Yx(i);uD(e)&&e.markDirty()},{tag:sy})}));return}a.add(i),n.didTransform||(n.didTransform=!0,AS(()=>{n.didTransform=!1,a.clear()})),Oie(i,()=>{let e=Yx(i);if(!uD(e)||!e.isAttached())return!1;let n=e.getLanguage()||t.defaultLanguage,a=t.tokenize(e,n??void 0),{from:o,to:s,nodesForReplacement:c}=Die(e.getChildren(),a);return o!==s||c.length?(r.splice(o,s-o,c),!0):!1})}},Cj=(e,t,n,r)=>{let i=r.getParent();uD(i)?Sj(e,t,n,i):xD(r)&&r.replace(Sy(r.__text))},kie=(e,t=bj)=>{if(!e.hasNodes([cD,vD]))throw Error(`CodeNode or CodeHighlightNode not registered on editor`);let n=[];e._headless!==!0&&n.push(e.registerMutationListener(cD,t=>{e.read(`latest`,()=>{t.forEach((t,n)=>{if(t!==`destroyed`){let t=Yx(n);t!==null&&Eie(t,e)}})})},{skipInitialization:!1}));let r={didTransform:!1,nodesCurrentlyHighlighting:new Set,pendingRefresh:new Set};return n.push(e.registerNodeTransform(cD,Sj.bind(null,e,t,r)),e.registerNodeTransform(vy,Cj.bind(null,e,t,r)),e.registerNodeTransform(vD,Cj.bind(null,e,t,r)),DD(e)),zw(...n)},Aie={dependencies:[tE],export:e=>iE(e)?`***`:null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{let i=rE();r||e.getNextSibling()!==null?e.replace(i):e.insertBefore(i),i.selectNext()},type:`element`},wj=/^(?:\|)(.+)(?:\|)\s?$/,jie=/^(\| ?:?-*:? ?)+\|\s?$/,Mie=e=>{let t=e.getFirstChild();return SA(t)?t.getChildrenSize():0},Tj=e=>{e=e.replace(/\\n/g,`
|
||
`);let t=_A(pA.NO_STATUS);return uA(e,Xk,t),t},Ej=e=>{let[,t]=e.match(wj)??[];return t?t.split(`|`).map(e=>Tj(e)):null},Nie={dependencies:[AA,bA,mA],export:e=>{if(!MA(e))return null;let t=[];return e.getChildren().forEach(e=>{let n=[];if(!SA(e))return;let r=!1;e.getChildren().forEach(e=>{vA(e)&&(n.push(dA(Xk,e).replace(/\n/g,`\\n`).trim()),e.__headerState===pA.ROW&&(r=!0))}),t.push(`| ${n.join(` | `)} |`),r&&t.push(`| ${n.map(()=>`---`).join(` | `)} |`)}),t.join(`
|
||
`)},regExp:wj,replace:(e,t,[n])=>{if(jie.test(n)){let t=e.getPreviousSibling();if(!t||!MA(t))return;let n=t.getChildren(),r=n[n.length-1];if(!r||!SA(r))return;r.getChildren().forEach(e=>{vA(e)&&e.setHeaderStyles(pA.ROW,pA.ROW)}),e.remove();return}let r=Ej(n);if(!r)return;let i=[r],a=e.getPreviousSibling(),o=r.length;for(;a&&!(!hx(a)||a.getChildrenSize()!==1);){let e=a.getFirstChild();if(!Cy(e))break;let t=Ej(e.getTextContent());if(!t)break;o=Math.max(o,t.length),i.unshift(t);let n=a.getPreviousSibling();a.remove(),a=n}let s=jA();i.forEach(e=>{let t=xA();s.append(t);for(let n=0;n<o;n+=1)t.append(n<e.length?e[n]:Tj(``))});let c=e.getPreviousSibling();MA(c)&&Mie(c)===o?(c.append(...s.getChildren()),e.remove()):e.replace(s),s.selectEnd()},type:`element`},Pie=()=>{let e=ib();if(!Q(e))return{blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]};let t=e.anchor.getNode(),n=null,r=BA.filter(t=>e.hasFormat(t));t.getType()!==`root`&&(n=t instanceof qb?t:Zw(t,qb),WD(n)&&(r.push(`link`),n=Zw(n,qb)),_O(n)&&(n=Zw(n,vO)));let i=(()=>{if(!n)return`paragraph`;if(tk(n))return`heading-${n.getTag().match(/\d/)?.[0]}`;if(CO(n))return n.getListType()===`bullet`?`bulleted-list`:`numbered-list`;if(XO(n))return`blockquote`;if(uD(n)||xD(n))return`code-block`;let e=n.getType();return HA.includes(e)?e:`paragraph`})();return{blockNodeKey:n?.getKey()??null,blockType:i,inlineTypes:r}},Fie=(e,t)=>{let n=t.filter(({tag:e})=>!rie.includes(e));e.getRootElement()?.dispatchEvent(new CustomEvent(`Update`,{detail:{value:dA(n).replace(/\\([_\\])/g,`$1`).replace(/ /g,` `),selection:Pie()}}))},Iie=({enabledButtons:e=[],components:t=[],useMarkdownShortcuts:n,isCodeEditor:r=!1,defaultLanguage:i=`plain`})=>{let a={namespace:`editor`,nodes:[...t.map(({node:e})=>e),...new Set(Object.entries(tie).filter(([t])=>e.includes(t)).flatMap(([,e])=>e)),...r?[cD,vD]:[tE,AA,mA,bA]],theme:eie},o=[...t.map(({transformer:e})=>e),...new Set(Object.entries(nie).filter(([t])=>e.includes(t)).flatMap(([,e])=>e)),...r?[Rk]:[Aie,Nie]],s=bx(a),c=[],l=e=>{typeof e==`function`&&c.push(e)};return l(wre(s)),l(ND(s)),l(RD(s,zD(),1e3)),n&&l(Kre(s,o)),(e.includes(`code-block`)||r)&&(l(kie(s,{...bj,defaultLanguage:i,defaultTheme:ij()})),l(vie(s))),e.includes(`link`)&&(l(s.registerCommand(JD,e=>(XD(typeof e==`string`?e:null),!0),2)),l(s.registerCommand(B_,e=>{let t=ib();if(!Q(t)||!Qw(e,ClipboardEvent)||!e.clipboardData||e.target.matches(`input, textarea`))return!1;let n=e.clipboardData.getData(`text`).trim();return LA(n)?(t.isCollapsed()&&fb([Sy(n)]),!t.getNodes().some(e=>$(e)||Cy(e)&&!e.isSimpleText())&&(s.dispatchCommand(JD,n),e.preventDefault(),!0)):!1},1))),e.includes(`bulleted-list`)&&l(s.registerCommand(wO,()=>(iO(`bullet`),!0),2)),e.includes(`numbered-list`)&&l(s.registerCommand(TO,()=>(iO(`number`),!0),2)),(e.includes(`bulleted-list`)||e.includes(`numbered-list`))&&l(s.registerCommand(R_,()=>dO(),2)),l(s.registerUpdateListener(()=>{s?.isComposing()||(async()=>{await vf(100),s.update(()=>{if(r){let e=nS(),t=e.getChildren();if(t.length===1&&!uD(t[0])&&t[0].remove(),t.length===0){let t=lD();t.setLanguage(i),e.append(t)}}Fie(s,o)})})()})),l(s.registerRootListener(e=>{if(!e)return;let t=e=>{s.update(()=>{if(e.key===`Tab`){let t=ib();if(!Q(t))return;let n=t.anchor.getNode(),r=n instanceof qb?n:Zw(n,qb);_O(r)&&r.canIndent()&&(e.shiftKey?r.getIndent()>0&&(e.preventDefault(),s.dispatchCommand(lv,void 0)):(e.preventDefault(),s.dispatchCommand(cv,void 0)))}})};return e.addEventListener(`keydown`,t),()=>{e.removeEventListener(`keydown`,t)}})),{editor:s,enabledTransformers:o,dispose:()=>{c.forEach(e=>e())}}},Dj=async e=>{lj(e)||(await mj(),await Promise.all([_j(gj(e)),yj(ij())]))},Lie=async(e,t,n)=>(await Promise.all([...t.matchAll(/^```(?<lang>.+?)\n/gm)].map(async({groups:{lang:e=`plain`}={}})=>Dj(e))),t=iie(t),t=aie(t),new Promise((r,i)=>{e.update(()=>{try{uA(t,n),r(void 0)}catch(e){i(Error(`Failed to convert Markdown`,{cause:e}))}})})),Oj=async e=>new Promise(t=>{e.focus(()=>{t(void 0)})}),Rie=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),zie=U(`<div></div>`),Bie={hash:`svelte-2icfj7`,code:`.lexical-root.svelte-2icfj7 {overflow:hidden;border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius) !important;padding:var(--sui-textbox-multiline-padding);min-height:120px;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);}.lexical-root.svelte-2icfj7:not(:first-child) {border-start-start-radius:0 !important;border-start-end-radius:0 !important;}.lexical-root.code.svelte-2icfj7 {padding:0;}.lexical-root.code.svelte-2icfj7 .code-block {border-radius:0 !important;min-height:120px;}.lexical-root.svelte-2icfj7:focus-visible {outline:0;}.lexical-root[aria-invalid=true].svelte-2icfj7 {border-color:var(--sui-error-border-color);}.lexical-root.svelte-2icfj7 [dir]:first-child {margin-top:0;}.lexical-root.svelte-2icfj7 [dir]:last-child {margin-bottom:0;}.lexical-root.svelte-2icfj7 strong.italic {font-style:italic;}.lexical-root.svelte-2icfj7 .strikethrough {text-decoration:line-through;}.lexical-root.svelte-2icfj7 li.nested {list-style-type:none;}.lexical-root.svelte-2icfj7 .code-block {position:relative;display:block;padding-block:8px;padding-inline-start:56px;padding-inline-end:8px;background-color:var(--sui-code-background-color);overflow-x:auto;white-space:pre;}.lexical-root.svelte-2icfj7 .code-block:not(:first-child) {margin-top:1em;}.lexical-root.svelte-2icfj7 .code-block:not(:last-child) {margin-bottom:1em;}.lexical-root.svelte-2icfj7 .code-block::before {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;content:attr(data-gutter);padding:8px;min-width:40px;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);text-align:end;}.lexical-root.svelte-2icfj7 [data-lexical-text=true] {cursor:text;}.lexical-root.svelte-2icfj7 :is(th, td) > p {margin:0;white-space:normal;word-break:normal;}.lexical-root.svelte-2icfj7 hr {margin:var(--sui-paragraph-margin) 0;border:none;padding:0;}.lexical-root.svelte-2icfj7 hr::after {display:block;height:2px;background-color:var(--sui-control-border-color);line-height:2px;content:"";}`};function kj(e,t){O(t,!0),J(e,Bie);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`readonly`,3,!1),a=X(t,`required`,3,!1),o=X(t,`invalid`,3,!1),s=Al(t,Rie),c=zi(`editorStore`),l=P(void 0),u=N(()=>!(r()||i()));B(()=>{c.editor?.setEditable(H(u))});let d=e=>{let{hasConverterError:t,useRichText:n,inputValue:r}=c;if(t||!n)return;let{value:i,selection:a}=e.detail;r!==i&&(c.useRichText=!1,c.inputValue=i,c.useRichText=!0),c.selection=a},f=e=>{e.target?.matches(`a`)&&e.preventDefault()};Nl(()=>{let{editor:e,enabledTransformers:t,dispose:n}=Iie(c.config);return c.editor=e,c.enabledTransformers=t,H(l)?.addEventListener(`Update`,d),H(l)?.addEventListener(`click`,f),()=>{H(l)?.removeEventListener(`Update`,d),H(l)?.removeEventListener(`click`,f),n(),e.setRootElement(null),c.initialized=!1,c.editor=void 0}}),B(()=>{c.editor&&H(l)&&(c.editor.setRootElement(H(l)),c.initialized=!0)});var p=zie();bl(p,()=>({...s,role:`textbox`,"aria-multiline":`true`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),class:`lexical-root`,id:`${c.editorId??``}-lexical-root`,contenteditable:H(u),hidden:n(),[ul]:{code:c.config.isCodeEditor}}),void 0,void 0,void 0,`svelte-2icfj7`),Ol(p,e=>F(l,e),()=>H(l)),G(e,p),k()}var Aj=()=>{let e=Af(`editor`),t=P(!1),n=P(void 0),r=P(ao([])),i=P(ao({modes:[],enabledButtons:[],components:[],useMarkdownShortcuts:!0,isCodeEditor:!1,useEmojiAutocomplete:!1})),a=P(``),o=P(ao({blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]})),s=P(!0),c=P(!1),l=P(!1),u=async()=>{if(!H(n)||!H(t))return;let e=H(a);try{await Lie(H(n),H(a)||``,H(r))}catch(t){F(c,!0),F(a,e,!0),console.error(t)}};return{get editor(){return H(n)},set editor(e){F(n,e,!0)},set enabledTransformers(e){F(r,e,!0)},get enabledTransformers(){return H(r)},get initialized(){return H(t)},set initialized(e){F(t,e,!0)},get config(){return H(i)},set config(e){F(i,e,!0),F(s,e.modes[0]===`rich-text`||e.isCodeEditor,!0)},get inputValue(){return H(a)},set inputValue(e){let t=H(a)!==e;t&&F(a,e,!0),H(s)&&(t||H(n)?.getEditorState().isEmpty())&&u()},get selection(){return H(o)},set selection(e){F(o,e,!0)},get useRichText(){return H(s)},set useRichText(e){F(s,e,!0)},get hasConverterError(){return H(c)},set hasConverterError(e){F(c,e,!0),H(c)&&(F(s,!1),F(l,!0))},get showConverterError(){return H(l)},set showConverterError(e){F(l,e,!0)},editorId:e,convertMarkdown:u}},Vie=U(`<!> <!>`,1);function jj(e,t){O(t,!0);let n=X(t,`disabled`,3,!1),r=qA.map(({id:e,name:t,aliases:n=[]})=>({key:e,label:t,aliases:n})),i=zi(`editorStore`),a=P(`plain`);B(()=>{i.selection.blockNodeKey,i.editor?.read(()=>{let e=i.config.isCodeEditor?nS().getChildren()[0]:Yx(i.selection.blockNodeKey);uD(e)&&F(a,e.getLanguage()??i.config.defaultLanguage??`plain`,!0)})});{let t=N(()=>Z(`_sui.text_editor.language`));Km(e,{get disabled(){return n()},get"aria-label"(){return H(t)},get value(){return H(a)},onChange:async({detail:{value:e}})=>{!i.editor||H(a)===e||(await Oj(i.editor),await Dj(e),i.editor.update(()=>{let{blockNodeKey:t}=i.selection,n=i.config.isCodeEditor?nS().getChildren()[0]:t?Yx(t):null;uD(n)&&(n.setLanguage(e),F(a,e,!0))}))},children:(e,t)=>{var n=Vie(),i=L(n);{let e=N(()=>Z(`_sui.text_editor.plain_text`));bm(i,{get label(){return H(e)},value:`plain`,dir:`ltr`})}Cc(z(i,2),17,()=>r,({key:e,label:t,aliases:n})=>e,(e,t)=>{let n=()=>H(t).key,r=()=>H(t).label,i=()=>H(t).aliases;{let t=N(()=>n()===H(a)||i().includes(H(a)));bm(e,{get label(){return r()},get value(){return n()},get selected(){return H(t)},dir:`ltr`})}}),G(e,n)},$$slots:{default:!0}})}k()}var Hie=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`variant`,`ariaLabel`,`children`]),Uie=U(`<div><div role="none" class="inner svelte-17i0igh"><!></div></div>`),Wie={hash:`svelte-17i0igh`,code:`[role=toolbar].svelte-17i0igh {--toolbar-size: var(--sui-secondary-toolbar-size);flex:none !important;display:flex;align-items:center;padding-inline:8px;background-color:var(--toolbar-background-color, transparent);}[role=toolbar].primary.svelte-17i0igh {--toolbar-size: var(--sui-primary-toolbar-size);}
|
||
@media (width < 768px) {[role=toolbar].secondary.svelte-17i0igh {padding-inline:0;}
|
||
}[role=toolbar][aria-orientation=horizontal].svelte-17i0igh {height:var(--toolbar-size);}[role=toolbar][aria-orientation=vertical].svelte-17i0igh {flex-direction:column;width:var(--toolbar-size);}[role=toolbar].svelte-17i0igh button[role=button]:is([aria-pressed=true], [aria-checked=true]) {background-color:var(--sui-selected-background-color);}[role=toolbar].svelte-17i0igh h2 {flex:auto;display:flex;align-items:center;gap:8px;margin:0;padding-inline-end:12px;min-width:0;font-size:var(--sui-font-size-x-large);}[role=toolbar].svelte-17i0igh h2:first-child {padding-inline-start:12px;}[role=toolbar].svelte-17i0igh h2 span:not(.sui.truncated-text) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal, normal);opacity:0.8;}[role=toolbar].svelte-17i0igh .divider[aria-orientation=horizontal] {margin:0 4px;width:calc(100% - 8px);}[role=toolbar].svelte-17i0igh .divider[aria-orientation=vertical] {margin:4px 0;height:calc(100% - 8px);}.inner.svelte-17i0igh {display:contents;}`};function Mj(e,t){J(e,Wie);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`orientation`,3,`horizontal`),a=X(t,`variant`,3,void 0),o=X(t,`ariaLabel`,3,void 0),s=Al(t,Hie);var c=Uie();bl(c,()=>({...s,role:`toolbar`,class:`sui toolbar ${i()??``} ${a()??``} ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"aria-label":o()}),void 0,void 0,void 0,`svelte-17i0igh`);var l=I(c);Ac(I(l),()=>t.children??br),D(l),D(c),V(()=>l.inert=r()),G(e,c)}var Gie=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`disabled`,`children`]),Kie=U(`<div role="none" class="wrapper svelte-vfc36b"><!></div>`),qie={hash:`svelte-vfc36b`,code:`.wrapper.svelte-vfc36b {display:contents;}.wrapper.svelte-vfc36b [role=toolbar] {position:sticky;top:0;z-index:100;display:flex;flex-wrap:wrap;gap:4px;border-width:1px 1px 0;border-style:solid;border-color:var(--sui-textbox-border-color);border-start-start-radius:var(--sui-textbox-border-radius);border-start-end-radius:var(--sui-textbox-border-radius);border-end-start-radius:0;border-end-end-radius:0;padding:0 4px;height:auto;min-height:40px;background-color:var(--sui-tertiary-background-color);}
|
||
@media (width < 768px) {.wrapper.svelte-vfc36b [role=toolbar] {flex-wrap:wrap;height:auto;}
|
||
}.wrapper.svelte-vfc36b .sui.menu-button {padding:0 4px;}.wrapper.svelte-vfc36b .sui.button {flex:none;margin:0 !important;}.wrapper.svelte-vfc36b .sui.button-group {gap:4px;}`};function Nj(e,t){O(t,!0),J(e,qie),X(t,`code`,11,``),X(t,`lang`,11,`plain`);let n=X(t,`disabled`,3,!1),r=Al(t,Gie);var i=Kie();Mj(I(i),Ml(()=>r,{get disabled(){return n()},children:(e,n)=>{var r=W();Ac(L(r),()=>t.children??br),G(e,r)},$$slots:{default:!0}})),D(i),G(e,i),k()}function Jie(e,t){O(t,!0);let n=X(t,`disabled`,3,!1),r=X(t,`readonly`,3,!1);{let t=N(()=>n()||r()),i=N(()=>Z(`_sui.text_editor.code_editor`));Nj(e,{get disabled(){return H(t)},get"aria-label"(){return H(i)},children:(e,t)=>{{let t=N(()=>n()||r());jj(e,{get disabled(){return H(t)}})}},$$slots:{default:!0}})}k()}var Yie=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`showLanguageSwitcher`,`flex`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),Xie=U(`<div><!> <!></div> <!>`,1),Zie={hash:`svelte-8svssr`,code:`.code-editor.svelte-8svssr {margin:var(--sui-focus-ring-width);border-radius:var(--sui-textbox-border-radius);width:calc(100% - var(--sui-focus-ring-width) * 2);transition:all 200ms;}.code-editor.svelte-8svssr:focus-within {outline:var(--sui-focus-ring-width) solid var(--sui-focus-ring-color);}.code-editor.flex.svelte-8svssr:not([hidden]) {display:block;}`};function Qie(e,t){O(t,!0),J(e,Zie);let n=X(t,`code`,15,``),r=X(t,`lang`,15,`plain`),i=X(t,`showLanguageSwitcher`,3,!1),a=X(t,`flex`,3,!1),o=X(t,`hidden`,3,!1),s=X(t,`disabled`,3,!1),c=X(t,`readonly`,3,!1),l=X(t,`required`,3,!1),u=X(t,`invalid`,3,!1),d=Al(t,Yie),f=Aj();f.config={...f.config,useMarkdownShortcuts:!1,isCodeEditor:!0,defaultLanguage:r()},Bi(`editorStore`,f),B(()=>{f.initialized&&(n(),r(),Ds(()=>{let e=n()?`\`\`\`${r()}\n${n()}\n\`\`\``:`\`\`\`${r()}\n\`\`\``;f.inputValue=e}))}),B(()=>{f.initialized&&(f.inputValue,Ds(()=>{let{lang:e=`plain`,code:t=``}=f.inputValue.match(/^```(?<lang>\w+?)?\n(?:(?<code>.*)\n)?```/s)?.groups??{};r()!==e&&r(e),n()!==t&&n(t)}))});var p=Xie(),m=L(p);bl(m,()=>({...d,role:`none`,class:`sui code-editor`,hidden:o(),[ul]:{flex:a()}}),void 0,void 0,void 0,`svelte-8svssr`);var h=I(m),g=e=>{Jie(e,{get disabled(){return s()},get readonly(){return c()}})};q(h,e=>{i()&&e(g)}),kj(z(h,2),{get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()}}),D(m);var _=z(m,2),v=e=>{Nh(e,{get show(){return f.showConverterError},set show(e){f.showConverterError=e},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`_sui.text_editor.converter_error`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(_,e=>{f.showConverterError&&e(v)}),G(e,p),k()}var $ie=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`element`,`flex`,`dir`,`name`,`autoResize`,`useEmojiAutocomplete`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),eae=U(`<div class="clone svelte-hlefmw" aria-hidden="true"> </div>`),tae=U(`<div role="none"><textarea></textarea> <!> <!></div>`),nae={hash:`svelte-hlefmw`,code:`.text-area.svelte-hlefmw {display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width);}.text-area[hidden].svelte-hlefmw {display:none;}.text-area.flex.svelte-hlefmw:not([hidden]) {display:inline-grid;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}:is(textarea.svelte-hlefmw, .clone.svelte-hlefmw) {grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-multiline-padding);width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}:is(textarea:where(.svelte-hlefmw), .clone:where(.svelte-hlefmw)).resizing.svelte-hlefmw {transition-duration:0ms;}.svelte-hlefmw:is(textarea:where(.svelte-hlefmw), .clone:where(.svelte-hlefmw)):focus {color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}.svelte-hlefmw:is(textarea:where(.svelte-hlefmw), .clone:where(.svelte-hlefmw)):is(:where(.svelte-hlefmw):disabled, :where(.svelte-hlefmw):read-only) {background-color:var(--sui-disabled-background-color);}textarea.svelte-hlefmw {resize:vertical;}textarea.auto-resize.svelte-hlefmw {overflow:hidden;resize:none;}textarea[aria-invalid=true].svelte-hlefmw {border-color:var(--sui-error-border-color);}.clone.svelte-hlefmw {overflow:hidden;visibility:hidden;}textarea.svelte-hlefmw,
|
||
.clone.svelte-hlefmw {white-space:pre-wrap;word-break:normal;overflow-wrap:anywhere;}`};function Pj(e,t){O(t,!0),J(e,nae);let n=X(t,`value`,15,``),r=X(t,`element`,15),i=X(t,`flex`,3,!1),a=X(t,`dir`,3,void 0),o=X(t,`name`,3,void 0),s=X(t,`autoResize`,3,!1),c=X(t,`useEmojiAutocomplete`,3,!1),l=X(t,`hidden`,3,!1),u=X(t,`disabled`,3,!1),d=X(t,`readonly`,3,!1),f=X(t,`required`,3,!1),p=X(t,`invalid`,3,!1),m=Al(t,$ie),h=N(()=>`${n()}\n`);var g=tae();let _;var v=I(g);pa(v),bl(v,()=>({...m,dir:a(),name:o(),disabled:u()||void 0,readonly:d()||void 0,"aria-hidden":l(),"aria-disabled":u(),"aria-readonly":d(),"aria-required":f(),"aria-invalid":p(),[ul]:{"auto-resize":s()}}),void 0,void 0,void 0,`svelte-hlefmw`),Ol(v,e=>r(e),()=>r());var y=z(v,2),b=e=>{var t=eae(),n=R(t,!0);V(()=>{Y(t,`dir`,a()),K(n,H(h)),t.dir=t.dir}),G(e,t)};q(y,e=>{s()&&e(b)});var x=z(y,2),S=e=>{dm(e,{get element(){return r()}})};q(x,e=>{c()&&!u()&&!d()&&e(S)}),D(g),V(()=>{_=el(g,1,`sui text-area ${t.class??``}`,`svelte-hlefmw`,_,{flex:i(),disabled:u(),readonly:d()}),Y(g,`hidden`,l()),v.dir=v.dir}),wl(v,n),G(e,g),k()}function rae(e,t){O(t,!0);let n=zi(`editorStore`),r=P(void 0),i=()=>{let e=ib();if(!Q(e)||!e.isCollapsed()||e.hasFormat(`code`))return;let t=e.anchor.getNode();if(!Cy(t)||!t.isSimpleText()||uD(t.getParent()))return;let{offset:n}=e.anchor,r=cm(t.getTextContent().slice(0,n));if(r===void 0)return;let i=t.getKey();return{id:`${i}:${n-r.length-1}`,query:r,nodeKey:i,offset:n}},a=({query:e})=>{let t=window.getSelection();if(!t?.rangeCount)return;let n=t.getRangeAt(0).cloneRange();try{n.setStart(n.startContainer,Math.max(0,n.startOffset-e.length-1))}catch{}let{top:r,bottom:i,left:a,right:o,width:s,height:c}=n.getBoundingClientRect();return r||i||a||s||c?{top:r,bottom:i,left:a,right:o}:void 0},o=(e,t)=>{let{editor:r}=n,{query:i,nodeKey:a,offset:o}=t,s=o-i.length-1;r?.update(()=>{let t=Yx(a);if(!Cy(t)||t.getTextContent().slice(s,o)!==`:${i}`)return;let n=sm(e.emoji,t.getTextContent().slice(o));t.spliceText(s,i.length+1,n,!0)})},s=()=>{let{editor:e}=n;if(!e)return[];let t=e=>t=>H(r)?.isOpen()?(t?.preventDefault(),e(),!0):!1;return[e.registerCommand(ev,t(()=>H(r)?.moveSelection(1)),4),e.registerCommand($_,t(()=>H(r)?.moveSelection(-1)),4),e.registerCommand(tv,t(()=>H(r)?.selectHighlighted()),4),e.registerCommand(ov,t(()=>H(r)?.selectHighlighted()),4),e.registerCommand(iv,t(()=>H(r)?.close(!0)),4),e.registerUpdateListener(({editorState:e})=>{let t;e.read(()=>{t=i()}),H(r)?.update(t)})]};B(()=>{if(!n.editor||!H(r))return;let e=s();return()=>{e.forEach(e=>e()),H(r)?.close()}}),B(()=>{n.useRichText||H(r)?.close()});{let t=N(()=>n.editor?.getRootElement()??void 0);Ol(um(e,{getAnchorRect:a,onSelect:o,get ariaOwner(){return H(t)}}),e=>F(r,e,!0),()=>H(r))}k()}var Fj=e=>Array.isArray(e)&&e.every(e=>or(e)),Ij=e=>[...new Set(e)];function iae(e,t){O(t,!0);let n=zi(`editorStore`),r=N(()=>n.selection.inlineTypes.includes(t.type));{let i=e=>{Rl(e,{get name(){return zA[t.type].icon}})},a=N(()=>Z(`_sui.text_editor.${zA[t.type].labelKey}`)),o=N(()=>!n.useRichText);$f(e,{iconic:!0,get"aria-label"(){return H(a)},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return H(o)},get pressed(){return H(r)},onclick:async()=>{n.editor&&(await Oj(n.editor),n.editor.dispatchCommand(W_,t.type))},startIcon:i,$$slots:{startIcon:!0}})}k()}function aae(e,t){O(t,!0);let n=zi(`editorStore`),r=N(()=>t.component.label),i=N(()=>t.component.icon),a=N(()=>t.component.createNode);{let t=e=>{var t=W(),n=L(t),r=e=>{Rl(e,{get name(){return H(i)}})};q(n,e=>{H(i)&&e(r)}),G(e,t)},o=N(()=>!!H(i)),s=N(()=>H(i)?void 0:H(r)),c=N(()=>!n.useRichText);$f(e,{get iconic(){return H(o)},get label(){return H(s)},get title(){return H(r)},get"aria-label"(){return H(r)},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return H(c)},onclick:()=>{n.editor?.update(()=>{fb([H(a)(),mx()])})},startIcon:t,$$slots:{startIcon:!0}})}k()}var oae=U(`<div role="none"><label> </label> <!></div>`),sae=U(`<div role="none"><label> </label> <!></div> <!>`,1),cae=U(`<!> <!>`,1);function lae(e,t){let n=tc();O(t,!0);let r=`link`,i=zi(`editorStore`),a=N(()=>i.selection.inlineTypes.includes(r)),o=P(!1),s=P(`create`),c=P(!1),l=P(``),u=P(``),d=()=>{i.editor?.getEditorState().read(()=>{let e=Sne().trim();F(l,e,!0),F(c,!!e),F(s,`create`),F(o,!0)})},f=()=>{i.editor?.dispatchCommand(JD,null)},p=()=>{i.editor?.getEditorState().read(()=>{let e=ib();if(Q(e)){let t=e.anchor.getNode(),n=(t instanceof VD?t:Zw(t,VD))?.getURL();if(n){F(c,!0),F(l,n,!0),F(s,`update`),F(o,!0);return}}f()})},m=()=>{H(a)?p():d()},h=e=>{uf(e,`Enter`)&&H(l)&&F(o,!1)},g=async e=>{if(e.detail.returnValue!==`cancel`&&H(s)!==`remove`){if(!i.editor)return;await new Promise(e=>{i.editor?.update(async()=>{let t=ib()??ab()?.clone();Q(t)||(t=tb()),H(c)||(F(u,H(u).trim(),!0),F(u,H(u)||H(l),!0),fb([Sy(H(u))])),rS(t),e(void 0)})}),await Oj(i.editor),i.editor.dispatchCommand(JD,H(l))}else i.editor&&await Oj(i.editor);F(l,``),F(u,``)},_=()=>{i.editor?.registerCommand(J_,e=>(uf(e,tf()?`Meta+K`:`Ctrl+K`)&&(e.preventDefault(),m()),!1),2)};B(()=>{i.editor&&_()});var v=cae(),y=L(v);{let e=e=>{Rl(e,{get name(){return zA[r].icon}})},t=N(()=>Z(`_sui.text_editor.${zA[r].labelKey}`)),n=N(()=>!i.useRichText);$f(y,{iconic:!0,get"aria-label"(){return H(t)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},get disabled(){return H(n)},get pressed(){return H(a)},onclick:()=>{m()},startIcon:e,$$slots:{startIcon:!0}})}var b=z(y,2);{let e=e=>{var t=W(),n=L(t),r=e=>{{let t=N(()=>Z(`_sui.remove`));$f(e,{variant:`secondary`,get label(){return H(t)},onclick:()=>{f(),F(s,`remove`),F(o,!1)}})}};q(n,e=>{H(s)!==`create`&&e(r)}),G(e,t)},t=N(()=>H(s)===`create`?Z(`_sui.text_editor.insert_link`):Z(`_sui.text_editor.update_link`)),r=N(()=>!H(l)),i=N(()=>H(s)===`create`?Z(`_sui.insert`):Z(`_sui.update`));Yp(b,{get title(){return H(t)},get okDisabled(){return H(r)},get okLabel(){return H(i)},restoreFocus:!1,onClose:e=>{g(e)},get open(){return H(o)},set open(e){F(o,e,!0)},get value(){return H(l)},set value(e){F(l,e,!0)},footerExtra:e,children:(e,t)=>{var r=sae(),i=L(r),a=I(i),o=R(a,!0),s=z(a,2);{let e=N(()=>Z(`_sui.text_editor.url`));fm(s,{dir:`ltr`,get id(){return`${n}-url`},flex:!0,get"aria-label"(){return H(e)},onkeydown:e=>{h(e)},get value(){return H(l)},set value(e){F(l,e,!0)}})}D(i);var d=z(i,2),f=e=>{var t=oae(),r=I(t),i=R(r,!0),a=z(r,2);{let e=N(()=>Z(`_sui.text_editor.text`));fm(a,{dir:`auto`,get id(){return`${n}-text`},flex:!0,get"aria-label"(){return H(e)},onkeydown:e=>{h(e)},get value(){return H(u)},set value(e){F(u,e,!0)}})}D(t),V(e=>{Y(r,`for`,`${n}-text`),K(i,e)},[()=>Z(`_sui.text_editor.text`)]),G(e,t)};q(d,e=>{H(c)||e(f)}),V(e=>{Y(a,`for`,`${n}-url`),K(o,e)},[()=>Z(`_sui.text_editor.url`)]),G(e,r)},$$slots:{footerExtra:!0,default:!0}})}G(e,v),k()}function uae(e,t){O(t,!0);let n=zi(`editorStore`);{let r=e=>{Rl(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{xm(e,{children:(e,r)=>{var i=W();Cc(L(i),17,()=>t.components,({id:e,label:t,icon:n,createNode:r})=>e,(e,t)=>{let r=()=>H(t).label,i=()=>H(t).icon,a=()=>H(t).createNode;Sm(e,{get label(){return r()},onclick:()=>{n.editor?.update(()=>{fb([a()(),mx()])})},startIcon:e=>{var t=W(),n=L(t),r=e=>{Rl(e,{get name(){return i()}})};q(n,e=>{i()&&e(r)}),G(e,t)},$$slots:{startIcon:!0}})}),G(e,i)},$$slots:{default:!0}})},a=N(()=>!n.useRichText),o=N(()=>Z(`_sui.insert`));Ip(e,{get disabled(){return H(a)},get label(){return H(o)},endIcon:r,popup:i,$$slots:{endIcon:!0,popup:!0}})}k()}function dae(e,t){O(t,!0);let n=zi(`editorStore`),r=N(()=>n.selection.blockType===t.type),i=async()=>{if(!n.editor)return;await Oj(n.editor);let[,e]=t.type.match(/^heading-(\d)$/)??[];e&&n.editor.update(()=>{Gw(ib(),()=>ek(`h${e}`))}),t.type===`paragraph`&&n.editor.update(()=>{Gw(ib(),()=>mx())}),t.type===`bulleted-list`&&n.editor.dispatchCommand(wO,void 0),t.type===`numbered-list`&&n.editor.dispatchCommand(TO,void 0),t.type===`blockquote`&&n.editor.update(()=>{Gw(ib(),()=>YO())}),t.type===`code-block`&&n.editor.update(()=>{Gw(ib(),()=>lD())})};var a=W();_c(L(a),()=>H(r),e=>{{let n=e=>{Rl(e,{get name(){return zA[t.type].icon}})},a=N(()=>Z(`_sui.text_editor.${zA[t.type].labelKey}`));Cm(e,{get label(){return H(a)},get checked(){return H(r)},onclick:()=>{H(r)||i()},startIcon:n,$$slots:{startIcon:!0}})}}),G(e,a),k()}var Lj=U(`<!> <!>`,1),fae=U(`<!> <!> <!>`,1),pae=U(`<!> <!> <!> <!>`,1);function mae(e,t){O(t,!0);let n=X(t,`disabled`,3,!1),r=X(t,`readonly`,3,!1),i=zi(`editorStore`),a=N(()=>i.config.components.filter(({trigger:e=`menuitem`})=>e===`button`)),o=N(()=>i.config.components.filter(({trigger:e=`menuitem`})=>e===`menuitem`)),s=N(()=>Ij([`paragraph`,...i.config.enabledButtons.filter(e=>HA.includes(e))])),c=N(()=>Ij(i.config.enabledButtons.filter(e=>VA.includes(e))));{let t=N(()=>n()||r()),l=N(()=>Z(`_sui.text_editor.text_editor`));Nj(e,{get disabled(){return H(t)},get"aria-label"(){return H(l)},children:(e,t)=>{var n=pae(),r=L(n),l=e=>{{let t=e=>{{let t=N(()=>zA[i.selection.blockType??``]?.icon??`format_paragraph`);Rl(e,{get name(){return H(t)}})}},n=e=>{{let t=N(()=>Z(`_sui.text_editor.text_style_options`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),16,()=>H(s),e=>e,(e,t)=>{dae(e,{get type(){return t}})}),G(e,n)},$$slots:{default:!0}})}},r=N(()=>!i.useRichText),a=N(()=>Z(`_sui.text_editor.show_text_style_options`));Ip(e,{get disabled(){return H(r)},get"aria-label"(){return H(a)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},startIcon:t,popup:n,$$slots:{startIcon:!0,popup:!0}})}};q(r,e=>{H(s).length>1&&e(l)});var u=z(r,2),d=e=>{var t=Lj(),n=L(t);Hp(n,{orientation:`vertical`});var r=z(n,2);{let e=N(()=>!i.useRichText);jj(r,{get disabled(){return H(e)}})}G(e,t)},f=e=>{var t=Lj(),n=L(t),r=e=>{var t=Lj(),n=L(t);Hp(n,{orientation:`vertical`}),dp(z(n,2),{children:(e,t)=>{var n=W();Cc(L(n),16,()=>H(c),e=>e,(e,t)=>{var n=W(),r=L(n),i=e=>{lae(e,{})},a=e=>{iae(e,{get type(){return t}})};q(r,e=>{t===`link`?e(i):e(a,-1)}),G(e,n)}),G(e,n)},$$slots:{default:!0}}),G(e,t)};q(n,e=>{H(c).length&&e(r)});var s=z(n,2),l=e=>{var t=fae(),n=L(t);Hp(n,{orientation:`vertical`});var r=z(n,2);Cc(r,17,()=>H(a),e=>e.id,(e,t)=>{aae(e,{get component(){return H(t)}})});var i=z(r,2),s=e=>{uae(e,{get components(){return H(o)}})};q(i,e=>{H(o).length&&e(s)}),G(e,t)};q(s,e=>{i.config.components.length&&e(l)}),G(e,t)};q(u,e=>{i.selection.blockType===`code-block`?e(d):e(f,-1)});var p=z(u,2);Wp(p,{flex:!0});var m=z(p,2),h=e=>{{let t=e=>{Rl(e,{name:`markdown`})},n=N(()=>!i.useRichText),r=N(()=>Z(`_sui.text_editor.edit_in_markdown`));$f(e,{iconic:!0,get disabled(){return i.hasConverterError},get pressed(){return H(n)},get"aria-label"(){return H(r)},onclick:()=>{i.useRichText=!i.useRichText,i.useRichText&&i.convertMarkdown()},startIcon:t,$$slots:{startIcon:!0}})}};q(m,e=>{i.config.modes.length>1&&e(h)}),G(e,n)},$$slots:{default:!0}})}k()}var hae=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`dir`,`modes`,`buttons`,`components`,`useMarkdownShortcuts`,`useEmojiAutocomplete`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),gae=U(`<div><!> <!> <!> <!></div> <!>`,1),_ae={hash:`svelte-1teqfht`,code:`.text-editor.svelte-1teqfht {margin:var(--sui-focus-ring-width);border-radius:var(--sui-textbox-border-radius);width:calc(100% - var(--sui-focus-ring-width) * 2);transition:all 200ms;}.text-editor.svelte-1teqfht:focus-within {outline:var(--sui-focus-ring-width) solid var(--sui-focus-ring-color);}.text-editor.flex.svelte-1teqfht:not([hidden]) {display:block;}.text-editor.svelte-1teqfht .sui.text-area {margin:0 !important;width:100% !important;min-width:auto;}.text-editor.svelte-1teqfht .sui.text-area textarea {border-start-start-radius:0 !important;border-start-end-radius:0 !important;border-end-start-radius:var(--sui-textbox-border-radius) !important;border-end-end-radius:var(--sui-textbox-border-radius) !important;}`};function vae(e,t){O(t,!0),J(e,_ae);let n=X(t,`value`,15,``),r=X(t,`flex`,3,!1),i=X(t,`dir`,3,void 0),a=X(t,`modes`,19,()=>[`rich-text`,`plain-text`]),o=X(t,`buttons`,19,()=>[...VA,...HA]),s=X(t,`components`,19,()=>[]),c=X(t,`useMarkdownShortcuts`,3,!0),l=X(t,`useEmojiAutocomplete`,3,!0),u=X(t,`hidden`,3,!1),d=X(t,`disabled`,3,!1),f=X(t,`readonly`,3,!1),p=X(t,`required`,3,!1),m=X(t,`invalid`,3,!1),h=Al(t,hae),g=Aj();g.config={...g.config,modes:a(),enabledButtons:o(),components:s(),useMarkdownShortcuts:c(),useEmojiAutocomplete:l()},Bi(`editorStore`,g),B(()=>{if(!g.initialized)return;let e=n();Ds(()=>{g.inputValue=e})}),B(()=>{if(!g.initialized)return;let e=g.inputValue;Ds(()=>{n()!==e&&n(e)})});var _=gae(),v=L(_);bl(v,()=>({...h,role:`none`,class:`sui text-editor`,hidden:u(),[ul]:{flex:r()}}),void 0,void 0,void 0,`svelte-1teqfht`);var y=I(v);mae(y,{get disabled(){return d()},get readonly(){return f()}});var b=z(y,2);{let e=N(()=>!g.useRichText||u());kj(b,{get hidden(){return H(e)},get disabled(){return d()},get readonly(){return f()},get required(){return p()},get invalid(){return m()}})}var x=z(b,2);{let e=N(()=>g.useRichText||u());Pj(x,{autoResize:!0,get useEmojiAutocomplete(){return l()},get flex(){return r()},get dir(){return i()},get hidden(){return H(e)},get disabled(){return d()},get readonly(){return f()},get required(){return p()},get invalid(){return m()},get value(){return g.inputValue},set value(e){g.inputValue=e}})}var S=z(x,2),C=e=>{rae(e,{})};q(S,e=>{g.config.useEmojiAutocomplete&&!d()&&!f()&&e(C)}),D(v);var w=z(v,2),T=e=>{Nh(e,{get show(){return g.showConverterError},set show(e){g.showConverterError=e},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`_sui.text_editor.converter_error`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(w,e=>{g.showConverterError&&e(T)}),G(e,_),k()}var yae=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`invalid`,`flex`,`min`,`max`,`step`,`class`,`hidden`,`disabled`,`readonly`,`required`,`children`,`increaseIcon`,`decreaseIcon`,`onChange`]),bae=U(`<div role="none"><div role="none" class="buttons svelte-1g9lhq9"><!> <!></div> <!></div>`),xae={hash:`svelte-1g9lhq9`,code:`.number-input.svelte-1g9lhq9 {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.number-input.flex.svelte-1g9lhq9:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.number-input.svelte-1g9lhq9 :not(:first-child) input {border-start-start-radius:0;border-end-start-radius:0;}.number-input.svelte-1g9lhq9 :not(:last-child) input {border-start-end-radius:0;border-end-end-radius:0;}.number-input.svelte-1g9lhq9 :not(.disabled) button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.number-input.svelte-1g9lhq9 :not(.disabled) button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.number-input.svelte-1g9lhq9 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.buttons.svelte-1g9lhq9 {display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height);}.buttons.svelte-1g9lhq9 button {flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%;}.buttons.svelte-1g9lhq9 button:first-of-type {border-block-start-width:1px;border-block-end-width:0;border-inline-end-width:0;border-inline-start-width:1px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;}.buttons.svelte-1g9lhq9 button:last-of-type {border-block-start-width:0;border-block-end-width:1px;border-inline-end-width:0;border-inline-start-width:1px;border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;}.buttons.svelte-1g9lhq9 button .icon {font-size:20px;}`};function Sae(e,t){let n=tc();O(t,!0),J(e,xae);let r=X(t,`value`,15),i=X(t,`invalid`,15,!1),a=X(t,`flex`,3,!1),o=X(t,`min`,3,void 0),s=X(t,`max`,3,void 0),c=X(t,`step`,3,1),l=X(t,`hidden`,3,!1),u=X(t,`disabled`,3,!1),d=X(t,`readonly`,3,!1),f=X(t,`required`,3,!1),p=Al(t,yae),m=P(!1),h=P(``),g=N(()=>String(c()).split(`.`)[1]?.length||0),_=N(()=>typeof o()==`number`&&Number(H(h)||0)<=o()),v=N(()=>typeof s()==`number`&&Number(H(h)||0)>=s());B(()=>{let e=String(r()??``);Ds(()=>{H(h)!==e&&F(h,e,!0)})}),B(()=>{let e=H(h).trim()?Number(H(h)):NaN;r(Number.isNaN(e)?void 0:e)}),B(()=>{H(m)&&i(f()&&(r()===void 0||H(h)===``)||H(h)!==void 0&&H(h)!==``&&(Number.isNaN(Number(H(h)))||typeof o()==`number`&&Number(H(h)||0)<o()||typeof s()==`number`&&Number(H(h)||0)>s()))});let y=()=>{H(_)||Number.isNaN(Number(H(h)))||F(h,Number(Number(H(h)||0)-c()).toFixed(H(g)),!0)},b=()=>{H(v)||Number.isNaN(Number(H(h)))||F(h,Number(Number(H(h)||0)+c()).toFixed(H(g)),!0)};var x=bae();let S;var C=I(x),w=I(C);{let e=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.increaseIcon),G(e,n)},a=e=>{Rl(e,{name:`expand_less`})};q(r,e=>{t.increaseIcon?e(i):e(a,-1)}),G(e,n)},i=N(()=>u()||d()||Number.isNaN(Number(r()))||H(v)),a=N(()=>Z(`_sui.number_input.increase`));$f(w,{iconic:!0,get disabled(){return H(i)},get"aria-label"(){return H(a)},get"aria-controls"(){return n},onclick:()=>{b()},startIcon:e,$$slots:{startIcon:!0}})}var T=z(w,2);{let e=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.decreaseIcon),G(e,n)},a=e=>{Rl(e,{name:`expand_more`})};q(r,e=>{t.decreaseIcon?e(i):e(a,-1)}),G(e,n)},i=N(()=>u()||d()||Number.isNaN(Number(r()))||H(_)),a=N(()=>Z(`_sui.number_input.decrease`));$f(T,{iconic:!0,get disabled(){return H(i)},get"aria-label"(){return H(a)},get"aria-controls"(){return n},onclick:()=>{y()},startIcon:e,$$slots:{startIcon:!0}})}D(C);var E=z(C,2);{let e=N(()=>Number(r()||0)),c=N(()=>H(g)>0?`decimal`:`numeric`);fm(E,Ml({dir:`ltr`},()=>p,{role:`spinbutton`,get id(){return n},spellcheck:`false`,get flex(){return a()},get hidden(){return l()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return i()},get"aria-valuenow"(){return H(e)},get"aria-valuemin"(){return o()},get"aria-valuemax"(){return s()},get inputmode(){return H(c)},onkeydown:e=>{let{key:t,ctrlKey:n,metaKey:r,altKey:i,shiftKey:a}=e,o=a||i||n||r;t===`ArrowDown`&&!o&&(e.preventDefault(),y()),t===`ArrowUp`&&!o&&(e.preventDefault(),b()),H(m)||F(m,!0)},oninput:()=>{H(m)||F(m,!0)},get onChange(){return t.onChange},get value(){return H(h)},set value(e){F(h,e,!0)}}))}D(x),V(()=>{S=el(x,1,`sui number-input ${t.class??``}`,`svelte-1g9lhq9`,S,{flex:a(),disabled:u(),readonly:d()}),Y(x,`hidden`,l())}),G(e,x),k()}var Cae=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`monospace`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`visibilityIcon`]),wae=U(`<div role="none"><!> <!></div>`),Tae={hash:`svelte-pcy1l8`,code:`.secret-input.svelte-pcy1l8 {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.secret-input.flex.svelte-pcy1l8:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.secret-input.show.svelte-pcy1l8 input {-webkit-text-security:none;}.secret-input.svelte-pcy1l8 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.secret-input.svelte-pcy1l8 input {border-start-end-radius:0;border-end-end-radius:0;-webkit-text-security:disc;}.secret-input.svelte-pcy1l8 button {flex:none;margin-block:0;margin-inline-start:-1px;margin-inline-end:0;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1;}.secret-input.svelte-pcy1l8 button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}.secret-input.svelte-pcy1l8 button .icon {font-size:var(--sui-font-size-xx-large);}`};function Rj(e,t){let n=tc();O(t,!0),J(e,Tae);let r=X(t,`value`,15),i=X(t,`flex`,3,!1),a=X(t,`monospace`,3,!0),o=X(t,`hidden`,3,!1),s=X(t,`disabled`,3,!1),c=X(t,`readonly`,3,!1),l=X(t,`required`,3,!1),u=X(t,`invalid`,3,!1),d=Al(t,Cae),f=P(void 0),p=P(!1);var m=wae();let h;var g=I(m);fm(g,Ml({dir:`ltr`},()=>d,{get id(){return n},spellcheck:`false`,get flex(){return i()},get monospace(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()},get element(){return H(f)},set element(e){F(f,e,!0)},get value(){return r()},set value(e){r(e)}}));var _=z(g,2);{let e=e=>{var n=W(),r=L(n),i=e=>{var n=W();Ac(L(n),()=>t.visibilityIcon),G(e,n)},a=e=>{{let t=N(()=>H(p)?`visibility_off`:`visibility`);Rl(e,{get name(){return H(t)}})}};q(r,e=>{t.visibilityIcon?e(i):e(a,-1)}),G(e,n)},r=N(()=>s()||c()),i=N(()=>Z(H(p)?`_sui.secret_input.hide_secret`:`_sui.secret_input.show_secret`));$f(_,{iconic:!0,get disabled(){return H(r)},get pressed(){return H(p)},get"aria-label"(){return H(i)},get"aria-controls"(){return n},onclick:()=>{F(p,!H(p))},startIcon:e,$$slots:{startIcon:!0}})}D(m),V(()=>{h=el(m,1,`sui secret-input ${t.class??``}`,`svelte-pcy1l8`,h,{flex:i(),disabled:s(),readonly:c(),show:H(p)}),Y(m,`hidden`,o())}),G(e,m),k()}var Eae=U(`<link rel="preconnect" href="https://cdn.jsdelivr.net/"/>`),Dae={hash:`svelte-1b32xse`,code:`
|
||
/* https://fontsource.org/fonts/source-sans-3/cdn */
|
||
@font-face {font-family:'Source Sans 3';font-style:normal;font-display:swap;font-weight:200 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/source-sans-3:vf@5.3.0/latin-wght-normal.woff2)
|
||
format('woff2-variations');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
||
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;size-adjust:110%;
|
||
}
|
||
|
||
/* https://fontsource.org/fonts/noto-mono/cdn */
|
||
@font-face {font-family:'Noto Mono';font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/noto-mono@5.3.0/latin-400-normal.woff2)
|
||
format('woff2');
|
||
}
|
||
|
||
/* https://fontsource.org/fonts/material-symbols-outlined/cdn */
|
||
@font-face {font-family:'Material Symbols Outlined';font-style:normal;font-display:block;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/material-symbols-outlined:vf@5.3.1/latin-wght-normal.woff2)
|
||
format('woff2-variations');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
||
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||
}.material-symbols-outlined {
|
||
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */font-family:'Material Symbols Outlined';font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;overflow-wrap:normal;direction:ltr;-moz-font-feature-settings:'liga';font-feature-settings:'liga';}`};function Oae(e){J(e,Dae),G(e,Eae())}var kae=new Set([`$$slots`,`$$events`,`$$legacy`,`orientation`,`children`]),Aae=U(`<meta name="viewport"/> <meta name="google" content="notranslate"/> <!>`,1),jae=U(`<div class="font-loader svelte-1dxpwyj" aria-hidden="true">Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span></div>`),Mae=U(`<!> <div><!></div>`,1),Nae={hash:`svelte-1dxpwyj`,code:`:root,
|
||
:host {--sui-base-hue: 210;--sui-highlight-foreground-color: hsl(var(--sui-foreground-color-1-hsl));--sui-primary-foreground-color: hsl(var(--sui-foreground-color-2-hsl));--sui-secondary-foreground-color: hsl(var(--sui-foreground-color-3-hsl));--sui-tertiary-foreground-color: hsl(var(--sui-foreground-color-4-hsl));--sui-disabled-foreground-color: hsl(var(--sui-foreground-color-5-hsl));--sui-error-foreground-color: hsl(
|
||
var(--sui-error-color-hue) var(--sui-alert-foreground-color-saturation)
|
||
var(--sui-alert-foreground-color-lightness)
|
||
);--sui-warning-foreground-color: hsl(
|
||
var(--sui-warning-color-hue) var(--sui-alert-foreground-color-saturation)
|
||
var(--sui-alert-foreground-color-lightness)
|
||
);--sui-info-foreground-color: hsl(
|
||
var(--sui-info-color-hue) var(--sui-alert-foreground-color-saturation)
|
||
var(--sui-alert-foreground-color-lightness)
|
||
);--sui-success-foreground-color: hsl(
|
||
var(--sui-success-color-hue) var(--sui-alert-foreground-color-saturation)
|
||
var(--sui-alert-foreground-color-lightness)
|
||
);--sui-hover-background-color: hsl(var(--sui-background-color-5-hsl) / 35%);--sui-selected-background-color: hsl(var(--sui-background-color-5-hsl) / 75%);--sui-active-background-color: hsl(var(--sui-background-color-5-hsl) / 100%);--sui-content-background-color: hsl(var(--sui-background-color-1-hsl));--sui-code-background-color: hsl(var(--sui-background-color-3-hsl));--sui-primary-background-color: hsl(var(--sui-background-color-2-hsl));--sui-primary-background-color-translucent: hsl(var(--sui-background-color-2-hsl) / 80%);--sui-secondary-background-color: hsl(var(--sui-background-color-3-hsl));--sui-secondary-background-color-translucent: hsl(var(--sui-background-color-3-hsl) / 80%);--sui-tertiary-background-color: hsl(var(--sui-background-color-4-hsl));--sui-tertiary-background-color-translucent: hsl(var(--sui-background-color-4-hsl) / 80%);--sui-disabled-background-color: hsl(var(--sui-background-color-4-hsl));--sui-error-background-color: hsl(
|
||
var(--sui-error-color-hue) var(--sui-alert-background-color-saturation)
|
||
var(--sui-alert-background-color-lightness)
|
||
);--sui-warning-background-color: hsl(
|
||
var(--sui-warning-color-hue) var(--sui-alert-background-color-saturation)
|
||
var(--sui-alert-background-color-lightness)
|
||
);--sui-info-background-color: hsl(
|
||
var(--sui-info-color-hue) var(--sui-alert-background-color-saturation)
|
||
var(--sui-alert-background-color-lightness)
|
||
);--sui-success-background-color: hsl(
|
||
var(--sui-success-color-hue) var(--sui-alert-background-color-saturation)
|
||
var(--sui-alert-background-color-lightness)
|
||
);--sui-focus-ring-width: 2px;--sui-focus-ring-color: var(--sui-primary-accent-color-translucent);--sui-primary-border-color: hsl(var(--sui-border-color-2-hsl));--sui-secondary-border-color: hsl(var(--sui-border-color-3-hsl));--sui-error-border-color: hsl(
|
||
var(--sui-error-color-hue) var(--sui-alert-border-color-saturation)
|
||
var(--sui-alert-border-color-lightness)
|
||
);--sui-warning-border-color: hsl(
|
||
var(--sui-warning-color-hue) var(--sui-alert-border-color-saturation)
|
||
var(--sui-alert-border-color-lightness)
|
||
);--sui-info-border-color: hsl(
|
||
var(--sui-info-color-hue) var(--sui-alert-border-color-saturation)
|
||
var(--sui-alert-border-color-lightness)
|
||
);--sui-success-border-color: hsl(
|
||
var(--sui-success-color-hue) var(--sui-alert-border-color-saturation)
|
||
var(--sui-alert-border-color-lightness)
|
||
);--sui-popup-shadow-color: hsl(var(--sui-shadow-color) / 40%);--sui-popup-backdrop-color: hsl(var(--sui-shadow-color) / 40%);--sui-font-family-default: "Source Sans 3", system-ui, sans-serif;--sui-font-size-xxx-large: 25px;--sui-font-size-xx-large: 21px;--sui-font-size-x-large: 19px;--sui-font-size-large: 17px;--sui-font-size-default: 15px;--sui-font-size-small: 13px;--sui-font-size-x-small: 11px;--sui-font-weight-normal: 400;--sui-font-weight-bold: 700;--sui-font-family-monospace: "Noto Sans Mono", ui-monospace, monospace;--sui-font-size-monospace: 0.9em;--sui-line-height-default: 1.2;--sui-line-height-compact: 1.4;--sui-line-height-comfortable: 1.6;--sui-word-spacing-normal: 1px;--sui-heading-margin: 0;--sui-heading-font-family: var(--sui-font-family-default);--sui-heading-font-weight: var(--sui-font-weight-bold);--sui-heading-line-height: var(--sui-line-height-default);--sui-paragraph-margin: 1.75em;--sui-control-small-border-width: 1px;--sui-control-small-border-radius: calc(var(--sui-control-small-height) / 8);--sui-control-small-padding: 0 calc((var(--sui-control-small-height) / 5));--sui-control-small-height: 24px;--sui-control-medium-border-width: 1px;--sui-control-medium-border-radius: calc(var(--sui-control-medium-height) / 8);--sui-control-medium-padding: 0 calc((var(--sui-control-medium-height) / 4));--sui-control-medium-height: 32px;--sui-control-large-border-width: 1px;--sui-control-large-border-radius: calc(var(--sui-control-large-height) / 8);--sui-control-large-padding: 0 calc((var(--sui-control-large-height) / 3));--sui-control-large-height: 40px;--sui-control-border-color: hsl(var(--sui-border-color-2-hsl));--sui-control-foreground-color: var(--sui-primary-foreground-color);--sui-control-background-color: hsl(var(--sui-background-color-4-hsl));--sui-control-font-family: var(--sui-font-family-default);--sui-control-font-size: var(--sui-font-size-default);--sui-control-line-height: var(--sui-line-height-compact);--sui-button-small-border-radius: var(--sui-control-small-border-radius);--sui-button-small-padding: var(--sui-control-small-padding);--sui-button-small-height: var(--sui-control-small-height);--sui-button-medium-border-radius: var(--sui-control-medium-border-radius);--sui-button-medium-padding: var(--sui-control-medium-padding);--sui-button-medium-height: var(--sui-control-medium-height);--sui-button-large-border-radius: var(--sui-control-large-border-radius);--sui-button-large-padding: var(--sui-control-large-padding);--sui-button-large-height: var(--sui-control-large-height);--sui-button-border-color: var(--sui-control-border-color);--sui-button-background-color: var(--sui-control-background-color);--sui-checkbox-border-radius: var(--sui-control-medium-border-radius);--sui-checkbox-height: 20px;--sui-checkbox-border-color: hsl(var(--sui-border-color-1-hsl));--sui-checkbox-background-color: var(--sui-control-background-color);--sui-option-border-radius: var(--sui-control-medium-border-radius);--sui-option-padding: calc((var(--sui-control-medium-height) / 6))
|
||
calc((var(--sui-control-medium-height) / 5));--sui-option-height: var(--sui-control-medium-height);--sui-listbox-border-radius: var(--sui-control-medium-border-radius);--sui-listbox-border-color: var(--sui-control-border-color);--sui-listbox-foreground-color: var(--sui-control-foreground-color);--sui-listbox-background-color: hsl(var(--sui-background-color-1-hsl));--sui-tree-border-radius: var(--sui-control-medium-border-radius);--sui-tree-border-color: var(--sui-control-border-color);--sui-tree-foreground-color: var(--sui-control-foreground-color);--sui-tree-background-color: hsl(var(--sui-background-color-1-hsl));--sui-tree-item-border-radius: var(--sui-control-medium-border-radius);--sui-tree-item-height: var(--sui-control-medium-height);--sui-tree-item-indent: 16px;--sui-textbox-border-radius: var(--sui-control-medium-border-radius);--sui-textbox-height: var(--sui-control-medium-height);--sui-textbox-border-color: var(--sui-control-border-color);--sui-textbox-foreground-color: var(--sui-control-foreground-color);--sui-textbox-background-color: hsl(var(--sui-background-color-1-hsl));--sui-textbox-font-family: var(--sui-font-family-default);--sui-textbox-font-size: var(--sui-font-size-default);--sui-textbox-singleline-padding: 0 8px;--sui-textbox-singleline-min-width: 240px;--sui-textbox-singleline-line-height: var(--sui-line-height-compact);--sui-textbox-multiline-padding: 16px;--sui-textbox-multiline-min-width: 480px;--sui-textbox-multiline-line-height: var(--sui-line-height-comfortable);--sui-tab-height: var(--sui-control-medium-height);--sui-tab-small-height: var(--sui-control-small-height);--sui-tab-medium-height: var(--sui-control-medium-height);--sui-tab-large-height: var(--sui-control-large-height);--sui-primary-toolbar-size: 56px;--sui-secondary-toolbar-size: 48px;--sui-bottom-navigation-height: var(--sui-primary-toolbar-size);--sui-primary-row-height: 56px;--sui-secondary-row-height: 40px;}
|
||
@media (pointer: coarse) {:root,
|
||
:host {--sui-control-small-height: 32px;--sui-control-medium-height: 40px;--sui-control-large-height: 48px;--sui-checkbox-height: 24px;--sui-secondary-row-height: 48px;}
|
||
}
|
||
@media (prefers-reduced-transparency) {:root,
|
||
:host {--sui-primary-background-color-translucent: hsl(var(--sui-background-color-2-hsl));--sui-secondary-background-color-translucent: hsl(var(--sui-background-color-3-hsl));--sui-tertiary-background-color-translucent: hsl(var(--sui-background-color-4-hsl));}
|
||
}:root[data-theme=light],
|
||
:host[data-theme=light] {color-scheme:light;--sui-foreground-color-1-hsl: var(--sui-base-hue) 5% 5%;--sui-foreground-color-2-hsl: var(--sui-base-hue) 5% 25%;--sui-foreground-color-3-hsl: var(--sui-base-hue) 5% 35%;--sui-foreground-color-4-hsl: var(--sui-base-hue) 5% 45%;--sui-foreground-color-5-hsl: var(--sui-base-hue) 5% 65%;--sui-background-color-1-hsl: var(--sui-base-hue) 5% 100%;--sui-background-color-2-hsl: var(--sui-base-hue) 5% 98%;--sui-background-color-3-hsl: var(--sui-base-hue) 5% 95%;--sui-background-color-4-hsl: var(--sui-base-hue) 5% 92%;--sui-background-color-5-hsl: var(--sui-base-hue) 5% 84%;--sui-border-color-1-hsl: var(--sui-base-hue) 5% 60%;--sui-border-color-2-hsl: var(--sui-base-hue) 5% 86%;--sui-border-color-3-hsl: var(--sui-base-hue) 5% 90%;--sui-shadow-color: var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 80% 45%);--sui-primary-accent-color: hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 80% 35%);--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 60%);--sui-primary-accent-color-translucent-light: hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue: 0;--sui-warning-color-hue: 40;--sui-info-color-hue: 210;--sui-success-color-hue: 100;--sui-alert-foreground-color-saturation: 85%;--sui-alert-foreground-color-lightness: 25%;--sui-alert-background-color-saturation: 65%;--sui-alert-background-color-lightness: 90%;--sui-alert-border-color-saturation: 48%;--sui-alert-border-color-lightness: 68%;}:root[data-theme=dark],
|
||
:host[data-theme=dark] {color-scheme:dark;--sui-foreground-color-1-hsl: var(--sui-base-hue) 10% 95%;--sui-foreground-color-2-hsl: var(--sui-base-hue) 10% 75%;--sui-foreground-color-3-hsl: var(--sui-base-hue) 10% 65%;--sui-foreground-color-4-hsl: var(--sui-base-hue) 10% 55%;--sui-foreground-color-5-hsl: var(--sui-base-hue) 10% 35%;--sui-background-color-1-hsl: var(--sui-base-hue) 10% 8%;--sui-background-color-2-hsl: var(--sui-base-hue) 10% 10%;--sui-background-color-3-hsl: var(--sui-base-hue) 10% 13%;--sui-background-color-4-hsl: var(--sui-base-hue) 10% 16%;--sui-background-color-5-hsl: var(--sui-base-hue) 10% 26%;--sui-border-color-1-hsl: var(--sui-base-hue) 10% 40%;--sui-border-color-2-hsl: var(--sui-base-hue) 10% 24%;--sui-border-color-3-hsl: var(--sui-base-hue) 10% 20%;--sui-shadow-color: var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 100% 60%);--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 100% 45%);--sui-primary-accent-color: hsl(var(--sui-base-hue) 100% 40%);--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 100% 35%);--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 60%);--sui-primary-accent-color-translucent-light: hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue: 0;--sui-warning-color-hue: 40;--sui-info-color-hue: 210;--sui-success-color-hue: 100;--sui-alert-foreground-color-saturation: 85%;--sui-alert-foreground-color-lightness: 75%;--sui-alert-background-color-saturation: 40%;--sui-alert-background-color-lightness: 10%;--sui-alert-border-color-saturation: 48%;--sui-alert-border-color-lightness: 38%;}
|
||
@media (prefers-color-scheme: light) {:root:not([data-theme]),
|
||
:host:not([data-theme]) {color-scheme:light;--sui-foreground-color-1-hsl: var(--sui-base-hue) 5% 5%;--sui-foreground-color-2-hsl: var(--sui-base-hue) 5% 25%;--sui-foreground-color-3-hsl: var(--sui-base-hue) 5% 35%;--sui-foreground-color-4-hsl: var(--sui-base-hue) 5% 45%;--sui-foreground-color-5-hsl: var(--sui-base-hue) 5% 65%;--sui-background-color-1-hsl: var(--sui-base-hue) 5% 100%;--sui-background-color-2-hsl: var(--sui-base-hue) 5% 98%;--sui-background-color-3-hsl: var(--sui-base-hue) 5% 95%;--sui-background-color-4-hsl: var(--sui-base-hue) 5% 92%;--sui-background-color-5-hsl: var(--sui-base-hue) 5% 84%;--sui-border-color-1-hsl: var(--sui-base-hue) 5% 60%;--sui-border-color-2-hsl: var(--sui-base-hue) 5% 86%;--sui-border-color-3-hsl: var(--sui-base-hue) 5% 90%;--sui-shadow-color: var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 80% 45%);--sui-primary-accent-color: hsl(var(--sui-base-hue) 80% 40%);--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 80% 35%);--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 60%);--sui-primary-accent-color-translucent-light: hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue: 0;--sui-warning-color-hue: 40;--sui-info-color-hue: 210;--sui-success-color-hue: 100;--sui-alert-foreground-color-saturation: 85%;--sui-alert-foreground-color-lightness: 25%;--sui-alert-background-color-saturation: 65%;--sui-alert-background-color-lightness: 90%;--sui-alert-border-color-saturation: 48%;--sui-alert-border-color-lightness: 68%;}
|
||
}
|
||
@media (prefers-color-scheme: dark) {:root:not([data-theme]),
|
||
:host:not([data-theme]) {color-scheme:dark;--sui-foreground-color-1-hsl: var(--sui-base-hue) 10% 95%;--sui-foreground-color-2-hsl: var(--sui-base-hue) 10% 75%;--sui-foreground-color-3-hsl: var(--sui-base-hue) 10% 65%;--sui-foreground-color-4-hsl: var(--sui-base-hue) 10% 55%;--sui-foreground-color-5-hsl: var(--sui-base-hue) 10% 35%;--sui-background-color-1-hsl: var(--sui-base-hue) 10% 8%;--sui-background-color-2-hsl: var(--sui-base-hue) 10% 10%;--sui-background-color-3-hsl: var(--sui-base-hue) 10% 13%;--sui-background-color-4-hsl: var(--sui-base-hue) 10% 16%;--sui-background-color-5-hsl: var(--sui-base-hue) 10% 26%;--sui-border-color-1-hsl: var(--sui-base-hue) 10% 40%;--sui-border-color-2-hsl: var(--sui-base-hue) 10% 24%;--sui-border-color-3-hsl: var(--sui-base-hue) 10% 20%;--sui-shadow-color: var(--sui-base-hue) 10% 0%;--sui-primary-accent-color-text: hsl(var(--sui-base-hue) 100% 60%);--sui-primary-accent-color-light: hsl(var(--sui-base-hue) 100% 45%);--sui-primary-accent-color: hsl(var(--sui-base-hue) 100% 40%);--sui-primary-accent-color-dark: hsl(var(--sui-base-hue) 100% 35%);--sui-primary-accent-color-inverted: hsl(var(--sui-base-hue) 10% 100%);--sui-primary-accent-color-translucent: hsl(var(--sui-base-hue) 80% 50% / 60%);--sui-primary-accent-color-translucent-light: hsl(var(--sui-base-hue) 80% 50% / 40%);--sui-error-color-hue: 0;--sui-warning-color-hue: 40;--sui-info-color-hue: 210;--sui-success-color-hue: 100;--sui-alert-foreground-color-saturation: 85%;--sui-alert-foreground-color-lightness: 75%;--sui-alert-background-color-saturation: 40%;--sui-alert-background-color-lightness: 10%;--sui-alert-border-color-saturation: 48%;--sui-alert-border-color-lightness: 38%;}
|
||
}.material-symbols-outlined {font-variation-settings:"FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;}*,
|
||
::before,
|
||
::after {overflow-anchor:none;scroll-behavior:smooth;box-sizing:border-box;outline-offset:0px;outline-width:var(--sui-focus-ring-width) !important;outline-style:solid;outline-color:transparent;border-width:0;border-style:solid;vertical-align:top;font-size-adjust:inherit;}
|
||
@media (prefers-reduced-motion) {*,
|
||
::before,
|
||
::after {scroll-behavior:auto;transition-duration:1ms !important;}
|
||
}::selection {background-color:var(--sui-primary-accent-color-translucent-light);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-focus-ring-color);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 34px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 30px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 26px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 22px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 18px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 14px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-1dxpwyj a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-1dxpwyj {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-1dxpwyj {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-1dxpwyj {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-1dxpwyj {display:flex;flex-direction:column;overflow:hidden;}`};function Pae(e,t){O(t,!0),J(e,Nae);let n=X(t,`orientation`,3,`horizontal`),r=Al(t,kae),i=P(!1);Nl(()=>{let e=globalThis.matchMedia(`(prefers-color-scheme: dark)`),{dataset:t}=document.documentElement,n=()=>{t.autoTheming!==`false`&&(t.theme=e.matches?`dark`:`light`)};n(),e.addEventListener(`change`,n);let r=globalThis.setTimeout(()=>{F(i,!0)},1e3);return()=>{e.removeEventListener(`change`,n),globalThis.clearTimeout(r)}});var a=Mae();Wc(`1dxpwyj`,e=>{var t=Aae(),n=L(t);Oae(z(n,4),{}),V(e=>Y(n,`content`,e),[()=>[`width=device-width`,`initial-scale=1`,`maximum-scale=1`,`interactive-widget=resizes-content`].join(`, `)]),G(e,t)});var o=L(a),s=e=>{var t=jae();nl(t,``,{},{opacity:`0`}),G(e,t)};q(o,e=>{H(i)||e(s)});var c=z(o,2),l=e=>e.preventDefault(),u=e=>e.preventDefault(),d=e=>{if(document.documentElement.matches(`[data-env="dev"]`))return;let t=e.target;document.documentElement.matches(`[data-env="dev"]`)||t?.matches(`input, textarea`)&&`maxLength`in t||t?.closest(`[role="textbox"]`)?.contentEditable===`true`||e.preventDefault()};bl(c,()=>({...r,role:`none`,class:`sui app-shell ${n()??``}`,ondragover:l,ondrop:u,oncontextmenu:d}),void 0,void 0,void 0,`svelte-1dxpwyj`),Ac(I(c),()=>t.children??br),D(c),G(e,a),k()}var Fae=U(`<div role="none" class="sui empty-state svelte-gaolqk"><!></div>`),Iae={hash:`svelte-gaolqk`,code:`.empty-state.svelte-gaolqk {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}`};function zj(e,t){J(e,Iae);let n=X(t,`children`,3,void 0);var r=Fae();Ac(I(r),()=>n()??br),D(r),G(e,r)}var Lae=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`ariaLabel`,`children`]),Rae=U(`<div><div role="none" class="inner svelte-21zml2"><!></div></div>`),zae={hash:`svelte-21zml2`,code:`.inner.svelte-21zml2 {display:contents;}`};function Bj(e,t){J(e,zae);let n=X(t,`hidden`,3,!1),r=X(t,`disabled`,3,!1),i=X(t,`ariaLabel`,3,void 0),a=Al(t,Lae);var o=Rae();bl(o,()=>({...a,role:`group`,class:`sui group ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-label":i()}),void 0,void 0,void 0,`svelte-21zml2`);var s=I(o);Ac(I(s),()=>t.children??br),D(s),D(o),V(()=>s.inert=r()),G(e,o)}var Bae=U(`<div class="placeholder svelte-mtvt5w"></div>`),Vae={hash:`svelte-mtvt5w`,code:`.placeholder.svelte-mtvt5w {height:64px;}`};function Vj(e,t){O(t,!0),J(e,Vae);let n=P(null),r=P(!1);B(()=>(H(n)&&(async()=>{await Ff(H(n)),F(r,!0)})(),()=>{H(n)&&jf(H(n))}));var i=W(),a=L(i),o=e=>{var n=W();Ac(L(n),()=>t.children),G(e,n)},s=e=>{var t=Bae();Ol(t,e=>F(n,e),()=>H(n)),G(e,t)};q(a,e=>{H(r)?e(o):e(s,-1)}),G(e,i),k()}var Hae={ok:`OK`,cancel:`Cancel`,close:`Close`,clear:`Clear`,insert:`Insert`,update:`Update`,remove:`Remove`,collapse:`Collapse`,expand:`Expand`,dismiss:`Dismiss`,emoji_suggestions:`Emoji Suggestions`,calendar:{year:`Year`,previous_decade:`Previous Decade`,next_decade:`Next Decade`,month:`Month`,previous_month:`Previous Month`,next_month:`Next Month`,today:`Today`},split_button:{x_options:`{$name} Options`,more_options:`More Options`},combobox:{select_an_option:`Select an option…`,filter_options:`Filter Options`,no_matching_options:`No matching options found`},number_input:{increase:`Increase`,decrease:`Decrease`},password_input:{show_password:`Show Password`,hide_password:`Hide Password`},secret_input:{show_secret:`Show Secret`,hide_secret:`Hide Secret`},select_tags:{selected_options:`Selected Options`,remove_x:`Remove {$name}`},text_editor:{text_editor:`Text Editor`,code_editor:`Code Editor`,text_style_options:`Text Style Options`,show_text_style_options:`Show Text Style Options`,paragraph:`Paragraph`,heading_1:`Heading 1`,heading_2:`Heading 2`,heading_3:`Heading 3`,heading_4:`Heading 4`,heading_5:`Heading 5`,heading_6:`Heading 6`,bulleted_list:`Bulleted List`,numbered_list:`Numbered List`,blockquote:`Block Quote`,code_block:`Code Block`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,link:`Link`,insert_link:`Insert Link`,update_link:`Update Link`,text:`Text`,url:`URL`,edit_in_markdown:`Edit in Markdown`,converter_error:`Unable to enable rich text mode. Please use the plain text editor instead.`,language:`Language`,plain_text:`Plain Text`}};function Hj(e,t){var n=is,r=ts,i=e();let a=na(i,t=>{var a=i!==e(),o,s=ts,c=is;rs(r),as(n);try{o=jo(()=>{Fo(()=>{let n=e();a&&t(n)})})}finally{rs(s),as(c)}return a=!0,o});return t?{set:t,update:n=>t(n(e())),subscribe:a.subscribe}:{subscribe:a.subscribe}}var Uj=(e=``)=>RegExp(`\\bblob:${NA(globalThis.location.origin)}\\/${wf.source}\\b`,e),Wj=/(?:(.+?)\/)?(([^/]+?)(?:\.((?:tar\.)?[a-zA-Z0-9]+))?)$/,Gj=[`application/atom+xml`,`application/javascript`,`application/json`,`application/ld+json`,`application/rss+xml`,`application/xhtml+xml`,`application/xml`,`application/yaml`,`image/svg+xml`],Kj=e=>e.startsWith(`text/`)||Gj.includes(e),qj=e=>{let[,t,n,r,i]=e.match(Wj)??[];return{dirname:t,basename:n,filename:r,extension:i}},Jj=(e,t)=>{if(!t.length)return!0;let n=e.name.toLowerCase();return t.some(t=>{let r=t.toLowerCase();if(r.startsWith(`.`))return n.endsWith(r);let[i,a]=r.split(`/`);return a===`*`?e.type.split(`/`)[0]===i:e.type===r})},Yj=async({items:e},{accept:t}={})=>{let n=t?t.trim().split(/,\s*/):[],r=e=>new Promise(t=>{if(e.name.startsWith(`.`))t(null);else if(e.isFile)e.file(e=>{t(Jj(e,n)?e:null)},()=>{t(null)});else{let n=e.createReader(),i=[],a=()=>{n.readEntries(e=>{e.length?(i.push(...e),a()):t(Promise.all(i.map(r)))})};a()}});return(await Promise.all([...e].map(e=>{let t=e.webkitGetAsEntry();return t?r(t):null}))).flat(1/0).filter(Boolean).sort((e,t)=>e.name.localeCompare(t.name))},Xj=async e=>(await e.text()).replace(/\r\n?/g,`
|
||
`),Zj=async e=>{let t=typeof e==`string`?new Blob([e],{type:`text/plain`}):e;return new Uint8Array(await t.arrayBuffer()).toBase64()},Qj=async e=>{let t=Uint8Array.fromBase64(e);return new TextDecoder().decode(t)},$j=(e,t)=>{let n=document.createElement(`a`),r=URL.createObjectURL(e);n.download=t??e.name??`${Date.now()}.${e.type.split(`/`)[1]}`,n.href=r,n.click(),globalThis.setTimeout(()=>{URL.revokeObjectURL(r)},0)};function eM(e){return e&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}function tM(e){return e}function nM(e,t){t||={};let n=t.delimiter||`.`,r=t.maxDepth,i=t.transformKey||tM,a={};function o(e,s,c){c||=1,Object.keys(e).forEach(function(l){let u=e[l],d=t.safe&&Array.isArray(u),f=Object.prototype.toString.call(u),p=eM(u),m=f===`[object Object]`||f===`[object Array]`,h=s?s+n+i(l):i(l);if(!d&&!p&&m&&Object.keys(u).length&&(!t.maxDepth||c<r))return o(u,h,c+1);a[h]=u})}return o(e),a}function rM(e,t){t||={};let n=t.delimiter||`.`,r=t.overwrite||!1,i=t.transformKey||tM,a={};if(eM(e)||Object.prototype.toString.call(e)!==`[object Object]`)return e;function o(e){let n=Number(e);return isNaN(n)||e.indexOf(`.`)!==-1||t.object?e:n}function s(e,t,r){return Object.keys(r).reduce(function(t,i){return t[e+n+i]=r[i],t},t)}function c(e){let t=Object.prototype.toString.call(e),n=t===`[object Array]`,r=t===`[object Object]`;if(!e)return!0;if(n)return!e.length;if(r)return!Object.keys(e).length}return e=Object.keys(e).reduce(function(n,r){let i=Object.prototype.toString.call(e[r]);return i!==`[object Object]`&&i!==`[object Array]`||c(e[r])?(n[r]=e[r],n):s(r,n,nM(e[r],t))},{}),Object.keys(e).forEach(function(s){let c=s.split(n).map(i),l=o(c.shift()),u=o(c[0]),d=a;for(;u!==void 0;){if(l===`__proto__`)return;let e=Object.prototype.toString.call(d[l]),n=e===`[object Object]`||e===`[object Array]`;if(!r&&!n&&d[l]!==void 0)return;(r&&!n||!r&&d[l]==null)&&(d[l]=typeof u==`number`&&!t.object?[]:{}),d=d[l],c.length>0&&(l=o(c.shift()),u=o(c[0]))}d[l]=rM(e[s],t)}),a}var iM=/{{(.+?)}}/,aM=new RegExp(iM.source,`g`),oM=/\\\{\\\{.+?\\\}\\\}/g,sM=[`year`,`month`,`day`,`hour`,`minute`,`second`],cM=/^{{(?<innerTag>.+?)}}$/,lM=na([]),uM=ra([lM],([e],t)=>{t(e.find(({collectionName:e,internalPath:t})=>e===void 0&&t!==void 0))}),dM=na(),fM=ra([dM,uM],([e,t])=>e?.internalPath===void 0?t:e),pM=e=>{let t=`typedKeyPath`in e?e.typedKeyPath?.match(/[^:]+$/)?.[0]:e.typedKeyPath;return A(lM).find(n=>(`typedKeyPath`in e?n.typedKeyPath===t:!n.typedKeyPath)?`componentName`in e?n.componentName===e.componentName:n.collectionName===e.collectionName&&n.fileName===e.fileName&&(`isIndexFile`in e?n.isIndexFile===e.isIndexFile:!n.isIndexFile):!1)},mM={source:void 0,items:[],entryRelative:[]},hM=()=>{let e=A(lM);if(e===mM.source)return mM;let t=[],n=[];return e.forEach(e=>{let{internalPath:r,entryRelative:i}=e;if(r!==void 0){if(i)n.push(e);else{let n=NA(r).replace(oM,`.+?`);t.push({folder:e,regexSub:RegExp(`^${n}${r?`(?=\\/|$)`:`$`}`),regexExact:RegExp(`^${n}$`)})}}}),mM.source=e,mM.items=t,mM.entryRelative=n,mM},gM=(e,{matchSubFolders:t=!0}={})=>{let{filename:n,dirname:r}=qj(e);if(n.startsWith(`+`))return[];let{items:i,entryRelative:a}=hM(),o=r??``;return[...a.filter(({internalPath:t})=>e.startsWith(`${t}/`)),...i.filter(({regexSub:e,regexExact:n})=>(t?e:n).test(o)).map(({folder:e})=>e)].sort((e,t)=>t.internalPath.localeCompare(e.internalPath))},_M=e=>!!e&&!e.entryRelative&&!e.hasTemplateTags,vM=l(s(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(r[i]=p(e,i)&&n.isMergeableObject(t[i])?u(i,n)(e[i],t[i],n):c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))(),1),yM=Symbol.for(`yaml.alias`),bM=Symbol.for(`yaml.document`),xM=Symbol.for(`yaml.map`),SM=Symbol.for(`yaml.pair`),CM=Symbol.for(`yaml.scalar`),wM=Symbol.for(`yaml.seq`),TM=Symbol.for(`yaml.node.type`),EM=e=>!!e&&typeof e==`object`&&e[TM]===yM,DM=e=>!!e&&typeof e==`object`&&e[TM]===bM,OM=e=>!!e&&typeof e==`object`&&e[TM]===xM,kM=e=>!!e&&typeof e==`object`&&e[TM]===SM,AM=e=>!!e&&typeof e==`object`&&e[TM]===CM,jM=e=>!!e&&typeof e==`object`&&e[TM]===wM;function MM(e){if(e&&typeof e==`object`)switch(e[TM]){case xM:case wM:return!0}return!1}function NM(e){if(e&&typeof e==`object`)switch(e[TM]){case yM:case xM:case CM:case wM:return!0}return!1}var PM=e=>(AM(e)||MM(e))&&!!e.anchor,FM=Symbol(`break visit`),IM=Symbol(`skip children`),LM=Symbol(`remove node`);function RM(e,t){let n=BM(t);DM(e)?zM(null,e.contents,n,Object.freeze([e]))===LM&&(e.contents=null):zM(null,e,n,Object.freeze([]))}RM.BREAK=FM,RM.SKIP=IM,RM.REMOVE=LM;function zM(e,t,n,r){let i=VM(e,t,n,r);if(NM(i)||kM(i))return HM(e,r,i),zM(e,i,n,r);if(typeof i!=`symbol`){if(MM(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=zM(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===FM)return FM;else i===LM&&(t.items.splice(e,1),--e)}}else if(kM(t)){r=Object.freeze(r.concat(t));let e=zM(`key`,t.key,n,r);if(e===FM)return FM;e===LM&&(t.key=null);let i=zM(`value`,t.value,n,r);if(i===FM)return FM;i===LM&&(t.value=null)}}return i}function BM(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function VM(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(OM(t))return n.Map?.(e,t,r);if(jM(t))return n.Seq?.(e,t,r);if(kM(t))return n.Pair?.(e,t,r);if(AM(t))return n.Scalar?.(e,t,r);if(EM(t))return n.Alias?.(e,t,r)}function HM(e,t,n){let r=t[t.length-1];if(MM(r))r.items[e]=n;else if(kM(r))e===`key`?r.key=n:r.value=n;else if(DM(r))r.contents=n;else{let e=EM(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var UM={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},WM=e=>e.replace(/[!,[\]{}]/g,e=>UM[e]),GM=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+WM(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&NM(e.contents)){let t={};RM(e.contents,(e,n)=>{NM(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
||
`)}};GM.defaultYaml={explicit:!1,version:`1.2`},GM.defaultTags={"!!":`tag:yaml.org,2002:`};function KM(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function qM(e){let t=new Set;return RM(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function JM(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function YM(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=qM(e);let a=JM(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(AM(t.node)||MM(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function XM(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=XM(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=XM(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=XM(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=XM(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ZM(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ZM(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!PM(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var QM=class{constructor(e){Object.defineProperty(this,TM,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!DM(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=ZM(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?XM(i,{"":o},``,o):o}},$M=class extends QM{constructor(e){super(yM),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],RM(e,{Node:(e,t)=>{(EM(t)||PM(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(ZM(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=eN(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(KM(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function eN(e,t,n){if(EM(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(MM(t)){let r=0;for(let i of t.items){let t=eN(e,i,n);t>r&&(r=t)}return r}if(kM(t)){let r=eN(e,t.key,n),i=eN(e,t.value,n);return Math.max(r,i)}return 1}var tN=e=>!e||typeof e!=`function`&&typeof e!=`object`,nN=class extends QM{constructor(e){super(CM),this.value=e}toJSON(e,t){return t?.keep?this.value:ZM(this.value,e,t)}toString(){return String(this.value)}};nN.BLOCK_FOLDED=`BLOCK_FOLDED`,nN.BLOCK_LITERAL=`BLOCK_LITERAL`,nN.PLAIN=`PLAIN`,nN.QUOTE_DOUBLE=`QUOTE_DOUBLE`,nN.QUOTE_SINGLE=`QUOTE_SINGLE`;var rN=`tag:yaml.org,2002:`;function iN(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function aN(e,t,n){if(DM(e)&&(e=e.contents),NM(e))return e;if(kM(e)){let t=n.schema[xM].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new $M(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=rN+t.slice(2));let l=iN(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new nN(e);return c&&(c.node=t),t}l=e instanceof Map?o[xM]:Symbol.iterator in Object(e)?o[wM]:o[xM]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new nN(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function oN(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return aN(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var sN=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,cN=class extends QM{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>NM(t)||kM(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(sN(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(MM(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,oN(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(MM(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&AM(i)?i.value:i:MM(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!kM(t))return!1;let n=t.value;return n==null||e&&AM(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return MM(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(MM(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,oN(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},lN=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function uN(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var dN=(e,t,n)=>e.endsWith(`
|
||
`)?uN(n,t):n.includes(`
|
||
`)?`
|
||
`+uN(n,t):(e.endsWith(` `)?``:` `)+n,fN=`flow`,pN=`block`,mN=`quoted`;function hN(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=gN(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
||
`)n===`block`&&(h=gN(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
||
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
||
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function gN(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
||
`);r=t,i=t+1,a=e[i]}return r}var _N=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),vN=e=>/^(%|---|\.\.\.)/m.test(e);function yN(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
||
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function bN(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(vN(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
||
|
||
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
||
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:hN(o,a,mN,_N(t,!1))}function xN(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
||
`)||/[ \t]\n|\n[ \t]/.test(e))return bN(e,t);let n=t.indent||(vN(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:hN(r,n,fN,_N(t,!1))}function SN(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=bN;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?xN:i&&!t?bN:n?xN:bN}return r(e,t)}var CN;try{CN=RegExp(`(^|(?<!
|
||
))
|
||
+(?!
|
||
|$)`,`g`)}catch{CN=/\n+(?!\n|$)/g}function wN({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return SN(n,r);let l=r.indent||(r.forceBlockIndent||vN(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===nN.BLOCK_FOLDED?!1:t===nN.BLOCK_LITERAL||!yN(n,c,l.length);if(!n)return u?`|
|
||
`:`>
|
||
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
||
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
||
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
||
`&&(p=p.slice(0,-1)),p.replace(CN,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
||
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=_N(r,!0);o!==`folded`&&t!==nN.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=hN(`${v}${e}${p}`,l,pN,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function TN(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
||
`)||u&&/[[\]{},]/.test(a))return SN(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
||
`)?SN(a,t):wN(e,t,n,r);if(!s&&!u&&i!==nN.PLAIN&&a.includes(`
|
||
`))return wN(e,t,n,r);if(vN(a)){if(c===``)return t.forceBlockIndent=!0,wN(e,t,n,r);if(s&&c===l)return SN(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return SN(a,t)}return s?d:hN(d,c,fN,_N(t,!1))}function EN(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==nN.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=nN.QUOTE_DOUBLE);let c=e=>{switch(e){case nN.BLOCK_FOLDED:case nN.BLOCK_LITERAL:return i||a?SN(o.value,t):wN(o,t,n,r);case nN.QUOTE_DOUBLE:return bN(o.value,t);case nN.QUOTE_SINGLE:return xN(o.value,t);case nN.PLAIN:return TN(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function DN(e,t){let n=Object.assign({blockQuote:!0,commentString:lN,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function ON(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(AM(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function kN(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(AM(e)||MM(e))&&e.anchor;a&&KM(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function AN(e,t,n,r){if(kM(e))return e.toString(t,n,r);if(EM(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=NM(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=ON(t.doc.schema.tags,a);let o=kN(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):AM(a)?EN(a,t,n,r):a.toString(t,n,r);return o?AM(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function jN({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=NM(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(MM(e)||!NM(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||MM(e)||(AM(e)?e.type===nN.BLOCK_FOLDED||e.type===nN.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=AN(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=dN(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=dN(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=dN(g,n.indent,l(f))));let _,v,y;NM(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&AM(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&jM(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=AN(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
||
`:``,v){let e=l(v);S+=`\n${uN(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
||
`&&y&&(S=`
|
||
|
||
`):S+=`\n${n.indent}`}else if(!p&&MM(t)){let e=x[0],r=x.indexOf(`
|
||
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
||
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=dN(g,n.indent,l(y)):h&&i&&i(),g}function MN(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var NN=`<<`,PN={identify:e=>e===NN||typeof e==`symbol`&&e.description===NN,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new nN(Symbol(NN)),{addToJSMap:IN}),stringify:()=>NN},FN=(e,t)=>(PN.identify(t)||AM(t)&&(!t.type||t.type===nN.PLAIN)&&PN.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===PN.tag&&e.default);function IN(e,t,n){let r=RN(e,n);if(jM(r))for(let n of r.items)LN(e,t,n);else if(Array.isArray(r))for(let n of r)LN(e,t,n);else LN(e,t,r)}function LN(e,t,n){let r=RN(e,n);if(!OM(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function RN(e,t){return e&&EM(t)?t.resolve(e.doc,e):t}function zN(e,t,{key:n,value:r}){if(NM(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(FN(e,n))IN(e,t,r);else{let i=ZM(n,``,e);if(t instanceof Map)t.set(i,ZM(r,i,e));else if(t instanceof Set)t.add(i);else{let a=BN(n,i,e),o=ZM(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function BN(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(NM(e)&&n?.doc){let t=DN(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),MN(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function VN(e,t,n){return new HN(aN(e,void 0,n),aN(t,void 0,n))}var HN=class e{constructor(e,t=null){Object.defineProperty(this,TM,{value:SM}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return NM(n)&&(n=n.clone(t)),NM(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return zN(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?jN(this,e,t,n):JSON.stringify(this)}};function UN(e,t,n){return(t.inFlow??e.flow?GN:WN)(e,t,n)}function WN({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(NM(i))!d&&i.spaceBefore&&f.push(``),KN(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(kM(i)){let e=NM(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),KN(n,f,e.commentBefore,d))}d=!1;let s=AN(i,u,()=>o=null,()=>d=!0);o&&(s+=dN(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
||
`}}return e?(p+=`
|
||
`+uN(l(e),c),s&&s()):d&&o&&o(),p}function GN({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(NM(i))i.spaceBefore&&d.push(``),KN(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(kM(i)){let e=NM(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),KN(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=NM(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=AN(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
||
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=dN(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
||
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function KN({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=uN(t(r),e);n.push(i.trimStart())}}function qN(e,t){let n=AM(t)?t.value:t;for(let r of e)if(kM(r)&&(r.key===t||r.key===n||AM(r.key)&&r.key.value===n))return r}var JN=class extends cN{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(xM,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(VN(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=kM(e)?e:!e||typeof e!=`object`||!(`key`in e)?new HN(e,e?.value):new HN(e.key,e.value);let r=qN(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);AM(r.value)&&tN(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=qN(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=qN(this.items,e)?.value;return(!t&&AM(n)?n.value:n)??void 0}has(e){return!!qN(this.items,e)}set(e,t){this.add(new HN(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)zN(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!kM(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),UN(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},YN={collection:`map`,default:!0,nodeClass:JN,tag:`tag:yaml.org,2002:map`,resolve(e,t){return OM(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>JN.from(e,t,n)},XN=class extends cN{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(wM,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ZN(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=ZN(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&AM(r)?r.value:r}has(e){let t=ZN(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=ZN(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];AM(r)&&tN(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(ZM(e,String(r++),t));return n}toString(e,t,n){return e?UN(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(aN(a,void 0,n))}}return i}};function ZN(e){let t=AM(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var QN={collection:`seq`,default:!0,nodeClass:XN,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return jM(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>XN.from(e,t,n)},$N={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),EN(e,t,n,r)}},eP={identify:e=>e==null,createNode:()=>new nN(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new nN(null),stringify:({source:e},t)=>typeof e==`string`&&eP.test.test(e)?e:t.options.nullStr},tP={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new nN(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&tP.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function nP({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var rP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:nP},iP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():nP(e)}},aP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new nN(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:nP},oP=e=>typeof e==`bigint`||Number.isInteger(e),sP=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function cP(e,t,n){let{value:r}=e;return oP(r)&&r>=0?n+r.toString(t):nP(e)}var lP={identify:e=>oP(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>sP(e,2,8,n),stringify:e=>cP(e,8,`0o`)},uP={identify:oP,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>sP(e,0,10,n),stringify:nP},dP={identify:e=>oP(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>sP(e,2,16,n),stringify:e=>cP(e,16,`0x`)},fP=[YN,QN,$N,eP,tP,lP,uP,dP,rP,iP,aP];function pP(e){return typeof e==`bigint`||Number.isInteger(e)}var mP=({value:e})=>JSON.stringify(e),hP=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:mP},{identify:e=>e==null,createNode:()=>new nN(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:mP},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:mP},{identify:pP,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>pP(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:mP}],gP=[YN,QN].concat(hP,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),_P={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=nN.BLOCK_LITERAL,t!==nN.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===nN.BLOCK_LITERAL?`
|
||
`:` `)}return EN({comment:e,type:t,value:s},r,i,a)}};function vP(e,t){if(jM(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!kM(r)){if(OM(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new HN(new nN(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=kM(r)?r:new HN(r)}}else t(`Expected a sequence for this tag`);return e}function yP(e,t,n){let{replacer:r}=n,i=new XN(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(VN(o,s,n))}return i}var bP={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:vP,createNode:yP},xP=class e extends XN{constructor(){super(),this.add=JN.prototype.add.bind(this),this.delete=JN.prototype.delete.bind(this),this.get=JN.prototype.get.bind(this),this.has=JN.prototype.has.bind(this),this.set=JN.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(kM(e)?(r=ZM(e.key,``,t),i=ZM(e.value,r,t)):r=ZM(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=yP(e,t,n),i=new this;return i.items=r.items,i}};xP.tag=`tag:yaml.org,2002:omap`;var SP={collection:`seq`,identify:e=>e instanceof Map,nodeClass:xP,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=vP(e,t),r=[];for(let{key:e}of n.items)AM(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new xP,n)},createNode:(e,t,n)=>xP.from(e,t,n)};function CP({value:e,source:t},n){return t&&(e?wP:TP).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var wP={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new nN(!0),stringify:CP},TP={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new nN(!1),stringify:CP},EP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:nP},DP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():nP(e)}},OP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new nN(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:nP},kP=e=>typeof e==`bigint`||Number.isInteger(e);function AP(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function jP(e,t,n){let{value:r}=e;if(kP(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return nP(e)}var MP={identify:kP,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>AP(e,2,2,n),stringify:e=>jP(e,2,`0b`)},NP={identify:kP,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>AP(e,1,8,n),stringify:e=>jP(e,8,`0`)},PP={identify:kP,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>AP(e,0,10,n),stringify:nP},FP={identify:kP,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>AP(e,2,16,n),stringify:e=>jP(e,16,`0x`)},IP=class e extends JN{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=kM(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new HN(e.key,null):new HN(e,null),qN(this.items,t.key)||this.items.push(t)}get(e,t){let n=qN(this.items,e);return!t&&kM(n)?AM(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=qN(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new HN(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(VN(e,null,n));return i}};IP.tag=`tag:yaml.org,2002:set`;var LP={collection:`map`,identify:e=>e instanceof Set,nodeClass:IP,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>IP.from(e,t,n),resolve(e,t){if(OM(e)){if(e.hasAllNullValues(!0))return Object.assign(new IP,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function RP(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function zP(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return nP(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var BP={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>RP(e,n),stringify:zP},VP={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>RP(e,!1),stringify:zP},HP={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(HP.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=RP(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},UP=[YN,QN,$N,eP,wP,TP,MP,NP,PP,FP,EP,DP,OP,_P,PN,SP,bP,LP,BP,VP,HP],WP=new Map([[`core`,fP],[`failsafe`,[YN,QN,$N]],[`json`,gP],[`yaml11`,UP],[`yaml-1.1`,UP]]),GP={binary:_P,bool:tP,float:aP,floatExp:iP,floatNaN:rP,floatTime:VP,int:uP,intHex:dP,intOct:lP,intTime:BP,map:YN,merge:PN,null:eP,omap:SP,pairs:bP,seq:QN,set:LP,timestamp:HP},KP={"tag:yaml.org,2002:binary":_P,"tag:yaml.org,2002:merge":PN,"tag:yaml.org,2002:omap":SP,"tag:yaml.org,2002:pairs":bP,"tag:yaml.org,2002:set":LP,"tag:yaml.org,2002:timestamp":HP};function qP(e,t,n){let r=WP.get(t);if(r&&!e)return n&&!r.includes(PN)?r.concat(PN):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(WP.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(PN)),i.reduce((e,t)=>{let n=typeof t==`string`?GP[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(GP).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var JP=(e,t)=>e.key<t.key?-1:+(e.key>t.key),YP=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?qP(e,`compat`):e?qP(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?KP:{},this.tags=qP(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,xM,{value:YN}),Object.defineProperty(this,CM,{value:$N}),Object.defineProperty(this,wM,{value:QN}),this.sortMapEntries=typeof a==`function`?a:a===!0?JP:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function XP(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=DN(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(uN(t,``))}let o=!1,s=null;if(e.contents){if(NM(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(uN(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=AN(e.contents,i,()=>s=null,t);s&&(c+=dN(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(AN(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
|
||
`)?(n.push(`...`),n.push(uN(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(uN(a(t),``)))}return n.join(`
|
||
`)+`
|
||
`}var ZP=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,TM,{value:bM});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new GM({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[TM]:{value:bM}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=NM(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){QP(this.contents)&&this.contents.add(e)}addIn(e,t){QP(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=qM(this);e.anchor=!t||n.has(t)?JM(t||`a`,n):t}return new $M(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=YM(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=aN(e,l,p);return o&&MM(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new HN(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return QP(this.contents)?this.contents.delete(e):!1}deleteIn(e){return sN(e)?this.contents!=null&&(this.contents=null,!0):QP(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return MM(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return sN(e)?!t&&AM(this.contents)?this.contents.value:this.contents:MM(this.contents)?this.contents.getIn(e,t):void 0}has(e){return MM(this.contents)?this.contents.has(e):!1}hasIn(e){return sN(e)?this.contents!==void 0:MM(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=oN(this.schema,[e],t):QP(this.contents)&&this.contents.set(e,t)}setIn(e,t){sN(e)?this.contents=t:this.contents==null?this.contents=oN(this.schema,Array.from(e),t):QP(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new GM({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new GM({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new YP(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=ZM(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?XM(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return XP(this,e)}};function QP(e){if(MM(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var $P=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},eF=class extends $P{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},tF=class extends $P{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},nF=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
||
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function rF(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function iF(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
||
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(iF(t.key)||iF(t.value))return!0}return!1;default:return!0}}function aF(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&iF(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function oF(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||AM(e)&&AM(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var sF=`All mapping items must start at the same column`;function cF({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??JN)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=rF(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,sF)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
||
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||iF(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,sF);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&aF(r.indent,u,i),n.atKey=!1,oF(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=rF(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&aF(r.indent,f,i),s=c.range[2];let l=new HN(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
||
`+_.comment:g.comment=_.comment);let e=new HN(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function lF({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??XN)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=rF(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&aF(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function uF(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var dF=`Block collections are not allowed within flow collections`,fF=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function pF({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?JN:XN))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=rF(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
||
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&iF(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];kM(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
||
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],fF(m)&&i(r.range,`BLOCK_IN_FLOW`,dF)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);fF(f)&&i(g.range,`BLOCK_IN_FLOW`,dF),n.atKey=!1;let _=rF(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?fF(m)&&i(v.range,`BLOCK_IN_FLOW`,dF):_.comment&&(g.comment?g.comment+=`
|
||
`+_.comment:g.comment=_.comment);let y=new HN(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;oF(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new JN(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=uF(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
||
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function mF(e,t,n,r,i,a){let o=n.type===`block-map`?cF(e,t,n,r,a):n.type===`block-seq`?lF(e,t,n,r,a):pF(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function hF(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===JN.tagName&&s===`map`||o===XN.tagName&&s===`seq`)return mF(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),mF(e,t,n,i,o)}let l=mF(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=NM(u)?u:new nN(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function gF(e,t,n){let r=t.offset,i=_F(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?nN.BLOCK_FOLDED:nN.BLOCK_LITERAL,o=t.source?vF(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
||
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
||
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===nN.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
||
`):t.length>c||r[0]===` `?(f===` `?f=`
|
||
`:!p&&f===`
|
||
`&&(f=`
|
||
|
||
`),d+=f+t.slice(c)+r,f=`
|
||
`,p=!0):r===``?f===`
|
||
`?d+=`
|
||
`:f=`
|
||
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
||
`+o[e][0].slice(c);d[d.length-1]!==`
|
||
`&&(d+=`
|
||
`);break;default:d+=`
|
||
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function _F({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function vF(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function yF(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=nN.PLAIN,c=bF(a,l);break;case`single-quoted-scalar`:s=nN.QUOTE_SINGLE,c=xF(a,l);break;case`double-quoted-scalar`:s=nN.QUOTE_DOUBLE,c=CF(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=uF(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function bF(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),SF(e)}function xF(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),SF(e.slice(1,-1)).replace(/''/g,`'`)}function SF(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
||
`?i+=a:a=`
|
||
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function CF(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
||
`){if(i===`
|
||
`){let{fold:t,offset:i}=wF(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=TF[i];if(a)n+=a;else if(i===`
|
||
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
||
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=EF(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
||
`&&(a!==`\r`||e[r+2]!==`
|
||
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function wF(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
||
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
||
`);)r===`
|
||
`&&(n+=`
|
||
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var TF={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
||
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function EF(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function DF(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?gF(e,t,r):yF(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[CM]:c?OF(e.schema,i,c,n,r):t.type===`scalar`?kF(e,i,t,r):e.schema[CM];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=AM(a)?a:new nN(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new nN(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function OF(e,t,n,r,i){if(n===`!`)return e[CM];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[CM])}function kF({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[CM];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[CM];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function AF(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var jF={composeNode:MF,composeEmptyNode:NF};function MF(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=PF(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=DF(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=hF(jF,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=NF(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!AM(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function NF(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=DF(e,{type:`scalar`,offset:AF(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function PF({options:e},{offset:t,source:n,end:r},i){let a=new $M(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=uF(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function FF(e,t,{offset:n,start:r,value:i,end:a},o){let s=new ZP(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=rF(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?MF(c,i,l,o):NF(c,l.end,r,null,l,o);let u=s.contents.range[2],d=uF(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function IF(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function LF(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
||
|
||
`:`
|
||
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var RF=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=IF(e);r?this.warnings.push(new tF(i,t,n)):this.errors.push(new eF(i,t,n))},this.directives=new GM({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=LF(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(MM(i)&&!i.flow&&i.items.length>0){let e=i.items[0];kM(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:LF(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=IF(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=FF(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new eF(IF(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new eF(IF(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=uF(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new eF(IF(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new ZP(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},zF=Symbol(`break visit`),BF=Symbol(`skip children`),VF=Symbol(`remove item`);function HF(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),UF(Object.freeze([]),e,t)}HF.BREAK=zF,HF.SKIP=BF,HF.REMOVE=VF,HF.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},HF.parentCollection=(e,t)=>{let n=HF.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function UF(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=UF(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===zF)return zF;else r===VF&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function WF(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
||
`:case`\r
|
||
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function GF(e){switch(e){case void 0:case` `:case`
|
||
`:case`\r`:case` `:return!0;default:return!1}}var KF=new Set(`0123456789ABCDEFabcdef`),qF=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),JF=new Set(`,[]{}`),YF=new Set(` ,[]{}
|
||
\r `),XF=e=>!e||YF.has(e),ZF=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
||
`||t===`\r`&&this.buffer[e+1]===`
|
||
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
||
`||!t&&!this.atEnd)return e+n+1}return t===`
|
||
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&GF(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&GF(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!GF(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&GF(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(XF),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&GF(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(XF),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||GF(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
||
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
||
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>GF(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
||
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
||
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
||
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
||
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
||
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(GF(r)||e&&JF.has(r))break;t=n}else if(GF(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
||
`?(n+=1,r=`
|
||
`,i=this.buffer[n+1]):t=n),i===`#`||e&&JF.has(i))break;if(r===`
|
||
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&JF.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(XF),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(GF(n)||t&&JF.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!GF(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(qF.has(t))t=this.buffer[++e];else if(t===`%`&&KF.has(this.buffer[e+1])&&KF.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
||
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},QF=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function $F(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function eI(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function tI(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function nI(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function rI(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function iI(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function aI(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!$F(t.start,`explicit-key-ind`)&&!$F(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,tI(t.value)?t.value.end?iI(t.value.end,t.sep):t.value.end=t.sep:iI(t.start,t.sep),delete t.sep)}var oI=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new ZF,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=WF(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&aI(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&eI(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:eI(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=rI(nI(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){iI(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(!t.sep){if($F(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=rI(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if($F(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(tI(t.key)&&!$F(t.sep,`newline`)){let e=rI(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):$F(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!$F(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){iI(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||$F(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=rI(nI(t));aI(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=rI(nI(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=rI(nI(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function sI(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new QF||null,prettyErrors:t}}function cI(e,t={}){let{lineCounter:n,prettyErrors:r}=sI(t),i=new oI(n?.addNewLine),a=new RF(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new eF(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(nF(e,n)),o.warnings.forEach(nF(e,n))),o}function lI(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=cI(e,n);if(!i)return null;if(i.warnings.forEach(e=>MN(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function uI(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return DM(e)&&!r?e.toString(n):new ZP(e,r,n).toString(n)}var dI={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:`longOffset`},fI=new Map,pI=e=>{let t=e??``,n=fI.get(t);return n||(n=new Intl.DateTimeFormat(`en-US`,{...dI,hour12:!1,timeZone:e}),fI.set(t,n)),n},mI=({date:e=new Date,timeZone:t=void 0}={})=>Object.fromEntries(pI(t).formatToParts(e).filter(({type:e})=>e in dI).map(({type:e,value:t})=>[e,e===`hour`&&t===`24`?`00`:t])),hI=new Map([[`ß`,`ss`],[`ẞ`,`Ss`],[`ä`,`ae`],[`Ä`,`Ae`],[`ö`,`oe`],[`Ö`,`Oe`],[`ü`,`ue`],[`Ü`,`Ue`],[`À`,`A`],[`Á`,`A`],[`Â`,`A`],[`Ã`,`A`],[`Ä`,`Ae`],[`Å`,`A`],[`Æ`,`AE`],[`Ç`,`C`],[`È`,`E`],[`É`,`E`],[`Ê`,`E`],[`Ë`,`E`],[`Ə`,`A`],[`Ì`,`I`],[`Í`,`I`],[`Î`,`I`],[`Ï`,`I`],[`Ð`,`D`],[`Ñ`,`N`],[`Ò`,`O`],[`Ó`,`O`],[`Ô`,`O`],[`Õ`,`O`],[`Ö`,`Oe`],[`Ō`,`O`],[`Ő`,`O`],[`Ø`,`O`],[`Œ`,`OE`],[`Ù`,`U`],[`Ú`,`U`],[`Û`,`U`],[`Ü`,`Ue`],[`Ű`,`U`],[`Ý`,`Y`],[`Þ`,`TH`],[`ß`,`ss`],[`à`,`a`],[`á`,`a`],[`â`,`a`],[`ã`,`a`],[`ä`,`ae`],[`å`,`a`],[`æ`,`ae`],[`ç`,`c`],[`è`,`e`],[`é`,`e`],[`ê`,`e`],[`ë`,`e`],[`ə`,`a`],[`ì`,`i`],[`í`,`i`],[`î`,`i`],[`ï`,`i`],[`ð`,`d`],[`ñ`,`n`],[`ò`,`o`],[`ó`,`o`],[`ô`,`o`],[`õ`,`o`],[`ö`,`oe`],[`ō`,`o`],[`ő`,`o`],[`ø`,`o`],[`œ`,`oe`],[`ù`,`u`],[`ú`,`u`],[`û`,`u`],[`ü`,`ue`],[`ű`,`u`],[`ý`,`y`],[`þ`,`th`],[`ÿ`,`y`],[`à`,`a`],[`À`,`A`],[`á`,`a`],[`Á`,`A`],[`â`,`a`],[`Â`,`A`],[`ã`,`a`],[`Ã`,`A`],[`è`,`e`],[`È`,`E`],[`é`,`e`],[`É`,`E`],[`ê`,`e`],[`Ê`,`E`],[`ì`,`i`],[`Ì`,`I`],[`í`,`i`],[`Í`,`I`],[`ò`,`o`],[`Ò`,`O`],[`ó`,`o`],[`Ó`,`O`],[`ô`,`o`],[`Ô`,`O`],[`õ`,`o`],[`Õ`,`O`],[`ù`,`u`],[`Ù`,`U`],[`ú`,`u`],[`Ú`,`U`],[`ý`,`y`],[`Ý`,`Y`],[`ă`,`a`],[`Ă`,`A`],[`Đ`,`D`],[`đ`,`d`],[`ĩ`,`i`],[`Ĩ`,`I`],[`ũ`,`u`],[`Ũ`,`U`],[`ơ`,`o`],[`Ơ`,`O`],[`ư`,`u`],[`Ư`,`U`],[`ạ`,`a`],[`Ạ`,`A`],[`ả`,`a`],[`Ả`,`A`],[`ấ`,`a`],[`Ấ`,`A`],[`ầ`,`a`],[`Ầ`,`A`],[`ẩ`,`a`],[`Ẩ`,`A`],[`ẫ`,`a`],[`Ẫ`,`A`],[`ậ`,`a`],[`Ậ`,`A`],[`ắ`,`a`],[`Ắ`,`A`],[`ằ`,`a`],[`Ằ`,`A`],[`ẳ`,`a`],[`Ẳ`,`A`],[`ẵ`,`a`],[`Ẵ`,`A`],[`ặ`,`a`],[`Ặ`,`A`],[`ẹ`,`e`],[`Ẹ`,`E`],[`ẻ`,`e`],[`Ẻ`,`E`],[`ẽ`,`e`],[`Ẽ`,`E`],[`ế`,`e`],[`Ế`,`E`],[`ề`,`e`],[`Ề`,`E`],[`ể`,`e`],[`Ể`,`E`],[`ễ`,`e`],[`Ễ`,`E`],[`ệ`,`e`],[`Ệ`,`E`],[`ỉ`,`i`],[`Ỉ`,`I`],[`ị`,`i`],[`Ị`,`I`],[`ọ`,`o`],[`Ọ`,`O`],[`ỏ`,`o`],[`Ỏ`,`O`],[`ố`,`o`],[`Ố`,`O`],[`ồ`,`o`],[`Ồ`,`O`],[`ổ`,`o`],[`Ổ`,`O`],[`ỗ`,`o`],[`Ỗ`,`O`],[`ộ`,`o`],[`Ộ`,`O`],[`ớ`,`o`],[`Ớ`,`O`],[`ờ`,`o`],[`Ờ`,`O`],[`ở`,`o`],[`Ở`,`O`],[`ỡ`,`o`],[`Ỡ`,`O`],[`ợ`,`o`],[`Ợ`,`O`],[`ụ`,`u`],[`Ụ`,`U`],[`ủ`,`u`],[`Ủ`,`U`],[`ứ`,`u`],[`Ứ`,`U`],[`ừ`,`u`],[`Ừ`,`U`],[`ử`,`u`],[`Ử`,`U`],[`ữ`,`u`],[`Ữ`,`U`],[`ự`,`u`],[`Ự`,`U`],[`ỳ`,`y`],[`Ỳ`,`Y`],[`ỵ`,`y`],[`Ỵ`,`Y`],[`ỷ`,`y`],[`Ỷ`,`Y`],[`ỹ`,`y`],[`Ỹ`,`Y`],[`ء`,`e`],[`آ`,`a`],[`أ`,`a`],[`ؤ`,`w`],[`إ`,`a`],[`ئ`,`y`],[`ا`,`a`],[`ب`,`b`],[`ة`,`t`],[`ت`,`t`],[`ث`,`th`],[`ج`,`j`],[`ح`,`h`],[`خ`,`kh`],[`د`,`d`],[`ذ`,`dh`],[`ر`,`r`],[`ز`,`z`],[`س`,`s`],[`ش`,`sh`],[`ص`,`s`],[`ض`,`d`],[`ط`,`t`],[`ظ`,`z`],[`ع`,`e`],[`غ`,`gh`],[`ـ`,`_`],[`ف`,`f`],[`ق`,`q`],[`ك`,`k`],[`ل`,`l`],[`م`,`m`],[`ن`,`n`],[`ه`,`h`],[`و`,`w`],[`ى`,`a`],[`ي`,`y`],[`َ`,`a`],[`ُ`,`u`],[`ِ`,`i`],[`٠`,`0`],[`١`,`1`],[`٢`,`2`],[`٣`,`3`],[`٤`,`4`],[`٥`,`5`],[`٦`,`6`],[`٧`,`7`],[`٨`,`8`],[`٩`,`9`],[`چ`,`ch`],[`ک`,`k`],[`گ`,`g`],[`پ`,`p`],[`ژ`,`zh`],[`ی`,`y`],[`۰`,`0`],[`۱`,`1`],[`۲`,`2`],[`۳`,`3`],[`۴`,`4`],[`۵`,`5`],[`۶`,`6`],[`۷`,`7`],[`۸`,`8`],[`۹`,`9`],[`ټ`,`p`],[`ځ`,`z`],[`څ`,`c`],[`ډ`,`d`],[`ﺫ`,`d`],[`ﺭ`,`r`],[`ړ`,`r`],[`ﺯ`,`z`],[`ږ`,`g`],[`ښ`,`x`],[`ګ`,`g`],[`ڼ`,`n`],[`ۀ`,`e`],[`ې`,`e`],[`ۍ`,`ai`],[`ٹ`,`t`],[`ڈ`,`d`],[`ڑ`,`r`],[`ں`,`n`],[`ہ`,`h`],[`ھ`,`h`],[`ے`,`e`],[`А`,`A`],[`а`,`a`],[`Б`,`B`],[`б`,`b`],[`В`,`V`],[`в`,`v`],[`Г`,`G`],[`г`,`g`],[`Д`,`D`],[`д`,`d`],[`ъе`,`ye`],[`Ъе`,`Ye`],[`ъЕ`,`yE`],[`ЪЕ`,`YE`],[`Е`,`E`],[`е`,`e`],[`Ё`,`Yo`],[`ё`,`yo`],[`Ж`,`Zh`],[`ж`,`zh`],[`З`,`Z`],[`з`,`z`],[`И`,`I`],[`и`,`i`],[`ый`,`iy`],[`Ый`,`Iy`],[`ЫЙ`,`IY`],[`ыЙ`,`iY`],[`Й`,`Y`],[`й`,`y`],[`К`,`K`],[`к`,`k`],[`Л`,`L`],[`л`,`l`],[`М`,`M`],[`м`,`m`],[`Н`,`N`],[`н`,`n`],[`О`,`O`],[`о`,`o`],[`П`,`P`],[`п`,`p`],[`Р`,`R`],[`р`,`r`],[`С`,`S`],[`с`,`s`],[`Т`,`T`],[`т`,`t`],[`У`,`U`],[`у`,`u`],[`Ф`,`F`],[`ф`,`f`],[`Х`,`Kh`],[`х`,`kh`],[`Ц`,`Ts`],[`ц`,`ts`],[`Ч`,`Ch`],[`ч`,`ch`],[`Ш`,`Sh`],[`ш`,`sh`],[`Щ`,`Sch`],[`щ`,`sch`],[`Ъ`,``],[`ъ`,``],[`Ы`,`Y`],[`ы`,`y`],[`Ь`,``],[`ь`,``],[`Э`,`E`],[`э`,`e`],[`Ю`,`Yu`],[`ю`,`yu`],[`Я`,`Ya`],[`я`,`ya`],[`ă`,`a`],[`Ă`,`A`],[`ș`,`s`],[`Ș`,`S`],[`ț`,`t`],[`Ț`,`T`],[`ţ`,`t`],[`Ţ`,`T`],[`ş`,`s`],[`Ş`,`S`],[`ç`,`c`],[`Ç`,`C`],[`ğ`,`g`],[`Ğ`,`G`],[`ı`,`i`],[`İ`,`I`],[`ա`,`a`],[`Ա`,`A`],[`բ`,`b`],[`Բ`,`B`],[`գ`,`g`],[`Գ`,`G`],[`դ`,`d`],[`Դ`,`D`],[`ե`,`ye`],[`Ե`,`Ye`],[`զ`,`z`],[`Զ`,`Z`],[`է`,`e`],[`Է`,`E`],[`ը`,`y`],[`Ը`,`Y`],[`թ`,`t`],[`Թ`,`T`],[`ժ`,`zh`],[`Ժ`,`Zh`],[`ի`,`i`],[`Ի`,`I`],[`լ`,`l`],[`Լ`,`L`],[`խ`,`kh`],[`Խ`,`Kh`],[`ծ`,`ts`],[`Ծ`,`Ts`],[`կ`,`k`],[`Կ`,`K`],[`հ`,`h`],[`Հ`,`H`],[`ձ`,`dz`],[`Ձ`,`Dz`],[`ղ`,`gh`],[`Ղ`,`Gh`],[`ճ`,`tch`],[`Ճ`,`Tch`],[`մ`,`m`],[`Մ`,`M`],[`յ`,`y`],[`Յ`,`Y`],[`ն`,`n`],[`Ն`,`N`],[`շ`,`sh`],[`Շ`,`Sh`],[`ու`,`u`],[`ՈՒ`,`U`],[`Ու`,`U`],[`ո`,`vo`],[`Ո`,`Vo`],[`չ`,`ch`],[`Չ`,`Ch`],[`պ`,`p`],[`Պ`,`P`],[`ջ`,`j`],[`Ջ`,`J`],[`ռ`,`r`],[`Ռ`,`R`],[`ս`,`s`],[`Ս`,`S`],[`վ`,`v`],[`Վ`,`V`],[`տ`,`t`],[`Տ`,`T`],[`ր`,`r`],[`Ր`,`R`],[`ց`,`c`],[`Ց`,`C`],[`փ`,`p`],[`Փ`,`P`],[`ք`,`q`],[`Ք`,`Q`],[`օ`,`o`],[`Օ`,`O`],[`ֆ`,`f`],[`Ֆ`,`F`],[`և`,`yev`],[`ა`,`a`],[`ბ`,`b`],[`გ`,`g`],[`დ`,`d`],[`ე`,`e`],[`ვ`,`v`],[`ზ`,`z`],[`თ`,`t`],[`ი`,`i`],[`კ`,`k`],[`ლ`,`l`],[`მ`,`m`],[`ნ`,`n`],[`ო`,`o`],[`პ`,`p`],[`ჟ`,`zh`],[`რ`,`r`],[`ს`,`s`],[`ტ`,`t`],[`უ`,`u`],[`ფ`,`ph`],[`ქ`,`q`],[`ღ`,`gh`],[`ყ`,`k`],[`შ`,`sh`],[`ჩ`,`ch`],[`ც`,`ts`],[`ძ`,`dz`],[`წ`,`ts`],[`ჭ`,`tch`],[`ხ`,`kh`],[`ჯ`,`j`],[`ჰ`,`h`],[`č`,`c`],[`ď`,`d`],[`ě`,`e`],[`ň`,`n`],[`ř`,`r`],[`š`,`s`],[`ť`,`t`],[`ů`,`u`],[`ž`,`z`],[`Č`,`C`],[`Ď`,`D`],[`Ě`,`E`],[`Ň`,`N`],[`Ř`,`R`],[`Š`,`S`],[`Ť`,`T`],[`Ů`,`U`],[`Ž`,`Z`],[`ހ`,`h`],[`ށ`,`sh`],[`ނ`,`n`],[`ރ`,`r`],[`ބ`,`b`],[`ޅ`,`lh`],[`ކ`,`k`],[`އ`,`a`],[`ވ`,`v`],[`މ`,`m`],[`ފ`,`f`],[`ދ`,`dh`],[`ތ`,`th`],[`ލ`,`l`],[`ގ`,`g`],[`ޏ`,`gn`],[`ސ`,`s`],[`ޑ`,`d`],[`ޒ`,`z`],[`ޓ`,`t`],[`ޔ`,`y`],[`ޕ`,`p`],[`ޖ`,`j`],[`ޗ`,`ch`],[`ޘ`,`tt`],[`ޙ`,`hh`],[`ޚ`,`kh`],[`ޛ`,`th`],[`ޜ`,`z`],[`ޝ`,`sh`],[`ޞ`,`s`],[`ޟ`,`d`],[`ޠ`,`t`],[`ޡ`,`z`],[`ޢ`,`a`],[`ޣ`,`gh`],[`ޤ`,`q`],[`ޥ`,`w`],[`ަ`,`a`],[`ާ`,`aa`],[`ި`,`i`],[`ީ`,`ee`],[`ު`,`u`],[`ޫ`,`oo`],[`ެ`,`e`],[`ޭ`,`ey`],[`ޮ`,`o`],[`ޯ`,`oa`],[`ް`,``],[`α`,`a`],[`β`,`v`],[`γ`,`g`],[`δ`,`d`],[`ε`,`e`],[`ζ`,`z`],[`η`,`i`],[`θ`,`th`],[`ι`,`i`],[`κ`,`k`],[`λ`,`l`],[`μ`,`m`],[`ν`,`n`],[`ξ`,`ks`],[`ο`,`o`],[`π`,`p`],[`ρ`,`r`],[`σ`,`s`],[`τ`,`t`],[`υ`,`y`],[`φ`,`f`],[`χ`,`x`],[`ψ`,`ps`],[`ω`,`o`],[`ά`,`a`],[`έ`,`e`],[`ί`,`i`],[`ό`,`o`],[`ύ`,`y`],[`ή`,`i`],[`ώ`,`o`],[`ς`,`s`],[`ϊ`,`i`],[`ΰ`,`y`],[`ϋ`,`y`],[`ΐ`,`i`],[`Α`,`A`],[`Β`,`B`],[`Γ`,`G`],[`Δ`,`D`],[`Ε`,`E`],[`Ζ`,`Z`],[`Η`,`I`],[`Θ`,`TH`],[`Ι`,`I`],[`Κ`,`K`],[`Λ`,`L`],[`Μ`,`M`],[`Ν`,`N`],[`Ξ`,`KS`],[`Ο`,`O`],[`Π`,`P`],[`Ρ`,`R`],[`Σ`,`S`],[`Τ`,`T`],[`Υ`,`Y`],[`Φ`,`F`],[`Χ`,`X`],[`Ψ`,`PS`],[`Ω`,`O`],[`Ά`,`A`],[`Έ`,`E`],[`Ί`,`I`],[`Ό`,`O`],[`Ύ`,`Y`],[`Ή`,`I`],[`Ώ`,`O`],[`Ϊ`,`I`],[`Ϋ`,`Y`],[`ā`,`a`],[`ē`,`e`],[`ģ`,`g`],[`ī`,`i`],[`ķ`,`k`],[`ļ`,`l`],[`ņ`,`n`],[`ū`,`u`],[`Ā`,`A`],[`Ē`,`E`],[`Ģ`,`G`],[`Ī`,`I`],[`Ķ`,`K`],[`Ļ`,`L`],[`Ņ`,`N`],[`Ū`,`U`],[`č`,`c`],[`š`,`s`],[`ž`,`z`],[`Č`,`C`],[`Š`,`S`],[`Ž`,`Z`],[`ą`,`a`],[`č`,`c`],[`ę`,`e`],[`ė`,`e`],[`į`,`i`],[`š`,`s`],[`ų`,`u`],[`ū`,`u`],[`ž`,`z`],[`Ą`,`A`],[`Č`,`C`],[`Ę`,`E`],[`Ė`,`E`],[`Į`,`I`],[`Š`,`S`],[`Ų`,`U`],[`Ū`,`U`],[`Ќ`,`Kj`],[`ќ`,`kj`],[`Љ`,`Lj`],[`љ`,`lj`],[`Њ`,`Nj`],[`њ`,`nj`],[`Тс`,`Ts`],[`тс`,`ts`],[`ą`,`a`],[`ć`,`c`],[`ę`,`e`],[`ł`,`l`],[`ń`,`n`],[`ś`,`s`],[`ź`,`z`],[`ż`,`z`],[`Ą`,`A`],[`Ć`,`C`],[`Ę`,`E`],[`Ł`,`L`],[`Ń`,`N`],[`Ś`,`S`],[`Ź`,`Z`],[`Ż`,`Z`],[`Є`,`Ye`],[`І`,`I`],[`Ї`,`Yi`],[`Ґ`,`G`],[`є`,`ye`],[`і`,`i`],[`ї`,`yi`],[`ґ`,`g`],[`IJ`,`IJ`],[`ij`,`ij`],[`¢`,`c`],[`¥`,`Y`],[`߿`,`b`],[`৳`,`t`],[`૱`,`Bo`],[`฿`,`B`],[`₠`,`CE`],[`₡`,`C`],[`₢`,`Cr`],[`₣`,`F`],[`₥`,`m`],[`₦`,`N`],[`₧`,`Pt`],[`₨`,`Rs`],[`₩`,`W`],[`₫`,`s`],[`€`,`E`],[`₭`,`K`],[`₮`,`T`],[`₯`,`Dp`],[`₰`,`S`],[`₱`,`P`],[`₲`,`G`],[`₳`,`A`],[`₴`,`S`],[`₵`,`C`],[`₶`,`tt`],[`₷`,`S`],[`₸`,`T`],[`₹`,`R`],[`₺`,`L`],[`₽`,`P`],[`₿`,`B`],[`﹩`,`$`],[`¢`,`c`],[`¥`,`Y`],[`₩`,`W`],[`𝐀`,`A`],[`𝐁`,`B`],[`𝐂`,`C`],[`𝐃`,`D`],[`𝐄`,`E`],[`𝐅`,`F`],[`𝐆`,`G`],[`𝐇`,`H`],[`𝐈`,`I`],[`𝐉`,`J`],[`𝐊`,`K`],[`𝐋`,`L`],[`𝐌`,`M`],[`𝐍`,`N`],[`𝐎`,`O`],[`𝐏`,`P`],[`𝐐`,`Q`],[`𝐑`,`R`],[`𝐒`,`S`],[`𝐓`,`T`],[`𝐔`,`U`],[`𝐕`,`V`],[`𝐖`,`W`],[`𝐗`,`X`],[`𝐘`,`Y`],[`𝐙`,`Z`],[`𝐚`,`a`],[`𝐛`,`b`],[`𝐜`,`c`],[`𝐝`,`d`],[`𝐞`,`e`],[`𝐟`,`f`],[`𝐠`,`g`],[`𝐡`,`h`],[`𝐢`,`i`],[`𝐣`,`j`],[`𝐤`,`k`],[`𝐥`,`l`],[`𝐦`,`m`],[`𝐧`,`n`],[`𝐨`,`o`],[`𝐩`,`p`],[`𝐪`,`q`],[`𝐫`,`r`],[`𝐬`,`s`],[`𝐭`,`t`],[`𝐮`,`u`],[`𝐯`,`v`],[`𝐰`,`w`],[`𝐱`,`x`],[`𝐲`,`y`],[`𝐳`,`z`],[`𝐴`,`A`],[`𝐵`,`B`],[`𝐶`,`C`],[`𝐷`,`D`],[`𝐸`,`E`],[`𝐹`,`F`],[`𝐺`,`G`],[`𝐻`,`H`],[`𝐼`,`I`],[`𝐽`,`J`],[`𝐾`,`K`],[`𝐿`,`L`],[`𝑀`,`M`],[`𝑁`,`N`],[`𝑂`,`O`],[`𝑃`,`P`],[`𝑄`,`Q`],[`𝑅`,`R`],[`𝑆`,`S`],[`𝑇`,`T`],[`𝑈`,`U`],[`𝑉`,`V`],[`𝑊`,`W`],[`𝑋`,`X`],[`𝑌`,`Y`],[`𝑍`,`Z`],[`𝑎`,`a`],[`𝑏`,`b`],[`𝑐`,`c`],[`𝑑`,`d`],[`𝑒`,`e`],[`𝑓`,`f`],[`𝑔`,`g`],[`𝑖`,`i`],[`𝑗`,`j`],[`𝑘`,`k`],[`𝑙`,`l`],[`𝑚`,`m`],[`𝑛`,`n`],[`𝑜`,`o`],[`𝑝`,`p`],[`𝑞`,`q`],[`𝑟`,`r`],[`𝑠`,`s`],[`𝑡`,`t`],[`𝑢`,`u`],[`𝑣`,`v`],[`𝑤`,`w`],[`𝑥`,`x`],[`𝑦`,`y`],[`𝑧`,`z`],[`𝑨`,`A`],[`𝑩`,`B`],[`𝑪`,`C`],[`𝑫`,`D`],[`𝑬`,`E`],[`𝑭`,`F`],[`𝑮`,`G`],[`𝑯`,`H`],[`𝑰`,`I`],[`𝑱`,`J`],[`𝑲`,`K`],[`𝑳`,`L`],[`𝑴`,`M`],[`𝑵`,`N`],[`𝑶`,`O`],[`𝑷`,`P`],[`𝑸`,`Q`],[`𝑹`,`R`],[`𝑺`,`S`],[`𝑻`,`T`],[`𝑼`,`U`],[`𝑽`,`V`],[`𝑾`,`W`],[`𝑿`,`X`],[`𝒀`,`Y`],[`𝒁`,`Z`],[`𝒂`,`a`],[`𝒃`,`b`],[`𝒄`,`c`],[`𝒅`,`d`],[`𝒆`,`e`],[`𝒇`,`f`],[`𝒈`,`g`],[`𝒉`,`h`],[`𝒊`,`i`],[`𝒋`,`j`],[`𝒌`,`k`],[`𝒍`,`l`],[`𝒎`,`m`],[`𝒏`,`n`],[`𝒐`,`o`],[`𝒑`,`p`],[`𝒒`,`q`],[`𝒓`,`r`],[`𝒔`,`s`],[`𝒕`,`t`],[`𝒖`,`u`],[`𝒗`,`v`],[`𝒘`,`w`],[`𝒙`,`x`],[`𝒚`,`y`],[`𝒛`,`z`],[`𝒜`,`A`],[`𝒞`,`C`],[`𝒟`,`D`],[`𝒢`,`g`],[`𝒥`,`J`],[`𝒦`,`K`],[`𝒩`,`N`],[`𝒪`,`O`],[`𝒫`,`P`],[`𝒬`,`Q`],[`𝒮`,`S`],[`𝒯`,`T`],[`𝒰`,`U`],[`𝒱`,`V`],[`𝒲`,`W`],[`𝒳`,`X`],[`𝒴`,`Y`],[`𝒵`,`Z`],[`𝒶`,`a`],[`𝒷`,`b`],[`𝒸`,`c`],[`𝒹`,`d`],[`𝒻`,`f`],[`𝒽`,`h`],[`𝒾`,`i`],[`𝒿`,`j`],[`𝓀`,`k`],[`𝓁`,`l`],[`𝓂`,`m`],[`𝓃`,`n`],[`𝓅`,`p`],[`𝓆`,`q`],[`𝓇`,`r`],[`𝓈`,`s`],[`𝓉`,`t`],[`𝓊`,`u`],[`𝓋`,`v`],[`𝓌`,`w`],[`𝓍`,`x`],[`𝓎`,`y`],[`𝓏`,`z`],[`𝓐`,`A`],[`𝓑`,`B`],[`𝓒`,`C`],[`𝓓`,`D`],[`𝓔`,`E`],[`𝓕`,`F`],[`𝓖`,`G`],[`𝓗`,`H`],[`𝓘`,`I`],[`𝓙`,`J`],[`𝓚`,`K`],[`𝓛`,`L`],[`𝓜`,`M`],[`𝓝`,`N`],[`𝓞`,`O`],[`𝓟`,`P`],[`𝓠`,`Q`],[`𝓡`,`R`],[`𝓢`,`S`],[`𝓣`,`T`],[`𝓤`,`U`],[`𝓥`,`V`],[`𝓦`,`W`],[`𝓧`,`X`],[`𝓨`,`Y`],[`𝓩`,`Z`],[`𝓪`,`a`],[`𝓫`,`b`],[`𝓬`,`c`],[`𝓭`,`d`],[`𝓮`,`e`],[`𝓯`,`f`],[`𝓰`,`g`],[`𝓱`,`h`],[`𝓲`,`i`],[`𝓳`,`j`],[`𝓴`,`k`],[`𝓵`,`l`],[`𝓶`,`m`],[`𝓷`,`n`],[`𝓸`,`o`],[`𝓹`,`p`],[`𝓺`,`q`],[`𝓻`,`r`],[`𝓼`,`s`],[`𝓽`,`t`],[`𝓾`,`u`],[`𝓿`,`v`],[`𝔀`,`w`],[`𝔁`,`x`],[`𝔂`,`y`],[`𝔃`,`z`],[`𝔄`,`A`],[`𝔅`,`B`],[`𝔇`,`D`],[`𝔈`,`E`],[`𝔉`,`F`],[`𝔊`,`G`],[`𝔍`,`J`],[`𝔎`,`K`],[`𝔏`,`L`],[`𝔐`,`M`],[`𝔑`,`N`],[`𝔒`,`O`],[`𝔓`,`P`],[`𝔔`,`Q`],[`𝔖`,`S`],[`𝔗`,`T`],[`𝔘`,`U`],[`𝔙`,`V`],[`𝔚`,`W`],[`𝔛`,`X`],[`𝔜`,`Y`],[`𝔞`,`a`],[`𝔟`,`b`],[`𝔠`,`c`],[`𝔡`,`d`],[`𝔢`,`e`],[`𝔣`,`f`],[`𝔤`,`g`],[`𝔥`,`h`],[`𝔦`,`i`],[`𝔧`,`j`],[`𝔨`,`k`],[`𝔩`,`l`],[`𝔪`,`m`],[`𝔫`,`n`],[`𝔬`,`o`],[`𝔭`,`p`],[`𝔮`,`q`],[`𝔯`,`r`],[`𝔰`,`s`],[`𝔱`,`t`],[`𝔲`,`u`],[`𝔳`,`v`],[`𝔴`,`w`],[`𝔵`,`x`],[`𝔶`,`y`],[`𝔷`,`z`],[`𝔸`,`A`],[`𝔹`,`B`],[`𝔻`,`D`],[`𝔼`,`E`],[`𝔽`,`F`],[`𝔾`,`G`],[`𝕀`,`I`],[`𝕁`,`J`],[`𝕂`,`K`],[`𝕃`,`L`],[`𝕄`,`M`],[`𝕆`,`O`],[`𝕊`,`S`],[`𝕋`,`T`],[`𝕌`,`U`],[`𝕍`,`V`],[`𝕎`,`W`],[`𝕏`,`X`],[`𝕐`,`Y`],[`𝕒`,`a`],[`𝕓`,`b`],[`𝕔`,`c`],[`𝕕`,`d`],[`𝕖`,`e`],[`𝕗`,`f`],[`𝕘`,`g`],[`𝕙`,`h`],[`𝕚`,`i`],[`𝕛`,`j`],[`𝕜`,`k`],[`𝕝`,`l`],[`𝕞`,`m`],[`𝕟`,`n`],[`𝕠`,`o`],[`𝕡`,`p`],[`𝕢`,`q`],[`𝕣`,`r`],[`𝕤`,`s`],[`𝕥`,`t`],[`𝕦`,`u`],[`𝕧`,`v`],[`𝕨`,`w`],[`𝕩`,`x`],[`𝕪`,`y`],[`𝕫`,`z`],[`𝕬`,`A`],[`𝕭`,`B`],[`𝕮`,`C`],[`𝕯`,`D`],[`𝕰`,`E`],[`𝕱`,`F`],[`𝕲`,`G`],[`𝕳`,`H`],[`𝕴`,`I`],[`𝕵`,`J`],[`𝕶`,`K`],[`𝕷`,`L`],[`𝕸`,`M`],[`𝕹`,`N`],[`𝕺`,`O`],[`𝕻`,`P`],[`𝕼`,`Q`],[`𝕽`,`R`],[`𝕾`,`S`],[`𝕿`,`T`],[`𝖀`,`U`],[`𝖁`,`V`],[`𝖂`,`W`],[`𝖃`,`X`],[`𝖄`,`Y`],[`𝖅`,`Z`],[`𝖆`,`a`],[`𝖇`,`b`],[`𝖈`,`c`],[`𝖉`,`d`],[`𝖊`,`e`],[`𝖋`,`f`],[`𝖌`,`g`],[`𝖍`,`h`],[`𝖎`,`i`],[`𝖏`,`j`],[`𝖐`,`k`],[`𝖑`,`l`],[`𝖒`,`m`],[`𝖓`,`n`],[`𝖔`,`o`],[`𝖕`,`p`],[`𝖖`,`q`],[`𝖗`,`r`],[`𝖘`,`s`],[`𝖙`,`t`],[`𝖚`,`u`],[`𝖛`,`v`],[`𝖜`,`w`],[`𝖝`,`x`],[`𝖞`,`y`],[`𝖟`,`z`],[`𝖠`,`A`],[`𝖡`,`B`],[`𝖢`,`C`],[`𝖣`,`D`],[`𝖤`,`E`],[`𝖥`,`F`],[`𝖦`,`G`],[`𝖧`,`H`],[`𝖨`,`I`],[`𝖩`,`J`],[`𝖪`,`K`],[`𝖫`,`L`],[`𝖬`,`M`],[`𝖭`,`N`],[`𝖮`,`O`],[`𝖯`,`P`],[`𝖰`,`Q`],[`𝖱`,`R`],[`𝖲`,`S`],[`𝖳`,`T`],[`𝖴`,`U`],[`𝖵`,`V`],[`𝖶`,`W`],[`𝖷`,`X`],[`𝖸`,`Y`],[`𝖹`,`Z`],[`𝖺`,`a`],[`𝖻`,`b`],[`𝖼`,`c`],[`𝖽`,`d`],[`𝖾`,`e`],[`𝖿`,`f`],[`𝗀`,`g`],[`𝗁`,`h`],[`𝗂`,`i`],[`𝗃`,`j`],[`𝗄`,`k`],[`𝗅`,`l`],[`𝗆`,`m`],[`𝗇`,`n`],[`𝗈`,`o`],[`𝗉`,`p`],[`𝗊`,`q`],[`𝗋`,`r`],[`𝗌`,`s`],[`𝗍`,`t`],[`𝗎`,`u`],[`𝗏`,`v`],[`𝗐`,`w`],[`𝗑`,`x`],[`𝗒`,`y`],[`𝗓`,`z`],[`𝗔`,`A`],[`𝗕`,`B`],[`𝗖`,`C`],[`𝗗`,`D`],[`𝗘`,`E`],[`𝗙`,`F`],[`𝗚`,`G`],[`𝗛`,`H`],[`𝗜`,`I`],[`𝗝`,`J`],[`𝗞`,`K`],[`𝗟`,`L`],[`𝗠`,`M`],[`𝗡`,`N`],[`𝗢`,`O`],[`𝗣`,`P`],[`𝗤`,`Q`],[`𝗥`,`R`],[`𝗦`,`S`],[`𝗧`,`T`],[`𝗨`,`U`],[`𝗩`,`V`],[`𝗪`,`W`],[`𝗫`,`X`],[`𝗬`,`Y`],[`𝗭`,`Z`],[`𝗮`,`a`],[`𝗯`,`b`],[`𝗰`,`c`],[`𝗱`,`d`],[`𝗲`,`e`],[`𝗳`,`f`],[`𝗴`,`g`],[`𝗵`,`h`],[`𝗶`,`i`],[`𝗷`,`j`],[`𝗸`,`k`],[`𝗹`,`l`],[`𝗺`,`m`],[`𝗻`,`n`],[`𝗼`,`o`],[`𝗽`,`p`],[`𝗾`,`q`],[`𝗿`,`r`],[`𝘀`,`s`],[`𝘁`,`t`],[`𝘂`,`u`],[`𝘃`,`v`],[`𝘄`,`w`],[`𝘅`,`x`],[`𝘆`,`y`],[`𝘇`,`z`],[`𝘈`,`A`],[`𝘉`,`B`],[`𝘊`,`C`],[`𝘋`,`D`],[`𝘌`,`E`],[`𝘍`,`F`],[`𝘎`,`G`],[`𝘏`,`H`],[`𝘐`,`I`],[`𝘑`,`J`],[`𝘒`,`K`],[`𝘓`,`L`],[`𝘔`,`M`],[`𝘕`,`N`],[`𝘖`,`O`],[`𝘗`,`P`],[`𝘘`,`Q`],[`𝘙`,`R`],[`𝘚`,`S`],[`𝘛`,`T`],[`𝘜`,`U`],[`𝘝`,`V`],[`𝘞`,`W`],[`𝘟`,`X`],[`𝘠`,`Y`],[`𝘡`,`Z`],[`𝘢`,`a`],[`𝘣`,`b`],[`𝘤`,`c`],[`𝘥`,`d`],[`𝘦`,`e`],[`𝘧`,`f`],[`𝘨`,`g`],[`𝘩`,`h`],[`𝘪`,`i`],[`𝘫`,`j`],[`𝘬`,`k`],[`𝘭`,`l`],[`𝘮`,`m`],[`𝘯`,`n`],[`𝘰`,`o`],[`𝘱`,`p`],[`𝘲`,`q`],[`𝘳`,`r`],[`𝘴`,`s`],[`𝘵`,`t`],[`𝘶`,`u`],[`𝘷`,`v`],[`𝘸`,`w`],[`𝘹`,`x`],[`𝘺`,`y`],[`𝘻`,`z`],[`𝘼`,`A`],[`𝘽`,`B`],[`𝘾`,`C`],[`𝘿`,`D`],[`𝙀`,`E`],[`𝙁`,`F`],[`𝙂`,`G`],[`𝙃`,`H`],[`𝙄`,`I`],[`𝙅`,`J`],[`𝙆`,`K`],[`𝙇`,`L`],[`𝙈`,`M`],[`𝙉`,`N`],[`𝙊`,`O`],[`𝙋`,`P`],[`𝙌`,`Q`],[`𝙍`,`R`],[`𝙎`,`S`],[`𝙏`,`T`],[`𝙐`,`U`],[`𝙑`,`V`],[`𝙒`,`W`],[`𝙓`,`X`],[`𝙔`,`Y`],[`𝙕`,`Z`],[`𝙖`,`a`],[`𝙗`,`b`],[`𝙘`,`c`],[`𝙙`,`d`],[`𝙚`,`e`],[`𝙛`,`f`],[`𝙜`,`g`],[`𝙝`,`h`],[`𝙞`,`i`],[`𝙟`,`j`],[`𝙠`,`k`],[`𝙡`,`l`],[`𝙢`,`m`],[`𝙣`,`n`],[`𝙤`,`o`],[`𝙥`,`p`],[`𝙦`,`q`],[`𝙧`,`r`],[`𝙨`,`s`],[`𝙩`,`t`],[`𝙪`,`u`],[`𝙫`,`v`],[`𝙬`,`w`],[`𝙭`,`x`],[`𝙮`,`y`],[`𝙯`,`z`],[`𝙰`,`A`],[`𝙱`,`B`],[`𝙲`,`C`],[`𝙳`,`D`],[`𝙴`,`E`],[`𝙵`,`F`],[`𝙶`,`G`],[`𝙷`,`H`],[`𝙸`,`I`],[`𝙹`,`J`],[`𝙺`,`K`],[`𝙻`,`L`],[`𝙼`,`M`],[`𝙽`,`N`],[`𝙾`,`O`],[`𝙿`,`P`],[`𝚀`,`Q`],[`𝚁`,`R`],[`𝚂`,`S`],[`𝚃`,`T`],[`𝚄`,`U`],[`𝚅`,`V`],[`𝚆`,`W`],[`𝚇`,`X`],[`𝚈`,`Y`],[`𝚉`,`Z`],[`𝚊`,`a`],[`𝚋`,`b`],[`𝚌`,`c`],[`𝚍`,`d`],[`𝚎`,`e`],[`𝚏`,`f`],[`𝚐`,`g`],[`𝚑`,`h`],[`𝚒`,`i`],[`𝚓`,`j`],[`𝚔`,`k`],[`𝚕`,`l`],[`𝚖`,`m`],[`𝚗`,`n`],[`𝚘`,`o`],[`𝚙`,`p`],[`𝚚`,`q`],[`𝚛`,`r`],[`𝚜`,`s`],[`𝚝`,`t`],[`𝚞`,`u`],[`𝚟`,`v`],[`𝚠`,`w`],[`𝚡`,`x`],[`𝚢`,`y`],[`𝚣`,`z`],[`𝚤`,`l`],[`𝚥`,`j`],[`𝛢`,`A`],[`𝛣`,`B`],[`𝛤`,`G`],[`𝛥`,`D`],[`𝛦`,`E`],[`𝛧`,`Z`],[`𝛨`,`I`],[`𝛩`,`TH`],[`𝛪`,`I`],[`𝛫`,`K`],[`𝛬`,`L`],[`𝛭`,`M`],[`𝛮`,`N`],[`𝛯`,`KS`],[`𝛰`,`O`],[`𝛱`,`P`],[`𝛲`,`R`],[`𝛳`,`TH`],[`𝛴`,`S`],[`𝛵`,`T`],[`𝛶`,`Y`],[`𝛷`,`F`],[`𝛸`,`x`],[`𝛹`,`PS`],[`𝛺`,`O`],[`𝛻`,`D`],[`𝛼`,`a`],[`𝛽`,`b`],[`𝛾`,`g`],[`𝛿`,`d`],[`𝜀`,`e`],[`𝜁`,`z`],[`𝜂`,`i`],[`𝜃`,`th`],[`𝜄`,`i`],[`𝜅`,`k`],[`𝜆`,`l`],[`𝜇`,`m`],[`𝜈`,`n`],[`𝜉`,`ks`],[`𝜊`,`o`],[`𝜋`,`p`],[`𝜌`,`r`],[`𝜍`,`s`],[`𝜎`,`s`],[`𝜏`,`t`],[`𝜐`,`y`],[`𝜑`,`f`],[`𝜒`,`x`],[`𝜓`,`ps`],[`𝜔`,`o`],[`𝜕`,`d`],[`𝜖`,`E`],[`𝜗`,`TH`],[`𝜘`,`K`],[`𝜙`,`f`],[`𝜚`,`r`],[`𝜛`,`p`],[`𝜜`,`A`],[`𝜝`,`V`],[`𝜞`,`G`],[`𝜟`,`D`],[`𝜠`,`E`],[`𝜡`,`Z`],[`𝜢`,`I`],[`𝜣`,`TH`],[`𝜤`,`I`],[`𝜥`,`K`],[`𝜦`,`L`],[`𝜧`,`M`],[`𝜨`,`N`],[`𝜩`,`KS`],[`𝜪`,`O`],[`𝜫`,`P`],[`𝜬`,`S`],[`𝜭`,`TH`],[`𝜮`,`S`],[`𝜯`,`T`],[`𝜰`,`Y`],[`𝜱`,`F`],[`𝜲`,`X`],[`𝜳`,`PS`],[`𝜴`,`O`],[`𝜵`,`D`],[`𝜶`,`a`],[`𝜷`,`v`],[`𝜸`,`g`],[`𝜹`,`d`],[`𝜺`,`e`],[`𝜻`,`z`],[`𝜼`,`i`],[`𝜽`,`th`],[`𝜾`,`i`],[`𝜿`,`k`],[`𝝀`,`l`],[`𝝁`,`m`],[`𝝂`,`n`],[`𝝃`,`ks`],[`𝝄`,`o`],[`𝝅`,`p`],[`𝝆`,`r`],[`𝝇`,`s`],[`𝝈`,`s`],[`𝝉`,`t`],[`𝝊`,`y`],[`𝝋`,`f`],[`𝝌`,`x`],[`𝝍`,`ps`],[`𝝎`,`o`],[`𝝏`,`a`],[`𝝐`,`e`],[`𝝑`,`i`],[`𝝒`,`k`],[`𝝓`,`f`],[`𝝔`,`r`],[`𝝕`,`p`],[`𝝖`,`A`],[`𝝗`,`B`],[`𝝘`,`G`],[`𝝙`,`D`],[`𝝚`,`E`],[`𝝛`,`Z`],[`𝝜`,`I`],[`𝝝`,`TH`],[`𝝞`,`I`],[`𝝟`,`K`],[`𝝠`,`L`],[`𝝡`,`M`],[`𝝢`,`N`],[`𝝣`,`KS`],[`𝝤`,`O`],[`𝝥`,`P`],[`𝝦`,`R`],[`𝝧`,`TH`],[`𝝨`,`S`],[`𝝩`,`T`],[`𝝪`,`Y`],[`𝝫`,`F`],[`𝝬`,`X`],[`𝝭`,`PS`],[`𝝮`,`O`],[`𝝯`,`D`],[`𝝰`,`a`],[`𝝱`,`v`],[`𝝲`,`g`],[`𝝳`,`d`],[`𝝴`,`e`],[`𝝵`,`z`],[`𝝶`,`i`],[`𝝷`,`th`],[`𝝸`,`i`],[`𝝹`,`k`],[`𝝺`,`l`],[`𝝻`,`m`],[`𝝼`,`n`],[`𝝽`,`ks`],[`𝝾`,`o`],[`𝝿`,`p`],[`𝞀`,`r`],[`𝞁`,`s`],[`𝞂`,`s`],[`𝞃`,`t`],[`𝞄`,`y`],[`𝞅`,`f`],[`𝞆`,`x`],[`𝞇`,`ps`],[`𝞈`,`o`],[`𝞉`,`a`],[`𝞊`,`e`],[`𝞋`,`i`],[`𝞌`,`k`],[`𝞍`,`f`],[`𝞎`,`r`],[`𝞏`,`p`],[`𝞐`,`A`],[`𝞑`,`V`],[`𝞒`,`G`],[`𝞓`,`D`],[`𝞔`,`E`],[`𝞕`,`Z`],[`𝞖`,`I`],[`𝞗`,`TH`],[`𝞘`,`I`],[`𝞙`,`K`],[`𝞚`,`L`],[`𝞛`,`M`],[`𝞜`,`N`],[`𝞝`,`KS`],[`𝞞`,`O`],[`𝞟`,`P`],[`𝞠`,`S`],[`𝞡`,`TH`],[`𝞢`,`S`],[`𝞣`,`T`],[`𝞤`,`Y`],[`𝞥`,`F`],[`𝞦`,`X`],[`𝞧`,`PS`],[`𝞨`,`O`],[`𝞩`,`D`],[`𝞪`,`av`],[`𝞫`,`g`],[`𝞬`,`d`],[`𝞭`,`e`],[`𝞮`,`z`],[`𝞯`,`i`],[`𝞰`,`i`],[`𝞱`,`th`],[`𝞲`,`i`],[`𝞳`,`k`],[`𝞴`,`l`],[`𝞵`,`m`],[`𝞶`,`n`],[`𝞷`,`ks`],[`𝞸`,`o`],[`𝞹`,`p`],[`𝞺`,`r`],[`𝞻`,`s`],[`𝞼`,`s`],[`𝞽`,`t`],[`𝞾`,`y`],[`𝞿`,`f`],[`𝟀`,`x`],[`𝟁`,`ps`],[`𝟂`,`o`],[`𝟃`,`a`],[`𝟄`,`e`],[`𝟅`,`i`],[`𝟆`,`k`],[`𝟇`,`f`],[`𝟈`,`r`],[`𝟉`,`p`],[`𝟊`,`F`],[`𝟋`,`f`],[`⒜`,`(a)`],[`⒝`,`(b)`],[`⒞`,`(c)`],[`⒟`,`(d)`],[`⒠`,`(e)`],[`⒡`,`(f)`],[`⒢`,`(g)`],[`⒣`,`(h)`],[`⒤`,`(i)`],[`⒥`,`(j)`],[`⒦`,`(k)`],[`⒧`,`(l)`],[`⒨`,`(m)`],[`⒩`,`(n)`],[`⒪`,`(o)`],[`⒫`,`(p)`],[`⒬`,`(q)`],[`⒭`,`(r)`],[`⒮`,`(s)`],[`⒯`,`(t)`],[`⒰`,`(u)`],[`⒱`,`(v)`],[`⒲`,`(w)`],[`⒳`,`(x)`],[`⒴`,`(y)`],[`⒵`,`(z)`],[`Ⓐ`,`(A)`],[`Ⓑ`,`(B)`],[`Ⓒ`,`(C)`],[`Ⓓ`,`(D)`],[`Ⓔ`,`(E)`],[`Ⓕ`,`(F)`],[`Ⓖ`,`(G)`],[`Ⓗ`,`(H)`],[`Ⓘ`,`(I)`],[`Ⓙ`,`(J)`],[`Ⓚ`,`(K)`],[`Ⓛ`,`(L)`],[`Ⓝ`,`(N)`],[`Ⓞ`,`(O)`],[`Ⓟ`,`(P)`],[`Ⓠ`,`(Q)`],[`Ⓡ`,`(R)`],[`Ⓢ`,`(S)`],[`Ⓣ`,`(T)`],[`Ⓤ`,`(U)`],[`Ⓥ`,`(V)`],[`Ⓦ`,`(W)`],[`Ⓧ`,`(X)`],[`Ⓨ`,`(Y)`],[`Ⓩ`,`(Z)`],[`ⓐ`,`(a)`],[`ⓑ`,`(b)`],[`ⓒ`,`(c)`],[`ⓓ`,`(d)`],[`ⓔ`,`(e)`],[`ⓕ`,`(f)`],[`ⓖ`,`(g)`],[`ⓗ`,`(h)`],[`ⓘ`,`(i)`],[`ⓙ`,`(j)`],[`ⓚ`,`(k)`],[`ⓛ`,`(l)`],[`ⓜ`,`(m)`],[`ⓝ`,`(n)`],[`ⓞ`,`(o)`],[`ⓟ`,`(p)`],[`ⓠ`,`(q)`],[`ⓡ`,`(r)`],[`ⓢ`,`(s)`],[`ⓣ`,`(t)`],[`ⓤ`,`(u)`],[`ⓥ`,`(v)`],[`ⓦ`,`(w)`],[`ⓧ`,`(x)`],[`ⓨ`,`(y)`],[`ⓩ`,`(z)`],[`Ċ`,`C`],[`ċ`,`c`],[`Ġ`,`G`],[`ġ`,`g`],[`Ħ`,`H`],[`ħ`,`h`],[`Ż`,`Z`],[`ż`,`z`],[`𝟎`,`0`],[`𝟏`,`1`],[`𝟐`,`2`],[`𝟑`,`3`],[`𝟒`,`4`],[`𝟓`,`5`],[`𝟔`,`6`],[`𝟕`,`7`],[`𝟖`,`8`],[`𝟗`,`9`],[`𝟘`,`0`],[`𝟙`,`1`],[`𝟚`,`2`],[`𝟛`,`3`],[`𝟜`,`4`],[`𝟝`,`5`],[`𝟞`,`6`],[`𝟟`,`7`],[`𝟠`,`8`],[`𝟡`,`9`],[`𝟢`,`0`],[`𝟣`,`1`],[`𝟤`,`2`],[`𝟥`,`3`],[`𝟦`,`4`],[`𝟧`,`5`],[`𝟨`,`6`],[`𝟩`,`7`],[`𝟪`,`8`],[`𝟫`,`9`],[`𝟬`,`0`],[`𝟭`,`1`],[`𝟮`,`2`],[`𝟯`,`3`],[`𝟰`,`4`],[`𝟱`,`5`],[`𝟲`,`6`],[`𝟳`,`7`],[`𝟴`,`8`],[`𝟵`,`9`],[`𝟶`,`0`],[`𝟷`,`1`],[`𝟸`,`2`],[`𝟹`,`3`],[`𝟺`,`4`],[`𝟻`,`5`],[`𝟼`,`6`],[`𝟽`,`7`],[`𝟾`,`8`],[`𝟿`,`9`],[`①`,`1`],[`②`,`2`],[`③`,`3`],[`④`,`4`],[`⑤`,`5`],[`⑥`,`6`],[`⑦`,`7`],[`⑧`,`8`],[`⑨`,`9`],[`⑩`,`10`],[`⑪`,`11`],[`⑫`,`12`],[`⑬`,`13`],[`⑭`,`14`],[`⑮`,`15`],[`⑯`,`16`],[`⑰`,`17`],[`⑱`,`18`],[`⑲`,`19`],[`⑳`,`20`],[`⑴`,`1`],[`⑵`,`2`],[`⑶`,`3`],[`⑷`,`4`],[`⑸`,`5`],[`⑹`,`6`],[`⑺`,`7`],[`⑻`,`8`],[`⑼`,`9`],[`⑽`,`10`],[`⑾`,`11`],[`⑿`,`12`],[`⒀`,`13`],[`⒁`,`14`],[`⒂`,`15`],[`⒃`,`16`],[`⒄`,`17`],[`⒅`,`18`],[`⒆`,`19`],[`⒇`,`20`],[`⒈`,`1.`],[`⒉`,`2.`],[`⒊`,`3.`],[`⒋`,`4.`],[`⒌`,`5.`],[`⒍`,`6.`],[`⒎`,`7.`],[`⒏`,`8.`],[`⒐`,`9.`],[`⒑`,`10.`],[`⒒`,`11.`],[`⒓`,`12.`],[`⒔`,`13.`],[`⒕`,`14.`],[`⒖`,`15.`],[`⒗`,`16.`],[`⒘`,`17.`],[`⒙`,`18.`],[`⒚`,`19.`],[`⒛`,`20.`],[`⓪`,`0`],[`⓫`,`11`],[`⓬`,`12`],[`⓭`,`13`],[`⓮`,`14`],[`⓯`,`15`],[`⓰`,`16`],[`⓱`,`17`],[`⓲`,`18`],[`⓳`,`19`],[`⓴`,`20`],[`⓵`,`1`],[`⓶`,`2`],[`⓷`,`3`],[`⓸`,`4`],[`⓹`,`5`],[`⓺`,`6`],[`⓻`,`7`],[`⓼`,`8`],[`⓽`,`9`],[`⓾`,`10`],[`⓿`,`0`],[`🙰`,`&`],[`🙱`,`&`],[`🙲`,`&`],[`🙳`,`&`],[`🙴`,`&`],[`🙵`,`&`],[`🙶`,`"`],[`🙷`,`"`],[`🙸`,`"`],[`‽`,`?!`],[`🙹`,`?!`],[`🙺`,`?!`],[`🙻`,`?!`],[`🙼`,`/`],[`🙽`,`\\`],[`🜇`,`AR`],[`🜈`,`V`],[`🜉`,`V`],[`🜆`,`VR`],[`🜅`,`VF`],[`🜩`,`2`],[`🜪`,`5`],[`🝡`,`f`],[`🝢`,`W`],[`🝣`,`U`],[`🝧`,`V`],[`🝨`,`T`],[`🝪`,`V`],[`🝫`,`MB`],[`🝬`,`VB`],[`🝲`,`3B`],[`🝳`,`3B`],[`💯`,`100`],[`🔙`,`BACK`],[`🔚`,`END`],[`🔛`,`ON!`],[`🔜`,`SOON`],[`🔝`,`TOP`],[`🔞`,`18`],[`🔤`,`abc`],[`🔠`,`ABCD`],[`🔡`,`abcd`],[`🔢`,`1234`],[`🔣`,`T&@%`],[`#️⃣`,`#`],[`*️⃣`,`*`],[`0️⃣`,`0`],[`1️⃣`,`1`],[`2️⃣`,`2`],[`3️⃣`,`3`],[`4️⃣`,`4`],[`5️⃣`,`5`],[`6️⃣`,`6`],[`7️⃣`,`7`],[`8️⃣`,`8`],[`9️⃣`,`9`],[`🔟`,`10`],[`🅰️`,`A`],[`🅱️`,`B`],[`🆎`,`AB`],[`🆑`,`CL`],[`🅾️`,`O`],[`🅿`,`P`],[`🆘`,`SOS`],[`🅲`,`C`],[`🅳`,`D`],[`🅴`,`E`],[`🅵`,`F`],[`🅶`,`G`],[`🅷`,`H`],[`🅸`,`I`],[`🅹`,`J`],[`🅺`,`K`],[`🅻`,`L`],[`🅼`,`M`],[`🅽`,`N`],[`🆀`,`Q`],[`🆁`,`R`],[`🆂`,`S`],[`🆃`,`T`],[`🆄`,`U`],[`🆅`,`V`],[`🆆`,`W`],[`🆇`,`X`],[`🆈`,`Y`],[`🆉`,`Z`],[`−`,`-`],[`⁓`,`-`]]),gI=[[`æ`,`ae`],[`Æ`,`Ae`],[`ø`,`oe`],[`Ø`,`Oe`],[`å`,`aa`],[`Å`,`Aa`]],_I={sv:[[`ä`,`a`],[`Ä`,`A`],[`ö`,`o`],[`Ö`,`O`],[`å`,`a`],[`Å`,`A`]],da:gI,nb:gI,de:[[`ä`,`ae`],[`Ä`,`Ae`],[`ö`,`oe`],[`Ö`,`Oe`],[`ü`,`ue`],[`Ü`,`Ue`],[`ß`,`ss`],[`ẞ`,`Ss`]],tr:[[`â`,`a`],[`Â`,`A`],[`ö`,`o`],[`Ö`,`O`],[`ü`,`u`],[`Ü`,`U`]],hu:[[`ű`,`u`],[`Ű`,`U`],[`ö`,`o`],[`Ö`,`O`],[`ü`,`u`],[`Ü`,`U`],[`á`,`a`],[`Á`,`A`],[`é`,`e`],[`É`,`E`],[`í`,`i`],[`Í`,`I`],[`ó`,`o`],[`Ó`,`O`],[`ú`,`u`],[`Ú`,`U`]],sr:[[`ђ`,`dj`],[`Ђ`,`Dj`],[`џ`,`dz`],[`Џ`,`Dz`],[`љ`,`lj`],[`Љ`,`Lj`],[`њ`,`nj`],[`Њ`,`Nj`],[`ћ`,`c`],[`Ћ`,`C`],[`ч`,`ch`],[`Ч`,`Ch`],[`ш`,`sh`],[`Ш`,`Sh`],[`ж`,`zh`],[`Ж`,`Zh`]]};for(let e of Object.keys(_I))_I[e]=new Map(_I[e]);var vI=e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),yI=e=>{let t=[...e.keys()].sort((e,t)=>t.length-e.length);return new RegExp(t.map(e=>vI(e)).join(`|`),`gu`)},bI=yI(hI),xI=new Map;for(let[e,t]of Object.entries(_I)){let n=new Map(hI);for(let[e,r]of t)n.set(e,r);xI.set(e,{replacements:n,pattern:yI(n)})}var SI=e=>{if(!e)return;let t=e.toLowerCase().replace(/^no(-|$)/,`nb$1`);if(Object.hasOwn(_I,t))return t;let n=t.split(`-`)[0];if(Object.hasOwn(_I,n))return n};function CI(e,t){if(typeof e!=`string`)throw TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};let n=SI(t.locale),r=[...t.customReplacements],i=hI,a=bI;if(n&&({replacements:i,pattern:a}=xI.get(n)),e=e.normalize(),r.length>0){r.sort((e,t)=>t[0].length-e[0].length);for(let[t,n]of r)e=e.replaceAll(t,n)}return e=e.replace(a,e=>i.get(e)??e),e=e.normalize(`NFD`).replaceAll(/\p{Diacritic}/gu,``).normalize(),e=e.replaceAll(/\p{Dash_Punctuation}/gu,`-`),e}var wI=(e,t,n)=>(e.has(t)||e.set(t,n()),e.get(t)),TI=(e,t,n,r)=>{if(e.has(t)){let n=e.get(t);return e.delete(t),e.set(t,n),n}let i=n();return e.set(t,i),e.size>r&&e.delete(e.keys().next().value),i},EI=[`da`,`de`,`hu`,`nb`,`sr`,`sv`,`tr`],DI=new Map,OI=(e,{fallback:t=!0,locale:n=void 0,maxLength:r=void 0}={})=>{let{slug:{encoding:i=`unicode`,clean_accents:a=!1,sanitize_replacement:o=`-`,maxlength:s=void 0,trim:c=!0,lowercase:l=!0}={}}=A($H)??{},u=r??s,d=e;if(a&&(d=CI(d.normalize(`NFD`),{locale:n&&EI.includes(n)?n:void 0})),d=i===`ascii`?d.replaceAll(/[^\w-~]/g,` `):d.replaceAll(/[\p{Z}\p{C}!"#$%&'()*+,/:;<=>?@[\\\]^`{|}]/gu,` `),d=d.trim().replaceAll(/\s+/g,o),o){let e=o.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),t=wI(DI,e,()=>({consecutivePattern:RegExp(`${e}+`,`g`),trimPattern:RegExp(`^${e}+|${e}+$`,`g`)}));d=d.replace(t.consecutivePattern,o),c&&(d=d.replace(t.trimPattern,``))}return!d&&t&&(d=Tf(`short`)),typeof u==`number`&&d.length>u&&(d=PA(d,u,{ellipsis:``})),l&&(d=d.toLocaleLowerCase()),d},kI=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),AI={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function jI(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Uae(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Wae(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function MI(e){return Wae(e)||jI(e)}var NI=document.createElement(`i`);function PI(e){let t=`&`+e+`;`;NI.innerHTML=t;let n=NI.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var Gae=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function FI(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?MI:u===`decimal`?jI:Uae;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&kI.includes(y)&&(_=y,v=PI(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&PI(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1)){if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):MI(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(Kae(e))h(7,S),C=`�`;else if(e in AI)h(6,S),C=AI[e];else{let t=``;qae(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Gae[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Kae(e){return e>=55296&&e<=57343||e>1114111}function qae(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var II=(e,t)=>{if(!e.includes(`{{`))return e;let{innerTag:n}=e.match(cM)?.groups??{};return n===void 0?e:String(t(n)??``)},LI=(e,t)=>e.map(e=>{let{defaultValue:n,truthyValue:r,falsyValue:i}=e.args,a={...e.args},o=!1;if(n!==void 0){let e=II(n,t);e!==n&&(a.defaultValue=e,o=!0)}if(r!==void 0){let e=II(r,t);e!==r&&(a.truthyValue=e,o=!0)}if(i!==void 0){let e=II(i,t);e!==i&&(a.falsyValue=e,o=!0)}return o?{...e,args:a}:e}),Jae=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),ee=E.prototype;return w.prototype=ee,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){ee[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),Yae=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c<s;c+=1){var l=a[c],u=f[l],d=u&&u[0],p=u&&u[1];a[c]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,c=i.parser,l=e.slice(r),u=o.exec(l)[0];c.call(t,u),e=e.replace(u,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var c=!0===a[2],l=!0===a[3],u=c||l,d=a[2];l&&(d=a[2]),o=this.$locale(),!c&&d&&(o=n.Ls[d]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Xae=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localizedFormat=r()})(e,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};return function(t,n,r){var i=n.prototype,a=i.format;r.en.formats=e,i.format=function(t){t===void 0&&(t=`YYYY-MM-DDTHH:mm:ssZ`);var n=this.$locale().formats,r=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,r,i){var a=i&&i.toUpperCase();return r||n[i]||e[i]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))}(t,n===void 0?{}:n);return a.call(this,r)}}}))})),Zae=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_utc=r()})(e,(function(){"use strict";var e=`minute`,t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,i,a){var o=i.prototype;a.utc=function(e){return new i({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=o.utcOffset;o.utcOffset=function(r,i){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if(typeof r==`string`&&(r=function(e){e===void 0&&(e=``);var r=e.match(t);if(!r)return null;var i=(``+r[0]).match(n)||[`-`,0,0],a=i[0],o=60*i[1]+ +i[2];return o===0?0:a===`+`?o:-o}(r),r===null))return this;var o=Math.abs(r)<=16?60*r:r;if(o===0)return this.utc(i);var s=this.clone();if(i)return s.$offset=o,s.$u=!1,s;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(s=this.local().add(o+c,e)).$offset=o,s.$x.$localOffset=c,s};var u=o.format;o.format=function(e){var t=e||(this.$u?`YYYY-MM-DDTHH:mm:ss[Z]`:``);return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var d=o.toDate;o.toDate=function(e){return e===`s`&&this.$offset?a(this.format(`YYYY-MM-DD HH:mm:ss:SSS`)).toDate():d.call(this)};var f=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return f.call(this,e,t,n);var r=this.local(),i=a(e).local();return f.call(r,i,t,n)}}}))})),RI=l(Jae(),1),zI=l(Yae(),1),BI=l(Xae(),1),VI=l(Zae(),1),Qae=new Set([`local`,`utc`]),HI=new WeakMap,UI=e=>typeof e==`string`&&!Qae.has(e),WI=e=>{let t=HI.get(e);if(t)return t;let{type:n=`datetime-local`,min:r=void 0,max:i=void 0,step:a=void 0,format:o,date_format:s=void 0,time_format:c=void 0,picker_utc:l=!1,input_timezone:u=`local`,output_utc:d=!1}=e,f=typeof u==`string`&&u!==`any`?u:`local`,p=typeof s==`string`?s:``,m=typeof c==`string`?c:``,h=n===`date`||c===!1,g=n===`time`||s===!1,_=h?`9999-12-31`:g?void 0:`9999-12-31T23:59`,v=e.input_timezone===void 0?l?`utc`:`local`:f,y={type:h?`date`:g?`time`:`datetime-local`,min:typeof r==`string`&&r?r:void 0,max:typeof i==`string`&&i?i:_,step:typeof a==`number`&&Number.isInteger(a)&&a>0||a===`any`?a:void 0,format:o||[p,m].join(` `).trim()||void 0,dateOnly:h,timeOnly:g,inputTimeZone:v,outputUTC:e.output_utc===void 0?l:d,utc:v===`utc`,singleCustomTimeZone:UI(v)?v:void 0};return HI.set(e,y),y};RI.default.extend(zI.default),RI.default.extend(BI.default),RI.default.extend(VI.default);var $ae=/\s*\|\s*/,eoe=/^\d{4}-[01]\d-[0-3]\d$/,toe=/T\d{2}:\d{2}(?::\d{2})?(?:\.\d+)?Z$/,noe=Object.entries({date:/^date\('(?<format>.+?)'(?:,\s*'(?<timeZone>.+?)')?\)$/,default:/^default\('(?<defaultValue>.+?)'\)$/,ternary:/^ternary\('(?<truthyValue>.*?)',\s*'(?<falsyValue>.*?)'\)$/,truncate:/^truncate\((?<max>\d+)(?:,\s*'(?<ellipsis>.+?)')?\)$/}),roe=e=>{for(let[t,n]of noe){let r=Object.entries(e.match(n)?.groups??{});if(r.length)return{method:t,args:Object.fromEntries(r.filter(([,e])=>e!==void 0))}}return{method:e,args:{}}},GI=e=>{let[t,...n]=e.trim().split($ae);return{value:t,transformations:n.map(e=>roe(e))}},ioe=e=>String(e).toUpperCase(),aoe=e=>String(e).toLowerCase(),ooe=(e,{format:t,timeZone:n},r)=>{let i=String(e),{dateOnly:a,utc:o}=WI(r),s=(n===`utc`||o||a&&i.match(eoe)||a&&i.match(toe)?RI.default.utc:RI.default)(i);return s.isValid()?s.format(t):``},soe=(e,{defaultValue:t})=>e?String(e):t,coe=(e,{truthyValue:t,falsyValue:n})=>e?t:n,loe=(e,{max:t,ellipsis:n=`…`})=>PA(String(e),Number(t),{ellipsis:n}),uoe=({fieldConfig:e,value:t,transformation:n,locale:r})=>{let{method:i,args:a}=n;switch(i){case`upper`:return ioe(t);case`lower`:return aoe(t);case`slugify`:return OI(String(t),{locale:r});case`date`:return ooe(t,a,e??{});case`default`:return soe(t,a);case`ternary`:return coe(t,a);case`truncate`:return loe(t,a);default:return String(t)}},KI=({fieldConfig:e,value:t,transformations:n,locale:r})=>(n.forEach(n=>{t=uoe({fieldConfig:e,value:t,transformation:n,locale:r})}),t),qI=e=>!(`divider`in e)&&typeof e.file==`string`&&Array.isArray(e.fields),JI=e=>e.filter(e=>qI(e)),YI=(e,t)=>{let n=typeof e==`string`?HL(e):e;if(!(!n||!(`_fileMap`in n)))return n._fileMap[t]},XI=e=>e.label||e.name,ZI=(e,t)=>`_fileMap`in e?Object.values(e._fileMap).filter(({_file:e,_i18n:n})=>e.fullPath===t.locales[n.defaultLocale]?.path):[],QI=(e,t)=>{let n=A(qL).find(({collectionName:n,fileName:r})=>n===e&&r===t);if(!n?.filePathMap)return;let r=new Set(Object.values(n.filePathMap));return A(JL).find(e=>Object.values(e.locales).some(({path:e})=>r.has(e)))},$I=(e,t)=>{if(e&&t){let{collections:n,singletons:r}=A($H);if(e===`_singletons`)return Array.isArray(r)?JI(r).findIndex(e=>e.name===t):-1;let i=zL({collections:n}).find(({name:t})=>t===e);if(i&&`files`in i)return i.files.findIndex(({name:e})=>e===t)}return-1},eL=[`boolean`,`code`,`color`,`compute`,`datetime`,`file`,`hidden`,`image`,`keyvalue`,`list`,`map`,`markdown`,`number`,`object`,`relation`,`richtext`,`select`,`string`,`text`,`uuid`],doe=[`boolean`,`color`,`compute`,`datetime`,`map`,`markdown`,`number`,`richtext`,`string`,`text`,`uuid`].filter(e=>![`boolean`,`number`].includes(e)),tL=[`file`,`image`],nL=[...tL,`relation`,`select`],foe=[...nL,`datetime`,`keyvalue`,`list`,`number`],rL=new Map,iL=new Map,aL=new Map,oL=new Set,sL=new Map,cL=new Set,lL={slug_length:!1,yaml_quote:!1,uuid_read_only:!1,save_all_locales:!1,automatic_deployments:!1,multiple_folders_i18n_root:!1,omit_default_locale_from_filename:!1},poe={slug_length:"The `slug_length` collection option is deprecated and will be removed in Sveltia CMS 1.0. Use the global `slug.maxlength` option instead. ",yaml_quote:"The `yaml_quote` collection option is deprecated and will be removed in Sveltia CMS 1.0. Use the global `output.yaml.quote` option instead. `yaml_quote: true` is equivalent to `quote: double`. https://sveltiacms.app/en/docs/data-output#controlling-data-output",uuid_read_only:"The `read_only` option for the UUID field type is deprecated and will be removed in Sveltia CMS 1.0. Use the `readonly` option instead.",save_all_locales:"The `save_all_locales` i18n option is deprecated and will be removed in Sveltia CMS 1.0. Use the `initial_locales` option instead. `save_all_locales: false` is equivalent to `initial_locales: all`. https://sveltiacms.app/en/docs/i18n#disabling-non-default-locale-content",automatic_deployments:"The `automatic_deployments` backend option is deprecated and will be removed in Sveltia CMS 1.0. Use the `skip_ci` option instead. `automatic_deployments: false` is equivalent to `skip_ci: true`, and `automatic_deployments: true` is equivalent to `skip_ci: false`. https://sveltiacms.app/en/docs/deployments#disabling-automatic-deployments",multiple_folders_i18n_root:"The `multiple_folders_i18n_root` i18n structure is deprecated and will be removed in Sveltia CMS 1.0. Use the `multiple_root_folders` structure instead. https://sveltiacms.app/en/docs/i18n#multiple-root-folders",omit_default_locale_from_filename:"The `omit_default_locale_from_filename` i18n option is deprecated and will be removed in Sveltia CMS 1.0. Use the `omit_default_locale_from_file_path` option instead. https://sveltiacms.app/en/docs/i18n#managing-content-structure"},uL=(e,t)=>{lL[e]||(console.warn(t??poe[e]),lL[e]=!0)},moe=`_index`,dL=new WeakMap,fL=e=>{if(!IL(e))return;let{index_file:t}=e;if(t)return(t===!0?void 0:t.name)??moe},pL=e=>{let t=dL.get(e);if(t&&t.locale===Ud.current)return t.indexFile;let n=fL(e),r;if(n!==void 0){let{index_file:t}=e,i=t===!0?{}:t;r={name:n,label:i.label||Z(`index_file`),icon:i.icon??`home`,fields:i.fields,editor:i.editor}}return dL.set(e,{locale:Ud.current,indexFile:r}),r},mL=(e,t)=>{let n=fL(e);return n!==void 0&&t.slug===n},hL=[`markdown`,`md`,`mdown`,`mdwn`,`mdx`,`mkd`,`mkdn`,`html.md`],gL=[`njk`],hoe=[...hL,...gL],goe={raw:`txt`,yaml:`yml`,yml:`yml`,toml:`toml`,json:`json`},_oe={yaml:`yaml`,yml:`yaml`,toml:`toml`,json:`json`,astro:`raw`},voe={"json-frontmatter":[`{`,`}`],"toml-frontmatter":[`+++`,`+++`],"yaml-frontmatter":[`---`,`---`]},_L=[`yaml-frontmatter`,`toml-frontmatter`,`json-frontmatter`],yoe=[`toml`,`toml-frontmatter`],boe={type:`language`,languageDisplay:`standard`,style:`short`,fallback:`none`},vL=e=>{let t;if(e!==`_default`)try{[t]=Intl.getCanonicalLocales(e)}catch{}return t},yL=e=>e===`_default`?`auto`:Hd(e)?`rtl`:`ltr`,bL=new Map,xL=(e,{displayLocale:t=vL(Ud.current??`en`),formatterOptions:n=boe}={})=>{let r=vL(e);if(!r)return;let i;t?(i=bL.get(t),i||(i=new Intl.DisplayNames(t,n),bL.set(t,i))):i=new Intl.DisplayNames(void 0,n);try{let e=i.of(r);if(!e)return;let[n,...a]=e;return[n.toLocaleUpperCase(t),...a].join(``)}catch(e){console.error(e);return}},SL=new Map,CL=(e,t={})=>{let n={style:`narrow`,type:`conjunction`,...t},r=`${e}|${n.style}|${n.type}`,i=SL.get(r);return i||(i=new Intl.ListFormat(vL(e),n),SL.set(r,i)),i},wL=({_i18n:e,locale:t,path:n})=>{let{defaultLocale:r,omitDefaultLocaleFromFilePath:i}=e;return i&&t===r&&(n=n.replace(/{{locale}}[./]/,``)),n.replaceAll(`{{locale}}`,t)},TL=({extension:e,format:t})=>(t?aL.get(t)?.extension:void 0)||e||(t?goe[t]??`md`:`md`),xoe=({extension:e,format:t})=>t||(hL.includes(e)?`frontmatter`:_oe[e]??`yaml-frontmatter`),Soe=(e,t)=>e?`(?<subPath>${NA(e).replace(oM,`[^/]+?`)}${t?`|${t}`:``})`:`(?<subPath>[^/]+?)`,Coe=({extension:e,format:t,basePath:n,subPath:r,indexFileName:i,_i18n:a})=>{let{allLocales:o,defaultLocale:s,omitDefaultLocaleFromFilePath:c,structureMap:{i18nMultiFile:l,i18nMultiFolder:u,i18nMultiRootFolder:d}}=a,f=`(?<locale>${o.join(`|`)})`,p=o.filter(e=>e!==s).join(`|`),m=c?`(?:(?<locale>${p})\\/)?`:`${f}\\/`,h=c?`(?:\\.(?<locale>${p}))?`:`\\.${f}`,g=[`^`,d?m:``,n?`${NA(n)}\\/`:``,u?m:``,Soe(r,i),l?h:``,`\\.`,NA(TL({format:t,extension:e})),`$`].join(``);return new RegExp(g)},EL=({format:e,delimiter:t})=>typeof t==`string`&&t.trim()?[t,t]:Array.isArray(t)&&t.length===2?t:voe[e]??void 0,DL=({rawCollection:e,file:t,_i18n:n})=>{let{folder:r,path:i,extension:a,format:o,frontmatter_delimiter:s,body_field:c,yaml_quote:l}=e,u=IL(e),d=t?.file?FA(t.file):void 0,f=d?qj(d).extension:a,p=t?.format??o,m=TL({format:p,extension:f}),h=xoe({format:p,extension:m}),g=t?.frontmatter_delimiter??s,_=u?FA(r):void 0,v=u?pL(e)?.name:void 0;return l!==void 0&&uL(`yaml_quote`),{extension:m,format:h,basePath:_,subPath:u?i:void 0,fullPathRegEx:_===void 0?void 0:Coe({extension:m,format:h,basePath:_,subPath:i,indexFileName:v,_i18n:n}),fullPath:d?wL({_i18n:n,locale:n.defaultLocale,path:d}):void 0,fmDelimiters:EL({format:h,delimiter:g}),bodyField:t?.body_field??c,yamlQuote:!!l}},OL={SINGLE_FILE:`single_file`,SINGLE_FILE_DEFAULT_ROOT:`single_file_default_root`,MULTIPLE_FILES:`multiple_files`,MULTIPLE_FOLDERS:`multiple_folders`,MULTIPLE_FOLDERS_I18N_ROOT:`multiple_folders_i18n_root`,MULTIPLE_ROOT_FOLDERS:`multiple_root_folders`},kL=`_default`,AL={key:`translationKey`,value:`{{slug}}`},jL=({cmsConfig:e,collection:t,file:n})=>{let r=e?.i18n;if(!or(r))return;let i=structuredClone(r),{name:a,i18n:o}=t;if(!(!o&&a!==`_singletons`)){if(or(o)&&Object.assign(i,o),n){if(!n.i18n)return;or(n.i18n)&&Object.assign(i,n.i18n)}return i}},ML={i18nEnabled:!1,saveAllLocales:!0,allLocales:[kL],initialLocales:[kL],defaultLocale:kL,structure:OL.SINGLE_FILE,structureMap:{i18nSingleFile:!1,i18nSingleFileDefaultRoot:!1,i18nMultiFile:!1,i18nMultiFolder:!1,i18nMultiRootFolder:!1},canonicalSlug:{...AL},omitDefaultLocaleFromFilePath:!1,omitDefaultLocaleFromPreviewPath:!1},woe=(e,t)=>t?t.file.includes(`{{locale}}`)?OL.MULTIPLE_FILES:e===OL.SINGLE_FILE_DEFAULT_ROOT?OL.SINGLE_FILE_DEFAULT_ROOT:OL.SINGLE_FILE:e,Toe=(e,t)=>({i18nSingleFile:e&&t===OL.SINGLE_FILE,i18nSingleFileDefaultRoot:e&&t===OL.SINGLE_FILE_DEFAULT_ROOT,i18nMultiFile:e&&t===OL.MULTIPLE_FILES,i18nMultiFolder:e&&t===OL.MULTIPLE_FOLDERS,i18nMultiRootFolder:e&&(t===OL.MULTIPLE_FOLDERS_I18N_ROOT||t===OL.MULTIPLE_ROOT_FOLDERS)}),Eoe=(e,t,n)=>e?n&&t.includes(n)?n:t[0]:kL,Doe=(e,t,n)=>e===`all`?t:e==="default"?[n]:t.filter(t=>t===n||!Array.isArray(e)||e.includes(t)),Ooe=(e,t,n)=>e?n?/{{locale}}[./]/.test(n.file):t.i18nMultiFile||t.i18nMultiFolder||t.i18nMultiRootFolder:!1,NL=(e,t)=>{let n=jL({cmsConfig:A($H),collection:e,file:t}),{structure:r=OL.SINGLE_FILE,locales:i=[],default_locale:a,initial_locales:o,save_all_locales:s=!0,canonical_slug:c={key:void 0,value:void 0},omit_default_locale_from_filename:l,omit_default_locale_from_file_path:u=l??!1,omit_default_locale_from_preview_path:d=!1}=n??{};n?.save_all_locales!==void 0&&uL(`save_all_locales`),l!==void 0&&uL(`omit_default_locale_from_filename`);let{key:f=AL.key,value:p=AL.value}=c,m=i.length>0,h=m?i:[kL],g=Eoe(m,h,a),_=woe(r,t),v=Toe(m,_),y=!m||s===!0&&o===void 0,b=Doe(o,h,g),x=Ooe(u,v,t);return _===`multiple_folders_i18n_root`&&uL(`multiple_folders_i18n_root`),{i18nEnabled:m,saveAllLocales:y,allLocales:h,defaultLocale:g,initialLocales:b,structure:_,structureMap:v,canonicalSlug:{key:f,value:p},omitDefaultLocaleFromFilePath:x,omitDefaultLocaleFromPreviewPath:d}},PL=na(),FL=new Map,IL=e=>typeof e.folder==`string`&&!Array.isArray(e.files),LL=e=>e.folder===void 0&&Array.isArray(e.files),RL=e=>LL(e)&&e.name===`_singletons`,koe=(e,{visible:t=void 0,type:n=void 0}={})=>`divider`in e||t&&e.hide?!1:n===`entry`?IL(e):n===`file`?LL(e):n===`singleton`?RL(e):IL(e)||LL(e),zL=({collections:e=A($H)?.collections??[],visible:t,type:n}={})=>e.filter(e=>koe(e,{visible:t,type:n})),Aoe=()=>zL({visible:!0})[0],joe=e=>{if(!(`folder`in e))return[];let{fields:t,thumbnail:n=!0}=e;return n===!1?[]:typeof n==`string`?[n]:Array.isArray(n)?n:t?.length?t.filter(({widget:e=`string`})=>tL.includes(e)).map(({multiple:e,name:t})=>e?`${t}.*`:t):[]},Moe=(e,t)=>({...e,_i18n:t,_type:`entry`,_file:DL({rawCollection:e,_i18n:t}),_thumbnailFieldNames:joe(e)}),BL=(e,t,n)=>({...e,_i18n:t,_type:RL(e)?`singleton`:`file`,_fileMap:Object.fromEntries(n.filter(qI).map(t=>{let n=NL(e,t),r=DL({rawCollection:e,file:t,_i18n:n});return[t.name,{...t,_file:r,_i18n:n}]}))}),VL=()=>{let e=A($H)?.singletons;if(!Array.isArray(e))return;let t=JI(e).map(e=>({...e,file:FA(e.file)}));if(!t.length)return;let n={name:`_singletons`,files:t};return BL(n,NL(n),t)},HL=e=>{let t=FL.get(e);if(t)return t;if(e===`_singletons`){let t=VL();return FL.set(e,t),t}let n=zL().find(t=>t.name===e);if(!n){FL.set(e,void 0);return}let r=IL(n)?n:void 0,i=LL(n)?n:void 0;if(!r&&!i){FL.set(e,void 0);return}r?r.folder=FA(r.folder):i?.files.forEach(e=>{e.file&&=FA(e.file)});let a=NL(n),o=r?Moe(r,a):BL(i,a,i.files);return FL.set(e,o),o},UL=(e,{useSingular:t=!1}={})=>{let{_type:n,name:r,label:i,label_singular:a}=e;return n===`singleton`?Z(`files`):t&&a?a:i||r},WL=e=>e?e===`_singletons`?9999999:A($H)?.collections?.findIndex(({name:t})=>t===e)??-1:-1,GL=na(!1),KL=na(),qL=na([]),JL=na([]),YL=na([]),XL={source:void 0,fileMap:new Map,regexFolders:[]},Noe=()=>{let e=A(qL);if(e===XL.source)return XL;let t=new Map,n=[];return e.forEach(e=>{e.filePathMap?[...new Set(Object.values(e.filePathMap))].forEach(n=>{let r=t.get(n);r?r.push(e):t.set(n,[e])}):n.push([e,HL(e.collectionName)?._file?.fullPathRegEx])}),XL.source=e,XL.fileMap=t,XL.regexFolders=n,XL},ZL=e=>{let{fileMap:t,regexFolders:n}=Noe();return[...t.get(e)??[],...n.filter(([,t])=>t?.test(e)).map(([e])=>e).sort((e,t)=>(t.folderPath??``).localeCompare(e.folderPath??``))]},QL=new WeakMap,Poe=e=>{let t=QL.get(e);return t||(t=Object.keys(e).map((e,t)=>[e,t]).sort(([e],[t])=>e<t?-1:1),QL.set(e,t)),t},$L=(e,t,{live:n=!1}={})=>{if(n)return Object.keys(e).filter(e=>e.startsWith(t));let r=Poe(e),i=0,a=r.length;for(;i<a;){let e=Math.floor((i+a)/2);r[e][0]<t?i=e+1:a=e}let o=[];for(let e=i;e<r.length&&r[e][0].startsWith(t);e+=1)o.push(r[e]);return o.sort(([,e],[,t])=>e-t).map(([e])=>e)},eR=/^(?<parent>.+)\.\d+$/,tR=new WeakMap,nR=(e,t,{live:n=!1}={})=>{if(n)return Object.keys(e).filter(e=>e.match(eR)?.groups?.parent===t);let r=tR.get(e);return r||(r=new Map,Object.keys(e).forEach(e=>{let{parent:t}=e.match(eR)?.groups??{};if(t===void 0)return;let n=r.get(t);n?n.push(e):r.set(t,[e])}),tR.set(e,r)),r.get(t)??[]},rR=e=>rM(e&&Object.fromEntries(Object.entries(e).sort(([e],[t])=>RA(e,t)))),Foe=e=>Array.isArray(e)&&!e.length||or(e)&&!Object.keys(e).length,iR=(e,t)=>({[e]:Array.isArray(t)?[]:{},...Object.fromEntries(Object.entries(nM(t)).map(([t,n])=>[`${e}.${t}`,n]))}),aR=(e,t,{live:n=!1}={})=>{let r=$L(e,`${t}.`,{live:n});if(!r.length)return;let i=r.map(n=>[`_${n.slice(t.length)}`,e[n]]),a=e[t];return Foe(a)&&i.push([`_`,a]),rR(Object.fromEntries(i))._},Ioe=(e,t)=>{let n=`${t}.`;Object.keys(e).forEach(r=>{(r===t||r.startsWith(n))&&delete e[r]})},Loe=(e,t,n)=>{Ioe(e,t),Object.assign(e,iR(t,n))},Roe=l(s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_timezone=r()})(e,(function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,i){var a,o=function(e,n,r){r===void 0&&(r={});var i=new Date(e);return function(e,n){n===void 0&&(n={});var r=n.timeZoneName||`short`,i=e+`|`+r,a=t[i];return a||(a=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZoneName:r}),t[i]=a),a}(n,r).formatToParts(i)},s=function(t,n){for(var r=o(t,n),a=[],s=0;s<r.length;s+=1){var c=r[s],l=c.type,u=c.value,d=e[l];d>=0&&(a[d]=parseInt(u,10))}var f=a[3],p=f===24?0:f,m=a[0]+`-`+a[1]+`-`+a[2]+` `+p+`:`+a[4]+`:`+a[5]+`:000`,h=+t;return(i.utc(m).valueOf()-(h-=h%1e3))/6e4},c=r.prototype;c.tz=function(e,t){if(e===void 0&&(e=a),!this.isValid())return this;var n,r=this.utcOffset(),o=this.toDate(),c=o.toLocaleString(`en-US`,{timeZone:e}),l=s(+o,e);if(!Number(l))n=this.utcOffset(0,t);else if(n=i(c,{locale:this.$L}).$set(`millisecond`,this.$ms).utcOffset(l,!0),t){var u=n.utcOffset();n=n.add(r-u,`minute`)}return n.$x.$timezone=e,n},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),n=o(this.valueOf(),t,{timeZoneName:e}).find((function(e){return e.type.toLowerCase()===`timezonename`}));return n&&n.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=i(this.format(`YYYY-MM-DD HH:mm:ss:SSS`),{locale:this.$L});return l.call(n,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,n){var r=n&&t,o=n||t||a,c=s(+i(),o);if(typeof e!=`string`)return i(e).tz(o);var l=i.utc(e,r).valueOf();if(Number.isNaN(l)){var u=i(NaN);return u.$x.$timezone=o,u}var d=function(e,t,n){var r=e-60*t*1e3,i=s(r,n);if(t===i)return[r,t];var a=s(r-=60*(i-t)*1e3,n);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(l,c,o),f=d[0],p=d[1],m=i(f).utcOffset(p);return m.$x.$timezone=o,m},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}))}))(),1),zoe=/^\d{4}-[01]\d-[0-3]\d$/,Boe=/T00:00(?::00)?(?:\.000)?Z$/,oR={year:`numeric`,month:`short`,day:`numeric`},sR={hour:`numeric`,minute:`numeric`,hour12:!0},Voe={...oR,...sR},cR=(e,t)=>e.toLocaleString(t??void 0,Voe),Hoe=/(?<hours>[+-]\d{2})(?::?(?<minutes>\d{2}))?(?::?(?<seconds>\d{2}))?(?:\.\d+)?$|Z$/,lR=e=>String(Math.abs(Number(e))).padStart(2,`0`),uR=(e,t)=>{if(typeof e!=`string`||!e.trim())return;let{inputTimeZone:n}=WI(t);if(n===`local`||n===`utc`)return;let r=new Date(e);if(Number.isNaN(r.getTime()))return;let i=e.match(Hoe);if(!i?.groups)return;let{hours:a,minutes:o=`0`}=i.groups,s=i[0]===`Z`?`+00:00`:`${a.startsWith(`-`)?`-`:`+`}${lR(a)}:${lR(o)}`;return(new Intl.DateTimeFormat(`en-US`,{timeZone:n,timeZoneName:`longOffset`}).formatToParts(r).find(e=>e.type===`timeZoneName`)?.value??``).replace(`GMT`,``)===s?n:void 0},Uoe=(e,t)=>{let n=uR(e,t);if(n)return n;let{inputTimeZone:r,singleCustomTimeZone:i}=WI(t);if(i)return i;try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(r===`local`)return e}catch{return r===`local`?``:void 0}},dR=(e,t=new Date)=>{try{let n=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`longOffset`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``,r=e.split(`/`).pop()?.replaceAll(`_`,` `)??e;return`(${n.replace(`GMT`,``)}) ${r}`}catch{return e}};RI.default.extend(zI.default),RI.default.extend(BI.default),RI.default.extend(VI.default),RI.default.extend(Roe.default);var Woe=/^(?<date>\d{4}-[01]\d-[0-3]\d)\b/,Goe=/(?:^|T)(?<time>[0-2]\d:[0-5]\d)\b/,Koe=/(?:^|T)[0-2]\d:[0-5]\d:[0-5]\d/,fR=e=>e instanceof Date&&!Number.isNaN(e.getTime()),pR=e=>e?RI.default.utc:RI.default,mR=({value:e,format:t,parseAsUTC:n})=>{let r=pR(n),i=r(e,t);return i.isValid()?i:r(e)},hR=({date:e,timeZone:t,inputTimeZone:n,dateOnly:r,timeOnly:i,includeUTCSeconds:a=!1})=>{let o=t||(n===`utc`?`UTC`:void 0),{year:s,month:c,day:l,hour:u,minute:d}=mI({date:e,timeZone:o}),f=`${s}-${c}-${l}`,p=`${u}:${d}`;return r?f:i?p:a&&o===`UTC`?`${f}T${p}:00.000Z`:`${f}T${p}`},gR=(e,t)=>{let{format:n,timeOnly:r,utc:i,outputUTC:a}=WI(t),o=i||a;if(!e)return;let s;if(n){let t=mR({value:e,format:n,parseAsUTC:o});if(t.isValid())return t.toDate();console.error(`Invalid Date`,e);return}if(s=r?new Date(`${new Date().toJSON().split(`T`)[0]}T${e}`):new Date(e),fR(s))return s;console.error(`Invalid Date`,e)},_R=(e,t)=>{let{dateOnly:n,timeOnly:r,inputTimeZone:i}=WI(e);return hR({timeZone:t,inputTimeZone:i,dateOnly:n,timeOnly:r,includeUTCSeconds:!0})},vR=({inputValue:e,currentValue:t,fieldConfig:n,timeZone:r,outputUTC:i})=>{let{format:a,dateOnly:o,timeOnly:s,inputTimeZone:c,outputUTC:l}=WI(n),u=i??l,d=o?`YYYY-MM-DD`:s?`HH:mm`:`YYYY-MM-DDTHH:mm`,f=c===`utc`?`UTC`:c===`local`?u?r:void 0:r||c;if(e===``)return``;if(!e)return;if(a){let t=pR(c===`utc`),n=t(e,d);return n.isValid()||(n=t(e)),n.isValid()?(f&&(n=n.tz(f,!0)),u&&c!==`utc`&&(n=n.utc()),n.format(a)):``}if(o)return e;let p=Koe.test(e),m=t?`:00${t.endsWith(`.000`)?`.000`:``}`:`:00`;if(s){let t=p?e:`${e}${m}`;return c===`utc`?`${t}Z`:t}return c===`utc`?RI.default.utc(e).format():u?(r?RI.default.tz(e,r):(0,RI.default)(e)).utc().format():r&&c!==`local`?RI.default.tz(e,r).format(`YYYY-MM-DDTHH:mm:ssZ`):p?e:`${e}${m}`},yR=({currentValue:e,fieldConfig:t,timeZone:n})=>{let{dateOnly:r,timeOnly:i,inputTimeZone:a,format:o,outputUTC:s}=WI(t),c=uR(e,t)??n;if(!e)return``;let l=r?e.match(Woe)?.groups?.date:i?e.match(Goe)?.groups?.time:void 0;if(l)return l;let u;if(c&&o&&!s){try{let t=(0,RI.default)(e,o).tz(c,!0);u=t.isValid()?t.toDate():void 0}catch{}u??=gR(e,t)}else u=gR(e,t);return u?hR({date:u,timeZone:c,inputTimeZone:a,dateOnly:r,timeOnly:i}):``},bR=({locale:e,fieldConfig:t,currentValue:n})=>{let{format:r,dateOnly:i,timeOnly:a,utc:o,singleCustomTimeZone:s}=WI(t),c=o?`UTC`:s;if(typeof n!=`string`||!n.trim())return``;if(r){let e=mR({value:n,format:r,parseAsUTC:o});return e.isValid()?e.format(r):(console.error(`Invalid Date`,n),``)}let l=gR(n,t),u=vL(e);return fR(l)?a?l.toLocaleTimeString(u,{...sR,timeZone:c}):i?l.toLocaleDateString(u,{...oR,timeZone:c||(o||zoe.test(n)||Boe.test(n)?`UTC`:void 0)}):l.toLocaleString(u,{...oR,...sR,timeZone:c,timeZoneName:void 0}):``},xR={"application/prs.cww":[`cww`],"application/prs.xsf+xml":[`xsf`],"application/vnd.1000minds.decision-model+xml":[`1km`],"application/vnd.3gpp.pic-bw-large":[`plb`],"application/vnd.3gpp.pic-bw-small":[`psb`],"application/vnd.3gpp.pic-bw-var":[`pvb`],"application/vnd.3gpp2.tcap":[`tcap`],"application/vnd.3m.post-it-notes":[`pwn`],"application/vnd.accpac.simply.aso":[`aso`],"application/vnd.accpac.simply.imp":[`imp`],"application/vnd.acucobol":[`acu`],"application/vnd.acucorp":[`atc`,`acutc`],"application/vnd.adobe.air-application-installer-package+zip":[`air`],"application/vnd.adobe.formscentral.fcdt":[`fcdt`],"application/vnd.adobe.fxp":[`fxp`,`fxpl`],"application/vnd.adobe.xdp+xml":[`xdp`],"application/vnd.adobe.xfdf":[`*xfdf`],"application/vnd.age":[`age`],"application/vnd.ahead.space":[`ahead`],"application/vnd.airzip.filesecure.azf":[`azf`],"application/vnd.airzip.filesecure.azs":[`azs`],"application/vnd.amazon.ebook":[`azw`],"application/vnd.americandynamics.acc":[`acc`],"application/vnd.amiga.ami":[`ami`],"application/vnd.android.package-archive":[`apk`],"application/vnd.anser-web-certificate-issue-initiation":[`cii`],"application/vnd.anser-web-funds-transfer-initiation":[`fti`],"application/vnd.antix.game-component":[`atx`],"application/vnd.apple.installer+xml":[`mpkg`],"application/vnd.apple.keynote":[`key`],"application/vnd.apple.mpegurl":[`m3u8`],"application/vnd.apple.numbers":[`numbers`],"application/vnd.apple.pages":[`pages`],"application/vnd.apple.pkpass":[`pkpass`],"application/vnd.aristanetworks.swi":[`swi`],"application/vnd.astraea-software.iota":[`iota`],"application/vnd.audiograph":[`aep`],"application/vnd.autodesk.fbx":[`fbx`],"application/vnd.balsamiq.bmml+xml":[`bmml`],"application/vnd.blueice.multipass":[`mpm`],"application/vnd.bmi":[`bmi`],"application/vnd.businessobjects":[`rep`],"application/vnd.chemdraw+xml":[`cdxml`],"application/vnd.chipnuts.karaoke-mmd":[`mmd`],"application/vnd.cinderella":[`cdy`],"application/vnd.citationstyles.style+xml":[`csl`],"application/vnd.claymore":[`cla`],"application/vnd.cloanto.rp9":[`rp9`],"application/vnd.clonk.c4group":[`c4g`,`c4d`,`c4f`,`c4p`,`c4u`],"application/vnd.cluetrust.cartomobile-config":[`c11amc`],"application/vnd.cluetrust.cartomobile-config-pkg":[`c11amz`],"application/vnd.commonspace":[`csp`],"application/vnd.contact.cmsg":[`cdbcmsg`],"application/vnd.cosmocaller":[`cmc`],"application/vnd.crick.clicker":[`clkx`],"application/vnd.crick.clicker.keyboard":[`clkk`],"application/vnd.crick.clicker.palette":[`clkp`],"application/vnd.crick.clicker.template":[`clkt`],"application/vnd.crick.clicker.wordbank":[`clkw`],"application/vnd.criticaltools.wbs+xml":[`wbs`],"application/vnd.ctc-posml":[`pml`],"application/vnd.cups-ppd":[`ppd`],"application/vnd.curl.car":[`car`],"application/vnd.curl.pcurl":[`pcurl`],"application/vnd.dart":[`dart`],"application/vnd.data-vision.rdz":[`rdz`],"application/vnd.dbf":[`dbf`],"application/vnd.dcmp+xml":[`dcmp`],"application/vnd.dece.data":[`uvf`,`uvvf`,`uvd`,`uvvd`],"application/vnd.dece.ttml+xml":[`uvt`,`uvvt`],"application/vnd.dece.unspecified":[`uvx`,`uvvx`],"application/vnd.dece.zip":[`uvz`,`uvvz`],"application/vnd.denovo.fcselayout-link":[`fe_launch`],"application/vnd.dna":[`dna`],"application/vnd.dolby.mlp":[`mlp`],"application/vnd.dpgraph":[`dpg`],"application/vnd.dreamfactory":[`dfac`],"application/vnd.ds-keypoint":[`kpxx`],"application/vnd.dvb.ait":[`ait`],"application/vnd.dvb.service":[`svc`],"application/vnd.dynageo":[`geo`],"application/vnd.ecowin.chart":[`mag`],"application/vnd.enliven":[`nml`],"application/vnd.epson.esf":[`esf`],"application/vnd.epson.msf":[`msf`],"application/vnd.epson.quickanime":[`qam`],"application/vnd.epson.salt":[`slt`],"application/vnd.epson.ssf":[`ssf`],"application/vnd.eszigno3+xml":[`es3`,`et3`],"application/vnd.ezpix-album":[`ez2`],"application/vnd.ezpix-package":[`ez3`],"application/vnd.fdf":[`*fdf`],"application/vnd.fdsn.mseed":[`mseed`],"application/vnd.fdsn.seed":[`seed`,`dataless`],"application/vnd.flographit":[`gph`],"application/vnd.fluxtime.clip":[`ftc`],"application/vnd.framemaker":[`fm`,`frame`,`maker`,`book`],"application/vnd.frogans.fnc":[`fnc`],"application/vnd.frogans.ltf":[`ltf`],"application/vnd.fsc.weblaunch":[`fsc`],"application/vnd.fujitsu.oasys":[`oas`],"application/vnd.fujitsu.oasys2":[`oa2`],"application/vnd.fujitsu.oasys3":[`oa3`],"application/vnd.fujitsu.oasysgp":[`fg5`],"application/vnd.fujitsu.oasysprs":[`bh2`],"application/vnd.fujixerox.ddd":[`ddd`],"application/vnd.fujixerox.docuworks":[`xdw`],"application/vnd.fujixerox.docuworks.binder":[`xbd`],"application/vnd.fuzzysheet":[`fzs`],"application/vnd.genomatix.tuxedo":[`txd`],"application/vnd.geogebra.file":[`ggb`],"application/vnd.geogebra.slides":[`ggs`],"application/vnd.geogebra.tool":[`ggt`],"application/vnd.geometry-explorer":[`gex`,`gre`],"application/vnd.geonext":[`gxt`],"application/vnd.geoplan":[`g2w`],"application/vnd.geospace":[`g3w`],"application/vnd.gmx":[`gmx`],"application/vnd.google-apps.document":[`gdoc`],"application/vnd.google-apps.drawing":[`gdraw`],"application/vnd.google-apps.form":[`gform`],"application/vnd.google-apps.jam":[`gjam`],"application/vnd.google-apps.map":[`gmap`],"application/vnd.google-apps.presentation":[`gslides`],"application/vnd.google-apps.script":[`gscript`],"application/vnd.google-apps.site":[`gsite`],"application/vnd.google-apps.spreadsheet":[`gsheet`],"application/vnd.google-earth.kml+xml":[`kml`],"application/vnd.google-earth.kmz":[`kmz`],"application/vnd.gov.sk.xmldatacontainer+xml":[`xdcf`],"application/vnd.grafeq":[`gqf`,`gqs`],"application/vnd.groove-account":[`gac`],"application/vnd.groove-help":[`ghf`],"application/vnd.groove-identity-message":[`gim`],"application/vnd.groove-injector":[`grv`],"application/vnd.groove-tool-message":[`gtm`],"application/vnd.groove-tool-template":[`tpl`],"application/vnd.groove-vcard":[`vcg`],"application/vnd.hal+xml":[`hal`],"application/vnd.handheld-entertainment+xml":[`zmm`],"application/vnd.hbci":[`hbci`],"application/vnd.hhe.lesson-player":[`les`],"application/vnd.hp-hpgl":[`hpgl`],"application/vnd.hp-hpid":[`hpid`],"application/vnd.hp-hps":[`hps`],"application/vnd.hp-jlyt":[`jlt`],"application/vnd.hp-pcl":[`pcl`],"application/vnd.hp-pclxl":[`pclxl`],"application/vnd.hydrostatix.sof-data":[`sfd-hdstx`],"application/vnd.ibm.minipay":[`mpy`],"application/vnd.ibm.modcap":[`afp`,`listafp`,`list3820`],"application/vnd.ibm.rights-management":[`irm`],"application/vnd.ibm.secure-container":[`sc`],"application/vnd.iccprofile":[`icc`,`icm`],"application/vnd.igloader":[`igl`],"application/vnd.immervision-ivp":[`ivp`],"application/vnd.immervision-ivu":[`ivu`],"application/vnd.insors.igm":[`igm`],"application/vnd.intercon.formnet":[`xpw`,`xpx`],"application/vnd.intergeo":[`i2g`],"application/vnd.intu.qbo":[`qbo`],"application/vnd.intu.qfx":[`qfx`],"application/vnd.ipunplugged.rcprofile":[`rcprofile`],"application/vnd.irepository.package+xml":[`irp`],"application/vnd.is-xpr":[`xpr`],"application/vnd.isac.fcs":[`fcs`],"application/vnd.jam":[`jam`],"application/vnd.jcp.javame.midlet-rms":[`rms`],"application/vnd.jisp":[`jisp`],"application/vnd.joost.joda-archive":[`joda`],"application/vnd.kahootz":[`ktz`,`ktr`],"application/vnd.kde.karbon":[`karbon`],"application/vnd.kde.kchart":[`chrt`],"application/vnd.kde.kformula":[`kfo`],"application/vnd.kde.kivio":[`flw`],"application/vnd.kde.kontour":[`kon`],"application/vnd.kde.kpresenter":[`kpr`,`kpt`],"application/vnd.kde.kspread":[`ksp`],"application/vnd.kde.kword":[`kwd`,`kwt`],"application/vnd.kenameaapp":[`htke`],"application/vnd.kidspiration":[`kia`],"application/vnd.kinar":[`kne`,`knp`],"application/vnd.koan":[`skp`,`skd`,`skt`,`skm`],"application/vnd.kodak-descriptor":[`sse`],"application/vnd.las.las+xml":[`lasxml`],"application/vnd.llamagraphics.life-balance.desktop":[`lbd`],"application/vnd.llamagraphics.life-balance.exchange+xml":[`lbe`],"application/vnd.lotus-1-2-3":[`123`],"application/vnd.lotus-approach":[`apr`],"application/vnd.lotus-freelance":[`pre`],"application/vnd.lotus-notes":[`nsf`],"application/vnd.lotus-organizer":[`org`],"application/vnd.lotus-screencam":[`scm`],"application/vnd.lotus-wordpro":[`lwp`],"application/vnd.macports.portpkg":[`portpkg`],"application/vnd.mapbox-vector-tile":[`mvt`],"application/vnd.mcd":[`mcd`],"application/vnd.medcalcdata":[`mc1`],"application/vnd.mediastation.cdkey":[`cdkey`],"application/vnd.mfer":[`mwf`],"application/vnd.mfmp":[`mfm`],"application/vnd.micrografx.flo":[`flo`],"application/vnd.micrografx.igx":[`igx`],"application/vnd.mif":[`mif`],"application/vnd.mobius.daf":[`daf`],"application/vnd.mobius.dis":[`dis`],"application/vnd.mobius.mbk":[`mbk`],"application/vnd.mobius.mqy":[`mqy`],"application/vnd.mobius.msl":[`msl`],"application/vnd.mobius.plc":[`plc`],"application/vnd.mobius.txf":[`txf`],"application/vnd.mophun.application":[`mpn`],"application/vnd.mophun.certificate":[`mpc`],"application/vnd.mozilla.xul+xml":[`xul`],"application/vnd.ms-artgalry":[`cil`],"application/vnd.ms-cab-compressed":[`cab`],"application/vnd.ms-excel":[`xls`,`xlm`,`xla`,`xlc`,`xlt`,`xlw`],"application/vnd.ms-excel.addin.macroenabled.12":[`xlam`],"application/vnd.ms-excel.sheet.binary.macroenabled.12":[`xlsb`],"application/vnd.ms-excel.sheet.macroenabled.12":[`xlsm`],"application/vnd.ms-excel.template.macroenabled.12":[`xltm`],"application/vnd.ms-fontobject":[`eot`],"application/vnd.ms-htmlhelp":[`chm`],"application/vnd.ms-ims":[`ims`],"application/vnd.ms-lrm":[`lrm`],"application/vnd.ms-officetheme":[`thmx`],"application/vnd.ms-outlook":[`msg`],"application/vnd.ms-pki.seccat":[`cat`],"application/vnd.ms-pki.stl":[`*stl`],"application/vnd.ms-powerpoint":[`ppt`,`pps`,`pot`],"application/vnd.ms-powerpoint.addin.macroenabled.12":[`ppam`],"application/vnd.ms-powerpoint.presentation.macroenabled.12":[`pptm`],"application/vnd.ms-powerpoint.slide.macroenabled.12":[`sldm`],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":[`ppsm`],"application/vnd.ms-powerpoint.template.macroenabled.12":[`potm`],"application/vnd.ms-project":[`*mpp`,`mpt`],"application/vnd.ms-visio.viewer":[`vdx`],"application/vnd.ms-word.document.macroenabled.12":[`docm`],"application/vnd.ms-word.template.macroenabled.12":[`dotm`],"application/vnd.ms-works":[`wps`,`wks`,`wcm`,`wdb`],"application/vnd.ms-wpl":[`wpl`],"application/vnd.ms-xpsdocument":[`xps`],"application/vnd.mseq":[`mseq`],"application/vnd.musician":[`mus`],"application/vnd.muvee.style":[`msty`],"application/vnd.mynfc":[`taglet`],"application/vnd.nato.bindingdataobject+xml":[`bdo`],"application/vnd.neurolanguage.nlu":[`nlu`],"application/vnd.nitf":[`ntf`,`nitf`],"application/vnd.noblenet-directory":[`nnd`],"application/vnd.noblenet-sealer":[`nns`],"application/vnd.noblenet-web":[`nnw`],"application/vnd.nokia.n-gage.ac+xml":[`*ac`],"application/vnd.nokia.n-gage.data":[`ngdat`],"application/vnd.nokia.n-gage.symbian.install":[`n-gage`],"application/vnd.nokia.radio-preset":[`rpst`],"application/vnd.nokia.radio-presets":[`rpss`],"application/vnd.novadigm.edm":[`edm`],"application/vnd.novadigm.edx":[`edx`],"application/vnd.novadigm.ext":[`ext`],"application/vnd.oasis.opendocument.chart":[`odc`],"application/vnd.oasis.opendocument.chart-template":[`otc`],"application/vnd.oasis.opendocument.database":[`odb`],"application/vnd.oasis.opendocument.formula":[`odf`],"application/vnd.oasis.opendocument.formula-template":[`odft`],"application/vnd.oasis.opendocument.graphics":[`odg`],"application/vnd.oasis.opendocument.graphics-template":[`otg`],"application/vnd.oasis.opendocument.image":[`odi`],"application/vnd.oasis.opendocument.image-template":[`oti`],"application/vnd.oasis.opendocument.presentation":[`odp`],"application/vnd.oasis.opendocument.presentation-template":[`otp`],"application/vnd.oasis.opendocument.spreadsheet":[`ods`],"application/vnd.oasis.opendocument.spreadsheet-template":[`ots`],"application/vnd.oasis.opendocument.text":[`odt`],"application/vnd.oasis.opendocument.text-master":[`odm`],"application/vnd.oasis.opendocument.text-template":[`ott`],"application/vnd.oasis.opendocument.text-web":[`oth`],"application/vnd.olpc-sugar":[`xo`],"application/vnd.oma.dd2+xml":[`dd2`],"application/vnd.openblox.game+xml":[`obgx`],"application/vnd.openofficeorg.extension":[`oxt`],"application/vnd.openstreetmap.data+xml":[`osm`],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[`pptx`],"application/vnd.openxmlformats-officedocument.presentationml.slide":[`sldx`],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":[`ppsx`],"application/vnd.openxmlformats-officedocument.presentationml.template":[`potx`],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[`xlsx`],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":[`xltx`],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[`docx`],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":[`dotx`],"application/vnd.osgeo.mapguide.package":[`mgp`],"application/vnd.osgi.dp":[`dp`],"application/vnd.osgi.subsystem":[`esa`],"application/vnd.palm":[`pdb`,`pqa`,`oprc`],"application/vnd.pawaafile":[`paw`],"application/vnd.pg.format":[`str`],"application/vnd.pg.osasli":[`ei6`],"application/vnd.picsel":[`efif`],"application/vnd.pmi.widget":[`wg`],"application/vnd.pocketlearn":[`plf`],"application/vnd.powerbuilder6":[`pbd`],"application/vnd.previewsystems.box":[`box`],"application/vnd.procrate.brushset":[`brushset`],"application/vnd.procreate.brush":[`brush`],"application/vnd.procreate.dream":[`drm`],"application/vnd.proteus.magazine":[`mgz`],"application/vnd.publishare-delta-tree":[`qps`],"application/vnd.pvi.ptid1":[`ptid`],"application/vnd.pwg-xhtml-print+xml":[`xhtm`],"application/vnd.quark.quarkxpress":[`qxd`,`qxt`,`qwd`,`qwt`,`qxl`,`qxb`],"application/vnd.rar":[`rar`],"application/vnd.realvnc.bed":[`bed`],"application/vnd.recordare.musicxml":[`mxl`],"application/vnd.recordare.musicxml+xml":[`musicxml`],"application/vnd.rig.cryptonote":[`cryptonote`],"application/vnd.rim.cod":[`cod`],"application/vnd.rn-realmedia":[`rm`],"application/vnd.rn-realmedia-vbr":[`rmvb`],"application/vnd.route66.link66+xml":[`link66`],"application/vnd.sailingtracker.track":[`st`],"application/vnd.seemail":[`see`],"application/vnd.sema":[`sema`],"application/vnd.semd":[`semd`],"application/vnd.semf":[`semf`],"application/vnd.shana.informed.formdata":[`ifm`],"application/vnd.shana.informed.formtemplate":[`itp`],"application/vnd.shana.informed.interchange":[`iif`],"application/vnd.shana.informed.package":[`ipk`],"application/vnd.simtech-mindmapper":[`twd`,`twds`],"application/vnd.smaf":[`mmf`],"application/vnd.smart.teacher":[`teacher`],"application/vnd.software602.filler.form+xml":[`fo`],"application/vnd.solent.sdkm+xml":[`sdkm`,`sdkd`],"application/vnd.spotfire.dxp":[`dxp`],"application/vnd.spotfire.sfs":[`sfs`],"application/vnd.stardivision.calc":[`sdc`],"application/vnd.stardivision.draw":[`sda`],"application/vnd.stardivision.impress":[`sdd`],"application/vnd.stardivision.math":[`smf`],"application/vnd.stardivision.writer":[`sdw`,`vor`],"application/vnd.stardivision.writer-global":[`sgl`],"application/vnd.stepmania.package":[`smzip`],"application/vnd.stepmania.stepchart":[`sm`],"application/vnd.sun.wadl+xml":[`wadl`],"application/vnd.sun.xml.calc":[`sxc`],"application/vnd.sun.xml.calc.template":[`stc`],"application/vnd.sun.xml.draw":[`sxd`],"application/vnd.sun.xml.draw.template":[`std`],"application/vnd.sun.xml.impress":[`sxi`],"application/vnd.sun.xml.impress.template":[`sti`],"application/vnd.sun.xml.math":[`sxm`],"application/vnd.sun.xml.writer":[`sxw`],"application/vnd.sun.xml.writer.global":[`sxg`],"application/vnd.sun.xml.writer.template":[`stw`],"application/vnd.sus-calendar":[`sus`,`susp`],"application/vnd.svd":[`svd`],"application/vnd.symbian.install":[`sis`,`sisx`],"application/vnd.syncml+xml":[`xsm`],"application/vnd.syncml.dm+wbxml":[`bdm`],"application/vnd.syncml.dm+xml":[`xdm`],"application/vnd.syncml.dmddf+xml":[`ddf`],"application/vnd.tao.intent-module-archive":[`tao`],"application/vnd.tcpdump.pcap":[`pcap`,`cap`,`dmp`],"application/vnd.tmobile-livetv":[`tmo`],"application/vnd.trid.tpt":[`tpt`],"application/vnd.triscape.mxs":[`mxs`],"application/vnd.trueapp":[`tra`],"application/vnd.ufdl":[`ufd`,`ufdl`],"application/vnd.uiq.theme":[`utz`],"application/vnd.umajin":[`umj`],"application/vnd.unity":[`unityweb`],"application/vnd.uoml+xml":[`uoml`,`uo`],"application/vnd.vcx":[`vcx`],"application/vnd.visio":[`vsd`,`vst`,`vss`,`vsw`,`vsdx`,`vtx`],"application/vnd.visionary":[`vis`],"application/vnd.vsf":[`vsf`],"application/vnd.wap.wbxml":[`wbxml`],"application/vnd.wap.wmlc":[`wmlc`],"application/vnd.wap.wmlscriptc":[`wmlsc`],"application/vnd.webturbo":[`wtb`],"application/vnd.wolfram.player":[`nbp`],"application/vnd.wordperfect":[`wpd`],"application/vnd.wqd":[`wqd`],"application/vnd.wt.stf":[`stf`],"application/vnd.xara":[`xar`],"application/vnd.xfdl":[`xfdl`],"application/vnd.yamaha.hv-dic":[`hvd`],"application/vnd.yamaha.hv-script":[`hvs`],"application/vnd.yamaha.hv-voice":[`hvp`],"application/vnd.yamaha.openscoreformat":[`osf`],"application/vnd.yamaha.openscoreformat.osfpvg+xml":[`osfpvg`],"application/vnd.yamaha.smaf-audio":[`saf`],"application/vnd.yamaha.smaf-phrase":[`spf`],"application/vnd.yellowriver-custom-menu":[`cmp`],"application/vnd.zul":[`zir`,`zirz`],"application/vnd.zzazz.deck+xml":[`zaz`],"application/x-7z-compressed":[`7z`],"application/x-abiword":[`abw`],"application/x-ace-compressed":[`ace`],"application/x-apple-diskimage":[`*dmg`],"application/x-arj":[`arj`],"application/x-authorware-bin":[`aab`,`x32`,`u32`,`vox`],"application/x-authorware-map":[`aam`],"application/x-authorware-seg":[`aas`],"application/x-bcpio":[`bcpio`],"application/x-bdoc":[`*bdoc`],"application/x-bittorrent":[`torrent`],"application/x-blender":[`blend`],"application/x-blorb":[`blb`,`blorb`],"application/x-bzip":[`bz`],"application/x-bzip2":[`bz2`,`boz`],"application/x-cbr":[`cbr`,`cba`,`cbt`,`cbz`,`cb7`],"application/x-cdlink":[`vcd`],"application/x-cfs-compressed":[`cfs`],"application/x-chat":[`chat`],"application/x-chess-pgn":[`pgn`],"application/x-chrome-extension":[`crx`],"application/x-cocoa":[`cco`],"application/x-compressed":[`*rar`],"application/x-conference":[`nsc`],"application/x-cpio":[`cpio`],"application/x-csh":[`csh`],"application/x-debian-package":[`*deb`,`udeb`],"application/x-dgc-compressed":[`dgc`],"application/x-director":[`dir`,`dcr`,`dxr`,`cst`,`cct`,`cxt`,`w3d`,`fgd`,`swa`],"application/x-doom":[`wad`],"application/x-dtbncx+xml":[`ncx`],"application/x-dtbook+xml":[`dtb`],"application/x-dtbresource+xml":[`res`],"application/x-dvi":[`dvi`],"application/x-envoy":[`evy`],"application/x-eva":[`eva`],"application/x-font-bdf":[`bdf`],"application/x-font-ghostscript":[`gsf`],"application/x-font-linux-psf":[`psf`],"application/x-font-pcf":[`pcf`],"application/x-font-snf":[`snf`],"application/x-font-type1":[`pfa`,`pfb`,`pfm`,`afm`],"application/x-freearc":[`arc`],"application/x-futuresplash":[`spl`],"application/x-gca-compressed":[`gca`],"application/x-glulx":[`ulx`],"application/x-gnumeric":[`gnumeric`],"application/x-gramps-xml":[`gramps`],"application/x-gtar":[`gtar`],"application/x-hdf":[`hdf`],"application/x-httpd-php":[`php`],"application/x-install-instructions":[`install`],"application/x-ipynb+json":[`ipynb`],"application/x-iso9660-image":[`*iso`],"application/x-iwork-keynote-sffkey":[`*key`],"application/x-iwork-numbers-sffnumbers":[`*numbers`],"application/x-iwork-pages-sffpages":[`*pages`],"application/x-java-archive-diff":[`jardiff`],"application/x-java-jnlp-file":[`jnlp`],"application/x-keepass2":[`kdbx`],"application/x-latex":[`latex`],"application/x-lua-bytecode":[`luac`],"application/x-lzh-compressed":[`lzh`,`lha`],"application/x-makeself":[`run`],"application/x-mie":[`mie`],"application/x-mobipocket-ebook":[`*prc`,`mobi`],"application/x-ms-application":[`application`],"application/x-ms-shortcut":[`lnk`],"application/x-ms-wmd":[`wmd`],"application/x-ms-wmz":[`wmz`],"application/x-ms-xbap":[`xbap`],"application/x-msaccess":[`mdb`],"application/x-msbinder":[`obd`],"application/x-mscardfile":[`crd`],"application/x-msclip":[`clp`],"application/x-msdos-program":[`*exe`],"application/x-msdownload":[`*exe`,`*dll`,`com`,`bat`,`*msi`],"application/x-msmediaview":[`mvb`,`m13`,`m14`],"application/x-msmetafile":[`*wmf`,`*wmz`,`*emf`,`emz`],"application/x-msmoney":[`mny`],"application/x-mspublisher":[`pub`],"application/x-msschedule":[`scd`],"application/x-msterminal":[`trm`],"application/x-mswrite":[`wri`],"application/x-netcdf":[`nc`,`cdf`],"application/x-ns-proxy-autoconfig":[`pac`],"application/x-nzb":[`nzb`],"application/x-perl":[`pl`,`pm`],"application/x-pilot":[`*prc`,`*pdb`],"application/x-pkcs12":[`p12`,`pfx`],"application/x-pkcs7-certificates":[`p7b`,`spc`],"application/x-pkcs7-certreqresp":[`p7r`],"application/x-rar-compressed":[`*rar`],"application/x-redhat-package-manager":[`rpm`],"application/x-research-info-systems":[`ris`],"application/x-sea":[`sea`],"application/x-sh":[`sh`],"application/x-shar":[`shar`],"application/x-shockwave-flash":[`swf`],"application/x-silverlight-app":[`xap`],"application/x-sql":[`*sql`],"application/x-stuffit":[`sit`],"application/x-stuffitx":[`sitx`],"application/x-subrip":[`srt`],"application/x-sv4cpio":[`sv4cpio`],"application/x-sv4crc":[`sv4crc`],"application/x-t3vm-image":[`t3`],"application/x-tads":[`gam`],"application/x-tar":[`tar`],"application/x-tcl":[`tcl`,`tk`],"application/x-tex":[`tex`],"application/x-tex-tfm":[`tfm`],"application/x-texinfo":[`texinfo`,`texi`],"application/x-tgif":[`*obj`],"application/x-ustar":[`ustar`],"application/x-virtualbox-hdd":[`hdd`],"application/x-virtualbox-ova":[`ova`],"application/x-virtualbox-ovf":[`ovf`],"application/x-virtualbox-vbox":[`vbox`],"application/x-virtualbox-vbox-extpack":[`vbox-extpack`],"application/x-virtualbox-vdi":[`vdi`],"application/x-virtualbox-vhd":[`vhd`],"application/x-virtualbox-vmdk":[`vmdk`],"application/x-wais-source":[`src`],"application/x-web-app-manifest+json":[`webapp`],"application/x-x509-ca-cert":[`der`,`crt`,`pem`],"application/x-xfig":[`fig`],"application/x-xliff+xml":[`*xlf`],"application/x-xpinstall":[`xpi`],"application/x-xz":[`xz`],"application/x-zip-compressed":[`*zip`],"application/x-zmachine":[`z1`,`z2`,`z3`,`z4`,`z5`,`z6`,`z7`,`z8`],"audio/vnd.dece.audio":[`uva`,`uvva`],"audio/vnd.digital-winds":[`eol`],"audio/vnd.dra":[`dra`],"audio/vnd.dts":[`dts`],"audio/vnd.dts.hd":[`dtshd`],"audio/vnd.lucent.voice":[`lvp`],"audio/vnd.ms-playready.media.pya":[`pya`],"audio/vnd.nuera.ecelp4800":[`ecelp4800`],"audio/vnd.nuera.ecelp7470":[`ecelp7470`],"audio/vnd.nuera.ecelp9600":[`ecelp9600`],"audio/vnd.rip":[`rip`],"audio/x-aac":[`*aac`],"audio/x-aiff":[`aif`,`aiff`,`aifc`],"audio/x-caf":[`caf`],"audio/x-flac":[`flac`],"audio/x-m4a":[`*m4a`],"audio/x-matroska":[`mka`],"audio/x-mpegurl":[`m3u`],"audio/x-ms-wax":[`wax`],"audio/x-ms-wma":[`wma`],"audio/x-pn-realaudio":[`ram`,`ra`],"audio/x-pn-realaudio-plugin":[`rmp`],"audio/x-realaudio":[`*ra`],"audio/x-wav":[`*wav`],"chemical/x-cdx":[`cdx`],"chemical/x-cif":[`cif`],"chemical/x-cmdf":[`cmdf`],"chemical/x-cml":[`cml`],"chemical/x-csml":[`csml`],"chemical/x-xyz":[`xyz`],"image/prs.btif":[`btif`,`btf`],"image/prs.pti":[`pti`],"image/vnd.adobe.photoshop":[`psd`],"image/vnd.airzip.accelerator.azv":[`azv`],"image/vnd.blockfact.facti":[`facti`],"image/vnd.dece.graphic":[`uvi`,`uvvi`,`uvg`,`uvvg`],"image/vnd.djvu":[`djvu`,`djv`],"image/vnd.dvb.subtitle":[`*sub`],"image/vnd.dwg":[`dwg`],"image/vnd.dxf":[`dxf`],"image/vnd.fastbidsheet":[`fbs`],"image/vnd.fpx":[`fpx`],"image/vnd.fst":[`fst`],"image/vnd.fujixerox.edmics-mmr":[`mmr`],"image/vnd.fujixerox.edmics-rlc":[`rlc`],"image/vnd.microsoft.icon":[`ico`],"image/vnd.ms-dds":[`dds`],"image/vnd.ms-modi":[`mdi`],"image/vnd.ms-photo":[`wdp`],"image/vnd.net-fpx":[`npx`],"image/vnd.pco.b16":[`b16`],"image/vnd.tencent.tap":[`tap`],"image/vnd.valve.source.texture":[`vtf`],"image/vnd.wap.wbmp":[`wbmp`],"image/vnd.xiff":[`xif`],"image/vnd.zbrush.pcx":[`pcx`],"image/x-3ds":[`3ds`],"image/x-adobe-dng":[`dng`],"image/x-cmu-raster":[`ras`],"image/x-cmx":[`cmx`],"image/x-freehand":[`fh`,`fhc`,`fh4`,`fh5`,`fh7`],"image/x-icon":[`*ico`],"image/x-jng":[`jng`],"image/x-mrsid-image":[`sid`],"image/x-ms-bmp":[`*bmp`],"image/x-pcx":[`*pcx`],"image/x-pict":[`pic`,`pct`],"image/x-portable-anymap":[`pnm`],"image/x-portable-bitmap":[`pbm`],"image/x-portable-graymap":[`pgm`],"image/x-portable-pixmap":[`ppm`],"image/x-rgb":[`rgb`],"image/x-tga":[`tga`],"image/x-xbitmap":[`xbm`],"image/x-xpixmap":[`xpm`],"image/x-xwindowdump":[`xwd`],"message/vnd.wfa.wsc":[`wsc`],"model/vnd.bary":[`bary`],"model/vnd.cld":[`cld`],"model/vnd.collada+xml":[`dae`],"model/vnd.dwf":[`dwf`],"model/vnd.gdl":[`gdl`],"model/vnd.gtw":[`gtw`],"model/vnd.mts":[`*mts`],"model/vnd.opengex":[`ogex`],"model/vnd.parasolid.transmit.binary":[`x_b`],"model/vnd.parasolid.transmit.text":[`x_t`],"model/vnd.pytha.pyox":[`pyo`,`pyox`],"model/vnd.sap.vds":[`vds`],"model/vnd.usda":[`usda`],"model/vnd.usdz+zip":[`usdz`],"model/vnd.valve.source.compiled-map":[`bsp`],"model/vnd.vtu":[`vtu`],"text/prs.lines.tag":[`dsc`],"text/vnd.curl":[`curl`],"text/vnd.curl.dcurl":[`dcurl`],"text/vnd.curl.mcurl":[`mcurl`],"text/vnd.curl.scurl":[`scurl`],"text/vnd.dvb.subtitle":[`sub`],"text/vnd.familysearch.gedcom":[`ged`],"text/vnd.fly":[`fly`],"text/vnd.fmi.flexstor":[`flx`],"text/vnd.graphviz":[`gv`],"text/vnd.in3d.3dml":[`3dml`],"text/vnd.in3d.spot":[`spot`],"text/vnd.sun.j2me.app-descriptor":[`jad`],"text/vnd.wap.wml":[`wml`],"text/vnd.wap.wmlscript":[`wmls`],"text/x-asm":[`s`,`asm`],"text/x-c":[`c`,`cc`,`cxx`,`cpp`,`h`,`hh`,`dic`],"text/x-component":[`htc`],"text/x-fortran":[`f`,`for`,`f77`,`f90`],"text/x-handlebars-template":[`hbs`],"text/x-java-source":[`java`],"text/x-lua":[`lua`],"text/x-markdown":[`mkd`],"text/x-nfo":[`nfo`],"text/x-opml":[`opml`],"text/x-org":[`*org`],"text/x-pascal":[`p`,`pas`],"text/x-processing":[`pde`],"text/x-sass":[`sass`],"text/x-scss":[`scss`],"text/x-setext":[`etx`],"text/x-sfv":[`sfv`],"text/x-suse-ymp":[`ymp`],"text/x-uuencode":[`uu`],"text/x-vcalendar":[`vcs`],"text/x-vcard":[`vcf`],"video/vnd.dece.hd":[`uvh`,`uvvh`],"video/vnd.dece.mobile":[`uvm`,`uvvm`],"video/vnd.dece.pd":[`uvp`,`uvvp`],"video/vnd.dece.sd":[`uvs`,`uvvs`],"video/vnd.dece.video":[`uvv`,`uvvv`],"video/vnd.dvb.file":[`dvb`],"video/vnd.fvt":[`fvt`],"video/vnd.mpegurl":[`mxu`,`m4u`],"video/vnd.ms-playready.media.pyv":[`pyv`],"video/vnd.uvvu.mp4":[`uvu`,`uvvu`],"video/vnd.vivo":[`viv`],"video/x-f4v":[`f4v`],"video/x-fli":[`fli`],"video/x-flv":[`flv`],"video/x-m4v":[`m4v`],"video/x-matroska":[`mkv`,`mk3d`,`mks`],"video/x-mng":[`mng`],"video/x-ms-asf":[`asf`,`asx`],"video/x-ms-vob":[`vob`],"video/x-ms-wm":[`wm`],"video/x-ms-wmv":[`wmv`],"video/x-ms-wmx":[`wmx`],"video/x-ms-wvx":[`wvx`],"video/x-msvideo":[`avi`],"video/x-sgi-movie":[`movie`],"video/x-smv":[`smv`],"x-conference/x-cooltalk":[`ice`]};Object.freeze(xR);var SR={"application/andrew-inset":[`ez`],"application/appinstaller":[`appinstaller`],"application/applixware":[`aw`],"application/appx":[`appx`],"application/appxbundle":[`appxbundle`],"application/atom+xml":[`atom`],"application/atomcat+xml":[`atomcat`],"application/atomdeleted+xml":[`atomdeleted`],"application/atomsvc+xml":[`atomsvc`],"application/atsc-dwd+xml":[`dwd`],"application/atsc-held+xml":[`held`],"application/atsc-rsat+xml":[`rsat`],"application/automationml-aml+xml":[`aml`],"application/automationml-amlx+zip":[`amlx`],"application/bdoc":[`bdoc`],"application/calendar+xml":[`xcs`],"application/ccxml+xml":[`ccxml`],"application/cdfx+xml":[`cdfx`],"application/cdmi-capability":[`cdmia`],"application/cdmi-container":[`cdmic`],"application/cdmi-domain":[`cdmid`],"application/cdmi-object":[`cdmio`],"application/cdmi-queue":[`cdmiq`],"application/cpl+xml":[`cpl`],"application/cu-seeme":[`cu`],"application/cwl":[`cwl`],"application/dash+xml":[`mpd`],"application/dash-patch+xml":[`mpp`],"application/davmount+xml":[`davmount`],"application/dicom":[`dcm`],"application/docbook+xml":[`dbk`],"application/dssc+der":[`dssc`],"application/dssc+xml":[`xdssc`],"application/ecmascript":[`ecma`],"application/emma+xml":[`emma`],"application/emotionml+xml":[`emotionml`],"application/epub+zip":[`epub`],"application/exi":[`exi`],"application/express":[`exp`],"application/fdf":[`fdf`],"application/fdt+xml":[`fdt`],"application/font-tdpfr":[`pfr`],"application/geo+json":[`geojson`],"application/gml+xml":[`gml`],"application/gpx+xml":[`gpx`],"application/gxf":[`gxf`],"application/gzip":[`gz`],"application/hjson":[`hjson`],"application/hyperstudio":[`stk`],"application/inkml+xml":[`ink`,`inkml`],"application/ipfix":[`ipfix`],"application/its+xml":[`its`],"application/java-archive":[`jar`,`war`,`ear`],"application/java-serialized-object":[`ser`],"application/java-vm":[`class`],"application/javascript":[`*js`],"application/json":[`json`,`map`],"application/json5":[`json5`],"application/jsonml+json":[`jsonml`],"application/ld+json":[`jsonld`],"application/lgr+xml":[`lgr`],"application/lost+xml":[`lostxml`],"application/mac-binhex40":[`hqx`],"application/mac-compactpro":[`cpt`],"application/mads+xml":[`mads`],"application/manifest+json":[`webmanifest`],"application/marc":[`mrc`],"application/marcxml+xml":[`mrcx`],"application/mathematica":[`ma`,`nb`,`mb`],"application/mathml+xml":[`mathml`],"application/mbox":[`mbox`],"application/media-policy-dataset+xml":[`mpf`],"application/mediaservercontrol+xml":[`mscml`],"application/metalink+xml":[`metalink`],"application/metalink4+xml":[`meta4`],"application/mets+xml":[`mets`],"application/mmt-aei+xml":[`maei`],"application/mmt-usd+xml":[`musd`],"application/mods+xml":[`mods`],"application/mp21":[`m21`,`mp21`],"application/mp4":[`*mp4`,`*mpg4`,`mp4s`,`m4p`],"application/msix":[`msix`],"application/msixbundle":[`msixbundle`],"application/msword":[`doc`,`dot`],"application/mxf":[`mxf`],"application/n-quads":[`nq`],"application/n-triples":[`nt`],"application/node":[`cjs`],"application/octet-stream":[`bin`,`dms`,`lrf`,`mar`,`so`,`dist`,`distz`,`pkg`,`bpk`,`dump`,`elc`,`deploy`,`exe`,`dll`,`deb`,`dmg`,`iso`,`img`,`msi`,`msp`,`msm`,`buffer`],"application/oda":[`oda`],"application/oebps-package+xml":[`opf`],"application/ogg":[`ogx`],"application/omdoc+xml":[`omdoc`],"application/onenote":[`onetoc`,`onetoc2`,`onetmp`,`onepkg`,`one`,`onea`],"application/oxps":[`oxps`],"application/p2p-overlay+xml":[`relo`],"application/patch-ops-error+xml":[`xer`],"application/pdf":[`pdf`],"application/pgp-encrypted":[`pgp`],"application/pgp-keys":[`asc`],"application/pgp-signature":[`sig`,`*asc`],"application/pics-rules":[`prf`],"application/pkcs10":[`p10`],"application/pkcs7-mime":[`p7m`,`p7c`],"application/pkcs7-signature":[`p7s`],"application/pkcs8":[`p8`],"application/pkix-attr-cert":[`ac`],"application/pkix-cert":[`cer`],"application/pkix-crl":[`crl`],"application/pkix-pkipath":[`pkipath`],"application/pkixcmp":[`pki`],"application/pls+xml":[`pls`],"application/postscript":[`ai`,`eps`,`ps`],"application/provenance+xml":[`provx`],"application/pskc+xml":[`pskcxml`],"application/raml+yaml":[`raml`],"application/rdf+xml":[`rdf`,`owl`],"application/reginfo+xml":[`rif`],"application/relax-ng-compact-syntax":[`rnc`],"application/resource-lists+xml":[`rl`],"application/resource-lists-diff+xml":[`rld`],"application/rls-services+xml":[`rs`],"application/route-apd+xml":[`rapd`],"application/route-s-tsid+xml":[`sls`],"application/route-usd+xml":[`rusd`],"application/rpki-ghostbusters":[`gbr`],"application/rpki-manifest":[`mft`],"application/rpki-roa":[`roa`],"application/rsd+xml":[`rsd`],"application/rss+xml":[`rss`],"application/rtf":[`rtf`],"application/sbml+xml":[`sbml`],"application/scvp-cv-request":[`scq`],"application/scvp-cv-response":[`scs`],"application/scvp-vp-request":[`spq`],"application/scvp-vp-response":[`spp`],"application/sdp":[`sdp`],"application/senml+xml":[`senmlx`],"application/sensml+xml":[`sensmlx`],"application/set-payment-initiation":[`setpay`],"application/set-registration-initiation":[`setreg`],"application/shf+xml":[`shf`],"application/sieve":[`siv`,`sieve`],"application/smil+xml":[`smi`,`smil`],"application/sparql-query":[`rq`],"application/sparql-results+xml":[`srx`],"application/sql":[`sql`],"application/srgs":[`gram`],"application/srgs+xml":[`grxml`],"application/sru+xml":[`sru`],"application/ssdl+xml":[`ssdl`],"application/ssml+xml":[`ssml`],"application/swid+xml":[`swidtag`],"application/tei+xml":[`tei`,`teicorpus`],"application/thraud+xml":[`tfi`],"application/timestamped-data":[`tsd`],"application/toml":[`toml`],"application/trig":[`trig`],"application/ttml+xml":[`ttml`],"application/ubjson":[`ubj`],"application/urc-ressheet+xml":[`rsheet`],"application/urc-targetdesc+xml":[`td`],"application/voicexml+xml":[`vxml`],"application/wasm":[`wasm`],"application/watcherinfo+xml":[`wif`],"application/widget":[`wgt`],"application/winhlp":[`hlp`],"application/wsdl+xml":[`wsdl`],"application/wspolicy+xml":[`wspolicy`],"application/xaml+xml":[`xaml`],"application/xcap-att+xml":[`xav`],"application/xcap-caps+xml":[`xca`],"application/xcap-diff+xml":[`xdf`],"application/xcap-el+xml":[`xel`],"application/xcap-ns+xml":[`xns`],"application/xenc+xml":[`xenc`],"application/xfdf":[`xfdf`],"application/xhtml+xml":[`xhtml`,`xht`],"application/xliff+xml":[`xlf`],"application/xml":[`xml`,`xsl`,`xsd`,`rng`],"application/xml-dtd":[`dtd`],"application/xop+xml":[`xop`],"application/xproc+xml":[`xpl`],"application/xslt+xml":[`*xsl`,`xslt`],"application/xspf+xml":[`xspf`],"application/xv+xml":[`mxml`,`xhvml`,`xvml`,`xvm`],"application/yang":[`yang`],"application/yin+xml":[`yin`],"application/zip":[`zip`],"application/zip+dotlottie":[`lottie`],"audio/3gpp":[`*3gpp`],"audio/aac":[`adts`,`aac`],"audio/adpcm":[`adp`],"audio/amr":[`amr`],"audio/basic":[`au`,`snd`],"audio/midi":[`mid`,`midi`,`kar`,`rmi`],"audio/mobile-xmf":[`mxmf`],"audio/mp3":[`*mp3`],"audio/mp4":[`m4a`,`mp4a`,`m4b`],"audio/mpeg":[`mpga`,`mp2`,`mp2a`,`mp3`,`m2a`,`m3a`],"audio/ogg":[`oga`,`ogg`,`spx`,`opus`],"audio/s3m":[`s3m`],"audio/silk":[`sil`],"audio/wav":[`wav`],"audio/wave":[`*wav`],"audio/webm":[`weba`],"audio/xm":[`xm`],"font/collection":[`ttc`],"font/otf":[`otf`],"font/ttf":[`ttf`],"font/woff":[`woff`],"font/woff2":[`woff2`],"image/aces":[`exr`],"image/apng":[`apng`],"image/avci":[`avci`],"image/avcs":[`avcs`],"image/avif":[`avif`],"image/bmp":[`bmp`,`dib`],"image/cgm":[`cgm`],"image/dicom-rle":[`drle`],"image/dpx":[`dpx`],"image/emf":[`emf`],"image/fits":[`fits`],"image/g3fax":[`g3`],"image/gif":[`gif`],"image/heic":[`heic`],"image/heic-sequence":[`heics`],"image/heif":[`heif`],"image/heif-sequence":[`heifs`],"image/hej2k":[`hej2`],"image/ief":[`ief`],"image/jaii":[`jaii`],"image/jais":[`jais`],"image/jls":[`jls`],"image/jp2":[`jp2`,`jpg2`],"image/jpeg":[`jpg`,`jpeg`,`jpe`],"image/jph":[`jph`],"image/jphc":[`jhc`],"image/jpm":[`jpm`,`jpgm`],"image/jpx":[`jpx`,`jpf`],"image/jxl":[`jxl`],"image/jxr":[`jxr`],"image/jxra":[`jxra`],"image/jxrs":[`jxrs`],"image/jxs":[`jxs`],"image/jxsc":[`jxsc`],"image/jxsi":[`jxsi`],"image/jxss":[`jxss`],"image/ktx":[`ktx`],"image/ktx2":[`ktx2`],"image/pjpeg":[`jfif`],"image/png":[`png`],"image/sgi":[`sgi`],"image/svg+xml":[`svg`,`svgz`],"image/t38":[`t38`],"image/tiff":[`tif`,`tiff`],"image/tiff-fx":[`tfx`],"image/webp":[`webp`],"image/wmf":[`wmf`],"message/disposition-notification":[`disposition-notification`],"message/global":[`u8msg`],"message/global-delivery-status":[`u8dsn`],"message/global-disposition-notification":[`u8mdn`],"message/global-headers":[`u8hdr`],"message/rfc822":[`eml`,`mime`,`mht`,`mhtml`],"model/3mf":[`3mf`],"model/gltf+json":[`gltf`],"model/gltf-binary":[`glb`],"model/iges":[`igs`,`iges`],"model/jt":[`jt`],"model/mesh":[`msh`,`mesh`,`silo`],"model/mtl":[`mtl`],"model/obj":[`obj`],"model/prc":[`prc`],"model/step":[`step`,`stp`,`stpnc`,`p21`,`210`],"model/step+xml":[`stpx`],"model/step+zip":[`stpz`],"model/step-xml+zip":[`stpxz`],"model/stl":[`stl`],"model/u3d":[`u3d`],"model/vrml":[`wrl`,`vrml`],"model/x3d+binary":[`*x3db`,`x3dbz`],"model/x3d+fastinfoset":[`x3db`],"model/x3d+vrml":[`*x3dv`,`x3dvz`],"model/x3d+xml":[`x3d`,`x3dz`],"model/x3d-vrml":[`x3dv`],"text/cache-manifest":[`appcache`,`manifest`],"text/calendar":[`ics`,`ifb`],"text/coffeescript":[`coffee`,`litcoffee`],"text/css":[`css`],"text/csv":[`csv`],"text/html":[`html`,`htm`,`shtml`],"text/jade":[`jade`],"text/javascript":[`js`,`mjs`],"text/jsx":[`jsx`],"text/less":[`less`],"text/markdown":[`md`,`markdown`],"text/mathml":[`mml`],"text/mdx":[`mdx`],"text/n3":[`n3`],"text/plain":[`txt`,`text`,`conf`,`def`,`list`,`log`,`in`,`ini`],"text/richtext":[`rtx`],"text/rtf":[`*rtf`],"text/sgml":[`sgml`,`sgm`],"text/shex":[`shex`],"text/slim":[`slim`,`slm`],"text/spdx":[`spdx`],"text/stylus":[`stylus`,`styl`],"text/tab-separated-values":[`tsv`],"text/troff":[`t`,`tr`,`roff`,`man`,`me`,`ms`],"text/turtle":[`ttl`],"text/uri-list":[`uri`,`uris`,`urls`],"text/vcard":[`vcard`],"text/vtt":[`vtt`],"text/wgsl":[`wgsl`],"text/xml":[`*xml`],"text/yaml":[`yaml`,`yml`],"video/3gpp":[`3gp`,`3gpp`],"video/3gpp2":[`3g2`],"video/h261":[`h261`],"video/h263":[`h263`],"video/h264":[`h264`],"video/iso.segment":[`m4s`],"video/jpeg":[`jpgv`],"video/jpm":[`*jpm`,`*jpgm`],"video/mj2":[`mj2`,`mjp2`],"video/mp2t":[`ts`,`m2t`,`m2ts`,`mts`],"video/mp4":[`mp4`,`mp4v`,`mpg4`],"video/mpeg":[`mpeg`,`mpg`,`mpe`,`m1v`,`m2v`],"video/ogg":[`ogv`],"video/quicktime":[`qt`,`mov`],"video/webm":[`webm`]};Object.freeze(SR);var CR=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},wR,TR,ER,qoe=class{constructor(...e){wR.set(this,new Map),TR.set(this,new Map),ER.set(this,new Map);for(let t of e)this.define(t)}define(e,t=!1){for(let[n,r]of Object.entries(e)){n=n.toLowerCase(),r=r.map(e=>e.toLowerCase()),CR(this,ER,`f`).has(n)||CR(this,ER,`f`).set(n,new Set);let e=CR(this,ER,`f`).get(n),i=!0;for(let a of r){let r=a.startsWith(`*`);if(a=r?a.slice(1):a,e?.add(a),i&&CR(this,TR,`f`).set(n,a),i=!1,r)continue;let o=CR(this,wR,`f`).get(a);if(o&&o!=n&&!t)throw Error(`"${n} -> ${a}" conflicts with "${o} -> ${a}". Pass \`force=true\` to override this definition.`);CR(this,wR,`f`).set(a,n)}}return this}getType(e){if(typeof e!=`string`)return null;let t=e.replace(/^.*[/\\]/s,``).toLowerCase(),n=t.replace(/^.*\./s,``).toLowerCase(),r=t.length<e.length;return!(n.length<t.length-1)&&r?null:CR(this,wR,`f`).get(n)??null}getExtension(e){return typeof e==`string`?(e=e?.split?.(`;`)[0],(e&&CR(this,TR,`f`).get(e.trim().toLowerCase()))??null):null}getAllExtensions(e){return typeof e==`string`?CR(this,ER,`f`).get(e.toLowerCase())??null:null}_freeze(){this.define=()=>{throw Error(`define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances`)},Object.freeze(this);for(let e of CR(this,ER,`f`).values())Object.freeze(e);return this}_getTestState(){return{types:CR(this,wR,`f`),extensions:CR(this,TR,`f`)}}};wR=new WeakMap,TR=new WeakMap,ER=new WeakMap;var DR=new qoe(SR,xR)._freeze(),OR=[`image`,`video`,`audio`],Joe=[`image`,`video`],Yoe=[...OR,`document`,`other`],Xoe=/\.(?:csv|docx?|odp|ods|odt|pdf|pptx?|rtf|xlsx?)$/i,Zoe=/^(?<type>image|video|audio)\//,kR=e=>OR.includes(e),AR=e=>{let t=DR.getType(e.path);return kR(e.kind)||t===`application/pdf`||!!t&&Kj(t)},jR=async e=>{let t=``;if(typeof e==`string`){if(e.startsWith(`blob:`))try{t=(await(await fetch(e)).blob()).type}catch{}else{if(LA(e)){let{hostname:t,pathname:n}=new URL(e);if(t.startsWith(`images.`))return`image`;e=n}t=DR.getType(e)??``}}else e instanceof Blob&&(t=e.type);if(!t)return;let[n,r]=t.split(`/`);if(kR(n)&&!r.startsWith(`x-`))return n},Qoe=e=>{let t=DR.getType(e.path);return!!t&&Kj(t)},MR=e=>DR.getType(e)?.match(Zoe)?.groups?.type??(Xoe.test(e)?`document`:`other`),NR=e=>{let t=new DOMParser().parseFromString(e,`text/xml`),n=e=>{if(e.children.length===0)return e.textContent;let t={};return Array.from(e.children).forEach(e=>{let r=e.tagName,i=n(e);t[r]?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}),t};return n(t.documentElement)},$oe=`blob.core.windows.net`,ese=1e3,PR=(e=A($H))=>e?.media_libraries?.azure_blob_storage??(e?.media_library?.name===`azure_blob_storage`?e?.media_library:void 0),tse=e=>{let t=PR(e)??PR();return!!(t&&t.container&&(t.account_name||t.endpoint))},FR=({fieldConfig:e})=>{let t=PR(e)??PR();if(!t)throw Error(`Azure Blob Storage configuration is not available`);return t},IR=e=>e.replace(/\/+$/,``),LR=e=>e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`),RR=({account_name:e,container:t,endpoint:n})=>`${n?IR(n):`https://${e}.${$oe}`}/${t}`,zR=({url:e,token:t,searchParams:n})=>`${e}?${[n?.toString(),t.trim().replace(/^[?&]/,``)].filter(Boolean).join(`&`)}`,BR=(e,t,n)=>{let{prefix:r=``,public_url:i}=t,a=RR(t);return e.map(({Name:e,Properties:t={}})=>{let o=e.split(`/`).pop()||e,s=r&&e.startsWith(r)?e.slice(r.length):e,c=LR(e),l=`${a}/${c}`,u=i?`${IR(i)}/${c}`:l,d=t[`Last-Modified`],f=t[`Content-Length`];return{id:e,description:s,previewURL:i?u:zR({url:l,token:n}),downloadURL:u,fileName:o,...d&&{lastModified:new Date(d)},...f&&{size:Number(f)},kind:MR(e)}})},VR=async(e,t,{maxPages:n=10}={})=>{let{prefix:r=``}=e,{kind:i,apiKey:a}=t;if(!a)return Promise.reject(Error(`Azure Blob Storage SAS token is required`));let o=RR(e),s=[],c;for(let e=0;e<n;e+=1){let e=new URLSearchParams({restype:`container`,comp:`list`,maxresults:String(ese),...r&&{prefix:r},...c&&{marker:c}}),t=await fetch(zR({url:o,token:a,searchParams:e}));if(!t.ok){let e=await t.text();return Promise.reject(Error(`Failed to list blobs: ${e}`))}let n=NR(await t.text()),{Blob:i}=n.Blobs??{},l=i?Array.isArray(i)?i:[i]:[];if(s.push(...l.filter(({Name:e})=>!e.endsWith(`/`))),c=n.NextMarker||void 0,!c)break;await vf(50)}return BR(i?s.filter(({Name:e})=>MR(e)===i):s,e,a)},nse=async(e,t,n)=>{let r=await VR(t,n,{maxPages:5}),i=e.toLowerCase();return r.filter(e=>e.fileName.toLowerCase().includes(i)||e.description.toLowerCase().includes(i))},rse=async(e,t,n)=>{if(e.length===0)return[];let{prefix:r=``}=t,{apiKey:i}=n;if(!i)return Promise.reject(Error(`Azure Blob Storage SAS token is required`));let a=RR(t),o=[];for(let t of e){let n=t.name.split(/[/\\]/).filter(Boolean).at(-1)??t.name,s=r?`${r}${n}`:n,c=`${a}/${LR(s)}`,l=await t.arrayBuffer(),u=await fetch(zR({url:c,token:i}),{method:`PUT`,headers:{"x-ms-blob-type":`BlockBlob`,"Content-Type":t.type||`application/octet-stream`},body:l});if(!u.ok){let e=await u.text();throw Error(`Failed to upload file ${t.name}: ${e}`)}o.push({Name:s,Properties:{"Last-Modified":new Date().toUTCString(),"Content-Length":String(t.size),"Content-Type":t.type}}),e.length>1&&await vf(50)}return BR(o,t,i)},ise={serviceType:`cloud_storage`,serviceId:`azure_blob_storage`,serviceLabel:`Azure Blob Storage`,serviceURL:`https://azure.microsoft.com/products/storage/blobs/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api`,apiKeyURL:`https://portal.azure.com/#browse/Microsoft.Storage%2FStorageAccounts`,apiKeyPattern:/^\??(?:[\w-]+=[^&]*&)*sig=[^&]+(?:&[\w-]+=[^&]*)*$/,isEnabled:tse,list:async e=>VR(FR(e),e),search:async(e,t)=>nse(e,FR(t),t),upload:async(e,t)=>rse(e,FR(t),t)},HR=na(!1),UR=na(!1),WR=na(!1),GR=`https://console.cloudinary.com/console/media_library`,KR=new URL(GR).origin,ase=[`cloud_name`,`api_key`,`username`,`timestamp`,`signature`,`integration`,`use_saml`,`saml_iframe_support`],ose=[`integration`,`inline_container`,`z_index`,`multiple`,`max_files`,`default_transformations`,`insert_caption`,`remove_header`,`folder`,`search`,`collection`,`asset`,`transformation`,`sandboxNotAllowedAttributes`,`theme`],qR=e=>{let t=A($H);if(e??=t,e?.media_libraries&&`cloudinary`in e.media_libraries)return e.media_libraries.cloudinary;if(!e?.media_library)return;let n=e.media_library.name===`cloudinary`,r=!e.media_library.name&&t?.media_library?.name===`cloudinary`;if(n||r)return e.media_library},JR=new Map,YR=e=>{let t=e?JSON.stringify(e):`global`,n=JR.get(t);if(n)return n;let r=qR()||{config:{}},i=qR(e)||{config:{}},a={...r,...i,config:{...r.config,...i.config}};return JR.set(t,a),a},sse={serviceType:`cloud_storage`,serviceId:`cloudinary`,serviceLabel:`Cloudinary`,serviceURL:`https://cloudinary.com/`,showServiceLink:!0,hotlinking:!0,authType:`widget`,developerURL:`https://cloudinary.com/documentation/`,apiKeyURL:`https://console.cloudinary.com/settings/api-keys`,apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:e=>{let t=qR(e)??qR(),{cloud_name:n,api_key:r}=(t?t.config:void 0)??{};return!!(n&&r)}},XR=(e,t=A($H))=>t?.media_libraries?.[e]??(t?.media_library?.name===e?t?.media_library:void 0),ZR=async(e,t)=>{let n=new TextEncoder,r=await crypto.subtle.importKey(`raw`,typeof e==`string`?n.encode(e):e,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),i=await crypto.subtle.sign(`HMAC`,r,n.encode(t));return new Uint8Array(i)},QR=async e=>{let t=typeof e==`string`?new TextEncoder().encode(e):e,n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},cse=async({method:e,url:t,headers:n,payloadHash:r,accessKeyId:i,secretAccessKey:a,region:o,service:s,date:c})=>{let l=new URL(t),u=c.toISOString().replace(/[:-]|\.\d{3}/g,``),d=u.slice(0,8),f=l.pathname,p=[...l.searchParams.entries()].sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`),m=Object.entries(n).map(([e,t])=>`${e.toLowerCase()}:${t.trim()}`).sort().join(`
|
||
`),h=Object.keys(n).map(e=>e.toLowerCase()).sort().join(`;`),g=[e,f,p,`${m}\n`,h,r].join(`
|
||
`),_=`AWS4-HMAC-SHA256`,v=`${d}/${o}/${s}/aws4_request`,y=[_,u,v,await QR(g)].join(`
|
||
`),b=await ZR(await ZR(await ZR(await ZR(await ZR(`AWS4${a}`,d),o),s),`aws4_request`),y),x=Array.from(b).map(e=>e.toString(16).padStart(2,`0`)).join(``);return[`${_} Credential=${i}/${v},`,`SignedHeaders=${h}, Signature=${x}`].join(` `)},$R=async({method:e,url:t,config:n,secretAccessKey:r,body:i=``,extraHeaders:a={}})=>{let{access_key_id:o,region:s=`us-east-1`}=n,c=new Date,l=new URL(t),u=await QR(i),d={Host:l.host,"x-amz-date":c.toISOString().replace(/[:-]|\.\d{3}/g,``),"x-amz-content-sha256":u,...a},f=await cse({method:e,url:t,headers:d,payloadHash:u,accessKeyId:o,secretAccessKey:r,region:s,service:`s3`,date:c});return fetch(t,{method:e,headers:{...d,Authorization:f},...i&&{body:i}})},lse=({bucket:e,key:t,endpoint:n,region:r,forcePathStyle:i,publicUrl:a})=>a?`${a}/${t}`:n?`${n}/${e}/${t}`:i?`https://s3.${r}.amazonaws.com/${e}/${t}`:`https://${e}.s3.${r}.amazonaws.com/${t}`,ez=(e,t)=>{let{bucket:n,region:r,endpoint:i,force_path_style:a,prefix:o=``,public_url:s}=t;return e.map(e=>{let t=e.Key,c=t.split(`/`).pop()||t,l=o&&t.startsWith(o)?t.slice(o.length):t,u=lse({bucket:n,key:t,endpoint:i,region:r,forcePathStyle:a,publicUrl:s});return{id:t,description:l,previewURL:u,downloadURL:u,fileName:c,lastModified:new Date(e.LastModified),size:Number(e.Size),kind:MR(t)}})},tz=async(e,t,{maxPages:n=10}={})=>{let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=e,{kind:c,apiKey:l}=t;if(!l)return Promise.reject(Error(`S3 secret access key is required`));let u=[],d;for(let t=0;t<n;t+=1){let t=new URLSearchParams({"list-type":`2`,"max-keys":`1000`,...s&&{prefix:s},...d&&{"continuation-token":d}}),n=await $R({method:`GET`,url:a?`${a}/${r}?${t}`:o?`https://s3.${i}.amazonaws.com/${r}?${t}`:`https://${r}.s3.${i}.amazonaws.com/?${t}`,config:e,secretAccessKey:l});if(!n.ok){let e=await n.text();return Promise.reject(Error(`Failed to list objects: ${e}`))}let c=NR(await n.text()),f=(c.Contents?Array.isArray(c.Contents)?c.Contents:[c.Contents]:[]).filter(e=>!e.Key.endsWith(`/`));if(u.push(...f),d=c.NextContinuationToken,c.IsTruncated!==`true`||!d)break;await vf(50)}return ez(c?u.filter(e=>MR(e.Key)===c):u,e)},nz=async(e,t,n)=>{let r=await tz(t,n,{maxPages:5}),i=e.toLowerCase();return r.filter(e=>e.fileName.toLowerCase().includes(i)||e.description.toLowerCase().includes(i))},rz=async(e,t,n)=>{if(e.length===0)return[];let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=t,{apiKey:c}=n;if(!c)return Promise.reject(Error(`S3 secret access key is required`));let l=[];for(let n of e){let u=n.name.split(/[/\\]/).filter(Boolean).at(-1)??n.name,d=s?`${s}${u}`:u,f=await $R({method:`PUT`,url:a?`${a}/${r}/${d}`:o?`https://s3.${i}.amazonaws.com/${r}/${d}`:`https://${r}.s3.${i}.amazonaws.com/${d}`,config:t,secretAccessKey:c,body:await n.arrayBuffer(),extraHeaders:{"Content-Type":n.type||`application/octet-stream`,...t.acl!==!1&&{"x-amz-acl":t.acl??`public-read`}}});if(!f.ok){let e=await f.text();throw Error(`Failed to upload file ${n.name}: ${e}`)}l.push({Key:d,LastModified:new Date().toISOString(),ETag:``,Size:n.size,ContentType:n.type}),e.length>1&&await vf(50)}return ez(l,t)},iz=e=>XR(`aws_s3`,e),use=e=>{let t=iz(e)??iz();return!!(t&&t.access_key_id&&t.bucket&&t.region)},az=({fieldConfig:e})=>{let t=iz(e)??iz();if(!t)throw Error(`Amazon S3 configuration is not available`);return t},dse={serviceType:`cloud_storage`,serviceId:`aws_s3`,serviceLabel:`Amazon S3`,serviceURL:`https://aws.amazon.com/s3/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.aws.amazon.com/s3/`,apiKeyURL:`https://console.aws.amazon.com/iam/home#/security_credentials`,apiKeyPattern:/^[A-Za-z0-9/+=]{40}$/,isEnabled:use,list:async e=>tz(az(e),e),search:async(e,t)=>nz(e,az(t),t),upload:async(e,t)=>rz(e,az(t),t)},oz=e=>XR(`backblaze_b2`,e),fse=e=>{let t=oz(e)??oz();return!!(t&&t.access_key_id&&t.bucket&&t.region)},sz=({fieldConfig:e})=>{let t=oz(e)??oz();if(!t)throw Error(`Backblaze B2 configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.backblazeb2.com`,acl:!1,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.backblazeb2.com`}},pse={serviceType:`cloud_storage`,serviceId:`backblaze_b2`,serviceLabel:`Backblaze B2`,serviceURL:`https://www.backblaze.com/cloud-storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.backblaze.com/docs/cloud-storage-s3-compatible-api`,apiKeyURL:`https://secure.backblaze.com/app_keys.htm`,apiKeyPattern:/^[A-Za-z0-9/+=]{30,}$/,isEnabled:fse,list:async e=>tz(sz(e),e),search:async(e,t)=>nz(e,sz(t),t),upload:async(e,t)=>rz(e,sz(t),t)},mse={default:``,eu:`eu.`,fedramp:`fedramp.`},hse=({account_id:e,jurisdiction:t=`default`})=>`https://${e}.${mse[t]??``}r2.cloudflarestorage.com`,cz=e=>XR(`cloudflare_r2`,e),gse=e=>{let t=cz(e)??cz();return!!(t&&t.access_key_id&&t.bucket&&t.account_id)},lz=({fieldConfig:e})=>{let t=cz(e)??cz();if(!t)throw Error(`Cloudflare R2 configuration is not available`);return{...t,region:`auto`,endpoint:hse(t)}},_se={serviceType:`cloud_storage`,serviceId:`cloudflare_r2`,serviceLabel:`Cloudflare R2`,serviceURL:`https://www.cloudflare.com/developer-platform/r2/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://developers.cloudflare.com/r2/`,apiKeyURL:`https://dash.cloudflare.com/?to=/:account/r2/api-tokens`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:gse,list:async e=>tz(lz(e),e),search:async(e,t)=>nz(e,lz(t),t),upload:async(e,t)=>rz(e,lz(t),t)},uz=e=>XR(`digitalocean_spaces`,e),vse=e=>{let t=uz(e)??uz();return!!(t&&t.access_key_id&&t.bucket&&t.region)},dz=({fieldConfig:e})=>{let t=uz(e)??uz();if(!t)throw Error(`DigitalOcean Spaces configuration is not available`);return{...t,endpoint:`https://${t.region}.digitaloceanspaces.com`,public_url:t.public_url??`https://${t.bucket}.${t.region}.digitaloceanspaces.com`}},yse={serviceType:`cloud_storage`,serviceId:`digitalocean_spaces`,serviceLabel:`DigitalOcean Spaces`,serviceURL:`https://www.digitalocean.com/products/spaces`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.digitalocean.com/products/spaces/`,apiKeyURL:`https://cloud.digitalocean.com/account/api/spaces`,apiKeyPattern:/^[A-Za-z0-9/+=]{43}$/,isEnabled:vse,list:async e=>tz(dz(e),e),search:async(e,t)=>nz(e,dz(t),t),upload:async(e,t)=>rz(e,dz(t),t)},fz=e=>XR(`scaleway_object_storage`,e),bse=e=>{let t=fz(e)??fz();return!!(t&&t.access_key_id&&t.bucket&&t.region)},pz=({fieldConfig:e})=>{let t=fz(e)??fz();if(!t)throw Error(`Scaleway Object Storage configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.scw.cloud`,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.scw.cloud`}},xse={serviceType:`cloud_storage`,serviceId:`scaleway_object_storage`,serviceLabel:`Scaleway Object Storage`,serviceURL:`https://www.scaleway.com/en/object-storage/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.scaleway.com/en/docs/object-storage/`,apiKeyURL:`https://console.scaleway.com/iam/api-keys`,apiKeyPattern:/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,isEnabled:bse,list:async e=>tz(pz(e),e),search:async(e,t)=>nz(e,pz(t),t),upload:async(e,t)=>rz(e,pz(t),t)},Sse=({project_id:e})=>`https://${e}.storage.supabase.co/storage/v1/s3`,Cse=({project_id:e,bucket:t})=>`https://${e}.supabase.co/storage/v1/object/public/${t}`,mz=e=>XR(`supabase_storage`,e),wse=e=>{let t=mz(e)??mz();return!!(t&&t.access_key_id&&t.bucket&&t.project_id)},hz=({fieldConfig:e})=>{let t=mz(e)??mz();if(!t)throw Error(`Supabase Storage configuration is not available`);return{...t,endpoint:Sse(t),public_url:t.public_url??Cse(t)}},Tse={serviceType:`cloud_storage`,serviceId:`supabase_storage`,serviceLabel:`Supabase Storage`,serviceURL:`https://supabase.com/storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://supabase.com/docs/guides/storage`,apiKeyURL:`https://supabase.com/dashboard/project/_/storage/settings`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:wse,list:async e=>tz(hz(e),e),search:async(e,t)=>nz(e,hz(t),t),upload:async(e,t)=>rz(e,hz(t),t)},Ese=s(((e,t)=>{function n(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}t.exports=function(e,t,i){if(typeof t!=`string`)throw Error(`Input must be string`);for(var a=t.length,o=0,s,c,l=0;l<a;l+=1){if(s=t.charCodeAt(l),c=t[l],n(s)&&r(t.charCodeAt(l+1))&&(l+=1,c+=t[l]),o+=e(c),o===i)return t.slice(0,l+1);if(o>i)return t.slice(0,l-c.length+1)}return t}})),Dse=s(((e,t)=>{function n(e){return e>=55296&&e<=56319}function r(e){return e>=56320&&e<=57343}t.exports=function(e){if(typeof e!=`string`)throw Error(`Input must be string`);for(var t=e.length,i=0,a=null,o=null,s=0;s<t;s++)a=e.charCodeAt(s),r(a)?o!=null&&n(o)?i+=1:i+=3:a<=127?i+=1:a>=128&&a<=2047?i+=2:a>=2048&&a<=65535&&(i+=3),o=a;return i}})),Ose=s(((e,t)=>{var n=Ese(),r=Dse();t.exports=n.bind(null,r)})),kse=l(s(((e,t)=>{var n=Ose(),r=/[\/\?<>\\:\*\|"]/g,i=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,o=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i;function s(e,t){for(var n=e.length;n>0&&(e[n-1]===`.`||e[n-1]===` `);)n--;return n<e.length?e.slice(0,n)+t:e}function c(e,t){if(typeof e!=`string`)throw Error(`Input must be string`);var c=e.replace(r,t).replace(i,t).replace(a,t).replace(o,t);return c=s(c,t),n(c,255)}t.exports=function(e,t){var n=t&&t.replacement||``,r=c(e,n);return n===``?r:c(r,``)}}))(),1),gz=(e,t)=>RegExp(`^${e.split(`/`).map(t).join(`\\/`)}(?=\\/|$)`),_z=e=>{let t=e.startsWith(`@`);return t&&(e=e.slice(1)),e=e.split(`/`).map(e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)).join(`/`),t?`@${e}`:e},Ase=e=>decodeURIComponent(e),vz=new Map,yz=e=>{let t=Ud.current,n=vz.get(t);n||(n=new Intl.NumberFormat(t,{maximumFractionDigits:1}),vz.set(t,n));let r=1e3,i=r*1e3,a=i*1e3,o=a*1e3;return e<r?Z(`file_size_units.b`,{values:{size:n.format(e)}}):e<i?Z(`file_size_units.kb`,{values:{size:n.format(e/r)}}):e<a?Z(`file_size_units.mb`,{values:{size:n.format(e/i)}}):e<o?Z(`file_size_units.gb`,{values:{size:n.format(e/a)}}):Z(`file_size_units.tb`,{values:{size:n.format(e/o)}})},bz=(e,t)=>{if(!t.length)return e;let{filename:n,extension:r}=qj(e),i=RegExp(`^${NA(n)}(?:-(?<num>\\d+?))?${r?`\\.${r}`:``}$`),a=t.sort((e,t)=>RA(e.split(`.`)[0],t.split(`.`)[0])).findLast(e=>i.test(e));return a?`${n}-${Number(a.match(i)?.groups?.num??0)+1}${r?`.${r}`:``}`:e},xz=(e,{slugificationEnabled:t=!1,assetNamesInSameFolder:n=[]}={})=>{let r=(0,kse.default)(e.normalize().replace(/[\s\u00A0\u202F]+/g,` `));if(t){let{filename:e,extension:t}=qj(r);r=`${OI(e)}${t?`.${t.toLowerCase()}`:``}`}return bz(r,n)},jse=[[`jpg`,`jpeg`,`jpe`,`jfif`],[`tif`,`tiff`],[`htm`,`html`],[`yml`,`yaml`],[`md`,`markdown`],[`mpg`,`mpeg`],[`mid`,`midi`],[`aif`,`aiff`]],Sz=(e,t)=>{let n=e?.toLowerCase()??``,r=t?.toLowerCase()??``;return n===r||jse.some(e=>e.includes(n)&&e.includes(r))},Cz=e=>e.filter(Boolean).join(`/`),Mse=e=>e.split(`/`).filter(e=>e!==`.`&&e!==`..`).join(`/`),wz=e=>{let t=e.split(`/`),n=!1;return t.forEach((e,r)=>{if(e===`.`||e===`..`){if(n&&(t[r]=null,e===`..`)){let e=t.findLastIndex((e,t)=>!!e&&t<r);e>-1&&(t[e]=null)}}else n=!0}),Cz(t)},Tz=e=>typeof e==`string`?new Blob([e],{type:`text/plain`}):e,Ez=async e=>{let t=await Tz(e).arrayBuffer();return Df(new Blob([`blob ${t.byteLength}\0`,t]))},Dz=(e=A($H))=>e?.media_libraries?.uploadcare??(e?.media_library?.name===`uploadcare`?e?.media_library:void 0),Oz=e=>{let t=Dz(e)??Dz();return t?t.config?.publicKey:void 0},Nse=e=>!!Oz(e),kz=(e,{fieldConfig:t}={})=>{let{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=(Dz(t)??Dz())||{};return e.map(e=>{let{uuid:t,original_filename:a,original_file_url:o,mime_type:s,datetime_uploaded:c,size:l}=e,u=`${new URL(i??o).origin}/${t}/`,d=s.startsWith(`image/`),f=s.startsWith(`video/`);return{id:t,description:a,previewURL:`${u}${d?`-/preview/400x400/`:``}`,downloadURL:`${u}${d&&r?`-${r}`:``}${n?a:``}`,fileName:a,lastModified:new Date(c),size:l,kind:d?`image`:f?`video`:`other`}})},Az=async(e,{maxPages:t=10,filter:n}={})=>{let{kind:r,fieldConfig:i,apiKey:a}=e,o=Oz(i);if(!o)return Promise.reject(Error(`Uploadcare public key is not configured`));let s={Accept:`application/vnd.uploadcare-v0.7+json`,Authorization:`Uploadcare.Simple ${o}:${a}`},c=new URLSearchParams({limit:`100`,ordering:`-datetime_uploaded`,stored:`true`}),l=[],u=`https://api.uploadcare.com/files/?${c}`;for(let e=0;e<t&&u;e+=1){let e=await fetch(u,{headers:s});if(!e.ok)return Promise.reject(Error(`Failed to fetch files: ${e.statusText}`));let t=await e.json(),{results:i}=t;if(r===`image`&&(i=i.filter(e=>e.is_image)),n&&(i=i.filter(n)),l.push(...i),u=t.next,!u)break;await vf(50)}return kz(l,{fieldConfig:i})},Pse=async e=>Az(e),Fse=async(e,t)=>{let n=e.toLowerCase();return Az(t,{filter:e=>e.original_filename.toLowerCase().includes(n)})},Ise=async(e,t)=>{let n=new TextEncoder,r=n.encode(String(t)),i=n.encode(e),a=await crypto.subtle.importKey(`raw`,i,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),o=await crypto.subtle.sign(`HMAC`,a,r);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},jz={aws_s3:dse,azure_blob_storage:ise,backblaze_b2:pse,cloudflare_r2:_se,cloudinary:sse,digitalocean_spaces:yse,scaleway_object_storage:xse,supabase_storage:Tse,uploadcare:{serviceType:`cloud_storage`,serviceId:`uploadcare`,serviceLabel:`Uploadcare`,serviceURL:`https://uploadcare.com/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://uploadcare.com/docs/`,apiKeyURL:`https://app.uploadcare.com/projects/-/api-keys/`,apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:Nse,list:Pse,search:Fse,upload:async(e,t)=>{if(e.length===0)return[];let{fieldConfig:n,apiKey:r}=t,i=Oz(n);if(!i)return Promise.reject(Error(`Uploadcare public key is not configured`));if(!r)return Promise.reject(Error(`Uploadcare secret key is not provided`));let a=Math.floor(Date.now()/1e3)+1800,o=await Ise(r,a),s=new FormData;s.append(`UPLOADCARE_PUB_KEY`,i),s.append(`UPLOADCARE_STORE`,`1`),s.append(`signature`,o),s.append(`expire`,String(a)),e.forEach(e=>{s.append(xz(e.name),e)});let c=await fetch(`https://upload.uploadcare.com/base/`,{method:`POST`,body:s});if(!c.ok)throw Error(`Failed to upload files: ${c.statusText}`);let l=await c.json();return kz(Object.entries(l).filter(([e])=>!e.startsWith(`UPLOADCARE_`)).map(([t,n])=>{let r=e.find(e=>e.name===t),i=r?.type||`application/octet-stream`,a=i.startsWith(`image/`);return{uuid:n,original_filename:t,original_file_url:`https://ucarecdn.com/${n}/${t}`,size:r?.size||0,mime_type:i,is_image:a,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}}),{fieldConfig:n})}}},Mz=Object.keys(jz),{dependencies:Lse,version:Nz}={name:`@sveltia/cms`,version:`0.205.2`,description:`Sveltia CMS is a modern, lightweight, Git-based headless content management system.`,keywords:[`svelte`,`cms`,`content-management-system`],homepage:`https://sveltiacms.app/en/`,repository:{type:`git`,url:`git+https://github.com/sveltia/sveltia-cms.git`},funding:{type:`github`,url:`https://github.com/sponsors/kyoshino`},license:`MIT`,author:{name:`Kohei Yoshino`,url:`https://github.com/kyoshino`},type:`module`,scripts:{build:`vite build`,"build:watch":`vite build --watch`,check:`pnpm run --no-bail '/^check:.*/'`,"check:audit":`pnpm audit --ignore-registry-errors`,"check:cspell":`cspell --no-progress`,"check:eslint":`eslint .`,"check:imports":`node scripts/find-unused-imports.js`,"check:l10n":`node scripts/check-locales.js`,"check:oxlint":`oxlint .`,"check:prettier":`prettier --check .`,"check:stylelint":`stylelint '**/*.{css,scss,svelte}'`,"check:svelte":`svelte-check`,dev:`vite`,format:`prettier --write .`,prepublishOnly:`vite build`,preview:`vite preview`,test:`NODE_OPTIONS=--no-experimental-webstorage vitest run`,"test:coverage":`NODE_OPTIONS=--no-experimental-webstorage vitest run --coverage`,"test:watch":`NODE_OPTIONS=--no-experimental-webstorage vitest`},dependencies:{"@cfworker/json-schema":`^4.1.1`,"@jsquash/webp":`^1.5.0`,"@lexical/markdown":`^0.49.0`,"@sindresorhus/transliterate":`^2.3.1`,"@sveltia/i18n":`^1.3.0`,"@sveltia/ui":`^0.69.1`,"@sveltia/utils":`^0.12.1`,"create-react-class":`^15.7.0`,dayjs:`^1.11.23`,deepmerge:`^4.3.1`,exifr:`^7.1.3`,"fast-deep-equal":`^3.1.3`,flat:`^6.0.1`,immutable:`^5.1.9`,"isomorphic-dompurify":`^4.1.0`,leaflet:`^1.9.4`,lexical:`^0.49.0`,marked:`^18.0.11`,"marked-bidi":`^1.0.15`,mime:`^4.1.0`,"parse-entities":`^4.0.2`,"pdfjs-dist":`^6.3.289`,qrcode:`^1.5.4`,react:`^19.2.8`,"react-dom":`^19.2.8`,"sanitize-filename":`^1.6.4`,"smol-toml":`^1.8.0`,svgo:`^4.1.0`,"terra-draw":`^1.33.0`,"terra-draw-leaflet-adapter":`1.0.3`,turndown:`^7.2.4`,yaml:`^2.9.0`},devDependencies:{"@stylistic/eslint-plugin":`^5.10.0`,"@sveltejs/vite-plugin-svelte":`^7.3.0`,"@types/leaflet":`^1.9.22`,"@types/node":`^26.4.1`,"@types/qrcode":`^1.5.6`,"@types/react":`^19.2.18`,"@types/react-dom":`^19.2.5`,"@vitest/coverage-v8":`^4.1.11`,cspell:`^10.2.0`,eslint:`^9.39.5`,"eslint-config-airbnb-extended":`^3.2.0`,"eslint-config-prettier":`^10.1.8`,"eslint-plugin-jsdoc":`^64.3.4`,"eslint-plugin-package-json":`^1.8.0`,"eslint-plugin-svelte":`^3.23.0`,"eslint-plugin-unused-imports":`^4.4.1`,globals:`^17.12.0`,messageformat:`^4.0.0`,oxlint:`^1.81.0`,"postcss-html":`^2.0.0`,prettier:`^3.9.6`,"prettier-plugin-svelte":`^4.1.1`,sonda:`^0.14.0`,stylelint:`^17.14.1`,"stylelint-config-recommended":`^18.0.0`,svelte:`^5.57.0`,"svelte-check":`^4.7.6`,"ts-json-schema-generator":`^2.9.0`,typescript:`^6.0.3`,vite:`^8.2.2`,vitest:`^4.1.11`},publishConfig:{directory:`package`,access:`public`,provenance:!0}},Pz=`https://unpkg.com/@sveltia/cms`,Fz=e=>{let t=`https://unpkg.com/${e}`,n=Lse[e]?.replace(/^\D/,``);return n?`${t}@${n}`:t},Iz=async(e,t)=>$A(()=>import(`${Fz(e)}/${t}`),void 0),Lz=[`avif`,`gif`,`jpeg`,`png`,`webp`],Rz=Lz.map(e=>`image/${e}`),zz=/\b(?:avif|gif|jpe?g|png|webp)$/i,Bz=[`svg`],Rse=[`image/svg+xml`],zse=/\b(?:svg)$/i;[...Lz,...Bz];var Vz=[...Rz,...Rse],Bse=[`webp`],Hz={},Vse=async e=>{if(e in Hz)return Hz[e];let t=`image/${e}`,n=new OffscreenCanvas(1,1);n.getContext(`2d`);let r=(await n.convertToBlob({type:t})).type===t;return Hz[e]=r,r},Uz=async(e,{format:t=`webp`,quality:n=85}={})=>{let r=`image/${t}`;if(!await Vse(t)&&Bse.includes(t)){let i=e.getContext(`2d`).getImageData(0,0,e.width,e.height);try{let e=(await Iz(`@jsquash/${t}`,`encode.js?module`)).default,a=await e(i,{quality:n});return new Blob([a],{type:r})}catch{}}return e.convertToBlob({type:r,quality:n/100})},Hse=({width:e,height:t},{width:n=e,height:r=t,fit:i=`scale-down`}={})=>{let a={scale:1,width:e,height:t};if(e===n&&t===r)return a;let o=e<=n&&t<=r,s=1,c=0,l=0;if(i===`scale-down`){if(o)return a;i=`contain`}return i===`contain`&&(s=Math.min(n/e,r/t),c=e*s,l=t*s),{scale:s,width:c,height:l}},Wz=(e,t,n)=>{let{scale:r,width:i,height:a}=Hse(t,n);return e.width=i,e.height=a,{scale:r,width:i,height:a}},Gz={format:`webp`,quality:85,width:512,height:512,fit:`contain`},Use=async({blob:e})=>{let t=URL.createObjectURL(e),n=new Image;return new Promise((e,r)=>{n.addEventListener(`load`,()=>{e({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(t)},{once:!0}),n.addEventListener(`error`,()=>{URL.revokeObjectURL(t),r(Error(`Failed to decode image`))},{once:!0}),n.src=t})},Wse=async({blob:e})=>{let t=URL.createObjectURL(e),n=document.createElement(`video`);return new Promise((e,r)=>{n.addEventListener(`canplay`,()=>{n.pause(),e({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(t)},{once:!0}),n.addEventListener(`error`,()=>{document.body.removeChild(n),URL.revokeObjectURL(t),r(Error(`Failed to decode video`))},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.style.opacity=`0`,n.style.pointerEvents=`none`,document.body.appendChild(n),n.src=t})},Gse=async e=>e.type.startsWith(`video/`)?Wse({blob:e}):Use({blob:e}),Kz=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{let o,s=0,c=0;try{o=await createImageBitmap(e),{width:s,height:c}=o}catch{({source:o,naturalWidth:s,naturalHeight:c}=await Gse(e))}r??=s,i??=c;let l=new OffscreenCanvas(512,512),u=l.getContext(`2d`);return Wz(l,{width:s,height:c},{fit:a,width:r,height:i}),u.drawImage(o,0,0,l.width,l.height),o instanceof HTMLVideoElement&&document.body.removeChild(o),Uz(l,{format:t,quality:n})},Kse=async e=>{let t=await e.text();try{let{optimize:n}=await Iz(`svgo`,`dist/svgo.browser.js`),{data:r}=n(t);return new Blob([r],{type:e.type})}catch{}return e},qz=Fz(`pdfjs-dist`),qse=`${qz}/build/pdf.min.mjs`,Jse=`${qz}/build/pdf.worker.min.mjs`,Yse={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${qz}/cmaps/`,iccUrl:`${qz}/iccs/`,standardFontDataUrl:`${qz}/standard_fonts/`,wasmUrl:`${qz}/wasm/`},Jz,Xse=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{if(!Jz)try{Jz=await $A(()=>import(qse),void 0),Jz.GlobalWorkerOptions.workerSrc=Jse}catch{throw Error(`Failed to load PDF.js library`)}let o=URL.createObjectURL(e),s=new OffscreenCanvas(512,512),c=s.getContext(`2d`);try{let e=await(await Jz.getDocument({...Yse,url:o}).promise).getPage(1),t=e.getViewport({scale:1}),{scale:n}=Wz(s,{width:t.width,height:t.height},{width:r,height:i,fit:a});await e.render({canvasContext:c,viewport:n===1?t:e.getViewport({scale:n})}).promise,URL.revokeObjectURL(o)}catch{throw Error(`Failed to render PDF`)}return Uz(s,{format:t,quality:n})},Zse=/^(?:https?|data|blob):/,Yz=new Map,Xz=new Map,Zz=(e,t)=>(e.blobURL??=URL.createObjectURL(t),t),Qz=(e,t)=>(Zz(e,t),e.blobURL&&Yz.set(e.blobURL,t),t),$z=(e,t)=>{let n=Xz.get(e);return n||(n=t().finally(()=>{Xz.delete(e)}),Xz.set(e,n)),n},Qse=async e=>{let{name:t}=e,n=await A(nY)?.fetchBlob?.(e);if(!n)throw Error(`Failed to retrieve blob`);return Qz(e,new Blob([n],{type:DR.getType(t)??n.type}))},eB=async e=>{let{file:t,handle:n,blobURL:r,path:i}=e;if(t)return Zz(e,t);if(r)return Yz.get(r)??$z(r,()=>fetch(r).then(e=>e.blob()));if(n)try{return Qz(e,await n.getFile())}catch{throw Error(`Failed to retrieve blob from file handle`)}return $z(i,()=>Qse(e))},tB=async e=>(e.blobURL||await eB(e),e.blobURL),nB=void 0,rB=new Map,$se=()=>{if(nB===void 0){let{databaseName:e}=A(nY)?.repository??{};nB=e?new UA(e,`asset-thumbnails`):null}},ece=async(e,t)=>{let n=await nB?.get(e.sha);if(!n){let r=await eB(e);n=await(t?Xse:Kz)(r,Gz),await nB?.set(e.sha,n)}return n},iB=async(e,{cacheOnly:t=!1}={})=>{let n=e.name.endsWith(`.pdf`);if(!([`image`,`video`].includes(e.kind)||n))return;$se();let{sha:r}=e,i=rB.get(r);if(!i){if(t){let e=await nB?.get(r);return e?URL.createObjectURL(e):void 0}i=ece(e,n).finally(()=>{rB.delete(r)}),rB.set(r,i)}let a=await i;return a?URL.createObjectURL(a):void 0},aB=new Set,tce=()=>{let e=new Set(aB);aB.clear(),document.querySelectorAll(`[src^="blob:"]`).forEach(t=>{e.delete(t.getAttribute(`src`))}),e.size&&(e.forEach(e=>{URL.revokeObjectURL(e),Yz.delete(e)}),A(dU).forEach(t=>{t.blobURL!==void 0&&e.has(t.blobURL)&&delete t.blobURL}))},nce=({blobURL:e})=>{if(!e)return;let t=!aB.size;aB.add(e),t&&window.requestAnimationFrame(tce)},oB=(e,{pathOnly:t=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{let{publicPath:i,entryRelative:a,hasTemplateTags:o}=e.folder.collectionName===void 0?e.folder:gM(e.path).find(({collectionName:e})=>e!==void 0)??A(uM);if(a){if(t){let t=qj(e.path).dirname,n=r?qj(Object.values(r.locales)[0].path).dirname:void 0;if(t!==void 0&&n!==void 0){if(t===n)return e.name;let r=`${n}/`;return e.path.startsWith(r)?e.path.slice(r.length):void 0}let{internalPath:i,internalSubPath:a}=e.folder;if(e.path===Cz([i,a,e.name]))return e.path.slice(i.length+1)}return}let{_baseURL:s=``,output:{encode_file_path:c=!1}={}}=A($H),l=o?e.path.replace(gz(e.folder.internalPath??``,e=>{let t=e.match(iM)?.[1];return t?`(?<${t}>[^/]+)`:NA(e)}),i?.replaceAll(aM,`$<$1>`)??``):e.path.replace(e.folder.internalPath??``,i===`/`?``:i??``);if(c&&(l=_z(l)),!(!l.startsWith(`/`)&&!n))return t?l:`${s}${l}`},rce=e=>{if(jz.cloudinary?.isEnabled?.()){let t=YR(e);if(t.output_filename_only&&t.config?.cloud_name)return`https://res.cloudinary.com/${t.config.cloud_name}`}},sB=async({value:e,entry:t,collectionName:n,fileName:r,componentName:i,fieldConfig:a,typedKeyPath:o,thumbnail:s=!1})=>{if(!e)return;if(Zse.test(e))return e;if(kU(e)){let t=rce(a);if(t)return`${t}/${e}`}let c=AU({value:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:o});if(c)return(s?await iB(c):await tB(c))??oB(c)};RI.default.extend(zI.default),RI.default.extend(BI.default),RI.default.extend(VI.default);var ice=/{{(?:year|month|day|hour|minute|second)}}/,cB=e=>ZL(Object.values(e.locales)[0].path).map(({collectionName:e})=>HL(e)).filter(e=>!!e),ace=({dateFieldName:e,fields:t,content:n})=>{let r=e?t.find(({widget:t,name:n})=>t===`datetime`&&n===e):t.find(({widget:e})=>e===`datetime`),i=r?n[r.name]:void 0;if(!r||!i)return;let a=r,o=gR(i,a);if(!fR(o))return;let{utc:s,outputUTC:c}=WI(a);return mI({date:o,timeZone:s||c?`UTC`:void 0})},lB=({collection:e,collectionFile:t,locale:n,slug:r,path:i,content:a,isIndexFile:o=!1})=>{let{preview_path:s,preview_path_date_field:c,fields:l=[],_i18n:{defaultLocale:u,omitDefaultLocaleFromPreviewPath:d}}=t??e;if(!i||!a||!s)return;let f=(o?pL(e):void 0)?.fields??l,p;if(ice.test(s)&&(p=ace({dateFieldName:c,fields:f,content:a}),!p))return;let m=s;n===u&&d&&(m=m.replace(/{{locale}}[./]/,``));try{return pV(m,{type:`preview_path`,collection:e,content:a,locale:n,currentSlug:r,entryFilePath:i,dateTimeParts:p,isIndexFile:o})}catch{return}},oce=(e,t,n,r,i={})=>{let{show_preview_links:a=!0,_baseURL:o}=A($H)??{},s=i.baseURL||o,{slug:c,path:l,content:u}=e.locales[t]??{};if(!a||!s)return;let d=lB({collection:n,collectionFile:r,locale:t,slug:c,path:l,content:u,isIndexFile:mL(n,e)});if(d!==void 0)return`${s.replace(/\/$/,``)}/${d.replace(/^\//,``)}`},sce=(e,t)=>`${A(nY)?.repository?.blobBaseURL}/${e.locales[t]?.path}?plain=1`,cce=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,uB=e=>{if(e instanceof RegExp)return e;if(typeof e==`string`){let{pattern:t,flags:n}=e.match(cce)?.groups??{};if(t)try{return new RegExp(t,n)}catch{}}},lce=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,dB=na([]),uce=ra(dB,e=>new Set(e.map(e=>e.id))),dce=e=>{let t=HL(e);if(!t)return[];let{_type:n,_i18n:{defaultLocale:r}}=t,{filter:i}=n===`entry`?t:{},a=i?.field,o=uB(i?.pattern),s=i?.value===void 0?[]:Array.isArray(i.value)?i.value:[i.value],c;if(n===`entry`){let n=t._file?.fullPathRegEx;c=n?e=>n.test(Object.values(e.locales)[0]?.path??``):t=>cB(t).some(({name:t})=>t===e)}else{let t=new Set(A(qL).filter(({collectionName:t})=>t===e).flatMap(({filePathMap:e})=>e?Object.values(e):[]));c=e=>{let n=Object.values(e.locales)[0]?.path;return!!n&&t.has(n)}}return A(JL).filter(n=>{if(!c(n))return!1;if(!a||mL(t,n))return!0;let i=tV({entry:n,locale:r,collectionName:e,key:a})??null;return o?o.test(i):s.includes(i)})},fB={entrySource:void 0,folderSource:void 0,map:new Map},pB=e=>{let t=A(JL),n=A(qL);(t!==fB.entrySource||n!==fB.folderSource)&&(fB.entrySource=t,fB.folderSource=n,fB.map=new Map);let r=fB.map.get(e);if(r)return r;let i=dce(e);return fB.map.set(e,i),i},mB=async({assetURL:e,newURL:t,collectionName:n,entry:r,content:i,keyPath:a,value:o,isIndexFile:s,collectionFile:c})=>{let l=c?.name,u=YB({collectionName:n,fileName:l,valueMap:i,keyPath:a,isIndexFile:s});if(!u)return!1;let d=e.startsWith(`blob:`),f={entry:r,collectionName:n,fileName:l},{widget:p=`string`}=u;if(tL.includes(p)){let n=d?await sB({...f,value:o})===e:o===e;return n&&t&&(i[a]=t),n}if([`richtext`,`markdown`].includes(p)){let n=[...o.matchAll(lce)];if(n.length)return(await Promise.all(n.map(async([,n])=>{let r=(d?await sB({...f,value:n}):n)===e;return r&&t&&(i[a]=i[a].replace(n,t)),r}))).some(Boolean)}return!1},hB=async(e,{entries:t=A(JL),newURL:n=``}={})=>{let r=A($H)?._baseURL,i=r&&!e.startsWith(`blob:`)?e.replace(r,``):e,a=i.startsWith(`blob:`),o=!!n,s=await Promise.all(t.map(async e=>{let{locales:t}=e,r=cB(e),s=!1;for(let{content:c}of Object.values(t)){for(let[t,l]of Object.entries(c))if(!(typeof l!=`string`||!l)&&!(!a&&!l.includes(i))){for(let a of r){let r={assetURL:i,newURL:n,collectionName:a.name,entry:e,content:c,keyPath:t,value:l,isIndexFile:mL(a,e)},u=ZI(a,e),d;if(d=u.length?(await Promise.all(u.map(e=>mB({...r,collectionFile:e})))).includes(!0):await mB({...r}),d&&(s=!0,!o))break}if(s&&!o)break}if(s&&!o)break}return s}));return t.filter((e,t)=>s[t])},fce=e=>{let t=pL(e);return t?!pB(e.name).some(({slug:e})=>e===t.name):!1},gB=new WeakMap,pce=e=>{let t=gB.get(e);if(t)return t;let n=new Map;return e.forEach(({value:e,label:t})=>{n.has(e)||n.set(e,t)}),gB.set(e,n),n},_B=new WeakMap,vB=0,yB=e=>(_B.has(e)||(_B.set(e,vB),vB+=1),_B.get(e)),bB=e=>fV(e)?e:e===`slug`?`{{fields.slug}}`:`{{${e}}}`,mce=e=>{if(!e||e.widget!==`list`)return!1;let t=`fields`in e,n=`types`in e;return t||n},xB=(e,t,n)=>{let{slug:r,locale:i,getDisplayValue:a}=t,{content:o,locales:s,defaultLocale:c,identifierField:l}=n;if(e===`slug`)return r;if(e===`locale`)return i;let u=e.replace(/^fields\./,``);return a(u)||a(u,c)||iV(o,{identifierField:l})||iV(s[c]?.content||{},{identifierField:l})||r},SB=(e,t,n,r)=>{let{label:i,value:a,searchValue:o}=e;return t.forEach(e=>{let t=xB(e,n,r);i=i.replaceAll(`{{${e}}}`,t),a=a.replaceAll(`{{${e}}}`,t),o=o?.replaceAll(`{{${e}}}`,t)??``}),{label:i,value:a,searchValue:o}},CB=e=>{let t=[];return dV(e,(e,n)=>(t.push(n),``)),t},hce=(e,t)=>{let n=e.value_field,r=e.display_fields??[n??`{{${t}}}`],i=e.search_fields??r,a=bB(n??`{{slug}}`),o=r.map(bB).join(` `),s=i.map(bB).join(` `),c=Ij([...CB(o),...CB(a),...CB(s)]);return{_valueField:a,_displayField:o,_searchField:s,allFieldNames:c,hasListFields:c.some(e=>e.includes(`*`))}},gce=/\.(\d+)$/,_ce=(e,t)=>{let n=new Map,r=new Map;return e.filter(e=>e.includes(`*`)).forEach(e=>{let r=e.replace(/\.\*.*$/,``),i=YB({...t,keyPath:r});n.set(e,{baseFieldName:r,fieldConfig:i,isComplexListField:mce(i)})}),[...n.entries()].forEach(([e,t])=>{let{baseFieldName:n}=t;r.has(n)||r.set(n,[]),r.get(n).push([e,t])}),r},vce=new Map,yce=({baseFieldName:e,groupEntries:t,content:n,templates:r,allFieldNames:i,context:a,fallbackContext:o})=>{let{_displayField:s,_valueField:c,_searchField:l}=r,u=wI(vce,e,()=>RegExp(`^${NA(e)}.\\d+$`));return Object.entries(n).filter(([e])=>u.test(e)).map(([e,t])=>{let n=e.match(gce);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index).map(({value:e})=>{let n={label:s,value:c,searchValue:l};t.forEach(([t])=>{n.label=n.label.replaceAll(`{{${t}}}`,e),n.value=n.value.replaceAll(`{{${t}}}`,e),n.searchValue=n.searchValue.replaceAll(`{{${t}}}`,e)});let{label:r,value:u,searchValue:d}=SB(n,i.filter(e=>!e.includes(`*`)),a,o);return{label:r||``,value:u||a.slug,searchValue:d||r||``}})},wB=/^(.+)\.\*\.(.+)$/,bce=new Map,xce=e=>{let t=null;return e.some(([e])=>(t=e.match(wB),!!t)),t},Sce=({groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let[,o,s]=xce(e)??[];if(!o)return[];let c=wI(bce,`${o}:${s}`,()=>{let e=NA(o),t=NA(s);return RegExp(`^${e}.([0-9]+).${t}$`)}),l=Object.entries(t).filter(([e])=>c.test(e)).map(([e,t])=>{let n=e.match(c);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index),{_displayField:u,_valueField:d,_searchField:f}=n;return l.map(({index:n})=>{let o={label:u,value:d,searchValue:f};e.forEach(([e])=>{let r=e.match(wB);if(r){let[,i,a]=r,s=t[`${i}.${n}.${a}`]||``;o.label=o.label.replaceAll(`{{${e}}}`,s),o.value=o.value.replaceAll(`{{${e}}}`,s),o.searchValue=o.searchValue.replaceAll(`{{${e}}}`,s)}});let{label:s,value:c,searchValue:l}=SB(o,r.filter(e=>!e.includes(`*`)),i,a);return{label:s||``,value:c||i.slug,searchValue:l||s||``}})},Cce=({baseFieldGroups:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let o=[],s=!1;return e.forEach((e,c)=>{if(e.length===0)return;let[,l]=e[0],u={groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a},d=l.isComplexListField?Sce({...u}):yce({...u,baseFieldName:c});o.push(...d),s=!0}),{results:o,hasProcessedListFields:s}},wce=({templates:e,allFieldNames:t,context:n,fallbackContext:r})=>{let{slug:i}=n,{_displayField:a,_valueField:o,_searchField:s}=e,{content:c,locales:l,defaultLocale:u,identifierField:d}=r,f=Object.fromEntries(t.map(e=>[e,xB(e,n,r)])),p=a,m=o,h=s;return Object.entries(f).forEach(([e,t])=>{p=p.replaceAll(`{{${e}}}`,t),m=m.replaceAll(`{{${e}}}`,t),h=h.replaceAll(`{{${e}}}`,t)}),(!p||p.trim()===``)&&(p=iV(c,{identifierField:d})||iV(l[u]?.content||{},{identifierField:d})||i),{label:p||``,value:m||i,searchValue:h||p||``}},Tce=({refEntry:e,content:t,collection:n,templates:r,allFieldNames:i,hasListFields:a,collectionName:o,fileName:s,locale:c,identifierField:l,defaultLocale:u})=>{let{slug:d,locales:f}=e,p={collectionName:o,fileName:s,isIndexFile:mL(n,e),keyPath:``},m={slug:d,locale:c,getDisplayValue:(e,n)=>$B({...p,keyPath:e,valueMap:n?f[n].content:t,locale:n??c})},h={content:t,locales:f,defaultLocale:u,identifierField:l};if(!a)return[wce({templates:r,allFieldNames:i,context:m,fallbackContext:h})];let{results:g,hasProcessedListFields:_}=Cce({baseFieldGroups:_ce(i,p),content:t,templates:r,allFieldNames:i,context:m,fallbackContext:h});if(_)return g;let{_displayField:v,_valueField:y,_searchField:b}=r,{label:x,value:S,searchValue:C}=SB({label:v,value:y,searchValue:b},i.filter(e=>!e.includes(`*`)),m,h);return[{label:x||``,value:S||d,searchValue:C||x||``}]},Ece=/^{{fields\.(.+?)}}$/,Dce=(e,t,n=void 0)=>e.map(({field:e,values:r,exclude:i})=>({field:e,exclude:i,values:r.flatMap(e=>{if(typeof e!=`string`)return[e];if(e===`{{slug}}`)return n?[n]:[];let r=e.match(Ece);if(!r)return[e];let i=t?.[r[1]];return i===void 0?[]:[i]})})),Oce=({refEntries:e,locale:t,fileName:n=void 0,entryFilters:r=[],defaultLocale:i=void 0})=>e.filter(e=>!n||n===e.slug).map(e=>{let{content:n}=e.locales[t]??(i?e.locales[i]:void 0)??e.locales._default??{};return{refEntry:e,hasContent:!!n&&Object.keys(n).length>0,content:n??{}}}).filter(({hasContent:e,content:t,refEntry:n})=>e&&r.every(({field:e,values:r,exclude:i=!1})=>{if(r.length===0)return!0;let a=e===`slug`,o=e.replace(/^fields\./,``),s=a?n.slug:t[o];return i?!r.includes(s):r.includes(s)})),kce=new Map,Ace=100,TB=({locale:e,fieldConfig:t,refEntries:n,entryFilters:r=[]})=>{let{collection:i,file:a}=t,o=HL(i);if(!o)return[];let{_type:s,_i18n:{defaultLocale:c}}=o,{identifier_field:l=`title`}=s===`entry`?o:{},u=hce(t,l),{allFieldNames:d,hasListFields:f}=u;return Oce({refEntries:n,locale:e,fileName:a,entryFilters:r,defaultLocale:c}).flatMap(({refEntry:t,content:n})=>Tce({refEntry:t,content:n,collection:o,templates:u,allFieldNames:d,hasListFields:f,collectionName:i,fileName:a,locale:e,identifierField:l,defaultLocale:c}))},EB=({locale:e,fieldConfig:t,refEntries:n,currentLocaleValues:r=void 0,currentSlug:i=void 0})=>{let{filters:a}=t,o=Dce(a??[],r,i),s=o.flatMap(({values:e})=>e).join(`\0`);return TI(kce,`${e}|${`${yB(t)}|${yB(n)}`}|${s}`,()=>TB({locale:e,fieldConfig:t,refEntries:n,entryFilters:o}).sort((e,t)=>RA(e.label,t.label)),Ace)},jce=({locale:e,fieldConfig:t,refEntry:n})=>TB({locale:e,fieldConfig:t,refEntries:[n]}),DB=({fieldConfig:e,valueMap:t,keyPath:n,locale:r})=>{let{multiple:i,collection:a}=e,o=pce(EB({locale:r,fieldConfig:e,refEntries:pB(a)})),s=e=>o.get(e)||e;return i?nR(t,n).map(e=>s(t[e])):s(t[n])},OB=({multiline:e,dotAll:t,source:n})=>e||t||n.includes(`[\\s\\S]`)||n.includes(`[\\S\\s]`),kB=e=>rM(Object.fromEntries(Object.entries(nM(e)).filter(([e])=>!e.split(`.`).pop()?.startsWith(`__sc_`)))),AB=e=>e.replace(/"/g,`'`),jB=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,Mce=new RegExp(jB,`g`),Nce=RegExp(`${jB.source}|\\[!\\[(?<alt2>(?:[^\\]\\\\]|\\\\.)*)\\]\\((?<src2>(?:[^"()\\\\]|\\\\.|\\([^)]*\\)|"[^"]*")*?)(?:\\s+"(?<title2>(?:[^"\\\\]|\\\\.)*)")?\\)\\](?:\\((?<link>[^)]*\\([^)]*\\)[^)]*|[^)]*)\\))`),MB=e=>typeof e==`string`&&!!e.trim(),NB=e=>e.replace(/&(?![a-zA-Z0-9#]+;)/g,`&`).replaceAll(`"`,`"`),PB={ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]},FB=(e,t)=>gt(e.replace(`<a>`,`<a href="${NB(t)}" target="_blank" rel="noopener noreferrer">`),PB),IB={id:`image`,label:`Image`,fields:[{name:`src`,label:`Source`,widget:`image`},{name:`alt`,label:`Alt Text`,required:!1},{name:`title`,label:`Title`,required:!1}],pattern:jB,toBlock:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return t?`}"`:``})`:``},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return`<img src="${NB(t)}" alt="${NB(n)}" title="${NB(r)}">`}},Pce={id:`linked-image`,label:`Image`,fields:[...IB.fields,{name:`link`,label:`Link`,required:!1}],pattern:Nce,fromBlock:e=>{let{src:t,alt:n,title:r,src2:i,alt2:a,title2:o,link:s}=e.groups??{};return{src:(t||i||``).trim(),alt:(n||a||``).trim(),title:(r||o||``).trim(),link:(s||``).trim()}},toBlock:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=t?`}"`:``})`:``;return a&&i?`[${a}](${i})`:a},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=`<img src="${NB(t)}" alt="${NB(n)}" title="${NB(r)}">`;return i?`<a href="${NB(i)}">${a}</a>`:a}},LB=e=>{let t=rL.get(e);if(t)return{...t,id:`x-${e}`};let n={icon:`image`,label:Z(`editor_components.image`),fields:[{name:`src`,label:Z(`editor_components.src`),widget:`image`},{name:`alt`,label:Z(`editor_components.alt`),required:!1},{name:`title`,label:Z(`editor_components.title`),required:!1}],trigger:`button`};return{image:{...IB,...n},"linked-image":{...Pce,...n,fields:[...n.fields,{name:`link`,label:Z(`editor_components.link`),required:!1}]}}[e]},Fce=new Map,Ice=1e3,RB=new WeakMap,Lce=e=>{let t=RB.get(e);return t===void 0&&(t=JSON.stringify(e),RB.set(e,t)),t},Rce=({fieldConfig:e,valueMap:t,keyPath:n})=>{let{multiple:r,options:i}=e,a=Fj(i),o;r&&(o=nR(t,n).map(e=>t[e]));let s=Lce(i),c=r?`${n}|${s}|${JSON.stringify(o)}`:`${n}|${s}|${String(t[n])}`,l=e=>i.find(t=>t.value===e)?.label||e;return TI(Fce,c,()=>{if(r)return a?o.map(l):o;let e=t[n];return a?l(e):e},Ice)},zB=e=>{if(!e)return;let t=Object.values(e);if(t.some(e=>e.config?.multiple===!0))return!0;if(t.some(e=>e.config?.multiple===!1))return!1},BB=e=>{if(!e?.config)return;let{multiple:t}=e.config;if(typeof t==`boolean`)return t},VB=e=>{let t=A($H);return e.multiple??zB(e.media_libraries)??BB(e.media_library)??zB(t?.media_libraries)??BB(t?.media_library)??!1},zce=/^\d+$/,HB=e=>zce.test(e),UB=(e,t)=>{if(typeof e!=`number`)return NaN;if(!Number.isFinite(e))return e;let n=10**t;return Math.round(e*n)/n},Bce=/^(.*?)<([^>]+)>(.*)$/,WB=/\.\d+$/,GB=new Map,KB=(e,t)=>{if(e.length!==1)return!1;let[n]=e;return n.widget===t&&`root`in n&&n.root===!0},qB=e=>{let t=e.widget??`string`;return tL.includes(t)?VB(e):nL.includes(t)?!!e.multiple:!1},JB=e=>{let t=e.match(Bce);if(!t)return{cleanKey:e};let[,n,r,i]=t;return i?{cleanKey:e}:{cleanKey:n||``,typeName:r}},Vce=({field:e,key:t,keyPathArray:n,segmentIndex:r,pendingExplicitType:i,valueMap:a})=>{let{cleanKey:o,typeName:s}=JB(t),{widget:c=`text`}=e,l=s??i,u=HB(o),d=o===`*`;if((u||d)&&nL.includes(c))return{field:qB(e)?e:void 0,explicitType:l};let{field:f}=e,{fields:p}=e,{types:m,typeKey:h=`type`}=e;if(f){let e=u||d?n[r+1]:void 0;return{field:!e||f.name===e||f.widget===`object`&&`fields`in f&&f.fields?.some(t=>t.name===e)?f:void 0,explicitType:l}}if(p&&(u||d))return{field:e,explicitType:l};if(p&&!u&&o!==``)return{field:p.find(({name:e})=>e===o),explicitType:l};if(m&&(u||d)){let e=l??a[[n.slice(0,r).join(`.`),o,h].join(`.`)];return{field:m.find(({name:t})=>t===e),explicitType:d?void 0:l}}if(m&&t!==h&&o!==h&&o!==``){let e=l??a[[n.slice(0,r).join(`.`),h].join(`.`)];return{field:m.find(({name:t})=>t===e)?.fields?.find(({name:e})=>e===o),explicitType:void 0}}return{field:void 0,explicitType:l}},YB=e=>{let{collectionName:t,fileName:n=void 0,componentName:r=void 0,valueMap:i={},keyPath:a,isIndexFile:o=!1}=e,s=[t,n??``,r??``,a,o?`1`:`0`].join(`|`);if(GB.has(s))return GB.get(s);let c=HL(t),l=c&&n?YI(c,n):void 0;if(!c||n&&c?._type!==`entry`&&!l){GB.set(s,void 0);return}let{fields:u=[]}=l??c,d=o?pL(c):void 0,f=r?LB(r)?.fields??[]:d?.fields??u,p=a.split(`.`),m,h,g=!1;if(p.forEach((e,t)=>{if(t===0){let{cleanKey:t,typeName:n}=JB(e);m=f.find(({name:e})=>e===t),!m&&d?.fields&&(m=u.find(({name:e})=>e===t)),n&&(h=n)}else if(m){let n=Vce({field:m,key:e,keyPathArray:p,segmentIndex:t,pendingExplicitType:h,valueMap:i});m=n.field,h=n.explicitType}m&&`types`in m&&(g=!0)}),h&&m&&`types`in m){let{types:e}=m;m=e.find(({name:e})=>e===h)}return g||GB.set(s,m),m},XB=e=>{let t=e.widget??`string`;return eL.includes(t)?`builtin`:iL.has(t)?`custom`:`unknown`},ZB=({fieldConfig:{required:e=!0},locale:t})=>Array.isArray(e)?e.includes(t):!!e,QB=new Map,$B=({collectionName:e,fileName:t,valueMap:n={},keyPath:r,locale:i,transformations:a,isIndexFile:o=!1})=>{let s=YB({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:o}),c=n[r];if(c===void 0&&a?.length)return``;if(s?.widget===`datetime`&&(a?.some(({method:e})=>e===`date`)||(c=bR({locale:i,fieldConfig:s,currentValue:c}))),s?.widget===`relation`&&(c=DB({fieldConfig:s,valueMap:n,keyPath:r,locale:i})),s?.widget===`select`&&(c=Rce({fieldConfig:s,valueMap:n,keyPath:r})),s?.widget===`list`){let{fields:e}=s,{types:t}=s;e||t||(c=CL(i).format(nR(n,r).map(e=>n[e]).filter(e=>typeof e==`string`&&!!e)))}if(s?.widget===`number`){let{value_type:e=`int`}=s;if(e===`int`||e===`float`){let e=vL(i),t=QB.get(e);t||(t=Intl.NumberFormat(e),QB.set(e,t)),c=t.format(Number(c))}}return Array.isArray(c)&&(c=CL(i).format(c)),a?.length&&(c=KI({fieldConfig:s,value:c,transformations:a,locale:i})),String(c??``)},eV=({valueMap:e,locale:t,keyPath:n,keyPathPrefix:r,getFieldArgs:i})=>{let a=[`${n}.title`,`${n}.name`,...$L(e,r)].find(t=>{let n=e[t];if(!t.startsWith(r)||!(typeof n==`string`&&n.trim()||typeof n==`number`&&!Number.isNaN(n)))return!1;let a=YB({...i,keyPath:t});return!!a&&a.widget!==`hidden`});return a?$B({...i,keyPath:a,locale:t}):``},tV=({entry:e,locale:t,collectionName:n,key:r,resolveRef:i=!0})=>{let{slug:a,locales:o,commitAuthor:{name:s,login:c,email:l}={},commitDate:u}=e;if(r===`slug`)return a;if(r===`commit_author`)return s||c||l;if(r===`commit_date`)return u;let{content:d}=o[t]??{};if(d===void 0)return;let f=HL(n);if(f){if(i){let i=YB({collectionName:n,keyPath:r,isIndexFile:mL(f,e)});if(i?.widget===`relation`)return DB({fieldConfig:i,valueMap:d,keyPath:r,locale:t})}return d[r]}},nV=({valueMap:e,keyPath:t,isList:n,isCustomFieldType:r=!1})=>{let i=e[t];if(!n&&!r)return or(i)?aR(e,t)??i:i;let a=nR(e,t);return a.length?a.map(t=>e[t]).filter(e=>e!==void 0):r?or(i)?aR(e,t)??i:i:[]},Hce=/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m,rV=(e,{allowMarkdown:t=!1}={})=>(e=rr(e),t&&(e=FI(e)),e=gt(e,{ALLOWED_TAGS:t?[`strong`,`em`,`code`]:[]}),t||(e=FI(e)),e.trim()),iV=(e,{identifierField:t=`title`,useBody:n=!0}={})=>{let r=[t,`title`,`name`,`label`].find(t=>typeof e[t]==`string`&&!!e[t].trim());return r?e[r].trim():n&&typeof e.body==`string`?e.body.match(Hce)?.groups?.header??``:``},Uce=(e,t)=>{let{slug:n,entryPath:r,basePath:i,locales:a,commitDate:o,commitAuthor:s}=t;if(e===`slug`)return n;if(e===`locales`)return a.sort((e,t)=>e.localeCompare(t)).join(`, `);if(e===`dirname`){let e=r.replace(/[^/]+$/,``);if(i){let t=i.endsWith(`/`)?i:`${i}/`;e.startsWith(t)?e=e.slice(t.length):e.startsWith(i)&&(e=e.slice(i.length))}return FA(e)}if(e===`filename`)return r.split(`/`).pop().split(`.`).shift();if(e===`extension`)return r.split(`/`).pop().split(`.`).pop();if(e===`commit_date`)return o??``;if(e===`commit_author`)return s?.name||s?.login||s?.email},aV=(e,t)=>{let{content:n,collectionName:r,replaceSubContext:i,defaultLocale:a,fallbackSummary:o}=t,{value:s,transformations:c}=GI(e),l=s.replace(/^fields\./,``),u={collectionName:r,valueMap:n,keyPath:l},d=Uce(s,i),f=LI(c,e=>aV(e,t));if(d===void 0&&(d=f.some(({method:e})=>e===`date`||e===`ternary`)?n[l]:$B({...u,locale:a}),l===`title`&&!d&&(d=o)),d===void 0)return``;if(d instanceof Date&&!f.length){let{year:e,month:t,day:n}=mI({date:d});return`${e}-${t}-${n}`}return f.length&&(d=KI({fieldConfig:YB({...u}),value:d,transformations:f,locale:a})),String(d)},oV=new WeakMap,sV,cV=0,Wce=()=>{let e=A(JL);return e!==sV&&(sV=e,cV+=1),cV},Gce=(e,t,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{if(mL(e,t))return pL(e)?.label;let{_type:a,name:o,_i18n:{defaultLocale:s}}=e,{_file:{basePath:c}={},identifier_field:l=`title`,summary:u}=a===`entry`?e:{},{locales:d,slug:f,commitDate:p,commitAuthor:m}=t,{content:h={},path:g=``}=d[n??s]??Object.values(d)[0]??{},_=iV(h,{identifierField:l})||f.replaceAll(`-`,` `);if(!r||!u)return rV(_,{allowMarkdown:i});let v={content:h,collectionName:o,replaceSubContext:{slug:f,entryPath:g,basePath:c,locales:Object.keys(d),commitDate:p,commitAuthor:m},defaultLocale:s,fallbackSummary:_};return rV(dV(u,(e,t)=>aV(t,v)),{allowMarkdown:i})},lV=(e,t,n={})=>{let{locale:r,useTemplate:i=!1,allowMarkdown:a=!1}=n,o=oV.get(t);o||(o=new WeakMap,oV.set(t,o));let s=o.get(e);s||(s=new Map,o.set(e,s));let c=[r??``,i?`1`:`0`,a?`1`:`0`,Ud.current,Wce()].join(`
|
||
`),l=s.get(c);if(l!==void 0)return l;let u=Gce(e,t,n);return s.set(c,u),u},Kce=(e,t)=>sM.includes(e)?t[e]:void 0,qce=e=>{switch(e){case`uuid`:return Tf();case`uuid_short`:return Tf(`short`);case`uuid_shorter`:return Tf(`shorter`);default:return}},Jce=(e,t)=>{if(e!==`slug`)return;let{type:n,isIndexFile:r,currentSlug:i,content:a,identifierField:o}=t;return n===`preview_path`&&r?``:i??iV(a,{identifierField:o})},Yce=(e,t,n)=>{if(!t)return``;switch(e){case`dirname`:{let e=t.replace(n??``,``),r=e.lastIndexOf(`/`);return r>0?e.substring(0,r):``}case`filename`:return t.split(`/`).pop().split(`.`).shift();case`extension`:return t.split(`/`).pop().split(`.`).pop();default:return}},uV=(e,t)=>{let{type:n,content:r,entryFilePath:i,locale:a,dateTimeParts:o,basePath:s}=t,c=Kce(e,o);if(c!==void 0)return c;let l=Jce(e,t);if(l!==void 0)return l;let u=qce(e);if(u!==void 0)return u;if(n===`preview_path`&&e===`locale`)return a;if(n===`preview_path`||n===`media_folder`){let t=Yce(e,i,s);if(t!==void 0)return t;if(n===`media_folder`)return}return r[e.replace(/^fields\./,``)]},Xce=(e,t)=>{let{replaceSubContext:n,getFieldArgs:r}=t,{value:i,transformations:a}=GI(e),o=uV(i,n),s=LI(a,e=>String(uV(e,n)??``)),c=a.some(e=>e.args.defaultValue!==void 0),l=a.some(e=>[e.args.defaultValue,e.args.truthyValue,e.args.falsyValue].some(e=>typeof e==`string`&&e.includes(`{{`)&&!/^{{[^{}]+}}$/.test(e))),{type:u,locale:d}=n,f=()=>{if(u===`preview_path`)throw Error(`Unresolvable template tag in preview path: ${i}`)};return o===void 0&&!c?(f(),Tf(`short`)):(o===void 0||o===``)&&c&&l?(f(),`${Tf(`short`)}-${Tf(`short`)}`):(s.length&&(o=KI({fieldConfig:YB({...r,keyPath:i}),value:o,transformations:s,locale:d})),o=Mse(String(o)),u?o:OI(o,{locale:d,maxLength:1/0}))},dV=(e,t)=>{let n=``,r=0;for(;r<e.length;){let i=e.indexOf(`{{`,r);if(i===-1){n+=e.slice(r);break}n+=e.slice(r,i);let a=i+2,o=!1;for(;a<e.length;){let s=e[a],c=e[a+1];if(s===`'`&&!o?o=!0:s===`'`&&o&&(o=!1),!o&&s===`}`&&c===`}`){let o=a,s=e[i-1]===`'`,c=e[o+2]===`'`,l=e[i-2],u=e[o+3],d=e.slice(i+2,o),f=s&&c&&[`(`,`,`,`[`,`|`].includes(l??``)&&[`)`,`,`,`]`].includes(u??``);n+=d?f?e.slice(i,o+2):t(e.slice(i,o+2),d):e.slice(i,o+2),r=o+2;break}a+=1}if(a>=e.length){n+=e.slice(i);break}}return n},fV=e=>iM.test(e),Zce=(e,t)=>pB(e).map(e=>t?e.locales[t]?.slug:e.slug).filter(Boolean),pV=(e,t)=>{let{collection:n,content:r,currentSlug:i,locale:a,dateTimeParts:o,isIndexFile:s=!1}=t,{_type:c,name:l}=n,{identifier_field:u=`title`,slug_length:d=void 0,_file:{basePath:f}={}}=c===`entry`?n:{},p=A($H)?.slug,m=d??p?.maxlength,h=p?.timezone===`local`?void 0:`UTC`,g={replaceSubContext:{...t,dateTimeParts:o??mI({timeZone:h}),identifierField:u,basePath:f},getFieldArgs:{collectionName:l,keyPath:``,valueMap:r,isIndexFile:s}},_=dV(e,(e,t)=>Xce(t,g)).trim();return i?_:(typeof m==`number`&&(_=PA(_,m,{ellipsis:``}).replace(/-$/,``)),bz(_,Zce(l,a)))},mV=[],hV=e=>e.includes(`{{media_folder}}`)||e.includes(`{{public_folder}}`),gV=(e,{globalMediaFolder:t,globalPublicFolder:n})=>e.trim().replace(`{{media_folder}}`,`/${t}`).replace(`{{public_folder}}`,`/${n}`).replace(`//`,`/`),Qce=({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i=!1,mediaFolder:a,publicFolder:o,baseFolder:s,globalFolders:c,label:l,icon:u,isAssetCollection:d=!1})=>{if(hV(a)){if(!c)return;a=gV(a,c)}if(o===void 0)o=a;else if(hV(o)){if(!c)return;o=gV(o,c)}a=a.replace(/^\.(?:\/|$)/,``);let f=!a.startsWith(`/`);return{collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i,internalPath:FA(f?s??``:a),internalSubPath:f?FA(a):void 0,publicPath:/^($|[.@])/.test(o)?o:`/${FA(o)}`,entryRelative:f,hasTemplateTags:fV(a),label:l,icon:u,isAssetCollection:d}},_V=e=>{if(e.mediaFolder===void 0)return;let t=Qce(e);if(!t)return;let{globalMediaFolder:n,globalPublicFolder:r}=e.globalFolders??{};!t.entryRelative&&t.internalPath===n&&t.publicPath===r||mV.push(t)},vV=({collectionName:e,files:t,globalFolders:n})=>{JI(t).forEach(t=>{let{name:r,file:i,media_folder:a,public_folder:o}=t;_V({collectionName:e,fileName:r,mediaFolder:a,publicFolder:o,baseFolder:qj(i).dirname,globalFolders:n})})},$ce=({fieldMediaFolders:e,validCollections:t,globalFolders:n})=>{e.forEach(({fieldConfig:e,context:r})=>{let{collection:i,collectionFile:a,componentName:o,typedKeyPath:s,isIndexFile:c}=r;!(i&&(i.name===`_singletons`||t.some(e=>e.name===i.name)))&&!o||_V({collectionName:i?.name,fileName:a?.name,componentName:o,typedKeyPath:s,isIndexFile:c,mediaFolder:e.media_folder,publicFolder:e.public_folder,baseFolder:i&&`folder`in i?i.folder:void 0,globalFolders:n})})},ele=({assetCollections:e,globalFolders:t})=>{e.forEach(e=>{let{name:n,label:r=n,icon:i,media_folder:a,public_folder:o}=e;a!==void 0&&_V({collectionName:`assets:${n}`,mediaFolder:`/${FA(a)}`,publicFolder:o,globalFolders:t,label:r,icon:i,isAssetCollection:!0})})},tle=(e,t=[])=>{mV.length=0;let{media_folder:n,public_folder:r,collections:i,singletons:a,asset_collections:o}=e,s=n!==void 0,c=s?FA(n).replace(/^\.$/,``):``,l=s?r?`/${FA(r)}`.replace(/^\/@/,`@`):`/${c}`:``,u={collectionName:void 0,internalPath:void 0,internalSubPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1,label:void 0,icon:void 0,isAssetCollection:!1},d=s?{...u,internalPath:c,publicPath:l}:void 0,f=s?{globalMediaFolder:c,globalPublicFolder:l}:void 0,p=zL({collections:i});p.forEach(e=>{let{name:t,files:n,folder:r,path:i,media_folder:a,public_folder:o}=e;_V({collectionName:t,mediaFolder:s&&a===void 0&&i!==void 0?``:a,publicFolder:o,baseFolder:r,entryPath:i,globalFolders:f}),n?.length&&vV({collectionName:t,files:n,globalFolders:f})}),a?.length&&vV({collectionName:`_singletons`,files:a,globalFolders:f}),$ce({fieldMediaFolders:t,validCollections:p,globalFolders:f}),mV.sort((e,t)=>RA(e.internalPath,t.internalPath));let m=[];return d&&m.push(d),o?.length&&ele({assetCollections:o,globalFolders:f}),m.push(...mV),m.length&&m.unshift(u),m},nle=({collection:e,file:t})=>{let n=FA(t.file);if(!n.includes(`{{locale}}`))return{_default:n};let r=NL(e,t);return Object.fromEntries(r.allLocales.map(e=>[e,wL({_i18n:r,locale:e,path:n})]))},yV=(e,t)=>{if(qI(t))return{collectionName:e.name,fileName:t.name,filePathMap:nle({collection:e,file:t})}},bV=(e,t)=>RA(Object.values(e.filePathMap??{})[0],Object.values(t.filePathMap??{})[0]),rle=({collections:e})=>zL({collections:e,type:`entry`}).map(e=>{let{name:t,folder:n}=e,r=FA(n),{allLocales:i,defaultLocale:a,omitDefaultLocaleFromFilePath:o,structureMap:{i18nMultiRootFolder:s}}=NL(e);return{collectionName:t,folderPath:r,folderPathMap:Object.fromEntries(i.map(e=>[e,s?o&&e===a?r:`${e}/${r}`:r]))}}).sort((e,t)=>RA(e.folderPath,t.folderPath)),ile=({collections:e})=>zL({collections:e,type:`file`}).flatMap(e=>(e.files??[]).map(t=>yV(e,t))).filter(e=>!!e).sort(bV),ale=({singletons:e})=>{let t=Array.isArray(e)?JI(e):[];if(!t.length)return[];let n={name:`_singletons`,files:t};return t.map(e=>yV(n,e)).filter(e=>!!e).sort(bV)},ole=e=>[...rle(e),...ile(e),...ale(e)],xV=`${Pz}/schema/sveltia-cms.json`,sle=[`text/yaml`,`application/yaml`,`application/toml`,`application/json`],cle=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,SV=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(cle);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function lle(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function ule(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
||
`,e===t&&(i+=` `.repeat(a+n+2),i+=`^
|
||
`))}return i}var CV=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=lle(t.toml,t.ptr),i=ule(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function wV(e,t=0){let n=e.indexOf(`
|
||
`,t);return e.charCodeAt(n-1)===13&&n--,n}function TV(e){for(;e.p<e.s.length;e.p++){let t=e.s.charCodeAt(e.p);if(t===10)break;if(t===13&&e.s.charCodeAt(e.p+1)===10){e.p++;break}if(t<32&&t!==9||t===127)throw new CV(`control characters are not allowed in comments`,{toml:e.s,ptr:e.p})}}function EV(e,t,n){let r;for(;;){for(;(r=e.s.charCodeAt(e.p))===32||r===9||!t&&(r===10||r===13&&e.s.charCodeAt(e.p+1)===10);)e.p++;if(n||r!==35)break;TV(e)}}function dle(e,t,n){let r=e.p;if(!n){r=wV(e.s,r),e.p=r<0?e.s.length:r;return}for(;e.p<e.s.length;e.p++){let r=e.s.charCodeAt(e.p);if(r===35)TV(e);else if(r===n||r===t)return}throw new CV(`cannot find end of structure`,{toml:e.s,ptr:r})}
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
var fle=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ple=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,mle=/^[+-]?0[0-9_]/;function DV(e){let t=e.p,n=e.s.charCodeAt(e.p++),r=n,i=n===39,a=n===e.s.charCodeAt(e.p)&&n===e.s.charCodeAt(e.p+1);a&&((n=e.s.charCodeAt(e.p+=2))===10?e.p++:n===13&&e.s.charCodeAt(e.p+1)===10&&(e.p+=2));let o=``,s=e.p,c=0;for(;e.p<e.s.length;e.p++)if(n=e.s.charCodeAt(e.p),a&&(n===10||n===13&&e.s.charCodeAt(e.p+1)===10))c&&=3;else if(n<32&&n!==9||n===127)throw new CV(`control characters are not allowed in strings`,{toml:e.s,ptr:e.p});else if((!c||c===3)&&n===r&&(!a||e.s.charCodeAt(e.p+1)===r&&e.s.charCodeAt(e.p+2)===r))return a&&(e.s.charCodeAt(e.p+3)===r&&e.p++,e.s.charCodeAt(e.p+3)===r&&e.p++),c||(o+=e.s.slice(s,e.p)),e.p+=a?3:1,o;else if(!c)!i&&n===92&&(o+=e.s.slice(s,s=e.p),c=1);else if(c===1){if(n===120||n===117||n===85){let t=0,r=n===120?2:n===117?4:8;for(let n=0;n<r;n++,e.p++){let n=e.s.charCodeAt(e.p+1),r=n>=48&&n<=57?n-48:n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:-1;if(r<0)throw new CV(`invalid non-hex character in unicode escape`,{toml:e.s,ptr:e.p+1});t=t<<4|r}if(t<0||t>1114111||t>=55296&&t<=57343)throw new CV(`invalid unicode escape`,{toml:e.s,ptr:e.p});o+=String.fromCodePoint(t),s=e.p+1,c=0}else if(n===32||n===9)c=2;else{if(n===98)o+=`\b`;else if(n===116)o+=` `;else if(n===110)o+=`
|
||
`;else if(n===102)o+=`\f`;else if(n===114)o+=`\r`;else if(n===101)o+=`\x1B`;else if(n===34)o+=`"`;else if(n===92)o+=`\\`;else throw new CV(`unrecognized escape sequence`,{toml:e.s,ptr:e.p});s=e.p+1,c=0}}else if(n!==32&&n!==9){if(c===2)throw new CV(`invalid escape: only line-ending whitespace may be escaped`,{toml:e.s,ptr:s});c=+(!i&&n===92),s=e.p}throw new CV(`unfinished string`,{toml:e.s,ptr:t})}function hle(e,t,n){let r=e.s.slice(t,n),i=r.indexOf(`#`);return i>0&&(TV({s:r,p:i,d:0}),r=r.slice(0,i)),r.trimEnd()}function gle(e,t,n){let r=e.p,i={toml:e.s,ptr:r};dle(e,44,n);let a=hle(e,r,e.p);if(!a)throw new CV(`incomplete declaration: value expected`,i);if(a===`-inf`)return-1/0;if(a===`inf`||a===`+inf`)return 1/0;if(a===`nan`||a===`+nan`||a===`-nan`)return NaN;if(a===`-0`)return t?0n:0;let o=fle.test(a);if(o||ple.test(a)){if(mle.test(a))throw new CV(`leading zeroes are not allowed`,i);a=a.replace(/_/g,``);let e=+a;if(isNaN(e))throw new CV(`invalid number`,i);if(o){if((o=!Number.isSafeInteger(e))&&!t)throw new CV(`integer value cannot be represented losslessly`,i);(o||t===!0)&&(e=BigInt(a))}return e}let s=new SV(a);if(!s.isValid())throw new CV(`invalid value`,i);return s}
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function OV(e,t,n){let r=e.p,i=e.s.charCodeAt(r);if(i===91||i===123){if(!e.d--)throw new CV(`document contains excessively nested structures. aborting.`,{toml:e.s,ptr:r});let t=i===91?yle(e,n):vle(e,n);return e.d++,t}if(i===34||i===39)return DV(e);if(i===116){if(e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)throw new CV(`invalid value`,{toml:e.s,ptr:r});return e.p++,!0}if(i===102){if(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)throw new CV(`invalid value`,{toml:e.s,ptr:r});return e.p++,!1}return gle(e,n,t)}
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
var _le=/^[a-zA-Z0-9-_]+[ \t]*$/;function kV(e,t=`=`){let n=e.p,r=n-1,i=[],a=e.s.indexOf(t,n);if(a<0)throw new CV(`incomplete key-value: cannot find end of key`,{toml:e.s,ptr:n});do{let o=e.s.charCodeAt(e.p=++r);if(o!==32&&o!==9){if(o===34||o===39){if(o===e.s.charCodeAt(e.p+1)&&o===e.s.charCodeAt(e.p+2))throw new CV(`multiline strings are not allowed in keys`,{toml:e.s,ptr:e.p});let s=DV(e);r=e.s.indexOf(`.`,e.p);let c=e.s.slice(e.p,r<0||r>a?a:r),l=wV(c);if(l>-1)throw new CV(`newlines are not allowed in keys`,{toml:e.s,ptr:l});if(c.trimStart())throw new CV(`found extra tokens after the string part`,{toml:e.s,ptr:e.p});if(a<e.p&&(a=e.s.indexOf(t,e.p),a<0))throw new CV(`incomplete key-value: cannot find end of key`,{toml:e.s,ptr:n});i.push(s)}else{r=e.s.indexOf(`.`,e.p);let t=e.s.slice(e.p,r<0||r>a?a:r);if(!_le.test(t))throw new CV(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e.s,ptr:e.p});i.push(t.trimEnd())}}}while(r+1&&r<a);return e.p=a+1,EV(e,!0,!0),i}function vle(e,t){let n={},r=new Set,i;for(e.p++;e.p<e.s.length;){if(EV(e),(i=e.s.charCodeAt(e.p))===125)return e.p++,n;let a,o=n,s=!1,c=e.p,l=kV(e);for(let t=0;t<l.length;t++){if(t&&(o=s?o[a]:o[a]={}),a=l[t],(s=Object.hasOwn(o,a))&&(typeof o[a]!=`object`||r.has(o[a])))throw new CV(`trying to redefine an already defined value`,{toml:e.s,ptr:c});!s&&a===`__proto__`&&Object.defineProperty(o,a,{enumerable:!0,configurable:!0,writable:!0})}if(s)throw new CV(`trying to redefine an already defined value`,{toml:e.s,ptr:e.p});let u=OV(e,125,t);if(r.add(o[a]=u),EV(e),(i=e.s.charCodeAt(e.p++))===125)return n;if(i!==44)throw new CV(`expected comma or end of structure`,{toml:e.s,ptr:e.p-1})}throw new CV(`unfinished table encountered`,{toml:e.s,ptr:e.p})}function yle(e,t){let n=[],r;for(e.p++;e.p<e.s.length;){if(EV(e),(r=e.s.charCodeAt(e.p))===93)return e.p++,n;if(n.push(OV(e,93,t)),EV(e),(r=e.s.charCodeAt(e.p++))===93)return n;if(r!==44)throw new CV(`expected comma or end of structure`,{toml:e.s,ptr:e.p-1})}throw new CV(`unfinished array encountered`,{toml:e.s,ptr:e.p})}
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
function AV(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&(r!==1||c.t!==3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function ble(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={s:e,p:0,d:t},i={},a={},o,s=i,c=a;for(EV(r);r.p<e.length;){if(e.charCodeAt(r.p)===91){let t=e.charCodeAt(++r.p)===91;o=r.p+=+t;let n=kV(r,`]`);if(t){if(e.charCodeAt(r.p-1)!==93)throw new CV(`expected end of table declaration`,{toml:e,ptr:r.p-1});r.p++}let l=AV(n,i,a,t?2:1);if(!l)throw new CV(`trying to redefine an already defined table or value`,{toml:e,ptr:o});c=l[2],s=l[1]}else{o=r.p;let t=AV(kV(r),s,c,0);if(!t)throw new CV(`trying to redefine an already defined table or value`,{toml:e,ptr:o});t[1][t[0]]=OV(r,void 0,n)}if(EV(r,!0),r.p<e.length&&(o=e.charCodeAt(r.p))!==10&&o!==13)throw new CV(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:r.p});EV(r)}return i}
|
||
/*!
|
||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*
|
||
* Redistribution and use in source and binary forms, with or without
|
||
* modification, are permitted provided that the following conditions are met:
|
||
*
|
||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||
* list of conditions and the following disclaimer.
|
||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||
* this list of conditions and the following disclaimer in the
|
||
* documentation and/or other materials provided with the distribution.
|
||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||
* may be used to endorse or promote products derived from this software without
|
||
* specific prior written permission.
|
||
*
|
||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/
|
||
var jV=/^[a-z0-9-_]+$/i;function MV(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(typeof e?.getUTCDate==`function`&&e instanceof Date)return`date`;if(globalThis.Temporal&&typeof e?.since==`function`&&(e instanceof Temporal.Instant||e instanceof Temporal.PlainDate||e instanceof Temporal.PlainDateTime||e instanceof Temporal.PlainTime||e instanceof Temporal.ZonedDateTime))return`temporal`}return t}function xle(e){for(let t=0;t<e.length;t++)if(MV(e[t])!==`object`)return!1;return e.length!=0}function NV(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function Sle(e){return e.toString({calendarName:`never`,timeZoneName:`never`})}function PV(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);switch(t){case`number`:if(isNaN(e))return`nan`;if(e===1/0)return`inf`;if(e===-1/0)return`-inf`;if(Number.isInteger(e)&&(r||!Number.isSafeInteger(e)))return e.toFixed(1);case`bigint`:case`boolean`:return e.toString();case`string`:return NV(e);case`date`:if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString();case`object`:return Cle(e,n,r);case`array`:return wle(e,n,r);case`temporal`:return Sle(e)}}function Cle(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=jV.test(o)?o:NV(o),i+=` = `,i+=PV(e[o],MV(e[o]),t-1,n)}return i+` }`}function wle(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=PV(e[i],MV(e[i]),t-1,n)}return r+` ]`}function Tle(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
|
||
`}[[${t}]]\n`,i+=FV(0,e[a],t,n,r);return i}function FV(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=MV(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=jV.test(c)?c:NV(c);if(e===`array`&&xle(t[c]))o+=(o&&`
|
||
`)+Tle(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
|
||
`)+FV(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=PV(t[c],e,r,i),a+=`
|
||
`}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Ele(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(MV(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=FV(0,e,``,t,n);return r[r.length-1]===`
|
||
`?r:r+`
|
||
`}var IV=e=>JSON.parse(e),LV=e=>sr(ble(e)),RV=(e,t)=>lI(e,t),Dle=e=>e.startsWith(`+++`)?`toml-frontmatter`:e.startsWith(`{`)?`json-frontmatter`:`yaml-frontmatter`,Ole=new Map,kle=({collection:e,collectionFile:t,format:n,text:r})=>{let{format:i,fmDelimiters:a,bodyField:{key:o=`body`,inline:s=!1}={}}=(t??e)._file,[c,l]=(i===`frontmatter`?EL({format:n,delimiter:a}):a)??[`---`,`---`],u=NA(c),d=NA(l),f=wI(Ole,`${u}|${d}`,()=>RegExp(`^${u}\n(?:(?<head>[\\s\\S]*?))\n${d}(?:\n(?<body>[\\s\\S]*))?$`,`s`)),{head:p,body:m}=r.match(f)?.groups??{};if(!p&&!m)return{[o]:r};let h={};return n===`yaml-frontmatter`&&(h=RV(p)),n===`toml-frontmatter`&&(h=LV(p)),n===`json-frontmatter`&&(h=IV(`{${p}}`)),(!h||typeof h!=`object`||Array.isArray(h))&&(h={}),{...h,...!s&&!(o in h)?{[o]:m}:{}}},Ale=async({text:e=``,path:t,folder:{collectionName:n,fileName:r}})=>{let i=HL(n),a=i&&r?YI(i,r):void 0;if(!i)throw Error(`Collection not found`);if(r&&!a)throw Error(`Collection file not found`);e=e.trim().replace(/\r\n?/g,`
|
||
`);let{_file:{format:o}}=a??i,s=aL.get(o)?.parser;if(s)return s(e);if(o===`raw`)return{body:e};try{if(o===`yaml`||o===`yml`)return RV(e);if(o===`toml`)return LV(e);if(o===`json`)return IV(e);if(o===`frontmatter`&&(o=Dle(e)),_L.includes(o))return kle({collection:i,collectionFile:a,format:o,text:e})}catch(e){throw Error(`${t} could not be parsed due to ${e.name}: ${e.message}`)}throw Error(`${t} could not be parsed due to an unknown format: ${o}`)},zV=ao({isLocalHost:!1,isLocalBackendSupported:!1,isBrave:!1,isMacOS:!1,isSmallScreen:!1,isMediumScreen:!1,isLargeScreen:!1,hasMouse:!0}),jle=()=>{let{location:{hostname:e},navigator:{userAgentData:t,platform:n},matchMedia:r}=globalThis;zV.isLocalHost=e===`127.0.0.1`||/^(.+\.)?localhost$/.test(e),zV.isLocalBackendSupported=`showDirectoryPicker`in globalThis,zV.isBrave=t?.brands.some(({brand:e})=>e===`Brave`)??!1,zV.isMacOS=t?.platform===`macOS`||n.startsWith(`Mac`);let i=r(`(width < 768px)`),a=r(`(768px <= width < 1024px)`),o=r(`(1024px <= width)`),s=r(`(pointer: fine)`),c=()=>{zV.isSmallScreen=i.matches},l=()=>{zV.isMediumScreen=a.matches},u=()=>{zV.isLargeScreen=o.matches},d=()=>{zV.hasMouse=s.matches};c(),l(),u(),d(),i.addEventListener(`change`,c),a.addEventListener(`change`,l),o.addEventListener(`change`,u),s.addEventListener(`change`,d)},BV=(e,t=globalThis.window?.location?.origin??globalThis.location?.origin??`https://localhost`)=>{try{let{hostname:n,protocol:r}=new URL(e,t);return r===`https:`||[`localhost`,`127.0.0.1`,`[::1]`].includes(n)}catch{return!1}},VV=async(e,t={},{responseType:n=`json`,refreshAccessToken:r=void 0,retries:i=1}={})=>{let a;if(t.cache=`no-cache`,t.headers=new Headers(t.headers),t.headers.has(`Authorization`)&&!BV(e))throw Error(`Refusing to send credentials over an insecure connection`);n===`json`&&t.headers.set(`Accept`,`application/json`),or(t.body)&&(t.headers.set(`Content-Type`,`application/json`),t.body=JSON.stringify(t.body));try{a=await fetch(e,t)}catch(e){throw Error(`Failed to send the request`,{cause:e})}if(n===`raw`)return a;let{ok:o,status:s}=a,c;try{if(o&&n===`blob`)return a.blob();if(o&&n===`text`)return a.text();c=await a.json()}catch(e){throw Error(`Failed to parse the response`,{cause:e})}if(o&&!(e.endsWith(`/graphql`)&&or(c)&&c.errors))return c;if(s===502&&i>0)return await vf(1e3),VV(e,t,{responseType:n,refreshAccessToken:r,retries:i-1});if(s===401&&r){let[i]=t.headers.get(`Authorization`)?.split(` `)??[`token`],{token:a}=await r();return t.headers.set(`Authorization`,`${i} ${a}`),VV(e,t,{responseType:n})}if(!or(c))throw Error(`Server responded with an error`,{cause:{status:s}});let l=``;throw typeof c.error==`string`&&(l=c.error),typeof c.message==`string`&&(l=c.message),Array.isArray(c.errors)&&(typeof c.errors[0]==`string`&&(l=c.errors.join(`, `)),or(c.errors[0])&&typeof c.errors[0].message==`string`&&(l=c.errors.map(e=>e.message).join(`, `))),Error(`Server responded with an error`,{cause:{status:s,message:l}})},Mle=`https://sveltiacms.app/en/docs/api/initialization#providing-a-full-configuration`,Nle=`https://sveltiacms.app/en/docs/config-basics#validation-and-autocomplete`,Ple=async({href:e,type:t=`application/yaml`},{manualInit:n=!1,showSchemaTip:r}={})=>{let i;if(!sle.includes(t))throw Error(Z(`config.error.parse_failed`),{cause:Error(Z(`config.error.parse_failed_unsupported_type`))});let a=FB(Z(n?`config.error.fetch_failed_with_manual_init`:`config.error.fetch_failed`),Mle);try{let t=new URL(e,window.location.href);t.searchParams.set(`_`,Date.now().toString()),i=await fetch(t)}catch(e){throw Error(a,{cause:e})}let{ok:o,status:s}=i;if(!o)throw Error(a,{cause:Error(Z(`config.error.fetch_failed_not_ok`,{values:{status:s}}))});let c=!1,l;try{if(t===`application/json`)l=await i.json(),or(l)&&l.$schema!==xV&&(c=!0);else{let e=await i.text();t===`application/toml`?(l=LV(e),e.includes(`#:schema ${xV}`)||(c=!0)):(l=RV(e,{merge:!0,maxAliasCount:-1}),e.includes(`# yaml-language-server: $schema=${xV}`)||(c=!0))}}catch(e){throw Error(Z(`config.error.parse_failed`),{cause:e})}if(!or(l))throw Error(Z(`config.error.parse_failed`),{cause:Error(Z(`config.error.parse_failed_invalid_object`))});return r&&c&&console.info(Z(`config.schema_tip`,{values:{link:Nle}})),l},Fle=e=>{if(e.endsWith(`/`))return`${e}config.yml`;let t=e.split(`/`);return t.pop()?.includes(`.`)?`${t.join(`/`)}/config.yml`:`${e}/config.yml`},Ile=e=>{let{origin:t}=window.location;return e.every(({href:e})=>BV(e,t))},HV=async({manualInit:e=!1}={})=>{let t=[...document.querySelectorAll(`link[rel="cms-config-url"]`)].map(({href:e,type:t})=>({href:e,type:t}));if(t.length||t.push({href:Fle(window.location.pathname)}),!Ile(t))throw Error(Z(`config.error.insecure_urls`,{values:{count:t.length}}));let n=zV.isLocalHost&&!e&&t.length===1,r=await Promise.all(t.map(t=>Ple(t,{manualInit:e,showSchemaTip:n})));return r.length===1?r[0]:vM.default.all(r)},Lle=`https://sveltiacms.app/en/docs/troubleshooting#using-proper-naming-conventions`,Rle=`https://sveltiacms.app/en/docs/migration/netlify-decap-cms#features-not-to-be-implemented`,UV=({type:e=`error`,strKey:t,values:n={},extraStrKey:r,context:i={},collectors:a})=>{let{collection:o,collectionFile:s,componentName:c,typedKeyPath:l}=i,{errors:u,warnings:d}=a,f=[];o&&f.push(Z(`config.error_locator.collection`,{values:{collection:o.label_singular||o.label||o.name}})),s&&f.push(Z(`config.error_locator.file`,{values:{file:s.label||s.name}})),c&&f.push(Z(`config.error_locator.component`,{values:{component:c}})),l&&f.push(Z(`config.error_locator.field`,{values:{field:l}}));let p=e===`error`?u:d,m=Ud.current,h=f.length?`${CL(m).format(f)}: `:``,g=Z(`config.${e}.${t}`,{values:n});t===`invalid_field_name`&&(g=FB(g,Lle));let _=r?Z(`config.${r}`,{values:{link:r===`compatibility_link`?Rle:void 0}}):``;p.add(`${h}${g}${_?` ${_}`:``}`)},WV=({UNSUPPORTED_OPTIONS:e,config:t,context:n,collectors:r})=>{e.forEach(({type:e=`error`,prop:i,newProp:a,value:o,strKey:s=`unsupported_deprecated_option`})=>{i in t&&(o===void 0||t[i]===o)&&UV({type:e,strKey:s,values:{prop:i,newProp:a},extraStrKey:`compatibility_link`,context:n,collectors:r})})},zle=/^[^\s.*:<>]+$/,Ble=e=>zle.test(e),GV=({name:e,index:t,nameCounts:n,strKeyBase:r,context:i,collectors:a,required:o=!1})=>{if(typeof e!=`string`||!e){if(e===``||o&&e===void 0){let e=String(t+1);UV({strKey:`missing_${r}`,context:i,values:{count:e},collectors:a})}return!1}return Ble(e)?n[e]===1?(UV({strKey:`duplicate_${r}`,context:i,values:{name:e},collectors:a}),!1):(n[e]=(n[e]??0)+1,!0):(UV({strKey:`invalid_${r}`,context:i,values:{name:e},collectors:a}),!1)},Vle=[{type:`warning`,prop:`use_graphql`,strKey:`unsupported_ignored_option`}],Hle=`https://sveltiacms.app/en/docs/migration/netlify-decap-cms#features-not-to-be-implemented`,Ule=`https://sveltiacms.app/en/docs/backends#supported-backends`,Wle=`https://sveltiacms.app/en/docs/backends/BACKEND_NAME#authentication`,KV=`https://sveltiacms.app/en/docs/workflows/open`,Gle=(e,t)=>{let{backend:n}=e,{errors:r,warnings:i}=t;if(!or(n)){r.add(Z(`config.error.missing_backend`));return}let{name:a}=n;if(!a){r.add(Z(`config.error.missing_backend_name`));return}if(!$J.includes(a)){let e=QJ[a],t=e?e.deprecated?`deprecated`:`known`:`custom`,n=e?.label,i=FB(Z(`config.error.unsupported_${t}_backend`,{values:{name:n}}),Hle),o=FB(Z(`config.error.unsupported_backend_suggestion`),Ule);r.add(`${i} ${o}`);return}if(a in eY){let{repo:o,automatic_deployments:s,auth_methods:c,auth_type:l,app_id:u,open_authoring:d,auth_scope:f}=n;Array.isArray(c)&&!c.length&&r.add(Z(`config.error.no_auth_methods`));let p=!c||c.includes(`token`),m=Wle.replace(`BACKEND_NAME`,a);o===void 0?r.add(Z(`config.error.missing_repository`)):(typeof o!=`string`||!/^[^/:]+(?:\/[^/:]+)+$/.test(o))&&r.add(Z(`config.error.invalid_repository`)),l===`implicit`&&r.add(FB(Z(`config.error.oauth_implicit_flow`),m)),a===`github`&&l===`pkce`&&r.add(FB(Z(`config.error.github_pkce_unsupported`),m)),a===`gitlab`&&l===`pkce`&&!u&&r.add(Z(`config.error.oauth_no_app_id`)),d&&(e.publish_mode!==`editorial_workflow`&&r.add(FB(Z(`config.error.open_authoring_no_workflow`),KV)),a!==`github`&&i.add(Z(`config.warning.open_authoring_unsupported_backend`)),f===void 0&&i.add(`The \`open_authoring\` option is enabled without \`auth_scope\`, so contributors are asked for access to all their repositories, including private ones. Set \`auth_scope: public_repo\` if your repository is public, or \`auth_scope: repo\` to confirm the broader scope is needed. ${KV}`)),a===`gitea`&&!u&&(p?i.add(Z(`config.warning.oauth_no_app_id`)):r.add(Z(`config.error.oauth_no_app_id`))),s!==void 0&&uL(`automatic_deployments`),WV({UNSUPPORTED_OPTIONS:Vle,config:n,context:{cmsConfig:e},collectors:t})}},Kle=[`code`,`markdown`,`richtext`,`text`],qV=[`yaml`,`toml`,`json`],JV=(e,t,n=[])=>{if(!e||!t||t===`raw`)return!1;let r=t.endsWith(`-frontmatter`)||t===`frontmatter`;if(r&&n.length===1){let[{name:e,widget:t=`string`}]=n;if(e===`body`&&Kle.includes(t))return!1}let i=e===`yml`?`yaml`:e,a=t===`yml`?`yaml`:t;if(hL.includes(i))return!r;if(a.endsWith(`-frontmatter`)){let e=a.replace(`-frontmatter`,``);return!gL.includes(i)&&i!==e}return a===`frontmatter`?!hoe.includes(i):qV.includes(a)?qV.includes(i)&&i!==a:!1},qle=/<[^>]+>$/,Jle=e=>{let{field:t}=e,{fields:n}=e,{types:r,typeKey:i=`type`}=e;return t?[t]:n||(r?[...r.flatMap(({fields:e=[]})=>e),{name:i}]:[])},YV=(e,t)=>{let n=e,r;return t.split(`.`).every(e=>{let t=e.replace(qle,``);return!t||t===`*`||HB(t)?!0:(r&&(n=Jle(r)),r=n.find(({name:e})=>e===t),!!r)})&&!!r},Yle=/{{(?:year|month|day|hour|minute|second)}}/,Xle=`fields.`,Zle=/\|\s*default\s*\(/,Qle=({pathTemplate:e,dateFieldName:t,fields:n,context:r,collectors:i})=>{Yle.test(e)&&((t?n.some(({widget:e,name:n})=>e===`datetime`&&n===t):n.some(({widget:e})=>e===`datetime`))||UV({type:`warning`,strKey:t?`preview_path_date_field_not_found`:`preview_path_no_date_field`,values:{name:t},context:r,collectors:i}))},$le=({pathTemplate:e,fields:t,context:n,collectors:r})=>{[...e.matchAll(aM)].forEach(([,e])=>{let i=e.split(`|`)[0].trim();!i.startsWith(Xle)||Zle.test(e)||YV(t,i.slice(7))||UV({type:`warning`,strKey:`preview_path_field_not_found`,values:{name:i},context:n,collectors:r})})},XV=({pathTemplate:e,dateFieldName:t,fields:n,context:r,collectors:i})=>{e&&(Qle({pathTemplate:e,dateFieldName:t,fields:n,context:r,collectors:i}),$le({pathTemplate:e,fields:n,context:r,collectors:i}))},eue=[{prop:`dateFormat`,newProp:`date_format`},{prop:`timeFormat`,newProp:`time_format`},{prop:`pickerUtc`,newProp:`picker_utc`}],tue=e=>{try{return Intl.DateTimeFormat(`en-US`,{timeZone:e}),!0}catch{return!1}},nue=e=>{let{config:t,context:n,collectors:r}=e,{picker_utc:i,input_timezone:a,output_utc:o}=t;i!==void 0&&(a!==void 0||o!==void 0)&&UV({type:`warning`,strKey:`conflicting_timezone_options`,context:n,collectors:r}),UI(a)&&!tue(a)&&UV({strKey:`invalid_timezone`,values:{timeZone:a},context:n,collectors:r})},rue=e=>{WV({...e,UNSUPPORTED_OPTIONS:eue}),nue(e)},iue=[`raster_image`,...Lz,...Bz],aue=({key:e,options:t,context:n,collectors:r})=>{let{quality:i}=t,a={values:{key:e},context:n,collectors:r};i!==void 0&&!(Number.isSafeInteger(i)&&i>=0&&i<=100)&&UV({...a,strKey:`invalid_transformation_quality`}),[`width`,`height`].forEach(n=>{let r=t[n];r!==void 0&&!(Number.isSafeInteger(r)&&r>0)&&UV({...a,strKey:`invalid_transformation_size`,values:{key:e,prop:n}})})},oue=({transformations:e,context:t,collectors:n})=>{or(e)&&Object.entries(e).forEach(([e,r])=>{if(!iue.includes(e)){UV({strKey:`invalid_transformation_key`,values:{key:e},context:t,collectors:n});return}!or(r)||Bz.includes(e)||aue({key:e,options:r,context:t,collectors:n})})},ZV=({config:e,context:t,collectors:n})=>{let{media_library:r,media_libraries:i}=e,a=[];or(i)&&(a.push(i.all),or(i.default)&&a.push(i.default.config)),or(r)&&(r.name??`default`)==="default"&&a.push(r.config),a.forEach(e=>{or(e)&&oue({transformations:e.transformations,context:t,collectors:n})})},sue=[{prop:`allow_multiple`,newProp:`multiple`,strKey:`allow_multiple`}],QV=e=>{let{config:t,context:n,collectors:r}=e,{media_folder:i}=t;i!==void 0&&r.mediaFields.add({fieldConfig:t,context:n}),ZV({config:t,context:n,collectors:r}),WV({...e,UNSUPPORTED_OPTIONS:sue})},cue=(e,t,n)=>e===`object`||(UV({strKey:`invalid_list_variable_type`,context:t,values:{widget:e},collectors:n}),!1),lue=e=>{let{config:t,context:n,collectors:r}=e,{field:i}=t,{fields:a}=t,{types:o}=t,{typedKeyPath:s}=n,c={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a||i&&o||a&&o){UV({strKey:`invalid_list_field`,context:n,collectors:r});return}i&&eH({config:i,context:{...n,typedKeyPath:`${s}.*`},collectors:r}),a&&tH(a,{...n,typedKeyPath:`${s}.*`},r),o?.forEach(({name:e,widget:t=`object`,fields:i},a)=>{let o={...n,typedKeyPath:`${s}.*<${e}>`};GV({...c,name:e,index:a,context:o})&&cue(t,o,r)&&i&&tH(i,o,r)})},uue=[{prop:`valueType`,newProp:`value_type`}],due=e=>{WV({...e,UNSUPPORTED_OPTIONS:uue})},fue=e=>{let{config:t,context:n,collectors:r}=e,{fields:i}=t,{types:a}=t,{typedKeyPath:o}=n,s={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a){UV({strKey:`invalid_object_field`,context:n,collectors:r});return}i&&tH(i,n,r),a?.forEach(({name:e,fields:t},i)=>{let a={...n,typedKeyPath:`${o}<${e}>`};GV({...s,name:e,index:i,context:a})&&t&&tH(t,a,r)})},pue=[`slug`,`locale`],mue=[{prop:`displayFields`,newProp:`display_fields`},{prop:`searchFields`,newProp:`search_fields`},{prop:`valueField`,newProp:`value_field`},{type:`warning`,prop:`options_length`,strKey:`unsupported_ignored_option`}],hue=({cmsConfig:e,collection:t,file:n})=>{let r=jL({cmsConfig:e,collection:t,file:n});if(r?.locales?.length)return r.canonical_slug?.key??AL.key},gue=({valueField:e,fields:t,canonicalSlugKey:n,context:r,collectors:i})=>{let a=[...e.matchAll(aM)].map(([,e])=>e);(a.length?a.filter(e=>!pue.includes(e)):[e]).forEach(e=>{let a=e.replace(/^fields\./,``);a!==n&&!YV(t,a)&&UV({strKey:`relation_field_invalid_value_field`,context:r,collectors:i,values:{field:e}})})},_ue=e=>{let{config:t,context:n,collectors:r}=e,i=t,{collection:a,file:o,value_field:s}=i,{cmsConfig:c}=n,l=a===`_singletons`?{name:a,files:c?.singletons}:c?.collections?.find(e=>e.name===a),u,d;if(l){let e=`files`in l&&Array.isArray(l.files);o?(e&&(u=l.files.find(e=>`file`in e&&e.name===o)),u||UV({strKey:`relation_field_invalid_collection_file`,context:n,collectors:r,values:{file:o}})):e&&UV({strKey:`relation_field_missing_file_name`,context:n,collectors:r,values:{collection:a}}),d=hue({cmsConfig:c,collection:l,file:u})}else UV({strKey:`relation_field_invalid_collection`,context:n,collectors:r,values:{collection:a}});let f=o?u?.fields:l?.fields;typeof s==`string`&&s&&f?.length&&gue({valueField:s,fields:f,canonicalSlugKey:d,context:n,collectors:r}),WV({...e,UNSUPPORTED_OPTIONS:mue}),r.relationFields.add({fieldConfig:i,context:n})},vue=[{prop:`editorComponents`,newProp:`editor_components`}],$V=e=>{WV({...e,UNSUPPORTED_OPTIONS:vue})},yue={datetime:rue,file:QV,image:QV,list:lue,markdown:$V,number:due,object:fue,relation:_ue,richtext:$V},eH=e=>{let{config:t,context:n}=e,{name:r,widget:i=`string`}=t,{typedKeyPath:a}=n,o={...e,context:{...n,typedKeyPath:a?`${a}.${r}`:r}};yue[i]?.(o),i===`date`&&UV({...o,strKey:`date_field_type`})},tH=(e,t,n)=>{let r={nameCounts:{},strKeyBase:`field_name`,context:t,collectors:n};e?.forEach((e,i)=>{let{name:a}=e;GV({...r,name:a,index:i})&&eH({config:e,context:t,collectors:n})})},bue=(e,t)=>{let{collection:n,collectionFile:r}=e,{file:i,format:a=n.format,fields:o,i18n:s}=r,{preview_path:c,preview_path_date_field:l}=r,{extension:u}=qj(i);JV(u,a,o)&&UV({strKey:`file_format_mismatch`,context:e,values:{extension:u,format:a},collectors:t}),o?.length||UV({strKey:`collection_file_no_fields`,context:e,collectors:t}),i.includes(`{{locale}}`)&&!s&&UV({strKey:`collection_file_i18n_required`,context:e,collectors:t}),tH(o,e,t),XV({pathTemplate:c,dateFieldName:l,fields:o??[],context:e,collectors:t})},nH=(e,t)=>{let{cmsConfig:n,collection:r}=e,{files:i}=r,a={nameCounts:{},strKeyBase:`collection_file_name`,collectors:t};i.forEach((e,i)=>{if(`divider`in e)return;let{name:o}=e,s={cmsConfig:n,collection:r,collectionFile:e};GV({...a,name:o,index:i,context:s})&&bue(s,t)})},rH=(e,t)=>{if(Array.isArray(e))return{options:e};if(or(e)){let n=e[t],r=e.default;if(Array.isArray(n)){let e=r?n.find(({name:e})=>e===r):void 0;return{options:n,default:e?{field:e.field,pattern:e.pattern}:void 0}}}return{options:[]}},iH=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`),aH=e=>{if(iH(e))return{keys:e};if(or(e)){let{fields:t,default:n}=e;return iH(t)?or(n)?{keys:t,defaultKey:n.field,defaultOrder:[`descending`,`Descending`].includes(n.direction??``)?`descending`:`ascending`}:{keys:t}:{keys:[]}}return{keys:[]}},oH=[`slug`,`commit_author`,`commit_date`],xue=[`_summary`,`_manual`],sH=({config:e,options:t,fields:n,optionType:r,context:i,collectors:a})=>{let o=or(e),s={};t.forEach((e,t)=>{let{name:c,field:l}=or(e)?e:{};GV({name:c,index:t,nameCounts:s,strKeyBase:`${r}_name`,context:i,collectors:a,required:o}),!(typeof l!=`string`||!l||oH.includes(l))&&(YV(n,l)||UV({strKey:`invalid_${r}_field`,values:{name:l},context:i,collectors:a}))})},Sue=(e,t)=>{let{fields:n,sortable_fields:r,view_groups:i,view_filters:a}=e.collection;if(n?.length){if(r){let{keys:i,defaultKey:a}=aH(r),o=[...oH,...xue];[...i,a].forEach(r=>{r&&!o.includes(r)&&!YV(n,r)&&UV({strKey:`invalid_sortable_field`,values:{name:r},context:e,collectors:t})})}sH({config:i,options:rH(i,`groups`).options,fields:n,optionType:`view_group`,context:e,collectors:t}),sH({config:a,options:rH(a,`filters`).options,fields:n,optionType:`view_filter`,context:e,collectors:t})}},Cue=[{type:`warning`,prop:`nested`,strKey:`nested_collections_unsupported`},{prop:`sortableFields`,newProp:`sortable_fields`}],wue=(e,t)=>{let{cmsConfig:n,collection:r}=e,{extension:i,format:a,fields:o,index_file:s,preview_path:c,preview_path_date_field:l,reorder:u,slug:d,slug_length:f,view_groups:p}=r;JV(i,a)&&UV({strKey:`file_format_mismatch`,values:{extension:i,format:a},context:e,collectors:t}),f!==void 0&&uL(`slug_length`),WV({UNSUPPORTED_OPTIONS:Cue,config:r,context:e,collectors:t}),o?.length||UV({strKey:`collection_no_fields`,context:e,collectors:t}),tH(o,e,t),s&&tH(s===!0?o:s.fields??o,{cmsConfig:n,collection:r,isIndexFile:!0},t);let m=or(u)?u.group:void 0;if(typeof m==`string`&&m){let{options:n}=rH(p,`groups`);n.some(({name:e})=>e===m)||UV({strKey:`invalid_reorder_group`,values:{name:m},context:e,collectors:t})}XV({pathTemplate:c,dateFieldName:l,fields:[...o??[],...or(s)?s.fields??[]:[]],context:e,collectors:t}),Sue(e,t),d?.includes(`/`)&&UV({strKey:`invalid_slug_slash`,values:{slug:d},context:e,collectors:t})},Tue=({cmsConfig:e,collection:t},n)=>{let r=`divider`in t,i=`files`in t,a=`folder`in t;if(!r&&!i&&!a){UV({strKey:`invalid_collection_no_options`,context:{cmsConfig:e,collection:t},collectors:n});return}if(r&&i||r&&a||i&&a){UV({strKey:`invalid_collection_multiple_options`,context:{cmsConfig:e,collection:t},collectors:n});return}i?nH({cmsConfig:e,collection:t},n):a&&wue({cmsConfig:e,collection:t},n)},Eue=(e,t)=>{let{collections:n,singletons:r}=e,{errors:i}=t;if(!Array.isArray(n)&&!Array.isArray(r)){i.add(Z(`config.error.no_collection`));return}n?.some(e=>!(`divider`in e)&&!e.hide)||r?.length||i.add(Z(`config.error.no_visible_collection`));let a={nameCounts:{},strKeyBase:`collection_name`,collectors:t};n?.forEach((n,r)=>{if(`divider`in n)return;let{name:i}=n,o={cmsConfig:e,collection:n};GV({...a,name:i,index:r,context:o})&&Tue(o,t)}),Array.isArray(r)&&nH({cmsConfig:e,collection:{name:`_singletons`,label:Z(`singletons`),label_singular:Z(`singleton`),files:r}},t)},Due=({media_library:e,media_libraries:t})=>Mz.includes(e?.name??``)||Object.keys(t??{}).some(e=>Mz.includes(e)),Oue=(e,t)=>{let{media_folder:n,public_folder:r,asset_collections:i}=e,{errors:a}=t;if(n===void 0&&!Due(e)&&a.add(Z(`config.error.missing_media_folder`)),typeof r==`string`&&(/^\.{1,2}\//.test(r)&&a.add(Z(`config.error.public_folder_relative_path`)),/^https?:/.test(r)&&a.add(Z(`config.error.public_folder_absolute_url`))),Array.isArray(i)){let n={nameCounts:{},strKeyBase:`asset_collection_name`,collectors:t};i.forEach(({name:t},r)=>{GV({...n,name:t,index:r,context:{cmsConfig:e}})})}},kue=[{type:`warning`,prop:`local_backend`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`locale`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`search`,strKey:`unsupported_ignored_option`}],Aue=[`github`,`gitlab`],jue=(e,t)=>{Gle(e,t),e.publish_mode===`editorial_workflow`&&!Aue.includes(e.backend?.name)&&UV({type:`warning`,strKey:`editorial_workflow_unsupported`,context:{cmsConfig:e},collectors:t}),Oue(e,t),ZV({config:e,context:{cmsConfig:e},collectors:t}),Eue(e,t),WV({UNSUPPORTED_OPTIONS:kue,config:e,context:{cmsConfig:e},collectors:t}),rL.forEach(({fields:n},r)=>{tH(n,{cmsConfig:e,componentName:r},t)})},Mue={$schema:`http://json-schema.org/draft-07/schema#`,$id:`http://json-schema.org/draft-07/schema#`,title:`Core schema meta-schema`,definitions:{schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},type:[`object`,`boolean`],properties:{$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},default:!0},Nue=[`widget`,`name`],Pue=8,Fue=(e,t)=>{let n=new Set,r=t;for(;or(r)&&typeof r.$ref==`string`;){if(n.has(r.$ref))return;n.add(r.$ref),r=r.$ref.split(`/`).slice(1).reduce((e,t)=>e?.[t],e)}return or(r)?r:void 0},cH=(e,t,n=0)=>{let r=Fue(e,t);return!r||n>Pue?[]:Array.isArray(r.anyOf)?r.anyOf.flatMap(t=>cH(e,t,n+1)):or(r.properties)?[r]:[]},Iue=(e,t)=>{let n=e.properties?.[t];if(or(n))return n.const===void 0?Array.isArray(n.enum)?n.enum:void 0:[n.const]},Lue=(e,t,n)=>{let r=cH(e,t);if(!r.length)return;let i=[],a=!1;if(r.every(e=>{let t=Iue(e,n);return t?(i.push(...t),a||=!(e.required??[]).includes(n),!0):!1}))return{values:[...new Set(i)],optional:a}},Rue=(e,t)=>{let n=cH(e,t);if(n.length)return n.map(e=>new Set(e.required??[])).reduce((e,t)=>new Set([...e].filter(e=>t.has(e))))},zue=(e,t)=>new Set(cH(e,t).flatMap(e=>Object.keys(e.properties))),lH=(e,t)=>({properties:{[e]:t.length===1?{const:t[0]}:{enum:t}}}),uH=(e,t)=>e.reduceRight((e,{condition:t,branch:n})=>({if:t,then:n,else:e}),t),Bue=(e,t,n)=>Nue.reduce((r,i)=>{if(r)return r;let a=t.map(t=>Lue(e,t,i)),o=a.filter(Boolean),s=o.flatMap(e=>e.values);return!o.length||a.length-o.length>1||s.length!==new Set(s).size?void 0:uH(n.map((e,t)=>({branch:e,tag:a[t]})).filter(e=>!!e.tag).sort((e,t)=>Number(e.tag?.optional)-Number(t.tag?.optional)).map(({branch:e,tag:t})=>({branch:e,condition:t?.optional?lH(i,t.values):{required:[i],...lH(i,t?.values)}})),n.filter((e,t)=>!a[t])[0]??{required:[i],...lH(i,s)})},void 0),Vue=(e,t,n)=>{let r=t.map(t=>Rue(e,t));if(r.some(e=>!e))return;let i=r.map((n,r)=>{let i=t.reduce((t,n,i)=>r===i?t:new Set([...t,...zue(e,n)]),new Set);return[...n].filter(e=>!i.has(e))});if(i.filter(e=>!e.length).length>1)return;let a=n.map((e,t)=>({branch:e,markers:i[t]})).filter(e=>e.markers.length).map(({branch:e,markers:t})=>({branch:e,condition:t.length===1?{required:[t[0]]}:{anyOf:t.map(e=>({required:[e]}))}})),o=i.findIndex(e=>!e.length);return uH(a,o>-1?n[o]:{anyOf:a.map(({condition:e})=>e)})},dH=e=>{let t=n=>{if(Array.isArray(n))return n.map(t);if(!or(n))return n;let r={};if(Object.entries(n).forEach(([e,n])=>{e!==`anyOf`&&(e!==`additionalProperties`||n!==!1)&&(r[e]=t(n))}),Array.isArray(n.anyOf)){let i=n.anyOf.map(t),a=n.anyOf.length>1?Bue(e,n.anyOf,i)??Vue(e,n.anyOf,i):void 0;a?Object.assign(r,a):r.anyOf=i}return r};return t(e)};function fH(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fH(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fH(e[r],t[r]))return!1;return!0}return e===t}function pH(e){return encodeURI(Hue(e))}function Hue(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var Uue={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},Wue={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Gue={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Kue=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function mH(e,t=Object.create(null),n=Kue,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:mH(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Gue[i])continue;let a=`${r}/${pH(i)}`,o=e[i];if(Array.isArray(o)){if(Uue[i]){let e=o.length;for(let r=0;r<e;r++)mH(o[r],t,n,`${a}/${r}`)}}else if(Wue[i])for(let e in o)mH(o[e],t,n,`${a}/${pH(e)}`);else mH(o,t,n,a)}return t}var que=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Jue=[0,31,28,31,30,31,30,31,31,30,31,30,31],Yue=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Xue=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Zue=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Que=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,$ue=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,ede=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,tde=/^(?:\/(?:[^~/]|~0|~1)*)*$/,nde=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,rde=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,ide=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},ade=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ode=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,sde=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function hH(e){return e.test.bind(e)}var gH={date:_H,time:vH.bind(void 0,!1),"date-time":ude,duration:sde,uri:pde,"uri-reference":hH(Zue),"uri-template":hH(Que),url:hH($ue),email:ide,hostname:hH(Xue),ipv4:hH(ade),ipv6:hH(ode),regex:hde,uuid:hH(ede),"json-pointer":hH(tde),"json-pointer-uri-fragment":hH(nde),"relative-json-pointer":hH(rde)};function cde(e){return e%4==0&&(e%100!=0||e%400==0)}function _H(e){let t=e.match(que);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&cde(n)?29:Jue[r])}function vH(e,t){let n=t.match(Yue);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var lde=/t|\s/i;function ude(e){let t=e.split(lde);return t.length==2&&_H(t[0])&&vH(!0,t[1])}var dde=/\/|:/,fde=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function pde(e){return dde.test(e)&&fde.test(e)}var mde=/[^\\]\\Z/;function hde(e){if(mde.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function gde(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function yH(e,t,n=`2019-09`,r=mH(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:b,oneOf:x,if:S,then:C,else:w,format:T,properties:E,patternProperties:ee,additionalProperties:te,unevaluatedProperties:ne,minProperties:re,maxProperties:ie,propertyNames:ae,dependentRequired:oe,dependentSchemas:se,dependencies:ce,prefixItems:le,items:ue,additionalItems:de,unevaluatedItems:fe,contains:pe,minContains:me,maxContains:he,minItems:ge,maxItems:_e,uniqueItems:ve,minimum:ye,maximum:be,exclusiveMinimum:xe,exclusiveMaximum:Se,multipleOf:Ce,minLength:we,maxLength:Te,pattern:Ee,__absolute_ref__:De,__absolute_recursive_ref__:Oe}=t,ke=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Oe]:a,u=`${s}/$recursiveRef`,d=yH(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||ke.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[De||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw De&&De!==d&&(e+=` Absolute URI "${De}".`),e+=`\nKnown schemas:\n- ${Object.keys(r).join(`
|
||
- `)}`,Error(e)}let l=`${s}/$ref`,u=yH(e,t,n,r,i,a,o,l,c);if(u.valid||ke.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:ke.length===0,errors:ke}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||ke.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&ke.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&ke.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fH(e,h)||ke.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&ke.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fH(e,t))||ke.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||ke.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;yH(e,v,n,r,i,a,o,t).valid&&ke.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Ae=[];if(y!==void 0){let t=`${s}/anyOf`,l=ke.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=yH(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);ke.push(...f.errors),u||=f.valid,f.valid&&Ae.push(d)}u?ke.length=l:ke.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(b!==void 0){let t=`${s}/allOf`,l=ke.length,u=!0;for(let s=0;s<b.length;s++){let l=b[s],d=Object.create(c),f=yH(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);ke.push(...f.errors),u&&=f.valid,f.valid&&Ae.push(d)}u?ke.length=l:ke.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(x!==void 0){let t=`${s}/oneOf`,l=ke.length,u=x.filter((s,l)=>{let u=Object.create(c),d=yH(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return ke.push(...d.errors),d.valid&&Ae.push(u),d.valid}).length;u===1?ke.length=l:ke.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Ae),S!==void 0){let t=`${s}/if`;if(yH(e,S,n,r,i,a,o,t,c).valid){if(C!==void 0){let l=yH(e,C,n,r,i,a,o,`${s}/then`,c);l.valid||ke.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(w!==void 0){let l=yH(e,w,n,r,i,a,o,`${s}/else`,c);l.valid||ke.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||ke.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(re!==void 0&&t.length<re&&ke.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${re} properties.`}),ie!==void 0&&t.length>ie&&ke.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${ie} properties.`}),ae!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pH(s)}`,c=yH(s,ae,n,r,i,a,e,t);c.valid||ke.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(oe!==void 0){let t=`${s}/dependantRequired`;for(let n in oe)if(n in e){let r=oe[n];for(let i of r)i in e||ke.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(se!==void 0)for(let t in se){let l=`${s}/dependentSchemas`;if(t in e){let s=yH(e,se[t],n,r,i,a,o,`${l}/${pH(t)}`,c);s.valid||ke.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(ce!==void 0){let t=`${s}/dependencies`;for(let s in ce)if(s in e){let c=ce[s];if(Array.isArray(c))for(let n of c)n in e||ke.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=yH(e,c,n,r,i,a,o,`${t}/${pH(s)}`);l.valid||ke.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(E!==void 0){let t=`${s}/properties`;for(let s in E){if(!(s in e))continue;let d=`${o}/${pH(s)}`,f=yH(e[s],E[s],n,r,i,a,d,`${t}/${pH(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,ke.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&ee!==void 0){let t=`${s}/patternProperties`;for(let s in ee){let d=new RegExp(s,`u`),f=ee[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pH(p)}`,h=yH(e[p],f,n,r,i,a,m,`${t}/${pH(s)}`);h.valid?c[p]=l[p]=!0:(u=i,ke.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&te!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pH(s)}`,f=yH(e[s],te,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,ke.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&ne!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pH(s)}`,u=yH(e[s],ne,n,r,i,a,l,t);u.valid?c[s]=!0:ke.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){_e!==void 0&&e.length>_e&&ke.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${_e}).`}),ge!==void 0&&e.length<ge&&ke.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${ge}).`});let t=e.length,l=0,u=!1;if(le!==void 0){let d=`${s}/prefixItems`,f=Math.min(le.length,t);for(;l<f;l++){let t=yH(e[l],le[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,ke.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ue!==void 0){let d=`${s}/items`;if(Array.isArray(ue)){let s=Math.min(ue.length,t);for(;l<s;l++){let t=yH(e[l],ue[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,ke.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=yH(e[l],ue,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,ke.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&de!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=yH(e[l],de,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,ke.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(pe!==void 0){if(t===0&&me===void 0)ke.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(me!==void 0&&t<me)ke.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${me}).`});else{let l=`${s}/contains`,u=ke.length,d=0;for(let s=0;s<t;s++){let t=yH(e[s],pe,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):ke.push(...t.errors)}d>=(me||0)&&(ke.length=u),me===void 0&&he===void 0&&d===0?ke.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):me!==void 0&&d<me?ke.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${me} items matching schema. Only ${d} items were found.`}):he!==void 0&&d>he&&ke.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${he} items matching schema. ${d} items were found.`})}}if(!u&&fe!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=yH(e[l],fe,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||ke.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(ve)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fH(r,t))&&(ke.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(ye!==void 0&&(xe===!0&&e<=ye||e<ye)&&ke.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${xe?`or equal to `:``} ${ye}.`}),be!==void 0&&(Se===!0&&e>=be||e>be)&&ke.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Se?`or equal to `:``} ${be}.`})):(ye!==void 0&&e<ye&&ke.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${ye}.`}),be!==void 0&&e>be&&ke.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${be}.`}),xe!==void 0&&e<=xe&&ke.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${xe}.`}),Se!==void 0&&e>=Se&&ke.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${Se}.`})),Ce!==void 0){let t=e%Ce;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Ce-t)>=1.1920929e-7&&ke.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Ce}.`})}}else if(u===`string`){let t=we===void 0&&Te===void 0?0:gde(e);we!==void 0&&t<we&&ke.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${we}).`}),Te!==void 0&&t>Te&&ke.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Te}).`}),Ee!==void 0&&!new RegExp(Ee,`u`).test(e)&&ke.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),T!==void 0&&gH[T]&&!gH[T](e)&&ke.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${T}".`})}return{valid:ke.length===0,errors:ke}}var _de=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=mH(e)}validate(e){return yH(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),mH(e,this.lookup)}},vde=`7`,yde=[`$ref`,`properties`,`items`,`if`,`allOf`,`oneOf`],bde={type:`type`,enum:`allowedValues`,const:`allowedValue`,minItems:`limit`,maxItems:`limit`,minLength:`limit`,maxLength:`limit`},xde=e=>e.replaceAll(`~1`,`/`).replaceAll(`~0`,`~`),bH=e=>e.replace(/^#/,``).split(`/`).filter(Boolean).map(xde),xH=(e,t)=>bH(t).reduce((t,n)=>n===`$ref`&&or(t)&&typeof t.$ref==`string`?bH(t.$ref).reduce((e,t)=>e?.[t],e):t?.[n],e),SH=(e,t)=>bH(t).reduce((e,t)=>e?.[t],e),CH=({keyword:e,keywordLocation:t,instanceLocation:n},r,i)=>{let a=n.replace(/^#/,``);if(e===`required`){let o=xH(r,t),s=SH(i,n);return!Array.isArray(o)||!or(s)?[]:o.filter(e=>!(e in s)).map(t=>({instancePath:a,keyword:e,params:{missingProperty:t}}))}let o=bde[e];return[{instancePath:a,keyword:e,params:o?{[o]:xH(r,t)}:{}}]},wH=e=>{let t=new _de(structuredClone(e),vde,!1);return n=>{let{valid:r,errors:i}=t.validate(n);if(r)return[];let a=new Set;return i.filter(({keyword:e})=>!yde.includes(e)).filter(({keyword:e,instanceLocation:t,keywordLocation:n})=>{if(e!==`required`)return!0;let r=`${t}|${n}`;return!a.has(r)&&(a.add(r),!0)}).flatMap(t=>CH(t,e,n))}},TH=()=>{let e=[],t;return iL.forEach(({schema:n},r)=>{if(or(n)){if(t??=wH(Mue),t(n).length){console.warn(`Ignoring the invalid schema registered for the \`${r}\` field type`);return}e.push({if:{required:[`widget`],properties:{widget:{const:r}}},then:dH(n)})}}),e},EH=e=>{let t=e.definitions?.CustomField,n=or(t)?TH():[];return n.length?{...e,definitions:{...e.definitions,CustomField:{allOf:[t,...n]}}}:e},DH=[`string`,`number`,`integer`,`boolean`,`array`,`object`,`null`],OH=/^\d+$/,kH=e=>e.replaceAll(`~1`,`/`).replaceAll(`~0`,`~`),AH=e=>CL(Ud.current,{type:`disjunction`}).format(e),jH=e=>`\`${typeof e==`string`&&e?e:JSON.stringify(e)}\``,MH=e=>Z(`config.error.schema_value_type.${e}`),NH=e=>e.reduce((e,t)=>OH.test(t)?`${e}[${t}]`:e?`${e}.${t}`:t,``),PH=(e,t,n)=>{let r=t?.widget===`list`?`${e}.*`:e;return r?`${r}.${n}`:n},FH=(e,t)=>{let n=t.split(`/`).slice(1).map(kH),r={},i=[],a=e,o=``,s=0,c=!0;for(;s<n.length&&c;){let t=n[s],i=n[s+1],l=i!==void 0&&OH.test(i)?a?.[t]?.[i]:void 0;or(l)&&a===e&&(t===`collections`||t===`singletons`)?(r[t===`collections`?`collection`:`collectionFile`]=l,a=l,s+=2):or(l)&&t===`files`&&r.collection?(r.collectionFile=l,a=l,s+=2):or(l)&&t===`fields`?(o=PH(o,a,l.name),a=l,s+=2):or(l)&&t===`types`?(o=`${o}${a?.widget===`list`?`.*`:``}<${l.name}>`,a=l,s+=2):t===`field`&&or(a?.field)?(o=PH(o,a,a.field.name),a=a.field,s+=1):c=!1}return i.push(...n.slice(s)),o&&(r.typedKeyPath=o),{context:r,option:i}},IH=({keyword:e,params:t},n)=>e===`enum`?{strKey:`schema_invalid_enum`,values:{option:n,values:AH(t.allowedValues.map(jH))}}:e===`const`?t.allowedValue===``?{strKey:`schema_invalid_empty_value`,values:{option:n}}:{strKey:`schema_invalid_const`,values:{option:n,value:String(t.allowedValue)}}:e===`minItems`||e===`maxItems`?{strKey:`schema_invalid_item_count`,values:{option:n,count:String(t.limit)}}:{strKey:`schema_invalid_value`,values:{option:n}},LH=({config:e,errors:t,collectors:n})=>{let r=t.filter(({keyword:e})=>e!==`if`),i=[...new Set(r.map(({instancePath:e})=>e))];i.filter(e=>!i.some(t=>t.startsWith(`${e}/`))).forEach(t=>{let i=r.filter(({instancePath:e})=>e===t),{context:a,option:o}=FH(e,t),s=i.some(({keyword:e})=>e===`anyOf`),c=i.filter(({keyword:e})=>e===`required`).map(({params:e})=>NH([...o,e.missingProperty])),l=i.filter(({keyword:e})=>e!==`required`&&e!==`anyOf`),u=[...new Set(l.filter(({keyword:e,params:t})=>e===`type`&&DH.includes(t.type)).map(({params:e})=>e.type))];c.length>1&&s?UV({strKey:`schema_missing_one_of`,values:{options:AH([...new Set(c)].map(jH))},context:a,collectors:n}):[...new Set(c)].forEach(e=>{UV({strKey:`schema_missing_option`,values:{option:e},context:a,collectors:n})}),u.length&&UV({strKey:`schema_invalid_type`,values:{option:NH(o),type:AH(u.map(MH))},context:a,collectors:n}),l.filter(({keyword:e,params:t})=>!(e===`type`&&DH.includes(t.type))).forEach(e=>{UV({...IH(e,NH(o)),context:a,collectors:n})}),!c.length&&!l.length&&UV({strKey:`schema_invalid_value`,values:{option:NH(o)},context:a,collectors:n})})},RH={$schema:`http://json-schema.org/draft-07/schema#`,$ref:`#/definitions/CmsConfig`,definitions:{CmsConfig:{type:`object`,properties:{load_config_file:{type:`boolean`},backend:{$ref:`#/definitions/Backend`},publish_mode:{type:`string`,enum:[``,`simple`,`editorial_workflow`]},media_folder:{type:`string`},public_folder:{type:`string`},media_library:{anyOf:[{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{$ref:`#/definitions/DefaultMediaLibraryConfig`}},required:[`name`]},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},output_filename_only:{type:`boolean`},use_transformations:{type:`boolean`},config:{type:`object`}},required:[`name`]},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{type:`object`},settings:{$ref:`#/definitions/UploadcareMediaLibrarySettings`}},required:[`name`]},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},access_key_id:{type:`string`},bucket:{type:`string`},region:{type:`string`},account_id:{type:`string`},jurisdiction:{type:`string`,enum:[`default`,`eu`,`fedramp`]},project_id:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},force_path_style:{type:`boolean`},public_url:{type:`string`}},required:[`access_key_id`,`bucket`,`name`]},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},account_name:{type:`string`},container:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},public_url:{type:`string`}},required:[`container`,`name`]},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},providers:{type:`array`,items:{$ref:`#/definitions/StockAssetProviderName`}}},required:[`name`]}]},media_libraries:{$ref:`#/definitions/MediaLibraries`},app_title:{type:`string`},site_url:{type:`string`},display_url:{type:`string`},logo_url:{type:`string`},logo:{$ref:`#/definitions/LogoOptions`},logout_redirect_url:{type:`string`},issue_reports:{$ref:`#/definitions/IssueReports`},show_preview_links:{type:`boolean`},slug:{$ref:`#/definitions/SlugOptions`},collections:{type:`array`,items:{anyOf:[{$ref:`#/definitions/Collection`},{$ref:`#/definitions/CollectionDivider`}]}},singletons:{type:`array`,items:{anyOf:[{$ref:`#/definitions/CollectionFile`},{$ref:`#/definitions/CollectionDivider`}]}},asset_collections:{type:`array`,items:{$ref:`#/definitions/AssetCollection`}},i18n:{$ref:`#/definitions/I18nOptions`},editor:{$ref:`#/definitions/EditorOptions`},output:{$ref:`#/definitions/OutputOptions`},field_defaults:{$ref:`#/definitions/FieldDefaults`},$schema:{type:`string`,format:`uri`}},required:[`backend`],additionalProperties:!1,anyOf:[{required:[`collections`]},{required:[`singletons`]}]},Backend:{anyOf:[{$ref:`#/definitions/GitBackend`},{$ref:`#/definitions/TestBackend`}]},GitBackend:{anyOf:[{$ref:`#/definitions/GitHubBackend`},{$ref:`#/definitions/GitLabBackend`},{$ref:`#/definitions/GiteaBackend`}]},GitHubBackend:{type:`object`,additionalProperties:!1,properties:{name:{type:`string`,const:`github`},repo:{type:`string`},api_root:{type:`string`},graphql_api_root:{type:`string`},base_url:{type:`string`},auth_type:{type:`string`,const:``},auth_endpoint:{type:`string`},app_id:{type:`string`},cms_label_prefix:{type:`string`},squash_merges:{type:`boolean`},preview_context:{type:`string`},open_authoring:{type:`boolean`},auth_scope:{type:`string`,enum:[`repo`,`public_repo`]},branch:{type:`string`},site_domain:{type:`string`},commit_messages:{$ref:`#/definitions/CommitMessages`},automatic_deployments:{type:`boolean`},skip_ci:{type:`boolean`},auth_methods:{type:`array`,items:{$ref:`#/definitions/AuthMethodName`}},include_credentials:{type:`boolean`}},required:[`name`,`repo`]},CommitMessages:{type:`object`,properties:{create:{type:`string`},update:{type:`string`},delete:{type:`string`},uploadMedia:{type:`string`},deleteMedia:{type:`string`},openAuthoring:{type:`string`}},additionalProperties:!1},AuthMethodName:{type:`string`,enum:[`oauth`,`token`]},GitLabBackend:{type:`object`,additionalProperties:!1,properties:{name:{type:`string`,const:`gitlab`},repo:{type:`string`},api_root:{type:`string`},graphql_api_root:{type:`string`},base_url:{type:`string`},auth_type:{type:`string`,enum:[``,`pkce`]},auth_endpoint:{type:`string`},app_id:{type:`string`},cms_label_prefix:{type:`string`},squash_merges:{type:`boolean`},preview_context:{type:`string`},branch:{type:`string`},site_domain:{type:`string`},commit_messages:{$ref:`#/definitions/CommitMessages`},automatic_deployments:{type:`boolean`},skip_ci:{type:`boolean`},auth_methods:{type:`array`,items:{$ref:`#/definitions/AuthMethodName`}},include_credentials:{type:`boolean`}},required:[`name`,`repo`]},GiteaBackend:{type:`object`,additionalProperties:!1,properties:{name:{type:`string`,const:`gitea`},repo:{type:`string`},api_root:{type:`string`},base_url:{type:`string`},auth_endpoint:{type:`string`},app_id:{type:`string`},branch:{type:`string`},site_domain:{type:`string`},commit_messages:{$ref:`#/definitions/CommitMessages`},automatic_deployments:{type:`boolean`},skip_ci:{type:`boolean`},auth_methods:{type:`array`,items:{$ref:`#/definitions/AuthMethodName`}},include_credentials:{type:`boolean`}},required:[`name`,`repo`]},TestBackend:{type:`object`,properties:{name:{type:`string`,const:`test-repo`}},required:[`name`],additionalProperties:!1},MediaLibraryName:{anyOf:[{type:`string`,const:`default`},{$ref:`#/definitions/CloudMediaLibraryName`},{type:`string`,const:`stock_assets`}]},CloudMediaLibraryName:{type:`string`,enum:[`cloudinary`,`uploadcare`,`aws_s3`,`azure_blob_storage`,`backblaze_b2`,`cloudflare_r2`,`digitalocean_spaces`,`scaleway_object_storage`,`supabase_storage`]},DefaultMediaLibraryConfig:{type:`object`,additionalProperties:!1,properties:{multiple:{type:`boolean`},max_file_size:{type:`number`},slugify_filename:{type:`boolean`},transformations:{$ref:`#/definitions/ImageTransformations`}}},ImageTransformations:{type:`object`,additionalProperties:!1,properties:{svg:{$ref:`#/definitions/VectorImageTransformationOptions`},raster_image:{$ref:`#/definitions/RasterImageTransformationOptions`},avif:{$ref:`#/definitions/RasterImageTransformationOptions`},gif:{$ref:`#/definitions/RasterImageTransformationOptions`},jpeg:{$ref:`#/definitions/RasterImageTransformationOptions`},png:{$ref:`#/definitions/RasterImageTransformationOptions`},webp:{$ref:`#/definitions/RasterImageTransformationOptions`}}},VectorImageTransformationOptions:{type:`object`,properties:{optimize:{type:`boolean`}},additionalProperties:!1},RasterImageTransformationOptions:{type:`object`,properties:{format:{type:`string`,const:`webp`},quality:{type:`number`},width:{type:`number`},height:{type:`number`}},additionalProperties:!1},UploadcareMediaLibrarySettings:{type:`object`,properties:{autoFilename:{type:`boolean`},defaultOperations:{type:`string`}},additionalProperties:!1},StockAssetProviderName:{type:`string`,enum:[`pexels`,`picsum`,`pixabay`,`unsplash`]},MediaLibraries:{type:`object`,properties:{all:{$ref:`#/definitions/SharedMediaLibraryOptions`},default:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/DefaultMediaLibrary`}]},cloudinary:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/CloudinaryMediaLibrary`}]},uploadcare:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/UploadcareMediaLibrary`}]},aws_s3:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},azure_blob_storage:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/AzureMediaLibrary`}]},cloudflare_r2:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},digitalocean_spaces:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},backblaze_b2:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},scaleway_object_storage:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},supabase_storage:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/S3MediaLibrary`}]},stock_assets:{anyOf:[{type:`boolean`,const:!1},{$ref:`#/definitions/StockMediaLibrary`}]}},additionalProperties:!1},SharedMediaLibraryOptions:{type:`object`,properties:{max_file_size:{type:`number`},slugify_filename:{type:`boolean`},transformations:{$ref:`#/definitions/ImageTransformations`}},additionalProperties:!1},DefaultMediaLibrary:{type:`object`,properties:{config:{$ref:`#/definitions/DefaultMediaLibraryConfig`}},additionalProperties:!1},CloudinaryMediaLibrary:{type:`object`,properties:{output_filename_only:{type:`boolean`},use_transformations:{type:`boolean`},config:{type:`object`}},additionalProperties:!1},UploadcareMediaLibrary:{type:`object`,properties:{config:{type:`object`},settings:{$ref:`#/definitions/UploadcareMediaLibrarySettings`}},additionalProperties:!1},S3MediaLibrary:{type:`object`,properties:{name:{type:`string`},access_key_id:{type:`string`},bucket:{type:`string`},region:{type:`string`},account_id:{type:`string`},jurisdiction:{type:`string`,enum:[`default`,`eu`,`fedramp`]},project_id:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},force_path_style:{type:`boolean`},public_url:{type:`string`}},required:[`access_key_id`,`bucket`],additionalProperties:!1},AzureMediaLibrary:{type:`object`,properties:{name:{type:`string`},account_name:{type:`string`},container:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},public_url:{type:`string`}},required:[`container`],additionalProperties:!1},StockMediaLibrary:{type:`object`,properties:{providers:{type:`array`,items:{$ref:`#/definitions/StockAssetProviderName`}}},additionalProperties:!1},LogoOptions:{type:`object`,properties:{src:{type:`string`},show_in_header:{type:`boolean`}},additionalProperties:!1},IssueReports:{type:`object`,properties:{url:{type:`string`}},additionalProperties:!1},SlugOptions:{type:`object`,properties:{encoding:{type:`string`,enum:[`unicode`,`ascii`]},clean_accents:{type:`boolean`},sanitize_replacement:{type:`string`},maxlength:{type:`number`},trim:{type:`boolean`},lowercase:{type:`boolean`},timezone:{type:`string`,enum:[`local`,`utc`]}},additionalProperties:!1},Collection:{anyOf:[{$ref:`#/definitions/EntryCollection`},{$ref:`#/definitions/FileCollection`}]},EntryCollection:{type:`object`,additionalProperties:!1,properties:{folder:{type:`string`},fields:{type:`array`,items:{$ref:`#/definitions/Field`}},path:{type:`string`},filter:{$ref:`#/definitions/CollectionFilter`},create:{type:`boolean`},delete:{type:`boolean`},duplicate:{type:`boolean`},reorder:{anyOf:[{type:`boolean`},{$ref:`#/definitions/ReorderOptions`}]},extension:{type:`string`},identifier_field:{type:`string`},slug:{type:`string`},slug_length:{type:`number`},summary:{type:`string`},sortable_fields:{anyOf:[{type:`array`,items:{type:`string`}},{$ref:`#/definitions/SortableFields`}]},view_filters:{anyOf:[{$ref:`#/definitions/ViewFilters`},{type:`array`,items:{$ref:`#/definitions/ViewFilter`}}]},view_groups:{anyOf:[{$ref:`#/definitions/ViewGroups`},{type:`array`,items:{$ref:`#/definitions/ViewGroup`}}]},nested:{$ref:`#/definitions/NestedCollectionOptions`},meta:{$ref:`#/definitions/CollectionMetaData`},index_file:{anyOf:[{type:`boolean`},{$ref:`#/definitions/CollectionIndexFile`}]},thumbnail:{anyOf:[{type:`string`},{type:`boolean`},{type:`array`,items:{type:`string`}}]},limit:{type:`number`},aliases_field:{type:[`string`,`boolean`]},label_singular:{type:`string`},description:{type:`string`},media_folder:{type:`string`},public_folder:{type:`string`},hide:{type:`boolean`},publish:{type:`boolean`},format:{type:`string`},frontmatter_delimiter:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]},body_field:{$ref:`#/definitions/BodyFieldOptions`},i18n:{anyOf:[{type:`boolean`},{$ref:`#/definitions/I18nOptions`}]},preview_path:{type:`string`},preview_path_date_field:{type:`string`},editor:{$ref:`#/definitions/EditorOptions`},yaml_quote:{type:`boolean`},name:{type:`string`},label:{type:`string`},icon:{type:`string`}},required:[`fields`,`folder`,`name`]},Field:{anyOf:[{$ref:`#/definitions/StandardField`},{$ref:`#/definitions/CustomField`}]},StandardField:{anyOf:[{$ref:`#/definitions/VisibleField`},{$ref:`#/definitions/HiddenField`}]},VisibleField:{anyOf:[{$ref:`#/definitions/BooleanField`},{$ref:`#/definitions/CodeField`},{$ref:`#/definitions/ColorField`},{$ref:`#/definitions/ComputeField`},{$ref:`#/definitions/DateTimeField`},{$ref:`#/definitions/FileField`},{$ref:`#/definitions/ImageField`},{$ref:`#/definitions/KeyValueField`},{$ref:`#/definitions/ListField`},{$ref:`#/definitions/MapField`},{$ref:`#/definitions/MarkdownField`},{$ref:`#/definitions/NumberField`},{$ref:`#/definitions/ObjectField`},{$ref:`#/definitions/RelationField`},{$ref:`#/definitions/RichTextField`},{$ref:`#/definitions/SelectField`},{$ref:`#/definitions/StringField`},{$ref:`#/definitions/TextField`},{$ref:`#/definitions/UuidField`}]},BooleanField:{type:`object`,additionalProperties:!1,properties:{before_input:{type:`string`},after_input:{type:`string`},widget:{type:`string`,const:`boolean`},default:{type:`boolean`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},CodeField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`code`},default:{anyOf:[{type:`string`},{type:`object`,additionalProperties:{type:`string`}}]},default_language:{type:`string`},allow_language_selection:{type:`boolean`},output_code_only:{type:`boolean`},keys:{type:`object`,properties:{code:{type:`string`},lang:{type:`string`}},required:[`code`,`lang`],additionalProperties:!1},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ColorField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`color`},default:{type:`string`},allowInput:{type:`boolean`},enableAlpha:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ComputeField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`compute`},value:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`value`,`widget`]},DateTimeField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`datetime`},default:{type:`string`},type:{$ref:`#/definitions/DateTimeInputType`},min:{type:`string`},max:{type:`string`},step:{anyOf:[{type:`number`},{type:`string`,const:`any`}]},format:{type:`string`},date_format:{type:[`string`,`boolean`]},time_format:{type:[`string`,`boolean`]},picker_utc:{type:`boolean`},input_timezone:{type:`string`},output_utc:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},DateTimeInputType:{type:`string`,enum:[`datetime-local`,`date`,`time`]},FileField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`file`},default:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]},multiple:{type:`boolean`},min:{type:`number`},max:{type:`number`},accept:{type:`string`},choose_url:{type:`boolean`},media_folder:{type:`string`},public_folder:{type:`string`},media_library:{anyOf:[{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{$ref:`#/definitions/DefaultMediaLibraryConfig`}}},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},output_filename_only:{type:`boolean`},use_transformations:{type:`boolean`},config:{type:`object`}}},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{type:`object`},settings:{$ref:`#/definitions/UploadcareMediaLibrarySettings`}}},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},access_key_id:{type:`string`},bucket:{type:`string`},region:{type:`string`},account_id:{type:`string`},jurisdiction:{type:`string`,enum:[`default`,`eu`,`fedramp`]},project_id:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},force_path_style:{type:`boolean`},public_url:{type:`string`}},required:[`access_key_id`,`bucket`]},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},account_name:{type:`string`},container:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},public_url:{type:`string`}},required:[`container`]},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},providers:{type:`array`,items:{$ref:`#/definitions/StockAssetProviderName`}}}}]},media_libraries:{$ref:`#/definitions/MediaLibraries`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ImageField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`image`},default:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]},multiple:{type:`boolean`},min:{type:`number`},max:{type:`number`},accept:{type:`string`},choose_url:{type:`boolean`},media_folder:{type:`string`},public_folder:{type:`string`},media_library:{anyOf:[{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{$ref:`#/definitions/DefaultMediaLibraryConfig`}}},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},output_filename_only:{type:`boolean`},use_transformations:{type:`boolean`},config:{type:`object`}}},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},config:{type:`object`},settings:{$ref:`#/definitions/UploadcareMediaLibrarySettings`}}},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},access_key_id:{type:`string`},bucket:{type:`string`},region:{type:`string`},account_id:{type:`string`},jurisdiction:{type:`string`,enum:[`default`,`eu`,`fedramp`]},project_id:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},force_path_style:{type:`boolean`},public_url:{type:`string`}},required:[`access_key_id`,`bucket`]},{type:`object`,additionalProperties:!1,properties:{name:{type:`string`},account_name:{type:`string`},container:{type:`string`},endpoint:{type:`string`},prefix:{type:`string`},public_url:{type:`string`}},required:[`container`]},{type:`object`,additionalProperties:!1,properties:{name:{$ref:`#/definitions/MediaLibraryName`},providers:{type:`array`,items:{$ref:`#/definitions/StockAssetProviderName`}}}}]},media_libraries:{$ref:`#/definitions/MediaLibraries`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},KeyValueField:{type:`object`,additionalProperties:!1,properties:{min:{type:`number`},max:{type:`number`},widget:{type:`string`,const:`keyvalue`},default:{type:`object`,additionalProperties:{type:`string`}},key_label:{type:`string`},value_label:{type:`string`},root:{type:`boolean`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ListField:{anyOf:[{$ref:`#/definitions/SimpleListField`},{$ref:`#/definitions/ListFieldWithSubField`},{$ref:`#/definitions/ListFieldWithSubFields`},{$ref:`#/definitions/ListFieldWithTypes`}]},SimpleListField:{type:`object`,additionalProperties:!1,properties:{pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},min:{type:`number`},max:{type:`number`},widget:{type:`string`,const:`list`},default:{anyOf:[{type:`array`,items:{type:`string`}},{type:`object`},{type:`array`,items:{type:`object`}}]},label_singular:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ListFieldWithSubField:{type:`object`,additionalProperties:!1,properties:{field:{$ref:`#/definitions/Field`},allow_add:{type:`boolean`},allow_remove:{type:`boolean`},allow_duplicate:{type:`boolean`},allow_reorder:{type:`boolean`},add_to_top:{type:`boolean`},summary:{type:`string`},thumbnail:{type:`string`},collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},minimize_collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},root:{type:`boolean`},min:{type:`number`},max:{type:`number`},widget:{type:`string`,const:`list`},default:{anyOf:[{type:`array`,items:{type:`string`}},{type:`object`},{type:`array`,items:{type:`object`}}]},label_singular:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`field`,`name`,`widget`]},ListFieldWithSubFields:{type:`object`,additionalProperties:!1,properties:{fields:{type:`array`,items:{$ref:`#/definitions/Field`}},allow_add:{type:`boolean`},allow_remove:{type:`boolean`},allow_duplicate:{type:`boolean`},allow_reorder:{type:`boolean`},add_to_top:{type:`boolean`},summary:{type:`string`},thumbnail:{type:`string`},collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},minimize_collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},root:{type:`boolean`},min:{type:`number`},max:{type:`number`},widget:{type:`string`,const:`list`},default:{anyOf:[{type:`array`,items:{type:`string`}},{type:`object`},{type:`array`,items:{type:`object`}}]},label_singular:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`fields`,`name`,`widget`]},ListFieldWithTypes:{type:`object`,additionalProperties:!1,properties:{types:{type:`array`,items:{$ref:`#/definitions/VariableFieldType`}},typeKey:{type:`string`},allow_add:{type:`boolean`},allow_remove:{type:`boolean`},allow_duplicate:{type:`boolean`},allow_reorder:{type:`boolean`},add_to_top:{type:`boolean`},summary:{type:`string`},thumbnail:{type:`string`},collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},minimize_collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},root:{type:`boolean`},min:{type:`number`},max:{type:`number`},widget:{type:`string`,const:`list`},default:{anyOf:[{type:`array`,items:{type:`string`}},{type:`object`},{type:`array`,items:{type:`object`}}]},label_singular:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`types`,`widget`]},VariableFieldType:{type:`object`,properties:{name:{type:`string`},label:{type:`string`},widget:{type:`string`,const:`object`},summary:{type:`string`},fields:{type:`array`,items:{$ref:`#/definitions/Field`}}},required:[`name`],additionalProperties:!1},MapField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`map`},default:{type:`string`},decimals:{type:`number`},type:{type:`string`,enum:[`Point`,`LineString`,`Polygon`]},center:{type:`array`,items:{type:`number`},minItems:2,maxItems:2},zoom:{type:`number`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},MarkdownField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`markdown`},default:{type:`string`},minimal:{type:`boolean`},buttons:{type:`array`,items:{$ref:`#/definitions/RichTextEditorButtonName`}},editor_components:{type:`array`,items:{type:`string`}},allow_nested_components:{anyOf:[{type:`boolean`},{type:`string`,const:`exclude_self`}]},modes:{type:`array`,items:{$ref:`#/definitions/RichTextEditorMode`}},sanitize_preview:{type:`boolean`},linked_images:{type:`boolean`},use_emoji_autocomplete:{type:`boolean`},use_markdown_shortcuts:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},RichTextEditorButtonName:{type:`string`,enum:[`bold`,`italic`,`strikethrough`,`code`,`link`,`heading-one`,`heading-two`,`heading-three`,`heading-four`,`heading-five`,`heading-six`,`quote`,`bulleted-list`,`numbered-list`]},RichTextEditorMode:{type:`string`,enum:[`rich_text`,`raw`]},NumberField:{type:`object`,additionalProperties:!1,properties:{before_input:{type:`string`},after_input:{type:`string`},widget:{type:`string`,const:`number`},default:{type:[`string`,`number`]},value_type:{type:`string`,enum:[`float`,`int`,`int/string`,`float/string`]},min:{type:`number`},max:{type:`number`},step:{type:`number`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},ObjectField:{anyOf:[{$ref:`#/definitions/ObjectFieldWithSubFields`},{$ref:`#/definitions/ObjectFieldWithTypes`}]},ObjectFieldWithSubFields:{type:`object`,additionalProperties:!1,properties:{fields:{type:`array`,items:{$ref:`#/definitions/Field`}},widget:{type:`string`,const:`object`},default:{type:`object`},collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},summary:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`fields`,`name`,`widget`]},ObjectFieldWithTypes:{type:`object`,additionalProperties:!1,properties:{types:{type:`array`,items:{$ref:`#/definitions/VariableFieldType`}},typeKey:{type:`string`},widget:{type:`string`,const:`object`},default:{type:`object`},collapsed:{anyOf:[{type:`boolean`},{type:`string`,const:`auto`}]},summary:{type:`string`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`types`,`widget`]},RelationField:{type:`object`,additionalProperties:!1,properties:{multiple:{type:`boolean`},min:{type:`number`},max:{type:`number`},dropdown_threshold:{type:`number`},widget:{type:`string`,const:`relation`},default:{anyOf:[{},{type:`array`,items:{}}]},collection:{type:`string`},file:{type:`string`},value_field:{type:`string`},display_fields:{type:`array`,items:{type:`string`}},search_fields:{type:`array`,items:{type:`string`}},filters:{type:`array`,items:{$ref:`#/definitions/RelationFieldFilterOptions`}},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`collection`,`name`,`widget`]},RelationFieldFilterOptions:{type:`object`,properties:{field:{$ref:`#/definitions/FieldKeyPath`},values:{type:`array`,items:{}},exclude:{type:`boolean`}},required:[`field`,`values`],additionalProperties:!1},FieldKeyPath:{type:`string`},RichTextField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`richtext`},default:{type:`string`},minimal:{type:`boolean`},buttons:{type:`array`,items:{$ref:`#/definitions/RichTextEditorButtonName`}},editor_components:{type:`array`,items:{type:`string`}},allow_nested_components:{anyOf:[{type:`boolean`},{type:`string`,const:`exclude_self`}]},modes:{type:`array`,items:{$ref:`#/definitions/RichTextEditorMode`}},sanitize_preview:{type:`boolean`},linked_images:{type:`boolean`},use_emoji_autocomplete:{type:`boolean`},use_markdown_shortcuts:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},SelectField:{type:`object`,additionalProperties:!1,properties:{multiple:{type:`boolean`},min:{type:`number`},max:{type:`number`},dropdown_threshold:{type:`number`},widget:{type:`string`,const:`select`},default:{anyOf:[{$ref:`#/definitions/SelectFieldValue`},{type:`array`,items:{$ref:`#/definitions/SelectFieldValue`}}]},options:{anyOf:[{type:`array`,items:{$ref:`#/definitions/SelectFieldValue`}},{type:`array`,items:{type:`object`,properties:{label:{type:`string`},value:{$ref:`#/definitions/SelectFieldValue`}},required:[`label`,`value`],additionalProperties:!1}}]},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`options`,`widget`]},SelectFieldValue:{type:[`string`,`number`,`null`]},StringField:{type:`object`,additionalProperties:!1,properties:{minlength:{type:`number`},maxlength:{type:`number`},before_input:{type:`string`},after_input:{type:`string`},widget:{type:`string`,const:`string`},default:{type:`string`},type:{type:`string`,enum:[`url`,`text`,`email`]},prefix:{type:`string`},suffix:{type:`string`},use_emoji_autocomplete:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`]},TextField:{type:`object`,additionalProperties:!1,properties:{minlength:{type:`number`},maxlength:{type:`number`},widget:{type:`string`,const:`text`},default:{type:`string`},use_emoji_autocomplete:{type:`boolean`},pattern:{type:`array`,minItems:2,items:[{anyOf:[{type:`string`},{type:`string`,format:`regex`}]},{type:`string`}],maxItems:2},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},UuidField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`uuid`},default:{type:`string`},prefix:{type:`string`},use_b32_encoding:{type:`boolean`},read_only:{type:`boolean`},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},HiddenField:{type:`object`,additionalProperties:!1,properties:{widget:{type:`string`,const:`hidden`},default:{},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},CustomField:{type:`object`,properties:{widget:{type:`string`,minLength:1,not:{enum:[`boolean`,`code`,`color`,`compute`,`datetime`,`file`,`hidden`,`image`,`keyvalue`,`list`,`map`,`markdown`,`number`,`object`,`relation`,`richtext`,`select`,`string`,`text`,`uuid`]}},label:{type:`string`},comment:{type:`string`},hint:{type:`string`},preview:{type:`boolean`},required:{anyOf:[{type:`boolean`},{type:`array`,items:{type:`string`}}]},readonly:{type:`boolean`},name:{type:`string`},i18n:{anyOf:[{type:`boolean`},{type:`string`,const:`none`},{type:`string`,const:`translate`},{type:`string`,const:`duplicate`}]}},required:[`name`,`widget`]},CollectionFilter:{type:`object`,properties:{field:{$ref:`#/definitions/FieldKeyPath`},value:{anyOf:[{},{type:`array`,items:{}}]},pattern:{anyOf:[{type:`string`},{type:`string`,format:`regex`}]}},required:[`field`],additionalProperties:!1},ReorderOptions:{type:`object`,properties:{key:{type:`string`},group:{type:`string`}},additionalProperties:!1},SortableFields:{type:`object`,properties:{fields:{type:`array`,items:{$ref:`#/definitions/FieldKeyPath`}},default:{$ref:`#/definitions/SortableFieldsDefaultOptions`}},required:[`fields`],additionalProperties:!1},SortableFieldsDefaultOptions:{type:`object`,properties:{field:{$ref:`#/definitions/FieldKeyPath`},direction:{type:`string`,enum:[`ascending`,`descending`,`Ascending`,`Descending`,`None`]}},required:[`field`],additionalProperties:!1},ViewFilters:{type:`object`,properties:{filters:{type:`array`,items:{$ref:`#/definitions/ViewFilter`}},default:{type:`string`}},required:[`filters`],additionalProperties:!1},ViewFilter:{type:`object`,properties:{name:{type:`string`},label:{type:`string`},field:{$ref:`#/definitions/FieldKeyPath`},pattern:{anyOf:[{type:`string`},{type:`string`,format:`regex`},{type:`boolean`}]}},required:[`label`,`field`,`pattern`],additionalProperties:!1},ViewGroups:{type:`object`,properties:{groups:{type:`array`,items:{$ref:`#/definitions/ViewGroup`}},default:{type:`string`}},required:[`groups`],additionalProperties:!1},ViewGroup:{type:`object`,properties:{name:{type:`string`},label:{type:`string`},field:{$ref:`#/definitions/FieldKeyPath`},pattern:{anyOf:[{type:`string`},{type:`boolean`},{type:`string`,format:`regex`}]}},required:[`label`,`field`],additionalProperties:!1},NestedCollectionOptions:{type:`object`,properties:{depth:{type:`number`},summary:{type:`string`},subfolders:{type:`boolean`}},additionalProperties:!1},CollectionMetaData:{type:`object`,properties:{path:{$ref:`#/definitions/CollectionMetaDataPath`}},additionalProperties:!1},CollectionMetaDataPath:{type:`object`,properties:{widget:{type:`string`,const:`string`},label:{type:`string`},index_file:{type:`string`}},additionalProperties:!1},CollectionIndexFile:{type:`object`,properties:{name:{type:`string`},label:{type:`string`},icon:{type:`string`},fields:{type:`array`,items:{$ref:`#/definitions/Field`}},editor:{$ref:`#/definitions/EditorOptions`}},additionalProperties:!1},EditorOptions:{type:`object`,properties:{preview:{type:`boolean`}},additionalProperties:!1},BodyFieldOptions:{type:`object`,properties:{key:{type:`string`},inline:{type:`boolean`}},additionalProperties:!1},I18nOptions:{type:`object`,properties:{structure:{$ref:`#/definitions/I18nFileStructure`},locales:{type:`array`,items:{type:`string`}},default_locale:{type:`string`},initial_locales:{anyOf:[{type:`array`,items:{type:`string`}},{type:`string`,const:`default`},{type:`string`,const:`all`}]},save_all_locales:{type:`boolean`},canonical_slug:{type:`object`,properties:{key:{type:`string`},value:{type:`string`}},additionalProperties:!1},omit_default_locale_from_filename:{type:`boolean`},omit_default_locale_from_file_path:{type:`boolean`},omit_default_locale_from_preview_path:{type:`boolean`}},additionalProperties:!1},I18nFileStructure:{type:`string`,enum:[`single_file`,`single_file_default_root`,`multiple_files`,`multiple_folders`,`multiple_folders_i18n_root`,`multiple_root_folders`]},FileCollection:{type:`object`,additionalProperties:!1,properties:{files:{type:`array`,items:{$ref:`#/definitions/CollectionFile`}},label_singular:{type:`string`},description:{type:`string`},media_folder:{type:`string`},public_folder:{type:`string`},hide:{type:`boolean`},publish:{type:`boolean`},format:{type:`string`},frontmatter_delimiter:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]},body_field:{$ref:`#/definitions/BodyFieldOptions`},i18n:{anyOf:[{type:`boolean`},{$ref:`#/definitions/I18nOptions`}]},preview_path:{type:`string`},preview_path_date_field:{type:`string`},editor:{$ref:`#/definitions/EditorOptions`},yaml_quote:{type:`boolean`},name:{type:`string`},label:{type:`string`},icon:{type:`string`}},required:[`files`,`name`]},CollectionFile:{type:`object`,properties:{name:{type:`string`},label:{type:`string`},icon:{type:`string`},file:{type:`string`},fields:{type:`array`,items:{$ref:`#/definitions/Field`}},media_folder:{type:`string`},public_folder:{type:`string`},format:{type:`string`},frontmatter_delimiter:{anyOf:[{type:`string`},{type:`array`,items:{type:`string`}}]},body_field:{$ref:`#/definitions/BodyFieldOptions`},i18n:{anyOf:[{type:`boolean`},{$ref:`#/definitions/I18nOptions`}]},preview_path:{type:`string`},preview_path_date_field:{type:`string`},editor:{$ref:`#/definitions/EditorOptions`}},required:[`name`,`file`,`fields`],additionalProperties:!1},CollectionDivider:{type:`object`,properties:{name:{type:`string`},divider:{type:`boolean`}},required:[`divider`],additionalProperties:!1},AssetCollection:{type:`object`,additionalProperties:!1,properties:{media_folder:{type:`string`},public_folder:{type:`string`},name:{type:`string`},label:{type:`string`},icon:{type:`string`}},required:[`media_folder`,`name`]},OutputOptions:{type:`object`,properties:{omit_empty_optional_fields:{type:`boolean`},encode_file_path:{type:`boolean`},json:{$ref:`#/definitions/JsonFormatOptions`},yaml:{$ref:`#/definitions/YamlFormatOptions`}},additionalProperties:!1},JsonFormatOptions:{type:`object`,properties:{indent_style:{type:`string`,enum:[`space`,`tab`]},indent_size:{type:`number`}},additionalProperties:!1},YamlFormatOptions:{type:`object`,properties:{indent_size:{type:`number`},indent_sequences:{type:`boolean`},quote:{type:`string`,enum:[`none`,`double`,`single`]}},additionalProperties:!1},FieldDefaults:{type:`object`,properties:{richtext:{$ref:`#/definitions/RichTextFieldBaseProps`}},additionalProperties:!1},RichTextFieldBaseProps:{type:`object`,properties:{default:{type:`string`},minimal:{type:`boolean`},buttons:{type:`array`,items:{$ref:`#/definitions/RichTextEditorButtonName`}},editor_components:{type:`array`,items:{type:`string`}},allow_nested_components:{anyOf:[{type:`boolean`},{type:`string`,const:`exclude_self`}]},modes:{type:`array`,items:{$ref:`#/definitions/RichTextEditorMode`}},sanitize_preview:{type:`boolean`},linked_images:{type:`boolean`},use_emoji_autocomplete:{type:`boolean`},use_markdown_shortcuts:{type:`boolean`}},additionalProperties:!1}}},zH=void 0,BH=()=>{if(RH)return zH??=dH(RH),zH},VH=({config:e,schema:t,collectors:n})=>{if(t)try{let r=wH(EH(t))(e);r.length&&LH({config:e,errors:r,collectors:n})}catch(e){console.warn(`Skipping configuration schema validation`,e)}},HH=l(s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))(),1),UH=`sveltia-cms.prefs`,WH=`auto`,GH=ao({current:void 0}),KH=ao({}),qH=!1,JH=ao({current:void 0});jo(()=>{(async()=>{GH.current=void 0;try{let e=await GA.get(`sveltia-cms.prefs`)??{};e.apiKeys??={},e.useDraftBackup??=!0,e.closeOnSave??=!0,e.closeWithEscape??=!0,e.underlineLinks??=!0,e.beta??=!1,e.devModeEnabled??=!1,e.defaultTranslationService??=`google`,e.locale??=WH,e.locale===`en`&&(e.locale=WH),Object.assign(KH,e)}catch{GH.current={type:`permission_denied`}}})(),B(()=>{if(!Object.keys(KH).length)return;let e=Ni(KH);(async()=>{try{(0,HH.default)(e,await GA.get(`sveltia-cms.prefs`))||await GA.set(UH,e)}catch{}})();let{theme:t,underlineLinks:n=!0,beta:r=!1,devModeEnabled:i=!1}=KH,a=!t||t===`auto`,o=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;Object.assign(document.documentElement.dataset,{theme:a?o:t,autoTheming:a,underlineLinks:n,beta:r,devMode:i})}),B(()=>{let{locale:e}=KH,t=e===`auto`?JH.current:e;if(!t||!xd.includes(t))return;let n=Ds(()=>Ud.current),r=qH&&e!==`auto`;qH=!0,Vd(t).then(()=>{t in Sd?Ud.set(t):r&&n&&(KH.locale=n)})})});var{DEV:YH,VITE_SITE_URL:XH}={DEV:!1},ZH=YH?XH||`http://localhost:5174`:void 0,QH={},$H=na(),eU=na(),tU=na([]),nU=ra([$H,tU],([e,t])=>!!e||!!t.length),rU={errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set},iU=async e=>{$H.set(void 0),tU.set([]),Object.assign(rU,{errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set});try{if(!window.isSecureContext)throw Error(Z(`config.error.no_secure_context`));let t;if(e){if(!or(e))throw Error(Z(`config.error.parse_failed`));t=e,t.load_config_file!==!1&&(t=(0,vM.default)(await HV({manualInit:!0}),t))}else t=await HV();if(Object.assign(QH,t),VH({config:t,schema:BH(),collectors:rU}),jue(t,rU),rU.errors.size)throw rU.errors.forEach(e=>{console.error(e)}),Error(`Errors found in configuration`);rU.warnings.size&&rU.warnings.forEach(e=>{console.warn(e)});let n=structuredClone(t);n._siteURL=n.site_url?.trim()||(YH?ZH:window.location.origin),n._baseURL=LA(n._siteURL)?new URL(n._siteURL).origin:``,n.collections?.forEach(e=>{`folder`in e&&(e.folder===`.`||e.folder===`/`)&&(e.folder=``)}),$H.set(n),eU.set(await Df(uI(n)))}catch(e){tU.set(rU.errors.size?[...rU.errors]:[e.name===`Error`?e.message:Z(`config.error.unexpected`)]),console.error(e,e.cause)}};$H.subscribe(e=>{if(KH.devModeEnabled&&(console.info(`cmsConfig`,e),console.info(`collectors`,rU)),!e)return;let t=ole(e),n=tle(e,[...rU.mediaFields]);qL.set(t),lM.set(n),KH.devModeEnabled&&(console.info(`allEntryFolders`,t),console.info(`allAssetFolders`,n))});var aU=({libraryName:e=`default`,fieldConfig:t}={})=>{let n=A($H),r=e==="default"?{...n?.media_libraries?.all,...t?.media_libraries?.all}:void 0,i=e=>({...e,...r&&Object.keys(r).length>0&&{config:{...r,...e?.config}}});if(t?.media_libraries&&e in t.media_libraries){let n=t.media_libraries[e];return n!==!1&&i(n)}if(t?.media_library){let r=n?.media_library?.name??`default`,a=t.media_library,o=a.name;if(r===e&&(o===e||o===void 0))return i(a)}if(n?.media_libraries&&e in n.media_libraries){let t=n.media_libraries[e];return t!==!1&&i(t)}return n?.media_library?.name===e?i(n.media_library):i(null)},oU=({fieldConfig:e}={})=>{let t=aU({fieldConfig:e}),{max_file_size:n,multiple:r,slugify_filename:i,transformations:a}=typeof t==`boolean`?{}:t?.config??{};return{enabled:t!==!1,config:{max_file_size:typeof n==`number`&&Number.isInteger(n)?n:1/0,multiple:typeof r==`boolean`&&r,slugify_filename:typeof i==`boolean`&&i,transformations:or(a)?a:void 0}}},sU=async(e,t)=>{let[n,r]=e.type.split(`/`);if(n===`image`&&r!==`svg+xml`){let n;if(Lz.includes(r)&&(r in t?n=t[r]:`raster_image`in t&&(n=t.raster_image)),n){let{format:t=`webp`,quality:r=85,width:i,height:a}=n,o;try{o=await Kz(e,{format:t,quality:r,width:i,height:a})}catch{return e}let s=o.type===`image/${t}`?zz.test(e.name)?e.name.replace(zz,t):e.name.concat(t):e.name;return new File([o],s,{type:o.type})}}return n===`image`&&r===`svg+xml`&&t.svg?.optimize?new File([await Kse(e)],e.name,{type:e.type}):e},cU=async e=>{if(!Rz.includes(e.type))return!0;try{return(await createImageBitmap(e)).close(),!0}catch{return!1}},lU=async(e,{slugify_filename:t=!1,transformations:n,max_file_size:r=1/0}={})=>{if(t){let{name:t,type:n,lastModified:r}=e,i=xz(t,{slugificationEnabled:!0});e=new File([e],i,{type:n,lastModified:r})}if(!await cU(e))return{file:e,originalFile:void 0,oversized:!1,invalid:!0};let i=e;return n&&(e=await sU(e,n)),{file:e,originalFile:e===i?void 0:i,oversized:e.size>r,invalid:!1}},uU=/^(?<entryFolder>.+?)(?:\/[^/]+)?$/,dU=na([]),fU=ra([dU],([e])=>e.some(({workflow:e})=>e)?e.filter(({workflow:e})=>!e):e),pU={source:void 0,map:new Map},mU=()=>{let e=A(dU);return e!==pU.source&&(pU.source=e,pU.map=new Map(e.map(e=>[e.path,e]))),pU.map},hU=e=>mU().get(e),gU=({unsaved:e,blobURL:t,path:n})=>e&&t?t:n,_U=na([]),vU=ra(_U,e=>new Set(e.map(e=>e.path))),yU=na(),bU=na(),xU=na({folder:void 0,files:[]}),SU=na(),CU=na(),wU=ra([xU],([e],t,n)=>{let r=!1;t({processing:!1,validFiles:[],oversizedFiles:[],invalidFiles:[],transformedFileMap:new WeakMap});let i=e.files,{config:a}=oU();return(async()=>{i.length&&a.transformations&&n(e=>({...e,processing:!0}));let e=await Promise.all(i.map(e=>lU(e,a)));r||n(()=>({processing:!1,validFiles:e.filter(({oversized:e,invalid:t})=>!e&&!t).map(({file:e})=>e),oversizedFiles:e.filter(({oversized:e,invalid:t})=>e&&!t).map(({file:e})=>e),invalidFiles:e.filter(({invalid:e})=>e).map(({file:e})=>e),transformedFileMap:new WeakMap(e.filter(({originalFile:e})=>e!==void 0).map(({file:e,originalFile:t})=>[e,t]))}))})(),()=>{r=!0}}),TU=({internalPath:e,collectionName:t,entry:n})=>{if(!iM.test(e))return e;let r=t?HL(t):n?cB(n)[0]:void 0;if(!n||!r)return;let{slug:i,locales:a}=n,{defaultLocale:o}=r._i18n,{content:s,path:c}=a[o in a?o:Object.keys(a)[0]];return pV(e,{type:`media_folder`,collection:r,content:nM(s),currentSlug:i,entryFilePath:c,isIndexFile:mL(r,n)})},EU=({path:e,entry:t,collection:n,file:r,componentName:i,typedKeyPath:a})=>{let{locales:o}=t,{_i18n:{defaultLocale:s}}=r??n,c=a?pM({collectionName:n.name,fileName:r?.name,componentName:i,typedKeyPath:a}):void 0,l=c?.entryRelative?c.internalSubPath??``:(r??n).media_folder,u=c?.publicPath?c.publicPath:(r??n).public_folder,{path:d,content:f}=o[s in o?s:Object.keys(o)[0]];if(!d||!f)return;l&&fV(l)&&(l=pV(l,{type:`media_folder`,collection:n,content:f,currentSlug:t.slug,entryFilePath:d,isIndexFile:mL(n,t)}));let{entryFolder:p}=d.match(uU).groups,m=e.replace(/^\.\//,``),h=l&&m.startsWith(`${l}/`)?m.slice(l.length+1):m,g;if(l?.startsWith(`/`)&&u){let e=u.replace(/^\.\//,``);m.startsWith(`${e}/`)&&(h=m.slice(e.length+1)),g=wz(Cz([l.slice(1),h]))}else g=wz(Cz([p,l,h]));return mU().get(g)},DU=({path:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:a})=>{if(!t){let t=[i?pM({componentName:i,typedKeyPath:a}):void 0,n&&a?pM({collectionName:n,fileName:r,typedKeyPath:a}):void 0,n?pM({collectionName:n,fileName:r}):void 0,n?pM({collectionName:n}):void 0,A(uM)].filter(e=>!!e&&!e.hasTemplateTags),o;return t.find(t=>{let n=t.publicPath?.replace(/^\//,``)??``,r=n&&e.startsWith(`${n}/`)?e.slice(n.length+1):e,i=mU().get(Cz([t.internalPath,t.internalSubPath??``,r]));return i&&(o=i),!!i}),o??mU().get(e)}return cB(t).flatMap(n=>{let r=ZI(n,t),o={path:e,entry:t,collection:n,componentName:i,typedKeyPath:a};return r.length?r.map(e=>EU({...o,file:e})):EU({...o})}).filter(Boolean)[0]??mU().get(e)},OU=({path:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:a})=>{let o=mU().get(FA(e));if(o)return o;let{dirname:s=``,basename:c}=qj(e),l;return[i?pM({componentName:i,typedKeyPath:a}):void 0,a?pM({collectionName:n,fileName:r,typedKeyPath:a}):void 0,pM({collectionName:n,fileName:r}),pM({collectionName:n}),A(uM),A(lM).findLast(e=>{let t=e.publicPath??``,n=NA(t).replace(oM,`.+?`);return s.match(`^${n}${t?`(?=\\/|$)`:`$`}`)})].filter(e=>!!e).find(e=>{let{publicPath:n,collectionName:r}=e,{internalPath:i}=e;if(i!==void 0&&(i=TU({internalPath:i,collectionName:r,entry:t}),i===void 0))return!1;n&&i&&s&&(n===`/`?i=`${i}${s}`:s.startsWith(`${n}/`)&&(i=s.replace(n,i)));let a=Cz([i,c]),o=mU().get(a);return o&&(l=o),!!o}),l},kU=e=>!/^[/@]/.test(e),AU=({value:e,...t})=>{let n=Ase(e.split(`#`)[0]);return kU(n)?DU({path:n,...t}):OU({path:n,...t})},jU=({folder:e},t)=>e===t||e.collectionName===t.collectionName&&e.fileName===t.fileName&&e.typedKeyPath===t.typedKeyPath&&e.isIndexFile===t.isIndexFile&&e.internalPath===t.internalPath&&e.internalSubPath===t.internalSubPath&&e.publicPath===t.publicPath&&e.entryRelative===t.entryRelative&&e.hasTemplateTags===t.hasTemplateTags,MU=e=>A(dU).filter(t=>jU(t,e)),NU=e=>A(dU).filter(t=>qj(t.path).dirname===e);dM.subscribe(()=>{yU.set(void 0)});var PU=(e,t)=>{if(!t.length||!e.length)return[];let n=new Set(t.map(({name:e})=>e.normalize().toLowerCase()));return e.filter(e=>n.has(e.name.normalize().toLowerCase()))},FU=/^(?:.+\/)?(\.git(?:attributes|ignore|keep))$/,IU=na([]);ra(IU,e=>e.find(({path:e})=>e===`.gitattributes`)?.text?.replace(/\r\n?/g,`
|
||
`).split(`
|
||
`).map(e=>e.startsWith(`*.`)&&e.includes(`filter=lfs`)?e.split(` `)[0].slice(2).toLowerCase():``).filter(Boolean)??[]);var LU=e=>/\/_index(?:\.[\w-]+)?\.md$/.test(e),RU=new Map,zU=({subPath:e,subPathTemplate:t})=>{if(t?.includes(`{{slug}}`)){let n=wI(RU,t,()=>{let e=``,n=t;for(;n.length>0;){let t=n.indexOf(`{{`);if(t===-1){e+=NA(n);break}t>0&&(e+=NA(n.substring(0,t)));let r=n.indexOf(`}}`,t);if(r===-1){e+=NA(n);break}let i=n.substring(t,r+2);e+=i===`{{slug}}`?`([^/]+)`:`[^/]+?`,n=n.substring(r+2)}return RegExp(`^${e}$`)}),[,r]=e.match(n)??[];if(r)return r}return e},BU=async(e,t)=>{try{return await Ale(e)}catch(e){console.error(e),t.push(e);return}},VU=({rawContent:e,fields:t,i18nSingleFile:n,validate:r})=>{let i=t[0].name;if(n)return!or(e)||!Object.values(e).every(r)?void 0:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{[i]:t}]));if(r(e))return{[i]:e}},HU=(e,t,n)=>{if(!or(e))return;let r=t.filter(e=>e!==n),i=Object.fromEntries(Object.entries(e).filter(([e])=>!r.includes(e))),a={[n]:i};return r.forEach(t=>{or(e[t])&&(a[t]=e[t])}),a},UU=(e,t,n)=>{let r={rawContent:e,fields:t,i18nSingleFile:n};return KB(t,`list`)?VU({...r,validate:Array.isArray}):KB(t,`keyvalue`)?VU({...r,validate:e=>or(e)&&Object.values(e).every(e=>typeof e==`string`)}):or(e)?e:void 0},WU=(e,t,n,r,i)=>r?.split(`/`).pop()===`_index`&&/\/_index(?:\.[\w-]+)?\.[\w]+$/.test(e)&&i!==`md`?!0:LU(e)?!(t||pL(n)?.name===`_index`||r?.split(`/`).pop()===`_index`&&i===`md`):!1,GU=(e,t,n,r,i)=>{let{path:a,folder:{filePathMap:o}}=e;if(t){if(i){let[e,t]=Object.entries(o??{}).find(([,e])=>e===a)??[];return{subPath:t,locale:e}}return{subPath:a,locale:void 0}}if(!n)return{subPath:void 0,locale:void 0};let s=a.match(n);if(!s?.groups)return{subPath:void 0,locale:void 0};let{subPath:c,locale:l=r}=s.groups;return{subPath:c,locale:l}},KU=(e,t,n,r,i,a)=>{let o=r||zU({subPath:i,subPathTemplate:a});e.slug=o,e.locales._default={slug:o,path:n,content:nM(t)}},qU=(e,t,n,r,i,a,o)=>{let s=r||zU({subPath:i,subPathTemplate:a});e.slug=s,e.locales=Object.fromEntries(o.filter(e=>e in t).map(e=>[e,{slug:s,path:n,content:nM(t[e])}]))},JU=(e,t,n,r,i,a,o,s,c,l,u)=>{let d=l&&typeof t[l]==`string`?t[l]:void 0,f=r||zU({subPath:i,subPathTemplate:a}),p={slug:f,path:n,content:nM(t)},m=`${c}/${d??f}`,h=u.find(e=>e.id===m);return h?(h.locales[o]=p,(o===s||!h.slug)&&(h.slug=f,h.subPath=i),!0):(e.id=m,e.locales[o]=p,e.slug=f,!1)},YU=async({file:e,entries:t,errors:n})=>{let r=await BU(e,n);if(!r)return;let{path:i,meta:a={},folder:{collectionName:o,fileName:s}}=e,c=HL(o),l=c&&s?YI(c,s):void 0;if(!c||s&&!l)return;let{fields:u=[],_file:{fullPathRegEx:d,subPath:f,extension:p},_i18n:{i18nEnabled:m,allLocales:h,defaultLocale:g,structureMap:{i18nSingleFile:_,i18nSingleFileDefaultRoot:v,i18nMultiFile:y,i18nMultiFolder:b,i18nMultiRootFolder:x},canonicalSlug:{key:S}}}=l??c,C=v?HU(r,h,g):r;if(!C)return;let w=UU(C,u,_||v);if(!w||WU(i,s,c,f,p))return;let T=y||b||x,{subPath:E,locale:ee}=GU(e,s,d,g,T);if(!E||T&&!ee)return;let te={id:``,slug:``,subPath:E,locales:{},...a};if(!m)KU(te,w,i,s,E,f);else if(_||v)qU(te,w,i,s,E,f,h);else if(JU(te,w,i,s,E,f,ee,g,o,S,t))return;t.push(te)},XU=async e=>{let t=[],n=[];return await Promise.all(e.map(e=>YU({file:e,entries:t,errors:n}))),{entries:t.filter(e=>(e.id=Tf(),!!e.slug&&!!Object.keys(e.locales).length)),errors:n}},ZU=e=>{let t=[],n=[],r=[],i=new Set;e.forEach(e=>{let{path:a,name:o}=e;if(o.startsWith(`.`))FU.test(o)&&r.push({...e,type:`config`});else{let[r]=ZL(a),[o]=gM(a);r&&(t.push({...e,type:`entry`,folder:r}),i.add(a)),o&&!i.has(a)&&!LU(a)&&n.push({...e,type:`asset`,folder:o})}});let a=[...t,...n,...r];return{entryFiles:t,assetFiles:n,configFiles:r,allFiles:a,count:a.length}},QU=10485760,$U=10,eW=async(e,t,n=`file`)=>{let r=FA(t??``),i=e;if(!r){if(n===`directory`)return i;throw Error(`Path is required for file handle retrieval`)}let a=r.split(`/`),o=a.length-1;for await(let[e,t]of a.entries())i=await(e===o&&n===`file`?i.getFileHandle(t,{create:!0}):i.getDirectoryHandle(t,{create:!0}));return i},tW=(e,t)=>eW(e,t,`file`),nW=(e,t)=>eW(e,t,`directory`),rW=e=>e?gz(e,e=>NA(e).replace(oM,`.+?`)):/^.+$/,iW=async(e,t,n=``)=>{let{scanningPaths:r,scanningPathsRegEx:i,fileHandles:a,pathRegexCache:o}=t;for await(let[s,c]of e.entries()){if(s.startsWith(`.`)&&!FU.test(s))continue;let e=n?`${n}/${s}`:s,l=i.some(t=>t.test(e));if(c.kind===`file`&&l&&a.push({handle:c,path:e}),c.kind===`directory`){let n=o.get(e);n||(n=rW(e),o.set(e,n)),(l||r.some(e=>n.test(e)))&&await iW(c,t,e)}}},aW=()=>{let e=A(qL).flatMap(({filePathMap:e,folderPathMap:t})=>Object.values(e||(t??{}))),t=A(lM).filter(({internalPath:e})=>e!==void 0).map(({internalPath:e})=>e);return Ij([...e,...t].map(e=>FA(e??``)))},oW=async e=>{let t=[],n=aW();return await iW(e,{rootDirHandle:e,scanningPaths:n,scanningPathsRegEx:n.map(rW),fileHandles:t,pathRegexCache:new Map}),t.map(({handle:e,path:t})=>({handle:e,path:t.normalize(),name:e.name.normalize(),size:0,sha:``}))},sW=async e=>{let{name:t,handle:n}=e;if(t===`.gitkeep`)return e;try{let r=await n.getFile();if(r.size>QU)return console.warn(`File ${t} is too large (${r.size} bytes), skipping content read`),{...e,text:``};let i=await Xj(r);return{...e,text:i}}catch(t){return console.error(t),{...e,text:``}}},cW=async e=>{let{name:t,handle:n}=e,r=MR(t);try{let t=await n.getFile(),{size:i}=t,a=await Ez(t);return{...e,kind:r,size:i,sha:a}}catch(t){return console.error(t),{...e,kind:r}}},lW=async e=>{let{entryFiles:t,assetFiles:n,configFiles:r}=ZU(await oW(e)),i=[],a=[];for(let e=0;e<t.length;e+=$U){let n=t.slice(e,e+$U),r=await Promise.all(n.map(e=>sW(e)));i.push(...r)}for(let e=0;e<r.length;e+=$U){let t=r.slice(e,e+$U),n=await Promise.all(t.map(e=>sW(e)));a.push(...n)}let{entries:o,errors:s}=await XU(i),c=[];for(let e=0;e<n.length;e+=$U){let t=n.slice(e,e+$U),r=await Promise.all(t.map(e=>cW(e)));c.push(...r)}JL.set(o),dU.set(c),IU.set(a),YL.set(s),GL.set(!0)},uW=()=>`move`in FileSystemFileHandle.prototype&&!zV.isBrave,dW=async(e,t)=>{let n=await e.createWritable?.();try{await n?.write(t)}finally{try{await n?.close()}catch{}}},fW=async({rootDirHandle:e,previousPath:t,path:n})=>{let{dirname:r,basename:i}=qj(n),{dirname:a,basename:o}=qj(t),s=await tW(e,t);if(uW())return await s.move(await nW(e,r),i),s;let c=await tW(e,n),l=await nW(e,a);return await dW(c,await s.getFile()),await l.removeEntry(o),c},pW=async({rootDirHandle:e,fileHandle:t,path:n,data:r})=>{let i;if(!t){if(uW()){let{dirname:r,basename:a}=qj(FA(n));t=await tW(e,`${r?`${r}/`:``}.sveltia-tmp-${crypto.randomUUID()}`),i={dirname:r,basename:a}}else t=await tW(e,n)}if(await dW(t,r),i){let{dirname:n,basename:r}=i;await t.move(await nW(e,n),r)}return t.getFile()},mW=async(e,t)=>{for(let n=t.length;n>0;--n){let r=t[n-1],i=await nW(e,t.slice(0,n-1).join(`/`)),a=await i.getDirectoryHandle(r);for await(let e of a.entries())return;await i.removeEntry(r)}},hW=async({rootDirHandle:e,path:t})=>{let{dirname:n=``,basename:r}=qj(FA(t));await(await nW(e,n)).removeEntry(r),n&&await mW(e,n.split(`/`))},gW=async(e,{action:t,path:n,previousPath:r,data:i})=>{let a;return t===`move`&&r&&(a=await fW({rootDirHandle:e,previousPath:r,path:n})),[`create`,`update`,`move`].includes(t)&&i?pW({rootDirHandle:e,fileHandle:a,path:n,data:i}):(t===`delete`&&await hW({rootDirHandle:e,path:n}),null)},_W=async(e,t)=>{let n=await Promise.all(t.map(async t=>{let{path:n,data:r}=t,i=null;if(e)try{i=await gW(e,t)}catch(e){console.error(e)}if(!i){if(r===void 0)return null;i=Tz(r)}return[n,{file:i,sha:await Ez(i)}]}));return{sha:await Ez(new Date().toJSON()),files:Object.fromEntries(n.filter(e=>!!e))}},vW=`local`,yW=`Local Repository`,bW=void 0,xW={service:``,label:``,owner:``,repo:``,branch:``},SW=new Proxy({},{get:(e,t)=>(bW??xW)[t]}),CW=`root_dir_handle`,wW=void 0,TW=void 0,EW=async({forceReload:e=!1,showPicker:t=!0}={})=>{if(!(`showDirectoryPicker`in window))throw Error(`unsupported`);let n=e?null:await wW?.get(CW)??null;if(n){if(await n.requestPermission({mode:`readwrite`})!==`granted`)n=null;else try{await n.entries().next()}catch(e){n=null,console.error(e)}}if(!n&&t&&(n=await window.showDirectoryPicker(),n)){try{await n.getDirectoryHandle(`.git`)}catch(e){if(e.name===`TypeMismatchError`)await n.getFileHandle(`.git`);else throw e}await wW?.set(CW,n)}return n},DW={isGit:!1,name:vW,label:yW,repository:SW,init:()=>{let{name:e}=A($H).backend;bW=ZJ[e]?.init?.();let{databaseName:t}=bW??{};return wW=t?new UA(t,`file-system-handles`):null,SW},signIn:async({auto:e=!1})=>{let t=await EW({showPicker:!e});if(t)TW=t;else throw Error(`Directory handle could not be acquired`);return{backendName:vW}},signOut:async()=>{await wW?.delete(CW)},fetchFiles:async()=>{await lW(TW)},commitChanges:async e=>_W(TW,e)},OW=`sveltia-cms-test`,kW=`test-repo`,AW=`Test`,jW=void 0,MW={isGit:!1,name:kW,label:AW,init:()=>void 0,signIn:async()=>{try{jW=await nW(await navigator.storage.getDirectory(),OW)}catch{}return{backendName:kW}},signOut:async()=>{},fetchFiles:async()=>{jW?await lW(jW):GL.set(!0)},commitChanges:async e=>_W(jW,e)},NW=`gitea`,PW=`Gitea / Forgejo`,FW=`https://gitea.com/api/v1`,IW=`https://gitea.com`,LW=`login/oauth/authorize`,RW=1.24,zW=ao({account:void 0});jo(()=>{B(()=>{let e=zW.account;(async()=>{try{e?await GA.set(`sveltia-cms.user`,e):e===null&&await GA.delete(`sveltia-cms.user`)}catch{}})()})});var BW={clientId:``,authScope:``,authURL:``,tokenURL:``,authScheme:`token`,restBaseURL:``,graphqlBaseURL:``,includeCredentials:!1},VW={},HW=async({clientId:e,tokenURL:t,refreshToken:n})=>{let r,i=``;if(!BV(t))throw Error(Z(`sign_in_error.TOKEN_REFRESH_FAILED`));try{r=await fetch(t,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({grant_type:`refresh_token`,client_id:e,refresh_token:n}),...BW.includeCredentials&&{credentials:`include`}})}catch{}if(!r?.ok)throw Error(Z(`sign_in_error.TOKEN_REFRESH_FAILED`));return{access_token:i,refresh_token:n}=await r.json(),zW.account=zW.account?{...zW.account,token:i,refreshToken:n}:zW.account,{token:i,refreshToken:n}},UW=async(e,{method:t=`GET`,headers:n={},body:r=null,isGraphQL:i=!1,responseType:a=`json`,token:o=void 0,refreshToken:s=void 0}={})=>{let{clientId:c,tokenURL:l,restBaseURL:u,graphqlBaseURL:d,authScheme:f=`token`,includeCredentials:p}=BW,m=zW.account,h=i?d:u;return o??=m?.token,s??=m?.refreshToken,n.Authorization=`${f} ${o}`,VV(`${h}${e}`,{method:t,headers:n,body:r,...p&&{credentials:`include`}},{responseType:a,refreshAccessToken:s?()=>HW({clientId:c,tokenURL:l,refreshToken:s}):void 0})},WW=async(e,t={})=>{e=e.replace(/\n\s*/g,` `),Object.entries(VW).forEach(([n,r])=>{e.includes(`$${n}`)&&(t[n]??=r)});let{data:n}=await UW(``,{method:`POST`,body:{query:e,variables:t},isGraphQL:!0});return n},GW=async({token:e,refreshToken:t},n,r)=>{let i=await UW(`/user`,{token:e,refreshToken:t}),a=zW.account;return a?.token&&a.token!==e&&(e=a.token,t=a.refreshToken),{backendName:n,id:i.id,name:i[r.name],login:i[r.login],email:i.email,avatarURL:i.avatar_url,profileURL:i[r.profileURL],bot:i.bot??!1,token:e,refreshToken:t}},KW=e=>GW(e,NW,{name:`full_name`,login:`login`,profileURL:`html_url`}),qW=na(!1),JW=({authURL:e})=>{let{availHeight:t,availWidth:n}=window.screen,r=t/2-400,i=n/2-300;return window.open(e,`auth`,`width=600,height=800,top=${r},left=${i}`)},YW=async({backendName:e,authURL:t,popup:n})=>(n??=JW({authURL:t}),new Promise((r,i)=>{let a=new AbortController,o=e===`github`?setInterval(()=>{n?.closed&&(a.abort(),clearInterval(o),i(Object.assign(Error(`Authentication aborted`),{name:`AbortError`})))},1e3):0;window.addEventListener(`message`,({origin:s,data:c})=>{if(s!==new URL(t).origin||typeof c!=`string`)return;let l=e;if(c===`authorizing:${l}`){n?.postMessage(c,s);return}let{result:u}=c.match(`^authorization:${l}:(success|error):(?<result>.+)`)?.groups??{},d;try{d=u?JSON.parse(u):{error:`No data`},or(d)||(d={error:`Malformed data`})}catch{d={error:`Malformed data`}}`token`in d?r(d):i(Error(`Authentication failed`,{cause:Error(d.errorCode?Z(`sign_in_error.${d.errorCode}`,{default:d.error}):d.error)})),a.abort(),clearInterval(o),n?.close()},{signal:a.signal})})),XW=async({backendName:e,siteDomain:t,authURL:n,scope:r})=>{let{hostname:i}=window.location;t??=i===`localhost`?`cms.netlify.com`:i;try{new URL(n).origin===`https://api.netlify.com`&&(t=new URL(`https://${t}`).hostname)}catch{}return YW({backendName:e,authURL:`${n}?${new URLSearchParams({provider:e,site_id:t,scope:r})}`})},ZW=async()=>{let e=`${Ef()}${Ef()}`,t=btoa(await Df(e,{algorithm:`SHA-256`,format:`binary`})).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``);return{csrfToken:Tf().replaceAll(`-`,``),codeVerifier:e,codeChallenge:t}},QW=async({backendName:e,clientId:t,authURL:n,scope:r})=>{let{origin:i,pathname:a}=window.location,o=`${i}${a}`,s=JW({authURL:o});if(!s)throw Object.assign(Error(`Authentication aborted`),{name:`AbortError`});let{csrfToken:c,codeVerifier:l,codeChallenge:u}=await ZW(),d=new URLSearchParams({client_id:t,redirect_uri:o,response_type:`code`,state:c,scope:r,code_challenge:u,code_challenge_method:`S256`});if(await GA.set(`sveltia-cms.auth`,{csrfToken:c,codeVerifier:l,realAuthURL:`${n}?${d}`}),await GA.set(`sveltia-cms.user`,{backendName:e}),s.closed)throw Object.assign(Error(`Authentication aborted`),{name:`AbortError`});return YW({backendName:e,authURL:o,popup:s})},$W=({provider:e=`unknown`,token:t,refreshToken:n,error:r,errorCode:i})=>{let a=r?`error`:`success`,o=r?{provider:e,error:r,errorCode:i}:{provider:e,token:t,refreshToken:n},s=({data:t,origin:n})=>{t===`authorizing:${e}`&&(window.opener?.postMessage(`authorization:${e}:${a}:${JSON.stringify(o)}`,n),window.removeEventListener(`message`,s))};window.addEventListener(`message`,s),window.opener?.postMessage(`authorizing:${e}`,window.location.origin)},eG=async({backendName:e,apiConfig:t,code:n,state:r})=>{let{clientId:i,tokenURL:a,includeCredentials:o=!1}=t,{origin:s,pathname:c}=new URL(window.location.href),{csrfToken:l,codeVerifier:u}=await GA.get(`sveltia-cms.auth`)??{},d=e,f=`${s}${c}`;if(await GA.delete(`sveltia-cms.auth`),!l||!u||r!==l)return $W({provider:d,error:Z(`sign_in_error.CSRF_DETECTED`),errorCode:`CSRF_DETECTED`});let p,m=``,h=``,g=``;if(!BV(a))return $W({provider:d,error:Z(`sign_in_error.TOKEN_REQUEST_FAILED`),errorCode:`TOKEN_REQUEST_FAILED`});try{p=await fetch(a,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({grant_type:`authorization_code`,client_id:i,code:n,redirect_uri:f,code_verifier:u}),...o&&{credentials:`include`}})}catch{}if(!p)return $W({provider:d,error:Z(`sign_in_error.TOKEN_REQUEST_FAILED`),errorCode:`TOKEN_REQUEST_FAILED`});try{({access_token:m,refresh_token:h,error:g}=await p.json())}catch{return $W({provider:d,error:Z(`sign_in_error.MALFORMED_RESPONSE`),errorCode:`MALFORMED_RESPONSE`})}return $W({provider:d,token:m,refreshToken:h,error:g})},tG=async({backendName:e,apiConfig:t})=>{qW.set(!0);let{search:n}=window.location,{code:r,state:i}=Object.fromEntries(new URLSearchParams(n));if(r&&i)await eG({backendName:e,apiConfig:t,code:r,state:i});else{let{realAuthURL:e}=await GA.get(`sveltia-cms.auth`)??{};e&&(window.location.href=e)}},nG=async({auto:e,apiConfig:t})=>{let{backend:n}=A($H),{name:r,site_domain:i,auth_type:a}=n,{clientId:o,authScope:s,authURL:c}=t,l={backendName:r,authURL:c,scope:s};if(r===`gitea`||a===`pkce`){let n=window.opener?.origin===window.location.origin&&window.name===`auth`;return n&&await tG({backendName:r,apiConfig:t}),n||e?void 0:QW({...l,clientId:o})}if(!e)return XW({...l,siteDomain:i})},rG=async({options:{token:e,refreshToken:t,auto:n=!1},apiConfig:r})=>{if(!e){let i=await nG({auto:n,apiConfig:r});if(!i)return;({token:e,refreshToken:t}=i)}return{token:e,refreshToken:t}},iG=e=>{let{origin:t}=new URL(e);return`${t}/user/settings/applications`},aG=async e=>{let{token:t,refreshToken:n}=await rG({options:e,apiConfig:BW})??{};if(t)return KW({token:t,refreshToken:n})},oG=async()=>void 0,sG={service:``,label:``,owner:``,repo:``,branch:``,repoURL:``,treeBaseURL:``,blobBaseURL:``,isSelfHosted:!1,databaseName:``},cG=(e,t)=>`${e===`https://api.github.com`?`https://github.com`:e.replace(/\/api(?:\/v\d+)?(?:\/.*)?/,``)}/${t}`,lG={...sG},uG=null,dG=(e,t)=>({treeBaseURL:t?`${e}/src/branch/${t}`:e,blobBaseURL:t?`${e}/src/branch/${t}`:``,commitBaseURL:`${e}/commit`}),fG=async()=>{let{owner:e,repo:t}=lG;return uG??=await UW(`/repos/${e}/${t}`),uG},pG=async()=>{let{repo:e}=lG;try{let{permissions:t}=await fG();if(!t?.pull)throw Error(`Not a collaborator of the repository`,{cause:Error(Z(`repository_no_access`,{values:{repo:e}}))})}catch(t){throw t instanceof Error&&t.message.includes(`Not a collaborator`)?t:Error(`Failed to check repository access`,{cause:Error(Z(`repository_not_found`,{values:{repo:e}}))})}},mG=async()=>{let{repo:e,repoURL:t=``}=lG;try{let{default_branch:n}=await fG();if(!n)throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_empty`,{values:{repo:e}}))});return Object.assign(lG,{branch:n},dG(t,n)),n}catch{throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_not_found`,{values:{repo:e}}))})}},hG=`sveltia-cms/`,gG=[`netlify-cms/`,`decap-cms/`],_G=[`draft`,`pending_review`,`pending_publish`],vG=[`draft`,`pending_review`],yG=[..._G,`pending_deletion`],bG={draft:`status.draft`,pending_review:`status.in_review`,pending_publish:`status.ready`,pending_deletion:`status.pending_deletion`},xG=na(),SG=ra([xG],([e])=>!!e),CG=ra([SG],([e])=>e?vG:_G),wG=na(),TG=async e=>(A(wG)?.respond(!1),new Promise(t=>{let n={repo:e,respond:e=>{A(wG)===n&&wG.set(void 0),t(e)}};wG.set(n)})),EG={create:`Create {{collection}} “{{slug}}”`,update:`Update {{collection}} “{{slug}}”`,delete:`Delete {{collection}} “{{slug}}”`,uploadMedia:`Upload “{{path}}”`,deleteMedia:`Delete “{{path}}”`,openAuthoring:`{{message}}`},DG=/\[(?:skip[ -](?:ci|actions)|(?:ci|actions)[ -]skip|no[ -]ci|cf-pages-skip)\]/i,OG=e=>DG.test(e),kG=(e,{commitType:t=`update`,collection:n,skipCI:r=void 0})=>{let{commit_messages:i={},skip_ci:a,automatic_deployments:o}=A($H)?.backend??{},{email:s=``,login:c=``,name:l=``}=zW.account,[u=``]=e.map(e=>e.slug).filter(Boolean),[d,...f]=e.map(({path:e})=>e),p=n?UL(n,{useSingular:!0}):``,m=i[t]||EG[t]||``;return[`create`,`update`,`delete`].includes(t)&&(m=m.replaceAll(`{{slug}}`,u).replaceAll(`{{collection}}`,p).replaceAll(`{{path}}`,d).replaceAll(`{{author-email}}`,s).replaceAll(`{{author-login}}`,c).replaceAll(`{{author-name}}`,l)),[`uploadMedia`,`deleteMedia`].includes(t)&&(m=m.replaceAll(`{{path}}`,d).replaceAll(`{{author-email}}`,s).replaceAll(`{{author-login}}`,c).replaceAll(`{{author-name}}`,l)),f.length&&(m+=` +${f.length}`),A(SG)&&(m=(i.openAuthoring||EG.openAuthoring).replaceAll(`{{message}}`,m).replaceAll(`{{author-email}}`,s).replaceAll(`{{author-login}}`,c).replaceAll(`{{author-name}}`,l)),![`delete`,`deleteMedia`].includes(t)&&(r??(a===!0||o===!1))&&(m=`[skip ci] ${m}`),m},AG=async()=>{let{owner:e,repo:t,branch:n}=lG;try{let{commit:{id:r,message:i}}=await UW(`/repos/${e}/${t}/branches/${n}`);return{hash:r,message:i}}catch{throw Error(`Failed to retrieve the last commit hash.`,{cause:Error(Z(`branch_not_found`,{values:{repo:t,branch:n}}))})}},jG=async(e,t)=>{let{owner:n,repo:r,branch:i}=lG,a=kG(e,t),{name:o,email:s}=zW.account,c=new Date().toJSON(),l=await Promise.all(e.map(async({action:e,path:t,previousPath:n,previousSha:r,data:i=``})=>({operation:e===`move`?`update`:e,path:t,content:await Zj(i),from_path:n,sha:r}))),{commit:u,files:d}=await UW(`/repos/${n}/${r}/contents`,{method:`POST`,body:{branch:i,author:{name:o,email:s},committer:{name:o,email:s},dates:{author:c,committer:c},message:a,files:l}});return{sha:u.sha,date:new Date(u.created),files:Object.fromEntries(d.map((t,n)=>[t?.path??e[n].path,{sha:t?.sha??``}]))}},MG=async e=>{let{owner:t,repo:n,branch:r}=lG,i=await Promise.all(e.map(e=>UW(`/repos/${t}/${n}/commits?sha=${encodeURIComponent(r??``)}&path=${encodeURIComponent(e)}&limit=100`))),a=new Map;return i.flat().forEach(e=>{a.has(e.sha)||a.set(e.sha,{sha:e.sha,authorName:e.commit?.author?.name??``,authorEmail:e.commit?.author?.email,authorAvatarURL:e.author?.avatar_url,authorLogin:e.author?.login,date:new Date(e.commit?.author?.date??e.created)})}),[...a.values()].sort((e,t)=>t.date.getTime()-e.date.getTime())},NG={isForgejo:!1},PG=async()=>{let{version:e}=await UW(`/version`),t=Number.parseFloat(e),n=t>10,r=n?`Forgejo`:`Gitea`,i=n?12:RW;if(Object.assign(NG,{isForgejo:n}),Object.assign(lG,{label:r}),t<i)throw Error(`Unsupported ${r} version`,{cause:Error(Z(`backend_unsupported_version`,{values:{name:r,version:i}}))})},FG=na({}),IG=na(``),LG=na({published:!0,time:0}),RG=na(!1),zG=e=>{let t=e.filter(e=>!!e);t.length&&FG.update(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))))},BG=()=>{FG.set({}),IG.set(``),RG.set(!1),LG.set({published:!0,time:0})},VG=e=>{LG.set({published:e,time:Date.now()})},HG=ra([LG,FG,IG],([{published:e,time:t},n,r])=>{let i=r?n[r]:void 0;return!i||i.checkedTime<=t?e:i.state===`ready`||i.state===`pending`||i.state!==`error`&&e}),UG=async({metaDB:e,lastCommitHash:t,cachedFileEntries:n,fetchFileList:r})=>{let i=A(eU),{last_config_hash:a,last_commit_hash:o,git_config_fetched:s}=Object.fromEntries(await e.entries());if(a&&a===i&&o&&o===t&&s&&n.length)return ZU(n.map(([e,t])=>({path:e,name:qj(e).basename,...t})));let c=ZU(await r(t));return e.saveEntries(Object.entries({last_config_hash:i,last_commit_hash:t,git_config_fetched:!0})),c},WG=({allFiles:e,cachedFiles:t})=>{e.forEach(({sha:n,path:r},i)=>{t[r]?.sha===n&&Object.assign(e[i],t[r])})},GG=({fileInfo:e,fetchedFileMap:t})=>{let{meta:n,size:r,text:i}=t[e.path]??{};return{...e,size:e.size??r,text:e.text??i,meta:e.meta??n}},KG=e=>{let{name:t,meta:n={},...r}=e,i=MR(t);return{...r,...n,name:t,kind:i}},qG=({entries:e,assets:t,configFiles:n,errors:r=[]})=>{JL.set(e),dU.set(t),IU.set(n),YL.set(r),GL.set(!0)},JG=async({cacheDB:e,allFiles:t,cachedFiles:n,fetchingFiles:r,fetchedFileMap:i})=>{let a=new Set(t.map(({path:e})=>e)),o=Object.keys(n).filter(e=>!a.has(e));r.length&&await e.saveEntries(Object.entries(i)),o.length&&e.deleteEntries(o)},YG=async({repository:e,fetchDefaultBranchName:t,fetchLastCommit:n,fetchFileList:r,fetchFileContents:i})=>{let{databaseName:a,branch:o}=e,s=new UA(a,`meta`),c=new UA(a,`file-cache`),l=await c.entries(),u=o;u||(u=await t(),e.branch=u);let{hash:d,message:f}=await n(),p=await UG({metaDB:s,lastCommitHash:d,cachedFileEntries:l,fetchFileList:r});if(VG(!OG(f)),!p.count){qG({entries:[],assets:[],configFiles:[]});return}let{entryFiles:m,assetFiles:h,configFiles:g,allFiles:_}=p,v=Object.fromEntries(l);WG({allFiles:_,cachedFiles:v});let y=_.filter(({meta:e})=>!e),b=y.length?await i(y):{},{entries:x,errors:S}=await XU(m.map(e=>GG({fileInfo:e,fetchedFileMap:b})));qG({entries:x,assets:h.map(e=>KG(GG({fileInfo:e,fetchedFileMap:b}))),configFiles:g.map(e=>GG({fileInfo:e,fetchedFileMap:b})),errors:S}),await JG({cacheDB:c,allFiles:_,cachedFiles:v,fetchingFiles:y,fetchedFileMap:b})},XG=async e=>{let{owner:t,repo:n,branch:r}=lG,i=`/repos/${t}/${n}/git/trees/${e??r}?recursive=1`,a=[],o=1;for(;;){let{tree:e,truncated:t}=await UW(`${i}&page=${o}`);if(e&&a.push(...e),e&&t)o+=1;else break}return a.filter(({type:e})=>e===`blob`).map(({path:e,sha:t,size:n})=>({path:e,sha:t,size:n,name:qj(e).basename}))},ZG=async(e,t)=>{let n=await Promise.all(e.map(async({path:e,sha:n,size:r},i)=>{let a=t[i];return[e,{sha:n,size:r??0,text:a?.content&&a.encoding===`base64`?await Qj(a.content):``,meta:{}}]}).filter(e=>!!e));return Object.fromEntries(n)},QG=async e=>{let{owner:t,repo:n,branch:r}=lG,{isForgejo:i}=NG,a=i?`/repos/${t}/${n}/git/blobs`:`/repos/${t}/${n}/file-contents?ref=${r}`,o=i?`sha`:`path`,s=e.filter(({type:e})=>e!==`asset`).map(({[o]:e})=>e);if(!s.length)return{};let c=[],l=[...s];KL.set(0);let{default_paging_num:u=30}=await UW(`/settings/api`);for(;;){let e=l.splice(0,u),t=await(i?UW(`${a}?shas=${e.join(`,`)}`):UW(a,{method:`POST`,body:{files:e}}));if(c.push(...t),KL.set(Math.ceil((s.length-l.length)/s.length*100)),!l.length)break}return KL.set(void 0),ZG(e,c)},$G={isGit:!0,name:NW,label:PW,repository:lG,init:()=>{let{backend:e}=A($H)??{};if(e?.name!==`gitea`)return;let{repo:t,branch:n,base_url:r=IW,auth_endpoint:i=LW,app_id:a=``,api_root:o=FW,include_credentials:s=!1}=e,[c,l]=t.split(`/`),u=`${c}/${l}`,d=`${FA(r)}/${FA(i)}`,f=cG(o,u);return Object.assign(lG,{service:NW,label:PW,owner:c,repo:l,branch:n,repoURL:f,tokenPageURL:iG(f),databaseName:`${NW}:${u}`,isSelfHosted:o!==FW},dG(f,n)),Object.assign(BW,{clientId:a,authScope:`read:repository,write:repository,read:user`,authURL:d,tokenURL:d.replace(`/authorize`,`/access_token`),restBaseURL:FA(o),includeCredentials:s}),KH.devModeEnabled&&console.info(`repositoryInfo`,lG),lG},signIn:aG,signOut:oG,fetchFiles:async()=>{await PG(),await pG(),await YG({repository:lG,fetchDefaultBranchName:mG,fetchLastCommit:AG,fetchFileList:XG,fetchFileContents:QG})},fetchBlob:async e=>{let{owner:t,repo:n,branch:r}=lG,{path:i}=e;return UW(`/repos/${t}/${n}/media/${r}/${encodeURI(i)}`,{responseType:`blob`})},commitChanges:jG,fetchFileCommits:MG},eK=`github`,tK=`GitHub`,nK=`https://api.github.com`,rK=`https://api.netlify.com`,iK=`auth`,aK=`https://github.com`,oK=`login/oauth/authorize`,sK=e=>(e=FA(e),e===`https://api.github.com`||e.endsWith(`/api/v3`)?e:e.endsWith(`/api`)?`${e}/v3`:`${e}/api/v3`),cK=e=>(e=FA(e),e===`https://api.github.com`?`${e}/graphql`:e.endsWith(`/graphql`)?e:e.endsWith(`/api/v3`)?e.replace(`/api/v3`,`/graphql`):e.endsWith(`/api`)?`${e}/graphql`:`${e}/api/graphql`),lK=e=>GW(e,eK,{name:`name`,login:`login`,profileURL:`html_url`}),uK=e=>{let{origin:t}=new URL(e);return`${t}/settings/personal-access-tokens/new?${new URLSearchParams({name:`Sveltia CMS`,contents:`write`})}`},dK=async e=>{let{token:t,refreshToken:n}=await rG({options:e,apiConfig:BW})??{};if(t)return lK({token:t,refreshToken:n})},fK=async()=>void 0,pK={...sG},mK=(e,t)=>({treeBaseURL:t?`${e}/tree/${t}`:e,blobBaseURL:t?`${e}/blob/${t}`:``,commitBaseURL:`${e}/commit`}),hK=async()=>{let{owner:e,repo:t}=pK,n=zW.account?.login,{ok:r}=await UW(`/repos/${e}/${t}/collaborators/${encodeURIComponent(n)}`,{headers:{Accept:`application/json`},responseType:`raw`});if(!r)throw Error(`Not a collaborator of the repository`,{cause:Error(Z(`repository_no_access`,{values:{repo:t}}))})},gK=`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
defaultBranchRef {
|
||
name
|
||
}
|
||
}
|
||
}
|
||
`,_K=async()=>{let{repo:e,repoURL:t=``}=pK,n=await WW(gK);if(!n.repository)throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_not_found`,{values:{repo:e}}))});let{name:r}=n.repository.defaultBranchRef??{};if(!r)throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_empty`,{values:{repo:e}}))});return Object.assign(pK,{branch:r},mK(t,r)),Object.assign(VW,{branch:r}),r},vK={interval:1e3,attempts:30},yK=()=>{let{backend:e}=A($H)??{};return e?.name===`github`&&e.open_authoring===!0},bK=()=>A(xG)??{owner:pK.owner,repo:pK.repo},xK=[403,404],SK=({status:e,headers:t})=>e===429||t.get(`retry-after`)!==null||t.get(`x-ratelimit-remaining`)===`0`,CK=async()=>{let{owner:e,repo:t}=pK,n=`${e}/${t}`.toLowerCase();try{return(await UW(`/user/repository_invitations`)).some(({repository:e})=>e?.full_name?.toLowerCase()===n)}catch{return!1}},wK=async e=>{let{owner:t,repo:n}=pK,r=`${t}/${n}`;if(await CK())return Z(`open_authoring.invitation_pending`,{values:{repo:r}});let i=e.headers.get(`x-oauth-scopes`);return i!==null&&!i.split(/,\s*/).includes(`repo`)?Z(`open_authoring.private_repo_scope_required`,{values:{repo:r}}):Z(`repository_no_access`,{values:{repo:r}})},TK=async()=>{let{owner:e,repo:t}=pK,n=`${e}/${t}`,r=await UW(`/repos/${e}/${t}`,{headers:{Accept:`application/json`},responseType:`raw`});if(r.ok){let{permissions:e,private:t,owner:i,allow_forking:a}=await r.json();return t&&i?.type===`User`&&console.warn(`Open Authoring is enabled, but the ${n} repository is private and owned by a personal account. GitHub does not allow read-only collaborators there, so everyone who can sign in can also write to the repository and no one is treated as a contributor. Transfer the repository to an organization to use Open Authoring with it.`),{canWrite:!!e?.push,allowForking:a!==!1}}throw xK.includes(r.status)&&!SK(r)?Error(`No access to the repository`,{cause:Error(await wK(r))}):Error(`Failed to check the repository permission.`,{cause:Error(Z(`open_authoring.permission_check_failed`,{values:{repo:n}}))})},EK=async()=>{let{owner:e,repo:t}=pK,n=zW.account?.login,r=await UW(`/repos/${encodeURIComponent(n)}/${t}`,{headers:{Accept:`application/json`},responseType:`raw`});if(!r.ok)return;let i=await r.json(),a=i.parent?.full_name?.toLowerCase();if(!i.fork||a!==`${e}/${t}`.toLowerCase())return;let[o,s]=i.full_name.split(`/`);return{owner:o,repo:s}},DK=`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
forks(ownerAffiliations: [OWNER], first: 1) {
|
||
nodes {
|
||
nameWithOwner
|
||
owner {
|
||
login
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,OK=async()=>{let e=zW.account?.login;try{let{repository:t}=await WW(DK),[n]=t?.forks?.nodes??[];if(n?.owner?.login!==e)return;let[r,i]=n.nameWithOwner.split(`/`);return{owner:r,repo:i}}catch{return}},kK=async()=>await EK()??OK(),AK=async({owner:e,repo:t},n=vK.attempts)=>{if(!(await UW(`/repos/${e}/${t}`,{headers:{Accept:`application/json`},responseType:`raw`})).ok){if(n<=1)throw Error(`Timed out waiting for the fork to be created.`,{cause:Error(Z(`open_authoring.fork_failed`,{values:{repo:`${e}/${t}`}}))});await vf(vK.interval),await AK({owner:e,repo:t},n-1)}},jK=async()=>{let{owner:e,repo:t}=pK,n;try{n=await UW(`/repos/${e}/${t}/forks`,{method:`POST`})}catch(n){throw console.error(`Failed to fork the repository.`,n),Error(`Failed to fork the repository.`,{cause:Error(Z(`open_authoring.fork_failed`,{values:{repo:`${e}/${t}`}}))})}let[r,i]=n.full_name.split(`/`),a={owner:r,repo:i};return await AK(a),a},MK=async({owner:e,repo:t})=>{let n;try{n=await UW(`/repos/${e}/${t}/merge-upstream`,{method:`POST`,body:{branch:pK.branch},responseType:`raw`})}catch(n){console.warn(`Failed to sync the ${e}/${t} fork with the upstream repository.`,n);return}n.ok||console.warn(`The ${e}/${t} fork could not be fast-forwarded to the upstream repository.`)},NK=async()=>{xG.set(void 0);let{canWrite:e,allowForking:t}=await TK();if(e)return;let{owner:n,repo:r}=pK,i=`${n}/${r}`;pK.branch||await _K();let a=await kK();if(a){await MK(a),xG.set(a);return}if(!t)throw Error(`The repository does not allow forking`,{cause:Error(Z(`open_authoring.forking_disabled`,{values:{repo:i}}))});if(!await TG(i))throw Error(`Permission to fork the repository was declined`,{cause:Error(Z(`open_authoring.fork_declined`))});xG.set(await jK())},PK=`
|
||
query($owner: String!, $repo: String!, $branch: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
ref(qualifiedName: $branch) {
|
||
target {
|
||
... on Commit {
|
||
history(first: 1) {
|
||
nodes {
|
||
oid
|
||
message
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,FK=async e=>{let{owner:t,repo:n}=e?bK():pK,r=e??pK.branch,i=await WW(PK,{owner:t,repo:n,...e?{branch:r}:{}});if(!i.repository)throw Error(`Failed to retrieve the last commit hash.`,{cause:Error(Z(`repository_not_found`,{values:{repo:n}}))});if(!i.repository.ref)throw Error(`Failed to retrieve the last commit hash.`,{cause:Error(Z(`branch_not_found`,{values:{repo:n,branch:r}}))});let{oid:a,message:o}=i.repository.ref.target.history.nodes[0];return{hash:a,message:o}},IK=10485760,LK=async(e,t)=>{if(A(SG)&&!t.branch)throw Error(`Cannot commit directly to the configured repository`,{cause:Error(Z(`open_authoring.direct_commit_unsupported`))});let{owner:n,repo:r}=t.branch?bK():pK,i=t.branch??pK.branch,a=e.filter(({action:e})=>[`create`,`update`,`move`].includes(e)),o=await Promise.all(a.map(async({path:e,data:t})=>({path:e,contents:await Zj(t??``)}))),s=e.filter(({action:e})=>[`move`,`delete`].includes(e)).map(({previousPath:e,path:t})=>({path:e??t})),{createCommitOnBranch:{commit:c}}=await WW(`
|
||
mutation($input: CreateCommitOnBranchInput!) {
|
||
createCommitOnBranch(input: $input) {
|
||
commit {
|
||
oid
|
||
committedDate
|
||
${o.map(({path:e},t)=>{let{data:n}=a[t];return(n instanceof Blob?n.size:new Blob([n??``]).size)<=IK?`file_${t}: file(path: ${JSON.stringify(e)}) { oid }`:``}).filter(Boolean).join(` `)}
|
||
}
|
||
}
|
||
}
|
||
`,{input:{branch:{repositoryNameWithOwner:`${n}/${r}`,branchName:i},expectedHeadOid:t.headOid??(await FK(t.branch)).hash,fileChanges:{additions:o,deletions:s},message:{headline:kG(e,t)}}});return{sha:c.oid,date:new Date(c.committedDate),files:Object.fromEntries(o.map(({path:e},t)=>{let{data:n}=a[t];return[e,{sha:c[`file_${t}`]?.oid,...n instanceof Blob&&n.size>IK?{file:n}:{}}]}))}},RK=async e=>{let t=await WW(`
|
||
query($owner: String!, $repo: String!, $branch: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
${e.map((e,t)=>`
|
||
history_${t}: ref(qualifiedName: $branch) {
|
||
target {
|
||
... on Commit {
|
||
history(first: 100, path: ${JSON.stringify(e)}) {
|
||
nodes {
|
||
oid
|
||
author {
|
||
name
|
||
email
|
||
avatarUrl
|
||
user { login }
|
||
}
|
||
committedDate
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`).join(``)}
|
||
}
|
||
}
|
||
`),n=new Map;return e.forEach((e,r)=>{(t.repository[`history_${r}`]?.target?.history?.nodes??[]).forEach(e=>{n.has(e.oid)||n.set(e.oid,{sha:e.oid,authorName:e.author.name,authorEmail:e.author.email,authorAvatarURL:e.author.avatarUrl,authorLogin:e.author.user?.login,date:new Date(e.committedDate)})})}),[...n.values()].sort((e,t)=>t.date.getTime()-e.date.getTime())},zK=async(e,t)=>{let n=0,r=async()=>{for(;n<e.length;){let r=e[n];n+=1,await t(r)}};await Promise.all(Array(Math.min(10,e.length)).fill(void 0).map(()=>r()))},BK=/netlify|vercel|cloudflare|workers|deploy|preview|pages|render|surge|amplify|firebase/i,VK=/prod/i,HK=/canceled|cancelled|skipped|no (?:changes|build)/i,UK={deployment:2,status:1,check:0},WK=()=>{let{backend:e}=A($H)??{};return(e??{}).preview_context??``},GK=e=>{if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.protocol===`https:`)return t.href.replace(/\/$/,``)},KK=(e,t)=>{if(!e)return;let n=``;try{n=new URL(t??``).host}catch{}return(e.match(/https:\/\/[^\s"'<>)\]]+/g)??[]).map(e=>GK(e)).find(e=>!!e&&new URL(e).host!==n)},qK=(e,t)=>{try{return new URL(e).host===new URL(t).host}catch{return!1}},JK=({name:e,source:t},n)=>!!n||t!==`check`||BK.test(e),YK=(e,{kind:t,previewContext:n})=>{let{name:r,url:i,state:a,source:o}=e,s=VK.test(r);return(JK(e,n)?0:-64)+(i?32:0)+(a===`ready`?16:0)+UK[o]*4+(t===`production`===s?2:0)+ +!!BK.test(r)},XK=(e,{kind:t,selfURL:n})=>{let r=WK(),i=e;if(r){let e=r.toLowerCase(),t=i.filter(({name:t})=>t.toLowerCase()===e);i=t.length?t:i.filter(({name:t})=>t.toLowerCase().includes(e))}if(i=i.filter(({description:e})=>!e||!HK.test(e)),i=i.map(e=>({...e,url:e.state===`ready`&&JK(e,r)&&!qK(e.url,n)?GK(e.url):void 0})),!i.length)return{state:`unknown`,checkedTime:Date.now()};let[a]=i.map((e,n)=>({candidate:e,index:n,score:YK(e,{kind:t,previewContext:r})})).sort((e,t)=>t.score-e.score||t.index-e.index).map(({candidate:e})=>e);return{state:a.state,url:a.url,context:a.name,checkedTime:Date.now()}},ZK=async()=>{let{owner:e,repo:t}=pK;return UW(`/repos/${e}/${t}/dispatches`,{method:`POST`,body:{event_type:`sveltia-cms-publish`},responseType:`raw`})},QK={commits:20,deployments:10,checkSuites:10,checkRuns:20},$K={SUCCESS:`ready`,PENDING:`pending`,EXPECTED:`pending`,FAILURE:`error`,ERROR:`error`},eq={SUCCESS:`ready`,PENDING:`pending`,QUEUED:`pending`,IN_PROGRESS:`pending`,WAITING:`pending`,FAILURE:`error`,ERROR:`error`},tq={SUCCESS:`ready`,NEUTRAL:`ready`,FAILURE:`error`,TIMED_OUT:`error`,STARTUP_FAILURE:`error`,ACTION_REQUIRED:`error`},nq=/preview/i,rq=async()=>{let{repository:e}=await WW(`
|
||
query($owner: String!, $repo: String!, $branch: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
ref(qualifiedName: $branch) {
|
||
target {
|
||
... on Commit {
|
||
oid
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`);return e?.ref?.target?.oid??void 0},iq=(e,t)=>`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
${e.map((e,n)=>`
|
||
commit_${n}: object(oid: ${JSON.stringify(e)}) {
|
||
... on Commit {
|
||
${t}
|
||
}
|
||
}
|
||
`).join(``)}
|
||
}
|
||
}
|
||
`,aq={status:{selection:`status { contexts { context state targetUrl description } }`,parse:(e,t,n)=>{(e?.status?.contexts??[]).forEach(({context:e,state:r,targetUrl:i,description:a})=>{let o=$K[r];o&&n[t].push({name:e??``,url:i??void 0,state:o,description:a??void 0,source:`status`})})}},deployments:{selection:`deployments(
|
||
last: ${QK.deployments}
|
||
orderBy: { field: CREATED_AT, direction: ASC }
|
||
) {
|
||
nodes {
|
||
environment
|
||
latestStatus {
|
||
state
|
||
environmentUrl
|
||
description
|
||
}
|
||
}
|
||
}`,parse:(e,t,n)=>{(e?.deployments?.nodes??[]).forEach(({environment:e,latestStatus:r})=>{let i=eq[r?.state];i&&n[t].push({name:e??``,url:r?.environmentUrl??void 0,state:i,description:r?.description??void 0,source:`deployment`})})}},checks:{selection:`checkSuites(last: ${QK.checkSuites}) {
|
||
nodes {
|
||
checkRuns(last: ${QK.checkRuns}) {
|
||
nodes {
|
||
name
|
||
status
|
||
conclusion
|
||
detailsUrl
|
||
summary
|
||
}
|
||
}
|
||
}
|
||
}`,parse:(e,t,n)=>{(e?.checkSuites?.nodes??[]).forEach(e=>{(e?.checkRuns?.nodes??[]).forEach(({name:e,status:r,conclusion:i,detailsUrl:a,summary:o})=>{let s=r===`COMPLETED`?tq[i]:`pending`;s&&n[t].push({name:e??``,url:KK(o,a)??(nq.test(e??``)?a??void 0:void 0),state:s,source:`check`})})})}}},oq=!1,sq=async(e,t)=>{let{repository:n}=await WW(iq(e,Object.values(aq).map(({selection:e})=>e).join(`
|
||
`)));e.forEach((e,r)=>{Object.values(aq).forEach(({parse:i})=>i(n?.[`commit_${r}`],e,t))})},cq=async(e,t)=>{await Promise.all(Object.values(aq).map(async({selection:n,parse:r})=>{try{let{repository:i}=await WW(iq(e,n));e.forEach((e,n)=>r(i?.[`commit_${n}`],e,t))}catch(e){console.warn(`Failed to fetch the deployment info.`,e)}}))},lq=async e=>{let t=e.filter(({sha:e})=>!!e),n=[...new Set(t.map(({sha:e})=>e))];if(!n.length)return{};let r=Object.fromEntries(n.map(e=>[e,[]])),i=[];for(let e=0;e<n.length;e+=QK.commits)i.push(n.slice(e,e+QK.commits));return await zK(i,async e=>{if(!oq)try{await sq(e,r);return}catch(e){console.warn(`Falling back to a request per deployment source.`,e),oq=!0}await cq(e,r)}),Object.fromEntries(t.map(({sha:e,kind:t})=>[e,XK(r[e],{kind:t,selfURL:pK.repoURL})]))},uq=async e=>{let{owner:t,repo:n,branch:r}=pK;return(await UW(`/repos/${t}/${n}/git/trees/${e??r}?recursive=1`)).tree.filter(({type:e})=>e===`blob`).map(({path:e,sha:t,size:n})=>({path:e,sha:t,size:n,name:qj(e).basename}))},dq=(e,t)=>`
|
||
query($owner: String!, $repo: String!, $branch: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
${e.map(({type:e,path:n,sha:r},i)=>{let a=[],o=t+i;return e!==`asset`&&a.push(`
|
||
content_${o}: object(oid: ${JSON.stringify(r)}) {
|
||
... on Blob { text }
|
||
}
|
||
`),a.push(`
|
||
commit_${o}: ref(qualifiedName: $branch) {
|
||
target {
|
||
... on Commit {
|
||
history(first: 1, path: ${JSON.stringify(n)}) {
|
||
nodes {
|
||
author {
|
||
name
|
||
email
|
||
user {
|
||
id: databaseId
|
||
login
|
||
}
|
||
}
|
||
committedDate
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`),a.join(``)}).join(``)}
|
||
}
|
||
}
|
||
`,fq=async(e,t)=>{let n=e.map(({path:e,sha:n,size:r},i)=>{let{author:{name:a,email:o,user:s},committedDate:c}=t[`commit_${i}`].target.history.nodes[0];return[e,{sha:n,size:r,text:t[`content_${i}`]?.text,meta:{commitAuthor:{name:a,email:o,id:s?.id,login:s?.login},commitDate:new Date(c)}}]});return Object.fromEntries(n)},pq=async e=>{let t=structuredClone(e),n=[],r={};KL.set(0);let i=window.setInterval(()=>{KL.update((e=0)=>e+1)},t.length/10);for(let e=0;e<t.length;e+=250)n.push(t.slice(e,e+250));return await Promise.all(n.map(async(e,t)=>{await vf(t*500);let n=await WW(dq(e,t*250));Object.assign(r,n.repository)})),window.clearInterval(i),KL.set(void 0),fq(t,r)},mq=async()=>{yK()?await NK():await hK(),await YG({repository:pK,fetchDefaultBranchName:_K,fetchLastCommit:FK,fetchFileList:uq,fetchFileContents:pq})},hq=async e=>{let{owner:t,repo:n}=e.workflow?bK():pK,{sha:r,path:i}=e,a=await UW(`/repos/${t}/${n}/git/blobs/${r}`,{headers:{Accept:`application/vnd.github.raw`},responseType:`raw`});return a.headers.get(`Content-Type`)===`application/octet-stream`?a.blob():new Blob([await a.text()],{type:DR.getType(i)??`text/plain`})},gq=`https://www.githubstatus.com/`,_q=`https://www.githubstatus.com/api/v2/status.json`,vq=async()=>{try{let{status:{indicator:e}}=await VV(_q);if(e===`none`)return`none`;if(e===`minor`)return`minor`;if(e===`major`||e===`critical`)return`major`}catch{}return`unknown`},yq=()=>{let e=A(xG);return e?`cms/${e.owner}/${e.repo}/`:`cms/`},bq=({collectionName:e,slug:t})=>`${yq()}${e}/${t}`,xq=e=>{let t=yq();if(!e.startsWith(t))return;let n=e.slice(t.length),r=n.indexOf(`/`);if(!(r<1||r===n.length-1))return{collectionName:n.slice(0,r),slug:n.slice(r+1)}},Sq=()=>{let{backend:e}=A($H)??{};return(e&&`cms_label_prefix`in e?e.cms_label_prefix:void 0)||`sveltia-cms/`},Cq=()=>[...new Set([Sq(),hG,...gG])],wq=e=>`${Sq()}${e}`,Tq=()=>Cq().flatMap(e=>yG.map(t=>`${e}${t}`)),Eq=e=>{let t;return Cq().some(n=>(t=yG.find(t=>e.includes(`${n}${t}`)),!!t)),t},Dq={pullRequests:100,files:100,labels:100,branches:100,branchPullRequests:2},Oq=()=>`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
pullRequests(
|
||
states: OPEN
|
||
labels: ${JSON.stringify(Tq())}
|
||
first: ${Dq.pullRequests}
|
||
orderBy: { field: UPDATED_AT, direction: DESC }
|
||
) {
|
||
nodes {
|
||
id
|
||
number
|
||
title
|
||
url
|
||
isDraft
|
||
isCrossRepository
|
||
createdAt
|
||
updatedAt
|
||
headRefName
|
||
headRefOid
|
||
author {
|
||
login
|
||
avatarUrl
|
||
... on User {
|
||
name
|
||
email
|
||
databaseId
|
||
}
|
||
}
|
||
labels(first: ${Dq.labels}) {
|
||
nodes {
|
||
name
|
||
}
|
||
}
|
||
files(first: ${Dq.files}) {
|
||
nodes {
|
||
path
|
||
changeType
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,kq=e=>{if(e.isCrossRepository)return;let t=Eq(e.labels.nodes.map(e=>e.name));if(!t)return;let{login:n,name:r,email:i,databaseId:a}=e.author??{};return{number:e.number,nodeId:e.id,title:e.title,url:e.url,branch:e.headRefName,headSHA:e.headRefOid,status:t,createdDate:new Date(e.createdAt),updatedDate:new Date(e.updatedAt),author:n?{name:r??n,email:i??``,id:a,login:n}:void 0,files:(e.files?.nodes??[]).map(({path:e,changeType:t})=>({path:e,sha:``,size:0,deleted:t===`DELETED`,renamed:t===`RENAMED`}))}},Aq=async e=>{let{owner:t,repo:n}=pK;e.files=(await UW(`/repos/${t}/${n}/pulls/${e.number}/files?per_page=${Dq.files}`)).map(({filename:e,status:t,previous_filename:n})=>({path:e,sha:``,size:0,deleted:t===`removed`,previousPath:n}))},jq=async e=>{let t=[];if(e.forEach(e=>{e.files.forEach(n=>{n.deleted||t.push({pullRequest:e,file:n})})}),!t.length)return;let{repository:n}=await WW(`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
${t.map(({pullRequest:e,file:t},n)=>`
|
||
file_${n}: object(expression: ${JSON.stringify(`${e.branch}:${t.path}`)}) {
|
||
... on Blob {
|
||
oid
|
||
byteSize
|
||
isBinary
|
||
text
|
||
}
|
||
}
|
||
`).join(``)}
|
||
}
|
||
}
|
||
`,bK());t.forEach(({file:e},t)=>{let r=n?.[`file_${t}`];r?Object.assign(e,{sha:r.oid,size:r.byteSize,text:r.isBinary?void 0:r.text??void 0}):e.deleted=!0})},Mq=async()=>{let{repository:e}=await WW(Oq()),t=(e?.pullRequests?.nodes??[]).map(kq).filter(Boolean);return await zK(t.filter(({files:e})=>e.some(({renamed:e})=>e)),Aq),await jq(t),t},Nq=async e=>{let{owner:t,repo:n}=bK();try{await UW(`/repos/${t}/${n}/git/refs/heads/${encodeURI(e)}`,{method:`DELETE`,responseType:`raw`})}catch(t){console.warn(`Failed to delete the ${e} branch.`,t)}},Pq=()=>`
|
||
query($owner: String!, $repo: String!, $prefix: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
refs(refPrefix: $prefix, first: ${Dq.branches}) {
|
||
nodes {
|
||
name
|
||
target {
|
||
... on Commit {
|
||
oid
|
||
message
|
||
committedDate
|
||
author {
|
||
name
|
||
email
|
||
user {
|
||
login
|
||
databaseId
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,Fq=e=>`
|
||
query($owner: String!, $repo: String!) {
|
||
repository(owner: $owner, name: $repo) {
|
||
${e.map((e,t)=>`
|
||
pr_${t}: pullRequests(
|
||
headRefName: ${JSON.stringify(e)}
|
||
states: [OPEN, CLOSED, MERGED]
|
||
first: ${Dq.branchPullRequests}
|
||
orderBy: { field: CREATED_AT, direction: DESC }
|
||
) {
|
||
nodes {
|
||
id
|
||
number
|
||
title
|
||
url
|
||
state
|
||
isDraft
|
||
createdAt
|
||
updatedAt
|
||
headRefOid
|
||
headRepositoryOwner {
|
||
login
|
||
}
|
||
files(first: ${Dq.files}) {
|
||
nodes {
|
||
path
|
||
changeType
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`).join(``)}
|
||
}
|
||
}
|
||
`,Iq=async e=>{let t=new Map;if(!e.length)return t;let n=A(xG),{repository:r}=await WW(Fq(e));return e.forEach((e,i)=>{let[a]=(r?.[`pr_${i}`]?.nodes??[]).filter(e=>e.headRepositoryOwner?.login===n?.owner);a&&t.set(e,a)}),t},Lq=(e,t,n)=>{let{message:r,committedDate:i,author:a}=e.target??{},o=n?.state===`MERGED`?void 0:n,{login:s,databaseId:c}=a?.user??{},l=o?.state===`OPEN`,u=l&&!o.isDraft;return{number:o?.number,nodeId:o?.id,title:o?.title??r??``,url:o?.url,branch:t,status:u?`pending_review`:`draft`,createdDate:new Date(o?.createdAt??i),updatedDate:new Date(o?.updatedAt??i),author:a?.name?{name:a.name,email:a.email??``,id:c,login:s}:void 0,files:l?(o.files?.nodes??[]).map(({path:e,changeType:t})=>({path:e,sha:``,size:0,deleted:t===`DELETED`,renamed:t===`RENAMED`})):[]}},Rq=async()=>{let{owner:e,repo:t}=bK(),n=yq(),{repository:r}=await WW(Pq(),{owner:e,repo:t,prefix:`refs/heads/${n}`}),i=r?.refs?.nodes??[];i.length===Dq.branches&&console.warn(`Only the first ${Dq.branches} Editorial Workflow branches in the fork are listed. Publish or discard some entries to see the rest.`);let a=i.map(({name:e})=>`${n}${e}`),o=await Iq(a),s=[],c=[];return i.forEach((e,t)=>{let n=a[t],r=o.get(n);r?.state===`MERGED`&&r.headRefOid===e.target?.oid?s.push(n):c.push(Lq(e,n,r))}),await zK(s,Nq),c},zq=async e=>{let{owner:t,repo:n,branch:r}=pK,{owner:i}=bK(),a=`${i}:${e.branch}`,{files:o=[]}=await UW(`/repos/${t}/${n}/compare/${encodeURI(`${r}...${a}`)}?per_page=${Dq.files}`);e.files=o.map(({filename:e,status:t,previous_filename:n})=>({path:e,sha:``,size:0,deleted:t===`removed`,previousPath:n}))},Bq=async()=>{let e=await Rq();await zK(e.filter(({files:e})=>!e.length),zq),await zK(e.filter(({files:e})=>e.some(({renamed:e})=>e)),Aq);let t=e.filter(({files:e})=>e.length);return await jq(t),t},Vq=async()=>A(SG)?Bq():Mq(),Hq=`
|
||
query(
|
||
$forkOwner: String!
|
||
$forkRepo: String!
|
||
$owner: String!
|
||
$repo: String!
|
||
$branch: String!
|
||
) {
|
||
fork: repository(owner: $forkOwner, name: $forkRepo) {
|
||
id
|
||
}
|
||
base: repository(owner: $owner, name: $repo) {
|
||
ref(qualifiedName: $branch) {
|
||
target {
|
||
oid
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,Uq=`
|
||
mutation($input: CreateRefInput!) {
|
||
createRef(input: $input) {
|
||
ref {
|
||
name
|
||
}
|
||
}
|
||
}
|
||
`,Wq=async e=>{let{repo:t}=pK,{owner:n,repo:r}=bK(),{fork:i,base:a}=await WW(Hq,{forkOwner:n,forkRepo:r});if(!i)throw Error(`Failed to create the branch.`,{cause:Error(Z(`repository_not_found`,{values:{repo:r}}))});if(!a)throw Error(`Failed to create the branch.`,{cause:Error(Z(`repository_not_found`,{values:{repo:t}}))});if(!a.ref)throw Error(`Failed to create the branch.`,{cause:Error(Z(`branch_not_found`,{values:{repo:t,branch:pK.branch}}))});let o=a.ref.target.oid;try{await UW(``,{method:`POST`,isGraphQL:!0,body:{query:Uq.replace(/\n\s*/g,` `),variables:{input:{repositoryId:i.id,name:`refs/heads/${e}`,oid:o}}}})}catch(e){let t=e.cause?.message??``;if(!t.includes(`already exists`))throw Error(`Failed to create the branch.`,{cause:Error(t||e.message)});return}return o},Gq=async(e,t)=>{let{owner:n,repo:r}=pK,i=Tq(),{labels:a=[]}=await UW(`/repos/${n}/${r}/issues/${e.number}`),o=[...a.map(({name:e})=>e).filter(e=>!i.includes(e)),wq(t)];await UW(`/repos/${n}/${r}/issues/${e.number}`,{method:`PATCH`,body:{labels:o}})},Kq=async(e,t)=>{await WW(`
|
||
mutation($input: ${t?`ConvertPullRequestToDraftInput`:`MarkPullRequestReadyForReviewInput`}!) {
|
||
${t?`convertPullRequestToDraft`:`markPullRequestReadyForReview`}(input: $input) {
|
||
pullRequest {
|
||
isDraft
|
||
}
|
||
}
|
||
}
|
||
`,{input:{pullRequestId:e.nodeId}})},qq=async({branch:e,title:t,status:n})=>{let{owner:r,repo:i,branch:a}=pK,o=A(xG),s=n===`draft`,c=await UW(`/repos/${r}/${i}/pulls`,{method:`POST`,body:{title:t,head:o?`${o.owner}:${e}`:e,base:a,draft:s,body:`Automatically generated by Sveltia CMS`}}),l={number:c.number,nodeId:c.node_id,title:c.title,url:c.html_url,branch:e,headSHA:c.head?.sha,status:n,createdDate:new Date(c.created_at),updatedDate:new Date(c.updated_at),files:[]};return o||await UW(`/repos/${r}/${i}/issues/${c.number}/labels`,{method:`POST`,body:{labels:[wq(n)]}}),l},Jq=async({changes:e,options:t,branch:n,title:r,status:i,pullRequest:a})=>{let o=a?void 0:await Wq(n),s=await LK(e,{...t,branch:n,headOid:o});return a?{commit:s,pullRequest:a}:A(SG)&&i===`draft`?{commit:s,pullRequest:{title:r,branch:n,status:i,createdDate:s.date,updatedDate:s.date,files:[]}}:{commit:s,pullRequest:await qq({branch:n,title:r,status:i})}},Yq=`
|
||
query($id: ID!) {
|
||
node(id: $id) {
|
||
... on PullRequest {
|
||
state
|
||
isDraft
|
||
}
|
||
}
|
||
}
|
||
`,Xq=async e=>{let{owner:t,repo:n}=pK;await UW(`/repos/${t}/${n}/pulls/${e.number}`,{method:`PATCH`,body:{state:`open`}})},Zq=async(e,t)=>{if(t===`pending_publish`)throw Error(`Cannot mark an entry ready to publish as an Open Authoring contributor`,{cause:Error(Z(`open_authoring.publish_unsupported`))});let{nodeId:n,branch:r,title:i}=e;if(n===void 0)return t===`draft`?{...e,status:t,updatedDate:new Date}:qq({branch:r,title:i,status:t});let{node:a}=await WW(Yq,{id:n}),{state:o,isDraft:s}=a??{};return t===`draft`?o===`OPEN`&&!s&&await Kq(e,!0):(o===`CLOSED`&&await Xq(e),s&&await Kq(e,!1)),{...e,status:t,updatedDate:new Date}},Qq={isGit:!0,name:eK,label:tK,repository:pK,statusDashboardURL:gq,checkStatus:vq,init:()=>{let{backend:e}=A($H)??{};if(e?.name!==`github`)return;let{repo:t,branch:n,auth_type:r=``,base_url:i=r===`pkce`?aK:rK,auth_endpoint:a=r===`pkce`?oK:iK,app_id:o=``,api_root:s=nK,graphql_api_root:c=s,include_credentials:l=!1,auth_scope:u=`repo`}=e,[d,f]=t.split(`/`),p=`${d}/${f}`,m=`${FA(i)}/${FA(a)}`,h=cG(s,p);return Object.assign(pK,{service:eK,label:tK,owner:d,repo:f,branch:n,repoURL:h,tokenPageURL:uK(h),databaseName:`${eK}:${p}`,isSelfHosted:s!==nK},mK(h,n)),Object.assign(BW,{clientId:o,authScope:`${u},user`,authURL:m,tokenURL:m.replace(`/authorize`,`/access_token`),restBaseURL:sK(s),graphqlBaseURL:cK(c),includeCredentials:l}),Object.assign(VW,{owner:d,repo:f,branch:n}),KH.devModeEnabled&&console.info(`repositoryInfo`,pK),pK},signIn:dK,signOut:fK,fetchFiles:mq,fetchBlob:hq,commitChanges:LK,fetchFileCommits:RK,triggerDeployment:ZK,fetchBranchHeadSHA:rq,fetchDeployments:lq,workflow:{fetchPullRequests:Vq,savePullRequest:Jq,updateStatus:async(e,t)=>{if(A(SG))return Zq(e,t);let n=t===`draft`;return await Gq(e,t),n!==(e.status===`draft`)&&await Kq(e,n),{...e,status:t,updatedDate:new Date}},publish:async e=>{if(A(SG))throw Error(`Cannot publish as an Open Authoring contributor`,{cause:Error(Z(`open_authoring.publish_unsupported`))});let{owner:t,repo:n}=pK,{backend:r}=A($H)??{},i=r&&`squash_merges`in r?!!r.squash_merges:!1;await UW(`/repos/${t}/${n}/pulls/${e.number}/merge`,{method:`PUT`,body:{merge_method:i?`squash`:`merge`,commit_title:e.title}}),await Nq(e.branch)},discard:async e=>{let{owner:t,repo:n}=pK;e.number!==void 0&&await UW(`/repos/${t}/${n}/pulls/${e.number}`,{method:`PATCH`,body:{state:`closed`}}),await Nq(e.branch)}}},$q=`gitlab`,eJ=`GitLab`,tJ=`https://gitlab.com/api/v4`,nJ=`https://gitlab.com`,rJ=`oauth/authorize`,iJ=e=>GW(e,$q,{name:`name`,login:`username`,profileURL:`web_url`}),aJ=e=>{let{origin:t}=new URL(e);return`${t}/-/user_settings/personal_access_tokens?${new URLSearchParams({name:`Sveltia CMS`,scopes:`api,read_user`})}`},oJ=async e=>{let{token:t,refreshToken:n}=await rG({options:e,apiConfig:BW})??{};if(t)return iJ({token:t,refreshToken:n})},sJ=async()=>void 0,cJ={...sG},lJ=(e,t)=>({treeBaseURL:t?`${e}/-/tree/${t}`:e,blobBaseURL:t?`${e}/-/blob/${t}`:``,commitBaseURL:`${e}/-/commit`}),uJ=async()=>{let{owner:e,repo:t}=cJ,{id:n,login:r,bot:i}=zW.account,a=`/projects/${encodeURIComponent(`${e}/${t}`)}`,o=await UW(i?`${a}/service_accounts`:`${a}/users?search=${r}`,{headers:{Accept:`application/json`},responseType:`raw`});if(!(o.ok?await o.json():[]).some(e=>e.id===n))throw Error(`Not a collaborator of the repository`,{cause:Error(Z(`repository_no_access`,{values:{repo:t}}))})},dJ=`
|
||
query($fullPath: ID!) {
|
||
project(fullPath: $fullPath) {
|
||
repository {
|
||
rootRef
|
||
}
|
||
}
|
||
}
|
||
`,fJ=async()=>{let{repo:e,repoURL:t=``}=cJ,n=await WW(dJ);if(!n.project)throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_not_found`,{values:{repo:e}}))});let{rootRef:r}=n.project.repository??{};if(!r)throw Error(`Failed to retrieve the default branch name.`,{cause:Error(Z(`repository_empty`,{values:{repo:e}}))});return Object.assign(cJ,{branch:r},lJ(t,r)),Object.assign(VW,{branch:r}),r},pJ=`
|
||
query($fullPath: ID!, $branch: String!) {
|
||
project(fullPath: $fullPath) {
|
||
repository {
|
||
tree(ref: $branch) {
|
||
lastCommit {
|
||
sha
|
||
message
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,mJ=async()=>{let{repo:e,branch:t}=cJ,n=await WW(pJ);if(!n.project)throw Error(`Failed to retrieve the last commit hash.`,{cause:Error(Z(`repository_not_found`,{values:{repo:e}}))});let{lastCommit:r}=n.project.repository.tree??{};if(!r)throw Error(`Failed to retrieve the last commit hash.`,{cause:Error(Z(`branch_not_found`,{values:{repo:e,branch:t}}))});let{sha:i,message:a}=r;return{hash:i,message:a}},hJ=async(e,t)=>{let{owner:n,repo:r}=cJ,i=t.branch??cJ.branch,a=await Promise.all(e.map(async({action:e,path:t,previousPath:n,data:r=``})=>({action:e,content:typeof r==`string`?r:await Zj(r),encoding:typeof r==`string`?`text`:`base64`,file_path:t,previous_path:n}))),o=`/projects/${encodeURIComponent(`${n}/${r}`)}/repository/commits`,s={branch:i,commit_message:kG(e,t),actions:a},c=async e=>await UW(o,{method:`POST`,body:e?{...s,start_branch:e}:s}),l;try{l=await c(t.startBranch)}catch(e){if(!t.startBranch||e.cause?.status!==400)throw e;l=await c(void 0)}let{id:u,committed_date:d}=l,f=await Promise.all(e.map(async({path:e,data:t})=>t===void 0?null:[e,{sha:await Ez(t)}]));return{sha:u,date:new Date(d),files:Object.fromEntries(f.filter(e=>!!e))}},gJ=async e=>{try{let{avatar_url:t}=await UW(`/avatar?email=${encodeURIComponent(e)}&size=48`);return t||void 0}catch{return}},_J=async e=>{let{owner:t,repo:n,branch:r}=cJ,i=encodeURIComponent(`${t}/${n}`),a=await Promise.all(e.map(e=>UW(`/projects/${i}/repository/commits?ref_name=${encodeURIComponent(r??``)}&path=${encodeURIComponent(e)}&per_page=100`))),o=new Map;a.flat().forEach(e=>{o.has(e.id)||o.set(e.id,{sha:e.id,authorName:e.author_name,authorEmail:e.author_email,authorAvatarURL:void 0,date:new Date(e.committed_date)})});let s=[...new Set([...o.values()].map(e=>e.authorEmail))].filter(e=>!!e),c=new Map(await Promise.all(s.map(async e=>[e,await gJ(e)]))),l=[...o.values()].sort((e,t)=>t.date.getTime()-e.date.getTime());return l.forEach(e=>{e.authorAvatarURL=c.get(e.authorEmail)}),l},vJ={mergeRequests:100,files:100},yJ=/^\s*(?:\[draft\]|\(draft\)|draft:|draft\s|\[wip\]|\(wip\)|wip:|wip\s)\s*/i,bJ=`Draft: `,xJ=()=>{let{owner:e,repo:t}=cJ;return encodeURIComponent(`${e}/${t}`)},SJ=e=>{let t=e;for(;yJ.test(t);)t=t.replace(yJ,``);return t},CJ=e=>{let t=Eq(e.labels??[]);if(!t)return;let{name:n,username:r,id:i}=e.author??{};return{number:e.iid,nodeId:String(e.id),title:SJ(e.title),url:e.web_url,branch:e.source_branch,headSHA:e.sha,status:t,createdDate:new Date(e.created_at),updatedDate:new Date(e.updated_at),author:r?{name:n??r,email:``,id:i,login:r}:void 0,files:[]}},wJ=async e=>{e.files=(await UW(`/projects/${xJ()}/merge_requests/${e.number}/diffs?per_page=${vJ.files}`)).map(e=>({path:e.deleted_file?e.old_path:e.new_path,sha:``,size:0,deleted:!!e.deleted_file,previousPath:e.renamed_file?e.old_path:void 0}))},TJ=`
|
||
query($fullPath: ID!, $branch: String!, $paths: [String!]!) {
|
||
project(fullPath: $fullPath) {
|
||
repository {
|
||
blobs(ref: $branch, paths: $paths) {
|
||
nodes {
|
||
path
|
||
oid
|
||
size
|
||
rawTextBlob
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,EJ=async e=>{let t=e.files.filter(({deleted:e})=>!e);if(!t.length)return;let{project:n}=await WW(TJ,{branch:e.branch,paths:t.map(({path:e})=>e)}),r=new Map((n?.repository?.blobs?.nodes??[]).map(e=>[e.path,e]));t.forEach(e=>{let t=r.get(e.path);t?Object.assign(e,{sha:t.oid,size:Number(t.size)||0,text:t.rawTextBlob??void 0}):e.deleted=!0})},DJ=async()=>{let e=new Map;await zK(Tq(),async t=>{(await UW(`/projects/${xJ()}/merge_requests?state=opened&order_by=updated_at&per_page=${vJ.mergeRequests}&labels=${encodeURIComponent(t)}`)).forEach(t=>{let n=CJ(t);n&&e.set(t.iid,n)})});let t=[...e.values()].sort((e,t)=>t.updatedDate.getTime()-e.updatedDate.getTime());return await zK(t,async e=>{await wJ(e),await EJ(e)}),t},OJ=async e=>{try{await UW(`/projects/${xJ()}/repository/branches/${encodeURIComponent(e)}`,{method:`DELETE`,responseType:`raw`})}catch(t){console.warn(`Failed to delete the ${e} branch.`,t)}},kJ=async({branch:e,title:t,status:n})=>{let r=n===`draft`,i=await UW(`/projects/${xJ()}/merge_requests`,{method:`POST`,body:{title:r?`${bJ}${t}`:t,source_branch:e,target_branch:cJ.branch,labels:wq(n),description:`Automatically generated by Sveltia CMS`,remove_source_branch:!0}});return{number:i.iid,nodeId:String(i.id),title:t,url:i.web_url,branch:e,headSHA:i.sha,status:n,createdDate:new Date(i.created_at),updatedDate:new Date(i.updated_at),files:[]}},AJ={fetchPullRequests:DJ,savePullRequest:async({changes:e,options:t,branch:n,title:r,status:i,pullRequest:a})=>{let o=a?void 0:cJ.branch;return{commit:await hJ(e,{...t,branch:n,startBranch:o}),pullRequest:a??await kJ({branch:n,title:r,status:i})}},updateStatus:async(e,t)=>{let n=wq(t),r=t===`draft`?`${bJ}${e.title}`:e.title;return await UW(`/projects/${xJ()}/merge_requests/${e.number}`,{method:`PUT`,body:{title:r,add_labels:n,remove_labels:Tq().filter(e=>e!==n).join(`,`)}}),{...e,status:t,updatedDate:new Date}},publish:async e=>{let{backend:t}=A($H)??{},n=t&&`squash_merges`in t?!!t.squash_merges:!1;await UW(`/projects/${xJ()}/merge_requests/${e.number}/merge`,{method:`PUT`,body:{squash:n,should_remove_source_branch:!0,...e.headSHA?{sha:e.headSHA}:{},...n?{squash_commit_message:e.title}:{merge_commit_message:e.title}}}),await OJ(e.branch)},discard:async e=>{await UW(`/projects/${xJ()}/merge_requests/${e.number}`,{method:`PUT`,body:{state_event:`close`}}),await OJ(e.branch)}},jJ=100,MJ=6048e5,NJ={success:`ready`,pending:`pending`,running:`pending`,created:`pending`,preparing:`pending`,manual:`pending`,scheduled:`pending`,waiting_for_resource:`pending`,failed:`error`,canceled:`error`},PJ={success:`ready`,created:`pending`,running:`pending`,blocked:`pending`,failed:`error`,canceled:`error`},FJ=async()=>{let{branch:e}=cJ;if(e)return(await UW(`/projects/${xJ()}/repository/branches/${encodeURIComponent(e)}`))?.commit?.id??void 0},IJ=async(e,t)=>{let n=new Date(Date.now()-MJ).toISOString();[...await UW(`/projects/${xJ()}/deployments?order_by=updated_at&sort=desc&per_page=${jJ}&updated_after=${encodeURIComponent(n)}`)??[]].reverse().forEach(({ref:n,status:r,environment:i})=>{let a=PJ[r],o=i?.external_url??void 0;a&&e.forEach(({sha:e,branch:r})=>{n===r&&t[e].push({name:i?.name??``,url:o,state:a,source:`deployment`})})})},LJ=async({sha:e},t)=>{(await UW(`/projects/${xJ()}/repository/commits/${encodeURIComponent(e)}/statuses?per_page=${jJ}`)??[]).forEach(({name:n,status:r,target_url:i,description:a})=>{let o=NJ[r];o&&t[e].push({name:n??``,url:i??void 0,state:o,description:a??void 0,source:`status`})})},RJ=async e=>{let t=e.filter(({sha:e})=>!!e);if(!t.length)return{};let n=Object.fromEntries(t.map(({sha:e})=>[e,[]])),r=async e=>{try{await e()}catch(e){console.warn(`Failed to fetch the deployment info.`,e)}};return await Promise.all([r(()=>IJ(t,n)),zK([...new Set(t.map(({sha:e})=>e))],async e=>r(()=>LJ({sha:e,branch:``,kind:`preview`},n)))]),Object.fromEntries(t.map(({sha:e,kind:t})=>[e,XK(n[e],{kind:t,selfURL:cJ.repoURL})]))},zJ=`
|
||
query($fullPath: ID!, $branch: String!, $cursor: String!) {
|
||
project(fullPath: $fullPath) {
|
||
repository {
|
||
tree(ref: $branch, recursive: true) {
|
||
blobs(after: $cursor) {
|
||
nodes {
|
||
type
|
||
path
|
||
sha
|
||
}
|
||
pageInfo {
|
||
endCursor
|
||
hasNextPage
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,BJ=async()=>{let e=[],t=``;for(;;){let{nodes:n,pageInfo:{endCursor:r,hasNextPage:i}}=(await WW(zJ,{cursor:t})).project.repository.tree.blobs;if(e.push(...n),t=r,!i)break}return e.filter(({type:e})=>e===`blob`).map(({path:e,sha:t})=>({path:e,sha:t,size:0,name:qj(e).basename}))},VJ=`
|
||
query($fullPath: ID!, $branch: String!, $paths: [String!]!) {
|
||
project(fullPath: $fullPath) {
|
||
repository {
|
||
blobs(ref: $branch, paths: $paths) {
|
||
nodes {
|
||
rawTextBlob
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
`,HJ=async(e,t)=>{if(!e.length)return{};let{isSelfHosted:n=!1}=cJ,r=n?20:100,i=[...e],a=[];for(;;){let e=await WW(t,{paths:i.splice(0,r)});if(a.push(...e.project.repository.blobs.nodes),!i.length)break}return Object.fromEntries(e.map((e,t)=>[e,a[t]]))},UJ=async({fetchingFiles:e,blobs:t,sizes:n={},commits:r={}})=>{let i=e.map(({path:e,sha:i})=>{let a=r[e],o={sha:i,size:Number(n[e]?.size??0),text:t[e]?.rawTextBlob??void 0,meta:{}};if(a){let{author:e,authorName:t,authorEmail:n,committedDate:r}=a,{id:i,username:s}=e??{},c=i?.match(/\d+/);o.meta={commitAuthor:{name:t,email:n,id:c?Number(c[0]):void 0,login:s},committedDate:new Date(r)}}return[e,o]});return Object.fromEntries(i)},WJ=async e=>{KL.set(0);let t=window.setInterval(()=>{KL.update((e=0)=>e+1)},e.length/10),n=await HJ(e.filter(({type:e})=>e!==`asset`).map(({path:e})=>e),VJ);return window.clearInterval(t),KL.set(void 0),UJ({fetchingFiles:e,blobs:n})},GJ=async()=>{await uJ(),await YG({repository:cJ,fetchDefaultBranchName:fJ,fetchLastCommit:mJ,fetchFileList:BJ,fetchFileContents:WJ})},KJ=async e=>{let{owner:t,repo:n,branch:r=``}=cJ,{path:i}=e;return UW(`/projects/${encodeURIComponent(`${t}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:`blob`})},qJ=`https://status.gitlab.com/`,JJ=`https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7`,YJ=async()=>{try{let{result:{status_overall:{status_code:e}}}=await VV(JJ);if(e===100)return`none`;if([200,300,400].includes(e))return`minor`;if([500,600].includes(e))return`major`}catch{}return`unknown`},XJ=/(?<owner>.+)\/(?<repo>[^/]+)$/,ZJ={github:Qq,gitlab:{isGit:!0,name:$q,label:eJ,repository:cJ,statusDashboardURL:qJ,checkStatus:YJ,init:()=>{let{backend:e}=A($H)??{};if(e?.name!==`gitlab`)return;let{repo:t,branch:n,base_url:r=nJ,auth_endpoint:i=rJ,app_id:a=``,api_root:o=tJ,graphql_api_root:s=o.replace(/\/api\/.+$/,`/api/graphql`),include_credentials:c=!1}=e,{owner:l,repo:u}=t.match(XJ)?.groups??{},d=`${l}/${u}`,f=`${FA(r)}/${FA(i)}`,p=cG(o,d);return Object.assign(cJ,{service:$q,label:eJ,owner:l,repo:u,branch:n,repoURL:p,tokenPageURL:aJ(p),databaseName:`${$q}:${d}`,isSelfHosted:o!==tJ},lJ(p,n)),Object.assign(BW,{clientId:a,authScope:`api`,authURL:f,tokenURL:f.replace(`/authorize`,`/token`),authScheme:`Bearer`,restBaseURL:FA(o),graphqlBaseURL:FA(s),includeCredentials:c}),Object.assign(VW,{fullPath:d,branch:n}),KH.devModeEnabled&&console.info(`repositoryInfo`,cJ),cJ},signIn:oJ,signOut:sJ,fetchFiles:GJ,fetchBlob:KJ,commitChanges:hJ,fetchFileCommits:_J,fetchBranchHeadSHA:FJ,fetchDeployments:RJ,workflow:AJ},gitea:$G,local:DW,"test-repo":MW},QJ={azure:{label:`Azure DevOps`},bitbucket:{label:`Bitbucket`},"git-gateway":{label:`Git Gateway`,deprecated:!0}},$J=Object.keys(ZJ).filter(e=>e!==`local`),eY=Object.fromEntries(Object.entries(ZJ).filter(([,e])=>e.isGit)),tY=na(),nY=ra([tY],([e],t,n)=>{n(t=>{let n=e?ZJ[e]:void 0;return n&&n!==t&&n.init(),n})}),rY=(e,t,n,r)=>{let i=uB(t),a={};return e.forEach(e=>{let t=n(e),o=t==null?r:i?String(t).match(i)?.[0]??r:String(t);o in a||(a[o]=[]),a[o].push(e)}),Object.entries(a).sort(([e],[t])=>RA(e,t))},iY=(e,t,n)=>n?n.test(String(e??``)):e===t,aY=(e,t,n,r)=>{let i=e.map(e=>({item:e,key:t(e)}));return i.sort(({key:e},{key:t})=>n?RA(e,t):e-t),r===`descending`&&i.reverse(),e.splice(0,e.length,...i.map(({item:e})=>e)),e},oY=async(e,t,n)=>{let{databaseName:r}=e??{},i=r?new UA(r,`ui-settings`):null,a=await i?.get(t)??{};n.set(a);let o=a;n.subscribe(e=>{(0,HH.default)(e,o)||(o=e,(async()=>{try{await i?.set(t,e)}catch{}})())})},sY=(e,{field:t,pattern:n}={field:``,pattern:``})=>{if(!t)return e;if(t===`fileType`)return e.filter(({path:e})=>MR(e)===n);let r=uB(n);return e.filter(e=>{let i=e[t];return iY(i,n,r)})},cY=(e,{field:t,pattern:n}={field:``,pattern:void 0})=>{if(!t)return e.length?{"*":e}:{};let r=Z(`other`);return Object.fromEntries(rY(e,n,e=>e[t],r))},lY=na(),uY=async({repository:e})=>{await oY(e,`assets-view`,lY),dM.subscribe(e=>{let t=A(lY)?.[e?.internalPath??`*`]??structuredClone(_Y);(0,HH.default)(t,A(vY))||vY.set(t)}),vY.subscribe(e=>{let t=A(dM)?.internalPath??`*`,n=A(lY)?.[t]??{};(0,HH.default)(e,n)||lY.update(n=>({...n,[t]:e}))})},dY=(e,t)=>{let{commitAuthor:{name:n,login:r,email:i}={},commitDate:a}=e;return t===`commit_author`?n||r||i:t===`commit_date`?a:t===`name`?e.name.split(`.`)[0]:e[t]??``},fY=(e,{key:t,order:n}={})=>{if(!t||!n)return e;let r=[...e],i={commit_author:String,commit_date:Date}[t]||r[0]?.[t]?.constructor||String;return aY(r,e=>{let n=dY(e,t);return i===String?n??``:Number(n??0)},i===String,n),r},pY=na(!1),mY=na(!1),hY=ra([xU],([e],t)=>{t(!!e.files.length)}),gY=({label:e,collectionName:t,fileName:n,internalPath:r})=>{if(e)return e;if(t===void 0)return Z(r===void 0?`all_assets`:`global_assets`);let i=HL(t),a=i?UL(i):t;if(!n)return a;let o=i?YI(i,n):void 0;return`${a} › ${o?XI(o):n}`},_Y={type:`grid`,showInfo:!0,sort:{key:`name`,order:`ascending`}},vY=na({type:`grid`,showInfo:!0}),yY=ra([fU,dM],([e,t],n)=>{e&&t&&t.internalPath!==void 0?n(e.filter(({folder:e})=>e===t||(0,HH.default)(e,t))):n(e?[...e]:[])}),bY=ra([yY],([e])=>new Map(e.map((e,t)=>[e.path,t]))),xY=ra([yY,vY],([e,t],n)=>{let r=[...e];r=fY(r,t.sort),r=sY(r,t.filter);let i=cY(r,t.group);(0,HH.default)(A(xY),i)||n(i)});nY.subscribe(e=>{e&&!A(lY)&&uY(e)}),yY.subscribe(e=>{_U.set([]),KH.devModeEnabled&&console.info(`listedAssets`,e)});var SY=na(!1),CY=na(!1),wY=na(0),TY=na({show:!1,multiple:!1}),EY=na({id:void 0,show:!1,status:`success`,message:void 0,count:1,sourceLanguage:void 0}),DY=na(null),OY=na(null),kY=na(),AY=(e,{noopener:t=!0}={})=>{if(!e)return null;let n=t?`noopener,noreferrer`:``;return window.open(e,`_blank`,n)},jY=ra([SY,pY],([e,t])=>e||t),MY=na(``),NY=na(``),PY=(e=window.location.href)=>{let{origin:t,hash:n}=new URL(e),{pathname:r,searchParams:i}=new URL(`${t}${n.substring(1)}`);return{path:decodeURIComponent(r.replace(/(?!^)\/+$/,``)),params:Object.fromEntries([...new Set(i.keys())].map(e=>[e,i.getAll(e).join(`,`)]))}},FY=null,IY=(e,t)=>{if(!document.startViewTransition||FY){t();return}let n={types:[e],update:async()=>{t(),await vf(50),await new Promise(e=>{Ua(()=>{e(void 0)})})}};try{FY=document.startViewTransition(n),FY.finished.finally(()=>{FY=null})}catch{t()}},LY=e=>{let t=window.navigation?.currentEntry?.index??-1;if(t===-1)return;let[n]=window.navigation.entries().filter(({url:n,index:r})=>n===e&&r!==t).map(({index:e})=>e).sort((e,n)=>Math.abs(e-t)-Math.abs(n-t));if(n!==void 0)return n<t?`forwards`:`backwards`},RY=(e,t,n)=>{let r=PY(e).path,i=PY(t).path,a=n.test(r)&&n.test(i),o=r.split(`/`).length,s=i.split(`/`).length;return!a||o===s?`unknown`:o<s?`forwards`:`backwards`},zY=(e,t,n)=>{let{isTrusted:r,oldURL:i,newURL:a}=e;if(!r){t();return}IY(LY(i)??RY(i,a,n),()=>t())},BY=async(e,{state:t={},replaceState:n=!1,notifyChange:r=!0,transitionType:i=`unknown`}={})=>{let{path:a}=PY();if(a===e&&!Object.keys(t).length&&!n)return;let{origin:o,pathname:s,hash:c}=window.location,l=`${o}${s}${c}`,u=`${o}${s}#${e}`,d=[{...t,from:l},``,u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&IY(i,()=>{window.dispatchEvent(new HashChangeEvent(`hashchange`,{oldURL:l,newURL:u}))})},VY=/^\/edit\/(?<collectionName>[^/]+)\/(?<subPath>.+)$/,HY=()=>{let{path:e,params:t}=PY(),{collectionName:n,subPath:r}=e.match(VY)?.groups??{};if(!n||!r)return!1;let i=new URLSearchParams(t).toString();return BY(`/collections/${n}/entries/${r}${i?`?${i}`:``}`,{replaceState:!0}),!0},UY=(e,t={})=>{let n=`backwards`;if(window.navigation?.currentEntry){let{index:r}=window.navigation.currentEntry,{sameDocument:i,url:a}=window.navigation.entries()[r-1]??{};i&&a&&PY(a).path===e?IY(n,()=>{window.navigation.back()}):BY(e,{...t,transitionType:n});return}window.history.state?.from?IY(n,()=>{window.history.back()}):BY(e,{...t,transitionType:n})},WY=()=>{let{display_url:e,_siteURL:t}=A($H);AY(e||t||`/`)},GY=5e3,KY=3e4,qY=na({}),JY=100,YY=new Map,XY=()=>{if(YY.size<=JY)return;let e=Date.now()-KY,t=new Set([...YY.entries()].filter(([,{time:t}])=>t<e).map(([e])=>e));[...YY.keys()].forEach(e=>{YY.size-t.size>JY&&t.add(e)}),t.forEach(e=>YY.delete(e)),qY.update(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.has(e))))},ZY=async e=>{let t;try{t=await VV(e,{method:`GET`},{responseType:`raw`})}catch{return`unknown`}return t.ok?`ready`:t.status===404?`pending`:`unknown`},QY=async e=>{let t=YY.get(e);if(t&&Date.now()-t.time<3e4)return t.promise;let n=!1;try{n=new URL(e).origin===window.location.origin}catch{n=!1}let r=n?ZY(e):Promise.resolve(`unknown`);YY.set(e,{time:Date.now(),promise:r}),XY();let i=await r;return qY.update(t=>t[e]===i?t:{...t,[e]:i}),i},$Y=()=>{YY.clear(),qY.set({})},eX=ra([$H,nY],([e,t])=>{if(!e||!t?.isGit)return!1;let{skip_ci:n,automatic_deployments:r}=e.backend;return typeof n==`boolean`||typeof r==`boolean`}),tX=ra([$H,nY],([e,t])=>{if(!e||!t?.isGit)return!1;let{skip_ci:n,automatic_deployments:r}=e.backend;return n===!0||r===!1}),nX=ra([$H,nY],([e,t])=>e?.publish_mode===`editorial_workflow`&&!!t?.workflow),rX=na([]),iX=na(!1),aX=na(!1),oX=ra([nX,aX],([e,t])=>!e||t),sX=e=>e?A(rX).filter(({workflow:t})=>t.collectionName===e):[],cX=({collectionName:e,subPath:t})=>A(rX).find(n=>n.workflow.collectionName===e&&(n.workflow.fileName===void 0?n.subPath===t:n.workflow.fileName===t)),lX=e=>e?.workflow?.status===`pending_deletion`,uX=(e,t)=>{if(!t.length)return e;let n=new Map;return t.forEach(e=>{[...Object.values(e.locales).map(({path:e})=>e),...e.workflow.previousPaths??[]].forEach(t=>n.set(t,e))}),e.map(e=>Object.values(e.locales).map(({path:e})=>n.get(e)).find(Boolean)??e)},dX=(e,t)=>{let n=uX(e,t),r=new Set(n),i=t.filter(e=>!r.has(e));return i.length?[...n,...i]:n},fX=e=>{if(e.workflow.fileName)return!0;let t=new Set([...Object.values(e.locales).map(({path:e})=>e),...e.workflow.previousPaths??[]]);return A(JL).some(e=>Object.values(e.locales).some(({path:e})=>t.has(e)))},pX=(e,t)=>{KH.devModeEnabled&&console.info(`deployPreview: ${e}`,(typeof t==`function`?t():t)??``)},mX=0,hX=0,gX=()=>{mX+=1},_X=()=>{let e=A(nY)?.repository?.branch??``,t=[],n=new Set,r=A(IG);return r&&(t.push({sha:r,branch:e,kind:`production`}),n.add(r)),A(rX).forEach(({workflow:{pullRequest:e}})=>{let{headSHA:r,branch:i}=e;r&&!n.has(r)&&(t.push({sha:r,branch:i,kind:`preview`}),n.add(r))}),t},vX=ra([IG,rX],()=>_X()),yX=()=>{let{show_preview_links:e=!0}=A($H)??{};return(e||A(eX))&&!!A(nY)?.fetchDeployments},bX=e=>!!e&&e.state!==`checking`&&Date.now()-e.checkedTime<3e4,xX=()=>{let e=_X();FG.update(t=>{let n=Object.fromEntries(e.filter(({sha:e})=>!t[e]).map(({sha:e})=>[e,{state:`checking`,checkedTime:0}]));return Object.keys(n).length?{...t,...n}:t})},SX=async({force:e=!1,pendingOnly:t=!1}={})=>{if(!yX()){pX(`not looking anything up: the backend can’t report deployments, or preview links are off`);return}let n=A(nY)?.fetchDeployments,r=A(FG),i=_X().filter(({sha:n})=>{if(e)return!0;let i=r[n]?.state;return t?i!==`ready`&&i!==`error`:!bX(r[n])});if(!i.length){pX(`nothing to look up`,()=>({tracked:_X(),known:r}));return}pX(`looking up`,i);let a=mX;hX+=1;let o=hX;FG.update(e=>({...e,...Object.fromEntries(i.filter(({sha:t})=>!e[t]).map(({sha:e})=>[e,{state:`checking`,checkedTime:0}]))}));let s;try{s=await n(i)}catch(e){console.error(`Failed to fetch the deployment info.`,e),s=Object.fromEntries(i.map(({sha:e})=>[e,{state:`unknown`,checkedTime:Date.now()}]))}if(a!==mX){pX(`discarding a result that arrived after the lookup was cancelled`,s);return}if(o!==hX){pX(`discarding a result that a later lookup has superseded`,s);return}pX(`resolved`,s),FG.update(e=>({...e,...s}))},CX=async()=>{let e=A(nY)?.fetchBranchHeadSHA;if(e)try{let t=await e()??``;pX(`tracking the branch head`,t),IG.set(t)}catch(e){console.error(`Failed to fetch the branch head commit.`,e)}},wX=async()=>{try{await CX(),await SX()}catch(e){console.error(`Failed to look up the deployment info.`,e)}},TX=e=>{e.length&&dU.update(t=>{let n=new Map(t.map(e=>[e.path,e]));return e.forEach(e=>{let t=n.get(e.path);n.set(e.path,{...e,workflow:{branch:e.workflow?.branch,replacedAsset:t?.workflow?t.workflow.replacedAsset:t}})}),[...n.values()]})},EX=e=>{dU.update(t=>t.flatMap(t=>t.workflow?.branch===e?t.workflow.replacedAsset??[]:t))},DX=e=>{dU.update(t=>t.map(t=>{if(t.workflow?.branch!==e)return t;let{workflow:n,...r}=t;return r}))},OX=(e,t)=>{let n=new Set([...Object.values(e.locales).map(({path:e})=>e),...t]),r=A(JL).find(e=>Object.values(e.locales).some(({path:e})=>n.has(e)));if(!r)return e;let i=!!t.length&&!!e.slug;return{...r,...e,locales:{...r.locales,...e.locales},slug:i?e.slug:r.slug,subPath:i?e.subPath:r.subPath}},kX=async e=>{let t=xq(e.branch);if(!t)return{entries:[],assets:[]};let{collectionName:n}=t,{entryFiles:r,assetFiles:i}=ZU(e.files.filter(({deleted:e})=>!e).map(({path:e,sha:t,size:n,text:r})=>({path:e,sha:t,size:n,text:r,name:qj(e).basename}))),a=e.files.flatMap(({path:e,deleted:t,previousPath:n})=>n?[n]:t?[e]:[]),o=a.length?ZU(a.map(e=>({path:e,name:qj(e).basename,sha:``,size:0}))).entryFiles.filter(({folder:e})=>e.collectionName===n).map(({path:e})=>e):[],s=i.map(t=>({...KG(t),workflow:{branch:e.branch}})),c=r.filter(({folder:e,text:t})=>e.collectionName===n&&t!==void 0);if(!c.length){let t=new Set(o);return{entries:(o.length?A(JL).filter(e=>Object.values(e.locales).some(({path:e})=>t.has(e))):[]).map(t=>({...t,workflow:{pullRequest:e,status:`pending_deletion`,collectionName:n,fileName:void 0,previousPaths:o}})),assets:s}}let{entries:l}=await XU(c),{fileName:u}=c[0].folder;return{entries:l.map(t=>({...OX(t,o),workflow:{pullRequest:e,status:e.status,collectionName:n,fileName:u,previousPaths:o}})),assets:s}},AX=async e=>{let t=await Promise.all(e.map(kX));return{entries:t.flatMap(({entries:e})=>e),assets:t.flatMap(({assets:e})=>e)}},jX=async()=>{let e=A(nY)?.workflow;if(!(!A(nX)||!e)){iX.set(!0);try{let{entries:t,assets:n}=await AX(await e.fetchPullRequests());rX.set(t),TX(n)}catch(e){console.error(e)}finally{iX.set(!1),aX.set(!0)}}},MX=/^\/signin\/(?<encodedData>.+)/,NX=ao({signInError:{message:``,context:`authentication`},unauthenticated:!0,signingIn:!1}),PX=async()=>{await GA.set(`sveltia-cms.user`,{}),zW.account=void 0,NX.unauthenticated=!0},FX=async e=>{(typeof e?.cause?.status==`number`||e?.message===`Not a collaborator of the repository`)&&await PX()},IX=()=>{NX.signInError={message:``,context:`authentication`}},LX=(e,t=`authentication`)=>{let n=e.cause?.message||Z(`unexpected_error`);e.name===`NotFoundError`&&(n=Z(`sign_in_error.not_project_root`)),e.name===`AbortError`&&(n=Z(A(tY)===`local`?`sign_in_error.picker_dismissed`:`sign_in_error.authentication_aborted`)),NX.signInError={message:n,context:t},console.error(e.name,e.message,e.cause)},RX=()=>{let{path:e}=PY(),{encodedData:t}=e.match(MX)?.groups??{};if(!t)return{_user:void 0,copiedPrefs:void 0};BY(``,{replaceState:!0});let n,r;try{let e=JSON.parse(atob(t));or(e)&&typeof e.token==`string`&&(n={token:e.token},or(e.prefs)&&(r=e.prefs))}catch{}return{_user:n,copiedPrefs:r}},zX=async()=>{let e=await GA.get(`sveltia-cms.user`)||await GA.get(`decap-cms-user`)||await GA.get(`netlify-cms-user`);return or(e)&&typeof e.backendName==`string`?e:void 0},BX=e=>{let t=e?.backendName===`local`||e?.backendName===`proxy`?`local`:A($H).backend.name;return tY.set(t),A(nY)},VX=async()=>{IX();let e,t;({_user:e,copiedPrefs:t}=RX()),e??=await zX();let n=BX(e);if(e){if(e&&n){zW.account=e;let{token:t,refreshToken:r}=e;NX.signingIn=!0;try{e=await n.signIn({token:t,refreshToken:r,auto:!0})}catch{e=void 0,zW.account=void 0}}if(NX.signingIn=!1,NX.unauthenticated=!e,!(!e||!n)){zW.account=e,t&&Object.assign(KH,t);try{await n.fetchFiles(),await jX(),wX()}catch(e){[401,403,404].includes(e.cause?.status)?NX.unauthenticated=!0:LX(e,`dataFetch`),await FX(e)}}}},HX=async(e,t)=>{IX(),tY.set(e);let n=A(nY);if(!n)return;let r;NX.signingIn=!0;try{r=await n.signIn({token:t,auto:!1})}catch(e){NX.signingIn=!1,NX.unauthenticated=!0,t&&e.cause?.status===401?LX(Error(`Invalid token`,{cause:{message:Z(`sign_in_error.invalid_token`)}})):LX(e);return}if(NX.signingIn=!1,NX.unauthenticated=!r,r){zW.account=r;try{await n.fetchFiles(),await jX(),wX()}catch(e){LX(e,`dataFetch`),await FX(e)}}},UX=async()=>{await A(nY)?.signOut(),await PX(),tY.set(void 0),GL.set(!1),rX.set([]),aX.set(!1),BG(),$Y();let e=A($H)?.logout_redirect_url;e&&(window.location.href=e)},WX=U(`<div role="alert" class="message svelte-1ff54ya"> </div>`),GX=U(`<div role="alert" class="svelte-1ff54ya"><!></div>`),KX=U(`<div role="none"><!></div>`),qX=U(`<!> <!> <!>`,1),JX=U(`<div role="alert" class="error iconic svelte-1ff54ya"><!> </div>`),YX=U(` <!>`,1),XX=U(`<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>`,1),ZX={hash:`svelte-1ff54ya`,code:`.buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;.button {width:320px;}}[role='alert'].svelte-1ff54ya {&.iconic {display:flex;align-items:center;gap:8px;}&.error {color:var(--sui-error-foreground-color);}}`};function QX(e,t){O(t,!0),J(e,ZX);let n=()=>j($H,`$cmsConfig`,r),[r,i]=sa(),a=P(!1),o=P(``),s=N(()=>n()?.backend),c=N(()=>H(s).name),l=N(()=>H(c)?ZJ[H(c)]:null),u=N(()=>H(c)===`test-repo`),d=N(()=>H(u)?void 0:H(s)?.repo?.split(`/`).pop()),f=N(()=>zV.isLocalHost&&!H(u)),p=N(()=>H(o).trim()),m=N(()=>H(c)===`gitea`&&H(s).base_url===`https://codeberg.org`?`Codeberg`:H(l)?.label),h=N(()=>!H(u)&&H(s).auth_methods?.includes(`token`)===!1),g=N(()=>!H(u)&&H(s).auth_methods?.includes(`oauth`)===!1),_=N(()=>H(c)===`gitea`&&!H(s).app_id);Nl(()=>{NX.signInError.message||VX()});var v=XX(),y=L(v),b=I(y),x=e=>{var t=WX(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`signing_in`)]),G(e,t)},S=e=>{var t=qX(),n=L(t),r=e=>{var t=qX(),n=L(t);{let e=N(()=>Z(`work_with_local_repo`)),t=N(()=>!zV.isLocalBackendSupported);$f(n,{variant:`primary`,get label(){return H(e)},get disabled(){return H(t)},onclick:async()=>{await HX(`local`)}})}var r=z(n,2),i=e=>{var t=GX(),n=I(t),r=e=>{var t=W();kc(L(t),()=>FB(Z(`local_workflow.disabled`),`https://sveltiacms.app/en/docs/workflows/local#enabling-file-system-access-api-in-brave`)),G(e,t)},i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`local_workflow.unsupported_browser`)]),G(e,t)};q(n,e=>{zV.isBrave?e(r):e(i,-1)}),D(t),G(e,t)},a=e=>{var t=KX(),n=I(t),r=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`work_with_local_repo_description`,{values:{repo:H(d)}})]),G(e,t)},i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`work_with_local_repo_description_no_repo`)]),G(e,t)};q(n,e=>{H(d)?e(r):e(i,-1)}),D(t),G(e,t)};q(r,e=>{zV.isLocalBackendSupported?NX.signInError.message||e(a,1):e(i)}),Wp(z(r,2),{}),G(e,t)};q(n,e=>{H(f)&&e(r)});var i=z(n,2),o=e=>{{let t=N(()=>H(f)?`secondary`:`primary`),n=N(()=>H(u)?Z(`work_with_test_repo`):Z(`sign_in_with_x`,{values:{service:H(m)}}));$f(e,{get variant(){return H(t)},get label(){return H(n)},get disabled(){return H(_)},onclick:async()=>{await HX(H(c))}})}};q(i,e=>{H(g)||e(o)});var s=z(i,2),l=e=>{{let t=N(()=>Z(`sign_in_using_access_token`,{values:{service:H(m)}}));$f(e,{variant:`secondary`,get label(){return H(t)},onclick:()=>{F(a,!0)}})}};q(s,e=>{!H(u)&&!H(h)&&e(l)}),G(e,t)};q(b,e=>{NX.signingIn?e(x):H(l)&&e(S,1)});var C=z(b,2),w=e=>{var t=JX(),n=I(t);Rl(n,{name:`error`});var r=z(n);D(t),V(()=>K(r,` ${NX.signInError.message??``}`)),G(e,t)};q(C,e=>{NX.signInError.message&&NX.signInError.context===`authentication`&&e(w)}),D(y);var T=z(y,2);{let e=N(()=>Z(`sign_in_using_access_token`)),t=N(()=>({spellcheck:!1,"aria-label":Z(`personal_access_token`)})),n=N(()=>Z(`sign_in`)),r=N(()=>!H(p));pm(T,{get title(){return H(e)},get textboxAttrs(){return H(t)},get okLabel(){return H(n)},get okDisabled(){return H(r)},onOk:()=>{HX(H(c),H(p))},onkeydown:e=>{!e.isComposing&&e.key===`Enter`&&H(p)&&(e.preventDefault(),F(a,!1),HX(H(c),H(p)))},get open(){return H(a)},set open(e){F(a,e,!0)},get value(){return H(o)},set value(e){F(o,e,!0)},children:(e,t)=>{mi();var n=YX(),r=L(n),i=z(r),a=e=>{var t=W();kc(L(t),()=>FB(Z(`sign_in_using_access_token_link`,{values:{service:H(m)}}),H(l).repository.tokenPageURL)),G(e,t)};q(i,e=>{H(l)?.repository?.tokenPageURL&&e(a)}),V(e=>K(r,`${e??``} `),[()=>Z(`sign_in_using_access_token_description`)]),G(e,n)},$$slots:{default:!0}})}G(e,v),k(),i()}var $X=`<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>`,eZ=/^data:(image\/[a-zA-Z0-9.+-]+);base64,/,tZ=`Sveltia CMS`,nZ=`data:image/svg+xml;base64,${btoa($X)}`,rZ=ra([$H],([e])=>e?.app_title||`Sveltia CMS`),iZ=ra([$H],([e])=>e?.logo?.src||e?.logo_url||nZ),aZ=ra(iZ,e=>{let t=e.match(eZ);return t?t[1]:DR.getType(e)??void 0}),oZ=async(e,t)=>`data:image/webp;base64,${await Zj(await Kz(e,t))}`,sZ=ra([iZ],([e],t)=>{(async()=>{try{let n=await fetch(e);if(!n.ok)throw Error(`Failed to fetch logo`);let r=await n.blob(),[i,a]=await Promise.all([oZ(r,{...Gz,width:192,height:192}),oZ(r,Gz)]);t({small:i,large:a})}catch{t(void 0)}})()}),cZ=ra([rZ,sZ],([e,t])=>{if(!t)return;let{origin:n,pathname:r}=window.location,i={name:e,short_name:e,start_url:`${n}${r}`,display:`standalone`,icons:[{src:t.small,sizes:`192x192`,type:`image/webp`},{src:t.large,sizes:`512x512`,type:`image/webp`}]},a=new Blob([JSON.stringify(i)],{type:`application/manifest+json`});return URL.createObjectURL(a)}),lZ=U(`<img alt="" class="logo svelte-7ua6x9"/> <h1 class="svelte-7ua6x9"> </h1>`,1),uZ=U(`<li><!></li>`),dZ=U(`<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>`),fZ=U(`<div role="alert" class="message"> </div>`),pZ=U(`<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div> <!>`,1),mZ=U(`<div role="alert" class="message"> </div> <!>`,1),hZ=U(`<div role="none" class="powered-by svelte-7ua6x9"> </div>`),gZ=U(`<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <!></div></div> <!>`,1),_Z={hash:`svelte-7ua6x9`,code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;.inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.logo:where(.svelte-7ua6x9) {width:auto;height:160px;
|
||
|
||
@media (width < 768px) {height:120px;
|
||
}}h1:where(.svelte-7ua6x9) {font-size:48px;}.logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}
|
||
/* \`<SignIn>\` also has \`.message\` */.message {margin:0 0 16px;font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-normal);text-align:center;ul {margin:12px 0 0;padding:0;max-height:160px;overflow-y:auto;list-style:none;}li {margin:12px;padding:0;}}}.powered-by.svelte-7ua6x9 {position:absolute;inset:auto 24px 24px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);text-align:center;}`};function vZ(e,t){O(t,!0),J(e,_Z);let n=()=>j(nU,`$cmsConfigLoaded`,u),r=()=>j(rZ,`$appTitle`,u),i=()=>j(iZ,`$appLogoURL`,u),a=()=>j(tU,`$cmsConfigErrors`,u),o=()=>j($H,`$cmsConfig`,u),s=()=>j(qW,`$inAuthPopup`,u),c=()=>j(GL,`$dataLoaded`,u),l=()=>j(KL,`$dataLoadedProgress`,u),[u,d]=sa(),f=(e,t=br)=>{var n=W();kc(L(n),()=>gt(tr.parseInline(t()),p)),G(e,n)},p={ALLOWED_TAGS:[`a`,`code`],ALLOWED_ATTR:[`href`]};B(()=>{n()&&M(NY,Z(`welcome_message`,{values:{name:r()}}))});var m=gZ(),h=L(m),g=I(h),_=I(g),v=e=>{var t=lZ(),n=L(t),a=R(z(n,2),!0);V(()=>{Y(n,`src`,i()),K(a,r())}),G(e,t)};q(_,e=>{n()&&e(v)});var y=z(_,2),b=e=>{var t=dZ(),n=I(t),r=R(n,!0),i=z(n,2);Cc(i,5,a,e=>e,(e,t)=>{var n=uZ(),r=I(n);f(r,()=>H(t)),D(n),G(e,n)}),D(i),D(t),V(e=>K(r,e),[()=>Z(`config.errors`,{values:{count:a().length}})]),G(e,t)},x=e=>{var t=fZ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`prefs.error.${GH.current.type}`)]),G(e,t)},S=e=>{var t=fZ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`loading_cms_config`)]),G(e,t)},C=N(()=>!o()||!Object.keys(KH).length),w=e=>{var t=pZ(),n=L(t),r=I(n),i=R(r,!0),a=z(r,2),o=I(a);f(o,()=>NX.signInError.message),D(a),D(n),QX(z(n,2),{}),V(e=>K(i,e),[()=>Z(`loading_site_data_error`)]),G(e,t)},T=e=>{var t=fZ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`authorizing`)]),G(e,t)},E=e=>{QX(e,{})},ee=e=>{var t=mZ(),n=L(t),r=R(n,!0),i=z(n,2),a=e=>{mte(e,{get now(){return l()}})};q(i,e=>{l()!==void 0&&e(a)}),V(e=>K(r,e),[()=>Z(`loading_site_data`)]),G(e,t)};q(y,e=>{a().length?e(b):GH.current?e(x,1):H(C)?e(S,2):NX.signInError.message&&NX.signInError.context===`dataFetch`?e(w,3):s()?e(T,4):!zW.account||NX.unauthenticated?e(E,5):c()||e(ee,6)}),D(g),D(h);var te=z(h,2),ne=e=>{var t=hZ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`powered_by`,{values:{name:tZ}})]),G(e,t)};q(te,e=>{n()&&r()!==`Sveltia CMS`&&e(ne)}),G(e,m),k(),d()}var yZ=U(` <!>`,1),bZ=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1);function xZ(e,t){O(t,!0);let n=()=>j(nY,`$backend`,i),r=()=>j($H,`$cmsConfig`,i),[i,a]=sa(),o=0,s=P(!1),c=P(`none`),l=async()=>{n()?.checkStatus&&F(c,await n().checkStatus(),!0)},u=()=>{l(),o=window.setInterval(()=>{l()},3e5)},d=()=>{window.clearInterval(o),F(c,`none`)},f=()=>{H(s)&&(n()?.checkStatus&&!n().repository?.isSelfHosted?u():d())};Nl(()=>(F(s,!0),()=>{d()})),B(()=>{H(s),n(),r(),f()});var p=W(),m=L(p),h=e=>{var t=bZ(),r=L(t);{let e=N(()=>H(c)===`major`?`error`:`warning`);vc(r,()=>({"--sui-infobar-message-justify-content":`center`})),rp(r.lastChild,{get status(){return H(e)},children:(e,t)=>{mi();var r=yZ(),i=L(r),a=z(i);{let e=N(()=>Z(`details`));$f(a,{variant:`link`,get label(){return H(e)},onclick:()=>{AY(n()?.statusDashboardURL)}})}V(e=>K(i,`${e??``} `),[()=>Z(`backend_status.${H(c)}_incident`,{values:{service:n()?.label}})]),G(e,r)},$$slots:{default:!0}}),D(r)}G(e,t)},g=N(()=>[`minor`,`major`].includes(H(c)));q(m,e=>{H(g)&&e(h)}),G(e,p),k(),a()}var SZ=U(` <!>`,1),CZ=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1);function wZ(e,t){O(t,!0);let n=`${Pz}/package.json`,r=`${Pz}/dist/sveltia-cms.js`,i=0,a=0,o=P(!1),s=async()=>{try{let e=await fetch(n);if(!e.ok)return;let{version:t}=await e.json();if(!t||t===Nz)return;document.querySelector(`script[src="${r}"]`)?a=window.setTimeout(()=>{F(o,!0)},6e5):console.warn(`[Sveltia CMS] A new version (${t}) is available. Update the pinned version in your script tag or package.json to upgrade.`)}catch{}};Nl(()=>(s(),i=window.setInterval(()=>{s()},36e5),()=>{window.clearInterval(i),window.clearTimeout(a)}));var c=W(),l=L(c),u=e=>{var t=CZ(),n=L(t);vc(n,()=>({"--sui-infobar-message-justify-content":`center`})),rp(n.lastChild,{children:(e,t)=>{mi();var n=SZ(),r=L(n),i=z(r);{let e=N(()=>Z(`update_now`));$f(i,{variant:`link`,get label(){return H(e)},onclick:()=>{window.location.reload()}})}V(e=>K(r,`${e??``} `),[()=>Z(`update_available`)]),G(e,n)},$$slots:{default:!0}}),D(n),G(e,t)};q(l,e=>{H(o)&&e(u)}),G(e,c),k()}var TZ={create:`New`,select:`Select`,select_all:`Select All`,upload:`Upload`,copy:`Copy`,download:`Download`,duplicate:`Duplicate`,delete:`Delete`,reorder:`Reorder`,cancel:`Cancel`,done:`Done`,save:`Save`,saving:`Saving…`,publish:`Publish`,publishing:`Publishing…`,rename:`Rename`,update:`Update`,replace:`Replace`,add:`Add`,remove:`Remove`,clear:`Clear`,expand:`Expand`,expand_all:`Expand All`,collapse:`Collapse`,collapse_all:`Collapse All`,insert:`Insert`,restore:`Restore`,discard:`Discard`,searching:`Searching…`,no_results:`No results found.`,global:`Global`,primary:`Primary`,secondary:`Secondary`,collection:`Collection`,folder:`Folder`,api_key:`API Key`,details:`Details`,back:`Back`,automatic:`Automatic`,loading:`Loading…`,later:`Later`,slug:`Slug`,singleton:`Singleton`,singletons:`Singletons`,clipboard_error:`Couldn’t copy to clipboard.`,welcome_message:`Welcome to {$name}`,powered_by:`Powered by {$name}`,loading_cms_config:`Loading CMS Configuration…`,loading_site_data:`Loading Site Data…`,loading_site_data_error:`There was an error while loading site data.`,sign_in_with_x:`Sign In with {$service}`,sign_in_using_access_token:`Sign In Using Access Token`,sign_in_using_access_token_description:`Enter your token below. It must have read/write access to the repository content.`,sign_in_using_access_token_link:`You can generate a token on the <a>{$service} user settings page</a>.`,personal_access_token:`Personal Access Token`,authorizing:`Authorizing…`,signing_in:`Signing in…`,work_with_local_repo:`Work with Local Repository`,work_with_local_repo_description:`Once prompted, select the root directory of the “{$repo}” repository.`,work_with_local_repo_description_no_repo:`Once prompted, select the root directory of your Git repository.`,work_with_test_repo:`Work with Test Repository`,sign_in_error:{not_project_root:`The selected folder is not a repository root directory. Please try again.`,picker_dismissed:`A repository root directory could not be selected. Please try again.`,authentication_aborted:`Authentication aborted. Please try again.`,invalid_token:`The provided token is invalid. Please check and try again.`,UNSUPPORTED_BACKEND:`Your Git backend is not supported by the authenticator.`,UNSUPPORTED_DOMAIN:`Your domain is not allowed to use the authenticator.`,MISCONFIGURED_CLIENT:`OAuth app client ID or secret is not configured.`,AUTH_CODE_REQUEST_FAILED:`Failed to receive an authorization code. Please try again later.`,CSRF_DETECTED:`Potential CSRF attack detected. Authentication flow aborted.`,TOKEN_REQUEST_FAILED:`Failed to request an access token. Please try again later.`,TOKEN_REFRESH_FAILED:`Failed to refresh the access token. Please try again later.`,MALFORMED_RESPONSE:`Server responded with malformed data. Please try again later.`},backend_unsupported_version:`The {$name} backend requires {$name} {$version} or later.`,repository_no_access:`You don’t have access to the “{$repo}” repository.`,repository_not_found:`The “{$repo}” repository doesn’t exist.`,repository_empty:`The “{$repo}” repository has no branches.`,branch_not_found:`The “{$repo}” repository doesn’t have the “{$branch}” branch.`,unexpected_error:`Unexpected Error`,entry_parse_errors:`.input {$count :integer} .match $count one {{There was an error while parsing an entry file. Check the browser console for details.}} * {{There were errors while parsing entry files. Check the browser console for details.}}`,username:`Username`,password:`Password`,sign_in:`Sign In`,sign_in_with_mobile:`Sign In with Mobile`,sign_in_with_mobile_instruction:`Scan the QR code below with your phone or tablet for passwordless sign-in. Your settings will be automatically copied.`,signed_in_as_x:`Signed In as {$name}`,working_with_local_repo:`Working with Local Repository`,working_with_test_repo:`Working with Test Repository`,sign_out:`Sign Out`,install_as_app:`Install as App`,contents:`Contents`,assets:`Assets`,editorial_workflow:`Editorial Workflow`,cms_config:`CMS Configuration`,menu:`Menu`,mobile_promo_title:`Sveltia CMS is now available on mobile!`,mobile_promo_button:`Give it a try`,new_language_available:`Sveltia CMS is now available in {$locale}!`,change_language:`Change Language`,switching_language:`Switching to {$locale}…`,locale_load_failed:`Couldn’t load the {$locale} translation. Please try again later.`,visit_live_site:`Visit Live Site`,switch_page:`Switch Page`,search_placeholder_contents:`Search for contents…`,search_placeholder_assets:`Search for assets…`,search_placeholder_all:`Search for contents and assets…`,create_entry_or_assets:`Create Entry or Assets`,publish_changes:`Publish Changes`,publishing_changes:`Publishing Changes…`,publishing_changes_failed:`Couldn’t publish changes. Please try again.`,show_notifications:`Show Notifications`,notifications:`Notifications`,show_account_menu:`Show Account Menu`,account:`Account`,live_site:`Live Site`,git_repository:`Git Repository`,settings:`Settings`,show_help_menu:`Show Help Menu`,help:`Help`,keyboard_shortcuts:`Keyboard Shortcuts`,documentation:`Documentation`,release_notes:`Release Notes`,announcements:`Announcements`,version_x:`Version {$version}`,report_issue:`Report Issue`,share_feedback:`Share Feedback`,get_help:`Get Help`,donate:`Donate`,join_discord:`Join Us on Discord`,bluesky:`Follow Us on Bluesky`,update_available:`The latest version of Sveltia CMS is available.`,update_now:`Update Now`,backend_status:{minor_incident:`{$service} is experiencing a minor incident. Your workflow may be affected.`,major_incident:`{$service} is experiencing a major incident. You may want to wait until the situation has improved.`},content_library:`Content Library`,asset_library:`Asset Library`,collections:`Collections`,entries:`Entries`,files:`Files`,asset_location:{repository:`Your Site`,external:`External Locations`,stock_photos:`Stock Photos`},collection_assets:`Collection Assets`,entry_list:`Entry List`,file_list:`File List`,asset_list:`Asset List`,x_collection:`“{$collection}” Collection`,x_asset_folder:`“{$folder}” Asset Folder`,viewing_collection_list:`You’re now viewing the collection list.`,viewing_asset_folder_list:`You’re now viewing the asset folder list.`,viewing_x_collection:`.input {$count :integer} .match $count 0 {{You’re now viewing the “{$collection}” collection, which has no entries yet.}} one {{You’re now viewing the “{$collection}” collection, which has one entry.}} * {{You’re now viewing the “{$collection}” collection, which has {$count} entries.}}`,viewing_x_asset_folder:`.input {$count :integer} .match $count 0 {{You’re now viewing the “{$folder}” asset folder, which has no assets yet.}} one {{You’re now viewing the “{$folder}” asset folder, which has one asset.}} * {{You’re now viewing the “{$folder}” asset folder, which has {$count} assets.}}`,singleton_selected_announcement:`Press Enter to edit the “{$file}” file.`,page_not_found:`Page not found.`,collection_not_found:`Collection not found.`,asset_folder_not_found:`Asset folder not found.`,file_not_found:`File not found.`,x_of_x_selected:`{$selected} of {$total} selected`,switch_view:`Switch View`,list_view:`List View`,grid_view:`Grid View`,switch_to_list_view:`Switch to List View`,switch_to_grid_view:`Switch to Grid View`,sort:`Sort`,sorting_options:`Sorting Options`,sort_keys:{none:`None`,name:`Name`,slug:`Slug`,commit_author:`Updated by`,commit_date:`Updated on`,_summary:`Summary`,_manual:`Manual`},ascending:`{$label}, A to Z`,ascending_date:`{$label}, old to new`,descending:`{$label}, Z to A`,descending_date:`{$label}, new to old`,filter:`Filter`,filtering_options:`Filtering Options`,group:`Group`,grouping_options:`Grouping Options`,type:`Type`,all:`All`,image:`Image`,video:`Video`,audio:`Audio`,document:`Document`,other:`Other`,show_assets:`Show Assets`,hide_assets:`Hide Assets`,show_info:`Show Info`,hide_info:`Hide Info`,all_assets:`All Assets`,global_assets:`Global Assets`,loading_entries:`.input {$count :integer} .match $count one {{Loading entry…}} * {{Loading entries…}}`,entry_not_found:`Entry not found.`,creating_entries_disabled_by_admin:`Creating new entries in this collection is disabled by the administrator.`,creating_entries_disabled_by_quota:`You cannot add new entries to this collection because it has reached its limit of {$quota} entries.`,creating_entries_nearing_quota:`.input {$remaining :integer} .match $remaining one {{This collection is nearing its limit of {$quota} entries. You can only create {$remaining} more entry.}} * {{This collection is nearing its limit of {$quota} entries. You can only create {$remaining} more entries.}}`,back_to_collection:`Back to Collection`,collection_list:`Collection List`,back_to_collection_list:`Back to Collection List`,asset_folder_list:`Asset Folder List`,back_to_asset_folder_list:`Back to Asset Folder List`,search_results:`Search Results`,search_results_for_x:`Search Results for “{$terms}”`,viewing_entry_search_results:`.input {$count :integer} .match $count 0 {{You’re now viewing search results for “{$terms}”. We couldn’t find any entries.}} one {{You’re now viewing search results for “{$terms}”. We’ve found one entry.}} * {{You’re now viewing search results for “{$terms}”. We’ve found {$count} entries.}}`,viewing_asset_search_results:`.input {$count :integer} .match $count 0 {{You’re now viewing search results for “{$terms}”. We couldn’t find any assets.}} one {{You’re now viewing search results for “{$terms}”. We’ve found one asset.}} * {{You’re now viewing search results for “{$terms}”. We’ve found {$count} assets.}}`,x_entries:`.input {$count :integer} .match $count 0 {{No entries}} one {{{$count} entry}} * {{{$count} entries}}`,x_assets:`.input {$count :integer} .match $count 0 {{No assets}} one {{{$count} asset}} * {{{$count} assets}}`,no_files_found:`No files found.`,no_entries_found:`No entries found.`,upload_assets:`Upload New Assets`,edit_options:`Edit Options`,show_edit_options:`Show Edit Options`,edit_asset:`Edit Asset`,edit_x:`Edit {$name}`,wrap_long_lines:`Wrap Long Lines`,rename_asset:`Rename Asset`,rename_x:`Rename {$name}`,enter_new_name_for_asset:`.input {$count :integer} .match $count 0 {{Enter a new name below.}} one {{Enter a new name below. An entry using the asset will also be updated.}} * {{Enter a new name below. {$count} entries using the asset will also be updated.}}`,enter_new_name_for_asset_error:{empty:`File name cannot be empty.`,character:`File name cannot contain special characters.`,duplicate:`This file name is used for another asset.`},change_file_extension:`Change File Extension`,confirm_file_extension_change:{change:`Are you sure you want to change the extension from “.{$oldExtension}” to “.{$newExtension}”?`,add:`Are you sure you want to add the extension “.{$newExtension}”?`,remove:`Are you sure you want to remove the extension “.{$oldExtension}”?`},file_extension_change_warning:`The file may not be displayed or handled correctly if the extension doesn’t match the actual file format.`,replace_asset:`Replace Asset`,replace_x:`Replace {$name}`,click_to_browse:`Click to browse…`,tap_to_browse:`Tap to browse…`,drop_files_or_click_to_browse:`.input {$count :integer} .match $count one {{Drop a file here or click to browse…}} * {{Drop files here or click to browse…}}`,drop_files_or:`.input {$count :integer} .match $count one {{Drop a file here or}} * {{Drop files here or}}`,drop_image_files_or:`.input {$count :integer} .match $count one {{Drop an image file here or}} * {{Drop image files here or}}`,browse:`Browse`,paste:`Paste`,paste_image:`Paste Image`,no_image_in_clipboard:`No image found in clipboard.`,clipboard_access_denied:`Clipboard access denied.`,drop_files_here:`.input {$count :integer} .match $count one {{Drop a file here}} * {{Drop files here}}`,unsupported_file_type:`Unsupported File Type`,dropped_file_type_mismatch:`The dropped file is not one of the following types: {$types}. Please try again.`,dropped_image_type_mismatch:`The dropped file is not supported. Only an image of the following types is accepted: {$types}. Please try again.`,choose_files:`.input {$count :integer} .match $count one {{Choose File}} * {{Choose Files}}`,delete_assets:`.input {$count :integer} .match $count one {{Delete Asset}} * {{Delete Assets}}`,delete_selected_assets:`.input {$count :integer} .match $count one {{Delete Selected Asset}} * {{Delete Selected Assets}}`,confirm_deleting_this_asset:`Are you sure you want to delete this asset?`,confirm_deleting_selected_assets:`.input {$count :integer} .match $count one {{Are you sure you want to delete the selected asset?}} * {{Are you sure you want to delete the selected {$count} assets?}}`,confirm_deleting_all_assets:`Are you sure you want to delete all the assets?`,delete_entries:`.input {$count :integer} .match $count one {{Delete Entry}} * {{Delete Entries}}`,delete_selected_entries:`.input {$count :integer} .match $count one {{Delete Selected Entry}} * {{Delete Selected Entries}}`,confirm_deleting_this_entry:`Are you sure you want to delete this entry?`,confirm_deleting_this_entry_with_assets:`Are you sure you want to delete this entry and associated assets?`,deleting_entry_failed:`Couldn’t delete the entry. Please try again.`,confirm_deleting_selected_entries:`.input {$count :integer} .match $count one {{Are you sure you want to delete the selected entry?}} * {{Are you sure you want to delete the selected {$count} entries?}}`,confirm_deleting_selected_entries_with_assets:`.input {$count :integer} .match $count one {{Are you sure you want to delete the selected entry and associated assets?}} * {{Are you sure you want to delete the selected {$count} entries and associated assets?}}`,confirm_deleting_all_entries:`Are you sure you want to delete all the entries?`,confirm_deleting_all_entries_with_assets:`Are you sure you want to delete all the entries and associated assets?`,reorder_entries:`Reorder Entries`,done_reordering_entries:`Done Reordering Entries`,cancel_reordering_entries:`Cancel Reordering Entries`,saving_reorder_failed:`Failed to save new entry order. Please try again.`,processing_files:`.input {$count :integer} .match $count one {{Processing a file. This may take a while.}} * {{Processing files. This may take a while.}}`,uploading_files:`Uploading Files`,confirm_replacing_file:`“{$name}” will be replaced with this file:`,confirm_uploading_files:`.input {$count :integer} .match $count one {{This file will be saved to the “{$folder}” folder:}} * {{These {$count} files will be saved to the “{$folder}” folder:}}`,oversized_files:`Oversized Files`,warning_oversized_files:`.input {$count :integer} .match $count one {{This file cannot be uploaded because it exceeds the maximum size of {$size}. Please reduce the size or select a different file.}} * {{These files cannot be uploaded because they exceed the maximum size of {$size}. Please reduce the sizes or select different files.}}`,invalid_files:`Invalid Files`,warning_invalid_files:`.input {$count :integer} .match $count one {{This file cannot be uploaded because it’s damaged, or its content doesn’t match its file extension. This often happens when a photo is renamed rather than converted, such as a HEIC image saved as a JPEG file. Please convert the file and try again.}} * {{These files cannot be uploaded because they’re damaged, or their content doesn’t match their file extensions. This often happens when photos are renamed rather than converted, such as HEIC images saved as JPEG files. Please convert the files and try again.}}`,mismatched_files:`Mismatched Files`,warning_mismatched_files:`.input {$count :integer} .match $count one {{This file cannot replace “{$name}” because it’s in a different format. Please convert the file to the same format and try again.}} * {{These files cannot replace “{$name}” because they’re in a different format. Please convert the files to the same format and try again.}}`,file_name_conflict_confirmation:`.input {$count :integer} .match $count one {{A file with the same name already exists in this folder. Do you want to replace it?}} * {{{$count} files with the same names already exist in this folder. Do you want to replace them?}}`,file_name_conflict_confirmation_with_name:`.input {$count :integer} .input {$name :string} .match $count one {{A file named “{$name}” already exists in this folder. Do you want to replace it?}} * {{{$count} files with the same names already exist in this folder. Do you want to replace them?}}`,file_name_conflict_resolution:`File Name Conflict Resolution`,keep_both:`Keep Both`,uploading_files_progress:`Uploading…`,uploading_files_failed:`Upload failed.`,file_meta_converted_from_x:`(converted from {$type})`,no_entries_created:`This collection has no entries yet.`,create_new_entry:`Create New Entry`,entry:`Entry`,index_file:`Index File`,no_files_in_collection:`No files available in this collection.`,duplicate_entry:`Duplicate Entry`,entry_duplicated:`Entry duplicated as a new draft.`,entry_validation_errors:`.input {$count :integer} .match $count one {{One field has an error. Please correct it to save the entry.}} * {{{$count} fields have errors. Please correct them to save the entry.}}`,entry_saved:`.input {$count :integer} .match $count one {{Entry saved.}} * {{{$count} entries saved.}}`,entry_saved_and_published:`.input {$count :integer} .match $count one {{Entry saved and published.}} * {{{$count} entries saved and published.}}`,entries_deleted:`.input {$count :integer} .match $count one {{Entry deleted.}} * {{{$count} entries deleted.}}`,assets_saved:`.input {$count :integer} .match $count one {{Asset saved.}} * {{{$count} assets saved.}}`,assets_saved_and_published:`.input {$count :integer} .match $count one {{Asset saved and published.}} * {{{$count} assets saved and published.}}`,asset_urls_copied:`.input {$count :integer} .match $count one {{URL copied to clipboard.}} * {{{$count} URLs copied to clipboard.}}`,asset_paths_copied:`.input {$count :integer} .match $count one {{File path copied to clipboard.}} * {{{$count} file paths copied to clipboard.}}`,asset_data_copied:`.input {$count :integer} .match $count one {{File data copied to clipboard.}} * {{{$count} files’ data copied to clipboard.}}`,assets_downloaded:`.input {$count :integer} .match $count one {{Asset downloaded.}} * {{{$count} assets downloaded.}}`,assets_moved:`.input {$count :integer} .match $count one {{Asset moved.}} * {{{$count} assets moved.}}`,assets_renamed:`.input {$count :integer} .match $count one {{Asset renamed.}} * {{{$count} assets renamed.}}`,assets_deleted:`.input {$count :integer} .match $count one {{Asset deleted.}} * {{{$count} assets deleted.}}`,content_editor:`Content Editor`,restore_backup_title:`Restore Draft`,restore_backup_description:`This entry has a backup from {$datetime}. Do you want to restore the edited draft?`,draft_backup_saved:`Draft backup saved.`,draft_backup_restored:`Draft backup restored.`,draft_backup_deleted:`Draft backup deleted.`,cancel_editing:`Cancel Editing`,create_entry_title:`Creating {$name}`,create_entry_announcement:`You’re now creating a new entry in the “{$collection}” collection.`,edit_entry_announcement:`You’re now editing the “{$entry}” entry in the “{$collection}” collection.`,edit_file_announcement:`You’re now editing the “{$file}” file in the “{$collection}” collection.`,edit_singleton_announcement:`You’re now editing the “{$file}” file.`,save_and_publish:`Save and Publish`,save_without_publishing:`Save without Publishing`,show_editor_options:`Show Editor Options`,editor_options:`Editor Options`,show_second_pane:`Show Second Pane`,show_preview:`Show Preview`,sync_scrolling:`Sync Scrolling`,switch_locale:`Switch Locale`,locale_content_disabled_short:`(disabled)`,locale_content_error_short:`(error)`,edit:`Edit`,preview:`Preview`,swap_panes:`Swap Panes`,edit_x_locale:`Edit {$locale} Content`,preview_x_locale:`Preview {$locale} Content`,content_preview:`Content Preview`,show_content_options_x_locale:`Show {$locale} Content Options`,content_options_x_locale:`{$locale} Content Options`,x_field:`“{$field}” Field`,show_field_options:`Show Field Options`,field_options:`Field Options`,unsupported_field_type_x:`Unsupported field type: {$name}`,enable_x_locale:`Enable {$locale}`,reenable_x_locale:`Reenable {$locale}`,disable_x_locale:`Disable {$locale}`,locale_x_has_been_disabled:`The {$locale} content has been disabled.`,locale_x_now_disabled:`The {$locale} content is now disabled. It will be deleted when you save the entry.`,view_in_repository:`View in Repository`,view_on_x:`View on {$service}`,view_on_live_site:`View on Live Site`,deploy_preview:{view:`View Preview`,building:`The preview is still being built.`,failed:`The preview couldn’t be built.`,checking:`Checking for a preview…`,check_again:`Check for Preview`,awaiting:`Checking for Preview`,short:{building:`Building…`,failed:`Build Failed`}},copy_from:`Copy from…`,copy_from_x:`Copy from {$locale}`,translation_options:`Translation Options`,translate:`Translate`,translate_fields:`.input {$count :integer} .match $count one {{Translate Field}} * {{Translate Fields}}`,translate_from:`Translate from…`,translate_from_x:`Translate from {$locale}`,revert_changes:`Revert Changes`,revert_all_changes:`Revert All Changes`,edit_slug:`Edit Slug`,edit_slug_error:{empty:`The slug cannot be empty.`,invalid:`The slug cannot contain special characters, including slashes and spaces.`,duplicate:`This slug is used for another entry.`},required:`Required`,editor:{translation:{none:`Nothing to translate.`,started:`Translating…`,error:`Translation failed.`,complete:`.input {$count :integer} .match $count 0 {{No fields translated from {$source}.}} one {{Field translated from {$source}.}} * {{{$count} fields translated from {$source}.}}`},copy:{none:`Nothing to copy.`,complete:`.input {$count :integer} .match $count 0 {{No fields copied from {$source}.}} one {{Field copied from {$source}.}} * {{{$count} fields copied from {$source}.}}`}},validation:{value_missing:`This field is required.`,range_underflow:{"datetime-local":`The date/time must be at or after {$min}.`,date:`The date must be on or after {$min}.`,time:`The time must be at or after {$min}.`,number:`The value must be greater than or equal to {$min}.`,select:`.input {$min :integer} .match $min one {{You must select at least {$min} option.}} * {{You must select at least {$min} options.}}`,add:`.input {$min :integer} .match $min one {{You must add at least {$min} item.}} * {{You must add at least {$min} items.}}`},range_overflow:{"datetime-local":`The date/time must be at or before {$max}.`,date:`The date must be on or before {$max}.`,time:`The time must be at or before {$max}.`,number:`The value must be less than or equal to {$max}.`,select:`.input {$max :integer} .match $max one {{You cannot select more than {$max} option.}} * {{You cannot select more than {$max} options.}}`,add:`.input {$max :integer} .match $max one {{You cannot add more than {$max} item.}} * {{You cannot add more than {$max} items.}}`},too_short:`.input {$min :integer} .match $min one {{You must enter at least {$min} character.}} * {{You must enter at least {$min} characters.}}`,too_long:`.input {$max :integer} .match $max one {{You cannot enter more than {$max} character.}} * {{You cannot enter more than {$max} characters.}}`,type_mismatch:{number:`Please enter a number.`,email:`Please enter a valid email.`,url:`Please enter a valid URL.`},invalid_value:`Invalid value.`,unexpected_error:`Unexpected error occurred.`},entry_sidebar:{sidebar_panels:`Sidebar Panels`,validation:{title:`Validation`,placeholder:`Validation results will be shown here.`,no_errors_found:`No errors found.`,validate:`Validate`},history:{title:`History`,fetch_failed:`Failed to load history.`,no_history:`No history found.`},backlinks:{title:`Backlinks`,no_entries:`No entries are referencing this entry.`}},saving_entry:{error:{title:`Error`,description:`There was an error while saving the entry. Please try again later.`}},viewing_x_asset_details:`You’re viewing the details of the “{$name}” asset.`,asset_editor:`Asset Editor`,preview_unavailable:`Preview Unavailable.`,public_urls:`.input {$count :integer} .match $count one {{Public URL}} * {{Public URLs}}`,file_paths:`.input {$count :integer} .match $count one {{File Path}} * {{File Paths}}`,file_data:`File Data`,asset_info:`Asset Info`,select_asset_show_info:`Select an asset to show its info.`,kind:`Kind`,size:`Size`,dimensions:`Dimensions`,duration:`Duration`,used_in:`Used in`,created_date:`Created Date`,location:`Location`,map_lat_lng:`Map showing latitude {$latitude}, longitude {$longitude}`,remove_this_item:`Remove This Item`,move_up:`Move Up`,move_down:`Move Down`,reorder_item:`Reorder Item`,list_item_value:`Item Value`,add_x:`Add {$name}`,add_item_above:`Add Item Above`,add_item_below:`Add Item Below`,select_list_type:`Select List Type`,unknown_variable_type:`This item can’t be displayed due to an unknown type. Check the browser console for details.`,opacity:`Opacity`,unselected_option:`(None)`,assets_dialog:{title:{file:`Select File`,image:`Select Image`},search_for_file:`Search for Files`,search_for_image:`Search for Images`,locations:`Locations`,folder:{field:`Field Assets`,entry:`Entry Assets`,file:`File Assets`,collection:`Collection Assets`,global:`Global Assets`},error:{invalid_key:`Your API key is invalid or expired. Please double-check and try again.`,search_fetch_failed:`There was an error while searching assets. Please try again later.`,image_fetch_failed:`There was an error while downloading the selected asset. Please try again later.`},available_images:`Available Images`,enter_url:`Enter URL`,enter_file_url:`Enter URL of the file:`,enter_image_url:`Enter URL of the image:`,large_file:{title:`Large File`},invalid_file:{title:`Invalid File`},rejected_files:{title:`Files Cannot Be Uploaded`},photo_credit:{title:`Photo Credit`,description:`Use the following credit if possible:`},unsaved:`Unsaved`},character_counter:{min_max:`.input {$count :integer} .match $count 0 {{No character entered. Minimum: {$min}. Maximum: {$max}.}} one {{{$count} character entered. Minimum: {$min}. Maximum: {$max}.}} * {{{$count} characters entered. Minimum: {$min}. Maximum: {$max}.}}`,min:`.input {$count :integer} .match $count 0 {{No character entered. Minimum: {$min}.}} one {{{$count} character entered. Minimum: {$min}.}} * {{{$count} characters entered. Minimum: {$min}.}}`,max:`.input {$count :integer} .match $count 0 {{No character entered. Maximum: {$max}.}} one {{{$count} character entered. Maximum: {$max}.}} * {{{$count} characters entered. Maximum: {$max}.}}`},youtube_video_player:`YouTube video player`,today:`Today`,now:`Now`,editor_components:{image:`Image`,src:`Source`,alt:`Alt Text`,title:`Title`,link:`Link`},key_value:{key:`Key`,value:`Value`,action:`Action`,empty_key:`Key is required.`,duplicate_key:`Key must be unique.`},find_place:`Find a Place`,use_your_location:`Use Your Location`,geolocation_error_title:`Geolocation Error`,geolocation_error_body:`There was an error while retrieving your location.`,geolocation_unsupported:`Geolocation API is not supported by this browser.`,boolean:{true:`Yes`,false:`No`},cloud_storage:{invalid:`The service is not configured properly.`,auth:{api_key:{key_label:`API Key`,initial:`Enter your {$key} for {$service}.`,requested:`Validating…`,error:`The provided {$key} is invalid. Please double-check and try again.`},password:{initial:`Enter your password for {$service}.`,requested:`Signing in…`,error:`Username or password is incorrect. Please double-check and try again.`}},cloudinary:{iframe_title:`Cloudinary media library`,activate:{button_label:`Activate Cloudinary`,description:`After signing in, click the Sign In button again to continue.`},auth_key_label:`API Secret`,open_library:`Open Cloudinary`},uploadcare:{auth_key_label:`API Secret Key`},aws_s3:{auth_key_label:`Secret Access Key`},cloudflare_r2:{auth_key_label:`Secret Access Key`},digitalocean_spaces:{auth_key_label:`Secret Access Key`}},config:{errors:`.input {$count :integer} .match $count one {{There is an error in the CMS configuration. Please solve the issue and try again.}} * {{There are errors in the CMS configuration. Please solve the issues and try again.}}`,error_locator:{collection:`{$collection} collection`,file:`{$file} file`,component:`{$component} component`,field:"`{$field}` field"},error:{no_secure_context:`Sveltia CMS only works with HTTPS or localhost URLs.`,insecure_urls:`.input {$count :integer} .match $count one {{The configuration file URL must use HTTPS protocol or a localhost address.}} * {{The configuration file URLs must use HTTPS protocol or localhost addresses.}}`,fetch_failed:`The configuration file could not be retrieved.`,fetch_failed_not_ok:`HTTP response returned with status {$status}.`,fetch_failed_with_manual_init:"The configuration file could not be retrieved. To prevent the `config.yml` file from loading, add <a>`load_config_file: false`</a> to the configuration object passed to `CMS.init()`.",parse_failed:`The configuration file could not be parsed.`,parse_failed_invalid_object:`The configuration file is not a valid JavaScript object.`,parse_failed_unsupported_type:`The configuration file is not a valid file type. Only YAML, TOML and JSON are supported.`,no_collection:`Collections are not defined.`,no_visible_collection:"At least one collection must be visible. Check the `hide` option.",missing_backend:`The backend is not defined.`,missing_backend_name:`The backend name is not defined.`,unsupported_known_backend:`The {$name} backend is <a>not supported</a> in Sveltia CMS.`,unsupported_deprecated_backend:`The deprecated {$name} backend is <a>not supported</a> in Sveltia CMS.`,unsupported_custom_backend:`Custom backends are <a>not supported</a> in Sveltia CMS.`,unsupported_backend_suggestion:`Use one of the <a>supported backends</a> instead.`,missing_repository:`The repository is not defined.`,invalid_repository:`The configured repository is invalid. It must be in “owner/repo” format.`,oauth_implicit_flow:`The configured authentication method (implicit flow) is not supported in Sveltia CMS. Use a different <a>authentication method</a> instead.`,github_pkce_unsupported:`PKCE authorization is not yet supported due to GitHub’s limitations. Use a different <a>authentication method</a> instead.`,oauth_no_app_id:`OAuth application ID is not defined.`,open_authoring_no_workflow:"The `open_authoring` option requires the `editorial_workflow` publish mode. See the <a>documentation</a> for details.",no_auth_methods:"The `auth_methods` option must contain at least one method.",missing_media_folder:`The media folder is not defined.`,public_folder_relative_path:`The configured public folder is invalid. It must be an absolute path starting with “/”.`,public_folder_absolute_url:`An absolute URL for the public folder option is not supported in Sveltia CMS.`,invalid_transformation_key:"The `transformations` option contains an unsupported `{$key}` key. It must be `raster_image`, `svg` or a supported raster image format.",invalid_transformation_quality:"The `quality` option for the `{$key}` transformation is invalid. It must be an integer between 0 and 100.",invalid_transformation_size:"The `{$prop}` option for the `{$key}` transformation is invalid. It must be a positive integer.",missing_asset_collection_name:"The asset collection {$count} must have the `name` option defined as a non-empty string.",invalid_asset_collection_name:"The asset collection name `{$name}` is invalid. It must not contain special characters.",duplicate_asset_collection_name:"Asset collection names must be unique, but `{$name}` is used more than once.",invalid_collection_no_options:"The collection must have either the `folder`, `files` or `divider` option defined.",invalid_collection_multiple_options:"The collection cannot have the `folder`, `files` and `divider` options together.",file_format_mismatch:"The `{$extension}` extension doesn’t match the `{$format}` format.",invalid_slug_slash:"The slug template `{$slug}` is invalid as it cannot contain slashes. To organize entries in subfolders, use the `path` option instead of `slug`.",invalid_reorder_group:"The `reorder` option refers to a view group named `{$name}`, but no such group is defined in the `view_groups` option.",invalid_sortable_field:"The `sortable_fields` option refers to a field named `{$name}`, but no such field is defined in the collection.",invalid_view_group_field:"The `view_groups` option refers to a field named `{$name}`, but no such field is defined in the collection.",invalid_view_filter_field:"The `view_filters` option refers to a field named `{$name}`, but no such field is defined in the collection.",missing_view_group_name:"The view group {$count} must have the `name` option defined as a non-empty string.",invalid_view_group_name:"The view group name `{$name}` is invalid. It must not contain special characters.",duplicate_view_group_name:"View group names must be unique, but `{$name}` is used more than once.",missing_view_filter_name:"The view filter {$count} must have the `name` option defined as a non-empty string.",invalid_view_filter_name:"The view filter name `{$name}` is invalid. It must not contain special characters.",duplicate_view_filter_name:"View filter names must be unique, but `{$name}` is used more than once.",missing_collection_name:"The collection {$count} must have the `name` option defined as a non-empty string.",invalid_collection_name:"The collection name `{$name}` is invalid. It must not contain special characters.",duplicate_collection_name:"Collection names must be unique, but `{$name}` is used more than once.",missing_collection_file_name:"The collection file {$count} must have the `name` option defined as a non-empty string.",invalid_collection_file_name:"The collection file name `{$name}` is invalid. It must not contain special characters.",duplicate_collection_file_name:"Collection file names must be unique, but `{$name}` is used more than once.",collection_no_fields:"The collection must have the `fields` option defined with at least one field.",collection_file_no_fields:"The collection file must have the `fields` option defined with at least one field.",collection_file_i18n_required:"The collection file must have the `i18n` option defined if the `locale` placeholder is used in the `file` path.",missing_field_name:"The field {$count} must have the `name` option defined as a non-empty string.",invalid_field_name:"The field name `{$name}` is invalid. It must not contain special characters. If you want to nest fields, <a>use Object fields instead of dot notation</a>.",duplicate_field_name:"Field names must be unique, but `{$name}` is used more than once.",missing_variable_type:"The variable type {$count} must have the `name` option defined as a non-empty string.",invalid_variable_type:"The variable type name `{$name}` is invalid. It must not contain special characters.",duplicate_variable_type:"Variable type names must be unique, but `{$name}` is used more than once.",date_field_type:"The deprecated Date field type is not supported in Sveltia CMS. Use the DateTime field type with the `type: date` option instead.",invalid_timezone:"Invalid timezone: {$timeZone}. Must be a valid IANA timezone identifier like `America/New_York` or `Asia/Tokyo`.",unsupported_deprecated_option:"The deprecated `{$prop}` option is not supported in Sveltia CMS. Use the `{$newProp}` option instead.",allow_multiple:"The `allow_multiple` option is not supported in Sveltia CMS. Use the `multiple` option instead, which defaults to `false`.",invalid_list_field:"The List field cannot have the `field`, `fields` and `types` options together.",invalid_list_variable_type:"The List field’s variable type is invalid. The `widget` option is set to `{$widget}` but it must be `object`.",invalid_object_field:"The Object field cannot have the `fields` and `types` options together.",relation_field_invalid_collection:"The referenced `{$collection}` collection is invalid or not defined.",relation_field_invalid_collection_file:"The referenced `{$file}` file is invalid or not defined.",relation_field_missing_file_name:"The `file` option must be defined for a relation to a file collection.",relation_field_invalid_value_field:"The referenced value field `{$field}` is invalid or not defined.",unexpected:`Unexpected error`,schema_invalid_type:"The `{$option}` option must be {$type}.",schema_invalid_enum:"The `{$option}` option must be one of these values: {$values}.",schema_invalid_const:"The `{$option}` option must be `{$value}`.",schema_invalid_empty_value:"The `{$option}` option must be an empty string.",schema_invalid_item_count:"The `{$option}` option must be an array of {$count} items.",schema_invalid_value:"The `{$option}` option has an invalid value.",schema_missing_option:"The `{$option}` option is required.",schema_missing_one_of:`One of these options is required: {$options}.`,schema_value_type:{string:`a string`,number:`a number`,integer:`an integer`,boolean:`a boolean`,array:`an array`,object:`an object`,null:`empty`}},warning:{oauth_no_app_id:`OAuth application ID is not defined. Users are required to provide an access token to sign in.`,editorial_workflow_unsupported:`Editorial Workflow is currently supported only with the GitHub and GitLab backends.`,open_authoring_unsupported_backend:`Open Authoring is currently supported only with the GitHub backend.`,nested_collections_unsupported:`Nested collections are not yet supported in Sveltia CMS.`,unsupported_ignored_option:"The `{$prop}` option is not supported in Sveltia CMS. It will be ignored.",conflicting_timezone_options:"Both `picker_utc` and newer timezone options (`input_timezone` or `output_utc`) are set. The new options take precedence. Consider removing `picker_utc` from your configuration.",preview_path_no_date_field:"The `preview_path` option uses date and time tags, but the collection has no DateTime field to read them from, so the preview link won’t be shown.",preview_path_date_field_not_found:"The `preview_path_date_field` option refers to a field named `{$name}`, but no DateTime field with that name is defined, so the preview link won’t be shown.",preview_path_field_not_found:"The `preview_path` option refers to `{$name}`, but no such field is defined in the collection, so the preview link won’t be shown."},compatibility_link:`See the compatibility notes for details: {$link}`,schema_tip:`For a better developer experience, you can validate your configuration file against the JSON schema of Sveltia CMS. See {$link} for details.`},local_workflow:{indicator:`Local`,unsupported_browser:`Local Workflow is not supported in your browser. Please use Chrome or Edge instead.`,disabled:`Local Workflow is disabled in your browser. <a>Here’s how to enable it</a>.`},viewing_editorial_workflow:`You’re now viewing the Editorial Workflow board. Drafts: {$draft}. In Review: {$review}. Ready: {$ready}. Pending Deletion: {$deletion}.`,viewing_open_authoring_workflow:`You’re now viewing the Editorial Workflow board. Drafts: {$draft}. In Review: {$review}. Pending Deletion: {$deletion}.`,status:{draft:`Draft`,drafts:`Drafts`,in_review:`In Review`,ready:`Ready`,pending_deletion:`Pending Deletion`},workflow:{cancel_deletion:`Cancel Deletion`,confirm_cancelling_deletion:`Are you sure you want to cancel this deletion? The entry will remain published.`,confirm_completing_deletion:`Are you sure you want to delete this entry? It will be removed right away.`,deletion_pending:`.input {$count :integer} .match $count one {{Entry marked for deletion.}} * {{{$count} entries marked for deletion.}}`,changes_discarded:`.input {$count :integer} .match $count one {{Changes discarded.}} * {{Changes to {$count} entries discarded.}}`,cancelling_deletion:`Cancelling Deletion…`,deletion_cancelled:`Deletion cancelled.`,cancelling_deletion_failed:`Couldn’t cancel the deletion. Please try again.`,unpublished_entries:`Unpublished Entries`,published_entries:`Published Entries`,entry_status_value:`Status: {$status}`,change_entry_status:`Change Entry Status`,changing_status:`Changing Status…`,updating_status:`Updating Status…`,status_updated:`Status updated.`,status_change_failed:`Couldn’t change the status. Please try again.`,status_change_blocked:`The entry has errors. Please correct them before changing the status.`,publish_blocked:`The entry has errors. Please correct them before publishing it.`,send_for_review:`Send for Review`,confirm_sending_for_review:`Your changes have been saved as a draft. Send the entry for review so someone can look at it and publish it?`,publish_entry:`Publish Entry`,discard_changes:`Discard Changes`,confirm_deleting_published_entry:`Are you sure you want to delete this entry? It won’t be removed until the deletion is published. Until then you’ll still find it in the entry list, marked Pending Deletion.`,confirm_deleting_unpublished_entry:`This entry hasn’t been published yet, so deleting it will discard it completely.`,confirm_discarding_entry_changes:`This entry has unpublished changes. Discarding them will restore the published version. The entry itself won’t be deleted.`,deleting_unpublished_note_all:`.input {$count :integer} .match $count one {{It hasn’t been published yet, so your unpublished changes will be discarded. Any published version will remain published.}} * {{They haven’t been published yet, so your unpublished changes will be discarded. Any published versions will remain published.}}`,deleting_unpublished_note_some:`.input {$count :integer} .match $count one {{One of them hasn’t been published yet, so your unpublished changes will be discarded. Any published version will remain published.}} * {{{$count} of them haven’t been published yet, so your unpublished changes will be discarded. Any published versions will remain published.}}`,confirm_publishing_entry:`Are you sure you want to publish this entry? Your changes will take effect right away.`,publishing_entry:`Publishing Entry…`,entry_published:`Entry published.`,deleting_entry:`Deleting Entry…`,discarding_changes:`Discarding Changes…`,entry_deleted:`Entry deleted.`,publishing_entry_failed:`Couldn’t publish the entry. Please try again.`,no_entries:`No entries.`,drag_entry:`Drag to change the status`},open_authoring:{fork_repository:`Fork Repository`,fork:`Fork`,confirm_forking_repository:`To suggest changes to “{$repo}”, a fork of the repository has to be created on your account. Your changes are saved to that fork, and a maintainer reviews them before they go live.`,fork_declined:`You need a fork of the repository on your account to suggest changes.`,fork_failed:`Couldn’t create a fork of the “{$repo}” repository on your account.`,permission_check_failed:`Couldn’t check your access to the “{$repo}” repository. Please try again in a moment.`,forking_disabled:`The “{$repo}” repository doesn’t allow forks. Ask a maintainer to enable forking for it.`,invitation_pending:`You have a pending invitation to the “{$repo}” repository. Accept it on GitHub, then sign in again.`,private_repo_scope_required:`Your sign-in doesn’t include access to private repositories, so the “{$repo}” repository can’t be read. Ask a maintainer to check the CMS authentication settings.`,publish_unsupported:`Only a maintainer can publish changes to this site. Mark your entry as In Review instead, and someone will take a look.`,direct_commit_unsupported:`This change can’t be made directly. Only edits to entries can be suggested for review.`,contributing_via_fork:`Your changes are saved to your fork of this repository at “{$repo}” and reviewed before they go live.`,view_fork:`View Fork`},categories:`Categories`,site_configuration_editor:`Site Configuration Editor`,prefs:{changes:{api_key_saved:`API key saved.`,api_key_removed:`API key removed.`,api_key_invalid:`The provided API key is invalid. Please double-check and try again.`},error:{permission_denied:`Cookie storage access has been denied. Please check your browser permissions and try again.`},appearance:{title:`Appearance`,theme:`Theme`,select_theme:`Select Theme`},theme:{dark:`Dark`,light:`Light`},language:{title:`Language`,ui_language:{title:`User Interface Language`,select_language:`Select Language`}},contents:{title:`Contents`,editor:{title:`Editor`,use_draft_backup:{switch_label:`Automatically back up entry drafts`},close_on_save:{switch_label:`Close the editor after saving a draft`},close_with_escape:{switch_label:`Close the editor with the Escape key`}}},i18n:{title:`Internationalization`,translators:{default:{title:`Default Translation Service`,select_service:`Select Service`},api_keys:{title:`Translation Service API Keys`,description:`Manage API keys for <a>translation services</a>.`},field_label:`{$service} Key`,description:`Sign up for <a {$homeHref}>{$service}</a> and enter <a {$apiKeyHref}>your API Key</a> here to enable quick translation of text entry fields.`}},media:{title:`Media`,stock_photos:{api_keys:{title:`Stock Photo Service API Keys`,description:`Manage API keys for <a>stock photo services</a>.`},field_label:`{$service} API Key`,description:`Sign up for <a {$homeHref}>{$service} API</a> and enter <a {$apiKeyHref}>your API Key</a> here to insert free stock photos to image entry fields.`,credit:`Photos provided by {$service}`,no_services:`No <a>stock photo services</a> are configured.`},cloud_storage:{api_keys:{title:`Cloud Storage Service API Keys`,description:`Manage API keys for <a>cloud storage services</a>.`},field_label:`{$service} API Key`,no_services:`No <a>cloud storage services</a> are configured.`}},accessibility:{title:`Accessibility`,underline_links:{title:`Underline Links`,description:`Show underline for links in the entry preview and user interface labels.`,switch_label:`Always Underline Links`}},advanced:{title:`Advanced`,beta:{title:`Beta Features`,description:`Enable some beta features that may be unstable or unlocalized.`,switch_label:`Join Beta Program`},developer_mode:{title:`Developer Mode`,description:`Enable some developer-oriented features, including detailed console logs and native context menus.`,switch_label:`Enable Developer Mode`},deploy_hook:{title:`Deploy Hook`,description:`Enter a webhook URL to be called when you manually trigger a deployment by selecting Publish Changes. This can be left blank if you’re using GitHub Actions.`,url:{field_label:`Hook URL`,saved:`Hook URL saved.`,removed:`Hook URL removed.`},auth:{field_label:`Authorization header (e.g., Bearer <token>) (optional)`,saved:`Authorization header saved.`,removed:`Authorization header removed.`}}}},keyboard_shortcuts_:{view_content_library:`View Content Library`,view_asset_library:`View Asset Library`,search:`Search for entries and assets`,create_entry:`Create a new entry`,save_entry:`Save an entry`,cancel_editing:`Cancel entry editing`},file_type_labels:{avif:`AVIF image`,bmp:`Bitmap image`,gif:`GIF image`,ico:`Icon`,jpeg:`JPEG image`,jpg:`JPEG image`,png:`PNG image`,svg:`SVG image`,tif:`TIFF image`,tiff:`TIFF image`,webp:`WebP image`,avi:`AVI video`,m4v:`MP4 video`,mov:`QuickTime video`,mp4:`MP4 video`,mpeg:`MPEG video`,mpg:`MPEG video`,ogg:`Ogg video`,ogv:`Ogg video`,ts:`MPEG video`,webm:`WebM video`,"3gp":`3GPP video`,"3g2":`3GPP2 video`,aac:`AAC audio`,mid:`MIDI`,midi:`MIDI`,m4a:`MP4 audio`,mp3:`MP3 audio`,oga:`Ogg audio`,opus:`OPUS audio`,wav:`WAV audio`,weba:`WebM audio`,csv:`CSV spreadsheet`,doc:`Word document`,docx:`Word document`,odp:`OpenDocument presentation`,ods:`OpenDocument spreadsheet`,odt:`OpenDocument text`,pdf:`PDF document`,ppt:`PowerPoint presentation`,pptx:`PowerPoint presentation`,rtf:`Rich text document`,xls:`Excel spreadsheet`,xlsx:`Excel spreadsheet`,html:`HTML text`,js:`JavaScript`,json:`JSON text`,md:`Markdown text`,toml:`TOML text`,yaml:`YAML text`,yml:`YAML text`},file_size_units:{b:`{$size} bytes`,kb:`{$size} KB`,mb:`{$size} MB`,gb:`{$size} GB`,tb:`{$size} TB`}},EZ=`en-US`,DZ=`ar,bg,ca,cs,da,de,el,en-CA,en-GB,en-US,es-CO,fa,fi,fr,hr,ja,ko,nl,pl,pt-BR,pt-PT,ru,sv,tr,uk,vi,zh-CN`.split(`,`),OZ=()=>{let e=Gd();return e&&DZ.includes(e)?e:EZ},kZ=`${Pz}@${Nz}/locales`,AZ=5e3,jZ=`sveltia-cms.locale`,MZ=new Map,NZ=Hj(()=>Ud.current),PZ=na(),FZ=na(),IZ=async e=>{try{let{_locale:t,_version:n,...r}=await GA.get(jZ)??{};if(t===e&&n===Nz&&Object.keys(r).length)return r}catch{}},LZ=async(e,t)=>{try{await GA.set(jZ,{_locale:e,_version:Nz,...t})}catch{}},RZ=async()=>{try{await GA.delete(jZ)}catch{}},zZ=async e=>{let t=await fetch(`${kZ}/${e}.json`,{signal:AbortSignal.timeout(AZ)});if(!t.ok)throw Error(`Failed to load the ${e} locale strings`,{cause:t});return t.json()},BZ=async e=>{let t=await IZ(e);if(t)return MZ.set(e,t),t;PZ.set(e);try{let t=await zZ(e);return MZ.set(e,t),await LZ(e,t),t}catch(t){throw FZ.set({locale:e}),t}finally{PZ.set(void 0)}},VZ=async e=>{let t=MZ.get(e);if(!t){e===`en-US`&&MZ.size&&await RZ();return}await IZ(e)||await LZ(e,t)},HZ=()=>{try{let{locale:e}=JSON.parse(globalThis.localStorage.getItem(`sveltia-cms.prefs`)||`{}`)??{};return DZ.includes(e)?e:void 0}catch{return}},UZ=()=>{Rd(EZ,{...TZ,_sui:Hae}),DZ.filter(e=>e!==EZ).forEach(e=>{Wd(e,()=>BZ(e))}),JH.current=OZ(),window.addEventListener(`languagechange`,()=>{JH.current=OZ()}),Kd({fallbackLocale:EZ,initialLocale:HZ()??JH.current}),NZ.subscribe(e=>{VZ(e)})};function WZ(e,t){O(t,!0);let n=()=>j(FZ,`$appLocaleLoadError`,r),[r,i]=sa(),a=P(!1);B(()=>{n()&&F(a,!0)});var o=W(),s=L(o),c=e=>{let t=N(()=>n());Nh(e,{get show(){return H(a)},set show(e){F(a,e,!0)},children:(e,n)=>{Hl(e,{status:`error`,children:(e,n)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`locale_load_failed`,{values:{locale:xL(H(t).locale)??H(t).locale}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(s,e=>{n()&&e(c)}),G(e,o),k(),i()}var GZ=async(e,t)=>{let n=t===`image`?await eB(e):null;if(!n)return{createdDate:void 0,coordinates:void 0};let r={};try{let{parse:e}=await Iz(`exifr`,`dist/lite.esm.mjs`);r=await e(n)??{}}catch{}let{latitude:i,longitude:a,DateTimeOriginal:o,CreateDate:s=o}=r;return{createdDate:s instanceof Date?s:void 0,coordinates:Number.isFinite(i)&&Number.isFinite(a)?{latitude:UB(i,7),longitude:UB(a,7)}:void 0}},KZ=({element:e,eventType:t,src:n,getInfo:r})=>new Promise(i=>{e.addEventListener(t,()=>i(r()),{once:!0}),e.addEventListener(`error`,()=>i({}),{once:!0}),e.src=n}),qZ=e=>{let t=new Image;return KZ({element:t,eventType:`load`,src:e,getInfo:()=>({dimensions:{width:t.naturalWidth,height:t.naturalHeight}})})},JZ=async(e,t)=>{let n=document.createElement(t);return KZ({element:n,eventType:`loadedmetadata`,src:e,getInfo:()=>{let{duration:e}=n;if(t===`audio`)return{duration:e};let{videoWidth:r,videoHeight:i}=n;return{dimensions:{width:r,height:i},duration:e}}})},YZ=async(e,t)=>t===`image`?qZ(e):JZ(e,t),XZ=async(e,t,n)=>{let{dimensions:r,duration:i}=await YZ(t,n),{createdDate:a,coordinates:o}=await GZ(e,n);return{dimensions:r,duration:i,createdDate:a,coordinates:o}},ZZ=new Map,QZ={publicURL:void 0,repoBlobURL:void 0,dimensions:void 0,duration:void 0,usedEntries:[]},$Z=async e=>{let{kind:t}=e;if(![`image`,`video`,`audio`].includes(t))return{};let n=await tB(e);return n?XZ(e,n,t):{}},eQ=e=>{let{sha:t}=e;if(!t)return $Z(e);let n=ZZ.get(t);return n||(n=$Z(e).catch(e=>{throw ZZ.delete(t),e}),ZZ.set(t,n)),n},tQ=async e=>{let{path:t}=e,{blobBaseURL:n}=A(nY)?.repository??{};return{...await eQ(e),publicURL:oB(e),repoBlobURL:n?`${n}/${t}`:void 0}},nQ=async e=>{let t=oB(e,{allowSpecial:!0,pathOnly:!0})??await tB(e);return t?hB(t):[]},rQ=U(`<!> <!> <!>`,1),iQ=U(`<!> <!>`,1);function aQ(e,t){O(t,!0);let n=e=>{var t=rQ(),n=L(t);{let e=N(()=>Z(`public_urls`,{values:{count:r().length}})),t=N(()=>!H(c).length);Sm(n,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{m(d,`asset_urls_copied`)}})}var i=z(n,2);{let e=N(()=>Z(`file_paths`,{values:{count:r().length}}));Sm(i,{get label(){return H(e)},onclick:()=>{m(f,`asset_paths_copied`)}})}var a=z(i,2);{let e=N(()=>Z(`file_data`)),t=N(()=>!H(o));Sm(a,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{m(p,`asset_data_copied`)}})}G(e,t)},r=X(t,`assets`,19,()=>[]),i=X(t,`useButton`,3,!0),a=P(ao([])),o=P(!1),s=ao({show:!1,text:``,status:`success`}),c=N(()=>H(a).filter(({publicURL:e})=>!!e).map(({publicURL:e})=>e)),l,u=async()=>{if(l=void 0,r().length!==1)return!1;let e=await eB(r()[0]),{type:t}=e;return l=e,Kj(t)?!0:Vz.includes(t)?typeof navigator.clipboard.write==`function`:!1},d=async()=>{await navigator.clipboard.writeText(H(c).join(`
|
||
`))},f=async()=>{await navigator.clipboard.writeText(r().map(({path:e})=>`/${e}`).join(`
|
||
`))},p=async()=>{let e=l,{type:t}=e;if(Kj(t)){await navigator.clipboard.writeText(await e.text());return}if(!Vz.includes(t))throw Error(`Unsupported type`);t!==`image/png`&&(e=await Kz(e)),await navigator.clipboard.write([new ClipboardItem({"image/png":e})])},m=async(e,t)=>{try{await e(),s.status=`success`,s.text=Z(t,{values:{count:r().length}})}catch{s.status=`error`,s.text=Z(`clipboard_error`)}finally{s.show=!0}};B(()=>{(async()=>{F(a,await Promise.all(r().map(tQ)),!0),F(o,await u(),!0)})()});var h=iQ(),g=L(h),_=e=>{{let t=e=>{{let t=N(()=>Z(`copy_options`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{n(e)},$$slots:{default:!0}})}},i=N(()=>!r().length),a=N(()=>Z(`copy`));Ip(e,{variant:`ghost`,get disabled(){return H(i)},get label(){return H(a)},popupPosition:`bottom-right`,popup:t,$$slots:{popup:!0}})}},v=e=>{{let t=e=>{n(e)},i=N(()=>!r().length),a=N(()=>Z(`copy`));Sm(e,{get disabled(){return H(i)},get label(){return H(a)},popupPosition:`left-top`,items:t,$$slots:{items:!0}})}};q(g,e=>{i()?e(_):e(v,-1)}),Nh(z(g,2),{get show(){return s.show},set show(e){s.show=e},children:(e,t)=>{Hl(e,{get status(){return s.status},children:(e,t)=>{mi();var n=ec();V(()=>K(n,s.text)),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,h),k()}var oQ={saved:!1,moved:!1,renamed:!1,deleted:!1,deletionPending:!1,discarded:!1,deletionCancelled:!1,published:!1,count:1},sQ=na({...oQ}),cQ=na({...oQ}),lQ=()=>{let e=zW.account;if(!e)return;let{name:t,email:n,id:r,login:i}=e;if(!(!t||!n))return{name:t,email:n,id:r,login:i}},uQ=async({changes:e,commit:t})=>{let{databaseName:n}=A(nY)?.repository??{};if(!n)return;let r=new UA(n,`file-cache`),{files:i,author:a,date:o}=t,s={commitAuthor:a,commitDate:o};await Promise.all(e.map(async e=>{let{action:t,slug:n,path:a,previousPath:o,data:c}=e;if(typeof c!=`string`||!n)return;if(t===`delete`){await r.delete(a);return}t===`move`&&await r.delete(o);let l={sha:i[a]?.sha,size:Tz(c).size,text:c,meta:s};await r.set(a,l)}))},dQ=({changes:e,savedEntries:t,savedAssets:n})=>{let r=new Set(t.map(e=>e.id));JL.update(e=>[...e.filter(e=>!r.has(e.id)),...t]);let i=new Set(n.map(e=>e.path));e.forEach(e=>{e.action===`move`&&e.previousPath?i.add(e.previousPath):e.action===`delete`&&i.add(e.path)}),dU.update(e=>[...e.filter(e=>!i.has(e.path)),...n])},fQ=async({changes:e,savingEntries:t=[],savingAssets:n=[],options:r})=>{let{commitChanges:i}=A(nY),a={...await i(e,r),author:lQ()};KH.devModeEnabled&&(console.debug(`Commit changes:`,e),console.debug(`Commit results:`,a));let{files:o,author:s,date:c}=a,l=t.map(e=>({...e,commitAuthor:s,commitDate:c})),u=n.map(e=>{let{sha:t,file:n}=o[e.path]??{},r=n?URL.createObjectURL(n):void 0;return{...e,sha:t,blobURL:r,commitAuthor:s,commitDate:c}});return await uQ({changes:e,commit:a}),dQ({changes:e,savedEntries:l,savedAssets:u}),IG.set(a.sha),{commit:a,savedEntries:l,savedAssets:u}},pQ=({assets:e})=>{yU.update(t=>e.some(({path:e})=>t?.path===e)?void 0:t),cQ.set({...oQ,deleted:!0,count:e.length})},mQ=async e=>{await fQ({changes:e.map(({path:e,sha:t})=>({action:`delete`,path:e,previousSha:t})),options:{commitType:`deleteMedia`}}),pQ({assets:e})},hQ=U(`<!> <!>`,1);function gQ(e,t){O(t,!0);let n=()=>j(SG,`$openAuthoring`,r),[r,i]=sa(),a=X(t,`assets`,19,()=>[]),o=X(t,`buttonDescription`,3,``),s=X(t,`dialogDescription`,3,``),c=X(t,`onDelete`,3,void 0),l=X(t,`useButton`,3,!0),u=P(!1),d=N(()=>l()?$f:Sm),f=N(()=>!a().length||n());var p=hQ(),m=L(p);{let e=N(()=>Z(`delete`));jc(m,()=>H(d),(t,n)=>{n(t,{variant:`ghost`,get disabled(){return H(f)},get label(){return H(e)},get"aria-label"(){return o()},onclick:()=>{F(u,!0)}})})}var h=z(m,2);{let e=N(()=>Z(`delete_assets`,{values:{count:a().length}})),t=N(()=>Z(`delete`));Zp(h,{get title(){return H(e)},get okLabel(){return H(t)},onOk:()=>{mQ(a()),c()?.()},get open(){return H(u)},set open(e){F(u,e,!0)},children:(e,t)=>{mi();var n=ec();V(()=>K(n,s())),G(e,n)},$$slots:{default:!0}})}G(e,p),k(),i()}var _Q=U(`<!> <!>`,1);function vQ(e,t){O(t,!0);let n=X(t,`assets`,19,()=>[]),r=X(t,`useButton`,3,!0),i=P(!1),a=N(()=>r()?$f:Sm),o=async()=>{for(let e of n())$j(await eB(e),e.name),await vf(300);F(i,!0)};var s=_Q(),c=L(s);{let e=N(()=>!n().length),t=N(()=>Z(`download`));jc(c,()=>H(a),(n,r)=>{r(n,{variant:`ghost`,get disabled(){return H(e)},get label(){return H(t)},onclick:()=>{o()}})})}Nh(z(c,2),{get show(){return H(i)},set show(e){F(i,e,!0)},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`assets_downloaded`,{values:{count:n().length}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,s),k()}var yQ=U(`<!> <!> <!> <!> <!> <!> <!>`,1);function bQ(e,t){O(t,!0);let n=()=>j(SG,`$openAuthoring`,i),r=()=>j(nY,`$backend`,i),[i,a]=sa(),o=X(t,`extraItems`,3,void 0),s=P(ao({...QZ})),c=N(()=>H(s).publicURL),l=N(()=>H(s).repoBlobURL),u=N(n),d=async()=>{F(s,t.asset?await tQ(t.asset):{...QZ},!0)};B(()=>{t.asset,d()});{let n=e=>{{let n=N(()=>Z(`edit_options`));xm(e,{get"aria-label"(){return H(n)},children:(e,n)=>{var i=yQ(),a=L(i);Ac(a,()=>o()??br);var s=z(a,2);{let e=N(()=>Z(`edit`)),n=N(()=>Z(`edit_asset`)),r=N(()=>H(u)||!t.asset||!Qoe(t.asset));Sm(s,{variant:`ghost`,get label(){return H(e)},get"aria-label"(){return H(n)},get disabled(){return H(r)},onclick:()=>{M(SU,t.asset)}})}var d=z(s,2);{let e=N(()=>Z(`rename`)),n=N(()=>Z(`rename_asset`)),r=N(()=>H(u)||!t.asset);Sm(d,{variant:`ghost`,get label(){return H(e)},get"aria-label"(){return H(n)},get disabled(){return H(r)},onclick:()=>{M(CU,t.asset)}})}var f=z(d,2);{let e=N(()=>Z(`replace`)),n=N(()=>Z(`replace_asset`)),r=N(()=>H(u)||!t.asset);Sm(f,{variant:`ghost`,get label(){return H(e)},get"aria-label"(){return H(n)},get disabled(){return H(r)},onclick:()=>{M(xU,{folder:void 0,files:[],originalAssets:t.asset?[t.asset]:[]}),M(mY,!0)}})}var p=z(f,2);Hp(p,{});var m=z(p,2);{let e=N(()=>Z(`view_on_live_site`)),t=N(()=>!H(c));Sm(m,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{AY(H(c))}})}var h=z(m,2),g=e=>{{let t=N(()=>!r()?.repository||!H(l)),n=N(()=>Z(`view_on_x`,{values:{service:r()?.repository?.label},default:Z(`view_in_repository`)}));Sm(e,{get disabled(){return H(t)},get label(){return H(n)},onclick:()=>{AY(`${H(l)}?plain=1`)}})}};q(h,e=>{KH.devModeEnabled&&e(g)}),G(e,i)},$$slots:{default:!0}})}},i=N(()=>Z(`show_edit_options`));Ip(e,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(i)},popup:n,$$slots:{popup:!0}})}k(),a()}function xQ(e,t){O(t,!0);let n=X(t,`useShortcut`,3,!1),r=X(t,`onclick`,3,void 0);{let i=e=>{{let t=N(()=>Hd()?`arrow_forward`:`arrow_back`);Rl(e,{get name(){return H(t)}})}},a=N(()=>t[`aria-label`]??Z(`back`)),o=N(()=>n()?`Escape`:void 0);$f(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return H(a)},get keyShortcuts(){return H(o)},class:`back`,get onclick(){return r()},startIcon:i,$$slots:{startIcon:!0}})}k()}var SQ=U(`<!> <!> <!>`,1),CQ=U(`<bdi> </bdi>`),wQ=U(`<!> <h2 role="none"><!></h2> <!> <!>`,1);function TQ(e,t){O(t,!0);let n=()=>j(bU,`$overlaidAsset`,i),r=()=>j(dM,`$selectedAssetFolder`,i),[i,a]=sa(),o=e=>{var t=SQ(),n=L(t);aQ(n,{get assets(){return H(s)},get useButton(){return H(c)}});var i=z(n,2);vQ(i,{get assets(){return H(s)},get useButton(){return H(c)}});var a=z(i,2);{let e=N(()=>Z(`delete_assets`,{values:{count:1}})),t=N(()=>Z(`confirm_deleting_this_asset`));gQ(a,{get assets(){return H(s)},get buttonDescription(){return H(e)},get dialogDescription(){return H(t)},onDelete:()=>{UY(`/assets/${r()?.internalPath??`-/all`}`)},get useButton(){return H(c)}})}G(e,t)},s=N(()=>n()?[n()]:[]),c=N(()=>!zV.isSmallScreen);{let t=N(()=>Z(`primary`));Mj(e,{variant:`primary`,get"aria-label"(){return H(t)},children:(e,t)=>{var i=wQ(),a=L(i);{let e=N(()=>Z(`cancel_editing`));xQ(a,{get"aria-label"(){return H(e)},useShortcut:!0,onclick:()=>{UY(`/assets/${r()?.internalPath??`-/all`}`)}})}var s=z(a,2);_f(I(s),{children:(e,t)=>{var r=CQ(),i=R(r,!0);V(()=>K(i,n()?.name)),G(e,r)},$$slots:{default:!0}}),D(s);var c=z(s,2),l=e=>{o(e)};q(c,e=>{zV.isSmallScreen||e(l)}),bQ(z(c,2),{get asset(){return n()},extraItems:e=>{var t=W(),n=L(t),r=e=>{o(e)};q(n,e=>{zV.isSmallScreen&&e(r)}),G(e,t)},$$slots:{extraItems:!0}}),G(e,i)},$$slots:{default:!0}})}k(),a()}var EQ=!1,DQ=()=>{EQ=!1,Ua()},OQ=()=>{EQ||(EQ=!0,queueMicrotask(DQ))},kQ=new Set([`$$slots`,`$$events`,`$$legacy`,`kind`,`loading`,`asset`,`src`,`variant`,`blurBackground`,`cover`,`checkerboard`,`dissolve`,`alt`,`controls`]),AQ=U(`<img/>`),jQ=U(`<video></video>`,2),MQ=U(`<audio></audio>`),Sde=U(`<div role="none" class="blur svelte-1yaifwd"><div role="status" class="overlay svelte-1yaifwd"><!></div> <img role="none" loading="lazy" alt=""/></div>`),Cde=U(`<div role="none"><!> <!></div>`),wde={hash:`svelte-1yaifwd`,code:`.preview.svelte-1yaifwd {display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;&.tile {border-width:1px;border-style:solid;border-color:transparent;padding:var(--tile-padding, 12px);.sui.icon {font-size:48px;}}&.icon {border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size, 32px);height:var(--icon-size, 32px);}&:is(.tile:where(.svelte-1yaifwd), .icon:where(.svelte-1yaifwd)) {overflow:hidden;aspect-ratio:1 / 1;img:where(.svelte-1yaifwd) {
|
||
/* Prevent the image from being dragged */pointer-events:none;}}.blur:where(.svelte-1yaifwd) {display:contents;& > :where(.svelte-1yaifwd) {position:absolute;inset:0;pointer-events:none;}.overlay:where(.svelte-1yaifwd) {display:flex;justify-content:center;align-items:center;z-index:-1;backdrop-filter:blur(32px) brightness(0.8);}img:where(.svelte-1yaifwd) {width:100%;height:100%;z-index:-2;object-fit:cover;transform:scale(1.2);&.loaded {opacity:1;}}}&.cover {padding:0;& > :is(img, video) {flex:auto;}}& > :is(img, video) {flex:0;max-width:100%;max-height:100%;}&.dissolve {:is(img, video) {opacity:0;transition:opacity 250ms;}&.loaded {:is(img, video) {opacity:1;}}}}
|
||
|
||
/* prettier-ignore */.checkerboard.svelte-1yaifwd img:where(.svelte-1yaifwd) {
|
||
/* hardcoded, the same color as the checkerboard in Photoshop */background-image:linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
||
linear-gradient(45deg, #ccc 25%, #fff 25%, #fff 75%, #ccc 75%);background-size:8px 8px;background-position:0 0, 4px 4px;}.svelte-1yaifwd:not(.checkerboard) img:where(.svelte-1yaifwd) {
|
||
/* hardcoded, the same color as the transparent image preview in Chrome and Firefox */background-color:#e5e5e5;}:is(img, video) {object-fit:contain;&:not([src]) {visibility:hidden;}}.cover.svelte-1yaifwd :is(img, video) {object-fit:cover;aspect-ratio:1 / 1;}`};function NQ(e,t){O(t,!0),J(e,wde);let n=X(t,`loading`,3,`lazy`),r=X(t,`asset`,3,void 0),i=X(t,`src`,15,void 0),a=X(t,`variant`,3,void 0),o=X(t,`blurBackground`,3,!1),s=X(t,`cover`,3,!1),c=X(t,`checkerboard`,3,!1),l=X(t,`dissolve`,3,!0),u=X(t,`alt`,3,``),d=X(t,`controls`,3,!1),f=Al(t,kQ),p=P(void 0),m=P(!1),h=P(!1),g=P(void 0),_=P(void 0),v=N(()=>!!r()&&!!a()&&!d()),y=N(()=>t.kind===`image`||r()?.name.endsWith(`.pdf`)||H(v)&&Joe.includes(t.kind)),b=!1,x=async()=>{if(!(!r()||!H(p)||b)){b=!0,F(m,!1),n()===`lazy`&&await Ff(H(p));try{i(H(v)?await iB(r()):await tB(r()))}catch{F(m,!0)}o()&&!H(g)&&i()&&F(g,i(),!0),b=!1,OQ()}},S=async()=>{!H(p)||!H(_)||((H(y)?!H(p).complete:!H(p).readyState)&&await new Promise(e=>{H(p)?.addEventListener(H(y)?`load`:`loadedmetadata`,()=>{e(void 0)},{once:!0})}),l()&&await Ff(H(p)),F(h,!0),r()&&H(v)&&i()?.startsWith(`blob:`)&&(await vf(500),URL.revokeObjectURL(i())))};B(()=>{o()&&r()&&!H(g)&&(async()=>{F(g,await iB(r(),{cacheOnly:!0}),!0)})()}),B(()=>{H(p)&&r()&&x()}),B(()=>{if(r())F(_,i(),!0);else if(i()&&H(p)&&n()===`lazy`){F(_,void 0);let e=i();(async()=>{await Ff(H(p)),F(_,e,!0)})()}else F(_,i(),!0)}),B(()=>{H(p)&&H(_)&&S()}),Nl(()=>()=>{r()&&nce(r()),H(p)&&jf(H(p))});var C=Cde();let w;var T=I(C),E=e=>{Rl(e,{name:`draft`})},ee=e=>{var t=AQ();bl(t,()=>({loading:n(),src:H(_),alt:u(),...f}),void 0,void 0,void 0,`svelte-1yaifwd`),Ol(t,e=>F(p,e),()=>H(p)),Vs(t),G(e,t)},te=e=>{var t=jQ();bl(t,()=>({src:H(_),controls:d()||void 0,playsinline:!0,...f}),void 0,void 0,void 0,`svelte-1yaifwd`),Ol(t,e=>F(p,e),()=>H(p)),G(e,t)},ne=e=>{var t=W(),n=L(t),r=e=>{var t=MQ();bl(t,()=>({src:H(_),controls:!0,playsinline:!0,...f}),void 0,void 0,void 0,`svelte-1yaifwd`),Ol(t,e=>F(p,e),()=>H(p)),G(e,t)},i=e=>{Rl(e,{name:`audio_file`})};q(n,e=>{d()?e(r):e(i,-1)}),G(e,t)},re=e=>{Rl(e,{name:`draft`})};q(T,e=>{H(m)?e(E):H(y)?e(ee,1):t.kind===`video`?e(te,2):t.kind===`audio`?e(ne,3):e(re,-1)});var ie=z(T,2),ae=e=>{var t=Sde(),n=I(t),r=I(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`loading`)]),G(e,t)};q(r,e=>{!H(v)&&!H(h)&&e(i)}),D(n);var a=z(n,2);let o;D(t),V(()=>{Y(a,`src`,H(g)),o=el(a,1,`svelte-1yaifwd`,null,o,{loaded:!!H(g)})}),G(e,t)};q(ie,e=>{o()&&e(ae)}),D(C),V(()=>w=el(C,1,`preview ${a()??``}`,`svelte-1yaifwd`,w,{cover:s(),checkerboard:c(),dissolve:l(),loaded:H(h)})),G(e,C),k()}var Tde=new Set([`$$slots`,`$$events`,`$$legacy`,`coordinates`,`class`,`mapElement`,`onReady`]),Ede=U(`<div></div>`),Dde={hash:`svelte-1c5gj1k`,code:`
|
||
/* Leaflet default styles copied from \`node_modules/leaflet/dist/leaflet.css\`. Somehow we can’t */
|
||
/* import it directly here; Vite emits it as a separate CSS file, which we want to avoid. */
|
||
/* Rules for the features we don’t use — popups, tooltips, the Layers and Scale controls, */
|
||
/* image/video overlays, div icons, marker shadows, the Canvas renderer and the legacy IE/VML */
|
||
/* hacks — have been dropped. */.leaflet-pane,
|
||
.leaflet-tile,
|
||
.leaflet-marker-icon,
|
||
.leaflet-tile-container,
|
||
.leaflet-pane > svg,
|
||
.leaflet-zoom-box,
|
||
.leaflet-layer {position:absolute;left:0;top:0;}.leaflet-container {overflow:hidden;-webkit-tap-highlight-color:transparent;background:#ddd;outline-offset:1px;font-family:'Helvetica Neue', Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5;}.leaflet-tile,
|
||
.leaflet-marker-icon {-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none;}.leaflet-tile::selection {background:transparent;}.leaflet-safari .leaflet-tile {image-rendering:-webkit-optimize-contrast;}.leaflet-safari .leaflet-tile-container {width:1600px;height:1600px;-webkit-transform-origin:0 0;transform-origin:0 0;}.leaflet-marker-icon {display:block;}.leaflet-container .leaflet-overlay-pane svg {max-width:none !important;max-height:none !important;}.leaflet-container .leaflet-marker-pane img,
|
||
.leaflet-container .leaflet-tile-pane img,
|
||
.leaflet-container .leaflet-tile {max-width:none !important;max-height:none !important;width:auto;padding:0;}.leaflet-container img.leaflet-tile {mix-blend-mode:plus-lighter;}.leaflet-container.leaflet-touch-zoom {-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y;}.leaflet-container.leaflet-touch-drag {-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom;}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {-ms-touch-action:none;touch-action:none;}.leaflet-container a {-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4);color:#0078a8;}.leaflet-tile {filter:inherit;visibility:hidden;}.leaflet-tile-loaded {visibility:inherit;}.leaflet-zoom-box {width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800;border:2px dotted #38f;background:rgba(255, 255, 255, 0.5);}.leaflet-overlay-pane svg {-moz-user-select:none;user-select:none;}.leaflet-pane {z-index:400;}.leaflet-tile-pane {z-index:200;}.leaflet-overlay-pane {z-index:400;}.leaflet-marker-pane {z-index:600;}.leaflet-map-pane svg {z-index:200;}.leaflet-control {position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto;float:left;clear:both;cursor:auto;}.leaflet-top,
|
||
.leaflet-bottom {position:absolute;z-index:1000;pointer-events:none;}.leaflet-top {top:0;}.leaflet-right {right:0;}.leaflet-bottom {bottom:0;}.leaflet-left {left:0;}.leaflet-right .leaflet-control {float:right;margin-right:10px;}.leaflet-top .leaflet-control {margin-top:10px;}.leaflet-bottom .leaflet-control {margin-bottom:10px;}.leaflet-left .leaflet-control {margin-left:10px;}.leaflet-zoom-animated {-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;}svg.leaflet-zoom-animated {will-change:transform;}.leaflet-zoom-anim .leaflet-zoom-animated {-webkit-transition:-webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1);-moz-transition:-moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1);transition:transform 0.25s cubic-bezier(0, 0, 0.25, 1);}.leaflet-zoom-anim .leaflet-tile,
|
||
.leaflet-pan-anim .leaflet-tile {-webkit-transition:none;-moz-transition:none;transition:none;}.leaflet-zoom-anim .leaflet-zoom-hide {visibility:hidden;}.leaflet-interactive {cursor:pointer;}.leaflet-grab {
|
||
/* stylelint-disable-next-line declaration-property-value-no-unknown */cursor:-webkit-grab;
|
||
/* stylelint-disable-next-line declaration-property-value-no-unknown */cursor:-moz-grab;cursor:grab;}.leaflet-crosshair,
|
||
.leaflet-crosshair .leaflet-interactive {cursor:crosshair;}.leaflet-dragging .leaflet-grab,
|
||
.leaflet-dragging .leaflet-grab .leaflet-interactive {cursor:move;
|
||
/* stylelint-disable-next-line declaration-property-value-no-unknown */cursor:-webkit-grabbing;
|
||
/* stylelint-disable-next-line declaration-property-value-no-unknown */cursor:-moz-grabbing;cursor:grabbing;}.leaflet-marker-icon,
|
||
.leaflet-pane > svg path,
|
||
.leaflet-tile-container {pointer-events:none;}.leaflet-marker-icon.leaflet-interactive,
|
||
.leaflet-pane > svg path.leaflet-interactive {pointer-events:visiblePainted;pointer-events:auto;}.leaflet-bar {box-shadow:0 1px 5px rgba(0, 0, 0, 0.65);border-radius:4px;}.leaflet-bar a {background-color:#fff;background-position:50% 50%;background-repeat:no-repeat;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black;}.leaflet-bar a:hover,
|
||
.leaflet-bar a:focus {background-color:#f4f4f4;}.leaflet-bar a:first-child {border-top-left-radius:4px;border-top-right-radius:4px;}.leaflet-bar a:last-child {border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none;}.leaflet-bar a.leaflet-disabled {cursor:default;background-color:#f4f4f4;color:#bbb;}.leaflet-touch .leaflet-bar a {width:30px;height:30px;line-height:30px;}.leaflet-touch .leaflet-bar a:first-child {border-top-left-radius:2px;border-top-right-radius:2px;}.leaflet-touch .leaflet-bar a:last-child {border-bottom-left-radius:2px;border-bottom-right-radius:2px;}.leaflet-control-zoom-in,
|
||
.leaflet-control-zoom-out {font:bold 18px 'Lucida Console',
|
||
Monaco,
|
||
monospace;text-indent:1px;}.leaflet-touch .leaflet-control-zoom-in,
|
||
.leaflet-touch .leaflet-control-zoom-out {font-size:22px;}.leaflet-container .leaflet-control-attribution {background:#fff;background:rgba(255, 255, 255, 0.8);margin:0;}.leaflet-control-attribution {padding:0 5px;color:#333;line-height:1.4;}.leaflet-control-attribution a {text-decoration:none;}.leaflet-control-attribution a:hover,
|
||
.leaflet-control-attribution a:focus {text-decoration:underline;}.leaflet-attribution-flag {display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em;}.leaflet-touch .leaflet-control-attribution,
|
||
.leaflet-touch .leaflet-bar {box-shadow:none;}.leaflet-touch .leaflet-bar {border:2px solid rgba(0, 0, 0, 0.2);background-clip:padding-box;}.map.svelte-1c5gj1k {margin:var(--sui-focus-ring-width);border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);overflow:hidden;aspect-ratio:1 / 1;background-clip:text;}.leaflet-container {font-family:inherit !important;font-size:var(--sui-font-size-small) !important;}.leaflet-container a {color:var(--sui-primary-accent-color-text) !important;text-decoration:none !important;}.leaflet-bar a {border-color:var(--sui-button-border-color) !important;color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-button-background-color) !important;}.leaflet-control {color:var(--sui-secondary-foreground-color) !important;background-color:var(--sui-secondary-background-color-translucent) !important;}.leaflet-control-attribution {padding:4px 8px;}
|
||
|
||
/* Dark theme: https://stackoverflow.com/q/59819792 */:root[data-theme='dark'] .leaflet-layer {filter:invert(100%) hue-rotate(180deg);}`};function PQ(e,t){O(t,!0),J(e,Dde);let n=X(t,`class`,3,``),r=X(t,`mapElement`,15),i=X(t,`onReady`,3,void 0),a=Al(t,Tde),o,s=async()=>{if(!r())return;let e=await Iz(`leaflet`,`dist/leaflet-src.esm.js`),n=`${Fz(`leaflet`)}/dist/images/marker-icon-2x.png`,a=e.map(r(),{center:[0,0],zoom:2});if(e.tileLayer(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{attribution:`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors`,referrerPolicy:`strict-origin`}).addTo(a),t.coordinates){let{latitude:r,longitude:i}=t.coordinates,o=e.icon({iconUrl:n,iconSize:[25,41]});e.marker([r,i],{icon:o}).addTo(a),a.setView([r,i],12)}r().querySelectorAll(`a[href^="https:"]`).forEach(e=>{e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`)}),o=new ResizeObserver(()=>{a?.invalidateSize()}),o.observe(r()),i()?.({leaflet:e,map:a})};Nl(()=>(s(),()=>{o?.disconnect()}));var c=Ede();bl(c,e=>({role:`application`,class:`map ${n()??``}`,"aria-label":e,...a}),[()=>t.coordinates?Z(`map_lat_lng`,{values:t.coordinates}):void 0],void 0,void 0,`svelte-1c5gj1k`),Ol(c,e=>r(e),()=>r()),G(e,c),k()}var Ode=e=>new Date(e*1e3).toISOString().substr(11,8),FQ=(e,t)=>{let n=()=>(t?.()).link,r=()=>(t?.()).collectionLabel,i=()=>(t?.()).entryLabel;var a=Ade();$f(I(a),{role:`link`,variant:`link`,onclick:()=>BY(n(),{transitionType:`forwards`}),children:(e,t)=>{var n=kde(),a=R(n);V(()=>K(a,`${r()??``} › ${i()??``}`)),G(e,n)},$$slots:{default:!0}}),D(a),G(e,a)},kde=U(`<span role="none"> </span>`),Ade=U(`<p><!></p>`),jde=U(`<div role="none" class="preview svelte-6mkk55"><!></div>`),Mde=U(`<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section>`),IQ=U(`<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section>`),Nde=U(`<a target="_blank" rel="noopener noreferrer"> </a>`),Pde=U(`<a dir="ltr"> </a>`),Fde=U(`<bdi dir="ltr"> </bdi>`),LQ=U(`<p> </p>`),Ide=U(`<section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section>`),Lde=U(`<div role="none" class="detail svelte-6mkk55"><!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p> </p></section> <!> <!> <!> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <p><!></p></section> <section class="svelte-6mkk55"><h4 class="svelte-6mkk55"> </h4> <!></section> <!> <!> <!> <!></div>`),Rde={hash:`svelte-6mkk55`,code:`.detail.svelte-6mkk55 {flex:none;overflow-x:hidden;overflow-y:auto;padding:16px;width:320px;.preview:where(.svelte-6mkk55) {overflow:hidden;margin:0 0 16px;border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-content-background-color);aspect-ratio:1 / 1;}section:where(.svelte-6mkk55) {&:not(:last-child) {margin:0 0 16px;}& > * {margin:0 0 4px;word-break:break-all;}}h4:where(.svelte-6mkk55) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}}`};function RQ(e,t){O(t,!0),J(e,Rde);let n=X(t,`showPreview`,3,!1),r=P(ao({...QZ})),i=N(()=>t.asset.path),a=N(()=>t.asset.size),o=N(()=>t.asset.kind),s=N(()=>t.asset.commitAuthor),c=N(()=>t.asset.commitDate),l=N(()=>H(r).publicURL),u=N(()=>H(r).repoBlobURL),d=N(()=>H(r).dimensions),f=N(()=>H(r).duration),p=N(()=>H(r).createdDate),m=N(()=>H(r).coordinates),h=N(()=>H(r).usedEntries),g=N(()=>qj(H(i))),_=N(()=>wr(H(g).extension,``)),v=N(()=>kR(H(o))||H(i).endsWith(`.pdf`)),y=async()=>{F(r,t.asset?await tQ(t.asset):{...QZ},!0),H(r).usedEntries=t.asset?await nQ(t.asset):[]};B(()=>{t.asset,y()});var b=Lde(),x=I(b),S=e=>{var n=jde(),r=I(n);{let e=N(()=>H(o)===`image`),n=N(()=>[`audio`,`video`].includes(H(o)));NQ(r,{get kind(){return H(o)},get asset(){return t.asset},variant:`tile`,get checkerboard(){return H(e)},get controls(){return H(n)}})}D(n),G(e,n)};q(x,e=>{n()&&H(v)&&e(S)});var C=z(x,2),w=I(C),T=R(w,!0),E=R(z(w,2),!0);D(C);var ee=z(C,2),te=e=>{var t=Mde(),n=I(t),r=R(n,!0),i=z(n,2);_c(I(i),()=>Ud.current,e=>{var t=ec();V(e=>K(t,e),[()=>yz(H(a))]),G(e,t)}),D(i),D(t),V(e=>K(r,e),[()=>Z(`size`)]),G(e,t)};q(ee,e=>{H(a)&&e(te)});var ne=z(ee,2),re=e=>{var t=IQ(),n=I(t),r=R(n,!0),i=R(z(n,2),!0);D(t),V(e=>{K(r,e),K(i,H(d)?`${H(d).width}×${H(d).height}`:`–`)},[()=>Z(`dimensions`)]),G(e,t)};q(ne,e=>{H(v)&&e(re)});var ie=z(ne,2),ae=e=>{var t=IQ(),n=I(t),r=R(n,!0),i=R(z(n,2),!0);D(t),V((e,t)=>{K(r,e),K(i,t)},[()=>Z(`duration`),()=>H(f)?Ode(H(f)):`–`]),G(e,t)},oe=N(()=>[`audio`,`video`].includes(H(o)));q(ie,e=>{H(oe)&&e(ae)});var se=z(ie,2),ce=I(se),le=R(ce,!0),ue=z(ce,2),de=I(ue),fe=e=>{var t=Nde(),n=R(t,!0);V(()=>{Y(t,`href`,H(l)),K(n,H(l))}),G(e,t)},pe=e=>{G(e,ec(`–`))};q(de,e=>{H(l)?e(fe):e(pe,-1)}),D(ue),D(se);var me=z(se,2),he=I(me),ge=R(he,!0),_e=z(he,2),ve=I(_e),ye=e=>{var t=Pde(),n=R(t);V(()=>{Y(t,`href`,H(u)),K(n,`/${H(i)??``}`),t.dir=t.dir}),G(e,t)},be=e=>{var t=Fde(),n=R(t);V(()=>{K(n,`/${H(i)??``}`),t.dir=t.dir}),G(e,t)};q(ve,e=>{H(u)?e(ye):e(be,-1)}),D(_e),D(me);var xe=z(me,2),Se=I(xe),Ce=R(Se,!0),we=z(Se,2),Te=e=>{var t=LQ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`loading`)]),G(e,t)},Ee=e=>{var t=W();Cc(L(t),17,()=>H(h),e=>e.id,(e,t)=>{var n=W();Cc(L(n),17,()=>cB(H(t)),e=>e.name,(e,n)=>{var r=W();_c(L(r),()=>Ud.current,e=>{let r=N(()=>UL(H(n)));var i=W();Cc(L(i),17,()=>ZI(H(n),H(t)),e=>e.name,(e,t)=>{{let i=N(()=>({link:`/collections/${H(n).name}/entries/${H(t).name}`,collectionLabel:H(r),entryLabel:XI(H(t))}));FQ(e,()=>H(i))}},e=>{{let i=N(()=>({link:`/collections/${H(n).name}/entries/${H(t).subPath}`,collectionLabel:H(r),entryLabel:lV(H(n),H(t),{useTemplate:!0})}));FQ(e,()=>H(i))}}),G(e,i)}),G(e,r)}),G(e,n)},e=>{var t=LQ(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`sort_keys.none`)]),G(e,t)}),G(e,t)};q(we,e=>{H(h)?e(Ee,-1):e(Te)}),D(xe);var De=z(xe,2),Oe=e=>{var t=IQ(),n=I(t),r=R(n,!0),i=R(z(n,2),!0);D(t),V(e=>{K(r,e),K(i,H(s).name||H(s).login||H(s).email)},[()=>Z(`sort_keys.commit_author`)]),G(e,t)};q(De,e=>{H(s)&&e(Oe)});var ke=z(De,2),Ae=e=>{var t=IQ(),n=I(t),r=R(n,!0),i=R(z(n,2),!0);D(t),V((e,t)=>{K(r,e),K(i,t)},[()=>Z(`sort_keys.commit_date`),()=>cR(H(c),Ud.current)]),G(e,t)};q(ke,e=>{H(c)&&e(Ae)});var je=z(ke,2),Me=e=>{var t=IQ(),n=I(t),r=R(n,!0),i=R(z(n,2),!0);D(t),V((e,t)=>{K(r,e),K(i,t)},[()=>Z(`created_date`),()=>cR(H(p),Ud.current)]),G(e,t)};q(je,e=>{H(p)&&e(Me)});var Ne=z(je,2),Pe=e=>{var t=Ide(),n=I(t),r=R(n,!0);PQ(z(n,2),{get coordinates(){return H(m)}}),D(t),V(e=>K(r,e),[()=>Z(`location`)]),G(e,t)};q(Ne,e=>{H(m)&&e(Pe)}),D(b),V((e,t,n,r,i)=>{K(T,e),K(E,t),K(le,n),K(ge,r),K(Ce,i)},[()=>Z(`kind`),()=>Z(`file_type_labels.${H(_)}`,{default:DR.getType(H(i))??H(_).toUpperCase()}),()=>Z(`public_urls`,{values:{count:1}}),()=>Z(`file_paths`,{values:{count:1}}),()=>Z(`used_in`)]),G(e,b),k()}var zde=U(`<span role="none"> </span> <!>`,1);function zQ(e,t){O(t,!0);let n=X(t,`backPath`,3,`/collections`);zj(e,{children:(e,r)=>{var i=zde(),a=L(i),o=R(a,!0);$f(z(a,2),{variant:`primary`,onclick:()=>{UY(n())},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`back`)]),G(e,n)},$$slots:{default:!0}}),V(()=>K(o,t.message)),G(e,i)},$$slots:{default:!0}}),k()}var Bde=U(`<iframe sandbox="allow-scripts" class="svelte-9guikv"></iframe>`),Vde=U(`<div role="figure" class="markdown svelte-9guikv"></div>`),BQ=U(`<pre role="figure" class="svelte-9guikv"> </pre>`),Hde=U(`<span role="alert"> </span>`),Ude=U(`<!> <div role="none" class="row svelte-9guikv"><div role="none" class="preview svelte-9guikv"><!></div> <!></div>`,1),Wde=U(`<div role="group" class="wrapper svelte-9guikv"><!></div>`),Gde={hash:`svelte-9guikv`,code:`.wrapper.svelte-9guikv {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);.row:where(.svelte-9guikv) {flex:auto;display:flex;overflow:hidden;
|
||
|
||
@media (width < 768px) {flex-direction:column;.preview:where(.svelte-9guikv) {flex:none !important;aspect-ratio:1 / 1;}.detail {flex:auto;width:auto;}
|
||
}.preview:where(.svelte-9guikv) {flex:auto;overflow:hidden;iframe:where(.svelte-9guikv),
|
||
pre:where(.svelte-9guikv),
|
||
.markdown:where(.svelte-9guikv) {display:block;width:100%;height:100%;}pre:where(.svelte-9guikv),
|
||
.markdown:where(.svelte-9guikv) {margin:0;padding:16px;overflow:auto;}pre:where(.svelte-9guikv) {white-space:pre-wrap;}}.detail {background-color:var(--sui-primary-background-color);}}}`};function Kde(e,t){O(t,!0),J(e,Gde);let n=()=>j(bU,`$overlaidAsset`,a),r=()=>j(pY,`$showAssetOverlay`,a),i=()=>j(dM,`$selectedAssetFolder`,a),[a,o]=sa(),s=P(void 0),c=P(void 0),l=N(()=>n()?.kind),u=N(()=>n()?.blobURL),d=N(()=>n()?.name),f=async()=>{await ws(),H(s)&&(H(s).tabIndex=0,H(s).focus())};B(()=>{n()&&(async()=>{F(c,await eB(n()),!0)})()}),B(()=>{H(s)&&r()&&f()});var p=Wde();_c(I(p),()=>n()?.sha,e=>{var t=Ude(),r=L(t);TQ(r,{});var a=z(r,2),o=I(a),s=I(o),f=e=>{{let t=N(()=>Z(`file_not_found`)),n=N(()=>i()?.internalPath??`-/all`);zQ(e,{get message(){return H(t)},get backPath(){return`/assets/${H(n)??``}`}})}},p=e=>{{let t=N(()=>[`image`,`video`].includes(H(l))),r=N(()=>H(l)===`image`),i=N(()=>H(l)===`image`?H(d):void 0),a=N(()=>[`audio`,`video`].includes(H(l)));NQ(e,{get kind(){return H(l)},get asset(){return n()},get blurBackground(){return H(t)},get checkerboard(){return H(r)},get alt(){return H(i)},get controls(){return H(a)}})}},m=N(()=>H(l)&&kR(H(l))),h=e=>{var t=Bde();V(()=>{Y(t,`src`,H(u)),Y(t,`title`,H(d))}),G(e,t)},g=e=>{var t=W();hc(L(t),()=>n()?.text??H(c).text(),null,(e,t)=>{var n=W(),r=L(n),i=e=>{var n=W();hc(L(n),()=>ir(H(t),{breaks:!0,async:!0}),null,(e,t)=>{var n=Vde();kc(n,()=>gt(H(t)),!0),D(n),G(e,n)},e=>{var n=BQ(),r=R(n,!0);V(()=>K(r,H(t))),G(e,n)}),G(e,n)},a=N(()=>H(d)?.endsWith(`.md`)),o=e=>{var n=BQ(),r=R(n,!0);V(()=>K(r,H(t))),G(e,n)};q(r,e=>{H(a)?e(i):e(o,-1)}),G(e,n)}),G(e,t)},_=N(()=>H(c)?.type&&Kj(H(c).type)),v=e=>{zj(e,{children:(e,t)=>{var n=Hde(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`preview_unavailable`)]),G(e,n)},$$slots:{default:!0}})};q(s,e=>{n()?H(m)?e(p,1):H(c)?.type===`application/pdf`?e(h,2):H(_)?e(g,3):e(v,-1):e(f)}),D(o);var y=z(o,2),b=e=>{RQ(e,{get asset(){return n()}})};q(y,e=>{n()&&e(b)}),D(a),G(e,t)}),D(p),Ol(p,e=>F(s,e),()=>H(s)),V(e=>Y(p,`aria-label`,e),[()=>Z(`asset_editor`)]),G(e,p),k(),o()}var qde=e=>{let{files:t,folder:n,originalAssets:r,replaceDuplicates:i=!1}=e,{slugify_filename:a=!1}=oU().config,o=n?.internalPath===void 0?[]:NU(n.internalPath),s=o.map(e=>e.name.normalize());return t.map((e,t)=>{let c=r?.[t]??(i?o.find(t=>t.name.normalize().toLowerCase()===e.name.normalize().toLowerCase()):void 0),l=c?.name??xz(e.name,{slugificationEnabled:a,assetNamesInSameFolder:s});return s.includes(l)||s.push(l),{action:c?`update`:`create`,name:l,path:c?.path??[n?.internalPath,l].join(`/`),file:e}})},Jde=({count:e})=>{let t=A(yU),n=A(bU);t&&yU.set(hU(t.path)),n&&bU.set(hU(n.path)),cQ.set({...oQ,saved:!0,published:A(eX)&&!A(tX),count:e})},VQ=async(e,t)=>{let{files:n,folder:r}=e,i=qde(e),a=i.map(({name:e,path:t,file:n})=>({name:e,path:t,size:n.size,kind:MR(e),folder:r}));await fQ({changes:i.map(({action:e,path:t,file:n})=>({action:e,path:t,data:n})),savingAssets:a,options:t}),Jde({count:n.length})},Yde=U(`<div role="none"><!></div>`),Xde={hash:`svelte-1lnkfih`,code:`.wrapper.svelte-1lnkfih {display:contents;textarea {min-height:40dvh;max-height:80dvh;font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);text-wrap:nowrap;resize:vertical;}&.wrap textarea {text-wrap:wrap;}}`};function Zde(e,t){O(t,!0),J(e,Xde);let n=()=>j(SU,`$editingAsset`,i),r=()=>j(pY,`$showAssetOverlay`,i),[i,a]=sa(),o=N(n),s=P(!1),c=P(void 0),l=P(void 0),u=P(void 0),d=P(!1),f=async()=>{F(c,await eB(H(o)),!0),F(l,await H(c).text(),!0),F(u,H(l),!0),F(s,!0)},p=()=>{M(SU,void 0),F(c,void 0),F(l,void 0),F(u,void 0)},m=async()=>{H(o)&&H(c)&&typeof H(u)==`string`&&await VQ({folder:H(o).folder,files:[new File([H(u)],H(o).name,{type:H(c).type})],originalAssets:[H(o)]},{commitType:`uploadMedia`})};B(()=>{H(o)&&H(c)===void 0&&f()}),B(()=>{r()||F(s,!1)});{let t=e=>{{let t=N(()=>Z(`wrap_long_lines`));sh(e,{get label(){return H(t)},get checked(){return H(d)},set checked(e){F(d,e,!0)}})}},n=N(()=>Z(`edit_x`,{values:{name:H(o)?.name??``}})),r=N(()=>Z(`save`)),i=N(()=>H(u)===H(l));Yp(e,{size:`x-large`,get title(){return H(n)},get okLabel(){return H(r)},get okDisabled(){return H(i)},okShortcuts:`Accel+S`,onOk:()=>{m()},onClose:()=>{p()},get open(){return H(s)},set open(e){F(s,e,!0)},footerExtra:t,children:(e,t)=>{var n=Yde();let r;Pj(I(n),{dir:`auto`,flex:!0,get value(){return H(u)},set value(e){F(u,e,!0)}}),D(n),V(()=>r=el(n,1,`wrapper svelte-1lnkfih`,null,r,{wrap:H(d)})),G(e,n)},$$slots:{footerExtra:!0,default:!0}})}k(),a()}var Qde=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`oldExtension`,`newExtension`,`okLabel`,`onOk`,`onCancel`]),$de=U(`<p class="svelte-8pzyo8"> </p> <p class="svelte-8pzyo8"> </p>`,1),efe={hash:`svelte-8pzyo8`,code:`p.svelte-8pzyo8 {margin:0 0 8px;}p.svelte-8pzyo8:last-child {margin:0;}`};function HQ(e,t){O(t,!0),J(e,efe);let n=X(t,`open`,15,!1),r=X(t,`oldExtension`,3,void 0),i=X(t,`newExtension`,3,void 0),a=X(t,`okLabel`,3,``),o=X(t,`onOk`,3,void 0),s=X(t,`onCancel`,3,void 0),c=Al(t,Qde),l=N(()=>r()?i()?`change`:`remove`:`add`);{let t=N(()=>Z(`change_file_extension`));Zp(e,Ml(()=>c,{get title(){return H(t)},get okLabel(){return a()},get onOk(){return o()},get onCancel(){return s()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=$de(),a=L(n),o=R(a,!0),s=R(z(a,2),!0);V((e,t)=>{K(o,e),K(s,t)},[()=>Z(`confirm_file_extension_change.${H(l)}`,{values:{oldExtension:r(),newExtension:i()}}),()=>Z(`file_extension_change_warning`)]),G(e,n)},$$slots:{default:!0}}))}k()}
|
||
/**
|
||
* @license
|
||
* MIT License
|
||
*
|
||
* Copyright (c) 2014-present, Lee Byron and other contributors.
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in all
|
||
* copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/
|
||
var UQ=`@@__IMMUTABLE_INDEXED__@@`;function WQ(e){return!!(e&&e[UQ])}var GQ=`@@__IMMUTABLE_KEYED__@@`;function KQ(e){return!!(e&&e[GQ])}function qQ(e){return KQ(e)||WQ(e)}var JQ=`@@__IMMUTABLE_ITERABLE__@@`;function YQ(e){return!!(e&&e[JQ])}var XQ=function(e){return YQ(e)?e:R$(e)},ZQ=function(e){function t(e){return KQ(e)?e:z$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(XQ),QQ=function(e){function t(e){return WQ(e)?e:B$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(XQ),$Q=function(e){function t(e){return YQ(e)&&!qQ(e)?e:V$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(XQ);XQ.Keyed=ZQ,XQ.Indexed=QQ,XQ.Set=$Q;var e$=0,t$=1,n$=2,r$=typeof Symbol==`function`&&Symbol.iterator,i$=`@@iterator`,a$=r$||i$,o$=function(e){this.next=e};o$.prototype.toString=function(){return`[Iterator]`},o$.KEYS=e$,o$.VALUES=t$,o$.ENTRIES=n$,o$.prototype.inspect=o$.prototype.toSource=function(){return this.toString()},o$.prototype[a$]=function(){return this};function s$(e,t,n,r){var i=e===e$?t:e===t$?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function c$(){return{value:void 0,done:!0}}function l$(e){return Array.isArray(e)?!0:!!f$(e)}function u$(e){return!!(e&&typeof e.next==`function`)}function d$(e){var t=f$(e);return t&&t.call(e)}function f$(e){var t=e&&(r$&&e[r$]||e[i$]);if(typeof t==`function`)return t}function tfe(e){var t=f$(e);return t&&t===e.entries}function nfe(e){var t=f$(e);return t&&t===e.keys}var p$=`delete`,m$=5,h$=1<<m$,g$=h$-1,_$={};function v$(){return{value:!1}}function y$(e){e&&(e.value=!0)}function b$(){}function x$(e){return e.size===void 0&&(e.size=e.__iterate(C$)),e.size}function S$(e,t){if(typeof t!=`number`){var n=t>>>0;if(``+n!==t||n===4294967295)return NaN;t=n}return t<0?x$(e)+t:t}function C$(){return!0}function w$(e,t,n){return(e===0&&!O$(e)||n!==void 0&&e<=-n)&&(t===void 0||n!==void 0&&t>=n)}function T$(e,t){return D$(e,t,0)}function E$(e,t){return D$(e,t,t)}function D$(e,t,n){return e===void 0?n:O$(e)?t===1/0?t:Math.max(0,t+e)|0:t===void 0||t===e?e:Math.min(t,e)|0}function O$(e){return e<0||e===0&&1/e==-1/0}var k$=`@@__IMMUTABLE_RECORD__@@`;function A$(e){return!!(e&&e[k$])}function j$(e){return YQ(e)||A$(e)}var M$=`@@__IMMUTABLE_ORDERED__@@`;function N$(e){return!!(e&&e[M$])}var P$=`@@__IMMUTABLE_SEQ__@@`;function F$(e){return!!(e&&e[P$])}var I$=Object.prototype.hasOwnProperty;function L$(e){return Array.isArray(e)||typeof e==`string`?!0:e&&typeof e==`object`&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}var R$=function(e){function t(e){return e==null?W$():j$(e)?e.toSeq():afe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString(`Seq {`,`}`)},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var a=n[t?r-++i:i++];if(e(a[1],a[0],this)===!1)break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new o$(function(){if(i===r)return c$();var a=n[t?r-++i:i++];return s$(e,a[0],a[1])})}return this.__iteratorUncached(e,t)},t}(XQ),z$=function(e){function t(e){return e==null?W$().toKeyedSeq():YQ(e)?KQ(e)?e.toSeq():e.fromEntrySeq():A$(e)?e.toSeq():G$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(R$),B$=function(e){function t(e){return e==null?W$():YQ(e)?KQ(e)?e.entrySeq():e.toIndexedSeq():A$(e)?e.toSeq().entrySeq():K$(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString(`Seq [`,`]`)},t}(R$),V$=function(e){function t(e){return(YQ(e)&&!qQ(e)?e:B$(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(R$);R$.isSeq=F$,R$.Keyed=z$,R$.Set=V$,R$.Indexed=B$,R$.prototype[P$]=!0;var H$=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[S$(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var a=t?r-++i:i++;if(e(n[a],a,this)===!1)break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new o$(function(){if(i===r)return c$();var a=t?r-++i:i++;return s$(e,a,n[a])})},t}(B$),U$=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return t!==void 0&&!this.has(e)?t:this._object[e]},t.prototype.has=function(e){return I$.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,a=0;a!==i;){var o=r[t?i-++a:a++];if(e(n[o],o,this)===!1)break}return a},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,a=0;return new o$(function(){if(a===i)return c$();var o=r[t?i-++a:a++];return s$(e,o,n[o])})},t}(z$);U$.prototype[M$]=!0;var rfe=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._collection,r=d$(n),i=0;if(u$(r))for(var a;!(a=r.next()).done&&e(a.value,i++,this)!==!1;);return i},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._collection,r=d$(n);if(!u$(r))return new o$(c$);var i=0;return new o$(function(){var t=r.next();return t.done?t:s$(e,i++,t.value)})},t}(B$),ife;function W$(){return ife||=new H$([])}function G$(e){var t=q$(e);if(t)return t.fromEntrySeq();if(typeof e==`object`)return new U$(e);throw TypeError(`Expected Array or collection object of [k, v] entries, or keyed object: `+e)}function K$(e){var t=q$(e);if(t)return t;throw TypeError(`Expected Array or collection object of values: `+e)}function afe(e){var t=q$(e);if(t)return tfe(e)?t.fromEntrySeq():nfe(e)?t.toSetSeq():t;if(typeof e==`object`)return new U$(e);throw TypeError(`Expected Array or collection object of values, or keyed object: `+e)}function q$(e){return L$(e)?new H$(e):l$(e)?new rfe(e):void 0}function J$(){return this.__ensureOwner()}function Y$(){return this.__ownerID?this:this.__ensureOwner(new b$)}var X$=typeof Math.imul==`function`?Math.imul:function(e,t){e|=0,t|=0;var n=e&65535,r=t&65535;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Z$(e){return e>>>1&1073741824|e&3221225471}var ofe=Object.prototype.valueOf;function Q$(e){if(e==null)return $$(e);if(typeof e.hashCode==`function`)return Z$(e.hashCode(e));var t=pfe(e);if(t==null)return $$(t);switch(typeof t){case`boolean`:return t?1108378657:1108378656;case`number`:return sfe(t);case`string`:return t.length>mfe?cfe(t):e1(t);case`object`:case`function`:return dfe(t);case`symbol`:return ufe(t);default:if(typeof t.toString==`function`)return e1(t.toString());throw Error(`Value type `+typeof t+` cannot be hashed.`)}}function $$(e){return e===null?1108378658:1108378659}function sfe(e){if(e!==e||e===1/0)return 0;var t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)e/=4294967295,t^=e;return Z$(t)}function cfe(e){var t=d1[e];return t===void 0&&(t=e1(e),u1===hfe&&(u1=0,d1={}),u1++,d1[e]=t),t}function e1(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Z$(t)}var lfe=(Math.random()*1048576|1)%1048576||40503;function t1(e){if(typeof e!=`string`)return Q$(e);for(var t=0,n=0;n<e.length;n++)t=lfe*t+e.charCodeAt(n)|0;return t}function ufe(e){var t=s1[e];return t===void 0?(t=i1(),s1[e]=t,t):t}function dfe(e){var t;if(a1&&(t=o1.get(e),t!==void 0)||(t=e[l1],t!==void 0)||!r1&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[l1],t!==void 0||(t=ffe(e),t!==void 0)))return t;if(t=i1(),a1)o1.set(e,t);else if(n1!==void 0&&n1(e)===!1)throw Error(`Non-extensible objects are not allowed as keys.`);else if(r1)Object.defineProperty(e,l1,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[l1]=t;else if(e.nodeType!==void 0)e[l1]=t;else throw Error(`Unable to set a non-enumerable property on object.`);return t}var n1=Object.isExtensible,r1=(function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}})();function ffe(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function pfe(e){return e.valueOf!==ofe&&typeof e.valueOf==`function`?e.valueOf(e):e}function i1(){var e=++c1;return c1&1073741824&&(c1=0),e}var a1=typeof WeakMap==`function`,o1;a1&&(o1=new WeakMap);var s1=Object.create(null),c1=0,l1=`__immutablehash__`;typeof Symbol==`function`&&(l1=Symbol(l1));var mfe=16,hfe=255,u1=0,d1={},f1=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=v1(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=_1(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(z$);f1.prototype[M$]=!0;var p1=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&x$(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(t$,t),i=0;return t&&x$(this),new o$(function(){var a=r.next();return a.done?a:s$(e,t?n.size-++i:i++,a.value,a)})},t}(B$),m1=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(t$,t);return new o$(function(){var t=n.next();return t.done?t:s$(e,t.value,t.value,t)})},t}(V$),h1=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){O1(t);var r=YQ(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(t$,t);return new o$(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){O1(r);var i=YQ(r);return s$(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(z$);p1.prototype.cacheResult=f1.prototype.cacheResult=m1.prototype.cacheResult=h1.prototype.cacheResult=j1;function g1(e){var t=A1(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=j1,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===n$){var r=e.__iterator(t,n);return new o$(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===t$?e$:t$,n)},t}function _1(e,t,n){var r=A1(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var a=e.get(r,_$);return a===_$?i:t.call(n,a,r,e)},r.__iterateUncached=function(r,i){var a=this;return e.__iterate(function(e,i,o){return r(t.call(n,e,i,o),i,a)!==!1},i)},r.__iteratorUncached=function(r,i){var a=e.__iterator(n$,i);return new o$(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return s$(r,s,t.call(n,o[1],s,e),i)})},r}function v1(e,t){var n=A1(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=g1(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=j1,n.__iterate=function(n,r){var i=this,a=0;return r&&x$(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++a:a++,i)},!r)},n.__iterator=function(r,i){var a=0;i&&x$(e);var o=e.__iterator(n$,!i);return new o$(function(){var e=o.next();if(e.done)return e;var s=e.value;return s$(r,t?s[0]:i?n.size-++a:a++,s[1],e)})},n}function y1(e,t,n,r){var i=A1(e);return r&&(i.has=function(r){var i=e.get(r,_$);return i!==_$&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,_$);return a!==_$&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,c){if(t.call(n,e,a,c))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(n$,a),s=0;return new o$(function(){for(;;){var a=o.next();if(a.done)return a;var c=a.value,l=c[0],u=c[1];if(t.call(n,u,l,e))return s$(i,r?l:s++,u,a)}})},i}function gfe(e,t,n){var r=a0().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function _fe(e,t,n){var r=KQ(e),i=(N$(e)?G0():a0()).asMutable();e.__iterate(function(a,o){i.update(t.call(n,a,o,e),function(e){return e||=[],e.push(r?[o,a]:a),e})});var a=k1(e);return i.map(function(t){return D1(e,a(t))}).asImmutable()}function vfe(e,t,n){var r=KQ(e),i=[[],[]];e.__iterate(function(a,o){i[+!!t.call(n,a,o,e)].push(r?[o,a]:a)});var a=k1(e);return i.map(function(t){return D1(e,a(t))})}function b1(e,t,n,r){var i=e.size;if(w$(t,n,i))return e;if(i===void 0&&(t<0||n<0))return b1(e.toSeq().cacheResult(),t,n,r);var a=T$(t,i),o=E$(n,i)-a,s;o===o&&(s=o<0?0:o);var c=A1(e);return c.size=s===0?s:e.size&&s||void 0,!r&&F$(e)&&s>=0&&(c.get=function(t,n){return t=S$(this,t),t>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var i=this;if(s===0)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,c=!0,l=0;return e.__iterate(function(e,n){if(!(c&&=o++<a))return l++,t(e,r?n:l-1,i)!==!1&&l!==s}),l},c.__iteratorUncached=function(t,n){if(s!==0&&n)return this.cacheResult().__iterator(t,n);if(s===0)return new o$(c$);var i=e.__iterator(t,n),o=0,c=0;return new o$(function(){for(;o++<a;)i.next();if(++c>s)return c$();var e=i.next();return r||t===t$||e.done?e:t===e$?s$(t,c-1,void 0,e):s$(t,c-1,e.value[1],e)})},c}function yfe(e,t,n){var r=A1(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++o&&r(e,i,a)}),o},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(n$,i),s=!0;return new o$(function(){if(!s)return c$();var e=o.next();if(e.done)return e;var i=e.value,c=i[0],l=i[1];return t.call(n,l,c,a)?r===n$?e:s$(r,c,l,e):(s=!1,c$())})},r}function x1(e,t,n,r){var i=A1(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate(function(e,a,l){if(!(s&&=t.call(n,e,a,l)))return c++,i(e,r?a:c-1,o)}),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(n$,a),c=!0,l=0;return new o$(function(){var e,a,u;do{if(e=s.next(),e.done)return r||i===t$?e:i===e$?s$(i,l++,void 0,e):s$(i,l++,e.value[1],e);var d=e.value;a=d[0],u=d[1],c&&=t.call(n,u,a,o)}while(c);return i===n$?e:s$(i,a,u,e)})},i}var bfe=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(e!==void 0){var n=t.size;if(n!==void 0)return e+n}},0),this[GQ]=this._wrappedIterables[0][GQ],this[UQ]=this._wrappedIterables[0][UQ],this[M$]=this._wrappedIterables[0][M$]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(this._wrappedIterables.length!==0){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=KQ(this),i=r?n$:t$,a=this._wrappedIterables[n].__iterator(i,t),o=!0,s=0;o;){for(var c=a.next();c.done;){if(n++,n===this._wrappedIterables.length)return s;a=this._wrappedIterables[n].__iterator(i,t),c=a.next()}o=(r?e(c.value[1],c.value[0],this):e(c.value,s,this))!==!1,s++}return s}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(this._wrappedIterables.length===0)return new o$(c$);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new o$(function(){for(var a=i.next();a.done;){if(r++,r===n._wrappedIterables.length)return a;i=n._wrappedIterables[r].__iterator(e,t),a=i.next()}return a})},t}(R$);function xfe(e,t){var n=KQ(e),r=[e].concat(t).map(function(e){return YQ(e)?n&&(e=ZQ(e)):e=n?G$(e):K$(Array.isArray(e)?e:[e]),e}).filter(function(e){return e.size!==0});if(r.length===0)return e;if(r.length===1){var i=r[0];if(i===e||n&&KQ(i)||WQ(e)&&WQ(i))return i}return new bfe(r)}function S1(e,t,n){var r=A1(e);return r.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;function c(e,l){e.__iterate(function(e,a){return(!t||l<t)&&YQ(e)?c(e,l+1):(o++,i(e,n?a:o-1,r)===!1&&(s=!0)),!s},a)}return c(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(r,i),o=[],s=0;return new o$(function(){for(;a;){var e=a.next();if(e.done!==!1){a=o.pop();continue}var c=e.value;if(r===n$&&(c=c[1]),(!t||o.length<t)&&YQ(c))o.push(a),a=c.__iterator(r,i);else return n?e:s$(r,s++,c,e)}return c$()})},r}function Sfe(e,t,n){var r=k1(e);return e.toSeq().map(function(i,a){return r(t.call(n,i,a,e))}).flatten(!0)}function Cfe(e,t){var n=A1(e);return n.size=e.size&&e.size*2-1,n.__iterateUncached=function(n,r){var i=this,a=0;return e.__iterate(function(e){return(!a||n(t,a++,i)!==!1)&&n(e,a++,i)!==!1},r),a},n.__iteratorUncached=function(n,r){var i=e.__iterator(t$,r),a=0,o;return new o$(function(){return(!o||a%2)&&(o=i.next(),o.done)?o:a%2?s$(n,a++,t):s$(n,a++,o.value,o)})},n}function C1(e,t,n){t||=M1;var r=KQ(e),i=0,a=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?z$(a):WQ(e)?B$(a):V$(a)}function w1(e,t,n){if(t||=M1,n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return T1(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return T1(t,e,n)?n:e})}function T1(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n==null||n!==n)||r>0}function E1(e,t,n,r){var i=A1(e),a=new H$(n).map(function(e){return e.size});return i.size=r?a.max():a.min(),i.__iterate=function(e,t){for(var n=this.__iterator(t$,t),r,i=0;!(r=n.next()).done&&e(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var a=n.map(function(e){return e=XQ(e),d$(i?e.reverse():e)}),o=0,s=!1;return new o$(function(){var n;return s||=(n=a.map(function(e){return e.next()}),r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),s?c$():s$(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function D1(e,t){return e===t?e:F$(e)?t:e.constructor(t)}function O1(e){if(e!==Object(e))throw TypeError(`Expected [K, V] tuple: `+e)}function k1(e){return KQ(e)?ZQ:WQ(e)?QQ:$Q}function A1(e){return Object.create((KQ(e)?z$:WQ(e)?B$:V$).prototype)}function j1(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):R$.prototype.cacheResult.call(this)}function M1(e,t){return e===void 0&&t===void 0?0:e===void 0?1:t===void 0?-1:e>t?1:e<t?-1:0}function N1(e){return!!(e&&typeof e.equals==`function`&&typeof e.hashCode==`function`)}function P1(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf==`function`&&typeof t.valueOf==`function`){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(N1(e)&&N1(t)&&e.equals(t))}function F1(e,t,n,r){return T0(e,[t],n,r)}function I1(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return R1(this,e)}function L1(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];if(typeof e!=`function`)throw TypeError(`Invalid merger function: `+e);return R1(this,t,e)}function R1(e,t,n){for(var r=[],i=0;i<t.length;i++){var a=ZQ(t[i]);a.size!==0&&r.push(a)}return r.length===0?e:e.toSeq().size===0&&!e.__ownerID&&r.length===1?A$(e)?e:e.constructor(r[0]):e.withMutations(function(e){for(var t=n?function(t,r){F1(e,r,_$,function(e){return e===_$?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)})}var wfe=Object.prototype.toString;function z1(e){if(!e||typeof e!=`object`||wfe.call(e)!==`[object Object]`)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t,r=Object.getPrototypeOf(t);r!==null;)n=r,r=Object.getPrototypeOf(n);return n===t}function B1(e){return typeof e==`object`&&(j$(e)||Array.isArray(e)||z1(e))}function V1(e){return typeof e==`string`&&(e===`__proto__`||e===`constructor`)}function H1(e,t){t||=0;for(var n=Math.max(0,e.length-t),r=Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function U1(e){if(Array.isArray(e))return H1(e);var t={};for(var n in e)V1(n)||I$.call(e,n)&&(t[n]=e[n]);return t}function W1(e,t,n){return G1(e,t,Tfe(n))}function G1(e,t,n){if(!B1(e))throw TypeError(`Cannot merge into non-data-structure value: `+e);if(j$(e))return typeof n==`function`&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,a=r?QQ:ZQ,o=r?function(t){i===e&&(i=U1(i)),i.push(t)}:function(t,r){if(!V1(r)){var a=I$.call(i,r),o=a&&n?n(i[r],t,r):t;(!a||o!==i[r])&&(i===e&&(i=U1(i)),i[r]=o)}},s=0;s<t.length;s++)a(t[s]).forEach(o);return i}function Tfe(e){function t(n,r,i){return B1(n)&&B1(r)&&Efe(n,r)?G1(n,[r],t):e?e(n,r,i):r}return t}function Efe(e,t){var n=R$(e),r=R$(t);return WQ(n)===WQ(r)&&KQ(n)===KQ(r)}function K1(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return W1(this,e)}function q1(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return W1(this,t,e)}function J1(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return T0(this,e,h0(),function(e){return W1(e,t)})}function Y1(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return T0(this,e,h0(),function(e){return G1(e,t)})}function Dfe(e,t,n){return T0(e,t,_$,function(){return n})}function X1(e,t){return Dfe(this,e,t)}function Z1(e,t,n){return arguments.length===1?e(this):F1(this,e,t,n)}function Q1(e,t,n){return T0(this,e,t,n)}function $1(){return this.__altered}function e0(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var t0=`@@__IMMUTABLE_MAP__@@`;function n0(e){return!!(e&&e[t0])}function r0(e,t){if(!e)throw Error(t)}function i0(e){r0(e!==1/0,`Cannot perform this action with an infinite size.`)}var a0=function(e){function t(t){return t==null?h0():n0(t)&&!N$(t)?t:h0().withMutations(function(n){var r=e(t);i0(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString(`Map {`,`}`)},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return g0(this,e,t)},t.prototype.remove=function(e){return g0(this,e,_$)},t.prototype.deleteAll=function(e){var t=XQ(e);return t.size===0?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):h0()},t.prototype.sort=function(e){return G0(C1(this,e))},t.prototype.sortBy=function(e,t){return G0(C1(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,a){r.set(a,e.call(t,i,a,n))})})},t.prototype.__iterator=function(e,t){return new Ofe(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?m0(this.size,this._root,e,this.__hash):this.size===0?h0():(this.__ownerID=e,this.__altered=!1,this)},t}(ZQ);a0.isMap=n0;var o0=a0.prototype;o0[t0]=!0,o0[p$]=o0.remove,o0.removeAll=o0.deleteAll,o0.setIn=X1,o0.removeIn=o0.deleteIn=D0,o0.update=Z1,o0.updateIn=Q1,o0.merge=o0.concat=I1,o0.mergeWith=L1,o0.mergeDeep=K1,o0.mergeDeepWith=q1,o0.mergeIn=Y1,o0.mergeDeepIn=J1,o0.withMutations=e0,o0.wasAltered=$1,o0.asImmutable=J$,o0[`@@transducer/init`]=o0.asMutable=Y$,o0[`@@transducer/step`]=function(e,t){return e.set(t[0],t[1])},o0[`@@transducer/result`]=function(e){return e.asImmutable()};var s0=function(e,t){this.ownerID=e,this.entries=t};s0.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,o=i.length;a<o;a++)if(P1(n,i[a][0]))return i[a][1];return r},s0.prototype.update=function(e,t,n,r,i,a,o){for(var s=i===_$,c=this.entries,l=0,u=c.length;l<u&&!P1(r,c[l][0]);l++);var d=l<u;if(d?c[l][1]===i:s)return this;if(y$(o),(s||!d)&&y$(a),!(s&&c.length===1)){if(!d&&!s&&c.length>=Ffe)return Afe(e,c,r,i);var f=e&&e===this.ownerID,p=f?c:H1(c);return d?s?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,i]:p.push([r,i]),f?(this.entries=p,this):new s0(e,p)}};var c0=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};c0.prototype.get=function(e,t,n,r){t===void 0&&(t=Q$(n));var i=1<<((e===0?t:t>>>e)&g$),a=this.bitmap;return(a&i)===0?r:this.nodes[b0(a&i-1)].get(e+m$,t,n,r)},c0.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Q$(r));var s=(t===0?n:n>>>t)&g$,c=1<<s,l=this.bitmap,u=(l&c)!==0;if(!u&&i===_$)return this;var d=b0(l&c-1),f=this.nodes,p=u?f[d]:void 0,m=_0(p,e,t+m$,n,r,i,a,o);if(m===p)return this;if(!u&&m&&f.length>=Ife)return Mfe(e,f,l,s,m);if(u&&!m&&f.length===2&&v0(f[d^1]))return f[d^1];if(u&&m&&f.length===1&&v0(m))return m;var h=e&&e===this.ownerID,g=u?m?l:l^c:l|c,_=u?m?x0(f,d,m,h):Pfe(f,d,h):Nfe(f,d,m,h);return h?(this.bitmap=g,this.nodes=_,this):new c0(e,g,_)};var l0=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};l0.prototype.get=function(e,t,n,r){t===void 0&&(t=Q$(n));var i=(e===0?t:t>>>e)&g$,a=this.nodes[i];return a?a.get(e+m$,t,n,r):r},l0.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Q$(r));var s=(t===0?n:n>>>t)&g$,c=i===_$,l=this.nodes,u=l[s];if(c&&!u)return this;var d=_0(u,e,t+m$,n,r,i,a,o);if(d===u)return this;var f=this.count;if(!u)f++;else if(!d&&(f--,f<Lfe))return jfe(e,l,f,s);var p=e&&e===this.ownerID,m=x0(l,s,d,p);return p?(this.count=f,this.nodes=m,this):new l0(e,f,m)};var u0=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n,this._index=void 0};u0.prototype._positionOf=function(e,t){var n=this.entries,r=this._index;if(r===void 0&&t&&n.length>=Rfe&&(r=this._buildIndex()),r!==void 0){var i=r[t1(e)];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];if(P1(e,n[o][0]))return o}return-1}for(var s=0,c=n.length;s<c;s++)if(P1(e,n[s][0]))return s;return-1},u0.prototype._buildIndex=function(){for(var e=Object.create(null),t=this.entries,n=0,r=t.length;n<r;n++){var i=t1(t[n][0]),a=e[i];a===void 0?e[i]=[n]:a.push(n)}return this._index=e,e},u0.prototype.get=function(e,t,n,r){var i=this._positionOf(n,!0);return i===-1?r:this.entries[i][1]},u0.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Q$(r));var s=i===_$;if(n!==this.keyHash)return s?this:(y$(o),y$(a),y0(this,e,t,n,[r,i]));var c=this.entries,l=c.length,u=e&&e===this.ownerID,d=this._positionOf(r,u),f=d===-1?l:d,p=d!==-1;if(p?c[f][1]===i:s)return this;if(y$(o),(s||!p)&&y$(a),s&&l===2)return new d0(e,this.keyHash,c[f^1]);var m=u?c:H1(c);if(p)s?(f===l-1?m.pop():m[f]=m.pop(),u&&(this._index=void 0)):m[f]=[r,i];else if(m.push([r,i]),u&&this._index!==void 0){var h=t1(r),g=this._index[h];g===void 0?this._index[h]=[l]:g.push(l)}return u?(this.entries=m,this):new u0(e,this.keyHash,m)};var d0=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};d0.prototype.get=function(e,t,n,r){return P1(n,this.entry[0])?this.entry[1]:r},d0.prototype.update=function(e,t,n,r,i,a,o){var s=i===_$,c=P1(r,this.entry[0]);if(c?i===this.entry[1]:s)return this;if(y$(o),s){y$(a);return}return c?e&&e===this.ownerID?(this.entry[1]=i,this):new d0(e,this.keyHash,[r,i]):(y$(a),y0(this,e,t,Q$(r),[r,i]))},s0.prototype.iterate=u0.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(e(n[t?i-r:r])===!1)return!1},c0.prototype.iterate=l0.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var a=n[t?i-r:r];if(a&&a.iterate(e,t)===!1)return!1}},d0.prototype.iterate=function(e,t){return e(this.entry)};var Ofe=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&p0(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(r===0)return f0(e,n.entry)}else if(n.entries){if(i=n.entries.length-1,r<=i)return f0(e,n.entries[this._reverse?i-r:r])}else if(i=n.nodes.length-1,r<=i){var a=n.nodes[this._reverse?i-r:r];if(a){if(a.entry)return f0(e,a.entry);t=this._stack=p0(a,t)}continue}t=this._stack=this._stack.__prev}return c$()},t}(o$);function f0(e,t){return s$(e,t[0],t[1])}function p0(e,t){return{node:e,index:0,__prev:t}}function m0(e,t,n,r){var i=Object.create(o0);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}var kfe;function h0(){return kfe||=m0(0)}function g0(e,t,n){var r,i;if(e._root){var a=v$(),o=v$();if(r=_0(e._root,e.__ownerID,0,void 0,t,n,a,o),!o.value)return e;i=e.size+(a.value?n===_$?-1:1:0)}else{if(n===_$)return e;i=1,r=new s0(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?m0(i,r):h0()}function _0(e,t,n,r,i,a,o,s){return e?e.update(t,n,r,i,a,o,s):a===_$?e:(y$(s),y$(o),new d0(t,r,[i,a]))}function v0(e){return e.constructor===d0||e.constructor===u0}function y0(e,t,n,r,i){if(e.keyHash===r)return new u0(t,r,[e.entry,i]);var a=(n===0?e.keyHash:e.keyHash>>>n)&g$,o=(n===0?r:r>>>n)&g$,s,c=a===o?[y0(e,t,n+m$,r,i)]:(s=new d0(t,r,i),a<o?[e,s]:[s,e]);return new c0(t,1<<a|1<<o,c)}function Afe(e,t,n,r){e||=new b$;for(var i=new d0(e,Q$(n),[n,r]),a=0;a<t.length;a++){var o=t[a];i=i.update(e,0,void 0,o[0],o[1])}return i}function jfe(e,t,n,r){for(var i=0,a=0,o=Array(n),s=0,c=1,l=t.length;s<l;s++,c<<=1){var u=t[s];u!==void 0&&s!==r&&(i|=c,o[a++]=u)}return new c0(e,i,o)}function Mfe(e,t,n,r,i){for(var a=0,o=Array(h$),s=0;n!==0;s++,n>>>=1)o[s]=n&1?t[a++]:void 0;return o[r]=i,new l0(e,a+1,o)}function b0(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function x0(e,t,n,r){var i=r?e:H1(e);return i[t]=n,i}function Nfe(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var a=Array(i),o=0,s=0;s<i;s++)s===t?(a[s]=n,o=-1):a[s]=e[s+o];return a}function Pfe(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=Array(r),a=0,o=0;o<r;o++)o===t&&(a=1),i[o]=e[o+a];return i}var Ffe=h$/4,Ife=h$/2,Lfe=h$/4,Rfe=16;function S0(e){if(L$(e)&&typeof e!=`string`)return e;if(N$(e))return e.toArray();throw TypeError(`Invalid keyPath: expected Ordered Collection or Array: `+e)}function C0(e){try{return typeof e==`string`?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function zfe(e,t){return j$(e)?e.has(t):B1(e)&&I$.call(e,t)}function w0(e,t,n){return j$(e)?e.get(t,n):zfe(e,t)?typeof e.get==`function`?e.get(t):e[t]:n}function Bfe(e,t){if(!B1(e))throw TypeError(`Cannot update non-data-structure value: `+e);if(j$(e)){if(!e.remove)throw TypeError(`Cannot update immutable value without .remove() method: `+e);return e.remove(t)}if(!I$.call(e,t))return e;var n=U1(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function Vfe(e,t,n){if(V1(t))return e;if(!B1(e))throw TypeError(`Cannot update non-data-structure value: `+e);if(j$(e)){if(!e.set)throw TypeError(`Cannot update immutable value without .set() method: `+e);return e.set(t,n)}if(I$.call(e,t)&&n===e[t])return e;var r=U1(e);return r[t]=n,r}function T0(e,t,n,r){r||(r=n,n=void 0);var i=E0(j$(e),e,S0(t),0,n,r);return i===_$?n:i}function E0(e,t,n,r,i,a){var o=t===_$;if(r===n.length){var s=o?i:t,c=a(s);return c===s?t:c}if(!o&&!B1(t))throw TypeError(`Cannot update within non-data-structure value in path [`+Array.from(n).slice(0,r).map(C0)+`]: `+t);var l=n[r],u=o?_$:w0(t,l,_$),d=E0(u===_$?e:j$(u),u,n,r+1,i,a);return d===u?t:d===_$?Bfe(t,l):Vfe(o?e?h0():{}:t,l,d)}function Hfe(e,t){return T0(e,t,function(){return _$})}function D0(e){return Hfe(this,e)}var O0=`@@__IMMUTABLE_LIST__@@`;function k0(e){return!!(e&&e[O0])}var A0=function(e){function t(t){var n=I0();if(t==null)return n;if(k0(t))return t;var r=e(t),i=r.size;return i===0?n:(i0(i),i>0&&i<h$?F0(0,i,m$,void 0,new M0(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`List [`,`]`)},t.prototype.get=function(e,t){if(e=S$(this,e),e>=0&&e<this.size){e+=this._origin;var n=z0(this,e);return n&&n.array[e&g$]}return t},t.prototype.set=function(e,t){return Ufe(this,e,t)},t.prototype.remove=function(e){return this.has(e)?e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=m$,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):I0()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){B0(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return B0(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){B0(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return B0(this,1)},t.prototype.shuffle=function(e){return e===void 0&&(e=Math.random),this.withMutations(function(t){for(var n=t.size,r,i;n;)r=Math.floor(e()*n--),i=t.get(r),t.set(r,t.get(n)),t.set(n,i)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],a=e(typeof i!=`string`&&l$(i)?i:[i]);a.size!==0&&n.push(a)}return n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})})},t.prototype.setSize=function(e){return B0(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return w$(e,t,n)?this:B0(this,T$(e,n),E$(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=P0(this,t);return new o$(function(){var i=r();return i===N0?c$():s$(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n=t?this.size:0,r=P0(this,t),i;(i=r())!==N0&&e(i,t?--n:n++,this)!==!1;);return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?F0(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):this.size===0?I0():(this.__ownerID=e,this.__altered=!1,this)},t}(QQ);A0.isList=k0;var j0=A0.prototype;j0[O0]=!0,j0[p$]=j0.remove,j0.merge=j0.concat,j0.setIn=X1,j0.deleteIn=j0.removeIn=D0,j0.update=Z1,j0.updateIn=Q1,j0.mergeIn=Y1,j0.mergeDeepIn=J1,j0.withMutations=e0,j0.wasAltered=$1,j0.asImmutable=J$,j0[`@@transducer/init`]=j0.asMutable=Y$,j0[`@@transducer/step`]=function(e,t){return e.push(t)},j0[`@@transducer/result`]=function(e){return e.asImmutable()};var M0=function(e,t){this.array=e,this.ownerID=t};M0.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+m$)-1)||this.array.length===0)return this;var r=n>>>t&g$;if(r>=this.array.length)return new M0([],e);var i=r===0,a;if(t>0){var o=this.array[r];if(a=o&&o.removeBefore(e,t-m$,n),a===o&&i)return this}if(i&&!a)return this;var s=R0(this,e);if(!i)for(var c=0;c<r;c++)s.array[c]=void 0;return a&&(s.array[r]=a),s},M0.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+m$:h$)||this.array.length===0)return this;var r=n-1>>>t&g$;if(r>=this.array.length)return this;var i;if(t>0){var a=this.array[r];if(i=a&&a.removeAfter(e,t-m$,n),i===a&&r===this.array.length-1)return this}var o=R0(this,e);return o.array.splice(r+1),i&&(o.array[r]=i),o};var N0={};function P0(e,t){var n=e._origin,r=e._capacity,i=V0(r),a=e._tail;return o(e._root,e._level,0);function o(e,t,n){return t===0?s(e,n):c(e,t,n)}function s(e,o){var s=o===i?a&&a.array:e&&e.array,c=o>n?0:n-o,l=r-o;return l>h$&&(l=h$),function(){if(c===l)return N0;var e=t?--l:c++;return s&&s[e]}}function c(e,i,a){var s,c=e&&e.array,l=a>n?0:n-a>>i,u=(r-a>>i)+1;return u>h$&&(u=h$),function(){for(;;){if(s){var e=s();if(e!==N0)return e;s=null}if(l===u)return N0;var n=t?--u:l++;s=o(c&&c[n],i-m$,a+(n<<i))}}}}function F0(e,t,n,r,i,a,o){var s=Object.create(j0);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=a,s.__hash=o,s.__altered=!1,s}function I0(){return F0(0,0,m$)}function Ufe(e,t,n){if(t=S$(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?B0(e,t).set(0,n):B0(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,a=v$();return t>=V0(e._capacity)?r=L0(r,e.__ownerID,0,t,n,a):i=L0(i,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):F0(e._origin,e._capacity,e._level,i,r):e}function L0(e,t,n,r,i,a){var o=r>>>n&g$,s=e&&o<e.array.length;if(!s&&i===void 0)return e;var c;if(n>0){var l=e&&e.array[o],u=L0(l,t,n-m$,r,i,a);return u===l?e:(c=R0(e,t),c.array[o]=u,c)}return s&&e.array[o]===i?e:(a&&y$(a),c=R0(e,t),i===void 0&&o===c.array.length-1?c.array.pop():c.array[o]=i,c)}function R0(e,t){return t&&e&&t===e.ownerID?e:new M0(e?e.array.slice():[],t)}function z0(e,t){if(t>=V0(e._capacity))return e._tail;if(t<1<<e._level+m$){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&g$],r-=m$;return n}}function Wfe(e,t,n){var r=e._origin+(t===void 0?0:t),i=n===void 0?e._capacity:n<0?e._capacity+n:e._origin+n;if(Number.isFinite(i)&&i>H0||Number.isFinite(r)&&r<-H0||Number.isFinite(i)&&Number.isFinite(r)&&i-r>H0)throw RangeError(`Invalid List size: a List cannot hold more than `+H0+` (2 ** 30) values.`)}function B0(e,t,n){Wfe(e,t,n),t!==void 0&&(t|=0),n!==void 0&&(n|=0);var r=e.__ownerID||new b$,i=e._origin,a=e._capacity,o=i+t,s=n===void 0?a:n<0?a+n:i+n;if(o===i&&s===a)return e;if(o>=s)return e.clear();for(var c=e._level,l=e._root,u=0;o+u<0;)l=new M0(l&&l.array.length?[void 0,l]:[],r),c+=m$,u+=U0(c);u&&(o+=u,i+=u,s+=u,a+=u);for(var d=V0(a),f=V0(s);f>=U0(c+m$);)l=new M0(l&&l.array.length?[l]:[],r),c+=m$;var p=e._tail,m=f<d?z0(e,s-1):f>d?new M0([],r):p;if(p&&f>d&&o<a&&p.array.length){l=R0(l,r);for(var h=l,g=c;g>m$;g-=m$){var _=d>>>g&g$;h=h.array[_]=R0(h.array[_],r)}h.array[d>>>m$&g$]=p}if(s<a&&(m&&=m.removeAfter(r,0,s)),o>=f)o-=f,s-=f,c=m$,l=void 0,m&&=m.removeBefore(r,0,o);else if(o>i||f<d){for(u=0;l;){var v=o>>>c&g$;if(v!==f>>>c&g$)break;v&&(u+=(1<<c)*v),c-=m$,l=l.array[v]}l&&o>i&&(l=l.removeBefore(r,c,o-u)),l&&f<d&&(l=l.removeAfter(r,c,f-u)),u&&(o-=u,s-=u)}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=c,e._root=l,e._tail=m,e.__hash=void 0,e.__altered=!0,e):F0(o,s,c,l,m)}function V0(e){return e<h$?0:e-1>>>m$<<m$}var H0=2**30;function U0(e){return e<31?1<<e:2**e}function W0(e){return n0(e)&&N$(e)}var G0=function(e){function t(e){return e==null?q0():W0(e)?e:q0().withMutations(function(t){var n=ZQ(e);i0(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`OrderedMap {`,`}`)},t.prototype.get=function(e,t){var n=this._map.get(e);return n===void 0?t:this._list.get(n)[1]},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):q0()},t.prototype.set=function(e,t){return J0(this,e,t)},t.prototype.remove=function(e){return J0(this,e,_$)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?K0(t,n,e,this.__hash):this.size===0?q0():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(a0);G0.isOrderedMap=W0,G0.prototype[M$]=!0,G0.prototype[p$]=G0.prototype.remove;function K0(e,t,n,r){var i=Object.create(G0.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}var Gfe;function q0(){return Gfe||=K0(h0(),I0())}function J0(e,t,n){var r=e._map,i=e._list,a=r.get(t),o=a!==void 0,s,c;if(n===_$){if(!o)return e;i.size>=h$&&i.size>=r.size*2?(c=i.filter(function(e,t){return e!==void 0&&a!==t}),s=c.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(s.__ownerID=c.__ownerID=e.__ownerID)):(s=r.remove(t),c=a===i.size-1?i.pop():i.set(a,void 0))}else if(o){if(n===i.get(a)[1])return e;s=r,c=i.set(a,[t,n])}else s=r.set(t,i.size),c=i.set(i.size,[t,n]);return e.__ownerID?(e.size=s.size,e._map=s,e._list=c,e.__hash=void 0,e.__altered=!0,e):K0(s,c)}var Y0=`@@__IMMUTABLE_STACK__@@`;function X0(e){return!!(e&&e[Y0])}var Z0=function(e){function t(e){return e==null?e2():X0(e)?e:e2().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`Stack [`,`]`)},t.prototype.get=function(e,t){var n=this._head;for(e=S$(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(arguments.length===0)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):$0(t,n)},t.prototype.pushAll=function(t){if(t=e(t),t.size===0)return this;if(this.size===0&&X0(t))return t;i0(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):$0(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):e2()},t.prototype.slice=function(t,n){if(w$(t,n,this.size))return this;var r=T$(t,this.size);if(E$(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,a=this._head;r--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):$0(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?$0(this.size,this._head,e,this.__hash):this.size===0?e2():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new H$(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&e(i.value,r++,this)!==!1;)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new H$(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new o$(function(){if(r){var t=r.value;return r=r.next,s$(e,n++,t)}return c$()})},t}(QQ);Z0.isStack=X0;var Q0=Z0.prototype;Q0[Y0]=!0,Q0.shift=Q0.pop,Q0.unshift=Q0.push,Q0.unshiftAll=Q0.pushAll,Q0.withMutations=e0,Q0.wasAltered=$1,Q0.asImmutable=J$,Q0[`@@transducer/init`]=Q0.asMutable=Y$,Q0[`@@transducer/step`]=function(e,t){return e.unshift(t)},Q0[`@@transducer/result`]=function(e){return e.asImmutable()};function $0(e,t,n,r){var i=Object.create(Q0);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}var Kfe;function e2(){return Kfe||=$0(0)}function t2(e,t,n,r,i,a){return i0(e.size),e.__iterate(function(e,a,o){i?(i=!1,n=e):n=t.call(r,n,e,a,o)},a),n}function qfe(e,t){return t}function Jfe(e,t){return[t,e]}function n2(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function r2(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function i2(e,t){return e<t?1:e>t?-1:0}function a2(e,t){if(e===t)return!0;if(!YQ(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||KQ(e)!==KQ(t)||WQ(e)!==WQ(t)||N$(e)!==N$(t))return!1;if(e.size===0&&t.size===0)return!0;var n=!qQ(e);if(N$(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&P1(i[1],e)&&(n||P1(i[0],t))})&&r.next().done}var i=!1;if(e.size===void 0){if(t.size===void 0)typeof e.cacheResult==`function`&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}}var o=!0,s=t.__iterate(function(t,r){if(n?!e.has(t):i?!P1(t,e.get(r,_$)):!P1(e.get(r,_$),t))return o=!1,!1});return o&&e.size===s}var Yfe=function(e){function t(e,n,r){if(r===void 0&&(r=1),!(this instanceof t))return new t(e,n,r);if(r0(r!==0,`Cannot step a Range by 0`),r0(e!==void 0,`You must define a start value when using Range`),r0(n!==void 0,`You must define an end value when using Range`),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),this.size===0){if(o2)return o2;o2=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?`Range []`:`Range [ `+this._start+`...`+this._end+(this._step===1?``:` by `+this._step)+` ]`},t.prototype.get=function(e,t){return this.has(e)?this._start+S$(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return w$(e,n,this.size)?this:(e=T$(e,this.size),n=E$(n,this.size),n<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;a!==n&&e(i,t?n-++a:a++,this)!==!1;)i+=t?-r:r;return a},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;return new o$(function(){if(a===n)return c$();var o=i;return i+=t?-r:r,s$(e,t?n-++a:a++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:a2(this,e)},t}(B$),o2,s2=`@@__IMMUTABLE_SET__@@`;function c2(e){return!!(e&&e[s2])}var l2=function(e){function t(t){return t==null?p2():c2(t)&&!N$(t)?t:p2().withMutations(function(n){var r=e(t);i0(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(ZQ(e).keySeq())},t.intersect=function(e){return e=XQ(e).toArray(),e.length?u2.intersect.apply(t(e.pop()),e):p2()},t.union=function(e){return e=XQ(e).toArray(),e.length?u2.union.apply(t(e.pop()),e):p2()},t.prototype.toString=function(){return this.__toString(`Set {`,`}`)},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return d2(this,this._map.set(e,e))},t.prototype.remove=function(e){return d2(this,this._map.remove(e))},t.prototype.clear=function(){return d2(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=d2(this,this._map.mapEntries(function(i){var a=i[1],o=e.call(t,a,a,n);return o!==a&&(r=!0),[o,o]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return t=t.filter(function(e){return e.size!==0}),t.length===0?this:this.size===0&&!this.__ownerID&&t.length===1?this.constructor(t[0]):this.withMutations(function(n){for(var r=0;r<t.length;r++)typeof t[r]==`string`?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})})},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length===0)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length===0)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return E2(C1(this,e))},t.prototype.sortBy=function(e,t){return E2(C1(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):this.size===0?this.__empty():(this.__ownerID=e,this._map=t,this)},t}($Q);l2.isSet=c2;var u2=l2.prototype;u2[s2]=!0,u2[p$]=u2.remove,u2.merge=u2.concat=u2.union,u2.withMutations=e0,u2.asImmutable=J$,u2[`@@transducer/init`]=u2.asMutable=Y$,u2[`@@transducer/step`]=function(e,t){return e.add(t)},u2[`@@transducer/result`]=function(e){return e.asImmutable()},u2.__empty=p2,u2.__make=f2;function d2(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function f2(e,t){var n=Object.create(u2);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}var Xfe;function p2(){return Xfe||=f2(h0())}function m2(e,t,n){for(var r=S0(t),i=0;i!==r.length;)if(e=w0(e,r[i++],_$),e===_$)return n;return e}function h2(e,t){return m2(this,e,t)}function Zfe(e,t){return m2(e,t,_$)!==_$}function Qfe(e){return Zfe(this,e)}function g2(){i0(this.size);var e={};return this.__iterate(function(t,n){V1(n)||(e[n]=t)}),e}function _2(e){if(!e||typeof e!=`object`)return e;if(!YQ(e)){if(!B1(e))return e;e=R$(e)}if(KQ(e)){var t={};return e.__iterate(function(e,n){V1(n)||(t[n]=_2(e))}),t}var n=[];return e.__iterate(function(e){n.push(_2(e))}),n}function $fe(e){if(e.size===1/0)return 0;var t=N$(e),n=KQ(e),r=+!!t;return e.__iterate(n?t?function(e,t){r=31*r+v2(Q$(e),Q$(t))|0}:function(e,t){r=r+v2(Q$(e),Q$(t))|0}:t?function(e){r=31*r+Q$(e)|0}:function(e){r=r+Q$(e)|0}),epe(e.size,r)}function epe(e,t){return t=X$(t,3432918353),t=X$(t<<15|t>>>-15,461845907),t=X$(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=X$(t^t>>>16,2246822507),t=X$(t^t>>>13,3266489909),t=Z$(t^t>>>16),t}function v2(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function y2(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}XQ.Iterator=o$,y2(XQ,{toArray:function(){i0(this.size);var e=Array(this.size||0),t=KQ(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new p1(this)},toJS:function(){return _2(this)},toKeyedSeq:function(){return new f1(this,!0)},toMap:function(){return a0(this.toKeyedSeq())},toObject:g2,toOrderedMap:function(){return G0(this.toKeyedSeq())},toOrderedSet:function(){return E2(KQ(this)?this.valueSeq():this)},toSet:function(){return l2(KQ(this)?this.valueSeq():this)},toSetSeq:function(){return new m1(this)},toSeq:function(){return WQ(this)?this.toIndexedSeq():KQ(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Z0(KQ(this)?this.valueSeq():this)},toList:function(){return A0(KQ(this)?this.valueSeq():this)},toString:function(){return`[Collection]`},__toString:function(e,t){return this.size===0?e+t:e+` `+this.toSeq().map(this.__toStringMapper).join(`, `)+` `+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return D1(this,xfe(this,e))},includes:function(e){return this.some(function(t){return P1(t,e)})},entries:function(){return this.__iterator(n$)},every:function(e,t){i0(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return D1(this,y1(this,e,t,!0))},partition:function(e,t){return vfe(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return i0(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){i0(this.size),e=e===void 0?`,`:``+e;var t=``,n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=r==null?``:r.toString()}),t},keys:function(){return this.__iterator(e$)},map:function(e,t){return D1(this,_1(this,e,t))},reduce:function(e,t,n){return t2(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return t2(this,e,t,n,arguments.length<2,!0)},reverse:function(){return D1(this,v1(this,!0))},slice:function(e,t){return D1(this,b1(this,e,t,!0))},some:function(e,t){i0(this.size);var n=!1;return this.__iterate(function(r,i,a){if(e.call(t,r,i,a))return n=!0,!1}),n},sort:function(e){return D1(this,C1(this,e))},values:function(){return this.__iterator(t$)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size===void 0?!this.some(function(){return!0}):this.size===0},count:function(e,t){return x$(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return gfe(this,e,t)},equals:function(e){return a2(this,e)},entrySeq:function(){var e=this;if(e._cache)return new H$(e._cache);var t=e.toSeq().map(Jfe).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(n2(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(C$,null,e)},flatMap:function(e,t){return D1(this,Sfe(this,e,t))},flatten:function(e){return D1(this,S1(this,e,!0))},fromEntrySeq:function(){return new h1(this)},get:function(e,t){return this.find(function(t,n){return P1(n,e)},void 0,t)},getIn:h2,groupBy:function(e,t){return _fe(this,e,t)},has:function(e){return this.get(e,_$)!==_$},hasIn:Qfe,isSubset:function(e){return e=typeof e.includes==`function`?e:XQ(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e=typeof e.isSubset==`function`?e:XQ(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return P1(t,e)})},keySeq:function(){return this.toSeq().map(qfe).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return w1(this,e)},maxBy:function(e,t){return w1(this,t,e)},min:function(e){return w1(this,e?r2(e):i2)},minBy:function(e,t){return w1(this,t?r2(t):i2,e)},rest:function(){return this.slice(1)},skip:function(e){return e===0?this:this.slice(Math.max(0,e))},skipLast:function(e){return e===0?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return D1(this,x1(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(n2(e),t)},sortBy:function(e,t){return D1(this,C1(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return D1(this,yfe(this,e,t))},takeUntil:function(e,t){return this.takeWhile(n2(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||=$fe(this)}});var b2=XQ.prototype;b2[JQ]=!0,b2[a$]=b2.values,b2.toJSON=b2.toArray,b2.__toStringMapper=C0,b2.inspect=b2.toSource=function(){return this.toString()},b2.chain=b2.flatMap,b2.contains=b2.includes,y2(ZQ,{flip:function(){return D1(this,g1(this))},mapEntries:function(e,t){var n=this,r=0;return D1(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return D1(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var x2=ZQ.prototype;x2[GQ]=!0,x2[a$]=b2.entries,x2.toJSON=g2,x2.__toStringMapper=function(e,t){return C0(t)+`: `+C0(e)},y2(QQ,{toKeyedSeq:function(){return new f1(this,!1)},filter:function(e,t){return D1(this,y1(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return t===void 0?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return t===void 0?-1:t},reverse:function(){return D1(this,v1(this,!1))},slice:function(e,t){return D1(this,b1(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),n===0||n===2&&!t)return this;e=T$(e,e<0?this.count():this.size);var r=this.slice(0,e);return D1(this,n===1?r:r.concat(H1(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return D1(this,S1(this,e,!1))},get:function(e,t){return e=S$(this,e),e<0||this.size===1/0||this.size!==void 0&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=S$(this,e),e>=0&&(this.size===void 0?this.find(function(t,n){return n===e},void 0,_$)!==_$:this.size===1/0||e<this.size)},interpose:function(e){return D1(this,Cfe(this,e))},interleave:function(){var e=[this].concat(H1(arguments)),t=E1(this.toSeq(),B$.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),D1(this,n)},keySeq:function(){return Yfe(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return D1(this,x1(this,e,t,!1))},zip:function(){var e=[this].concat(H1(arguments));return D1(this,E1(this,w2,e))},zipAll:function(){var e=[this].concat(H1(arguments));return D1(this,E1(this,w2,e,!0))},zipWith:function(e){var t=H1(arguments);return t[0]=this,D1(this,E1(this,e,t))}});var S2=QQ.prototype;S2[UQ]=!0,S2[M$]=!0,y2($Q,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var C2=$Q.prototype;C2.has=b2.includes,C2.contains=C2.includes,C2.keys=C2.values,y2(z$,x2),y2(B$,S2),y2(V$,C2);function w2(){return H1(arguments)}function T2(e){return c2(e)&&N$(e)}var E2=function(e){function t(e){return e==null?k2():T2(e)?e:k2().withMutations(function(t){var n=$Q(e);i0(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(ZQ(e).keySeq())},t.prototype.toString=function(){return this.__toString(`OrderedSet {`,`}`)},t}(l2);E2.isOrderedSet=T2;var D2=E2.prototype;D2[M$]=!0,D2.zip=S2.zip,D2.zipWith=S2.zipWith,D2.zipAll=S2.zipAll,D2.__empty=k2,D2.__make=O2;function O2(e,t){var n=Object.create(D2);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}var tpe;function k2(){return tpe||=O2(q0())}function npe(e){if(A$(e))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(j$(e))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(typeof e!=`object`||!e)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var A2=function(e,t){var n;npe(e);var r=function(a){var o=this;if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var l=0;l<s.length;l++){var u=s[l];c[u]=l,i[u]?typeof console==`object`&&console.warn&&console.warn(`Cannot define `+N2(this)+` with property "`+u+`" since that property name is part of the Record API.`):rpe(i,u)}}return this.__ownerID=void 0,this._values=A0().withMutations(function(e){e.setSize(o._keys.length),ZQ(a).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(j2);return i.constructor=r,t&&(r.displayName=t),r};A2.prototype.toString=function(){for(var e=N2(this)+` { `,t=this._keys,n,r=0,i=t.length;r!==i;r++)n=t[r],e+=(r?`, `:``)+n+`: `+C0(this.get(n));return e+` }`},A2.prototype.equals=function(e){return this===e||A$(e)&&P2(this).equals(P2(e))},A2.prototype.hashCode=function(){return P2(this).hashCode()},A2.prototype.has=function(e){return this._indices.hasOwnProperty(e)},A2.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return r===void 0?this._defaultValues[e]:r},A2.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return M2(this,n)}return this},A2.prototype.remove=function(e){return this.set(e)},A2.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:M2(this,e)},A2.prototype.wasAltered=function(){return this._values.wasAltered()},A2.prototype.toSeq=function(){return P2(this)},A2.prototype.toJS=function(){return _2(this)},A2.prototype.entries=function(){return this.__iterator(n$)},A2.prototype.__iterator=function(e,t){return P2(this).__iterator(e,t)},A2.prototype.__iterate=function(e,t){return P2(this).__iterate(e,t)},A2.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?M2(this,t,e):(this.__ownerID=e,this._values=t,this)},A2.isRecord=A$,A2.getDescriptiveName=N2;var j2=A2.prototype;j2[k$]=!0,j2[p$]=j2.remove,j2.deleteIn=j2.removeIn=D0,j2.getIn=h2,j2.hasIn=b2.hasIn,j2.merge=I1,j2.mergeWith=L1,j2.mergeIn=Y1,j2.mergeDeep=K1,j2.mergeDeepWith=q1,j2.mergeDeepIn=J1,j2.setIn=X1,j2.update=Z1,j2.updateIn=Q1,j2.withMutations=e0,j2.asMutable=Y$,j2.asImmutable=J$,j2[a$]=j2.entries,j2.toJSON=j2.toObject=b2.toObject,j2.inspect=j2.toSource=function(){return this.toString()};function M2(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function N2(e){return e.constructor.displayName||e.constructor.name||`Record`}function P2(e){return G$(e._keys.map(function(t){return[t,e.get(t)]}))}function rpe(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){r0(this.__ownerID,`Cannot set on an immutable record.`),this.set(t,e)}})}catch{}}function F2(e,t){return I2([],t||ipe,e,``,t&&t.length>2?[]:void 0,{"":e})}function I2(e,t,n,r,i,a){if(typeof n!=`string`&&!j$(n)&&(L$(n)||l$(n)||z1(n))){if(~e.indexOf(n))throw TypeError(`Cannot convert circular structure to Immutable`);e.push(n),i&&r!==``&&i.push(r);var o=t.call(a,r,R$(n).map(function(r,a){return I2(e,t,r,a,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),o}return n}function ipe(e,t){return WQ(t)?t.toList():KQ(t)?t.toMap():t.toSet()}var ape=class{#e;constructor(e){this.#e=e,this.path=oB(e,{pathOnly:!0})??``,this.url=e.blobURL??this.path,this.field=void 0,this.fileObj=e.file,(async()=>{this.url=await tB(e)??this.url})()}toString(){return this.url}async toBase64(){try{return Zj(await eB(this.#e))}catch(e){throw Error(`Failed to encode asset as base64: ${e.message}`)}}},L2=({content:e,otherLocales:t,locales:n,slug:r,path:i,isNew:a,collectionName:o,associatedAssets:s})=>F2({data:rR(e),i18n:Object.fromEntries(t.map(e=>[e,{data:rR(n[e].content)}])),slug:r,path:i,newRecord:a,collection:o,mediaFiles:s.map(({sha:e,file:t,size:n,blobURL:r,...i})=>({id:e,name:i.name,path:i.path,file:t,size:n,url:r,displayURL:r})),meta:{path:i},isModification:null,label:null,partial:!1,author:``,raw:``,status:``,updatedOn:``}),R2=({entry:e,locale:t,collectionName:n,associatedAssets:r,content:i})=>L2({content:i??e?.locales?.[t]?.content??{},otherLocales:Object.keys(e?.locales??{}).filter(e=>e!==t),locales:e?.locales??{},slug:e?.slug??``,path:e?.locales?.[t]?.path??``,isNew:!1,collectionName:n,associatedAssets:r}),ope=({entry:e,collectionName:t,fileName:n})=>r=>{let i=AU({value:r,entry:e,collectionName:t,fileName:n});if(i)return new ape(i)},spe=({locale:e,getFieldArgs:t})=>{let{valueMap:n={}}=t,r={},i=new Map;return Object.entries(n).forEach(([n,a])=>{let o=n.replace(/\.\d+$/,``),s=YB({...t,keyPath:o});if(s?.widget===`relation`){let{value_field:t=`{{slug}}`,collection:n,file:c}=s,l=(()=>{let e=`${n}:${c??``}`,t=i.get(e);if(t)return t;let r=(c?[QI(n,c)]:pB(n)).filter(e=>!!e);return i.set(e,r),r})();r[o]??={},r[o][n]??={},r[o][n][a]=l.find(n=>t===`{{slug}}`?n.slug===a:n.locales[e]?.content?.[t]===a)?.locales[e]?.content}}),F2(r)},cpe=({originalEntry:e,currentValues:t})=>({...e,locales:Object.fromEntries(Object.entries(t).map(([t,n])=>[t,{slug:e?.locales[t]?.slug??e?.slug,path:e?.locales[t]?.path??e?.subPath,content:n}]))}),z2=({collectionName:e,fileName:t})=>{let n=pM({collectionName:e,fileName:t});return n?A(dU).filter(e=>jU(e,n)):[]},B2=({draft:e,locale:t})=>{let{collectionName:n,fileName:r,isIndexFile:i,originalEntry:a,currentValues:o}=e,s=cpe({originalEntry:a,currentValues:o}),c=s.locales[t].content??{},l={collectionName:n,fileName:r,valueMap:c,isIndexFile:i},u;return{entryMap:R2({entry:s,locale:t,collectionName:n,associatedAssets:z2({collectionName:n,fileName:r}),content:c}),valueMap:c,getFieldArgs:l,get fieldsMetaData(){return u??=spe({locale:t,getFieldArgs:l}),u},getAsset:ope({entry:s,collectionName:n,fileName:r})}},V2=async(e,t)=>{let{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=e,{locales:a}=t,{content:o}=a[r]??Object.values(a)[0]??{};if(!o)return;let s=i.some(e=>e.includes(`*`))?Object.keys(o):void 0,c=i.flatMap(e=>{if(e.includes(`*`)){let t=RegExp(`^${NA(e).replace(`\\*`,`.+`)}$`);return s.filter(e=>t.test(e))}return e});for(let e of c){let r=o[e]?await sB({value:o[e],entry:t,collectionName:n,typedKeyPath:e,thumbnail:!0}):void 0;if(r)return r}},H2=({entry:e,collectionName:t,fileName:n,relative:r=!1})=>{let{locales:i}=e,a=HL(t);if(!a)return[];let o=mL(a,e),s=new Set,c=Object.values(i).flatMap(({content:i})=>Object.entries(i??{}).map(([i,a])=>{if(typeof a==`string`&&(!r||kU(a))){let s=YB({collectionName:t,keyPath:i,isIndexFile:o})?.widget??`string`;if(s!==`image`&&s!==`file`)return;let c=AU({value:a,entry:e,collectionName:t,fileName:n});if(c&&gM(c.path).some(e=>e.collectionName===t&&e.fileName===n&&(!r||e.entryRelative)))return c}})).filter(e=>!!e&&!s.has(e)&&(s.add(e),!0));if(r&&pM({collectionName:t,fileName:n})?.entryRelative){let t=qj(Object.values(e.locales)[0].path).dirname;if(t!==void 0){let e=new Set(c.map(({path:e})=>e));A(dU).forEach(n=>{let r=qj(n.path).dirname;r!==void 0&&(r===t||r.startsWith(`${t}/`))&&!e.has(n.path)&&(c.push(n),e.add(n.path))})}}return c},U2=[`preSave`,`postSave`,`prePublish`,`postPublish`,`preUnpublish`,`postUnpublish`],lpe=[`preSave`],W2=async({type:e,entry:t,collection:n,collectionFile:r,isNew:i=!1})=>{let{login:a=``,name:o=``}=zW.account,s=n.name,c=r?.name,{_i18n:{defaultLocale:l}}=r??n,{slug:u,locales:d}=t,f=Object.keys(d).filter(e=>e!==l),{content:p,path:m}=d[l]??Object.values(d)[0]??{},h=H2({entry:t,collectionName:s,fileName:c});for(let t of cL){if(t.name!==e)continue;let n=await t.handler({author:{login:a,name:o},entry:L2({content:p,otherLocales:f,locales:d,slug:u,path:m,isNew:i,collectionName:s,associatedAssets:h})});if(lpe.includes(e)&&n0(n)){let e=n.toJS();or(e.data)&&or(e.i18n)?(d[l].content=nM(e.data),f.forEach(t=>{or(e.i18n[t]?.data)&&(d[t].content=nM(e.i18n[t].data))})):d[l].content=nM(e)}}},G2=`aliases`,K2=({collection:e,fields:t=[]})=>{if(e?._type!==`entry`)return;let{aliases_field:n=G2}=e,r=n===!0?G2:n||void 0;if(!(!r||t.some(({name:e})=>e===r)))return r},q2=(e,t)=>{let n=`${t}.`;return Object.keys(e).filter(e=>e.startsWith(n)&&/^\d+$/.test(e.slice(n.length))).sort((e,t)=>Number(e.slice(n.length))-Number(t.slice(n.length)))},J2=(e,t)=>{t&&(q2(e,t).forEach(t=>{delete e[t]}),delete e[t])},Y2=e=>e===void 0?void 0:`/${e.replace(/^\//,``)}`,upe=({draft:e,locale:t,content:n,slug:r,path:i})=>{let{isNew:a,isIndexFile:o,collection:s,fields:c,originalEntry:l}=e;if(a||o||!l)return;let{preview_path:u}=s,d=K2({collection:s,fields:c});if(!u||!d)return;let{slug:f,path:p,content:m}=l.locales[t]??{};if(f===void 0||f===r)return;let h={collection:s,locale:t},g=Y2(lB({...h,slug:f,path:p,content:m})),_=Y2(lB({...h,slug:r,path:i,content:n}));if(g===void 0||g===_)return;let v=q2(n,d),y=n[d],b=y==null||Array.isArray(y)&&!y.length||y===``;if(!v.length&&!b)return;let x=v.map(e=>n[e]).filter(e=>typeof e==`string`&&!!e.trim()).filter(e=>e!==g&&e!==_);J2(n,d),[...x,g].forEach((e,t)=>{n[`${d}.${t}`]=e})},dpe=({basePath:e,path:t,extension:n,locale:r,omitLocale:i,structure:a})=>{switch(a){case`multiple_folders`:return i?`${e}/${t}.${n}`:`${e}/${r}/${t}.${n}`;case`multiple_folders_i18n_root`:case`multiple_root_folders`:return i?`${e}/${t}.${n}`:`${r}/${e}/${t}.${n}`;case`multiple_files`:return i?`${e}/${t}.${n}`:`${e}/${t}.${r}.${n}`;default:return`${e}/${t}.${n}`}},X2=({draft:e,locale:t,slug:n})=>{let{collection:r,collectionFile:i,originalEntry:a,currentValues:o,isIndexFile:s}=e,{_i18n:{defaultLocale:c,structure:l,omitDefaultLocaleFromFilePath:u}}=i??r;if(i){let{_i18n:e,file:n}=i;return wL({_i18n:e,locale:t,path:FA(n)})}if(a?.locales[t]?.slug===n)return a.locales[t].path;let d=r,{_file:{basePath:f,subPath:p,extension:m}}=d,h=s?pL(d)?.name:p?pV(p,{collection:d,locale:t,content:o[c],currentSlug:n}):n;return s&&h?.endsWith(`.${m}`)&&(h=h.slice(0,-m.length-1)),Cz(dpe({basePath:f,path:h,extension:m,locale:t,omitLocale:u&&t===c,structure:l}).split(`/`))},Z2=(e,t)=>{let n={...e};return Object.entries(n).forEach(([e,r])=>{typeof r==`string`&&r.startsWith(`blob:`)&&t[r]&&(n[e]=t[r].file.name.replace(/\.[^.]+$/,``))}),n},Q2=({draft:e})=>{let{collection:t,collectionFile:n,currentSlugs:r,currentValues:i,files:a,isIndexFile:o}=e,{_i18n:{defaultLocale:s}}=n??t;return{collection:t,content:{...Z2(i[s],a),_slug:r?.[s]??r?._},locale:s,isIndexFile:o}},fpe=({draft:e,locale:t,localizingKeyPaths:n})=>{let{isNew:r,collection:i,collectionFile:a,originalLocales:o,currentSlugs:s,currentValues:c,files:l,isIndexFile:u}=e,{_type:d}=i,{identifier_field:f=`title`,slug:p=`{{${f}}}`}=d===`entry`?i:{},{_i18n:{defaultLocale:m}}=a??i,h=s?.[t]??s?._;return r||!o[t]?pV(p,{collection:i,locale:t,content:{...Z2(c[m],l),...Z2(Object.fromEntries(n.map(e=>[e,c[t]?.[e]])),l),_slug:h},isIndexFile:u}):h},ppe=({draft:e,defaultLocaleSlug:t})=>{let{collection:n,collectionFile:r,currentLocales:i}=e,{_type:a}=n,{identifier_field:o=`title`,slug:s=`{{${o}}}`}=a===`entry`?n:{},{_i18n:{defaultLocale:c,structureMap:{i18nSingleFile:l,i18nSingleFileDefaultRoot:u}}}=r??n,d=[...s.matchAll(/{{((?:fields\.)?.+?)( \| localize)?}}/g)].filter(([,,e])=>!!e).map(([,e])=>e.replace(/^fields\./,``));if(!(l||u||!d.length))return Object.fromEntries(Object.entries(i).map(([n])=>[n,n===c?t:fpe({draft:e,locale:n,localizingKeyPaths:d})]))},mpe=({draft:e,defaultLocaleSlug:t,localizedSlugs:n,fillSlugOptions:r})=>{if(!n)return;let{collection:i,collectionFile:a}=e,{_i18n:{canonicalSlug:{value:o}}}=a??i;return o===`{{slug}}`?t:pV(o,{...r,currentSlug:t})},$2=({draft:e})=>{let{isNew:t,collection:n,collectionFile:r,fileName:i,currentSlugs:a,isIndexFile:o}=e,{_type:s}=n,{identifier_field:c=`title`,slug:l=`{{${c}}}`}=s===`entry`?n:{};if(o)return{defaultLocaleSlug:pL(n)?.name,localizedSlugs:void 0,canonicalSlug:void 0};let{_i18n:{defaultLocale:u}}=r??n,d=Q2({draft:e}),f=i??(t?pV(l,d):a?.[u]??a?._),p=ppe({draft:e,defaultLocaleSlug:f});return{defaultLocaleSlug:f,localizedSlugs:p,canonicalSlug:mpe({draft:e,defaultLocaleSlug:f,localizedSlugs:p,fillSlugOptions:d})}},hpe=[`multiple_folders`,`multiple_folders_i18n_root`,`multiple_root_folders`],e4=/(?<path>.+?)(?:\/[^/]+)?$/,t4=(e,t)=>e.includes(`{{`)?pV(e,t):e,gpe=(e,t)=>{let n=e.lastIndexOf(`.`),r=e.substring(0,n),i=t?.includes(`/`)?t.split(`/`).at(-1):void 0;return i&&!i.includes(`{{`)&&(r=r.match(e4)?.groups?.path),r},_pe=({internalPath:e,internalSubPath:t,entryFolderPath:n,isMultiFolders:r,isNestedEntry:i,fillSlugOptions:a})=>wz(t4(Cz([r||i?n:e,t]),a)),vpe=({publicPath:e,subPathFolderPath:t,subPath:n,isMultiFolders:r,fillSlugOptions:i})=>!r&&/^\.?$/.test(e)?e:wz(t4(r?Cz([...Array((n?.match(/\//g)??[]).length+1).fill(`..`),e,t]):e,i)),ype=({folder:e,fillSlugOptions:t})=>{let{entryRelative:n,internalPath:r,internalSubPath:i,publicPath:a}=e;if(r===void 0||a===void 0)return{resolvedInternalPath:``,resolvedPublicPath:``};if(!n)return{resolvedInternalPath:pV(r,t),resolvedPublicPath:pV(a,t)};let{collection:o,entryFilePath:s}=t,c=hpe.includes(o._i18n.structure),l=o._type===`entry`?o._file.subPath:void 0,u=l?.match(e4)?.groups?.path??``;return{resolvedInternalPath:_pe({internalPath:r,internalSubPath:i,entryFolderPath:gpe(s??``,l),isMultiFolders:c,isNestedEntry:l?.includes(`/`)??!1,fillSlugOptions:t}),resolvedPublicPath:vpe({publicPath:a,subPathFolderPath:u,subPath:l,isMultiFolders:c,fillSlugOptions:t})}},n4=({draft:e,defaultLocaleSlug:t,folder:n})=>{let{collection:r,collectionFile:i,isIndexFile:a}=e,{_i18n:{defaultLocale:o}}=i??r;return ype({folder:n,fillSlugOptions:{...Q2({draft:e}),type:`media_folder`,currentSlug:t,entryFilePath:X2({draft:e,locale:o,slug:t}),isIndexFile:a}})},r4=(e,t)=>e?`${e===`/`?``:e}/${t}`:t,bpe=({draft:e,defaultLocaleSlug:t,folder:n})=>{let{collectionName:r}=e,i=n4({draft:e,defaultLocaleSlug:t,folder:n}),{resolvedInternalPath:a}=i;return{assetFolderPaths:i,assetNamesInSameFolder:NU(a).map(e=>e.name.normalize()),savingAssetProps:{collectionName:r,folder:n}}},xpe=async({file:e,folder:t,replace:n,blobURL:r,draft:i,defaultLocaleSlug:a,keyPath:o,content:s,changes:c,savingAssets:l,encodingEnabled:u})=>{let d=await Ez(e),f=l.find(e=>e.sha===d&&(!t.entryRelative||(0,HH.default)(e.folder,t))),{savingAssetProps:p,assetNamesInSameFolder:m,assetFolderPaths:{resolvedInternalPath:h,resolvedPublicPath:g}}=bpe({draft:i,defaultLocaleSlug:a,folder:t}),_=``;if(f)_=f.name;else{_=xz(e.name,n?{}:{assetNamesInSameFolder:m});let t=n&&m.includes(_),i=h?`${h}/${_}`:_;t||m.push(_),c.push({action:t?`update`:`create`,path:i,data:e}),l.push({...p,blobURL:r,name:_,path:i,sha:d,size:e.size,kind:MR(_)})}let v=r4(g,_);u&&(v=_z(v)),s[o]=s[o].replaceAll(r,v)},i4=(e,t=A($H)?.output?.json??{})=>{let{indent_style:n=`space`,indent_size:r=n===`tab`?1:2}=t;return JSON.stringify(e,null,n===`tab`?` `.repeat(r):r).trim()},a4=e=>Ele(e).trim(),o4=(e,t=A($H)?.output?.yaml??{},n={})=>{let{indent_size:r=2,indent_sequences:i=!0,quote:a=`none`}=t,{quote:o=!1}=n;return uI(e,null,{indent:r,indentSeq:i,lineWidth:0,defaultKeyType:`PLAIN`,defaultStringType:o||a===`double`?`QUOTE_DOUBLE`:a===`single`?`QUOTE_SINGLE`:`PLAIN`,singleQuote:!(o||a===`double`)}).trim()},Spe=({content:e,_file:t})=>{let{format:n,fmDelimiters:r,bodyField:{key:i=`body`,inline:a=!1}={},yamlQuote:o=!1}=t,[s,c]=r??[`---`,`---`],l=``;if(!a&&i in e&&(l=typeof e[i]==`string`?e[i]:``,delete e[i]),!Object.keys(e).length)return`${l}\n`;try{let t=``;if(n===`frontmatter`||n===`yaml-frontmatter`)t=o4(e,void 0,{quote:o});else if(n===`toml-frontmatter`)t=a4(e);else if(n===`json-frontmatter`)t=i4(e);else return``;return`${s}\n${t}\n${c}\n${!a&&l?`\n${l}\n`:``}`}catch(e){console.error(e)}return``},s4=async({content:e,_file:t})=>{let{format:n,yamlQuote:r=!1}=t,i=aL.get(n)?.formatter;if(i)return`${(await i(e)).trim()}\n`;if(n===`raw`)return typeof e.body==`string`?`${e.body}\n`:``;try{if(/^ya?ml$/.test(n))return`${o4(e,void 0,{quote:r})}\n`;if(n===`toml`)return`${a4(e)}\n`;if(n===`json`)return`${i4(e)}\n`}catch(e){return console.error(e),``}return n===`frontmatter`||_L.includes(n)?Spe({content:e,_file:t}):``},c4=({collection:e,collectionFile:t,isIndexFile:n=!1})=>({collection:e,collectionName:e.name,collectionFile:t,fields:t?.fields??e.fields,isIndexFile:n}),l4=e=>{if(e)return e;let t=A(nY)?.repository?.databaseName;return t?new UA(t,`file-cache`):void 0},Cpe=({config:e,entry:t,draft:n})=>{let{_i18n:{i18nEnabled:r,defaultLocale:i,structureMap:{i18nSingleFileDefaultRoot:a}={}}}=e;if(!r)return w4({draft:n,locale:`_default`,valueMap:t.locales[i].content});let o=Object.fromEntries(Object.entries(t.locales).filter(([,e])=>!!e.content).map(([e,t])=>[e,w4({draft:n,locale:e,valueMap:t.content})]));if(a){let{lang:e,...t}=o[i]??{},n=Object.fromEntries(Object.entries(o).filter(([e])=>e!==i));return{lang:[i,...Object.keys(n)],...t,...n}}return o},u4=async({collection:e,collectionFile:t,entry:n,draft:r,cacheDB:i})=>{let a=t??e,{_file:o,_i18n:{i18nEnabled:s,allLocales:c,defaultLocale:l,structureMap:{i18nSingleFile:u,i18nSingleFileDefaultRoot:d}={}}}=a;if(!s||u||d){let{slug:e,path:t}=n.locales[l],[s,c]=await Promise.all([T4({cacheDB:i,previousPath:t}),s4({content:Cpe({config:a,entry:n,draft:r}),_file:o})]);return[{action:`update`,slug:e,path:t,previousSha:s,data:c}]}return(await Promise.all(c.map(async e=>{let t=n.locales[e];if(!t?.content)return;let[a,s]=await Promise.all([T4({cacheDB:i,previousPath:t.path}),s4({content:w4({draft:r,locale:e,valueMap:t.content}),_file:o})]);return{action:`update`,slug:t.slug,path:t.path,previousSha:a,data:s}}))).filter(Boolean)},wpe=`order`,d4=e=>{let t=e?.reorder;if(t)return or(t)&&typeof t.key==`string`&&t.key?t.key:wpe},Tpe=e=>{let t=e?.reorder;if(or(t)&&typeof t.group==`string`&&t.group)return t.group},f4=(e,t)=>{let n=d4(t);if(!n)return[...e];let{defaultLocale:r}=t._i18n,i=e.map(e=>{let t=Number(e.locales[r]?.content?.[n]);return{entry:e,v:t,has:Number.isFinite(t)}});return i.sort((e,t)=>e.has&&t.has?e.v-t.v:e.has?-1:+!!t.has),i.map(({entry:e})=>e)},Epe=(e,t,n)=>{let r=Object.fromEntries(Object.entries(e.locales).map(([e,r])=>[e,r.content?{...r,content:{...r.content,[t]:n}}:{...r}]));return{...e,locales:r}},p4=async(e,t,{cacheDB:n}={})=>{let r=d4(e);if(!r)return{changes:[],savingEntries:[]};let{_i18n:{defaultLocale:i}}=e,a=l4(n),o=[];for(let[e,n]of t.entries()){let t=e+1;Number(n.locales[i]?.content?.[r])!==t&&o.push(Epe(n,r,t))}let s=c4({collection:e});return{changes:(await Promise.all(o.map(t=>u4({collection:e,entry:t,draft:s,cacheDB:a})))).flat(),savingEntries:o}},Dpe=async(e,t,{silent:n=!1}={})=>{let{changes:r,savingEntries:i}=await p4(e,t);return r.length?(await fQ({changes:r,savingEntries:i,options:{commitType:`update`,collection:e}}),n||sQ.set({...oQ,saved:!0,count:i.length}),i.length):0},Ope=(e,{excludeIds:t}={})=>{let n=pL(e)?.name;return f4(pB(e.name).filter(e=>e.slug!==n&&!(t&&t.has(e.id))),e)},kpe=async(e,{excludeIds:t,cacheDB:n}={})=>!e||e._type!==`entry`||!d4(e)?{changes:[],savingEntries:[]}:p4(e,Ope(e,{excludeIds:t}),{cacheDB:n}),m4=/\.__sc_\w+$/,h4=na(),g4=na(!0),_4=0,v4=e=>{_4+=1,g4.set(!1);let t=()=>{--_4,_4||g4.set(!0)},n;try{n=e()}catch(e){throw t(),e}return n instanceof Promise?n.finally(t):(t(),n)},y4=na(!1),Ape=(e={})=>{let{files:t}=A(h4)??{};Object.keys(t??{}).forEach(t=>{t in e||URL.revokeObjectURL(t)})},jpe=e=>Object.fromEntries(Object.entries(e).filter(([e])=>!m4.test(e))),Mpe=(e,t)=>{let n=0;return Object.keys(t).some(r=>!m4.test(r)&&(n+=1,!Object.hasOwn(e,r)||!(0,HH.default)(e[r],t[r])))||Object.keys(e).length!==n},Npe=(e,t)=>{let n=Object.keys(t);return n.length!==Object.keys(e).length||n.some(n=>{let r=e[n];return!r||Mpe(r,t[n])})},b4=ra([h4],([e])=>{if(!e)return!1;let{originalLocales:t,currentLocales:n,originalSlugs:r,currentSlugs:i,originalValues:a,currentValues:o}=e;return!(0,HH.default)(t,n)||!(0,HH.default)(r,i)||Npe(a,o)});h4.subscribe(e=>{KH.devModeEnabled&&console.info(`entryDraft`,e)});var x4=({field:e,keyPath:t,keyPathList:n})=>{let{widget:r}=e,i=r===`list`;if(n.push(t),i||r===`object`){let{fields:r}=e,{types:a,typeKey:o=`type`}=e;if(r)r.forEach(e=>{x4({field:e,keyPath:i?`${t}.*.${e.name}`:`${t}.${e.name}`,keyPathList:n})});else if(a)n.push(i?`${t}.*.${o}`:`${t}.${o}`),a.forEach(e=>{e.fields?.forEach(e=>{x4({field:e,keyPath:i?`${t}.*.${e.name}`:`${t}.${e.name}`,keyPathList:n})})});else if(i){let{field:r}=e;r?x4({field:r,keyPath:`${t}.*`,keyPathList:n}):n.push(`${t}.*`)}}else r&&nL.includes(r)&&qB(e)&&n.push(`${t}.*`)},Ppe=e=>{let t=[];return e.forEach(e=>{x4({field:e,keyPath:e.name,keyPathList:t})}),t},Fpe=new Map,S4=e=>e==null||e===``||Array.isArray(e)&&!e.length||or(e)&&!Object.keys(e).length,C4=({key:e,field:t,locale:n,unsortedMap:r,sortedMap:i,isTomlOutput:a,omitEmptyOptionalFields:o})=>{if(m4.test(e)){delete r[e];return}let s=r[e];if(a&&t?.widget===`datetime`&&!WI(t).format){let e=new SV(s);s=e.isValid()?e:void 0}if(o&&t&&!ZB({fieldConfig:t,locale:n})&&S4(s)){let t=Object.keys(r).filter(t=>t.startsWith(`${e}.`));t.some(e=>!m4.test(e)&&!S4(r[e]))?i[e]=s:t.forEach(e=>{delete r[e]})}else i[e]=s;delete r[e]},Ipe=({collectionName:e,fileName:t,fields:n,locale:r,valueMap:i,canonicalSlugKey:a,aliasesKey:o,orderKey:s,isIndexFile:c=!1,isTomlOutput:l=!1})=>{let u=sr(i),d={},{omit_empty_optional_fields:f=!1}=A($H)?.output??{},p={collectionName:e,fileName:t,valueMap:i,isIndexFile:c},m={locale:r,unsortedMap:u,sortedMap:d,isTomlOutput:l,omitEmptyOptionalFields:f};return a&&a in u&&C4({...m,key:a}),o&&(o in u&&C4({...m,key:o}),q2(u,o).forEach(e=>{C4({...m,key:e})})),s&&s in u&&C4({...m,key:s}),Ppe(n).forEach(e=>{let t=YB({...p,keyPath:e});if(e in u)C4({...m,key:e,field:t});else if(t?.widget===`keyvalue`)d[e]={},Object.entries(u).filter(([t])=>t.startsWith(`${e}.`)).forEach(([e])=>{C4({...m,key:e,field:t})});else{let n=wI(Fpe,e,()=>RegExp(`^${NA(e.replaceAll(`*`,`\\d+`)).replaceAll(`\\\\d\\+`,`\\d+`)}$`));Object.keys(u).filter(e=>n.test(e)).sort((e,t)=>RA(e,t)).forEach(e=>{let n=t??YB({...p,keyPath:e});C4({...m,key:e,field:n})})}}),Object.keys(u).sort((e,t)=>RA(e,t)).forEach(e=>{C4({...m,key:e})}),rM(d)},w4=({draft:e,locale:t,valueMap:n})=>{let{collection:r,collectionName:i,collectionFile:a,fields:o,isIndexFile:s}=e,{_file:c,_i18n:{canonicalSlug:{key:l}}}=a??r,u=yoe.includes(c.format),d=Ipe({collectionName:i,fileName:a?.name,fields:o,locale:t,valueMap:n,canonicalSlugKey:l,aliasesKey:K2({collection:r,fields:o}),orderKey:d4(r),isIndexFile:s,isTomlOutput:u});return!u&&KB(o,`list`)?d[o[0].name]??[]:KB(o,`keyvalue`)?d[o[0].name]??{}:d},Lpe=async({draft:e,slugs:{defaultLocaleSlug:t,canonicalSlug:n,localizedSlugs:r}})=>{let i=A(uM),{collection:a,collectionName:o,collectionFile:s,fileName:c,isIndexFile:l,currentLocales:u,currentValues:d,files:f}=e,{_i18n:{canonicalSlug:{key:p}}}=s??a,m=[],h=[],{encode_file_path:g=!1}=A($H)?.output??{},_={collectionName:o,fileName:c,keyPath:``,valueMap:{},isIndexFile:l},v={draft:e,defaultLocaleSlug:t,changes:m,savingAssets:h};return{localizedEntryMap:Object.fromEntries(await Promise.all(Object.entries(d).map(async([a,o])=>{let s=r?.[a]??t,c=X2({draft:e,locale:a,slug:s});return u[a]?(n!==void 0&&(o[p]=n),upe({draft:e,locale:a,content:o,slug:s,path:c}),await Promise.all(Object.entries(o).map(async([e,t])=>{if(t===void 0){delete o[e];return}if(typeof t!=`string`)return;o[e]=t.trim();let n=[...t.matchAll(Uj(`g`))];if(!n.length)return;let r=YB({..._,valueMap:o,keyPath:e}),a={...v,keyPath:e,content:o,encodingEnabled:r?.widget===`richtext`||r?.widget===`markdown`||g};await Promise.all(n.map(async([e])=>{let{file:t,folder:n=i,replace:r}=f[e]??{};t&&await xpe({...a,file:t,folder:n,replace:r,blobURL:e})}))})),[a,{slug:s,path:c,content:sr(o)}]):[a,{path:c}]}))),changes:m,savingAssets:h}},T4=async({previousPath:e,cacheDB:t})=>{if(e)return(await t?.get(e))?.sha},Rpe=async({draft:e,savingEntry:t,cacheDB:n})=>{let{collection:r,isNew:i,originalSlugs:a,originalEntry:o,collectionFile:s}=e,{_file:c,_i18n:{i18nEnabled:l,defaultLocale:u,structureMap:{i18nSingleFileDefaultRoot:d}={}}}=s??r,{slug:f,path:p,content:m}=t.locales[u],h=!i&&(a?.[u]??a?._)!==f,g=o?.locales[u]?.path;return{action:i?`create`:h?`move`:`update`,slug:f,path:p,previousPath:h?g:void 0,previousSha:await T4({cacheDB:n,previousPath:g}),data:await s4({content:(()=>{if(!l)return w4({draft:e,locale:`_default`,valueMap:m});let n=Object.fromEntries(Object.entries(t.locales).filter(([,e])=>!!e.content).map(([t,n])=>[t,w4({draft:e,locale:t,valueMap:n.content})]));if(d){let{lang:e,...t}=n[u]??{},r=Object.fromEntries(Object.entries(n).filter(([e])=>e!==u));return{lang:[u,...Object.keys(r)],...t,...r}}return n})(),_file:c})}},zpe=async({draft:e,savingEntry:t,cacheDB:n,locale:r})=>{let{collection:i,isNew:a,originalLocales:o,currentLocales:s,originalSlugs:c,originalEntry:l,collectionFile:u}=e,{_file:d}=u??i,{slug:f,path:p,content:m}=t.locales[r]??{},h=l?.locales[r]?.path,g=await T4({cacheDB:n,previousPath:h});if(s[r]){let t=!a&&o[r]&&(c?.[r]??c?._)!==f;return{action:a||!o[r]?`create`:t?`move`:`update`,slug:f,path:p,previousPath:t?h:void 0,previousSha:g,data:await s4({content:w4({draft:e,locale:r,valueMap:m}),_file:d})}}if(!a&&o[r])return{action:`delete`,slug:f,path:p,previousSha:g}},E4=async({draft:e,slugs:t})=>{let{id:n,collection:r,collectionFile:i}=e,{defaultLocaleSlug:a}=t,{_file:o,_i18n:{i18nEnabled:s,allLocales:c,defaultLocale:l,structureMap:{i18nSingleFile:u,i18nSingleFileDefaultRoot:d}}}=i??r,{localizedEntryMap:f,changes:p,savingAssets:m}=await Lpe({draft:e,slugs:t}),h={id:n,slug:a,subPath:o.fullPathRegEx?f[l].path.match(o.fullPathRegEx)?.groups?.subPath??a:a,locales:Object.fromEntries(Object.entries(f))};await W2({type:`preSave`,entry:h,collection:r,collectionFile:i,isNew:e.isNew});let g=A(nY)?.repository?.databaseName,_={draft:e,savingEntry:h,cacheDB:g?new UA(g,`file-cache`):void 0};return!s||u||d?p.push(await Rpe({..._})):await Promise.all(c.map(async e=>{let t=await zpe({..._,locale:e});t&&p.push(t)})),{savingEntry:h,savingAssets:m,changes:p}},Bpe=({entry:e})=>{let{locales:t}=e,n=Object.entries(t),r=Object.fromEntries(n.map(([e])=>[e,!0])),i=Object.fromEntries(n.map(([e,{slug:t}])=>[e,t])),a=Object.fromEntries(n.map(([e,{content:t}])=>[e,t]));return{createdAt:Date.now(),isNew:!1,canPreview:!0,originalEntry:e,originalLocales:r,currentLocales:structuredClone(r),originalSlugs:i,currentSlugs:structuredClone(i),originalValues:a,currentValues:structuredClone(a),files:{},validities:{},validationMessages:{},expanderStates:{}}},D4=async({draftProps:e,indexFile:t,savingEntries:n,changes:r})=>{let{collection:i,collectionFile:a}=e,{fields:o=[]}=a??i,s={...e,fields:t?.fields??o},{savingEntry:c,changes:l}=await E4({draft:s,slugs:$2({draft:s})});n.push(c),r.push(...l)},Vpe=async({entry:e,savingEntries:t,changes:n})=>{let r=Bpe({entry:e});await Promise.all(cB(e).map(async i=>{let a=i.name,o=mL(i,e),s=o?pL(i):void 0,c=ZI(i,e),l={indexFile:s,savingEntries:t,changes:n},u={...r,collection:i,collectionName:a,isIndexFile:o};c.length?await Promise.all(c.map(e=>D4({...l,draftProps:{...u,collectionFile:e,fileName:e.name}}))):await D4({...l,draftProps:u})}))},Hpe=async({_globalAssetFolder:e,newPath:t,asset:n,savingEntries:r,changes:i})=>{let a=oB(n)??n.blobURL,o=a?await hB(a):[];if(!a||!o.length)return;let{publicPath:s}=gM(n.path).find(({collectionName:e})=>e!==void 0)??e,c=await hB(a,{entries:structuredClone(o),newURL:t.replace(n.folder.internalPath??``,s??``)});c.length&&await Promise.all(c.map(async e=>Vpe({entry:e,savingEntries:r,changes:i})))},Upe=({action:e,movedAssets:t})=>{let n=A(yU)?.path,r=t.find(e=>e.asset.path===n),i=A(bU)?.path,a=t.find(e=>e.asset.path===i);r&&yU.set(hU(r.path)),a&&bU.set(hU(a.path)),cQ.set({...oQ,moved:e===`move`,renamed:e===`rename`,count:t.length})},Wpe=async(e,t)=>{let n=A(uM),r=[],i=[],a=[];await Promise.all(t.map(async({asset:e,path:t})=>{let o=t,s=qj(o).basename;a.push({...e,path:o,name:s}),r.push({action:`move`,path:o,previousPath:e.path,previousSha:e.sha,data:new File([e.file??await eB(e)],s)}),await Hpe({_globalAssetFolder:n,newPath:o,asset:e,savingEntries:i,changes:r})})),await fQ({changes:r,savingEntries:i,savingAssets:a,options:{commitType:`uploadMedia`}}),Upe({action:e,movedAssets:t})},Gpe=U(`<p class="svelte-22gadf"> </p> <div role="none" class="svelte-22gadf"><!></div> <div role="none" class="error svelte-22gadf"><!></div>`,1),Kpe=U(`<!> <!>`,1),qpe={hash:`svelte-22gadf`,code:`p.svelte-22gadf {margin:0 0 8px;}div.svelte-22gadf {display:flex;align-items:center;gap:4px;}.error.svelte-22gadf {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}`};function Jpe(e,t){let n=tc();O(t,!0),J(e,qpe);let r=()=>j(CU,`$renamingAsset`,a),i=()=>j(pY,`$showAssetOverlay`,a),[a,o]=sa(),s=P(!1),c=P(!1),l=P(void 0),u=!1,d=P(ao({basename:``})),f=P(``),p=P(ao([])),m=P(ao([])),h=N(r),g=N(()=>H(d).dirname),_=N(()=>H(d).basename),v=N(()=>H(d).extension),y=N(()=>H(f).trim()),b=N(()=>qj(H(y)).extension),x=N(()=>!Sz(H(v),H(b))),S=N(()=>{if(!H(y))return`empty`;if(H(y).includes(`/`))return`character`;if(H(p).includes(H(y)))return`duplicate`}),C=N(()=>!!H(S)),w=async()=>{H(h)&&(F(d,qj(H(h).path),!0),F(f,H(_),!0),u=!1,F(p,NU(H(g)).map(e=>e.name).filter(e=>e!==H(h).name),!0),F(m,await nQ(H(h)),!0),F(s,!0))},T=()=>{if(u||!H(l))return;u=!0;let{filename:e}=qj(H(l).value);H(l).setSelectionRange(0,e.length)},E=async()=>{if(!H(h))return;let e=H(h).path,t=`${H(g)}/${H(y)}`;await Wpe(`rename`,[{asset:H(h),path:t}]),PY().path===`/assets/${e}`&&await BY(`/assets/${t}`,{replaceState:!0,notifyChange:!1})};B(()=>{H(h)&&w()}),B(()=>{i()||(F(s,!1),F(c,!1),M(CU,void 0))});var ee=Kpe(),te=L(ee);{let e=N(()=>Z(`rename_x`,{values:{name:H(h)?.name??``}})),t=N(()=>Z(`rename`)),r=N(()=>H(y)===H(_)||H(C));Yp(te,{get title(){return H(e)},get okLabel(){return H(t)},get okDisabled(){return H(r)},onOk:()=>{H(x)?F(c,!0):E()},onClose:()=>{H(c)||M(CU,void 0)},get open(){return H(s)},set open(e){F(s,e,!0)},children:(e,t)=>{var r=Gpe(),i=L(r),a=R(i,!0),o=z(i,2);fm(I(o),{dir:`auto`,flex:!0,get invalid(){return H(C)},get"aria-errormessage"(){return`${n}-error`},onselect:()=>{T()},get value(){return H(f)},set value(e){F(f,e,!0)},get element(){return H(l)},set element(e){F(l,e,!0)}}),D(o);var s=z(o,2),c=I(s),u=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`enter_new_name_for_asset_error.${H(S)}`)]),G(e,t)};q(c,e=>{H(C)&&e(u)}),D(s),V(e=>{K(a,e),Y(s,`id`,`${n}-error`)},[()=>Z(`enter_new_name_for_asset`,{values:{count:H(m).length}})]),G(e,r)},$$slots:{default:!0}})}var ne=z(te,2);{let e=N(()=>Z(`rename`));HQ(ne,{get oldExtension(){return H(v)},get newExtension(){return H(b)},get okLabel(){return H(e)},onOk:()=>{E(),M(CU,void 0)},onCancel:()=>{F(s,!0)},get open(){return H(c)},set open(e){F(c,e,!0)}})}G(e,ee),k(),o()}var Ype=U(`<bdi> </bdi>`),Xpe=U(`<div role="none" class="label svelte-17zk54k"><!></div>`),Zpe=U(`<!> <!> <!>`,1),Qpe={hash:`svelte-17zk54k`,code:`.label.svelte-17zk54k {word-break:break-all;}`};function $pe(e,t){O(t,!0),J(e,Qpe);let n=()=>j(bY,`$listedAssetIndexMap`,a),r=()=>j(yU,`$focusedAsset`,a),i=()=>j(vU,`$selectedAssetPathSet`,a),[a,o]=sa(),s=N(()=>t.asset.name),c=N(()=>t.asset.kind),l=e=>{_U.update(n=>{let r=n.indexOf(t.asset);return e&&r===-1&&n.push(t.asset),!e&&r>-1&&n.splice(r,1),n})};{let a=N(()=>n().get(t.asset.path)??-1);_m(e,{get"aria-rowindex"(){return H(a)},get"aria-label"(){return H(s)},onChange:e=>{l(e.detail.selected)},onfocus:()=>{M(yU,t.asset)},onclick:()=>{(zV.isSmallScreen||zV.isMediumScreen)&&r()&&AR(r())&&BY(`/assets/${r().path}`,{transitionType:`forwards`})},ondblclick:()=>{r()&&AR(r())&&BY(`/assets/${r().path}`,{transitionType:`forwards`})},children:(e,n)=>{var r=Zpe(),a=L(r),o=e=>{gm(e,{class:`checkbox`,children:(e,n)=>{{let n=N(()=>i().has(t.asset.path));Jp(e,{role:`none`,tabindex:`-1`,get checked(){return H(n)},onChange:({detail:{checked:e}})=>{l(e)}})}},$$slots:{default:!0}})};q(a,e=>{zV.isSmallScreen||zV.isMediumScreen||e(o)});var u=z(a,2);gm(u,{class:`image`,children:(e,n)=>{{let n=N(()=>t.viewType===`list`?`icon`:`tile`),r=N(()=>H(c)===`image`);NQ(e,{get kind(){return H(c)},get asset(){return t.asset},get variant(){return H(n)},get cover(){return zV.isSmallScreen},get checkerboard(){return H(r)}})}},$$slots:{default:!0}});var d=z(u,2),f=e=>{gm(e,{class:`title`,children:(e,t)=>{var n=Xpe();_f(I(n),{lines:2,children:(e,t)=>{var n=Ype(),r=R(n,!0);V(()=>K(r,H(s))),G(e,n)},$$slots:{default:!0}}),D(n),G(e,n)},$$slots:{default:!0}})};q(d,e=>{(!zV.isSmallScreen||t.viewType===`list`)&&e(f)}),G(e,r)},$$slots:{default:!0}})}k(),o()}var eme=new Set([`$$slots`,`$$events`,`$$legacy`,`loading`,`asset`,`src`,`variant`,`blurBackground`,`cover`,`checkerboard`,`alt`]);function O4(e,t){let n=X(t,`loading`,3,`lazy`),r=X(t,`asset`,3,void 0),i=X(t,`src`,3,void 0),a=X(t,`variant`,3,void 0),o=X(t,`blurBackground`,3,!1),s=X(t,`cover`,3,!1),c=X(t,`checkerboard`,3,!1),l=X(t,`alt`,3,``),u=Al(t,eme);NQ(e,Ml({kind:`image`,get loading(){return n()},get asset(){return r()},get src(){return i()},get variant(){return a()},get blurBackground(){return o()},get cover(){return s()},get checkerboard(){return c()},get alt(){return l()}},()=>u))}var tme=U(`<span role="none" class="image svelte-lbhi1w"><!></span>`),nme=U(`<bdi> </bdi> · <bdi> </bdi>`,1),rme=U(`<div role="listitem" class="file svelte-lbhi1w"><!> <div role="none" class="info svelte-lbhi1w"><div role="none" class="name"><!></div> <div role="none" class="meta svelte-lbhi1w"><!> <!></div></div> <!></div>`),ime=U(`<div role="list" class="files svelte-lbhi1w"></div>`),ame={hash:`svelte-lbhi1w`,code:`.files.svelte-lbhi1w {display:flex;flex-direction:column;gap:16px;margin:0 8px;}.file.svelte-lbhi1w {display:flex;align-items:center;gap:16px;overflow:hidden;.preview {flex:none;}.image:where(.svelte-lbhi1w) {flex:none;display:flex;justify-content:center;align-items:center;width:40px;height:40px;aspect-ratio:1 / 1;object-fit:cover;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-tertiary-background-color);}.info:where(.svelte-lbhi1w) {flex:auto;display:flex;flex-direction:column;gap:4px;overflow:hidden;text-align:start;.meta:where(.svelte-lbhi1w) {font-size:var(--sui-font-size-small);color:var(--sui-secondary-foreground-color);}}}`};function k4(e,t){O(t,!0),J(e,ame);let n=X(t,`files`,27,()=>ao([])),r=X(t,`transformedFileMap`,3,void 0),i=X(t,`removable`,3,!0),a=X(t,`showThumbnail`,3,!0),o=new Map,s=e=>{let t=o.get(e);return t===void 0&&(t=URL.createObjectURL(e),o.set(e,t)),t};B(()=>{let e=new Set(n());o.forEach((t,n)=>{e.has(n)||(URL.revokeObjectURL(t),o.delete(n))})}),Pl(()=>{o.forEach(e=>URL.revokeObjectURL(e)),o.clear()});var c=ime();Cc(c,23,n,(e,t)=>`${e.name}-${t}`,(e,t,o)=>{var c=W();hc(L(c),vf,null,e=>{let c=N(()=>H(t)),l=N(()=>r()?.get(H(t)));var u=rme(),d=I(u),f=e=>{{let n=N(()=>s(H(t)));O4(e,{get src(){return H(n)},variant:`icon`,checkerboard:!0})}},p=N(()=>a()&&Vz.includes(H(c).type)),m=e=>{var t=tme();Rl(I(t),{name:`draft`}),D(t),G(e,t)};q(d,e=>{H(p)?e(f):e(m,-1)});var h=z(d,2),g=I(h);_f(I(g),{children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>H(c).name.normalize()]),G(e,n)},$$slots:{default:!0}}),D(g);var _=z(g,2),v=I(_);_c(v,()=>Ud.current,e=>{var n=nme(),r=L(n),i=R(r,!0),a=R(z(r,2),!0);V((e,t)=>{K(i,e),K(a,t)},[()=>Z(`file_type_labels.${H(t).type.split(`/`)[1]}`,{default:qj(H(c).name).extension?.toUpperCase()}),()=>yz(H(c).size)]),G(e,n)});var y=z(v,2),b=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`file_meta_converted_from_x`,{values:{type:Z(`file_type_labels.${H(l).type.split(`/`)[1]}`,{default:qj(H(l).name).extension?.toUpperCase()})}})]),G(e,t)};q(y,e=>{H(l)&&H(l).type!==H(t).type&&e(b)}),D(_),D(h);var x=z(h,2);{let e=N(()=>Z(`remove`)),t=N(()=>!i()||n().length===1);$f(x,{variant:`ghost`,iconic:!0,get"aria-label"(){return H(e)},get hidden(){return H(t)},onclick:e=>{e.stopPropagation(),n().splice(H(o),1)},children:(e,t)=>{Rl(e,{name:`close`})},$$slots:{default:!0}})}D(u),G(e,u)}),G(e,c)}),D(c),G(e,c),k()}var ome=U(`<div role="alert"><!></div>`),sme=U(`<div role="none"><!></div> <div role="none"><!></div> <!>`,1),cme=U(`<div role="none" class="content svelte-1hhq62q"><!> <!></div>`),lme=U(`<div role="none" class="drop-indicator svelte-1hhq62q"><div role="none" class="svelte-1hhq62q"><!> <span role="none"> </span></div></div>`),ume=U(`<div role="none" class="drop-target svelte-1hhq62q"><!> <!></div> <!> <!>`,1),dme={hash:`svelte-1hhq62q`,code:`.drop-target.svelte-1hhq62q {display:flex;flex-direction:column;position:relative;overflow:hidden;height:100%;pointer-events:auto;& > .group {overflow-y:auto;padding:16px;width:100%;height:100%;}button:not(:disabled) {pointer-events:auto;}}.drop-indicator.svelte-1hhq62q {position:absolute;inset:0;z-index:10;border-radius:var(--sui-control-large-border-radius);background-color:hsl(var(--sui-background-color-4-hsl) / 80%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;pointer-events:none;div:where(.svelte-1hhq62q) {position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;border:4px dashed var(--sui-primary-accent-color);border-radius:var(--sui-control-large-border-radius);font-size:var(--sui-font-size-x-large);.icon {color:var(--sui-secondary-foreground-color);font-size:48px;}}}.content.svelte-1hhq62q {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;overflow:auto;height:100%;min-height:320px;text-align:center;}`};function A4(e,t){O(t,!0),J(e,dme);let n=e=>{var t=W(),n=L(t),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`dropped_image_type_mismatch`,{values:{types:b([`GIF`,`JPEG`,`PNG`,`WebP`,`SVG`])}})]),G(e,t)},a=N(()=>r()===Vz.join(`,`)),o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`dropped_file_type_mismatch`,{values:{types:b(r().split(/,\s*/))}})]),G(e,t)};q(n,e=>{H(a)?e(i):e(o,-1)}),G(e,t)},r=X(t,`accept`,3,void 0),i=X(t,`disabled`,3,!1),a=X(t,`multiple`,3,!1),o=X(t,`showUploadButton`,3,!1),s=X(t,`showFilePreview`,3,!1),c=X(t,`filterDroppedFiles`,3,!0),l=X(t,`onDrop`,3,void 0),u=X(t,`children`,3,void 0),d=P(void 0),f=P(!1),p=P(!1),m=P(!1),h=P(void 0),g=P(ao([])),_=N(()=>o()||s()&&H(g).length),v=()=>{H(h)?.open()},y=()=>{H(g).length&&(F(g,[],!0),l()?.({files:H(g)}))},b=e=>CL(Ud.current,{type:`disjunction`}).format(e),x=e=>{F(g,a()?e:e.slice(0,1),!0),l()?.({files:H(g)})},S=e=>{l()?.({files:e.detail.files})};Nl(()=>(H(d)?.addEventListener(`Select`,S),()=>{H(d)?.removeEventListener(`Select`,S)})),B(()=>{!H(_)&&H(p)&&F(m,!0)});var C={openFilePicker:v,reset:y},w=ume(),T=L(w),E=I(T),ee=e=>{var t=cme(),r=I(t),c=e=>{var t=sme(),r=L(t),o=I(r),s=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`drop_files_or_click_to_browse`,{values:{count:a()?2:1}})]),G(e,t)},c=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`tap_to_browse`)]),G(e,t)};q(o,e=>{zV.hasMouse?e(s):e(c,-1)}),D(r);var l=z(r,2),u=I(l);{let e=e=>{Rl(e,{name:`cloud_upload`})},t=N(()=>Z(`choose_files`,{values:{count:a()?2:1}}));$f(u,{variant:`primary`,get label(){return H(t)},get disabled(){return i()},onclick:()=>{v()},startIcon:e,$$slots:{startIcon:!0}})}D(l);var d=z(l,2),f=e=>{var t=ome(),r=I(t);n(r),D(t),G(e,t)};q(d,e=>{H(p)&&e(f)}),G(e,t)};q(r,e=>{o()&&e(c)});var l=z(r,2),u=e=>{k4(e,{get files(){return H(g)},set files(e){F(g,e,!0)}})};q(l,e=>{s()&&H(g).length&&e(u)}),D(t),G(e,t)},te=e=>{var t=W();Ac(L(t),()=>u()??br),G(e,t)};q(E,e=>{H(_)?e(ee):e(te,-1)});var ne=z(E,2),re=e=>{var t=lme(),n=I(t),r=I(n);Rl(r,{name:`download`});var i=R(z(r,2),!0);D(n),D(t),V(e=>K(i,e),[()=>Z(`drop_files_here`,{values:{count:a()?2:1}})]),G(e,t)};q(ne,e=>{H(f)&&e(re)}),D(T),Ol(T,e=>F(d,e),()=>H(d));var ie=z(T,2);Ol(mm(ie,{get accept(){return r()},get multiple(){return a()},onSelect:({files:e})=>{x(e)}}),e=>F(h,e,!0),()=>H(h));var ae=z(ie,2),oe=e=>{{let t=N(()=>Z(`unsupported_file_type`));Xp(e,{get title(){return H(t)},get open(){return H(m)},set open(e){F(m,e,!0)},children:(e,t)=>{n(e)},$$slots:{default:!0}})}};return q(ae,e=>{H(_)||e(oe)}),Ws(`dragover`,T,e=>{e.preventDefault(),!(i()||!e.dataTransfer)&&(e.dataTransfer.dropEffect=`copy`,F(f,!0),F(p,!1))}),Ws(`dragleave`,T,e=>{e.preventDefault(),!i()&&F(f,!1)}),Ws(`dragend`,T,e=>{e.preventDefault(),!i()&&F(f,!1)}),Ws(`drop`,T,async e=>{if(e.preventDefault(),i()||!e.dataTransfer)return;F(f,!1);let t=await Yj(e.dataTransfer,{accept:c()?r():void 0});t.length?x(t):c()&&F(p,!0)}),G(e,w),k(C)}function j4(e,t){O(t,!0);let n=()=>j(SG,`$openAuthoring`,i),r=()=>j(fM,`$targetAssetFolder`,i),[i,a]=sa(),o=X(t,`label`,3,void 0),s=N(()=>n()||!_M(r()));{let t=e=>{Rl(e,{name:`cloud_upload`})},n=N(()=>!o()),r=N(()=>Z(`upload_assets`));$f(e,{variant:`primary`,get iconic(){return H(n)},get disabled(){return H(s)},get label(){return o()},get"aria-label"(){return H(r)},onclick:()=>{M(mY,!0)},startIcon:t,$$slots:{startIcon:!0}})}k(),a()}var fme=new Set([`$$slots`,`$$events`,`$$legacy`,`children`]),pme=U(`<div><!></div>`),mme={hash:`svelte-1sdsl2g`,code:`.list-container.svelte-1sdsl2g {--icon-size: 36px;flex:auto;position:relative;height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;}`};function M4(e,t){J(e,mme);let n=X(t,`children`,3,void 0),r=Al(t,fme);var i=pme();bl(i,()=>({role:`group`,class:`list-container`,...r}),void 0,void 0,void 0,`svelte-1sdsl2g`),Ac(I(i),()=>n()??br),D(i),G(e,i)}var hme=new Set([`$$slots`,`$$events`,`$$legacy`,`viewType`,`children`]),gme=U(`<div role="none"><!></div>`),_me={hash:`svelte-1sfbolp`,code:`:is(.grid-view.svelte-1sfbolp, .list-view.svelte-1sfbolp) {display:block;padding:0 16px 16px;height:100%;overflow-y:auto;}.grid-view.svelte-1sfbolp {
|
||
@media (width < 768px) {padding:4px;
|
||
}.row-group-caption {display:block;grid-column:1 / -1; /* span the entire row */th {display:block;}}.row-group:not(:first-child) .row-group-caption {margin-top:16px;}.grid-body {display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 200px), 1fr));gap:16px;border-width:0;
|
||
|
||
@media (width < 768px) {grid-template-columns:repeat(auto-fill, minmax(var(--grid-size, 160px), 1fr));gap:8px;
|
||
}}.grid-row {display:block;position:relative;overflow:hidden;height:auto;text-align:start;.grid-cell {display:block;&.image:empty {aspect-ratio:1 / 1;}}.checkbox {position:absolute;inset-block-start:4px;inset-inline-start:4px;z-index:2;}.title {.label {overflow:hidden;margin:12px;height:calc(var(--sui-line-height-compact) * 2);line-height:var(--sui-line-height-compact);}}
|
||
|
||
/* Editorial Workflow status, shown below the title on a tile */.status {margin:-4px 12px 12px;}&[tabindex] {border-radius:var(--sui-control-large-border-radius);background-color:var(--sui-secondary-background-color);cursor:pointer;transition:background-color 200ms;&:is(:hover, :focus, :active) {background-color:var(--sui-hover-background-color);}}}}.list-view.svelte-1sfbolp {
|
||
@media (width < 768px) {padding:0;
|
||
}[role='grid'] {
|
||
@media (width < 768px) {width:100%;--sui-focus-ring-width: 0;
|
||
}.row-group {.row-group-caption + .grid-row {.grid-cell {border-top-width:0 !important;}}.row-group-caption ~ .grid-row:last-child {.grid-cell {border-bottom-width:0 !important;}}}.grid-row {transition-property:background-color, outline-color;transition-duration:200ms;&[tabindex] {cursor:pointer;}&:hover {background-color:var(--sui-hover-background-color);}&:last-child .grid-cell {border-width:1px 0;}}.grid-cell {overflow:hidden;border-width:1px 0 0;border-color:var(--sui-secondary-border-color);padding:0 16px 0 0;height:40px;max-width:100%;color:var(--sui-secondary-foreground-color);white-space:nowrap;vertical-align:middle;
|
||
|
||
@media (width < 768px) {border-width:0 !important;height:64px;
|
||
}&.checkbox {padding-inline-start:8px !important;width:44px;}&.title {width:100%; /* flex: auto */color:var(--sui-primary-foreground-color);}
|
||
|
||
/*
|
||
* The column is as wide as the widest Editorial Workflow status badge, so align the
|
||
* badges to the end of the row rather than letting the narrower ones float mid-column
|
||
*/&.status {text-align:end;}&:first-child {padding-inline-start:16px;}.label {overflow:hidden;
|
||
|
||
@media (width < 768px) {white-space:normal;line-height:var(--sui-line-height-compact);
|
||
}}&.image {width:48px;&:empty::before {display:block;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);content:'';}}}}}`};function N4(e,t){O(t,!0),J(e,_me);let n=X(t,`children`,3,void 0),r=Al(t,hme);var i=gme();hc(I(i),vf,null,e=>{Wee(e,Ml({multiple:!0,clickToSelect:!1},()=>r,{children:(e,t)=>{var r=W();Ac(L(r),()=>n()??br),G(e,r)},$$slots:{default:!0}}))}),D(i),V(()=>el(i,1,`${t.viewType??``}-view`,`svelte-1sfbolp`)),G(e,i),k()}var vme=U(`<span role="none"> </span> <!>`,1);function yme(e,t){O(t,!0);let n=()=>j(vY,`$currentView`,s),r=()=>j(fM,`$targetAssetFolder`,s),i=()=>j(SG,`$openAuthoring`,s),a=()=>j(xY,`$assetGroups`,s),o=()=>j(yY,`$listedAssets`,s),[s,c]=sa(),l=N(()=>n().type),u=N(r),d=N(()=>i()||!_M(H(u)));{let t=N(()=>Z(`asset_list`));M4(e,{get"aria-label"(){return H(t)},children:(e,t)=>{A4(e,{get disabled(){return H(d)},multiple:!0,onDrop:({files:e})=>{M(xU,{folder:H(u),files:e})},children:(e,t)=>{var n=W(),r=L(n),i=e=>{{let t=N(()=>Z(`assets`));N4(e,{id:`asset-list`,get viewType(){return H(l)},get"aria-label"(){return H(t)},get"aria-rowcount"(){return o().length},children:(e,t)=>{var n=W();Cc(L(n),1,()=>Object.entries(a()),([e,t])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=W();hc(L(a),vf,null,e=>{{let t=N(()=>r()===`*`?void 0:r());hm(e,{get label(){return H(t)},children:(e,t)=>{Am(e,{get items(){return i()},itemKey:`path`,renderItem:(e,t=br)=>{var n=W();_c(L(n),()=>t().sha,e=>{var n=W();hc(L(n),vf,null,e=>{$pe(e,{get asset(){return t()},get viewType(){return H(l)}})}),G(e,n)}),G(e,n)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}}),G(e,a)}),G(e,n)},$$slots:{default:!0}})}},s=N(()=>Object.values(a()).flat(1).length),c=e=>{zj(e,{children:(e,t)=>{var n=vme(),r=L(n),i=R(r,!0),a=z(r,2),o=e=>{{let t=N(()=>Z(`upload_assets`));j4(e,{get label(){return H(t)}})}};q(a,e=>{H(d)||e(o)}),V(e=>K(i,e),[()=>Z(`no_files_found`)]),G(e,n)},$$slots:{default:!0}})};q(r,e=>{H(s)?e(i):e(c,-1)}),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})}k(),c()}var P4=na(null),F4=na(``),bme=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1),xme=U(`<div role="none" class="wrapper svelte-lav5fn"><!></div>`),Sme={hash:`svelte-lav5fn`,code:`.wrapper.svelte-lav5fn {display:contents;--sui-textbox-border-width: 0;}`};function I4(e,t){O(t,!0),J(e,Sme);let n=()=>j(F4,`$searchTerms`,i),r=()=>j(P4,`$searchMode`,i),[i,a]=sa(),o=X(t,`onclick`,3,void 0),s=e=>{let t=!!n(),{path:r}=PY(),i=r.startsWith(`/search/`);M(F4,e),e?BY(`/search/${e}`,{replaceState:i}):t&&i&&UY(`/collections`)},c=P(void 0);B(()=>{H(c)&&n()!==H(c)?.value&&(H(c).value=n())});var l=xme(),u=I(l),d=e=>{var t=bme(),n=L(t);{let e=N(()=>Z(`search_placeholder_${r()}`));vc(n,()=>({"--sui-textbox-placeholder-text-align":`center`})),Ol(Pm(n.lastChild,{debounce:!0,keyShortcuts:`Accel+F`,get placeholder(){return H(e)},get onclick(){return o()},oninput:({target:e})=>{s(e.value.trim())},onClear:()=>{s(``)}}),e=>F(c,e,!0),()=>H(c)),D(n)}G(e,t)};q(u,e=>{r()&&e(d)}),D(l),G(e,l),k(),a()}var Cme=U(`<header><h2> </h2></header> <!>`,1),wme=U(`<span class="count"> </span>`),Tme=U(`<!> <!>`,1),Eme=U(`<div role="none" class="primary-sidebar"><!> <!></div>`);function Dme(e,t){O(t,!0);let n=()=>j(lM,`$allAssetFolders`,a),r=()=>j(dM,`$selectedAssetFolder`,a),i=()=>j(dU,`$allAssets`,a),[a,o]=sa(),s=X(t,`isSearchPage`,3,!1),c=N(()=>Intl.NumberFormat(Ud.current)),l=N(()=>[...n().filter(({typedKeyPath:e,isAssetCollection:t})=>!t&&e===void 0).sort((e,t)=>$I(e.collectionName,e.fileName)-$I(t.collectionName,t.fileName)).sort((e,t)=>WL(e.collectionName)-WL(t.collectionName)),...n().filter(({isAssetCollection:e})=>e)]),u=e=>H(l)[e].collectionName===void 0&&H(l)[e+1]?.collectionName!==void 0||!H(l)[e].isAssetCollection&&!!H(l)[e+1]?.isAssetCollection;var d=Eme(),f=I(d),p=e=>{var t=Cme(),n=L(t),r=R(I(n),!0);D(n),I4(z(n,2),{onclick:e=>{e.preventDefault(),BY(`/search`)}}),V(e=>K(r,e),[()=>Z(`assets`)]),G(e,t)};q(f,e=>{zV.isSmallScreen&&e(p)});var m=z(f,2);{let e=N(()=>Z(`asset_folder_list`));vm(m,{get"aria-label"(){return H(e)},"aria-controls":`assets-container`,children:(e,t)=>{{let t=N(()=>Z(`asset_location.repository`));ym(e,{get label(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),19,()=>H(l),e=>[e.collectionName,e.fileName,e.internalPath].join(`:`),(e,t,n)=>{var a=Tme(),o=L(a);hc(o,vf,null,e=>{let n=N(()=>H(t)),a=N(()=>H(n).collectionName?HL(H(n).collectionName):void 0),o=N(()=>H(a)&&H(n).fileName?YI(H(a),H(n).fileName):void 0),l=N(()=>H(n).entryRelative||H(n).hasTemplateTags),u=N(()=>(0,HH.default)(r(),H(t)));{let r=e=>{{let n=N(()=>H(t).icon||H(o)?.icon||H(a)?.icon||`folder`);Rl(e,{get name(){return H(n)}})}},d=e=>{var r=W();_c(L(r),i,e=>{var r=W();hc(L(r),vf,null,e=>{let r=N(()=>(H(n).internalPath===void 0?i():MU(H(t))).length);var a=wme(),o=R(a,!0);V((e,t)=>{Y(a,`aria-label`,`(${e??``})`),K(o,t)},[()=>Z(`x_assets`,{values:{count:H(r)}}),()=>H(c).format(H(r))]),G(e,a)}),G(e,r)}),G(e,r)},f=N(()=>zV.isSmallScreen||s()?!1:H(u)),p=N(()=>Ud.current?gY(H(t)):``);bm(e,{get selected(){return H(f)},get label(){return H(p)},onSelect:()=>{BY(`/assets/${H(n).internalPath??`-/all`}`,{transitionType:`forwards`,state:{folder:H(t)}})},ondragover:e=>{e.preventDefault(),!H(l)&&(H(n).internalPath===void 0||H(u)?e.dataTransfer.dropEffect=`none`:(e.dataTransfer.dropEffect=`move`,e.target.classList.add(`dragover`)))},ondragleave:e=>{e.preventDefault(),!H(l)&&e.target.classList.remove(`dragover`)},ondragend:e=>{e.preventDefault(),!H(l)&&e.target.classList.remove(`dragover`)},ondrop:e=>{e.preventDefault(),!H(l)&&e.target.classList.remove(`dragover`)},startIcon:r,endIcon:d,$$slots:{startIcon:!0,endIcon:!0}})}});var l=z(o,2),d=e=>{Hp(e,{})},f=N(()=>u(H(n)));q(l,e=>{H(f)&&e(d)}),G(e,a)}),G(e,n)},$$slots:{default:!0}})}},$$slots:{default:!0}})}D(d),G(e,d),k(),o()}function Ome(e,t){O(t,!0);{let n=N(()=>!t.asset||!AR(t.asset)),r=N(()=>Z(`preview`)),i=N(()=>Z(`show_preview`));$f(e,{variant:`ghost`,get disabled(){return H(n)},get label(){return H(r)},get"aria-label"(){return H(i)},onclick:()=>{BY(`/assets/${t.asset?.path}`,{transitionType:`forwards`})}})}k()}var kme=U(`<bdi> </bdi>`),Ame=U(`<span role="none" dir="ltr"> </span>`),jme=U(`<!> <!> <!> <!> <!>`,1),Mme=U(`<!> <h2 role="none"><!> <!></h2> <!> <!>`,1);function Nme(e,t){O(t,!0);let n=()=>j(_U,`$selectedAssets`,c),r=()=>j(yU,`$focusedAsset`,c),i=()=>j(SG,`$openAuthoring`,c),a=()=>j(fM,`$targetAssetFolder`,c),o=()=>j(dM,`$selectedAssetFolder`,c),s=()=>j(yY,`$listedAssets`,c),[c,l]=sa(),u=N(()=>n().length?[...n()]:r()?[r()]:[]),d=N(()=>i()||!_M(a()));{let t=N(()=>Z(`folder`));Mj(e,{variant:`primary`,get"aria-label"(){return H(t)},children:(e,t)=>{var n=Mme(),i=L(n),a=e=>{{let t=N(()=>Z(`back_to_asset_folder_list`));xQ(e,{get"aria-label"(){return H(t)},onclick:()=>{UY(`/assets`)}})}};q(i,e=>{zV.isSmallScreen&&e(a)});var c=z(i,2),l=I(c);_c(l,()=>Ud.current,e=>{var t=kme(),n=R(t,!0);V(e=>K(n,e),[()=>o()?gY(o()):``]),G(e,t)});var f=z(l,2),p=e=>{var t=Ame(),n=R(t);V(()=>{K(n,`/${o().internalPath??``}`),t.dir=t.dir}),G(e,t)};q(f,e=>{!zV.isSmallScreen&&o()?.internalPath!==void 0&&e(p)}),D(c);var m=z(c,2),h=e=>{var t=jme(),n=L(t);Ome(n,{get asset(){return r()}});var i=z(n,2);{let e=N(()=>r()?[r()]:[]);aQ(i,{get assets(){return H(e)}})}var a=z(i,2);vQ(a,{get assets(){return H(u)}});var o=z(a,2);{let e=N(()=>Z(`delete_selected_assets`,{values:{count:H(u).length}})),t=N(()=>Z(H(u).length>1&&H(u).length===s().length?`confirm_deleting_all_assets`:`confirm_deleting_selected_assets`,{values:{count:H(u).length}}));gQ(o,{get assets(){return H(u)},get buttonDescription(){return H(e)},get dialogDescription(){return H(t)}})}bQ(z(o,2),{get asset(){return r()}}),G(e,t)};q(m,e=>{zV.isSmallScreen||zV.isMediumScreen||e(h)}),mp(z(m,2),{children:(e,t)=>{var n=W(),r=L(n),i=e=>{{let t=N(()=>zV.isSmallScreen?void 0:Z(`upload`));j4(e,{get label(){return H(t)}})}};q(r,e=>{(!zV.isSmallScreen||s().length&&!H(d))&&e(i)}),G(e,n)},$$slots:{default:!0}}),G(e,n)},$$slots:{default:!0}})}k(),l()}var Pme=U(`<span role="none"> </span>`);function Fme(e,t){O(t,!0);let n=()=>j(vY,`$currentView`,i),r=()=>j(yU,`$focusedAsset`,i),[i,a]=sa();var o=W(),s=L(o),c=e=>{{let t=N(()=>Z(`asset_info`));Bj(e,{id:`asset-info`,class:`secondary-sidebar`,get"aria-label"(){return H(t)},children:(e,t)=>{var n=W(),i=L(n),a=e=>{RQ(e,{get asset(){return r()},showPreview:!0})},o=e=>{zj(e,{children:(e,t)=>{var n=Pme(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`select_asset_show_info`)]),G(e,n)},$$slots:{default:!0}})};q(i,e=>{r()?e(a):e(o,-1)}),G(e,n)},$$slots:{default:!0}})}};q(s,e=>{zV.isLargeScreen&&n().showInfo&&e(c)}),G(e,o),k(),a()}var Ime=U(`<!> <!>`,1);function L4(e,t){O(t,!0);let n=()=>j(t.currentView,`$currentView`,r),[r,i]=sa(),a=X(t,`label`,3,``),o=X(t,`disabled`,3,!1),s=X(t,`multiple`,3,!1),c=X(t,`noneLabel`,3,``),l=X(t,`filters`,19,()=>[]);{let r=e=>{{let r=N(()=>Z(`filtering_options`));xm(e,{get"aria-label"(){return H(r)},get"aria-controls"(){return t[`aria-controls`]},children:(e,r)=>{var i=W(),a=L(i),o=e=>{var r=W();Cc(L(r),17,l,e=>`${e.field}|${String(e.pattern)}`,(e,r)=>{let i=N(()=>{let{label:e,field:t,pattern:n}=H(r);return{_label:e,field:t,pattern:n}}),a=N(()=>(n().filters||[]).findIndex(e=>e.field===H(i).field&&String(e.pattern)===String(H(i).pattern)));{let n=N(()=>H(a)>-1);Cm(e,{get label(){return H(i)._label},get checked(){return H(n)},onChange:()=>{t.currentView.update(e=>{let t=e.filters?[...e.filters]:[];return H(a)>-1?t.splice(H(a),1):t.push({field:H(i).field,pattern:H(i).pattern}),{...e,filters:t}})}})}}),G(e,r)},u=e=>{var r=Ime(),i=L(r);{let e=N(()=>c()||Z(`sort_keys.none`)),r=N(()=>!n().filter);wm(i,{get label(){return H(e)},get checked(){return H(r)},onSelect:()=>{t.currentView.update(e=>({...e,filter:void 0}))}})}Cc(z(i,2),17,l,e=>`${e.field}|${String(e.pattern)}`,(e,r)=>{let i=N(()=>{let{label:e,field:t,pattern:n}=H(r);return{_label:e,field:t,pattern:n}});{let r=N(()=>n().filter?.field===H(i).field&&String(n().filter.pattern)===String(H(i).pattern));wm(e,{get label(){return H(i)._label},get checked(){return H(r)},onSelect:()=>{t.currentView.update(e=>({...e,filter:{field:H(i).field,pattern:H(i).pattern}}))}})}}),G(e,r)};q(a,e=>{s()?e(o):e(u,-1)}),G(e,i)},$$slots:{default:!0}})}},i=N(()=>a()||Z(`filter`));Ip(e,{variant:`ghost`,get label(){return H(i)},get disabled(){return o()},popupPosition:`bottom-right`,popup:r,$$slots:{popup:!0}})}k(),i()}var Lme=U(`<span role="none" class="svelte-1sd2xgz"> </span>`),Rme=U(`<div role="none" class="wrapper svelte-1sd2xgz"><!> <!></div>`),zme={hash:`svelte-1sd2xgz`,code:`.wrapper.svelte-1sd2xgz {display:flex;align-items:center;gap:4px;margin-inline:20px;}span.svelte-1sd2xgz {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}`};function R4(e,t){O(t,!0),J(e,zme);let n=()=>j(t.selectedItems,`$selectedItems`,r),[r,i]=sa(),a=N(()=>t.allItems.length),o=N(()=>n().length),s=N(()=>!!H(o)),c=N(()=>H(s)&&H(o)===H(a));var l=Rme(),u=I(l);{let e=N(()=>!H(a)),n=N(()=>Z(`select_all`)),r=N(()=>H(s)&&!H(c)?`mixed`:H(s));Jp(u,{get disabled(){return H(e)},get"aria-label"(){return H(n)},get checked(){return H(r)},onChange:()=>{t.selectedItems.set(H(c)?[]:[...t.allItems])}})}var d=z(u,2),f=e=>{var t=Lme(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`x_of_x_selected`,{values:{total:H(a),selected:H(o)}})]),G(e,t)};q(d,e=>{H(s)&&e(f)}),D(l),G(e,l),k(),i()}var z4=e=>rH(e,`filters`),B4=(e,t,n)=>{let{name:r,view_filters:i=[],_i18n:{defaultLocale:a}}=t,{options:o}=z4(i),s=n.filter(({field:e,pattern:t})=>e!==void 0&&t!==void 0&&o.some(n=>n.field===e&&String(n.pattern)===String(t))).map(({field:e,pattern:t})=>({field:e,pattern:t,regex:uB(t)}));return e.filter(e=>s.every(({field:t,pattern:n,regex:i})=>{let o={entry:e,locale:a,collectionName:r,key:t},s=tV({...o,resolveRef:!1}),c=tV({...o});return s===void 0||c===void 0?!1:iY(s,n,i)||iY(c,n,i)}))},Bme=(e,t)=>{if(!e||!(`folder`in e)){t([]);return}let{options:n,default:r}=z4(e.view_filters);t(n),W4.update(e=>({...e,filters:e.filters??(r?[r]:void 0)}))},Vme=ra([PL],([e],t)=>{Bme(e,t)}),V4=e=>rH(e,`groups`),Hme=e=>{if(!e||!(`folder`in e))return;let t=Tpe(e);if(!t)return;let n=V4(e.view_groups).options.find(e=>e.name===t);return n?{field:n.field,pattern:n.pattern}:void 0},Ume=(e,t,n)=>{let{field:r,pattern:i}=n??{field:``,pattern:void 0};if(!r)return e.length?[{name:`*`,entries:e}]:[];let{name:a,_i18n:{defaultLocale:o}}=t,s=A(W4).sort,c=rY(e,i,e=>tV({entry:e,locale:o,collectionName:a,key:r}),Z(`other`)).map(([e,t])=>({name:e,entries:t}));return s?.key===r&&s.order===`descending`&&c.reverse(),c},Wme=(e,t)=>{if(!e||!(`folder`in e)){t([]);return}let{options:n,default:r}=V4(e.view_groups);t(n),W4.update(e=>({...e,group:e.group===void 0?r:e.group}))},Gme=ra([PL],([e],t)=>{Wme(e,t)}),H4=na(),Kme=async({repository:e})=>{await oY(e,`contents-view`,H4),W4.subscribe(e=>{let{name:t}=A(PL)??{},n=A(H4)?.[t??``]??{};t&&!(0,HH.default)(e,n)&&H4.update(n=>({...n,[t]:e}))})},qme=e=>{let t=e,n=!0;for(;n;){let e=t;t=t.replaceAll(/([_*`~])([^_*`~]+)\1/g,`$2`),t=t.replaceAll(/([_*`~]{2,})(.+?)\1/g,`$2`),n=t!==e}return t},Jme=[`title`,`summary`,`description`],Yme=({key:e,type:t,collection:n,locale:r,collectionName:i,dateFieldConfig:a,isMarkdownField:o})=>e===`_summary`?e=>lV(n,e,{locale:r,useTemplate:!0}):a?t=>{let n=tV({entry:t,locale:r,collectionName:i,key:e});return n?Number(gR(n,a)??0):0}:t===String?t=>{let n=tV({entry:t,locale:r,collectionName:i,key:e}),a=n?String(n):``;return o?qme(a):a}:t=>{let n=tV({entry:t,locale:r,collectionName:i,key:e});return Number(n??0)},U4=(e,t,{key:n,order:r}={})=>{let i=[...e];if(n===void 0)return i;let{name:a,_i18n:{defaultLocale:o}}=t,s=d4(t),c=n===`_manual`?s??n:n,l=YB({collectionName:a,keyPath:c}),u=n===`_manual`||c===s?Number:the({key:n,fieldConfig:l}),d=l?.widget===`datetime`?l:void 0,f=Yme({key:c,type:u,collection:t,locale:o,collectionName:a,dateFieldConfig:d,isMarkdownField:l?.widget===`richtext`||l?.widget===`markdown`||Jme.includes(n)}),p=Object.fromEntries(i.map(e=>[e.slug,f(e)]));aY(i,e=>p[e.slug],!d&&u===String,r);let m=pL(t)?.name;if(m){let e=i.findIndex(e=>e.slug===m);e>-1&&i.unshift(i.splice(e,1)[0])}return i},W4=na({type:`list`}),G4=na(!1),K4=na([]),q4=na(!1),J4,Y4=ra([JL,PL,rX,G4],([e,t,n,r],i)=>{if(!e||!t){i([]);return}let a=pB(t.name);if(r){i(a);return}i(uX(a,n.filter(({workflow:e})=>e.collectionName===t.name)))}),X4=ra([rX,Y4,PL,W4,G4,NZ],([e,t,n,r,i])=>{if(n?._type!==`entry`||i)return[];let a=new Set(t),o=e.filter(e=>e.workflow.collectionName===n.name&&!a.has(e));return o.length?(r.sort&&(o=U4(o,n,r.sort)),r.filters&&(o=B4(o,n,r.filters)),o):[]}),Z4=ra([Y4],([e])=>new Map(e.map((e,t)=>[e.id,t]))),Xme=5,Q4=ra([Y4,PL,SG],([e,t,n])=>{if(t?._type===`entry`){let r=t.create??!0,i=t.delete??!0,a=!!t.reorder&&!n,o=t?.limit??1/0,s=o<1/0?o-e.length:1/0;return{isEntryCollection:!0,canCreate:r,canDelete:i,canReorder:a,quota:o,remaining:s,nearingQuota:s>0&&s<=Xme,creationDisabled:!r||s<=0}}return{isEntryCollection:!1,canCreate:!1,canDelete:!1,canReorder:!1,quota:1/0,remaining:1/0,nearingQuota:!1,creationDisabled:!1}}),$4=void 0,e3=void 0,t3=ra([Y4,W4,NZ],([e,t],n)=>{if(e===$4&&t===e3)return;$4=e,e3=t;let r=A(PL),i=[...e];if(!i.length||ZI(r,i[0]).length){n([]);return}t.sort&&(i=U4(i,r,t.sort)),t.filters&&(i=B4(i,r,t.filters)),n(Ume(i,r,t.group))});G4.subscribe(e=>{if(!e){K4.set([]),q4.set(!1),J4&&=(W4.set(J4),void 0);return}let t=A(W4),n=Hme(A(PL));J4=t;let r={};t.sort?.key!==`_manual`&&(r.sort={key:`_manual`,order:`ascending`}),t.filters?.length&&(r.filters=[]),n?(t.group?.field!==n.field||t.group?.pattern!==n.pattern)&&(r.group=n):t.group&&(r.group=null),Object.keys(r).length&&W4.set({...t,...r})}),nY.subscribe(e=>{e&&!A(H4)&&Kme(e)}),Y4.subscribe(e=>{dB.set([]),KH.devModeEnabled&&console.info(`listedEntries`,e)}),PL.subscribe(e=>{J4=void 0,G4.set(!1),e&&KH.devModeEnabled&&console.info(`selectedCollection`,e)});var n3=[`title`,`name`,`date`,`author`,`description`],Zme=[`ascending`,`descending`],Qme=[`date`,`commit_date`],r3={slug:String,commit_author:String,commit_date:Date,_summary:String,_manual:String},i3=Object.keys(r3),$me=e=>e?{keys:[e,...n3.filter(t=>t!==e)],defaultKey:e}:{keys:[...n3]},ehe=({collection:e,isCommitAuthorAvailable:t,isCommitDateAvailable:n})=>{let{name:r,identifier_field:i,sortable_fields:a,summary:o}=e,{keys:s,defaultKey:c,defaultOrder:l}=a?aH(a):$me(i);o&&s.unshift(`_summary`);let u=s.includes(`commit_author`),d=s.includes(`commit_date`);t?!s.includes(`author`)&&!u&&s.push(`commit_author`):u&&(s=s.filter(e=>e!==`commit_author`)),n?!s.includes(`date`)&&!d&&s.push(`commit_date`):d&&(s=s.filter(e=>e!==`commit_date`)),s=Ij(s).filter(e=>!!e&&(i3.includes(e)||!!YB({collectionName:r,keyPath:e})));let f=d4(e);return f&&(s=s.filter(e=>e!==f),s.includes(`_manual`)||s.unshift(`_manual`),c=`_manual`,l=`ascending`),c=c&&s.includes(c)?c:s[0],l??=c?`ascending`:void 0,{keys:s,default:{key:c,order:l}}},the=({key:e,fieldConfig:t})=>{if(e in r3)return r3[e];if(t?.widget===`boolean`)return Boolean;if(t?.widget===`number`){let{value_type:e=`int`}=t;if(e===`int`||e===`float`)return Number}return String},nhe=({collection:e,key:t})=>[...i3,`name`].includes(t)?Z(`sort_keys.${t}`):t.includes(`.`)?t.split(`.`).map((t,n,r)=>{if(HB(t))return;let i=r.slice(0,n+1).join(`.`);return YB({collectionName:e.name,keyPath:i})?.label||t}).filter(Boolean).join(` – `):e.fields?.find(({name:e})=>e===t)?.label||t,rhe=ra([PL,JL,NZ],([e,t],n)=>{if(!e||!(`folder`in e)){n([]);return}let r=A(H4)?.[e.name]??{type:`list`},{keys:i,default:a}=ehe({collection:e,isCommitAuthorAvailable:t.some(e=>!!e.commitAuthor),isCommitDateAvailable:t.some(e=>!!e.commitDate)});r.sort??=a,n(i.map(t=>({key:t,label:nhe({collection:e,key:t})}))),(0,HH.default)(r,A(W4))||W4.set(r)}),ihe=U(`<!> <!>`,1);function a3(e,t){O(t,!0);let n=()=>j(t.currentView,`$currentView`,r),[r,i]=sa(),a=X(t,`label`,3,``),o=X(t,`disabled`,3,!1),s=X(t,`sortKeys`,19,()=>[]),c=X(t,`collectionName`,3,void 0);{let r=e=>{{let r=N(()=>Z(`sorting_options`));xm(e,{get"aria-label"(){return H(r)},get"aria-controls"(){return t[`aria-controls`]},children:(e,r)=>{var i=W();Cc(L(i),17,s,({key:e,label:t})=>e,(e,r)=>{let i=()=>H(r).key,a=()=>H(r).label;var o=ihe(),l=L(o);Cc(l,16,()=>Zme,e=>e,(e,r)=>{{let o=N(()=>Z(Qme.includes(i())||c()&&YB({collectionName:c(),keyPath:i()})?.widget===`datetime`?`${r}_date`:r,{values:{label:a()}})),s=N(()=>n().sort?.key===i()&&n().sort.order===r);wm(e,{get label(){return H(o)},get checked(){return H(s)},onSelect:()=>{t.currentView.update(e=>({...e,sort:{key:i(),order:r}}))}})}});var u=z(l,2),d=e=>{Hp(e,{})};q(u,e=>{i()===`_summary`&&s().length>1&&e(d)}),G(e,o)}),G(e,i)},$$slots:{default:!0}})}},i=N(()=>a()||Z(`sort`));Ip(e,{variant:`ghost`,get label(){return H(i)},get disabled(){return o()},popupPosition:`bottom-right`,popup:r,$$slots:{popup:!0}})}k(),i()}var ahe=new Set([`$$slots`,`$$events`,`$$legacy`,`disabled`,`currentView`]),ohe=U(`<!> <!>`,1),she=U(`<div role="none" class="wrapper svelte-8v3idr"><!></div>`),che={hash:`svelte-8v3idr`,code:`.wrapper.svelte-8v3idr {display:contents;.select-button-group button {border-radius:var(--sui-button-medium-border-radius) !important;}}`};function o3(e,t){O(t,!0),J(e,che);let n=()=>j(t.currentView,`$currentView`,r),[r,i]=sa(),a=X(t,`disabled`,3,!1),o=Al(t,ahe),s=N(()=>n().type===`grid`);var c=she(),l=I(c),u=e=>{{let n=N(()=>Z(`switch_view`));jp(e,Ml({get disabled(){return a()},get"aria-label"(){return H(n)}},()=>o,{children:(e,n)=>{var r=ohe(),i=L(r);{let e=e=>{Rl(e,{name:`format_list_bulleted`})},n=N(()=>!H(s)),r=N(()=>Z(`list_view`));Np(i,{get disabled(){return a()},get selected(){return H(n)},variant:`ghost`,iconic:!0,get"aria-label"(){return H(r)},onSelect:()=>{t.currentView.update(e=>({...e,type:`list`}))},startIcon:e,$$slots:{startIcon:!0}})}var o=z(i,2);{let e=e=>{Rl(e,{name:`grid_view`})},n=N(()=>Z(`grid_view`));Np(o,{get disabled(){return a()},get selected(){return H(s)},variant:`ghost`,iconic:!0,get"aria-label"(){return H(n)},onSelect:()=>{t.currentView.update(e=>({...e,type:`grid`}))},startIcon:e,$$slots:{startIcon:!0}})}G(e,r)},$$slots:{default:!0}}))}},d=e=>{{let n=e=>{{let t=N(()=>H(s)?`format_list_bulleted`:`grid_view`);Rl(e,{get name(){return H(t)}})}},r=N(()=>Z(H(s)?`switch_to_list_view`:`switch_to_grid_view`));$f(e,{get disabled(){return a()},variant:`ghost`,iconic:!0,get"aria-label"(){return H(r)},onclick:()=>{t.currentView.update(e=>({...e,type:H(s)?`list`:`grid`}))},startIcon:n,$$slots:{startIcon:!0}})}};q(l,e=>{zV.isLargeScreen?e(u):e(d,-1)}),D(c),G(e,c),k(),i()}var lhe=ra([dU,NZ],([e],t)=>{let n=[`name`];e.every(e=>!!e.commitAuthor)&&n.push(`commit_author`),e.every(e=>!!e.commitDate)&&n.push(`commit_date`),t(n.map(e=>({key:e,label:Z(`sort_keys.${e}`)})))}),uhe=U(`<!> <!>`,1),dhe=U(`<!> <!> <!> <!> <!> <!>`,1);function fhe(e,t){O(t,!0);let n=()=>j(yY,`$listedAssets`,o),r=()=>j(xY,`$assetGroups`,o),i=()=>j(lhe,`$sortKeys`,o),a=()=>j(vY,`$currentView`,o),[o,s]=sa(),c=N(()=>!!n().length),l=N(()=>n().length>1);{let t=N(()=>Z(`asset_list`));Mj(e,{variant:`secondary`,get"aria-label"(){return H(t)},children:(e,t)=>{var n=dhe(),o=L(n),s=e=>{{let t=N(()=>Object.values(r()).flat(1));R4(e,{get allItems(){return H(t)},get selectedItems(){return _U}})}};q(o,e=>{zV.isSmallScreen||zV.isMediumScreen||e(s)});var u=z(o,2);Wp(u,{flex:!0});var d=z(u,2);{let e=N(()=>!H(l));a3(d,{get disabled(){return H(e)},get currentView(){return vY},get sortKeys(){return i()},"aria-controls":`asset-list`})}var f=z(d,2);{let e=N(()=>Z(`type`)),t=N(()=>!H(l)),n=N(()=>Z(`all`)),r=N(()=>Yoe.map(e=>({label:Z(e),field:`fileType`,pattern:e})));L4(f,{get label(){return H(e)},get disabled(){return H(t)},get currentView(){return vY},get noneLabel(){return H(n)},get filters(){return H(r)},"aria-controls":`asset-list`})}var p=z(f,2);{let e=N(()=>!H(c));o3(p,{get disabled(){return H(e)},get currentView(){return vY},"aria-controls":`asset-list`})}var m=z(p,2),h=e=>{var t=uhe(),n=L(t);Hp(n,{orientation:`vertical`});var r=z(n,2);{let e=e=>{Rl(e,{name:`info`})},t=N(()=>!H(c)),n=N(()=>!!a().showInfo),i=N(()=>!!a().showInfo),o=N(()=>Z(a().showInfo?`hide_info`:`show_info`));$f(r,{variant:`ghost`,iconic:!0,get disabled(){return H(t)},get pressed(){return H(n)},"aria-controls":`asset-info`,get"aria-expanded"(){return H(i)},get"aria-label"(){return H(o)},onclick:()=>{vY.update(e=>({...e,showInfo:!a().showInfo}))},startIcon:e,$$slots:{startIcon:!0}})}G(e,t)};q(m,e=>{zV.isSmallScreen||zV.isMediumScreen||e(h)}),G(e,n)},$$slots:{default:!0}})}k(),s()}var phe=new Set([`$$slots`,`$$events`,`$$legacy`,`primaryToolbar`,`secondaryToolbar`,`mainContent`,`secondarySidebar`]),mhe=U(`<div><!> <div role="none" class="main-inner svelte-1x2ldab"><div role="none" class="main-inner-main svelte-1x2ldab"><!> <!></div> <!></div></div>`),hhe={hash:`svelte-1x2ldab`,code:`.wrapper.svelte-1x2ldab {flex:auto;display:flex;flex-direction:column;overflow:hidden;height:100%;background-color:var(--sui-primary-background-color);
|
||
|
||
@media (768px <= width) {view-transition-name:page-main;
|
||
}.sui.toolbar.primary {justify-content:center;
|
||
|
||
@media (width < 768px) {background-color:var(--sui-secondary-background-color);
|
||
}}}.resizable-pane > .wrapper.svelte-1x2ldab {border-start-start-radius:16px;}.main-inner.svelte-1x2ldab {flex:auto;display:flex;overflow:hidden;.main-inner-main:where(.svelte-1x2ldab) {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.secondary-sidebar {flex:none;overflow:auto;box-sizing:content-box;width:320px;background-color:var(--sui-secondary-background-color);
|
||
|
||
@media (768px <= width) {border-start-start-radius:16px;
|
||
}[role='listbox'] {padding:12px;}}}`};function s3(e,t){J(e,hhe);let n=X(t,`primaryToolbar`,3,void 0),r=X(t,`secondaryToolbar`,3,void 0),i=X(t,`mainContent`,3,void 0),a=X(t,`secondarySidebar`,3,void 0),o=Al(t,phe);var s=mhe();bl(s,()=>({role:`group`,class:`wrapper`,...o}),void 0,void 0,void 0,`svelte-1x2ldab`);var c=I(s);Ac(c,()=>n()??br);var l=z(c,2),u=I(l),d=I(u);Ac(d,()=>r()??br),Ac(z(d,2),()=>i()??br),D(u),Ac(z(u,2),()=>a()??br),D(l),D(s),G(e,s)}var ghe=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`uiSettingsKey`,`primarySidebar`,`main`]),_he=U(`<!> <!>`,1),vhe=U(`<!> <!> <!>`,1),yhe=U(`<div><!></div>`),bhe={hash:`svelte-1kkfo1f`,code:`.outer.svelte-1kkfo1f {flex:auto;display:flex;overflow:hidden;&[inert] {display:none;}.primary-sidebar {display:flex;flex-direction:column;flex:none;overflow-y:auto;height:100%;
|
||
|
||
@media (width < 768px) {flex:auto;width:auto;background-color:var(--sui-primary-background-color);
|
||
}
|
||
|
||
/* Mobile header */header {display:flex;align-items:center;justify-content:space-between;padding:0 10px;height:var(--sui-primary-toolbar-size);h2 {padding:0 10px;font-size:var(--sui-font-size-x-large);}}.sui.search-bar {margin-inline:12px;--sui-textbox-background-color: var(--sui-tertiary-background-color);}[role='radiogroup'] {width:100%;}[role='listbox'] {margin:8px;border-width:0;background-color:transparent;button {display:flex;justify-content:flex-start;border-radius:var(--sui-control-medium-border-radius);width:100%;text-align:start;
|
||
|
||
@media (pointer: coarse) {height:48px;
|
||
}&:not(:first-child) {margin-top:4px;}&:not(:focus) {border-color:transparent;}span {flex:none;}.label {flex:auto;overflow:hidden;}.icon {transition:color 200ms;}.icon.check {display:none;}.count {padding:2px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);transition:color 200ms;}}[role='option'][aria-selected='true'] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);.count {color:var(--sui-highlighted-foreground-color);}}[role='option'].dragover {color:var(--sui-primary-accent-color-inverted) !important;background-color:var(--sui-primary-accent-color) !important;}}.sui.divider {margin:8px 0;}}}`};function c3(e,t){O(t,!0),J(e,bhe);let n=()=>j(jY,`$hasOverlay`,r),[r,i]=sa(),a=X(t,`class`,3,``),o=X(t,`uiSettingsKey`,3,void 0),s=X(t,`primarySidebar`,3,void 0),c=X(t,`main`,3,void 0),l=Al(t,ghe),u=P(void 0),d=P(void 0),f=null,p=async()=>{if(!o())return;let{databaseName:e}=A(nY)?.repository??{};f=e?new UA(e,`ui-settings`):null,F(d,(await f?.get(o()))?.sidebarWidth??240,!0)},m=async e=>{!f||!o()||!H(u)||await f.set(o(),{...await f.get(o()),sidebarWidth:Math.round(H(u).clientWidth*(e/100))})};Ao(()=>{n(),window.requestAnimationFrame(()=>{n()||p()})});var h=yhe();bl(h,()=>({role:`group`,id:`page-container`,class:`outer ${a()??``}`,inert:n(),...l}),void 0,void 0,void 0,`svelte-1kkfo1f`);var g=I(h),_=e=>{var t=_he(),n=L(t);Ac(n,()=>s()??br),Ac(z(n,2),()=>c()??br),G(e,t)},v=e=>{Om(e,{onResize:({sizes:e})=>{m(e[0])},children:(e,t)=>{var n=vhe(),r=L(n);km(r,{get defaultSize(){return`${H(d)??``}px`},minSize:`160px`,maxSize:`480px`,children:(e,t)=>{var n=W();Ac(L(n),s),G(e,n)},$$slots:{default:!0}});var i=z(r,2);Dm(i,{}),km(z(i,2),{children:(e,t)=>{var n=W();Ac(L(n),c),G(e,n)},$$slots:{default:!0}}),G(e,n)},$$slots:{default:!0}})};q(g,e=>{zV.isSmallScreen||!s()||!c()?e(_):H(d)!==void 0&&e(v,1)}),D(h),Ol(h,e=>F(u,e),()=>H(u)),G(e,h),k(),i()}var l3=U(`<bdi> </bdi>`),xhe=U(`<div role="none" class="label"><!></div>`),She=U(`<!> <!> <!>`,1);function Che(e,t){O(t,!0);let n=N(()=>t.asset.path),r=N(()=>t.asset.name),i=N(()=>t.asset.folder),a=N(()=>t.asset.kind);_m(e,{onclick:()=>{BY(`/assets/${H(n)}`,{transitionType:`forwards`})},children:(e,n)=>{var o=She(),s=L(o);gm(s,{class:`image`,children:(e,n)=>{NQ(e,{get kind(){return H(a)},get asset(){return t.asset},variant:`icon`,cover:!0})},$$slots:{default:!0}});var c=z(s,2);gm(c,{class:`collection`,children:(e,t)=>{var n=W();_c(L(n),()=>Ud.current,e=>{var t=l3(),n=R(t,!0);V(e=>K(n,e),[()=>gY(H(i))]),G(e,t)}),G(e,n)},$$slots:{default:!0}}),gm(z(c,2),{class:`title`,children:(e,t)=>{var n=xhe();_f(I(n),{lines:2,children:(e,t)=>{var n=l3(),i=R(n,!0);V(()=>K(i,H(r))),G(e,n)},$$slots:{default:!0}}),D(n),G(e,n)},$$slots:{default:!0}}),G(e,o)},$$slots:{default:!0}}),k()}var u3=e=>(e=e.trim(),e?e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLocaleLowerCase():``),whe=(e,t=void 0)=>{if(!t)return u3(e);let n=t.get(e);if(n!==void 0)return n;let r=u3(e);return t.set(e,r),r},d3=({value:e,terms:t,normalizedValueCache:n=void 0})=>whe(e,n).includes(t),The=({assets:e,terms:t})=>{if(t=u3(t),!e.length||!t)return[];let n=new Map;return e.filter(e=>d3({value:e.name,terms:t,normalizedValueCache:n}))},Ehe=ra([fU,F4],([e,t])=>The({assets:e,terms:t})),Dhe=U(`<span role="none"> </span>`),Ohe=U(`<div role="none"><!></div>`);function khe(e,t){O(t,!0);let n=()=>j(F4,`$searchTerms`,i),r=()=>j(Ehe,`$assetSearchResults`,i),[i,a]=sa();B(()=>{M(NY,Z(`viewing_asset_search_results`,{values:{terms:n(),count:r().length}}))}),Bj(e,{"aria-labelledby":`search-results-assets`,children:(e,t)=>{var i=Ohe(),a=I(i),o=e=>{{let t=N(()=>Z(`assets`));N4(e,{viewType:`list`,get"aria-label"(){return H(t)},get"aria-rowcount"(){return r().length},children:(e,t)=>{var i=W();_c(L(i),n,e=>{Am(e,{get items(){return r()},itemKey:`path`,renderItem:(e,t=br)=>{var n=W();hc(L(n),vf,null,e=>{Che(e,{get asset(){return t()}})}),G(e,n)},$$slots:{renderItem:!0}})}),G(e,i)},$$slots:{default:!0}})}},s=e=>{zj(e,{children:(e,t)=>{var n=Dhe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_files_found`)]),G(e,n)},$$slots:{default:!0}})};q(a,e=>{r().length?e(o):n()&&e(s,1)}),D(i),G(e,i)},$$slots:{default:!0}}),k(),a()}var Ahe=U(`<bdi> </bdi>`),jhe=U(`<bdi><!></bdi>`),Mhe=U(`<div role="none" class="label"><!></div>`),Nhe=U(`<!> <!> <!>`,1);function Phe(e,t){O(t,!0);let n=(e,t)=>{let n=()=>(t?.()).collection,c=()=>(t?.()).collectionFile,l=N(()=>(c()??n())._i18n??ML),u=N(()=>H(o)[H(l).defaultLocale]??Object.values(H(o))[0]??{});var d=W(),f=L(d),p=e=>{_m(e,{onclick:()=>{BY(`/collections/${n().name}/entries/${c()?.name||H(s)}`,{state:{highlight:{locale:H(i),keyPath:H(a)}},transitionType:`forwards`})},children:(e,t)=>{var i=Nhe(),a=L(i);gm(a,{class:`image`,children:(e,t)=>{var i=W(),a=L(i),o=e=>{var t=W();hc(L(t),()=>V2(n(),H(r)),null,(e,t)=>{var n=W(),r=L(n),i=e=>{O4(e,{get src(){return H(t)},variant:`icon`,cover:!0})};q(r,e=>{H(t)&&e(i)}),G(e,n)}),G(e,t)};q(a,e=>{n()._type===`entry`&&e(o)}),G(e,i)},$$slots:{default:!0}});var o=z(a,2);gm(o,{class:`collection`,children:(e,t)=>{var r=W();_c(L(r),()=>Ud.current,e=>{var t=Ahe(),r=R(t,!0);V(e=>K(r,e),[()=>UL(n())]),G(e,t)}),G(e,r)},$$slots:{default:!0}}),gm(z(o,2),{class:`title`,children:(e,t)=>{var i=Mhe();_f(I(i),{lines:2,children:(e,t)=>{var i=jhe(),a=I(i),o=e=>{var t=ec();V(e=>K(t,e),[()=>XI(c())]),G(e,t)},s=e=>{var t=W();_c(L(t),()=>Ud.current,e=>{var t=W();kc(L(t),()=>lV(n(),H(r),{useTemplate:!0,allowMarkdown:!0})),G(e,t)}),G(e,t)};q(a,e=>{c()?e(o):e(s,-1)}),D(i),G(e,i)},$$slots:{default:!0}}),D(i),G(e,i)},$$slots:{default:!0}}),G(e,i)},$$slots:{default:!0}})};q(f,e=>{H(u).content&&e(p)}),G(e,d)},r=N(()=>t.result.entry),i=N(()=>t.result.locale),a=N(()=>t.result.keyPath),o=N(()=>H(r).locales),s=N(()=>H(r).subPath);var c=W();Cc(L(c),17,()=>cB(H(r)),e=>e.name,(e,t)=>{var i=W();hc(L(i),vf,null,e=>{var i=W();Cc(L(i),17,()=>ZI(H(t),H(r)),e=>e.name,(e,r)=>{var i=W();hc(L(i),vf,null,e=>{n(e,()=>({collection:H(t),collectionFile:H(r)}))}),G(e,i)},e=>{n(e,()=>({collection:H(t)}))}),G(e,i)}),G(e,i)}),G(e,c),k()}var Fhe=({entry:e,terms:t,normalizedValueCache:n=void 0})=>{let r=0,i,a,o=cB(e);if(o.length){o.forEach(i=>{d3({value:i.label||i.name,terms:t,normalizedValueCache:n})&&(r+=10),r+=ZI(i,e).filter(e=>d3({value:e.label||e.name,terms:t,normalizedValueCache:n})).length});let[i]=o;d3({value:lV(i,e,{useTemplate:!0,allowMarkdown:!0}),terms:t,normalizedValueCache:n})&&(r+=10)}return Object.entries(e.locales).forEach(([e,{content:o}])=>{r+=Object.entries(o).filter(([r,o])=>{let s=typeof o==`string`&&!!o&&d3({value:o,terms:t,normalizedValueCache:n})||typeof o==`number`&&d3({value:String(o),terms:t,normalizedValueCache:n});return s&&!i&&!a&&(i=e,a=r),s}).length}),{entry:e,points:r,locale:i,keyPath:a}},Ihe=({entries:e,terms:t})=>{if(t=u3(t),!e.length||!t)return[];let n=new Map;return e.map(e=>Fhe({entry:e,terms:t,normalizedValueCache:n})).filter(({points:e})=>e>0).sort((e,t)=>t.points-e.points)},Lhe=ra([JL,rX,F4,NZ],([e,t,n])=>Ihe({entries:dX(e,t),terms:n})),Rhe=U(`<span role="none"> </span>`),zhe=U(`<div role="none"><!></div>`);function Bhe(e,t){O(t,!0);let n=()=>j(F4,`$searchTerms`,i),r=()=>j(Lhe,`$entrySearchResults`,i),[i,a]=sa();B(()=>{M(NY,Z(`viewing_entry_search_results`,{values:{terms:n(),count:r().length}}))}),Bj(e,{"aria-labelledby":`search-results-entries`,children:(e,t)=>{var i=zhe(),a=I(i),o=e=>{{let t=N(()=>Z(`entries`));N4(e,{viewType:`list`,get"aria-label"(){return H(t)},get"aria-rowcount"(){return r().length},children:(e,t)=>{var i=W();_c(L(i),n,e=>{Am(e,{get items(){return r()},itemKey:`id`,renderItem:(e,t=br)=>{var n=W();hc(L(n),vf,null,e=>{Phe(e,{get result(){return t()}})}),G(e,n)},$$slots:{renderItem:!0}})}),G(e,i)},$$slots:{default:!0}})}},s=e=>{zj(e,{children:(e,t)=>{var n=Rhe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_entries_found`)]),G(e,n)},$$slots:{default:!0}})};q(a,e=>{r().length?e(o):n()&&e(s,1)}),D(i),G(e,i)},$$slots:{default:!0}}),k(),a()}var Vhe=U(`<h2 role="none"> </h2>`),Hhe=U(`<div role="none" class="wrapper svelte-1p7vfqa"><!> <div role="none" class="results svelte-1p7vfqa"><!> <!></div></div>`),Uhe={hash:`svelte-1p7vfqa`,code:`.wrapper.svelte-1p7vfqa {flex:auto;display:flex;flex-direction:column;overflow:hidden;width:100%;background-color:var(--sui-primary-background-color);}.results.svelte-1p7vfqa {flex:auto;overflow:auto;& > .sui.group {display:contents;& > .inner > div {display:contents;}}h3 {flex:none;margin:16px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-large);& + div {overflow:auto;flex:auto;}
|
||
|
||
@media (width < 768px) {display:none;
|
||
}}}`};function Whe(e,t){O(t,!0),J(e,Uhe);let n=()=>j(P4,`$searchMode`,r),[r,i]=sa();var a=Hhe(),o=I(a),s=e=>{Mj(e,{variant:`primary`,children:(e,t)=>{var n=Vhe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`search_results`)]),G(e,n)},$$slots:{default:!0}})};q(o,e=>{zV.isSmallScreen||e(s)});var c=z(o,2),l=I(c),u=e=>{Bhe(e,{})};q(l,e=>{n()===`contents`&&e(u)});var d=z(l,2),f=e=>{khe(e,{})};q(d,e=>{n()===`assets`&&e(f)}),D(c),D(a),G(e,a),k(),i()}var Ghe=U(`<!> <div role="search" class="svelte-1476at1"><!></div>`,1),Khe={hash:`svelte-1476at1`,code:`[role='search'].svelte-1476at1 {display:contents;.sui.search-bar {flex:auto;}}`};function f3(e,t){O(t,!0),J(e,Khe);let n=()=>j(P4,`$searchMode`,r),[r,i]=sa();s3(e,{primaryToolbar:e=>{var t=W(),r=L(t),i=e=>{Mj(e,{variant:`primary`,children:(e,t)=>{var r=Ghe(),i=L(r);{let e=N(()=>Z(n()===`assets`?`back_to_asset_folder_list`:`back_to_collection_list`));xQ(i,{get"aria-label"(){return H(e)},onclick:()=>{M(F4,``),BY(n()===`assets`?`/assets`:`/collections`,{transitionType:`backwards`})}})}var a=z(i,2);I4(I(a),{}),D(a),G(e,r)},$$slots:{default:!0}})};q(r,e=>{zV.isSmallScreen&&e(i)}),G(e,t)},mainContent:e=>{Whe(e,{})},$$slots:{primaryToolbar:!0,mainContent:!0}}),k(),i()}var qhe=/^\/search\/(?<terms>.+)$/,p3=e=>{let{groups:t}=e.match(qhe)??{};if(!t)return!1;let{terms:n}=t;return n&&n!==A(F4)&&F4.set(n),A(P4)||P4.set(`contents`),!0},Jhe=U(`<!> <!> <!> <!>`,1);function m3(e,t){O(t,!0);let n=()=>j(dM,`$selectedAssetFolder`,c),r=()=>j(pY,`$showAssetOverlay`,c),i=()=>j(lM,`$allAssetFolders`,c),a=()=>j(yY,`$listedAssets`,c),o=()=>j(bU,`$overlaidAsset`,c),s=()=>j(dU,`$allAssets`,c),[c,l]=sa(),u=/^\/assets(?:\/(?<folderPath>.+?)(?:\/(?<fileName>[^/]+\.[A-Za-z0-9]+))?)?$/,d=P(!1),f=P(!1),p=P(!1),m=N(()=>Ud.current&&n()?gY(n()):``),h=async()=>{let{path:e}=PY(),t=e.match(u);if(F(d,!1),F(f,!1),F(p,!1),!t?.groups){M(pY,!1),F(f,p3(e),!0);return}let{folderPath:r,fileName:c}=t.groups;if(!r){zV.isSmallScreen?(M(dM,void 0),M(pY,!1),M(NY,Z(`viewing_asset_folder_list`)),F(d,!0)):BY(`/assets/-/all`);return}let l=window.history.state?.folder??i().find(({internalPath:e,collectionName:t})=>r===`-/all`?e===void 0&&t===void 0:e===r);if(!l&&!c){M(dM,void 0),M(pY,!1),M(NY,Z(`asset_folder_not_found`)),F(p,!0);return}if(l?(0,HH.default)(n(),l)||M(dM,l):M(dM,void 0),!c){await vf(100),M(pY,!1),M(NY,Z(`viewing_x_asset_folder`,{values:{folder:H(m),count:a().length}}));return}M(bU,c?s().find(e=>e.path===`${r}/${c}`):void 0),M(NY,o()?Z(`viewing_x_asset_details`,{values:{name:o().name}}):Z(`file_not_found`)),M(pY,!0)};Nl(()=>(h(),()=>{M(pY,!1)}));var g=Jhe();Ws(`hashchange`,co,e=>{zY(e,h,u)});var _=L(g);{let e=e=>{var t=W(),n=L(t),r=e=>{Dme(e,{get isSearchPage(){return H(f)}})};q(n,e=>{(!zV.isSmallScreen||H(d))&&e(r)}),G(e,t)},t=e=>{var t=W(),n=L(t),r=e=>{f3(e,{})},i=e=>{{let t=e=>{{let t=N(()=>Z(`asset_folder_not_found`));zQ(e,{get message(){return H(t)},backPath:`/assets`})}},n=N(()=>Z(`asset_library`));s3(e,{get"aria-label"(){return H(n)},mainContent:t,$$slots:{mainContent:!0}})}},o=e=>{{let t=e=>{Nme(e,{})},n=e=>{var t=W(),n=L(t),r=e=>{fhe(e,{})};q(n,e=>{a().length&&e(r)}),G(e,t)},r=e=>{yme(e,{})},i=e=>{Fme(e,{})},o=N(()=>Z(`x_asset_folder`,{values:{folder:H(m)}}));s3(e,{id:`assets-container`,get"aria-label"(){return H(o)},primaryToolbar:t,secondaryToolbar:n,mainContent:r,secondarySidebar:i,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};q(n,e=>{H(f)?e(r):H(p)?e(i,1):(!zV.isSmallScreen||!H(d))&&e(o,2)}),G(e,t)},n=N(()=>Z(`asset_library`));c3(_,{uiSettingsKey:`assets-page`,get"aria-label"(){return H(n)},primarySidebar:e,main:t,$$slots:{primarySidebar:!0,main:!0}})}var v=z(_,2),y=e=>{Kde(e,{})};q(v,e=>{r()&&e(y)});var b=z(v,2);Zde(b,{}),Jpe(z(b,2),{}),G(e,g),k(),l()}var Yhe=U(`<iframe id="cloudinary-iframe" allow="camera; storage-access" sandbox="allow-same-origin allow-scripts allow-popups allow-forms
|
||
allow-storage-access-by-user-activation" class="svelte-1y1y5aq"></iframe>`),Xhe={hash:`svelte-1y1y5aq`,code:`iframe.svelte-1y1y5aq {display:block;width:calc(100% - 32px);height:calc(100% - 32px);border:none;}
|
||
|
||
/* Avoid scrolling issue https://github.com/sveltia/sveltia-cms/issues/824 */dialog[inert] > iframe.svelte-1y1y5aq {display:none;}`};function Zhe(e,t){O(t,!0),J(e,Xhe);let n=()=>j(WR,`$dialogOpen`,r),[r,i]=sa(),a=P(``),o=P(``);Nl(()=>{let e=qR(),{cloud_name:t,api_key:n}=(e?e.config:void 0)??{};if(!e||!t||!n)return;F(o,window.crypto.randomUUID(),!0);let r=new URLSearchParams({...Object.fromEntries(Object.entries(e.config??{}).filter(([e])=>ase.includes(e))),ml_id:H(o),pmHost:window.location.origin,new_cms:`true`});F(a,`${GR}/cms?${r}`)});var s=W(),c=L(s),l=e=>{Uf(e,{keepContent:!0,get open(){return ua(),n()},set open(e){M(WR,e)},children:(e,t)=>{var n=Yhe();V(e=>{Y(n,`src`,H(a)),Y(n,`title`,e),Y(n,`data-ml-id`,H(o))},[()=>Z(`cloud_storage.cloudinary.iframe_title`)]),G(e,n)},$$slots:{default:!0}})};q(c,e=>{H(a)&&e(l)}),G(e,s),k(),i()}var Qhe=U(`<!> <!> <!> <!>`,1);function $he(e,t){O(t,!0);let n=()=>j(cQ,`$assetUpdatesToast`,r),[r,i]=sa();var a=Qhe(),o=L(a);Nh(o,{get show(){return n().saved},set show(e){la(cQ,Ds(n).saved=e,Ds(n))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(n().published?`assets_saved_and_published`:`assets_saved`,{values:{count:n().count}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}});var s=z(o,2);Nh(s,{get show(){return n().moved},set show(e){la(cQ,Ds(n).moved=e,Ds(n))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`assets_moved`,{values:{count:n().count}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}});var c=z(s,2);Nh(c,{get show(){return n().renamed},set show(e){la(cQ,Ds(n).renamed=e,Ds(n))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`assets_renamed`,{values:{count:n().count}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(c,2),{get show(){return n().deleted},set show(e){la(cQ,Ds(n).deleted=e,Ds(n))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`assets_deleted`,{values:{count:n().count}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,a),k(),i()}var ege=U(`<div role="status"> </div>`),tge=U(`<div role="group" class="section uploading svelte-96nj3d"><div role="none"><!></div> <!></div>`),nge=U(`<div role="group" class="section oversized svelte-96nj3d"><!> <!></div>`),rge=U(`<div role="group" class="section invalid svelte-96nj3d"><!> <!></div>`),ige=U(`<div role="group" class="section mismatched svelte-96nj3d"><!> <!></div>`),age=U(`<!> <!>`,1),oge=U(`<div role="group" class="section svelte-96nj3d"> <!></div>`),sge=U(`<!> <!> <!> <!> <!> <!>`,1),cge=U(`<!> <!> <!>`,1),lge={hash:`svelte-96nj3d`,code:`.section.svelte-96nj3d {display:flex;flex-direction:column;gap:12px;&:not(:first-child) {margin-top:16px;}& > * {flex:none;}&.oversized .files,
|
||
&.invalid .files,
|
||
&.mismatched .files {opacity:0.5;}}`};function uge(e,t){O(t,!0),J(e,lge);let n=()=>j(xU,`$uploadingAssets`,o),r=()=>j(wU,`$processedAssets`,o),i=()=>j(pY,`$showAssetOverlay`,o),a=()=>j(hY,`$showUploadAssetsConfirmDialog`,o),[o,s]=sa(),c=P(ao([])),l=P(!0),u=P(!1),d=P(!1),f=N(()=>n().files),p=N(()=>n().folder),m=N(()=>n().originalAssets),h=N(()=>H(m)?.[0]),g=N(()=>r().processing),_=N(()=>r().validFiles),v=N(()=>r().oversizedFiles),y=N(()=>r().invalidFiles),b=N(()=>r().transformedFileMap),x=N(()=>oU().config),S=N(()=>H(x).max_file_size),C=N(()=>H(h)||H(p)?.internalPath===void 0?[]:NU(H(p).internalPath)),w=N(()=>PU(H(c),H(C))),T=N(()=>H(w).length),E=N(()=>H(h)?H(_).filter(e=>!Sz(qj(e.name).extension,qj(H(h).name).extension)):[]);B(()=>{F(c,H(_).filter(e=>!H(E).includes(e)),!0),F(l,!0)}),B(()=>{i()||M(xU,{folder:void 0,files:[]})});var ee=cge(),te=L(ee);{let e=N(()=>Z(H(h)?`replace_asset`:`upload_assets`)),t=N(()=>Z(H(h)?`replace`:`upload`)),n=N(()=>!H(c).length);Zp(te,{get open(){return a()},get title(){return H(e)},get okLabel(){return H(t)},get okDisabled(){return H(n)},onOk:async()=>{F(u,!0);try{await VQ(H(h)?{files:H(c),folder:H(p),originalAssets:H(m)}:{files:H(c),folder:H(p),replaceDuplicates:H(l)},{commitType:`uploadMedia`})}catch(e){F(d,!0),console.error(e)}finally{F(u,!1),M(xU,{folder:void 0,files:[]})}},onCancel:()=>{M(xU,{folder:void 0,files:[]})},children:(e,t)=>{var n=sge(),r=L(n),i=e=>{var t=ege(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`processing_files`,{values:{count:H(f).length}})]),G(e,t)};q(r,e=>{H(g)&&e(i)});var a=z(r,2),o=e=>{var t=tge(),n=I(t),r=I(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`confirm_replacing_file`,{values:{name:H(h).name}})]),G(e,t)},a=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`confirm_uploading_files`,{values:{count:H(c).length,folder:`/${H(p)?.internalPath}`}})]),G(e,t)};q(r,e=>{H(h)?e(i):e(a,-1)}),D(n),k4(z(n,2),{get transformedFileMap(){return H(b)},get files(){return H(c)},set files(e){F(c,e,!0)}}),D(t),V(e=>Y(t,`aria-label`,e),[()=>Z(`uploading_files`)]),G(e,t)};q(a,e=>{H(c).length&&e(o)});var s=z(a,2),u=e=>{var t=nge(),n=I(t);Hl(n,{status:`warning`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`warning_oversized_files`,{values:{count:H(v).length,size:yz(H(S))}})]),G(e,n)},$$slots:{default:!0}}),k4(z(n,2),{get files(){return H(v)},get transformedFileMap(){return H(b)},removable:!1}),D(t),V(e=>Y(t,`aria-label`,e),[()=>Z(`oversized_files`)]),G(e,t)};q(s,e=>{H(v).length&&e(u)});var d=z(s,2),m=e=>{var t=rge(),n=I(t);Hl(n,{status:`warning`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`warning_invalid_files`,{values:{count:H(y).length}})]),G(e,n)},$$slots:{default:!0}}),k4(z(n,2),{get files(){return H(y)},removable:!1,showThumbnail:!1}),D(t),V(e=>Y(t,`aria-label`,e),[()=>Z(`invalid_files`)]),G(e,t)};q(d,e=>{H(y).length&&e(m)});var _=z(d,2),x=e=>{var t=ige(),n=I(t);Hl(n,{status:`warning`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`warning_mismatched_files`,{values:{count:H(E).length,name:H(h)?.name}})]),G(e,n)},$$slots:{default:!0}}),k4(z(n,2),{get files(){return H(E)},get transformedFileMap(){return H(b)},removable:!1}),D(t),V(e=>Y(t,`aria-label`,e),[()=>Z(`mismatched_files`)]),G(e,t)};q(_,e=>{H(E).length&&e(x)});var C=z(_,2),w=e=>{var t=oge(),n=I(t),r=z(n);{let e=N(()=>Z(`file_name_conflict_resolution`));Tm(r,{get"aria-label"(){return H(e)},onChange:({detail:e})=>{F(l,e.value===`replace`)},children:(e,t)=>{var n=age(),r=L(n);Em(r,{value:`replace`,get checked(){return H(l)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`replace`)]),G(e,n)},$$slots:{default:!0}});var i=z(r,2);{let e=N(()=>!H(l));Em(i,{value:`keep`,get checked(){return H(e)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`keep_both`)]),G(e,n)},$$slots:{default:!0}})}G(e,n)},$$slots:{default:!0}})}D(t),V(e=>K(n,`${e??``} `),[()=>Z(`file_name_conflict_confirmation`,{values:{count:H(T)}})]),G(e,t)};q(C,e=>{H(T)&&e(w)}),G(e,n)},$$slots:{default:!0}})}var ne=z(te,2);Nh(ne,{duration:0,get show(){return H(u)},set show(e){F(u,e,!0)},children:(e,t)=>{Hl(e,{status:`info`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`uploading_files_progress`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(ne,2),{get show(){return H(d)},set show(e){F(d,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`uploading_files_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,ee),k(),s()}function dge(e,t){O(t,!0);let n=()=>j(xU,`$uploadingAssets`,o),r=()=>j(fM,`$targetAssetFolder`,o),i=()=>j(mY,`$showUploadAssetsDialog`,o),a=()=>j(pY,`$showAssetOverlay`,o),[o,s]=sa(),c=P(void 0),l=N(()=>n().originalAssets),u=N(()=>H(l)?.[0]),d=N(()=>!H(u)),f=N(()=>H(u)?DR.getType(H(u).name)??void 0:void 0),p=e=>{e.length&&(M(xU,{folder:H(u)?H(u).folder:r(),files:e,originalAssets:H(l)}),M(mY,!1))};B(()=>{!zV.hasMouse&&i()&&H(c)?.open()}),B(()=>{a()||M(mY,!1)}),B(()=>{i()||Ds(()=>{!n().files.length&&n().originalAssets&&M(xU,{folder:void 0,files:[]})})});var m=W(),h=L(m),g=e=>{{let t=N(()=>H(u)?Z(`replace_x`,{values:{name:H(u).name}}):Z(`upload_assets`));Yp(e,{get title(){return H(t)},showOk:!1,get open(){return ua(),i()},set open(e){M(mY,e)},children:(e,t)=>{A4(e,{showUploadButton:!0,get accept(){return H(f)},get multiple(){return H(d)},filterDroppedFiles:!1,onDrop:({files:e})=>{p(e)}})},$$slots:{default:!0}})}},_=e=>{Ol(mm(e,{get accept(){return H(f)},get multiple(){return H(d)},onSelect:({files:e})=>{p(e)},onCancel:()=>{M(mY,!1)}}),e=>F(c,e,!0),()=>H(c))};q(h,e=>{zV.hasMouse?e(g):e(_,-1)}),G(e,m),k(),s()}var fge=U(`<div role="blockquote" class="svelte-2picl5"><pre class="svelte-2picl5"> </pre></div>`),pge={hash:`svelte-2picl5`,code:`div.svelte-2picl5 {flex:auto;overflow:auto;}pre.svelte-2picl5 {margin:0;padding:16px;width:100%;min-width:fit-content;min-height:-moz-available;min-height:-webkit-fill-available;min-height:stretch;background-color:var(--sui-primary-background-color);}`};function mge(e,t){O(t,!0),J(e,pge);{let t=e=>{var t=fge(),n=R(I(t),!0);D(t),V((e,r)=>{Y(t,`aria-label`,e),K(n,r)},[()=>Z(`cms_config`),()=>uI(QH)]),G(e,t)},n=N(()=>Z(`site_configuration_editor`));c3(e,{get"aria-label"(){return H(n)},main:t,$$slots:{main:!0}})}k()}var h3=new WeakMap,g3=e=>{let t=h3.get(e);if(t)return t;let n=F2(e);return h3.set(e,n),n},_3=new Map,v3=!1,y3=({draft:e,locale:t})=>{let n=_3.get(t);if(n)return n;let r=B2({draft:e,locale:t});return _3.set(t,r),v3||(v3=!0,queueMicrotask(()=>{_3.clear(),v3=!1})),r},b3=new Map,x3=new Map,S3=new Map,C3=new Map,w3=(e,t)=>`${e}:${t}`,hge=({locale:e,keyPath:t,instance:n})=>{n&&typeof n==`object`&&b3.set(w3(e,t),n)},T3=({locale:e,keyPath:t})=>{let n=w3(e,t);b3.delete(n),x3.delete(n),S3.delete(n),C3.set(n,(C3.get(n)??0)+1)},gge=()=>{b3.clear(),x3.clear(),S3.clear(),C3.clear()},_ge=e=>{if(e===!1)return{valid:!1};if(typeof e==`object`&&e){let{error:t}=e;if(typeof t==`object`&&t&&typeof t.message==`string`)return{valid:!1,message:t.message}}return{valid:!0}},vge=async({locale:e,keyPath:t,value:n,fieldConfig:r})=>{let i=w3(e,t),a=b3.get(i);if(typeof a?.isValid!=`function`){x3.set(i,{valid:!0,pending:!1});return}let o=(C3.get(i)??0)+1;C3.set(i,o);let s=x3.get(i);x3.set(i,{valid:s?.valid??!0,message:s?.message,pending:!0});let c=(async()=>{let e=g3(r),t;try{t=_ge(await a.isValid(n,e))}catch(e){t={valid:!1,message:e instanceof Error?e.message:Z(`validation.unexpected_error`)}}C3.get(i)===o&&x3.set(i,{...t,pending:!1})})();S3.set(i,c);try{await c}finally{S3.get(i)===c&&S3.delete(i)}},E3=async()=>{for(;S3.size;)await Promise.all(S3.values())},yge=({locale:e,keyPath:t,validity:n})=>{let r=w3(e,t);if(typeof b3.get(r)?.isValid!=`function`)return;let i=x3.get(r);i&&(n.customError=!i.valid,!i.valid&&i.message?n.customErrorMessage=i.message:delete n.customErrorMessage)},bge=({fieldConfig:e,value:t})=>{let n=e,{type:r,min:i,max:a,singleCustomTimeZone:o}=WI(n),s=typeof i==`string`&&!!i,c=typeof a==`string`&&!!a,l=!1,u=!1;if(t&&(s||c)){let e=yR({currentValue:t,fieldConfig:n,timeZone:o});if(e){let t=document.createElement(`input`);t.type=r,s&&(t.min=i),c&&(t.max=a),t.value=e,{rangeUnderflow:l,rangeOverflow:u}=t.validity}}return{validity:{rangeUnderflow:l,rangeOverflow:u},detail:{hasMin:s,hasMax:c,invalid:l||u}}},xge=new Intl.DateTimeFormat(`en-GB`,{hour12:!0,timeZone:`UTC`,hour:`2-digit`,minute:`2-digit`}),D3=e=>xge.format(new Date(`1970-01-01T${e}Z`)).toUpperCase(),Sge=(e,t)=>{if(e===`date`)return t;if(e===`time`)return D3(t);let[n,r]=t.split(`T`);return`${n}, ${D3(r)}`},O3=({direction:e,limitKey:t,limitValue:n,fieldType:r,type:i,canAddMultiValue:a})=>r===`datetime`&&typeof n==`string`?Z(`validation.range_${e}.${i}`,{values:{[t]:Sge(i,n)}}):Z(r===`number`?`validation.range_${e}.number`:a?`validation.range_${e}.add`:`validation.range_${e}.select`,{values:{[t]:n}}),k3=({validity:e,fieldConfig:t})=>{let n=[],{widget:r=`string`}=t,{pattern:i=[]}=t,a=r===`datetime`,o=a?WI(t):{},s=r===`string`?t.type??`text`:a?o.type:r===`number`?`number`:void 0,{min:c,max:l}=a?o:t,u=r===`list`||r===`keyvalue`||qB(t);if(e.valueMissing&&n.push(Z(`validation.value_missing`)),e.tooShort){let{minlength:e}=t;n.push(Z(`validation.too_short`,{values:{min:e}}))}if(e.tooLong){let{maxlength:e}=t;n.push(Z(`validation.too_long`,{values:{max:e}}))}return e.rangeUnderflow&&n.push(O3({direction:`underflow`,limitKey:`min`,limitValue:c,fieldType:r,type:s,canAddMultiValue:u})),e.rangeOverflow&&n.push(O3({direction:`overflow`,limitKey:`max`,limitValue:l,fieldType:r,type:s,canAddMultiValue:u})),e.patternMismatch&&n.push(i[1]),e.typeMismatch&&n.push(Z(`validation.type_mismatch.${s}`)),e.customError&&n.push(e.customErrorMessage??Z(`validation.invalid_value`)),n},Cge=({collectionName:e,fileName:t,originalEntry:n})=>{if(!n)return;let{workflow:r}=n,i=r?.pullRequest?.branch??bq({collectionName:e,slug:t??n.slug});return A(rX).find(e=>e.workflow.pullRequest.branch===i)?.workflow.status??r?.status},A3=e=>!A(nX)||(Cge(e)??`draft`)!==`draft`,wge=({keyPath:e,value:t,valueMap:n,fieldConfig:r,validities:i,locale:a})=>{let{output_code_only:o=!1,keys:s={code:`code`,lang:`lang`}}=r,c=(e.match(`(.+)\\.(?:${s.code}|${s.lang})$`)?.[1]??``)||e;return c in i[a]?{skip:!0,keyPath:c,value:t}:{skip:!1,keyPath:c,value:o?t:n[`${c}.${s.code}`]}},Tge=({fieldConfig:e,dynamicValue:t})=>{if(t!==void 0)return t===`true`;let{default:n}=e;return typeof n==`boolean`&&n},Ege=e=>({[e.keyPath]:Tge(e)}),Dge=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,output_code_only:i=!1,keys:a={code:`code`,lang:`lang`}}=e,o=n===void 0?r:n;if(i)return{[t]:typeof o==`string`?o:``};let s=or(o)?o:void 0,c=s?.[a.code]??o,l=s?.[a.lang]??``;return iR(t,{[a.code]:typeof c==`string`?c:``,[a.lang]:typeof l==`string`?l:``})},Oge=({fieldConfig:e,dynamicValue:t})=>{let n=e,r=n.default,i=t??r;if(typeof i!=`string`)return``;if(i===`{{now}}`){let{singleCustomTimeZone:e,outputUTC:t}=WI(n);return vR({inputValue:_R(n,e),currentValue:``,fieldConfig:n,timeZone:e,outputUTC:t})}return i},kge=e=>({[e.keyPath]:Oge(e)}),j3=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let r=e,i=r.default,a=VB(r),o=``;o=n===void 0?a?Array.isArray(i)?i:[]:typeof i==`string`?i:``:a?n.split(/,\s*/):n;let s={};return a&&Array.isArray(o)&&(o=o.map(e=>e.trim()).filter(e=>e!==``),o.length&&Object.assign(s,iR(t,o))),!a&&typeof o==`string`&&(s[t]=o.trim()),s},Age=(e,{locale:t,account:{email:n=``,login:r=``,name:i=``}})=>e===`locale`?t:e===`datetime`?new Date().toJSON().replace(/\d+\.\d+Z$/,`00.000Z`):e===`uuid`?Tf():e===`uuid_short`?Tf(`short`):e===`uuid_shorter`?Tf(`shorter`):e===`author-email`?n:e===`author-login`?r:e===`author-name`?i:``,jge=({fieldConfig:e,locale:t,dynamicValue:n})=>{let{default:r}=e,i=n??r;if(typeof i!=`string`)return i;let a={locale:t,account:zW.account};return dV(i,(e,n)=>{let{value:r,transformations:i}=GI(n),o=Age(r,a);return i.length?KI({value:o,transformations:i,locale:t}):o})},M3=e=>({[e.keyPath]:jge(e)}),Mge=({fieldConfig:e,locale:t})=>{let{default:n}=e,r=ZB({fieldConfig:e,locale:t});return or(n)?n:r?{"":``}:{}},Nge=e=>{let{keyPath:t,dynamicValue:n}=e,r;if(n!==void 0)try{let e=JSON.parse(n);or(e)&&(r=e)}catch{}return r??=Mge(e),Object.fromEntries(Object.entries(r).filter(([,e])=>typeof e==`string`).map(([e,n])=>[`${t}.${e}`,n]))},Pge=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r}=e,{fields:i}=e,{types:a}=e,o;return o=n===void 0?Array.isArray(r)?r:[]:n.split(/,\s*/).map(e=>e.trim()).filter(e=>e!==``),Array.isArray(o)&&o.length?iR(t,i||a?o:o.filter(e=>!or(e))):iR(t,[])},Fge=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,value_type:i=`int`}=e,a=n??r,o=typeof a==`string`;if(a===void 0)return i===`int`||i===`float`?{[t]:null}:{[t]:``};if([`int`,`int/string`].includes(i)){let e=o?Number.parseInt(a,10):a;return Number.isInteger(e)?{[t]:i===`int`?e:String(e)}:{}}if([`float`,`float/string`].includes(i)){let e=o?Number.parseFloat(a):a;return Number.isFinite(e)?{[t]:i===`float`?e:String(e)}:{}}return{}},Ige=({fieldConfig:e,keyPath:t,locale:n,defaultLocale:r,populateDefault:i})=>{let{default:a}=e,{fields:o}=e,{types:s}=e,c=ZB({fieldConfig:e,locale:n}),l={};return or(a)?(Object.entries(nM(a)).forEach(([e,n])=>{l[`${t}.${e}`]=n}),l):!c||Array.isArray(s)?(l[t]=null,l):(o&&o.length>0&&o.forEach(e=>{i?.({content:l,keyPath:[t,e.name].join(`.`),fieldConfig:e,locale:n,defaultLocale:r,dynamicValues:{}})}),l)},N3=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r=A($H)?.field_defaults?.richtext?.default}=e,i=``;if(n!==void 0)try{i=$re(n)}catch{i=n.replace(/<[^>]*>/g,``)}else i=r||``;return{[t]:i}},P3=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,multiple:i=!1}=e,a=n===void 0?r:n.split(/,\s*/).map(e=>e.trim()),o=Array.isArray(a)&&!!a.length;if(!i){if(n!==void 0){let e=n.split(/,\s*/).map(e=>e.trim());return{[t]:e[0]||``}}return{[t]:a===void 0?``:a}}return o?Object.fromEntries(a.map((e,n)=>[`${t}.${n}`,e])):{[t]:[]}},Lge={boolean:Ege,code:Dge,datetime:kge,file:j3,hidden:M3,image:j3,keyvalue:Nge,list:Pge,markdown:N3,number:Fge,object:Ige,relation:P3,richtext:N3,select:P3},F3=({content:e,keyPath:t,fieldConfig:n,locale:r,defaultLocale:i,dynamicValues:a})=>{let{widget:o=`string`,default:s,i18n:c=!1}=n;if(r!==i&&[!1,`none`].includes(c))return;if(o===`compute`){e[t]=``;return}let l=t in a&&!/\.\d+(?:\.|$)/.test(t)&&a[t].trim()||void 0,u=Lge[o];if(u){Object.assign(e,u({fieldConfig:n,keyPath:t,locale:r,defaultLocale:i,dynamicValue:l,populateDefault:F3}));return}e[t]=l||s||``},I3=({fields:e,locale:t,defaultLocale:n,dynamicValues:r={}})=>{let i={};return e.forEach(e=>{F3({content:i,keyPath:e.name,fieldConfig:e,locale:t,defaultLocale:n,dynamicValues:r})}),i},L3=({valueStore:e,locale:t,i18n:n},r)=>{v4(()=>{Object.entries(e??{}).forEach(([e,i])=>{(e===t||n===`duplicate`)&&r(i,e)})})},R3=(e,t,{keyPathPrefix:n}={})=>{let{collectionName:r,fileName:i,collection:a,collectionFile:o,currentValues:s,isIndexFile:c}=A(h4),{defaultLocale:l}=(o??a)._i18n,u=sr(s[l]),d={...sr(e),...u},f={collectionName:r,fileName:i,valueMap:d,isIndexFile:c},p=[];return Object.keys(d).forEach(n=>{let r=YB({...f,keyPath:n});if(!r)return;let{widget:i=`text`,i18n:a=!1}=r;if([`text`,`string`,`richtext`,`markdown`].includes(i)&&[!0,`translate`].includes(a)&&(d[n]=e[n]??``),i===`hidden`&&[!0,`translate`].includes(a)){let{default:e}=r;e===`{{locale}}`&&(d[n]=t)}i===`object`&&[!0,`translate`,`duplicate`].includes(a)&&u[n]!==null&&delete d[n],([!1,`none`].includes(a)||p.some(e=>n===e||n.startsWith(`${e}.`)))&&(delete d[n],p.push(n))}),n===void 0?d:Object.fromEntries(Object.entries(d).filter(([e])=>e.startsWith(`${n}.`)))},z3=e=>{h4.update(t=>{let{fields:n,defaultLocale:r,currentLocales:i,currentValues:a,validities:o,validationMessages:s}=t,c=!i[e];if(c&&!a[e]){let{collectionName:o,fileName:s,originalValues:l}=t,u=I3({fields:n,locale:e,defaultLocale:r});return{...t,currentLocales:{...i,[e]:c},originalValues:{...l,[e]:u},currentValues:{...a,[e]:Y3({draft:{collectionName:o,fileName:s},locale:e,target:R3(u,e)})}}}return{...t,currentLocales:{...i,[e]:c},validities:{...o,[e]:{}},validationMessages:{...s,[e]:{}}}})},B3=({entryDraft:e,valueStoreKey:t=`currentValues`,keyPath:n,locale:r})=>{let i=A(e)[t][r]??{},a=`${n}.`;return $L(i,a,{live:!0}).map(e=>[e.slice(a.length),i[e]])},Rge=({pairs:e,edited:t})=>e.map(([e],n,r)=>{if(!e.trim()&&t[n])return`empty`;if(e.trim()&&r.findIndex(t=>t[0]===e)!==n)return`duplicate`}),zge=({entryDraft:e,valueStoreKey:t=`currentValues`,keyPath:n,locale:r,fieldConfig:i,pairs:a})=>{let{i18n:o}=i;e.update(e=>(e&&L3({valueStore:e[t],locale:r,i18n:o},e=>{$L(e,`${n}.`,{live:!0}).forEach(t=>{delete e[t]}),a.forEach(([t,r])=>{e[`${n}.${t}`]=r})}),e))},V3=/^.+?:\w+:/,Bge=[`rich_text`,`raw`],Vge={rich_text:`rich-text`,raw:`plain-text`},Hge=[`bold`,`italic`,`strikethrough`,`code`,`link`,`heading-one`,`heading-two`,`heading-three`,`heading-four`,`heading-five`,`heading-six`,`bulleted-list`,`numbered-list`,`quote`],Uge={bold:`bold`,italic:`italic`,strikethrough:`strikethrough`,code:`code`,link:`link`,"heading-one":`heading-1`,"heading-two":`heading-2`,"heading-three":`heading-3`,"heading-four":`heading-4`,"heading-five":`heading-5`,"heading-six":`heading-6`,"bulleted-list":`bulleted-list`,"numbered-list":`numbered-list`,quote:`blockquote`,"code-block":`code-block`},H3=[`code-block`,`image`],Wge=/(.+?)(?:\.[^.]*)?$/,Gge=({keyPath:e,getFieldArgs:t,validity:n,validities:r,locale:i,required:a,min:o,max:s})=>{let c=e.match(Wge)?.[1],l=YB({...t,keyPath:c.replace(V3,``)});if(c in r[i]||l?.widget!==`keyvalue`)return{skip:!0,keyPath:e};let u=B3({entryDraft:h4,keyPath:c,locale:i});return a&&!u.length?n.valueMissing=!0:typeof o==`number`&&u.length<o?n.rangeUnderflow=!0:typeof s==`number`&&u.length>s&&(n.rangeOverflow=!0),{skip:!1,keyPath:c,empty:!u.length}},U3=e=>{let t=`field`in e,n=`fields`in e,r=`types`in e;return{hasSingleSubField:t,hasMultiSubFields:n,hasVariableTypes:r,hasSubFields:t||n||r}},Kge=({collectionName:e,fileName:t,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:a,summaryTemplate:o,hasSingleSubField:s,index:c})=>{let l={collectionName:e,fileName:t,keyPath:``,valueMap:r,isIndexFile:i},u=`${n}.${c}`;if(!o)return s?r[u]:eV({valueMap:r,locale:a,keyPath:u,keyPathPrefix:`${u}.`,getFieldArgs:l});let d=e=>{let{value:t}=GI(e),r=t.replace(/^fields\./,``),i=`${u}.${r}`;if(s){let e=YB({...l,keyPath:n});if(!(`field`in e)||e.field.name!==r)return``}return $B({...l,keyPath:s?u:i,locale:a})};return dV(o,(e,t)=>{let{value:r,transformations:i}=GI(t),o=r.replace(/^fields\./,``),c=`${u}.${o}`;if(s){let e=YB({...l,keyPath:n});if(!(`field`in e)||e.field.name!==o)return``}return $B({...l,keyPath:s?u:c,locale:a,transformations:LI(i,d)})})},qge=new Map,Jge=({keyPath:e,value:t,valueMap:n,validity:r,validities:i,locale:a,required:o,min:s,max:c})=>{if(e in i[a])return{skip:!0};let l=Array.isArray(t)&&t.length?t.length:(()=>{let t=wI(qge,e,()=>RegExp(`^${NA(e)}\\.\\d+`));return new Set(Object.keys(n).map(e=>e.match(t)?.[0]).filter(Boolean)).size})();return o&&!l?r.valueMissing=!0:typeof s==`number`&&l<s?r.rangeUnderflow=!0:typeof c==`number`&&l>c&&(r.rangeOverflow=!0),{skip:!1,empty:!l}},Yge=({fieldConfig:e,locale:t,value:n})=>{let{value_type:r=`int`,min:i,max:a}=e,o=typeof i==`number`&&n!==null&&Number(n)<i;return{validity:{rangeUnderflow:o,rangeOverflow:!o&&typeof a==`number`&&n!==null&&Number(n)>a,typeMismatch:(r===`int`||r===`float`)&&ZB({fieldConfig:e,locale:t})&&n===null}}},W3=({fieldConfig:e,value:t})=>{let n=e,{widget:r=`string`,minlength:i,maxlength:a}=n,o=Number.isInteger(i)&&i<=(a??1/0),s=Number.isInteger(a)&&(i??0)<=a,c=t?[...t.trim()].length:0,l=o&&c<i,u=s&&c>a,d=!1;if(r===`string`&&t){let{type:e=`text`,prefix:r,suffix:i}=n,a=t;if(r&&a.startsWith(r)&&(a=a.slice(r.length)),i&&a.endsWith(i)&&(a=a.slice(0,-i.length)),e!==`text`){let t=document.createElement(`input`);t.type=e,t.value=a,{typeMismatch:d}=t.validity}e===`email`&&!d&&!a.split(`@`)[1]?.includes(`.`)&&(d=!0)}return{validity:{tooShort:l,tooLong:u,typeMismatch:d},detail:{count:c,hasMin:o,hasMax:s,invalid:l||u||d}}},Xge={valueMissing:!1,tooShort:!1,tooLong:!1,rangeUnderflow:!1,rangeOverflow:!1,patternMismatch:!1,typeMismatch:!1,customError:!1},Zge={datetime:bge,number:Yge,string:W3,text:W3},Qge={get:(e,t)=>t===`valid`?!Object.values(e).some(Boolean):e[t]},$ge=({value:e,required:t,validation:n,validity:r})=>{let i=typeof e==`string`?e.trim():e,a=i==null||i===``;if(t&&a&&(r.valueMissing=!0),Array.isArray(n)){let e=uB(n[0]);e&&!e.test(String(i))&&(r.patternMismatch=!0)}return{empty:a}},G3=e=>{let{draft:t,locale:n,valueMap:r,componentName:i,validities:a,enforceRequired:o=!0}=e,{collection:s,collectionName:c,fileName:l,collectionFile:u,files:d,isIndexFile:f}=t,{keyPath:p,value:m}=e,h={collectionName:c,fileName:l,componentName:i,valueMap:r,keyPath:p.replace(V3,``),isIndexFile:f},g=YB({...h});if(!g)return;let{widget:_=`string`,i18n:v=!1,pattern:y}=g,b=qB(g)||XB(g)===`custom`&&Array.isArray(m),{min:x=0,max:S=1/0}=foe.includes(_)?g:{},{i18nEnabled:C,defaultLocale:w}=(u??s)._i18n;if(!i&&n!==w&&(!C||v===!1||v===`none`||v===`duplicate`))return;let T=ZB({fieldConfig:g,locale:n}),E={...Xge},ee=!1;if(_===`list`||b){let{skip:e,empty:t}=Jge({keyPath:p,value:m,valueMap:r,validity:E,validities:a,locale:n,required:T,min:x,max:S});if(e)return;ee=!!t}if(_===`object`&&(ee=!m,T&&ee&&(E.valueMissing=!0)),_===`keyvalue`){let e=Gge({keyPath:p,getFieldArgs:h,validity:E,validities:a,locale:n,required:T,min:x,max:S});if(e.skip)return;p=e.keyPath,ee=!!e.empty}if(_===`code`){let e=wge({keyPath:p,value:m,valueMap:r,fieldConfig:g,validities:a,locale:n});if(e.skip)return;p=e.keyPath,m=e.value}tL.includes(_)&&typeof m==`string`&&m.startsWith(`blob:`)&&(m=d[m]?.file?.name),[`object`,`list`,`hidden`,`compute`,`keyvalue`].includes(_)||b||({empty:ee}=$ge({value:m,required:T,validation:y,validity:E}));let te=Zge[_];return te&&Object.assign(E,te({fieldConfig:g,locale:n,value:m}).validity),yge({locale:n,keyPath:p,validity:E}),ee&&(Object.assign(E,{patternMismatch:!1,tooShort:!1,rangeUnderflow:!1,typeMismatch:!1}),o||(E.valueMissing=!1)),new Proxy(E,Qge)},K3=e=>{let{validities:t,locale:n,keyPath:r}=e,i=G3(e),a=!0;return i&&(t[n][r]=i,i.valid||(a=!1)),a},e_e=({draft:e,locale:t,keyPath:n,value:r,valueMap:i})=>{let{collectionName:a,fileName:o,isIndexFile:s,validities:c,validationMessages:l}=e;if(!c?.[t]?.[n])return;let u=G3({draft:e,locale:t,keyPath:n,value:r,valueMap:i,enforceRequired:A3(e),validities:{[t]:{}}});if(!u)return;c[t][n]=u;let d=YB({collectionName:a,fileName:o,isIndexFile:s,keyPath:n,valueMap:i});l[t][n]=k3({validity:u,fieldConfig:d})},t_e=({fieldConfig:e,validateArgs:t})=>{let{validities:n,locale:r,keyPath:i}=t,a=n[r][i]?.valid??K3(t),{widget:o=`string`}=e;return o===`list`&&!U3(e).hasSubFields||qB(e)?{valid:a,validateItems:!1}:{valid:a,validateItems:!0}},q3=(e,t={})=>{let{enforceRequired:n=!0,draft:r=A(h4)}=t,{collectionName:i,fileName:a,isIndexFile:o,currentLocales:s}=r,c={},l={},u={collectionName:i,fileName:a,isIndexFile:o,keyPath:``,valueMap:{}},d=!0;return Object.entries(r[e]).forEach(([e,t])=>{let i=Object.entries(t);if(!s[e]){c[e]=Object.fromEntries(i.map(([e])=>[e,{valid:!0}])),l[e]=Object.fromEntries(i.map(([e])=>[e,[]]));return}let a={draft:r,locale:e,valueMap:t,validities:c,enforceRequired:n};c[e]={},l[e]={},i.forEach(([n,r])=>{let[i]=n.match(V3)??[],o=i?t[`${i}__sc_component_name`]:void 0,s=YB({...u,keyPath:n.replace(V3,``),valueMap:t,componentName:o});if(!s||XB(s)===`unknown`)return;if(WB.test(n)){let t=n.replace(WB,``),{valid:r,validateItems:i}=t_e({fieldConfig:s,validateArgs:{...a,keyPath:t,value:``,componentName:o}});if(r||(d=!1),!(t in l[e])){let n=c[e][t];n&&(l[e][t]=k3({validity:n,fieldConfig:s}))}if(!i)return}K3({...a,keyPath:n,value:r,componentName:o})||(d=!1);let f=c[e][n];f&&(l[e][n]=k3({validity:f,fieldConfig:s}))})}),{valid:d,validities:c,validationMessages:l}},J3=({fieldConfig:e,value:t,sourceLocale:n,targetLocale:r})=>{if(e.widget!==`relation`||typeof t!=`string`)return t;let{value_field:i=`{{slug}}`}=e;return!i.startsWith(`{{locale}}/`)||!t.startsWith(`${n}/`)?t:`${r}/${t.slice(n.length+1)}`},n_e=/(?<path>.+?)\.[^.]*$/,r_e=({getFieldArgs:e,fieldConfig:t,sourceLanguage:n,value:r})=>{let{keyPath:i}=e;Object.entries(A(h4).currentValues).forEach(([a,o])=>{if(i.includes(`.`)){let t=i.match(n_e)?.groups?.path;if(!Object.keys(o).some(e=>e.startsWith(`${t}.`))&&!YB({...e,keyPath:t}))return}let s=J3({fieldConfig:t,value:r,sourceLocale:n,targetLocale:a});a!==n&&o[i]!==s&&(o[i]=s)})},Y3=({draft:{collectionName:e,fileName:t,isIndexFile:n},locale:r,target:i={},getValueMap:a=void 0})=>{let o=HL(e),s=o&&t?YI(o,t):void 0;if(!o||t&&!s)return;let{defaultLocale:c,canonicalSlug:{key:l}}=(s??o)._i18n,u=e=>A(g4)&&e.i18n===`duplicate`&&r===c,d=(r,i)=>{let o=typeof a==`function`?a():r,s={collectionName:e,fileName:t,keyPath:i,valueMap:o,isIndexFile:n};return{valueMap:o,getFieldArgs:s,fieldConfig:YB({...s})}};return new Proxy(i,{set:(e,t,n)=>{if(e[t]!==n&&(e[t]=n),[l].includes(t))return!0;let{fieldConfig:i,getFieldArgs:a,valueMap:o}=d(e,t);if(!i)return!0;let s=A(h4);return s&&e_e({draft:s,locale:r,keyPath:t,value:n,valueMap:o}),u(i)&&r_e({getFieldArgs:a,fieldConfig:i,sourceLanguage:r,value:n}),!0},deleteProperty:(e,t)=>{delete e[t];let{fieldConfig:n}=d(e,t);return n&&u(n)&&Object.entries(A(h4).currentValues).forEach(([e,n])=>{e!==r&&t in n&&delete n[t]}),!0}})},X3=0,Z3=void 0,Q3={saved:!1,restored:!1,deleted:!1},$3=na({show:!1}),e6=na({...Q3}),t6=async(e,t=``)=>{await Z3?.delete([e,t])},n6=async(e,t=``)=>{let n=await Z3?.get([e,t]);return n?n.cmsConfigVersion===A(eU)?n:(await t6(e,t),null):null},i_e=async e=>{if(!(KH.useDraftBackup??!0)||!A(y4))return;let{collectionName:t,fileName:n,originalEntry:r,currentLocales:i={},currentSlugs:a={},currentValues:o={},files:s}=e,c=n??r?.slug??``;if(A(b4)){let e={timestamp:new Date,cmsConfigVersion:A(eU),collectionName:t,slug:c,currentLocales:i,currentSlugs:sr(a),currentValues:sr(o),files:s};await Z3?.put(e)}else await n6(t,c)&&await t6(t,c)},a_e=({backup:e,collectionName:t,fileName:n})=>{let{currentLocales:r,currentSlugs:i,currentValues:a,files:o}=e,s=new Map;v4(()=>{h4.update(e=>{if(e){e.currentLocales=r,e.currentSlugs=i;let c=d4(e.collection);Object.entries(a).forEach(([r,i])=>{if(c&&c in i){let t=e.originalEntry?.locales[r]?.content?.[c];t===void 0?delete i[c]:i[c]=t}Object.entries(i).forEach(([t,n])=>{typeof n==`string`&&([...n.matchAll(Uj(`g`))].forEach(([t])=>{let r=o[t],{file:i}=r??{};if(!r||!i)return;let a=``;s.has(i)?a=s.get(i):(a=URL.createObjectURL(i),e.files[a]=r,s.set(i,a)),n=n.replaceAll(t,a)}),i[t]=n)}),e.currentValues[r]?Object.assign(e.currentValues[r],i):e.currentValues[r]=Y3({draft:{collectionName:t,fileName:n},locale:r,target:structuredClone(i)});let a=e.currentValues[r],l=Object.keys(a);l.forEach(e=>{a[e]===null&&l.some(t=>t.startsWith(`${e}.`))&&(a[e]={})}),e.originalValues[r]||(e.originalValues[r]={})})}return e})})},o_e=async({collectionName:e,fileName:t,slug:n=``})=>{if(!(KH.useDraftBackup??!0))return;let r=await n6(e,n);if(!r)return;let{timestamp:i}=r,{promise:a,resolve:o}=Promise.withResolvers();$3.set({show:!0,timestamp:i,resolve:o});let s=await a;s!==void 0&&(s?(a_e({backup:r,collectionName:e,fileName:t}),y4.set(!0)):await t6(e,n),e6.set({restored:s,deleted:!s,saved:!1}))},s_e=async()=>{if(!(KH.useDraftBackup??!0))return;let e=A(h4);if(!e||A(e6).saved)return;let{collectionName:t,originalEntry:n}=e;await n6(t,n?.slug)&&e6.set({restored:!1,deleted:!1,saved:!0})},c_e=()=>{e6.set({...Q3})};nY.subscribe(e=>{if(e&&!Z3){let{databaseName:t}=e.repository??{};if(t){Z3=new UA(t,`draft-backups`,{keyPath:[`collectionName`,`slug`]});return}}Z3=null});var r6;h4.subscribe(e=>{globalThis.clearTimeout(X3),e?.id!==r6&&(r6=e?.id,y4.set(!1)),e&&Z3&&(X3=globalThis.setTimeout(()=>{i_e(e)},500))});var l_e=U(`<!> <!> <!> <!>`,1);function u_e(e,t){O(t,!0);let n=()=>j($3,`$restoreDialogState`,a),r=()=>j(SY,`$showContentOverlay`,a),i=()=>j(e6,`$backupToastState`,a),[a,o]=sa(),s=N(()=>new Date),c=N(()=>n().resolve),l=N(()=>n().timestamp),u=N(()=>H(s).getUTCFullYear()===H(l)?.getUTCFullYear()),d=N(()=>H(u)&&H(s).getUTCMonth()===H(l)?.getUTCMonth()),f=N(()=>H(d)&&H(s).getUTCDate()===H(l)?.getUTCDate()),p=N(()=>H(l)?.toLocaleString(Ud.current,{year:H(u)?void 0:`numeric`,month:H(f)?void 0:`short`,day:H(f)?void 0:`numeric`,hour:`numeric`,minute:`numeric`}));B(()=>{!r()&&n().show&&(la($3,Ds(n).show=!1,Ds(n)),H(c)?.())});var m=l_e(),h=L(m);{let e=N(()=>Z(`restore_backup_title`)),t=N(()=>Z(`restore`)),r=N(()=>Z(`discard`));Zp(h,{get title(){return H(e)},get okLabel(){return H(t)},get cancelLabel(){return H(r)},onOk:()=>{H(c)?.(!0)},onCancel:()=>{H(c)?.(!1)},get open(){return n().show},set open(e){la($3,Ds(n).show=e,Ds(n))},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`restore_backup_description`,{values:{datetime:H(p)}})]),G(e,n)},$$slots:{default:!0}})}var g=z(h,2);Nh(g,{get show(){return i().saved},set show(e){la(e6,Ds(i).saved=e,Ds(i))},children:(e,t)=>{Hl(e,{status:`info`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`draft_backup_saved`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}});var _=z(g,2);Nh(_,{get show(){return i().restored},set show(e){la(e6,Ds(i).restored=e,Ds(i))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`draft_backup_restored`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(_,2),{get show(){return i().deleted},set show(e){la(e6,Ds(i).deleted=e,Ds(i))},children:(e,t)=>{Hl(e,{status:`info`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`draft_backup_deleted`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,m),k(),o()}function d_e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}function i6(e,t){return Array(t+1).join(e)}function a6(e){return e.replace(/^\n*/,``)}function o6(e){for(var t=e.length;t>0&&e[t-1]===`
|
||
`;)t--;return e.substring(0,t)}function s6(e){return o6(a6(e))}var f_e=`ADDRESS.ARTICLE.ASIDE.AUDIO.BLOCKQUOTE.BODY.CANVAS.CENTER.DD.DIR.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.FRAMESET.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.HTML.ISINDEX.LI.MAIN.MENU.NAV.NOFRAMES.NOSCRIPT.OL.OUTPUT.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`);function c6(e){return f6(e,f_e)}var l6=[`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`];function u6(e){return f6(e,l6)}function p_e(e){return p6(e,l6)}var d6=[`A`,`TABLE`,`THEAD`,`TBODY`,`TFOOT`,`TH`,`TD`,`IFRAME`,`SCRIPT`,`AUDIO`,`VIDEO`];function m_e(e){return f6(e,d6)}function h_e(e){return p6(e,d6)}function f6(e,t){return t.indexOf(e.nodeName)>=0}function p6(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var g_e=[[/\\/g,`\\\\`],[/\*/g,`\\*`],[/^-/g,`\\-`],[/^\+ /g,`\\+ `],[/^(=+)/g,`\\$1`],[/^(#{1,6}) /g,`\\$1 `],[/`/g,"\\`"],[/^~~~/g,`\\~~~`],[/\[/g,`\\[`],[/\]/g,`\\]`],[/^>/g,`\\>`],[/_/g,`\\_`],[/^(\d+)\. /g,`$1\\. `]];function m6(e){return g_e.reduce(function(e,t){return e.replace(t[0],t[1])},e)}var h6={};h6.paragraph={filter:`p`,replacement:function(e){return`
|
||
|
||
`+e+`
|
||
|
||
`}},h6.lineBreak={filter:`br`,replacement:function(e,t,n){return n.br+`
|
||
`}},h6.heading={filter:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));if(n.headingStyle===`setext`&&r<3){var i=i6(r===1?`=`:`-`,e.length);return`
|
||
|
||
`+e+`
|
||
`+i+`
|
||
|
||
`}return`
|
||
|
||
`+i6(`#`,r)+` `+e+`
|
||
|
||
`}},h6.blockquote={filter:`blockquote`,replacement:function(e){return e=s6(e).replace(/^/gm,`> `),`
|
||
|
||
`+e+`
|
||
|
||
`}},h6.list={filter:[`ul`,`ol`],replacement:function(e,t){var n=t.parentNode;return n.nodeName===`LI`&&n.lastElementChild===t?`
|
||
`+e:`
|
||
|
||
`+e+`
|
||
|
||
`}},h6.listItem={filter:`li`,replacement:function(e,t,n){var r=n.bulletListMarker+` `,i=t.parentNode;if(i.nodeName===`OL`){var a=i.getAttribute(`start`),o=Array.prototype.indexOf.call(i.children,t);r=(a?Number(a)+o:o+1)+`. `}var s=/\n$/.test(e);return e=s6(e)+(s?`
|
||
`:``),e=e.replace(/\n/gm,`
|
||
`+` `.repeat(r.length)),r+e+(t.nextSibling?`
|
||
`:``)}},h6.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`indented`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){return`
|
||
|
||
`+t.firstChild.textContent.replace(/\n/g,`
|
||
`)+`
|
||
|
||
`}},h6.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`fenced`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){for(var r=((t.firstChild.getAttribute(`class`)||``).match(/language-(\S+)/)||[null,``])[1],i=t.firstChild.textContent,a=n.fence.charAt(0),o=3,s=RegExp(`^`+a+`{3,}`,`gm`),c;c=s.exec(i);)c[0].length>=o&&(o=c[0].length+1);var l=i6(a,o);return`
|
||
|
||
`+l+r+`
|
||
`+i.replace(/\n$/,``)+`
|
||
`+l+`
|
||
|
||
`}},h6.horizontalRule={filter:`hr`,replacement:function(e,t,n){return`
|
||
|
||
`+n.hr+`
|
||
|
||
`}},h6.inlineLink={filter:function(e,t){return t.linkStyle===`inlined`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t){var n=_6(t.getAttribute(`href`)),r=v6(g6(t.getAttribute(`title`))),i=r?` "`+r+`"`:``;return`[`+e+`](`+n+i+`)`}},h6.referenceLink={filter:function(e,t){return t.linkStyle===`referenced`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t,n){var r=_6(t.getAttribute(`href`)),i=g6(t.getAttribute(`title`));i&&=` "`+v6(i)+`"`;var a,o;switch(n.linkReferenceStyle){case`collapsed`:a=`[`+e+`][]`,o=`[`+e+`]: `+r+i;break;case`shortcut`:a=`[`+e+`]`,o=`[`+e+`]: `+r+i;break;default:var s=this.references.length+1;a=`[`+e+`][`+s+`]`,o=`[`+s+`]: `+r+i}return this.references.push(o),a},references:[],append:function(e){var t=``;return this.references.length&&(t=`
|
||
|
||
`+this.references.join(`
|
||
`)+`
|
||
|
||
`,this.references=[]),t}},h6.emphasis={filter:[`em`,`i`],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:``}},h6.strong={filter:[`strong`,`b`],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:``}},h6.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n=e.parentNode.nodeName===`PRE`&&!t;return e.nodeName===`CODE`&&!n},replacement:function(e){if(!e)return``;e=e.replace(/\r?\n|\r/g,` `);for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?` `:``,n="`",r=e.match(/`+/gm)||[];r.indexOf(n)!==-1;)n+="`";return n+t+e+t+n}},h6.image={filter:`img`,replacement:function(e,t){var n=m6(g6(t.getAttribute(`alt`))),r=_6(t.getAttribute(`src`)||``),i=g6(t.getAttribute(`title`)),a=i?` "`+v6(i)+`"`:``;return r?``:``}};function g6(e){return e?e.replace(/(\n+\s*)+/g,`
|
||
`):``}function _6(e){var t=e.replace(/([<>()])/g,`\\$1`);return t.indexOf(` `)>=0?`<`+t+`>`:t}function v6(e){return e.replace(/"/g,`\\"`)}function y6(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}y6.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return``}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=b6(this.array,e,this.options))||(t=b6(this._keep,e,this.options))||(t=b6(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function b6(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(__e(i,t,n))return i}}function __e(e,t,n){var r=e.filter;if(typeof r==`string`){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof r==`function`){if(r.call(e,t,n))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function v_e(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return e.nodeName===`PRE`};if(!(!t.firstChild||i(t))){for(var a=null,o=!1,s=null,c=S6(s,t,i);c!==t;){if(c.nodeType===3||c.nodeType===4){var l=c.data.replace(/[ \r\n\t]+/g,` `);if((!a||/ $/.test(a.data))&&!o&&l[0]===` `&&(l=l.substr(1)),!l){c=x6(c);continue}c.data=l,a=c}else if(c.nodeType===1)n(c)||c.nodeName===`BR`?(a&&(a.data=a.data.replace(/ $/,``)),a=null,o=!1):r(c)||i(c)?(a=null,o=!0):a&&(o=!1);else{c=x6(c);continue}var u=S6(s,c,i);s=c,c=u}a&&(a.data=a.data.replace(/ $/,``),a.data||x6(a))}}function x6(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function S6(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var C6=typeof window<`u`?window:{};function y_e(){var e=C6.DOMParser,t=!1;try{new e().parseFromString(``,`text/html`)&&(t=!0)}catch{}return t}function b_e(){var e=function(){};return x_e()?e.prototype.parseFromString=function(e){var t=new window.ActiveXObject(`htmlfile`);return t.designMode=`on`,t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument(``);return t.open(),t.write(e),t.close(),t},e}function x_e(){var e=!1;try{document.implementation.createHTMLDocument(``).open()}catch{C6.ActiveXObject&&(e=!0)}return e}var S_e=y_e()?C6.DOMParser:b_e();function C_e(e,t){var n=typeof e==`string`?w_e().parseFromString(`<x-turndown id="turndown-root">`+e+`</x-turndown>`,`text/html`).getElementById(`turndown-root`):e.cloneNode(!0);return v_e({element:n,isBlock:c6,isVoid:u6,isPre:t.preformattedCode?T_e:null}),n}var w6;function w_e(){return w6||=new S_e,w6}function T_e(e){return e.nodeName===`PRE`||e.nodeName===`CODE`}function E_e(e,t){return e.isBlock=c6(e),e.isCode=e.nodeName===`CODE`||e.parentNode.isCode,e.isBlank=D_e(e),e.flankingWhitespace=O_e(e,t),e}function D_e(e){return!u6(e)&&!m_e(e)&&/^\s*$/i.test(e.textContent)&&!p_e(e)&&!h_e(e)}function O_e(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:``,trailing:``};var n=k_e(e.textContent);return n.leadingAscii&&T6(`left`,e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&T6(`right`,e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function k_e(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function T6(e,t,n){var r,i,a;return e===`left`?(r=t.previousSibling,i=/ $/):(r=t.nextSibling,i=/^ /),r&&(r.nodeType===3?a=i.test(r.nodeValue):n.preformattedCode&&r.nodeName===`CODE`?a=!1:r.nodeType===1&&!c6(r)&&(a=i.test(r.textContent))),a}var A_e=Array.prototype.reduce;function E6(e){if(!(this instanceof E6))return new E6(e);var t={rules:h6,headingStyle:`setext`,hr:`* * *`,bulletListMarker:`*`,codeBlockStyle:`indented`,fence:"```",emDelimiter:`_`,strongDelimiter:`**`,linkStyle:`inlined`,linkReferenceStyle:`full`,br:` `,preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?`
|
||
|
||
`:``},keepReplacement:function(e,t){return t.isBlock?`
|
||
|
||
`+t.outerHTML+`
|
||
|
||
`:t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?`
|
||
|
||
`+e+`
|
||
|
||
`:e}};this.options=d_e({},t,e),this.rules=new y6(this.options)}E6.prototype={turndown:function(e){if(!N_e(e))throw TypeError(e+` is not a string, or an element/document/fragment node.`);if(e===``)return``;var t=D6.call(this,new C_e(e,this.options));return j_e.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e==`function`)e(this);else throw TypeError(`plugin must be a Function or an Array of Functions`);return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return m6(e)}};function D6(e){var t=this;return A_e.call(e.childNodes,function(e,n){n=new E_e(n,t.options);var r=``;return n.nodeType===3?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):n.nodeType===1&&(r=M_e.call(t,n)),O6(e,r)},``)}function j_e(e){var t=this;return this.rules.forEach(function(n){typeof n.append==`function`&&(e=O6(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,``).replace(/[\t\r\n\s]+$/,``)}function M_e(e){var t=this.rules.forNode(e),n=D6.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function O6(e,t){var n=o6(e),r=a6(t),i=Math.max(e.length-n.length,t.length-r.length);return n+`
|
||
|
||
`.substring(0,i)+r}function N_e(e){return e!=null&&(typeof e==`string`||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}var k6=async({endpoint:e,headers:t={},apiKey:n,model:r,systemPrompt:i,userMessage:a,temperature:o=.3,maxTokens:s=4e3,reasoning:c=`high`,extraBody:l={}})=>{let u={"Content-Type":`application/json`,Authorization:`Bearer ${n}`,...t},d=await fetch(e,{method:`POST`,headers:u,body:JSON.stringify({model:r,messages:[{role:`system`,content:i},{role:`user`,content:a}],temperature:o,max_tokens:s,stream:!1,reasoning_effort:c,...l})});if(!d.ok){let e=await d.json().catch(()=>({})),t=e.message||e.error?.message||``;throw Error(`Chat Completions API error: ${d.status} ${d.statusText}${t?` - ${t}`:``}`)}let f=await d.json();if(!f.choices||!Array.isArray(f.choices)||!f.choices[0]?.message?.content)throw Error(`Invalid response format from Chat Completions API.`);return f.choices[0].message.content.trim()},P_e=async({endpoint:e,headers:t={},apiKey:n,model:r,systemPrompt:i,userMessage:a,maxTokens:o=4e3,extraBody:s={}})=>{let c={"Content-Type":`application/json`,Authorization:`Bearer ${n}`,...t},l=await fetch(e,{method:`POST`,headers:c,body:JSON.stringify({model:r,instructions:i,input:a,store:!1,max_output_tokens:o,...s})});if(!l.ok){let e=(await l.json().catch(()=>({}))).error?.message||``;throw Error(`Responses API error: ${l.status} ${l.statusText}${e?` - ${e}`:``}`)}let u=await l.json();if(typeof u.output_text==`string`)return u.output_text.trim();let d=(Array.isArray(u.output)?u.output:[]).find(e=>or(e)&&`type`in e&&e.type===`message`&&`content`in e&&Array.isArray(e.content));if(!or(d)||!(`content`in d)||!Array.isArray(d.content))throw Error(`Invalid response format from Responses API.`);let{content:f}=d,p=f.find(e=>or(e)&&`type`in e&&e.type===`output_text`&&`text`in e&&typeof e.text==`string`);if(or(p)&&`text`in p&&typeof p.text==`string`)return p.text.trim();throw Error(`Invalid response format from Responses API.`)},F_e=async({endpoint:e,headers:t={},apiKey:n,model:r,systemPrompt:i,userMessage:a,temperature:o=.3,maxTokens:s=4e3,extraBody:c={}})=>{let l={"Content-Type":`application/json`,...t};!t.Authorization&&!t[`x-api-key`]&&(l[`x-api-key`]=n);let u=await fetch(e,{method:`POST`,headers:l,body:JSON.stringify({model:r,max_tokens:s,temperature:o,system:i,messages:[{role:`user`,content:a}],...c})});if(!u.ok){let e=await u.json().catch(()=>({})),t=e.error?.message||e.message||``;throw Error(`Messages API error: ${u.status} ${u.statusText}${t?` - ${t}`:``}`)}let d=await u.json();if(!d.content||!Array.isArray(d.content)||!d.content[0])throw Error(`Invalid response format from Messages API.`);return d.content[0].text.trim()},I_e=`https://api.anthropic.com/v1/messages`,L_e={"anthropic-version":`2023-06-01`,"anthropic-dangerous-direct-browser-access":`true`},A6=`Anthropic API`,R_e=`https://docs.claude.com/en/api/overview`,z_e=`https://platform.claude.com/settings/keys`,B_e=/sk-ant-api03-[a-zA-Z0-9-_]{80,}/,V_e=async e=>F_e({...e,endpoint:I_e,headers:L_e}),j6=e=>xL(e,{displayLocale:`en`}),H_e=(e,t)=>{let n=[`- CRITICAL: Leave content EXACTLY unchanged within HTML elements that have translate="no"`,`- CRITICAL: Leave content EXACTLY unchanged within HTML elements that have class="notranslate"`,`- CRITICAL: Leave content EXACTLY unchanged between "notranslate" and "/notranslate" comments`,`- Preserve all markdown formatting (headers, links, bold, italic, code blocks, lists, etc.)`,`- Preserve all HTML tags and attributes exactly as they are`,`- Maintain the original structure and formatting`,`- Do not translate code content within code blocks or inline code`,`- Do not translate URLs, email addresses, or technical identifiers`,`- If you see translate="no", class="notranslate", or notranslate comments, copy that content verbatim without any changes`],r=[`- Do not split translations into separate paragraphs or add extra line breaks`,`- Keep each translation as a single continuous text string in the array`],i=[`- Return your response as a valid JSON array containing the translated texts`,`- The array should contain the translated texts in the same order as provided`,`- VALIDATION: Before responding, double-check that any translate="no", class="notranslate", or notranslate comment content remains EXACTLY the same`];return`You are a professional translator. Translate the given texts from ${e} to ${t}. Your response must be valid JSON that can be parsed directly.
|
||
|
||
IMPORTANT INSTRUCTIONS:\n${[...n,...r,...i].join(`
|
||
`)}\n\nOUTPUT FORMAT:
|
||
- Output ONLY valid JSON, nothing else
|
||
- Do NOT use markdown code blocks or formatting
|
||
- Do NOT add any explanation or commentary
|
||
- Your entire response should be parseable by JSON.parse()
|
||
- Start your response with [ and end with ]
|
||
|
||
Required JSON structure:
|
||
["translation 1", "translation 2", ...]`},U_e=e=>`Translate these texts and return ONLY valid JSON (no markdown, no code blocks):
|
||
${JSON.stringify(e)}\n\nRespond with JSON only:`,W_e=(e,t,n)=>{let r;try{r=JSON.parse(e)}catch{throw Error(`Failed to parse JSON response from ${n}.`)}if(!Array.isArray(r))throw Error(`Invalid JSON structure in ${n} response.`);if(r.length!==t)throw Error(`Translation count mismatch: expected ${t}, got ${r.length}`);return r},M6=async({sourceLanguage:e,targetLanguage:t})=>!!j6(e)&&!!j6(t),G_e=(e,t)=>{let n=j6(e),r=j6(t);if(!n)throw Error(`Source locale is not supported.`);if(!r)throw Error(`Target locale is not supported.`);return[n,r]},N6=(e,t,n,r={})=>async(i,{sourceLanguage:a,targetLanguage:o,apiKey:s})=>{let[c,l]=G_e(a,o);try{return W_e(await e({apiKey:s,model:t,systemPrompt:H_e(c,l),userMessage:U_e(i),...r}),i.length,n)}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with ${n}.`)}},K_e={serviceId:`anthropic`,serviceLabel:`Anthropic Claude`,apiLabel:A6,developerURL:R_e,apiKeyURL:z_e,apiKeyPattern:B_e,markdownSupported:!0,availability:M6,translate:N6(V_e,`claude-haiku-4-5`,A6)},q_e=`https://api.deepseek.com/chat/completions`,P6=`DeepSeek API`,J_e={serviceId:`deepseek`,serviceLabel:`DeepSeek`,apiLabel:P6,developerURL:`https://api-docs.deepseek.com/`,apiKeyURL:`https://platform.deepseek.com/api_keys`,apiKeyPattern:/sk-[a-zA-Z0-9]{32,}/,markdownSupported:!0,availability:M6,translate:N6(async e=>k6({...e,endpoint:q_e,extraBody:{thinking:{type:e.reasoning===`none`?`disabled`:`enabled`}}}),`deepseek-v4-flash`,P6,{reasoning:`none`})},Y_e=`google`,X_e=`Google Cloud Translation`,Z_e=`Cloud Translation API`,Q_e=`https://console.cloud.google.com/apis/library/translate.googleapis.com`,$_e=`https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials`,eve=/AIza[0-9A-Za-z-_]{35}/,F6=[`ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az`,`ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua`,`ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy`,`da,de,din,doi,dov,dv,dz`,`ee,el,en,eo,es,et,eu`,`fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy`,`ga,gaa,gd,gl,gn,gom,gu`,`ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy`,`id,ig,ilo,is,it,iw`,`ja,jv,jw`,`ka,kk,km,kn,ko,kri,ktu,ku,ky`,`la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv`,`mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my`,`ne,new,nl,no,nr,nso,nus,ny`,`oc,om,or`,`pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT`,`qu`,`rn,ro,rom,ru,rw`,`sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl`,`ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt`,`ug,uk,ur,uz`,`vi`,`xh`,`yi,yo,yua,yue`,`zh,zh-CN,zh-TW,zu`].join(`,`).split(`,`),I6=e=>{let t=e.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(e,t,n)=>`${t.toLowerCase()}-${n.toUpperCase()}`);if(F6.includes(t))return t;if([`zh-HK`,`zh-MO`].includes(t))return`zh-TW`;let[n]=t.split(`-`);if(F6.includes(n))return n},L6={serviceId:Y_e,serviceLabel:X_e,apiLabel:Z_e,developerURL:Q_e,apiKeyURL:$_e,apiKeyPattern:eve,markdownSupported:!1,availability:async({sourceLanguage:e,targetLanguage:t})=>!!I6(e)&&!!I6(t),translate:async(e,{sourceLanguage:t,targetLanguage:n,apiKey:r})=>{if(t=I6(t)??``,n=I6(n)??``,!t)throw Error(`Source locale is not supported.`);if(!n)throw Error(`Target locale is not supported.`);let i={q:e,source:t,target:n,format:`html`};try{let e=await fetch(`https://translation.googleapis.com/language/translate/v2`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-goog-api-key":r},body:JSON.stringify(i)});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(`Google Translate API error: ${e.status} ${e.statusText}${t.error?.message?` - ${t.error.message}`:``}`)}let{data:t}=await e.json();return t.translations.map(e=>e.translatedText.replace(/'/g,`'`))}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with Google Translate API.`)}}},R6=`Gemini API`,tve={serviceId:`google-ai`,serviceLabel:`Google Gemini`,apiLabel:R6,developerURL:`https://ai.google.dev/gemini-api/docs`,apiKeyURL:`https://aistudio.google.com/api-keys`,apiKeyPattern:/AIza[a-zA-Z0-9_-]{35}/,markdownSupported:!0,availability:M6,translate:N6(async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,responseFormat:o})=>{let s=`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e}`,c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({system_instruction:{parts:[{text:n}]},contents:[{parts:[{text:r}]}],generationConfig:{temperature:i,maxOutputTokens:a,...o?{responseMimeType:o}:{}}})});if(!c.ok){let e=await c.json().catch(()=>({}));throw Error(`Gemini API error: ${c.status} ${c.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let l=await c.json();if(!Array.isArray(l.candidates)||!l.candidates[0]?.content?.parts?.[0])throw Error(`Invalid response format from Gemini API.`);return l.candidates[0].content.parts[0].text.trim()},`gemini-3.5-flash-lite`,R6,{responseFormat:`application/json`})},nve=`https://api.mistral.ai/v1/chat/completions`,z6=`Mistral AI API`,rve={serviceId:`mistral`,serviceLabel:`Mistral`,apiLabel:z6,developerURL:`https://docs.mistral.ai/`,apiKeyURL:`https://console.mistral.ai/home?profile_dialog=api-keys`,apiKeyPattern:/[a-zA-Z0-9]{32,}/,markdownSupported:!0,availability:M6,translate:N6(async e=>k6({...e,endpoint:nve}),`mistral-small-latest`,z6,{reasoning:`none`})},ive=`https://api.openai.com/v1/responses`,B6=`OpenAI API`,V6={anthropic:K_e,deepseek:J_e,google:L6,"google-ai":tve,mistral:rve,openai:{serviceId:`openai`,serviceLabel:`OpenAI GPT`,apiLabel:B6,developerURL:`https://platform.openai.com/docs/overview`,apiKeyURL:`https://platform.openai.com/api-keys`,apiKeyPattern:/sk-[a-zA-Z0-9-_]{40,}/,markdownSupported:!0,availability:M6,translate:N6(async e=>P_e({...e,endpoint:ive}),`gpt-5.6-luna`,B6)}},H6=Hj(()=>{let{defaultTranslationService:e=`google`}=KH;return V6[e]??L6}),U6=new E6({headingStyle:`atx`,bulletListMarker:`-`,codeBlockStyle:`fenced`});U6.keep([`span`,`div`]);var ave=({draft:e,options:t})=>{let{collectionName:n,fileName:r,currentValues:i,isIndexFile:a}=e,{sourceLanguage:o,targetLanguage:s,keyPath:c=``,translate:l=!1}=t,u=i[o],d={collectionName:n,fileName:r,valueMap:u,isIndexFile:a};return Object.fromEntries(Object.entries(u).map(([e,t])=>{let n=i[s][e],r=YB({...d,keyPath:e}),a=r?.widget??`string`;return c&&!e.startsWith(c)||typeof t!=`string`||!t||![`richtext`,`markdown`,`text`,`string`,`list`].includes(a)||a===`list`&&U3(r).hasSubFields||!l&&t===n||!c&&l&&n?null:[e,{value:t,isMarkdown:a===`richtext`||a===`markdown`}]}).filter(e=>!!e))},W6=(e,t,{count:n,sourceLanguage:r})=>{EY.set({id:Date.now(),show:!0,status:e,message:t,count:n,sourceLanguage:r})},ove=async({currentValues:e,options:t,copingFieldMap:n})=>{let{serviceId:r}=A(H6),{sourceLanguage:i,targetLanguage:a}=t,o=Object.keys(n).length,s=KH.apiKeys?.[r];if(!s){let{promise:e,resolve:t}=Promise.withResolvers();TY.set({show:!0,multiple:o>1,resolve:t}),s=await e}if(!s)return;let{markdownSupported:c,translate:l}=A(H6);W6(`info`,`translation.started`,{count:o,sourceLanguage:i});try{let t=await l(Object.entries(n).map(([,{value:e,isMarkdown:t}])=>t&&!c?ir(e):e),{apiKey:s,sourceLanguage:i,targetLanguage:a});Object.entries(n).forEach(([n,{isMarkdown:r}],i)=>{let o=t[i];e[a][n]=r&&!c?U6.turndown(o):o}),W6(`success`,`translation.complete`,{count:o,sourceLanguage:i})}catch(e){W6(`error`,`translation.error`,{count:o,sourceLanguage:i}),console.error(e)}},sve=({currentValues:e,options:t,copingFieldMap:n})=>{let{sourceLanguage:r,targetLanguage:i}=t,a=Object.keys(n).length;Object.entries(n).forEach(([t,{value:n}])=>{e[i][t]=n}),W6(`success`,`copy.complete`,{count:a,sourceLanguage:r})},G6=async e=>{let{sourceLanguage:t,translate:n=!1}=e,r=A(h4),{currentValues:i}=r,a=ave({draft:r,options:e}),o=Object.keys(a).length;if(!o){W6(`info`,`${n?`translation`:`copy`}.none`,{count:o,sourceLanguage:t});return}n?await ove({currentValues:i,options:e,copingFieldMap:a}):sve({currentValues:i,options:e,copingFieldMap:a}),h4.update(e=>({...e,currentValues:i}))},K6=new Map;h4.subscribe(()=>{K6.clear()});var q6=(e,t,n=`currentValues`)=>{if(!e)return{};let r=`${n}\n${t}`,i=K6.get(r);if(i)return i;let a=Ni(e[n]?.[t])??{};return K6.set(r,a),a};function J6(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,i),r=()=>j(H6,`$translator`,i),[i,a]=sa(),o=X(t,`keyPath`,3,``),s=X(t,`translate`,3,!1),c=async({sourceLanguage:e,targetLanguage:t})=>!n()?.currentLocales[t]||!n().currentLocales[e]||!!o()&&!q6(n(),e)[o()]||!s()&&!!o()&&q6(n(),e)[o()]===q6(n(),t)[o()]||s()&&!await r()?.availability({sourceLanguage:e,targetLanguage:t});var l=W();Cc(L(l),16,()=>t.otherLocales,e=>e,(e,n)=>{let r=N(()=>({sourceLanguage:n,targetLanguage:t.locale}));var i=W();hc(L(i),()=>c(H(r)),null,(e,t)=>{{let i=N(()=>Z(s()?`translate_from_x`:`copy_from_x`,{values:{locale:xL(n)}}));Sm(e,{get label(){return H(i)},get disabled(){return H(t)},onclick:()=>{G6({...H(r),keyPath:o(),translate:s()})}})}}),G(e,i)}),G(e,l),k(),a()}var cve=new Set([`$$slots`,`$$events`,`$$legacy`,`children`]),lve=U(`<section><!></section>`),uve={hash:`svelte-wzztxu`,code:`section.svelte-wzztxu {position:relative;padding:var(--field-editor-padding);&:not(:last-child)::after {position:absolute;inset:auto var(--field-editor-padding) 0 var(--field-editor-padding);overflow:hidden;height:1px;background-color:var(--sui-tertiary-background-color);content:'';}& > * {margin-inline:auto !important;max-width:768px;}& > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);h4 {margin-inline:var(--sui-focus-ring-width) 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}.required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}}
|
||
|
||
@media (hover: hover) {&:not(:hover) > header button {opacity:0;}
|
||
}}`};function Y6(e,t){O(t,!0),J(e,uve);let n=X(t,`children`,3,void 0),r=Al(t,cve),i=P(void 0);Nl(()=>()=>{H(i)?.dispatchEvent(new CustomEvent(`Unmount`))});var a=lve();bl(a,()=>({role:`group`,class:`field`,...r}),void 0,void 0,void 0,`svelte-wzztxu`),Ac(I(a),()=>n()??br),D(a),Ol(a,e=>F(i,e),()=>H(i)),G(e,a),k()}function X6(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,i),r=()=>j(H6,`$translator`,i),[i,a]=sa(),o=X(t,`size`,3,`medium`),s=X(t,`keyPath`,3,``),c=N(()=>!n()?.currentLocales[t.locale]||lX(n()?.originalEntry)),l=async({sourceLanguage:e,targetLanguage:t})=>H(c)||!n()?.currentLocales[e]||!await r()?.availability({sourceLanguage:e,targetLanguage:t});var u=W(),d=L(u),f=e=>{let n=N(()=>{let[e]=t.otherLocales;return{otherLocale:e}}),r=N(()=>Z(`translate_from_x`,{values:{locale:xL(H(n).otherLocale)??H(n).otherLocale}})),i=N(()=>({sourceLanguage:H(n).otherLocale,targetLanguage:t.locale}));var a=W();hc(L(a),()=>l(H(i)),null,(e,t)=>{$f(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(r)},get title(){return H(r)},get disabled(){return H(t)},onclick:()=>{G6({...H(i),keyPath:s(),translate:!0})},startIcon:e=>{Rl(e,{name:`translate`})},$$slots:{startIcon:!0}})}),G(e,a)},p=e=>{{let n=e=>{Rl(e,{name:`translate`})},r=e=>{{let n=N(()=>Z(`translation_options`));xm(e,{get"aria-label"(){return H(n)},children:(e,n)=>{J6(e,{get locale(){return t.locale},get otherLocales(){return t.otherLocales},get keyPath(){return s()},translate:!0})},$$slots:{default:!0}})}},i=N(()=>Z(`translate`));Ip(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(i)},get disabled(){return H(c)},endIcon:n,popup:r,$$slots:{endIcon:!0,popup:!0}})}};q(d,e=>{t.otherLocales.length===1?e(f):e(p,-1)}),G(e,u),k(),a()}var dve=U(`<div role="alert" class="validation svelte-6wra4i"><div role="none" class="svelte-6wra4i"><!> <!></div></div>`),fve={hash:`svelte-6wra4i`,code:`.validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0 0;.icon {flex:none;font-size:16px; /* !hardcoded */}}}`};function Z6(e,t){J(e,fve);let n=X(t,`id`,3,void 0),r=X(t,`live`,3,`polite`);var i=dve(),a=I(i),o=I(a);Rl(o,{name:`error`}),Ac(z(o,2),()=>t.children),D(a),D(i),V(()=>{Y(i,`id`,n()),Y(i,`aria-live`,r())}),G(e,i)}function pve(e,t){O(t,!0);let n=X(t,`currentValue`,15),r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1);sh(e,{get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get checked(){return n()},set checked(e){n(e)}}),k()}var mve=U(`<p> </p>`);function hve(e,t){O(t,!0);let n=X(t,`currentValue`,3,!1);var r=W(),i=L(r),a=e=>{var t=mve(),r=R(t,!0);V(e=>K(r,e),[()=>Z(`boolean.${n()}`)]),G(e,t)};q(i,e=>{typeof n()==`boolean`&&e(a)}),G(e,r),k()}function gve(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),{valueStoreKey:a=`currentValues`}=zi(`field-editor`)??{},o=X(t,`currentValue`,15),s=X(t,`required`,3,!0),c=X(t,`readonly`,3,!1),l=X(t,`invalid`,3,!1),u=P(``),d=P(``),f=N(()=>wr(t.fieldConfig.default_language,`plain`)),p=N(()=>wr(t.fieldConfig.allow_language_selection,!0)),m=N(()=>wr(t.fieldConfig.output_code_only,!1)),h=N(()=>wr(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),g=N(()=>q6(n(),t.locale,a)),_=N(()=>`${t.keyPath}.${H(h).code}`),v=N(()=>`${t.keyPath}.${H(h).lang}`),y=()=>{if(H(m))typeof o()==`string`?H(u)!==o()&&F(u,o(),!0):F(u,``),F(d,H(f),!0);else{let e=H(g)[H(_)],t=H(g)[H(v)]||H(f);typeof e==`string`?H(u)!==e&&F(u,e,!0):F(u,``),typeof t==`string`?H(d)!==t&&F(d,t,!0):F(d,``)}},b=()=>{H(m)?o()!==H(u)&&o(H(u)):n()&&((!or(H(g)[t.keyPath])||Object.keys(H(g)[t.keyPath]).length)&&la(h4,Ds(n)[a][t.locale][t.keyPath]={},Ds(n)),H(g)[H(_)]!==H(u)&&la(h4,Ds(n)[a][t.locale][H(_)]=H(u),Ds(n)),H(g)[H(v)]!==H(d)&&la(h4,Ds(n)[a][t.locale][H(v)]=H(d),Ds(n)))};B(()=>{H(g),Ds(()=>{y()})}),B(()=>{H(u),H(d),Ds(()=>{b()})});var x=W();hc(L(x),vf,null,e=>{var n=W();_c(L(n),()=>JSON.stringify(t.fieldConfig),e=>{Qie(e,{get showLanguageSwitcher(){return H(p)},flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get code(){return H(u)},set code(e){F(u,e,!0)},get lang(){return H(d)},set lang(e){F(d,e,!0)}})}),G(e,n)}),G(e,x),k(),i()}var _ve=U(`<pre> </pre>`);function vve(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>wr(t.fieldConfig.default_language,``)),o=N(()=>wr(t.fieldConfig.output_code_only,!1)),s=N(()=>wr(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),c=N(()=>q6(n(),t.locale)),l=N(()=>`${t.keyPath}.${H(s).code}`),u=N(()=>`${t.keyPath}.${H(s).lang}`),d=N(()=>H(o)?t.currentValue:H(c)[H(l)]),f=N(()=>H(o)?H(a):H(c)[H(u)]);var p=W(),m=L(p),h=e=>{var t=_ve(),n=R(t,!0);V(()=>{el(t,1,Jc(H(f)?`language-${H(f)}`:void 0)),K(n,H(d))}),G(e,t)};q(m,e=>{H(d)&&e(h)}),G(e,p),k(),i()}var yve=U(` <!>`,1),bve=U(`<span role="none" class="value svelte-udhsyb"><!> <!></span>`),xve=U(`<div role="none" class="svelte-udhsyb"><input type="color" class="svelte-udhsyb"/> <!> <!></div>`),Sve={hash:`svelte-udhsyb`,code:`div.svelte-udhsyb {display:flex;align-items:center;gap:8px;.value:where(.svelte-udhsyb) {display:flex;align-items:center;gap:8px;.sui.text-input {width:88px;min-width:0;}.sui.slider {padding:8px;--sui-slider-base-width: 80px;}}}input.svelte-udhsyb {font-family:var(--sui-textbox-font-family);}`};function Cve(e,t){let n=tc();O(t,!0),J(e,Sve);let r=X(t,`currentValue`,15),i=X(t,`required`,3,!0),a=X(t,`readonly`,3,!1),o=X(t,`invalid`,3,!1),s=P(``),c=P(255),l=N(()=>wr(t.fieldConfig.allowInput,!1)),u=N(()=>wr(t.fieldConfig.enableAlpha,!1)),d=/^#[0-9a-f]{6}$/i,f=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/i,p=()=>{if(typeof r()!=`string`)return;let{rgb:e,a:t=`ff`}=r().match(f)?.groups??{};if(e&&H(s)!==e&&F(s,e,!0),e&&H(u)){let e=Number.parseInt(`0x${t}`,16);H(c)!==e&&F(c,e,!0)}},m=()=>{let e=d.test(H(s))?H(s):``;e&&H(u)&&(e+=H(c).toString(16).padStart(2,`0`)),r()!==e&&r(e)};B(()=>{r(),Ds(()=>{p()})}),B(()=>{H(s),H(c),Ds(()=>{m()})});var h=xve(),g=I(h);vl(g);var _=z(g,2),v=e=>{var r=bve(),d=I(r),f=e=>{fm(e,{dir:`ltr`,get id(){return`${n}-input`},get invalid(){return o()},get readonly(){return a()},get required(){return i()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get value(){return H(s)},set value(e){F(s,e,!0)}})};q(d,e=>{H(l)&&e(f)});var p=z(d,2),m=e=>{var t=yve(),n=L(t),r=z(n);{let e=N(()=>!H(s)),t=N(()=>Z(`opacity`));rh(r,{min:0,max:255,get disabled(){return H(e)},get"aria-label"(){return H(t)},get value(){return H(c)},set value(e){F(c,e,!0)}})}V(e=>K(n,`${e??``} `),[()=>Z(`opacity`)]),G(e,t)};q(p,e=>{H(u)&&e(m)}),D(r),G(e,r)};q(_,e=>{(H(l)||H(u))&&e(v)});var y=z(_,2),b=e=>{{let t=N(()=>Z(`clear`)),r=N(()=>!H(s)),i=N(()=>`${n}-picker ${H(l)?`${n}-input`:``}`);$f(e,{variant:`tertiary`,get label(){return H(t)},get disabled(){return H(r)},get"aria-controls"(){return H(i)},onclick:()=>{F(s,``),F(c,255)}})}};q(y,e=>{!a()&&!i()&&e(b)}),D(h),V(()=>{Y(g,`id`,`${n}-picker`),g.readOnly=a(),Y(g,`aria-invalid`,o()),Y(g,`aria-readonly`,a()),Y(g,`aria-required`,i()),Y(g,`aria-labelledby`,`${t.fieldId??``}-label`),Y(g,`aria-errormessage`,`${t.fieldId??``}-error`)}),wl(g,()=>H(s),e=>F(s,e)),G(e,h),k()}var wve=U(`<p><span role="none" class="preview svelte-1m6xsa0"><span role="none" class="color svelte-1m6xsa0"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>`),Tve={hash:`svelte-1m6xsa0`,code:`.preview.svelte-1m6xsa0 {display:inline-flex;align-items:center;gap:8px;.color:where(.svelte-1m6xsa0) {display:block;width:24px;height:24px;border-radius:24px;}}`};function Eve(e,t){O(t,!0),J(e,Tve);let n=N(()=>wr(t.fieldConfig.enableAlpha,!1)),r=e=>Number.parseInt(`0x${e}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/i,a=N(()=>{let{r:e,g:a,b:o,a:s}=t.currentValue?.match(i)?.groups??{};return e?`rgb(${r(e)} ${r(a)} ${r(o)}${H(n)&&s?` / ${Math.round(r(s)/255*100)}%`:``})`:``});var o=W(),s=L(o),c=e=>{var n=wve(),r=I(n),i=I(r);let o;var s=z(i,2),c=R(s,!0),l=R(z(s,2),!0);D(r),D(n),V(()=>{o=nl(i,``,o,{"background-color":t.currentValue}),K(c,t.currentValue),K(l,H(a))}),G(e,n)},l=N(()=>typeof t.currentValue==`string`&&t.currentValue.trim());q(s,e=>{H(l)&&e(c)}),G(e,o),k()}function Dve(e,t){O(t,!0);let n=X(t,`required`,3,!0),r=X(t,`readonly`,3,!1),i=X(t,`invalid`,3,!1);{let a=N(()=>String(t.currentValue));fm(e,{dir:`auto`,get value(){return H(a)},flex:!0,get readonly(){return r()},get required(){return n()},get invalid(){return i()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`}})}k()}var Ove=U(`<p> </p>`);function kve(e,t){O(t,!0);var n=Ove(),r=R(n,!0);V((e,i)=>{Y(n,`lang`,e),Y(n,`dir`,i),K(r,t.currentValue),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale)]),G(e,n),k()}
|
||
/**
|
||
* @license React
|
||
* scheduler.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
var Ave=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=ee,te=function(){re.postMessage(null)}}else te=function(){_(ee,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),jve=s(((e,t)=>{t.exports=Ave()})),Mve=s((e=>{
|
||
/**
|
||
* @license React
|
||
* react-dom.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),Nve=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Mve()})),Pve=s((e=>{
|
||
/**
|
||
* @license React
|
||
* react-dom-client.production.js
|
||
*
|
||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
var t=jve(),n=d(),r=Nve();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,se=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function me(e,t){de++,ue[de]=e.current,e.current=t}var he=fe(null),ge=fe(null),_e=fe(null),ve=fe(null);function ye(e,t){switch(me(_e,t),me(ge,e),me(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(he),me(he,e)}function be(){pe(he),pe(ge),pe(_e)}function xe(e){e.memoizedState!==null&&me(ve,e);var t=he.current,n=Ud(t,e.type);t!==n&&(me(ge,e),me(he,n))}function Se(e){ge.current===e&&(pe(he),pe(ge)),ve.current===e&&(pe(ve),Qf._currentValue=le)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
|
||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||
`+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||
`),l=s.split(`
|
||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ee=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Te(n):``}function Oe(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te(`Lazy`);case 13:return e.child!==t&&t!==null?Te(`Suspense Fallback`):Te(`Suspense`);case 19:return Te(`SuspenseList`);case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return Te(`Activity`);default:return``}}function ke(e){try{var t=``,n=null;do t+=Oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||
Error generating stack: `+e.message+`
|
||
`+e.stack}}var Ae=Object.prototype.hasOwnProperty,je=t.unstable_scheduleCallback,Me=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,Pe=t.unstable_requestPaint,Fe=t.unstable_now,Ie=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,Re=t.unstable_UserBlockingPriority,ze=t.unstable_NormalPriority,Be=t.unstable_LowPriority,Ve=t.unstable_IdlePriority,He=t.log,Ue=t.unstable_setDisableYieldValue,We=null,Ge=null;function Ke(e){if(typeof He==`function`&&Ue(e),Ge&&typeof Ge.setStrictMode==`function`)try{Ge.setStrictMode(We,e)}catch{}}var qe=Math.clz32?Math.clz32:Xe,Je=Math.log,Ye=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(Je(e)/Ye|0)|0}var Ze=256,Qe=262144,$e=4194304;function et(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=et(n))):i=et(o):i=et(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=et(n))):i=et(o)):i=et(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function nt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var e=$e;return $e<<=1,!($e&62914560)&&($e=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-qe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-qe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-qe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ut(e,t){var n=t&-t;return n=n&42?1:dt(n),(n&(e.suspendedLanes|t))===0?n:0}function dt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=ce.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function mt(e,t){var n=ce.p;try{return ce.p=e,t()}finally{ce.p=n}}var ht=Math.random().toString(36).slice(2),gt=`__reactFiber$`+ht,_t=`__reactProps$`+ht,vt=`__reactContainer$`+ht,yt=`__reactEvents$`+ht,bt=`__reactListeners$`+ht,xt=`__reactHandles$`+ht,St=`__reactResources$`+ht,Ct=`__reactMarker$`+ht;function wt(e){delete e[gt],delete e[_t],delete e[yt],delete e[bt],delete e[xt]}function Tt(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[gt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Et(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ot(e){var t=e[St];return t||=e[St]={hoistableStyles:new Map,hoistableScripts:new Map},t}function kt(e){e[Ct]=!0}var At=new Set,jt={};function Mt(e,t){Nt(e,t),Nt(e+`Capture`,t)}function Nt(e,t){for(jt[e]=t,e=0;e<t.length;e++)At.add(t[e])}var Pt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ft={},It={};function Lt(e){return Ae.call(It,e)?!0:Ae.call(Ft,e)?!1:Pt.test(e)?It[e]=!0:(Ft[e]=!0,!1)}function Rt(e,t,n){if(Lt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Bt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Vt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ut(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wt(e){if(!e._valueTracker){var t=Ht(e)?`checked`:`value`;e._valueTracker=Ut(e,t,``+e[t])}}function Gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ht(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var qt=/[\n"\\]/g;function Jt(e){return e.replace(qt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Yt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Vt(t)):e.value!==``+Vt(t)&&(e.value=``+Vt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Zt(e,o,Vt(n)):Zt(e,o,Vt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Vt(s):e.removeAttribute(`name`)}function Xt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Wt(e);return}n=n==null?``:``+Vt(n),t=t==null?n:``+Vt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Wt(e)}function Zt(e,t,n){t===`number`&&Kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $t(e,t,n){if(t!=null&&(t=``+Vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Vt(n)}function en(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(oe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Vt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Wt(e)}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function rn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||nn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function an(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&rn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&rn(e,o,t[o])}function on(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var sn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ln(e){return cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function un(){}var dn=null;function fn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pn=null,mn=null;function hn(e){var t=Et(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[_t]||null;if(!a)throw Error(i(90));Yt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Gt(r)}break a;case`textarea`:$t(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Qt(e,!!n.multiple,t,!1)}}}var gn=!1;function _n(e,t,n){if(gn)return e(t,n);gn=!0;try{return e(t)}finally{if(gn=!1,(pn!==null||mn!==null)&&(vu(),pn&&(t=pn,e=mn,mn=pn=null,hn(t),e)))for(t=0;t<e.length;t++)hn(e[t])}}function vn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var yn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),bn=!1;if(yn)try{var xn={};Object.defineProperty(xn,"passive",{get:function(){bn=!0}}),window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=null,Cn=null,wn=null;function Tn(){if(wn)return wn;var e,t=Cn,n=t.length,r,i=`value`in Sn?Sn.value:Sn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return wn=i.slice(e,1<r?1-r:void 0)}function En(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dn(){return!0}function On(){return!1}function kn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Dn:On,this.isPropagationStopped=On,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Dn)},persist:function(){},isPersistent:Dn}),t}var An={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jn=kn(An),Mn=p({},An,{view:0,detail:0}),Nn=kn(Mn),Pn,Fn,In,Ln=p({},Mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==In&&(In&&e.type===`mousemove`?(Pn=e.screenX-In.screenX,Fn=e.screenY-In.screenY):Fn=Pn=0,In=e),Pn)},movementY:function(e){return`movementY`in e?e.movementY:Fn}}),Rn=kn(Ln),zn=kn(p({},Ln,{dataTransfer:0})),Bn=kn(p({},Mn,{relatedTarget:0})),Vn=kn(p({},An,{animationName:0,elapsedTime:0,pseudoElement:0})),Hn=kn(p({},An,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Un=kn(p({},An,{data:0})),Wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Gn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kn[e])?!!t[e]:!1}function Jn(){return qn}var Yn=kn(p({},Mn,{key:function(e){if(e.key){var t=Wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=En(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Gn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jn,charCode:function(e){return e.type===`keypress`?En(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?En(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Xn=kn(p({},Ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Zn=kn(p({},Mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jn})),Qn=kn(p({},An,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=kn(p({},Ln,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),er=kn(p({},An,{newState:0,oldState:0})),tr=[9,13,27,32],nr=yn&&`CompositionEvent`in window,rr=null;yn&&`documentMode`in document&&(rr=document.documentMode);var ir=yn&&`TextEvent`in window&&!rr,ar=yn&&(!nr||rr&&8<rr&&11>=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=Tn(),wn=Cn=Sn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ar&&t.locale!==`ko`?null:t.data;default:return null}}var pr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function hr(e,t,n,r){pn?mn?mn.push(r):mn=[r]:pn=r,t=Ed(t,`onChange`),0<t.length&&(n=new jn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){vd(e,0)}function yr(e){if(Gt(Dt(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(yn){var Sr;if(yn){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,fn(e)),_n(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ae.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kt(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=yn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Kt(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Nr(Hr,r)||(Hr=r,r=Ed(Vr,`onSelect`),0<r.length&&(t=new jn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionrun:Gr(`Transition`,`TransitionRun`),transitionstart:Gr(`Transition`,`TransitionStart`),transitioncancel:Gr(`Transition`,`TransitionCancel`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};yn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),ni=Yr(`transitionend`),ri=new Map,ii=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ii.push(`scrollEnd`);function ai(e,t){ri.set(e,t),Mt(t,[e])}var oi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},si=[],ci=0,li=0;function ui(){for(var e=ci,t=li=ci=0;t<e;){var n=si[t];si[t++]=null;var r=si[t];si[t++]=null;var i=si[t];si[t++]=null;var a=si[t];if(si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&D(n,i,a)}}function di(e,t,n,r){si[ci++]=e,si[ci++]=t,si[ci++]=n,si[ci++]=r,li|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function fi(e,t,n,r){return di(e,t,n,r),mi(e)}function pi(e,t){return di(e,null,null,t),mi(e)}function D(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-qe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function mi(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hi={};function gi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,n,r){return new gi(e,t,n,r)}function vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yi(e,t){var n=e.alternate;return n===null?(n=_i(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)vi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,he.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=_i(31,n,t,a),e.elementType=ee,e.lanes=o,e;case _:return Si(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=_i(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case C:return e=_i(13,n,t,a),e.elementType=C,e.lanes=o,e;case w:return e=_i(19,n,t,a),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=_i(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Si(e,t,n,r){return e=_i(7,e,r,t),e.lanes=n,e}function Ci(e,t,n){return e=_i(6,e,null,t),e.lanes=n,e}function wi(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function Ti(e,t,n){return t=_i(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ei=new WeakMap;function Di(e,t){if(typeof e==`object`&&e){var n=Ei.get(e);return n===void 0?(t={value:e,source:t,stack:ke(t)},Ei.set(e,t),t):n}return{value:e,source:t,stack:ke(t)}}var Oi=[],ki=0,Ai=null,ji=0,Mi=[],Ni=0,Pi=null,Fi=1,Ii=``;function Li(e,t){Oi[ki++]=ji,Oi[ki++]=Ai,Ai=e,ji=t}function Ri(e,t,n){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Pi=e;var r=Fi;e=Ii;var i=32-qe(r)-1;r&=~(1<<i),n+=1;var a=32-qe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Fi=1<<32-qe(t)+i|n<<i|r,Ii=a+e}else Fi=1<<a|n<<i|r,Ii=e}function zi(e){e.return!==null&&(Li(e,1),Ri(e,1,0))}function Bi(e){for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null;for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Ii=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null}function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Fi=t.id,Ii=t.overflow,Pi=e}var O=null,k=null,Hi=!1,Ui=null,Wi=!1,Gi=Error(i(519));function Ki(e){throw Qi(Di(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Gi}function qi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),Xt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),en(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||Ki(e,!0)}function Ji(e){for(O=e.return;O;)switch(O.tag){case 5:case 31:case 13:Wi=!1;return;case 27:case 3:Wi=!0;return;default:O=O.return}}function Yi(e){if(e!==O)return!1;if(!Hi)return Ji(e),Hi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Wd(e.type,e.memoizedProps)),n=!n),n&&k&&Ki(e),Ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));k=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));k=uf(e)}else t===27?(t=k,Zd(e.type)?(e=lf,lf=null,k=e):k=t):k=O?cf(e.stateNode.nextSibling):null;return!0}function Xi(){k=O=null,Hi=!1}function Zi(){var e=Ui;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ui=null),e}function Qi(e){Ui===null?Ui=[e]:Ui.push(e)}var $i=fe(null),ea=null,ta=null;function na(e,t,n){me($i,t._currentValue),t._currentValue=n}function ra(e){e._currentValue=$i.current,pe($i)}function A(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ia(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),A(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),A(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function aa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Mr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ve.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ia(t,e,n,r),t.flags|=262144}function oa(e){for(e=e.firstContext;e!==null;){if(!Mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function j(e){ea=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function M(e){return ca(ea,e)}function sa(e,t){return ea===null&&j(e),ca(e,t)}function ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ta===null){if(e===null)throw Error(i(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return n}var la=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ua=t.unstable_scheduleCallback,da=t.unstable_NormalPriority,fa={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pa(){return{controller:new la,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&ua(da,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function ya(e,t){if(ha===null){var n=ha=[];ga=0,_a=ud(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ba,ba),t}function ba(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Sa=se.S;se.S=function(e,t){Ql=Fe(),typeof t==`object`&&t&&typeof t.then==`function`&&ya(e,t),Sa!==null&&Sa(e,t)};var Ca=fe(null);function wa(){var e=Ca.current;return e===null?Nl.pooledCache:e}function N(e,t){t===null?me(Ca,Ca.current):me(Ca,t.pool)}function Ta(){var e=wa();return e===null?null:{parent:fa._currentValue,pool:e}}var Ea=Error(i(460)),Da=Error(i(474)),Oa=Error(i(542)),ka={then:function(){}};function Aa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ja(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(un,un),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e;default:if(typeof t.status==`string`)t.then(un,un);else{if(e=Nl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Fa(e),e}throw Na=t,Ea}}function Ma(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Na=e,Ea):e}}var Na=null;function Pa(){if(Na===null)throw Error(i(459));var e=Na;return Na=null,e}function Fa(e){if(e===Ea||e===Oa)throw Error(i(483))}var Ia=null,La=0;function Ra(e){var t=La;return La+=1,Ia===null&&(Ia=[]),ja(Ia,e,t)}function za(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ba(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Va(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=yi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ci(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&Ma(i)===t.type)?(t=a(t,n.props),za(t,n),t.return=e,t):(t=xi(n.type,n.key,n.props,null,e.mode,r),za(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ti(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Si(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=xi(t.type,t.key,t.props,null,e.mode,n),za(n,t),n.return=e,n;case g:return t=Ti(t,e.mode,n),t.return=e,t;case E:return t=Ma(t),f(e,t,n)}if(oe(t)||re(t))return t=Si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ra(t),n);if(t.$$typeof===x)return f(e,sa(e,t),n);Ba(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=Ma(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ra(n),r);if(n.$$typeof===x)return p(e,t,sa(e,n),r);Ba(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=Ma(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ra(r),i);if(r.$$typeof===x)return m(e,t,n,sa(t,r),i);Ba(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Hi&&Li(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Hi&&Li(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Hi&&Li(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Hi&&Li(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Hi&&Li(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Hi&&Li(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=Si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=xi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ti(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ma(o),b(e,r,o,c)}if(oe(o))return v(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ra(o),c);if(o.$$typeof===x)return b(e,r,sa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=b(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=_i(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mi(e),D(e,null,n),t}return di(e,r,t,n),mi(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=va;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Fl&f)===f:(r&f)===f){f!==0&&f===_a&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Wa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function P(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)P(n[e],t)}var F=fe(null),to=fe(0);function no(e,t){e=Vl,me(to,e),me(F,t),Vl=e|t.baseLanes}function ro(){me(to,Vl),me(F,F.current)}function io(){Vl=to.current,pe(F),pe(to)}var ao=fe(null),oo=null;function so(e){var t=e.alternate;me(po,po.current&1),me(ao,e),oo===null&&(t===null||F.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){me(po,po.current),me(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(me(po,po.current),me(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){me(po,po.current),me(ao,ao.current)}function fo(e){pe(ao),oo===e&&(oo=null),pe(po)}var po=fe(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,go=null,_o=null,I=null,L=!1,R=!1,z=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return ho=a,go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,se.H=e===null||e.memoizedState===null?Rs:zs,z=!1,a=n(r,i),z=!1,R&&(a=Eo(t,n,r,i)),To(e),a}function To(e){se.H=Ls;var t=_o!==null&&_o.next!==null;if(ho=0,I=_o=go=null,L=!1,yo=0,bo=null,t)throw Error(i(300));e===null||W||(e=e.dependencies,e!==null&&oa(e)&&(W=!0))}function Eo(e,t,n,r){go=e;var a=0;do{if(R&&(bo=null),yo=0,R=!1,25<=a)throw Error(i(301));if(a+=1,I=_o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}se.H=Bs,o=t(n,r)}while(R);return o}function Do(){var e=se.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(go.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function B(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(L){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}L=!1}ho=0,I=_o=go=null,R=!1,yo=vo=0,bo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return I===null?go.memoizedState=I=e:I=I.next=e,I}function jo(){if(_o===null){var e=go.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=I===null?go.memoizedState:I.next;if(t!==null)I=t,_o=e;else{if(e===null)throw go.alternate===null?Error(i(467)):Error(i(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},I===null?go.memoizedState=I=e:I=I.next=e}return I}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=ja(bo,e,t),t=go,(I===null?t.memoizedState:I.next)===null&&(t=t.alternate,se.H=t===null||t.memoizedState===null?Rs:zs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===x)return M(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=go.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=go.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),go.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function V(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(jo(),_o,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(Fl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===_a&&(d=!0);else if((ho&p)===p){u=u.next,p===_a&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,go.lanes|=p,Ul|=p;f=u.action,z&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,go.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Mr(o,e.memoizedState)&&(W=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Mr(o,t.memoizedState)||(W=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=go,a=jo(),o=Hi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Mr((_o||a).memoizedState,n);if(s&&(a.memoizedState=n,W=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||I!==null&&I.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),Nl===null)throw Error(i(349));o||ho&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=go.updateQueue,t===null?(t=Mo(),go.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function Wo(e){var t=pi(e,2);t!==null&&pu(t,e,2)}function Go(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),z){Ke(!0);try{n()}finally{Ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:V,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,_o,typeof r==`function`?r:V)}function qo(e,t,n,r,a){if(Ps(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};se.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=se.T,o={};se.T=o;try{var s=n(i,r),c=se.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),se.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(Hi){var n=Nl.formState;if(n!==null){a:{var r=go;if(Hi){if(k){b:{for(var i=k,a=Wi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){k=cf(i.nextSibling),r=i.data===`F!`;break a}}Ki(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=js.bind(null,go,r),r.dispatch=n,r=Go(!1),a=Ns.bind(null,go,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,go,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(jo(),_o,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(V)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===Ea?Oa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(go.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=jo(),n=_o;if(n!==null)return ns(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=go.updateQueue,t===null&&(t=Mo(),go.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return jo().memoizedState}function ss(e,t,n,r){var i=Ao();go.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Co(r,_o.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(go.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){go.flags|=4;var t=go.updateQueue;if(t===null)t=Mo(),go.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=jo().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(X&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),z){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||ho&1073741824&&!(Fl&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),go.lanes|=e,Ul|=e,n)}function xs(e,t,n,r){return Mr(n,t)?n:F.current===null?!(ho&42)||ho&1073741824&&!(Fl&261930)?(W=!0,e.memoizedState=n):(e=fu(),go.lanes|=e,Ul|=e,t):(e=bs(e,n,r),Mr(e,t)||(W=!0),e)}function Ss(e,t,n,r,i){var a=ce.p;ce.p=a!==0&&8>a?a:8;var o=se.T,s={};se.T=s,Ns(e,!1,t,n);try{var c=i(),l=se.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,xa(c,r),du(e)):Ms(e,t,r,du(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{ce.p=a,o!==null&&s.types!==null&&(o.types=s.types),se.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=H(e).queue;Ss(e,a,t,le,n===null?Cs:function(){return Ts(e),n(r)})}function H(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:V,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:V,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=H(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},du())}function Es(){return M(Qf)}function Ds(){return jo().memoizedState}function Os(){return jo().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=qa(n);var r=Ja(t,e,n);r!==null&&(pu(r,t,n),Ya(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=fi(e,t,n,r),n!==null&&(pu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,du())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return di(e,t,i,0),Nl===null&&ui(),!1}catch{}if(n=fi(e,t,i,r),n!==null)return pu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=fi(e,n,r,2),t!==null&&pu(t,e,2)}function Ps(e){var t=e.alternate;return e===go||t!==null&&t===go}function Fs(e,t){R=L=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var Ls={readContext:M,use:Po,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Ls.useEffectEvent=So;var Rs={readContext:M,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:M,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(z){Ke(!0);try{e()}finally{Ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(z){Ke(!0);try{n(t)}finally{Ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,go,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=js.bind(null,go,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(Ao(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,go,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=go,a=Ao();if(Hi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Nl===null)throw Error(i(349));Fl&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Nl.identifierPrefix;if(Hi){var n=Ii,r=Fi;n=(r&~(1<<32-qe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:es,useActionState:es,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,go,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=ks.bind(null,go)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(X&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:M,use:Po,useCallback:vs,useContext:M,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(V)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(jo(),_o.memoizedState,e,t)},useTransition:function(){var e=Io(V)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:zo,useId:Ds,useHostTransitionStatus:Es,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(jo(),_o,e,t)},useMemoCache:Fo,useCacheRefresh:Os};zs.useEffectEvent=fs;var Bs={readContext:M,use:Po,useCallback:vs,useContext:M,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(V)},useDebugValue:_s,useDeferredValue:function(e,t){var n=jo();return _o===null?bs(n,e,t):xs(n,_o.memoizedState,e,t)},useTransition:function(){var e=Ro(V)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:zo,useId:Ds,useHostTransitionStatus:Es,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=jo();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,_o,e,t)},useMemoCache:Fo,useCacheRefresh:Os};Bs.useEffectEvent=fs;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=qa(r);i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(pu(t,e,r),Ya(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=qa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ja(e,i,r),t!==null&&(pu(t,e,r),Ya(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=qa(n);r.tag=2,t!=null&&(r.callback=t),t=Ja(e,r,n),t!==null&&(pu(t,e,n),Ya(t,e,n))}};function Us(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function Ws(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){oi(e)}function qs(e){console.error(e)}function Js(e){oi(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=qa(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function U(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&aa(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ka?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(Hi)return t=ao.current,t===null?(r!==Gi&&(t=Error(i(423),{cause:r}),Qi(Di(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Di(r,n),a=Zs(e.stateNode,r,a),Xa(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Gi&&(e=Error(i(422),{cause:r}),Qi(Di(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Di(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=Di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Zs(n.stateNode,r,e),Xa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Xa(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),W=!1;function G(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return j(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!W?(B(e,t,i),Cc(e,t,i)):(Hi&&s&&zi(t),t.flags|=1,G(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=xi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return Cc(e,t,i)}return t.flags|=1,e=yi(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref){if(W=!1,t.pendingProps=r=a,wc(e,i))e.flags&131072&&(W=!0);else return t.lanes=e.lanes,Cc(e,t,i)}}return uc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return K(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&N(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,K(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&N(t,null),ro(),uo(t)):(N(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return G(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function K(e,t,n,r,i){var a=wa();return a=a===null?null:{parent:fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&N(t,null),ro(),lo(t),e!==null&&aa(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Ha(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Hi){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ac(null,e);if(co(t),(e=k)?(e=rf(e,Wi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,O=t,k=null)):e=null,e===null)throw Ki(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a){if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(W||aa(e,t,n,!1),a=(n&e.childLanes)!==0,W||a){if(r=Nl,r!==null&&(s=ut(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,pi(e,s),pu(r,e,s),ec;Tu(),t=sc(e,t,n)}else e=o.treeContext,k=cf(s.nextSibling),O=t,Hi=!0,Ui=null,Wi=!1,e!==null&&Vi(t,e),t=oc(t,r),t.flags|=4096;return t}return e=yi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return j(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!W?(B(e,t,i),Cc(e,t,i)):(Hi&&r&&zi(t),t.flags|=1,G(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return j(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!W?(B(e,t,a),Cc(e,t,a)):(Hi&&r&&zi(t),t.flags|=1,G(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(j(t),t.stateNode===null){var a=hi,o=n.contextType;typeof o==`object`&&o&&(a=M(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ga(t),o=n.contextType,a.context=typeof o==`object`&&o?M(o):hi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Hs.enqueueReplaceState(a,a.state,null),$a(t,r,a,i),Qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=hi,typeof u==`object`&&u&&(o=M(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ws(t,a,r,o),Wa=!1;var f=t.memoizedState;a.state=f,$a(t,r,a,i),Qa(),l=t.memoizedState,s||f!==l||Wa?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=Wa||Us(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ka(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=hi,typeof l==`object`&&l&&(c=M(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ws(t,a,r,c),Wa=!1,f=t.memoizedState,a.state=f,$a(t,r,a,i),Qa();var p=t.memoizedState;o!==d||f!==p||Wa||e!==null&&e.dependencies!==null&&oa(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=Wa||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&oa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ha(t,e.child,null,i),t.child=Ha(t,null,n,i)):G(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Cc(e,t,i),e}function pc(e,t,n,r){return Xi(),t.flags|=256,G(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:Ta()}}function q(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function gc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(po.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Hi){if(a?so(t):uo(t),(e=k)?(e=rf(e,Wi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,O=t,k=null)):e=null,e===null)throw Ki(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=vc({mode:`hidden`,children:c},a),r=Si(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=q(e,s,n),t.memoizedState=mc,ac(null,r)):(so(t),_c(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=vc({mode:`visible`,children:r.children},a),c=Si(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ha(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=q(e,s,n),t.memoizedState=mc,t=ac(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Qi({value:r,source:null,stack:null}),t=yc(e,t,n)}else if(W||aa(e,t,n,!1),s=(n&e.childLanes)!==0,W||s){if(s=Nl,s!==null&&(r=ut(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,pi(e,r),pu(s,e,r),ec;af(c)||Tu(),t=yc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,k=cf(c.nextSibling),O=t,Hi=!0,Ui=null,Wi=!1,e!==null&&Vi(t,e),t=_c(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=yi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Si(c,a,n,null),c.flags|=2):c=yi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=Ta():(l=fa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=q(e,s,n),t.memoizedState=mc,ac(e.child,r)):(so(t),n=e.child,e=n.sibling,n=yi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function _c(e,t){return t=vc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function yc(e,t,n){return Ha(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),A(e.return,t,n)}function xc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,me(po,o),G(e,t,r,n),r=Hi?ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bc(e,n,t);else if(e.tag===19)bc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xc(t,!0,n,null,a,r);break;case`together`:xc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(aa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=yi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&oa(e)))}function Tc(e,t,n){switch(t.tag){case 3:ye(t,t.stateNode.containerInfo),na(t,fa,e.memoizedState.cache),Xi();break;case 27:case 5:xe(t);break;case 4:ye(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Cc(e,t,n),e===null?null:e.sibling):gc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(aa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),me(po,po.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:na(t,fa,e.memoizedState.cache)}return Cc(e,t,n)}function Ec(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)W=!0;else{if(!wc(e,n)&&!(t.flags&128))return W=!1,Tc(e,t,n);W=!!(e.flags&131072)}}else W=!1,Hi&&t.flags&1048576&&Ri(t,ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ma(t.elementType),t.type=e,typeof e==`function`)vi(e)?(r=Gs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===S){t.tag=11,t=tc(null,t,e,r,n);break a}if(a===T){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Gs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(ye(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ka(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.cache,na(t,fa,r),r!==o.cache&&ia(t,[fa],n,!0),Qa(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}if(r!==a){a=Di(Error(i(424)),t),Qi(a),t=pc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(k=cf(e.firstChild),O=t,Hi=!0,Ui=null,Wi=!0,n=Ua(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Xi(),r===a){t=Cc(e,t,n);break a}G(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Hi||(n=t.type,e=t.pendingProps,r=Vd(_e.current).createElement(n),r[gt]=t,r[_t]=e,Fd(r,n,e),kt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&Hi&&(r=t.stateNode=ff(t.type,t.pendingProps,_e.current),O=t,Wi=!0,a=k,Zd(t.type)?(lf=a,k=cf(r.firstChild)):k=a),G(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Hi&&((a=r=k)&&(r=tf(r,t.type,t.pendingProps,Wi),r===null?a=!1:(t.stateNode=r,O=t,k=cf(r.firstChild),Wi=!1,a=!0)),a||Ki(t)),xe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),Qf._currentValue=a),lc(e,t),G(e,t,r,n),t.child;case 6:return e===null&&Hi&&((e=n=k)&&(n=nf(n,t.pendingProps,Wi),n===null?e=!1:(t.stateNode=n,O=t,k=null,e=!0)),e||Ki(t)),null;case 13:return gc(e,t,n);case 4:return ye(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ha(t,null,r,n):G(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return G(e,t,t.pendingProps,n),t.child;case 8:return G(e,t,t.pendingProps.children,n),t.child;case 12:return G(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,na(t,t.type,r.value),G(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,j(t),a=M(a),r=r(a),t.flags|=1,G(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return Sc(e,t,n);case 31:return cc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return j(t),r=M(fa),e===null?(a=wa(),a===null&&(a=Nl,o=pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ga(t),na(t,fa,a)):((e.lanes&n)!==0&&(Ka(e,t),$a(t,null,null,n),Qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,na(t,fa,r),r!==a.cache&&ia(t,[fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),na(t,fa,r))),G(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Dc(e){e.flags|=4}function Oc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw Na=ka,Da}}else e.flags&=-16777217}function kc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(Su())e.flags|=8192;else throw Na=ka,Da}}function Ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:it(),e.lanes|=t,ql|=t)}function jc(e,t){if(!Hi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nc(e,t,n){var r=t.pendingProps;switch(Bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mc(t),null;case 1:return Mc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(fa),be(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?Dc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Zi())),Mc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Dc(t),o===null?(Mc(t),Oc(t,a,null,r,n)):(Mc(t),kc(t,o))):o?o===e.memoizedState?(Mc(t),t.flags&=-16777217):(Dc(t),Mc(t),kc(t,o)):(e=e.memoizedProps,e!==r&&Dc(t),Mc(t),Oc(t,a,e,r,n)),null;case 27:if(Se(t),n=_e.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}e=he.current,Yi(t)?qi(t,e):(e=ff(a,r,n),t.stateNode=e,Dc(t))}return Mc(t),null;case 5:if(Se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}if(o=he.current,Yi(t))qi(t,o);else{var s=Vd(_e.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[gt]=t,o[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=_e.current,Yi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=O,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ki(t,!0)}else e=Vd(e).createTextNode(r),e[gt]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Yi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[gt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Yi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[gt]=t}else Xi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return be(),e===null&&Sd(t.stateNode.containerInfo),Mc(t),null;case 10:return ra(t.type),Mc(t),null;case 19:if(pe(po),r=t.memoizedState,r===null)return Mc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)jc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bi(n,e),n=n.sibling;return me(po,po.current&1|2),Hi&&Li(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Fe()>$l&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Hi)return Mc(t),null}else 2*Fe()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Fe(),e.sibling=null,n=po.current,me(po,a?n&1|2:n&1),Hi&&Li(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(fa),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(Bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(fa),be(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(po),null;case 4:return be(),null;case 10:return ra(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&pe(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(fa),null;case 25:return null;default:return null}}function Fc(e,t){switch(Bi(t),t.tag){case 3:ra(fa),be();break;case 26:case 27:case 5:Se(t);break;case 4:be();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:pe(po);break;case 10:ra(t.type);break;case 22:case 23:fo(t),io(),e!==null&&pe(Ca);break;case 24:ra(fa)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Uu(e,e.return,t)}}}function zc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[_t]=t}catch(t){Uu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function J(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[gt]=e,t[_t]=n}catch(t){Uu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,zd=sp,e=Lr(e),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},sp=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Ic(5,n);break;case 1:if(hl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}}r&64&&Rc(n),r&512&&Bc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Hc(n),r&512&&Bc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,!!(n.subtreeFlags&8772)):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Ge&&typeof Ge.onCommitFiberUnmount==`function`)try{Ge.onCommitFiberUnmount(We,n)}catch{}switch(n.tag){case 26:Yc||Vc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Vc(n,t);var r=nl,i=rl;Zd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Vc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null){if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}}break;case 18:nl!==null&&(rl?(e=nl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Lc(2,n,t),Yc||Lc(4,n,t),il(e,t,n);break;case 1:Yc||(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&zc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Lc(3,e,e.return),Ic(3,e),Lc(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Ct]||o[gt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[gt]=e,kt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[gt]=e,kt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode)}else e.stateNode=If(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),n!==null&&r&4&&Uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),e.flags&32){a=e.stateNode;try{tn(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Uc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Fe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,J(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(tn(o,``),n.flags&=-33),Kc(e,J(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,J(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),gl(t);break;case 1:Vc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&zc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Vc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Ic(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)P(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Rc(a),Bc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Hc(a),Bc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Bc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function Y(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Ic(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&vl(o,t);break;case 24:yl(e,t,n,r),i&2048&&Y(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Ic(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&Y(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Sl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Sl(n,r),i&2048&&Y(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)Tl(e,t,n),e=e.sibling}function Tl(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),wl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function El(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,Al(r,e)}El(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ol(e),e=e.sibling}function Ol(e){switch(e.tag){case 0:case 11:case 15:Dl(e),e.flags&2048&&Lc(9,e,e.return);break;case 3:Dl(e);break;case 12:Dl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kl(e)):Dl(e);break;default:Dl(e)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,Al(r,e)}El(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kl(t));break;default:kl(t)}e=e.sibling}}function Al(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Lc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var jl={getCacheForType:function(e){var t=M(fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return M(fa).controller.signal}},Ml=typeof WeakMap==`function`?WeakMap:Map,X=0,Nl=null,Pl=null,Fl=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return X&2&&Fl!==0?Fl&-Fl:se.T===null?pt():ud()}function fu(){if(Kl===0){if(!(Fl&536870912)||Hi){var e=Qe;Qe<<=1,!(Qe&3932160)&&(Qe=262144),Kl=e}else Kl=536870912}return e=ao.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Nl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Fl,Kl,!1)),ot(e,n),(!(X&2)||e!==Nl)&&(e===Nl&&(!(X&2)&&(Wl|=n),Hl===4&&_u(e,Fl,Kl,!1)),nd(e))}function mu(e,t,n){if(X&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||nt(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}if(n=e.current.alternate,o&&!gu(n)){a=Eu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Fe(),10<a)){if(_u(r,t,Kl,!Rl),tt(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Z(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Tl(t,a,d);var m=(a&62914560)===a?Zl-Fe():(a&4194048)===a?Ql-Fe():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-qe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ct(e,n,t)}function vu(){return X&6?!0:(rd(0,!1),!1)}function yu(){if(Pl!==null){if(Il===0)var e=Pl.return;else e=Pl,ta=ea=null,ko(e),Ia=null,La=0,e=Pl;for(;e!==null;)Fc(e.alternate,e),e=e.return;Pl=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Nl=e,Pl=n=yi(e.current,null),Fl=t,Il=0,Ll=null,Rl=!1,zl=nt(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-qe(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,ui(),n}function xu(e,t){go=null,se.H=Ls,t===Ea||t===Oa?(t=Pa(),Il=3):t===Da?(t=Pa(),Il=4):Il=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Pl===null&&(Hl=1,Ys(e,Di(t,e.current)))}function Su(){var e=ao.current;return e===null?!0:(Fl&4194048)===Fl?oo===null:(Fl&62914560)===Fl||Fl&536870912?e===oo:!1}function Cu(){var e=se.H;return se.H=Ls,e===null?Ls:e}function wu(){var e=se.A;return se.A=jl,e}function Tu(){Hl=4,Rl||(Fl&4194048)!==Fl&&ao.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Nl===null||_u(Nl,Fl,Kl,!1)}function Eu(e,t,n){var r=X;X|=2;var i=Cu(),a=wu();(Nl!==e||Fl!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Pl!==null){var s=Pl,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,ta=ea=null,X=r,se.H=i,se.A=a,Pl===null&&(Nl=null,Fl=0,ui()),o}function Du(){for(;Pl!==null;)Au(Pl)}function Ou(e,t){var n=X;X|=2;var r=Cu(),a=wu();Nl!==e||Fl!==t?(eu=null,$l=Fe()+500,bu(e,t)):zl=nt(e,t);a:do try{if(Il!==0&&Pl!==null){t=Pl;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(Aa(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Nl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:Aa(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Pl.tag){case 26:s=Pl.memoizedState;case 5:case 27:var c=Pl;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Pl=l;else{var u=c.return;u===null?Pl=null:(Pl=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return ta=ea=null,se.H=r,se.A=a,X=n,Pl===null?(Nl=null,Fl=0,ui(),Hl):0}function ku(){for(;Pl!==null&&!Ne();)Au(Pl)}function Au(e){var t=Ec(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,Fl);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Fl);break;case 5:ko(t);default:Fc(n,t),t=Pl=bi(t,Vl),t=Ec(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function Mu(e,t,n,r){ta=ea=null,ko(t),Ia=null,La=0;var i=t.return;try{if(U(e,i,t,n,Fl)){Hl=1,Ys(e,Di(n,e.current)),Pl=null;return}}catch(t){if(i!==null)throw Pl=i,t;Hl=1,Ys(e,Di(n,e.current)),Pl=null;return}t.flags&32768?(Hi||r===1?e=!0:zl||Fl&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Nc(t.alternate,t,Vl);if(n!==null){Pl=n;return}if(t=t.sibling,t!==null){Pl=t;return}Pl=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Pc(e.alternate,e);if(n!==null){n.flags&=32767,Pl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Pl=e;return}Pl=e=n}while(e!==null);Hl=6,Pl=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(X&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=li,st(e,n,o,s,c,l),e===Nl&&(Pl=Nl=null,Fl=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(ze,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=se.T,se.T=null,a=ce.p,ce.p=2,s=X,X|=4;try{$c(e,t,n)}finally{X=s,ce.p=a,se.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=se.T,se.T=null;var r=ce.p;ce.p=2;var i=X;X|=4;try{fl(t,e);var a=Bd,o=Lr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ir(s.ownerDocument.documentElement,s)){if(c!==null&&Rr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!zd,Bd=zd=null}finally{X=i,ce.p=r,se.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=se.T,se.T=null;var r=ce.p;ce.p=2;var i=X;X|=4;try{el(e,t.alternate,t)}finally{X=i,ce.p=r,se.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Pe();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),ft(n),t=t.stateNode,Ge&&typeof Ge.onCommitFiberRoot==`function`)try{Ge.onCommitFiberRoot(We,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=se.T,i=ce.p,ce.p=2,se.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{se.T=t,ce.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=ft(au),r=se.T,a=ce.p;try{ce.p=32>n?32:n,se.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,X&6)throw Error(i(331));var c=X;if(X|=4,Ol(o.current),bl(o,o.current,s,n),X=c,rd(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot==`function`)try{Ge.onPostCommitFiberRoot(We,o)}catch{}return!0}finally{ce.p=a,se.T=r,zu(e,t)}}function Hu(e,t,n){t=Di(n,t),t=Zs(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(ot(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=Di(n,e),n=Qs(2),r=Ja(t,n,2),r!==null&&($s(n,r,t,e),ot(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ml;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Nl===e&&(Fl&n)===n&&(Hl===4||Hl===3&&(Fl&62914560)===Fl&&300>Fe()-Zl?!(X&2)&&bu(e,0):Gl|=n,ql===Fl&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=it()),e=pi(e,t),e!==null&&(ot(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return je(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-qe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Fl,a=tt(r,r===Nl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||nt(r,a)||(n=!0,cd(r,a))}r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=Fe(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-qe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=rt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Nl,n=Fl,n=tt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||nt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Me(r),ft(n)){case 2:case 8:n=Re;break;case 32:n=ze;break;case 268435456:n=Ve;break;default:n=ze}return r=sd.bind(null,e),n=je(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Me(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Fl;return r=tt(e,e===Nl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Fe()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){X&6?je(Le,id):ad()})}function ud(){if(td===0){var e=_a;e===0&&(e=Ze,Ze<<=1,!(Ze&261888)&&(Ze=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:ln(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new jn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<ii.length;md++){var hd=ii[md];ai(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}ai(Xr,`onAnimationEnd`),ai(Zr,`onAnimationIteration`),ai(Qr,`onAnimationStart`),ai(`dblclick`,`onDoubleClick`),ai(`focusin`,`onFocus`),ai(`focusout`,`onBlur`),ai($r,`onTransitionRun`),ai(ei,`onTransitionStart`),ai(ti,`onTransitionCancel`),ai(ni,`onTransitionEnd`),Nt(`onMouseEnter`,[`mouseout`,`mouseover`]),Nt(`onMouseLeave`,[`mouseout`,`mouseover`]),Nt(`onPointerEnter`,[`pointerout`,`pointerover`]),Nt(`onPointerLeave`,[`pointerout`,`pointerover`]),Mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[yt];n===void 0&&(n=t[yt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,At.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!bn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Tt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}_n(function(){var r=a,i=fn(n),s=[];a:{var c=ri.get(e);if(c!==void 0){var l=jn,u=e;switch(e){case`keypress`:if(En(n)===0)break a;case`keydown`:case`keyup`:l=Yn;break;case`focusin`:u=`focus`,l=Bn;break;case`focusout`:u=`blur`,l=Bn;break;case`beforeblur`:case`afterblur`:l=Bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Rn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Zn;break;case Xr:case Zr:case Qr:l=Vn;break;case ni:l=Qn;break;case`scroll`:case`scrollend`:l=Nn;break;case`wheel`:l=$n;break;case`copy`:case`cut`:case`paste`:l=Hn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Xn;break;case`toggle`:case`beforetoggle`:l=er}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=vn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==dn&&(u=n.relatedTarget||n.fromElement)&&(Tt(u)||u[vt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Tt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Rn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Xn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Dt(l),h=u==null?c:Dt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Tt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=br;else if(mr(c)){if(xr)v=Ar;else{v=Or;var y=Dr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&on(r.elementType)&&(v=br):v=kr;if(v&&=v(e,r)){hr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Zt(c,`number`,c.value)}switch(y=r?Dt(r):window,e){case`focusin`:(mr(y)||y.contentEditable===`true`)&&(Br=y,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(s,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(s,n,i)}var b;if(nr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ur?cr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(ar&&n.locale!==`ko`&&(ur||x!==`onCompositionStart`?x===`onCompositionEnd`&&ur&&(b=Tn()):(Sn=i,Cn=`value`in Sn?Sn.value:Sn.textContent,ur=!0)),y=Ed(r,x),0<y.length&&(x=new Un(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=lr(n),b!==null&&(x.data=b)))),(b=ir?dr(e,n):fr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Un(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=vn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=vn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=vn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=vn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
||
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&tn(e,``+r);break;case`className`:zt(e,`class`,r);break;case`tabIndex`:zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:zt(e,n,r);break;case`style`:an(e,r,o);break;case`data`:if(t!==`object`){zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=un);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=ln(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=sn.get(n)||n,Rt(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:an(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&tn(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=un);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!jt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[_t]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Nd(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in yd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Nd(e,t,s,c,n,null)}en(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(on(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Yt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(on(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e!==Gd&&(Gd=e,!0):(Gd=null,!1)}var Z=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Z:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body)}n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),wt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ct])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=ce.d;ce.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=Et(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Fd(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ot(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);kt(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),kt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ot(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),kt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=_e.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ot(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ot(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Jt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),kt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Jt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),Fd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,kt(a),a):(r=n,(a=mf.get(o))&&(r=p({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ct]||a[gt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=at(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=at(0),this.hiddenUpdates=at(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=_i(3,null,null,t),e.current=a,a.stateNode=e,t=pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ga(a),e}function tp(e){return e?(e=hi,e):hi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=qa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ja(e,r,t),n!==null&&(pu(n,e,t),Ya(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=pi(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=dt(t);var n=pi(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=se.T;se.T=null;var a=ce.p;try{ce.p=2,up(e,t,n,r)}finally{ce.p=a,se.T=i}}function lp(e,t,n,r){var i=se.T;se.T=null;var a=ce.p;try{ce.p=8,up(e,t,n,r)}finally{ce.p=a,se.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Et(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=et(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-qe(o);s.entanglements[1]|=c,o&=~c}nd(a),!(X&6)&&($l=Fe()+500,rd(0,!1))}}break;case 31:case 13:s=pi(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=fn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Tt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ie()){case Le:return 2;case Re:return 8;case ze:case Be:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Et(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Tt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,mt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);dn=r,n.target.dispatchEvent(r),dn=null}else return t=Et(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Et(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[_t]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[vt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(i(527,Lp,`19.2.8`));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:se,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{We=zp.inject(Rp),Ge=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[vt]=t.current,Sd(e),new Fp(t)}})),Q6=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Pve()}))(),$6=(0,ar.createContext)({}),e8=({valueStoreKey:e,locale:t,keyPath:n,i18n:r,value:i})=>{h4.update(a=>a&&(L3({valueStore:a[e],locale:t,i18n:r},e=>{Loe(e,n,i)}),a))},t8=e=>{if(typeof e==`function`)return e;if(typeof e==`string`){let t=iL.get(e);if(t?.control)return typeof t.control==`function`?t.control:t8(t.control);if(eL.includes(e)){console.warn(`Custom field references built-in editor "${e}" which is not a React component.`);return}}},Fve=({fieldId:e,fieldClassName:t,fieldConfig:n,currentValue:r,draft:i,locale:a,onChange:o,handleRef:s})=>({value:r,field:g3(n),forID:e??``,classNameWrapper:t??``,entry:i?y3({draft:i,locale:a}).entryMap:void 0,onChange:o,ref:s}),n8=void 0,Ive=()=>{if(n8===void 0){let e=document.createElement(`div`);oc(fm,{target:e}),Ua(),n8=e.querySelector(`input`)?.className??``}return n8},Lve=U(`<div role="none"></div>`);function Rve(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),{valueStoreKey:a=`currentValues`}=zi(`field-editor`)??{},o=X(t,`required`,3,!0),s=X(t,`readonly`,3,!1),c=X(t,`invalid`,3,!1),l=P(void 0),u=P(void 0),d=P(void 0),f=N(()=>wr(t.fieldConfig.i18n,!1)),p=N(()=>t8(t.control)),m=e=>{Array.isArray(e)||or(e)?e8({valueStoreKey:a,locale:t.locale,keyPath:t.keyPath,i18n:H(f),value:e}):n()&&la(h4,Ds(n)[a][t.locale][t.keyPath]=e,Ds(n))},h=e=>{F(d,e,!0),e?hge({locale:t.locale,keyPath:t.keyPath,instance:e}):T3({locale:t.locale,keyPath:t.keyPath})},g=()=>{if(!H(l)||!H(p))return;F(u,H(u)??(0,Q6.createRoot)(H(l)),!0);let e=Fve({fieldId:t.fieldId,fieldClassName:Ive(),fieldConfig:t.fieldConfig,currentValue:t.currentValue,draft:n(),locale:t.locale,onChange:m,handleRef:h});H(u).render((0,ar.createElement)($6.Provider,{value:{locale:t.locale,keyPath:t.keyPath,required:o(),readonly:s(),invalid:c()}},(0,ar.createElement)(H(p),e))),H(l)?.querySelector(`input`)?.setAttribute(`aria-invalid`,String(c()))};Nl(()=>(g(),()=>{H(u)?.unmount(),T3({locale:t.locale,keyPath:t.keyPath})})),B(()=>{H(u)&&H(p)&&g(),typeof H(d)?.isValid==`function`&&vge({locale:t.locale,keyPath:t.keyPath,value:t.currentValue,fieldConfig:t.fieldConfig})});var _=Lve();Ol(_,e=>F(l,e),()=>H(l)),G(e,_),k(),i()}var zve=({locale:e,fieldConfig:t,currentValue:n,draft:r,preview:i})=>{if(typeof i!=`function`||!r)return;let{entryMap:a,fieldsMetaData:o,getAsset:s}=y3({draft:r,locale:e});return{value:n,field:g3(t),metadata:o.get(t.name)??F2({}),getAsset:s,entry:a,fieldsMetaData:o}},Bve=U(`<div class="svelte-7ynvbs"></div>`),Vve={hash:`svelte-7ynvbs`,code:`div.svelte-7ynvbs {
|
||
/* Allow the React component to use the full width */width:100%;}`};function Hve(e,t){O(t,!0),J(e,Vve);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=P(void 0),o=P(void 0),s=()=>{if(!H(a))return;let e=zve({locale:t.locale,fieldConfig:t.fieldConfig,currentValue:t.currentValue,draft:n(),preview:t.preview});e&&(F(o,H(o)??(0,Q6.createRoot)(H(a)),!0),H(o).render((0,ar.createElement)($6.Provider,{value:{locale:t.locale,keyPath:t.keyPath}},(0,ar.createElement)(t.preview,e))))};Nl(()=>(s(),()=>{H(o)?.unmount()})),B(()=>{H(o)&&s()});var c=Bve();Ol(c,e=>F(a,e),()=>H(a)),G(e,c),k(),i()}var Uve=U(`<div role="none" class="timezone svelte-1dnhck7"> </div>`),Wve=U(`<div role="none" class="timezone svelte-1dnhck7">UTC</div>`),Gve=U(`<div role="none" class="svelte-1dnhck7"><input/> <!> <!></div> <!>`,1),Kve={hash:`svelte-1dnhck7`,code:`div.svelte-1dnhck7 {display:flex;align-items:center;}.timezone.svelte-1dnhck7 {margin:4px 8px 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);white-space:nowrap;}`};function qve(e,t){O(t,!0),J(e,Kve);let n=X(t,`currentValue`,15),r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1),o=P(``),s=P(!1),c=N(()=>WI(t.fieldConfig)),l=N(()=>H(c).type),u=N(()=>H(c).min),d=N(()=>H(c).max),f=N(()=>H(c).step),p=N(()=>H(c).dateOnly),m=N(()=>H(c).utc),h=N(()=>H(c).singleCustomTimeZone),g=N(()=>Uoe(n(),t.fieldConfig)),_=()=>{if(H(s))return;let e=yR({currentValue:n(),fieldConfig:t.fieldConfig,timeZone:H(g)});e!==void 0&&e!==H(o)&&F(o,e,!0)},v=()=>{let e=vR({inputValue:H(o),currentValue:n(),fieldConfig:t.fieldConfig,timeZone:H(g)});if(e===void 0||e===n())return;let r=gR(e,t.fieldConfig),i=gR(n(),t.fieldConfig);if(r!==void 0&&i!==void 0){if(r.getTime()===i.getTime())return}else if(r===void 0&&i===void 0&&e!==``)return;n(e)};B(()=>{n(),Ds(()=>{_()})}),B(()=>{H(o),Ds(()=>{v()})});let y=()=>{F(s,!0)},b=()=>{F(s,!1),_()};var x=Gve(),S=L(x),C=I(S);bl(C,()=>({type:H(l),min:H(u),max:H(d),step:H(f),readonly:i(),"aria-readonly":i(),"aria-required":r(),"aria-invalid":a(),"aria-labelledby":`${t.fieldId??``}-label`,"aria-errormessage":`${t.fieldId??``}-error`,onfocus:y,onblur:b}),void 0,void 0,void 0,`svelte-1dnhck7`,!0);var w=z(C,2),T=e=>{{let n=N(()=>Z(H(p)?`today`:`now`));$f(e,{variant:`tertiary`,get label(){return H(n)},onclick:()=>{F(o,_R(t.fieldConfig,H(g)),!0)}})}};q(w,e=>{i()||e(T)});var E=z(w,2),ee=e=>{{let t=N(()=>Z(`clear`)),r=N(()=>!n());$f(e,{variant:`tertiary`,get label(){return H(t)},get disabled(){return H(r)},onclick:()=>{n(``)}})}};q(E,e=>{!i()&&!r()&&e(ee)}),D(S);var te=z(S,2),ne=e=>{var r=Uve(),i=R(r,!0);V(e=>K(i,e),[()=>dR(H(h),gR(n(),t.fieldConfig))]),G(e,r)},re=e=>{G(e,Wve())};q(te,e=>{H(h)?e(ne):H(m)&&e(re,1)}),wl(C,()=>H(o),e=>F(o,e)),G(e,x),k()}var Jve=U(`<p> <!></p>`);function Yve(e,t){O(t,!0);let n=N(()=>WI(t.fieldConfig)),r=N(()=>H(n).utc),i=N(()=>H(n).singleCustomTimeZone),a=N(()=>bR({locale:t.locale,fieldConfig:t.fieldConfig,currentValue:t.currentValue}));var o=W(),s=L(o),c=e=>{var n=Jve(),o=I(n),s=z(o),c=e=>{var n=ec();V(e=>K(n,`— ${e??``}`),[()=>dR(H(i),gR(t.currentValue,t.fieldConfig))]),G(e,n)},l=e=>{G(e,ec(`— UTC`))};q(s,e=>{H(i)?e(c):H(r)&&e(l,1)}),D(n),V((e,t)=>{Y(n,`lang`,e),Y(n,`dir`,t),K(o,`${H(a)??``} `),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale)]),G(e,n)};q(s,e=>{H(a)&&e(c)}),G(e,o),k()}var Xve=U(`<!> <div role="none"> </div>`,1);function Zve(e,t){O(t,!0);let n=()=>j(HR,`$activated`,i),r=()=>j(UR,`$consoleLoaded`,i),[i,a]=sa(),o=X(t,`multiple`,3,!1),s=X(t,`hidden`,3,!1),c=N(()=>YR(t.fieldConfig)??{}),l=null,u=()=>{let e={...Object.fromEntries(Object.entries(H(c).config??{}).filter(([e])=>ose.includes(e))),multiple:o(),max_files:t.fieldConfig?.max??H(c).config?.max_files??20,folder:{path:H(c).config?.folder?.path??``,resource_type:t.kind??`raw`}},n={type:`ML_WIDGET_SHOW`,data:{mlId:l?.dataset?.mlId,config:e}};console.debug(`Cloudinary Panel sending message:`,n),l?.contentWindow?.postMessage(JSON.stringify(n),KR)},d=({assets:e})=>{let{output_filename_only:n=!1,use_transformations:r=!0}=H(c),i=e.map(e=>{let t=e.secure_url;return n?{url:t.split(`/`).pop()}:r?{url:e.derived?.[0]?.secure_url??t}:{url:t}});t.onSelect(i)},f=({origin:e,data:t})=>{if(e===KR){if(typeof t==`string`)try{t=JSON.parse(t)}catch{return}or(t)&&(console.debug(`Cloudinary Panel received message:`,t),t.type===`login`&&t.consoleDomain&&(M(HR,!0),M(WR,!0)),t.type===`consoleLoaded`&&M(UR,!0),t.type===`ML_WIDGET_INSERT_DATA`&&(M(WR,!1),d(t.data)),t.type===`ML_WIDGET_HIDE`&&M(WR,!1))}};Nl(()=>(l=document.querySelector(`iframe#cloudinary-iframe`),window.addEventListener(`message`,f),()=>{window.removeEventListener(`message`,f)})),B(()=>{H(c)&&r()&&u()});var p=W(),m=L(p),h=e=>{zj(e,{children:(e,t)=>{var r=W(),i=L(r),a=e=>{{let t=N(()=>Z(`cloud_storage.cloudinary.open_library`));$f(e,{variant:`primary`,get label(){return H(t)},onclick:()=>{M(WR,!0)}})}},o=e=>{var t=Xve(),n=L(t);{let e=N(()=>Z(`cloud_storage.cloudinary.activate.button_label`));$f(n,{variant:`primary`,get label(){return H(e)},onclick:()=>{AY(`${GR}/cms_login?cms=true`,{noopener:!1})}})}var r=R(z(n,2),!0);V(e=>K(r,e),[()=>Z(`cloud_storage.cloudinary.activate.description`)]),G(e,t)};q(i,e=>{n()?e(a):e(o,-1)}),G(e,r)},$$slots:{default:!0}})};q(m,e=>{s()||e(h)}),G(e,p),k(),a()}var Qve=U(`<strong></strong>`),$ve=U(`<!>/`,1),eye=U(`<span class="name svelte-1ngvthn" aria-hidden="true"><!> <!></span>`),tye={hash:`svelte-1ngvthn`,code:`.name.svelte-1ngvthn {color:var(--sui-tertiary-foreground-color);strong {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}}`};function r8(e,t){O(t,!0),J(e,tye);let n={ALLOWED_TAGS:[`wbr`]},r=X(t,`children`,3,void 0),i=N(()=>t.path?FA(t.path).split(`/`):t.caption?[t.caption]:[]),a=e=>gt(e.replace(/([-_.])/g,`$1<wbr>`),n);var o=W(),s=L(o),c=e=>{var t=eye(),n=I(t);_f(n,{lines:2,children:(e,t)=>{var n=W();Cc(L(n),19,()=>H(i),(e,t)=>`${e}-${t}`,(e,t,n)=>{var r=W(),o=L(r),s=e=>{var n=Qve();kc(n,()=>a(H(t)),!0),D(n),G(e,n)},c=e=>{var n=$ve();kc(L(n),()=>a(H(t))),mi(),G(e,n)};q(o,e=>{H(n)===H(i).length-1?e(s):e(c,-1)}),G(e,r)}),G(e,n)},$$slots:{default:!0}}),Ac(z(n,2),()=>r()??br),D(t),G(e,t)};q(s,e=>{H(i).length&&e(c)}),G(e,o),k()}var nye=U(`<span role="none" class="icon check-background"><!></span>`),rye=U(`<div role="none"><!></div>`),iye={hash:`svelte-1fitgoo`,code:`.wrapper.svelte-1fitgoo {display:contents;[role='option'] {position:relative;& > .icon.check {display:none;}&[aria-selected='false'] {.check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);.icon {display:none;}}}&[aria-selected='true'] {.check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}}.check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;.icon {color:inherit !important;font-size:20px;}}}&.grid {.check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}}&.list {.check-background {margin-inline-start:16px;}}}`};function i8(e,t){J(e,iye);let n=X(t,`viewType`,3,`grid`);var r=rye();bm(I(r),{label:``,get value(){return t.value},get selected(){return t.selected},get onChange(){return t.onChange},startIcon:e=>{var n=W(),r=L(n),i=e=>{var t=nye();Rl(I(t),{name:`check`,class:`icon check`}),D(t),G(e,t)};q(r,e=>{t.multiple&&e(i)}),G(e,n)},children:(e,n)=>{var r=W();Ac(L(r),()=>t.children??br),G(e,r)},$$slots:{startIcon:!0,default:!0}}),D(r),V(()=>el(r,1,`wrapper ${n()??``}`,`svelte-1fitgoo`)),G(e,r)}var aye=U(`<div role="none" class="wrapper svelte-umbokg"><!></div>`),oye={hash:`svelte-umbokg`,code:`.wrapper.svelte-umbokg {display:contents;.listbox {gap:4px;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);.option {button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;&:focus-visible {outline-color:transparent;}.preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1 / 1;object-fit:contain;}}}.name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}}.listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;.option {button {flex-direction:column;justify-content:flex-start;.preview {width:100%;height:auto;}.name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);&:empty {display:none;}}}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}.listbox.list {.option {button {gap:16px;.preview {width:64px;}.name {flex:auto;padding-inline:0 8px;}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}}}`};function a8(e,t){O(t,!0),J(e,oye);let n=X(t,`viewType`,3,`grid`),r=X(t,`gridId`,3,void 0),i=X(t,`multiple`,3,!1),a=X(t,`onChange`,3,void 0),o=X(t,`children`,3,void 0);var s=aye(),c=I(s);{let e=N(()=>Z(`assets_dialog.available_images`));vm(c,{get id(){return r()},get class(){return n()},get multiple(){return i()},get"aria-label"(){return H(e)},onChange:e=>{a()?.(e.detail)},children:(e,t)=>{var n=W();Ac(L(n),()=>o()??br),G(e,n)},$$slots:{default:!0}})}D(s),G(e,s),k()}var o8=(e,t=br)=>{var n=cye();Cc(n,23,t,(e,t)=>`${e}-${t}`,(e,t)=>{var n=sye(),r=R(n,!0);V(()=>K(r,H(t))),G(e,n)}),D(n),G(e,n)},sye=U(`<li class="svelte-1luofoe"> </li>`),cye=U(`<ul class="filenames svelte-1luofoe"></ul>`),s8=U(`<div class="svelte-1luofoe"> </div> <!>`,1),lye=U(`<!> <!>`,1),uye={hash:`svelte-1luofoe`,code:`div.svelte-1luofoe:not(:first-child) {margin-top:8px;}.filenames.svelte-1luofoe {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);}ul.svelte-1luofoe {margin:8px 0 0;padding:0;list-style:none;}li.svelte-1luofoe {margin:0;padding:0;}`};function c8(e,t){O(t,!0),J(e,uye);let n=X(t,`open`,15,!1),r=X(t,`oversizedFileNames`,19,()=>[]),i=X(t,`invalidFileNames`,19,()=>[]),a=N(()=>r().length&&i().length?Z(`assets_dialog.rejected_files.title`):i().length?Z(`assets_dialog.invalid_file.title`):Z(`assets_dialog.large_file.title`));Xp(e,{get title(){return H(a)},get open(){return n()},set open(e){n(e)},children:(e,n)=>{var a=lye(),o=L(a),s=e=>{var n=s8(),i=L(n),a=R(i,!0);o8(z(i,2),r),V(e=>K(a,e),[()=>Z(`warning_oversized_files`,{values:{count:r().length,size:yz(t.maxSize)}})]),G(e,n)};q(o,e=>{r().length&&e(s)});var c=z(o,2),l=e=>{var t=s8(),n=L(t),r=R(n,!0);o8(z(n,2),i),V(e=>K(r,e),[()=>Z(`warning_invalid_files`,{values:{count:i().length}})]),G(e,t)};q(c,e=>{i().length&&e(l)}),G(e,a)},$$slots:{default:!0}}),k()}var l8=U(`<span role="alert"> </span>`),u8=U(`<!> <!>`,1),dye=U(`<div role="none" class="grid-wrapper svelte-mqll9n"><!></div>`),fye=U(`<div role="none" class="input-outer svelte-mqll9n"><!></div>`),pye=U(`<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>`,1),mye=U(`<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>`,1),hye=U(`<!> <!> <!>`,1),gye={hash:`svelte-mqll9n`,code:`.grid-wrapper.svelte-mqll9n {overflow-y:auto;height:100%;}p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}`};function _ye(e,t){O(t,!0),J(e,gye);let n=()=>j(kY,`$selectAssetsView`,i),r=()=>j($H,`$cmsConfig`,i),[i,a]=sa(),o=e=>{var t=W(),n=L(t),r=e=>{zj(e,{children:(e,t)=>{var n=l8(),r=R(n,!0);V(e=>K(r,e),[()=>Z(l()?`searching`:`loading`)]),G(e,n)},$$slots:{default:!0}})},i=e=>{zj(e,{children:(e,t)=>{var n=l8(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_files_found`)]),G(e,n)},$$slots:{default:!0}})},a=e=>{var t=dye();a8(I(t),{get viewType(){return H(T)},get gridId(){return u()},get multiple(){return c()},children:(e,t)=>{{let t=(e,t=br)=>{var n=W();hc(L(n),vf,null,e=>{let n=N(()=>{let{id:e,previewURL:n,description:r,kind:i}=t();return{id:e,previewURL:n,description:r,_kind:i}});{let r=N(()=>ye(t()));i8(e,{get value(){return H(n).id},get viewType(){return H(T)},get multiple(){return c()},get selected(){return H(r)},onChange:({detail:{selected:e}})=>{be(t(),e)},children:(e,t)=>{var r=u8(),i=L(r);NQ(i,{get kind(){return H(n)._kind},get src(){return H(n).previewURL},get alt(){return H(n).description},variant:`tile`,crossorigin:`anonymous`});var a=z(i,2),o=e=>{{let t=N(()=>H(E)?void 0:H(n).description),r=N(()=>H(E)?H(n).description:void 0);r8(e,{get path(){return H(t)},get caption(){return H(r)}})}};q(a,e=>{(H(T)===`list`||!zV.isSmallScreen&&!H(E))&&e(o)}),G(e,r)},$$slots:{default:!0}})}}),G(e,n)},n=N(()=>H(le)??[]);Am(e,{get items(){return H(n)},itemKey:`id`,renderItem:t,$$slots:{renderItem:!0}})}},$$slots:{default:!0}}),D(t),G(e,t)};q(n,e=>{H(le)?H(le).length?e(a,-1):e(i,1):e(r)}),G(e,t)},s=X(t,`fieldConfig`,3,void 0),c=X(t,`multiple`,3,!1),l=X(t,`searchTerms`,3,``),u=X(t,`gridId`,3,void 0),d=X(t,`selectedResources`,31,()=>ao([])),f=N(()=>wr(t.serviceProps.serviceType,`stock_assets`)),p=N(()=>wr(t.serviceProps.serviceId,``)),m=N(()=>wr(t.serviceProps.serviceLabel,``)),h=N(()=>wr(t.serviceProps.hotlinking,!1)),g=N(()=>wr(t.serviceProps.authType,`api_key`)),_=N(()=>wr(t.serviceProps.developerURL,``)),v=N(()=>wr(t.serviceProps.apiKeyURL,``)),y=N(()=>t.serviceProps.apiKeyPattern),b=N(()=>t.serviceProps.init),x=N(()=>t.serviceProps.signIn),S=N(()=>t.serviceProps.list),C=N(()=>t.serviceProps.search),w=N(()=>t.serviceProps.upload),T=N(()=>H(p)===`picsum`?`grid`:n()?.type),E=N(()=>H(f)===`stock_assets`),ee=N(()=>s()?.media_libraries?.all??r()?.media_libraries?.all??{}),te=N(()=>H(ee).max_file_size??1/0),ne=ao({userName:``,password:``}),re=P(!0),ie=P(!1),ae=P(``),oe=P(``),se=P(``),ce=P(`initial`),le=P(null),ue=P(void 0),de=P(ao({show:!1,status:`info`,length:0})),fe=P(ao([])),pe=P(ao([])),me=P(!1),he=N(()=>({kind:t.kind,fieldConfig:s(),apiKey:H(ae),userName:H(oe),password:H(se)})),ge=async(e=``)=>{F(le,null),e=e.trim();try{F(le,await(e?H(C)?.(e,H(he)):H(S)?.(H(he)))??[],!0)}catch(e){F(ue,`search_fetch_failed`),console.error(e)}},_e=async e=>{let{downloadURL:t,fileName:n,credit:r}=e;if(H(h))return{url:t,credit:r};try{let e=await fetch(t),{ok:i,status:a}=e;if(!i)throw Error(`The response returned with HTTP status ${a}.`);let o=await e.blob();return{url:t,credit:r,file:new File([o],n,{type:o.type})}}catch(e){F(ue,`image_fetch_failed`),console.error(e)}},ve=async e=>{if(!H(w))return;let t=await Promise.all(e.map(e=>lU(e,H(ee))));if(e=t.filter(({oversized:e,invalid:t})=>!e&&!t).map(({file:e})=>e),F(fe,t.filter(({oversized:e,invalid:t})=>e&&!t).map(({file:e})=>e.name),!0),F(pe,t.filter(({invalid:e})=>e).map(({file:e})=>e.name),!0),(H(fe).length||H(pe).length)&&F(me,!0),e.length){F(de,{show:!0,status:`info`,length:e.length},!0);try{let t=await H(w)(e,H(he)),n=await Promise.all(t.map(e=>_e(e)));d(n.filter(e=>!!e).slice(0,c()?void 0:1)),F(le,[...t,...H(le)??[]],!0)}catch{F(de,{show:!0,status:`error`,length:e.length},!0)}}},ye=e=>d().some(t=>t.url===e.downloadURL),be=async(e,t)=>{let n=d().filter(t=>t.url!==e.downloadURL);if(t){let t=await _e(e);t&&d([...n,t])}else d(n)};Nl(()=>{(async()=>{typeof H(b)==`function`&&(F(re,!1),F(re,await H(b)(),!0)),H(re)&&(F(ae,KH.apiKeys?.[H(p)]??``,!0),(e=>{var t=Tr(e,2);F(oe,t[0],!0),F(se,t[1],!0)})((KH.logins?.[H(p)]??``).split(` `)),F(ie,H(g)===`none`||!!H(ae)||!!H(se),!0),F(le,null))})()}),B(()=>{l(),H(ie),Ds(()=>{H(ie)&&ge(l())})});var xe={uploadFiles:ve},Se=hye(),Ce=L(Se),we=e=>{var t=W(),n=L(t),r=e=>{zj(e,{children:(e,t)=>{var n=l8(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`assets_dialog.error.${H(ue)}`)]),G(e,n)},$$slots:{default:!0}})},i=e=>{{let t=N(()=>s()?.accept);A4(e,{get accept(){return H(t)},multiple:!0,onDrop:({files:e})=>ve(e),children:(e,t)=>{o(e)},$$slots:{default:!0}})}},a=e=>{o(e)};q(n,e=>{H(ue)?e(r):H(w)?e(i,1):e(a,-1)}),G(e,t)},Te=e=>{zj(e,{children:(e,t)=>{var n=mye(),r=L(n),i=I(r),a=e=>{var t=W();kc(L(t),()=>gt(Z(`prefs.media.stock_photos.description`,{values:{service:H(m),homeHref:`href="${H(_)}"`,apiKeyHref:`href="${H(v)}"`}}).replace(/[\u2068\u2069]/g,``),PB)),G(e,t)};q(i,e=>{H(E)&&e(a)});var o=z(i,2),s=e=>{var t=W();kc(L(t),()=>gt(Z(`cloud_storage.${H(p)}.auth.${H(ce)}`,{default:Z(`cloud_storage.auth.${H(g)}.${H(ce)}`,{values:{service:H(m),key:Z(`cloud_storage.${H(p)}.auth_key_label`,{default:Z(`cloud_storage.auth.${H(g)}.key_label`)})}})}),PB)),G(e,t)};q(o,e=>{H(f)===`cloud_storage`&&e(s)}),D(r);var c=z(r,2),l=e=>{var t=fye(),n=I(t);{let e=N(()=>Z(`prefs.media.stock_photos.field_label`,{values:{service:H(m)}}));fm(n,{dir:`ltr`,flex:!0,monospace:!0,spellcheck:`false`,get"aria-label"(){return H(e)},oninput:e=>{let t=e.target.value.trim();H(y)?.test(t)&&(F(ae,t,!0),F(ie,!0),KH.apiKeys??={},KH.apiKeys[H(p)]=H(ae),ge())}})}D(t),G(e,t)};q(c,e=>{H(g)===`api_key`&&e(l)});var u=z(c,2),d=e=>{var t=pye(),n=L(t),r=I(n);{let e=N(()=>Z(`username`)),t=N(()=>H(ce)===`requested`);fm(r,{dir:`ltr`,flex:!0,spellcheck:`false`,get"aria-label"(){return H(e)},get disabled(){return H(t)},get value(){return ne.userName},set value(e){ne.userName=e}})}D(n);var i=z(n,2),a=I(i);{let e=N(()=>Z(`password`)),t=N(()=>H(ce)===`requested`);Rj(a,{get"aria-label"(){return H(e)},get disabled(){return H(t)},get value(){return ne.password},set value(e){ne.password=e}})}D(i);var o=z(i,2),s=I(o);{let e=N(()=>Z(`sign_in`)),t=N(()=>!ne.userName||!ne.password||H(ce)===`requested`);$f(s,{variant:`secondary`,get label(){return H(e)},get disabled(){return H(t)},onclick:async()=>{F(ce,`requested`),ne.userName=ne.userName.trim(),ne.password=ne.password.trim(),await H(x)?.(ne.userName,ne.password)?(F(ce,`success`),F(oe,ne.userName,!0),F(se,ne.password,!0),F(ie,!0),KH.logins??={},KH.logins[H(p)]=[H(oe),H(se)].join(` `),ge()):F(ce,`error`)}})}D(o),G(e,t)};q(u,e=>{H(g)===`password`&&e(d)}),G(e,n)},$$slots:{default:!0}})},Ee=e=>{zj(e,{children:(e,t)=>{var n=l8(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`cloud_storage.invalid`)]),G(e,n)},$$slots:{default:!0}})};q(Ce,e=>{H(ie)?e(we):H(re)?e(Te,1):e(Ee,-1)});var De=z(Ce,2);Nh(De,{get show(){return H(de).show},set show(e){H(de).show=e},children:(e,t)=>{Hl(e,{get status(){return H(de).status},children:(e,t)=>{var n=u8(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`uploading_files_progress`)]),G(e,t)};q(r,e=>{H(de).status===`info`&&e(i)});var a=z(r,2),o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`uploading_files_failed`)]),G(e,t)};q(a,e=>{H(de).status===`error`&&e(o)}),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),c8(z(De,2),{get oversizedFileNames(){return H(fe)},get invalidFileNames(){return H(pe)},get maxSize(){return H(te)},get open(){return H(me)},set open(e){F(me,e,!0)}}),G(e,Se);var Oe=k(xe);return a(),Oe}var d8=U(`<div role="none" class="unsaved svelte-1ong0f1"> </div>`),vye=U(`<!> <!> <!>`,1),yye=U(`<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>`),bye=U(`<span role="none"> </span>`),xye={hash:`svelte-1ong0f1`,code:`.grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;[role='listbox'] {background-color:transparent;&.grid {.unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}}&.list {.name {display:flex;gap:8px;align-items:center;justify-content:space-between;}}}}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}`};function f8(e,t){O(t,!0),J(e,xye);let n=X(t,`multiple`,3,!1),r=X(t,`assets`,19,()=>[]),i=X(t,`viewType`,3,`grid`),a=X(t,`searchTerms`,3,``),o=X(t,`basePath`,3,void 0),s=X(t,`gridId`,3,void 0),c=X(t,`checkerboard`,3,!1),l=X(t,`selectedResources`,31,()=>ao([])),u=X(t,`onSelect`,3,void 0),d=N(()=>a()?a().split(/\s+/).filter(Boolean):[]),f=N(()=>{let e=r().map(e=>{let{folder:t,name:n,path:r}=e,i=o()&&!t.entryRelative?FA(r.replace(o(),``)):n;return{...e,relPath:i,key:gU(e)}});return H(d).length?e.filter(({relPath:e})=>H(d).every(t=>u3(e).includes(t))):e}),p=e=>l().some(t=>t.asset&&gU(t.asset)===gU(e)),m=(e,t)=>{let n=gU(e),r=l().filter(e=>!e.asset||gU(e.asset)!==n);t?(l([...r,{asset:e}]),u()?.({asset:e})):l(r)};var h=W(),g=L(h),_=e=>{var t=yye();a8(I(t),{get multiple(){return n()},get gridId(){return s()},get viewType(){return i()},children:(e,t)=>{Am(e,{get items(){return H(f)},itemKey:`key`,renderItem:(e,t=br)=>{var r=W();hc(L(r),vf,null,e=>{let r=N(()=>t());{let a=N(()=>p(t()));i8(e,{get value(){return H(r).key},get viewType(){return i()},get multiple(){return n()},get selected(){return H(a)},onChange:({detail:{selected:e}})=>{m(t(),e)},children:(e,n)=>{var a=vye(),o=L(a),s=e=>{var t=d8(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`assets_dialog.unsaved`)]),G(e,t)};q(o,e=>{i()===`grid`&&H(r).unsaved&&e(s)});var l=z(o,2);NQ(l,{get kind(){return H(r).kind},get asset(){return t()},get alt(){return H(r).relPath},variant:`tile`,get checkerboard(){return c()}});var u=z(l,2),d=e=>{r8(e,{get path(){return H(r).relPath},children:(e,t)=>{var n=W(),a=L(n),o=e=>{var t=d8(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`assets_dialog.unsaved`)]),G(e,t)};q(a,e=>{i()===`list`&&H(r).unsaved&&e(o)}),G(e,n)},$$slots:{default:!0}})};q(u,e=>{(!zV.isSmallScreen||i()===`list`)&&e(d)}),G(e,a)},$$slots:{default:!0}})}}),G(e,r)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),D(t),G(e,t)},v=e=>{zj(e,{children:(e,t)=>{var n=bye(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_files_found`)]),G(e,n)},$$slots:{default:!0}})};q(g,e=>{H(f).length?e(_):e(v,-1)}),G(e,h),k()}function Sye(e,t){O(t,!0);let n=()=>j(kY,`$selectAssetsView`,r),[r,i]=sa(),a=X(t,`multiple`,3,!1),o=X(t,`accept`,3,void 0),s=X(t,`assets`,19,()=>[]),c=X(t,`searchTerms`,3,``),l=X(t,`basePath`,3,void 0),u=X(t,`selectedResources`,31,()=>ao([])),d=P(void 0);B(()=>{u().length||Ds(()=>{H(d)?.reset()})}),Ol(A4(e,{get multiple(){return a()},get accept(){return o()},get onDrop(){return t.onDrop},children:(e,t)=>{{let t=N(()=>n()?.type);f8(e,{get multiple(){return a()},get assets(){return s()},get viewType(){return H(t)},get searchTerms(){return c()},get basePath(){return l()},gridId:`select-assets-grid`,checkerboard:!0,get selectedResources(){return u()},set selectedResources(e){u(e)}})}},$$slots:{default:!0}}),e=>F(d,e,!0),()=>H(d)),k(),i()}var p8={count:0,name:``,showDialog:!1,resolve:()=>{}},m8=ao({...p8}),h8=async({files:e,listedAssets:t})=>{let n=PU(e,t),r=n.length;if(!r)return!1;let{promise:i,resolve:a}=Promise.withResolvers();Object.assign(m8,{count:r,name:n[0].name,showDialog:!0,resolve:a});let o=await i;return Object.assign(m8,{...p8}),o},Cye=/(?<=.)\/(?=\/|$)/g,g8=({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i})=>{let a=pM({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i}),o=t?pM({collectionName:e,fileName:t}):void 0,s=pM({collectionName:e}),c=o??s,l=A(uM),u={field:{folder:a,enabled:a!==void 0},entry:{folder:c,enabled:!!c&&(c.entryRelative||c.hasTemplateTags)},file:{folder:o,enabled:!!o&&!o.entryRelative&&!o.hasTemplateTags},collection:{folder:s,enabled:!!s&&!s.entryRelative&&!s.hasTemplateTags},global:{folder:l,enabled:l!==void 0}};return A(lM).forEach(e=>{e.isAssetCollection&&e.collectionName&&(u[e.collectionName]={folder:e,enabled:!0})}),u},_8=e=>Object.values(e).find(({enabled:e})=>e)?.folder,v8=({entry:e,folder:t})=>{let{collectionName:n,entryRelative:r,internalPath:i,internalSubPath:a}=t??{};if(!r)return i===void 0?void 0:TU({internalPath:i,collectionName:n,entry:e})??i.replaceAll(aM,`-`);let o=a||void 0;if(e){let t=qj(Object.values(e.locales)[0].path).dirname;return o?`${t}/${o}`:t}return o?`${i}/${o}/-`:`${i}/-`},wye=({draft:e,blobURL:t,fileName:n})=>{let{folder:r}=e.files[t]??{},{entryRelative:i,publicPath:a=``}=r??{};if(!r||!i&&!fV(a))return r4(a,n);let{defaultLocaleSlug:o}=$2({draft:e}),{resolvedPublicPath:s}=n4({draft:e,defaultLocaleSlug:o,folder:r});return r4(s.replace(Cye,``),n)},y8=({path:e,folderPath:t})=>t!==void 0&&(e===t||`${e}/-`===t||e.startsWith(`${t}/`)),Tye=({asset:e,folder:t,folderPath:n})=>{if(t===void 0||e.folder?.internalPath!==t.internalPath||e.folder?.entryRelative!==t.entryRelative)return!1;if(!t.entryRelative)return y8({path:e.path,folderPath:n});let{dirname:r}=qj(e.path);return r!==void 0&&y8({path:r,folderPath:n})},Eye=({savedAssets:e,unsavedAssets:t,slugificationEnabled:n})=>{if(!t.length)return{savedAssets:e,unsavedAssets:t};let r=new Map,i=new Set;e.forEach(({path:e,name:t})=>{let n=qj(e).dirname??``;r.set(n,[...r.get(n)??[],t.normalize()])});let a=t.map(e=>{let{name:t,path:a,replace:o}=e,s=qj(a).dirname??``,c=r.get(s)??[],l=xz(t,{slugificationEnabled:n,assetNamesInSameFolder:o?[]:c}),u=s?`${s}/${l}`:l;return o?i.add(u):(c.push(l.normalize()),r.set(s,c)),u===a?e:{...e,name:l,path:u}});return{savedAssets:i.size?e.filter(({path:e})=>!i.has(e)):e,unsavedAssets:a}},b8=({kind:e,folder:t,folderPath:n,unsavedAssets:r,slugificationEnabled:i=!1})=>{let a=e=>Tye({asset:e,folder:t,folderPath:n}),o=Eye({savedAssets:A(dU).filter(a),unsavedAssets:r.filter(a),slugificationEnabled:i});return[...o.unsavedAssets,...o.savedAssets].filter(t=>!e||e===t.kind).sort((e,t)=>e.name.localeCompare(t.name)).sort((e,t)=>Number(!!t.unsaved)-Number(!!e.unsaved))},Dye=async({hash:e,folder:t,unsavedAssets:n})=>(await Promise.all(n.map(async n=>!!n.file&&(0,HH.default)(n.folder,t)&&await Df(n.file)===e))).includes(!0),Oye=/(?<path>.+?)(?:\/[^/]+)?$/,x8=async({draft:e,file:t,folder:n})=>{let r=await Df(t),i;return await Promise.all(Object.entries(e.files??{}).map(async([e,t])=>{!i&&await Df(t.file)===r&&(!n?.entryRelative||(0,HH.default)(t.folder,n))&&(i=e)})),i},S8=async({file:e,blobURL:t,folder:n,targetFolderPath:r,replace:i})=>{let{name:a,size:o}=e;return{unsaved:!0,replace:!!i,file:e,blobURL:t??URL.createObjectURL(e),name:a,path:r?`${r}/${a}`:a,sha:await Ez(e),size:o,kind:MR(a),folder:n}},C8=async({draft:e,targetFolderPath:t})=>Promise.all(Object.entries(e.files).map(async([e,{file:n,folder:r,replace:i}])=>S8({file:n,blobURL:e,folder:r,targetFolderPath:t,replace:i}))),kye=(e,t)=>{let n=A(dU);if(!t?.entryRelative)return n;let{originalEntry:r,defaultLocale:i,collection:a}=e,o=r?.locales[i]?.path;if(!o)return[];let s=a._type===`entry`?a._file.subPath:void 0,c=s?.includes(`/`)?s.split(`/`).at(-1):void 0,l=o.substring(0,o.lastIndexOf(`.`));c&&!c.includes(`{{`)&&(l=l.match(Oye)?.groups?.path??l);let u=[l,t.internalSubPath].filter(Boolean).join(`/`);return n.filter(e=>e.path.startsWith(`${u}/`))},w8=async({draft:e,resource:t,libraryConfig:n})=>{let{url:r,credit:i,replace:a=!1}=t,{asset:o,file:s}=t,c=``,l;if(s){let{folder:r}=t,i=await x8({draft:e,file:s,folder:r});if(i)c=i;else{let{file:t,oversized:i,invalid:u}=await lU(s,n??{});if(s=t,u)return{value:void 0,credit:``,oversizedFileName:l,invalidFileName:s.name};let d=await Ez(s),f=[...kye(e,r),...await C8({draft:e})].find(e=>e.sha===d&&(0,HH.default)(e.folder,r));f?(o=f,s=void 0):i?(l=s.name,s=void 0):(c=URL.createObjectURL(s),e.files[c]={file:s,folder:r,replace:a})}}return o&&(o.unsaved?o.file&&(c=await x8({draft:e,file:o.file,folder:o.folder})):c=oB(o,{pathOnly:!0,allowSpecial:!0,entry:e.originalEntry})),r&&!s&&!o&&(c=r),{value:c,credit:i?gt(i,PB):``,oversizedFileName:l,invalidFileName:void 0}},T8=[`en-US,pt-BR,es-ES,ca-ES,de-DE,it-IT,fr-FR,sv-SE,id-ID,pl-PL,ja-JP,zh-TW,zh-CN,ko-KR,th-TH,nl-NL`,`hu-HU,vi-VN,cs-CZ,da-DK,fi-FI,uk-UA,el-GR,ro-RO,nb-NO,sk-SK,tr-TR,ru-RU`].join(`,`).split(`,`),E8=`https://api.pexels.com/v1`,D8={per_page:80},Aye=/\/photo\/(?<alt>.+?)-\d+\/$/,jye=()=>{let e=Ud.current.toLowerCase(),[t]=e.split(`-`);return T8.find(t=>t.toLowerCase()===e)??T8.find(e=>e.split(`-`)[0]===t)??`en-US`},O8=e=>e.map(({id:e,url:t,alt:n,src:{large2x:r,medium:i},photographer:a})=>({id:String(e),description:t.match(Aye)?.groups?.alt.replace(/-/g,` `)??n,previewURL:i,downloadURL:r,fileName:`pexels-${a.split(/\s+/).join(`-`).toLowerCase()}-${e}.jpg`,kind:`image`,credit:`<a href="${t}">Photo by ${a} on Pexels</a>`})),Mye={serviceType:`stock_assets`,serviceId:`pexels`,serviceLabel:`Pexels`,serviceURL:`https://www.pexels.com/`,showServiceLink:!0,hotlinking:!1,authType:`api_key`,developerURL:`https://www.pexels.com/api/`,apiKeyURL:`https://www.pexels.com/api/new/`,apiKeyPattern:/^[a-zA-Z\d]{56}$/,list:async({apiKey:e})=>{let t={Authorization:e},n=new URLSearchParams(D8),r=await fetch(`${E8}/curated?${n}`,{headers:t});if(!r.ok)return Promise.reject();let i=(await r.json()).photos;return O8(i)},search:async(e,{apiKey:t})=>{let n={Authorization:t},r=new URLSearchParams({...D8,query:e,locale:jye()}),i=[];for(let e=1;e<=2;e+=1){r.set(`page`,String(e));let t=await fetch(`${E8}/search?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{photos:a,next_page:o}=await t.json();if(i.push(...a),!o)break;await vf(50)}return O8(i)}},Nye=`https://picsum.photos/v2/list`,Pye=100,Fye=10,Iye=3,Lye=e=>e.map(({id:e,width:t,height:n})=>{let r=t>=n,[i,a]=r?[1920,1280]:[1280,1920],[o,s]=r?[480,320]:[320,480];return{id:e,description:``,previewURL:`https://picsum.photos/id/${e}/${o}/${s}.webp`,downloadURL:`https://picsum.photos/id/${e}/${i}/${a}.webp`,fileName:`picsum-${e}.webp`,kind:`image`}}),Rye={serviceType:`stock_assets`,serviceId:`picsum`,serviceLabel:`Lorem Picsum`,serviceURL:`https://picsum.photos/`,showServiceLink:!0,hotlinking:!0,authType:`none`,list:async()=>{let e=Array.from({length:Fye},(e,t)=>t+1).sort(()=>Math.random()-.5).slice(0,Iye),t=await Promise.all(e.map(e=>fetch(`${Nye}?page=${e}&limit=${Pye}`)));return t.some(e=>!e.ok)?Promise.reject():Lye((await Promise.all(t.map(e=>e.json()))).flat().sort(()=>Math.random()-.5))}},zye=`cs,da,de,en,es,fr,id,it,hu,nl,no,pl,pt,ro,sk,fi,sv,tr,vi,th,bg,ru,el,ja,ko,zh`.split(`,`),k8=`https://pixabay.com/api`,A8={image_type:`photo`,min_width:1280,safesearch:!0,per_page:150},j8=e=>e.map(({id:e,webformatURL:t,previewURL:n,largeImageURL:r,imageWidth:i,imageHeight:a,pageURL:o,tags:s,user:c})=>({id:String(e),description:s,previewURL:t.replace(`_640.`,i>a?`_180.`:`_340.`),downloadURL:r,fileName:n.split(`/`).pop().replace(`_150.`,`_1280.`),kind:`image`,credit:`<a href="${o}">Photo by ${c} on Pixabay`})),M8=()=>{let[e]=Ud.current.toLowerCase().split(`-`);return zye.includes(e)?e:`en`},Bye={serviceType:`stock_assets`,serviceId:`pixabay`,serviceLabel:`Pixabay`,serviceURL:`https://pixabay.com/`,showServiceLink:!0,hotlinking:!1,authType:`api_key`,developerURL:`https://pixabay.com/service/about/api/`,apiKeyURL:`https://pixabay.com/api/docs/#api_key`,apiKeyPattern:/^\d+-[a-f\d]{25}$/,list:async({apiKey:e})=>{let t=new URLSearchParams({...A8,key:e,lang:M8(),editors_choice:`true`}),n=await fetch(`${k8}/?${t}`);if(!n.ok)return Promise.reject();let r=(await n.json()).hits;return j8(r)},search:async(e,{apiKey:t})=>{let n=new URLSearchParams({...A8,key:t,lang:M8(),q:e}),r=await fetch(`${k8}/?${n}`);if(!r.ok)return Promise.reject();let i=(await r.json()).hits;return j8(i)}},N8=[`af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj`,`fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr`,`ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm`,`sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu`].join(`,`).split(`,`),P8=`https://api.unsplash.com`,F8=`utm_source=sveltia-cms&utm_medium=referral`,I8={per_page:30},Vye=()=>{let e=Ud.current.toLowerCase(),[t]=e.split(`-`);return N8.find(t=>t.toLowerCase()===e)??N8.find(e=>e.split(`-`)[0]===t)??`en`},L8=e=>e.map(({id:e,description:t,alt_description:n,urls:{regular:r,thumb:i},user:{username:a,name:o}})=>({id:String(e),description:[t,n].filter(Boolean).join(` — `),previewURL:i,downloadURL:r,fileName:`${o.split(/\s+/).join(`-`).toLowerCase()}-${e}-unsplash.jpg`,kind:`image`,credit:`Photo by <a href="https://unsplash.com/@${a}?${F8}">${o}</a> on <a href="https://unsplash.com/?${F8}">Unsplash</a>`})),R8={pexels:Mye,picsum:Rye,pixabay:Bye,unsplash:{serviceType:`stock_assets`,serviceId:`unsplash`,serviceLabel:`Unsplash`,serviceURL:`https://unsplash.com/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://unsplash.com/developers`,apiKeyURL:`https://unsplash.com/oauth/applications`,apiKeyPattern:/^[a-zA-Z\d_-]{40,}$/,list:async({apiKey:e})=>{let t={Authorization:`Client-ID ${e}`},n=new URLSearchParams(I8),r=await fetch(`${P8}/photos?${n}`,{headers:t});return r.ok?L8(await r.json()):Promise.reject()},search:async(e,{apiKey:t})=>{let n={Authorization:`Client-ID ${t}`},r=new URLSearchParams({...I8,query:e,lang:Vye()}),i=[];for(let e=1;e<=5;e+=1){r.set(`page`,String(e));let t=await fetch(`${P8}/search/photos?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{results:a,total_pages:o}=await t.json();if(i.push(...a),o===e)break;await vf(50)}return L8(i)}}},z8=({fieldConfig:e}={})=>{let t=aU({libraryName:`stock_assets`,fieldConfig:e});if(t===!1)return{providers:[]};let n=Object.keys(R8),{providers:r}=t;return{providers:Array.isArray(r)?r:n}},B8=U(`<!> <!>`,1),Hye=U(`<a class="service-link svelte-5b1zbe"> </a>`),Uye=U(`<!> <!> <!>`,1),Wye=U(`<div role="none" class="filter-tools svelte-5b1zbe"><!></div>`),Gye=U(`<div role="none"> </div> <!>`,1),Kye=U(`<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>`),qye={hash:`svelte-5b1zbe`,code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;max-height:800px;--tile-padding: 4px;
|
||
|
||
@media (width < 768px) {flex-direction:column;overflow:hidden;height:72dvh;
|
||
}.nav:where(.svelte-5b1zbe) {flex:none;display:flex;gap:4px;
|
||
|
||
@media (width < 768px) {flex-direction:column;
|
||
}}.listbox {flex:none;background-color:transparent;}.content-pane:where(.svelte-5b1zbe) {overflow:auto;flex:auto;}}.service-link.svelte-5b1zbe {font-size:var(--sui-font-size-small);}.filter-tools.svelte-5b1zbe {display:flex;gap:8px;}`};function Jye(e,t){let n=tc();O(t,!0),J(e,qye);let r=()=>j(t.entryDraft,`$entryDraft`,s),i=()=>j(SY,`$showContentOverlay`,s),a=()=>j(kY,`$selectAssetsView`,s),o=()=>j(HR,`$cloudinaryActivated`,s),[s,c]=sa(),l=e=>{var n=B8(),r=L(n),i=e=>{var n=B8(),r=L(n),i=e=>{{let t=N(()=>kY);o3(e,{get currentView(){return H(t)},"aria-controls":`select-assets-grid`})}};q(r,e=>{a()&&e(i)});var o=z(r,2);{let e=N(()=>!H(te)),n=N(()=>H(S).some(e=>e.file)),r=N(()=>Z(`assets_dialog.search_for_${t.kind??`file`}`));Pm(o,{dir:`auto`,get flex(){return zV.isSmallScreen},get debounce(){return H(e)},get disabled(){return H(n)},get"aria-label"(){return H(r)},get value(){return H(_)},set value(e){F(_,e,!0)}})}G(e,n)};q(r,e=>{(H(te)||H(le)&&H(v)!==`cloudinary`||H(ue)&&H(v)!==`picsum`)&&e(i)});var o=z(r,2),s=e=>{{let t=e=>{Rl(e,{name:`cloud_upload`})},n=N(()=>Z(`upload`));$f(e,{variant:`primary`,get label(){return H(n)},onclick:()=>{H(x)?.open()},startIcon:t,$$slots:{startIcon:!0}})}};q(o,e=>{(H(te)||H(le)&&H(v)!==`cloudinary`)&&e(s)}),G(e,n)},u=X(t,`open`,15,!1),d=X(t,`multiple`,3,!1),f=X(t,`accept`,19,()=>t.kind===`image`?Vz.join(`,`):void 0),p=X(t,`canEnterURL`,3,!0),m=X(t,`onSelect`,3,void 0),h=X(t,`pendingFiles`,31,()=>ao([])),g=P(``),_=P(``),v=P(`default-global`),y=P(ao([])),b=P(ao([])),x=P(void 0),S=P(ao([])),C=P(void 0),w=(e,t)=>{let n=e[1].serviceLabel.toLowerCase(),r=t[1].serviceLabel.toLowerCase();return n.localeCompare(r)},T=N(()=>t.kind===`image`?Z(`assets_dialog.title.image`):Z(`assets_dialog.title.file`)),E=N(()=>u3(H(_))),ee=N(()=>aU({fieldConfig:t.fieldConfig})!==!1&&Object.values(t.assetLibraryFolderMap).some(({enabled:e})=>e)),te=N(()=>H(v).startsWith(`default-`)),ne=N(()=>{if(!H(te))return;let e=H(v).replace(`default-`,``),{folder:n}=t.assetLibraryFolderMap[e];return n}),re=N(()=>v8({entry:r()?.originalEntry,folder:H(ne)})),ie=N(()=>oU({fieldConfig:t.fieldConfig}).config.slugify_filename),ae=N(()=>b8({kind:t.kind,folder:H(ne),folderPath:H(re),unsavedAssets:H(b),slugificationEnabled:H(ie)})),oe=N(()=>{let{providers:e=[]}=z8({fieldConfig:t.fieldConfig});return Object.entries(R8).filter(([t,{hotlinking:n}])=>e.includes(t)&&(n||H(ee))).sort(w)}),se=N(()=>H(oe).some(([e,{authType:t}])=>e===H(v)&&(t===`none`||!!KH.apiKeys?.[H(v)]))),ce=N(()=>[...t.enabledCloudServiceEntries,...H(oe)].sort(w)),le=N(()=>t.enabledCloudServiceEntries.map(([e])=>e).includes(H(v))),ue=N(()=>H(oe).map(([e])=>e).includes(H(v))),de=N(()=>zV.isSmallScreen?Km:vm),fe=async(e,t)=>{let n=await Df(e),r=H(ne);if(await Dye({hash:n,folder:r,unsavedAssets:H(b)}))return;let i=await S8({file:e,folder:r,targetFolderPath:H(re),replace:t});return H(y).push(i),i},pe=async e=>{let t=await h8({files:e,listedAssets:H(ae)});t!==void 0&&F(S,(await Promise.all(e.map(e=>fe(e,t)))).filter(e=>!!e).map(e=>({asset:e,replace:t})),!0)},me=()=>{F(g,``),F(_,``),F(y,[],!0),F(b,[],!0),F(S,[],!0)},he=()=>{if(!H(S).length)return;let e=Ni(H(S)).map(e=>{let{asset:{unsaved:t,file:n,folder:r}={},replace:i}=e;return t?{file:n,folder:r,replace:i}:e});m()?.(e)};Ao(()=>{let e=H(ee)?Object.entries(t.assetLibraryFolderMap).find(([,{enabled:e}])=>e)?.[0]:void 0;e?F(v,`default-${e}`):F(v,H(ce)[0]?.[0],!0)}),B(()=>{r()?.files,Ni(H(y)),(async()=>{F(b,[...r()?.files?await C8({draft:r(),targetFolderPath:H(re)}):[],...Object.values(H(y))],!0)})()}),B(()=>{i()||u(!1)}),B(()=>{H(C)&&h().length&&(H(C).uploadFiles(h()),h([]))});var ge=B8(),_e=L(ge);{let e=e=>{var t=W(),n=L(t),r=e=>{l(e)};q(n,e=>{zV.isSmallScreen||e(r)}),G(e,t)},r=e=>{var t=W(),n=L(t),r=e=>{let t=N(()=>R8[H(v)]??{});var n=W(),r=L(n),i=e=>{var n=Hye(),r=R(n,!0);V(e=>{Y(n,`href`,H(t).serviceURL),K(r,e)},[()=>Z(`prefs.media.stock_photos.credit`,{values:{service:H(t).serviceLabel}})]),G(e,n)};q(r,e=>{H(t).showServiceLink&&e(i)}),G(e,n)};q(n,e=>{H(se)&&e(r)}),G(e,t)},i=N(()=>Z(`insert`)),a=N(()=>!H(S).length);Yp(_e,{get title(){return H(T)},size:`x-large`,get okLabel(){return H(i)},get okDisabled(){return H(a)},focusInput:!1,onOk:he,onClose:()=>{me()},get open(){return u()},set open(e){u(e)},headerExtra:e,footerExtra:r,children:(e,r)=>{var i=Kye(),a=I(i),s=I(a);{let e=N(()=>Z(`assets_dialog.locations`));jc(s,()=>H(de),(r,i)=>{i(r,{class:`tabs`,get"aria-label"(){return H(e)},get"aria-controls"(){return`${n}-content-pane`},filterThreshold:-1,onChange:e=>{F(v,e.detail.name,!0),F(S,[],!0)},children:(e,n)=>{var r=Uye(),i=L(r),a=e=>{{let n=N(()=>Z(`asset_location.repository`));ym(e,{get label(){return H(n)},children:(e,n)=>{var r=W();Cc(L(r),17,()=>Object.entries(t.assetLibraryFolderMap),([e,{folder:t,enabled:n}])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1].folder,a=()=>H(n)[1].enabled;var o=W(),s=L(o),c=e=>{let t=N(()=>`default-${r()}`);{let n=N(()=>i()?.label||Z(`assets_dialog.folder.${r()}`)),a=N(()=>H(v)===H(t));bm(e,{get name(){return H(t)},get label(){return H(n)},get selected(){return H(a)}})}};q(s,e=>{a()&&e(c)}),G(e,o)}),G(e,r)},$$slots:{default:!0}})}};q(i,e=>{H(ee)&&e(a)});var s=z(i,2),c=e=>{{let n=N(()=>Z(`asset_location.external`));ym(e,{get label(){return H(n)},children:(e,n)=>{var r=B8(),i=L(r);Cc(i,17,()=>t.enabledCloudServiceEntries,([,{serviceId:e,serviceLabel:t}])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[1].serviceId,i=()=>H(n)[1].serviceLabel;{let t=N(()=>H(v)===r());bm(e,{get name(){return r()},get label(){return i()},get selected(){return H(t)},onclick:()=>{r()===`cloudinary`&&o()&&M(WR,!0)}})}});var a=z(i,2),s=e=>{{let t=N(()=>Z(`assets_dialog.enter_url`)),n=N(()=>H(v)===`enter-url`);bm(e,{name:`enter-url`,get label(){return H(t)},get selected(){return H(n)}})}};q(a,e=>{p()&&e(s)}),G(e,r)},$$slots:{default:!0}})}},l=N(()=>p()||!!Object.keys(t.enabledCloudServiceEntries).length);q(s,e=>{H(l)&&e(c)});var u=z(s,2),d=e=>{{let t=N(()=>Z(`asset_location.stock_photos`));ym(e,{get label(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>H(oe),([e,{serviceLabel:t}])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1].serviceLabel;{let t=N(()=>H(v)===r());bm(e,{get name(){return r()},get label(){return i()},get selected(){return H(t)}})}}),G(e,n)},$$slots:{default:!0}})}};q(u,e=>{H(oe).length&&e(d)}),G(e,r)},$$slots:{default:!0}})})}var c=z(s,2),m=e=>{var t=Wye(),n=I(t);l(n),D(t),G(e,t)};q(c,e=>{zV.isSmallScreen&&e(m)}),D(a);var h=z(a,2),_=I(h),y=e=>{Sye(e,{get accept(){return f()},get multiple(){return d()},get assets(){return H(ae)},get searchTerms(){return H(E)},get basePath(){return H(ne).internalPath},onDrop:({files:e})=>{pe(e)},get selectedResources(){return H(S)},set selectedResources(e){F(S,e,!0)}})};q(_,e=>{H(te)&&H(ne)&&e(y)});var b=z(_,2),x=e=>{zj(e,{children:(e,n)=>{var r=Gye(),i=L(r),a=R(i,!0);fm(z(i,2),{dir:`ltr`,flex:!0,oninput:()=>{let e=H(g).trim();F(S,e?[{url:e}]:[],!0)},get value(){return H(g)},set value(e){F(g,e,!0)}}),V(e=>K(a,e),[()=>t.kind===`image`?Z(`assets_dialog.enter_image_url`):Z(`assets_dialog.enter_file_url`)]),G(e,r)},$$slots:{default:!0}})};q(b,e=>{p()&&H(v)===`enter-url`&&e(x)}),Cc(z(b,2),17,()=>H(ce),([e,t])=>e,(e,n)=>{var r=N(()=>Tr(H(n),2));let i=()=>H(r)[0],a=()=>H(r)[1];var o=W(),s=L(o),c=e=>{{let n=N(()=>H(v)!==`cloudinary`);Zve(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return d()},get hidden(){return H(n)},onSelect:e=>{F(S,e,!0),he(),u(!1)}})}},l=e=>{Ol(_ye(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return d()},get searchTerms(){return H(E)},get serviceProps(){return a()},gridId:`select-assets-grid`,get selectedResources(){return H(S)},set selectedResources(e){F(S,e,!0)}}),e=>F(C,e,!0),()=>H(C))};q(s,e=>{i()===`cloudinary`?e(c):H(v)===i()&&e(l,1)}),G(e,o)}),D(h),D(i),V(()=>Y(h,`id`,`${n}-content-pane`)),G(e,i)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}})}Ol(mm(z(_e,2),{get accept(){return f()},get multiple(){return d()},onSelect:({files:e})=>{H(le)?H(C)?.uploadFiles(e):pe(e)}}),e=>F(x,e,!0),()=>H(x)),G(e,ge),k(),c()}var Yye=U(`<!> <!> <!> <!>`,1);function Xye(e,t){O(t,!0);{let t=e=>{var t=Yye(),n=L(t);Wp(n,{flex:!0});var r=z(n,2);$f(r,{variant:`primary`,onclick:()=>m8.resolve(!0),children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`replace`)]),G(e,n)},$$slots:{default:!0}});var i=z(r,2);$f(i,{variant:`primary`,onclick:()=>m8.resolve(!1),children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`keep_both`)]),G(e,n)},$$slots:{default:!0}}),$f(z(i,2),{variant:`secondary`,onclick:()=>m8.resolve(void 0),children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`cancel`)]),G(e,n)},$$slots:{default:!0}}),G(e,t)},n=N(()=>Z(`file_name_conflict_resolution`));Zp(e,{get title(){return H(n)},onCancel:()=>m8.resolve(void 0),get open(){return m8.showDialog},set open(e){m8.showDialog=e},footer:t,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`file_name_conflict_confirmation_with_name`,{values:{count:m8.count,name:m8.name}})]),G(e,n)},$$slots:{footer:!0,default:!0}})}k()}var V8=({index:e,clientY:t,rect:n})=>t<n.top+n.height/2?e:e+1,H8=(e,t,n)=>{let r=[...e];return r.splice(n,0,...r.splice(t,1)),r},U8=({dragIndex:e,dropIndex:t})=>{if(e!==void 0&&t!==void 0&&t!==e&&t!==e+1)return t>e?t-1:t},Zye=({key:e,index:t,itemCount:n})=>{if(e===`ArrowUp`||e===`Home`){let n=e===`ArrowUp`?t-1:0;return t>0?n:void 0}if(e===`ArrowDown`||e===`End`){let r=e===`ArrowDown`?t+1:n-1;return t<n-1?r:void 0}},W8=({target:e,listElement:t})=>{if(!t||!(e instanceof Element)||e===t||!t.contains(e))return;let n=e;for(;n.parentElement!==t;)n=n.parentElement;return{element:n,index:[...t.children].indexOf(n)}},G8=64,Qye=16,K8=void 0,$ye=e=>{let t=e.parentElement;for(;t;){let{overflowY:e}=globalThis.getComputedStyle(t);if([`auto`,`scroll`].includes(e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}},ebe=({clientY:e,rect:t})=>{let n=e-t.top,r=t.bottom-e;return n<G8?-16*(1-Math.max(n,0)/G8):r<G8?Qye*(1-Math.max(r,0)/G8):0},q8=()=>{if(!K8)return;let{container:e,speed:t}=K8,{scrollTop:n,scrollHeight:r,clientHeight:i}=e,a=Math.min(Math.max(n+t,0),r-i);if(!t||a===n){K8.frame=void 0;return}e.scrollTop=a,K8.frame=requestAnimationFrame(q8)},J8=e=>{let t=K8;t.speed=ebe({clientY:e.clientY,rect:t.container.getBoundingClientRect()}),t.speed&&t.frame===void 0&&(t.frame=requestAnimationFrame(q8))},Y8=e=>{let t=e?$ye(e):void 0;t&&(K8={container:t,speed:0,frame:void 0},globalThis.addEventListener(`dragover`,J8,!0))},X8=()=>{K8&&=(globalThis.removeEventListener(`dragover`,J8,!0),void 0)},tbe=U(`<!> <!> <!>`,1),nbe={hash:`svelte-1djdbgy`,code:`button.drag-handle:not(:disabled) {cursor:grab;&:active {cursor:grabbing;}}`};function Z8(e,t){O(t,!0),J(e,nbe);let n=X(t,`disabled`,3,!1),r=X(t,`size`,3,`small`),i=X(t,`icon`,3,`drag_indicator`),a=X(t,`onGrab`,3,void 0),o=X(t,`onRelease`,3,void 0),s=X(t,`onMove`,3,void 0),c=()=>{globalThis.removeEventListener(`pointerup`,c),globalThis.removeEventListener(`pointercancel`,c),o()?.()};var l=W(),u=L(l),d=e=>{{let o=e=>{Rl(e,{get name(){return i()}})},l=N(()=>Z(`reorder_item`));$f(e,{get size(){return r()},get disabled(){return n()},iconic:!0,class:`drag-handle`,"data-action":`reorder`,get"aria-label"(){return H(l)},"aria-keyshortcuts":`ArrowUp ArrowDown Home End`,onpointerdown:()=>{a()?.(),globalThis.addEventListener(`pointerup`,c),globalThis.addEventListener(`pointercancel`,c)},onkeydown:e=>{let n=Zye({key:e.key,index:t.index,itemCount:t.itemCount});n!==void 0&&(e.preventDefault(),s()?.(n,`reorder`))},startIcon:o,$$slots:{startIcon:!0}})}},f=e=>{var i=tbe(),a=L(i);{let e=e=>{Rl(e,{name:`arrow_upward`})},i=N(()=>n()||t.index===0),o=N(()=>Z(`move_up`));$f(a,{get size(){return r()},iconic:!0,get disabled(){return H(i)},"data-action":`move-up`,get"aria-label"(){return H(o)},onclick:()=>s()?.(t.index-1,`move-up`),startIcon:e,$$slots:{startIcon:!0}})}var o=z(a,2);Wp(o,{});var c=z(o,2);{let e=e=>{Rl(e,{name:`arrow_downward`})},i=N(()=>n()||t.index===t.itemCount-1),a=N(()=>Z(`move_down`));$f(c,{get size(){return r()},iconic:!0,get disabled(){return H(i)},"data-action":`move-down`,get"aria-label"(){return H(a)},onclick:()=>s()?.(t.index+1,`move-down`),startIcon:e,$$slots:{startIcon:!0}})}G(e,i)};q(u,e=>{zV.hasMouse?e(d):e(f,-1)}),G(e,l),k()}var rbe=U(`<div role="none" class="reorder-controls svelte-1yfgkx5"><!></div>`),ibe=U(`<span role="none" class="preview no-thumbnail"><!></span>`),abe=U(`<!> <!> <!>`,1),obe=U(`<div role="textbox" tabindex="0" class="filename svelte-1yfgkx5"> </div> <!>`,1),sbe=U(`<div role="none" class="path svelte-1yfgkx5"><!></div>`),cbe=U(`<div role="none"><!> <!> <div role="none" class="svelte-1yfgkx5"><!> <div role="none"><!> <!></div></div></div> <!>`,1),lbe={hash:`svelte-1yfgkx5`,code:`.filled.svelte-1yfgkx5 {display:flex !important;align-items:center;position:relative;gap:12px;margin:var(--sui-focus-ring-width);background-color:var(--sui-primary-background-color); /* for dragging opacity */
|
||
|
||
/* The dragged item is left as a faint placeholder marking the gap it would drop into. The
|
||
pointer already carries the browser’s own drag image of it, so showing it twice at full
|
||
strength would just be confusing. */&.dragging {opacity:0.25;}.preview {flex:none;width:120px !important;height:120px !important;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);padding:8px !important;&.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);.icon {font-size:64px;}}}.sui.button.tertiary.small {margin:var(--sui-focus-ring-width);}& > div:where(.svelte-1yfgkx5) {flex:auto;overflow:hidden;.path:where(.svelte-1yfgkx5) {display:flex;align-items:center;gap:4px;
|
||
|
||
@media (width < 768px) {font-size:var(--sui-font-size-small);
|
||
}.filename:where(.svelte-1yfgkx5) {flex:auto;}}.filename:where(.svelte-1yfgkx5) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;&:empty {margin:0;padding:0;}}}&.sortable {gap:0;border-width:1px;border-style:solid;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);.preview {margin-inline-end:12px;border-radius:0;border-width:0 1px 0 0;}}}.reorder-controls.svelte-1yfgkx5 {flex:none !important;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:28px;height:-moz-available;height:-webkit-fill-available;height:stretch;background-color:var(--sui-secondary-border-color);}`};function Q8(e,t){O(t,!0),J(e,lbe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=X(t,`readonly`,3,!1),o=X(t,`invalid`,3,!1),s=X(t,`required`,3,!1),c=X(t,`collectionName`,3,``),l=X(t,`fileName`,3,void 0),u=X(t,`typedKeyPath`,3,void 0),d=X(t,`componentName`,3,void 0),f=X(t,`entry`,3,void 0),p=X(t,`index`,3,0),m=X(t,`itemCount`,3,1),h=X(t,`dragging`,3,!1),g=P(void 0),_=P(void 0),v=P(void 0),y=P(void 0),b=P(!1),x=P(``),S=P(void 0),C=P(!1),w=P(!1),T=N(()=>t.fieldConfig.widget),E=N(()=>H(T)===`image`),ee=N(()=>!!t.onMove&&!a()),te=N(()=>!!H(_)&&!!t.value?.startsWith(`blob:`)),ne=N(()=>H(te)&&!a()),re=N(()=>H(_)?qj(H(_).name).extension:void 0),ie=N(()=>xz(H(x).trim())),ae=N(()=>qj(H(ie)).extension),oe=N(()=>({value:t.value,entry:f(),collectionName:c(),fileName:l(),componentName:d(),typedKeyPath:u(),fieldConfig:t.fieldConfig})),se=N(()=>{if(!t.value)return``;if(H(_)){let e=decodeURI(H(_).name.normalize());return n()?wye({draft:n(),blobURL:t.value,fileName:e}):e}if(!t.value.startsWith(`blob:`)){let e=decodeURI(t.value);if(LA(e)){let t=new URL(e);if(t.search)return t.search=``,`${t}…`}return e}return``}),ce=async()=>{H(_)&&(F(x,H(_).name,!0),F(b,!0),await ws(),H(S)?.focus(),H(S)?.setSelectionRange(0,qj(H(x)).filename.length))},le=()=>{if(!H(_)||!n()?.files[t.value])return;let e=new File([H(_)],H(ie),{type:H(_).type,lastModified:H(_).lastModified});la(h4,Ds(n).files[t.value].file=e,Ds(n)),F(_,e,!0),F(b,!1)},ue=()=>{if(!H(_)||!H(ie)||H(ie)===H(_).name){F(b,!1);return}Sz(H(re),H(ae))?le():F(C,!0)},de=async()=>{t.value?.startsWith(`blob:`)&&n()&&F(_,n().files[t.value]?.file,!0),t.value?(H(E)&&/^https?:/.test(t.value)?(F(g,void 0),F(v,`image`),F(y,t.value,!0)):t.value.startsWith(`blob:`)||(F(g,AU({...H(oe)}),!0),F(v,void 0),F(y,void 0)),!H(g)&&!H(y)&&(F(v,await jR(t.value),!0),F(y,H(v)?await sB({...H(oe),thumbnail:!0}):void 0,!0))):(F(g,void 0),F(_,void 0),F(v,void 0),F(y,void 0))};B(()=>{t.value,Ds(()=>{de()})}),B(()=>{if(H(b))return wY.update(e=>e+1),()=>{wY.update(e=>e-1)}});var fe=cbe(),pe=L(fe);let me;var he=I(pe),ge=e=>{var n=rbe(),r=I(n);{let e=N(()=>m()<2);Z8(r,{get index(){return p()},get itemCount(){return m()},get disabled(){return H(e)},onGrab:()=>{F(w,!0)},onRelease:()=>{F(w,!1)},get onMove(){return t.onMove}})}D(n),G(e,n)};q(he,e=>{H(ee)&&e(ge)});var _e=z(he,2),ve=e=>{NQ(e,{get kind(){return H(v)},get src(){return H(y)},variant:`tile`,checkerboard:!0})},ye=e=>{NQ(e,{get kind(){return H(g).kind},get asset(){return H(g)},variant:`tile`,checkerboard:!0})},be=e=>{var t=ibe();Rl(I(t),{name:`draft`}),D(t),G(e,t)};q(_e,e=>{H(v)&&H(y)?e(ve):H(g)?e(ye,1):e(be,-1)});var xe=z(_e,2),Se=I(xe),Ce=e=>{var n=sbe(),r=I(n),i=e=>{var n=abe(),r=L(n);fm(r,{get id(){return`${t.fieldId??``}-value`},dir:`auto`,flex:!0,get invalid(){return o()},get required(){return s()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onkeydown:e=>{let{key:t,isComposing:n}=e;n||t!==`Enter`&&t!==`Escape`||(e.preventDefault(),e.stopPropagation(),t===`Enter`?ue():F(b,!1))},get value(){return H(x)},set value(e){F(x,e,!0)},get element(){return H(S)},set element(e){F(S,e,!0)}});var i=z(r,2);{let e=e=>{Rl(e,{name:`check`})},n=N(()=>!H(ie)),r=N(()=>Z(`done`));$f(i,{size:`small`,iconic:!0,get disabled(){return H(n)},get"aria-label"(){return H(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{ue()},startIcon:e,$$slots:{startIcon:!0}})}var a=z(i,2);{let e=e=>{Rl(e,{name:`close`})},n=N(()=>Z(`cancel`));$f(a,{size:`small`,iconic:!0,get"aria-label"(){return H(n)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{F(b,!1)},startIcon:e,$$slots:{startIcon:!0}})}G(e,n)},c=e=>{var n=obe(),r=L(n),i=R(r,!0),c=z(r,2),l=e=>{{let n=e=>{Rl(e,{name:`edit`})},r=N(()=>Z(`rename`));$f(e,{size:`small`,iconic:!0,get"aria-label"(){return H(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{ce()},startIcon:n,$$slots:{startIcon:!0}})}};q(c,e=>{H(ne)&&e(l)}),V(()=>{Y(r,`id`,`${t.fieldId??``}-value`),Y(r,`aria-readonly`,a()),Y(r,`aria-invalid`,o()),Y(r,`aria-required`,s()),Y(r,`aria-labelledby`,`${t.fieldId??``}-label`),Y(r,`aria-errormessage`,`${t.fieldId??``}-error`),K(i,H(se))}),G(e,n)};q(r,e=>{H(b)?e(i):e(c,-1)}),D(n),G(e,n)};q(Se,e=>{typeof t.value==`string`&&e(Ce)});var we=z(Se,2),Te=I(we),Ee=e=>{{let n=N(()=>Z(`replace`)),r=N(()=>Z(`replace_${H(T)}`));$f(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return H(n)},get"aria-label"(){return H(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onReplace()}})}};q(Te,e=>{t.onReplace&&e(Ee)});var De=z(Te,2),Oe=e=>{{let n=N(()=>Z(`remove`)),r=N(()=>Z(`remove_${H(T)}`));$f(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return H(n)},get"aria-label"(){return H(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onRemove()}})}};q(De,e=>{t.onRemove&&e(Oe)}),D(we),D(xe),D(pe);var ke=z(pe,2);{let e=N(()=>Z(`rename`));HQ(ke,{get oldExtension(){return H(re)},get newExtension(){return H(ae)},get okLabel(){return H(e)},onOk:()=>{le()},onCancel:()=>{H(S)?.focus()},get open(){return H(C)},set open(e){F(C,e,!0)}})}V(()=>{me=el(pe,1,`filled svelte-1yfgkx5`,null,me,{sortable:H(ee),dragging:h()}),Y(pe,`draggable`,H(w))}),Ws(`dragstart`,pe,e=>{t.onDragStart?.(),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,H(se)))}),Ws(`dragend`,pe,()=>{F(w,!1),t.onDragEnd?.()}),G(e,fe),k(),i()}var ube=U(`<div role="none" class="buttons"><!> <!></div>`),dbe=U(`<div role="status"> </div>`),fbe=U(`<!> <!>`,1),pbe=U(`<div role="button"><!> <div role="none" class="label svelte-1jvz1op"><!></div></div> <!>`,1),mbe={hash:`svelte-1jvz1op`,code:`.empty.svelte-1jvz1op {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:120px;margin:var(--sui-focus-ring-width);border-width:1px;border-style:solid;border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));border-radius:var(--sui-button-medium-border-radius);color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(
|
||
--sui-button-tertiary-background-color,
|
||
var(--sui-button-background-color)
|
||
);font-family:var(--sui-control-font-family);font-size:var(--sui-font-size-small);cursor:pointer;transition:all 200ms;&:focus-visible {z-index:1;outline:var(--sui-focus-ring-width) solid var(--sui-focus-ring-color);outline-offset:var(--sui-focus-ring-offset);}&:not([aria-disabled='true']):is(:where(.svelte-1jvz1op):hover, :where(.svelte-1jvz1op):focus-visible) {background-color:var(
|
||
--sui-button-tertiary-background-color-focus,
|
||
var(--sui-hover-background-color)
|
||
);}&:not([aria-disabled='true']):active {background-color:var(
|
||
--sui-button-tertiary-background-color-active,
|
||
var(--sui-active-background-color)
|
||
);}.icon {color:var(--sui-secondary-foreground-color);font-size:48px;}&[aria-disabled='true'] {pointer-events:none !important;* {opacity:0.5;}}
|
||
|
||
@media (pointer: coarse) {cursor:default;&:active,
|
||
&:focus {
|
||
/* Reset the style because the element is non-interactive on touch devices */background-color:var(--sui-button-background-color) !important;}
|
||
}&.invalid {border-color:var(--sui-error-border-color);}}.label.svelte-1jvz1op {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 4px;white-space:nowrap;.button {margin-block:0;}}`};function hbe(e,t){O(t,!0),J(e,mbe);let n=e=>{var n=ube(),o=I(n);{let e=N(()=>Z(`browse`));$f(o,{get label(){return H(e)},variant:`tertiary`,size:`small`,get disabled(){return H(s)},onclick:e=>{e.stopPropagation(),i(!1),r(!0)}})}var l=z(o,2),u=e=>{{let n=N(()=>Z(t.isImageField?`paste_image`:`paste`));$f(e,{get label(){return H(n)},variant:`tertiary`,size:`small`,get disabled(){return H(s)},onclick:e=>{e.stopPropagation(),c()}})}};q(l,e=>{a()&&e(u)}),D(n),G(e,n)},r=X(t,`showSelectAssetsDialog`,15,!1),i=X(t,`replaceMode`,15,!1),a=X(t,`onFilePaste`,3,void 0),o=ao({show:!1,message:``}),s=N(()=>t.readonly||t.processing),c=async()=>{if(!(H(s)||!a()))try{let e=await navigator.clipboard.read(),t,n=e.find(e=>e.types.some(e=>{let n=e.startsWith(`image/`);return n&&(t=e),n}));if(n&&t){let e=await n.getType(t),r=t.split(`/`)[1].replace(`+xml`,``),i=new File([e],`pasted-image-${Date.now()}.${r}`,{type:t});a()(i);return}Object.assign(o,{message:Z(`no_image_in_clipboard`),show:!0})}catch{Object.assign(o,{message:Z(`clipboard_access_denied`),show:!0})}};var l=pbe(),u=L(l);let d;var f=I(u);Rl(f,{name:`cloud_upload`});var p=z(f,2),m=I(p),h=e=>{var n=dbe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`processing_files`,{values:{count:t.multiple?2:1}})]),G(e,n)},g=e=>{var r=fbe(),i=L(r),a=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`click_to_browse`)]),G(e,t)},o=e=>{var n=ec();V(e=>K(n,e),[()=>Z(`drop_image_files_or`,{values:{count:t.multiple?2:1}})]),G(e,n)},s=e=>{var n=ec();V(e=>K(n,e),[()=>Z(`drop_files_or`,{values:{count:t.multiple?2:1}})]),G(e,n)};q(i,e=>{t.allowDrop?t.isImageField?e(o,1):e(s,-1):e(a)});var c=z(i,2);n(c),G(e,r)},_=e=>{n(e)};q(m,e=>{t.processing?e(h):zV.hasMouse?e(g,1):e(_,-1)}),D(p),D(u),Nh(z(u,2),{get show(){return o.show},set show(e){o.show=e},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(()=>K(n,o.message)),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),V(()=>{d=el(u,1,`empty svelte-1jvz1op`,null,d,{invalid:t.invalid,processing:t.processing}),Y(u,`aria-disabled`,H(s)||void 0),Y(u,`tabindex`,H(s)?-1:0)}),Gs(`click`,u,()=>{zV.hasMouse&&!H(s)&&(i(!1),r(!0))}),Gs(`keydown`,u,e=>{!H(s)&&uf(e,`Accel+V`)&&(e.preventDefault(),c())}),G(e,l),k()}Ks([`click`,`keydown`]);var $8=(e,t)=>{Object.entries(t).forEach(([t,n])=>{e[t]!==n&&(e[t]=n)}),Object.keys(e).forEach(n=>{n in t||delete e[n]})},gbe=new Map,e5=(e,t)=>{let n=wI(gbe,t,()=>RegExp(`^${NA(t)}\\b(?!#)`));return[aR(e,t,{live:!0})??[],Object.fromEntries(Object.entries(e).filter(([e])=>!n.test(e)))]},t5=({locale:e,valueStoreKey:t=`currentValues`,keyPath:n,manipulate:r})=>{let i=A(h4),{collection:a,collectionFile:o}=i,{defaultLocale:s}=(o??a)._i18n,[c,l]=e5(i[t][e],n),[u,d]=e===s?e5(i.expanderStates._,n):[[],[]];r({valueList:c,expanderStateList:u}),v4(()=>{h4.update(r=>($8(r[t][e],{...nM({[n]:c}),...l}),e===s&&$8(r.expanderStates._,{...nM({[n]:u}),...d}),r))})},_be=(e,t)=>aR(e,t,{live:!0})??[],vbe=({locale:e,valueStoreKey:t=`currentValues`,keyPath:n,from:r,to:i})=>{h4.update(a=>{let o=a[t][e],s=_be(o,n);return r===i||!(r in s)||!(i in s)?a:(s.splice(i,0,...s.splice(r,1)),s.forEach((e,t)=>{o[`${n}.${t}`]=e}),a)})},ybe=({locale:e,valueStoreKey:t=`currentValues`,keyPath:n,index:r})=>{h4.update(i=>{let a=i[t][e];for(let e=r;;e+=1){let t=`${n}.${e}`,r=`${n}.${e+1}`;if(r in a)a[t]=a[r];else{a[t]=null,delete a[t];break}}return i})},bbe=U(`<div role="none"><!></div>`),xbe=U(`<div role="none" class="item-list svelte-17jic1t"></div> <!>`,1),Sbe=U(`<div role="none"> </div> <div role="none"><!></div>`,1),Cbe=U(`<!> <!> <!> <!> <!>`,1),wbe={hash:`svelte-17jic1t`,code:`.item-list.svelte-17jic1t {display:flex;flex-direction:column;gap:4px;& ~ [role='button'] {margin-top:calc(4px + var(--sui-focus-ring-width));}}`};function n5(e,t){O(t,!0),J(e,wbe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=e=>{hbe(e,{get allowDrop(){return H(ke)},get invalid(){return h()},get readonly(){return m()},get processing(){return H(C)},get isImageField(){return H(fe)},get multiple(){return H(be)},onFilePaste:e=>{je([{file:e,folder:H(_e)}])},get showSelectAssetsDialog(){return H(g)},set showSelectAssetsDialog(e){F(g,e,!0)},get replaceMode(){return H(_)},set replaceMode(e){F(_,e,!0)}})},o=e=>{var n=W(),r=L(n),i=e=>{var n=W(),r=L(n),i=e=>{var n=W(),r=L(n),i=e=>{var n=xbe(),r=L(n);Cc(r,29,()=>H(Se),e=>`${f()[e]}|${e}`,(e,n)=>{var r=bbe(),i=I(r);{let e=N(()=>H(ne)===H(n));Q8(i,Ml(()=>H(Te),{get index(){return H(n)},get itemCount(){return H(xe)},get value(){return f()[H(n)]},get fieldId(){return`${t.fieldId??``}-${H(n)??``}`},get dragging(){return H(e)},onReplace:()=>{F(_,!0),F(v,H(n),!0),F(g,!0)},onRemove:()=>Ne(H(n)),onDragStart:()=>{F(ne,H(n),!0),F(re,[...H(Se)],!0),Y8(H(te))},onDragEnd:()=>{X8(),F(ne,void 0),F(re,void 0)},onMove:(e,t)=>Pe(H(n),e,t)}))}D(r),Vc(r,()=>Um,()=>({duration:200})),G(e,r)}),D(r),Ol(r,e=>F(te,e),()=>H(te));var i=z(r,2),o=e=>{a(e)};q(i,e=>{f().length<H(ae)&&e(o)}),Ws(`dragover`,r,Fe,!0),Ws(`drop`,r,Ie,!0),G(e,n)},o=N(()=>Array.isArray(f()));q(r,e=>{H(o)&&e(i)}),G(e,n)},o=e=>{Q8(e,Ml(()=>H(Te),{get value(){return f()},get fieldId(){return t.fieldId},onReplace:()=>{F(_,!0),F(g,!0)},onRemove:Ae}))};q(r,e=>{H(be)?e(i):typeof f()==`string`&&f()&&e(o,1)}),G(e,n)},o=e=>{a(e)};q(r,e=>{f()?.length&&!H(C)?e(i):e(o,-1)}),G(e,n)},{valueStoreKey:s=`currentValues`,fieldContext:c=void 0,parentComponentNames:l=[]}=zi(`field-editor`)??{},u=c===`rich-text-editor-component`,d=l.at(-1),f=X(t,`currentValue`,15),p=X(t,`required`,3,!0),m=X(t,`readonly`,3,!1),h=X(t,`invalid`,3,!1),g=P(!1),_=P(!1),v=P(-1),y=P(!1),b=P(!1),x=P(``),S=P(void 0),C=P(!1),w=P(ao([])),T=P(ao([])),E=P(ao([])),ee=P(ao([])),te=P(void 0),ne=P(void 0),re=P(void 0),ie=N(()=>t.fieldConfig.widget),ae=N(()=>wr(t.fieldConfig.max,1/0)),oe=N(()=>t.fieldConfig.accept),se=N(()=>wr(t.fieldConfig.choose_url,!0)),ce=N(()=>n()?.originalEntry),le=N(()=>n()?.collectionName??``),ue=N(()=>n()?.fileName),de=N(()=>n()?.isIndexFile??!1),fe=N(()=>H(ie)===`image`),pe=N(()=>H(fe)?`image`:void 0),me=N(()=>oU({fieldConfig:t.fieldConfig})),he=N(()=>H(me).config),ge=N(()=>g8({collectionName:H(le),fileName:H(ue),componentName:d,typedKeyPath:t.typedKeyPath,isIndexFile:H(de)})),_e=N(()=>_8(H(ge))),ve=N(()=>v8({entry:n()?.originalEntry,folder:H(_e)})),ye=N(()=>b8({kind:H(pe),folder:H(_e),folderPath:H(ve),unsavedAssets:H(ee),slugificationEnabled:H(he).slugify_filename})),be=N(()=>VB(t.fieldConfig)),xe=N(()=>Array.isArray(f())?f().length:0),Se=N(()=>H(re)?.length===H(xe)?H(re):[...Array(H(xe)).keys()]),Ce=N(()=>H(he).max_file_size),we=N(()=>!p()&&(!c||![`rich-text-editor-component`,`single-subfield-list-field`].includes(c))),Te=N(()=>({fieldConfig:t.fieldConfig,readonly:m(),invalid:h(),required:p(),showRemoveButton:H(we),collectionName:H(le),fileName:H(ue),componentName:d,typedKeyPath:t.typedKeyPath,entry:H(ce)})),Ee=N(()=>Object.entries(jz).filter(([,{isEnabled:e}])=>e?.(t.fieldConfig)??!0)),De=N(()=>H(me).enabled&&!!H(_e)),Oe=N(()=>+!!H(De)+H(Ee).length),ke=N(()=>H(Oe)===1),Ae=()=>{H(S)?.reset(),H(be)||(f(``),Ua())},je=async e=>{if(!n())return;let r=H(be)?void 0:f();Ae(),F(C,!0),F(w,[],!0),F(T,[],!0);let i=await Promise.all(e.map(e=>(e.file&&!e.folder&&(e.folder=H(_e)),w8({draft:n(),resource:e,libraryConfig:H(he)})))),a=[],o=!1,c=H(be)?Object.keys(n()[s][t.locale]).filter(e=>e.startsWith(`${t.keyPath}.`)).map(e=>Number(e.replace(`${t.keyPath}.`,``))).pop()??-1:-1;i.forEach(({value:e,credit:r,oversizedFileName:i,invalidFileName:l},d)=>{if(e){if(o=!0,H(be)){let r=H(_)?H(v):c+1+d;la(h4,Ds(n)[s][t.locale][`${t.keyPath}.${r}`]=e,Ds(n))}else f(u?e.replaceAll(` `,`%20`):e)}r&&a.push(r),i&&H(w).push(i),l&&H(T).push(l)}),!o&&!H(be)&&r!==void 0&&f(r),a.length?(F(x,a.join(`
|
||
`),!0),F(b,!0)):F(x,``),(H(w).length||H(T).length)&&F(y,!0),F(C,!1)},Me=async({files:e})=>{if(e.length){if(H(De)){let t=await h8({files:e,listedAssets:H(ye)});if(t===void 0)return;je(e.map(e=>({file:e,folder:H(_e),replace:t})))}else F(E,e,!0),F(g,!0)}},Ne=e=>{n()&&ybe({locale:t.locale,valueStoreKey:s,keyPath:t.keyPath,index:e})},Pe=async(e,r,i=`reorder`)=>{n()&&(vbe({locale:t.locale,valueStoreKey:s,keyPath:t.keyPath,from:e,to:r}),await vf(50),(H(te)?.children[r]?.querySelector(`button[data-action="${i}"]`))?.focus())},Fe=e=>{if(H(ne)===void 0||!H(re))return;e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=W8({target:e.target,listElement:H(te)});if(!t)return;let n=H(re).indexOf(H(ne)),r=U8({dragIndex:n,dropIndex:V8({index:t.index,clientY:e.clientY,rect:t.element.getBoundingClientRect()})});r!==void 0&&F(re,H8(H(re),n,r),!0)},Ie=e=>{if(H(ne)===void 0)return;e.stopPropagation(),e.preventDefault(),X8();let t=H(ne),n=H(re)?.indexOf(H(ne))??t;F(ne,void 0),F(re,void 0),n!==t&&Pe(t,n)};B(()=>{(async()=>{n()?.files?F(ee,await C8({draft:n(),targetFolderPath:H(ve)}),!0):F(ee,[],!0)})()});var Le=Cbe(),Re=L(Le),ze=e=>{{let t=N(()=>m()||H(ne)!==void 0),n=N(()=>H(oe)??(H(fe)?Vz.join(`,`):void 0));Ol(A4(e,{get multiple(){return H(be)},get disabled(){return H(t)},get accept(){return H(n)},onDrop:Me,children:(e,t)=>{o(e)},$$slots:{default:!0}}),e=>F(S,e,!0),()=>H(S))}},Be=e=>{o(e)};q(Re,e=>{H(ke)?e(ze):e(Be,-1)});var Ve=z(Re,2);{let e=N(()=>!H(_)&&H(be));Jye(Ve,{get kind(){return H(pe)},get multiple(){return H(e)},get accept(){return H(oe)},get canEnterURL(){return H(se)},get entryDraft(){return h4},get fieldConfig(){return t.fieldConfig},get assetLibraryFolderMap(){return H(ge)},get enabledCloudServiceEntries(){return H(Ee)},onSelect:je,get open(){return H(g)},set open(e){F(g,e,!0)},get pendingFiles(){return H(E)},set pendingFiles(e){F(E,e,!0)}})}var He=z(Ve,2);Xye(He,{});var Ue=z(He,2);c8(Ue,{get oversizedFileNames(){return H(w)},get invalidFileNames(){return H(T)},get maxSize(){return H(Ce)},get open(){return H(y)},set open(e){F(y,e,!0)}});var We=z(Ue,2);{let e=N(()=>Z(`assets_dialog.photo_credit.title`)),t=N(()=>Z(`copy`));Zp(We,{get title(){return H(e)},get okLabel(){return H(t)},onOk:()=>{navigator.clipboard.writeText(H(x))},get open(){return H(b)},set open(e){F(b,e,!0)},children:(e,t)=>{var n=Sbe(),r=L(n),i=R(r,!0),a=z(r,2);Pj(I(a),{dir:`auto`,flex:!0,readonly:!0,get value(){return H(x)},onclick:e=>{e.target.focus(),e.target.select()}}),D(a),V(e=>K(i,e),[()=>Z(`assets_dialog.photo_credit.description`)]),G(e,n)},$$slots:{default:!0}})}G(e,Le),k(),i()}var Tbe=U(`<p class="svelte-28vcoi"><!></p>`),Ebe=U(`<p class="svelte-28vcoi"> </p>`),Dbe={hash:`svelte-28vcoi`,code:`
|
||
/* Remove the padding to make the image full-width on small screens */
|
||
@media (width < 768px) {[role='document'] section > p.svelte-28vcoi:has(img) {margin-inline:calc(var(--entry-preview-padding-inline) * -1);}
|
||
}`};function r5(e,t){O(t,!0),J(e,Dbe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=X(t,`typedKeyPath`,3,void 0),o=P(void 0),s=P(void 0),c=N(()=>t.fieldConfig.widget),l=N(()=>H(c)===`image`),u=N(()=>n()?.originalEntry),d=N(()=>n()?.collectionName??``),f=N(()=>n()?.fileName);B(()=>{t.value,Ds(async()=>{F(o,t.value?H(l)?`image`:await jR(t.value):void 0,!0),F(s,H(o)?await sB({value:t.value,entry:H(u),collectionName:H(d),fileName:H(f),fieldConfig:t.fieldConfig,typedKeyPath:a()}):void 0,!0)})});var p=W(),m=L(p),h=e=>{var t=Tbe(),n=I(t);{let e=N(()=>[`audio`,`video`].includes(H(o)));NQ(n,{get kind(){return H(o)},get src(){return H(s)},get controls(){return H(e)}})}D(t),G(e,t)},g=e=>{var n=Ebe(),r=R(n,!0);V(()=>K(r,t.value)),G(e,n)},_=N(()=>t.value.trim()&&!t.value.startsWith(`blob:`));q(m,e=>{H(o)&&H(s)?e(h):H(_)&&e(g,1)}),G(e,p),k(),i()}function i5(e,t){O(t,!0);var n=W(),r=L(n),i=e=>{var n=W(),r=L(n),i=e=>{var n=W();Cc(L(n),19,()=>t.currentValue,(e,t)=>`${e}-${t}`,(e,n)=>{r5(e,{get value(){return H(n)},get fieldConfig(){return t.fieldConfig},get typedKeyPath(){return t.typedKeyPath}})}),G(e,n)},a=N(()=>Array.isArray(t.currentValue));q(r,e=>{H(a)&&e(i)}),G(e,n)},a=N(()=>VB(t.fieldConfig)),o=e=>{r5(e,{get value(){return t.currentValue},get fieldConfig(){return t.fieldConfig},get typedKeyPath(){return t.typedKeyPath}})};q(r,e=>{H(a)?e(i):typeof t.currentValue==`string`&&t.currentValue&&e(o,1)}),G(e,n),k()}var Obe=U(`<th scope="col" class="action svelte-u0prcz"></th>`),kbe=U(`<td class="action svelte-u0prcz"><!></td>`),Abe=U(`<tr><td class="key svelte-u0prcz"><!></td><td class="value svelte-u0prcz"><!></td><!></tr>`),jbe=U(`<table class="svelte-u0prcz"><thead><tr><th scope="col" class="key svelte-u0prcz"> </th><th scope="col" class="value svelte-u0prcz"> </th><!></tr></thead><tbody></tbody></table>`),Mbe=U(`<!> <!>`,1),Nbe=U(`<!> <!> <div role="none"><!></div>`,1),Pbe={hash:`svelte-u0prcz`,code:`table.svelte-u0prcz {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-u0prcz,
|
||
td.svelte-u0prcz {border-width:0;}th.svelte-u0prcz {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;&.key,
|
||
&.value {width:50%;}}td.svelte-u0prcz {padding:0;vertical-align:middle;}`};function Fbe(e,t){O(t,!0),J(e,Pbe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),{valueStoreKey:a=`currentValues`}=zi(`field-editor`)??{},o=X(t,`readonly`,3,!1),s=N(()=>wr(t.fieldConfig.i18n,!1)),c=N(()=>t.fieldConfig.key_label),l=N(()=>t.fieldConfig.value_label),u=N(()=>wr(t.fieldConfig.max,1/0)),d=N(()=>H(c)||Z(`key_value.key`)),f=N(()=>H(l)||Z(`key_value.value`)),p=P(ao([])),m=P(ao([])),h=0,g=ao([]),_=P(ao([])),v=P(ao([])),y=()=>{if(!n())return;let e=B3({entryDraft:h4,valueStoreKey:a,keyPath:t.keyPath,locale:t.locale});(0,HH.default)(H(p),e)||(F(p,[...e],!0),F(m,e.map((e,t)=>t<H(m).length?H(m)[t]:(h+=1,h-1)),!0),F(_,e.map(()=>!1),!0)),!H(p).length&&n()[a][t.locale][t.keyPath]!==null&&la(h4,Ds(n)[a][t.locale][t.keyPath]=null,Ds(n))},b=()=>{n()&&(L3({valueStore:n()[a],locale:t.locale,i18n:H(s)},e=>{delete e[t.keyPath]}),H(p).push([``,``]),H(m).push(h),h+=1,H(_).push(!1),window.requestAnimationFrame(()=>{g[H(p).length-1].querySelector(`input`).focus()}))},x=e=>{H(p).splice(e,1),H(m).splice(e,1),H(_).splice(e,1)},S=()=>{F(v,Rge({pairs:H(p),edited:H(_)}),!0),!(!n()||H(v).some(Boolean)||H(p).some(([e])=>!e.trim()))&&zge({entryDraft:h4,valueStoreKey:a,fieldConfig:t.fieldConfig,keyPath:t.keyPath,locale:t.locale,pairs:H(p)})};B(()=>{q6(n(),t.locale,a),Ds(()=>{y()})}),B(()=>{Ni(H(p)),Ds(()=>{S()})});var C=Nbe(),w=L(C),T=e=>{var n=jbe(),r=I(n),i=I(r),a=I(i),s=R(a,!0),c=z(a),l=R(c,!0),h=z(c),y=e=>{var t=Obe();V(e=>Y(t,`aria-label`,e),[()=>Z(`key_value.action`)]),G(e,t)};q(h,e=>{o()||e(y)}),D(i),D(r);var S=z(r);Cc(S,23,()=>H(p),(e,t)=>H(m)[t],(e,n,r)=>{var i=Abe(),a=I(i),s=I(a);{let e=N(()=>!!H(v)[H(r)]),i=N(()=>H(v)[H(r)]?`${t.fieldId}-kv-error`:void 0);fm(s,{dir:`ltr`,get readonly(){return o()},flex:!0,get invalid(){return H(e)},get"aria-label"(){return H(d)},get"aria-errormessage"(){return H(i)},oninput:()=>{H(_)[H(r)]=!0},onkeydown:e=>{e.key===`Enter`&&!e.isComposing&&g[H(r)].querySelector(`td.value input`).focus()},get value(){return H(n)[0]},set value(e){H(n)[0]=e}})}D(a);var c=z(a),l=I(c);{let e=N(()=>yL(t.locale));fm(l,{get dir(){return H(e)},get readonly(){return o()},flex:!0,get"aria-label"(){return H(f)},onkeydown:e=>{e.key===`Enter`&&!e.isComposing&&(H(r)<H(p).length-1?g[H(r)+1].querySelector(`input`).focus():H(p).length<H(u)&&b())},get value(){return H(n)[1]},set value(e){H(n)[1]=e}})}D(c);var m=z(c),h=e=>{var t=kbe(),n=I(t);{let e=e=>{Rl(e,{name:`close`})},t=N(()=>Z(`remove`));$f(n,{variant:`ghost`,size:`small`,iconic:!0,get"aria-label"(){return H(t)},onclick:()=>{x(H(r))},startIcon:e,$$slots:{startIcon:!0}})}D(t),G(e,t)};q(m,e=>{o()||e(h)}),D(i),Ol(i,(e,t)=>g[t]=e,e=>g?.[e],()=>[H(r)]),G(e,i)}),D(S),D(n),V(()=>{K(s,H(d)),K(l,H(f))}),G(e,n)};q(w,e=>{H(p).length&&e(T)});var E=z(w,2),ee=e=>{Z6(e,{get id(){return`${t.fieldId??``}-kv-error`},children:(e,t)=>{var n=Mbe(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`key_value.empty_key`)]),G(e,t)},a=N(()=>H(v).includes(`empty`));q(r,e=>{H(a)&&e(i)});var o=z(r,2),s=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`key_value.duplicate_key`)]),G(e,t)},c=N(()=>H(v).includes(`duplicate`));q(o,e=>{H(c)&&e(s)}),G(e,n)},$$slots:{default:!0}})},te=N(()=>H(v).some(Boolean));q(E,e=>{H(te)&&e(ee)});var ne=z(E,2),re=I(ne);{let e=N(()=>Z(`add`)),t=N(()=>o()||H(p).length>=H(u));$f(re,{get label(){return H(e)},variant:`tertiary`,get disabled(){return H(t)},onclick:()=>{b()}})}D(ne),G(e,C),k(),i()}var Ibe=U(`<tr><td class="svelte-11sa460"> </td><td class="svelte-11sa460"> </td></tr>`),Lbe=U(`<table class="svelte-11sa460"><thead><tr><th scope="col" class="svelte-11sa460"> </th><th scope="col" class="svelte-11sa460"> </th></tr></thead><tbody></tbody></table>`),Rbe={hash:`svelte-11sa460`,code:`table.svelte-11sa460 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-11sa460 {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-11sa460 {&:empty::after {content:'\\00a0'; /* nbsp */}}`};function zbe(e,t){O(t,!0),J(e,Rbe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>t.fieldConfig.key_label),o=N(()=>t.fieldConfig.value_label),s=N(()=>H(a)||Z(`key_value.key`)),c=N(()=>H(o)||Z(`key_value.value`)),l=P(ao([])),u=()=>{let e=B3({entryDraft:h4,keyPath:t.keyPath,locale:t.locale});(0,HH.default)(H(l),e)||F(l,e,!0)};B(()=>{n()&&(q6(n(),t.locale),Ds(()=>{u()}))});var d=W(),f=L(d),p=e=>{var t=Lbe(),n=I(t),r=I(n),i=I(r),a=R(i,!0),o=R(z(i),!0);D(r),D(n);var u=z(n);Cc(u,23,()=>H(l),([e,t],n)=>`${e}-${n}`,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=Ibe(),o=I(a),s=R(o,!0),c=R(z(o),!0);D(a),V(()=>{K(s,r()),K(c,i())}),G(e,a)}),D(u),D(t),V(()=>{K(a,H(s)),K(o,H(c))}),G(e,t)};q(f,e=>{H(l).length&&e(p)}),G(e,d),k(),i()}function a5(e,t){O(t,!0);let n=X(t,`expanded`,3,!1);{let t=N(()=>n()?`expand_more`:Hd()?`chevron_left`:`chevron_right`);Rl(e,{get name(){return H(t)}})}k()}function o5(e,t){O(t,!0);let n=X(t,`disabled`,3,!1),r=X(t,`items`,19,()=>[]),i=X(t,`addItem`,3,()=>void 0),a=N(()=>t.fieldConfig.name),o=N(()=>t.fieldConfig.label),s=N(()=>t.fieldConfig.types),c=N(()=>t.fieldConfig.widget===`list`?t.fieldConfig:void 0),l=N(()=>H(c)?.label_singular??``),u=N(()=>H(c)?.max??void 0),d=N(()=>Z(`add_x`,{values:{name:H(l)||H(o)||H(a)}})),f=N(()=>n()||typeof H(u)==`number`&&r().length===H(u));var p=W(),m=L(p),h=e=>{Ip(e,{variant:`tertiary`,size:`small`,get label(){return H(d)},get disabled(){return H(f)},startIcon:e=>{Rl(e,{name:`add`})},endIcon:e=>{},popup:e=>{{let t=N(()=>Z(`select_list_type`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>H(s),({name:e,label:t})=>e,(e,t)=>{let n=()=>H(t).name,r=()=>H(t).label;{let t=N(()=>r()||n());Sm(e,{get label(){return H(t)},onclick:()=>i()({type:n()})})}}),G(e,n)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},g=N(()=>Array.isArray(H(s))),_=e=>{$f(e,{variant:`tertiary`,size:`small`,get label(){return H(d)},get disabled(){return H(f)},onclick:()=>i()(),startIcon:e=>{Rl(e,{name:`add`})},$$slots:{startIcon:!0}})};q(m,e=>{H(g)?e(h):e(_,-1)}),G(e,p),k()}var Bbe=U(`<span role="none" class="type svelte-57h597"> </span>`),Vbe=U(`<div role="none" class="header svelte-57h597"><div role="none" class="start svelte-57h597"><!></div> <div role="none" class="center svelte-57h597"><!></div> <div role="none" class="end svelte-57h597"><!></div></div>`),Hbe={hash:`svelte-57h597`,code:`.header.svelte-57h597 {display:flex;align-items:center;gap:8px;height:28px;background-color:var(--sui-secondary-border-color);& > div:where(.svelte-57h597) {display:flex;align-items:center;}.start:where(.svelte-57h597) {justify-content:flex-start;width:40%;}.center:where(.svelte-57h597) {justify-content:center;width:20%;}.end:where(.svelte-57h597) {justify-content:flex-end;width:40%;}
|
||
|
||
/* Make the expander button full-width when there is no other content */&:has(.center:where(.svelte-57h597):empty):has(.end:where(.svelte-57h597):empty) {.start:where(.svelte-57h597) {width:100%;button {justify-content:flex-start;padding:var(--sui-button-small-padding);width:-moz-available;width:-webkit-fill-available;width:stretch;aspect-ratio:auto;}}.center:where(.svelte-57h597),
|
||
.end:where(.svelte-57h597) {display:none;}}.type:where(.svelte-57h597) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}}`};function s5(e,t){O(t,!0),J(e,Hbe);let n=X(t,`label`,3,``),r=X(t,`expanded`,15),i=X(t,`centerContent`,3,void 0),a=X(t,`endContent`,3,void 0);var o=Vbe(),s=I(o),c=I(s);{let e=e=>{a5(e,{get expanded(){return r()}})},i=N(()=>!n()),a=N(()=>r()?Z(`collapse`):Z(`expand`));$f(c,{size:`small`,get iconic(){return H(i)},get"aria-label"(){return H(a)},get"aria-expanded"(){return r()},get"aria-controls"(){return t.controlId},onclick:()=>{r(!r()),t.toggleExpanded?.()},startIcon:e,children:(e,t)=>{var r=W(),i=L(r),a=e=>{var t=Bbe(),r=R(t,!0);V(()=>K(r,n())),G(e,t)};q(i,e=>{n()&&e(a)}),G(e,r)},$$slots:{startIcon:!0,default:!0}})}D(s);var l=z(s,2);Ac(I(l),()=>i()??br),D(l);var u=z(l,2);Ac(I(u),()=>a()??br),D(u),D(o),G(e,o),k()}var Ube=new Map,c5,Wbe=()=>{let e=c5;c5=void 0,h4.update(t=>(t&&Object.entries(e).forEach(([e,n])=>{t.expanderStates._[e]=n}),t))},l5=({key:e,locale:t,collapsed:n=!1})=>{let r=A(h4),i=c5?.[e]??r?.expanderStates?._[e];if(i!==void 0)return i;if(n===`auto`){let n=r?.currentValues?.[t]??{},i=e.replace(/#$/,``),a=wI(Ube,i,()=>RegExp(`^${NA(i)}\\.[^\\.]+$`));return!Object.entries(n).some(([e,t])=>a.test(e)&&!!t)}return!n},u5=e=>{let t=A(h4)?.expanderStates?._;if(!t)return;let n=Object.entries(e).filter(([e,n])=>(c5?.[e]??t[e])!==n);n.length&&(c5||(c5={},queueMicrotask(Wbe)),Object.assign(c5,Object.fromEntries(n)))},d5=({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{let a=new Set,o={collectionName:e,fileName:t,valueMap:n,isIndexFile:i};return r.split(`.`).forEach((e,t,n)=>{let r=n.slice(0,t+1).join(`.`),i=YB({...o,keyPath:r}),s=WB.test(r);if(i?.widget===`object`)s&&a.add(r),a.add(`${r}#`);else if(i?.widget===`list`)a.add(s?r:`${r}#`);else if(t>0){let e=n.slice(0,t).join(`.`),i=YB({...o,keyPath:e});i?.widget===`object`&&`fields`in i&&a.add(`${e}.${i.name}#`),i?.widget===`list`&&`field`in i&&a.add(r)}}),[...a]},f5=({collectionName:e,fileName:t,currentValues:n})=>{let{validities:r,isIndexFile:i}=A(h4),a={};Object.entries(r??{}).forEach(([r,o])=>{Object.entries(o).forEach(([o,{valid:s}])=>{s||d5({collectionName:e,fileName:t,valueMap:n[r],keyPath:o,isIndexFile:i}).forEach(e=>{a[e]=!0})})}),u5(a)},p5=({locale:e,keyPath:t})=>{window.postMessage({type:`highlight-editor-field`,payload:{locale:e,keyPath:t}},window.location.origin)},m5=U(`<!> <!>`,1),Gbe=U(`<!> `,1),Kbe=U(`<!> <!> <!>`,1),qbe=U(`<div role="none" class="summary svelte-n5zzp2"><!> <!></div>`),Jbe=U(`<div role="group"><!> <div role="none" class="item-body"><!></div></div>`),Ybe=U(`<div role="none" class="item-wrapper"><!></div>`),Xbe=U(`<div role="none" class="toolbar bottom add svelte-n5zzp2"><!> <!></div>`),Zbe=U(`<div role="none" class="toolbar top svelte-n5zzp2"><div role="none" class="label svelte-n5zzp2"><!> <div role="none" class="summary"> </div></div> <div role="none" class="actions svelte-n5zzp2"><!> <!></div></div> <div role="none"></div> <!>`,1),Qbe={hash:`svelte-n5zzp2`,code:`.toolbar.svelte-n5zzp2 {display:flex;align-items:center;flex-wrap:wrap;gap:0 8px;position:sticky;z-index:10;background-color:var(--sui-primary-background-color);min-height:var(--sui-secondary-toolbar-size);&.top {top:0;}&.bottom {bottom:0;}& > div:where(.svelte-n5zzp2) {display:flex;align-items:center;&.actions {flex-wrap:wrap;margin-block:8px;margin-inline-start:auto;}}}.item-list.svelte-n5zzp2 {display:flex;flex-direction:column;gap:16px;&.collapsed {display:none;}}.item.svelte-n5zzp2 {flex:none;position:relative;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-primary-background-color); /* for dragging opacity */
|
||
|
||
/* The dragged item is left as a faint placeholder marking the gap it would drop into. The
|
||
pointer already carries the browser’s own drag image of it, so showing it twice at full
|
||
strength would just be confusing. */&.dragging {opacity:0.25;}.summary:where(.svelte-n5zzp2) {display:flex;align-items:center;gap:8px;padding:8px;&:empty {display:none;}}}`};function $be(e,t){let n=tc();O(t,!0),J(e,Qbe);let r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),o=(e,t=br,n=br)=>{var r=W(),i=L(r),a=e=>{{let r=e=>{var n=W();Cc(L(n),17,()=>H(E)??[],({name:e,label:t})=>e,(e,n)=>{let r=()=>H(n).name,i=()=>H(n).label;{let n=N(()=>i()||r());Sm(e,{get label(){return H(n)},onclick:()=>Ae({index:t(),type:r()})})}}),G(e,n)},i=N(()=>Z(`add_item_${n()}`));Sm(e,{get label(){return H(i)},get disabled(){return H(_e)},items:r,$$slots:{items:!0}})}},o=e=>{{let r=N(()=>Z(`add_item_${n()}`));Sm(e,{get label(){return H(r)},get disabled(){return H(_e)},onclick:()=>Ae({index:t()})})}};q(i,e=>{H(re)?e(a):e(o,-1)}),G(e,r)},{valueStoreKey:s=`currentValues`,parentComponentNames:c=[]}=zi(`field-editor`)??{},l=c.at(-1),u=N(()=>t.fieldConfig.name),d=N(()=>t.fieldConfig.label),f=N(()=>t.fieldConfig.i18n),p=N(()=>wr(t.fieldConfig.allow_add,!0)),m=N(()=>wr(t.fieldConfig.allow_remove,!0)),h=N(()=>wr(t.fieldConfig.allow_duplicate,!0)),g=N(()=>wr(t.fieldConfig.allow_reorder,!0)),_=N(()=>t.fieldConfig.collapsed),v=N(()=>t.fieldConfig.summary),y=N(()=>t.fieldConfig.thumbnail),b=N(()=>wr(t.fieldConfig.minimize_collapsed,!1)),x=N(()=>t.fieldConfig.label_singular),S=N(()=>wr(t.fieldConfig.max,1/0)),C=N(()=>wr(t.fieldConfig.add_to_top,!1)),w=N(()=>t.fieldConfig.field),T=N(()=>t.fieldConfig.fields),E=N(()=>t.fieldConfig.types),ee=N(()=>wr(t.fieldConfig.typeKey,`type`)),te=N(()=>U3(t.fieldConfig)),ne=N(()=>H(te).hasSingleSubField),re=N(()=>H(te).hasVariableTypes),ie=N(()=>r()?.isIndexFile??!1),ae=N(()=>r()?.collection),oe=N(()=>r()?.collectionName??``),se=N(()=>r()?.collectionFile),ce=N(()=>r()?.fileName),le=N(()=>(H(se)??H(ae))?._i18n??ML),ue=N(()=>H(le).defaultLocale),de=N(()=>t.locale!==H(ue)&&H(f)===`duplicate`),fe=N(()=>q6(r(),t.locale,s)),pe=N(()=>`${t.keyPath}#`),me=N(()=>r()?.expanderStates?._[H(pe)]??!0),he=N(()=>aR(H(fe),t.keyPath)??[]),ge=N(()=>H(he).map((e,n)=>{let i=`${t.keyPath}.${n}`;return[i,r()?.expanderStates?._[i]??!0]})),_e=N(()=>H(he).length>=H(S)),ve=N(()=>t.locale===H(ue)||(H(re)?H(E)?.flatMap(({fields:e=[]})=>e)??[]:H(T)??(H(w)?[H(w)]:[])).some(({i18n:e=!1})=>e===!0||e===`translate`)),ye=N(()=>H(de)||!H(ve)),be=ao([]),xe=P(void 0),Se=P(void 0),Ce=P(void 0),we=P(void 0),Te=N(()=>H(we)?.length===H(he).length?H(we):H(he).map((e,t)=>t)),Ee=()=>{u5({[H(pe)]:H(b)===`auto`?!H(he).length:!H(b),...Object.fromEntries(H(he).map((e,n)=>{let r=`${t.keyPath}.${n}`;return[r,l5({key:r,locale:t.locale,collapsed:H(_)})]}))})},De=e=>{L3({valueStore:r()?.[s],locale:t.locale,i18n:H(f)},(n,r)=>{t5({locale:r,valueStoreKey:s,keyPath:t.keyPath,manipulate:e})})},Oe=e=>H(xe)?.children[e],ke=e=>{let t=H(he)[e];return or(t)?t.__sc_item_id??e:e},Ae=async({index:e=H(C)?0:H(he).length,dupIndex:n,type:r}={})=>{De(({valueList:i,expanderStateList:a})=>{let o=r?H(E)?.find(({name:e})=>e===r)?.fields??[]:H(T)??(H(w)?[H(w)]:[]),s=(()=>{if(typeof n==`number`)return structuredClone(i[n]);let e=rM(I3({fields:o,locale:t.locale,defaultLocale:H(ue)}));return H(ne)&&H(w)?e[H(w).name]:e})();r&&(s[H(ee)]=r),H(ne)||(s.__sc_item_id=crypto.randomUUID(),i.forEach((e,n)=>{or(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)})),i.splice(e,0,s),a.splice(e,0,!0)}),u5({[H(pe)]:!0}),await vf(50),Oe(e)?.scrollIntoView(),await vf(100),H(xe)?.closest(`.content`)?.scrollBy({top:-50,behavior:`instant`}),Oe(e)?.querySelector(`button`)?.focus()},je=async e=>{De(({valueList:n,expanderStateList:r})=>{H(ne)||n.forEach((e,n)=>{or(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)}),n.splice(e,1),r.splice(e,1)}),await vf(50),(Oe(e)??H(xe)?.closest(`[role="group"]`)?.querySelector(`button`))?.focus()},Me=async(e,n,r=`reorder`)=>{De(({valueList:r,expanderStateList:i})=>{H(ne)||r.forEach((e,n)=>{or(e)&&(e.__sc_item_id??=crypto.randomUUID(),e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)}),r.splice(n,0,...r.splice(e,1)),i.splice(n,0,...i.splice(e,1))}),await vf(50),(Oe(n)?.querySelector(`button[data-action="${r}"]`))?.focus()},Ne=e=>{if(H(Ce)===void 0||!H(we))return;e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=W8({target:e.target,listElement:H(xe)});if(!t)return;let n=H(we).indexOf(H(Ce)),r=U8({dragIndex:n,dropIndex:V8({index:t.index,clientY:e.clientY,rect:t.element.getBoundingClientRect()})});r!==void 0&&F(we,H8(H(we),n,r),!0)},Pe=e=>{if(H(Ce)===void 0)return;e.stopPropagation(),e.preventDefault(),X8();let t=H(Ce),n=H(we)?.indexOf(H(Ce))??t;F(Se,void 0),F(Ce,void 0),F(we,void 0),n!==t&&Me(t,n)},Fe=(e,n)=>Kge({collectionName:H(oe),fileName:H(ce),keyPath:t.keyPath,valueMap:H(fe),locale:t.locale,summaryTemplate:n,hasSingleSubField:H(ne),index:e,isIndexFile:H(ie)}),Ie=async e=>{if(!H(y))return;let n=H(y).replace(/^fields\./,``),i=`${t.keyPath}.${e}`,a=H(ne)?i:`${i}.${n}`,o=H(fe)[a];if(!o)return;let s=YB({collectionName:H(oe),fileName:H(ce),valueMap:H(fe),keyPath:a,isIndexFile:H(ie)});if(!(s?.widget!==`image`||H(ne)&&s.name!==n))return sB({value:o,entry:r()?.originalEntry,collectionName:H(oe),fileName:H(ce),componentName:l,typedKeyPath:H(ne)?`${t.typedKeyPath}.*`:`${t.typedKeyPath}.*.${n}`})},Le=async()=>{H(y)&&(be.length=H(he).length,H(he).forEach(async(e,t)=>{let n=await Ie(t);be[t]!==n&&(be[t]=n)}))},Re=({itemKeyPath:e,type:t})=>{let n=t?`The “${t}” type is not defined for the list field.`:`The type key is not found in the list item. The item must include the “${H(ee)}” property with one of the defined types: ${H(E).map(e=>e.name).join(`, `)}`;console.warn(`List item ${e}: ${n}`)};B(()=>{H(he),Ds(()=>{Le()})}),Nl(()=>{Ee()});var ze=Zbe(),Be=L(ze),Ve=I(Be),He=I(Ve);{let e=e=>{a5(e,{get expanded(){return H(me)}})},t=N(()=>!H(he).length),r=N(()=>H(me)?Z(`collapse`):Z(`expand`));$f(He,{iconic:!0,get disabled(){return H(t)},get"aria-label"(){return H(r)},get"aria-expanded"(){return H(me)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{u5({[H(pe)]:!H(me)})},startIcon:e,$$slots:{startIcon:!0}})}var Ue=z(He,2),We=R(Ue);D(Ve);var Ge=z(Ve,2),Ke=I(Ge),qe=e=>{o5(e,{get disabled(){return H(ye)},get fieldConfig(){return t.fieldConfig},get items(){return H(he)},addItem:Ae})};q(Ke,e=>{H(p)&&(H(C)||!H(he).length||!H(me))&&e(qe)});var Je=z(Ke,2),Ye=e=>{var t=m5(),n=L(t);{let e=N(()=>Z(`expand_all`)),t=N(()=>H(ge).every(([,e])=>e));$f(n,{variant:`tertiary`,size:`small`,get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{u5(Object.fromEntries(H(ge).map(([e])=>[e,!0])))}})}var r=z(n,2);{let e=N(()=>Z(`collapse_all`)),t=N(()=>H(ge).every(([,e])=>!e));$f(r,{variant:`tertiary`,size:`small`,get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{u5(Object.fromEntries(H(ge).map(([e])=>[e,!1])))}})}G(e,t)};q(Je,e=>{H(me)&&H(he).length>1&&e(Ye)}),D(Ge),D(Be);var Xe=z(Be,2);let Ze;Cc(Xe,29,()=>H(Te),e=>ke(e),(e,i)=>{let a=N(()=>H(he)[H(i)]);var s=Ybe();Vj(I(s),{children:(e,s)=>{let c=N(()=>`${t.keyPath}.${H(i)}`),l=N(()=>H(re)?H(a)[H(ee)]:void 0),u=N(()=>H(l)?H(E)?.find(({name:e})=>e===H(l)):void 0);var d=W(),f=L(d),_=e=>{var t=Gbe(),n=L(t);Hl(n,{status:`warning`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`unknown_variable_type`)]),G(e,n)},$$slots:{default:!0}});var r=z(n);V(e=>K(r,` ${e??``}`),[()=>Re({itemKeyPath:H(c),type:H(l)})]),G(e,t)},y=e=>{let a=N(()=>r()?.expanderStates?._[H(c)]??!0),s=N(()=>H(re)?H(u)?.fields??[]:H(T)??(H(w)?[H(w)]:[])),d=N(()=>H(re)&&H(u)?.summary||H(v));var f=Jbe();let _;var y=I(f);{let e=e=>{var t=W(),n=L(t),r=e=>{{let t=N(()=>H(de)||H(he).length<2);Z8(e,{get index(){return H(i)},get itemCount(){return H(he).length},get disabled(){return H(t)},icon:`drag_handle`,onGrab:()=>{F(Se,H(i),!0)},onRelease:()=>{F(Se,void 0)},onMove:(e,t)=>Me(H(i),e,t)})}};q(n,e=>{H(g)&&e(r)}),G(e,t)},t=e=>{var t=m5(),n=L(t),r=e=>{{let t=e=>{{let t=N(()=>Z(`list_item_options`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=Kbe(),r=L(n),a=e=>{{let t=N(()=>Z(`duplicate`));Sm(e,{get label(){return H(t)},get disabled(){return H(_e)},onclick:()=>Ae({index:H(i)+1,dupIndex:H(i)})})}};q(r,e=>{H(h)&&e(a)});var s=z(r,2);o(s,()=>H(i),()=>`above`);var c=z(s,2);o(c,()=>H(i)+1,()=>`below`),G(e,n)},$$slots:{default:!0}})}},n=N(()=>Z(`list_item_options`));Ip(e,{variant:`ghost`,size:`small`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(n)},get disabled(){return H(ye)},popup:t,$$slots:{popup:!0}})}};q(n,e=>{H(p)&&e(r)});var a=z(n,2),s=e=>{{let t=e=>{Rl(e,{name:`close`})},n=N(()=>Z(`remove`));$f(e,{variant:`ghost`,size:`small`,iconic:!0,get"aria-label"(){return H(n)},onclick:()=>je(H(i)),startIcon:t,$$slots:{startIcon:!0}})}};q(a,e=>{H(m)&&e(s)}),G(e,t)},r=N(()=>H(re)?H(u)?.label||H(u)?.name:``),l=N(()=>H(s).length?()=>u5({[H(c)]:!H(a)}):void 0);s5(y,{get label(){return H(r)},get controlId(){return`list-${n}-item-${H(i)??``}-body`},get expanded(){return H(a)},get toggleExpanded(){return H(l)},centerContent:e,endContent:t,$$slots:{centerContent:!0,endContent:!0}})}var b=z(y,2),x=I(b),S=e=>{var n=W();Cc(L(n),17,()=>H(s),e=>e.name,(e,n)=>{Vj(e,{children:(e,r)=>{{let r=N(()=>H(ne)?H(c):`${H(c)}.${H(n).name}`),i=N(()=>H(re)?`${t.typedKeyPath}.*<${H(l)}>.${H(n).name}`:`${t.typedKeyPath}.*.${H(n).name}`),a=N(()=>H(ne)?`single-subfield-list-field`:void 0);U5(e,{get keyPath(){return H(r)},get typedKeyPath(){return H(i)},get locale(){return t.locale},get fieldConfig(){return H(n)},get context(){return H(a)}})}},$$slots:{default:!0}})}),G(e,n)},C=e=>{var t=qbe(),n=I(t),r=e=>{O4(e,{get src(){return be[H(i)]},variant:`icon`,cover:!0})};q(n,e=>{be[H(i)]&&e(r)});var a=z(n,2);{let e=N(()=>zV.isSmallScreen?2:1);_f(a,{get lines(){return H(e)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Fe(H(i),H(d))]),G(e,n)},$$slots:{default:!0}})}D(t),G(e,t)};q(x,e=>{H(a)?e(S):e(C,-1)}),D(b),D(f),V(()=>{_=el(f,1,`item svelte-n5zzp2`,null,_,{dragging:H(Ce)===H(i)}),Y(f,`draggable`,H(Se)===H(i)),Y(b,`id`,`list-${n}-item-${H(i)??``}-body`)}),Ws(`dragstart`,f,e=>{e.target===e.currentTarget&&(F(Ce,H(i),!0),F(we,[...H(Te)],!0),Y8(H(xe)),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,Fe(H(i),H(d)))))}),Ws(`dragend`,f,e=>{e.target===e.currentTarget&&(X8(),F(Se,void 0),F(Ce,void 0),F(we,void 0))}),G(e,f)};q(f,e=>{H(re)&&!H(u)?e(_):e(y,-1)}),G(e,d)},$$slots:{default:!0}}),D(s),Vc(s,()=>Um,()=>({duration:200})),G(e,s)}),D(Xe),Ol(Xe,e=>F(xe,e),()=>H(xe));var Qe=z(Xe,2),$e=e=>{var n=Xbe(),r=I(n);Wp(r,{flex:!0}),o5(z(r,2),{get disabled(){return H(ye)},get fieldConfig(){return t.fieldConfig},get items(){return H(he)},addItem:Ae}),D(n),G(e,n)};q(Qe,e=>{H(p)&&!H(C)&&H(he).length&&H(me)&&e($e)}),V(()=>{Y(Ue,`id`,`object-${n}-summary`),K(We,`${H(he).length??``}
|
||
${((H(he).length===1?H(x):void 0)||H(d)||H(u))??``}`),Y(Xe,`id`,`list-${n}-item-list`),Ze=el(Xe,1,`item-list svelte-n5zzp2`,null,Ze,{collapsed:!H(me)})}),Ws(`dragover`,Xe,Ne,!0),Ws(`drop`,Xe,Pe,!0),G(e,ze),k(),a()}var exe=U(`<div role="none"><!> <!> <!></div>`),txe=U(`<div role="none" class="toolbar svelte-60yaxc"><!></div>`),nxe=U(`<div role="none" class="item-list svelte-60yaxc"></div> <!>`,1),rxe={hash:`svelte-60yaxc`,code:`.item-list.svelte-60yaxc {display:flex;flex-direction:column;gap:4px;}.toolbar.svelte-60yaxc {display:flex;align-items:center;margin-block-start:8px;}.item.svelte-60yaxc {display:flex;align-items:center;gap:4px;
|
||
|
||
/* The dragged row is left as a faint placeholder marking the gap it would drop into. The
|
||
pointer already carries the browser’s own drag image of it, so showing it twice at full
|
||
strength would just be confusing. */&.dragging {opacity:0.25;}}`};function ixe(e,t){O(t,!0),J(e,rxe);let{valueStoreKey:n=`currentValues`}=zi(`field-editor`)??{},r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1),o=P(ao([``])),s=P(ao([0])),c=1,l=P(void 0),u=P(void 0),d=P(void 0),f=P(void 0),p=N(()=>H(f)?.length===H(o).length?H(f):H(o).map((e,t)=>t)),m=N(()=>t.fieldConfig.i18n),h=N(()=>wr(t.fieldConfig.max,1/0)),g=N(()=>!i()),_=N(()=>H(o).length>1),v=()=>H(o).map(e=>e.trim()).filter(Boolean),y=e=>{F(o,e,!0),F(s,e.map(()=>(c+=1,c-1)),!0)},b=()=>{let e=t.currentValue??[];(0,HH.default)(v(),e)||y(e.length?[...e]:[``])},x=()=>{e8({valueStoreKey:n,locale:t.locale,keyPath:t.keyPath,i18n:H(m),value:v()})},S=e=>H(l)?.children[e]?.querySelector(`input`),C=async e=>{H(o).splice(e,0,``),H(s).splice(e,0,c),c+=1,await ws(),S(e)?.focus()},w=async e=>{H(o).splice(e,1),H(s).splice(e,1),await ws(),S(Math.min(e,H(o).length-1))?.focus()},T=async(e,t,n=`reorder`)=>{F(o,H8(H(o),e,t),!0),F(s,H8(H(s),e,t),!0),await ws(),(H(l)?.children[t]?.querySelector(`button[data-action="${n}"]`))?.focus()},E=e=>{if(H(d)===void 0||!H(f))return;e.stopPropagation(),e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=W8({target:e.target,listElement:H(l)});if(!t)return;let n=H(f).indexOf(H(d)),r=U8({dragIndex:n,dropIndex:V8({index:t.index,clientY:e.clientY,rect:t.element.getBoundingClientRect()})});r!==void 0&&F(f,H8(H(f),n,r),!0)},ee=e=>{if(H(d)===void 0)return;e.stopPropagation(),e.preventDefault(),X8();let t=H(d),n=H(f)?.indexOf(H(d))??t;F(u,void 0),F(d,void 0),F(f,void 0),n!==t&&T(t,n)};B(()=>{t.currentValue,Ds(()=>{b()})}),B(()=>{Ni(H(o)),Ds(()=>{x()})});var te=nxe(),ne=L(te);Cc(ne,29,()=>H(p),e=>H(s)[e],(e,n)=>{var s=exe();let c;var m=I(s),v=e=>{{let t=N(()=>!H(_));Z8(e,{get index(){return H(n)},get itemCount(){return H(o).length},get disabled(){return H(t)},onGrab:()=>{F(u,H(n),!0)},onRelease:()=>{F(u,void 0)},onMove:(e,t)=>T(H(n),e,t)})}};q(m,e=>{H(g)&&e(v)});var y=z(m,2);{let e=N(()=>yL(t.locale)),s=N(()=>r()&&H(o).length===1),c=N(()=>Z(`list_item_value`));fm(y,{get dir(){return H(e)},flex:!0,get readonly(){return i()},get invalid(){return a()},get required(){return H(s)},get"aria-label"(){return H(c)},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onkeydown:e=>{e.key!==`Enter`||e.isComposing||H(o).length>=H(h)||(e.preventDefault(),C(H(n)+1))},get value(){return H(o)[H(n)]},set value(e){H(o)[H(n)]=e}})}var b=z(y,2),x=e=>{{let t=e=>{Rl(e,{name:`close`})},r=N(()=>!H(_)),i=N(()=>Z(`remove`));$f(e,{variant:`ghost`,size:`small`,iconic:!0,get disabled(){return H(r)},get"aria-label"(){return H(i)},onclick:()=>{w(H(n))},startIcon:t,$$slots:{startIcon:!0}})}};q(b,e=>{H(g)&&e(x)}),D(s),V(()=>{c=el(s,1,`item svelte-60yaxc`,null,c,{dragging:H(d)===H(n)}),Y(s,`draggable`,H(u)===H(n))}),Ws(`dragstart`,s,e=>{F(d,H(n),!0),F(f,[...H(p)],!0),Y8(H(l)),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,H(o)[H(n)]))}),Ws(`dragend`,s,()=>{X8(),F(u,void 0),F(d,void 0),F(f,void 0)}),Vc(s,()=>Um,()=>({duration:200})),G(e,s)}),D(ne),Ol(ne,e=>F(l,e),()=>H(l));var re=z(ne,2),ie=e=>{var n=txe();o5(I(n),{get fieldConfig(){return t.fieldConfig},get items(){return H(o)},addItem:()=>C(H(o).length)}),D(n),G(e,n)};q(re,e=>{H(g)&&e(ie)}),Ws(`dragover`,ne,E,!0),Ws(`drop`,ne,ee,!0),G(e,te),k()}var axe=new Set([`$$slots`,`$$events`,`$$legacy`,`fieldConfig`]);function oxe(e,t){let n=tc();O(t,!0);let r=Al(t,axe);Bj(e,{get"aria-labelledby"(){return`list-${n}-summary`},children:(e,n)=>{var i=W(),a=L(i),o=e=>{{let n=N(()=>({...r,fieldConfig:t.fieldConfig}));$be(e,Ml(()=>H(n)))}},s=N(()=>U3(t.fieldConfig).hasSubFields),c=e=>{{let n=N(()=>({...r,fieldConfig:t.fieldConfig}));ixe(e,Ml(()=>H(n)))}};q(a,e=>{H(s)?e(o):e(c,-1)}),G(e,i)},$$slots:{default:!0}}),k()}var sxe=U(`<div role="none" class="header svelte-ygwzbn"> </div>`),cxe=U(`<div role="group" class="subsection svelte-ygwzbn"><!> <div role="none" class="items svelte-ygwzbn"><!></div></div>`),lxe={hash:`svelte-ygwzbn`,code:`.subsection.svelte-ygwzbn {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);.title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}}.header.svelte-ygwzbn {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-ygwzbn {padding:8px 16px;&:empty {display:none;}}`};function h5(e,t){let n=tc();J(e,lxe);let r=`${n}-header`;var i=cxe(),a=I(i),o=e=>{var n=sxe(),i=R(n,!0);V(()=>{Y(n,`id`,r),K(i,t.label)}),G(e,n)};q(a,e=>{t.label&&e(o)});var s=z(a,2);Ac(I(s),()=>t.children??br),D(s),D(i),V(()=>Y(i,`aria-labelledby`,t.label?r:void 0)),G(e,i)}var uxe=U(`<h4 class="svelte-s650n2"> </h4>`),dxe=U(`<section role="group" tabindex="0" class="svelte-s650n2"><!> <!></section>`),fxe={hash:`svelte-s650n2`,code:`[role='document'] section.svelte-s650n2 {overflow:hidden;
|
||
/* Don’t set margin here because it makes scroll sync bumpy */padding:12px 0;h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);&:not(:last-child) {margin-bottom:8px;}}& > * {margin-inline:auto;max-width:768px;}p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}img {max-height:800px !important;}.sui.alert {margin-block:16px;}}
|
||
|
||
@media (width < 768px) {[role='document'] {& > section.svelte-s650n2:is([data-field-type='file']:where(.svelte-s650n2), [data-field-type='image']:where(.svelte-s650n2)):has(img),
|
||
& > section.svelte-s650n2:is([data-field-type='string']:where(.svelte-s650n2)):has(iframe) {overflow:visible;}& > section.svelte-s650n2:is([data-field-type='file']:where(.svelte-s650n2), [data-field-type='image']:where(.svelte-s650n2)) img {width:100%;max-height:none !important;}}
|
||
}`};function g5(e,t){O(t,!0),J(e,fxe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=X(t,`showLabel`,3,!0),o=N(()=>t.fieldConfig.name),s=N(()=>wr(t.fieldConfig.widget,`string`)),c=N(()=>wr(t.fieldConfig.i18n,!1)),l=N(()=>wr(t.fieldConfig.label,``)),u=N(()=>wr(t.fieldConfig.preview,!0)),d=N(()=>qB(t.fieldConfig)),f=N(()=>H(s)===`list`||H(d)),p=N(()=>n()?.collection),m=N(()=>n()?.collectionFile),h=N(()=>q6(n(),t.locale)),g=N(()=>(H(m)??H(p))?._i18n??ML),_=N(()=>H(g).i18nEnabled),v=N(()=>H(g).defaultLocale),y=N(()=>H(_)&&(H(c)===!0||H(c)===`translate`)),b=N(()=>H(_)&&H(c)===`duplicate`),x=N(()=>iL.get(H(s))),S=N(()=>nV({valueMap:H(h),keyPath:t.keyPath,isList:H(f),isCustomFieldType:!!H(x)})),C=N(()=>({locale:t.locale,keyPath:t.keyPath,typedKeyPath:t.typedKeyPath,fieldConfig:t.fieldConfig,currentValue:H(S)}));var w=W(),T=L(w),E=e=>{var n=dxe(),r=I(n),i=e=>{var t=uxe(),n=R(t,!0);V(()=>K(n,H(l)||H(o))),G(e,t)};q(r,e=>{a()&&e(i)});var c=z(r,2),u=e=>{{let n=N(()=>({...H(C),fieldConfig:t.fieldConfig}));Hve(e,Ml(()=>H(n),{get preview(){return H(x).preview}}))}},d=e=>{let t=N(()=>L5[H(s)]);var n=W();jc(L(n),()=>H(t),(e,t)=>{t(e,Ml(()=>H(C)))}),G(e,n)};q(c,e=>{H(x)?.preview?e(u):H(s)in L5&&e(d,1)}),D(n),V(()=>{Y(n,`data-field-type`,H(s)),Y(n,`data-key-path`,t.keyPath),Y(n,`data-typed-key-path`,t.typedKeyPath)}),Gs(`keydown`,n,e=>{e.key===`Enter`&&(e.stopPropagation(),p5({locale:t.locale,keyPath:t.keyPath}))}),Gs(`click`,n,e=>{e.stopPropagation(),p5({locale:t.locale,keyPath:t.keyPath})}),G(e,n)};q(T,e=>{H(s)!==`hidden`&&H(u)&&(t.locale===H(v)||H(y)||H(b))&&e(E)}),G(e,w),k(),i()}Ks([`keydown`,`click`]);function pxe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>t.fieldConfig.field),o=N(()=>t.fieldConfig.fields),s=N(()=>t.fieldConfig.types),c=N(()=>wr(t.fieldConfig.typeKey,`type`)),l=N(()=>U3(t.fieldConfig)),u=N(()=>H(l).hasSingleSubField),d=N(()=>H(l).hasVariableTypes),f=N(()=>aR(q6(n(),t.locale),t.keyPath)??[]);var p=W();Cc(L(p),19,()=>H(f),(e,t)=>or(e)?e.__sc_item_id??t:t,(e,n,r)=>{Vj(e,{children:(e,i)=>{let l=N(()=>H(d)?H(n)[H(c)]:void 0),f=N(()=>H(l)?H(s)?.find(({name:e})=>e===H(l)):void 0);var p=W(),m=L(p),h=e=>{},g=e=>{let n=N(()=>`${t.keyPath}.${H(r)}`),i=N(()=>H(f)?H(f).label||H(f).name:void 0),s=N(()=>H(d)?H(f)?.fields??[]:H(o)??(H(a)?[H(a)]:[]));h5(e,{get label(){return H(i)},children:(e,r)=>{var i=W();Cc(L(i),17,()=>H(s),e=>e.name,(e,r)=>{Vj(e,{children:(e,i)=>{{let i=N(()=>H(u)?H(n):`${H(n)}.${H(r).name}`),a=N(()=>H(d)?`${t.typedKeyPath}.*<${H(l)}>.${H(r).name}`:`${t.typedKeyPath}.*.${H(r).name}`);g5(e,{get keyPath(){return H(i)},get typedKeyPath(){return H(a)},get locale(){return t.locale},get fieldConfig(){return H(r)}})}},$$slots:{default:!0}})}),G(e,i)},$$slots:{default:!0}})};q(m,e=>{H(d)&&!H(f)?e(h):e(g,-1)}),G(e,p)},$$slots:{default:!0}})}),G(e,p),k(),i()}var mxe=U(`<li> </li>`),hxe=U(`<ul></ul>`);function gxe(e,t){O(t,!0);var n=W(),r=L(n),i=e=>{var n=hxe();Cc(n,23,()=>t.currentValue,(e,t)=>`${e}-${t}`,(e,t)=>{var n=mxe(),r=R(n,!0);V(()=>K(r,H(t))),G(e,n)}),D(n),V((e,t)=>{Y(n,`lang`,e),Y(n,`dir`,t),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale)]),G(e,n)},a=N(()=>Array.isArray(t.currentValue)&&t.currentValue.length);q(r,e=>{H(a)&&e(i)}),G(e,n),k()}var _xe=new Set([`$$slots`,`$$events`,`$$legacy`,`fieldConfig`]);function vxe(e,t){O(t,!0);let n=Al(t,_xe);var r=W(),i=L(r),a=e=>{{let r=N(()=>({...n,fieldConfig:t.fieldConfig}));pxe(e,Ml(()=>H(r)))}},o=N(()=>U3(t.fieldConfig).hasSubFields),s=e=>{{let r=N(()=>({...n,fieldConfig:t.fieldConfig}));gxe(e,Ml(()=>H(r)))}};q(i,e=>{H(o)?e(a):e(s,-1)}),G(e,r),k()}var yxe=(e,t=`Point`)=>{try{let n=JSON.parse(e);return or(n)&&n.type===t&&Array.isArray(n.coordinates)}catch{return!1}},bxe=(e,t)=>e.map(e=>Array.isArray(e)?e.map(e=>Array.isArray(e)?e.map(e=>UB(e,t)):UB(e,t)):UB(e,t)),xxe=e=>{if(e.type===`Point`)return null;let t=e.type===`Polygon`?e.coordinates.flat(1):e.coordinates;if(!t.every(e=>typeof e[0]==`number`&&typeof e[1]==`number`))return null;let n=t.map(e=>e[1]),r=t.map(e=>e[0]);return[[Math.min(...n),Math.min(...r)],[Math.max(...n),Math.max(...r)]]},Sxe=U(`<div role="alert" class="search-result searching svelte-ktr5k7"> </div>`),Cxe=U(`<div role="alert" class="search-result no-result svelte-ktr5k7"> </div>`),wxe=U(`<div role="none" class="toolbar svelte-ktr5k7"><!> <!> <!></div> <!> <div class="map-wrapper svelte-ktr5k7"><!></div> <!>`,1),Txe={hash:`svelte-ktr5k7`,code:`.toolbar.svelte-ktr5k7 {display:flex;align-items:center;margin-bottom:var(--sui-spacing-2x);}.search-result.svelte-ktr5k7 {padding:12px;color:var(--sui-secondary-foreground-color);}.map-wrapper.svelte-ktr5k7 {display:contents;.map {aspect-ratio:auto;height:400px;&.invalid {border-color:var(--sui-error-border-color);}}}`};function Exe(e,t){O(t,!0),J(e,Txe);let n=X(t,`currentValue`,15),r=X(t,`readonly`,3,!1),i=X(t,`invalid`,3,!1),a=N(()=>wr(t.fieldConfig.decimals,7)),o=N(()=>wr(t.fieldConfig.type,`Point`)),s=N(()=>t.fieldConfig.center),c=N(()=>t.fieldConfig.zoom),l=N(()=>H(o).toLowerCase()),u=P(void 0),d=P(void 0),f=P(``),p=P(``),m=P(void 0),h=P(!1),g=P(!1),_=P(``),v,y=async({leaflet:e,map:t})=>{v=t;let{TerraDraw:r,TerraDrawLineStringMode:i,TerraDrawPointMode:a,TerraDrawPolygonMode:u}=await Iz(`terra-draw`,`dist/terra-draw.module.js`),{TerraDrawLeafletAdapter:f}=await Iz(`terra-draw-leaflet-adapter`,`dist/terra-draw-leaflet-adapter.module.js?module`),p={Point:a,LineString:i,Polygon:u},m=new r({adapter:new f({lib:e,map:v}),modes:[new p[H(o)]]});m.start(),m.setMode(H(l)),m.on(`change`,(e,t)=>{b(t)}),F(d,m,!0),(!n()||!yxe(n(),H(o)))&&v.setView(H(s)?[H(s)[1],H(s)[0]]:[0,0],H(c)??2)},b=e=>{if(!H(d))return;let t=H(d).getSnapshot(),n=t[t.length-1];!n||e!==(H(o)===`Point`?`create`:`delete`)||(F(f,JSON.stringify({type:H(o),coordinates:bxe(n.geometry.coordinates,H(a))}),!0),t.length>1&&H(d).removeFeatures(t.filter(e=>e.id!==n.id).map(e=>e.id)))},x=e=>{if(e.type===`Point`){let[t,n]=e.coordinates;typeof t==`number`&&typeof n==`number`&&v?.setView([n,t],15)}else{let t=xxe(e);t&&v?.fitBounds(t)}},S=()=>{if(!H(d))return;let e=n()??``,t;try{if(t=JSON.parse(e),!or(t)||t.type!==H(o)||!Array.isArray(t.coordinates))throw Error(`Invalid object`)}catch{e=``,t=void 0}H(f)!==e&&(F(f,e,!0),H(d).clear(),t&&(H(d).addFeatures([{type:`Feature`,geometry:t,properties:{mode:H(l)}}]),x(t)))},C=()=>{if(!H(d))return;let e=H(f);n()!==e&&n(e)},w=async()=>{let e=H(p).trim();if(!e)return;F(h,!0);let t=`https://nominatim.openstreetmap.org/search?${new URLSearchParams({q:e,format:`jsonv2`})}`;try{F(m,await VV(t),!0)}catch{F(m,[],!0)}F(h,!1)},T=({latitude:e,longitude:t})=>{if(!H(d)||(e=UB(e,H(a)),t=UB(t,H(a)),v?.setView([e,t],15),H(o)!==`Point`))return;let n={type:`Point`,coordinates:[t,e]};H(d).clear(),H(d).addFeatures([{type:`Feature`,geometry:n,properties:{mode:`point`}}]),F(f,JSON.stringify(n),!0)},E=({lat:e,lon:t})=>{T({latitude:parseFloat(e),longitude:parseFloat(t)})},ee=()=>{if(!navigator.geolocation){F(g,!0),F(_,Z(`geolocation_unsupported`),!0);return}navigator.geolocation.getCurrentPosition(({coords:{latitude:e,longitude:t}})=>{T({latitude:e,longitude:t})},e=>{F(g,!0),F(_,Z(`geolocation_error_body`),!0),console.error(`Error getting current location:`,e)})},te=()=>{n(``)};B(()=>{H(d),n(),Ds(()=>{S()})}),B(()=>{H(f),Ds(()=>{C()})}),B(()=>{H(p),Ds(()=>{w()})});var ne=wxe(),re=L(ne),ie=I(re);{let e=N(()=>Z(`find_place`));Pm(ie,{debounce:!0,get readonly(){return r()},flex:!0,get placeholder(){return H(e)},get value(){return H(p)},set value(e){F(p,e,!0)}})}var ae=z(ie,2);{let e=e=>{Rl(e,{name:`near_me`})},t=N(()=>Z(`use_your_location`)),n=N(()=>Z(`use_your_location`));$f(ae,{variant:`tertiary`,iconic:!0,get title(){return H(t)},get"aria-label"(){return H(n)},get disabled(){return r()},onclick:()=>{ee()},startIcon:e,$$slots:{startIcon:!0}})}var oe=z(ae,2);{let e=N(()=>Z(`clear`)),t=N(()=>r()||!n());$f(oe,{variant:`tertiary`,get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{te()}})}D(re);var se=z(re,2),ce=e=>{var t=Sxe(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`searching`)]),G(e,t)},le=e=>{var t=W(),n=L(t),r=e=>{var t=W(),n=L(t),r=e=>{{let t=N(()=>Z(`search_results`));vm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>H(m),e=>e.place_id,(e,t)=>{bm(e,{get label(){return H(t).display_name},onSelect:()=>{E(H(t))}})}),G(e,n)},$$slots:{default:!0}})}},i=e=>{var t=Cxe(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`no_results`)]),G(e,t)};q(n,e=>{H(m).length?e(r):e(i,-1)}),G(e,t)};q(n,e=>{H(m)&&e(r)}),G(e,t)};q(se,e=>{H(h)?e(ce):H(p)&&e(le,1)});var ue=z(se,2),de=I(ue);{let e=N(()=>i()?`invalid`:void 0);PQ(de,{get inert(){return r()},get class(){return H(e)},onReady:y,get mapElement(){return H(u)},set mapElement(e){F(u,e,!0)}})}D(ue);var fe=z(ue,2);{let e=N(()=>Z(`geolocation_error_title`));Xp(fe,{get title(){return H(e)},get open(){return H(g)},set open(e){F(g,e,!0)},children:(e,t)=>{mi();var n=ec();V(()=>K(n,H(_))),G(e,n)},$$slots:{default:!0}})}G(e,ne),k()}var Dxe=U(`<pre class="svelte-1ox6w30"> </pre>`),Oxe={hash:`svelte-1ox6w30`,code:`pre.svelte-1ox6w30 {white-space:pre-wrap;}`};function kxe(e,t){J(e,Oxe);var n=W(),r=L(n),i=e=>{var n=Dxe(),r=R(n,!0);V(()=>K(r,t.currentValue)),G(e,n)};q(r,e=>{t.currentValue&&e(i)}),G(e,n)}function Axe(e,t){O(t,!0);let n=X(t,`currentValue`,15),r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1),o=P(void 0),s=N(()=>wr(t.fieldConfig.value_type,`int`)),c=N(()=>t.fieldConfig.min),l=N(()=>t.fieldConfig.max),u=N(()=>wr(t.fieldConfig.step,1)),d=N(()=>![`int`,`float`].includes(H(s))),f=N(()=>[`float`,`float/string`].includes(H(s))),p=()=>{let e;n()!==void 0&&(typeof n()==`number`?e=n():typeof n()==`string`&&(e=n().trim()?H(f)?Number.parseFloat(n()):Number.parseInt(n(),10):NaN,e=Number.isNaN(e)?void 0:e)),H(o)!==e&&F(o,e,!0)},m=()=>{let e;e=H(o)===void 0?NaN:H(f)?Number.parseFloat(String(H(o))):Number.parseInt(String(H(o)),10),H(d)?e=Number.isNaN(e)?``:String(e):Number.isNaN(e)&&(e=null),n()!==e&&n(e)};B(()=>{n(),Ds(()=>{p()})}),B(()=>{H(o),Ds(()=>{m()})}),Sae(e,{get min(){return H(c)},get max(){return H(l)},get step(){return H(u)},get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onblur:()=>{p()},get value(){return H(o)},set value(e){F(o,e,!0)}}),k()}var jxe=U(`<p> </p>`);function Mxe(e,t){O(t,!0);let n=N(()=>vL(t.locale)),r=N(()=>Intl.NumberFormat(H(n)));var i=W(),a=L(i),o=e=>{var i=jxe(),a=R(i,!0);V((e,t)=>{Y(i,`lang`,H(n)),Y(i,`dir`,e),K(a,t),i.dir=i.dir},[()=>yL(t.locale),()=>H(r).format(Number(t.currentValue))]),G(e,i)};q(a,e=>{t.currentValue!==void 0&&t.currentValue!==null&&t.currentValue!==``&&e(o)}),G(e,i),k()}var Nxe=({collectionName:e,fileName:t,keyPath:n,valueMap:r,isIndexFile:i=!1,locale:a,summaryTemplate:o})=>{let s={collectionName:e,fileName:t,keyPath:``,valueMap:r,isIndexFile:i};if(!o)return eV({valueMap:r,locale:a,keyPath:n,keyPathPrefix:`${n}.`,getFieldArgs:s});let c=e=>{let{value:t}=GI(e);return $B({...s,keyPath:`${n}.${t.replace(/^fields\./,``)}`,locale:a})};return dV(o,(e,t)=>{let{value:r,transformations:i}=GI(t);return $B({...s,keyPath:`${n}.${r.replace(/^fields\./,``)}`,locale:a,transformations:LI(i,c)})})},Pxe=U(`<!> `,1),Fxe=U(`<div role="none" class="summary svelte-pauyt3"><!></div>`),Ixe=U(`<div role="group"><!> <div role="none" class="item-list"><!></div></div>`),Lxe=U(`<!> <!> <!>`,1),Rxe={hash:`svelte-pauyt3`,code:`.wrapper.svelte-pauyt3 {border-inline-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);&.expanded,
|
||
&:has(.summary:where(.svelte-pauyt3)) {border-bottom-width:2px;}}.sui.checkbox + .wrapper.svelte-pauyt3 {& > .group {margin-top:8px;}}.summary.svelte-pauyt3 {padding:8px;}`};function zxe(e,t){let n=tc();O(t,!0),J(e,Rxe);let r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),{fieldContext:o,valueStoreKey:s=`currentValues`}=zi(`field-editor`)??{},c=o===`single-subfield-list-field`,l=X(t,`required`,3,!0),u=N(()=>t.fieldConfig.name),d=N(()=>wr(t.fieldConfig.i18n,!1)),f=N(()=>t.fieldConfig.collapsed),p=N(()=>t.fieldConfig.summary),m=N(()=>t.fieldConfig.fields),h=N(()=>t.fieldConfig.types),g=N(()=>wr(t.fieldConfig.typeKey,`type`)),_=N(()=>r()?.isIndexFile??!1),v=N(()=>r()?.collection),y=N(()=>r()?.collectionName??``),b=N(()=>r()?.collectionFile),x=N(()=>r()?.fileName),S=N(()=>(H(b)??H(v))?._i18n??ML),C=N(()=>H(S).defaultLocale),w=N(()=>q6(r(),t.locale,s)),T=N(()=>({collectionName:H(y),fileName:H(x),valueMap:H(w),isIndexFile:H(_)})),E=N(()=>Object.entries(H(w)).some(([e,n])=>e.startsWith(`${t.keyPath}.`)&&n!==void 0)),ee=N(()=>o===`rich-text-editor-component`||t.locale===H(C)||H(d)!==!1),te=N(()=>`${t.keyPath}#`),ne=N(()=>r()?.expanderStates?._[H(te)]??!0),re=N(()=>Array.isArray(H(h))),ie=N(()=>`${t.keyPath}.${H(g)}`),ae=N(()=>H(re)?H(w)[H(ie)]:void 0),oe=N(()=>H(ae)?H(h)?.find(({name:e})=>e===H(ae)):void 0),se=N(()=>(H(re)?H(oe)?.fields:H(m))??[]),ce=N(()=>H(re)&&H(oe)?.summary||H(p)),le=N(()=>t.locale!==H(C)&&H(d)===`duplicate`),ue=()=>{if(c)return;let e=H(te);u5({[e]:l5({key:e,locale:t.locale,collapsed:H(f)})})},de=async({type:e}={})=>v4(async()=>{e&&(L3({valueStore:r()?.[s],locale:t.locale,i18n:H(d)},t=>{t[H(ie)]=e}),await ws());let n=Object.fromEntries(Object.entries(I3({fields:H(se),locale:t.locale,defaultLocale:H(C)})).map(([e,n])=>[`${t.keyPath}.${e}`,n])),i=t.locale===H(C)?n:R3(n,t.locale,{keyPathPrefix:t.keyPath});L3({valueStore:r()?.[s],locale:t.locale,i18n:H(d)},(e,n)=>{la(h4,Ds(r)[s][n]=Object.assign(e,sr({...i,...e})),Ds(r)),delete r()[s][n][t.keyPath]})}),fe=()=>{L3({valueStore:r()?.[s],locale:t.locale,i18n:H(d)},(e,n)=>{$L(e,`${t.keyPath}.`,{live:!0}).forEach(e=>{la(h4,Ds(r)[s][n][e]=null,Ds(r)),delete r()?.[s][n][e]}),la(h4,Ds(r)[s][n][t.keyPath]=null,Ds(r))})},pe=()=>Nxe({...H(T),keyPath:t.keyPath,locale:t.locale,summaryTemplate:H(ce)}),me=()=>{let e=H(ae)?`The “${H(ae)}” type is not defined for the object field.`:`The type key is not found in the object. The item must include the “${H(g)}” property with one of the defined types: ${H(h).map(e=>e.name).join(`, `)}`;console.warn(`List item ${t.keyPath}: ${e}`)};Nl(()=>{ue()});var he=Lxe(),ge=L(he),_e=e=>{{let n=N(()=>Z(`add_x`,{values:{name:t.fieldLabel||H(u)}}));Jp(e,{get label(){return H(n)},get checked(){return H(E)},get disabled(){return H(le)},onChange:({detail:{checked:e}})=>{e?de():fe()}})}};q(ge,e=>{!H(re)&&!l()&&e(_e)});var ve=z(ge,2),ye=e=>{o5(e,{get disabled(){return H(le)},get fieldConfig(){return t.fieldConfig},addItem:de})};q(ve,e=>{H(re)&&!H(E)&&e(ye)});var be=z(ve,2),xe=e=>{var r=W(),i=L(r),a=e=>{var t=Pxe(),n=L(t);Hl(n,{status:`warning`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`unknown_variable_type`)]),G(e,n)},$$slots:{default:!0}});var r=z(n);V(e=>K(r,` ${e??``}`),[()=>me()]),G(e,t)},o=e=>{var r=Ixe();let i;var a=I(r),o=e=>{{let t=e=>{var t=W(),n=L(t),r=e=>{{let t=e=>{Rl(e,{name:`close`})},n=N(()=>Z(`remove`));$f(e,{size:`small`,iconic:!0,get disabled(){return H(le)},get"aria-label"(){return H(n)},onclick:()=>{fe()},startIcon:t,$$slots:{startIcon:!0}})}};q(n,e=>{H(re)&&e(r)}),G(e,t)},r=N(()=>H(re)?H(oe)?.label||H(ae):``),i=N(()=>H(se).length?()=>u5({[H(te)]:!H(ne)}):void 0);s5(e,{get label(){return H(r)},get controlId(){return`object-${n}-item-list`},get expanded(){return H(ne)},get toggleExpanded(){return H(i)},endContent:t,$$slots:{endContent:!0}})}};q(a,e=>{c||e(o)});var s=z(a,2),l=I(s),u=e=>{var n=W();Cc(L(n),17,()=>H(se),e=>e.name,(e,n)=>{let r=N(()=>`${t.keyPath}.${H(n).name}`);Vj(e,{children:(e,i)=>{{let i=N(()=>H(re)&&H(ae)?`${t.typedKeyPath}<${H(ae)}>.${H(n).name}`:H(r));U5(e,{get keyPath(){return H(r)},get typedKeyPath(){return H(i)},get locale(){return t.locale},get fieldConfig(){return H(n)}})}},$$slots:{default:!0}})}),G(e,n)},d=e=>{let t=N(pe);var r=W(),i=L(r),a=e=>{var r=Fxe(),i=I(r);{let e=N(()=>zV.isSmallScreen?2:1);_f(i,{get lines(){return H(e)},children:(e,n)=>{mi();var r=ec();V(()=>K(r,H(t))),G(e,r)},$$slots:{default:!0}})}D(r),V(()=>Y(r,`id`,`object-${n}-summary`)),G(e,r)};q(i,e=>{H(t)&&e(a)}),G(e,r)};q(l,e=>{H(ne)?e(u):e(d,-1)}),D(s),D(r),V(()=>{i=el(r,1,`wrapper svelte-pauyt3`,null,i,{expanded:H(ne)}),Y(r,`aria-labelledby`,H(ne)?void 0:`object-${n}-summary`),Y(s,`id`,`object-${n}-item-list`)}),G(e,r)};q(i,e=>{H(re)&&!H(oe)?e(a):e(o,-1)}),G(e,r)};q(be,e=>{(!(!l()||H(re))||H(E))&&H(ee)&&e(xe)}),G(e,he),k(),a()}function Bxe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>t.fieldConfig.fields),o=N(()=>t.fieldConfig.types),s=N(()=>wr(t.fieldConfig.typeKey,`type`)),c=N(()=>q6(n(),t.locale)),l=N(()=>Object.entries(H(c)).some(([e,n])=>!!e.startsWith(`${t.keyPath}.`)&&!!n)),u=N(()=>Array.isArray(H(o))),d=N(()=>`${t.keyPath}.${H(s)}`),f=N(()=>H(u)?H(c)[H(d)]:void 0),p=N(()=>H(f)?H(o)?.find(({name:e})=>e===H(f)):void 0),m=N(()=>H(p)?H(p).label||H(p).name:void 0),h=N(()=>(H(u)?H(p)?.fields:H(a))??[]);var g=W(),_=L(g),v=e=>{var n=W(),r=L(n),i=e=>{},a=e=>{h5(e,{get label(){return H(m)},children:(e,n)=>{var r=W();Cc(L(r),17,()=>H(h),e=>e.name,(e,n)=>{let r=N(()=>`${t.keyPath}.${H(n).name}`);Vj(e,{children:(e,i)=>{{let i=N(()=>H(u)&&H(p)?.name?`${t.typedKeyPath}<${H(p).name}>.${H(n).name}`:H(r));g5(e,{get keyPath(){return H(r)},get typedKeyPath(){return H(i)},get locale(){return t.locale},get fieldConfig(){return H(n)}})}},$$slots:{default:!0}})}),G(e,r)},$$slots:{default:!0}})};q(r,e=>{H(u)&&!H(p)?e(i):e(a,-1)}),G(e,n)};q(_,e=>{H(l)&&e(v)}),G(e,g),k(),i()}function Vxe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),{valueStoreKey:a=`currentValues`}=zi(`field-editor`)??{},o=X(t,`required`,3,!0),s=X(t,`readonly`,3,!1),c=X(t,`invalid`,3,!1),l=N(()=>t.fieldConfig.i18n),u=N(()=>t.fieldConfig.max),d=N(()=>wr(t.fieldConfig.dropdown_threshold,5)),f=e=>{n()&&L3({valueStore:n()[a],locale:t.locale,i18n:H(l)},(n,r)=>{t5({locale:r,valueStoreKey:a,keyPath:t.keyPath,manipulate:e})})},p=e=>{f(({valueList:t})=>{t.push(e)})},m=e=>{f(({valueList:t})=>{t.splice(t.indexOf(e),1)})};var h=W(),g=L(h),_=e=>{Zm(e,Ml({get disabled(){return s()},get readonly(){return s()},get required(){return o()},get invalid(){return c()},get options(){return t.options}},()=>({values:t.currentValue}),{get max(){return H(u)},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onAddValue:({detail:{value:e}})=>{p(e)},onRemoveValue:({detail:{value:e}})=>{m(e)},onReorder:({detail:{values:e}})=>{f(({valueList:t})=>{t.splice(0,t.length,...e)})}}))},v=e=>{iee(e,{get"aria-labelledby"(){return`${t.fieldId??``}-label`},children:(e,n)=>{var r=W();Cc(L(r),19,()=>t.options,({label:e,value:t},n)=>`${n}-${t}`,(e,n)=>{let r=()=>H(n).label,i=()=>H(n).value;{let n=N(()=>t.currentValue?.includes(i())??!1);Jp(e,{get label(){return r()},get value(){return i()},get readonly(){return s()},get required(){return o()},get invalid(){return c()},get checked(){return H(n)},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onChange:({detail:{checked:e}})=>{e?p(i()):m(i())}})}}),G(e,r)},$$slots:{default:!0}})};q(g,e=>{t.options.length>H(d)?e(_):e(v,-1)}),G(e,h),k(),i()}function Hxe(e,t){O(t,!0);let n=X(t,`currentValue`,15),r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1),o=N(()=>wr(t.fieldConfig.dropdown_threshold,5)),s=N(()=>t.options[0]?.value===void 0?`string`:typeof t.options[0].value),c=N(()=>!r()&&!t.options.some(({value:e})=>!e)?[{label:Z(`unselected_option`),value:H(s)===`number`?null:``,searchValue:``},...t.options]:t.options);var l=W(),u=L(l),d=e=>{Km(e,{get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get value(){return n()},set value(e){n(e)},children:(e,t)=>{var r=W();Cc(L(r),19,()=>H(c),({label:e,value:t,searchValue:n},r)=>`${r}-${t}`,(e,t)=>{let r=()=>H(t).label,i=()=>H(t).value,a=()=>H(t).searchValue;{let t=N(()=>i()===n());bm(e,{get label(){return r()},get value(){return i()},get valueType(){return H(s)},get searchValue(){return a()},get selected(){return H(t)},wrap:!0})}}),G(e,r)},$$slots:{default:!0}})},f=e=>{Tm(e,{get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},onChange:({detail:{value:e}})=>{n(e)},children:(e,t)=>{var r=W();Cc(L(r),19,()=>H(c),({label:e,value:t},n)=>`${n}-${t}`,(e,t)=>{let r=()=>H(t).label,i=()=>H(t).value;{let t=N(()=>i()===n());Em(e,{get label(){return r()},get value(){return i()},get valueType(){return H(s)},get checked(){return H(t)}})}}),G(e,r)},$$slots:{default:!0}})};q(u,e=>{H(c).length>H(o)?e(d):e(f,-1)}),G(e,l),k()}function _5(e,t){O(t,!0);let n=X(t,`currentValue`,15),r=X(t,`required`,3,!0),i=X(t,`readonly`,3,!1),a=X(t,`invalid`,3,!1),o=X(t,`sortOptions`,3,!1),s=N(()=>t.fieldConfig.options),c=N(()=>t.fieldConfig.multiple),l=N(()=>H(c)?Vxe:Hxe),u=N(()=>{let e=H(s).map(e=>or(e)?e:{label:e,value:e});return o()&&e.sort((e,t)=>RA(e.label,t.label)),e});var d=W();_c(L(d),()=>JSON.stringify(H(u)),e=>{var o=W();jc(L(o),()=>H(l),(e,o)=>{o(e,{get locale(){return t.locale},get keyPath(){return t.keyPath},get fieldId(){return t.fieldId},get fieldConfig(){return t.fieldConfig},get readonly(){return i()},get required(){return r()},get invalid(){return a()},get options(){return H(u)},get currentValue(){return n()},set currentValue(e){n(e)}})}),G(e,o)}),G(e,d),k()}var Uxe=U(`<div role="none" class="wrapper"><!></div>`);function Wxe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),{valueStoreKey:a=`currentValues`}=zi(`field-editor`)??{},o=X(t,`currentValue`,15),s=X(t,`required`,3,!0),c=X(t,`readonly`,3,!1),l=X(t,`invalid`,3,!1),u=N(()=>t.fieldConfig.collection),d=N(()=>t.fieldConfig.file),f=N(()=>H(d)?[QI(H(u),H(d))].filter(e=>!!e):pB(H(u))),p=N(()=>n()?.[a]?.[t.locale]),m=N(()=>n()?.currentSlugs[t.locale]??n()?.currentSlugs._),h=N(()=>({...t.fieldConfig,widget:`select`,options:EB({locale:t.locale,fieldConfig:t.fieldConfig,refEntries:H(f),currentLocaleValues:H(p),currentSlug:H(m)})}));var g=Uxe();_5(I(g),{get locale(){return t.locale},get keyPath(){return t.keyPath},get typedKeyPath(){return t.typedKeyPath},get fieldId(){return t.fieldId},get fieldLabel(){return t.fieldLabel},get fieldConfig(){return H(h)},get readonly(){return c()},get required(){return s()},get invalid(){return l()},sortOptions:!0,get currentValue(){return o()},set currentValue(e){o(e)}}),D(g),G(e,g),k(),i()}var Gxe=U(`<p> </p>`);function Kxe(e,t){O(t,!0);let n=N(()=>t.fieldConfig.collection),r=N(()=>t.fieldConfig.file),i=N(()=>wr(t.fieldConfig.multiple,!1)),a=N(()=>wr(t.fieldConfig.value_field,`{{slug}}`)),o=N(()=>CL(t.locale)),s=N(()=>H(r)?[QI(H(n),H(r))].filter(e=>!!e):pB(H(n))),c=N(()=>EB({locale:t.locale,fieldConfig:t.fieldConfig,refEntries:H(s)})),l=N(()=>(H(i)?t.currentValue:[t.currentValue]).filter(e=>e!==void 0).map(e=>{let t=H(c).find(t=>t.value===e)?.label;return t&&t!==e?[`slug`,`{{slug}}`,`{{fields.slug}}`].includes(H(a))?t:`${t} (${e})`:e}));var u=W(),d=L(u),f=e=>{var n=Gxe(),r=R(n,!0);V((e,t,i)=>{Y(n,`lang`,e),Y(n,`dir`,t),K(r,i),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale),()=>H(o).format(H(l))]),G(e,n)};q(d,e=>{H(l).length&&e(f)}),G(e,u),k()}var qxe=e=>{let t=new Map;return Object.keys(e).forEach(e=>{let n=e.split(`.`),r=``;n.forEach((e,n)=>{if(n>0){let n=t.get(r);n?n.add(e):t.set(r,new Set([e]))}r=n===0?e:`${r}.${e}`})}),{childSegmentMap:t}},v5=(e,t)=>e.childSegmentMap.has(t),y5=(e,t)=>[...e.childSegmentMap.get(t)??[]].filter(HB).map(Number).sort((e,t)=>e-t),Jxe=e=>{let t=new Map;return Object.keys(e).forEach(e=>{let n=0;for(;;){let r=e.indexOf(`.`,n);if(r===-1)return;let i=e.indexOf(`.`,r+1),a=i===-1?e.length:i,o=e.slice(r+1,a);if(HB(o)){let n=e.slice(0,r),i=t.get(n);i?i.add(Number(o)):t.set(n,new Set([Number(o)]))}n=r+1}}),t},Yxe=(e,t)=>[...e.get(t)??[]].sort((e,t)=>e-t),Xxe=[`code`,`hidden`,`keyvalue`],Zxe=e=>Array.isArray(e)&&!e.length||or(e)&&!Object.keys(e).length,b5=(e,t)=>{let n=`${t}.`;Object.keys(e).forEach(r=>{(r===t||r.startsWith(n))&&delete e[r]})},x5=(e,t)=>{t in e&&!Zxe(e[t])&&delete e[t]},Qxe=({field:e,fieldType:t,keyPath:n,content:r,index:i})=>{if(v5(i,n)){let[e]=y5(i,n);if(e!==void 0){let t=r[`${n}.${e}`];b5(r,n),r[n]=t}else return b5(r,n),!1}let a=r[n];if(or(a)||Array.isArray(a))return b5(r,n),!1;if(doe.includes(t))return typeof a!=`string`&&(r[n]=String(a??``)),!0;if(t===`boolean`){if(typeof a!=`boolean`){let e=typeof a==`string`?a.trim().toLowerCase():a;if(e!==`true`&&e!==`false`)return!1;r[n]=e===`true`}return!0}if(t===`number`){let{value_type:t=`int`}=e;if(t!==`int`&&t!==`float`||typeof a==`number`||a===null)return!0;let i=typeof a==`string`?Number(a.trim()):NaN;if(a===``||Number.isNaN(i))return!1;r[n]=i}return!0},S5=({keyPath:e,content:t,index:n,hasSubFields:r})=>{if(y5(n,e).length)return x5(t,e),!0;if(v5(n,e))return b5(t,e),!1;let i=t[e];return Array.isArray(i)?!0:!r&&i!=null&&!or(i)?(delete t[e],t[`${e}.0`]=i,!0):(b5(t,e),!1)},$xe=({keyPath:e,content:t,index:n})=>v5(n,e)?(x5(t,e),!0):t[e]===null||(b5(t,e),!1),eSe=e=>{let{field:t,keyPath:n,content:r,index:i}=e,{widget:a=`string`}=t;if(Xxe.includes(a)||XB(t)!==`builtin`)return v5(i,n)&&x5(r,n),!0;if(a===`object`)return $xe(e);if(a===`list`){let{hasSubFields:n}=U3(t);return S5({...e,hasSubFields:n})}return qB(t)?S5({...e,hasSubFields:!1}):Qxe({...e,fieldType:a})},tSe=({content:e,defaultLocaleContent:t,field:n,keyPath:r,locale:i,defaultLocale:a})=>{let o=`${r}.`,s=Object.keys(t).filter(e=>e===r||e.startsWith(o));return s.forEach(r=>{e[r]=J3({fieldConfig:n,value:t[r],sourceLocale:a,targetLocale:i})}),!!s.length},C5=({field:e,content:t,keyPath:n})=>{let{types:r,typeKey:i=`type`}=e;return r?.find(({name:e})=>e===t[`${n}.${i}`])?.fields},w5=e=>{let{field:t,keyPath:n,content:r,index:i,locale:a,defaultLocale:o,defaultLocaleContent:s}=e,{fillDefaults:c=!0}=e;if(!(n in r||v5(i,n))||!eSe(e)){if(!c||a!==o&&t.i18n===`duplicate`&&s&&tSe({content:r,defaultLocaleContent:s,field:t,keyPath:n,locale:a,defaultLocale:o}))return;F3({content:r,keyPath:n,fieldConfig:t,locale:a,defaultLocale:o,dynamicValues:{}});return}let{widget:l=`string`}=t;if(l===`object`){if(r[n]===null)return;let{fields:i}=t;(i??C5({field:t,content:r,keyPath:n}))?.forEach(t=>{w5({...e,field:t,keyPath:`${n}.${t.name}`})});return}if(l!==`list`)return;let{field:u}=t,{fields:d}=t,{types:f}=t;!u&&!d&&!f||y5(i,n).forEach(i=>{let a=`${n}.${i}`;if(u){w5({...e,field:u,keyPath:a});return}x5(r,a),(d??C5({field:t,content:r,keyPath:a}))?.forEach(t=>{w5({...e,field:t,keyPath:`${a}.${t.name}`})})})},T5=({fields:e,content:t,locale:n,defaultLocale:r,defaultLocaleContent:i,fillDefaults:a=!0})=>{let o=qxe(t);return e.forEach(e=>{w5({field:e,keyPath:e.name,fillDefaults:a,content:t,index:o,locale:n,defaultLocale:r,defaultLocaleContent:i})}),t},nSe=({fields:e,contentMap:t,defaultLocale:n})=>{let r=t[n];return r&&T5({fields:e,content:r,locale:n,defaultLocale:n}),Object.entries(t).forEach(([t,i])=>{t!==n&&T5({fields:e,content:i,locale:t,defaultLocale:n,defaultLocaleContent:r})}),t},rSe=U(`<!> <!> <!> <!>`,1),iSe=U(`<div role="none" class="fields svelte-1l1n28m"><!></div>`),aSe=U(`<span role="button" contenteditable="false" tabindex="0"> </span> <!>`,1),oSe=U(`<div role="group" contenteditable="false" tabindex="0"><!> <div role="none" class="item-list"><!></div></div>`),sSe={hash:`svelte-1l1n28m`,code:`.component.svelte-1l1n28m {&.block {display:block;&:not(:first-child) {margin-top:var(--sui-paragraph-margin);}&:not(:last-child) {margin-bottom:var(--sui-paragraph-margin);}}&.inline {display:inline-block;}}.wrapper.svelte-1l1n28m {border-inline-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);width:100%;color:var(--sui-secondary-foreground-color); /* Reset color within a link */background-color:var(--sui-primary-background-color);white-space:normal;-webkit-user-select:none;user-select:none;&.expanded {border-bottom-width:2px;}&:focus {outline-color:var(--sui-primary-accent-color-translucent);}
|
||
|
||
/* Make the input fields compact within the built-in image component */&:is([data-component-name='image']:where(.svelte-1l1n28m), [data-component-name='linked-image']:where(.svelte-1l1n28m)) {
|
||
@media (768px <= width) {
|
||
/* Hide the bottom border */[data-field-type]::after {display:none;}[data-field-type='string'] {display:flex;align-items:center;gap:8px;padding-block:0 16px;h4 {margin-bottom:0 !important;}.field-wrapper {flex:auto;}}
|
||
}button {margin:var(--sui-focus-ring-width);}}}.placeholder.svelte-1l1n28m {border:dashed 1px currentColor;border-color:hsl(from currentColor h s l / 0.5);border-radius:2px;padding-inline:0.4em;cursor:pointer;-webkit-user-select:none;user-select:none;&:hover {border-color:currentColor;}&:focus {outline:2px solid var(--sui-primary-accent-color-translucent);outline-offset:1px;}&.block {width:fit-content;}&.inline:not(:first-child) {margin-inline-start:var(--sui-paragraph-margin);}}.fields.svelte-1l1n28m {display:flex;flex-direction:column;gap:16px;}`};function cSe(e,t){let n=tc();O(t,!0),J(e,sSe);let r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),o=X(t,`mode`,3,`block`),s=X(t,`inline`,3,!1),c=X(t,`collapsed`,3,!1),l=X(t,`values`,7),u=X(t,`onChange`,3,()=>void 0),d=P(void 0),f=P(``),p=P(``),m=P(``),h=P(!c()),g=P(!1),_=P(void 0),v=P(!1),y=N(()=>H(p)?`${H(p)}:${n}:`:``),b=N(()=>H(m)?`${H(m)}:${n}:`:``),x=N(()=>t.fields.find(e=>e.widget===`string`||e.widget===`text`||!e.widget)),S=()=>H(d),C=`extraValues`,w,T=N(()=>{if(!(r()&&H(f)&&H(p)))return;let e=q6(r(),H(f),C);return rR(Object.fromEntries($L(e,H(y)).map(t=>[t.slice(H(y).length),e[t]])))}),E=()=>{F(_,H(T)?{...H(T)}:void 0,!0),F(g,!0)},ee=()=>{r()&&H(f)&&H(p)&&H(_)&&(Object.keys(r()[C][H(f)]??{}).forEach(e=>{e.startsWith(H(y))&&delete r()[C][H(f)][e]}),Object.assign(r()[C][H(f)],Object.fromEntries(Object.entries(nM(H(_))).map(([e,t])=>[`${H(y)}${e}`,t]))))},te=()=>{F(g,!1),u()(new CustomEvent(`remove`))},ne=()=>{let{validities:e}=q3(`extraValues`);h4.update(t=>t&&{...t,validities:Object.fromEntries(Object.keys(t.validities).map(n=>[n,{...t.validities[n],...e[n]}]))});let t=e[H(f)]??{};Object.entries(t).some(([e,t])=>e.startsWith(H(y))&&!t.valid)||(F(v,!1),F(g,!1),u()(new CustomEvent(`update`,{detail:H(T)})),F(_,void 0))},re=()=>{H(v)?(F(g,!1),u()(new CustomEvent(`remove`))):(ee(),F(g,!1),F(_,void 0))},ie=(e,n)=>{if(!e||!n)return null;let r=nM(n),i=dV(e,(e,n)=>{let{value:i,transformations:a}=GI(n),o=i.replace(/^fields\./,``),s=r[o];return s==null?``:(a.length&&(s=KI({fieldConfig:t.fields.find(e=>e.name===o),value:s,transformations:a,locale:H(f)})),String(s))});return i!==dV(e,()=>``)&&i.trim()?i.trim():null},ae=N(()=>{let e=t.fields.some(e=>H(T)?.[e.name]!==void 0)?H(T):l();if(t.summary&&e){let n=ie(t.summary,e);if(n)return n}if(H(x)&&e){let t=e[H(x).name];if(typeof t==`string`&&t.trim())return t.trim()}return t.label});Nl(()=>(window.requestAnimationFrame(()=>{let e=H(d)?.closest(`[data-locale]`),t=H(d)?.closest(`[data-key-path]`);F(f,e?.dataset.locale,!0),F(p,t?.dataset.keyPath,!0),o()!==`dialog`&&F(m,t?.dataset.typedKeyPath,!0),F(v,!l()),o()===`dialog`&&H(v)&&E()}),()=>{r()&&(Object.keys(r()[C][H(f)]??{}).forEach(e=>{e.startsWith(H(y))&&delete r()[C][H(f)][e]}),Object.keys(r().validities[H(f)]??{}).forEach(e=>{e.startsWith(H(y))&&delete r().validities[H(f)][e]}))})),B(()=>{l(),H(f),H(p),Ds(()=>{if(r()&&H(f)&&H(p)){let{defaultLocale:e}=r();l(l()??rM(I3({fields:t.fields,locale:H(f),defaultLocale:e}))??{}),l().__sc_component_name=t.componentName;let n=rM(T5({fields:t.fields,content:nM(l()),locale:H(f),defaultLocale:e,fillDefaults:!1}));if((0,HH.default)(n,l())||l(n),!(0,HH.default)(l(),H(T))){let e=Object.fromEntries(Object.entries(nM(l())).map(([e,t])=>[`${H(y)}${e}`,t]));h4.update(t=>t&&(Object.assign(t[C][H(f)],e),t))}}})}),B(()=>{o()!==`dialog`&&(H(T),Ds(()=>{(0,HH.default)(w,H(T))||(u()(new CustomEvent(`update`,{detail:H(T)})),w=H(T))}))});var oe={getElement:S},se=W(),ce=L(se),le=e=>{var n=aSe(),r=L(n),i=R(r,!0);Ol(r,e=>F(d,e),()=>H(d)),Yp(z(r,2),{get title(){return t.label},size:`large`,showOk:!1,showCancel:!1,get open(){return H(g)},set open(e){F(g,e,!0)},footer:e=>{var t=rSe(),n=L(t);{let e=N(()=>Z(`remove`));$f(n,{variant:`secondary`,get label(){return H(e)},onclick:()=>{te()}})}var r=z(n,2);Wp(r,{flex:!0});var i=z(r,2);{let e=N(()=>Z(H(v)?`insert`:`update`));$f(i,{variant:`primary`,get label(){return H(e)},onclick:()=>{ne()}})}var a=z(i,2);{let e=N(()=>Z(`cancel`));$f(a,{variant:`secondary`,get label(){return H(e)},onclick:()=>{re()}})}G(e,t)},children:(e,n)=>{var r=iSe(),i=I(r),a=e=>{var n=W();Cc(L(n),17,()=>t.fields,e=>e.name,(e,n)=>{U5(e,{get locale(){return H(f)},get keyPath(){return`${H(y)??``}${H(n).name??``}`},get typedKeyPath(){return`${H(y)??``}${H(n).name??``}`},get fieldConfig(){return H(n)},context:`rich-text-editor-component`,get componentName(){return t.componentName},valueStoreKey:C})}),G(e,n)};q(i,e=>{H(f)&&H(p)&&e(a)}),D(r),G(e,r)},$$slots:{footer:!0,default:!0}}),V(()=>{el(r,1,`component ${s()?`inline`:`block`} placeholder`,`svelte-1l1n28m`),Y(r,`aria-label`,t.label),Y(r,`title`,t.label),Y(r,`data-key-path-prefix`,H(y)),Y(r,`data-component-name`,t.componentName),K(i,H(ae))}),Gs(`click`,r,()=>{E()}),Gs(`keydown`,r,e=>{e.key===`Enter`&&(e.preventDefault(),E()),e.key===`Backspace`&&(e.preventDefault(),u()(new CustomEvent(`remove`)))}),G(e,n)},ue=e=>{var r=oSe();let i;var a=I(r);s5(a,{get label(){return t.label},get controlId(){return`object-${n}-item-list`},get expanded(){return H(h)},set expanded(e){F(h,e,!0)},endContent:e=>{{let t=e=>{Rl(e,{name:`close`})},n=N(()=>Z(`remove`));$f(e,{size:`small`,iconic:!0,get"aria-label"(){return H(n)},onclick:()=>{u()(new CustomEvent(`remove`))},startIcon:t,$$slots:{startIcon:!0}})}},$$slots:{endContent:!0}});var o=z(a,2),c=I(o),l=e=>{var n=W();Cc(L(n),17,()=>t.fields,e=>e.name,(e,n)=>{Vj(e,{children:(e,r)=>{U5(e,{get locale(){return H(f)},get keyPath(){return`${H(y)??``}${H(n).name??``}`},get typedKeyPath(){return`${H(b)??``}${H(n).name??``}`},get fieldConfig(){return H(n)},context:`rich-text-editor-component`,get componentName(){return t.componentName},valueStoreKey:C})},$$slots:{default:!0}})}),G(e,n)};q(c,e=>{H(f)&&H(p)&&H(h)&&e(l)}),D(o),D(r),Ol(r,e=>F(d,e),()=>H(d)),V(()=>{i=el(r,1,`component ${s()?`inline`:`block`} wrapper`,`svelte-1l1n28m`,i,{expanded:H(h)}),Y(r,`aria-label`,t.label),Y(r,`data-key-path-prefix`,H(y)),Y(r,`data-component-name`,t.componentName),Y(o,`id`,`object-${n}-item-list`)}),Ws(`keydown`,r,e=>{e.stopPropagation()},!0),Gs(`keydown`,r,e=>{!e.target.matches(`button, input, textarea`)&&e.key!==`Tab`&&e.preventDefault(),e.target===H(d)&&e.key===`Backspace`&&u()(new CustomEvent(`remove`))}),G(e,r)};q(ce,e=>{o()===`dialog`?e(le):e(ue,-1)}),G(e,se);var de=k(oe);return a(),de}Ks([`click`,`keydown`]);var E5=/^<(?<tagName>[a-z]+)/i,lSe=(e,t)=>{if(e&&typeof e==`object`&&`localName`in e)return e.localName;if(typeof e==`string`)return e.trim().match(E5)?.groups?.tagName??(typeof t==`string`?t.trim().match(E5)?.groups?.tagName:void 0)},uSe=e=>{let{id:t,label:n,collapsed:r,mode:i,summary:a,fields:o,pattern:s,toBlock:c,toPreview:l}=e,u=!OB(s),d=l?.({}),f=lSe(d,c({}));class p extends Yb{__props;constructor(e,t){super(t),this.__props=e}static getType(){return t}isInline(){return u}static clone(e){return new p(e.__props,e.__key)}static importJSON(e){return new p().updateFromJSON(e)}exportJSON(){return{...kB(this.__props??{}),type:t,version:1}}createDOM(){let e,s=null,c,l=!1,d=()=>{l||(l=!0,uc(c))};return c=oc(cSe,{target:document.createElement(`div`),props:{componentName:t,label:n,collapsed:r,mode:i,inline:u,summary:a,fields:o,values:this.__props,onChange:async({type:t,detail:n})=>{await ws(),s??=Px(e);let{activeElement:r}=document,i=r,a=i?.matches(`[contenteditable="true"]`)?window.getSelection():null,o=a&&a.rangeCount>0?a.getRangeAt(0).cloneRange():null;s?.update(()=>{if(t===`update`)try{this.getWritable().__props=n}catch{}t===`remove`&&(d(),this.remove())},{discrete:!0,onUpdate:()=>{i&&document.body.contains(i)&&(i.focus(),o&&a&&(a.removeAllRanges(),a.addRange(o)))}})}}}),Ua(),e=c.getElement(),window.requestAnimationFrame(()=>{e.closest(`[role="textbox"][aria-readonly="false"]`)&&e.focus(),e.closest(`.field`)?.addEventListener(`Unmount`,d,{once:!0});let{parentElement:t}=e;if(t){let n=new MutationObserver(()=>{e.isConnected||(d(),n.disconnect())});n.observe(t,{childList:!0})}}),e}exportDOM(){return{element:this.createDOM()}}static importDOM(){let e={};return f&&(e[f]=()=>({conversion:e=>({node:new p(Object.fromEntries(o.map(({name:t})=>[t,e[t]??``])))}),priority:3})),t===`linked-image`&&Object.assign(e,{a:e=>{if(e.firstChild?.nodeName.toLowerCase()===`img`){let{href:t}=e,{src:n,alt:r,title:i}=e.firstChild;return{conversion:()=>({node:new p({src:n,alt:r,title:i,link:t}),after:()=>[]}),priority:4}}return null}}),e}updateDOM(){return!1}}return p},dSe=({componentDef:e,CustomNode:t})=>{let{id:n,pattern:r,fromBlock:i,toBlock:a}=e,o=new RegExp(r.source,r.flags.replace(`g`,``)),s=e=>i?.(e)??e.groups??{},c=e=>e instanceof t&&e.getType()===n,l=e=>c(e)?a(kB(e.__props??{})):null;return OB(r)?{type:`multiline-element`,dependencies:[t],regExpStart:/^./,regExpEnd:{optional:!0,regExp:/.$/},handleImportAfterStartMatch:({lines:e,rootNode:n,startLineIndex:r})=>{let i=e.slice(r).join(`
|
||
`),[a]=i.match(o)??[];if(!a||!i.startsWith(a))return null;let c=a.match(o),l=r+a.split(`
|
||
`).length-1;return c?(n.append(new t(s(c))),[!0,l]):[!1,l]},replace:()=>void 0,export:l}:{type:`text-match`,dependencies:[t],importRegExp:o,regExp:o,replace:(e,n)=>{e.replace(new t(s(n)))},export:l}},D5=new Map,fSe=e=>{let t=uSe(e);return{node:t,createNode:e=>new t(e),transformer:dSe({componentDef:e,CustomNode:t})}},pSe=class{constructor(e){let{id:t}=e,n=D5.get(t),r=n??fSe(e);n||D5.set(t,r),Object.assign(this,{...e,...r})}},mSe=U(`<div role="none"><!></div>`),hSe={hash:`svelte-duifo7`,code:`.wrapper.svelte-duifo7 {--sui-paragraph-margin: 20px;display:contents;&.minimal {:is([role='textbox'], textarea) {overflow:auto;max-height:240px;}}
|
||
@media (width < 768px) {.sui.text-editor {
|
||
/* Remove the section padding */margin:0 calc(var(--field-editor-padding) * -1) calc(var(--field-editor-padding) * -1);width:100dvw;}:is(.sui.toolbar, .lexical-root, textarea) {border:0;border-radius:0;}
|
||
}}`};function O5(e,t){O(t,!0),J(e,hSe);let n=()=>j($H,`$cmsConfig`,i),r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),o=/^data:(?<type>image\/.+?);base64,.+/,s=n()?.field_defaults?.richtext??{},{fieldContext:c,parentComponentNames:l,valueStoreKey:u}=zi(`field-editor`)??{},d=c===`rich-text-editor-component`,f=l.at(-1),p=X(t,`currentValue`,15),m=X(t,`required`,3,!0),h=X(t,`readonly`,3,!1),g=X(t,`invalid`,3,!1),_=P(void 0),v=P(``),y=0,b=N(()=>wr(t.fieldConfig.modes,()=>s.modes??[...Bge],!0)),x=N(()=>wr(t.fieldConfig.buttons,()=>s.buttons??[...Hge],!0)),S=N(()=>wr(t.fieldConfig.editor_components,()=>s.editor_components??[...H3,...rL.keys()],!0)),C=N(()=>t.fieldConfig.allow_nested_components),w=N(()=>wr(t.fieldConfig.linked_images,()=>s.linked_images??!0,!0)),T=N(()=>wr(t.fieldConfig.use_emoji_autocomplete,()=>s.use_emoji_autocomplete??!0,!0)),E=N(()=>wr(t.fieldConfig.use_markdown_shortcuts,()=>s.use_markdown_shortcuts??!0,!0)),ee=N(()=>wr(t.fieldConfig.minimal,()=>s.minimal??!1,!0)),te=N(()=>H(b).map(e=>Vge[e]).filter(Boolean)),ne=N(()=>r()?.isIndexFile??!1),re=N(()=>r()?.collectionName??``),ie=N(()=>r()?.fileName),ae=N(()=>q6(r(),t.locale,u)),oe=N(()=>[...H(x),...H(S).includes(`code-block`)?[`code-block`]:[]].map(e=>Uge[e]).filter(Boolean)),se=N(()=>{let e=H(C);return d&&(e=YB({collectionName:H(re),fileName:H(ie),isIndexFile:H(ne),valueMap:H(ae),keyPath:t.keyPath.match(/^[^:]+/)?.[0]})?.allow_nested_components),e??s.allow_nested_components??!0}),ce=N(()=>d&&!H(se)?[]:H(S).filter(e=>H(se)!==`exclude_self`||!l.includes(e)).map(e=>LB(e===`image`&&H(w)?`linked-image`:e)).filter(e=>!!e).map(e=>new pSe(e))),le=N(()=>H(ce).find(({id:e})=>e===`image`||e===`linked-image`)),ue=N(()=>_8(g8({collectionName:H(re),fileName:H(ie),componentName:f,typedKeyPath:t.typedKeyPath,isIndexFile:H(ne)}))),de=async({target:e,images:t})=>{let n=e?.closest(`div`),i=Px(n);if(!r()||!H(le)||!n?.matches(`.lexical-root`)||!i)return;let a=H(le).fields?.find(({name:e})=>e===`src`),{config:o}=oU({fieldConfig:a}),s=r(),c=H(ue);for(let{file:e,src:n,alt:r=``}of t){let t=n;if(e){let{value:n}=await w8({draft:s,resource:{file:e,folder:c},libraryConfig:o});t=n}if(!t)continue;let a=t;i.update(()=>{fb([H(le).createNode({src:a,alt:r}),mx()])})}},fe=async e=>{let{target:t,clipboardData:n}=e,r=n?.items;if(!r)return;let i=[],a=[...r].findIndex(({kind:e,type:t})=>e===`file`&&Vz.includes(t)),o=[...r].findIndex(({kind:e,type:t})=>e===`string`&&t===`text/html`);if(a>-1&&o>-1){let t=a>-1?r[a].getAsFile():void 0;if(!t)return;r.clear(),e.stopPropagation();let n=``,s=t.name,c=await new Promise(e=>{r[o].getAsString(t=>{e(new DOMParser().parseFromString(t,`text/html`).querySelector(`img`))})});if(c&&(n=c.alt,/^https?:/.test(c.src))){let e=new URL(c.src).pathname.split(`/`).pop()??``;(zz.test(e)||zse.test(e))&&(s=e)}i=[{file:new File([t],s,{type:t.type}),alt:n}]}else i=[...n.files].filter(({type:e})=>Vz.includes(e)).map(e=>({file:e}));i.length&&(i=i.map(({file:e,alt:t},n)=>{if(e?.name===`image.png`){let{year:t,month:r,day:a,hour:o,minute:s,second:c}=mI(),l=`${t}${r}${a}-${o}${s}${c}${i.length>1?`-${n+1}`:``}.png`;e=new File([e],l,{type:e.type})}return{file:e,alt:t}}),await de({target:t,images:i}))},pe=async e=>{let{target:t,dataTransfer:n}=e,r=n?.files,i=[];if(r?.length)i=[...r].filter(({type:e})=>Vz.includes(e)).map(e=>({file:e}));else{let t=e.dataTransfer?.getData(`text/html`);if(t){let e=new DOMParser().parseFromString(t,`text/html`).querySelector(`img`);if(e){let{src:t,alt:n}=e,r=t.match(o),a;if(r){let e=r.groups?.type??``;if(Vz.includes(e))try{let n=await(await fetch(t)).blob(),{year:r,month:i,day:o,hour:s,minute:c,second:l}=mI(),u=`${r}${i}${o}-${s}${c}${l}.${e.split(`/`)[1]}`;a=new File([n],u,{type:e})}catch{return}}i=[{file:a,src:t,alt:n}]}}}i.length&&await de({target:t,images:i})},me=()=>{let e=typeof p()==`string`?p():``;H(v)!==e&&F(v,e,!0),!(!r()||d)&&(window.clearTimeout(y),y=window.setTimeout(()=>{Object.keys(r()?.extraValues[t.locale]??{}).forEach(e=>{let[n]=e.match(V3)??[];n?.startsWith(`${t.keyPath}:`)&&!H(_)?.querySelector(`[data-key-path-prefix="${n}"]`)&&delete r().extraValues[t.locale][e]})},500))},he=()=>{let e=H(v);p()!==e&&p(e)};B(()=>{p(),Ds(()=>{me()})}),B(()=>{H(v),Ds(()=>{he()})}),B(()=>()=>{window.clearTimeout(y)});var ge=mSe();let _e;hc(I(ge),vf,null,e=>{var n=W();_c(L(n),()=>JSON.stringify(t.fieldConfig),e=>{{let n=N(()=>vL(t.locale)),r=N(()=>yL(t.locale));vae(e,{get lang(){return H(n)},get dir(){return H(r)},get modes(){return H(te)},get buttons(){return H(oe)},get components(){return H(ce)},get useEmojiAutocomplete(){return H(T)},get useMarkdownShortcuts(){return H(E)},flex:!0,get readonly(){return h()},get required(){return m()},get invalid(){return g()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},autoResize:!0,onpastecapture:e=>{fe(e)},ondrop:e=>{pe(e)},get value(){return H(v)},set value(e){F(v,e,!0)}})}}),G(e,n)}),D(ge),Ol(ge,e=>F(_,e),()=>H(_)),V(()=>_e=el(ge,1,`wrapper svelte-duifo7`,null,_e,{minimal:H(ee)})),G(e,ge),k(),a()}function gSe(){return{useNewRenderer:!0,renderer:{heading(...e){return tr.Renderer.prototype.heading.call(this,...e).replace(/^<(h\d)/,`<$1 dir="auto"`)},list(...e){return tr.Renderer.prototype.list.call(this,...e).replace(/^<(ol|ul)/,`<$1 dir="auto"`)},paragraph(...e){return tr.Renderer.prototype.paragraph.call(this,...e).replace(/^<p/,`<p dir="auto"`)}}}}var _Se={ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|blob):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i,ADD_TAGS:[`iframe`],ADD_ATTR:[`allow`,`allowfullscreen`,`referrerpolicy`,`sandbox`]},vSe=e=>{let t=e.getAttribute(`src`)?.trim()||``;if(!t.startsWith(`https://`))return!1;try{let e=new URL(t),n=typeof window<`u`&&window.location?window.location.origin:``;if(n&&e.origin===n)return!1}catch{return!1}let n=e.getAttribute(`sandbox`)||``,r=new Set(n.split(/\s+/).filter(Boolean));return r.add(`allow-scripts`),r.add(`allow-same-origin`),e.setAttribute(`sandbox`,Array.from(r).join(` `)),!0},ySe=(e,t={})=>{let n=gt(e,{..._Se,...t,RETURN_DOM:!0});return Array.from(n.querySelectorAll(`iframe`)).forEach(e=>{vSe(e)||e.remove()}),n.innerHTML},k5=`span[data-component-key]`,bSe=`img[src]:not([data-processed])`,xSe=e=>Array.from(e).reduce((e,t)=>((e^t.charCodeAt(0))>>>0)*16777619>>>0,2166136261).toString(16),SSe=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),CSe=/^[ ]{0,3}(`{3,}|~{3,})/,wSe=/^<([a-zA-Z][a-zA-Z0-9]*)(?:[\s>])/,TSe=new Map,ESe=e=>{if(!e)return[];let t=[],n=[],r=null,i=null;return e.split(`
|
||
`).forEach(e=>{if(r){n.push(e);let t=e.trimStart();e.length-t.length<=3&&t.startsWith(r.char.repeat(r.length))&&!/\S/.test(t.slice(r.length))&&(r=null)}else if(i){n.push(e);let{openRe:t,closeRe:r}=i;i.depth+=[...e.matchAll(t)].length-[...e.matchAll(r)].length,i.depth<=0&&(i=null)}else{let a=CSe.exec(e);if(a)n.push(e),r={char:a[1][0],length:a[1].length};else{let r=wSe.exec(e);if(r){let t=r[1].toLowerCase();if(n.push(e),!SSe.has(t)){let{openRe:n,closeRe:r}=wI(TSe,t,()=>({openRe:RegExp(`<${t}(?:[\\s>])`,`gi`),closeRe:RegExp(`<\\/${t}>`,`gi`)})),a=[...e.matchAll(n)].length-[...e.matchAll(r)].length;a>0&&(i={tag:t,depth:a,openRe:n,closeRe:r})}}else e===``?n.length&&t.push(n.splice(0).join(`
|
||
`)):n.push(e)}}}),n.length&&t.push(n.join(`
|
||
`)),t},DSe=(...e)=>{let{alt:t,src:n,title:r}=e.at(-1),i=n.replaceAll(` `,`%20`);return r?``:``},A5=new Map,OSe=(e,t,n)=>{let r=new Map,i=(e??``).replace(Mce,DSe);return t.forEach(({pattern:e,fromBlock:t,toPreview:a})=>{let o=`${e.source}|${e.flags}`,s=A5.get(o);s||(s=e.global?e:new RegExp(e.source,`${e.flags}g`),A5.set(o,s));let c=[],l=new Map;i.matchAll(s).forEach(e=>{let i=xSe(e[0]),o=l.get(i)??0,s=o===0?i:`${i}-${o}`,u=t?.(e)??e.groups??{};c.push(s),l.set(i,o+1),r.set(s,n?.get(s)??a?.(u))}),i=i.replaceAll(s,()=>{let e=c.shift(),t=r.get(e);return typeof t==`string`?t:`<span data-component-key="${e}"></span>`})}),{markdown:i,previewMap:r}},kSe=U(`<div role="none" class="svelte-14tuh7g"><!></div>`),ASe={hash:`svelte-14tuh7g`,code:`[role='document'] div.svelte-14tuh7g {:is(h1, h2, h3, h4, h5, h6, p, ul, ol) {margin:1em 0 0;}:is(video, img) {max-width:100%;max-height:100%;}:is(a:has(img)) {display:inline-block;img {pointer-events:none;}}pre.shiki {background-color:var(--sui-code-background-color) !important;}}div.svelte-14tuh7g {[data-component-key] {display:contents;}}`};function j5(e,t){O(t,!0),J(e,ASe);let n=()=>j($H,`$cmsConfig`,i),r=()=>j(h4,`$entryDraft`,i),[i,a]=sa();nr(gSe()),nr({renderer:{code({text:e,lang:t}){return(t?Tie(e,t):void 0)??!1}}});let o=n()?.field_defaults?.richtext??{},s=new yd,c=new vd,l=new Map,u=P(void 0),d=P(!1),f=P(0),p=``,m=N(()=>r()?.originalEntry),h=N(()=>r()?.collectionName??``),g=N(()=>r()?.fileName),_=N(()=>wr(t.fieldConfig.sanitize_preview,()=>o.sanitize_preview??!0,!0)),v=N(()=>wr(t.fieldConfig.editor_components,()=>o.editor_components??[...H3,...rL.keys()],!0)),y=N(()=>wr(t.fieldConfig.linked_images,()=>o.linked_images??!0,!0)),b=N(()=>H(v).map(e=>LB(e===`image`&&H(y)?`linked-image`:e)).filter(e=>!!e)),x=N(()=>{if(typeof t.currentValue!=`string`||!t.currentValue.trim())return``;let{markdown:e,previewMap:n}=OSe(t.currentValue,H(b),l);return l=n,e}),S=async e=>{let t=[...e.matchAll(/^ {0,3}```(\S+)/gm)].map(([,e])=>e).filter((e,t,n)=>n.indexOf(e)===t).sort().join(`,`);!t||t===p||(p=t,await Promise.all(t.split(`,`).map(e=>Dj(e))),F(f,H(f)+1))},C=e=>{let t=e.dataset.componentKey,n=t?l.get(t):void 0;if(n instanceof Element)e.replaceChildren(n),c.add(n);else if((0,ar.isValidElement)(n)){let t=(0,Q6.createRoot)(e);s.set(e,t),t.render(n)}else e.remove()},w=e=>{[e,...e.querySelectorAll(k5)].forEach(e=>{let t=s.get(e);t&&(t.unmount(),s.delete(e))})},T=(e=!1)=>{c.forEach(t=>{(e||!t.isConnected)&&(c.delete(t),t.dispatchEvent(new CustomEvent(`Unmount`)))})},E=async e=>{e.dataset.processed=`true`;let n=await sB({value:e.getAttribute(`src`),entry:H(m),collectionName:H(h),fileName:H(g),typedKeyPath:t.typedKeyPath});n&&(e.src=n)},ee=e=>{let t=[];e.forEach(({removedNodes:e,addedNodes:n})=>{e.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&t.push(e)}),n.forEach(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return;let t=e;t.matches(`span[data-component-key]`)?C(t):t.querySelectorAll(k5).forEach(e=>{C(e)}),t.matches(`img[src]:not([data-processed])`)?E(t):t.querySelectorAll(bSe).forEach(e=>{E(e)})})}),t.forEach(e=>{w(e)}),T()},te=e=>{H(f);let t=ir(e,{breaks:!0});return H(_)?ySe(t):t};B(()=>{H(x)&&S(H(x))}),Nl(()=>{let e=new MutationObserver(ee);return e.observe(H(u),{childList:!0,subtree:!0}),F(d,!0),()=>{e.disconnect(),s.forEach(e=>e.unmount()),s.clear(),T(!0)}});var ne=kSe(),re=I(ne),ie=e=>{var t=W();Cc(L(t),19,()=>ESe(H(x)),(e,t)=>`${t}-${e}`,(e,t)=>{var n=W();kc(L(n),()=>te(H(t))),G(e,n)}),G(e,t)};q(re,e=>{H(d)&&H(x)&&e(ie)}),D(ne),Ol(ne,e=>F(u,e),()=>H(u)),G(e,ne),k(),a()}var M5=U(`<p> </p>`);function jSe(e,t){O(t,!0);let n=N(()=>t.fieldConfig.options),r=N(()=>t.fieldConfig.multiple),i=N(()=>Fj(H(n))),a=N(()=>CL(t.locale)),o=e=>H(i)&&H(n).find(t=>t.value===e)?.label||String(e);var s=W(),c=L(s),l=e=>{var n=M5(),r=R(n,!0);V((e,t,i)=>{Y(n,`lang`,e),Y(n,`dir`,t),K(r,i),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale),()=>H(a).format(t.currentValue.map(o).sort())]),G(e,n)},u=N(()=>H(r)&&Array.isArray(t.currentValue)&&t.currentValue.length),d=e=>{var n=M5(),r=R(n,!0);V((e,t,i)=>{Y(n,`lang`,e),Y(n,`dir`,t),K(r,i),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale),()=>o(t.currentValue)]),G(e,n)};q(c,e=>{H(u)?e(l):t.currentValue!==void 0&&e(d,1)}),G(e,s),k()}var MSe=U(`<div class="wrapper svelte-19vklom"><!> <span role="none"> </span> <!></div>`),NSe={hash:`svelte-19vklom`,code:`.wrapper.svelte-19vklom {flex:none;color:var(--sui-tertiary-foreground-color) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);text-align:end;}.count.svelte-19vklom {&.invalid {color:var(--sui-error-foreground-color);}&:not(.invalid) {color:var(--sui-success-foreground-color);}}`};function N5(e,t){O(t,!0),J(e,NSe);let n=N(()=>t.fieldConfig.minlength),r=N(()=>t.fieldConfig.maxlength),i=N(()=>W3({fieldConfig:t.fieldConfig,locale:t.locale,value:t.currentValue}).detail),a=N(()=>H(i).count),o=N(()=>H(i).hasMin),s=N(()=>H(i).hasMax),c=N(()=>H(i).invalid);var l=W(),u=L(l),d=e=>{var t=MSe(),i=I(t),l=e=>{var t=ec();V(()=>K(t,`${H(n)??``} / `)),G(e,t)};q(i,e=>{H(o)&&e(l)});var u=z(i,2);let d;var f=R(u,!0),p=z(u,2),m=e=>{var t=ec();V(()=>K(t,` /
|
||
${H(r)??``}`)),G(e,t)};q(p,e=>{H(s)&&e(m)}),D(t),V(e=>{Y(t,`aria-label`,e),d=el(u,1,`count svelte-19vklom`,null,d,{invalid:H(c)}),K(f,H(a))},[()=>Z(H(o)&&H(s)?`character_counter.min_max`:H(o)?`character_counter.min`:`character_counter.max`,{values:{count:H(a),min:H(n),max:H(r)}})]),G(e,t)};q(u,e=>{(H(o)||H(s))&&e(d)}),G(e,l),k()}function PSe(e,t){O(t,!0);let[n,r]=sa(),i=X(t,`currentValue`,15),a=X(t,`required`,3,!0),o=X(t,`readonly`,3,!1),s=X(t,`invalid`,3,!1),{extraHint:c}=zi(`field-editor`)??{},l=P(``),u=N(()=>wr(t.fieldConfig.type,`text`)),d=N(()=>wr(t.fieldConfig.prefix,``)),f=N(()=>wr(t.fieldConfig.suffix,``)),p=N(()=>wr(t.fieldConfig.use_emoji_autocomplete,H(u)===`text`)),m=()=>{let e=typeof i()==`string`?i():String(i()??``);H(d)&&e.startsWith(H(d))&&(e=e.slice(H(d).length)),H(f)&&e.endsWith(H(f))&&(e=e.slice(0,-H(f).length)),H(l)!==e&&F(l,e,!0)},h=()=>{let e=H(l);e.trim()&&(H(d)||H(f))&&(e=`${H(d)}${e}${H(f)}`),i()!==e&&i(e)};B(()=>{i(),Ds(()=>{m()})}),B(()=>{H(l),Ds(()=>{h()})}),B(()=>{c&&M(c,N5)});{let n=N(()=>vL(t.locale)),r=N(()=>yL(t.locale));fm(e,{get lang(){return H(n)},get dir(){return H(r)},get type(){return H(u)},get inputmode(){return H(u)},flex:!0,get readonly(){return o()},get required(){return a()},get invalid(){return s()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get useEmojiAutocomplete(){return H(p)},get value(){return H(l)},set value(e){F(l,e,!0)}})}k(),r()}var FSe=e=>{if(!LA(e))return!1;let{origin:t,pathname:n,searchParams:r}=new URL(e);return!!((t===`https://www.youtube.com`||t===`https://www.youtube-nocookie.com`)&&(n===`/watch`&&r.has(`v`)||n===`/playlist`&&r.has(`list`)||n.startsWith(`/embed/`))||t===`https://youtu.be`&&n)},ISe=e=>{let t=`https://www.youtube-nocookie.com`,{pathname:n,search:r,searchParams:i}=new URL(e);if(n===`/watch`){let e=new URLSearchParams(i),n=`${t}/embed/${e.get(`v`)}`;return e.get(`list`)&&(e.delete(`v`),e.set(`listType`,`playlist`),n+=`?${e}`),n}return n===`/playlist`?`${t}/embed/videoseries${r}`:n.startsWith(`/embed/`)?`${t}${n}${r}`:`${t}/embed${n}${r}`},LSe=U(`<iframe frameborder="0" allow="autoplay; encrypted-media; picture-in-picture; clipboard-write" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" sandbox="allow-same-origin allow-scripts allow-popups" class="svelte-spbxln"></iframe>`),RSe=U(`<a> </a>`),zSe=U(`<div role="none"><!></div>`),BSe={hash:`svelte-spbxln`,code:`iframe.svelte-spbxln {display:block;margin:0 auto;width:100%;height:auto;aspect-ratio:16 / 9;}`};function VSe(e,t){O(t,!0),J(e,BSe);let n=P(!0),r=N(()=>ISe(t.url)),i=({blockedURI:e,violatedDirective:t})=>{e===new URL(H(r)).origin&&t===`frame-src`&&(F(n,!1),window.removeEventListener(`securitypolicyviolation`,i))};Nl(()=>(window.addEventListener(`securitypolicyviolation`,i),()=>{window.removeEventListener(`securitypolicyviolation`,i)}));var a=zSe(),o=I(a),s=e=>{Vj(e,{children:(e,t)=>{var n=LSe();V((e,t)=>{Y(n,`src`,e),Y(n,`title`,t)},[()=>encodeURI(H(r)),()=>Z(`youtube_video_player`)]),G(e,n)},$$slots:{default:!0}})},c=e=>{var n=RSe(),r=R(n,!0);V(e=>{Y(n,`href`,e),K(r,t.url)},[()=>encodeURI(t.url)]),G(e,n)};q(o,e=>{H(n)?e(s):e(c,-1)}),D(a),G(e,a),k()}var P5=U(`<a> </a>`),HSe=U(`<p><!></p>`),USe={hash:`svelte-euqs6c`,code:`.title.svelte-euqs6c {font-size:var(--sui-font-size-xxx-large);font-weight:var(--sui-font-weight-bold);}
|
||
|
||
/* Remove the padding to make the iframe full-width on small screens */
|
||
@media (width < 768px) {[role='document'] section > p.svelte-euqs6c:has(iframe) {margin-inline:calc(var(--entry-preview-padding-inline) * -1);}
|
||
}`};function WSe(e,t){O(t,!0),J(e,USe);let n=N(()=>t.fieldConfig.name),r=N(()=>wr(t.fieldConfig.type,`text`)),i=/^(?:https|mailto|tel):/;var a=W(),o=L(a),s=e=>{var a=HSe();let o;var s=I(a),c=e=>{var n=W(),r=L(n),a=e=>{VSe(e,{get url(){return t.currentValue}})},o=N(()=>FSe(t.currentValue)),s=e=>{var n=P5(),r=R(n,!0);V(e=>{Y(n,`href`,e),K(r,t.currentValue)},[()=>encodeURI(t.currentValue)]),G(e,n)},c=N(()=>i.test(t.currentValue)),l=e=>{var n=ec();V(()=>K(n,t.currentValue)),G(e,n)};q(r,e=>{H(o)?e(a):H(c)?e(s,1):e(l,-1)}),G(e,n)},l=N(()=>H(r)===`url`||LA(t.currentValue)),u=e=>{var n=P5(),r=R(n,!0);V(e=>{Y(n,`href`,`mailto:${e??``}`),K(r,t.currentValue)},[()=>encodeURI(t.currentValue)]),G(e,n)},d=e=>{var n=ec();V(()=>K(n,t.currentValue)),G(e,n)};q(s,e=>{H(l)?e(c):H(r)===`email`?e(u,1):e(d,-1)}),D(a),V((e,t)=>{Y(a,`lang`,e),Y(a,`dir`,t),o=el(a,1,`svelte-euqs6c`,null,o,{title:H(n)===`title`}),a.dir=a.dir},[()=>vL(t.locale),()=>yL(t.locale)]),G(e,a)},c=N(()=>typeof t.currentValue==`string`&&t.currentValue.trim());q(o,e=>{H(c)&&e(s)}),G(e,a),k()}function GSe(e,t){O(t,!0);let[n,r]=sa(),{extraHint:i}=zi(`field-editor`)??{},a=X(t,`currentValue`,15),o=X(t,`required`,3,!0),s=X(t,`readonly`,3,!1),c=X(t,`invalid`,3,!1),l=P(``),u=N(()=>wr(t.fieldConfig.use_emoji_autocomplete,!0)),d=()=>{let e=typeof a()==`string`?a():``;H(l)!==e&&F(l,e,!0)},f=()=>{let e=H(l);a()!==e&&a(e)};B(()=>{a(),Ds(()=>{d()})}),B(()=>{H(l),Ds(()=>{f()})}),B(()=>{i&&M(i,N5)});{let n=N(()=>vL(t.locale)),r=N(()=>yL(t.locale));Pj(e,{get lang(){return H(n)},get dir(){return H(r)},flex:!0,get readonly(){return s()},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},autoResize:!0,get useEmojiAutocomplete(){return H(u)},get value(){return H(l)},set value(e){F(l,e,!0)}})}k(),r()}var KSe=U(`<p class="svelte-q17c48"> </p>`),qSe={hash:`svelte-q17c48`,code:`p.svelte-q17c48 {white-space:pre-wrap;}`};function JSe(e,t){O(t,!0),J(e,qSe);var n=W(),r=L(n),i=e=>{var n=KSe(),r=R(n,!0);V((e,i)=>{Y(n,`lang`,e),Y(n,`dir`,i),K(r,t.currentValue),n.dir=n.dir},[()=>vL(t.locale),()=>yL(t.locale)]),G(e,n)},a=N(()=>typeof t.currentValue==`string`&&t.currentValue.trim());q(r,e=>{H(a)&&e(i)}),G(e,n),k()}var F5=e=>{let{prefix:t,use_b32_encoding:n}=e,r=n?Ef():Tf();return t?`${t}${r}`:r};function YSe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=X(t,`currentValue`,15),o=X(t,`required`,3,!0),s=X(t,`readonly`,3,!0),c=X(t,`invalid`,3,!1),l=N(()=>n()?.collection),u=N(()=>n()?.collectionFile),d=N(()=>(H(u)??H(l))?._i18n??ML),f=N(()=>H(d).defaultLocale);Nl(()=>{a()||(t.locale===H(f)||[!0,`translate`].includes(t.fieldConfig?.i18n??!1))&&a(F5(t.fieldConfig)),`read_only`in t.fieldConfig&&uL(`uuid_read_only`)});{let n=N(()=>s()&&t.fieldConfig.read_only!==!1);fm(e,{dir:`ltr`,flex:!0,get readonly(){return H(n)},get required(){return o()},get invalid(){return c()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get value(){return a()},set value(e){a(e)}})}k(),i()}var XSe=U(`<p class="svelte-1phz9g8"> </p>`),ZSe={hash:`svelte-1phz9g8`,code:`p.svelte-1phz9g8 {font-family:var(--sui-font-family-monospace);}`};function QSe(e,t){O(t,!0),J(e,ZSe);var n=W(),r=L(n),i=e=>{var n=XSe(),r=R(n,!0);V(()=>K(r,t.currentValue)),G(e,n)},a=N(()=>typeof t.currentValue==`string`&&t.currentValue.trim());q(r,e=>{H(a)&&e(i)}),G(e,n),k()}var I5={boolean:pve,code:gve,color:Cve,compute:Dve,datetime:qve,file:n5,image:n5,keyvalue:Fbe,list:oxe,map:Exe,markdown:O5,number:Axe,object:zxe,relation:Wxe,richtext:O5,select:_5,string:PSe,text:GSe,uuid:YSe},L5={boolean:hve,code:vve,color:Eve,compute:kve,datetime:Yve,file:i5,image:i5,keyvalue:zbe,list:vxe,map:kxe,markdown:j5,number:Mxe,object:Bxe,relation:Kxe,richtext:j5,select:jSe,string:WSe,text:JSe,uuid:QSe},R5=(e,t)=>{let n=t.split(`.`);for(let t=n.length-1;t>=1;--t)if(HB(n[t])){let r=n.slice(0,t+1).join(`.`),i=e[`${r}.__sc_item_original_key_path`];if(i!==void 0){let e=n.slice(t+1).join(`.`);return{originalKeyPath:e?`${i}.${e}`:i,currentPrefix:r,originalPrefix:i}}}},z5=({locale:e,isDefaultLocale:t,keyPath:n,getFieldArgs:r,currentValues:i,reset:a=!1,remapPrefix:o})=>{let{valueMap:s={}}=r;Object.entries(s).forEach(([s,c])=>{if(!n||s.startsWith(n)){let n=YB({...r,keyPath:s});if(t||[!0,`translate`].includes(n?.i18n??!1)){if(a)delete i[e][s];else{let t=o?`${o.to}${s.slice(o.from.length)}`:s;i[e][t]=c}}}})},$Se=({draft:e,keyPath:t,locale:n})=>{let{collection:r,collectionName:i,collectionFile:a,fileName:o,currentValues:s,originalValues:c,isIndexFile:l}=e,{defaultLocale:u}=(a??r)._i18n,d=n===u,f={collectionName:i,fileName:o,keyPath:``,isIndexFile:l},p=t?R5(s[n],t):void 0,m=p?.originalKeyPath??t,h=p?{from:p.originalPrefix,to:p.currentPrefix}:void 0;z5({locale:n,isDefaultLocale:d,keyPath:t,getFieldArgs:{...f,valueMap:s[n]},currentValues:s,reset:!0}),z5({locale:n,isDefaultLocale:d,keyPath:m,getFieldArgs:{...f,valueMap:c[n]},currentValues:s,remapPrefix:h})},B5=({locale:e=``,keyPath:t=``}={})=>{let n=A(h4),{collection:r,collectionFile:i,currentValues:a}=n,{allLocales:o}=(i??r)._i18n;(e?[e]:o).forEach(e=>{$Se({draft:n,keyPath:t,locale:e})}),h4.update(()=>({...n,currentValues:a}))},eCe=U(`<div role="none" class="before-input svelte-dkfcyc"></div>`),tCe=U(`<div role="none" class="prefix svelte-dkfcyc"> </div>`),V5=U(`<!> <!>`,1),nCe=U(`<div role="none" class="suffix svelte-dkfcyc"> </div>`),rCe=U(`<div role="none" class="after-input svelte-dkfcyc"></div>`),iCe=U(`<div class="required">*</div>`),aCe=U(`<div role="none" class="comment-wrapper"><p class="comment svelte-dkfcyc"></p></div>`),H5=U(`<!> <!> <!>`,1),oCe=U(`<div role="none"> </div>`),sCe=U(`<p class="hint svelte-dkfcyc"></p>`),cCe=U(`<div role="none" class="footer svelte-dkfcyc"><!> <!></div>`),lCe=U(`<header role="none"><h4 role="none"> </h4> <!> <!> <!> <!></header> <!> <!> <div role="none"><!></div> <!>`,1),uCe={hash:`svelte-dkfcyc`,code:`.field-wrapper.svelte-dkfcyc {&.has-extra-labels {display:flex;align-items:center;justify-content:flex-start;gap:4px;}:is(input[type='text'], textarea) {width:100%;}input:is([type='color'], [type='number']) {outline:0;border-width:1px;border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);height:var(--sui-button-medium-height);color:inherit;background-color:var(--sui-textbox-background-color);}input:is([type='file'], [type='checkbox']) {color:inherit;}& > div {color:inherit;}input:is([type='date'], [type='datetime-local'], [type='time']) {outline:0;margin:var(--sui-focus-ring-width);border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-primary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:var(--sui-textbox-singleline-padding);width:auto;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);text-transform:uppercase;&:disabled {opacity:0.4;}}input[aria-invalid='true']:is(
|
||
[type='color'],
|
||
[type='date'],
|
||
[type='datetime-local'],
|
||
[type='time']
|
||
) {border-color:var(--sui-error-border-color);}input:read-only {
|
||
/* Make readonly inputs selectable */-webkit-user-select:text;user-select:text;pointer-events:auto;}}.before-input.svelte-dkfcyc,
|
||
.after-input.svelte-dkfcyc,
|
||
.prefix.svelte-dkfcyc,
|
||
.suffix.svelte-dkfcyc {color:var(--sui-secondary-foreground-color);white-space:nowrap;}.comment.svelte-dkfcyc,
|
||
.hint.svelte-dkfcyc {margin-inline:var(--sui-focus-ring-width) !important;font-size:var(--sui-font-size-small);line-height:var(--sui-line-height-compact);}.comment.svelte-dkfcyc {margin-block:var(--sui-focus-ring-width) !important;}.hint.svelte-dkfcyc {flex:auto;margin-block:var(--sui-focus-ring-width) 0 !important;color:var(--sui-tertiary-foreground-color);}.footer.svelte-dkfcyc {display:flex;gap:16px;justify-content:flex-end;margin-top:4px;}`};function U5(e,t){let n=tc();O(t,!0),J(e,uCe);let r=()=>j(h4,`$entryDraft`,a),i=()=>j(h,`$extraHint`,a),[a,o]=sa(),s=e=>{var t=V5(),n=L(t),r=e=>{var t=eCe();kc(t,()=>p(H(re)),!0),D(t),G(e,t)};q(n,e=>{H(re)&&e(r)});var i=z(n,2),a=e=>{var t=tCe(),n=R(t,!0);V(()=>K(n,H(ee))),G(e,t)};q(i,e=>{H(ee)&&e(a)}),G(e,t)},c=e=>{var t=V5(),n=L(t),r=e=>{var t=nCe(),n=R(t,!0);V(()=>K(n,H(te))),G(e,t)};q(n,e=>{H(te)&&e(r)});var i=z(n,2),a=e=>{var t=rCe();kc(t,()=>p(H(ie)),!0),D(t),G(e,t)};q(i,e=>{H(ie)&&e(a)}),G(e,t)},l=zi(`field-editor`)??{},u={ALLOWED_TAGS:[`strong`,`em`,`del`,`code`,`a`,`br`],ALLOWED_ATTR:[`href`]},d=X(t,`context`,19,()=>l.fieldContext??void 0),f=X(t,`valueStoreKey`,19,()=>l.valueStoreKey??`currentValues`),p=e=>gt(rr(e.replaceAll(`\\n`,`<br>`)),u),m=e=>{if(typeof e==`object`&&e)return;let n=f(),r=t.locale,i=t.keyPath;queueMicrotask(()=>{h4.update(t=>(t&&(t[n][r][i]=e),t))})},h=na();Bi(`field-editor`,{fieldContext:d(),parentComponentNames:[...l.parentComponentNames??[],t.componentName].filter(Boolean),extraHint:h,valueStoreKey:f()});let g=N(()=>d()===`rich-text-editor-component`),_=N(()=>t.fieldConfig.name),v=N(()=>wr(t.fieldConfig.widget,`string`)),y=N(()=>wr(t.fieldConfig.i18n,!1)),b=N(()=>wr(t.fieldConfig.label,``)),x=N(()=>wr(t.fieldConfig.comment,``)),S=N(()=>wr(t.fieldConfig.hint,``)),C=N(()=>wr(t.fieldConfig.readonly,!1)),w=N(()=>ZB({fieldConfig:t.fieldConfig,locale:t.locale})),T=N(()=>qB(t.fieldConfig)),E=N(()=>[`string`].includes(H(v))),ee=N(()=>H(E)?t.fieldConfig.prefix:void 0),te=N(()=>H(E)?t.fieldConfig.suffix:void 0),ne=N(()=>[`boolean`,`number`,`string`].includes(H(v))),re=N(()=>H(ne)?t.fieldConfig.before_input:void 0),ie=N(()=>H(ne)?t.fieldConfig.after_input:void 0),ae=N(()=>!!(H(ee)||H(te)||H(re)||H(ie))),oe=N(()=>H(v)===`list`||H(T)),se=N(()=>r()?.collection),ce=N(()=>r()?.collectionFile),le=N(()=>r()?.originalValues),ue=N(()=>(H(ce)??H(se))?._i18n??ML),de=N(()=>H(ue).i18nEnabled),fe=N(()=>H(ue).allLocales),pe=N(()=>H(ue).defaultLocale),me=N(()=>H(de)?H(fe).filter(e=>e!==t.locale):[]),he=N(()=>H(de)&&(H(y)===!0||H(y)===`translate`)),ge=N(()=>H(de)&&H(y)===`duplicate`),_e=N(()=>H(g)||t.locale===H(pe)||H(he)||H(ge)),ve=N(()=>!H(g)&&H(he)&&H(me).length),ye=N(()=>!H(g)&&!(H(ge)&&t.locale!==H(pe))),be=N(()=>RegExp(`^${NA(t.keyPath)}\\.\\d+$`)),xe=N(()=>q6(r(),t.locale,f())),Se=N(()=>iL.get(H(v))),Ce=N(()=>nV({valueMap:H(xe),keyPath:t.keyPath,isList:H(oe),isCustomFieldType:!!H(Se)})),we=N(()=>{if(H(oe))return Object.entries(H(le)?.[t.locale]??{}).filter(([e])=>H(be).test(e)).map(([,e])=>e).filter(e=>e!==void 0);let e=R5(H(xe),t.keyPath);return e?H(le)?.[t.locale]?.[e.originalKeyPath]:H(le)?.[t.locale]?.[t.keyPath]}),Te=N(()=>{if(H(v)===`list`){let e=H(xe),n=H(le)?.[t.locale]??{},r=`${t.keyPath}.`,i=Object.entries(e).filter(([e])=>e.startsWith(r)&&!m4.test(e)).sort(([e],[t])=>e.localeCompare(t)),a=Object.entries(n).filter(([e])=>e.startsWith(r)&&!m4.test(e)).sort(([e],[t])=>e.localeCompare(t));return(0,HH.default)(i,a)}return(0,HH.default)(H(Ce),H(we))}),Ee=N(()=>r()?.validities[t.locale][t.keyPath]),De=N(()=>H(b)||H(_)),Oe=N(()=>lX(r()?.originalEntry)),ke=N(()=>H(C)||H(Oe)||H(y)===`duplicate`&&t.locale!==H(pe)||H(v)===`compute`||H(v)===`uuid`),Ae=N(()=>H(Ee)?.valid===!1),je=N(()=>({locale:t.locale,keyPath:t.keyPath,typedKeyPath:t.typedKeyPath,fieldId:n,fieldLabel:H(De),fieldConfig:t.fieldConfig,readonly:H(ke),required:H(w),invalid:H(Ae)}));var Me=W(),Ne=L(Me),Pe=e=>{{let a=N(()=>Z(`x_field`,{values:{field:H(De)}})),o=N(()=>H(v)===`compute`);Y6(e,{get"aria-label"(){return H(a)},get"data-field-type"(){return H(v)},get"data-key-path"(){return t.keyPath},get"data-typed-key-path"(){return t.typedKeyPath},get hidden(){return H(o)},children:(e,a)=>{var o=lCe(),l=L(o),u=I(l),d=R(u,!0),f=z(u,2),h=e=>{var t=iCe();V(e=>Y(t,`aria-label`,e),[()=>Z(`required`)]),G(e,t)};q(f,e=>{!H(ke)&&H(w)&&e(h)});var g=z(f,2);Wp(g,{flex:!0});var _=z(g,2),y=e=>{X6(e,{size:`small`,get locale(){return t.locale},get otherLocales(){return H(me)},get keyPath(){return t.keyPath}})},b=N(()=>H(ve)&&[`richtext`,`markdown`,`string`,`text`,`list`,`object`].includes(H(v)));q(_,e=>{H(b)&&e(y)});var C=z(_,2),T=e=>{{let n=e=>{{let n=N(()=>Z(`field_options`));xm(e,{get"aria-label"(){return H(n)},children:(e,n)=>{var r=V5(),i=L(r),a=e=>{J6(e,{get locale(){return t.locale},get otherLocales(){return H(me)},get keyPath(){return t.keyPath}})};q(i,e=>{H(ve)&&e(a)});var o=z(i,2),s=e=>{{let n=N(()=>Z(`revert_changes`));Sm(e,{get label(){return H(n)},get disabled(){return H(Te)},onclick:()=>{B5({locale:t.locale,keyPath:t.keyPath})}})}};q(o,e=>{H(ye)&&e(s)}),G(e,r)},$$slots:{default:!0}})}},r=N(()=>Z(`show_field_options`));Ip(e,{variant:`ghost`,size:`small`,iconic:!0,get disabled(){return H(Oe)},popupPosition:`bottom-right`,get"aria-label"(){return H(r)},popup:n,$$slots:{popup:!0}})}};q(C,e=>{(H(ve)||H(ye))&&e(T)}),D(l);var E=z(l,2),ee=e=>{var t=aCe(),n=I(t);kc(n,()=>p(H(x)),!0),D(n),D(t),G(e,t)};q(E,e=>{!H(ke)&&H(x)&&e(ee)});var te=z(E,2),ne=e=>{Z6(e,{get id(){return`${n}-error`},children:(e,n)=>{mi();var i=ec();V(e=>K(i,e),[()=>r()?.validationMessages[t.locale][t.keyPath]?.join(` `)]),G(e,i)},$$slots:{default:!0}})};q(te,e=>{H(Ee)?.valid===!1&&e(ne)});var re=z(te,2);let ie;var oe=I(re),se=e=>{var n=H5(),r=L(n);s(r);var i=z(r,2);{let e=N(()=>({...H(je),fieldConfig:t.fieldConfig}));Rve(i,Ml(()=>H(e),{get control(){return H(Se).control},get currentValue(){return H(Ce)}}))}var a=z(i,2);c(a),G(e,n)},ce=e=>{var t=oCe(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`unsupported_field_type_x`,{values:{name:H(v)}})]),G(e,t)},le=N(()=>XB(t.fieldConfig)===`unknown`),ue=e=>{let t=N(()=>I5[H(v)]);var n=H5(),r=L(n);s(r);var i=z(r,2),a=()=>H(Ce),o=e=>m(e);jc(i,()=>H(t),(e,t)=>{t(e,Ml(()=>H(je),{get currentValue(){return a()},set currentValue(e){o(e)}}))});var l=z(i,2);c(l),G(e,n)};q(oe,e=>{H(Se)?e(se):H(le)?e(ce,1):e(ue,-1)}),D(re);var de=z(re,2),fe=e=>{let n=N(i);var r=cCe(),a=I(r),o=e=>{var t=sCe();kc(t,()=>p(H(S)),!0),D(t),G(e,t)};q(a,e=>{H(S)&&e(o)}),jc(z(a,2),()=>H(n),(e,n)=>{n(e,{get fieldConfig(){return t.fieldConfig},get locale(){return t.locale},get currentValue(){return H(Ce)}})}),D(r),G(e,r)};q(de,e=>{!H(ke)&&(H(S)||i())&&e(fe)}),V(()=>{Y(u,`id`,`${n}-label`),K(d,H(De)),ie=el(re,1,`field-wrapper svelte-dkfcyc`,null,ie,{"has-extra-labels":H(ae)})}),G(e,o)},$$slots:{default:!0}})}};q(Ne,e=>{r()&&H(_e)&&H(v)!==`hidden`&&e(Pe)}),G(e,Me),k(),o()}var dCe=U(`<div class="required">*</div>`),fCe=U(`<!> <!>`,1),pCe=U(`<header role="none"><h4 role="none"> </h4> <!></header> <!> <div role="none" class="field-wrapper"><!></div>`,1);function mCe(e,t){let n=tc();O(t,!0);let r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),o=N(()=>r()?.collection),s=N(()=>r()?.collectionFile),c=N(()=>(H(s)??H(o))?._i18n??ML),l=N(()=>H(c).defaultLocale),u=N(()=>r()?.slugEditor[t.locale]),d=N(()=>H(u)===!0),f=N(()=>H(u)===`readonly`),p=N(()=>r()?.validities[t.locale]._slug),m=N(()=>!H(f)&&H(p)?.valid===!1),h=P(``);B(()=>{H(f)&&F(h,r()?.currentSlugs[t.locale]??``,!0)}),B(()=>{H(h),Ds(()=>{r()&&Object.entries(r().slugEditor).forEach(([e,n])=>{(t.locale===e||t.locale===H(l)&&n===`readonly`)&&la(h4,Ds(r).currentSlugs[e]=H(h),Ds(r))})})});var g=W(),_=L(g),v=e=>{Y6(e,{children:(e,t)=>{var r=pCe(),i=L(r),a=I(i),o=R(a,!0),s=z(a,2),c=e=>{var t=dCe();V(e=>Y(t,`aria-label`,e),[()=>Z(`required`)]),G(e,t)};q(s,e=>{H(d)&&e(c)}),D(i);var l=z(i,2),u=e=>{Z6(e,{get id(){return`${n}-error`},children:(e,t)=>{var n=fCe(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`edit_slug_error.empty`)]),G(e,t)};q(r,e=>{H(p)?.valueMissing&&e(i)});var a=z(r,2),o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`edit_slug_error.invalid`)]),G(e,t)};q(a,e=>{H(p)?.patternMismatch&&e(o)}),G(e,n)},$$slots:{default:!0}})};q(l,e=>{H(m)&&e(u)});var g=z(l,2);fm(I(g),{dir:`auto`,flex:!0,get readonly(){return H(f)},get required(){return H(d)},get invalid(){return H(m)},get"aria-labelledby"(){return`${n}-label`},get"aria-errormessage"(){return`${n}-error`},get value(){return H(h)},set value(e){F(h,e,!0)}}),D(g),V(e=>{Y(a,`id`,`${n}-label`),K(o,e)},[()=>Z(`slug`)]),G(e,r)},$$slots:{default:!0}})};q(_,e=>{r()&&e(v)}),G(e,g),k(),a()}var hCe=U(`<!> <!>`,1);function gCe(e,t){O(t,!0);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>n()?.fields??[]);Vj(e,{children:(e,r)=>{var i=hCe(),o=L(i),s=e=>{mCe(e,{get locale(){return t.locale}})};q(o,e=>{n()?.slugEditor[t.locale]&&e(s)}),Cc(z(o,2),17,()=>H(a),e=>e.name,(e,n)=>{Vj(e,{children:(e,r)=>{U5(e,{get keyPath(){return H(n).name},get typedKeyPath(){return H(n).name},get locale(){return t.locale},get fieldConfig(){return H(n)}})},$$slots:{default:!0}})}),G(e,i)},$$slots:{default:!0}}),k(),i()}var _Ce=U(`<iframe class="preview svelte-1k58u5t" sandbox="allow-same-origin allow-scripts allow-popups allow-forms"></iframe>`),vCe={hash:`svelte-1k58u5t`,code:`iframe.svelte-1k58u5t {display:block;border:none;width:100%;height:100%;}`};function W5(e,t){O(t,!0),J(e,vCe);let n=P(!1),r=P(void 0),i=P(void 0),a=()=>`
|
||
<!DOCTYPE html>
|
||
<html lang="${NB(t.locale)}">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<base href="${NB(window.location.origin)}" target="_blank">
|
||
${t.styleURLs.map(e=>`<link rel="stylesheet" href="${NB(e)}">`).join(`
|
||
`)}
|
||
</head>
|
||
<body></body>
|
||
</html>
|
||
`,o=()=>{let e=H(r)?.contentDocument?.body;e&&oc(Rf,{target:e,props:{children:t.children}})},s=()=>{let{contentDocument:e,contentWindow:n}=H(r)??{};if(H(i)&&t.reactComponent&&t.reactProps&&e&&n){let r={...t.reactProps,document:e,window:n};H(i).render((0,ar.createElement)(t.reactComponent,r))}},c=()=>{let e=H(r)?.contentDocument?.body;e&&t.reactComponent&&F(i,(0,Q6.createRoot)(e),!0)},l=()=>{if(!H(r)||H(n))return;let e=t.reactComponent?c:o,i=URL.createObjectURL(new Blob([a()],{type:`text/html`}));H(r).addEventListener(`load`,()=>{e(),URL.revokeObjectURL(i),F(n,!0)},{once:!0}),H(r).src=i};B(()=>{H(r)&&!H(n)&&l()}),B(()=>{H(n)&&H(i)&&t.reactComponent&&t.reactProps&&s()}),B(()=>()=>{H(i)?.unmount()});var u=_Ce();Ol(u,e=>F(r,e),()=>H(r)),V(e=>Y(u,`title`,e),[()=>Z(`content_preview`)]),G(e,u),k()}var yCe=({locale:e,getFieldArgs:t})=>(n,r)=>oc(g5,{target:n,props:{keyPath:r,typedKeyPath:``,locale:e,fieldConfig:YB({...t,keyPath:r}),showLabel:!1}}),bCe=e=>t=>{let n;return(0,ar.createElement)(`div`,{ref:r=>{r?n=e(r,t):n&&uc(n)}})},G5=(e,t,n)=>a0(Object.fromEntries(Object.keys(e).map(e=>[e,n(`${t}.${e}`)]))),xCe=(e,t)=>n=>{let r=e[n];return r==null?r:Array.isArray(r)?r.map((e,r)=>{let i=typeof e==`object`&&!!e;return a0({data:F2(e),widgets:i?G5(e,`${n}.${r}`,t):a0({})})}):typeof r==`object`?a0({data:F2(r),widgets:G5(r,n,t)}):r},SCe=async(e,t)=>{let n=HL(e);if(!n)throw Error(`Collection "${e}" not found`);let{defaultLocale:r}=n._i18n,i=pB(e),a={locale:r,collectionName:e,associatedAssets:z2({collectionName:e})},o=e=>R2({...a,entry:e});return t?o(i.find(e=>e.slug===t)):i.map(o)},CCe=({draft:e,locale:t})=>{let{entryMap:n,valueMap:r,getFieldArgs:i,fieldsMetaData:a,getAsset:o}=B2({draft:e,locale:t}),s=bCe(yCe({locale:t,getFieldArgs:i}));return{entry:n,widgetFor:s,widgetsFor:xCe(rR(r),s),getAsset:o,getCollection:SCe,fieldsMetaData:a}},wCe=U(`<div role="document" class="svelte-17akd4q"><!></div>`),TCe={hash:`svelte-17akd4q`,code:`div.svelte-17akd4q {--entry-preview-padding-block: 8px;--entry-preview-padding-inline: 16px;padding-block:var(--entry-preview-padding-block);padding-inline:var(--entry-preview-padding-inline);}`};function ECe(e,t){O(t,!0),J(e,TCe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=e=>{var n=W();Cc(L(n),17,()=>H(l),e=>e.name,(e,n)=>{Vj(e,{children:(e,r)=>{g5(e,{get keyPath(){return H(n).name},get typedKeyPath(){return H(n).name},get locale(){return t.locale},get fieldConfig(){return H(n)}})},$$slots:{default:!0}})}),G(e,n)},o=N(()=>n()??{}),s=N(()=>H(o).collectionName),c=N(()=>H(o).fileName),l=N(()=>wr(H(o).fields,()=>[],!0)),u=N(()=>[...oL]),d=N(()=>sL.get(H(c)??H(s))),f=N(()=>n()&&H(d)?CCe({draft:Ni(n()),locale:t.locale}):void 0);Vj(e,{children:(e,n)=>{var r=W(),i=L(r),o=e=>{W5(e,{get locale(){return t.locale},get styleURLs(){return H(u)},get reactComponent(){return H(d)},get reactProps(){return H(f)}})},s=e=>{W5(e,{get locale(){return t.locale},get styleURLs(){return H(u)},get children(){return a}})},c=e=>{var t=wCe(),n=I(t);a(n),D(t),V(e=>Y(t,`aria-label`,e),[()=>Z(`content_preview`)]),G(e,t)};q(i,e=>{H(d)&&H(f)?e(o):H(u).length?e(s,1):e(c,-1)}),G(e,r)},$$slots:{default:!0}}),k(),i()}var K5=na(),q5={},DCe=async({repository:e})=>{let{databaseName:t}=e??{},n=t?new UA(t,`ui-settings`):null,r=`entry-view`,i={showSecondPane:!0,showPreview:!0,syncScrolling:!0,selectAssetsView:{type:`grid`},...await n?.get(r)};K5.set(i),kY.set(i.selectAssetsView),q5.entryEditorSettingsUnsubscribe?.(),q5.selectAssetsViewUnsubscribe?.(),q5.entryEditorSettingsUnsubscribe=K5.subscribe(e=>{(async()=>{try{(0,HH.default)(e,await n?.get(r))||await n?.set(r,e)}catch{}})()}),q5.selectAssetsViewUnsubscribe=kY.subscribe(e=>{if(!e||!Object.keys(e).length)return;let t=A(K5)?.selectAssetsView??{};(0,HH.default)(e,t)||K5.update(t=>({...t,selectAssetsView:e}))})};nY.subscribe(e=>{e&&!A(K5)&&DCe(e)});var OCe=U(`<div role="none" class="content svelte-1vy4qxn"><!></div>`),kCe=U(`<span role="alert"> </span> <!>`,1),ACe=U(`<div role="none" class="wrapper svelte-1vy4qxn"><!></div>`),jCe={hash:`svelte-1vy4qxn`,code:`.wrapper.svelte-1vy4qxn {display:contents;}.content.svelte-1vy4qxn {--field-editor-padding: 16px;flex:auto;overflow-y:auto;scroll-behavior:auto; /* Don’t use smooth scroll for syncing */overscroll-behavior-y:contain;
|
||
|
||
@media (width < 768px) {--field-editor-padding: 12px;
|
||
}}`};function J5(e,t){O(t,!0),J(e,jCe);let n=()=>j(K5,`$entryEditorSettings`,a),r=()=>j(t.thisPane,`$thisPane`,a),i=()=>j(h4,`$entryDraft`,a),[a,o]=sa(),s=X(t,`thisPaneContentArea`,15),c=X(t,`thatPaneContentArea`,15),l=N(()=>n()??{}),u=N(()=>H(l).syncScrolling),d=N(()=>r()?.locale),f=N(()=>r()?.mode),p=N(()=>!!H(d)&&!!i()?.currentValues[H(d)]),m=N(()=>({values:{locale:H(d)?xL(H(d))??H(d):``}})),h=N(()=>H(f)===`preview`?ECe:gCe),g=P(void 0),_=()=>{window.requestAnimationFrame(()=>{if(!H(u)||!H(g)||!s()||!c())return;let{x:e,y:t}=s()===H(g)?s().getBoundingClientRect():{x:0,y:0},{ownerDocument:n,scrollTop:r,scrollHeight:i,clientHeight:a}=s(),o=r/(i-a),l=n.elementsFromPoint(e+80,t).findLast(e=>e.matches(`[data-key-path]`));if(!l){c(c().scrollTop=c().scrollHeight*o,!0);return}let{keyPath:d}=l.dataset,{top:f,height:p}=l.getBoundingClientRect(),m=(t-f)/p,h=c().querySelector(`[data-key-path="${CSS.escape(d??``)}"]`);m<0||m>1||!h||c(c().scrollTop=h.offsetTop-t+h.clientHeight*m,!0)})},v={capture:!0,passive:!0},y=async()=>{if(!H(g))return;s()&&(s().removeEventListener(`wheel`,_,v),s().removeEventListener(`touchmove`,_,v));let e=H(g).querySelector(`iframe.preview`);e?(await vf(250),s(e?.contentDocument?.firstElementChild)):s(H(g)),s()&&(s(s().scrollTop=0,!0),s().addEventListener(`wheel`,_,v),s().addEventListener(`touchmove`,_,v))};B(()=>{r()?.mode,H(g),y()});var b=ACe(),x=I(b),S=e=>{var t=OCe();jc(I(t),()=>H(h),(e,t)=>{t(e,{get locale(){return H(d)}})}),D(t),Ol(t,e=>F(g,e),()=>H(g)),G(e,t)},C=e=>{zj(e,{children:(e,t)=>{var n=kCe(),r=L(n),i=R(r,!0),a=z(r,2);{let e=N(()=>Z(H(p)?`reenable_x_locale`:`enable_x_locale`,H(m)));$f(a,{variant:`tertiary`,get label(){return H(e)},onclick:()=>{H(d)&&z3(H(d))}})}V(e=>K(i,e),[()=>Z(H(p)?`locale_x_now_disabled`:`locale_x_has_been_disabled`,H(m))]),G(e,n)},$$slots:{default:!0}})};q(x,e=>{H(d)&&i()?.currentLocales[H(d)]?e(S):H(f)===`edit`&&e(C,1)}),D(b),V(()=>Y(b,`id`,t.id)),G(e,b),k(),o()}var MCe=U(`<!> <!>`,1),NCe=U(`<div role="none" class="inner svelte-1ibgz0y"><!> <!></div>`),PCe=U(`<div role="none" class="wrapper svelte-1ibgz0y"><!></div>`),FCe={hash:`svelte-1ibgz0y`,code:`.wrapper.svelte-1ibgz0y {display:contents;.combobox {
|
||
@media (width < 1024px) {min-width:128px;--sui-textbox-height: 32px;--sui-button-medium-height: 32px;
|
||
}&.error [role='combobox'] {border-color:var(--sui-error-border-color);}}}.inner.svelte-1ibgz0y {display:contents;:is(.error, .error button[data-mode='edit']) {color:var(--sui-error-foreground-color) !important;}}`};function ICe(e,t){O(t,!0),J(e,FCe);let n=()=>j(h4,`$entryDraft`,o),r=()=>j(c(),`$thatPane`,o),i=()=>j(t.thisPane,`$thisPane`,o),a=()=>j(K5,`$entryEditorSettings`,o),[o,s]=sa(),c=X(t,`thatPane`,19,()=>na(null)),l=N(()=>n()?.collection),u=N(()=>n()?.collectionFile),d=N(()=>(H(u)??H(l))?._i18n??ML),f=N(()=>H(d).allLocales),p=N(()=>zV.isSmallScreen||zV.isMediumScreen?[...H(f)]:H(f).filter(e=>r()?.mode!==`edit`||r().locale!==e)),m=N(()=>Object.entries(n()?.validities??{}).some(([e,t])=>H(p).includes(e)&&Object.values(t??{}).some(({valid:e})=>!e))),h=N(()=>n()?.canPreview??!0),g=N(()=>zV.isSmallScreen||zV.isMediumScreen||H(f).length>=5),_=N(()=>H(g)?Km:jp),v=N(()=>H(g)?bm:Np),y=N(()=>H(g)?void 0:`tertiary`),b=N(()=>H(g)?void 0:`small`),x=N(()=>i()?.mode===`edit`?i().locale:i()?.mode===`preview`?`preview`:void 0);var S=PCe(),C=I(S);{let e=N(()=>H(m)&&H(g)?`error`:void 0),o=N(()=>Z(`switch_locale`)),s=N(()=>t.id.replace(`-header`,`-body`));jc(C,()=>H(_),(l,u)=>{u(l,{get value(){return H(x)},get class(){return H(e)},get"aria-label"(){return H(o)},get"aria-controls"(){return H(s)},children:(e,o)=>{var s=NCe(),l=I(s);Cc(l,16,()=>H(p),e=>e,(e,a)=>{let o=N(()=>xL(a)??a),s=N(()=>!n()?.currentLocales[a]),l=N(()=>Object.values(n()?.validities[a]??{}).some(({valid:e})=>!e));var u=W(),d=L(u);{let e=e=>{var t=W(),n=L(t),r=e=>{Rl(e,{name:`edit_off`})},i=e=>{Rl(e,{name:`error`})};q(n,e=>{H(s)?e(r):H(l)&&e(i,1)}),G(e,t)},n=N(()=>H(o)),u=N(()=>H(s)?Z(`locale_content_disabled_short`):H(l)?Z(`locale_content_error_short`):``),f=N(()=>i()?.mode===`edit`&&i().locale===a),p=N(()=>H(l)?`error`:``);jc(d,()=>H(v),(i,s)=>{s(i,{get variant(){return H(y)},get size(){return H(b)},get label(){return H(o)},get value(){return a},get"aria-label"(){return`${H(n)??``} ${H(u)??``}`},get selected(){return H(f)},get class(){return H(p)},"data-mode":`edit`,onSelect:()=>{M(t.thisPane,{mode:`edit`,locale:a}),r()?.mode===`preview`&&M(c(),{mode:`preview`,locale:a})},startIcon:e,$$slots:{startIcon:!0}})})}G(e,u)});var u=z(l,2),d=e=>{var n=MCe(),a=L(n),o=e=>{Hp(e,{})};q(a,e=>{H(g)&&e(o)});var s=z(a,2);{let e=N(()=>Z(`preview`)),n=N(()=>i()?.mode===`preview`);jc(s,()=>H(v),(i,a)=>{a(i,{get variant(){return H(y)},get size(){return H(b)},get label(){return H(e)},value:`preview`,get selected(){return H(n)},"data-mode":`preview`,onSelect:()=>{M(t.thisPane,{mode:`preview`,locale:r()?.locale??``})}})})}G(e,n)};q(u,e=>{r()?.mode===`edit`&&H(h)&&a()?.showPreview&&e(d)}),D(s),G(e,s)},$$slots:{default:!0}})})}D(S),G(e,S),k(),s()}function Y5(e,t){O(t,!0);let n=()=>j(t.thisPane,`$thisPane`,r),[r,i]=sa();{let r=e=>{Rl(e,{name:`visibility`})},i=N(()=>Z(`preview`)),a=N(()=>n()?.mode===`preview`);$f(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return H(i)},get pressed(){return H(a)},onclick:()=>{M(t.thisPane,{mode:n()?.mode===`preview`?`edit`:`preview`,locale:n()?.locale??``})},startIcon:r,$$slots:{startIcon:!0}})}k(),i()}var LCe=(e,t)=>e===`error`||!t||t===`unknown`?e:t===`ready`?`ready`:e===`ready`?`pending`:e,RCe=({entry:e,locale:t,collection:n,collectionFile:r,pullRequest:i,deployments:a,productionSHA:o,pollTimedOut:s=!1})=>{let c=i=>oce(e,t,n,r,{baseURL:i});if(i){let e=i.headSHA?a[i.headSHA]:void 0,t=e?.url?c(e.url):void 0;if(e&&t)return{url:t,state:e.state,isDeployPreview:!0,awaitingPreview:!1,pingable:!0};let n=c();if(!n)return;let r=e?.state??`unknown`;return{url:n,state:r,isDeployPreview:!1,awaitingPreview:!s&&(r===`checking`||r===`pending`),pingable:!1}}let l=o?a[o]:void 0,u=c()??c(l?.url);if(u)return{url:u,state:l?.state??`unknown`,isDeployPreview:!1,awaitingPreview:!1,pingable:!0}},zCe=U(`<div role="none" class="icon-wrapper svelte-13aw5dy"><!></div>`),BCe={hash:`svelte-13aw5dy`,code:`.icon-wrapper.svelte-13aw5dy {display:contents;& .spinning {
|
||
animation: svelte-13aw5dy-spin 1.6s linear infinite;}
|
||
|
||
@media (prefers-reduced-motion: reduce) {& .spinning {
|
||
animation: none;}
|
||
}}
|
||
|
||
@keyframes svelte-13aw5dy-spin {
|
||
to {
|
||
transform: rotate(360deg);
|
||
}
|
||
}`};function X5(e,t){O(t,!0),J(e,BCe);let n=()=>j(FG,`$deployments`,o),r=()=>j(IG,`$productionSHA`,o),i=()=>j(RG,`$deployPollTimedOut`,o),a=()=>j(qY,`$pageLiveness`,o),[o,s]=sa(),c=X(t,`as`,3,`button`),l=X(t,`variant`,3,`ghost`),u=X(t,`size`,3,`medium`),d=X(t,`iconic`,3,!1),f=N(()=>RCe({entry:t.entry,locale:t.locale,collection:t.collection,collectionFile:t.collectionFile,pullRequest:t.pullRequest,deployments:n(),productionSHA:r(),pollTimedOut:i()})),p=N(()=>H(f)?.url),m=N(()=>H(f)?LCe(H(f).state,H(p)?a()[H(p)]:void 0):void 0),h=N(()=>H(f)?.isDeployPreview??!1),g=N(()=>H(f)?.pingable??!1),_=N(()=>H(f)?.awaitingPreview??!1),v=N(()=>H(_)||!H(p)||H(h)&&H(m)===`error`),y=N(()=>H(_)?Z(`deploy_preview.awaiting`):H(h)?Z(`deploy_preview.view`):Z(`view_on_live_site`)),b=N(()=>H(m)===`error`?Z(`deploy_preview.failed`):H(m)===`checking`?Z(`deploy_preview.checking`):H(m)===`pending`?Z(`deploy_preview.building`):void 0),x=()=>{H(p)&&AY(H(p))};B(()=>{let e=H(g),t=H(p);e&&t&&QY(t)});var S=W(),C=L(S),w=e=>{var t=W(),n=L(t),r=e=>{Sm(e,{get label(){return H(y)},get disabled(){return H(v)},get"aria-description"(){return H(b)},onclick:x})},i=e=>{{let t=e=>{var t=zCe(),n=I(t);{let e=N(()=>H(_)?`spinning`:void 0),t=N(()=>H(_)?`progress_activity`:`open_in_new`);Rl(n,{get class(){return H(e)},get name(){return H(t)}})}D(t),G(e,t)},n=N(()=>d()?void 0:H(y)),r=N(()=>d()?H(y):void 0);$f(e,{get variant(){return l()},get size(){return u()},get iconic(){return d()},get label(){return H(n)},get"aria-label"(){return H(r)},get disabled(){return H(v)},get"aria-description"(){return H(b)},onclick:x,endIcon:t,$$slots:{endIcon:!0}})}};q(n,e=>{c()===`menuitem`?e(r):e(i,-1)}),G(e,t)};q(C,e=>{H(f)&&e(w)}),G(e,S),k(),s()}var VCe=3,Z5=0,Q5=0,$5=0,e7=0,t7=void 0,n7=``,r7=0,i7=()=>{let e=A(FG);return A(vX).every(({sha:t})=>{let n=e[t]?.state;return n===`ready`||n===`error`||n===`unknown`&&e7>=VCe})},a7=()=>A(vX).map(({sha:e})=>e).join(`,`),o7=()=>{globalThis.clearTimeout(Z5),Z5=0,r7+=1},s7=()=>{o7(),gX()},c7=()=>{if(!Q5||!yX()||i7()){KH.devModeEnabled&&console.info(`deployPreview: not re-checking`,{watchers:Q5,canResolve:yX(),settled:i7(),attempts:e7}),s7();return}if(Date.now()-$5>6e5){RG.set(!0),s7();return}let e=r7;Z5=globalThis.setTimeout(async()=>{Z5=0,e7+=1,await SX({pendingOnly:!0}),e===r7&&c7()},GY)},l7=()=>{o7(),e7=0,$5=Date.now(),RG.set(!1),yX()&&xX(),c7()},u7=()=>{Q5+=1,Q5===1&&(n7=a7(),t7=vX.subscribe(()=>{let e=a7();e!==n7&&(n7=e,l7())}),l7());let e=!1;return()=>{e||(e=!0,--Q5,Q5||(t7?.(),t7=void 0,s7()))}},d7=async()=>{o7(),RG.set(!1),await SX({force:!0}),l7()},f7=U(`<!> <!>`,1),HCe=U(`<h3 role="none"> </h3>`),p7=U(`<!> <!> <!> <!>`,1),UCe=U(`<!> <!> <!>`,1),WCe=U(`<div role="none" class="header svelte-uj56is"><!></div>`),GCe={hash:`svelte-uj56is`,code:`.header.svelte-uj56is {flex:none !important;& > .sui.toolbar {margin-inline:auto;max-width:800px;
|
||
|
||
@media (width < 768px) {padding:0;
|
||
}h3 {margin:0 8px;font-size:var(--sui-font-size-default);}}}`};function m7(e,t){O(t,!0),J(e,GCe);let n=()=>j(h4,`$entryDraft`,c),r=()=>j(t.thisPane,`$thisPane`,c),i=()=>j(nX,`$workflowEnabled`,c),a=()=>j(rX,`$unpublishedEntries`,c),o=()=>j(RG,`$deployPollTimedOut`,c),s=()=>j(nY,`$backend`,c),[c,l]=sa(),u=X(t,`thatPane`,19,()=>na(null)),d=N(()=>n()?.collection),f=N(()=>n()?.collectionFile),p=N(()=>n()?.originalEntry),m=N(()=>n()?.originalValues??{}),h=N(()=>(H(f)??H(d))?._i18n??ML),g=N(()=>H(h).i18nEnabled),_=N(()=>H(h).saveAllLocales),v=N(()=>H(h).allLocales),y=N(()=>H(h).defaultLocale),b=N(()=>n()?.currentLocales[r()?.locale??``]),x=N(()=>Object.values(n()?.currentLocales??{}).filter(e=>e).length===1),S=N(()=>H(g)?H(v).filter(e=>e!==r()?.locale):[]),C=N(()=>!!H(S).length),w=N(()=>lX(n()?.originalEntry)),T=N(()=>r()?.locale&&!(0,HH.default)(H(m)[r().locale],jpe(q6(n(),r().locale)))),E=N(()=>n()?.canPreview??!0),ee=N(()=>i()&&n()?.collectionName&&H(p)?bq({collectionName:n().collectionName,slug:n().fileName??H(p).slug}):void 0),te=N(()=>H(ee)?a().find(({workflow:e})=>e.pullRequest.branch===H(ee))?.workflow.pullRequest:void 0);var ne=WCe(),re=I(ne);{let e=N(()=>Z(`secondary`));Mj(re,{variant:`secondary`,get"aria-label"(){return H(e)},children:(e,i)=>{var a=UCe(),c=L(a),l=e=>{var n=f7(),r=L(n);ICe(r,{get id(){return t.id},get thisPane(){return t.thisPane},get thatPane(){return u()}});var i=z(r,2),a=e=>{Y5(e,{get thisPane(){return t.thisPane}})};q(i,e=>{(zV.isSmallScreen||zV.isMediumScreen)&&H(E)&&e(a)}),G(e,n)},m=e=>{var t=HCe(),n=R(t,!0);V(e=>K(n,e),[()=>r()?.mode===`preview`?Z(`preview`):Z(`edit`)]),G(e,t)},h=e=>{Y5(e,{get thisPane(){return t.thisPane}})};q(c,e=>{H(g)&&H(v).length>1?e(l):zV.isSmallScreen||zV.isMediumScreen?H(E)&&e(h,2):e(m,1)});var ee=z(c,2);Wp(ee,{flex:!0});var ne=z(ee,2),re=e=>{let t=N(()=>xL(r().locale)??r().locale);var i=f7(),a=L(i),c=e=>{X6(e,{get locale(){return r().locale},get otherLocales(){return H(S)}})};q(a,e=>{H(C)&&e(c)});var l=z(a,2);{let e=e=>{{let i=N(()=>Z(`content_options_x_locale`,{values:{locale:H(t)}}));xm(e,{get"aria-label"(){return H(i)},children:(e,i)=>{var a=p7(),c=L(a),l=e=>{J6(e,{get locale(){return r().locale},get otherLocales(){return H(S)}})};q(c,e=>{H(C)&&r()?.locale&&e(l)});var u=z(c,2);{let e=N(()=>Z(`revert_changes`)),t=N(()=>!H(T));Sm(u,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{B5({locale:r()?.locale})}})}var m=z(u,2),h=e=>{var i=f7(),a=L(i);Hp(a,{});var o=z(a,2);{let e=N(()=>Z(H(b)?`disable_x_locale`:n()?.currentValues[r().locale]?`reenable_x_locale`:`enable_x_locale`,{values:{locale:H(t)}})),i=N(()=>r().locale===H(y)||H(b)&&H(x));Sm(o,{get label(){return H(e)},get disabled(){return H(i)},onclick:()=>{z3(r()?.locale??``)}})}G(e,i)};q(m,e=>{!H(_)&&r()?.locale&&e(h)});var g=z(m,2),v=e=>{var t=p7(),n=L(t);Hp(n,{});var i=z(n,2);X5(i,{as:`menuitem`,get entry(){return H(p)},get locale(){return r().locale},get collection(){return H(d)},get collectionFile(){return H(f)},get pullRequest(){return H(te)}});var a=z(i,2),c=e=>{{let t=N(()=>Z(`deploy_preview.check_again`));Sm(e,{get label(){return H(t)},onclick:()=>{d7()}})}};q(a,e=>{o()&&e(c)});var l=z(a,2),u=e=>{{let t=N(()=>!s()?.repository?.blobBaseURL),n=N(()=>Z(`view_on_x`,{values:{service:s()?.repository?.label},default:Z(`view_in_repository`)}));Sm(e,{get disabled(){return H(t)},get label(){return H(n)},onclick:()=>{H(p)&&r()&&AY(sce(H(p),r().locale))}})}};q(l,e=>{KH.devModeEnabled&&e(u)}),G(e,t)};q(g,e=>{H(p)&&H(d)&&r()&&e(v)}),G(e,a)},$$slots:{default:!0}})}},i=N(()=>Z(`show_content_options_x_locale`,{values:{locale:H(t)}}));Ip(l,{variant:`ghost`,iconic:!0,get disabled(){return H(w)},popupPosition:`bottom-right`,get"aria-label"(){return H(i)},popup:e,$$slots:{popup:!0}})}G(e,i)};q(ne,e=>{r()?.mode===`edit`&&e(re)}),G(e,a)},$$slots:{default:!0}})}D(ne),V(()=>Y(ne,`id`,t.id)),G(e,ne),k(),l()}var KCe=U(`<section role="group" class="panel svelte-1bq1or9"><header class="svelte-1bq1or9"><h3 class="svelte-1bq1or9"> </h3> <!></header> <div class="svelte-1bq1or9"><!></div></section>`),qCe={hash:`svelte-1bq1or9`,code:`section.svelte-1bq1or9 {overflow:hidden;height:100%;display:flex;flex-direction:column;}header.svelte-1bq1or9 {flex:none;display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--sui-secondary-border-color);padding:0 16px;height:var(--sui-primary-toolbar-size);}h3.svelte-1bq1or9 {flex:auto;font-size:var(--sui-font-size-x-large);}div.svelte-1bq1or9 {flex:auto;overflow:auto;h4 {display:flex;align-items:center;padding:12px 12px 8px;font-size:var(--sui-font-size-large);}& > .empty {padding:16px;}.empty {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.sui.button.ref {display:flex;justify-content:flex-start;gap:8px;padding:8px;width:-moz-available;width:-webkit-fill-available;width:stretch;height:auto;}}`};function h7(e,t){let n=tc();J(e,qCe);let r=X(t,`actions`,3,void 0),i=X(t,`children`,3,void 0);var a=KCe(),o=I(a),s=I(o),c=R(s,!0);Ac(z(s,2),()=>r()??br),D(o);var l=z(o,2);Ac(I(l),()=>i()??br),D(l),D(a),V(()=>{Y(a,`aria-labelledby`,`panel-${n}-label`),Y(s,`id`,`panel-${n}-label`),K(c,t.title)}),G(e,a)}var g7=e=>e==null,JCe=({fieldConfig:e,context:t})=>{let n=(t.typedKeyPath??``).replace(/<[^>]+>/g,``)||e.name;if(!n.includes(`*`))return{keyPath:n,valuePattern:void 0};let r=e.multiple?`\\.\\d+`:``;return{keyPath:n,valuePattern:RegExp(`^${NA(n).replace(/\\\*/g,`\\d+`)}${r}$`)}},_7=({content:e,keyPath:t,valuePattern:n,multiple:r=!1})=>n?Object.keys(e).filter(t=>n.test(t)&&!g7(e[t])):r?nR(e,t).filter(t=>!g7(e[t])):g7(e[t])?[]:[t],YCe=e=>_7(e).map(t=>e.content[t]),v7=({fieldConfig:e,entry:t,locale:n})=>jce({locale:n,fieldConfig:e,refEntry:t}).map(({value:e})=>e),y7=({collectionName:e,fileName:t})=>[...rU.relationFields].filter(({fieldConfig:n})=>n.collection===e&&!(t&&n.file&&n.file!==t)).map(e=>{let{fieldConfig:t,context:n}=e,r=n.collection?.name,i=r?HL(r):void 0;if(!i)return;let a=n.collectionFile?.name;return{fieldConfig:t,sourceCollection:i,sourceCollectionFile:a?YI(i,a):void 0,...JCe(e),multiple:!!t.multiple}}).filter(e=>!!e),XCe=({collectionName:e,fileName:t,entry:n})=>y7({collectionName:e,fileName:t}).flatMap(({fieldConfig:e,sourceCollection:t,sourceCollectionFile:r,keyPath:i,valuePattern:a,multiple:o})=>{let s=(r??t)._i18n.defaultLocale,c=new Set(v7({fieldConfig:e,entry:n,locale:s}));if(!c.size)return[];let l=t.name,u=r?.name;return pB(l).filter(e=>e.id!==n.id&&(!u||e.slug===u)).map(n=>{let r=n.locales[s]?.content??Object.values(n.locales)[0]?.content;if(!(!r||!YCe({content:r,keyPath:i,valuePattern:a,multiple:o}).some(e=>c.has(e))))return{collectionName:l,collectionLabel:t.label||l,fieldLabel:e.label||e.name,entry:n,summary:lV(t,n)}}).filter(e=>!!e)}),ZCe=U(`<span class="summary"><bdi> </bdi></span>`),QCe=U(`<section class="collection svelte-1lhuwki" role="group"><h4> </h4> <!></section>`),$Ce=U(`<div class="empty"> </div>`),ewe={hash:`svelte-1lhuwki`,code:`.collection.svelte-1lhuwki {padding:4px;&:not(:first-child) {border-top:2px solid var(--sui-secondary-background-color);}}`};function twe(e,t){O(t,!0),J(e,ewe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>{let e=n();return e?.originalEntry?XCe({collectionName:e.collectionName,fileName:e.fileName,entry:e.originalEntry}):[]}),o=N(()=>{let e=[];return H(a).forEach(t=>{let n=e.find(e=>e.collectionLabel===t.collectionLabel);n?n.items.push(t):e.push({collectionLabel:t.collectionLabel,items:[t]})}),e});{let t=N(()=>Z(`entry_sidebar.backlinks.title`));h7(e,{get title(){return H(t)},children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=W();Cc(L(t),17,()=>H(o),({collectionLabel:e,items:t})=>e,(e,t)=>{let n=()=>H(t).collectionLabel,r=()=>H(t).items;var i=QCe(),a=I(i),o=R(a,!0);Cc(z(a,2),17,r,e=>e.entry.id,(e,t)=>{$f(e,{class:`ref`,variant:`ghost`,onclick:()=>{BY(`/collections/${H(t).collectionName}/entries/${H(t).entry.subPath}`,{transitionType:`forwards`})},children:(e,n)=>{var r=ZCe(),i=R(I(r),!0);D(r),V(()=>K(i,H(t).summary)),G(e,r)},$$slots:{default:!0}})}),D(i),V(()=>K(o,n())),G(e,i)}),G(e,t)},s=e=>{var t=$Ce(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`entry_sidebar.backlinks.no_entries`)]),G(e,t)};q(r,e=>{H(a).length>0?e(i):e(s,-1)}),G(e,n)},$$slots:{default:!0}})}k(),i()}var b7=new Map,nwe=async e=>{let{id:t,locales:n}=e,r=b7.get(t);if(r)return r;let i=A(nY);if(!i?.fetchFileCommits)return{commits:[],loading:!1,error:!1};let a=[...new Set(Object.values(n).map(e=>e.path))];try{let e={commits:await i.fetchFileCommits(a),loading:!1,error:!1};return b7.set(t,e),e}catch{let e={commits:[],loading:!1,error:!0};return b7.set(t,e),e}},rwe=e=>{b7.delete(e)},x7=U(`<div class="empty"> </div>`),iwe=U(`<img class="avatar svelte-14rpg2i" alt="" width="24" height="24" loading="lazy"/>`),awe=U(`<span class="avatar placeholder svelte-14rpg2i" aria-hidden="true"></span>`),owe=U(`<!> <span class="details svelte-14rpg2i"><span class="author svelte-14rpg2i"><bdi> </bdi></span> <span class="date svelte-14rpg2i"> </span></span>`,1),swe=U(`<div role="list" class="commits svelte-14rpg2i"></div>`),cwe={hash:`svelte-14rpg2i`,code:`.commits.svelte-14rpg2i {padding:4px;}.avatar.svelte-14rpg2i {flex:none;width:24px;height:24px;border-radius:50%;background-color:var(--sui-secondary-background-color);}.details.svelte-14rpg2i {display:flex;flex-direction:column;gap:2px;overflow:hidden;font-size:var(--sui-font-size-small);}.author.svelte-14rpg2i {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.date.svelte-14rpg2i {color:var(--sui-tertiary-foreground-color);}`};function lwe(e,t){O(t,!0),J(e,cwe);let n=()=>j(h4,`$entryDraft`,i),r=()=>j(nY,`$backend`,i),[i,a]=sa(),o=P(ao([])),s=P(!1),c=P(!1),l=async()=>{let e=n()?.originalEntry;e&&(F(s,!0),await(async e=>{F(o,e.commits,!0),F(c,e.error,!0)})(await nwe(e)),F(s,!1))};Nl(()=>{l()});{let t=N(()=>Z(`entry_sidebar.history.title`));h7(e,{get title(){return H(t)},children:(e,t)=>{var n=W(),i=L(n),a=e=>{var t=x7(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`loading`)]),G(e,t)},l=e=>{var t=x7(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`entry_sidebar.history.fetch_failed`)]),G(e,t)},u=e=>{var t=swe();Cc(t,21,()=>H(o),e=>e.sha,(e,t)=>{let n=N(()=>r()?.repository?.commitBaseURL?`${r().repository.commitBaseURL}/${H(t).sha}`:void 0);{let r=N(()=>!H(n));$f(e,{class:`ref`,variant:`ghost`,role:`link`,get disabled(){return H(r)},onclick:()=>{H(n)&&AY(H(n))},children:(e,n)=>{var r=owe(),i=L(r),a=e=>{var n=iwe();V(()=>Y(n,`src`,H(t).authorAvatarURL)),G(e,n)},o=e=>{G(e,awe())};q(i,e=>{H(t).authorAvatarURL?e(a):e(o,-1)});var s=z(i,2),c=I(s),l=R(I(c),!0);D(c);var u=R(z(c,2),!0);D(s),V(e=>{K(l,H(t).authorName),K(u,e)},[()=>cR(H(t).date,Ud.current)]),G(e,r)},$$slots:{default:!0}})}}),D(t),G(e,t)},d=e=>{var t=x7(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`entry_sidebar.history.no_history`)]),G(e,t)};q(i,e=>{H(s)?e(a):H(c)?e(l,1):H(o).length>0?e(u,2):e(d,-1)}),G(e,n)},$$slots:{default:!0}})}k(),a()}var uwe=(e=A(h4))=>{let{currentLocales:t,currentSlugs:n,slugEditor:r}=e,i={},a=!0;return Object.entries(n).forEach(([e,n])=>{let o=!!t?.[e]&&!!r[e],s=o&&!n?.trim(),c=o&&/[/\s]/.test(n??``),l=s||c;l&&(a=!1),i[e]={_slug:{valueMissing:s,patternMismatch:c,valid:!l}}}),{valid:a,validities:i}},S7=({draft:e,enforceRequired:t=!0})=>{let{valid:n,validities:r,validationMessages:i}=q3(`currentValues`,{enforceRequired:t,draft:e}),{valid:a,validities:o,validationMessages:s}=q3(`extraValues`,{enforceRequired:t,draft:e}),{valid:c,validities:l}=uwe(e);return{valid:n&&a&&c,validities:Object.fromEntries(Object.keys(r).map(e=>[e,{...r[e],...o[e],...l[e]}])),validationMessages:Object.fromEntries(Object.keys(i).map(e=>[e,{...i[e],...s[e]}]))}},C7=({enforceRequired:e=!0}={})=>{let{valid:t,validities:n,validationMessages:r}=S7({draft:A(h4),enforceRequired:e});return h4.update(e=>({...e,validities:n,validationMessages:r})),t},dwe=U(`<h4 class="svelte-mwf2jd"> </h4>`),fwe=U(`<span class="summary svelte-mwf2jd"> </span> <!>`,1),pwe=U(`<div class="empty svelte-mwf2jd"> </div>`),mwe=U(`<section class="locale svelte-mwf2jd" role="group"><!> <!></section>`),hwe=U(`<div class="empty"> </div>`),gwe={hash:`svelte-mwf2jd`,code:`.locale.svelte-mwf2jd {padding:4px;&:not(:first-child) {border-top:2px solid var(--sui-secondary-background-color);}h4:where(.svelte-mwf2jd),
|
||
.empty:where(.svelte-mwf2jd) {margin:0 !important;padding:12px;}.summary:where(.svelte-mwf2jd) {display:block;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-heading-font-weight);}.sui.button.ref {flex-direction:column;align-items:flex-start;gap:4px;}}`};function _we(e,t){O(t,!0),J(e,gwe);let n=()=>j(h4,`$entryDraft`,r),[r,i]=sa(),a=N(()=>n()??{}),o=N(()=>H(a).validationMessages),s=N(()=>H(a).collectionName),c=N(()=>H(a).fileName),l=N(()=>H(a).currentValues),u=N(()=>H(a).isIndexFile),d=N(()=>H(a).validities),f=N(()=>Object.values(H(d)??{}).some(e=>!!Object.keys(e).length)),p=N(()=>({collectionName:H(s),fileName:H(c),currentValues:H(l),isIndexFile:H(u)})),m=P(!1),h=async()=>{let e=n();!e||H(m)||(F(m,!0),await E3(),C7()||f5({collectionName:e.collectionName,fileName:e.fileName,currentValues:e.currentValues}),F(m,!1))};{let t=e=>{{let t=N(()=>Z(`entry_sidebar.validation.validate`)),r=N(()=>!n()||H(m));$f(e,{variant:`tertiary`,size:`small`,get label(){return H(t)},get disabled(){return H(r)},onclick:()=>{h()}})}},r=N(()=>Z(`entry_sidebar.validation.title`));h7(e,{get title(){return H(r)},actions:t,children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=W();Cc(L(t),17,()=>Object.entries(H(o)),([e,t])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1],a=N(()=>H(l)?.[r()]),o=N(()=>xL(r()));var s=mwe(),c=I(s),u=e=>{var t=dwe(),n=R(t,!0);V(()=>K(n,H(o))),G(e,t)};q(c,e=>{H(o)&&e(u)});var f=z(c,2),m=e=>{var t=W();Cc(L(t),16,()=>Object.keys(H(a)),e=>e,(e,t)=>{let n=N(()=>YB({...H(p),valueMap:H(a),keyPath:t})),o=N(()=>i()[t]??[]);var s=W(),c=L(s),l=e=>{$f(e,{class:`ref`,variant:`ghost`,onclick:()=>{p5({locale:r(),keyPath:t})},children:(e,t)=>{var r=fwe(),i=L(r),a=R(i,!0);Cc(z(i,2),17,()=>H(o),yc,(e,t)=>{Z6(e,{live:`off`,children:(e,n)=>{mi();var r=ec();V(()=>K(r,H(t))),G(e,r)},$$slots:{default:!0}})}),V(()=>K(a,H(n)?.label||H(n)?.name)),G(e,r)},$$slots:{default:!0}})};q(c,e=>{H(o).length&&e(l)}),G(e,s)}),G(e,t)},h=N(()=>Object.values(H(d)[r()]).some(e=>e.valid===!1)),g=e=>{var t=pwe(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`entry_sidebar.validation.no_errors_found`)]),G(e,t)};q(f,e=>{H(h)?e(m):e(g,-1)}),D(s),G(e,s)}),G(e,t)},a=e=>{var t=hwe(),n=R(t,!0);V(e=>K(n,e),[()=>Z(`entry_sidebar.validation.placeholder`)]),G(e,t)};q(r,e=>{H(d)&&H(f)?e(i):e(a,-1)}),G(e,n)},$$slots:{actions:!0,default:!0}})}k(),i()}var vwe=U(`<div role="none" class="content svelte-19e8zut" id="entry-sidebar-content"><!></div>`),ywe=U(`<div role="none" class="sidebar svelte-19e8zut"><!> <!></div>`),bwe={hash:`svelte-19e8zut`,code:`.sidebar.svelte-19e8zut {flex:none;display:flex;flex-direction:row-reverse;.tabs {flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;margin:0;padding:8px 0;width:48px;button {border-radius:4px !important;}}}.content.svelte-19e8zut {flex:none;width:320px;margin-inline-start:8px;border-radius:16px 16px 0 0;background-color:var(--sui-primary-background-color);}`};function xwe(e,t){O(t,!0),J(e,bwe);let n=()=>j(h4,`$entryDraft`,a),r=()=>j(nY,`$backend`,a),i=()=>j(K5,`$entryEditorSettings`,a),[a,o]=sa(),s=N(()=>{let e=n()?.collectionName;return!!e&&y7({collectionName:e,fileName:n()?.fileName}).length>0}),c=N(()=>[{key:`validation`,label:Z(`entry_sidebar.validation.title`),icon:`check_circle`,disabled:!1,panel:_we},{key:`history`,label:Z(`entry_sidebar.history.title`),icon:`history`,disabled:!r()?.isGit||!!n()?.isNew,panel:lwe},{key:`backlinks`,label:Z(`entry_sidebar.backlinks.title`),icon:`article_shortcut`,disabled:!H(s),panel:twe}]),l=P(ao(i()?.sidebarPanel??null)),u=N(()=>H(l)?H(c).find(e=>e.key===H(l))??H(c)[0]:null);B(()=>{K5.update((e={})=>({...e,sidebarPanel:H(l)}))});var d=ywe(),f=I(d);{let e=N(()=>Z(`entry_sidebar.sidebar_panels`));jp(f,{class:`tabs`,get"aria-label"(){return H(e)},"aria-controls":`entry-sidebar-content`,children:(e,t)=>{var n=W();Cc(L(n),17,()=>H(c),({key:e,label:t,icon:n,disabled:r})=>e,(e,t)=>{let n=()=>H(t).key,r=()=>H(t).label,i=()=>H(t).icon,a=()=>H(t).disabled;{let t=N(()=>H(u)?.key===n());Np(e,{iconic:!0,get"aria-label"(){return r()},get selected(){return H(t)},get disabled(){return a()},onclick:()=>{F(l,H(l)===n()?null:n(),!0)},children:(e,t)=>{Rl(e,{get name(){return i()}})},$$slots:{default:!0}})}}),G(e,n)},$$slots:{default:!0}})}var p=z(f,2),m=e=>{var t=vwe();jc(I(t),()=>H(u).panel,(e,t)=>{t(e,{})}),D(t),G(e,t)};q(p,e=>{H(u)&&e(m)}),D(d),G(e,d),k(),o()}var Swe=U(`<div role="none" class="svelte-wdavy7"><h3 class="svelte-wdavy7"> </h3></div>`),Cwe=U(`<section class="svelte-wdavy7"><!> <div role="none" class="svelte-wdavy7"><!> <p class="error svelte-wdavy7"><!></p></div></section>`),wwe=U(`<div role="none" class="locales svelte-wdavy7"></div>`),Twe={hash:`svelte-wdavy7`,code:`p.svelte-wdavy7:not(:empty) {margin-top:0;}.locales.svelte-wdavy7 {display:table;margin:0;width:100%;section:where(.svelte-wdavy7) {display:table-row;div:where(.svelte-wdavy7) {display:table-cell;vertical-align:middle;white-space:nowrap;&:last-child {width:90%;}}h3:where(.svelte-wdavy7) {margin-inline-end:8px;font-size:inherit;}p.error:where(.svelte-wdavy7) {margin:0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-small);}}}`};function Ewe(e,t){let n=tc();O(t,!0),J(e,Twe);let r=()=>j(h4,`$entryDraft`,i),[i,a]=sa(),o=X(t,`open`,15,!1),s=N(()=>r()?.collectionName??``),c=N(()=>r()?.currentSlugs??{}),l=N(()=>r()?.originalEntry),u=P(ao([])),d=ao({}),f=ao({}),p=()=>{let e=new Set(Object.values(H(c))),t=new Set([...Object.values(H(l)?.locales??{}).map(({path:e})=>e),...H(l)?.workflow?.previousPaths??[]]);F(u,[...pB(H(s)),...sX(H(s))].filter(e=>!Object.values(e.locales).some(({path:e})=>t.has(e))).flatMap(e=>Object.values(e.locales).map(({slug:e})=>e)).filter(t=>!e.has(t)),!0),Object.assign(d,H(c)),Object.assign(f,Object.fromEntries(Object.keys(H(c)).map(e=>[e,!1])))},m=e=>d[e].trim()?/[/\s]/.test(d[e])?`invalid`:H(u).includes(d[e])?`duplicate`:!1:`empty`;B(()=>{o()&&p()});{let t=N(()=>Z(`edit_slug`)),i=N(()=>Z(`update`)),a=N(()=>(0,HH.default)(H(c),d)||Object.values(f).some(e=>e!==!1));Yp(e,{get title(){return H(t)},get okLabel(){return H(i)},get okDisabled(){return H(a)},onOk:()=>{la(h4,Ds(r).currentSlugs=Object.fromEntries(Object.entries(d).map(([e,t])=>[e,OI(t,{locale:e})])),Ds(r))},get open(){return o()},set open(e){o(e)},children:(e,t)=>{var r=wwe();Cc(r,20,()=>Object.keys(d),e=>e,(e,t)=>{var r=Cwe(),i=I(r),a=e=>{var n=Swe(),r=R(I(n),!0);D(n),V(e=>K(r,e),[()=>xL(t)??t]),G(e,n)},o=N(()=>![`_`,`_default`].includes(t));q(i,e=>{H(o)&&e(a)});var s=z(i,2),c=I(s);{let e=N(()=>f[t]!==!1);fm(c,{dir:`auto`,flex:!0,oninput:()=>{f[t]=m(t)},get invalid(){return H(e)},get"aria-errormessage"(){return`${n}-${t??``}-error`},get value(){return d[t]},set value(e){d[t]=e}})}var l=z(c,2),u=I(l),p=e=>{var n=ec();V(e=>K(n,e),[()=>Z(`edit_slug_error.${f[t]}`)]),G(e,n)};q(u,e=>{f[t]&&e(p)}),D(l),D(s),D(r),V(()=>Y(l,`id`,`${n}-${t??``}-error`)),G(e,r)}),D(r),G(e,r)},$$slots:{default:!0}})}k(),a()}var w7=()=>{let e=A(nY)?.workflow;if(!e)throw Error(`Editorial Workflow is not supported by the current backend`);return e},Dwe=e=>{let{collectionName:t,fileName:n}=e.workflow,r=HL(t);if(r)return{entry:e,collection:r,collectionFile:n?YI(r,n):void 0}},T7=e=>A(rX).find(({workflow:t})=>t.pullRequest.branch===e),E7=e=>{let{branch:t}=e.workflow.pullRequest;rX.update(n=>{let r=n.findIndex(e=>e.workflow.pullRequest.branch===t);return r===-1?[...n,e]:n.with(r,e)})},D7=e=>{rX.update(t=>t.filter(t=>t.workflow.pullRequest.branch!==e))},Owe=async({changes:e,savingEntry:t,savingAssets:n=[],options:r,collectionName:i,fileName:a,slug:o,originalEntry:s})=>{let c=w7(),l=s?.workflow?.pullRequest.branch,u=(l?T7(l):void 0)??T7(bq({collectionName:i,slug:o})),d=u?.workflow.pullRequest.branch??bq({collectionName:i,slug:o}),{commit:f,pullRequest:p}=await c.savePullRequest({changes:e,options:r,branch:d,title:kG(e,r),status:`draft`,pullRequest:u?.workflow.pullRequest}),m=lQ(),{date:h}=f,g=u?.workflow.previousPaths?.length?u.workflow.previousPaths:s?.locales&&Object.values(s.locales).map(({path:e})=>e)||[],_={...t,id:u?.id??t.id,commitAuthor:m,commitDate:h,workflow:{pullRequest:{...p,headSHA:f.sha},status:p.status,collectionName:i,fileName:a,previousPaths:g}},v=n.map(e=>({...e,sha:f.files[e.path]?.sha??e.sha,commitAuthor:m,commitDate:h,workflow:{branch:d}}));return E7(_),TX(v),{commit:{...f,author:m},savedEntries:[_],savedAssets:v}},O7=async(e,t)=>{let n=w7(),{pullRequest:r}=e.workflow;E7({...e,workflow:{...e.workflow,status:t,pullRequest:{...r,status:t}}});let i;try{i=await n.updateStatus(r,t)}catch(t){throw E7(e),t}let a={...e,workflow:{...e.workflow,pullRequest:i,status:t}};return E7(a),a},k7=async e=>{let t=w7(),{pullRequest:n,status:r}=e.workflow,i=r===`pending_deletion`,a=Dwe(e),[o,s]=i?[`preUnpublish`,`postUnpublish`]:[`prePublish`,`postPublish`];a&&await W2({...a,type:o}),await t.publish(n);let{workflow:c,...l}=e,u=new Set([...Object.values(l.locales).map(({path:e})=>e),...c.previousPaths??[]]);JL.update(e=>{let t=e.filter(e=>!Object.values(e.locales).some(({path:e})=>u.has(e)));return i?t:[...t,l]}),D7(n.branch),DX(n.branch),zG([n.headSHA]),CX(),a&&await W2({...a,type:s})},A7=async e=>{let t=w7(),{pullRequest:n}=e.workflow;await t.discard(n),D7(n.branch),EX(n.branch),zG([n.headSHA])},j7=async(e,t,n,r=[])=>{if(A(SG))throw Error(`Cannot delete a published entry as an Open Authoring contributor`,{cause:Error(Z(`open_authoring.direct_commit_unsupported`))});let i=w7(),a=t.name,{slug:o}=e,s=e?.workflow?.pullRequest.branch??bq({collectionName:a,slug:o}),c=T7(s),l=Ij(Object.values(e.locales).map(({path:e})=>e)),u=Ij(r.map(({path:e})=>e)),{pullRequest:d}=await i.savePullRequest({changes:[...l,...u].map(e=>({action:`delete`,slug:o,path:e})),options:{commitType:`delete`,collection:t},branch:s,title:kG([{action:`delete`,slug:o,path:l[0]}],{commitType:`delete`,collection:t}),status:`pending_deletion`,pullRequest:c?.workflow.pullRequest}),f=d.status===`pending_deletion`?d:await i.updateStatus(d,`pending_deletion`),p={...e,workflow:{pullRequest:f,status:f.status,collectionName:a,fileName:n?.name,previousPaths:c?.workflow.previousPaths?.length?c.workflow.previousPaths:l}};return E7(p),p},kwe=async e=>{await Promise.all(e.map(A7))},Awe=async e=>{await zK(e,async({entry:e,collection:t,collectionFile:n,assets:r})=>{await j7(e,t,n,r)})},jwe=`{{fields._slug | localize}}`,M7=({collection:e,collectionFile:t,originalSlugs:n})=>{let r=e._type===`entry`,{allLocales:i,defaultLocale:a}=(t??e)._i18n;if(!r)return Object.fromEntries(i.map(e=>[e,!1]));let{identifier_field:o=`title`,slug:s=`{{${o}}}`}=e,c=s.includes(jwe),l=s.includes(`{{fields._slug}}`)||c;return Object.fromEntries(i.map(e=>!l||n._||n[e]?[e,!1]:[e,e===a||c||`readonly`]))},N7=({collection:e,collectionFile:t,originalEntry:n={},dynamicValues:r,extraValues:i,expanderStates:a,isIndexFile:o=mL(e,n)})=>{let s=e.name,c=t?.name,{id:l,locales:u}=n,d=l===void 0,{fields:f=[],_i18n:p}=t??e,m=o?pL(e):void 0,h=m?.fields??f,g=m?.editor?.preview??t?.editor?.preview??e.editor?.preview??A($H)?.editor?.preview??!0,{allLocales:_,initialLocales:v,defaultLocale:y,canonicalSlug:{key:b}}=p,x=d?v:_.filter(e=>!!u?.[e]?.content),S=Object.fromEntries(_.map(e=>[e,x.includes(e)])),C=d?{}:b in(u?.[y]?.content??{})?Object.fromEntries(_.map(e=>[e,u?.[e]?.slug])):{_:u?.[y].slug},w=Object.fromEntries(x.map(e=>d?[e,I3({fields:h,locale:e,defaultLocale:y,dynamicValues:r})]:[e,structuredClone(u?.[e]?.content)]));return d||nSe({fields:h,contentMap:w,defaultLocale:y}),{id:d?crypto.randomUUID():l,createdAt:Date.now(),isNew:d,isIndexFile:o,canPreview:g,collectionName:s,collection:e,fileName:c,collectionFile:t,fields:h,originalEntry:d?void 0:n,defaultLocale:y,originalLocales:S,currentLocales:structuredClone(S),originalSlugs:C,currentSlugs:structuredClone(C),originalValues:w,currentValues:Object.fromEntries(x.map(e=>[e,Y3({draft:{collectionName:s,fileName:c,isIndexFile:o},locale:e,target:structuredClone(w[e])})])),files:{},extraValues:i??Object.fromEntries(_.map(e=>[e,{}])),validities:Object.fromEntries(_.map(e=>[e,{}])),validationMessages:Object.fromEntries(_.map(e=>[e,{}])),expanderStates:a??{_:{}},slugEditor:M7({collection:e,collectionFile:t,originalSlugs:C})}},P7=e=>{let{collection:t,collectionFile:n,originalEntry:r={}}=e,i=t.name,a=n?.name,{slug:o}=r;gge(),Ape(),h4.set(N7(e)),lX(r)||o_e({collectionName:i,fileName:a,slug:o})},F7=e=>{let t=A(h4);if(t?.originalEntry?.id===e.id){if(C7())return!0;let{collectionName:e,fileName:n,currentValues:r}=t;return f5({collectionName:e,fileName:n,currentValues:r}),!1}let{collectionName:n,fileName:r}=e.workflow,i=HL(n),a=i&&r?YI(i,r):void 0;return!i||r&&!a?!0:S7({draft:N7({collection:i,collectionFile:a,originalEntry:e})}).valid},Mwe=U(`<!> <!> <!>`,1);function Nwe(e,t){O(t,!0);let n=()=>j(CG,`$workflowStages`,r),[r,i]=sa(),a=X(t,`disabled`,3,!1),o=P(!1),s=P(!1),c=P(!1),l=N(()=>t.entry.workflow.status),u=N(()=>Z(bG[H(l)])),d=N(()=>Z(`workflow.entry_status_value`,{values:{status:H(u)}})),f=async e=>{if(!(e===H(l)||H(o))){if(e!==`draft`&&!F7(t.entry)){F(c,!0);return}F(o,!0);try{await O7(t.entry,e)}catch(e){F(s,!0),console.error(e)}finally{F(o,!1)}}};var p=Mwe(),m=L(p);{let e=e=>{{let t=N(()=>Z(`workflow.change_entry_status`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var r=W();Cc(L(r),1,n,e=>e,(e,t)=>{{let n=N(()=>Z(bG[H(t)])),r=N(()=>H(t)===H(l));wm(e,{get label(){return H(n)},get checked(){return H(r)},onChange:()=>{f(H(t))}})}}),G(e,r)},$$slots:{default:!0}})}},t=N(()=>H(o)?Z(`workflow.changing_status`):zV.isLargeScreen?H(d):H(u)),r=N(()=>a()||H(o)),i=N(()=>H(o)?Z(`workflow.changing_status`):H(d));Ip(m,{variant:`ghost`,get label(){return H(t)},get disabled(){return H(r)},popupPosition:`bottom-right`,get"aria-label"(){return H(i)},popup:e,$$slots:{popup:!0}})}var h=z(m,2);Nh(h,{get show(){return H(s)},set show(e){F(s,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.status_change_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(h,2),{get show(){return H(c)},set show(e){F(c,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.status_change_blocked`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,p),k(),i()}var Pwe=U(`<!> <!> <!> <!>`,1);function Fwe(e,t){O(t,!0);let n=()=>j(SG,`$openAuthoring`,r),[r,i]=sa(),a=X(t,`disabled`,3,!1),o=X(t,`modified`,3,!1),s=P(!1),c=P(!1),l=P(!1),u=P(!1),d=N(()=>t.entry.workflow.status===`pending_deletion`),f=N(()=>!n()&&(t.entry.workflow.status===`pending_publish`||H(d))&&HL(t.entry.workflow.collectionName)?.publish!==!1),p=async()=>{if(!H(d)&&!F7(t.entry)){F(u,!0);return}let{collectionName:e}=t.entry.workflow;F(s,!0);try{await k7(t.entry),M(h4,null),UY(`/collections/${e}`)}catch(e){F(l,!0),console.error(e)}finally{F(s,!1)}};var m=Pwe(),h=L(m),g=e=>{{let t=N(()=>Z(H(d)?`delete`:H(s)?`publishing`:`publish`)),n=N(()=>H(d)?Z(`delete_entries`,{values:{count:1}}):Z(`workflow.publish_entry`)),r=N(()=>a()||o()&&!H(d)||H(s));$f(e,{variant:`primary`,get label(){return H(t)},get"aria-label"(){return H(n)},get disabled(){return H(r)},onclick:()=>{F(c,!0)}})}};q(h,e=>{H(f)&&e(g)});var _=z(h,2);{let e=N(()=>H(d)?Z(`delete_entries`,{values:{count:1}}):Z(`workflow.publish_entry`)),t=N(()=>Z(H(d)?`delete`:`publish`));Zp(_,{get title(){return H(e)},get okLabel(){return H(t)},onOk:()=>{p()},get open(){return H(c)},set open(e){F(c,e,!0)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(d)?`workflow.confirm_completing_deletion`:`workflow.confirm_publishing_entry`)]),G(e,n)},$$slots:{default:!0}})}var v=z(_,2);Nh(v,{get show(){return H(l)},set show(e){F(l,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.publishing_entry_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(v,2),{get show(){return H(u)},set show(e){F(u,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.publish_blocked`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,m),k(),i()}var Iwe=({ids:e,assetPaths:t})=>{let n=A(JL),r=new Set(e);if(JL.set(n.filter(e=>!r.has(e.id))),sQ.set({...oQ,deleted:!0,count:e.length}),t.length){let e=new Set(t);dU.update(t=>t.filter(t=>!e.has(t.path)))}},I7=async(e,t=[])=>{let n=A(nY)?.repository?.databaseName,r=n?new UA(n,`file-cache`):void 0,i=[],a=`delete`,o=await Promise.all(e.map(async({id:e,locales:t,slug:n})=>{let o=Ij(Object.values(t).map(e=>e.path));return await Promise.all(o.map(async e=>{let t=await T4({cacheDB:r,previousPath:e});i.push({action:a,slug:n,path:e,previousSha:t})})),e})),s=t.map(({path:e,sha:t})=>(i.push({action:a,path:e,previousSha:t}),e)),{changes:c,savingEntries:l}=await kpe(A(PL),{excludeIds:new Set(e.map(({id:e})=>e)),cacheDB:r});i.push(...c),await fQ({changes:i,savingEntries:l,options:{commitType:`delete`,collection:A(PL)}}),Iwe({ids:o,assetPaths:s})},L7=()=>{let e=A(h4),{collectionName:t,fileName:n,collection:r,collectionFile:i,fields:a,currentValues:o,validities:s,isIndexFile:c}=e,{defaultLocale:l,canonicalSlug:{key:u}}=(i??r)._i18n,d=d4(r),f=K2({collection:r,fields:a});Object.entries(o).forEach(([e,r])=>{delete r[u],J2(r,f),d&&delete r[d];let i={collectionName:t,fileName:n,valueMap:r,isIndexFile:c};Object.keys(r).forEach(t=>{let n=YB({...i,keyPath:t});if(n?.widget===`uuid`&&(e===l||[!0,`translate`].includes(n?.i18n??!1))&&(r[t]=F5(n)),n?.widget===`hidden`){if(Array.isArray(n.default)&&WB.test(t)&&(delete r[t],t=t.replace(WB,``),t in r))return;(e===l||[!0,`translate`].includes(n?.i18n??!1))&&Object.assign(r,M3({fieldConfig:n,keyPath:t,locale:e,defaultLocale:l}))}})}),Object.keys(s).forEach(e=>{s[e]={}}),h4.set({...e,id:crypto.randomUUID(),createdAt:Date.now(),isNew:!0,originalEntry:void 0,originalSlugs:{},currentSlugs:{},slugEditor:M7({collection:r,collectionFile:i,originalSlugs:{}})}),CY.set(!0)},Lwe=({originalEntry:e,savingEntry:t,canonicalSlugKey:n})=>({...e,slug:t.slug,locales:Object.fromEntries(Object.entries(e.locales).map(([e,r])=>{let{slug:i,content:a}=t.locales[e]??{},o=n?a?.[n]:void 0;return[e,{...r,slug:i??r.slug,content:n&&o!==void 0&&r.content?{...r.content,[n]:o}:r.content}]}))}),R7=({fieldConfig:e,originalEntry:t,renamedEntry:n,locale:r})=>{let i={fieldConfig:e,locale:r},a=v7({...i,entry:t}),o=v7({...i,entry:n}),s=new Map;return a.length===o.length&&a.forEach((e,t)=>{e!==o[t]&&s.set(e,o[t])}),s},Rwe=({content:e,relation:t,replacements:n})=>{let{keyPath:r,valuePattern:i,multiple:a}=t,o=_7({content:e,keyPath:r,valuePattern:i,multiple:a}).filter(t=>n.has(e[t]));if(!o.length)return;let s={...e};return o.forEach(t=>{s[t]=n.get(e[t])}),s},zwe=({relation:e,originalEntry:t,renamedEntry:n,targets:r})=>{let{fieldConfig:i,sourceCollection:a,sourceCollectionFile:o}=e,s=o?.name,{allLocales:c}=o?._i18n??a._i18n,l=new Map(c.map(e=>[e,R7({fieldConfig:i,originalEntry:t,renamedEntry:n,locale:e})]));[...l.values()].some(({size:e})=>e>0)&&pB(a.name).filter(e=>e.id!==t.id&&(!s||e.slug===s)).forEach(s=>{let c=r.get(s.id)?.entry??s,u={};Object.entries(c.locales).forEach(([r,a])=>{let{content:o}=a;if(!o)return;let s=wI(l,r,()=>R7({fieldConfig:i,originalEntry:t,renamedEntry:n,locale:r}));if(!s.size)return;let c=Rwe({content:o,relation:e,replacements:s});c&&(u[r]={...a,content:c})}),Object.keys(u).length&&r.set(s.id,{entry:{...c,locales:{...c.locales,...u}},collection:a,collectionFile:o})})},Bwe=async({collection:e,collectionFile:t,originalEntry:n,savingEntry:r,cacheDB:i})=>{let a={changes:[],savingEntries:[]};if(!n||n.slug===r.slug)return a;let o=y7({collectionName:e.name,fileName:t?.name});if(!o.length)return a;let{_i18n:{canonicalSlug:{key:s}}}=t??e,c=Lwe({originalEntry:n,savingEntry:r,canonicalSlugKey:s}),l=new Map;if(o.forEach(e=>{zwe({relation:e,originalEntry:n,renamedEntry:c,targets:l})}),!l.size)return a;let u=l4(i);return{changes:(await Promise.all([...l.values()].map(({entry:e,collection:t,collectionFile:n})=>u4({collection:t,collectionFile:n,entry:e,draft:c4({collection:t,collectionFile:n,isIndexFile:mL(t,e)}),cacheDB:u})))).flat(),savingEntries:[...l.values()].map(({entry:e})=>e)}},Vwe=({skipCI:e,count:t})=>{let n=!A(nX)&&A(eX)&&!(e??A(tX));sQ.set({...oQ,saved:!0,published:n,count:t}),VG(n)},Hwe=e=>{let{collection:t,collectionFile:n,currentValues:r}=e,i=d4(t);if(!i)return;let{defaultLocale:a}=(n??t)._i18n,o=pB(t.name).reduce((e,t)=>{let n=Number(t.locales[a]?.content?.[i]);return Number.isFinite(n)&&n>e?n:e},0)+1;Object.values(r).forEach(e=>{e[i]=o})},Uwe=async({skipCI:e=void 0}={})=>{let t=A(h4),{isNew:n,collection:r,collectionName:i,fileName:a,currentValues:o,originalEntry:s}=t;if(await E3(),!C7({enforceRequired:A3(t)}))throw f5({collectionName:i,fileName:a,currentValues:o}),Error(`validation_failed`);n&&r._type===`entry`&&Hwe(t);let c=$2({draft:t}),{defaultLocaleSlug:l}=c,{savingEntry:u,changes:d,savingAssets:f}=await E4({draft:t,slugs:c}),{changes:p,savingEntries:m}=await Bwe({collection:r,collectionFile:t.collectionFile,originalEntry:s,savingEntry:u});d.push(...p);let h,g={commitType:n?`create`:`update`,collection:r,skipCI:e};try{h=A(nX)?await Owe({changes:d,savingEntry:u,savingAssets:f,options:g,collectionName:i,fileName:a,slug:l,originalEntry:s}):await fQ({changes:d,savingEntries:[u,...m],savingAssets:f,options:g})}catch(e){throw console.error(e.cause??e),Error(`saving_failed`,{cause:e.cause??e})}return await W2({type:`postSave`,entry:u,collection:r,collectionFile:t.collectionFile,isNew:n}),Vwe({skipCI:e,count:1+m.length}),t6(i,n?``:l),s&&rwe(s.id),h.savedEntries[0]},Wwe=U(`<bdi> </bdi> › <bdi> </bdi>`,1),Gwe=U(`<h2 role="none"><!></h2>`),z7=U(`<!> <!>`,1),Kwe=U(`<!> <!> <!> <!>`,1),B7=U(`<!> <!> <!> <!> <!> <!> <!>`,1),qwe=U(`<div role="none" class="error svelte-zjrq31"> </div>`),Jwe=U(` <!>`,1),Ywe=U(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),Xwe={hash:`svelte-zjrq31`,code:`.error.svelte-zjrq31 {margin-top:8px;border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);line-height:1.5;}`};function Zwe(e,t){O(t,!0),J(e,Xwe);let n=()=>j(h4,`$entryDraft`,h),r=()=>j(K5,`$entryEditorSettings`,h),i=()=>j(b4,`$entryDraftModified`,h),a=()=>j(nX,`$workflowEnabled`,h),o=()=>j(rX,`$unpublishedEntries`,h),s=()=>j(JL,`$allEntries`,h),c=()=>j(SG,`$openAuthoring`,h),l=()=>j(wY,`$activeInlineEditors`,h),u=()=>j(eX,`$skipCIConfigured`,h),d=()=>j(tX,`$skipCIEnabled`,h),f=()=>j(Q4,`$collectionState`,h),p=()=>j(RG,`$deployPollTimedOut`,h),m=()=>j(EY,`$copyFromLocaleToast`,h),[h,g]=sa(),_=e=>{var t=W(),n=L(t),r=e=>{{let t=N(()=>H(ke)?.workflow?.pullRequest),n=N(()=>!zV.isLargeScreen),r=N(()=>zV.isSmallScreen?`menuitem`:`button`);X5(e,{get entry(){return H(de)},get locale(){return H(he)},get collection(){return H(ce)},get collectionFile(){return H(ue)},get pullRequest(){return H(t)},get iconic(){return H(n)},get as(){return H(r)}})}};q(n,e=>{!v()&&H(ce)&&H(de)&&e(r)}),G(e,t)},v=X(t,`disabled`,3,!1),y=P(!1),b=P(!1),x=P(!1),S=P(!1),C=P(void 0),w=P(!1),T=P(!1),E=P(!1),ee=P(``),te=P(!1),ne=P(!1),re=P(``),ie=P(void 0),ae=N(()=>n()===void 0),oe=N(()=>n()?.isNew??!0),se=N(()=>n()?.isIndexFile??!1),ce=N(()=>n()?.collection),le=N(()=>H(ce)?._type===`entry`?H(ce):void 0),ue=N(()=>n()?.collectionFile),de=N(()=>n()?.originalEntry),fe=N(()=>(H(ue)??H(ce))?._i18n??ML),pe=N(()=>H(fe).i18nEnabled),me=N(()=>H(fe).allLocales),he=N(()=>H(fe).defaultLocale),ge=N(()=>H(ce)?.name),_e=N(()=>H(ue)?.name),ve=N(()=>Ud.current&&H(ce)?UL(H(ce)):``),ye=N(()=>Ud.current&&H(ce)?UL(H(ce),{useSingular:!0}):``),be=N(()=>n()?.canPreview??!0),xe=N(()=>r()?.showSecondPane??!0),Se=N(()=>H(pe)&&H(me).length>1||H(be)),Ce=N(()=>H(te)||H(ne)),we=N(()=>v()||H(Ce)),Te=N(()=>H(oe)||i()),Ee=N(()=>Object.values(n()?.validities??{}).flatMap(e=>Object.values(e).map(({valid:e})=>!e)).filter(Boolean).length),De=N(()=>H(ge)&&H(de)&&pM({collectionName:H(ge),fileName:H(_e)})?.entryRelative?H2({entry:H(de),collectionName:H(ge),fileName:H(_e),relative:!0}):[]),Oe=N(()=>a()&&H(ge)&&H(de)?bq({collectionName:H(ge),slug:H(_e)??H(de).slug}):void 0),ke=N(()=>H(Oe)?o().find(({workflow:e})=>e.pullRequest.branch===H(Oe)):void 0),Ae=N(()=>H(le)?.delete!==!1),je=N(()=>!!H(ke)&&!!s()&&fX(H(ke))),Me=N(()=>!!H(ke)&&!H(je)),Ne=N(()=>H(Ae)&&(H(Me)||!c())),Pe=N(()=>lX(H(ke)));B(()=>u7());let Fe=()=>{UY(H(ge)===`_singletons`?`/collections`:`/collections/${H(ge)}`)},Ie=async(e,t)=>{let n;F(re,t,!0),F(ne,!0);try{n=await e()}catch(e){F(T,!0),console.error(e);return}finally{F(ne,!1)}n&&sQ.set({...oQ,count:1,...n}),Fe()},Le=async()=>{await Ie(async()=>{if(H(ke)&&!H(je))return await A7(H(ke)),{deleted:!0};if(H(de)&&a()&&H(ce))return await j7(H(de),H(ce),H(ue),H(De)),{deleted:!0,deletionPending:!0};H(de)&&await I7([H(de)],H(De))},`workflow.deleting_entry`)},Re=async()=>{await Ie(async()=>(H(ke)&&await A7(H(ke)),H(Pe)?{deletionCancelled:!0}:{discarded:!0}),H(Pe)?`workflow.cancelling_deletion`:`workflow.discarding_changes`)},ze=()=>{let e=n();return!!e&&S7({draft:e}).valid},Be=()=>new Promise(e=>{F(C,e,!0),F(S,!0)}),Ve=async({skipCI:e=void 0}={})=>{if(F(te,!0),H(ce))try{let t=await Uwe({skipCI:e}),r=t;if(a()&&r.workflow?.status===`draft`&&ze()&&await Be())try{await O7(r,`pending_review`)}catch(e){F(E,!0),F(ee,Z(`workflow.status_change_failed`),!0),console.error(e);return}KH.closeOnSave??!0?(Fe(),M(h4,null)):(H(oe)&&BY(`/collections/${H(ge)}/entries/${H(_e)??t.subPath}`,{replaceState:!0,notifyChange:!1,transitionType:`backwards`}),P7({collection:H(ce),collectionFile:H(ue),originalEntry:t,extraValues:n()?.extraValues,expanderStates:n()?.expanderStates}))}catch(e){e.message===`validation_failed`?F(y,!0):e.message===`saving_failed`?(F(E,!0),F(ee,e.cause?.message??e.message??Z(`unexpected_error`),!0)):(F(E,!0),F(ee,``),console.error(e))}finally{F(te,!1)}};var He=Ywe(),Ue=L(He);{let e=N(()=>Z(`primary`));Mj(Ue,{variant:`primary`,get"aria-label"(){return H(e)},children:(e,t)=>{var i=B7(),o=L(i);{let e=N(()=>Z(`cancel_editing`)),t=N(()=>KH.closeWithEscape&&!l());xQ(o,{get"aria-label"(){return H(e)},get useShortcut(){return H(t)},onclick:()=>{Fe()}})}var s=z(o,2),c=e=>{Wp(e,{flex:!0})},m=e=>{var t=Gwe(),n=I(t),r=e=>{_f(e,{children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`create_entry_title`,{values:{name:H(ye)}})]),G(e,t)},a=e=>{let t=N(()=>H(ue)?XI(H(ue)):H(ce)&&H(de)&&Ud.current?lV(H(ce),H(de)):``);var n=W(),r=L(n),i=e=>{var n=ec();V(()=>K(n,H(t))),G(e,n)},a=e=>{var n=Wwe(),r=L(n),i=R(r,!0),a=R(z(r,2),!0);V(()=>{K(i,H(ve)),K(a,H(t))}),G(e,n)};q(r,e=>{zV.isSmallScreen?e(i):e(a,-1)}),G(e,n)};q(r,e=>{H(oe)?e(i):e(a,-1)}),G(e,n)},$$slots:{default:!0}})};q(n,e=>{H(ae)||e(r)}),D(t),G(e,t)};q(s,e=>{zV.isSmallScreen?e(c):e(m,-1)});var h=z(s,2),g=e=>{_(e)};q(h,e=>{zV.isSmallScreen||e(g)});var y=z(h,2),S=e=>{Nwe(e,{get entry(){return H(ke)},get disabled(){return H(we)}})};q(y,e=>{H(ke)&&!H(Pe)&&e(S)});var C=z(y,2),T=e=>{},E=e=>{{let t=e=>{xm(e,{children:(e,t)=>{{let t=N(()=>Z(d()?`save_and_publish`:`save_without_publishing`));Sm(e,{get label(){return H(t)},onclick:()=>{Ve({skipCI:!d()})}})}},$$slots:{default:!0}})},n=N(()=>Z(d()?H(te)?`saving`:`save`:H(te)?`publishing`:`publish`)),r=N(()=>H(we)||!H(Te));Bp(e,{variant:`primary`,get label(){return H(n)},get disabled(){return H(r)},keyShortcuts:`Accel+S`,onclick:()=>{Ve()},popup:t,$$slots:{popup:!0}})}},ee=e=>{{let t=N(()=>Z(H(te)?`saving`:`save`)),n=N(()=>H(we)||!H(Te));$f(e,{variant:`primary`,get label(){return H(t)},get disabled(){return H(n)},keyShortcuts:`Accel+S`,onclick:()=>{Ve()}})}};q(C,e=>{H(Pe)?e(T):u()&&!a()?e(E,1):e(ee,-1)});var ne=z(C,2),re=e=>{Fwe(e,{get entry(){return H(ke)},get disabled(){return H(we)},get modified(){return H(Te)}})};q(ne,e=>{H(ke)&&e(re)});var fe=z(ne,2);{let e=e=>{{let t=N(()=>Z(`editor_options`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var i=B7(),a=L(i),o=e=>{_(e)};q(a,e=>{zV.isSmallScreen&&e(o)});var s=z(a,2),c=e=>{let t=N(()=>!H(ue)&&!H(se)&&H(le)?.duplicate!==!1&&!f().creationDisabled&&!H(le)?.path);var n=z7(),r=L(n),i=e=>{{let t=N(()=>Z(`duplicate`)),n=N(()=>Z(`duplicate_entry`));Sm(e,{variant:`ghost`,get disabled(){return H(we)},get label(){return H(t)},get"aria-label"(){return H(n)},onclick:()=>{BY(`/collections/${H(ge)}/new`,{replaceState:!0,notifyChange:!1,transitionType:`forwards`}),L7()}})}};q(r,e=>{H(t)&&e(i)});var a=z(r,2),o=e=>{{let t=N(()=>Z(H(Pe)?`workflow.cancel_deletion`:H(je)?`discard`:`delete`)),n=N(()=>H(Pe)?Z(`workflow.cancel_deletion`):H(je)?Z(`workflow.discard_changes`):Z(`delete_entries`,{values:{count:1}}));Sm(e,{variant:`ghost`,get disabled(){return H(we)},get label(){return H(t)},get"aria-label"(){return H(n)},onclick:()=>{H(je)?F(w,!0):F(x,!0)}})}};q(a,e=>{(H(je)||H(Ne)&&!H(ue))&&e(o)}),G(e,n)};q(s,e=>{!v()&&!H(oe)&&e(c)});var l=z(s,2),u=e=>{{let t=N(()=>Z(`delete`));Sm(e,{get label(){return H(t)},onclick:()=>{F(x,!0)}})}};q(l,e=>{H(je)&&H(Ne)&&!H(ue)&&!H(Pe)&&e(u)});var d=z(l,2);{let e=N(()=>Z(`edit_slug`)),t=N(()=>!!H(ue)||H(oe)||H(se)||H(Pe)||H(le)?.delete===!1);Sm(d,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{F(b,!0)}})}var m=z(d,2);{let e=N(()=>Z(`revert_all_changes`)),t=N(()=>!H(Te)||H(Pe));Sm(m,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{B5()}})}var h=z(m,2),g=e=>{var t=z7(),n=L(t);Hp(n,{});var r=z(n,2);{let e=N(()=>Z(`deploy_preview.check_again`));Sm(r,{get label(){return H(e)},onclick:()=>{d7()}})}G(e,t)};q(h,e=>{p()&&e(g)});var y=z(h,2),S=e=>{var t=Kwe(),i=L(t);Hp(i,{});var a=z(i,2);{let e=N(()=>Z(`show_second_pane`)),t=N(()=>!H(Se));Cm(a,{get label(){return H(e)},get checked(){return H(xe)},get disabled(){return H(t)},onChange:()=>{K5.update((e={})=>({...e,showSecondPane:!(e.showSecondPane??!0)}))}})}var o=z(a,2);{let e=N(()=>Z(`show_preview`)),t=N(()=>r()?.showPreview),n=N(()=>!H(xe)||!H(be));Cm(o,{get label(){return H(e)},get checked(){return H(t)},get disabled(){return H(n)},onChange:()=>{K5.update((e={})=>({...e,showPreview:!e.showPreview}))}})}var s=z(o,2);{let e=N(()=>Z(`sync_scrolling`)),t=N(()=>r()?.syncScrolling),i=N(()=>!H(xe)||!H(be)&&Object.keys(n()?.currentValues??{}).length===1);Cm(s,{get label(){return H(e)},get checked(){return H(t)},get disabled(){return H(i)},onChange:()=>{K5.update((e={})=>({...e,syncScrolling:!e.syncScrolling}))}})}G(e,t)};q(y,e=>{zV.isLargeScreen&&e(S)}),G(e,i)},$$slots:{default:!0}})}},t=N(()=>Z(`show_editor_options`));Ol(Ip(fe,{get disabled(){return H(we)},variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(t)},popup:e,$$slots:{popup:!0}}),e=>F(ie,e,!0),()=>H(ie))}G(e,i)},$$slots:{default:!0}})}var We=z(Ue,2);Nh(We,{get show(){return H(y)},set show(e){F(y,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`entry_validation_errors`,{values:{count:H(Ee)}})]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}});var Ge=z(We,2);Nh(Ge,{get id(){return m().id},get show(){return m().show},set show(e){la(EY,Ds(m).show=e,Ds(m))},children:(e,t)=>{let n=N(()=>m());Hl(e,{get status(){return H(n).status},children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`editor.${H(n).message}`,{values:{count:H(n).count,source:H(n).sourceLanguage?xL(H(n).sourceLanguage)??H(n).sourceLanguage:``}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}});var Ke=z(Ge,2);Ewe(Ke,{get open(){return H(b)},set open(e){F(b,e,!0)}});var qe=z(Ke,2);{let e=N(()=>Z(`workflow.send_for_review`)),t=N(()=>Z(`workflow.send_for_review`)),n=N(()=>Z(`later`));Zp(qe,{get title(){return H(e)},get okLabel(){return H(t)},get cancelLabel(){return H(n)},onOk:()=>{H(C)?.(!0)},onClose:()=>{H(C)?.(!1)},get open(){return H(S)},set open(e){F(S,e,!0)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.confirm_sending_for_review`)]),G(e,n)},$$slots:{default:!0}})}var Je=z(qe,2);{let e=N(()=>Z(`delete_entries`,{values:{count:1}})),t=N(()=>Z(`delete`));Zp(Je,{get title(){return H(e)},get okLabel(){return H(t)},onOk:async()=>{await Le()},onClose:()=>{H(ie)?.focus()},get open(){return H(x)},set open(e){F(x,e,!0)},children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`workflow.confirm_deleting_unpublished_entry`)]),G(e,t)},o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`workflow.confirm_deleting_published_entry`)]),G(e,t)},s=e=>{var t=ec();V(e=>K(t,e),[()=>Z(H(De).length?`confirm_deleting_this_entry_with_assets`:`confirm_deleting_this_entry`)]),G(e,t)};q(r,e=>{H(ke)&&!H(je)?e(i):a()?e(o,1):e(s,-1)}),G(e,n)},$$slots:{default:!0}})}var Ye=z(Je,2);{let e=N(()=>Z(H(Pe)?`workflow.cancel_deletion`:`workflow.discard_changes`)),t=N(()=>Z(H(Pe)?`workflow.cancel_deletion`:`discard`));Zp(Ye,{get title(){return H(e)},get okLabel(){return H(t)},onOk:async()=>{await Re()},onClose:()=>{H(ie)?.focus()},get open(){return H(w)},set open(e){F(w,e,!0)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(Pe)?`workflow.confirm_cancelling_deletion`:`workflow.confirm_discarding_entry_changes`)]),G(e,n)},$$slots:{default:!0}})}var Xe=z(Ye,2),Ze=e=>{Nh(e,{get id(){return H(re)},duration:0,get show(){return H(ne)},set show(e){F(ne,e,!0)},children:(e,t)=>{Hl(e,{status:`info`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(re))]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(Xe,e=>{H(re)&&e(Ze)});var Qe=z(Xe,2);Nh(Qe,{get show(){return H(T)},set show(e){F(T,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`deleting_entry_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}});var $e=z(Qe,2);{let e=N(()=>Z(`saving_entry.error.title`));Xp($e,{get title(){return H(e)},onClose:()=>{H(ie)?.focus()},get open(){return H(E)},set open(e){F(E,e,!0)},children:(e,t)=>{mi();var n=Jwe(),r=L(n),i=z(r),a=e=>{var t=qwe(),n=R(t,!0);V(()=>K(n,H(ee))),G(e,t)};q(i,e=>{H(ee)&&e(a)}),V(e=>K(r,`${e??``} `),[()=>Z(`saving_entry.error.description`)]),G(e,n)},$$slots:{default:!0}})}G(e,He),k(),g()}var V7=/^fields\./,H7=e=>{let[t]=e.split(`.`).splice(-2,1);return t&&HB(t)?Number(t):void 0},Qwe=({fieldConfig:e,keyPath:t,locale:n,valueMap:r,collectionName:i,fileName:a,isIndexFile:o=!1})=>{let{value:s=``}=e;if(s===`{{index}}`)return H7(t)??``;let c=CL(n);return dV(s,(e,s)=>{let{value:l,transformations:u}=GI(s);if(l===`index`)return String(H7(t)??``);if(!V7.test(l))return``;let d=$B({collectionName:i,fileName:a,valueMap:r,keyPath:l.replace(V7,``),locale:n,isIndexFile:o});return d=Array.isArray(d)?c.format(d):String(d),u.length?KI({value:d,transformations:u,locale:n}):d})},U7=(e,t,n)=>{let{fields:r}=e;if(r)return r;let{types:i,typeKey:a=`type`}=e;return i?.find(({name:e})=>e===t[`${n}.${a}`])?.fields??[]},W7=new WeakMap,G7=e=>{let t=W7.get(e);if(t!==void 0)return t;let{widget:n=`string`}=e,r=!1;if(n===`compute`)r=!0;else if(n===`object`||n===`list`){let{field:t}=e,{fields:n=[]}=e,{types:i=[]}=e;r=[t,...n,...i.flatMap(({fields:e=[]})=>e)].filter(Boolean).some(G7)}return W7.set(e,r),r},K7=e=>{let{field:t,keyPath:n,valueMap:r,getIndex:i,results:a}=e;if(!G7(t))return;let{widget:o=`string`}=t;if(o===`compute`){a.push({keyPath:n,fieldConfig:t});return}if(o===`object`){if(r[n]===null)return;U7(t,r,n).forEach(t=>{K7({...e,field:t,keyPath:`${n}.${t.name}`})});return}let s=t,{hasSingleSubField:c}=U3(s);Yxe(i(),n).forEach(t=>{let i=`${n}.${t}`;if(c){K7({...e,field:s.field,keyPath:i});return}U7(s,r,i).forEach(t=>{K7({...e,field:t,keyPath:`${i}.${t.name}`})})})},q7=({fields:e,valueMap:t,getIndex:n,keyPathPrefix:r=``})=>{let i=[];return e.forEach(e=>{K7({field:e,keyPath:`${r}${e.name}`,valueMap:t,getIndex:n,results:i})}),i},$we=(e,t)=>{let n=[],r=new Set;return Object.keys(e).forEach(i=>{let[a]=i.match(V3)??[];if(a===void 0||r.has(a))return;r.add(a);let{fields:o}=LB(e[`${a}__sc_component_name`])??{};o&&n.push(...q7({fields:o,valueMap:e,getIndex:t,keyPathPrefix:a}))}),n},eTe=({fieldConfig:e,locale:t,defaultLocale:n,i18nEnabled:r})=>t===n||r&&[!0,`translate`,`duplicate`].includes(e.i18n??!1),tTe=({draft:e,valueStoreKey:t,locale:n,valueMap:r})=>{let{collectionName:i,fileName:a,collection:o,collectionFile:s,fields:c,isIndexFile:l}=e,{i18nEnabled:u,defaultLocale:d}=(s??o)._i18n,f,p=()=>(f??=Jxe(r),f),m=t===`extraValues`?$we(r,p):q7({fields:c,valueMap:r,getIndex:p}),h=!1;return m.forEach(({keyPath:e,fieldConfig:o})=>{if(t!==`extraValues`&&!eTe({fieldConfig:o,locale:n,defaultLocale:d,i18nEnabled:u}))return;let s=Qwe({fieldConfig:o,keyPath:e,locale:n,valueMap:r,collectionName:i,fileName:a,isIndexFile:l});r[e]!==s&&(r[e]=s,h=!0)}),h},nTe=()=>{let e=A(h4);if(!e)return!1;let{currentLocales:t,fields:n}=e,r=!1;return[`currentValues`,`extraValues`].forEach(i=>{i===`currentValues`&&!n.some(G7)||Object.entries(e[i]).forEach(([n,a])=>{!t[n]||!Object.keys(a).length||tTe({draft:e,valueStoreKey:i,locale:n,valueMap:a})&&(r=!0)})}),r&&h4.update(e=>e),r},J7=U(`<!> <!>`,1),Y7=U(`<div class="pane-wrapper svelte-jrunrx"><!></div>`),rTe=U(`<div role="none"> </div>`),iTe=U(`<div role="none"><!></div> <div role="none"><!></div>`,1),aTe=U(`<!> <!> <!>`,1),oTe=U(`<div role="none" class="content-area svelte-jrunrx"><!></div> <!>`,1),sTe=U(`<div role="none" class="body svelte-jrunrx"><!></div>`),cTe=U(`<div role="group" class="wrapper content-editor svelte-jrunrx"><!></div> <!> <!>`,1),lTe={hash:`svelte-jrunrx`,code:`.wrapper.svelte-jrunrx {position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;background-color:var(--sui-secondary-background-color);}.pane-wrapper.svelte-jrunrx {display:contents;& > .pane {flex:auto;height:100%;overflow:hidden;display:flex;flex-direction:column;}}.body.svelte-jrunrx {flex:auto;display:flex;overflow:hidden;}.content-area.svelte-jrunrx {flex:auto;background-color:var(--sui-primary-background-color);&:not(:only-child) {border-start-end-radius:16px; /* sidebar is present */}.sui.resizable-handle {background-color:var(--sui-secondary-background-color); /* same as toolbar */.swap-button {position:absolute;top:calc(50% - 12px);margin:0;border-radius:50%;opacity:0.5;&:hover,
|
||
&:focus-visible {opacity:1;}}}}`};function uTe(e,t){O(t,!0),J(e,lTe);let n=()=>j(h4,`$entryDraft`,d),r=()=>j(K5,`$entryEditorSettings`,d),i=()=>j(Q4,`$collectionState`,d),a=()=>j(DY,`$editorFirstPane`,d),o=()=>j(OY,`$editorSecondPane`,d),s=()=>j(y4,`$entryDraftInteracted`,d),c=()=>j(SY,`$showContentOverlay`,d),l=()=>j(PL,`$selectedCollection`,d),u=()=>j(CY,`$showDuplicateToast`,d),[d,f]=sa(),p=e=>{var t=W(),n=L(t),r=e=>{let t=N(()=>a());var n=Y7(),r=I(n);{let e=N(()=>Z(H(t).mode===`edit`?`edit_x_locale`:`preview_x_locale`,{values:{locale:xL(H(t).locale)??H(t).locale}}));Bj(r,{class:`pane`,get"aria-label"(){return H(e)},get"data-locale"(){return H(t).locale},get"data-mode"(){return H(t).mode},children:(e,t)=>{var n=J7(),r=L(n);m7(r,{id:`first-pane-header`,get thisPane(){return DY},get thatPane(){return OY}}),J5(z(r,2),{id:`first-pane-body`,get thisPane(){return DY},get thisPaneContentArea(){return H(w)},set thisPaneContentArea(e){F(w,e,!0)},get thatPaneContentArea(){return H(T)},set thatPaneContentArea(e){F(T,e,!0)}}),G(e,n)},$$slots:{default:!0}})}D(n),G(e,n)};q(n,e=>{a()&&e(r)}),G(e,t)},m=e=>{var t=W(),n=L(t),r=e=>{let t=N(()=>o());var n=Y7(),r=I(n);{let e=N(()=>Z(H(t).mode===`edit`?`edit_x_locale`:`preview_x_locale`,{values:{locale:xL(H(t).locale)??H(t).locale}}));Bj(r,{class:`pane`,get"aria-label"(){return H(e)},get"data-locale"(){return H(t).locale},get"data-mode"(){return H(t).mode},children:(e,t)=>{var n=J7(),r=L(n);m7(r,{id:`second-pane-header`,get thisPane(){return OY},get thatPane(){return DY}}),J5(z(r,2),{id:`second-pane-body`,get thisPane(){return OY},get thisPaneContentArea(){return H(T)},set thisPaneContentArea(e){F(T,e,!0)},get thatPaneContentArea(){return H(w)},set thatPaneContentArea(e){F(w,e,!0)}}),G(e,n)},$$slots:{default:!0}})}D(n),G(e,n)};q(n,e=>{o()&&e(r)}),G(e,t)},h=X(t,`editorLocale`,3,void 0),g=X(t,`loading`,3,!1),_=!1,v=!1,y=!1,b=0,x=0,S=P(!0),C=P(void 0),w=P(void 0),T=P(void 0),E=N(()=>n()===void 0),ee=N(()=>n()??{}),te=N(()=>wr(H(ee).isNew,!0)),ne=N(()=>wr(H(ee).canPreview,!0)),re=N(()=>H(ee).collection),ie=N(()=>H(ee).collectionName),ae=N(()=>H(ee).collectionFile),oe=N(()=>H(ee).fileName),se=N(()=>H(ee).isIndexFile),ce=N(()=>H(ee).currentValues),le=N(()=>r()??{}),ue=N(()=>H(le).showPreview),de=N(()=>wr(H(le).showSecondPane,!0)),fe=N(()=>(H(ae)??H(re))?._i18n??ML),pe=N(()=>H(fe).i18nEnabled),me=N(()=>H(fe).allLocales),he=N(()=>H(fe).defaultLocale),ge=N(()=>H(ae)?.name?[H(re)?.name,H(ae).name].join(`|`):H(re)?.name),_e=N(()=>i().canCreate),ve=N(()=>i().quota),ye=N(()=>i().creationDisabled),be=N(()=>!a()&&!o()?[0,0,0]:!a()||!o()?[a()?100:0,o()?100:0,0]:typeof a().width==`number`&&typeof o().width==`number`&&a().width>=30&&o().width>=30&&a().width+o().width===100?[a().width,o().width,30]:[50,50,30]),xe=N(()=>Tr(H(be),3)),Se=N(()=>H(xe)[0]),Ce=N(()=>H(xe)[1]),we=N(()=>H(xe)[2]),Te=async()=>{let[e,t]=r()?.paneStates?.[H(ge)??``]??[];return h()&&(e={mode:`edit`,locale:h()},t={mode:`preview`,locale:h()}),_||!e||!t||e.locale&&!H(me).includes(e.locale)||t.locale&&!H(me).includes(t.locale)||!H(de)||(!H(ue)||!H(ne))&&(e.mode===`preview`||t.mode===`preview`)||H(me).length===2&&e.locale!==H(he)?!1:(_=!0,await ws(),M(DY,e),M(OY,zV.isSmallScreen||zV.isMediumScreen?null:t),await ws(),_=!1,!0)},Ee=async()=>{if(!(!n()||v)){if(v=!0,await Te()){v=!1;return}if(M(DY,{mode:`edit`,locale:a()?.locale??H(he)}),zV.isSmallScreen||zV.isMediumScreen||!H(de))M(OY,null);else if(!H(ue)||!H(ne)){let e=H(pe)?H(me).filter(e=>e!==a()?.locale):[];M(OY,e.length?{mode:`edit`,locale:e[0]}:null)}else M(OY,{mode:`preview`,locale:a().locale});v=!1}},De=()=>{!H(re)||_||!a()||!o()||!H(ge)||K5.update((e={})=>({...e,paneStates:{...e.paneStates,[H(ge)]:[a(),o()]}}))},Oe=e=>{y=!0,b=e.clientX,x=e.clientY},ke=e=>{let{detail:t,target:n,clientX:r,clientY:i}=e,s=y;if(y=!1,t===0){if(!n.closest(`.swap-button`))return}else if(!s||Math.abs(r-b)>5||Math.abs(i-x)>5)return;(e=>{var t=Tr(e,2);M(DY,t[0]),M(OY,t[1])})([o(),a()])},Ae=e=>{e.isTrusted&&!s()&&M(y4,!0)},je=async()=>{await ws(),H(C)&&(H(C).tabIndex=0,H(C).focus())},Me=async e=>{let t=a(),n=o();t?.mode===`edit`&&t.locale===e||n?.mode===`edit`&&n.locale===e||(n?.mode===`preview`?M(OY,{mode:`edit`,locale:e}):t?.mode===`preview`?M(DY,{mode:`edit`,locale:e}):M(n?OY:DY,{mode:`edit`,locale:e}),await vf(100))},Ne=async({locale:e,keyPath:t})=>{await Me(e);let n=H(ce)?.[e]??{},r=d5({collectionName:H(ie),fileName:H(oe),valueMap:n,keyPath:t,isIndexFile:H(se)});u5(Object.fromEntries(r.map(e=>[e,!0]))),window.requestAnimationFrame(()=>{let n=document.querySelector(`.content-editor .pane[data-mode="edit"][data-locale="${CSS.escape(e)}"] .field[data-key-path="${CSS.escape(t)}"]`);if(n){typeof n.scrollIntoViewIfNeeded==`function`?n.scrollIntoViewIfNeeded():n.scrollIntoView();let e=n.querySelector(`.field-wrapper`);(e?.querySelector(`[contenteditable="true"], [tabindex="0"]`)??e?.querySelector(`input, textarea, button`))?.focus()}})},Pe=async()=>{let{state:e}=window.history,{locale:t,keyPath:n}=e?.highlight??{};typeof t==`string`&&typeof n==`string`&&t&&n&&(await Ne({locale:t,keyPath:n}),window.history.replaceState({...e,highlight:null},``))},Fe=e=>{e.source===window&&e.data?.type===`highlight-editor-field`&&e.data.payload&&Ne(e.data.payload)};Nl(()=>(c()||M(h4,null),window.addEventListener(`message`,Fe),()=>{window.removeEventListener(`message`,Fe)})),B(()=>{n(),Ds(()=>{nTe()})}),B(()=>{H(ge)&&(M(DY,null),M(OY,null))}),B(()=>{H(re),H(de),H(ue),H(ne),zV.isSmallScreen,zV.isMediumScreen,Ds(()=>{Ee()})}),B(()=>{a(),o(),De()}),B(()=>{H(C)&&(async()=>{c()?H(S)&&(F(S,!1),await Ee(),await je(),await Pe(),c_e()):await s_e()})()});var Ie=cTe(),Le=L(Ie);_c(I(Le),()=>n()?.id,e=>{var t=J7(),r=L(t);{let e=N(()=>g()||H(te)&&H(ye));Zwe(r,{get disabled(){return H(e)}})}var i=z(r,2),s=e=>{zj(e,{children:(e,t)=>{var n=rTe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`loading_entries`,{values:{count:1}})]),G(e,n)},$$slots:{default:!0}})},c=e=>{},u=e=>{zj(e,{children:(e,t)=>{var n=iTe(),r=L(n),i=I(r),a=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`entry_not_found`)]),G(e,t)},o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`creating_entries_disabled_by_admin`)]),G(e,t)},s=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`creating_entries_disabled_by_quota`,{values:{quota:H(ve)}})]),G(e,t)};q(i,e=>{H(E)?e(a):H(_e)?e(s,-1):e(o,1)}),D(r);var c=z(r,2);$f(I(c),{variant:`primary`,onclick:()=>{let e=H(ie)??l()?.name;BY(e?`/collections/${e}`:`/collections`,{replaceState:!0,transitionType:`backwards`})},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`back_to_collection`)]),G(e,n)},$$slots:{default:!0}}),D(c),G(e,n)},$$slots:{default:!0}})},d=e=>{var t=sTe();_c(I(t),()=>`${H(ie)}|${H(oe)}|${H(se)}`,e=>{var t=oTe(),n=L(t),r=I(n),i=e=>{var t=W(),n=L(t),r=e=>{Om(e,{onResize:({sizes:e})=>{a()&&o()&&(e=>{var t=Tr(e,2);la(DY,Ds(a).width=t[0],Ds(a)),la(OY,Ds(o).width=t[1],Ds(o))})(e)},children:(e,t)=>{var n=aTe(),r=L(n);km(r,{get defaultSize(){return H(Se)},get minSize(){return H(we)},children:(e,t)=>{p(e)},$$slots:{default:!0}});var i=z(r,2);Dm(i,{onclick:ke,children:(e,t)=>{{let t=N(()=>Z(`swap_panes`));$f(e,{class:`swap-button`,iconic:!0,size:`small`,variant:`tertiary`,get"aria-label"(){return H(t)},onpointerdown:Oe,children:(e,t)=>{Rl(e,{name:`swap_horiz`})},$$slots:{default:!0}})}},$$slots:{default:!0}}),km(z(i,2),{get defaultSize(){return H(Ce)},get minSize(){return H(we)},children:(e,t)=>{m(e)},$$slots:{default:!0}}),G(e,n)},$$slots:{default:!0}})};q(n,e=>{H(Se)&&H(Ce)&&e(r)}),G(e,t)},s=e=>{p(e)},c=e=>{m(e)},l=e=>{Wp(e,{flex:!0})};q(r,e=>{a()&&o()?e(i):a()?e(s,1):o()?e(c,2):e(l,-1)}),D(n);var u=z(n,2),d=e=>{xwe(e,{})};q(u,e=>{zV.isSmallScreen||e(d)}),G(e,t)}),D(t),Gs(`pointerdown`,t,Ae),Gs(`keydown`,t,Ae),G(e,t)};q(i,e=>{g()?e(s):n()===null?e(c,1):H(E)||H(te)&&H(ye)?e(u,2):e(d,-1)}),G(e,t)}),D(Le),Ol(Le,e=>F(C,e),()=>H(C));var Re=z(Le,2);u_e(Re,{}),Nh(z(Re,2),{get show(){return ua(),u()},set show(e){M(CY,e)},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`entry_duplicated`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),V(e=>Y(Le,`aria-label`,e),[()=>Z(`content_editor`)]),G(e,Ie),k(),f()}Ks([`pointerdown`,`keydown`]);var dTe=U(`<span role="none"> </span>`),fTe={hash:`svelte-xa0q0i`,code:`
|
||
/*
|
||
* Filled pill following the same background/foreground/border recipe as the Alert and Infobar
|
||
* components, so the colors adapt to both the light and dark themes. The border does most of the
|
||
* work in dark mode, where the alert background is nearly the same as the row background.
|
||
*/.status-badge.svelte-xa0q0i {display:inline-block;border-width:1px;border-style:solid;border-radius:12px;padding:1px 6px;font-size:var(--sui-font-size-x-small);line-height:var(--sui-line-height-compact);white-space:nowrap;&.draft {border-color:var(--sui-info-border-color);background-color:var(--sui-info-background-color);color:var(--sui-info-foreground-color);}&.pending_review {border-color:var(--sui-warning-border-color);background-color:var(--sui-warning-background-color);color:var(--sui-warning-foreground-color);}&.pending_publish {border-color:var(--sui-success-border-color);background-color:var(--sui-success-background-color);color:var(--sui-success-foreground-color);}&.pending_deletion {border-color:var(--sui-error-border-color);background-color:var(--sui-error-background-color);color:var(--sui-error-foreground-color);}}`};function X7(e,t){O(t,!0),J(e,fTe);var n=dTe(),r=R(n,!0);V(e=>{el(n,1,`status-badge ${t.status??``}`,`svelte-xa0q0i`),K(r,e)},[()=>Z(bG[t.status])]),G(e,n),k()}var pTe=U(`<bdi></bdi>`),mTe=U(`<!> <!>`,1),hTe=U(`<div role="none" class="label svelte-b1f01"><!></div>`),gTe=U(`<!> <!> <!> <!>`,1),_Te={hash:`svelte-b1f01`,code:`.label.svelte-b1f01 {.icon.home {opacity:0.5;font-size:20px;vertical-align:-4px;}}`};function Z7(e,t){O(t,!0),J(e,_Te);let n=()=>j(uce,`$selectedEntryIdSet`,r),[r,i]=sa(),a=X(t,`showCheckbox`,3,!1),o=X(t,`onSelect`,3,void 0),s=N(()=>t.entry.workflow);var c=gTe(),l=L(c),u=e=>{gm(e,{class:`checkbox`,children:(e,r)=>{{let r=N(()=>n().has(t.entry.id));Jp(e,{role:`none`,tabindex:`-1`,get checked(){return H(r)},onChange:({detail:{checked:e}})=>{o()?.(e)}})}},$$slots:{default:!0}})};q(l,e=>{a()&&!(zV.isSmallScreen||zV.isMediumScreen)&&e(u)});var d=z(l,2),f=e=>{gm(e,{class:`image`,children:(e,n)=>{var r=W();hc(L(r),()=>V2(t.collection,t.entry),null,(e,n)=>{var r=W(),i=L(r),a=e=>{{let r=N(()=>t.viewType===`list`?`icon`:`tile`);O4(e,{get src(){return H(n)},get variant(){return H(r)},cover:!0})}};q(i,e=>{H(n)&&e(a)}),G(e,r)}),G(e,r)},$$slots:{default:!0}})};q(d,e=>{t.collection._thumbnailFieldNames.length&&e(f)});var p=z(d,2);gm(p,{class:`title`,children:(e,n)=>{var r=hTe();_f(I(r),{lines:2,children:(e,n)=>{var r=mTe(),i=L(r);_c(i,()=>Ud.current,e=>{var n=pTe();kc(n,()=>lV(t.collection,t.entry,{useTemplate:!0,allowMarkdown:!0}),!0),D(n),G(e,n)});var a=z(i,2),o=e=>{{let n=N(()=>pL(t.collection)?.icon);Rl(e,{get name(){return H(n)},class:`home`})}},s=N(()=>mL(t.collection,t.entry));q(a,e=>{H(s)&&e(o)}),G(e,r)},$$slots:{default:!0}}),D(r),G(e,r)},$$slots:{default:!0}}),gm(z(p,2),{class:`status`,children:(e,t)=>{var n=W(),r=L(n),i=e=>{X7(e,{get status(){return H(s).status}})};q(r,e=>{H(s)&&e(i)}),G(e,n)},$$slots:{default:!0}}),G(e,c),k(),i()}function Q7(e,t){O(t,!0);let n=()=>j(Z4,`$listedEntryIndexMap`,i),r=()=>j(SG,`$openAuthoring`,i),[i,a]=sa(),o=N(()=>n().get(t.entry.id)),s=e=>{dB.update(n=>{let r=n.indexOf(t.entry);return e&&r===-1&&n.push(t.entry),!e&&r>-1&&n.splice(r,1),n})};_m(e,{get"aria-rowindex"(){return H(o)},onChange:e=>{s(e.detail.selected)},onclick:()=>{BY(`/collections/${t.collection.name}/entries/${t.entry.subPath}`,{transitionType:`forwards`})},children:(e,n)=>{{let n=N(()=>!r());Z7(e,{get collection(){return t.collection},get entry(){return t.entry},get viewType(){return t.viewType},get showCheckbox(){return H(n)},onSelect:s})}},$$slots:{default:!0}}),k(),a()}var $7=U(`<!> <!>`,1);function vTe(e,t){O(t,!0);let n=X(t,`canMoveUp`,3,!1),r=X(t,`canMoveDown`,3,!1),i=X(t,`onMoveUp`,3,void 0),a=X(t,`onMoveDown`,3,void 0);var o=$7(),s=L(o);Z7(s,{get collection(){return t.collection},get entry(){return t.entry},get viewType(){return t.viewType}}),gm(z(s,2),{class:`reorder-actions`,children:(e,t)=>{var o=$7(),s=L(o);{let e=e=>{Rl(e,{name:`arrow_upward`})},t=N(()=>!n()),r=N(()=>Z(`move_up`));$f(s,{variant:`ghost`,iconic:!0,get disabled(){return H(t)},get"aria-label"(){return H(r)},onclick:e=>{e.stopPropagation(),i()?.()},startIcon:e,$$slots:{startIcon:!0}})}var c=z(s,2);{let e=e=>{Rl(e,{name:`arrow_downward`})},t=N(()=>!r()),n=N(()=>Z(`move_down`));$f(c,{variant:`ghost`,iconic:!0,get disabled(){return H(t)},get"aria-label"(){return H(n)},onclick:e=>{e.stopPropagation(),a()?.()},startIcon:e,$$slots:{startIcon:!0}})}G(e,o)},$$slots:{default:!0}}),G(e,o),k()}var yTe=U(`<div role="row" tabindex="0" aria-selected="false" draggable="true"><!></div>`),bTe=U(`<div role="none" class="wrapper svelte-1txp9gj"></div>`),xTe={hash:`svelte-1txp9gj`,code:`.wrapper.svelte-1txp9gj {
|
||
/* The rows aren’t \`<GridRow>\` components, so they don’t get its scoped layout rules */.grid-row {display:table-row;height:var(--sui-primary-row-height);}
|
||
|
||
/* The dragged row is left as a faint placeholder marking the gap it would drop into. The
|
||
pointer already carries the browser’s own drag image of it, so showing it twice at full
|
||
strength would just be confusing. */.grid-row.drag-source {opacity:0.25;cursor:grabbing;}.grid-row[draggable='true']:not(.drag-source) {cursor:grab;}}`};function STe(e,t){O(t,!0),J(e,xTe);let n=()=>j(t3,`$entryGroups`,i),r=()=>j(Z4,`$listedEntryIndexMap`,i),[i,a]=sa(),o=P(ao({})),s=P(void 0),c=P(void 0),l=(e=H(o))=>{K4.set(n().flatMap(({name:t,entries:n})=>e[t]??n))},u=(e,t,n)=>{t!==n&&(H(o)[e]=H8(H(o)[e]??[],t,n),q4.set(!0),l())},d=e=>{if(H(s)){let{name:t,entries:n}=H(s);e?(H(o)[t]??[]).some((e,t)=>e.id!==n[t]?.id)&&(q4.set(!0),l()):H(o)[t]=n}F(s,void 0),F(c,void 0)};Nl(()=>{let e=pL(t.collection)?.name,r=Object.fromEntries(n().map(({name:n,entries:r})=>[n,f4(e?r.filter(t=>t.slug!==e):r,t.collection)]));F(o,r,!0),l(r)});var f=bTe();Cc(f,5,n,({name:e,entries:t})=>e,(e,n)=>{let i=()=>H(n).name,a=()=>H(n).entries;var l=W();hc(L(l),vf,null,e=>{{let n=N(()=>i()===`*`?void 0:i());hm(e,{get label(){return H(n)},children:(e,n)=>{let l=N(()=>H(o)[i()]??a());var f=W();Cc(L(f),27,()=>H(l),e=>e.id,(e,n,a)=>{var f=yTe();let p;var m=I(f);{let e=N(()=>H(a)>0),r=N(()=>H(a)<H(l).length-1);vTe(m,{get collection(){return t.collection},get entry(){return H(n)},get viewType(){return t.viewType},get canMoveUp(){return H(e)},get canMoveDown(){return H(r)},onMoveUp:()=>{H(a)>0&&u(i(),H(a),H(a)-1)},onMoveDown:()=>{H(a)<H(l).length-1&&u(i(),H(a),H(a)+1)}})}D(f),V(e=>{p=el(f,1,`sui grid-row`,null,p,{"drag-source":H(c)?.id===H(n).id}),Y(f,`aria-rowindex`,e)},[()=>r().get(H(n).id)??-1]),Ws(`dragstart`,f,e=>{F(s,{name:i(),entries:[...H(l)]},!0),F(c,H(n),!0),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`)}),Ws(`dragover`,f,e=>{let t=i()===H(s)?.name;if(t){e.preventDefault();let t=H(o)[i()]??[],n=t.findIndex(({id:e})=>e===H(c)?.id),r=U8({dragIndex:n,dropIndex:V8({index:H(a),clientY:e.clientY,rect:e.currentTarget.getBoundingClientRect()})});r!==void 0&&(H(o)[i()]=H8(t,n,r))}e.dataTransfer&&(e.dataTransfer.dropEffect=t?`move`:`none`)}),Ws(`drop`,f,e=>{e.preventDefault(),d(i()===H(s)?.name)}),Ws(`dragend`,f,()=>{d(!1)}),Vc(f,()=>Um,()=>({duration:200})),G(e,f)}),G(e,f)},$$slots:{default:!0}})}}),G(e,l)}),D(f),G(e,f),k(),a()}var CTe=U(`<!> <!>`,1);function e9(e,t){O(t,!0);let n=()=>j(JL,`$allEntries`,a),r=()=>j(PL,`$selectedCollection`,a),i=()=>j(Q4,`$collectionState`,a),[a,o]=sa(),s=X(t,`label`,3,void 0),c=X(t,`keyShortcuts`,3,void 0),l=N(()=>n()&&r()?fce(r()):!1),u=N(()=>Ud.current&&r()?pL(r())?.label:``),d=N(()=>H(l)?Bp:$f),f=(e=!1)=>{BY(`/collections/${t.collectionName}/new`,{state:{index:e},transitionType:`forwards`})};var p=W(),m=L(p);{let e=e=>{Rl(e,{name:`edit`})},t=e=>{var t=W(),n=L(t),r=e=>{xm(e,{children:(e,t)=>{var n=CTe(),r=L(n);{let e=N(()=>Z(`entry`));Sm(r,{get label(){return H(e)},onclick:()=>f()})}Sm(z(r,2),{get label(){return H(u)},onclick:()=>f(!0)}),G(e,n)},$$slots:{default:!0}})};q(n,e=>{H(l)&&e(r)}),G(e,t)},n=N(()=>!s()),r=N(()=>Z(`create_new_entry`));jc(m,()=>H(d),(a,o)=>{o(a,{variant:`primary`,get iconic(){return H(n)},get disabled(){return i().creationDisabled},get label(){return s()},get"aria-label"(){return H(r)},get keyShortcuts(){return c()},onclick:()=>f(),startIcon:e,popup:t,$$slots:{startIcon:!0,popup:!0}})})}G(e,p),k(),o()}var wTe=U(`<!> <!>`,1),t9=U(`<span role="none"> </span>`),TTe=U(`<span role="none"> </span> <!>`,1);function ETe(e,t){O(t,!0);let n=()=>j(PL,`$selectedCollection`,c),r=()=>j(G4,`$reordering`,c),i=()=>j(W4,`$currentView`,c),a=()=>j(t3,`$entryGroups`,c),o=()=>j(X4,`$listedUnpublishedEntries`,c),s=()=>j(Y4,`$listedEntries`,c),[c,l]=sa(),u=N(n),d=N(()=>r()?`list`:i().type),f=N(()=>a().flatMap(({entries:e})=>e));{let t=N(()=>Z(`entry_list`));M4(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=W(),i=L(n),c=e=>{var t=W(),n=L(t),i=e=>{let t=N(()=>H(u)._i18n);{let n=N(()=>Z(`entries`)),i=N(()=>s().length+o().length);N4(e,{get viewType(){return H(d)},id:`entry-list`,get"aria-label"(){return H(n)},get"aria-rowcount"(){return H(i)},children:(e,n)=>{var i=W(),s=L(i),c=e=>{STe(e,{get collection(){return H(u)},get viewType(){return H(d)}})},l=e=>{var n=wTe(),r=L(n),i=e=>{{let t=N(()=>Z(`workflow.unpublished_entries`));hm(e,{get label(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),1,o,e=>e.id,(e,t)=>{Q7(e,{get collection(){return H(u)},get entry(){return H(t)},get viewType(){return H(d)}})}),G(e,n)},$$slots:{default:!0}})}};q(r,e=>{o().length&&e(i)}),Cc(z(r,2),1,a,({name:e,entries:t})=>e,(e,n)=>{let r=()=>H(n).name,i=()=>H(n).entries;var a=W();hc(L(a),vf,null,e=>{{let n=N(()=>r()===`*`?o().length?Z(`workflow.published_entries`):void 0:r());hm(e,{get label(){return H(n)},children:(e,n)=>{{let n=(e,t=br)=>{var n=W();hc(L(n),vf,null,e=>{Q7(e,{get collection(){return H(u)},get entry(){return t()},get viewType(){return H(d)}})}),G(e,n)},r=N(()=>i().filter(({locales:e})=>!!(e[H(t).defaultLocale]??Object.values(e)[0])?.content));Am(e,{get items(){return H(r)},itemKey:`id`,renderItem:n,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})}}),G(e,a)}),G(e,n)};q(s,e=>{r()?e(c):e(l,-1)}),G(e,i)},$$slots:{default:!0}})}},c=e=>{zj(e,{children:(e,t)=>{var n=t9(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_entries_found`)]),G(e,n)},$$slots:{default:!0}})},l=e=>{zj(e,{children:(e,t)=>{var n=TTe(),r=L(n),i=R(r,!0),a=z(r,2);{let e=N(()=>Z(`create_new_entry`));e9(a,{get collectionName(){return H(u).name},get label(){return H(e)}})}V(e=>K(i,e),[()=>Z(`no_entries_created`)]),G(e,n)},$$slots:{default:!0}})};q(n,e=>{H(f).length||o().length?e(i):s().length?e(c,1):e(l,-1)}),G(e,t)},l=e=>{zj(e,{children:(e,t)=>{var n=t9(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`collection_not_found`)]),G(e,n)},$$slots:{default:!0}})};q(i,e=>{H(u)?e(c):e(l,-1)}),G(e,n)},$$slots:{default:!0}})}k(),l()}var DTe=U(`<div role="none" class="label svelte-1nfjp1"><!> <!></div>`),OTe=U(`<!> <!>`,1),kTe=U(`<span role="none"> </span>`),ATe={hash:`svelte-1nfjp1`,code:`.label.svelte-1nfjp1 {display:flex;align-items:center;gap:16px;.icon {display:flex;align-items:center;justify-content:center;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);}}`};function jTe(e,t){O(t,!0),J(e,ATe);let n=()=>j(PL,`$selectedCollection`,i),r=()=>j(rX,`$unpublishedEntries`,i),[i,a]=sa(),o=N(()=>n()?.files.filter(qI)??[]),s=N(()=>Object.fromEntries(r().filter(({workflow:e})=>e.collectionName===n()?.name).map(({workflow:e})=>[e.fileName,e.status])));{let t=N(()=>Z(`file_list`));M4(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var r=W(),i=L(r),a=e=>{{let t=N(()=>Z(`files`));N4(e,{viewType:`list`,get"aria-label"(){return H(t)},get"aria-rowcount"(){return H(o).length},children:(e,t)=>{Am(e,{get items(){return H(o)},itemKey:`name`,renderItem:(e,t)=>{let r=()=>(t?.()).name,i=()=>(t?.()).label,a=()=>(t?.()).icon;var o=W();hc(L(o),vf,null,e=>{_m(e,{onclick:()=>{BY(`/collections/${n()?.name}/entries/${r()}`,{transitionType:`forwards`})},children:(e,t)=>{var n=OTe(),o=L(n);gm(o,{class:`title`,children:(e,t)=>{var n=DTe(),o=I(n),s=e=>{Rl(e,{get name(){return a()}})};q(o,e=>{a()&&e(s)}),_f(z(o,2),{lines:2,children:(e,t)=>{mi();var n=ec();V(()=>K(n,i()||r())),G(e,n)},$$slots:{default:!0}}),D(n),G(e,n)},$$slots:{default:!0}}),gm(z(o,2),{class:`status`,children:(e,t)=>{var n=W(),i=L(n),a=e=>{X7(e,{get status(){return H(s)[r()]}})};q(i,e=>{H(s)[r()]&&e(a)}),G(e,n)},$$slots:{default:!0}}),G(e,n)},$$slots:{default:!0}})}),G(e,o)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}},c=e=>{zj(e,{children:(e,t)=>{var n=kTe(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`no_files_in_collection`)]),G(e,n)},$$slots:{default:!0}})};q(i,e=>{H(o)?.length?e(a):e(c,-1)}),G(e,r)},$$slots:{default:!0}})}k(),a()}var MTe=U(`<div class="wrapper svelte-w0jevb"><!></div>`),NTe={hash:`svelte-w0jevb`,code:`.wrapper.svelte-w0jevb {display:contents;}`};function PTe(e,t){O(t,!0),J(e,NTe);let[n,r]=sa(),i=N(()=>t.file.name),a=N(()=>t.file.label),o=N(()=>t.file.icon),s=P(!1),c=P(void 0);var l=MTe(),u=I(l);{let e=e=>{{let t=N(()=>H(o)||`edit_document`);Rl(e,{get name(){return H(t)}})}},t=N(()=>H(a)||H(i));bm(u,{get label(){return H(t)},onSelect:()=>{M(NY,Z(`singleton_selected_announcement`,{values:{file:H(a)||H(i)}}))},onclick:()=>{BY(`/collections/_singletons/entries/${H(i)}`,{transitionType:`forwards`}),F(s,!1),H(c)?.querySelector(`[role="option"]`)?.classList.remove(`focused`)},get selected(){return H(s)},set selected(e){F(s,e,!0)},startIcon:e,$$slots:{startIcon:!0}})}D(l),Ol(l,e=>F(c,e),()=>H(c)),G(e,l),k(),r()}var FTe=U(`<!> <!>`,1);function n9(e,t){O(t,!0);let n=()=>j(nY,`$backend`,a),r=()=>j(HG,`$isLastCommitPublished`,a),i=()=>j(eX,`$skipCIConfigured`,a),[a,o]=sa(),s=N(()=>KH.deployHookURL),c=N(()=>KH.deployHookAuthHeader),l=N(()=>n()?.triggerDeployment),u=N(()=>(!!H(s)||typeof H(l)==`function`)&&!r()),d=P(`info`),f=P(!1),p=async()=>{F(d,`info`),F(f,!0);try{if(H(s)&&!BV(H(s)))throw Error(`Deploy hook URL must use HTTPS or localhost`);let{ok:e,status:t}=H(s)?await fetch(H(s),{method:`POST`,mode:H(c)?`cors`:`no-cors`,headers:H(c)?{Authorization:H(c)}:{}}):await H(l)?.()??{};if(!e&&(H(c)||t!==0))throw Error(`Webhook returned ${t} error`);VG(!0)}catch(e){F(d,`error`),F(f,!0),console.error(e)}};var m=W(),h=L(m),g=e=>{var t=FTe(),n=L(t);{let e=N(()=>zV.isSmallScreen?`small`:`medium`),t=N(()=>Z(`publish_changes`)),r=N(()=>!H(u));$f(n,{variant:`secondary`,get size(){return H(e)},get label(){return H(t)},get disabled(){return H(r)},onclick:()=>p()})}Nh(z(n,2),{get show(){return H(f)},set show(e){F(f,e,!0)},children:(e,t)=>{Hl(e,{get status(){return H(d)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(d)===`error`?`publishing_changes_failed`:`publishing_changes`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,t)};q(h,e=>{i()&&e(g)}),G(e,m),k(),o()}var ITe=U(`<header><h2> </h2> <!></header> <!>`,1),r9=U(`<span class="count"> </span>`),LTe=U(`<!> <!>`,1),RTe=U(`<div role="none" class="primary-sidebar"><!> <!></div>`);function zTe(e,t){O(t,!0);let n=()=>j($H,`$cmsConfig`,o),r=()=>j(PL,`$selectedCollection`,o),i=()=>j(JL,`$allEntries`,o),a=()=>j(rX,`$unpublishedEntries`,o),[o,s]=sa(),c=X(t,`isSearchPage`,3,!1),l=N(()=>Intl.NumberFormat(Ud.current)),u=N(()=>n()?.collections?.filter(({hide:e})=>!e)??[]),d=N(()=>n()?.singletons??[]);var f=RTe(),p=I(f),m=e=>{var t=ITe(),n=L(t),r=I(n),i=R(r,!0);n9(z(r,2),{}),D(n),I4(z(n,2),{onclick:e=>{e.preventDefault(),BY(`/search`)}}),V(e=>K(i,e),[()=>Z(`contents`)]),G(e,t)};q(p,e=>{zV.isSmallScreen&&e(m)});var h=z(p,2);{let e=N(()=>Z(`collection_list`));vm(h,{get"aria-label"(){return H(e)},"aria-controls":`collection-container`,children:(e,t)=>{var n=LTe(),o=L(n),s=e=>{{let t=N(()=>Z(`collections`));ym(e,{get label(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),19,()=>H(u),(e,t)=>e.name??t,(e,t)=>{var n=W();hc(L(n),vf,null,e=>{var n=W(),o=L(n),s=e=>{let n=N(()=>H(t));{let o=e=>{{let t=N(()=>H(n).icon||`bookmark_manager`);Rl(e,{get name(){return H(t)}})}},s=e=>{var r=W();_c(L(r),i,e=>{let r=N(()=>(`files`in H(t)?H(t).files:dX(pB(H(n).name),a().filter(({workflow:e})=>e.collectionName===H(n).name))).length);var i=r9(),o=R(i,!0);V((e,t)=>{Y(i,`aria-label`,`(${e??``})`),K(o,t)},[()=>Z(`x_entries`,{values:{count:H(r)}}),()=>H(l).format(H(r))]),G(e,i)}),G(e,r)},u=N(()=>H(n).label||H(n).name),d=N(()=>zV.isSmallScreen||c()?!1:r()?.name===H(n).name);bm(e,{get label(){return H(u)},get selected(){return H(d)},onSelect:()=>{BY(`/collections/${H(n).name}`,{transitionType:`forwards`})},startIcon:o,endIcon:s,$$slots:{startIcon:!0,endIcon:!0}})}},u=e=>{Hp(e,{})};q(o,e=>{`divider`in H(t)?H(t).divider&&e(u,1):e(s)}),G(e,n)}),G(e,n)}),G(e,n)},$$slots:{default:!0}})}};q(o,e=>{H(u).length&&e(s)});var f=z(o,2),p=e=>{var t=W(),n=L(t),i=e=>{{let t=N(()=>Z(`files`));ym(e,{get label(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),19,()=>H(d),(e,t)=>e.name??t,(e,t)=>{var n=W();hc(L(n),vf,null,e=>{var n=W(),r=L(n),i=e=>{PTe(e,{get file(){return H(t)}})},a=e=>{Hp(e,{})};q(r,e=>{`divider`in H(t)?H(t).divider&&e(a,1):e(i)}),G(e,n)}),G(e,n)}),G(e,n)},$$slots:{default:!0}})}},a=e=>{let t=N(()=>H(d).length);{let n=N(()=>Z(`collections`));ym(e,{get label(){return H(n)},children:(e,n)=>{{let n=e=>{Rl(e,{name:`bookmark_manager`})},i=e=>{var n=r9(),r=R(n,!0);V((e,t)=>{Y(n,`aria-label`,`(${e??``})`),K(r,t)},[()=>Z(`x_entries`,{values:{count:H(t)}}),()=>H(l).format(H(t))]),G(e,n)},a=N(()=>Z(`files`)),o=N(()=>r()?.name===`_singletons`);bm(e,{get label(){return H(a)},get selected(){return H(o)},onSelect:()=>{BY(`/collections/_singletons`,{transitionType:`forwards`})},startIcon:n,endIcon:i,$$slots:{startIcon:!0,endIcon:!0}})}},$$slots:{default:!0}})}};q(n,e=>{zV.isSmallScreen||H(u).length?e(i):e(a,-1)}),G(e,t)};q(f,e=>{H(d).length&&e(p)}),G(e,n)},$$slots:{default:!0}})}D(f),G(e,f),k(),s()}var BTe=U(`<!> <!> <!>`,1);function VTe(e,t){O(t,!0);let n=()=>j(q4,`$reorderDirty`,a),r=()=>j(PL,`$selectedCollection`,a),i=()=>j(K4,`$reorderedEntries`,a),[a,o]=sa(),s=P(!1),c=P(!1);var l=BTe(),u=L(l);{let e=N(()=>Z(`done`)),t=N(()=>Z(`done_reordering_entries`)),a=N(()=>H(s)||!n());$f(u,{variant:`primary`,get label(){return H(e)},get"aria-label"(){return H(t)},get disabled(){return H(a)},onclick:async()=>{let e=r();F(s,!0);try{await Dpe(e,i()),M(G4,!1)}catch(e){console.error(e),F(c,!0)}F(s,!1)}})}var d=z(u,2);{let e=N(()=>Z(`cancel`)),t=N(()=>Z(`cancel_reordering_entries`));$f(d,{variant:`secondary`,get label(){return H(e)},get"aria-label"(){return H(t)},get disabled(){return H(s)},onclick:()=>{M(G4,!1)}})}Nh(z(d,2),{get show(){return H(c)},set show(e){F(c,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`saving_reorder_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,l),k(),o()}var HTe=U(` <!>`,1),UTe=U(`<!> <!>`,1);function WTe(e,t){O(t,!0);let n=()=>j(dB,`$selectedEntries`,s),r=()=>j(PL,`$selectedCollection`,s),i=()=>j(nX,`$workflowEnabled`,s),a=()=>j(Y4,`$listedEntries`,s),o=()=>j(X4,`$listedUnpublishedEntries`,s),[s,c]=sa(),l=X(t,`open`,15,!1),u=P(!1),d=N(()=>n().filter(e=>`workflow`in e)),f=N(()=>n().filter(e=>!(`workflow`in e))),p=e=>{let t=r()?.name;return t&&pM({collectionName:t})?.entryRelative?H2({entry:e,collectionName:t,relative:!0}):[]},m=N(()=>{let e=r()?.name;return H(f).length&&e&&pM({collectionName:e})?.entryRelative?H(f).flatMap(t=>H2({entry:t,collectionName:e,relative:!0})):[]}),h=async()=>{try{H(d).length&&await kwe(H(d)),H(f).length&&(i()&&r()?(await Awe(H(f).map(e=>({entry:e,collection:r(),assets:p(e)}))),sQ.set({...oQ,deleted:!0,deletionPending:!0,count:H(f).length})):await I7(H(f),H(m)))}catch(e){F(u,!0),console.error(e);return}M(dB,[])};var g=UTe(),_=L(g);{let e=N(()=>Z(`delete_entries`,{values:{count:n().length}})),t=N(()=>Z(`delete`));Zp(_,{get title(){return H(e)},get okLabel(){return H(t)},onOk:async()=>{await h()},get open(){return l()},set open(e){l(e)},children:(e,t)=>{let r=N(()=>n().length>1&&n().length===a().length+o().length);mi();var i=HTe(),s=L(i),c=z(s),l=e=>{var t=ec();V(e=>K(t,e),[()=>Z(H(f).length?`workflow.deleting_unpublished_note_some`:`workflow.deleting_unpublished_note_all`,{values:{count:H(d).length}})]),G(e,t)};q(c,e=>{H(d).length&&e(l)}),V(e=>K(s,`${e??``} `),[()=>Z(H(m).length?H(r)?`confirm_deleting_all_entries_with_assets`:`confirm_deleting_selected_entries_with_assets`:H(r)?`confirm_deleting_all_entries`:`confirm_deleting_selected_entries`,{values:{count:n().length}})]),G(e,i)},$$slots:{default:!0}})}Nh(z(_,2),{get show(){return H(u)},set show(e){F(u,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`deleting_entry_failed`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,g),k(),c()}var GTe=U(`<bdi></bdi>`),KTe=U(`<div role="none" class="description svelte-83jnuc"><!></div>`),qTe=U(`<!> <!> <!>`,1),JTe=U(`<!> <h2 role="none" class="svelte-83jnuc"><bdi> </bdi></h2> <!> <!>`,1),YTe=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1),i9=U(`<!> <!>`,1),XTe={hash:`svelte-83jnuc`,code:`h2.svelte-83jnuc {flex:none !important;}.description.svelte-83jnuc {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;}`};function ZTe(e,t){O(t,!0),J(e,XTe);let n=()=>j(PL,`$selectedCollection`,c),r=()=>j(Q4,`$collectionState`,c),i=()=>j(dB,`$selectedEntries`,c),a=()=>j(G4,`$reordering`,c),o=()=>j(SG,`$openAuthoring`,c),s=()=>j(Y4,`$listedEntries`,c),[c,l]=sa(),u={ALLOWED_TAGS:[`strong`,`em`,`del`,`code`,`a`],ALLOWED_ATTR:[`href`]},d=P(!1),f=e=>gt(tr.parseInline(e),u),p=N(()=>n()?.name??``),m=N(()=>n()?.description),h=N(()=>Ud.current&&n()?UL(n()):H(p)),g=N(()=>r().isEntryCollection),_=N(()=>r().canCreate),v=N(()=>r().canDelete),y=N(()=>r().canReorder),b=N(()=>r().quota),x=N(()=>r().remaining),S=N(()=>r().nearingQuota),C=N(()=>r().creationDisabled),w=N(()=>!i().length||!H(v));var T=i9(),E=L(T),ee=e=>{var t=i9(),n=L(t);{let e=N(()=>Z(`collection`));Mj(n,{variant:`primary`,get"aria-label"(){return H(e)},children:(e,t)=>{var n=JTe(),r=L(n),c=e=>{{let t=N(()=>Z(`back_to_collection_list`));xQ(e,{get"aria-label"(){return H(t)},onclick:()=>{UY(`/collections`)}})}};q(r,e=>{zV.isSmallScreen&&e(c)});var l=z(r,2),u=R(I(l),!0);D(l);var _=z(l,2),v=e=>{Wp(e,{flex:!0})},b=e=>{var t=KTe();_f(I(t),{children:(e,t)=>{var n=GTe();kc(n,()=>f(H(m)||``),!0),D(n),G(e,n)},$$slots:{default:!0}}),D(t),G(e,t)};q(_,e=>{zV.isSmallScreen?e(v):e(b,-1)});var x=z(_,2),S=e=>{VTe(e,{})},T=e=>{var t=qTe(),n=L(t),r=e=>{{let t=N(()=>Z(`delete`)),n=N(()=>Z(`delete_selected_entries`,{values:{count:i().length}}));$f(e,{variant:`ghost`,get label(){return H(t)},get"aria-label"(){return H(n)},get disabled(){return H(w)},onclick:()=>{F(d,!0)}})}};q(n,e=>{!zV.isSmallScreen&&!o()&&e(r)});var a=z(n,2),c=e=>{{let t=N(()=>Z(`reorder`)),n=N(()=>Z(`reorder_entries`)),r=N(()=>!s().length);$f(e,{variant:`ghost`,get label(){return H(t)},get"aria-label"(){return H(n)},get disabled(){return H(r)},onclick:()=>{M(G4,!0)}})}};q(a,e=>{H(y)&&e(c)}),mp(z(a,2),{children:(e,t)=>{var n=W(),r=L(n),i=e=>{{let t=N(()=>zV.isSmallScreen?void 0:Z(`create`));e9(e,{get collectionName(){return H(p)},get label(){return H(t)},keyShortcuts:`Accel+E`})}};q(r,e=>{(!zV.isSmallScreen||s().length&&!H(C))&&e(i)}),G(e,n)},$$slots:{default:!0}}),G(e,t)};q(x,e=>{H(g)&&a()?e(S):H(g)&&e(T,1)}),V(()=>K(u,H(h))),G(e,n)},$$slots:{default:!0}})}var r=z(n,2),c=e=>{var t=YTe(),n=L(t);vc(n,()=>({"--sui-infobar-border-width":`1px 0`,"--sui-infobar-message-justify-content":`center`})),rp(n.lastChild,{dismissible:!1,children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`creating_entries_disabled_by_admin`)]),G(e,t)},a=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`creating_entries_disabled_by_quota`,{values:{quota:H(b)}})]),G(e,t)},o=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`creating_entries_nearing_quota`,{values:{quota:H(b),remaining:H(x)}})]),G(e,t)};q(r,e=>{H(_)?H(C)?e(a,1):H(S)&&e(o,2):e(i)}),G(e,n)},$$slots:{default:!0}}),D(n),G(e,t)};q(r,e=>{H(g)&&(H(C)||H(S))&&e(c)}),G(e,t)};q(E,e=>{n()&&e(ee)}),WTe(z(E,2),{get open(){return H(d)},set open(e){F(d,e,!0)}}),G(e,T),k(),l()}function QTe(e,t){O(t,!0);let n=()=>j(PL,`$selectedCollection`,o),r=()=>j(dU,`$allAssets`,o),i=()=>j(SG,`$openAuthoring`,o),a=()=>j(W4,`$currentView`,o),[o,s]=sa(),c=N(()=>pM({collectionName:n()?.name})),l=N(()=>H(c)?r().filter(e=>jU(e,H(c))):[]),u=N(()=>H(c)??{internalPath:void 0,entryRelative:!1,hasTemplateTags:!1}),d=N(()=>H(u).internalPath),f=N(()=>H(u).entryRelative),p=N(()=>H(u).hasTemplateTags),m=N(()=>H(f)||H(p)||i());var h=W(),g=L(h),_=e=>{{let t=N(()=>Z(`collection_assets`));Bj(e,{id:`collection-assets`,class:`secondary-sidebar`,get"aria-label"(){return H(t)},children:(e,t)=>{A4(e,{get disabled(){return H(m)},multiple:!0,onDrop:({files:e})=>{M(xU,{folder:H(c),files:e})},children:(e,t)=>{f8(e,{get assets(){return H(l)},onSelect:({asset:e})=>{BY(`/assets/${e.path}`,{transitionType:`forwards`})}})},$$slots:{default:!0}})},$$slots:{default:!0}})}};q(g,e=>{H(d)!==void 0&&zV.isLargeScreen&&a().showMedia&&e(_)}),G(e,h),k(),s()}var $Te=U(`<!> <!>`,1);function eEe(e,t){O(t,!0);let n=()=>j(t.currentView,`$currentView`,r),[r,i]=sa(),a=X(t,`label`,3,``),o=X(t,`disabled`,3,!1),s=X(t,`noneLabel`,3,``),c=X(t,`groups`,19,()=>[]);{let r=e=>{{let r=N(()=>Z(`grouping_options`));xm(e,{get"aria-label"(){return H(r)},get"aria-controls"(){return t[`aria-controls`]},children:(e,r)=>{var i=$Te(),a=L(i);{let e=N(()=>s()||Z(`sort_keys.none`)),r=N(()=>!n().group);wm(a,{get label(){return H(e)},get checked(){return H(r)},onSelect:()=>{t.currentView.update(e=>({...e,group:null}))}})}Cc(z(a,2),17,c,e=>`${e.field}|${String(e.pattern)}`,(e,r)=>{let i=N(()=>{let{label:e,field:t,pattern:n}=H(r);return{_label:e,field:t,pattern:n}});{let r=N(()=>n().group?.field===H(i).field&&String(n().group.pattern)===String(H(i).pattern));wm(e,{get label(){return H(i)._label},get checked(){return H(r)},onSelect:()=>{t.currentView.update(e=>({...e,group:{field:H(i).field,pattern:H(i).pattern}}))}})}}),G(e,i)},$$slots:{default:!0}})}},i=N(()=>a()||Z(`group`));Ip(e,{variant:`ghost`,get label(){return H(i)},get disabled(){return o()},popupPosition:`bottom-right`,popup:r,$$slots:{popup:!0}})}k(),i()}var tEe=U(`<!> <!>`,1),nEe=U(`<!> <!> <!> <!> <!> <!> <!>`,1);function rEe(e,t){O(t,!0);let n=()=>j(PL,`$selectedCollection`,f),r=()=>j(Y4,`$listedEntries`,f),i=()=>j(X4,`$listedUnpublishedEntries`,f),a=()=>j(G4,`$reordering`,f),o=()=>j(SG,`$openAuthoring`,f),s=()=>j(t3,`$entryGroups`,f),c=()=>j(rhe,`$sortKeys`,f),l=()=>j(Vme,`$viewFilters`,f),u=()=>j(Gme,`$viewGroups`,f),d=()=>j(W4,`$currentView`,f),[f,p]=sa(),m=N(()=>n()?._type===`entry`?n():void 0),h=N(()=>H(m)?.name),g=N(()=>H(m)?._thumbnailFieldNames??[]),_=N(()=>r().length+i().length),v=N(()=>!!H(_)),y=N(()=>H(_)>1);var b=W(),x=L(b),S=e=>{{let t=N(()=>Z(`entry_list`));Mj(e,{variant:`secondary`,get"aria-label"(){return H(t)},children:(e,t)=>{var n=nEe(),r=L(n),a=e=>{{let t=N(()=>[...i(),...s().flatMap(({entries:e})=>e)]);R4(e,{get allItems(){return H(t)},get selectedItems(){return dB}})}};q(r,e=>{!(zV.isSmallScreen||zV.isMediumScreen)&&!o()&&e(a)});var f=z(r,2);Wp(f,{flex:!0});var p=z(f,2);{let e=N(()=>!H(y)||!c().length);a3(p,{get disabled(){return H(e)},get currentView(){return W4},get sortKeys(){return c()},get collectionName(){return H(h)},"aria-controls":`entry-list`})}var m=z(p,2),_=e=>{{let t=N(()=>!H(y));L4(e,{get disabled(){return H(t)},get currentView(){return W4},get filters(){return l()},multiple:!0,"aria-controls":`entry-list`})}};q(m,e=>{l()?.length&&e(_)});var b=z(m,2),x=e=>{{let t=N(()=>!H(y));eEe(e,{get disabled(){return H(t)},get currentView(){return W4},get groups(){return u()},"aria-controls":`entry-list`})}};q(b,e=>{u()?.length&&e(x)});var S=z(b,2),C=e=>{{let t=N(()=>!H(v));o3(e,{get disabled(){return H(t)},get currentView(){return W4},"aria-controls":`entry-list`})}};q(S,e=>{H(g).length&&e(C)});var w=z(S,2),T=e=>{var t=tEe(),n=L(t);Hp(n,{orientation:`vertical`});var r=z(n,2);{let e=e=>{Rl(e,{name:`photo_library`})},t=N(()=>!H(v)||!pM({collectionName:H(h)})),n=N(()=>!!d().showMedia),i=N(()=>Z(d().showMedia?`hide_assets`:`show_assets`));$f(r,{variant:`ghost`,iconic:!0,get disabled(){return H(t)},get pressed(){return H(n)},"aria-controls":`collection-assets`,get"aria-expanded"(){return d().showMedia},get"aria-label"(){return H(i)},onclick:()=>{W4.update(e=>({...e,showMedia:!d().showMedia}))},startIcon:e,$$slots:{startIcon:!0}})}G(e,t)};q(w,e=>{zV.isSmallScreen||zV.isMediumScreen||e(T)}),G(e,n)},$$slots:{default:!0}})}};q(x,e=>{H(m)&&!a()&&e(S)}),G(e,b),k(),p()}var iEe=U(`<!> <!> <!> <!> <!> <!>`,1);function a9(e,t){O(t,!0);let n=()=>j(PL,`$selectedCollection`,s),r=()=>j(SY,`$showContentOverlay`,s),i=()=>j(Y4,`$listedEntries`,s),a=()=>j(oX,`$workflowDataReady`,s),o=()=>j(sQ,`$contentUpdatesToast`,s),[s,c]=sa(),l=/^\/collections(?:\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?)?$/,u=P(!1),d=P(!1),f=P(``),p=P(!1),m=P(void 0),h=N(()=>`files`in(n()??{})?jTe:ETe),g=()=>{let{path:e,params:t}=PY(),r=e.match(l);if(F(u,!1),F(d,!1),F(f,``),F(p,!1),F(m,t._locale,!0),delete t._locale,n()?.name===`_singletons`&&zL().length&&M(PL,void 0),!r?.groups){M(SY,!1),F(d,p3(e),!0);return}let{_collectionName:o,routeType:s,subPath:c}=r.groups;if(!o){zV.isSmallScreen?(M(PL,void 0),M(SY,!1),M(NY,Z(`viewing_collection_list`)),F(u,!0)):BY(`/collections/${(n()||Aoe()||VL())?.name}`,{replaceState:!0});return}let h=HL(o);if(!h||h.hide?M(PL,void 0):n()?.name!==h.name&&M(PL,h),!h||!n()){M(SY,!1),M(NY,Z(`collection_not_found`)),F(f,`collection_not_found`);return}let{name:g}=n(),_=UL(n()),v=`_fileMap`in n()?n()._fileMap:void 0;if(!s){if(c){M(SY,!1),M(NY,Z(`page_not_found`)),F(f,`page_not_found`);return}M(SY,!1),M(NY,Z(`viewing_x_collection`,{values:{collection:_,count:i().length}}));return}if(M(SY,!0),s===`entries`&&c&&!a()){F(p,!0),M(NY,Z(`loading_entries`,{values:{count:1}}));return}if(v){if(s===`entries`&&c){let e=v[c];if(!e){M(h4,void 0),M(NY,Z(`file_not_found`));return}let t=cX({collectionName:g,subPath:c})??QI(g,c);P7(t?{collection:h,collectionFile:e,originalEntry:t}:{collection:h,collectionFile:e,originalEntry:{slug:e.name,locales:Object.fromEntries(e._i18n.initialLocales.map(e=>[e,{}]))}}),M(NY,Z(`edit_${h._type}_announcement`,{values:{collection:_,file:XI(e)}}))}else M(h4,void 0),M(NY,Z(`file_not_found`));return}if(s===`new`&&!c)P7({collection:h,dynamicValues:t,isIndexFile:!!window.history.state?.index}),M(NY,Z(`create_entry_announcement`,{values:{collection:_}}));else if(s===`entries`&&c){let e=cX({collectionName:g,subPath:c})??i().find(e=>e.subPath===c);if(!e){M(h4,void 0),M(NY,Z(`entry_not_found`));return}Ud.current&&(P7({collection:h,originalEntry:e}),M(NY,Z(`edit_entry_announcement`,{values:{collection:_,entry:lV(n(),e)}})))}else M(h4,void 0),M(NY,Z(`entry_not_found`))};Nl(()=>(g(),()=>{M(SY,!1)})),B(()=>{H(p)&&a()&&g()});var _=iEe();Ws(`hashchange`,co,e=>{zY(e,g,l)});var v=L(_);{let e=e=>{var t=W(),n=L(t),r=e=>{zTe(e,{get isSearchPage(){return H(d)}})};q(n,e=>{(!zV.isSmallScreen||H(u))&&e(r)}),G(e,t)},t=e=>{var t=W(),r=L(t),a=e=>{f3(e,{})},o=e=>{{let t=e=>{{let t=N(()=>Z(H(f)));zQ(e,{get message(){return H(t)}})}},n=N(()=>Z(`content_library`));s3(e,{get"aria-label"(){return H(n)},mainContent:t,$$slots:{mainContent:!0}})}},s=e=>{{let t=e=>{ZTe(e,{})},r=e=>{var t=W(),r=L(t),a=e=>{rEe(e,{})};q(r,e=>{n()?._type===`entry`&&i().length&&e(a)}),G(e,t)},a=e=>{var t=W();jc(L(t),()=>H(h),(e,t)=>{t(e,{})}),G(e,t)},o=e=>{QTe(e,{})},s=N(()=>Z(`x_collection`,{values:{collection:Ud.current&&n()?UL(n()):``}})),c=N(()=>n()?.description);s3(e,{get"aria-label"(){return H(s)},get"aria-description"(){return H(c)},primaryToolbar:t,secondaryToolbar:r,mainContent:a,secondarySidebar:o,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};q(r,e=>{H(d)?e(a):H(f)?e(o,1):(!zV.isSmallScreen||!H(u))&&e(s,2)}),G(e,t)},r=N(()=>Z(`content_library`));c3(v,{uiSettingsKey:`contents-page`,get"aria-label"(){return H(r)},primarySidebar:e,main:t,$$slots:{primarySidebar:!0,main:!0}})}var y=z(v,2),b=e=>{uTe(e,{get editorLocale(){return H(m)},get loading(){return H(p)}})};q(y,e=>{r()&&e(b)});var x=z(y,2);Nh(x,{get show(){return o().saved},set show(e){la(sQ,Ds(o).saved=e,Ds(o))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(o().published?`entry_saved_and_published`:`entry_saved`,{values:{count:o().count}})]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}});var S=z(x,2);Nh(S,{get show(){return o().deletionCancelled},set show(e){la(sQ,Ds(o).deletionCancelled=e,Ds(o))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.deletion_cancelled`)]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}});var C=z(S,2);Nh(C,{get show(){return o().discarded},set show(e){la(sQ,Ds(o).discarded=e,Ds(o))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`workflow.changes_discarded`,{values:{count:o().count}})]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Nh(z(C,2),{get show(){return o().deleted},set show(e){la(sQ,Ds(o).deleted=e,Ds(o))},children:(e,t)=>{Hl(e,{status:`success`,children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(o().deletionPending?`workflow.deletion_pending`:`entries_deleted`,{values:{count:o().count}})]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,_),k(),c()}function o9(e,t){O(t,!0);{let t=N(()=>Z(`prefs.i18n.translators.default.select_service`));Km(e,{get"aria-label"(){return H(t)},get value(){return KH.defaultTranslationService},onChange:e=>{KH.defaultTranslationService=e.detail.value},children:(e,t)=>{var n=W();Cc(L(n),17,()=>Object.entries(V6),([e,{serviceLabel:t}])=>e,(e,t)=>{var n=N(()=>Tr(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1].serviceLabel;{let t=N(()=>r()===KH.defaultTranslationService);bm(e,{get label(){return i()},get value(){return r()},get selected(){return H(t)}})}}),G(e,n)},$$slots:{default:!0}})}k()}var aEe=U(`<!> <!> <!>`,1);function oEe(e,t){O(t,!0);let n=()=>j(H6,`$translator`,a),r=()=>j(SY,`$showContentOverlay`,a),i=()=>j(TY,`$translatorApiKeyDialogState`,a),[a,o]=sa(),s=N(()=>n().serviceId),c=N(()=>n().apiLabel),l=N(()=>n().developerURL),u=N(()=>n().apiKeyURL),d=N(()=>n().apiKeyPattern),f=P(``);B(()=>{F(f,KH.apiKeys?.[H(s)]??``,!0)}),B(()=>{!r()&&i().show&&(la(TY,Ds(i).show=!1,Ds(i)),i().resolve?.())});let p=()=>{let e=H(f).trim();H(d)?.test(e)&&(KH.apiKeys??={},KH.apiKeys[H(s)]=e,la(TY,Ds(i).show=!1,Ds(i)),i().resolve?.(e))};{let t=N(()=>Z(`translate_fields`,{values:{count:i().multiple?2:1}})),n=N(()=>({spellcheck:!1,monospace:!0,"aria-label":Z(`api_key`)}));pm(e,{get title(){return H(t)},get textboxAttrs(){return H(n)},oninput:()=>p(),onOk:()=>p(),onCancel:()=>{i().resolve?.()},get open(){return i().show},set open(e){la(TY,Ds(i).show=e,Ds(i))},get value(){return H(f)},set value(e){F(f,e,!0)},children:(e,t)=>{var n=aEe(),r=L(n);o9(r,{});var i=z(r,2);Wp(i,{}),kc(z(i,2),()=>gt(Z(`prefs.i18n.translators.description`,{values:{service:H(c),homeHref:`href="${H(l)}"`,apiKeyHref:`href="${H(u)}"`}}).replace(/[\u2068\u2069]/g,``),PB)),G(e,n)},$$slots:{default:!0}})}k(),o()}function sEe(e,t){O(t,!0);let n=()=>j(YL,`$entryParseErrors`,r),[r,i]=sa(),a=P(!!n().length);Nh(e,{get show(){return H(a)},set show(e){F(a,e,!0)},children:(e,t)=>{Hl(e,{status:`error`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`entry_parse_errors`,{values:{count:n().length}})]),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),k(),i()}var s9,c9=ra([Hj(()=>zV.isLargeScreen),Hj(()=>zV.hasMouse),Hj(()=>zV.isLocalHost),nY,Hj(()=>zW.account)],([e,t,n,r,i])=>e&&t&&!n&&!!r?.isGit&&!!i?.token),l9=na(!1),u9=()=>{if(s9)return s9;let{databaseName:e}=A(nY)?.repository??{};if(e)return s9=new UA(e,`ui-settings`),s9},d9=async e=>{if(s9=u9(),s9)return(await s9.get(`onboarding`)??{})[e]},f9=async(e,t)=>{if(s9=u9(),!s9)return;let n=await s9.get(`onboarding`)??{};await s9.set(`onboarding`,{...n,[e]:t})},cEe=U(` <!> <!>`,1),lEe=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1);function uEe(e,t){O(t,!0);let[n,r]=sa(),i=P(!1),a=async()=>{F(i,!await d9(`mobileCta`))},o=()=>{F(i,!1),f9(`mobileCta`,!0)};B(()=>{a()});var s=lEe(),c=L(s);vc(c,()=>({"--sui-infobar-message-justify-content":`center`})),rp(c.lastChild,{get show(){return H(i)},dismissible:!1,children:(e,t)=>{mi();var n=cEe(),r=L(n),i=z(r);{let e=N(()=>Z(`mobile_promo_button`));$f(i,{variant:`link`,get label(){return H(e)},onclick:()=>{M(l9,!0),o()}})}var a=z(i,2);{let e=N(()=>Z(`later`));$f(a,{variant:`link`,get label(){return H(e)},onclick:()=>{o()}})}V(e=>K(r,`${e??``} `),[()=>Z(`mobile_promo_title`)]),G(e,n)},$$slots:{default:!0}}),D(c),G(e,s),k(),r()}var dEe=U(` <!> <!>`,1),fEe=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1);function pEe(e,t){O(t,!0);let n=P(``),r=P(!1),i=!1,a=async()=>{if(await d9(`newLanguageCta`))return;let e=Ud.current,t=navigator.language,[i]=t.split(`-`);t!==e&&i!==e&&(F(n,xd.find(e=>e===t)??xd.find(e=>e.split(`-`)[0]===i)??``,!0),H(n)&&H(n)!==e&&F(r,!0))},o=()=>{F(r,!1),f9(`newLanguageCta`,!0)};B(()=>{let{locale:e}=KH;Ds(()=>{i||!e||e===`auto`||(i=!0,a())})});var s=fEe(),c=L(s);vc(c,()=>({"--sui-infobar-message-justify-content":`center`})),rp(c.lastChild,{get show(){return H(r)},dismissible:!1,children:(e,t)=>{mi();var r=dEe(),i=L(r),a=z(i);{let e=N(()=>Z(`change_language`,{locale:H(n)}));$f(a,{variant:`link`,get label(){return H(e)},onclick:()=>{KH.locale=H(n),o()}})}var s=z(a,2);{let e=N(()=>Z(`later`,{locale:H(n)}));$f(s,{variant:`link`,get label(){return H(e)},onclick:()=>{o()}})}V(e=>K(i,`${e??``} `),[()=>Z(`new_language_available`,{locale:H(n),values:{locale:xL(H(n),{displayLocale:H(n)})}})]),G(e,r)},$$slots:{default:!0}}),D(c),G(e,s),k()}function mEe(e,t){O(t,!0);let[n,r]=sa();Nl(()=>{M(NY,Z(`page_not_found`))});{let t=e=>{s3(e,{mainContent:e=>{{let t=N(()=>Z(`page_not_found`));zQ(e,{get message(){return H(t)}})}},$$slots:{mainContent:!0}})},n=N(()=>Z(`page_not_found`));c3(e,{get"aria-label"(){return H(n)},main:t,$$slots:{main:!0}})}k(),r()}var hEe=U(`<div role="none" class="wrapper svelte-t2r4ty"><!></div>`),gEe={hash:`svelte-t2r4ty`,code:`.wrapper.svelte-t2r4ty {display:contents;.sui.select-button-group {gap:4px;
|
||
|
||
@media (width < 768px) {justify-content:space-evenly;width:100%;
|
||
}}.sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}}`};function p9(e,t){O(t,!0),J(e,gEe);let n=()=>j(lM,`$allAssetFolders`,c),r=()=>j(dM,`$selectedAssetFolder`,c),i=()=>j(nX,`$workflowEnabled`,c),a=()=>j(tY,`$backendName`,c),o=()=>j(MY,`$selectedPageName`,c),s=()=>j(P4,`$searchMode`,c),[c,l]=sa(),u=N(()=>{let e=[{key:`collections`,label:Z(`contents`),icon:`article`,link:`/collections`,searchMode:`contents`}];return n().length&&e.push({key:`assets`,label:Z(`assets`),icon:`photo`,link:zV.isSmallScreen?`/assets`:`/assets/${r()?.internalPath??`-/all`}`,searchMode:`assets`}),i()&&e.push({key:`workflow`,label:Z(`editorial_workflow`),icon:`rebase_edit`,link:`/workflow`,searchMode:void 0}),a(),zV.isSmallScreen&&e.push({key:`menu`,label:Z(`menu`),icon:`menu`,link:`/menu`,searchMode:void 0}),e});var d=hEe(),f=I(d);{let e=N(()=>Z(`switch_page`));jp(f,{get"aria-label"(){return H(e)},"aria-controls":`page-container`,children:(e,t)=>{var n=W();Cc(L(n),19,()=>H(u),({key:e,label:t,icon:n,link:r,searchMode:i})=>e,(e,t,n)=>{let r=()=>H(t).key,i=()=>H(t).label,a=()=>H(t).icon,c=()=>H(t).link,l=()=>H(t).searchMode;{let t=e=>{Rl(e,{get name(){return a()}})},u=N(()=>o()===r()||s()===l()),d=N(()=>H(n)+1);Np(e,{variant:`ghost`,iconic:!0,get selected(){return H(u)},get"aria-label"(){return i()},get keyShortcuts(){return`Alt+${H(d)??``}`},onclick:()=>{BY(c())},startIcon:t,$$slots:{startIcon:!0}})}}),G(e,n)},$$slots:{default:!0}})}D(d),G(e,d),k(),l()}var _Ee=U(`<div role="none" class="buttons"><!></div>`);function vEe(e,t){O(t,!0);let n=()=>j(jY,`$hasOverlay`,r),[r,i]=sa();sp(e,{get inert(){return n()},children:(e,t)=>{{let t=N(()=>Z(`global`));Mj(e,{variant:`primary`,get"aria-label"(){return H(t)},children:(e,t)=>{var n=_Ee();p9(I(n),{}),D(n),G(e,n)},$$slots:{default:!0}})}},$$slots:{default:!0}}),k(),i()}function yEe(e,t){O(t,!0);let n=P(!1),r,i=e=>{e.preventDefault(),r=e,F(n,!0)},a=()=>{r=null,F(n,!1)};Nl(()=>(window.addEventListener(`beforeinstallprompt`,i),window.addEventListener(`appinstalled`,a),()=>{window.removeEventListener(`beforeinstallprompt`,i),window.removeEventListener(`appinstalled`,a)}));var o=W(),s=L(o),c=e=>{{let t=N(()=>Z(`install_as_app`));Sm(e,{get label(){return H(t)},onclick:async()=>{await r?.prompt()}})}};q(s,e=>{H(n)&&e(c)}),G(e,o),k()}var bEe=U(`<kbd class="svelte-13q15u"> </kbd>`),xEe=U(`<!> <!>`,1),SEe=U(`<div role="none" class="wrapper svelte-13q15u"><!></div>`),CEe={hash:`svelte-13q15u`,code:`.wrapper.svelte-13q15u {display:contents;.table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);&:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.feature {flex:auto;}.keys {display:flex;gap:8px;}}}kbd.svelte-13q15u {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-color:var(--sui-primary-accent-color);border-radius:4px;padding:0 8px;height:32px;min-width:32px;background-color:var(--sui-tertiary-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}`};function m9(e,t){O(t,!0),J(e,CEe);let n=X(t,`open`,15,!1),r=X(t,`onClose`,3,void 0),i=[{feature:`view_content_library`,keys:`Alt+1`},{feature:`view_asset_library`,keys:`Alt+2`},{feature:`search`,keys:`Accel+F`},{feature:`create_entry`,keys:`Accel+E`},{feature:`save_entry`,keys:`Accel+S`},{feature:`cancel_editing`,keys:`Escape`}];{let t=N(()=>Z(`keyboard_shortcuts`));Yp(e,{get title(){return H(t)},size:`small`,showOk:!1,showCancel:!1,showClose:!0,style:`--sui-dialog-small-content-max-height:auto`,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=SEe(),r=I(n);{let e=N(()=>Z(`keyboard_shortcuts`));yh(r,{get"aria-label"(){return H(e)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>i,({feature:e,keys:t})=>t,(e,t)=>{let n=()=>H(t).feature,r=()=>H(t).keys;hh(e,{children:(e,t)=>{var i=xEe(),a=L(i);dh(a,{class:`feature`,children:(e,t)=>{mi();var r=ec();V(e=>K(r,e),[()=>Z(`keyboard_shortcuts_.${n()}`)]),G(e,r)},$$slots:{default:!0}}),dh(z(a,2),{class:`keys`,children:(e,t)=>{var n=W();Cc(L(n),16,()=>r().split(`+`),e=>e,(e,t)=>{var n=bEe(),r=R(n,!0);V(e=>K(r,e),[()=>t.replace(`Accel`,zV.isMacOS?`⌘`:`Ctrl`)]),G(e,n)}),G(e,n)},$$slots:{default:!0}}),G(e,i)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}D(n),G(e,n)},$$slots:{default:!0}})}k()}var wEe=U(`<!> <!>`,1);function h9(e,t){O(t,!0);let n=P(!1);var r=wEe(),i=L(r),a=e=>{{let t=N(()=>Z(`keyboard_shortcuts`));Sm(e,{get label(){return H(t)},onclick:()=>{F(n,!0)}})}};q(i,e=>{zV.hasMouse&&e(a)}),m9(z(i,2),{onClose:()=>{t.menuButton?.focus()},get open(){return H(n)},set open(e){F(n,e,!0)}}),G(e,r),k()}function g9(e,t){O(t,!0);let n=X(t,`defaultValue`,3,!0),r=P(!0);B(()=>{F(r,!!(KH[t.key]??n()),!0)}),B(()=>{KH[t.key]!==H(r)&&(KH[t.key]=H(r))}),sh(e,{get label(){return t.label},get checked(){return H(r)},set checked(e){F(r,e,!0)}}),k()}var TEe=U(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section>`);function EEe(e,t){O(t,!0),X(t,`onChange`,3,void 0);var n=TEe(),r=I(n),i=R(r,!0),a=z(r,2),o=R(a,!0),s=z(a,2),c=I(s);{let e=N(()=>Z(`prefs.accessibility.underline_links.switch_label`));g9(c,{key:`underlineLinks`,get label(){return H(e)}})}D(s),D(n),V((e,t)=>{K(i,e),K(o,t)},[()=>Z(`prefs.accessibility.underline_links.title`),()=>Z(`prefs.accessibility.underline_links.description`)]),G(e,n),k()}var DEe=U(`<section><h3> </h3> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>`),OEe=U(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section> <section><h3> </h3> <p> </p> <div role="none"><!></div></section> <!>`,1);function kEe(e,t){O(t,!0);let n=()=>j(eX,`$skipCIConfigured`,r),[r,i]=sa(),a=X(t,`onChange`,3,void 0);var o=OEe(),s=L(o),c=I(s),l=R(c,!0),u=z(c,2),d=R(u,!0),f=z(u,2),p=I(f);{let e=N(()=>Z(`prefs.advanced.beta.switch_label`));g9(p,{key:`beta`,get label(){return H(e)},defaultValue:!1})}D(f),D(s);var m=z(s,2),h=I(m),g=R(h,!0),_=z(h,2),v=R(_,!0),y=z(_,2),b=I(y);{let e=N(()=>Z(`prefs.advanced.developer_mode.switch_label`));g9(b,{key:`devModeEnabled`,get label(){return H(e)},defaultValue:!1})}D(y),D(m);var x=z(m,2),S=e=>{var t=DEe(),n=I(t),r=R(n,!0),i=z(n,2),o=R(i,!0),s=z(i,2),c=I(s);{let e=N(()=>Z(`prefs.advanced.deploy_hook.url.field_label`));fm(c,{dir:`ltr`,flex:!0,get"aria-label"(){return H(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Z(KH.deployHookURL?`prefs.advanced.deploy_hook.url.saved`:`prefs.advanced.deploy_hook.url.removed`)})},get value(){return KH.deployHookURL},set value(e){KH.deployHookURL=e}})}D(s);var l=z(s,2),u=I(l);{let e=N(()=>Z(`prefs.advanced.deploy_hook.auth.field_label`));fm(u,{dir:`ltr`,flex:!0,get"aria-label"(){return H(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Z(KH.deployHookAuthHeader?`prefs.advanced.deploy_hook.auth.saved`:`prefs.advanced.deploy_hook.auth.removed`)})},get value(){return KH.deployHookAuthHeader},set value(e){KH.deployHookAuthHeader=e}})}D(l),D(t),V((e,t)=>{K(r,e),K(o,t)},[()=>Z(`prefs.advanced.deploy_hook.title`),()=>Z(`prefs.advanced.deploy_hook.description`)]),G(e,t)};q(x,e=>{n()&&e(S)}),V((e,t,n,r)=>{K(l,e),K(d,t),K(g,n),K(v,r)},[()=>Z(`prefs.advanced.beta.title`),()=>Z(`prefs.advanced.beta.description`),()=>Z(`prefs.advanced.developer_mode.title`),()=>Z(`prefs.advanced.developer_mode.description`)]),G(e,o),k(),i()}var AEe=U(`<section><h3> </h3> <div role="none"><!></div></section>`);function jEe(e,t){O(t,!0),X(t,`onChange`,3,void 0);var n=AEe(),r=I(n),i=R(r,!0),a=z(r,2),o=I(a);{let e=N(()=>Z(`prefs.appearance.select_theme`));jp(o,{get"aria-label"(){return H(e)},onChange:e=>{KH.theme=e.detail.value},children:(e,t)=>{var n=W();Cc(L(n),16,()=>[WH,`dark`,`light`],e=>e,(e,t)=>{{let n=N(()=>Z(t===`auto`?`automatic`:`prefs.theme.${t}`)),r=N(()=>!KH.theme&&t===`auto`||KH.theme===t);Np(e,{variant:`tertiary`,get label(){return H(n)},get value(){return t},get selected(){return H(r)}})}}),G(e,n)},$$slots:{default:!0}})}D(a),D(n),V(e=>K(i,e),[()=>Z(`prefs.appearance.theme`)]),G(e,n),k()}var MEe=U(`<section><h3> </h3> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>`);function NEe(e,t){O(t,!0),X(t,`onChange`,3,void 0);var n=MEe(),r=I(n),i=R(r,!0),a=z(r,2),o=I(a);{let e=N(()=>Z(`prefs.contents.editor.use_draft_backup.switch_label`));g9(o,{key:`useDraftBackup`,get label(){return H(e)}})}D(a);var s=z(a,2),c=I(s);{let e=N(()=>Z(`prefs.contents.editor.close_on_save.switch_label`));g9(c,{key:`closeOnSave`,get label(){return H(e)}})}D(s);var l=z(s,2),u=I(l);{let e=N(()=>Z(`prefs.contents.editor.close_with_escape.switch_label`));g9(u,{key:`closeWithEscape`,get label(){return H(e)}})}D(l),D(n),V(e=>K(i,e),[()=>Z(`prefs.contents.editor.title`)]),G(e,n),k()}function _9(e,t){O(t,!0);let n=X(t,`onChange`,3,void 0),r=N(()=>t.service.apiKeyPattern),i=P(``);Nl(()=>{F(i,KH.apiKeys?.[t.serviceId]??``,!0)}),Rj(e,{flex:!0,autocomplete:`off`,spellcheck:`false`,get"aria-label"(){return t.ariaLabel},onchange:()=>{let e=H(i).trim(),a=!!e&&!!H(r)&&!H(r).test(e);KH.apiKeys??={},KH.apiKeys[t.serviceId]=a?``:e,n()?.({message:Z(a?`prefs.changes.api_key_invalid`:e?`prefs.changes.api_key_saved`:`prefs.changes.api_key_removed`),status:a?`error`:`success`})},get value(){return H(i)},set value(e){F(i,e,!0)}}),k()}var PEe=U(`<section><h4> </h4> <div role="none"><!></div></section>`),FEe=U(`<section><h3> </h3> <div role="none"><!></div></section> <section><h3> </h3> <p></p> <!></section>`,1);function IEe(e,t){O(t,!0);let n=X(t,`onChange`,3,void 0);var r=FEe(),i=L(r),a=I(i),o=R(a,!0),s=z(a,2);o9(I(s),{}),D(s),D(i);var c=z(i,2),l=I(c),u=R(l,!0),d=z(l,2);kc(d,()=>FB(Z(`prefs.i18n.translators.api_keys.description`),`https://sveltiacms.app/en/docs/integrations/translations`),!0),D(d),Cc(z(d,2),17,()=>Object.entries(V6),([e,t])=>e,(e,t)=>{var r=N(()=>Tr(H(t),2));let i=()=>H(r)[0],a=()=>H(r)[1],o=N(()=>a().serviceLabel);var s=PEe(),c=I(s),l=R(c,!0),u=z(c,2),d=I(u);{let e=N(()=>Z(`prefs.i18n.translators.field_label`,{values:{service:H(o)}}));_9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return H(e)},get onChange(){return n()}})}D(u),D(s),V(()=>K(l,H(o))),G(e,s)}),D(c),V((e,t)=>{K(o,e),K(u,t)},[()=>Z(`prefs.i18n.translators.default.title`),()=>Z(`prefs.i18n.translators.api_keys.title`)]),G(e,r),k()}var LEe=U(`<!> <!> <!>`,1),REe=U(`<section><h3> </h3> <div role="none"><!></div></section> <!>`,1);function zEe(e,t){O(t,!0);let n=()=>j(PZ,`$appLocaleLoading`,r),[r,i]=sa();X(t,`onChange`,3,void 0);let a=N(()=>xd.map(e=>{let t=xL(e,{displayLocale:Ud.current})??e,n=xL(e,{displayLocale:e})??e,r=t===n?t:`${t} — ${n}`;return{value:e,searchValue:`${r} (${e})`,label:r}}).sort((e,t)=>e.label.localeCompare(t.label))),o=N(()=>KH.locale??`auto`),s=P(``);B(()=>{n()&&F(s,n(),!0)});var c=REe(),l=L(c),u=I(l),d=R(u,!0),f=z(u,2);_c(I(f),()=>Ud.current,e=>{{let t=N(()=>Z(`prefs.language.ui_language.select_language`));Km(e,{get"aria-label"(){return H(t)},get value(){return H(o)},onChange:e=>{KH.locale=e.detail.value},children:(e,t)=>{var n=LEe(),r=L(n);{let e=N(()=>Z(`automatic`)),t=N(()=>H(o)===WH);bm(r,{get value(){return WH},get label(){return H(e)},get selected(){return H(t)}})}var i=z(r,2);Hp(i,{}),Cc(z(i,2),17,()=>H(a),({value:e,searchValue:t,label:n})=>e,(e,t)=>{let n=()=>H(t).value,r=()=>H(t).searchValue,i=()=>H(t).label;{let t=N(()=>n()===H(o));bm(e,{get value(){return n()},get searchValue(){return r()},get label(){return i()},get selected(){return H(t)}})}}),G(e,n)},$$slots:{default:!0}})}}),D(f),D(l);var p=z(l,2);{let e=N(()=>!!n());Nh(p,{get show(){return H(e)},duration:0,children:(e,t)=>{Hl(e,{status:`info`,children:(e,t)=>{var n=W(),r=L(n),i=e=>{var t=ec();V(e=>K(t,e),[()=>Z(`switching_language`,{values:{locale:xL(H(s))??H(s)}})]),G(e,t)};q(r,e=>{H(s)&&e(i)}),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})}V(e=>K(d,e),[()=>Z(`prefs.language.ui_language.title`)]),G(e,c),k(),i()}var v9=U(`<section><h4> </h4> <div role="none"><!></div></section>`),BEe=U(`<section><h3> </h3> <p></p> <!></section> <section><h3> </h3> <p></p> <!></section>`,1);function VEe(e,t){O(t,!0);let n=X(t,`onChange`,3,void 0),r=N(()=>{let{providers:e=[]}=z8();return Object.entries(R8).filter(([t,{authType:n}])=>e.includes(t)&&n!==`none`)}),i=N(()=>Object.entries(jz).filter(([,{isEnabled:e,authType:t}])=>(e?.()??!0)&&t!==`widget`));var a=BEe(),o=L(a),s=I(o),c=R(s,!0),l=z(s,2);kc(l,()=>FB(H(i).length?Z(`prefs.media.cloud_storage.api_keys.description`):Z(`prefs.media.cloud_storage.no_services`),`https://sveltiacms.app/en/docs/media`),!0),D(l),Cc(z(l,2),17,()=>H(i),([e,t])=>e,(e,t)=>{var r=N(()=>Tr(H(t),2));let i=()=>H(r)[0],a=()=>H(r)[1],o=N(()=>a().serviceLabel);var s=v9(),c=I(s),l=R(c,!0),u=z(c,2),d=I(u);{let e=N(()=>Z(`prefs.media.cloud_storage.field_label`,{values:{service:H(o)}}));_9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return H(e)},get onChange(){return n()}})}D(u),D(s),V(()=>K(l,H(o))),G(e,s)}),D(o);var u=z(o,2),d=I(u),f=R(d,!0),p=z(d,2);kc(p,()=>FB(H(r).length?Z(`prefs.media.stock_photos.api_keys.description`):Z(`prefs.media.stock_photos.no_services`),`https://sveltiacms.app/en/docs/integrations/stock-photos`),!0),D(p),Cc(z(p,2),17,()=>H(r),([e,t])=>e,(e,t)=>{var r=N(()=>Tr(H(t),2));let i=()=>H(r)[0],a=()=>H(r)[1],o=N(()=>a().serviceLabel);var s=v9(),c=I(s),l=R(c,!0),u=z(c,2),d=I(u);{let e=N(()=>Z(`prefs.media.stock_photos.field_label`,{values:{service:H(o)}}));_9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return H(e)},get onChange(){return n()}})}D(u),D(s),V(()=>K(l,H(o))),G(e,s)}),D(u),V((e,t)=>{K(c,e),K(f,t)},[()=>Z(`prefs.media.cloud_storage.api_keys.title`),()=>Z(`prefs.media.stock_photos.api_keys.title`)]),G(e,a),k()}var y9=ra([$H],([e])=>[{key:`appearance`,icon:`palette`,component:jEe},{key:`language`,icon:`language`,component:zEe},{key:`contents`,icon:`library_books`,component:NEe},{key:`i18n`,icon:`translate`,component:IEe,enabled:(e?.i18n?.locales?.length??0)>1},{key:`media`,icon:`photo_library`,component:VEe},{key:`accessibility`,icon:`accessibility_new`,component:EEe},{key:`advanced`,icon:`build`,component:kEe}]),HEe=U(`<div class="container svelte-1attlke" role="none"><!></div> <!>`,1),UEe={hash:`svelte-1attlke`,code:`.container.svelte-1attlke {display:contents;section:not(:first-child) {margin:16px 0 0;}p {margin-top:0;}h3 {font-size:inherit;& ~ div {margin:8px 0 0;}& ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}}h4 {margin-bottom:4px;font-size:var(--sui-font-size-small);}}`};function b9(e,t){J(e,UEe);let n=P(``),r=P(`success`),i=P(!1);var a=HEe(),o=L(a);jc(I(o),()=>t.Panel,(e,t)=>{t(e,{onChange:({message:e,status:t})=>{F(n,e,!0),F(r,t??`success`,!0),F(i,!0)}})}),D(o),Nh(z(o,2),{get show(){return H(i)},set show(e){F(i,e,!0)},children:(e,t)=>{Hl(e,{get status(){return H(r)},children:(e,t)=>{mi();var r=ec();V(()=>K(r,H(n))),G(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),G(e,a)}var WEe=U(`<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>`),GEe={hash:`svelte-pwxwga`,code:`.wrapper.svelte-pwxwga {display:flex;.sui.tab-list {flex:none;}.sui.tab-panel {flex:auto;border-width:0;}}`};function KEe(e,t){O(t,!0),J(e,GEe);let n=X(t,`open`,15,!1),r=X(t,`onClose`,3,void 0),i=P(`appearance`);{let t=N(()=>Z(`settings`));Yp(e,{get title(){return H(t)},size:`large`,showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=WEe(),r=I(n);{let e=N(()=>Z(`categories`));Ch(r,{orientation:`vertical`,get"aria-label"(){return H(e)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>A(y9),({key:e,icon:t,enabled:n=!0})=>e,(e,t)=>{let n=()=>H(t).key,r=()=>H(t).icon,a=Ta(()=>wr(H(t).enabled,!0));var o=W(),s=L(o),c=e=>{{let t=e=>{Rl(e,{get name(){return r()}})},a=N(()=>Z(`prefs.${n()}.title`)),o=N(()=>n()===H(i));kh(e,{get label(){return H(a)},get selected(){return H(o)},get"aria-controls"(){return`prefs-tab-${n()??``}`},onSelect:()=>{F(i,n(),!0)},startIcon:t,$$slots:{startIcon:!0}})}};q(s,e=>{H(a)&&e(c)}),G(e,o)}),G(e,n)},$$slots:{default:!0}})}Cc(z(r,2),17,()=>A(y9),({key:e,component:t})=>e,(e,t)=>{let n=()=>H(t).key,r=()=>H(t).component;Dh(e,{get id(){return`prefs-tab-${n()??``}`},children:(e,t)=>{b9(e,{get Panel(){return r()}})},$$slots:{default:!0}})}),D(n),G(e,n)},$$slots:{default:!0}})}k()}var x9=U(`<!> <!>`,1),qEe=U(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1);function S9(e,t){O(t,!0);let n=()=>j(tY,`$backendName`,a),r=()=>j(nY,`$backend`,a),i=()=>j(c9,`$canShowMobileSignInDialog`,a),[a,o]=sa(),s=P(!1),c=N(()=>n()===`local`),l=N(()=>n()===`test-repo`);var u=x9(),d=L(u);{let e=N(()=>Z(`account`));xm(d,{get"aria-label"(){return H(e)},children:(e,n)=>{var a=qEe(),o=L(a);{let e=N(()=>H(c)?Z(`working_with_local_repo`):H(l)?Z(`working_with_test_repo`):Z(`signed_in_as_x`,{values:{name:zW.account?.login}})),t=N(()=>H(c)||H(l));Sm(o,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{AY(zW.account?.profileURL)}})}var u=z(o,2);Hp(u,{});var d=z(u,2);{let e=N(()=>Z(`live_site`));Sm(d,{get label(){return H(e)},onclick:()=>{WY()}})}var f=z(d,2),p=e=>{var t=x9(),n=L(t);{let e=N(()=>Z(`git_repository`)),t=N(()=>!r()?.repository?.treeBaseURL);Sm(n,{get label(){return H(e)},get disabled(){return H(t)},onclick:()=>{AY(r()?.repository?.treeBaseURL)}})}var i=z(n,2);{let e=N(()=>Z(`cms_config`));Sm(i,{get label(){return H(e)},onclick:()=>{BY(`/config`,{transitionType:`forwards`})}})}G(e,t)};q(f,e=>{KH.devModeEnabled&&e(p)});var m=z(f,2);Hp(m,{});var h=z(m,2);{let e=N(()=>Z(`settings`));Sm(h,{get label(){return H(e)},onclick:()=>{zV.isSmallScreen?BY(`/settings`,{transitionType:`forwards`}):F(s,!0)}})}var g=z(h,2),_=e=>{h9(e,{get menuButton(){return t.menuButton}})};q(g,e=>{KH.devModeEnabled||e(_)});var v=z(g,2),y=e=>{{let t=N(()=>Z(`sign_in_with_mobile`));Sm(e,{get label(){return H(t)},onclick:()=>{M(l9,!0)}})}};q(v,e=>{i()&&e(y)});var b=z(v,2);yEe(b,{});var x=z(b,2);Hp(x,{});var S=z(x,2);{let e=N(()=>Z(`sign_out`));Sm(S,{get label(){return H(e)},onclick:async()=>{window.requestAnimationFrame(()=>{UX()})}})}G(e,a)},$$slots:{default:!0}})}KEe(z(d,2),{onClose:()=>{t.menuButton?.focus()},get open(){return H(s)},set open(e){F(s,e,!0)}}),G(e,u),k(),o()}var JEe=U(`<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>`),YEe=U(`<div role="none" class="wrapper svelte-q0ng4j"><!></div>`),XEe={hash:`svelte-q0ng4j`,code:`.wrapper.svelte-q0ng4j {display:contents;button.avatar {border-width:0;background-color:transparent;}}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}`};function ZEe(e,t){O(t,!0),J(e,XEe);let n=()=>j(tY,`$backendName`,r),[r,i]=sa(),a=P(void 0),o=N(()=>n()===`local`),s=N(()=>!!zW.account?.avatarURL);var c=YEe(),l=I(c);{let e=e=>{var t=W(),n=L(t),r=e=>{Rl(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{var t=JEe();V(()=>Y(t,`src`,zW.account?.avatarURL)),G(e,t)},a=e=>{Rl(e,{name:`account_circle`})};q(n,e=>{H(o)?e(r):H(s)?e(i,1):e(a,-1)}),G(e,t)},t=e=>{S9(e,{get menuButton(){return H(a)}})},n=N(()=>!H(o)),r=N(()=>H(o)?Z(`local_workflow.indicator`):void 0),i=N(()=>H(s)?`avatar`:``),c=N(()=>Z(`show_account_menu`));Ol(Ip(l,{variant:`ghost`,get iconic(){return H(n)},get label(){return H(r)},get class(){return H(i)},popupPosition:`bottom-right`,get"aria-label"(){return H(c)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>F(a,e,!0),()=>H(a))}D(c),G(e,c),k(),i()}var C9=U(`<!> <!>`,1);function QEe(e,t){O(t,!0);let n=()=>j(SG,`$openAuthoring`,r),[r,i]=sa(),a=N(()=>zL({visible:!0,type:`entry`}));{let t=e=>{Rl(e,{name:`add`})},r=e=>{{let t=N(()=>Z(`create_entry_or_assets`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var r=C9(),i=L(r),o=e=>{var t=C9(),n=L(t);Cc(n,17,()=>H(a),e=>e.name,(e,t)=>{let n=N(()=>{let{name:e,label:n,label_singular:r,create:i=!0,limit:a=1/0}=H(t);return{name:e,label:n,labelSingular:r,create:i,limit:a}});{let t=N(()=>H(n).labelSingular||H(n).label||H(n).name),r=N(()=>!H(n).create||pB(H(n).name).length>=H(n).limit);Sm(e,{get label(){return H(t)},get disabled(){return H(r)},onclick:()=>{BY(`/collections/${H(n).name}/new`,{transitionType:`forwards`})}})}}),Hp(z(n,2),{}),G(e,t)};q(i,e=>{H(a).length&&e(o)});var s=z(i,2);{let e=N(()=>Z(`assets`));Sm(s,{get label(){return H(e)},get disabled(){return n()},onclick:async()=>{BY(`/assets`,{transitionType:`forwards`}),await vf(100),M(mY,!0)}})}G(e,r)},$$slots:{default:!0}})}},i=N(()=>Z(`create_entry_or_assets`));Ip(e,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(i)},endIcon:t,popup:r,$$slots:{endIcon:!0,popup:!0}})}k(),i()}var $Ee=U(`<span class="version svelte-wmw2gz"> </span>`),eDe={hash:`svelte-wmw2gz`,code:`.version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}`};function tDe(e,t){O(t,!0),J(e,eDe);{let t=e=>{var t=W(),n=L(t),r=e=>{var t=$Ee(),n=R(t);V(e=>{Y(t,`aria-label`,`(${e??``})`),K(n,`v${Nz??``}`)},[()=>Z(`version_x`,{values:{version:Nz}})]),G(e,t)};q(n,e=>{KH.devModeEnabled&&e(r)}),G(e,t)},n=N(()=>Z(`release_notes`));Sm(e,{get label(){return H(n)},onclick:()=>{AY(`https://github.com/sveltia/sveltia-cms/releases`)},endIcon:t,$$slots:{endIcon:!0}})}k()}var w9=(e,t=br,n=br)=>{{let r=N(()=>Z(t()));Sm(e,{get label(){return H(r)},onclick:()=>{AY(n())}})}},nDe=U(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),rDe=U(`<!> <!>`,1);function T9(e,t){O(t,!0);{let n=N(()=>Z(`help`));xm(e,{get"aria-label"(){return H(n)},children:(e,n)=>{var r=rDe(),i=L(r);h9(i,{get menuButton(){return t.menuButton}});var a=z(i,2),o=e=>{var t=nDe(),n=L(t);w9(n,()=>`documentation`,()=>`https://sveltiacms.app/en/docs`);var r=z(n,2);tDe(r,{});var i=z(r,2);w9(i,()=>`announcements`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/announcements`);var a=z(i,2);Hp(a,{});var o=z(a,2);w9(o,()=>`report_issue`,()=>`https://github.com/sveltia/sveltia-cms/issues`);var s=z(o,2);w9(s,()=>`share_feedback`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/ideas`);var c=z(s,2);w9(c,()=>`get_help`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/q-a`);var l=z(c,2);w9(l,()=>`donate`,()=>`https://github.com/sponsors/kyoshino`);var u=z(l,2);Hp(u,{});var d=z(u,2);w9(d,()=>`bluesky`,()=>`https://bsky.app/profile/sveltiacms.app`),w9(z(d,2),()=>`join_discord`,()=>`https://discord.com/invite/5hwCGqup5b`),G(e,t)};q(a,e=>{KH.devModeEnabled&&e(o)}),G(e,r)},$$slots:{default:!0}})}k()}var iDe=U(`<div role="none" class="wrapper svelte-bzzge3"><!></div> <!>`,1),aDe={hash:`svelte-bzzge3`,code:`.wrapper.svelte-bzzge3 {display:contents;}`};function oDe(e,t){O(t,!0),J(e,aDe);let n=P(void 0),r=P(!1);var i=iDe(),a=L(i),o=I(a);{let e=e=>{Rl(e,{name:`help`})},t=e=>{T9(e,{get menuButton(){return H(n)}})},r=N(()=>Z(`show_help_menu`));Ol(Ip(o,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return H(r)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>F(n,e,!0),()=>H(n))}D(a),m9(z(a,2),{onClose:()=>{H(n)?.focus()},get open(){return H(r)},set open(e){F(r,e,!0)}}),G(e,i),k()}function sDe(e,t){O(t,!0);{let t=e=>{Rl(e,{name:`notifications`})},n=N(()=>Z(`show_notifications`));$f(e,{variant:`ghost`,iconic:!0,hidden:!0,get"aria-label"(){return H(n)},onclick:()=>{},startIcon:t,$$slots:{startIcon:!0}})}k()}var cDe=U(`<img alt="" class="logo svelte-15c9hhi"/>`),lDe={hash:`svelte-15c9hhi`,code:`img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}`};function uDe(e,t){O(t,!0),J(e,lDe);let n=()=>j(iZ,`$appLogoURL`,i),r=()=>j($H,`$cmsConfig`,i),[i,a]=sa();var o=W(),s=L(o),c=e=>{{let t=N(()=>Z(`visit_live_site`));$f(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return H(t)},onclick:()=>{WY()},children:(e,t)=>{var r=cDe();V(()=>Y(r,`src`,n())),G(e,r)},$$slots:{default:!0}})}};q(s,e=>{n()!==nZ&&(r()?.logo?.show_in_header??!0)&&e(c)}),G(e,o),k(),a()}var dDe=U(`<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>`,1),fDe=U(`<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>`),pDe={hash:`svelte-1kz79fh`,code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;&[inert] {.sui.search-bar {
|
||
/* Disable the keyboard shortcut for the search bar */display:none !important;}}& > .sui.toolbar {
|
||
@media (width < 768px) {padding:0 4px;
|
||
}.buttons {flex:auto;display:flex;align-items:center;width:50%;&:last-child {justify-content:flex-end;}}.sui.search-bar {flex:none;width:640px;max-width:50%;
|
||
|
||
@media (width < 768px) {flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;max-width:none;
|
||
}}}}`};function mDe(e,t){O(t,!0),J(e,pDe);let n=()=>j(jY,`$hasOverlay`,r),[r,i]=sa();var a=fDe(),o=I(a);{let e=N(()=>Z(`global`));Mj(o,{variant:`primary`,get"aria-label"(){return H(e)},children:(e,t)=>{var n=dDe(),r=L(n),i=I(r);uDe(i,{}),p9(z(i,2),{}),D(r);var a=z(r,2);I4(a,{});var o=z(a,2),s=I(o);n9(s,{});var c=z(s,2);QEe(c,{});var l=z(c,2);sDe(l,{});var u=z(l,2),d=e=>{oDe(e,{})};q(u,e=>{KH.devModeEnabled&&e(d)}),ZEe(z(u,2),{}),D(o),G(e,n)},$$slots:{default:!0}})}D(a),V(()=>a.inert=n()),G(e,a),k(),i()}var hDe=U(`<h2 role="none"> </h2> <!>`,1),gDe=U(`<section><h3 class="svelte-16cq5v7"> </h3> <!></section>`),_De=U(`<div role="none" class="wrapper svelte-16cq5v7"><section><h3 class="svelte-16cq5v7"> </h3> <!></section> <!></div>`),vDe={hash:`svelte-16cq5v7`,code:`.wrapper.svelte-16cq5v7 {overflow-y:auto;height:100%;--sui-menu-border-width: 0;--sui-menu-border-radius: 0;--sui-menu-padding: 8px 0;}h3.svelte-16cq5v7 {padding:8px 16px;background-color:var(--sui-tertiary-background-color);color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-normal);}`};function yDe(e,t){O(t,!0),J(e,vDe);{let t=e=>{s3(e,{primaryToolbar:e=>{Mj(e,{variant:`primary`,children:(e,t)=>{var n=hDe(),r=L(n),i=R(r,!0);Wp(z(r,2),{flex:!0}),V(e=>K(i,e),[()=>Z(`menu`)]),G(e,n)},$$slots:{default:!0}})},mainContent:e=>{var t=_De(),n=I(t),r=I(n),i=R(r,!0);S9(z(r,2),{}),D(n);var a=z(n,2),o=e=>{var t=gDe(),n=I(t),r=R(n,!0);T9(z(n,2),{}),D(t),V(e=>K(r,e),[()=>Z(`help`)]),G(e,t)};q(a,e=>{KH.devModeEnabled&&e(o)}),D(t),V(e=>K(i,e),[()=>Z(`account`)]),G(e,t)},$$slots:{primaryToolbar:!0,mainContent:!0}})},n=N(()=>Z(`menu`));c3(e,{get"aria-label"(){return H(n)},main:t,$$slots:{main:!0}})}k()}var bDe=s(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),E9=s((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),D9=s((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),xDe=s(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),SDe=s(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),CDe=s((e=>{var t=E9().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),wDe=s((e=>{var t=E9().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),TDe=s((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),O9=s((e=>{var t=D9(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),EDe=s((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),DDe=s((e=>{var t=EDe();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),ODe=s(((e,t)=>{var n=DDe();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),k9=s((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),A9=s((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
||
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),j9=s((e=>{var t=k9(),n=A9();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),kDe=s((e=>{var t=E9(),n=O9(),r=D9(),i=j9(),a=k9(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),ADe=s((e=>{var t=E9(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),jDe=s(((e,t)=>{var n=j9();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),MDe=s(((e,t)=>{var n=j9(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),NDe=s(((e,t)=>{var n=j9();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),PDe=s(((e,t)=>{var n=j9(),r=E9();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
||
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),FDe=s(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),IDe=s((e=>{var t=j9(),n=jDe(),r=MDe(),i=NDe(),a=PDe(),o=A9(),s=E9(),c=FDe();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
||
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),LDe=s((e=>{var t=E9(),n=D9(),r=xDe(),i=SDe(),a=CDe(),o=wDe(),s=TDe(),c=O9(),l=ODe(),u=kDe(),d=ADe(),f=j9(),p=IDe();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
|
||
The chosen QR Code version cannot contain this amount of data.
|
||
Minimum version required to store current data is: `+c+`.
|
||
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),M9=s((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),RDe=s((e=>{var t=M9();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),zDe=s((e=>{var t=M9();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
|
||
`;return typeof a==`function`&&a(null,p),p}})),BDe=s((e=>{var t=bDe(),n=LDe(),r=RDe(),i=zDe();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),VDe=U(`<div> </div> <canvas class="svelte-1eeac91"></canvas>`,1),HDe={hash:`svelte-1eeac91`,code:`canvas.svelte-1eeac91 {display:block;margin:32px auto 16px;width:200px !important;height:200px !important;}`};function UDe(e,t){O(t,!0),J(e,HDe);let n=()=>j(l9,`$showMobileSignInDialog`,r),[r,i]=sa(),a=P(void 0);B(()=>{if(H(a)&&n()){let{origin:e,pathname:t}=window.location,n=Ni(KH),r=`${e}${t}#/signin/${btoa(JSON.stringify({token:zW.account?.token,prefs:n}))}`;(0,BDe.toCanvas)(H(a),r),KH.devModeEnabled&&console.info(`Mobile sign-in URL:`,r)}});{let t=N(()=>Z(`sign_in_with_mobile`));Yp(e,{get title(){return H(t)},size:`small`,showOk:!1,showCancel:!1,showClose:!0,style:`--sui-dialog-small-content-max-height:auto`,get open(){return ua(),n()},set open(e){M(l9,e)},children:(e,t)=>{var n=VDe(),r=L(n),i=R(r,!0);Ol(z(r,2),e=>F(a,e),()=>H(a)),V(e=>K(i,e),[()=>Z(`sign_in_with_mobile_instruction`)]),G(e,n)},$$slots:{default:!0}})}k(),i()}function N9(e,t){O(t,!0);let n=()=>j(F4,`$searchTerms`,i),r=()=>j(P4,`$searchMode`,i),[i,a]=sa(),o=/^\/search\/(?<terms>.+)$/,s=()=>{let{path:e}=PY(),{terms:t}=e.match(o)?.groups??{};t&&t!==n()&&M(F4,t),M(P4,r()??`contents`)};Nl(()=>{s(),document.querySelector(`.sui.search-bar input`)?.focus()}),Ws(`hashchange`,co,()=>{s()});{let t=e=>{f3(e,{})},r=N(()=>Z(`search_results_for_x`,{values:{terms:n()}}));c3(e,{get"aria-label"(){return H(r)},main:t,$$slots:{main:!0}})}k(),a()}var P9=U(`<!> <h2 role="none"> </h2>`,1),WDe=U(`<!> <!>`,1),GDe=U(`<div role="none" class="wrapper svelte-116bna3"><!></div>`),KDe={hash:`svelte-116bna3`,code:`.wrapper.svelte-116bna3 {overflow-y:auto;height:100%;--sui-menu-border-width: 0;--sui-menu-border-radius: 0;--sui-menu-padding: 8px 0;& > .container {display:block;padding:16px;}}`};function qDe(e,t){O(t,!0),J(e,KDe);let[n,r]=sa(),i=/^\/settings(?:\/(?<panelKey>.+))?$/,a=P(void 0),o=P(!1),s=()=>{let{path:e}=PY(),t=e.match(i);if(!t?.groups)return;let{panelKey:n}=t.groups;F(a,n?A(y9).find(e=>e.key===n):void 0,!0),F(o,!!n&&!H(a),!0),H(o)&&M(NY,Z(`page_not_found`))};Nl(()=>{s()}),Ws(`hashchange`,co,e=>{zY(e,s,i)});{let t=e=>{s3(e,{primaryToolbar:e=>{Mj(e,{variant:`primary`,children:(e,t)=>{var n=WDe(),r=L(n),i=e=>{var t=P9(),n=L(t);xQ(n,{onclick:()=>UY(`/settings`)});var r=R(z(n,2),!0);V(e=>K(r,e),[()=>Z(`prefs.${H(a).key}.title`)]),G(e,t)},s=e=>{var t=P9(),n=L(t);xQ(n,{onclick:()=>UY(`/settings`)});var r=R(z(n,2),!0);V(e=>K(r,e),[()=>Z(`page_not_found`)]),G(e,t)},c=e=>{var t=P9(),n=L(t);xQ(n,{onclick:()=>UY(`/menu`)});var r=R(z(n,2),!0);V(e=>K(r,e),[()=>Z(`settings`)]),G(e,t)};q(r,e=>{H(a)?e(i):H(o)?e(s,1):e(c,-1)}),Wp(z(r,2),{flex:!0}),G(e,n)},$$slots:{default:!0}})},mainContent:e=>{var t=GDe(),n=I(t),r=e=>{b9(e,{get Panel(){return H(a).component}})},i=e=>{{let t=N(()=>Z(`page_not_found`));zQ(e,{get message(){return H(t)},backPath:`/settings`})}},s=e=>{{let t=N(()=>Z(`settings`));xm(e,{get"aria-label"(){return H(t)},children:(e,t)=>{var n=W();Cc(L(n),17,()=>A(y9),({key:e,icon:t})=>e,(e,t)=>{let n=()=>H(t).key,r=()=>H(t).icon;{let t=e=>{Rl(e,{get name(){return r()}})},i=N(()=>Z(`prefs.${n()}.title`));Sm(e,{get label(){return H(i)},onclick:()=>BY(`/settings/${n()}`,{transitionType:`forwards`}),startIcon:t,$$slots:{startIcon:!0}})}}),G(e,n)},$$slots:{default:!0}})}};q(n,e=>{H(a)?e(r):H(o)?e(i,1):e(s,-1)}),D(t),G(e,t)},$$slots:{primaryToolbar:!0,mainContent:!0}})},n=N(()=>Z(`settings`));c3(e,{get"aria-label"(){return H(n)},main:t,$$slots:{main:!0}})}k(),r()}var JDe=U(`<span role="none"> </span>`),YDe={hash:`svelte-1cl315w`,code:`
|
||
/*
|
||
* Filled pill following the same background/foreground/border recipe as the Alert and Infobar
|
||
* components, so the colors adapt to both the light and dark themes. The border does most of the
|
||
* work in dark mode, where the alert background is nearly the same as the row background.
|
||
*/.deploy-status-badge.svelte-1cl315w {display:inline-block;border-width:1px;border-style:solid;border-radius:12px;padding:1px 6px;font-size:var(--sui-font-size-x-small);line-height:var(--sui-line-height-compact);white-space:nowrap;&.pending {border-color:var(--sui-warning-border-color);background-color:var(--sui-warning-background-color);color:var(--sui-warning-foreground-color);}&.error {border-color:var(--sui-error-border-color);background-color:var(--sui-error-background-color);color:var(--sui-error-foreground-color);}}`};function XDe(e,t){O(t,!0),J(e,YDe);let n={pending:`deploy_preview.short.building`,error:`deploy_preview.short.failed`},r=N(()=>n[t.state]);var i=W(),a=L(i),o=e=>{var n=JDe(),i=R(n,!0);V(e=>{el(n,1,`deploy-status-badge ${t.state??``}`,`svelte-1cl315w`),K(i,e)},[()=>Z(H(r))]),G(e,n)};q(a,e=>{H(r)&&e(o)}),G(e,i),k()}var ZDe=U(`<span role="none" class="author svelte-1nx78nt"><bdi> </bdi></span>`),QDe=U(`<div role="listitem"><button type="button" class="summary svelte-1nx78nt"><!> <span role="none" class="text svelte-1nx78nt"><span role="none" class="collection svelte-1nx78nt"><bdi> </bdi></span> <span role="none" class="title svelte-1nx78nt"><bdi> </bdi></span></span></button> <footer role="none" class="svelte-1nx78nt"><div role="none" class="meta svelte-1nx78nt"><!> <span role="none" class="date svelte-1nx78nt"> </span> <!></div> <div role="none" class="actions svelte-1nx78nt"><!> <!> <!></div></footer></div>`),$De={hash:`svelte-1nx78nt`,code:`.card.svelte-1nx78nt {display:flex;flex-direction:column;gap:4px;border:1px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);padding:8px 12px;background-color:var(--sui-primary-background-color);cursor:grab;&.dragging {opacity:0.5;}}.summary.svelte-1nx78nt {display:flex;align-items:center;gap:8px;border:0;padding:0;background:none;color:inherit;font-family:inherit;text-align:left;cursor:pointer;
|
||
|
||
/* Let the label column shrink instead of pushing the thumbnail out of the card */.text:where(.svelte-1nx78nt) {display:flex;flex-direction:column;gap:2px;min-width:0;}}.collection.svelte-1nx78nt {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.title.svelte-1nx78nt {font-size:var(--sui-font-size-default);line-height:1.4;overflow-wrap:anywhere;}footer.svelte-1nx78nt {display:flex;align-items:center;justify-content:space-between;gap:8px;.meta:where(.svelte-1nx78nt) {display:flex;align-items:center;gap:6px;min-width:0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}
|
||
|
||
/* Let a long user name truncate rather than push the date out of the card */.author:where(.svelte-1nx78nt) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.date:where(.svelte-1nx78nt) {flex:none;}.author:where(.svelte-1nx78nt) + .date:where(.svelte-1nx78nt)::before {margin-inline-end:6px;content:'\\00B7'; /* middle dot */}.actions:where(.svelte-1nx78nt) {display:flex;flex:none;align-items:center;}}`};function F9(e,t){O(t,!0),J(e,$De);let n=()=>j(FG,`$deployments`,a),r=()=>j(SG,`$openAuthoring`,a),i=()=>j(JL,`$allEntries`,a),[a,o]=sa(),s=X(t,`dragging`,3,!1),c=X(t,`busy`,3,!1),l=X(t,`onDragStart`,3,void 0),u=X(t,`onDragEnd`,3,void 0),d=X(t,`onDelete`,3,void 0),f=X(t,`onPublish`,3,void 0),p=N(()=>t.entry.workflow),m=N(()=>H(p).collectionName),h=N(()=>H(p).fileName),g=N(()=>H(p).status),_=N(()=>H(p).pullRequest),v=N(()=>H(g)===`pending_deletion`),y=N(()=>HL(H(m))),b=N(()=>H(y)&&H(h)?YI(H(y),H(h)):void 0),x=N(()=>(H(b)??H(y))?._i18n?.defaultLocale),S=N(()=>(H(_).headSHA?n()[H(_).headSHA]?.state:void 0)??`unknown`),C=N(()=>!Ud.current||!H(y)?t.entry.slug:H(b)?XI(H(b)):lV(H(y),t.entry)),w=N(()=>Ud.current&&H(y)?UL(H(y),{useSingular:!0}):``),T=N(()=>!r()&&(H(g)===`pending_publish`||H(v))&&H(y)?.publish!==!1),E=N(()=>!!i()&&fX(t.entry)),ee=N(()=>H(E)||H(y)?._type!==`entry`||H(y).delete!==!1),te=N(()=>H(v)||H(E)?`undo`:`delete`);var ne=QDe();let re;var ie=I(ne),ae=I(ie),oe=e=>{var n=W();hc(L(n),()=>V2(H(y),t.entry),null,(e,t)=>{var n=W(),r=L(n),i=e=>{O4(e,{get src(){return H(t)},variant:`icon`,cover:!0})};q(r,e=>{H(t)&&e(i)}),G(e,n)}),G(e,n)};q(ae,e=>{H(y)?._type===`entry`&&e(oe)});var se=z(ae,2),ce=I(se),le=R(I(ce),!0);D(ce);var ue=z(ce,2),de=R(I(ue),!0);D(ue),D(se),D(ie);var fe=z(ie,2),pe=I(fe),me=I(pe),he=e=>{var t=ZDe(),n=R(I(t),!0);D(t),V(()=>K(n,H(_).author.name)),G(e,t)};q(me,e=>{H(_).author?.name&&e(he)});var ge=z(me,2),_e=R(ge,!0);XDe(z(ge,2),{get state(){return H(S)}}),D(pe);var ve=z(pe,2),ye=I(ve),be=e=>{X5(e,{get entry(){return t.entry},get locale(){return H(x)},get collection(){return H(y)},get collectionFile(){return H(b)},get pullRequest(){return H(_)},size:`small`,iconic:!0})};q(ye,e=>{H(y)&&H(x)&&e(be)});var xe=z(ye,2),Se=e=>{{let t=e=>{Rl(e,{get name(){return H(te)}})},n=N(()=>H(v)?Z(`workflow.cancel_deletion`):H(E)?Z(`workflow.discard_changes`):Z(`delete_entries`,{values:{count:1}}));$f(e,{variant:`ghost`,size:`small`,iconic:!0,get disabled(){return c()},get"aria-label"(){return H(n)},onclick:()=>{d()?.()},startIcon:t,$$slots:{startIcon:!0}})}};q(xe,e=>{H(ee)&&e(Se)});var Ce=z(xe,2),we=e=>{{let t=e=>{{let t=N(()=>H(v)?`delete`:`publish`);Rl(e,{get name(){return H(t)}})}},n=N(()=>H(v)?Z(`delete_entries`,{values:{count:1}}):Z(`workflow.publish_entry`));$f(e,{variant:`primary`,size:`small`,iconic:!0,get disabled(){return c()},get"aria-label"(){return H(n)},onclick:()=>{f()?.()},startIcon:t,$$slots:{startIcon:!0}})}};q(Ce,e=>{H(T)&&e(we)}),D(ve),D(fe),D(ne),V(e=>{re=el(ne,1,`card svelte-1nx78nt`,null,re,{dragging:s()}),Y(ne,`draggable`,!c()&&!H(v)),Y(ie,`aria-label`,H(C)),K(le,H(w)),K(de,H(C)),K(_e,e)},[()=>H(_).updatedDate.toLocaleDateString(Ud.current??void 0,{month:`short`,day:`numeric`})]),Ws(`dragstart`,ne,e=>{e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,H(_).branch)),l()?.()}),Ws(`dragend`,ne,()=>{u()?.()}),Gs(`click`,ie,()=>{BY(`/collections/${H(m)}/entries/${H(h)??t.entry.subPath}`,{transitionType:`forwards`})}),G(e,ne),k(),o()}Ks([`click`]);var I9=U(`<span role="none"> </span>`),eOe=U(`<header role="none" class="svelte-ljqw9n"><h3 role="none" class="svelte-ljqw9n"> </h3></header> <div role="list"></div>`,1),tOe=U(`<header role="none" class="svelte-ljqw9n"><h3 role="none" id="deletions-title" class="svelte-ljqw9n"> </h3></header> <div role="list" class="entries svelte-ljqw9n"></div>`,1),nOe=U(`<div role="none" class="deletions svelte-ljqw9n"><!></div>`),rOe=U(`<div role="none" class="board svelte-ljqw9n"><div role="none" class="columns svelte-ljqw9n"></div> <!></div>`),iOe=U(`<!> <!> <!> <!>`,1),aOe={hash:`svelte-ljqw9n`,code:`
|
||
/*
|
||
* Entries awaiting removal, listed below the board rather than as a fourth column: they have no
|
||
* stages to move through, and a column would take a quarter of the width for something rare
|
||
*/.board.svelte-ljqw9n {flex:auto;display:flex;flex-direction:column;overflow:hidden;}.deletions.svelte-ljqw9n {flex:none;display:flex;flex-direction:column;max-height:33%;border-block-start:1px solid var(--sui-secondary-border-color);background-color:var(--sui-primary-background-color);.group {display:flex;flex-direction:column;overflow:hidden;}header:where(.svelte-ljqw9n) {display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);h3:where(.svelte-ljqw9n) {font-size:var(--sui-font-size-x-large);}}
|
||
|
||
/* Mirror the board’s track count, so a card here is the same size as one in a column */.entries:where(.svelte-ljqw9n) {display:grid;grid-template-columns:repeat(var(--column-count), 1fr);gap:8px;padding:8px;overflow-y:auto;
|
||
|
||
@media (width < 768px) {grid-template-columns:1fr;
|
||
}}}.columns.svelte-ljqw9n {flex:auto;display:flex;gap:4px;background-color:var(--sui-secondary-background-color); /* same as toolbar */
|
||
|
||
@media (width < 768px) {flex-direction:column;gap:0;
|
||
}.column {flex:auto;display:flex;flex-direction:column;width:calc(100% / var(--column-count));background-color:var(--sui-primary-background-color);
|
||
|
||
@media (width < 768px) {width:100%;height:calc(100% / var(--column-count));
|
||
}}header:where(.svelte-ljqw9n) {flex:none;display:flex;align-items:center;padding:0 16px;height:40px;background-color:var(--sui-tertiary-background-color);h3:where(.svelte-ljqw9n) {font-size:var(--sui-font-size-x-large);}}.entries:where(.svelte-ljqw9n) {flex:auto;display:flex;flex-direction:column;gap:8px;padding:8px;overflow-y:auto;&.drop-target {background-color:var(--sui-selected-background-color);}}}`};function oOe(e,t){O(t,!0),J(e,aOe);let n=()=>j(JL,`$allEntries`,s),r=()=>j(CG,`$workflowStages`,s),i=()=>j(rX,`$unpublishedEntries`,s),a=()=>j(oX,`$workflowDataReady`,s),o=()=>j(SG,`$openAuthoring`,s),[s,c]=sa(),l={...bG,draft:`status.drafts`},u={info:`workflow.updating_status`,success:`workflow.status_updated`,error:`workflow.status_change_failed`},d={info:`workflow.deleting_entry`,success:`workflow.entry_deleted`,error:`deleting_entry_failed`},f={info:`workflow.cancelling_deletion`,success:`workflow.deletion_cancelled`,error:`workflow.cancelling_deletion_failed`},p={info:`workflow.publishing_entry`,success:`workflow.entry_published`,error:`workflow.publishing_entry_failed`},m=P(void 0),h=P(void 0),g=P(void 0),_=P(!1),v=P(!1),y=P(`info`),b=P(``),x=P(!1),S=P([]),C=N(()=>!!H(g)&&!!n()&&fX(H(g))),w=N(()=>H(g)?.workflow.status===`pending_deletion`),T=N(()=>r().map(e=>({status:e,entries:i().filter(t=>t.workflow.status===e)}))),E=N(()=>i().filter(({workflow:e})=>e.status===`pending_deletion`));B(()=>u7());let ee=!1,te=async(e,t,n)=>{let{branch:r}=e.workflow.pullRequest;F(S,[...H(S),r]),F(y,`info`),F(b,n.info,!0),F(x,!0);try{await t,F(y,`success`),F(b,n.success,!0)}catch(e){F(y,`error`),F(b,n.error,!0),console.error(e)}finally{F(S,H(S).filter(e=>e!==r))}F(x,!0)},ne=e=>{F(y,`error`),F(b,e,!0),F(x,!0)},re=async e=>{let t=H(m);if(F(m,void 0),F(h,void 0),!(!t||t.workflow.status===e)){if(e!==`draft`&&!F7(t)){ne(`workflow.status_change_blocked`);return}await te(t,O7(t,e),u)}};B(()=>{if(ee||!a())return;ee=!0;let[e,t,n=0]=H(T).map(({entries:e})=>e.length),r=H(E).length;M(NY,o()?Z(`viewing_open_authoring_workflow`,{values:{draft:e,review:t,deletion:r}}):Z(`viewing_editorial_workflow`,{values:{draft:e,review:t,ready:n,deletion:r}}))});var ie=iOe(),ae=L(ie);{let e=e=>{var t=W(),n=L(t),r=e=>{zj(e,{children:(e,t)=>{var n=I9(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`loading_entries`,{values:{count:2}})]),G(e,n)},$$slots:{default:!0}})},i=e=>{var t=rOe();let n;var r=I(t);Cc(r,21,()=>H(T),({status:e,entries:t})=>e,(e,t)=>{let n=()=>H(t).status,r=()=>H(t).entries;Bj(e,{class:`column`,get"aria-labelledby"(){return`${n()??``}-column-title`},children:(e,t)=>{var i=eOe(),a=L(i),o=I(a),s=R(o,!0);D(a);var c=z(a,2);let u;Cc(c,21,r,e=>e.id,(e,t)=>{{let n=N(()=>H(S).includes(H(t).workflow.pullRequest.branch)),r=N(()=>H(m)?.id===H(t).id);F9(e,{get entry(){return H(t)},get busy(){return H(n)},get dragging(){return H(r)},onDragStart:()=>{F(m,H(t))},onDragEnd:()=>{F(m,void 0),F(h,void 0)},onDelete:()=>{F(g,H(t)),F(_,!0)},onPublish:()=>{F(g,H(t)),F(v,!0)}})}},e=>{zj(e,{children:(e,t)=>{var n=I9(),r=R(n,!0);V(e=>K(r,e),[()=>Z(`workflow.no_entries`)]),G(e,n)},$$slots:{default:!0}})}),D(c),V((e,t)=>{Y(o,`id`,`${n()??``}-column-title`),K(s,e),u=el(c,1,`entries svelte-ljqw9n`,null,u,{"drop-target":H(h)===n()}),Y(c,`aria-label`,t)},[()=>Z(l[n()]),()=>Z(l[n()])]),Ws(`dragover`,c,e=>{H(m)&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),F(h,n(),!0))}),Ws(`dragleave`,c,()=>{H(h)===n()&&F(h,void 0)}),Ws(`drop`,c,e=>{e.preventDefault(),re(n())}),G(e,i)},$$slots:{default:!0}})}),D(r);var i=z(r,2),a=e=>{var t=nOe();Bj(I(t),{class:`group`,"aria-labelledby":`deletions-title`,children:(e,t)=>{var n=tOe(),r=L(n),i=R(I(r),!0);D(r);var a=z(r,2);Cc(a,21,()=>H(E),e=>e.id,(e,t)=>{{let n=N(()=>H(S).includes(H(t).workflow.pullRequest.branch));F9(e,{get entry(){return H(t)},get busy(){return H(n)},onDelete:()=>{F(g,H(t)),F(_,!0)},onPublish:()=>{F(g,H(t)),F(v,!0)}})}}),D(a),V((e,t)=>{K(i,e),Y(a,`aria-label`,t)},[()=>Z(`status.pending_deletion`),()=>Z(`status.pending_deletion`)]),G(e,n)},$$slots:{default:!0}}),D(t),G(e,t)};q(i,e=>{H(E).length&&e(a)}),D(t),V(()=>n=nl(t,``,n,{"--column-count":H(T).length})),G(e,t)};q(n,e=>{a()?e(i,-1):e(r)}),G(e,t)},t=N(()=>Z(`editorial_workflow`));c3(ae,{get"aria-label"(){return H(t)},main:e,$$slots:{main:!0}})}var oe=z(ae,2);{let e=N(()=>H(w)?Z(`workflow.cancel_deletion`):H(C)?Z(`workflow.discard_changes`):Z(`delete_entries`,{values:{count:1}})),t=N(()=>Z(H(w)?`workflow.cancel_deletion`:H(C)?`discard`:`delete`));Zp(oe,{get title(){return H(e)},get okLabel(){return H(t)},onOk:async()=>{let e=H(g);e&&await te(e,A7(e),H(w)?f:d)},get open(){return H(_)},set open(e){F(_,e,!0)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(w)?`workflow.confirm_cancelling_deletion`:H(C)?`workflow.confirm_discarding_entry_changes`:`workflow.confirm_deleting_unpublished_entry`)]),G(e,n)},$$slots:{default:!0}})}var se=z(oe,2);{let e=N(()=>H(w)?Z(`delete_entries`,{values:{count:1}}):Z(`workflow.publish_entry`)),t=N(()=>Z(H(w)?`delete`:`publish`));Zp(se,{get title(){return H(e)},get okLabel(){return H(t)},onOk:async()=>{let e=H(g);if(e){if(!H(w)&&!F7(e)){ne(`workflow.publish_blocked`);return}await te(e,k7(e),H(w)?d:p)}},get open(){return H(v)},set open(e){F(v,e,!0)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(w)?`workflow.confirm_completing_deletion`:`workflow.confirm_publishing_entry`)]),G(e,n)},$$slots:{default:!0}})}var ce=z(se,2),le=e=>{Nh(e,{get id(){return H(b)},get show(){return H(x)},set show(e){F(x,e,!0)},children:(e,t)=>{Hl(e,{get status(){return H(y)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(H(b))]),G(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};q(ce,e=>{H(b)&&e(le)}),G(e,ie),k(),c()}var sOe=U(`<!> <!>`,1),cOe=U(`<!> <!> <!> <div role="none" class="page-root svelte-1a6c577"><!></div> <!> <!> <!> <!> <!> <!> <!>`,1),lOe={hash:`svelte-1a6c577`,code:`.page-root.svelte-1a6c577 {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;view-transition-name:page-root;}`};function uOe(e,t){O(t,!0),J(e,lOe);let n=()=>j(P4,`$searchMode`,a),r=()=>j(MY,`$selectedPageName`,a),i=()=>j(c9,`$canShowMobileSignInDialog`,a),[a,o]=sa(),s=`not-found`,c=[`workflow`,`config`,`menu`],l=N(()=>({collections:a9,assets:m3,search:zV.isSmallScreen?N9:n()?{contents:a9,assets:m3}[n()]:N9,workflow:oOe,config:mge,menu:yDe,settings:qDe})),u=N(()=>r()===s?mEe:H(l)[r()]),d=()=>{M(MY,s),M(P4,null)},f=()=>{if(HY())return;let{path:e}=PY(),{pageName:t}=e.match(`^\\/(?<pageName>${Object.keys(H(l)).join(`|`)})(?=\\/|$)`)?.groups??{};if(!t){e===`/`?window.location.replace(`#/collections`):d();return}if(c.includes(t)&&e!==`/${t}`){d();return}r()!==t&&M(MY,t),t===`collections`?M(P4,`contents`):t===`assets`?M(P4,`assets`):t!==`search`&&M(P4,null)};Nl(()=>{f()});var p={selectPage:f},m=cOe();Ws(`hashchange`,co,()=>{f()});var h=L(m);pEe(h,{});var g=z(h,2),_=e=>{var t=sOe(),n=L(t);uEe(n,{}),UDe(z(n,2),{}),G(e,t)};q(g,e=>{i()&&e(_)});var v=z(g,2),y=e=>{mDe(e,{})};q(v,e=>{zV.isSmallScreen||e(y)});var b=z(v,2);jc(I(b),()=>H(u),(e,t)=>{t(e,{})}),D(b);var x=z(b,2),S=e=>{vEe(e,{})};q(x,e=>{zV.isSmallScreen&&e(S)});var C=z(x,2);dge(C,{});var w=z(C,2);uge(w,{});var T=z(w,2);$he(T,{});var E=z(T,2);oEe(E,{});var ee=z(E,2);sEe(ee,{}),Zhe(z(ee,2),{}),G(e,m);var te=k(p);return o(),te}function dOe(e,t){O(t,!0);let n=()=>j(wG,`$forkPermissionRequest`,r),[r,i]=sa(),a=N(n),o=N(()=>!!H(a));{let t=N(()=>Z(`open_authoring.fork_repository`)),n=N(()=>Z(`open_authoring.fork`));Zp(e,{get title(){return H(t)},get okLabel(){return H(n)},onOk:()=>{H(a)?.respond(!0)},onClose:()=>{H(a)?.respond(!1)},get open(){return H(o)},set open(e){F(o,e)},children:(e,t)=>{mi();var n=ec();V(e=>K(n,e),[()=>Z(`open_authoring.confirm_forking_repository`,{values:{repo:H(a)?.repo??``}})]),G(e,n)},$$slots:{default:!0}})}k(),i()}var fOe=U(` <!>`,1),pOe=U(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1);function mOe(e,t){O(t,!0);let n=()=>j(xG,`$forkedRepository`,i),r=()=>j(nY,`$backend`,i),[i,a]=sa(),o=`openAuthoringNotice`,s=P(!1),c=N(n),l=N(()=>H(c)?`${H(c).owner}/${H(c).repo}`:``),u=N(()=>{let{repoURL:e}=r()?.repository??{};return H(c)&&e?new URL(`/${H(l)}`,e).href:``}),d=async()=>{F(s,!await d9(o))},f=()=>{F(s,!1),f9(o,!0)};B(()=>{H(c)&&d()});var p=W(),m=L(p),h=e=>{var t=pOe(),n=L(t);vc(n,()=>({"--sui-infobar-message-justify-content":`center`})),rp(n.lastChild,{get show(){return H(s)},onDismiss:()=>{f()},children:(e,t)=>{mi();var n=fOe(),r=L(n),i=z(r),a=e=>{{let t=N(()=>Z(`open_authoring.view_fork`));$f(e,{variant:`link`,get label(){return H(t)},onclick:()=>{AY(H(u)),f()}})}};q(i,e=>{H(u)&&e(a)}),V(e=>K(r,`${e??``} `),[()=>Z(`open_authoring.contributing_via_fork`,{values:{repo:H(l)}})]),G(e,n)},$$slots:{default:!0}}),D(n),G(e,t)};q(m,e=>{H(c)&&e(h)}),G(e,p),k(),a()}var hOe=U(`<link rel="apple-touch-icon"/>`),gOe=U(`<link rel="manifest"/>`),_Oe=U(`<link rel="icon"/> <!> <!>`,1),vOe=U(`<link type="application/yaml" rel="cms-config-url"/>`),yOe=U(`<meta name="referrer" content="same-origin"/> <meta name="robots" content="noindex"/> <!> <!>`,1),bOe=U(`<div role="none" class="outer svelte-7y4msj"><!> <!> <!> <!> <!> <div role="none" class="main svelte-7y4msj"><!></div></div> <div role="status" class="svelte-7y4msj"> </div>`,1),xOe={hash:`svelte-7y4msj`,code:`
|
||
@view-transition {navigation:auto;
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-out-to-left {
|
||
from {
|
||
transform: translateX(0);
|
||
filter: brightness(1);
|
||
}
|
||
|
||
to {
|
||
transform: translateX(-20%);
|
||
filter: brightness(0.5);
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-out-to-right {
|
||
from {
|
||
transform: translateX(0);
|
||
opacity: 1;
|
||
}
|
||
|
||
to {
|
||
transform: translateX(100%);
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-in-from-right {
|
||
from {
|
||
transform: translateX(100%);
|
||
opacity: 0;
|
||
}
|
||
|
||
to {
|
||
transform: translateX(0);
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-in-from-left {
|
||
from {
|
||
transform: translateX(-20%);
|
||
filter: brightness(0.5);
|
||
}
|
||
|
||
to {
|
||
transform: translateX(0);
|
||
filter: brightness(1);
|
||
}
|
||
}
|
||
|
||
/* RTL-specific keyframes that mirror the depth effect */
|
||
@keyframes svelte-7y4msj-slide-out-to-left-rtl {
|
||
from {
|
||
transform: translateX(0);
|
||
opacity: 1;
|
||
}
|
||
|
||
to {
|
||
transform: translateX(-100%);
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-out-to-right-rtl {
|
||
from {
|
||
transform: translateX(0);
|
||
filter: brightness(1);
|
||
}
|
||
|
||
to {
|
||
transform: translateX(20%);
|
||
filter: brightness(0.5);
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-in-from-right-rtl {
|
||
from {
|
||
transform: translateX(20%);
|
||
filter: brightness(0.5);
|
||
}
|
||
|
||
to {
|
||
transform: translateX(0);
|
||
filter: brightness(1);
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-slide-in-from-left-rtl {
|
||
from {
|
||
transform: translateX(-100%);
|
||
opacity: 0;
|
||
}
|
||
|
||
to {
|
||
transform: translateX(0);
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-fade-out {
|
||
from {
|
||
opacity: 1;
|
||
}
|
||
|
||
to {
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
@keyframes svelte-7y4msj-fade-in {
|
||
from {
|
||
opacity: 0;
|
||
}
|
||
|
||
to {
|
||
opacity: 1;
|
||
}
|
||
}html:active-view-transition-type(forwards) {
|
||
@media (width < 768px) {&::view-transition-old(page-root) {z-index:999;
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-out-to-left;
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}&::view-transition-new(page-root) {
|
||
@media (width < 768px) {z-index:1000;
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-in-from-right;
|
||
}
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}&:dir(rtl) {&::view-transition-old(page-root) {
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-out-to-right-rtl;}&::view-transition-new(page-root) {
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-in-from-left-rtl;}}
|
||
}}html:active-view-transition-type(backwards) {
|
||
@media (width < 768px) {&::view-transition-old(page-root) {z-index:1000;
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-out-to-right;
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}&::view-transition-new(page-root) {z-index:999;
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-in-from-left;
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}&:dir(rtl) {&::view-transition-old(page-root) {
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-out-to-left-rtl;}&::view-transition-new(page-root) {
|
||
animation: 100ms ease-in both svelte-7y4msj-slide-in-from-right-rtl;}}
|
||
}}html:active-view-transition-type(unknown) {&::view-transition-old(page-main) {
|
||
animation: 100ms ease-in both svelte-7y4msj-fade-out;
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}&::view-transition-new(page-main) {
|
||
animation: 100ms ease-in both svelte-7y4msj-fade-in;
|
||
|
||
@media (prefers-reduced-motion) {
|
||
animation: none;
|
||
}}}body:not(:has(#nc-root)) {overflow:hidden;}#nc-root > .sui.app-shell {position:absolute;}.outer.svelte-7y4msj {display:flex;flex-direction:column;position:absolute;inset:0;overflow:hidden;}.main.svelte-7y4msj {position:relative;flex:auto;display:flex;flex-direction:column;overflow:hidden;background-color:var(--sui-secondary-background-color);}[role='status'].svelte-7y4msj {position:absolute;z-index:-1;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;}`};function SOe(e,t){O(t,!0),J(e,xOe);let n=()=>j(GL,`$dataLoaded`,d),r=()=>j(nU,`$cmsConfigLoaded`,d),i=()=>j(rZ,`$appTitle`,d),a=()=>j(iZ,`$appLogoURL`,d),o=()=>j(aZ,`$appLogoType`,d),s=()=>j(sZ,`$appIconURLs`,d),c=()=>j(cZ,`$appManifestURL`,d),l=()=>j(nY,`$backend`,d),u=()=>j(NY,`$announcedPageStatus`,d),[d,f]=sa(),p=P(!1);Ao(()=>{H(p)||(UZ(),F(p,!0))}),Ao(()=>{jle()}),B(()=>{Ds(()=>{iU(t.config)})}),Nl(()=>{let e=document.querySelector(`#nc-root`);e&&window.getComputedStyle(e).position===`static`&&window.requestAnimationFrame(()=>{let{top:t,height:n}=e.getBoundingClientRect();n?e.style.position=`relative`:(e.style.position=`fixed`,e.style.inset=`${t}px 0 0 0`)})});let m=P(!1);B(()=>{n()&&zW.account?IY(`forwards`,()=>{F(m,!0)}):IY(`backwards`,()=>{F(m,!1)})}),Wc(`7y4msj`,e=>{var t=yOe(),n=z(L(t),4),l=e=>{var t=_Oe(),n=L(t),r=z(n,2),l=e=>{var t=hOe();V(()=>Y(t,`href`,s().large)),G(e,t)};q(r,e=>{s()&&e(l)});var u=z(r,2),d=e=>{var t=gOe();V(()=>Y(t,`href`,c())),G(e,t)};q(u,e=>{c()&&e(d)}),V(()=>{Y(n,`href`,a()),Y(n,`type`,o())}),Io(()=>{lo.title=i()??``}),G(e,t)};q(n,e=>{r()&&e(l)});var u=z(n,2),d=e=>{var t=vOe();V(()=>Y(t,`href`,`${ZH??``}/admin/config.yml`)),G(e,t)};q(u,e=>{ZH&&e(d)}),G(e,t)}),Ws(`mousedown`,lo.body,e=>{if(e.target?.matches(`a`)){let t=e.target,{origin:n,pathname:r}=t;(n!==window.location.origin||r!==window.location.pathname)&&(t.rel=`noopener noreferrer`,t.target=`_blank`)}}),Pae(e,{children:(e,t)=>{var r=W(),i=L(r),a=e=>{var t=bOe(),r=L(t),i=I(r);WZ(i,{});var a=z(i,2);wZ(a,{});var o=z(a,2);dOe(o,{});var s=z(o,2),c=e=>{xZ(e,{})};q(s,e=>{l()&&e(c)});var d=z(s,2),f=e=>{mOe(e,{})};q(d,e=>{zW.account&&n()&&e(f)});var p=z(d,2),h=I(p),g=e=>{uOe(e,{})},_=e=>{vZ(e,{})};q(h,e=>{zW.account&&n()&&H(m)?e(g):e(_,-1)}),D(p),D(r);var v=R(z(r,2),!0);V(()=>K(v,u())),G(e,t)};q(i,e=>{H(p)&&e(a)}),G(e,r)},$$slots:{default:!0}}),k(),f()}var COe=`https://sveltiacms.app/en/docs/migration/netlify-decap-cms#features-not-to-be-implemented`,wOe=[`getBackend`,`getCustomFormats`,`getCustomFormatsExtensions`,`getCustomFormatsFormatters`,`getEditorComponents`,`getEventListeners`,`getLocale`,`getMediaLibrary`,`getPreviewStyles`,`getPreviewTemplate`,`getRemarkPlugins`,`getWidgetValueSerializer`,`getWidgets`,`invokeEvent`,`moment`,`registerBackend`,`registerMediaLibrary`,`registerWidgetValueSerializer`,`removeEventListener`,`resolveWidget`,`registerLocale`,`registerRemarkPlugin`],TOe=({initialProps:e,transforms:t={},onValueChange:n})=>{let r=ao({...e}),i={};return Object.keys(e).forEach(e=>{let a=t[e];Object.defineProperty(i,e,{enumerable:!0,get:a?()=>a(r[e]):()=>r[e],set:e===`currentValue`?n:void 0})}),{values:r,props:i}},EOe=(e,t)=>{Object.entries(t).forEach(([t,n])=>{(0,HH.default)(e[t],n)||(e[t]=n)})},L9=[`boolean`,`color`,`datetime`,`map`,`number`,`select`,`string`,`text`,`uuid`],R9=new Map,z9=new WeakMap,DOe=e=>typeof e.toJS==`function`?e.toJS():typeof e.get==`function`?new Proxy({},{get:(t,n)=>typeof n==`string`?e.get(n):void 0,has:(t,n)=>typeof n==`string`&&e.get(n)!==void 0}):or(e)?e:{},B9=e=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return{};let t=z9.get(e);if(t)return t;let n=DOe(e);return z9.set(e,n),n},OOe=(e,t)=>{let{value:n,field:r,forID:i,locale:a,keyPath:o,required:s,readonly:c,invalid:l}=e,{name:u,label:d,required:f}=B9(r);return{locale:a??t.locale??``,keyPath:o??t.keyPath??u??``,typedKeyPath:``,fieldId:i??``,fieldLabel:d||u||``,fieldConfig:r,currentValue:n,required:s??t.required??f,readonly:c??t.readonly,invalid:l??t.invalid}},kOe=({value:e,field:t,locale:n,keyPath:r},i)=>({locale:n??i.locale??``,keyPath:r??i.keyPath??B9(t).name??``,typedKeyPath:``,fieldConfig:t,currentValue:e}),V9=({SvelteComponent:e,buildProps:t})=>n=>{let r=(0,ar.useContext)($6),i=(0,ar.useRef)(n),a=(0,ar.useRef)(void 0);i.current=n,a.current?EOe(a.current.values,t(n,r)):a.current=TOe({initialProps:t(n,r),transforms:{fieldConfig:B9},onValueChange:e=>{let{values:t}=a.current;(0,HH.default)(t.currentValue,e)||(t.currentValue=e,i.current.onChange?.(e))}});let o=(0,ar.useCallback)(t=>{if(!t)return;let{props:n}=a.current,r=oc(e,{target:t,props:n});return()=>{uc(r)}},[]);return(0,ar.createElement)(`div`,{ref:o})},AOe=e=>({control:V9({SvelteComponent:I5[e],buildProps:OOe}),preview:V9({SvelteComponent:L5[e],buildProps:kOe})}),jOe=e=>{if(!L9.includes(e)){eL.includes(e)&&console.warn(`The built-in "${e}" field type cannot be reused in a custom field type, because its editor works only within the entry editor. Reusable field types are: ${L9.join(`, `)}.`);return}let t=R9.get(e);if(t)return t;let n=AOe(e);return R9.set(e,n),n},H9=(e,t=new Set)=>{let n=iL.get(e);if(!n)return jOe(e);let{control:r,preview:i,schema:a}=n;return typeof r==`string`?(t.add(e),{control:t.has(r)?void 0:H9(r,t)?.control,preview:i,schema:a}):{control:r,preview:i,schema:a}},U9=!1,W9=async({config:e}={})=>{if(e!==void 0&&!or(e))throw TypeError("The `config` option for `CMS.init()` must be an object");U9||(U9=!0,document.readyState===`loading`&&!document.querySelector(`#nc-root`)&&await new Promise(e=>{window.addEventListener(`DOMContentLoaded`,()=>e(void 0),{once:!0})}),oc(SOe,{target:document.querySelector(`#nc-root`)??document.body,props:{config:e}}))},G9=e=>{if(!MB(e))throw TypeError("The `name` option for `CMS.getFieldType()` must be a non-empty string");return H9(e)},K9=(e,t,{fromFile:n,toFile:r}={})=>{if(!MB(e))throw TypeError("The `name` option for `CMS.registerCustomFormat()` must be a non-empty string");if(!MB(t))throw TypeError("The `extension` option for `CMS.registerCustomFormat()` must be a non-empty string");if(typeof n!=`function`&&typeof r!=`function`)throw Error("At least one of `fromFile` or `toFile` must be provided to `CMS.registerCustomFormat()`");if(n!==void 0&&typeof n!=`function`)throw TypeError("The `fromFile` option for `CMS.registerCustomFormat()` must be a function");if(r!==void 0&&typeof r!=`function`)throw TypeError("The `toFile` option for `CMS.registerCustomFormat()` must be a function");aL.set(e,{extension:t,parser:n,formatter:r})},q9=e=>{if(!e||typeof e!=`object`)throw TypeError("The `definition` option for `CMS.registerEditorComponent()` must be an object");if(!MB(e.id))throw TypeError("The `definition.id` must be a non-empty string");if(!MB(e.label))throw TypeError("The `definition.label` must be a non-empty string");if(typeof e.pattern!=`object`||!(e.pattern instanceof RegExp))throw TypeError("The `definition.pattern` must be a RegExp");if(typeof e.toBlock!=`function`)throw TypeError("The `definition.toBlock` must be a function");if(typeof e.toPreview!=`function`)throw TypeError("The `definition.toPreview` must be a function");if(!Array.isArray(e.fields))throw TypeError("The `definition.fields` must be an array");rL.set(e.id,e)},J9=e=>{if(!or(e))throw TypeError(`The event listener must be an object`);let{name:t,handler:n}=e;if(typeof t!=`string`||typeof n!=`function`)throw TypeError("The event listener must have a string `name` property and a function `handler` property");if(!U2.includes(t))throw RangeError(`Unsupported event listener name "${t}". Supported names are: ${U2.join(`, `)}`);cL.add(e)},Y9=(e,{raw:t=!1}={})=>{if(!MB(e))throw TypeError("The `style` option for `CMS.registerPreviewStyle()` must be a non-empty string");if(typeof t!=`boolean`)throw TypeError("The `raw` option for `CMS.registerPreviewStyle()` must be a boolean");let n=window.location.href;if(!t&&!URL.canParse(e,n))throw TypeError("The `style` option for `CMS.registerPreviewStyle()` must be a valid URL or file path when `raw` is false");let r=t?URL.createObjectURL(new Blob([e],{type:`text/css`})):new URL(e,n).href;oL.add(r)},X9=(e,t)=>{if(!MB(e))throw TypeError("The `name` option for `CMS.registerPreviewTemplate()` must be a non-empty string");if(typeof t!=`function`)throw TypeError("The `component` option for `CMS.registerPreviewTemplate()` must be a React component");sL.set(e,t)},Z9=(e,t,n,r)=>{if(!MB(e))throw TypeError("The `name` option for `CMS.registerFieldType()` must be a non-empty string");if(eL.includes(e))throw Error(`The field type name "${e}" is reserved for a built-in field type. Choose a different name for your custom field type.`);if(typeof t!=`function`&&typeof t!=`string`)throw TypeError("The `control` option for `CMS.registerFieldType()` must be a React component or a string");if(n!==void 0&&typeof n!=`function`)throw TypeError("The `preview` option for `CMS.registerFieldType()` must be a React component");if(r!==void 0&&!or(r))throw TypeError("The `schema` option for `CMS.registerFieldType()` must be an object");iL.set(e,{control:t,preview:n,schema:r})},Q9=new Proxy({getFieldType:G9,getWidget:G9,init:W9,registerCustomFormat:K9,registerEditorComponent:q9,registerEventListener:J9,registerFieldType:Z9,registerPreviewStyle:Y9,registerPreviewTemplate:X9,registerWidget:Z9},{get:(e,t)=>{if(t in e)return e[t];let n=``;if(wOe.includes(t)&&(n=`CMS.%s() is not supported in Sveltia CMS, and we don’t have any plans to implement it.`),n)return console.warn(`${n} See %s for compatibility information.`,t,COe),()=>void 0}}),MOe=Q9;window.CMS=Q9,window.initCMS=W9,window.createClass=m.default,window.createElement=ar.createElement,window.h=ar.createElement,window.rf=ar.Fragment,window.marked=tr,window.DOMPurify=ht,document.querySelector(`link[rel="stylesheet"][href$="/sveltia-cms.css"]`)&&console.warn("Sveltia CMS does not require a stylesheet. Remove the invalid `<link>` tag referencing `sveltia-cms.css` to avoid unnecessary network requests.");var $9=document.querySelector(`script[src$="/sveltia-cms.js"]`);return $9?.type===`module`&&console.warn('The Sveltia CMS script is not an ES module. Remove the "type="module" attribute from the `<script>` tag to avoid unexpected behavior when using the JavaScript API.'),document.querySelector(`script[src="https://identity.netlify.com/v1/netlify-identity-widget.js"]`)&&console.warn(`Netlify Identity Widget is not supported in Sveltia CMS.`),!window.CMS_MANUAL_INIT&&(document.currentScript||$9)&&W9(),e.default=MOe,e.getFieldType=G9,e.getWidget=G9,e.init=W9,e.registerCustomFormat=K9,e.registerEditorComponent=q9,e.registerEventListener=J9,e.registerFieldType=Z9,e.registerWidget=Z9,e.registerPreviewStyle=Y9,e.registerPreviewTemplate=X9,e})({});
|
||
//# sourceMappingURL=sveltia-cms.js.map |