File: /home/vrposilw0xwl/public_html/wp-content/plugins/templately/assets/js/templately.js
(()=>{var e,t,n={47:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1635),o=n(1609),i=r.__importDefault(n(9905));t.default=function(e){var t=o.useRef(0),n=o.useState(e),r=n[0],a=n[1],s=o.useCallback(function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){a(e)})},[]);return i.default(function(){cancelAnimationFrame(t.current)}),[r,s]}},76:e=>{"use strict";e.exports=Function.prototype.call},124:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkValuesAgainstBoundaries=t.relativeValue=t.useThumbOverlap=t.Direction=t.getTrackBackground=t.Range=void 0;var o=r(n(465));t.Range=o.default;var i=n(1813);Object.defineProperty(t,"getTrackBackground",{enumerable:!0,get:function(){return i.getTrackBackground}}),Object.defineProperty(t,"useThumbOverlap",{enumerable:!0,get:function(){return i.useThumbOverlap}}),Object.defineProperty(t,"relativeValue",{enumerable:!0,get:function(){return i.relativeValue}}),Object.defineProperty(t,"checkValuesAgainstBoundaries",{enumerable:!0,get:function(){return i.checkValuesAgainstBoundaries}});var a=n(8105);Object.defineProperty(t,"Direction",{enumerable:!0,get:function(){return a.Direction}})},251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.populateSlidesOnMouseTouchMove=function(e,t,n,r,o,i){var a,s,l=e.itemWidth,c=e.slidesToShow,u=e.totalItems,d=e.currentSlide,p=t.infinite,h=!1,f=Math.round((n-r)/l),m=Math.round((r-n)/l),g=n<o;if(o<n&&f<=c){a="right";var v=Math.abs(-l*(u-c)),y=i-(r-o),b=d===u-c;(Math.abs(y)<=v||b&&p)&&(s=y,h=!0)}return g&&m<=c&&(a="left",((y=i+(o-r))<=0||0===d&&p)&&(h=!0,s=y)),{direction:a,nextPosition:s,canContinue:h}}},308:(e,t,n)=>{var r=n(1609),o=n(840),i=n(4958),a=i.setStyleProp,s=i.canTextBeChildOfNode;function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var i,c,u,d,p,h=(n=n||{}).library||r,f=h.cloneElement,m=h.createElement,g=h.isValidElement,v=[],y="function"==typeof n.replace,b=n.trim,w=0,k=t.length;w<k;w++)if(i=t[w],y&&g(u=n.replace(i)))k>1&&(u=f(u,{key:u.key||w})),v.push(u);else if("text"!==i.type){switch(d=i.attribs,l(i)?a(d.style,d):d&&(d=o(d,i.name)),p=null,i.type){case"script":case"style":i.children[0]&&(d.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?d.defaultValue=i.children[0].data:i.children&&i.children.length&&(p=e(i.children,n));break;default:continue}k>1&&(d.key=w),v.push(m(i.name,d,p))}else{if((c=!i.data.trim().length)&&i.parent&&!s(i.parent))continue;if(b&&c)continue;v.push(i.data)}return 1===v.length?v[0]:v}},312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(1720))&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},411:(e,t,n)=>{var r;!function(){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},414:e=>{"use strict";e.exports=Math.round},453:(e,t,n)=>{"use strict";var r,o=n(9612),i=n(9383),a=n(1237),s=n(9290),l=n(9538),c=n(8068),u=n(9675),d=n(5345),p=n(1514),h=n(8968),f=n(6188),m=n(8002),g=n(5880),v=n(414),y=n(3093),b=Function,w=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},k=n(8176),E=n(655),O=function(){throw new u},S=k?function(){try{return O}catch(e){try{return k(arguments,"callee").get}catch(e){return O}}}():O,x=n(4039)(),_=n(3628),C=n(1064),P=n(8648),T=n(1002),A=n(76),D={},M="undefined"!=typeof Uint8Array&&_?_(Uint8Array):r,N={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":x&&_?_([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":D,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&_?_(_([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&x&&_?_((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":k,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":s,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&x&&_?_((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&_?_(""[Symbol.iterator]()):r,"%Symbol%":x?Symbol:r,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":M,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":d,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":A,"%Function.prototype.apply%":T,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":C,"%Math.abs%":p,"%Math.floor%":h,"%Math.max%":f,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":v,"%Math.sign%":y,"%Reflect.getPrototypeOf%":P};if(_)try{null.error}catch(e){var L=_(_(e));N["%Error.prototype%"]=L}var I=function e(t){var n;if("%AsyncFunction%"===t)n=w("async function () {}");else if("%GeneratorFunction%"===t)n=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=w("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&_&&(n=_(o.prototype))}return N[t]=n,n},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=n(6743),F=n(9957),z=j.call(A,Array.prototype.concat),B=j.call(T,Array.prototype.splice),U=j.call(A,String.prototype.replace),V=j.call(A,String.prototype.slice),W=j.call(A,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,q=function(e,t){var n,r=e;if(F(R,r)&&(r="%"+(n=R[r])[0]+"%"),F(N,r)){var o=N[r];if(o===D&&(o=I(r)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===W(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=V(e,0,1),n=V(e,-1);if("%"===t&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,H,function(e,t,n,o){r[r.length]=n?U(o,Q,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",o=q("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],B(n,z([0,1],l)));for(var d=1,p=!0;d<n.length;d+=1){var h=n[d],f=V(h,0,1),m=V(h,-1);if(('"'===f||"'"===f||"`"===f||'"'===m||"'"===m||"`"===m)&&f!==m)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&p||(s=!0),F(N,i="%"+(r+="."+h)+"%"))a=N[i];else if(null!=a){if(!(h in a)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(k&&d+1>=n.length){var g=k(a,h);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else p=F(a,h),a=a[h];p&&!s&&(N[i]=a)}}return a}},465:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},l=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var c=s(n(1609)),u=n(1813),d=n(8105),p=["ArrowRight","ArrowUp","k","PageUp"],h=["ArrowLeft","ArrowDown","j","PageDown"],f=function(e){function t(t){var n=e.call(this,t)||this;if(n.trackRef=c.createRef(),n.thumbRefs=[],n.state={draggedTrackPos:[-1,-1],draggedThumbIndex:-1,thumbZIndexes:new Array(n.props.values.length).fill(0).map(function(e,t){return t}),isChanged:!1,markOffsets:[]},n.getOffsets=function(){var e=n.props,t=e.direction,r=e.values,o=e.min,i=e.max,a=n.trackRef.current;if(!a)return console.warn("No track element found."),[];var s=a.getBoundingClientRect(),l=(0,u.getPaddingAndBorder)(a);return n.getThumbs().map(function(e,n){var a={x:0,y:0},c=e.getBoundingClientRect(),p=(0,u.getMargin)(e);switch(t){case d.Direction.Right:return a.x=-1*(p.left+l.left),a.y=-1*((c.height-s.height)/2+l.top),a.x+=s.width*(0,u.relativeValue)(r[n],o,i)-c.width/2,a;case d.Direction.Left:return a.x=-1*(p.right+l.right),a.y=-1*((c.height-s.height)/2+l.top),a.x+=s.width-s.width*(0,u.relativeValue)(r[n],o,i)-c.width/2,a;case d.Direction.Up:return a.x=-1*((c.width-s.width)/2+p.left+l.left),a.y=-l.left,a.y+=s.height-s.height*(0,u.relativeValue)(r[n],o,i)-c.height/2,a;case d.Direction.Down:return a.x=-1*((c.width-s.width)/2+p.left+l.left),a.y=-l.left,a.y+=s.height*(0,u.relativeValue)(r[n],o,i)-c.height/2,a;default:return(0,u.assertUnreachable)(t)}})},n.getThumbs=function(){return n.trackRef&&n.trackRef.current?Array.from(n.trackRef.current.children).filter(function(e){return e.hasAttribute("aria-valuenow")}):(console.warn("No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?"),[])},n.getTargetIndex=function(e){return n.getThumbs().findIndex(function(t){return t===e.target||t.contains(e.target)})},n.addTouchEvents=function(e){document.addEventListener("touchmove",n.schdOnTouchMove,{passive:!1}),document.addEventListener("touchend",n.schdOnEnd,{passive:!1}),document.addEventListener("touchcancel",n.schdOnEnd,{passive:!1})},n.addMouseEvents=function(e){document.addEventListener("mousemove",n.schdOnMouseMove),document.addEventListener("mouseup",n.schdOnEnd)},n.onMouseDownTrack=function(e){var t;if(0===e.button&&!(0,u.isIOS)())if(e.persist(),e.preventDefault(),n.addMouseEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){var n;return null===(n=t.current)||void 0===n?void 0:n.contains(e.target)}))return;n.setState({draggedTrackPos:[e.clientX,e.clientY]},function(){return n.onMove(e.clientX,e.clientY)})}else{var r=(0,u.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.clientX,e.clientY,n.props.direction);null===(t=n.thumbRefs[r].current)||void 0===t||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.clientX,e.clientY)})}},n.onResize=function(){(0,u.translateThumbs)(n.getThumbs(),n.getOffsets(),n.props.rtl),n.calculateMarkOffsets()},n.onTouchStartTrack=function(e){var t;if(e.persist(),n.addTouchEvents(e.nativeEvent),n.props.values.length>1&&n.props.draggableTrack){if(n.thumbRefs.some(function(t){var n;return null===(n=t.current)||void 0===n?void 0:n.contains(e.target)}))return;n.setState({draggedTrackPos:[e.touches[0].clientX,e.touches[0].clientY]},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}else{var r=(0,u.getClosestThumbIndex)(n.thumbRefs.map(function(e){return e.current}),e.touches[0].clientX,e.touches[0].clientY,n.props.direction);null===(t=n.thumbRefs[r].current)||void 0===t||t.focus(),n.setState({draggedThumbIndex:r},function(){return n.onMove(e.touches[0].clientX,e.touches[0].clientY)})}},n.onMouseOrTouchStart=function(e){if(!n.props.disabled){var t=(0,u.isTouchEvent)(e);if(t||0===e.button){var r=n.getTargetIndex(e);-1!==r&&(t?n.addTouchEvents(e):n.addMouseEvents(e),n.setState({draggedThumbIndex:r,thumbZIndexes:n.state.thumbZIndexes.map(function(e,t){return t===r?Math.max.apply(Math,n.state.thumbZIndexes):e<=n.state.thumbZIndexes[r]?e:e-1})}))}}},n.onMouseMove=function(e){e.preventDefault(),n.onMove(e.clientX,e.clientY)},n.onTouchMove=function(e){e.preventDefault(),n.onMove(e.touches[0].clientX,e.touches[0].clientY)},n.onKeyDown=function(e){var t=n.props,r=t.values,o=t.onChange,i=t.step,a=t.rtl,s=t.direction,l=n.state.isChanged,c=n.getTargetIndex(e.nativeEvent),f=a||s===d.Direction.Left||s===d.Direction.Down?-1:1;-1!==c&&(p.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:c,isChanged:!0}),o((0,u.replaceAt)(r,c,n.normalizeValue(r[c]+f*("PageUp"===e.key?10*i:i),c)))):h.includes(e.key)?(e.preventDefault(),n.setState({draggedThumbIndex:c,isChanged:!0}),o((0,u.replaceAt)(r,c,n.normalizeValue(r[c]-f*("PageDown"===e.key?10*i:i),c)))):"Tab"===e.key?n.setState({draggedThumbIndex:-1},function(){l&&n.fireOnFinalChange()}):l&&n.fireOnFinalChange())},n.onKeyUp=function(e){var t=n.state.isChanged;n.setState({draggedThumbIndex:-1},function(){t&&n.fireOnFinalChange()})},n.onMove=function(e,t){var r=n.state,o=r.draggedThumbIndex,i=r.draggedTrackPos,a=n.props,s=a.direction,l=a.min,c=a.max,p=a.onChange,h=a.values,f=a.step,m=a.rtl;if(-1===o&&-1===i[0]&&-1===i[1])return null;var g=n.trackRef.current;if(!g)return null;var v=g.getBoundingClientRect(),y=(0,u.isVertical)(s)?v.height:v.width;if(-1!==i[0]&&-1!==i[1]){var b=e-i[0],w=t-i[1],k=0;switch(s){case d.Direction.Right:case d.Direction.Left:k=b/y*(c-l);break;case d.Direction.Down:case d.Direction.Up:k=w/y*(c-l);break;default:(0,u.assertUnreachable)(s)}if(m&&(k*=-1),Math.abs(k)>=f/2){for(var E=0;E<n.thumbRefs.length;E++){if(h[E]===c&&1===Math.sign(k)||h[E]===l&&-1===Math.sign(k))return;var O=h[E]+k;O>c?k=c-h[E]:O<l&&(k=l-h[E])}var S=h.slice(0);for(E=0;E<n.thumbRefs.length;E++)S=(0,u.replaceAt)(S,E,n.normalizeValue(h[E]+k,E));n.setState({draggedTrackPos:[e,t]}),p(S)}}else{var x=0;switch(s){case d.Direction.Right:x=(e-v.left)/y*(c-l)+l;break;case d.Direction.Left:x=(y-(e-v.left))/y*(c-l)+l;break;case d.Direction.Down:x=(t-v.top)/y*(c-l)+l;break;case d.Direction.Up:x=(y-(t-v.top))/y*(c-l)+l;break;default:(0,u.assertUnreachable)(s)}m&&(x=c+l-x),Math.abs(h[o]-x)>=f/2&&p((0,u.replaceAt)(h,o,n.normalizeValue(x,o)))}},n.normalizeValue=function(e,t){var r=n.props,o=r.min,i=r.max,a=r.step,s=r.allowOverlap,l=r.values;return(0,u.normalizeValue)(e,t,o,i,a,s,l)},n.onEnd=function(e){if(e.preventDefault(),document.removeEventListener("mousemove",n.schdOnMouseMove),document.removeEventListener("touchmove",n.schdOnTouchMove),document.removeEventListener("mouseup",n.schdOnEnd),document.removeEventListener("touchend",n.schdOnEnd),document.removeEventListener("touchcancel",n.schdOnEnd),-1===n.state.draggedThumbIndex&&-1===n.state.draggedTrackPos[0]&&-1===n.state.draggedTrackPos[1])return null;n.setState({draggedThumbIndex:-1,draggedTrackPos:[-1,-1]},function(){n.fireOnFinalChange()})},n.fireOnFinalChange=function(){n.setState({isChanged:!1});var e=n.props,t=e.onFinalChange,r=e.values;t&&t(r)},n.updateMarkRefs=function(e){if(!e.renderMark)return n.numOfMarks=void 0,void(n.markRefs=void 0);n.numOfMarks=(e.max-e.min)/n.props.step,n.markRefs=[];for(var t=0;t<n.numOfMarks+1;t++)n.markRefs[t]=c.createRef()},n.calculateMarkOffsets=function(){if(n.props.renderMark&&n.trackRef&&n.numOfMarks&&n.markRefs&&null!==n.trackRef.current){for(var e=window.getComputedStyle(n.trackRef.current),t=parseInt(e.width,10),r=parseInt(e.height,10),o=parseInt(e.paddingLeft,10),i=parseInt(e.paddingTop,10),a=[],s=0;s<n.numOfMarks+1;s++){var l=9999,c=9999;if(n.markRefs[s].current){var u=n.markRefs[s].current.getBoundingClientRect();l=u.height,c=u.width}n.props.direction===d.Direction.Left||n.props.direction===d.Direction.Right?a.push([Math.round(t/n.numOfMarks*s+o-c/2),-Math.round((l-r)/2)]):a.push([Math.round(r/n.numOfMarks*s+i-l/2),-Math.round((c-t)/2)])}n.setState({markOffsets:a})}},0===t.step)throw new Error('"step" property should be a positive number');return n.schdOnMouseMove=(0,u.schd)(n.onMouseMove),n.schdOnTouchMove=(0,u.schd)(n.onTouchMove),n.schdOnEnd=(0,u.schd)(n.onEnd),n.thumbRefs=t.values.map(function(){return c.createRef()}),n.updateMarkRefs(t),n}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.values,r=t.min,o=t.step;this.resizeObserver=window.ResizeObserver?new window.ResizeObserver(this.onResize):{observe:function(){return window.addEventListener("resize",e.onResize)},unobserve:function(){return window.removeEventListener("resize",e.onResize)}},document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),!this.props.allowOverlap&&(0,u.checkInitialOverlap)(this.props.values),this.props.values.forEach(function(t){return(0,u.checkBoundaries)(t,e.props.min,e.props.max)}),this.resizeObserver.observe(this.trackRef.current),(0,u.translateThumbs)(this.getThumbs(),this.getOffsets(),this.props.rtl),this.calculateMarkOffsets(),n.forEach(function(e){(0,u.isStepDivisible)(r,e,o)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")})},t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.max,o=n.min,i=n.step,a=n.values,s=n.rtl;e.max===r&&e.min===o&&e.step===i||this.updateMarkRefs(this.props),(0,u.translateThumbs)(this.getThumbs(),this.getOffsets(),s),e.max===r&&e.min===o&&e.step===i&&t.markOffsets.length===this.state.markOffsets.length||(this.calculateMarkOffsets(),a.forEach(function(e){(0,u.isStepDivisible)(o,e,i)||console.warn("The `values` property is in conflict with the current `step`, `min`, and `max` properties. Please provide values that are accessible using the min, max, and step values.")}))},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.onMouseOrTouchStart,{passive:!1}),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchend",this.schdOnEnd),this.resizeObserver.unobserve(this.trackRef.current)},t.prototype.render=function(){var e=this,t=this.props,n=t.label,r=t.labelledBy,o=t.renderTrack,i=t.renderThumb,a=t.renderMark,s=void 0===a?function(){return null}:a,c=t.values,p=t.min,h=t.max,f=t.allowOverlap,m=t.disabled,g=this.state,v=g.draggedThumbIndex,y=g.thumbZIndexes,b=g.markOffsets;return o({props:{style:{transform:"scale(1)",cursor:v>-1?"grabbing":this.props.draggableTrack?(0,u.isVertical)(this.props.direction)?"ns-resize":"ew-resize":1!==c.length||m?"inherit":"pointer"},onMouseDown:m?u.voidFn:this.onMouseDownTrack,onTouchStart:m?u.voidFn:this.onTouchStartTrack,ref:this.trackRef},isDragged:this.state.draggedThumbIndex>-1,disabled:m,children:l(l([],b.map(function(t,n,r){return s({props:{style:e.props.direction===d.Direction.Left||e.props.direction===d.Direction.Right?{position:"absolute",left:"".concat(t[0],"px"),marginTop:"".concat(t[1],"px")}:{position:"absolute",top:"".concat(t[0],"px"),marginLeft:"".concat(t[1],"px")},key:"mark".concat(n),ref:e.markRefs[n]},index:n})}),!0),c.map(function(t,o){var a=e.state.draggedThumbIndex===o;return i({index:o,value:t,isDragged:a,props:{style:{position:"absolute",zIndex:y[o],cursor:m?"inherit":a?"grabbing":"grab",userSelect:"none",touchAction:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none"},key:o,tabIndex:m?void 0:0,"aria-valuemax":f?h:c[o+1]||h,"aria-valuemin":f?p:c[o-1]||p,"aria-valuenow":t,draggable:!1,ref:e.thumbRefs[o],"aria-label":n,"aria-labelledby":r,role:"slider",onKeyDown:m?u.voidFn:e.onKeyDown,onKeyUp:m?u.voidFn:e.onKeyUp}})}),!0)})},t.defaultProps={label:"Accessibility label",labelledBy:null,step:1,direction:d.Direction.Right,rtl:!1,disabled:!1,allowOverlap:!1,draggableTrack:!1,min:0,max:100},t}(c.Component);t.default=f},507:(e,t,n)=>{"use strict";var r=n(453),o=n(6556),i=n(8859),a=n(9675),s=r("%Map%",!0),l=o("Map.prototype.get",!0),c=o("Map.prototype.set",!0),u=o("Map.prototype.has",!0),d=o("Map.prototype.delete",!0),p=o("Map.prototype.size",!0);e.exports=!!s&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a("Side channel does not contain "+i(e))},delete:function(t){if(e){var n=d(e,t);return 0===p(e)&&(e=void 0),n}return!1},get:function(t){if(e)return l(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,n){e||(e=new s),c(e,t,n)}};return t}},582:(e,t,n)=>{var r=n(1642);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,a,s,l=e.length,c=0,u=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<<u,u+=5}while(o);n.value=(s=(a=c)>>1,1&~a?s:-s),n.rest=t}},655:e=>{"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},834:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,o=((r=n(411))&&r.__esModule?r:{default:r}).default,i=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM,t.default=i},840:(e,t,n)=>{var r=n(4210),o=n(4958),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}e.exports=function(e,t){var n,c,u,d,p,h={},f=(e=e||{}).type&&s[e.type];for(n in e)if(u=e[n],r.isCustomAttribute(n))h[n]=u;else if(d=l(c=n.toLowerCase()))switch(p=r.getPropertyInfo(d),-1===i.indexOf(d)||-1===a.indexOf(t)||f||(d=l("default"+c)),h[d]=u,p&&p.type){case r.BOOLEAN:h[d]=!0;break;case r.OVERLOADED_BOOLEAN:""===u&&(h[d]=!0)}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(h[n]=u);return o.setStyleProp(e.style,h),h}},920:(e,t,n)=>{"use strict";var r=n(9675),o=n(8859),i=n(4803),a=n(507),s=n(2271)||a||i;e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r("Side channel does not contain "+o(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||(e=s()),e.set(t,n)}};return t}},1002:e=>{"use strict";e.exports=Function.prototype.apply},1020:(e,t,n)=>{"use strict";var r=n(1609),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var r,l={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===l[r]&&(l[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:l,_owner:a.current}}},1064:(e,t,n)=>{"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},1141:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),a=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},1237:e=>{"use strict";e.exports=EvalError},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1345:(e,t,n)=>{"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,{polyfill:()=>a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},1514:e=>{"use strict";e.exports=Math.abs},1519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1609),o=n(7035);t.default=function(e){var t=e.props,n=e.state,i=e.goToSlide,a=e.clones,s=e.notEnoughChildren,l=n.itemWidth,c=t.children,u=t.infinite,d=t.itemClass,p=t.itemAriaLabel,h=t.partialVisbile,f=t.partialVisible,m=o.getInitialState(n,t),g=m.flexBisis,v=m.shouldRenderOnSSR,y=m.domFullyLoaded,b=m.partialVisibilityGutter;return m.shouldRenderAtAll?(h&&console.warn('WARNING: Please correct props name: "partialVisible" as old typo will be removed in future versions!'),r.createElement(r.Fragment,null,(u?a:r.Children.toArray(c)).map(function(e,a){return r.createElement("li",{key:a,"data-index":a,onClick:function(){t.focusOnSelect&&i(a)},"aria-hidden":o.getIfSlideIsVisbile(a,n)?"false":"true","aria-label":p||(e.props.ariaLabel?e.props.ariaLabel:null),style:{flex:v?"1 0 "+g+"%":"auto",position:"relative",width:y?((h||f)&&b&&!s?l-b:l)+"px":"auto"},className:"react-multi-carousel-item "+(o.getIfSlideIsVisbile(a,n)?"react-multi-carousel-item--active":"")+" "+d},e)}))):null}},1527:(e,t,n)=>{var r=n(582),o=n(8829),i=n(4361).C,a=n(6260).P;function s(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=o.getArg(e,"ignoreInvalidMapping",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e,t){var n=e.sourceRoot,r=new s(Object.assign(t||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=o.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var i=t;null!==n&&(i=o.relative(n,t)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(t);null!=a&&r.setSourceContent(t,a)}),r},s.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);(this._skipValidation||!1!==this._validateMapping(t,n,r,i))&&(null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i}))},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=o.relative(a,r));var s=new i,l=new i;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||s.has(c)||s.add(c);var u=t.name;null==u||l.has(u)||l.add(u)},this),this._sources=s,this._names=l,e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,r))},this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column){var o="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return"undefined"!=typeof console&&console.warn&&console.warn(o),!1;throw new Error(o)}if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)){if(o="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}),this._ignoreInvalidMapping)return"undefined"!=typeof console&&console.warn&&console.warn(o),!1;throw new Error(o)}},s.prototype._serializeMappings=function(){for(var e,t,n,i,a=0,s=1,l=0,c=0,u=0,d=0,p="",h=this._mappings.toArray(),f=0,m=h.length;f<m;f++){if(e="",(t=h[f]).generatedLine!==s)for(a=0;t.generatedLine!==s;)e+=";",s++;else if(f>0){if(!o.compareByGeneratedPositionsInflated(t,h[f-1]))continue;e+=","}e+=r.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-d),d=i,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-u),u=n)),p+=e}return p},s.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.x=s},1609:e=>{"use strict";e.exports=window.React},1635:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>I,__assign:()=>i,__asyncDelegator:()=>x,__asyncGenerator:()=>S,__asyncValues:()=>_,__await:()=>O,__awaiter:()=>f,__classPrivateFieldGet:()=>M,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>N,__createBinding:()=>g,__decorate:()=>s,__disposeResources:()=>j,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>m,__importDefault:()=>D,__importStar:()=>A,__makeTemplateObject:()=>C,__metadata:()=>h,__param:()=>l,__propKey:()=>d,__read:()=>b,__rest:()=>a,__rewriteRelativeImportExtension:()=>F,__runInitializers:()=>u,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>E,__spreadArrays:()=>k,__values:()=>y,default:()=>z});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p=!1,h=n.length-1;h>=0;h--){var f={};for(var m in r)f[m]="access"===m?{}:r[m];for(var m in r.access)f.access[m]=r.access[m];f.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[h])("accessor"===l?{get:d.get,set:d.set}:d[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&o.unshift(s)}else(s=a(g))&&("field"===l?o.unshift(s):d[c]=s)}u&&Object.defineProperty(u,r.name,d),p=!0}function u(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function m(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function v(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function k(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function E(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function S(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof O?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},T=function(e){return T=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},T(e)};function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=T(e),r=0;r<n.length;r++)"default"!==n[r]&&g(t,e,n[r]);return P(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function M(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function L(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function I(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var R="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function j(e){function t(t){e.error=e.hasError?new R(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function F(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}const z={__extends:o,__assign:i,__rest:a,__decorate:s,__param:l,__esDecorate:c,__runInitializers:u,__propKey:d,__setFunctionName:p,__metadata:h,__awaiter:f,__generator:m,__createBinding:g,__exportStar:v,__values:y,__read:b,__spread:w,__spreadArrays:k,__spreadArray:E,__await:O,__asyncGenerator:S,__asyncDelegator:x,__asyncValues:_,__makeTemplateObject:C,__importStar:A,__importDefault:D,__classPrivateFieldGet:M,__classPrivateFieldSet:N,__classPrivateFieldIn:L,__addDisposableResource:I,__disposeResources:j,__rewriteRelativeImportExtension:F}},1642:(e,t)=>{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},1720:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;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},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1609),a=f(i),s=f(n(5795)),l=f(n(5556)),c=f(n(9090)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(6462)),d=n(834),p=f(d),h=n(1345);function f(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var g=t.portalClassName="ReactModalPortal",v=t.bodyOpenClassName="ReactModal__Body--open",y=d.canUseDOM&&void 0!==s.default.createPortal,b=function(e){return document.createElement(e)},w=function(){return y?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function k(e){return e()}var E=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,l=Array(i),u=0;u<i;u++)l[u]=arguments[u];return n=o=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.removePortal=function(){!y&&s.default.unmountComponentAtNode(o.node);var e=k(o.props.parentSelector);e&&e.contains(o.node)?e.removeChild(o.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=w()(o,a.default.createElement(c.default,r({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},m(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(y||(this.node=b("div")),this.node.className=this.props.portalClassName,k(this.props.parentSelector).appendChild(this.node),!y&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:k(e.parentSelector),nextParent:k(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,o=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||o)&&!y&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&y?(!this.node&&y&&(this.node=b("div")),w()(a.default.createElement(c.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){u.setElement(e)}}]),t}(i.Component);E.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(p.default),l.default.instanceOf(d.SafeHTMLCollection),l.default.instanceOf(d.SafeNodeList),l.default.arrayOf(l.default.instanceOf(p.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},E.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:v,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},E.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,h.polyfill)(E),t.default=E},1811:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9189),o=n(6802);t.getLookupTableForNextSlides=function(e,t,n,i){var a={},s=o.getSlidesToSlide(t,n);return Array(e).fill(0).forEach(function(e,n){var o=r.getOriginalCounterPart(n,t,i);if(0===n)a[0]=o;else{var l=a[n-1]+s;a[n]=l}}),a}},1813:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.isIOS=t.useThumbOverlap=t.assertUnreachable=t.voidFn=t.getTrackBackground=t.replaceAt=t.schd=t.translate=t.getClosestThumbIndex=t.translateThumbs=t.getPaddingAndBorder=t.getMargin=t.checkInitialOverlap=t.checkValuesAgainstBoundaries=t.checkBoundaries=t.isVertical=t.relativeValue=t.normalizeValue=t.isStepDivisible=t.isTouchEvent=t.getStepDecimals=void 0;var o=n(1609),i=n(8105);function a(e){return e===i.Direction.Up||e===i.Direction.Down}function s(e,t,n){e.style.transform="translate(".concat(t,"px, ").concat(n,"px)")}t.getStepDecimals=function(e){var t=e.toString().split(".")[1];return t?t.length:0},t.isTouchEvent=function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length},t.isStepDivisible=function(e,t,n){var r=Number(((t-e)/n).toFixed(8));return parseInt(r.toString(),10)===r},t.normalizeValue=function(e,n,r,o,i,a,s){var l=1e11;if(e=Math.round(e*l)/l,!a){var c=s[n-1],u=s[n+1];if(c&&c>e)return c;if(u&&u<e)return u}if(e>o)return o;if(e<r)return r;var d=Math.floor(e*l-r*l)%Math.floor(i*l),p=Math.floor(e*l-Math.abs(d)),h=0===d?e:p/l,f=Math.abs(d/l)<i/2?h:h+i,m=(0,t.getStepDecimals)(i);return parseFloat(f.toFixed(m))},t.relativeValue=function(e,t,n){return(e-t)/(n-t)},t.isVertical=a,t.checkBoundaries=function(e,t,n){if(t>=n)throw new RangeError("min (".concat(t,") is equal/bigger than max (").concat(n,")"));if(e<t)throw new RangeError("value (".concat(e,") is smaller than min (").concat(t,")"));if(e>n)throw new RangeError("value (".concat(e,") is bigger than max (").concat(n,")"))},t.checkValuesAgainstBoundaries=function(e,t,n){return e<t?t:e>n?n:e},t.checkInitialOverlap=function(e){if(!(e.length<2||e.slice(1).every(function(t,n){return e[n]<=t})))throw new RangeError("values={[".concat(e,"]} needs to be sorted when allowOverlap={false}"))},t.getMargin=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["margin-top"],10),bottom:parseInt(t["margin-bottom"],10),left:parseInt(t["margin-left"],10),right:parseInt(t["margin-right"],10)}},t.getPaddingAndBorder=function(e){var t=window.getComputedStyle(e);return{top:parseInt(t["padding-top"],10)+parseInt(t["border-top-width"],10),bottom:parseInt(t["padding-bottom"],10)+parseInt(t["border-bottom-width"],10),left:parseInt(t["padding-left"],10)+parseInt(t["border-left-width"],10),right:parseInt(t["padding-right"],10)+parseInt(t["border-right-width"],10)}},t.translateThumbs=function(e,t,n){var r=n?-1:1;e.forEach(function(e,n){return s(e,r*t[n].x,t[n].y)})},t.getClosestThumbIndex=function(e,t,n,r){for(var o=0,i=c(e[0],t,n,r),a=1;a<e.length;a++){var s=c(e[a],t,n,r);s<i&&(i=s,o=a)}return o},t.translate=s,t.schd=function(e){var t=[],n=null;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t=r,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))}},t.replaceAt=function(e,t,n){var r=e.slice(0);return r[t]=n,r},t.getTrackBackground=function(e){var t=e.values,n=e.colors,r=e.min,o=e.max,a=e.direction,s=void 0===a?i.Direction.Right:a,l=e.rtl,c=void 0!==l&&l;c&&s===i.Direction.Right?s=i.Direction.Left:c&&i.Direction.Left&&(s=i.Direction.Right);var u=t.slice(0).sort(function(e,t){return e-t}).map(function(e){return(e-r)/(o-r)*100}).reduce(function(e,t,r){return"".concat(e,", ").concat(n[r]," ").concat(t,"%, ").concat(n[r+1]," ").concat(t,"%")},"");return"linear-gradient(".concat(s,", ").concat(n[0]," 0%").concat(u,", ").concat(n[n.length-1]," 100%)")},t.voidFn=function(){},t.assertUnreachable=function(e){throw new Error("Didn't expect to get here")};var l=function(e,t,n,o,i){return void 0===i&&(i=function(e){return e}),Math.ceil(r([e],Array.from(e.children),!0).reduce(function(e,r){var a=Math.ceil(r.getBoundingClientRect().width);if(r.innerText&&r.innerText.includes(n)&&0===r.childElementCount){var s=r.cloneNode(!0);s.innerHTML=i(t.toFixed(o)),s.style.visibility="hidden",document.body.appendChild(s),a=Math.ceil(s.getBoundingClientRect().width),document.body.removeChild(s)}return a>e?a:e},e.getBoundingClientRect().width))};function c(e,t,n,r){var o=e.getBoundingClientRect(),i=o.left,s=o.top,l=o.width,c=o.height;return a(r)?Math.abs(n-(s+c/2)):Math.abs(t-(i+l/2))}t.useThumbOverlap=function(e,n,i,a,s,c){void 0===a&&(a=.1),void 0===s&&(s=" - "),void 0===c&&(c=function(e){return e});var u=(0,t.getStepDecimals)(a),d=(0,o.useState)({}),p=d[0],h=d[1],f=(0,o.useState)(c(n[i].toFixed(u))),m=f[0],g=f[1];return(0,o.useEffect)(function(){if(e){var t=e.getThumbs();if(t.length<1)return;var o={},a=e.getOffsets(),d=function(e,t,n,o,i,a,s){void 0===s&&(s=function(e){return e});var c=[],u=function(e){var d=l(n[e],o[e],i,a,s),p=t[e].x;t.forEach(function(t,h){var f=t.x,m=l(n[h],o[h],i,a,s);e!==h&&(p>=f&&p<=f+m||p+d>=f&&p+d<=f+m)&&(c.includes(h)||(c.push(e),c.push(h),c=r(r([],c,!0),[e,h],!1),u(h)))})};return u(e),Array.from(new Set(c.sort()))}(i,a,t,n,s,u,c),p=c(n[i].toFixed(u));if(d.length){var f=d.reduce(function(e,t,n,o){return e.length?r(r([],e,!0),[a[o[n]].x],!1):[a[o[n]].x]},[]);if(Math.min.apply(Math,f)===a[i].x){var m=[];d.forEach(function(e){m.push(n[e].toFixed(u))}),p=Array.from(new Set(m.sort(function(e,t){return parseFloat(e)-parseFloat(t)}))).map(c).join(s);var v=Math.min.apply(Math,f),y=Math.max.apply(Math,f),b=t[d[f.indexOf(y)]].getBoundingClientRect().width;o.left="".concat(Math.abs(v-(y+b))/2,"px"),o.transform="translate(-50%, 0)"}else o.visibility="hidden"}g(p),h(o)}},[e,n]),[m,p]},t.isIOS=function(){var e,t=(null===(e=navigator.userAgentData)||void 0===e?void 0:e.platform)||navigator.platform;return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(t)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}},1921:(e,t,n)=>{(()=>{var t={296:(e,t,n)=>{var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype.toString,p=Math.max,h=Math.min,f=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||a.test(e)?s(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function w(){var e=f();if(b(e))return k(e);s=setTimeout(w,function(e){var n=t-(e-l);return d?h(n,i-(e-c)):n}(e))}function k(e){return s=void 0,v&&r?y(e):(r=o=void 0,a)}function E(){var e=f(),n=b(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),u?y(e):a}(l);if(d)return s=setTimeout(w,t),y(l)}return void 0===s&&(s=setTimeout(w,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,i=(d="maxWait"in n)?p(g(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},E.flush=function(){return void 0===s?a:k(f())},E}},96:(e,t,n)=>{var r="Expected a function",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),p=Object.prototype.toString,h=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==p.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new TypeError(r);return g(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),function(e,t,n){var o,i,a,s,l,c,u=0,d=!1,p=!1,y=!0;if("function"!=typeof e)throw new TypeError(r);function b(t){var n=o,r=i;return o=i=void 0,u=t,s=e.apply(r,n)}function w(e){var n=e-c;return void 0===c||n>=t||n<0||p&&e-u>=a}function k(){var e=m();if(w(e))return E(e);l=setTimeout(k,function(e){var n=t-(e-c);return p?f(n,a-(e-u)):n}(e))}function E(e){return l=void 0,y&&o?b(e):(o=i=void 0,s)}function O(){var e=m(),n=w(e);if(o=arguments,i=this,c=e,n){if(void 0===l)return function(e){return u=e,l=setTimeout(k,t),d?b(e):s}(c);if(p)return l=setTimeout(k,t),b(c)}return void 0===l&&(l=setTimeout(k,t)),s}return t=v(t)||0,g(n)&&(d=!!n.leading,a=(p="maxWait"in n)?h(v(n.maxWait)||0,t):a,y="trailing"in n?!!n.trailing:y),O.cancel=function(){void 0!==l&&clearTimeout(l),u=0,o=c=i=l=void 0},O.flush=function(){return void 0===l?s:E(m())},O}(e,t,{leading:o,maxWait:t,trailing:i})}},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{LazyLoadComponent:()=>H,LazyLoadImage:()=>te,trackWindowScroll:()=>N});const e=n(1609);var t=o.n(e),r=o(697);function a(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var f=function(e){e.forEach(function(e){e.isIntersecting&&e.target.onVisible()})},m={},g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(g,e);var n,r,o,i,d=(o=g,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function g(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=d.call(this,e)).supportsObserver=!e.scrollPosition&&e.useIntersectionObserver&&a(),t.supportsObserver){var n=e.threshold;t.observer=function(e){return m[e]=m[e]||new IntersectionObserver(f,{rootMargin:e+"px"}),m[e]}(n)}return t}return n=g,r=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollPosition,t=this.placeholder.getBoundingClientRect(),n=this.placeholder.style,r=parseInt(n.getPropertyValue("margin-left"),10)||0,o=parseInt(n.getPropertyValue("margin-top"),10)||0;return{bottom:e.y+t.bottom+o,left:e.x+t.left+r,right:e.x+t.right+r,top:e.y+t.top+o}}},{key:"isPlaceholderInViewport",value:function(){if("undefined"==typeof window||!this.placeholder)return!1;var e=this.props,t=e.scrollPosition,n=e.threshold,r=this.getPlaceholderBoundingBox(t),o=t.y+window.innerHeight,i=t.x,a=t.x+window.innerWidth,s=t.y;return Boolean(s-n<=r.bottom&&o+n>=r.top&&i-n<=r.right&&a+n>=r.left)}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var e=this,n=this.props,r=n.className,o=n.height,i=n.placeholder,a=n.style,s=n.width;if(i&&"function"!=typeof i.type)return t().cloneElement(i,{ref:function(t){return e.placeholder=t}});var u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({display:"inline-block"},a);return void 0!==s&&(u.width=s),void 0!==o&&(u.height=o),t().createElement("span",{className:r,ref:function(t){return e.placeholder=t},style:u},i)}}],r&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),g}(t().Component);g.propTypes={onVisible:r.PropTypes.func.isRequired,className:r.PropTypes.string,height:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]),placeholder:r.PropTypes.element,threshold:r.PropTypes.number,useIntersectionObserver:r.PropTypes.bool,scrollPosition:r.PropTypes.shape({x:r.PropTypes.number.isRequired,y:r.PropTypes.number.isRequired}),width:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string])},g.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const v=g;var y=o(296),b=o.n(y),w=o(96),k=o.n(w),E=function(e){var t=getComputedStyle(e,null);return t.getPropertyValue("overflow")+t.getPropertyValue("overflow-y")+t.getPropertyValue("overflow-x")};const O=function(e){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t instanceof HTMLElement;){if(/(scroll|auto)/.test(E(t)))return t;t=t.parentNode}return window};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}var x=["delayMethod","delayTime"];function _(){return _=Object.assign?Object.assign.bind():function(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},_.apply(this,arguments)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function P(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var D=function(){return"undefined"==typeof window?0:window.scrollX||window.pageXOffset},M=function(){return"undefined"==typeof window?0:window.scrollY||window.pageYOffset};const N=function(e){var n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(c,n);var r,o,i,s,l=(i=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=A(i);if(s){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return P(this,e)});function c(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(n=l.call(this,e)).useIntersectionObserver=e.useIntersectionObserver&&a(),n.useIntersectionObserver)return P(n);var r=n.onChangeScroll.bind(T(n));return"debounce"===e.delayMethod?n.delayedScroll=b()(r,e.delayTime):"throttle"===e.delayMethod&&(n.delayedScroll=k()(r,e.delayTime)),n.state={scrollPosition:{x:D(),y:M()}},n.baseComponentRef=t().createRef(),n}return r=c,(o=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){"undefined"==typeof window||this.useIntersectionObserver||O(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement=O(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){"undefined"==typeof window||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:D(),y:M()}})}},{key:"render",value:function(){var n=this.props,r=(n.delayMethod,n.delayTime,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,x)),o=this.useIntersectionObserver?null:this.state.scrollPosition;return t().createElement(e,_({forwardRef:this.baseComponentRef,scrollPosition:o},r))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=function(e){if("object"!==S(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===S(o)?o:String(o)),r)}var o}(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),c}(t().Component);return n.propTypes={delayMethod:r.PropTypes.oneOf(["debounce","throttle"]),delayTime:r.PropTypes.number,useIntersectionObserver:r.PropTypes.bool},n.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},n};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(s,e);var n,r,o,i,a=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=R(o);if(i){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return n=s,(r=[{key:"render",value:function(){return t().createElement(v,this.props)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=function(e){if("object"!==L(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===L(o)?o:String(o)),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(t().Component);const F=N(j);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(l,e);var n,r,o,i,s=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=V(o);if(i){var n=V(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return U(e)}(this,e)});function l(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),t=s.call(this,e);var n=e.afterLoad,r=e.beforeLoad,o=e.scrollPosition,i=e.visibleByDefault;return t.state={visible:i},i&&(r(),n()),t.onVisible=t.onVisible.bind(U(t)),t.isScrollTracked=Boolean(o&&Number.isFinite(o.x)&&o.x>=0&&Number.isFinite(o.y)&&o.y>=0),t}return n=l,(r=[{key:"componentDidUpdate",value:function(e,t){t.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var e=this.props,n=e.className,r=e.delayMethod,o=e.delayTime,i=e.height,s=e.placeholder,l=e.scrollPosition,c=e.style,u=e.threshold,d=e.useIntersectionObserver,p=e.width;return this.isScrollTracked||d&&a()?t().createElement(v,{className:n,height:i,onVisible:this.onVisible,placeholder:s,scrollPosition:l,style:c,threshold:u,useIntersectionObserver:d,width:p}):t().createElement(F,{className:n,delayMethod:r,delayTime:o,height:i,onVisible:this.onVisible,placeholder:s,style:c,threshold:u,width:p})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=function(e){if("object"!==z(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===z(o)?o:String(o)),r)}var o}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),l}(t().Component);W.propTypes={afterLoad:r.PropTypes.func,beforeLoad:r.PropTypes.func,useIntersectionObserver:r.PropTypes.bool,visibleByDefault:r.PropTypes.bool},W.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const H=W;function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}var q=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){Y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Y(e,t,n){return(t=K(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(){return X=Object.assign?Object.assign.bind():function(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},X.apply(this,arguments)}function K(e){var t=function(e){if("object"!==Q(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Q(t)?t:String(t)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(s,e);var n,r,o,i,a=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=J(o);if(i){var n=J(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,e)).state={loaded:!1},t}return n=s,(r=[{key:"onImageLoad",value:function(){var e=this;return this.state.loaded?null:function(t){e.props.onLoad(t),e.props.afterLoad(),e.setState({loaded:!0})}}},{key:"getImg",value:function(){var e=this.props,n=(e.afterLoad,e.beforeLoad,e.delayMethod,e.delayTime,e.effect,e.placeholder,e.placeholderSrc,e.scrollPosition,e.threshold,e.useIntersectionObserver,e.visibleByDefault,e.wrapperClassName,e.wrapperProps,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,q));return t().createElement("img",X({},n,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var e=this.props,n=e.beforeLoad,r=e.className,o=e.delayMethod,i=e.delayTime,a=e.height,s=e.placeholder,l=e.scrollPosition,c=e.style,u=e.threshold,d=e.useIntersectionObserver,p=e.visibleByDefault,h=e.width;return t().createElement(H,{beforeLoad:n,className:r,delayMethod:o,delayTime:i,height:a,placeholder:s,scrollPosition:l,style:c,threshold:u,useIntersectionObserver:d,visibleByDefault:p,width:h},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(e){var n=this.props,r=n.effect,o=n.height,i=n.placeholderSrc,a=n.width,s=n.wrapperClassName,l=n.wrapperProps,c=this.state.loaded,u=c?" lazy-load-image-loaded":"",d=c||!i?{}:{backgroundImage:"url(".concat(i,")"),backgroundSize:"100% 100%"};return t().createElement("span",X({className:s+" lazy-load-image-background "+r+u,style:G(G({},d),{},{color:"transparent",display:"inline-block",height:o,width:a})},l),e)}},{key:"render",value:function(){var e=this.props,t=e.effect,n=e.placeholderSrc,r=e.visibleByDefault,o=e.wrapperClassName,i=e.wrapperProps,a=this.getLazyLoadImage();return(t||n)&&!r||o||i?this.getWrappedLazyLoadImage(a):a}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),s}(t().Component);ee.propTypes={onLoad:r.PropTypes.func,afterLoad:r.PropTypes.func,beforeLoad:r.PropTypes.func,delayMethod:r.PropTypes.string,delayTime:r.PropTypes.number,effect:r.PropTypes.string,placeholderSrc:r.PropTypes.string,threshold:r.PropTypes.number,useIntersectionObserver:r.PropTypes.bool,visibleByDefault:r.PropTypes.bool,wrapperClassName:r.PropTypes.string,wrapperProps:r.PropTypes.object},ee.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const te=ee})(),e.exports=i})()},1928:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},2012:(e,t,n)=>{"use strict";var r=n(9516),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},2259:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r;return function(){var o=arguments;r||(e.apply(this,o),r=!0,"function"==typeof n&&n(!0),setTimeout(function(){r=!1,"function"==typeof n&&n(!1)},t))}}},2271:(e,t,n)=>{"use strict";var r=n(453),o=n(6556),i=n(8859),a=n(507),s=n(9675),l=r("%WeakMap%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),p=o("WeakMap.prototype.delete",!0);e.exports=l?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new s("Side channel does not contain "+i(e))},delete:function(n){if(l&&n&&("object"==typeof n||"function"==typeof n)){if(e)return p(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return l&&n&&("object"==typeof n||"function"==typeof n)&&e?c(e,n):t&&t.get(n)},has:function(n){return l&&n&&("object"==typeof n||"function"==typeof n)&&e?d(e,n):!!t&&t.has(n)},set:function(n,r){l&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new l),u(e,n,r)):a&&(t||(t=a()),t.set(n,r))}};return n}:a},2411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){return[].slice.call(t.querySelectorAll("*"),0).reduce(function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])},[]).filter(a)};var n="none",r="contents",o=/^(input|select|textarea|button|object|iframe)$/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var o=window.getComputedStyle(e),i=o.getPropertyValue("display");return t?i!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,o):i===n}catch(e){return console.warn("Failed to inspect element style"),!1}}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&function(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}(e,!n)}e.exports=t.default},2424:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1609);t.isMouseMoveEvent=function(e){return"clientY"in e};var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.Component);t.default=a},2471:(e,t,n)=>{var r=n(5496),o=n(7731).formatDOM,i=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(i);return n&&n[1]&&(t=n[1]),o(r(e),null,t)}},2505:(e,t,n)=>{e.exports=n(8015)},2634:()=>{},2642:(e,t,n)=>{"use strict";var r=n(7720),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},l=function(e,t,n){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},c=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(a),u=c?a.slice(0,c.index):a,d=[];if(u){if(!n.plainObjects&&o.call(Object.prototype,u)&&!n.allowPrototypes)return;d.push(u)}for(var p=0;n.depth>0&&null!==(c=s.exec(a))&&p<n.depth;){if(p+=1,!n.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(c[1])}if(c){if(!0===n.strictDepth)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");d.push("["+a.slice(c.index)+"]")}return function(e,t,n,o){var i=0;if(e.length>0&&"[]"===e[e.length-1]){var a=e.slice(0,-1).join("");i=Array.isArray(t)&&t[a]?t[a].length:0}for(var s=o?t:l(t,n,i),c=e.length-1;c>=0;--c){var u,d=e[c];if("[]"===d&&n.parseArrays)u=n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:r.combine([],s);else{u=n.plainObjects?{__proto__:null}:{};var p="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,h=n.decodeDotInKeys?p.replace(/%2E/g,"."):p,f=parseInt(h,10);n.parseArrays||""!==h?!isNaN(f)&&d!==h&&String(f)===h&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(u=[])[f]=s:"__proto__"!==h&&(u[h]=s):u={0:s}}s=u}return s}(d,t,n,i)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?a.charset:e.charset,n=void 0===e.duplicates?a.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||a.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:a.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:a.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return n.plainObjects?{__proto__:null}:{};for(var u="string"==typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=t.parameterLimit===1/0?void 0:t.parameterLimit,d=c.split(t.delimiter,t.throwOnLimitExceeded?u+1:u);if(t.throwOnLimitExceeded&&d.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var p,h=-1,f=t.charset;if(t.charsetSentinel)for(p=0;p<d.length;++p)0===d[p].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[p]?f="utf-8":"utf8=%26%2310003%3B"===d[p]&&(f="iso-8859-1"),h=p,p=d.length);for(p=0;p<d.length;++p)if(p!==h){var m,g,v=d[p],y=v.indexOf("]="),b=-1===y?v.indexOf("="):y+1;-1===b?(m=t.decoder(v,a.decoder,f,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(v.slice(0,b),a.decoder,f,"key"),g=r.maybeMap(l(v.slice(b+1),t,i(n[m])?n[m].length:0),function(e){return t.decoder(e,a.decoder,f,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===f&&(g=s(String(g))),v.indexOf("[]=")>-1&&(g=i(g)?[g]:g);var w=o.call(n,m);w&&"combine"===t.duplicates?n[m]=r.combine(n[m],g):w&&"last"!==t.duplicates||(n[m]=g)}return n}(e,n):e,d=n.plainObjects?{__proto__:null}:{},p=Object.keys(u),h=0;h<p.length;++h){var f=p[h],m=c(f,u[f],n,"string"==typeof e);d=r.merge(d,m,n)}return!0===n.allowSparse?d:r.compact(d)}},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2877:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1609);t.default=function(e){r.useEffect(e,[])}},2881:(e,t,n)=>{"use strict";var r=n(9516),o=n(7412);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,function(n){e=n.call(i,e,t)}),e}},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case o:return t}}}function E(e){return k(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||k(e)===u},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===p},t.isFragment=function(e){return k(e)===i},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===s},t.isStrictMode=function(e){return k(e)===a},t.isSuspense=function(e){return k(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===h||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=k},3093:(e,t,n)=>{"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},3126:(e,t,n)=>{"use strict";var r=n(6743),o=n(9675),i=n(76),a=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new o("a function is required");return a(r,i,e)}},3144:(e,t,n)=>{"use strict";var r=n(6743),o=n(1002),i=n(76),a=n(7119);e.exports=a||r.call(i,o)},3191:(e,t,n)=>{"use strict";var r=n(1928);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},3404:(e,t,n)=>{"use strict";e.exports=n(3072)},3471:(e,t,n)=>{"use strict";var r=n(9516);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},3628:(e,t,n)=>{"use strict";var r=n(8648),o=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:o?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return o(e)}:i?function(e){return i(e)}:null},3864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3948:(e,t,n)=>{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4039:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},4145:(e,t,n)=>{e.exports=n(5961)},4146:(e,t,n)=>{"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var o=h(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!(i[v]||r&&r[v]||m&&m[v]||s&&s[v])){var y=p(n,v);try{c(t,v,y)}catch(e){}}}}return t}},4169:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1609),o=n(9189),i=n(1811),a=n(6802);t.default=function(e){var t=e.props,n=e.state,s=e.goToSlide,l=e.getState,c=t.showDots,u=t.customDot,d=t.dotListClass,p=t.infinite,h=t.children;if(!c||a.notEnoughChildren(n))return null;var f,m=n.currentSlide,g=n.slidesToShow,v=a.getSlidesToSlide(n,t),y=r.Children.toArray(h);f=p?Math.ceil(y.length/v):Math.ceil((y.length-g)/v)+1;var b=i.getLookupTableForNextSlides(f,n,t,y),w=o.getOriginalIndexLookupTableByClones(g,y),k=w[m];return r.createElement("ul",{className:"react-multi-carousel-dot-list "+d},Array(f).fill(0).map(function(e,t){var n,o;if(p){o=b[t];var i=w[o];n=k===i||i<=k&&k<i+v}else{var a=y.length-g,c=t*v;n=(o=a<c?a:c)===m||o<m&&m<o+v&&m<y.length-g}return u?r.cloneElement(u,{index:t,active:n,key:t,onClick:function(){return s(o)},carouselState:l()}):r.createElement("li",{"data-index":t,key:t,className:"react-multi-carousel-dot "+(n?"react-multi-carousel-dot--active":"")},r.createElement("button",{"aria-label":"Go to slide "+(t+1),onClick:function(){return s(o)}}))}))}},4202:(e,t,n)=>{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4210:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}Object.defineProperty(t,"__esModule",{value:!0});var i={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(function(e){i[e]=new o(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t,n,a=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],l=a[1];i[s]=new o(s,1,!1,l,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){i[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){i[e]=new o(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(e){i[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){i[e]=new o(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){i[e]=new o(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){i[e]=new o(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){i[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)});var a=/[\-\:]([a-z])/g,s=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(e){var t=e.replace(a,s);i[t]=new o(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(e){var t=e.replace(a,s);i[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(a,s);i[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){i[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}),i.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){i[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)});var l=n(6811),c=l.CAMELCASE,u=l.SAME,d=l.possibleStandardNames,p=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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]*$")),h=Object.keys(d).reduce(function(e,t){var n=d[t];return n===u?e[t]=t:n===c?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return i.hasOwnProperty(e)?i[e]:null},t.isCustomAttribute=p,t.possibleStandardNames=h},4361:(e,t,n)=>{var r=n(8829),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r<o;r++)n.add(e[r],t);return n},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var n=i?e:r.toSetString(e),a=i?this.has(e):o.call(this._set,n),s=this._array.length;a&&!t||this._array.push(e),a||(i?this._set.set(e,s):this._set[n]=s)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=r.toSetString(e);return o.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.C=a},4364:(e,t,n)=>{"use strict";var r=n(1635),o=n(1609),i=r.__importDefault(n(47)),a=n(6691);t.A=function(e){var t=void 0===e?{}:e,n=t.initialWidth,r=void 0===n?1/0:n,s=t.initialHeight,l=void 0===s?1/0:s,c=t.onChange,u=i.default({width:a.isBrowser?window.innerWidth:r,height:a.isBrowser?window.innerHeight:l}),d=u[0],p=u[1];return o.useEffect(function(){if(a.isBrowser){var e=function(){var e=window.innerWidth,t=window.innerHeight;p({width:e,height:t}),c&&c(e,t)};return a.on(window,"resize",e),function(){a.off(window,"resize",e)}}},[]),d}},4459:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4490:(e,t,n)=>{"use strict";var r=n(9516),o=n(2881),i=n(3864),a=n(7412),s=n(1928);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},4552:e=>{"use strict";var t={linear:function(e,t,n,r){return(n-t)*e/r+t},easeInQuad:function(e,t,n,r){return(n-t)*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){return-(n-t)*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){var o=n-t;return(e/=r/2)<1?o/2*e*e+t:-o/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){return(n-t)*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){return(n-t)*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){var o=n-t;return(e/=r/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){return(n-t)*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){return-(n-t)*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){var o=n-t;return(e/=r/2)<1?o/2*e*e*e*e+t:-o/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){return(n-t)*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){return(n-t)*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){var o=n-t;return(e/=r/2)<1?o/2*e*e*e*e*e+t:o/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){var o=n-t;return-o*Math.cos(e/r*(Math.PI/2))+o+t},easeOutSine:function(e,t,n,r){return(n-t)*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){return-(n-t)/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){return 0==e?t:(n-t)*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){var o=n-t;return e==r?t+o:o*(1-Math.pow(2,-10*e/r))+t},easeInOutExpo:function(e,t,n,r){var o=n-t;return 0===e?t:e===r?t+o:(e/=r/2)<1?o/2*Math.pow(2,10*(e-1))+t:o/2*(2-Math.pow(2,-10*--e))+t},easeInCirc:function(e,t,n,r){return-(n-t)*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){return(n-t)*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){var o=n-t;return(e/=r/2)<1?-o/2*(Math.sqrt(1-e*e)-1)+t:o/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,n,r){var o,i,a,s=n-t;return a=1.70158,0===e?t:1===(e/=r)?t+s:((i=0)||(i=.3*r),(o=s)<Math.abs(s)?(o=s,a=i/4):a=i/(2*Math.PI)*Math.asin(s/o),-o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)+t)},easeOutElastic:function(e,t,n,r){var o,i,a,s=n-t;return a=1.70158,0===e?t:1===(e/=r)?t+s:((i=0)||(i=.3*r),(o=s)<Math.abs(s)?(o=s,a=i/4):a=i/(2*Math.PI)*Math.asin(s/o),o*Math.pow(2,-10*e)*Math.sin((e*r-a)*(2*Math.PI)/i)+s+t)},easeInOutElastic:function(e,t,n,r){var o,i,a,s=n-t;return a=1.70158,0===e?t:2==(e/=r/2)?t+s:((i=0)||(i=r*(.3*1.5)),(o=s)<Math.abs(s)?(o=s,a=i/4):a=i/(2*Math.PI)*Math.asin(s/o),e<1?o*Math.pow(2,10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*-.5+t:o*Math.pow(2,-10*(e-=1))*Math.sin((e*r-a)*(2*Math.PI)/i)*.5+s+t)},easeInBack:function(e,t,n,r,o){return void 0===o&&(o=1.70158),(n-t)*(e/=r)*e*((o+1)*e-o)+t},easeOutBack:function(e,t,n,r,o){return void 0===o&&(o=1.70158),(n-t)*((e=e/r-1)*e*((o+1)*e+o)+1)+t},easeInOutBack:function(e,t,n,r,o){var i=n-t;return void 0===o&&(o=1.70158),(e/=r/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+t:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},easeInBounce:function(e,n,r,o){var i=r-n;return i-t.easeOutBounce(o-e,0,i,o)+n},easeOutBounce:function(e,t,n,r){var o=n-t;return(e/=r)<1/2.75?o*(7.5625*e*e)+t:e<2/2.75?o*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?o*(7.5625*(e-=2.25/2.75)*e+.9375)+t:o*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,n,r,o){var i=r-n;return e<o/2?.5*t.easeInBounce(2*e,0,i,o)+n:.5*t.easeOutBounce(2*e-o,0,i,o)+.5*i+n}};e.exports=t},4680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.partialVisbile,r=t.partialVisible,o=t.centerMode,i=t.ssr,a=t.responsive;if((n||r)&&o)throw new Error("center mode can not be used at the same time with partialVisible");if(!a)throw i?new Error("ssr mode need to be used in conjunction with responsive prop"):new Error("Responsive prop is needed for deciding the amount of items to show on the screen");if(a&&"object"!=typeof a)throw new Error("responsive prop must be an object")}},4737:(e,t,n)=>{"use strict";e.exports=n(8989)},4765:()=>{},4803:(e,t,n)=>{"use strict";var r=n(8859),o=n(9675),i=function(e,t,n){for(var r,o=e;null!=(r=o.next);o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r};e.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new o("Side channel does not contain "+r(e))},delete:function(t){var n=e&&e.next,r=function(e,t){if(e)return i(e,t,!0)}(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return function(e,t){if(e){var n=i(e,t);return n&&n.value}}(e,t)},has:function(t){return function(e,t){return!!e&&!!i(e,t)}(e,t)},set:function(t,n){e||(e={next:void 0}),function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(e,t,n)}};return t}},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)o(e,n[t]);var i=document.body;for(var a in r)o(i,r[a]);n={},r={}},t.log=function(){};var n={},r={};function o(e,t){e.classList.remove(t)}t.add=function(e,t){return o=e.classList,i="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach(function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),o.add(e)});var o,i},t.remove=function(e,t){return o=e.classList,i="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach(function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&o.remove(e)});var o,i}},4841:(e,t,n)=>{"use strict";var r=n(9641).version,o={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],l=void 0===s||a(s,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},4867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPartialVisibilityGutter=function(e,t,n,r){var o=0,i=r||n;return t&&i&&(o=e[i].partialVisibilityGutter||e[i].paritialVisibilityGutter),o},t.getWidthFromDeviceType=function(e,t){var n;return t[e]&&(n=(100/t[e].items).toFixed(1)),n},t.getItemClientSideWidth=function(e,t,n){return Math.round(n/(t+(e.centerMode?1:0)))}},4896:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4958:(e,t,n)=>{var r=n(1609),o=n(5229).default,i={reactCompat:!0},a=r.version.split(".")[0]>=16,s=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"==typeof t,i={},a={};for(n in e)r=e[n],o&&(i=t(n,r))&&2===i.length?a[i[0]]=i[1]:"string"==typeof r&&(a[r]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;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}},setStyleProp:function(e,t){if(null!=e)try{t.style=o(e,i)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!s.has(e.name)},elementsWithNoTextChildren:s}},5019:(e,t,n)=>{"use strict";var r=n(9516);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},5155:(e,t,n)=>{"use strict";var r=n(9516),o=n(9106),i=n(3471),a=n(4490),s=n(5343),l=n(4841),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});var i,u=[];if(this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)}),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(u),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var p=t;r.length;){var h=r.shift(),f=r.shift();try{p=h(p)}catch(e){f(e);break}}try{i=a(p)}catch(e){return Promise.reject(e)}for(;u.length;)i=i.then(u.shift(),u.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}}),e.exports=u},5229:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(9108)),i=n(8917);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n):n}},5270:(e,t)=>{t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},5343:(e,t,n)=>{"use strict";var r=n(9516);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),function(e){var t=c[e]||i,o=t(e);r.isUndefined(o)&&t!==l||(n[e]=o)}),n}},5345:e=>{"use strict";e.exports=URIError},5373:(e,t,n)=>{"use strict";var r=n(8636),o=n(2642),i=n(7146);e.exports={formats:i,parse:o,stringify:r}},5413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},5449:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},5496:e=>{var t="html",n="head",r="body",o=/<([a-zA-Z]+[0-9]?)/,i=/<head[^]*>/i,a=/<body[^]*>/i,s=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"==typeof window&&window.DOMParser;if("function"==typeof c){var u=new c;s=l=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),u.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();s=function(e,t){return t?(d.documentElement.querySelector(t).innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var p,h="object"==typeof document?document.createElement("template"):{};h.content&&(p=function(e){return h.innerHTML=e,h.content.childNodes}),e.exports=function(e){var c,u,d,h,f=e.match(o);switch(f&&f[1]&&(c=f[1].toLowerCase()),c){case t:return u=l(e),i.test(e)||(d=u.querySelector(n))&&d.parentNode.removeChild(d),a.test(e)||(d=u.querySelector(r))&&d.parentNode.removeChild(d),u.querySelectorAll(t);case n:case r:return h=(u=s(e)).querySelectorAll(c),a.test(e)&&i.test(e)?h[0].parentNode.childNodes:h;default:return p?p(e):(d=s(e,r).querySelector(r)).childNodes}}},5556:(e,t,n)=>{e.exports=n(2694)()},5592:(e,t,n)=>{"use strict";var r=n(9516),o=n(7522),i=n(3948),a=n(9106),s=n(9615),l=n(2012),c=n(4202),u=n(7763),d=n(4896),p=n(1928);e.exports=function(e){return new Promise(function(t,n){var h,f=e.data,m=e.headers,g=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(f)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(b+":"+w)}var k=s(e.baseURL,e.url);function E(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,i={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};o(function(e){t(e),v()},function(e){n(e),v()},i),y=null}}if(y.open(e.method.toUpperCase(),a(k,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=E:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(E)},y.onabort=function(){y&&(n(u("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(u("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var O=(e.withCredentials||c(k))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;O&&(m[e.xsrfHeaderName]=O)}"setRequestHeader"in y&&r.forEach(m,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(n(!e||e&&e.type?new p("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),f||(f=null),y.send(f)})}},5795:e=>{"use strict";e.exports=window.ReactDOM},5880:e=>{"use strict";e.exports=Math.pow},5961:(e,t,n)=>{"use strict";var r=n(6163);t.default=r.default},6163:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1609),a=n(7035),s=n(2424),l=n(4169),c=n(8371),u=n(1519),d=n(6802),p=400,h="transform 400ms ease-in-out",f=function(e){function t(t){var n=e.call(this,t)||this;return n.containerRef=i.createRef(),n.listRef=i.createRef(),n.state={itemWidth:0,slidesToShow:0,currentSlide:0,totalItems:i.Children.count(t.children),deviceType:"",domLoaded:!1,transform:0,containerWidth:0},n.onResize=n.onResize.bind(n),n.handleDown=n.handleDown.bind(n),n.handleMove=n.handleMove.bind(n),n.handleOut=n.handleOut.bind(n),n.onKeyUp=n.onKeyUp.bind(n),n.handleEnter=n.handleEnter.bind(n),n.setIsInThrottle=n.setIsInThrottle.bind(n),n.next=a.throttle(n.next.bind(n),t.transitionDuration||p,n.setIsInThrottle),n.previous=a.throttle(n.previous.bind(n),t.transitionDuration||p,n.setIsInThrottle),n.goToSlide=a.throttle(n.goToSlide.bind(n),t.transitionDuration||p,n.setIsInThrottle),n.onMove=!1,n.initialX=0,n.lastX=0,n.isAnimationAllowed=!1,n.direction="",n.initialY=0,n.isInThrottle=!1,n.transformPlaceHolder=0,n}return o(t,e),t.prototype.resetTotalItems=function(){var e=this,t=i.Children.count(this.props.children),n=a.notEnoughChildren(this.state)?0:Math.max(0,Math.min(this.state.currentSlide,t));this.setState({totalItems:t,currentSlide:n},function(){e.setContainerAndItemWidth(e.state.slidesToShow,!0)})},t.prototype.setIsInThrottle=function(e){void 0===e&&(e=!1),this.isInThrottle=e},t.prototype.setTransformDirectly=function(e,t){var n=this.props.additionalTransfrom;this.transformPlaceHolder=e;var r=d.getTransform(this.state,this.props,this.transformPlaceHolder);this.listRef&&this.listRef.current&&(this.setAnimationDirectly(t),this.listRef.current.style.transform="translate3d("+(r+n)+"px,0,0)")},t.prototype.setAnimationDirectly=function(e){this.listRef&&this.listRef.current&&(this.listRef.current.style.transition=e?this.props.customTransition||h:"none")},t.prototype.componentDidMount=function(){this.setState({domLoaded:!0}),this.setItemsToShow(),window.addEventListener("resize",this.onResize),this.onResize(!0),this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),this.props.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},t.prototype.setClones=function(e,t,n,r){var o=this;void 0===r&&(r=!1),this.isAnimationAllowed=!1;var s=i.Children.toArray(this.props.children),l=a.getInitialSlideInInfiniteMode(e||this.state.slidesToShow,s),c=a.getClones(this.state.slidesToShow,s),u=s.length<this.state.slidesToShow?0:this.state.currentSlide;this.setState({totalItems:c.length,currentSlide:n&&!r?u:l},function(){o.correctItemsPosition(t||o.state.itemWidth)})},t.prototype.setItemsToShow=function(e,t){var n=this,r=this.props.responsive;Object.keys(r).forEach(function(o){var i=r[o],a=i.breakpoint,s=i.items,l=a.max,c=a.min,u=[window.innerWidth];window.screen&&window.screen.width&&u.push(window.screen.width);var d=Math.min.apply(Math,u);c<=d&&d<=l&&(n.setState({slidesToShow:s,deviceType:o}),n.setContainerAndItemWidth(s,e,t))})},t.prototype.setContainerAndItemWidth=function(e,t,n){var r=this;if(this.containerRef&&this.containerRef.current){var o=this.containerRef.current.offsetWidth,i=a.getItemClientSideWidth(this.props,e,o);this.setState({containerWidth:o,itemWidth:i},function(){r.props.infinite&&r.setClones(e,i,t,n)}),t&&this.correctItemsPosition(i)}},t.prototype.correctItemsPosition=function(e,t,n){t&&(this.isAnimationAllowed=!0),!t&&this.isAnimationAllowed&&(this.isAnimationAllowed=!1);var r=this.state.totalItems<this.state.slidesToShow?0:-e*this.state.currentSlide;n&&this.setTransformDirectly(r,!0),this.setState({transform:r})},t.prototype.onResize=function(e){var t;t=!(!this.props.infinite||"boolean"==typeof e&&e),this.setItemsToShow(t)},t.prototype.componentDidUpdate=function(e,n){var r=this,o=e.keyBoardControl,i=e.autoPlay,s=e.children,l=n.containerWidth,c=n.domLoaded,u=n.currentSlide;if(this.containerRef&&this.containerRef.current&&this.containerRef.current.offsetWidth!==l&&(this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),this.itemsToShowTimeout=setTimeout(function(){r.setItemsToShow(!0)},this.props.transitionDuration||p)),o&&!this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),!o&&this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),i&&!this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),i||!this.props.autoPlay||this.autoPlay||(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed)),s.length!==this.props.children.length?t.clonesTimeout=setTimeout(function(){r.props.infinite?r.setClones(r.state.slidesToShow,r.state.itemWidth,!0,!0):r.resetTotalItems()},this.props.transitionDuration||p):this.props.infinite&&this.state.currentSlide!==u&&this.correctClonesPosition({domLoaded:c}),this.transformPlaceHolder!==this.state.transform&&(this.transformPlaceHolder=this.state.transform),this.props.autoPlay&&this.props.rewind&&!this.props.infinite&&a.isInRightEnd(this.state)){var d=this.props.transitionDuration||p;t.isInThrottleTimeout=setTimeout(function(){r.setIsInThrottle(!1),r.resetAutoplayInterval(),r.goToSlide(0,void 0,!!r.props.rewindWithAnimation)},d+this.props.autoPlaySpeed)}},t.prototype.correctClonesPosition=function(e){var n=this,r=e.domLoaded,o=i.Children.toArray(this.props.children),s=a.checkClonesPosition(this.state,o,this.props),l=s.isReachingTheEnd,c=s.isReachingTheStart,u=s.nextSlide,d=s.nextPosition;this.state.domLoaded&&r&&(l||c)&&(this.isAnimationAllowed=!1,t.transformTimeout=setTimeout(function(){n.setState({transform:d,currentSlide:u})},this.props.transitionDuration||p))},t.prototype.next=function(e){var n=this;void 0===e&&(e=0);var r=this.props,o=r.afterChange,i=r.beforeChange;if(!a.notEnoughChildren(this.state)){var s=a.populateNextSlides(this.state,this.props,e),l=s.nextSlides,c=s.nextPosition,u=this.state.currentSlide;void 0!==l&&void 0!==c&&("function"==typeof i&&i(l,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:c,currentSlide:l},function(){"function"==typeof o&&(t.afterChangeTimeout=setTimeout(function(){o(u,n.getState())},n.props.transitionDuration||p))}))}},t.prototype.previous=function(e){var n=this;void 0===e&&(e=0);var r=this.props,o=r.afterChange,i=r.beforeChange;if(!a.notEnoughChildren(this.state)){var s=a.populatePreviousSlides(this.state,this.props,e),l=s.nextSlides,c=s.nextPosition;if(void 0!==l&&void 0!==c){var u=this.state.currentSlide;"function"==typeof i&&i(l,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:c,currentSlide:l},function(){"function"==typeof o&&(t.afterChangeTimeout2=setTimeout(function(){o(u,n.getState())},n.props.transitionDuration||p))})}}},t.prototype.resetAutoplayInterval=function(){this.props.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize),this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),t.clonesTimeout&&clearTimeout(t.clonesTimeout),t.isInThrottleTimeout&&clearTimeout(t.isInThrottleTimeout),t.transformTimeout&&clearTimeout(t.transformTimeout),t.afterChangeTimeout&&clearTimeout(t.afterChangeTimeout),t.afterChangeTimeout2&&clearTimeout(t.afterChangeTimeout2),t.afterChangeTimeout3&&clearTimeout(t.afterChangeTimeout3)},t.prototype.resetMoveStatus=function(){this.onMove=!1,this.initialX=0,this.lastX=0,this.direction="",this.initialY=0},t.prototype.getCords=function(e){var t=e.clientX,n=e.clientY;return{clientX:d.parsePosition(this.props,t),clientY:d.parsePosition(this.props,n)}},t.prototype.handleDown=function(e){if(!(!s.isMouseMoveEvent(e)&&!this.props.swipeable||s.isMouseMoveEvent(e)&&!this.props.draggable||this.isInThrottle)){var t=this.getCords(s.isMouseMoveEvent(e)?e:e.touches[0]),n=t.clientX,r=t.clientY;this.onMove=!0,this.initialX=n,this.initialY=r,this.lastX=n,this.isAnimationAllowed=!1}},t.prototype.handleMove=function(e){if(!(!s.isMouseMoveEvent(e)&&!this.props.swipeable||s.isMouseMoveEvent(e)&&!this.props.draggable||a.notEnoughChildren(this.state))){var t=this.getCords(s.isMouseMoveEvent(e)?e:e.touches[0]),n=t.clientX,r=t.clientY,o=this.initialX-n,i=this.initialY-r;if(this.onMove){if(!(Math.abs(o)>Math.abs(i)))return;var l=a.populateSlidesOnMouseTouchMove(this.state,this.props,this.initialX,this.lastX,n,this.transformPlaceHolder),c=l.direction,u=l.nextPosition,d=l.canContinue;c&&(this.direction=c,d&&void 0!==u&&this.setTransformDirectly(u)),this.lastX=n}}},t.prototype.handleOut=function(e){this.props.autoPlay&&!this.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed));var t="touchend"===e.type&&!this.props.swipeable,n=("mouseleave"===e.type||"mouseup"===e.type)&&!this.props.draggable;if(!t&&!n&&this.onMove){if(this.setAnimationDirectly(!0),"right"===this.direction)if(this.initialX-this.lastX>=this.props.minimumTouchDrag){var r=Math.round((this.initialX-this.lastX)/this.state.itemWidth);this.next(r)}else this.correctItemsPosition(this.state.itemWidth,!0,!0);"left"===this.direction&&(this.lastX-this.initialX>this.props.minimumTouchDrag?(r=Math.round((this.lastX-this.initialX)/this.state.itemWidth),this.previous(r)):this.correctItemsPosition(this.state.itemWidth,!0,!0)),this.resetMoveStatus()}},t.prototype.isInViewport=function(e){var t=e.getBoundingClientRect(),n=t.top,r=void 0===n?0:n,o=t.left,i=void 0===o?0:o,a=t.bottom,s=void 0===a?0:a,l=t.right,c=void 0===l?0:l;return 0<=r&&0<=i&&s<=(window.innerHeight||document.documentElement.clientHeight)&&c<=(window.innerWidth||document.documentElement.clientWidth)},t.prototype.isChildOfCarousel=function(e){return!!(e instanceof Element&&this.listRef&&this.listRef.current)&&this.listRef.current.contains(e)},t.prototype.onKeyUp=function(e){var t=e.target;switch(e.keyCode){case 37:if(this.isChildOfCarousel(t))return this.previous();break;case 39:if(this.isChildOfCarousel(t))return this.next();break;case 9:if(this.isChildOfCarousel(t)&&t instanceof HTMLInputElement&&this.isInViewport(t))return this.next()}},t.prototype.handleEnter=function(e){s.isMouseMoveEvent(e)&&this.autoPlay&&this.props.autoPlay&&this.props.pauseOnHover&&(clearInterval(this.autoPlay),this.autoPlay=void 0)},t.prototype.goToSlide=function(e,n,r){var o=this;if(void 0===r&&(r=!0),!this.isInThrottle){var i=this.state.itemWidth,a=this.props,s=a.afterChange,l=a.beforeChange,c=this.state.currentSlide;"function"!=typeof l||n&&("object"!=typeof n||n.skipBeforeChange)||l(e,this.getState()),this.isAnimationAllowed=r,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({currentSlide:e,transform:-i*e},function(){o.props.infinite&&o.correctClonesPosition({domLoaded:!0}),"function"!=typeof s||n&&("object"!=typeof n||n.skipAfterChange)||(t.afterChangeTimeout3=setTimeout(function(){s(c,o.getState())},o.props.transitionDuration||p))})}},t.prototype.getState=function(){return this.state},t.prototype.renderLeftArrow=function(e){var t=this,n=this.props,r=n.customLeftArrow,o=n.rtl;return i.createElement(c.LeftArrow,{customLeftArrow:r,getState:function(){return t.getState()},previous:this.previous,disabled:e,rtl:o})},t.prototype.renderRightArrow=function(e){var t=this,n=this.props,r=n.customRightArrow,o=n.rtl;return i.createElement(c.RightArrow,{customRightArrow:r,getState:function(){return t.getState()},next:this.next,disabled:e,rtl:o})},t.prototype.renderButtonGroups=function(){var e=this,t=this.props.customButtonGroup;return t?i.cloneElement(t,{previous:function(){return e.previous()},next:function(){return e.next()},goToSlide:function(t,n){return e.goToSlide(t,n)},carouselState:this.getState()}):null},t.prototype.renderDotsList=function(){var e=this;return i.createElement(l.default,{state:this.state,props:this.props,goToSlide:this.goToSlide,getState:function(){return e.getState()}})},t.prototype.renderCarouselItems=function(){var e=[];if(this.props.infinite){var t=i.Children.toArray(this.props.children);e=a.getClones(this.state.slidesToShow,t)}return i.createElement(u.default,{clones:e,goToSlide:this.goToSlide,state:this.state,notEnoughChildren:a.notEnoughChildren(this.state),props:this.props})},t.prototype.render=function(){var e=this.props,t=e.deviceType,n=e.arrows,r=e.renderArrowsWhenDisabled,o=e.removeArrowOnDeviceType,s=e.infinite,l=e.containerClass,c=e.sliderClass,u=e.customTransition,p=e.additionalTransfrom,f=e.renderDotsOutside,m=e.renderButtonGroupOutside,g=e.className,v=e.rtl,y=a.getInitialState(this.state,this.props),b=y.shouldRenderOnSSR,w=y.shouldRenderAtAll,k=a.isInLeftEnd(this.state),E=a.isInRightEnd(this.state),O=n&&!(o&&(t&&-1<o.indexOf(t)||this.state.deviceType&&-1<o.indexOf(this.state.deviceType)))&&!a.notEnoughChildren(this.state)&&w,S=!s&&k,x=!s&&E,_=d.getTransform(this.state,this.props);return i.createElement(i.Fragment,null,i.createElement("div",{className:"react-multi-carousel-list "+l+" "+g,dir:v?"rtl":"ltr",ref:this.containerRef},i.createElement("ul",{ref:this.listRef,className:"react-multi-carousel-track "+c,style:{transition:this.isAnimationAllowed?u||h:"none",overflow:b?"hidden":"unset",transform:"translate3d("+(_+p)+"px,0,0)"},onMouseMove:this.handleMove,onMouseDown:this.handleDown,onMouseUp:this.handleOut,onMouseEnter:this.handleEnter,onMouseLeave:this.handleOut,onTouchStart:this.handleDown,onTouchMove:this.handleMove,onTouchEnd:this.handleOut},this.renderCarouselItems()),O&&(!S||r)&&this.renderLeftArrow(S),O&&(!x||r)&&this.renderRightArrow(x),w&&!m&&this.renderButtonGroups(),w&&!f&&this.renderDotsList()),w&&f&&this.renderDotsList(),w&&m&&this.renderButtonGroups())},t.defaultProps={slidesToSlide:1,infinite:!1,draggable:!0,swipeable:!0,arrows:!0,renderArrowsWhenDisabled:!1,containerClass:"",sliderClass:"",itemClass:"",keyBoardControl:!0,autoPlaySpeed:3e3,showDots:!1,renderDotsOutside:!1,renderButtonGroupOutside:!1,minimumTouchDrag:80,className:"",dotListClass:"",focusOnSelect:!1,centerMode:!1,additionalTransfrom:0,pauseOnHover:!0,shouldResetAutoplay:!0,rewind:!1,rtl:!1,rewindWithAnimation:!1},t}(i.Component);t.default=f},6188:e=>{"use strict";e.exports=Math.max},6260:(e,t,n)=>{var r=n(8829);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,a,s;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,a=t.generatedColumn,s=n.generatedColumn,i>o||i==o&&s>=a||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.P=o},6462:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(a).forEach(function(e){return e.removeAttribute("aria-hidden")})),a=null},t.log=function(){},t.assertNodeList=s,t.setElement=function(e){var t=e;if("string"==typeof t&&i.canUseDOM){var n=document.querySelectorAll(t);s(n,t),t=n}return a=t||a},t.validateElement=l,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=l(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)o.value.setAttribute("aria-hidden","true")}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=l(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0)o.value.removeAttribute("aria-hidden")}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){a=null};var r,o=(r=n(9771))&&r.__esModule?r:{default:r},i=n(834),a=null;function s(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function l(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6556:(e,t,n)=>{"use strict";var r=n(453),o=n(3126),i=o([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o([n]):n}},6614:(e,t,n)=>{var r=n(1141),o=n(2471),i=n(840),a=n(308);o="function"==typeof o.default?o.default:o;var s={lowerCaseAttributeNames:!1};function l(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:a(o(e,(t=t||{}).htmlparser2||s),t)}l.domToReact=a,l.htmlToDOM=o,l.attributesToProps=i,l.Comment=r.Comment,l.Element=r.Element,l.ProcessingInstruction=r.ProcessingInstruction,l.Text=r.Text,e.exports=l,l.default=l},6650:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6802);t.populateNextSlides=function(e,t,n){void 0===n&&(n=0);var o,i,a=e.slidesToShow,s=e.currentSlide,l=e.itemWidth,c=e.totalItems,u=r.getSlidesToSlide(e,t),d=s+1+n+a+(0<n?0:u);return i=d<=c?-l*(o=s+n+(0<n?0:u)):c<d&&s!==c-a?-l*(o=c-a):o=void 0,{nextSlides:o,nextPosition:i}}},6691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNavigator=t.isBrowser=t.off=t.on=t.noop=void 0,t.noop=function(){},t.on=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)},t.off=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)},t.isBrowser="undefined"!=typeof window,t.isNavigator="undefined"!=typeof navigator},6743:(e,t,n)=>{"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},6802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4867);function o(e){var t=e.slidesToShow;return e.totalItems<t}function i(e,t,n){var r=n||e.transform;return!t.infinite&&0===e.currentSlide||o(e)?r:r+e.itemWidth/2}function a(e){var t=e.currentSlide,n=e.totalItems;return!(t+e.slidesToShow<n)}function s(e,t,n,r){void 0===t&&(t=0);var i=e.currentSlide,s=e.slidesToShow,l=a(e),c=!n.infinite&&l,u=r||e.transform;if(o(e))return u;var d=u+i*t;return c?d+(e.containerWidth-(e.itemWidth-t)*s):d}function l(e,t){return e.rtl?-1*t:t}t.notEnoughChildren=o,t.getInitialState=function(e,t){var n,o=e.domLoaded,i=e.slidesToShow,a=e.containerWidth,s=e.itemWidth,l=t.deviceType,c=t.responsive,u=t.ssr,d=t.partialVisbile,p=t.partialVisible,h=Boolean(o&&i&&a&&s);u&&l&&!h&&(n=r.getWidthFromDeviceType(l,c));var f=Boolean(u&&l&&!h&&n);return{shouldRenderOnSSR:f,flexBisis:n,domFullyLoaded:h,partialVisibilityGutter:r.getPartialVisibilityGutter(c,d||p,l,e.deviceType),shouldRenderAtAll:f||h}},t.getIfSlideIsVisbile=function(e,t){var n=t.currentSlide,r=t.slidesToShow;return n<=e&&e<n+r},t.getTransformForCenterMode=i,t.isInLeftEnd=function(e){return!(0<e.currentSlide)},t.isInRightEnd=a,t.getTransformForPartialVsibile=s,t.parsePosition=l,t.getTransform=function(e,t,n){var o=t.partialVisbile,a=t.partialVisible,c=t.responsive,u=t.deviceType,d=t.centerMode,p=n||e.transform,h=r.getPartialVisibilityGutter(c,o||a,u,e.deviceType);return l(t,a||o?s(e,h,t,n):d?i(e,t,n):p)},t.getSlidesToSlide=function(e,t){var n=e.domLoaded,r=e.slidesToShow,o=e.containerWidth,i=e.itemWidth,a=t.deviceType,s=t.responsive,l=t.slidesToSlide||1,c=Boolean(n&&r&&o&&i);return t.ssr&&t.deviceType&&!c&&Object.keys(s).forEach(function(e){var t=s[e].slidesToSlide;a===e&&t&&(l=t)}),c&&Object.keys(s).forEach(function(e){var t=s[e],n=t.breakpoint,r=t.slidesToSlide,o=n.max,i=n.min;r&&window.innerWidth>=i&&window.innerWidth<=o&&(l=r)}),l}},6811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},6862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1609),o=n(6802),i=n(6802);t.populatePreviousSlides=function(e,t,n){void 0===n&&(n=0);var a,s,l=e.currentSlide,c=e.itemWidth,u=e.slidesToShow,d=t.children,p=t.showDots,h=t.infinite,f=o.getSlidesToSlide(e,t),m=l-n-(0<n?0:f),g=(r.Children.toArray(d).length-u)%f;return s=0<=m?(a=m,p&&!h&&0<g&&i.isInRightEnd(e)&&(a=l-g),-c*a):a=m<0&&0!==l?0:void 0,{nextSlides:a,nextPosition:s}}},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},6957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(5413),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),E(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var m=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,a.isTag)(e)}function v(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function w(e){return e.type===a.ElementType.Directive}function k(e){return e.type===a.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?O(e.children):[],o=new m(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(v(e)){r=t?O(e.children):[];var a=new h(r);r.forEach(function(e){return e.parent=a}),n=a}else if(k(e)){r=t?O(e.children):[];var s=new f(r);r.forEach(function(e){return e.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map(function(e){return E(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=v,t.isText=y,t.isComment=b,t.isDirective=w,t.isDocument=k,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=E},7018:(e,t,n)=>{"use strict";var r=n(9516);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},7035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9189);t.getOriginalCounterPart=r.getOriginalCounterPart,t.getClones=r.getClones,t.checkClonesPosition=r.checkClonesPosition,t.getInitialSlideInInfiniteMode=r.getInitialSlideInInfiniteMode;var o=n(4867);t.getWidthFromDeviceType=o.getWidthFromDeviceType,t.getPartialVisibilityGutter=o.getPartialVisibilityGutter,t.getItemClientSideWidth=o.getItemClientSideWidth;var i=n(6802);t.getInitialState=i.getInitialState,t.getIfSlideIsVisbile=i.getIfSlideIsVisbile,t.getTransformForCenterMode=i.getTransformForCenterMode,t.getTransformForPartialVsibile=i.getTransformForPartialVsibile,t.isInLeftEnd=i.isInLeftEnd,t.isInRightEnd=i.isInRightEnd,t.notEnoughChildren=i.notEnoughChildren,t.getSlidesToSlide=i.getSlidesToSlide;var a=n(2259);t.throttle=a.default;var s=n(4713);t.throwError=s.default;var l=n(6650);t.populateNextSlides=l.populateNextSlides;var c=n(6862);t.populatePreviousSlides=c.populatePreviousSlides;var u=n(251);t.populateSlidesOnMouseTouchMove=u.populateSlidesOnMouseTouchMove},7067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);if(n.length){var r=void 0,a=t.shiftKey,s=n[0],l=n[n.length-1],c=i();if(e===c){if(!a)return;r=l}if(l!==c||a||(r=s),s===c&&a&&(r=l),r)return t.preventDefault(),void r.focus();var u=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null!=u&&"Chrome"!=u[1]&&null==/\biPod\b|\biPad\b/g.exec(navigator.userAgent)){var d=n.indexOf(c);if(d>-1&&(d+=a?-1:1),void 0===(r=n[d]))return t.preventDefault(),void(r=a?l:s).focus();t.preventDefault(),r.focus()}}else t.preventDefault()};var r,o=(r=n(2411))&&r.__esModule?r:{default:r};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?i(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},7119:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7146:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},7176:(e,t,n)=>{"use strict";var r,o=n(3126),i=n(8176);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&i&&i(Object.prototype,"__proto__"),s=Object,l=s.getPrototypeOf;e.exports=a&&"function"==typeof a.get?o([a.get]):"function"==typeof l&&function(e){return l(null==e?e:s(e))}},7412:(e,t,n)=>{"use strict";var r=n(9516),o=n(7018),i=n(5449),a=n(4896),s={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5592)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(s)}),e.exports=u},7522:(e,t,n)=>{"use strict";var r=n(7763);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},7720:(e,t,n)=>{"use strict";var r=n(7146),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},l=1024;e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],s=Object.keys(a),l=0;l<s.length;++l){var c=s[l],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var c="",u=0;u<s.length;u+=l){for(var d=s.length>=l?s.slice(u,u+l):s,p=[],h=0;h<d.length;++h){var f=d.charCodeAt(h);45===f||46===f||95===f||126===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===r.RFC1738&&(40===f||41===f)?p[p.length]=d.charAt(h):f<128?p[p.length]=a[f]:f<2048?p[p.length]=a[192|f>>6]+a[128|63&f]:f<55296||f>=57344?p[p.length]=a[224|f>>12]+a[128|f>>6&63]+a[128|63&f]:(h+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(h)),p[p.length]=a[240|f>>18]+a[128|f>>12&63]+a[128|f>>6&63]+a[128|63&f])}c+=p.join("")}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n&&"function"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=s(t,r)),i(t)&&i(n)?(n.forEach(function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t},a)}}},7727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[i,a],t=0;t<e.length;t++){var n=e[t];n&&n.parentNode&&n.parentNode.removeChild(n)}i=a=null,s=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(s.length);for(var e=[i,a],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,o=(r=n(9628))&&r.__esModule?r:{default:r},i=void 0,a=void 0,s=[];function l(){0!==s.length&&s[s.length-1].focusContent()}o.default.subscribe(function(e,t){i||a||((i=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),i.style.position="absolute",i.style.opacity="0",i.setAttribute("tabindex","0"),i.addEventListener("focus",l),(a=i.cloneNode()).addEventListener("focus",l)),(s=t).length>0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(i.parentElement&&i.parentElement.removeChild(i),a.parentElement&&a.parentElement.removeChild(a))})},7731:(e,t,n)=>{for(var r,o=n(1141),i=n(5270).CASE_SENSITIVE_TAG_NAMES,a=o.Comment,s=o.Element,l=o.ProcessingInstruction,c=o.Text,u={},d=0,p=i.length;d<p;d++)r=i[d],u[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,o=e.length;r<o;r++)n[(t=e[r]).name]=t.value;return n}function f(e){return function(e){return u[e]}(e=e.toLowerCase())||e}t.formatAttributes=h,t.formatDOM=function e(t,n,r){n=n||null;for(var o,i=[],u=0,d=t.length;u<d;u++){var p,m=t[u];switch(m.nodeType){case 1:o=f(m.nodeName),(p=new s(o,h(m.attributes))).children=e("template"===o?m.content.childNodes:m.childNodes,p);break;case 3:p=new c(m.nodeValue);break;case 8:p=new a(m.nodeValue);break;default:continue}var g=i[u-1]||null;g&&(g.next=p),p.parent=n,p.prev=g,p.next=null,i.push(p)}return r&&((p=new l(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,p.parent=n,i.unshift(p),i[1]&&(i[1].prev=i[0])),i}},7763:(e,t,n)=>{"use strict";var r=n(5449);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},7791:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){i=[]},t.log=function(){},t.handleBlur=l,t.handleFocus=c,t.markForFocusLater=function(){i.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==i.length&&(t=i.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){i.length>0&&i.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",l,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",l),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",l),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",l),document.detachEvent("onFocus",c))};var r,o=(r=n(2411))&&r.__esModule?r:{default:r},i=[],a=null,s=!1;function l(){s=!0}function c(){if(s){if(s=!1,!a)return;setTimeout(function(){a.contains(document.activeElement)||((0,o.default)(a)[0]||a).focus()},0)}}},7980:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8002:e=>{"use strict";e.exports=Math.min},8015:(e,t,n)=>{"use strict";var r=n(9516),o=n(9012),i=n(5155),a=n(5343),s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(7412));s.Axios=i,s.Cancel=n(1928),s.CancelToken=n(3191),s.isCancel=n(3864),s.VERSION=n(9641).version,s.all=function(e){return Promise.all(e)},s.spread=n(7980),s.isAxiosError=n(5019),e.exports=s,e.exports.default=s},8068:e=>{"use strict";e.exports=SyntaxError},8105:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Direction=void 0,function(e){e.Right="to right",e.Left="to left",e.Down="to bottom",e.Up="to top"}(n||(t.Direction=n={}))},8176:(e,t,n)=>{"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},8371:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1609);t.LeftArrow=function(e){var t=e.customLeftArrow,n=e.getState,o=e.previous,i=e.disabled,a=e.rtl;if(t)return r.cloneElement(t,{onClick:function(){return o()},carouselState:n(),disabled:i,rtl:a});var s=a?"rtl":"";return r.createElement("button",{"aria-label":"Go to previous slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--left "+s,onClick:function(){return o()},type:"button",disabled:i})},t.RightArrow=function(e){var t=e.customRightArrow,n=e.getState,o=e.next,i=e.disabled,a=e.rtl;if(t)return r.cloneElement(t,{onClick:function(){return o()},carouselState:n(),disabled:i,rtl:a});var s=a?"rtl":"";return r.createElement("button",{"aria-label":"Go to next slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--right "+s,onClick:function(){return o()},type:"button",disabled:i})}},8465:function(e){e.exports=function(){"use strict";const e="SweetAlert2:",t=e=>e.charAt(0).toUpperCase()+e.slice(1),n=e=>Array.prototype.slice.call(e),r=t=>{console.warn("".concat(e," ").concat("object"==typeof t?t.join(" "):t))},o=t=>{console.error("".concat(e," ").concat(t))},i=[],a=(e,t)=>{var n;n='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),i.includes(n)||(i.push(n),r(n))},s=e=>"function"==typeof e?e():e,l=e=>e&&"function"==typeof e.toPromise,c=e=>l(e)?e.toPromise():Promise.resolve(e),u=e=>e&&Promise.resolve(e)===e,d={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},p=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],h={},f=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],m=e=>Object.prototype.hasOwnProperty.call(d,e),g=e=>-1!==p.indexOf(e),v=e=>h[e],y=e=>{m(e)||r('Unknown parameter "'.concat(e,'"'))},b=e=>{f.includes(e)&&r('The parameter "'.concat(e,'" is incompatible with toasts'))},w=e=>{v(e)&&a(e,v(e))},k=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},E=k(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),O=k(["success","warning","info","question","error"]),S=()=>document.body.querySelector(".".concat(E.container)),x=e=>{const t=S();return t?t.querySelector(e):null},_=e=>x(".".concat(e)),C=()=>_(E.popup),P=()=>_(E.icon),T=()=>_(E.title),A=()=>_(E["html-container"]),D=()=>_(E.image),M=()=>_(E["progress-steps"]),N=()=>_(E["validation-message"]),L=()=>x(".".concat(E.actions," .").concat(E.confirm)),I=()=>x(".".concat(E.actions," .").concat(E.deny)),R=()=>x(".".concat(E.loader)),j=()=>x(".".concat(E.actions," .").concat(E.cancel)),F=()=>_(E.actions),z=()=>_(E.footer),B=()=>_(E["timer-progress-bar"]),U=()=>_(E.close),V=()=>{const e=n(C().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),r=parseInt(t.getAttribute("tabindex"));return n>r?1:n<r?-1:0}),t=n(C().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter(e=>"-1"!==e.getAttribute("tabindex"));return(e=>{const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t})(e.concat(t)).filter(e=>ae(e))},W=()=>$(document.body,E.shown)&&!$(document.body,E["toast-shown"])&&!$(document.body,E["no-backdrop"]),H=()=>C()&&$(C(),E.toast),Q={previousBodyPadding:null},q=(e,t)=>{if(e.textContent="",t){const r=(new DOMParser).parseFromString(t,"text/html");n(r.querySelector("head").childNodes).forEach(t=>{e.appendChild(t)}),n(r.querySelector("body").childNodes).forEach(t=>{e.appendChild(t)})}},$=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},G=(e,t,o)=>{if(((e,t)=>{n(e.classList).forEach(n=>{Object.values(E).includes(n)||Object.values(O).includes(n)||Object.values(t.showClass).includes(n)||e.classList.remove(n)})})(e,t),t.customClass&&t.customClass[o]){if("string"!=typeof t.customClass[o]&&!t.customClass[o].forEach)return r("Invalid type of customClass.".concat(o,'! Expected string or iterable object, got "').concat(typeof t.customClass[o],'"'));Z(e,t.customClass[o])}},Y=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(E.popup," > .").concat(E[t]));case"checkbox":return e.querySelector(".".concat(E.popup," > .").concat(E.checkbox," input"));case"radio":return e.querySelector(".".concat(E.popup," > .").concat(E.radio," input:checked"))||e.querySelector(".".concat(E.popup," > .").concat(E.radio," input:first-child"));case"range":return e.querySelector(".".concat(E.popup," > .").concat(E.range," input"));default:return e.querySelector(".".concat(E.popup," > .").concat(E.input))}},X=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},K=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},Z=(e,t)=>{K(e,t,!0)},J=(e,t)=>{K(e,t,!1)},ee=(e,t)=>{const r=n(e.childNodes);for(let e=0;e<r.length;e++)if($(r[e],t))return r[e]},te=(e,t,n)=>{n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},ne=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},re=e=>{e.style.display="none"},oe=(e,t,n,r)=>{const o=e.querySelector(t);o&&(o.style[n]=r)},ie=(e,t,n)=>{t?ne(e,n):re(e)},ae=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),se=e=>!!(e.scrollHeight>e.clientHeight),le=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},ce=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=B();ae(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))},ue=()=>"undefined"==typeof window||"undefined"==typeof document,de={},pe=e=>new Promise(t=>{if(!e)return t();const n=window.scrollX,r=window.scrollY;de.restoreFocusTimeout=setTimeout(()=>{de.previousActiveElement&&de.previousActiveElement.focus?(de.previousActiveElement.focus(),de.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(n,r)}),he='\n <div aria-labelledby="'.concat(E.title,'" aria-describedby="').concat(E["html-container"],'" class="').concat(E.popup,'" tabindex="-1">\n <button type="button" class="').concat(E.close,'"></button>\n <ul class="').concat(E["progress-steps"],'"></ul>\n <div class="').concat(E.icon,'"></div>\n <img class="').concat(E.image,'" />\n <h2 class="').concat(E.title,'" id="').concat(E.title,'"></h2>\n <div class="').concat(E["html-container"],'" id="').concat(E["html-container"],'"></div>\n <input class="').concat(E.input,'" />\n <input type="file" class="').concat(E.file,'" />\n <div class="').concat(E.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(E.select,'"></select>\n <div class="').concat(E.radio,'"></div>\n <label for="').concat(E.checkbox,'" class="').concat(E.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(E.label,'"></span>\n </label>\n <textarea class="').concat(E.textarea,'"></textarea>\n <div class="').concat(E["validation-message"],'" id="').concat(E["validation-message"],'"></div>\n <div class="').concat(E.actions,'">\n <div class="').concat(E.loader,'"></div>\n <button type="button" class="').concat(E.confirm,'"></button>\n <button type="button" class="').concat(E.deny,'"></button>\n <button type="button" class="').concat(E.cancel,'"></button>\n </div>\n <div class="').concat(E.footer,'"></div>\n <div class="').concat(E["timer-progress-bar-container"],'">\n <div class="').concat(E["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),fe=()=>{de.currentInstance.resetValidationMessage()},me=e=>{const t=(()=>{const e=S();return!!e&&(e.remove(),J([document.documentElement,document.body],[E["no-backdrop"],E["toast-shown"],E["has-column"]]),!0)})();if(ue())return void o("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=E.container,t&&Z(n,E["no-transition"]),q(n,he);const r="string"==typeof(i=e.target)?document.querySelector(i):i;var i;r.appendChild(n),(e=>{const t=C();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&Z(S(),E.rtl)})(r),(()=>{const e=C(),t=ee(e,E.input),n=ee(e,E.file),r=e.querySelector(".".concat(E.range," input")),o=e.querySelector(".".concat(E.range," output")),i=ee(e,E.select),a=e.querySelector(".".concat(E.checkbox," input")),s=ee(e,E.textarea);t.oninput=fe,n.onchange=fe,i.onchange=fe,a.onchange=fe,s.oninput=fe,r.oninput=()=>{fe(),o.value=r.value},r.onchange=()=>{fe(),r.nextSibling.value=r.value}})()},ge=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?ve(e,t):e&&q(t,e)},ve=(e,t)=>{e.jquery?ye(t,e):q(t,e.toString())},ye=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},be=(()=>{if(ue())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),we=(e,t)=>{const n=F(),r=R();t.showConfirmButton||t.showDenyButton||t.showCancelButton?ne(n):re(n),G(n,t,"actions"),function(e,t,n){const r=L(),o=I(),i=j();ke(r,"confirm",n),ke(o,"deny",n),ke(i,"cancel",n),function(e,t,n,r){if(!r.buttonsStyling)return J([e,t,n],E.styled);Z([e,t,n],E.styled),r.confirmButtonColor&&(e.style.backgroundColor=r.confirmButtonColor,Z(e,E["default-outline"])),r.denyButtonColor&&(t.style.backgroundColor=r.denyButtonColor,Z(t,E["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,Z(n,E["default-outline"]))}(r,o,i,n),n.reverseButtons&&(n.toast?(e.insertBefore(i,r),e.insertBefore(o,r)):(e.insertBefore(i,t),e.insertBefore(o,t),e.insertBefore(r,t)))}(n,r,t),q(r,t.loaderHtml),G(r,t,"loader")};function ke(e,n,r){ie(e,r["show".concat(t(n),"Button")],"inline-block"),q(e,r["".concat(n,"ButtonText")]),e.setAttribute("aria-label",r["".concat(n,"ButtonAriaLabel")]),e.className=E[n],G(e,r,"".concat(n,"Button")),Z(e,r["".concat(n,"ButtonClass")])}const Ee=(e,t)=>{const n=S();n&&(function(e,t){"string"==typeof t?e.style.background=t:t||Z([document.documentElement,document.body],E["no-backdrop"])}(n,t.backdrop),function(e,t){t in E?Z(e,E[t]):(r('The "position" parameter is not valid, defaulting to "center"'),Z(e,E.center))}(n,t.position),function(e,t){if(t&&"string"==typeof t){const n="grow-".concat(t);n in E&&Z(e,E[n])}}(n,t.grow),G(n,t,"container"))};var Oe={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const Se=["input","file","range","select","radio","checkbox","textarea"],xe=e=>{if(!De[e.input])return o('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));const t=Ae(e.input),n=De[e.input](t,e);ne(n),setTimeout(()=>{X(n)})},_e=(e,t)=>{const n=Y(C(),e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["type","value","style"].includes(n)||e.removeAttribute(n)}})(n);for(const e in t)n.setAttribute(e,t[e])}},Ce=e=>{const t=Ae(e.input);e.customClass&&Z(t,e.customClass.input)},Pe=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},Te=(e,t,n)=>{if(n.inputLabel){e.id=E.input;const r=document.createElement("label"),o=E["input-label"];r.setAttribute("for",e.id),r.className=o,Z(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Ae=e=>{const t=E[e]?E[e]:E.input;return ee(C(),t)},De={};De.text=De.email=De.password=De.number=De.tel=De.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:u(t.inputValue)||r('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),Te(e,e,t),Pe(e,t),e.type=t.input,e),De.file=(e,t)=>(Te(e,e,t),Pe(e,t),e),De.range=(e,t)=>{const n=e.querySelector("input"),r=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,r.value=t.inputValue,Te(n,e,t),e},De.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");q(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return Te(e,e,t),e},De.radio=e=>(e.textContent="",e),De.checkbox=(e,t)=>{const n=Y(C(),"checkbox");n.value="1",n.id=E.checkbox,n.checked=Boolean(t.inputValue);const r=e.querySelector("span");return q(r,t.inputPlaceholder),e},De.textarea=(e,t)=>{e.value=t.inputValue,Pe(e,t),Te(e,e,t);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(C()).width);new MutationObserver(()=>{const n=e.offsetWidth+(r=e,parseInt(window.getComputedStyle(r).marginLeft)+parseInt(window.getComputedStyle(r).marginRight));var r;C().style.width=n>t?"".concat(n,"px"):null}).observe(e,{attributes:!0,attributeFilter:["style"]})}}),e};const Me=(e,t)=>{const n=A();G(n,t,"htmlContainer"),t.html?(ge(t.html,n),ne(n,"block")):t.text?(n.textContent=t.text,ne(n,"block")):re(n),((e,t)=>{const n=C(),r=Oe.innerParams.get(e),o=!r||t.input!==r.input;Se.forEach(e=>{const r=E[e],i=ee(n,r);_e(e,t.inputAttributes),i.className=r,o&&re(i)}),t.input&&(o&&xe(t),Ce(t))})(e,t)},Ne=(e,t)=>{for(const n in O)t.icon!==n&&J(e,O[n]);Z(e,O[t.icon]),Re(e,t),Le(),G(e,t,"icon")},Le=()=>{const e=C(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},Ie=(e,t)=>{e.textContent="",t.iconHtml?q(e,je(t.iconHtml)):"success"===t.icon?q(e,'\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n'):"error"===t.icon?q(e,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n'):q(e,je({question:"?",warning:"!",info:"i"}[t.icon]))},Re=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])oe(e,n,"backgroundColor",t.iconColor);oe(e,".swal2-success-ring","borderColor",t.iconColor)}},je=e=>'<div class="'.concat(E["icon-content"],'">').concat(e,"</div>"),Fe=(e,t)=>{const n=M();if(!t.progressSteps||0===t.progressSteps.length)return re(n);ne(n),n.textContent="",t.currentProgressStep>=t.progressSteps.length&&r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach((e,r)=>{const o=(e=>{const t=document.createElement("li");return Z(t,E["progress-step"]),q(t,e),t})(e);if(n.appendChild(o),r===t.currentProgressStep&&Z(o,E["active-progress-step"]),r!==t.progressSteps.length-1){const e=(e=>{const t=document.createElement("li");return Z(t,E["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(t);n.appendChild(e)}})},ze=(e,t)=>{e.className="".concat(E.popup," ").concat(ae(e)?t.showClass.popup:""),t.toast?(Z([document.documentElement,document.body],E["toast-shown"]),Z(e,E.toast)):Z(e,E.modal),G(e,t,"popup"),"string"==typeof t.customClass&&Z(e,t.customClass),t.icon&&Z(e,E["icon-".concat(t.icon)])},Be=(e,t)=>{((e,t)=>{const n=S(),r=C();t.toast?(te(n,"width",t.width),r.style.width="100%",r.insertBefore(R(),P())):te(r,"width",t.width),te(r,"padding",t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),re(N()),ze(r,t)})(0,t),Ee(0,t),Fe(0,t),((e,t)=>{const n=Oe.innerParams.get(e),r=P();n&&t.icon===n.icon?(Ie(r,t),Ne(r,t)):t.icon||t.iconHtml?t.icon&&-1===Object.keys(O).indexOf(t.icon)?(o('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),re(r)):(ne(r),Ie(r,t),Ne(r,t),Z(r,t.showClass.icon)):re(r)})(e,t),((e,t)=>{const n=D();if(!t.imageUrl)return re(n);ne(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),te(n,"width",t.imageWidth),te(n,"height",t.imageHeight),n.className=E.image,G(n,t,"image")})(0,t),((e,t)=>{const n=T();ie(n,t.title||t.titleText,"block"),t.title&&ge(t.title,n),t.titleText&&(n.innerText=t.titleText),G(n,t,"title")})(0,t),((e,t)=>{const n=U();q(n,t.closeButtonHtml),G(n,t,"closeButton"),ie(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Me(e,t),we(0,t),((e,t)=>{const n=z();ie(n,t.footer),t.footer&&ge(t.footer,n),G(n,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(C())},Ue=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Ve=()=>{n(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},We=["swal-title","swal-html","swal-footer"],He=e=>{const t={};return n(e.querySelectorAll("swal-param")).forEach(e=>{Ke(e,["name","value"]);const n=e.getAttribute("name"),r=e.getAttribute("value");"boolean"==typeof d[n]&&"false"===r&&(t[n]=!1),"object"==typeof d[n]&&(t[n]=JSON.parse(r))}),t},Qe=e=>{const r={};return n(e.querySelectorAll("swal-button")).forEach(e=>{Ke(e,["type","color","aria-label"]);const n=e.getAttribute("type");r["".concat(n,"ButtonText")]=e.innerHTML,r["show".concat(t(n),"Button")]=!0,e.hasAttribute("color")&&(r["".concat(n,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(r["".concat(n,"ButtonAriaLabel")]=e.getAttribute("aria-label"))}),r},qe=e=>{const t={},n=e.querySelector("swal-image");return n&&(Ke(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t},$e=e=>{const t={},n=e.querySelector("swal-icon");return n&&(Ke(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},Ge=e=>{const t={},r=e.querySelector("swal-input");r&&(Ke(r,["type","label","placeholder","value"]),t.input=r.getAttribute("type")||"text",r.hasAttribute("label")&&(t.inputLabel=r.getAttribute("label")),r.hasAttribute("placeholder")&&(t.inputPlaceholder=r.getAttribute("placeholder")),r.hasAttribute("value")&&(t.inputValue=r.getAttribute("value")));const o=e.querySelectorAll("swal-input-option");return o.length&&(t.inputOptions={},n(o).forEach(e=>{Ke(e,["value"]);const n=e.getAttribute("value"),r=e.innerHTML;t.inputOptions[n]=r})),t},Ye=(e,t)=>{const n={};for(const r in t){const o=t[r],i=e.querySelector(o);i&&(Ke(i,[]),n[o.replace(/^swal-/,"")]=i.innerHTML.trim())}return n},Xe=e=>{const t=We.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);n(e.children).forEach(e=>{const n=e.tagName.toLowerCase();-1===t.indexOf(n)&&r("Unrecognized element <".concat(n,">"))})},Ke=(e,t)=>{n(e.attributes).forEach(n=>{-1===t.indexOf(n.name)&&r(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])})};var Ze={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function Je(e){(function(e){e.inputValidator||Object.keys(Ze).forEach(t=>{e.input===t&&(e.inputValidator=Ze[t])})})(e),e.showLoaderOnConfirm&&!e.preConfirm&&r("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(r('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),me(e)}class et{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const tt=()=>{null===Q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(Q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Q.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=E["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},nt=()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;C().scrollHeight>window.innerHeight-e&&(S().style.paddingBottom="".concat(e,"px"))}},rt=()=>{const e=S();let t;e.ontouchstart=e=>{t=ot(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},ot=e=>{const t=e.target,n=S();return!(it(e)||at(e)||t!==n&&(se(n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||se(A())&&A().contains(t)))},it=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,at=e=>e.touches&&e.touches.length>1,st=e=>{const t=S(),r=C();"function"==typeof e.willOpen&&e.willOpen(r);const o=window.getComputedStyle(document.body).overflowY;dt(t,r,e),setTimeout(()=>{ct(t,r)},10),W()&&(ut(t,e.scrollbarPadding,o),n(document.body.children).forEach(e=>{e===S()||e.contains(S())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})),H()||de.previousActiveElement||(de.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(r)),J(t,E["no-transition"])},lt=e=>{const t=C();if(e.target!==t)return;const n=S();t.removeEventListener(be,lt),n.style.overflowY="auto"},ct=(e,t)=>{be&&le(t)?(e.style.overflowY="hidden",t.addEventListener(be,lt)):e.style.overflowY="auto"},ut=(e,t,n)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!$(document.body,E.iosfix)){const e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),Z(document.body,E.iosfix),rt(),nt()}})(),t&&"hidden"!==n&&tt(),setTimeout(()=>{e.scrollTop=0})},dt=(e,t,n)=>{Z(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),ne(t,"grid"),setTimeout(()=>{Z(t,n.showClass.popup),t.style.removeProperty("opacity")},10),Z([document.documentElement,document.body],E.shown),n.heightAuto&&n.backdrop&&!n.toast&&Z([document.documentElement,document.body],E["height-auto"])},pt=e=>{let t=C();t||new xn,t=C();const n=R();H()?re(P()):ht(t,e),ne(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},ht=(e,t)=>{const n=F(),r=R();!t&&ae(L())&&(t=L()),ne(n),t&&(re(t),r.setAttribute("data-button-to-replace",t.className)),r.parentNode.insertBefore(r,t),Z([e,n],E.loading)},ft=e=>e.checked?1:0,mt=e=>e.checked?e.value:null,gt=e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,vt=(e,t)=>{const n=C(),r=e=>bt[t.input](n,wt(e),t);l(t.inputOptions)||u(t.inputOptions)?(pt(L()),c(t.inputOptions).then(t=>{e.hideLoading(),r(t)})):"object"==typeof t.inputOptions?r(t.inputOptions):o("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions))},yt=(e,t)=>{const n=e.getInput();re(n),c(t.inputValue).then(r=>{n.value="number"===t.input?parseFloat(r)||0:"".concat(r),ne(n),n.focus(),e.hideLoading()}).catch(t=>{o("Error in inputValue promise: ".concat(t)),n.value="",ne(n),n.focus(),e.hideLoading()})},bt={select:(e,t,n)=>{const r=ee(e,E.select),o=(e,t,r)=>{const o=document.createElement("option");o.value=r,q(o,t),o.selected=kt(r,n.inputValue),e.appendChild(o)};t.forEach(e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,r.appendChild(e),n.forEach(t=>o(e,t[1],t[0]))}else o(r,n,t)}),r.focus()},radio:(e,t,n)=>{const r=ee(e,E.radio);t.forEach(e=>{const t=e[0],o=e[1],i=document.createElement("input"),a=document.createElement("label");i.type="radio",i.name=E.radio,i.value=t,kt(t,n.inputValue)&&(i.checked=!0);const s=document.createElement("span");q(s,o),s.className=E.label,a.appendChild(i),a.appendChild(s),r.appendChild(a)});const o=r.querySelectorAll("input");o.length&&o[0].focus()}},wt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach((e,n)=>{let r=e;"object"==typeof r&&(r=wt(r)),t.push([n,r])}):Object.keys(e).forEach(n=>{let r=e[n];"object"==typeof r&&(r=wt(r)),t.push([n,r])}),t},kt=(e,t)=>t&&t.toString()===e.toString();function Et(){const e=Oe.innerParams.get(this);if(!e)return;const t=Oe.domCache.get(this);re(t.loader),H()?e.icon&&ne(P()):Ot(t),J([t.popup,t.actions],E.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const Ot=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?ne(t[0],"inline-block"):!ae(L())&&!ae(I())&&!ae(j())&&re(e.actions)};var St={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const xt=()=>L()&&L().click(),_t=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ct=(e,t,n)=>{const r=V();if(r.length)return(t+=n)===r.length?t=0:-1===t&&(t=r.length-1),r[t].focus();C().focus()},Pt=["ArrowRight","ArrowDown"],Tt=["ArrowLeft","ArrowUp"],At=(e,t,n)=>{const r=Oe.innerParams.get(e);r&&(t.isComposing||229===t.keyCode||(r.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Dt(e,t,r):"Tab"===t.key?Mt(t,r):[...Pt,...Tt].includes(t.key)?Nt(t.key):"Escape"===t.key&&Lt(t,r,n)))},Dt=(e,t,n)=>{if(s(n.allowEnterKey)&&t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;xt(),t.preventDefault()}},Mt=(e,t)=>{const n=e.target,r=V();let o=-1;for(let e=0;e<r.length;e++)if(n===r[e]){o=e;break}e.shiftKey?Ct(0,o,-1):Ct(0,o,1),e.stopPropagation(),e.preventDefault()},Nt=e=>{if(![L(),I(),j()].includes(document.activeElement))return;const t=Pt.includes(e)?"nextElementSibling":"previousElementSibling";let n=document.activeElement;for(let e=0;e<F().children.length;e++){if(n=n[t],!n)return;if(ae(n)&&n instanceof HTMLButtonElement)break}n instanceof HTMLButtonElement&&n.focus()},Lt=(e,t,n)=>{s(t.allowEscapeKey)&&(e.preventDefault(),n(Ue.esc))};function It(e,t,n,r){H()?Vt(e,r):(pe(n).then(()=>Vt(e,r)),_t(de)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),W()&&(null!==Q.previousBodyPadding&&(document.body.style.paddingRight="".concat(Q.previousBodyPadding,"px"),Q.previousBodyPadding=null),(()=>{if($(document.body,E.iosfix)){const e=parseInt(document.body.style.top,10);J(document.body,E.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),Ve()),J([document.documentElement,document.body],[E.shown,E["height-auto"],E["no-backdrop"],E["toast-shown"]])}function Rt(e){e=zt(e);const t=St.swalPromiseResolve.get(this),n=jt(this);this.isAwaitingPromise()?e.isDismissed||(Ft(this),t(e)):n&&t(e)}const jt=e=>{const t=C();if(!t)return!1;const n=Oe.innerParams.get(e);if(!n||$(t,n.hideClass.popup))return!1;J(t,n.showClass.popup),Z(t,n.hideClass.popup);const r=S();return J(r,n.showClass.backdrop),Z(r,n.hideClass.backdrop),Bt(e,t,n),!0};const Ft=e=>{e.isAwaitingPromise()&&(Oe.awaitingPromise.delete(e),Oe.innerParams.get(e)||e._destroy())},zt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Bt=(e,t,n)=>{const r=S(),o=be&&le(t);"function"==typeof n.willClose&&n.willClose(t),o?Ut(e,t,r,n.returnFocus,n.didClose):It(e,r,n.returnFocus,n.didClose)},Ut=(e,t,n,r,o)=>{de.swalCloseEventFinishedCallback=It.bind(null,e,n,r,o),t.addEventListener(be,function(e){e.target===t&&(de.swalCloseEventFinishedCallback(),delete de.swalCloseEventFinishedCallback)})},Vt=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function Wt(e,t,n){const r=Oe.domCache.get(e);t.forEach(e=>{r[e].disabled=n})}function Ht(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}const Qt=e=>{const t={};return Object.keys(e).forEach(n=>{g(n)?t[n]=e[n]:r('Invalid parameter to update: "'.concat(n,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),t};const qt=e=>{$t(e),delete e.params,delete de.keydownHandler,delete de.keydownTarget,delete de.currentInstance},$t=e=>{e.isAwaitingPromise()?(Gt(Oe,e),Oe.awaitingPromise.set(e,!0)):(Gt(St,e),Gt(Oe,e))},Gt=(e,t)=>{for(const n in e)e[n].delete(t)};var Yt=Object.freeze({hideLoading:Et,disableLoading:Et,getInput:function(e){const t=Oe.innerParams.get(e||this),n=Oe.domCache.get(e||this);return n?Y(n.popup,t.input):null},close:Rt,isAwaitingPromise:function(){return!!Oe.awaitingPromise.get(this)},rejectPromise:function(e){const t=St.swalPromiseReject.get(this);Ft(this),t&&t(e)},handleAwaitingPromise:Ft,closePopup:Rt,closeModal:Rt,closeToast:Rt,enableButtons:function(){Wt(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){Wt(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return Ht(this.getInput(),!1)},disableInput:function(){return Ht(this.getInput(),!0)},showValidationMessage:function(e){const t=Oe.domCache.get(this),n=Oe.innerParams.get(this);q(t.validationMessage,e),t.validationMessage.className=E["validation-message"],n.customClass&&n.customClass.validationMessage&&Z(t.validationMessage,n.customClass.validationMessage),ne(t.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid",!0),r.setAttribute("aria-describedby",E["validation-message"]),X(r),Z(r,E.inputerror))},resetValidationMessage:function(){const e=Oe.domCache.get(this);e.validationMessage&&re(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),J(t,E.inputerror))},getProgressSteps:function(){return Oe.domCache.get(this).progressSteps},update:function(e){const t=C(),n=Oe.innerParams.get(this);if(!t||$(t,n.hideClass.popup))return r("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=Qt(e),i=Object.assign({},n,o);Be(this,i),Oe.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){const e=Oe.domCache.get(this),t=Oe.innerParams.get(this);t?(e.popup&&de.swalCloseEventFinishedCallback&&(de.swalCloseEventFinishedCallback(),delete de.swalCloseEventFinishedCallback),de.deferDisposalTimer&&(clearTimeout(de.deferDisposalTimer),delete de.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),qt(this)):$t(this)}});const Xt=(e,n)=>{const r=Oe.innerParams.get(e);if(!r.input)return o('The "input" parameter is needed to be set when using returnInputValueOn'.concat(t(n)));const i=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return ft(n);case"radio":return mt(n);case"file":return gt(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,r);r.inputValidator?Kt(e,i,n):e.getInput().checkValidity()?"deny"===n?Zt(e,i):tn(e,i):(e.enableButtons(),e.showValidationMessage(r.validationMessage))},Kt=(e,t,n)=>{const r=Oe.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>c(r.inputValidator(t,r.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):"deny"===n?Zt(e,t):tn(e,t)})},Zt=(e,t)=>{const n=Oe.innerParams.get(e||void 0);n.showLoaderOnDeny&&pt(I()),n.preDeny?(Oe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then(()=>c(n.preDeny(t,n.validationMessage))).then(n=>{!1===n?(e.hideLoading(),Ft(e)):e.closePopup({isDenied:!0,value:void 0===n?t:n})}).catch(t=>en(e||void 0,t))):e.closePopup({isDenied:!0,value:t})},Jt=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},en=(e,t)=>{e.rejectPromise(t)},tn=(e,t)=>{const n=Oe.innerParams.get(e||void 0);n.showLoaderOnConfirm&&pt(),n.preConfirm?(e.resetValidationMessage(),Oe.awaitingPromise.set(e||void 0,!0),Promise.resolve().then(()=>c(n.preConfirm(t,n.validationMessage))).then(n=>{ae(N())||!1===n?(e.hideLoading(),Ft(e)):Jt(e,void 0===n?t:n)}).catch(t=>en(e||void 0,t))):Jt(e,t)},nn=(e,t,n)=>{t.popup.onclick=()=>{const t=Oe.innerParams.get(e);t&&(rn(t)||t.timer||t.input)||n(Ue.close)}},rn=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let on=!1;const an=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(on=!0)}}},sn=e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(on=!0)}}},ln=(e,t,n)=>{t.container.onclick=r=>{const o=Oe.innerParams.get(e);on?on=!1:r.target===t.container&&s(o.allowOutsideClick)&&n(Ue.backdrop)}},cn=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const un=()=>{if(de.timeout)return(()=>{const e=B(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),de.timeout.stop()},dn=()=>{if(de.timeout){const e=de.timeout.start();return ce(e),e}};let pn=!1;const hn={};const fn=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in hn){const n=t.getAttribute(e);if(n)return void hn[e].fire({template:n})}};var mn=Object.freeze({isValidParameter:m,isUpdatableParameter:g,isDeprecatedParameter:v,argsToParams:e=>{const t={};return"object"!=typeof e[0]||cn(e[0])?["title","html","icon"].forEach((n,r)=>{const i=e[r];"string"==typeof i||cn(i)?t[n]=i:void 0!==i&&o("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof i))}):Object.assign(t,e[0]),t},isVisible:()=>ae(C()),clickConfirm:xt,clickDeny:()=>I()&&I().click(),clickCancel:()=>j()&&j().click(),getContainer:S,getPopup:C,getTitle:T,getHtmlContainer:A,getImage:D,getIcon:P,getInputLabel:()=>_(E["input-label"]),getCloseButton:U,getActions:F,getConfirmButton:L,getDenyButton:I,getCancelButton:j,getLoader:R,getFooter:z,getTimerProgressBar:B,getFocusableElements:V,getValidationMessage:N,isLoading:()=>C().hasAttribute("data-loading"),fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},showLoading:pt,enableLoading:pt,getTimerLeft:()=>de.timeout&&de.timeout.getTimerLeft(),stopTimer:un,resumeTimer:dn,toggleTimer:()=>{const e=de.timeout;return e&&(e.running?un():dn())},increaseTimer:e=>{if(de.timeout){const t=de.timeout.increase(e);return ce(t,!0),t}},isTimerRunning:()=>de.timeout&&de.timeout.isRunning(),bindClickHandler:function(){hn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,pn||(document.body.addEventListener("click",fn),pn=!0)}});let gn;class vn{constructor(){if("undefined"==typeof window)return;gn=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:r,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);Oe.promise.set(this,o)}_main(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!e.backdrop&&e.allowOutsideClick&&r('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)y(t),e.toast&&b(t),w(t)})(Object.assign({},t,e)),de.currentInstance&&(de.currentInstance._destroy(),W()&&Ve()),de.currentInstance=this;const n=bn(e,t);Je(n),Object.freeze(n),de.timeout&&(de.timeout.stop(),delete de.timeout),clearTimeout(de.restoreFocusTimeout);const o=wn(this);return Be(this,n),Oe.innerParams.set(this,n),yn(this,o,n)}then(e){return Oe.promise.get(this).then(e)}finally(e){return Oe.promise.get(this).finally(e)}}const yn=(e,t,n)=>new Promise((r,o)=>{const i=t=>{e.closePopup({isDismissed:!0,dismiss:t})};St.swalPromiseResolve.set(e,r),St.swalPromiseReject.set(e,o),t.confirmButton.onclick=()=>(e=>{const t=Oe.innerParams.get(e);e.disableButtons(),t.input?Xt(e,"confirm"):tn(e,!0)})(e),t.denyButton.onclick=()=>(e=>{const t=Oe.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Xt(e,"deny"):Zt(e,!1)})(e),t.cancelButton.onclick=()=>((e,t)=>{e.disableButtons(),t(Ue.cancel)})(e,i),t.closeButton.onclick=()=>i(Ue.close),((e,t,n)=>{Oe.innerParams.get(e).toast?nn(e,t,n):(an(t),sn(t),ln(e,t,n))})(e,t,i),((e,t,n,r)=>{_t(t),n.toast||(t.keydownHandler=t=>At(e,t,r),t.keydownTarget=n.keydownListenerCapture?window:C(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(e,de,n,i),((e,t)=>{"select"===t.input||"radio"===t.input?vt(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(l(t.inputValue)||u(t.inputValue))&&(pt(L()),yt(e,t))})(e,n),st(n),kn(de,n,i),En(t,n),setTimeout(()=>{t.container.scrollTop=0})}),bn=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return Xe(n),Object.assign(He(n),Qe(n),qe(n),$e(n),Ge(n),Ye(n,We))})(e),r=Object.assign({},d,t,n,e);return r.showClass=Object.assign({},d.showClass,r.showClass),r.hideClass=Object.assign({},d.hideClass,r.hideClass),r},wn=e=>{const t={popup:C(),container:S(),actions:F(),confirmButton:L(),denyButton:I(),cancelButton:j(),loader:R(),closeButton:U(),validationMessage:N(),progressSteps:M()};return Oe.domCache.set(e,t),t},kn=(e,t,n)=>{const r=B();re(r),t.timer&&(e.timeout=new et(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(ne(r),G(r,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&ce(t.timer)})))},En=(e,t)=>{if(!t.toast)return s(t.allowEnterKey)?void(On(e,t)||Ct(0,-1,1)):Sn()},On=(e,t)=>t.focusDeny&&ae(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ae(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ae(e.confirmButton)||(e.confirmButton.focus(),0)),Sn=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Object.assign(vn.prototype,Yt),Object.assign(vn,mn),Object.keys(Yt).forEach(e=>{vn[e]=function(){if(gn)return gn[e](...arguments)}}),vn.DismissReason=Ue,vn.version="11.4.8";const xn=vn;return xn.default=xn,xn}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 3px}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}')},8636:(e,t,n)=>{"use strict";var r=n(920),o=n(7720),i=n(7146),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,p=i.default,h={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,filter:void 0,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,i,a,s,c,d,p,m,g,v,y,b,w,k,E,O,S){for(var x,_=t,C=S,P=0,T=!1;void 0!==(C=C.get(f))&&!T;){var A=C.get(t);if(P+=1,void 0!==A){if(A===P)throw new RangeError("Cyclic object value");T=!0}void 0===C.get(f)&&(P=0)}if("function"==typeof g?_=g(n,_):_ instanceof Date?_=b(_):"comma"===i&&l(_)&&(_=o.maybeMap(_,function(e){return e instanceof Date?b(e):e})),null===_){if(c)return m&&!E?m(n,h.encoder,O,"key",w):n;_=""}if("string"==typeof(x=_)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||o.isBuffer(_))return m?[k(E?n:m(n,h.encoder,O,"key",w))+"="+k(m(_,h.encoder,O,"value",w))]:[k(n)+"="+k(String(_))];var D,M=[];if(void 0===_)return M;if("comma"===i&&l(_))E&&m&&(_=o.maybeMap(_,m)),D=[{value:_.length>0?_.join(",")||null:void 0}];else if(l(g))D=g;else{var N=Object.keys(_);D=v?N.sort(v):N}var L=p?String(n).replace(/\./g,"%2E"):String(n),I=a&&l(_)&&1===_.length?L+"[]":L;if(s&&l(_)&&0===_.length)return I+"[]";for(var R=0;R<D.length;++R){var j=D[R],F="object"==typeof j&&j&&void 0!==j.value?j.value:_[j];if(!d||null!==F){var z=y&&p?String(j).replace(/\./g,"%2E"):String(j),B=l(_)?"function"==typeof i?i(I,z):I:I+(y?"."+z:"["+z+"]");S.set(t,P);var U=r();U.set(f,S),u(M,e(F,B,i,a,s,c,d,p,"comma"===i&&E&&l(_)?null:m,g,v,y,b,w,k,E,O,U))}}return M};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return h;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=i.formatters[n],c=h.filter;if(("function"==typeof e.filter||l(e.filter))&&(c=e.filter),r=e.arrayFormat in s?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":h.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||h.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:h.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:h.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:c,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):l(c.filter)&&(n=c.filter);var d=[];if("object"!=typeof o||null===o)return"";var p=s[c.arrayFormat],f="comma"===p&&c.commaRoundTrip;n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var g=r(),v=0;v<n.length;++v){var y=n[v],b=o[y];c.skipNulls&&null===b||u(d,m(b,y,p,f,c.allowEmptyArrays,c.strictNullHandling,c.skipNulls,c.encodeDotInKeys,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var w=d.join(c.delimiter),k=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?k+="utf8=%26%2310003%3B&":k+="utf8=%E2%9C%93&"),w.length>0?k+w:""}},8648:e=>{"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8829:(e,t)=>{t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}t.urlParse=o,t.urlGenerate=i;var a,s,l=(a=function(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var a=t.isAbsolute(n),s=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){s.push(n.slice(l));break}for(s.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var u,d=0;for(c=s.length-1;c>=0;c--)"."===(u=s[c])?s.splice(c,1):".."===u?d++:d>0&&(""===u?(s.splice(c+1,d),d=0):(s.splice(c,2),d--));return""===(n=s.join("/"))&&(n=a?"/":"."),r?(r.path=n,i(r)):n},s=[],function(e){for(var t=0;t<s.length;t++)if(s[t].input===e){var n=s[0];return s[0]=s[t],s[t]=n,s[0].result}var r=a(e);return s.unshift({input:e,result:r}),s.length>32&&s.pop(),r});function c(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),a=o(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),i(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var s="/"===t.charAt(0)?t:l(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,i(a)):s}t.normalize=l,t.join=c,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function d(e){return e}function p(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function h(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=u?d:function(e){return p(e)?"$"+e:e},t.fromSetString=u?d:function(e){return p(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)||n||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=h(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var a=r.path.lastIndexOf("/");a>=0&&(r.path=r.path.substring(0,a+1))}t=c(i(r),t)}return l(t)}},8859:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,k=String.prototype.toLowerCase,E=RegExp.prototype.test,O=Array.prototype.concat,S=Array.prototype.join,x=Array.prototype.slice,_=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,A="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-_(-e):_(e);if(r!==e){var o=String(r),i=y.call(t,o.length+1);return b.call(o,n,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var I=n(2634),R=I.custom,j=Q(R)?R:null,F={__proto__:null,double:'"',single:"'"},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function B(e,t,n){var r=n.quoteStyle||t,o=F[r];return o+e+o}function U(e){return b.call(String(e),/"/g,""")}function V(e){return!D||!("object"==typeof e&&(D in e||void 0!==e[D]))}function W(e){return"[object Array]"===G(e)&&V(e)}function H(e){return"[object RegExp]"===G(e)&&V(e)}function Q(e){if(A)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,s){var l=r||{};if($(l,"quoteStyle")&&!$(F,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!$(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return X(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return w?L(t,E):E}if("bigint"==typeof t){var _=String(t)+"n";return w?L(t,_):_}var P=void 0===l.depth?5:l.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof t)return W(t)?"[Array]":"[Object]";var R,z=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(l,o);if(void 0===s)s=[];else if(Y(s,t)>=0)return"[Circular]";function q(t,n,r){if(n&&(s=x.call(s)).push(n),r){var i={depth:l.depth};return $(l,"quoteStyle")&&(i.quoteStyle=l.quoteStyle),e(t,i,o+1,s)}return e(t,l,o+1,s)}if("function"==typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=v.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),re=ne(t,q);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(re.length>0?" { "+S.call(re,", ")+" }":"")}if(Q(t)){var oe=A?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||A?oe:Z(oe)}if((R=t)&&"object"==typeof R&&("undefined"!=typeof HTMLElement&&R instanceof HTMLElement||"string"==typeof R.nodeName&&"function"==typeof R.getAttribute)){for(var ie="<"+k.call(String(t.nodeName)),ae=t.attributes||[],se=0;se<ae.length;se++)ie+=" "+ae[se].name+"="+B(U(ae[se].value),"double",l);return ie+=">",t.childNodes&&t.childNodes.length&&(ie+="..."),ie+"</"+k.call(String(t.nodeName))+">"}if(W(t)){if(0===t.length)return"[]";var le=ne(t,q);return z&&!function(e){for(var t=0;t<e.length;t++)if(Y(e[t],"\n")>=0)return!1;return!0}(le)?"["+te(le,z)+"]":"[ "+S.call(le,", ")+" ]"}if(function(e){return"[object Error]"===G(e)&&V(e)}(t)){var ce=ne(t,q);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===ce.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ce,", ")+" }":"{ ["+String(t)+"] "+S.call(O.call("[cause]: "+q(t.cause),ce),", ")+" }"}if("object"==typeof t&&m){if(j&&"function"==typeof t[j]&&I)return I(t,{depth:P-o});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ue=[];return a&&a.call(t,function(e,n){ue.push(q(n,t,!0)+" => "+q(e,t))}),ee("Map",i.call(t),ue,z)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var de=[];return u&&u.call(t,function(e){de.push(q(e,t))}),ee("Set",c.call(t),de,z)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===G(e)&&V(e)}(t))return Z(q(Number(t)));if(function(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(t))return Z(q(C.call(t)));if(function(e){return"[object Boolean]"===G(e)&&V(e)}(t))return Z(f.call(t));if(function(e){return"[object String]"===G(e)&&V(e)}(t))return Z(q(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===G(e)&&V(e)}(t)&&!H(t)){var pe=ne(t,q),he=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",me=!he&&D&&Object(t)===t&&D in t?y.call(G(t),8,-1):fe?"Object":"",ge=(he||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(me||fe?"["+S.call(O.call([],me||[],fe||[]),": ")+"] ":"");return 0===pe.length?ge+"{}":z?ge+"{"+te(pe,z)+"}":ge+"{ "+S.call(pe,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function $(e,t){return q.call(e,t)}function G(e){return m.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function X(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return X(y.call(e,0,t.maxStringLength),t)+r}var o=z[t.quoteStyle||"single"];return o.lastIndex=0,B(b.call(b.call(e,o,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Z(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function ee(e,t,n,r){return e+" ("+t+") {"+(r?te(n,r):S.call(n,", "))+"}"}function te(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function ne(e,t){var n=W(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=$(e,o)?t(e[o],e):""}var i,a="function"==typeof P?P(e):[];if(A){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var l in e)$(e,l)&&(n&&String(Number(l))===l&&l<e.length||A&&i["$"+l]instanceof Symbol||(E.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof P)for(var c=0;c<a.length;c++)M.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}},8917:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},8968:e=>{"use strict";e.exports=Math.floor},8989:(e,t)=>{"use strict";var n=60103,r=60106,o=60107,i=60108,a=60114,s=60109,l=60110,c=60112,u=60113,d=60120,p=60115,h=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;n=f("react.element"),r=f("react.portal"),o=f("react.fragment"),i=f("react.strict_mode"),a=f("react.profiler"),s=f("react.provider"),l=f("react.context"),c=f("react.forward_ref"),u=f("react.suspense"),d=f("react.suspense_list"),p=f("react.memo"),h=f("react.lazy"),f("react.block"),f("react.server.block"),f("react.fundamental"),f("react.debug_trace_mode"),f("react.legacy_hidden")}t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case h:case p:case s:return e;default:return t}}case r:return t}}}(e)===l}},9012:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},9090:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(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},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1609),s=g(n(5556)),l=m(n(7791)),c=g(n(7067)),u=m(n(6462)),d=m(n(4838)),p=n(834),h=g(p),f=g(n(9628));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function g(e){return e&&e.__esModule?e:{default:e}}n(7727);var v={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName,a=e.parentSelector,s=a&&a().ownerDocument||document;i&&d.remove(s.body,i),o&&d.remove(s.getElementsByTagName("html")[0],o),r&&y>0&&0==(y-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),f.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},function(){n.openAnimationFrame=requestAnimationFrame(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})}))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":o(t))?t:{base:v[e],afterOpen:v[e]+"--after-open",beforeClose:v[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"==typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(n,r){return n[e+"-"+r]=t[r],n},{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName,i=e.parentSelector,a=i&&i().ownerDocument||document;o&&d.add(a.body,o),r&&d.add(a.getElementsByTagName("html")[0],r),n&&(y+=1,u.hide(t)),f.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,i=e.defaultStyles,a=e.children,s=n?{}:i.content,l=o?{}:i.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=r({id:t,ref:this.setContentRef,style:r({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,a);return this.props.overlayElement(c,d)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(h.default),s.default.instanceOf(p.SafeHTMLCollection),s.default.instanceOf(p.SafeNodeList),s.default.arrayOf(s.default.instanceOf(h.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},9106:(e,t,n)=>{"use strict";var r=n(9516);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))}))}),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},9108:(e,t,n)=>{var r=n(9788);function o(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,s=r(e),l="function"==typeof t,c=0,u=s.length;c<u;c++)i=(n=s[c]).property,a=n.value,l?t(i,a,n):a&&(o||(o={}),o[i]=a);return o}e.exports=o,e.exports.default=o},9137:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9189:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOriginalCounterPart=function(e,t,n){var r=t.slidesToShow,o=t.currentSlide;return n.length>2*r?e+2*r:o>=n.length?n.length+e:e},t.getOriginalIndexLookupTableByClones=function(e,t){if(t.length>2*e){for(var n={},r=t.length-2*e,o=t.length-r,i=r,a=0;a<o;a++)n[a]=i,i++;var s=t.length+o,l=s+t.slice(0,2*e).length,c=0;for(a=s;a<=l;a++)n[a]=c,c++;var u=s,d=0;for(a=o;a<u;a++)n[a]=d,d++;return n}n={};var p=3*t.length,h=0;for(a=0;a<p;a++)n[a]=h,++h===t.length&&(h=0);return n},t.getClones=function(e,t){return t.length<e?t:t.length>2*e?t.slice(t.length-2*e,t.length).concat(t,t.slice(0,2*e)):t.concat(t,t)},t.getInitialSlideInInfiniteMode=function(e,t){return t.length>2*e?2*e:t.length},t.checkClonesPosition=function(e,t,n){var r,o=e.currentSlide,i=e.slidesToShow,a=e.itemWidth,s=e.totalItems,l=0,c=0,u=0===o,d=t.length-(t.length-2*i);return t.length<i?(c=l=0,u=r=!1):t.length>2*i?((r=o>=d+t.length)&&(c=-a*(l=o-t.length)),u&&(c=-a*(l=d+(t.length-2*i)))):((r=o>=2*t.length)&&(c=-a*(l=o-t.length)),u&&(c=n.showDots?-a*(l=t.length):-a*(l=s/3))),{isReachingTheEnd:r,isReachingTheStart:u,nextSlide:l,nextPosition:c}}},9290:e=>{"use strict";e.exports=RangeError},9353:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),s=n(0,o.length-a.length),l=[],c=0;c<s;c++)l[c]="$"+c;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(l)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(e,r(a,arguments))}),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i}},9383:e=>{"use strict";e.exports=Error},9516:(e,t,n)=>{"use strict";var r=n(9012),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===o.call(e)}function l(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function d(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===o.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:l,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return l(e)&&u(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===o.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:d,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)d(arguments[r],n);return t},extend:function(e,t,n){return d(t,function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},9538:e=>{"use strict";e.exports=ReferenceError},9612:e=>{"use strict";e.exports=Object},9615:(e,t,n)=>{"use strict";var r=n(9137),o=n(4680);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},9628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(r.openInstances.length),r.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")},t.resetState=function(){r=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach(function(n){return n(e,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},r=new n;t.default=r},9641:e=>{e.exports={version:"0.26.1"}},9644:function(e,t,n){e.exports=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e),o=n(t);const i=[{key:"title",getter:e=>e.getTitle()},{key:"html",getter:e=>e.getHtmlContainer()},{key:"confirmButtonText",getter:e=>e.getConfirmButton()},{key:"denyButtonText",getter:e=>e.getDenyButton()},{key:"cancelButtonText",getter:e=>e.getCancelButton()},{key:"footer",getter:e=>e.getFooter()},{key:"closeButtonHtml",getter:e=>e.getCloseButton()},{key:"iconHtml",getter:e=>e.getIcon().querySelector(".swal2-icon-content")},{key:"loaderHtml",getter:e=>e.getLoader()}],a=()=>{};return function(e){function t(e){const t={},n={},o=i.map(e=>e.key);return Object.entries(e).forEach(([e,i])=>{o.includes(e)&&r.default.isValidElement(i)?(t[e]=i,n[e]=" "):n[e]=i}),[t,n]}function n(t,n){Object.entries(n).forEach(([n,r])=>{const a=i.find(e=>e.key===n).getter(e);o.default.render(r,a),t.__mountedDomElements.push(a)})}function s(e){e.__mountedDomElements.forEach(e=>{o.default.unmountComponentAtNode(e)}),e.__mountedDomElements=[]}return class extends e{static argsToParams(t){if(r.default.isValidElement(t[0])||r.default.isValidElement(t[1])){const e={};return["title","html","icon"].forEach((n,r)=>{void 0!==t[r]&&(e[n]=t[r])}),e}return e.argsToParams(t)}_main(e,r){this.__mountedDomElements=[],this.__params=Object.assign({},r,e);const[o,i]=t(this.__params),l=i.didOpen||a,c=i.didDestroy||a;return super._main(Object.assign({},i,{didOpen:e=>{n(this,o),l(e)},didDestroy:e=>{c(e),s(this)}}))}update(e){Object.assign(this.__params,e),s(this);const[r,o]=t(this.__params);super.update(o),n(this,r)}}}}(n(1609),n(5795))},9675:e=>{"use strict";e.exports=TypeError},9771:e=>{"use strict";e.exports=function(){}},9788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function h(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function f(){var e={line:d,column:p};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:p},this.source=l.source}m.prototype.content=e;var g=[];function v(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n;g.push(n)}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(r)}function w(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return v("End of comment missing");var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function E(){var e=f(),n=y(o);if(n){if(k(),!y(i))return v("property missing ':'");var r=y(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),l}}return b(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},9905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1635),o=n(1609),i=r.__importDefault(n(2877));t.default=function(e){var t=o.useRef(e);t.current=e,i.default(function(){return function(){return t.current()}})}},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,o)}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0,(()=>{"use strict";var e={};o.r(e),o.d(e,{safe:()=>bY,spec:()=>yY});var t={};o.r(t),o.d(t,{angle:()=>gX,decibel:()=>kX,flex:()=>wX,frequency:()=>yX,length:()=>mX,resolution:()=>bX,semitones:()=>EX,time:()=>vX});var n={};o.r(n),o.d(n,{getTrace:()=>tK,isKeyword:()=>oK,isProperty:()=>rK,isType:()=>nK});var r={};o.r(r),o.d(r,{generate:()=>RK,name:()=>NK,parse:()=>IK,structure:()=>LK});var i={};o.r(i),o.d(i,{generate:()=>WK,name:()=>zK,parse:()=>VK,structure:()=>UK,walkContext:()=>BK});var a={};o.r(a),o.d(a,{generate:()=>GK,name:()=>HK,parse:()=>$K,structure:()=>qK,walkContext:()=>QK});var s={};o.r(s),o.d(s,{generate:()=>aZ,name:()=>rZ,parse:()=>iZ,structure:()=>oZ});var l={};o.r(l),o.d(l,{generate:()=>gZ,name:()=>pZ,parse:()=>mZ,structure:()=>fZ,walkContext:()=>hZ});var c={};o.r(c),o.d(c,{generate:()=>wZ,name:()=>vZ,parse:()=>bZ,structure:()=>yZ});var u={};o.r(u),o.d(u,{generate:()=>SZ,name:()=>kZ,parse:()=>OZ,structure:()=>EZ});var d={};o.r(d),o.d(d,{generate:()=>PZ,name:()=>xZ,parse:()=>CZ,structure:()=>_Z});var p={};o.r(p),o.d(p,{generate:()=>NZ,name:()=>AZ,parse:()=>MZ,structure:()=>DZ});var h={};o.r(h),o.d(h,{generate:()=>UZ,name:()=>FZ,parse:()=>BZ,structure:()=>zZ});var f={};o.r(f),o.d(f,{generate:()=>$Z,name:()=>HZ,parse:()=>qZ,structure:()=>QZ});var m={};o.r(m),o.d(m,{generate:()=>eJ,name:()=>YZ,parse:()=>JZ,structure:()=>XZ});var g={};o.r(g),o.d(g,{generate:()=>mJ,name:()=>dJ,parse:()=>fJ,structure:()=>hJ,walkContext:()=>pJ});var v={};o.r(v),o.d(v,{generate:()=>OJ,name:()=>wJ,parse:()=>EJ,structure:()=>kJ});var y={};o.r(y),o.d(y,{generate:()=>CJ,name:()=>SJ,parse:()=>_J,structure:()=>xJ});var b={};o.r(b),o.d(b,{generate:()=>MJ,name:()=>TJ,parse:()=>DJ,structure:()=>AJ});var w={};o.r(w),o.d(w,{generate:()=>jJ,name:()=>NJ,parse:()=>RJ,structure:()=>LJ});var k={};o.r(k),o.d(k,{generate:()=>$J,name:()=>VJ,parse:()=>qJ,structure:()=>WJ});var E={};o.r(E),o.d(E,{generate:()=>ZJ,name:()=>GJ,parse:()=>KJ,structure:()=>XJ,walkContext:()=>YJ});var O={};o.r(O),o.d(O,{generate:()=>n0,name:()=>JJ,parse:()=>t0,structure:()=>e0});var S={};o.r(S),o.d(S,{generate:()=>s0,name:()=>o0,parse:()=>a0,structure:()=>i0,xxx:()=>r0});var x={};o.r(x),o.d(x,{generate:()=>d0,name:()=>l0,parse:()=>u0,structure:()=>c0});var _={};o.r(_),o.d(_,{generate:()=>m0,name:()=>p0,parse:()=>f0,structure:()=>h0});var C={};o.r(C),o.d(C,{generate:()=>w0,name:()=>v0,parse:()=>b0,structure:()=>y0});var P={};o.r(P),o.d(P,{generate:()=>S0,name:()=>k0,parse:()=>O0,structure:()=>E0});var T={};o.r(T),o.d(T,{generate:()=>P0,name:()=>x0,parse:()=>C0,structure:()=>_0});var A={};o.r(A),o.d(A,{generate:()=>M0,name:()=>T0,parse:()=>D0,structure:()=>A0});var D={};o.r(D),o.d(D,{generate:()=>j0,name:()=>L0,parse:()=>R0,structure:()=>I0});var M={};o.r(M),o.d(M,{generate:()=>U0,name:()=>F0,parse:()=>B0,structure:()=>z0});var N={};o.r(N),o.d(N,{generate:()=>Q0,name:()=>V0,parse:()=>H0,structure:()=>W0});var L={};o.r(L),o.d(L,{generate:()=>Y0,name:()=>q0,parse:()=>G0,structure:()=>$0});var I={};o.r(I),o.d(I,{generate:()=>J0,name:()=>X0,parse:()=>Z0,structure:()=>K0});var R={};o.r(R),o.d(R,{generate:()=>r1,name:()=>e1,parse:()=>n1,structure:()=>t1});var j={};o.r(j),o.d(j,{generate:()=>l1,name:()=>o1,parse:()=>s1,structure:()=>a1,walkContext:()=>i1});var F={};o.r(F),o.d(F,{generate:()=>h1,name:()=>c1,parse:()=>p1,structure:()=>d1,walkContext:()=>u1});var z={};o.r(z),o.d(z,{generate:()=>b1,name:()=>g1,parse:()=>y1,structure:()=>v1});var B={};o.r(B),o.d(B,{generate:()=>S1,name:()=>k1,parse:()=>O1,structure:()=>E1});var U={};o.r(U),o.d(U,{generate:()=>D1,name:()=>C1,parse:()=>A1,structure:()=>T1,walkContext:()=>P1});var V={};o.r(V),o.d(V,{generate:()=>I1,name:()=>M1,parse:()=>L1,structure:()=>N1});var W={};o.r(W),o.d(W,{generate:()=>z1,name:()=>R1,parse:()=>F1,structure:()=>j1});var H={};o.r(H),o.d(H,{generate:()=>H1,name:()=>B1,parse:()=>W1,structure:()=>V1,walkContext:()=>U1});var Q={};o.r(Q),o.d(Q,{generate:()=>Z1,name:()=>Y1,parse:()=>K1,structure:()=>X1});var q={};o.r(q),o.d(q,{generate:()=>i2,name:()=>t2,parse:()=>o2,structure:()=>r2,walkContext:()=>n2});var $={};o.r($),o.d($,{generate:()=>c2,name:()=>a2,parse:()=>l2,structure:()=>s2});var G={};o.r(G),o.d(G,{generate:()=>g2,name:()=>h2,parse:()=>m2,structure:()=>f2});var Y={};o.r(Y),o.d(Y,{generate:()=>C2,name:()=>S2,parse:()=>_2,structure:()=>x2});var X={};o.r(X),o.d(X,{generate:()=>j2,name:()=>L2,parse:()=>R2,structure:()=>I2});var K={};o.r(K),o.d(K,{generate:()=>U2,name:()=>F2,parse:()=>B2,structure:()=>z2});var Z={};o.r(Z),o.d(Z,{generate:()=>q2,name:()=>W2,parse:()=>Q2,structure:()=>H2});var J={};o.r(J),o.d(J,{AnPlusB:()=>r,Atrule:()=>i,AtrulePrelude:()=>a,AttributeSelector:()=>s,Block:()=>l,Brackets:()=>c,CDC:()=>u,CDO:()=>d,ClassSelector:()=>p,Combinator:()=>h,Comment:()=>f,Condition:()=>m,Declaration:()=>g,DeclarationList:()=>v,Dimension:()=>y,Feature:()=>b,FeatureFunction:()=>w,FeatureRange:()=>k,Function:()=>E,GeneralEnclosed:()=>O,Hash:()=>S,IdSelector:()=>_,Identifier:()=>x,Layer:()=>C,LayerList:()=>P,MediaQuery:()=>T,MediaQueryList:()=>A,NestingSelector:()=>D,Nth:()=>M,Number:()=>N,Operator:()=>L,Parentheses:()=>I,Percentage:()=>R,PseudoClassSelector:()=>j,PseudoElementSelector:()=>F,Ratio:()=>z,Raw:()=>B,Rule:()=>U,Scope:()=>V,Selector:()=>W,SelectorList:()=>H,String:()=>Q,StyleSheet:()=>q,SupportsDeclaration:()=>$,TypeSelector:()=>G,UnicodeRange:()=>Y,Url:()=>X,Value:()=>K,WhiteSpace:()=>Z});var ee={};o.r(ee),o.d(ee,{AtrulePrelude:()=>Y2,Selector:()=>X2,Value:()=>Z2});var te={};function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},re.apply(null,arguments)}o.r(te),o.d(te,{AnPlusB:()=>IK,Atrule:()=>VK,AtrulePrelude:()=>$K,AttributeSelector:()=>iZ,Block:()=>mZ,Brackets:()=>bZ,CDC:()=>OZ,CDO:()=>CZ,ClassSelector:()=>MZ,Combinator:()=>BZ,Comment:()=>qZ,Condition:()=>JZ,Declaration:()=>fJ,DeclarationList:()=>EJ,Dimension:()=>_J,Feature:()=>DJ,FeatureFunction:()=>RJ,FeatureRange:()=>qJ,Function:()=>KJ,GeneralEnclosed:()=>t0,Hash:()=>a0,IdSelector:()=>f0,Identifier:()=>u0,Layer:()=>b0,LayerList:()=>O0,MediaQuery:()=>C0,MediaQueryList:()=>D0,NestingSelector:()=>R0,Nth:()=>B0,Number:()=>H0,Operator:()=>G0,Parentheses:()=>Z0,Percentage:()=>n1,PseudoClassSelector:()=>s1,PseudoElementSelector:()=>p1,Ratio:()=>y1,Raw:()=>O1,Rule:()=>A1,Scope:()=>L1,Selector:()=>F1,SelectorList:()=>W1,String:()=>K1,StyleSheet:()=>o2,SupportsDeclaration:()=>l2,TypeSelector:()=>m2,UnicodeRange:()=>_2,Url:()=>R2,Value:()=>B2,WhiteSpace:()=>Q2});var oe=o(1609),ie=o.t(oe,2),ae=o.n(oe),se=o(5795),le=o.n(se);const ce=window.wp.hooks;function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function de(e,t){if(e){if("string"==typeof e)return ue(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||de(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(){return he=Object.assign?Object.assign.bind():function(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},he.apply(this,arguments)}var fe,me;function ge(e,t){if(!1===e||null==e)throw new Error(t)}function ve(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function ye(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function be(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function we(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let o=Le(("string"==typeof t?be(t):t).pathname||"/",n);if(null==o)return null;let i=ke(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let a=null;for(let e=0;null==a&&e<i.length;++e){let t=Ne(o);a=De(i[e],t,r)}return a}(e,t,n,!1)}function ke(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(ge(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=ze([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(ge(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),ke(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Ae(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of Ee(e.path))o(e,t,n);else o(e,t)}),t}function Ee(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=Ee(r.join("/")),s=[];return s.push(...a.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(fe||(fe={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(me||(me={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const Oe=/^:[\w-]+$/,Se=3,xe=2,_e=1,Ce=10,Pe=-2,Te=e=>"*"===e;function Ae(e,t){let n=e.split("/"),r=n.length;return n.some(Te)&&(r+=Pe),t&&(r+=xe),n.filter(e=>!Te(e)).reduce((e,t)=>e+(Oe.test(t)?Se:""===t?_e:Ce),r)}function De(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;e<r.length;++e){let s=r[e],l=e===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=Me({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),d=s.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=Me({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:ze([i,u.pathname]),pathnameBase:Be(ze([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=ze([i,u.pathnameBase]))}return a}function Me(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),ve("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=r.reduce((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function Ne(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Le(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Ie(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?be(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:Ue(r),hash:Ve(o)}}function Re(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function je(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Fe(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=be(e):(o=he({},e),ge(!o.pathname||!o.pathname.includes("?"),Re("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Re("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Re("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=Ie(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const ze=e=>e.join("/").replace(/\/\/+/g,"/"),Be=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ue=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Ve=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const We=["post","put","patch","delete"],He=(new Set(We),["get",...We]);function Qe(){return Qe=Object.assign?Object.assign.bind():function(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},Qe.apply(this,arguments)}new Set(He),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred");const qe=oe.createContext(null),$e=oe.createContext(null),Ge=oe.createContext(null),Ye=oe.createContext(null),Xe=oe.createContext({outlet:null,matches:[],isDataRoute:!1}),Ke=oe.createContext(null);function Ze(){return null!=oe.useContext(Ye)}function Je(){return Ze()||ge(!1),oe.useContext(Ye).location}function et(e){oe.useContext(Ge).static||oe.useLayoutEffect(e)}function tt(){let{isDataRoute:e}=oe.useContext(Xe);return e?function(){let{router:e}=function(){let e=oe.useContext(qe);return e||ge(!1),e}(ut.UseNavigateStable),t=pt(dt.UseNavigateStable),n=oe.useRef(!1);et(()=>{n.current=!0});let r=oe.useCallback(function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Qe({fromRouteId:t},o)))},[e,t]);return r}():function(){Ze()||ge(!1);let e=oe.useContext(qe),{basename:t,future:n,navigator:r}=oe.useContext(Ge),{matches:o}=oe.useContext(Xe),{pathname:i}=Je(),a=JSON.stringify(je(o,n.v7_relativeSplatPath)),s=oe.useRef(!1);et(()=>{s.current=!0});let l=oe.useCallback(function(n,o){if(void 0===o&&(o={}),!s.current)return;if("number"==typeof n)return void r.go(n);let l=Fe(n,JSON.parse(a),i,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:ze([t,l.pathname])),(o.replace?r.replace:r.push)(l,o.state,o)},[t,r,a,i,e]);return l}()}const nt=oe.createContext(null);function rt(){let{matches:e}=oe.useContext(Xe),t=e[e.length-1];return t?t.params:{}}function ot(e,t){let{relative:n}=void 0===t?{}:t,{future:r}=oe.useContext(Ge),{matches:o}=oe.useContext(Xe),{pathname:i}=Je(),a=JSON.stringify(je(o,r.v7_relativeSplatPath));return oe.useMemo(()=>Fe(e,JSON.parse(a),i,"path"===n),[e,a,i,n])}function it(e,t){return function(e,t,n,r){Ze()||ge(!1);let{navigator:o}=oe.useContext(Ge),{matches:i}=oe.useContext(Xe),a=i[i.length-1],s=a?a.params:{},l=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let c,u=Je();if(t){var d;let e="string"==typeof t?be(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||ge(!1),c=e}else c=u;let p=c.pathname||"/",h=p;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=we(e,{pathname:h}),m=function(e,t,n,r){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=r)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||ge(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,o=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||o){l=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,o)=>{let i,u=!1,d=null,p=null;var h;n&&(i=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||st,l&&(c<0&&0===o?(ht[h="route-fallback"]||(ht[h]=!0),u=!0,p=null):c===o&&(u=!0,p=r.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,o+1)),m=()=>{let t;return t=i?d:u?p:r.route.Component?oe.createElement(r.route.Component,null):r.route.element?r.route.element:e,oe.createElement(ct,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?oe.createElement(lt,{location:n.location,revalidation:n.revalidation,component:d,error:i,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()},null)}(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ze([l,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:ze([l,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),i,n,r);return t&&m?oe.createElement(Ye.Provider,{value:{location:Qe({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:fe.Pop}},m):m}(e,t)}function at(){let e=function(){var e;let t=oe.useContext(Ke),n=function(){let e=oe.useContext($e);return e||ge(!1),e}(dt.UseRouteError),r=pt(dt.UseRouteError);return void 0!==t?t:null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return oe.createElement(oe.Fragment,null,oe.createElement("h2",null,"Unexpected Application Error!"),oe.createElement("h3",{style:{fontStyle:"italic"}},t),n?oe.createElement("pre",{style:r},n):null,null)}const st=oe.createElement(at,null);class lt extends oe.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?oe.createElement(Xe.Provider,{value:this.props.routeContext},oe.createElement(Ke.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(e){let{routeContext:t,match:n,children:r}=e,o=oe.useContext(qe);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),oe.createElement(Xe.Provider,{value:t},r)}var ut=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ut||{}),dt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(dt||{});function pt(e){let t=function(){let e=oe.useContext(Xe);return e||ge(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}const ht={};function ft(e){let{to:t,replace:n,state:r,relative:o}=e;Ze()||ge(!1);let{future:i,static:a}=oe.useContext(Ge),{matches:s}=oe.useContext(Xe),{pathname:l}=Je(),c=tt(),u=Fe(t,je(s,i.v7_relativeSplatPath),l,"path"===o),d=JSON.stringify(u);return oe.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:o}),[c,d,o,n,r]),null}function mt(e){return function(e){let t=oe.useContext(Xe).outlet;return t?oe.createElement(nt.Provider,{value:e},t):t}(e.context)}function gt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=fe.Pop,navigator:i,static:a=!1,future:s}=e;Ze()&&ge(!1);let l=t.replace(/^\/*/,"/"),c=oe.useMemo(()=>({basename:l,navigator:i,static:a,future:Qe({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);"string"==typeof r&&(r=be(r));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:f="default"}=r,m=oe.useMemo(()=>{let e=Le(u,l);return null==e?null:{location:{pathname:e,search:d,hash:p,state:h,key:f},navigationType:o}},[l,u,d,p,h,f,o]);return null==m?null:oe.createElement(Ge.Provider,{value:c},oe.createElement(Ye.Provider,{children:n,value:m}))}function vt(){return vt=Object.assign?Object.assign.bind():function(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},vt.apply(this,arguments)}function yt(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}oe.startTransition,new Promise(()=>{}),oe.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map,oe.startTransition,se.flushSync,oe.useId;const wt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,kt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Et=oe.forwardRef(function(e,t){let n,{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,p=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,bt),{basename:h}=oe.useContext(Ge),f=!1;if("string"==typeof c&&kt.test(c)&&(n=c,wt))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=Le(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:f=!0}catch(e){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;Ze()||ge(!1);let{basename:r,navigator:o}=oe.useContext(Ge),{hash:i,pathname:a,search:s}=ot(e,{relative:n}),l=a;return"/"!==r&&(l="/"===a?r:ze([r,a])),o.createHref({pathname:l,search:s,hash:i})}(c,{relative:o}),g=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=void 0===t?{}:t,l=tt(),c=Je(),u=ot(e,{relative:a});return oe.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:ye(c)===ye(u);l(e,{replace:n,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});return oe.createElement("a",vt({},p,{href:n||m,onClick:f||i?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:l}))});var Ot,St;function xt(e){let t=oe.useRef(yt(e)),n=oe.useRef(!1),r=Je(),o=oe.useMemo(()=>function(e,t){let n=yt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),i=tt(),a=oe.useCallback((e,t)=>{const r=yt("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)},[i,o]);return[o,a]}function _t(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function Ct(e,t,n){return(t=_t(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ot||(Ot={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(St||(St={}));const Pt=window.wp.i18n;var Tt=ae().createContext(null),At=function(e){e()},Dt=function(){return At},Mt={notify:function(){},get:function(){return[]}};function Nt(e,t){var n,r=Mt;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=Dt(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var e=t;e;)e.callback(),e=e.next})},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Mt)},getListeners:function(){return r}};return a}var Lt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?oe.useLayoutEffect:oe.useEffect;const It=function(e){var t=e.store,n=e.context,r=e.children,o=(0,oe.useMemo)(function(){var e=Nt(t);return{store:t,subscription:e}},[t]),i=(0,oe.useMemo)(function(){return t.getState()},[t]);Lt(function(){var e=o.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[o,i]);var a=n||Tt;return ae().createElement(a.Provider,{value:o},r)};function Rt(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var jt=o(4146),Ft=o.n(jt),zt=o(4737),Bt=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ut=["reactReduxForwardedRef"],Vt=[],Wt=[null,null];function Ht(e,t){var n=e[1];return[t.payload,n+1]}function Qt(e,t,n){Lt(function(){return e.apply(void 0,t)},n)}function qt(e,t,n,r,o,i,a){e.current=r,t.current=o,n.current=!1,i.current&&(i.current=null,a())}function $t(e,t,n,r,o,i,a,s,l,c){if(e){var u=!1,d=null,p=function(){if(!u){var e,n,p=t.getState();try{e=r(p,o.current)}catch(e){n=e,d=e}n||(d=null),e===i.current?a.current||l():(i.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var Gt=function(){return[null,0]};function Yt(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,o=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=void 0===i?"connectAdvanced":i,s=n.renderCountProp,l=void 0===s?void 0:s,c=n.shouldHandleStateChanges,u=void 0===c||c,d=n.storeKey,p=void 0===d?"store":d,h=(n.withRef,n.forwardRef),f=void 0!==h&&h,m=n.context,g=void 0===m?Tt:m,v=Rt(n,Bt),y=g;return function(t){var n=t.displayName||t.name||"Component",r=o(n),i=re({},v,{getDisplayName:o,methodName:a,renderCountProp:l,shouldHandleStateChanges:u,storeKey:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,c=s?oe.useMemo:function(e){return e()};function d(n){var r=(0,oe.useMemo)(function(){var e=n.reactReduxForwardedRef,t=Rt(n,Ut);return[n.context,e,t]},[n]),o=r[0],a=r[1],s=r[2],l=(0,oe.useMemo)(function(){return o&&o.Consumer&&(0,zt.isContextConsumer)(ae().createElement(o.Consumer,null))?o:y},[o,y]),d=(0,oe.useContext)(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var h=p?n.store:d.store,f=(0,oe.useMemo)(function(){return function(t){return e(t.dispatch,i)}(h)},[h]),m=(0,oe.useMemo)(function(){if(!u)return Wt;var e=Nt(h,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[h,p,d]),g=m[0],v=m[1],b=(0,oe.useMemo)(function(){return p?d:re({},d,{subscription:g})},[p,d,g]),w=(0,oe.useReducer)(Ht,Vt,Gt),k=w[0][0],E=w[1];if(k&&k.error)throw k.error;var O=(0,oe.useRef)(),S=(0,oe.useRef)(s),x=(0,oe.useRef)(),_=(0,oe.useRef)(!1),C=c(function(){return x.current&&s===S.current?x.current:f(h.getState(),s)},[h,k,s]);Qt(qt,[S,O,_,s,C,x,v]),Qt($t,[u,h,g,f,S,O,_,x,v,E],[h,g,f]);var P=(0,oe.useMemo)(function(){return ae().createElement(t,re({},C,{ref:a}))},[a,t,C]);return(0,oe.useMemo)(function(){return u?ae().createElement(l.Provider,{value:b},P):P},[l,P,b])}var h=s?ae().memo(d):d;if(h.WrappedComponent=t,h.displayName=d.displayName=r,f){var m=ae().forwardRef(function(e,t){return ae().createElement(h,re({},e,{reactReduxForwardedRef:t}))});return m.displayName=r,m.WrappedComponent=t,Ft()(m,t)}return Ft()(h,t)}}function Xt(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Kt(e,t){if(Xt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Xt(e[n[o]],t[n[o]]))return!1;return!0}function Zt(e){return function(t,n){var r=e(t,n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Jt(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function en(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=Jt(e);var o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=Jt(o),o=r(t,n)),o},r}}const tn=[function(e){return"function"==typeof e?en(e):void 0},function(e){return e?void 0:Zt(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?Zt(function(t){return function(e,t){var n={},r=function(r){var o=e[r];"function"==typeof o&&(n[r]=function(){return t(o.apply(void 0,arguments))})};for(var o in e)r(o);return n}(e,t)}):void 0}],nn=[function(e){return"function"==typeof e?en(e):void 0},function(e){return e?void 0:Zt(function(){return{}})}];function rn(e,t,n){return re({},n,e,t)}const on=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,o=n.pure,i=n.areMergedPropsEqual,a=!1;return function(t,n,s){var l=e(t,n,s);return a?o&&i(l,r)||(r=l):(a=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return rn}}];var an=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function sn(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function ln(e,t,n,r,o){var i,a,s,l,c,u=o.areStatesEqual,d=o.areOwnPropsEqual,p=o.areStatePropsEqual,h=!1;return function(o,f){return h?function(o,h){var f,m,g=!d(h,a),v=!u(o,i,h,a);return i=o,a=h,g&&v?(s=e(i,a),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):g?(e.dependsOnOwnProps&&(s=e(i,a)),t.dependsOnOwnProps&&(l=t(r,a)),c=n(s,l,a)):v?(f=e(i,a),m=!p(f,s),s=f,m&&(c=n(s,l,a)),c):c}(o,f):(s=e(i=o,a=f),l=t(r,a),c=n(s,l,a),h=!0,c)}}function cn(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,i=Rt(t,an),a=n(e,i),s=r(e,i),l=o(e,i);return(i.pure?ln:sn)(a,s,l,e,i)}var un=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function dn(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function pn(e,t){return e===t}function hn(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Yt:n,o=t.mapStateToPropsFactories,i=void 0===o?nn:o,a=t.mapDispatchToPropsFactories,s=void 0===a?tn:a,l=t.mergePropsFactories,c=void 0===l?on:l,u=t.selectorFactory,d=void 0===u?cn:u;return function(e,t,n,o){void 0===o&&(o={});var a=o,l=a.pure,u=void 0===l||l,p=a.areStatesEqual,h=void 0===p?pn:p,f=a.areOwnPropsEqual,m=void 0===f?Kt:f,g=a.areStatePropsEqual,v=void 0===g?Kt:g,y=a.areMergedPropsEqual,b=void 0===y?Kt:y,w=Rt(a,un),k=dn(e,i,"mapStateToProps"),E=dn(t,s,"mapDispatchToProps"),O=dn(n,c,"mergeProps");return r(d,re({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:E,initMergeProps:O,pure:u,areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:v,areMergedPropsEqual:b},w))}}const fn=hn();function mn(){return(0,oe.useContext)(Tt)}function gn(e){void 0===e&&(e=Tt);var t=e===Tt?mn:function(){return(0,oe.useContext)(e)};return function(){return t().store}}var vn=gn();function yn(e){void 0===e&&(e=Tt);var t=e===Tt?vn:gn(e);return function(){return t().dispatch}}var bn=yn(),wn=function(e,t){return e===t};function kn(e){void 0===e&&(e=Tt);var t=e===Tt?mn:function(){return(0,oe.useContext)(e)};return function(e,n){void 0===n&&(n=wn);var r=t(),o=function(e,t,n,r){var o,i=(0,oe.useReducer)(function(e){return e+1},0)[1],a=(0,oe.useMemo)(function(){return Nt(n,r)},[n,r]),s=(0,oe.useRef)(),l=(0,oe.useRef)(),c=(0,oe.useRef)(),u=(0,oe.useRef)(),d=n.getState();try{if(e!==l.current||d!==c.current||s.current){var p=e(d);o=void 0!==u.current&&t(p,u.current)?u.current:p}else o=u.current}catch(e){throw s.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),e}return Lt(function(){l.current=e,c.current=d,u.current=o,s.current=void 0}),Lt(function(){function e(){try{var e=n.getState();if(e===c.current)return;var r=l.current(e);if(t(r,u.current))return;u.current=r,c.current=e}catch(e){s.current=e}i()}return a.onStateChange=e,a.trySubscribe(),e(),function(){return a.tryUnsubscribe()}},[n,a]),o}(e,n,r.store,r.subscription);return(0,oe.useDebugValue)(o),o}}var En,On=kn();En=se.unstable_batchedUpdates,At=En;const Sn=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},ae().createElement("path",{d:"M11 12.778L18.778 5 21 7.222l-10 10-10-10L3.222 5 11 12.778z"}))},xn=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},ae().createElement("g",null,ae().createElement("path",{d:"M76.8 76.5H11.6C5.2 76.5 0 81.7 0 88.1s5.2 11.6 11.6 11.6h65.2c6.4 0 11.6-5.2 11.6-11.6.1-6.4-5.1-11.6-11.6-11.6zM71 93.4c-2.9 0-5.2-2.3-5.2-5.2S68.1 83 71 83s5.2 2.3 5.2 5.2c.1 2.8-2.3 5.2-5.2 5.2zM90.2 21.4C88.9 12.7 81.3 6 72.3 6H71C67.4 2.3 62.2.2 57 .2 46.1.2 37.2 9 37 19.8c-4.8 3.8-7.7 9.6-7.7 15.7 0 11 9 20 20 20h32.6c10 0 18.1-8.1 18.1-18.1 0-6.8-3.8-13-9.8-16zm-8.3 24.8H49.3c-5.9 0-10.7-4.8-10.7-10.7 0-3.8 2.1-7.4 5.4-9.3l2.7-1.6-.4-3.2c-.1-.4-.1-.9-.1-1.3 0-5.9 4.8-10.7 10.7-10.7 3.4 0 6.6 1.6 8.6 4.3l1.8 2.5 3-.7c.6-.2 1.3-.2 2-.2 4.8 0 8.8 3.9 8.8 8.7l-.1 4 3.4 1c3.7 1.1 6.3 4.6 6.3 8.4 0 4.9-3.9 8.8-8.8 8.8z"}),ae().createElement("path",{d:"M76.8 71.8c4.2 0 8 1.6 10.9 4.2L82 59H49.3c-12.7 0-23.1-10.3-23.4-23h-2c-5.1 0-8.4 2.6-11.4 9.3L.3 76.5c2.9-2.9 7-4.7 11.4-4.7z"})))},Cn=function(e){return ae().createElement("svg",re({viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{fill:"#29c581"},ae().createElement("path",{d:"M123 0H36.6c-2.8 0-5.1 2.3-5.1 5.1v26.3H5.1c-2.8 0-5.1 2.3-5.1 5.1v86.3c0 2.8 2.3 5.1 5.1 5.1h86.3c2.8 0 5.1-2.3 5.1-5.1V96.7h26.3c2.8 0 5.1-2.3 5.1-5.1V5.3c.2-3-2.1-5.3-4.9-5.3zM86.3 117.7h-76V41.8h21.2v49.6c0 2.8 2.3 5.1 5.1 5.1h49.6v21.2zm31.4-31.4H41.8V10.4h75.9z"}),ae().createElement("path",{d:"M58.5 53.5h16.2v16.2c0 .9.8 1.8 1.8 1.8h6.9c.9 0 1.8-.8 1.8-1.8V53.5h16.2c.9 0 1.8-.8 1.8-1.8v-6.9c0-.9-.8-1.8-1.8-1.8H85.1V27c0-.9-.8-1.8-1.8-1.8h-6.9c-.9 0-1.8.8-1.8 1.8v16.2H58.5c-.9 0-1.8.8-1.8 1.8v6.9c0 .8.8 1.6 1.8 1.6z"})))},Pn=function(e){return ae().createElement("svg",re({viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{fill:"#f82626"},ae().createElement("path",{d:"M463.9 71.6h-97.7l-19.4-38.2C336.5 12.7 315.3-.3 292.2 0h-85.6c-23.1-.3-44.3 12.7-54.6 33.4l-18.8 38.2H35.5c-13.4 0-24.3 10.9-24.3 24.3s10.9 24.3 24.3 24.3h34V415c0 46.9 38 85 85 85h191.1c46.9 0 85-38 85-85V120.1h34c13.4 0 24.3-10.9 24.3-24.3S478 71.5 464.6 71.5h-.7zM195.7 55.2c2.1-4.1 6.3-6.7 10.9-6.7h86.2c4.6 0 8.8 2.6 10.9 6.7l7.9 16.4H187.8zM382 415c0 20.1-16.3 36.4-36.4 36.4H153.8c-20.1 0-36.4-16.3-36.4-36.4V120.1H382z"}),ae().createElement("path",{d:"M303.1 401.7c13.4 0 24.3-10.9 24.3-24.3V199.6c0-13.4-10.9-24.3-24.3-24.3s-24.3 10.9-24.3 24.3v177.8c0 13.4 10.9 24.3 24.3 24.3zM196.3 401.7c13.4 0 24.3-10.9 24.3-24.3V199.6c0-13.4-10.9-24.3-24.3-24.3S172 186.2 172 199.6v177.8c0 13.4 10.9 24.3 24.3 24.3z"})))},Tn=function(e){return ae().createElement("svg",re({viewBox:"0 0 500 500",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{clipRule:"evenodd",fill:"#1dc27a",fillRule:"evenodd"},ae().createElement("path",{d:"M355.3 500H47.7c-24.2 0-43.8-19.6-43.8-43.8V148.6c0-24.2 19.9-43.8 44-43.8h251.9l-43.9 43.9H47.8v307.4h307.4V235.7l43.9-43.9v264.4c0 24.2-19.6 43.8-43.8 43.8z"}),ae().createElement("path",{d:"M455.5 104.1 393.4 42 207.1 228.3l62.1 62.1zM248.9 308.8 184.1 327c-8.3 2.3-15.9-5.3-13.5-13.5l18.2-64.8c.5-1.8 1.5-3.5 2.8-4.8l62.1 62.1c-1.3 1.3-3 2.3-4.8 2.8zM494.3 65.3c4.3-4.3 4.3-11.2 0-15.5L447.8 3.2c-4.3-4.3-11.2-4.3-15.5 0L409 26.5l62 62.1z"})))},An=function(e){return oe.createElement("svg",re({xmlns:"http://www.w3.org/2000/svg",width:25,height:24,fill:"none"},e),oe.createElement("mask",{id:"a",x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#D9D9D9",d:"M.5 0h24v24H.5z"})),oe.createElement("g",{mask:"url(#a)"},oe.createElement("path",{fill:"#fff",d:"M7 20c-1.517 0-2.813-.525-3.888-1.575-1.075-1.05-1.612-2.334-1.612-3.85 0-1.3.392-2.459 1.175-3.475.783-1.017 1.808-1.667 3.075-1.95.283-1.2.992-2.342 2.125-3.425C9.008 4.64 10.217 4.1 11.5 4.1c.55 0 1.02.195 1.412.587.392.392.588.863.588 1.413v6.05l1.6-1.55 1.4 1.4-4 4-4-4 1.4-1.4 1.6 1.55V6.1c-1.267.233-2.25.845-2.95 1.837C7.85 8.93 7.5 9.95 7.5 11H7c-.967 0-1.792.341-2.475 1.025A3.372 3.372 0 0 0 3.5 14.5c0 .966.342 1.791 1.025 2.475A3.372 3.372 0 0 0 7 18h12c.7 0 1.292-.242 1.775-.725.483-.484.725-1.075.725-1.775s-.242-1.292-.725-1.775C20.292 13.24 19.7 13 19 13h-1.5v-2c0-.8-.183-1.546-.55-2.238A5.614 5.614 0 0 0 15.5 7V4.675a6.827 6.827 0 0 1 2.925 2.587A6.895 6.895 0 0 1 19.5 11c1.15.133 2.104.629 2.863 1.487A4.407 4.407 0 0 1 23.5 15.5c0 1.25-.438 2.312-1.313 3.187S20.25 20 19 20H7Z"})))};var Dn=function(e){return ae().createElement("svg",re({viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("circle",{cx:90.5,cy:454.8,fill:"#ffb45a",r:57.2}),ae().createElement("circle",{cx:256,cy:454.8,fill:"#ff7b8e",r:57.2}),ae().createElement("circle",{cx:421.5,cy:454.8,fill:"#5ac0ff",r:57.2}),ae().createElement("path",{d:"M356.5 94.5c-3.1 0-6.1.2-9.1.4C335 40.6 286.4 0 228.3 0c-15.3 0-29.9 2.8-43.4 8 0 15.3.1 32.9.2 40.4 15.6.1 45.8.2 59.1.2v57.8h-58.8v97.7h60.5c-1.7 4.3-4.3 10.7-5.4 13.2-11 26.5-38.3 41.3-66.6 36.2-26.9-4.9-46.9-27.8-48.4-55.9-.4-8.2-.2-16.5-.2-24.7V106h-20.7c-41.8 19.4-70.9 61.7-70.9 110.8 0 67.5 54.7 122.2 122.2 122.2h202c66.9-.7 120.8-55.1 120.8-122.2 0-67.5-54.7-122.3-122.2-122.3z",fill:"#5633d1"}))},Mn=function(e){return ae().createElement("svg",re({viewBox:"0 0 143 28",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{fill:"#424c5e"},ae().createElement("path",{d:"M6.6 18.5c-1.2 0-1.9-.7-1.9-2.1v-7h3.4V6.3H4.3l-.6-3H.8v14.2c0 2.8 1.3 4.1 3.8 4.1H8v-3.1zM17.3 6.3c-4.8 0-7.2 2.5-7.2 7.5 0 5.2 2.8 7.8 8.3 7.8 1.9 0 3.6-.1 4.9-.4v-3.1c-1.5.3-3.1.4-4.6.4-3.2 0-4.8-1.1-4.8-3.2h10.2c.1-.6.1-1.3.1-1.9.1-4.7-2.3-7.1-6.9-7.1zM14 12.6c.2-2.2 1.3-3.3 3.3-3.3 2.1 0 3.2 1.1 3.2 3.2v.1zM44.4 6.3c-1.7 0-3.3.7-4.9 2.1-.7-1.4-2-2.1-4-2.1-1.9 0-3.6.7-4.9 2.2l-.5-2.2h-3v15.3H31V11c1-1 2.1-1.5 3.2-1.5 1.4 0 2.1.9 2.1 2.6v9.6h3.9V11.1c1.1-1 2.2-1.5 3.3-1.5 1.5 0 2.3.8 2.3 2.6v9.6h3.9v-9.5c0-4.1-1.8-6-5.3-6zM59.8 6.3c-2.3 0-4.4.2-6.4.6V28h3.9v-7.1c1 .5 2.1.7 3.1.7 4.8 0 7.3-2.7 7.3-8-.1-4.9-2.7-7.3-7.9-7.3zm.5 12.1c-1.1 0-2.1-.3-3.1-.8v-8c.7-.1 1.6-.2 2.7-.2 2.5 0 3.8 1.4 3.8 4.1.1 3.3-1.1 4.9-3.4 4.9zM70.5.7h3.9v20.8h-3.9zM84.1 6.3c-1.7 0-3.5.2-5.6.7v3.1c2-.5 3.9-.7 5.6-.7 2 0 3 .7 3 2.1v1.2c-1-.2-2.1-.3-3.1-.3-4.4 0-6.6 1.5-6.6 4.6 0 3.2 1.9 4.8 5.6 4.8 1.6 0 3.1-.5 4.4-1.4l1.4 1.4H91V11.5c-.1-3.6-2.4-5.2-6.9-5.2zm-.6 12.5c-1.6 0-2.3-.7-2.3-2s.9-1.9 2.8-1.9c1.1 0 2.1.1 3.1.3v2.4c-1.2.8-2.4 1.2-3.6 1.2zM100 18.5c-1.2 0-1.9-.7-1.9-2.1v-7h3.4V6.3h-3.8l-.6-3h-2.9v14.2c0 2.8 1.3 4.1 3.8 4.1h3.4v-3.1zM110.7 6.3c-4.8 0-7.2 2.5-7.2 7.5 0 5.2 2.8 7.8 8.3 7.8 1.9 0 3.6-.1 4.9-.4v-3.1c-1.5.3-3.1.4-4.6.4-3.2 0-4.8-1.1-4.8-3.2h10.2c.1-.6.1-1.3.1-1.9.1-4.8-2.3-7.1-6.9-7.1zm-3.3 6.3c.2-2.2 1.3-3.3 3.3-3.3 2.1 0 3.2 1.1 3.2 3.2v.1zM120.6.7h3.9v20.8h-3.9zM138 6.2l-3.8 11-3.9-11h-4.1l5.9 15.4c-.8 1.7-2 2.9-3.7 3.7l1.9 2.6c2.5-1.2 4.3-3.2 5.4-5.9L142 6.2z"})))};const Nn=function(e){return ae().createElement("svg",re({viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{fill:"#2ec2fa"},ae().createElement("path",{d:"M123 0H36.7c-2.8 0-5.1 2.3-5.1 5.1v26.3H5.1c-2.8 0-5.1 2.3-5.1 5.1v86.3c0 2.8 2.3 5.1 5.1 5.1h86.3c2.8 0 5.1-2.3 5.1-5.1V96.7h26.3c2.8 0 5.1-2.3 5.1-5.1V5.3c.2-3-2.1-5.3-4.9-5.3zM86.3 117.7H10.4V41.8h21.2v49.6c0 2.8 2.3 5.1 5.1 5.1h49.6zm31.4-31.4H41.8V10.4h75.9z"}),ae().createElement("path",{d:"M74.5 49.7 91 33.1c2-2 5.1-2 7.1 0s2 5.1 0 7.1L81.6 56.8h8c2.8 0 5 2.3 5 5s-2.3 5-5 5H69.4c-2.8 0-5-2.3-5-5V41.7c0-2.8 2.3-5 5-5s5 2.3 5 5v8z"})))},Ln=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14"},ae().createElement("mask",{id:"mask0_1828_1726",style:{maskType:"alpha"},width:"14",height:"14",x:"0",y:"0",maskUnits:"userSpaceOnUse"},ae().createElement("path",{d:"M0 0H14V14H0z"})),ae().createElement("g",{mask:"url(#mask0_1828_1726)"},ae().createElement("path",{d:"M2.917 11.083h.83L9.45 5.381l-.831-.831-5.702 5.702v.831zM1.75 12.25V9.77l7.7-7.685a1.31 1.31 0 01.386-.248 1.206 1.206 0 01.897 0c.146.059.273.146.38.263l.802.817a.954.954 0 01.255.379 1.263 1.263 0 010 .882c-.054.141-.139.27-.255.387L4.229 12.25H1.75zm7.277-7.277L8.62 4.55l.831.831-.423-.408z"})))},In=function(e){return ae().createElement("svg",re({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},e),ae().createElement("g",{fill:"#5453fd"},ae().createElement("path",{d:"M50 0C35.7 0 24 11.7 24 26s11.7 26 26 26 26-11.7 26-26S64.3 0 50 0zM94.6 72.7c-.7-1.7-1.6-3.3-2.6-4.8-5.2-7.7-13.3-12.8-22.3-14.1-1.1-.1-2.4.1-3.3.8C61.6 58.2 55.9 60 50 60s-11.6-1.8-16.3-5.3c-.9-.7-2.2-1-3.3-.8-9.1 1.2-17.2 6.3-22.3 14.1-1 1.5-1.9 3.2-2.6 4.8-.3.7-.2 1.5.1 2.2.9 1.6 2 3.2 3.1 4.5 1.6 2.2 3.3 4.1 5.2 5.9 1.6 1.6 3.4 3.1 5.2 4.5 9 6.7 19.7 10.2 30.8 10.2s21.9-3.5 30.8-10.2c1.8-1.4 3.6-2.9 5.2-4.5 1.8-1.8 3.6-3.7 5.2-5.9 1.1-1.5 2.2-2.9 3.1-4.5.6-.9.7-1.6.4-2.3z"})))},Rn=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},ae().createElement("g",null,ae().createElement("path",{d:"M70.5 40.9c-11.3 0-21 6.3-26 15.6l-10.2-5.4c1.9-4.9 1.6-10.5-1-15.1l15.8-11.5c9 7.6 22.8 1.1 22.8-10.6C71.8 6.2 65.6 0 58 0 47.7 0 41.1 10.7 45.5 19.8L29.6 31.4C18.2 21.2 0 29.3 0 44.6c0 9.8 8 17.8 17.8 17.8 5.4 0 10.3-2.4 13.5-6.3l11 5.8c-.8 2.7-1.2 5.5-1.2 8.5 0 5.7 1.6 11.1 4.5 15.6.3-1.9.9-3.7 1.6-5.4 1.3-3 3.2-5.8 5.5-8.1l.9-.9c-.5-1.3-.9-2.6-1.1-3.9-.5-3.3-.1-6.8 1.2-9.9C55 54.6 57.2 52 60 50c3-2.1 6.5-3.2 10.3-3.2 9.9 0 18 8.1 18 18 0 2.3-.4 4.5-1.2 6.6l.9.9c2.5 2.3 4.4 5.1 5.7 8.2.8 1.9 1.4 3.8 1.7 5.8 2.9-4.6 4.6-10 4.6-15.8 0-16.4-13.2-29.6-29.5-29.6z"}),ae().createElement("path",{d:"M65.2 75.8c8 3.7 17.2-2.2 17.2-11 0-6.7-5.4-12.2-12.1-12.2-10.7 0-16.1 13-8.7 20.6-.1 0 1.5 1.6 3.6 2.6z"}),ae().createElement("path",{d:"M90 90.7c0 .7 0 1.4-.1 2-5.2 4.6-12 7.4-19.5 7.4s-14.3-2.8-19.5-7.4c-.1-.7-.1-1.3-.1-2 0-5.4 2.2-10.4 5.8-13.9 3.3 3.7 8.1 6.1 13.5 6.1 5.5 0 10.4-2.5 13.7-6.3C87.7 80 90 85.1 90 90.7z"})))},jn=function(e){return ae().createElement("svg",re({width:28,viewBox:"0 0 512 338",xmlns:"http://www.w3.org/2000/svg"},e),ae().createElement("g",{fill:"none"},ae().createElement("path",{d:"M357.74 291.15c-85.88 0-155.499-69.619-155.499-155.499 0-47.336 21.156-89.725 54.523-118.245C236.367 6.039 213.419.056 189.853.056c-75.901 0-137.65 61.75-137.65 137.65 0 3.896.167 7.81.497 11.709C20.377 166.672 0 200.199 0 237.457c0 55.056 44.792 99.848 99.848 99.848H359.06c49.056 0 89.963-35.561 98.296-82.259-26.981 22.537-61.712 36.104-99.616 36.104z",fill:"#a3b0c0"}),ae().createElement("g",{fill:"#6d7988"},ae().createElement("path",{d:"M331.409 125.365c-5.149-.234-10.317-.044-16.028-.044.77-25.252 10.37-45.087 30.462-58.479 21.943-14.626 43.882-16.65 65.44-7.828l16.061-27.998c-19.512-8.663-43.811-11.42-64.794-5.614-49.805 13.781-75.191 48.182-79.428 99.25-2.572 0-4.796.005-7.02-.001-2.429-.007-4.861-.117-7.285-.02-7.518.303-10.035 4.264-6.208 10.621 9.825 16.317 19.826 32.532 30.05 48.601 4.071 6.399 9.574 6.356 13.822-.012a2546.495 2546.495 0 0 0 30.891-47.406c4.201-6.609 1.861-10.715-5.963-11.07zM510.088 106.992a2709.272 2709.272 0 0 0-29.423-47.666c-4.464-7.066-9.893-7.168-14.476-.301a2828.15 2828.15 0 0 0-30.321 46.435c-4.742 7.417-2.366 11.519 6.522 11.784 4.93.147 9.868.026 15.186.026-1.078 26.367-11.36 46.663-32.694 59.894-20.076 12.451-39.981 14.628-59.477 7.832l-16.036 27.955c19.301 8.094 39.797 9.856 61.332 4.011 49.675-13.483 74.817-48.093 79.01-98.99 4.881 0 9.533.111 14.178-.025 7.778-.228 10.221-4.288 6.199-10.955z"}))))},Fn=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},ae().createElement("g",{clipPath:"url(#clip0_57_7571)"},ae().createElement("path",{stroke:"#F04438",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.333",d:"M7.999 5.334v2.667m0 2.666h.006m6.66-2.666A6.667 6.667 0 111.332 8a6.667 6.667 0 0113.333 0z"})),ae().createElement("defs",null,ae().createElement("clipPath",{id:"clip0_57_7571"},ae().createElement("path",{fill:"#fff",d:"M0 0H16V16H0z"}))))},zn=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},ae().createElement("g",null,ae().createElement("path",{d:"M67.5 94.1h-8.4l-1.2-16H42.1l-1.2 16h-8.4c-1.6 0-3 1.3-3 3 0 1.6 1.3 3 3 3h35c1.6 0 3-1.3 3-3s-1.3-3-3-3zM88.4 22h-7.2L59.9 43.3c.5 4.6-1 9.3-4.4 12.7-4.8 4.8-19.9 7.2-26.7 7.9-2 .2-3.5-1.5-3.3-3.3.8-6.7 3.1-21.8 7.9-26.7 3.5-3.5 8.2-5 12.7-4.4l7.5-7.6h-42c-1.7 0-3 1.4-3 3V69c0 1.7 1.4 3 3 3h76.7c1.7 0 3-1.4 3-3V25c.1-1.6-1.3-3-2.9-3z"}),ae().createElement("path",{d:"M57.8 37c.8-.8 22.3-22.2 30.6-30.5 1.4-1.5 1.4-3.9-.1-5.3C86.9-.3 84.5-.4 83 1L52.5 31.6c2 1.3 3.9 3.2 5.3 5.4zM51.2 38.2c-3.8-3.8-9.9-3.7-13.6 0-2.4 2.5-4.6 11.8-5.7 19.4 4.3-.6 16.5-2.8 19.6-6 3.5-3.8 3.4-9.7-.3-13.4z"})))};function Bn(e,t){if(null==e)return{};var n,r,o=Rt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Un=o(6942),Vn=o.n(Un),Wn={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hn=ae().createContext&&ae().createContext(Wn),Qn=function(){return Qn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Qn.apply(this,arguments)};function qn(e){return e&&e.map(function(e,t){return ae().createElement(e.tag,Qn({key:t},e.attr),qn(e.child))})}function $n(e){return function(t){return ae().createElement(Gn,Qn({attr:Qn({},e.attr)},t),qn(e.child))}}function Gn(e){var t=function(t){var n,r=e.attr,o=e.size,i=e.title,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["attr","size","title"]),s=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),ae().createElement("svg",Qn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:n,style:Qn(Qn({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&ae().createElement("title",null,i),e.children)};return void 0!==Hn?ae().createElement(Hn.Consumer,null,function(e){return t(e)}):t(Wn)}function Yn(e){return $n({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function Xn(e){return $n({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function Kn(e){return $n({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"}}]})(e)}function Zn(e){return $n({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"}}]})(e)}function Jn(e){return $n({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M192 127.338v257.324c0 17.818-21.543 26.741-34.142 14.142L29.196 270.142c-7.81-7.81-7.81-20.474 0-28.284l128.662-128.662c12.599-12.6 34.142-3.676 34.142 14.142z"}}]})(e)}function er(e){return $n({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"}}]})(e)}function tr(e){return $n({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M288.662 352H31.338c-17.818 0-26.741-21.543-14.142-34.142l128.662-128.662c7.81-7.81 20.474-7.81 28.284 0l128.662 128.662c12.6 12.599 3.676 34.142-14.142 34.142z"}}]})(e)}function nr(e){return $n({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M528 448H112c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm64-320c-26.5 0-48 21.5-48 48 0 7.1 1.6 13.7 4.4 19.8L476 239.2c-15.4 9.2-35.3 4-44.2-11.6L350.3 85C361 76.2 368 63 368 48c0-26.5-21.5-48-48-48s-48 21.5-48 48c0 15 7 28.2 17.7 37l-81.5 142.6c-8.9 15.6-28.9 20.8-44.2 11.6l-72.3-43.4c2.7-6 4.4-12.7 4.4-19.8 0-26.5-21.5-48-48-48S0 149.5 0 176s21.5 48 48 48c2.6 0 5.2-.4 7.7-.8L128 416h384l72.3-192.8c2.5.4 5.1.8 7.7.8 26.5 0 48-21.5 48-48s-21.5-48-48-48z"}}]})(e)}function rr(e){return $n({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function or(e){return $n({tag:"svg",attr:{viewBox:"0 0 192 512"},child:[{tag:"path",attr:{d:"M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z"}}]})(e)}function ir(e){return $n({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function ar(e){return $n({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M16 288c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h112v-64zm489-183L407.1 7c-4.5-4.5-10.6-7-17-7H384v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-153 31V0H152c-13.3 0-24 10.7-24 24v264h128v-65.2c0-14.3 17.3-21.4 27.4-11.3L379 308c6.6 6.7 6.6 17.4 0 24l-95.7 96.4c-10.1 10.1-27.4 3-27.4-11.3V352H128v136c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H376c-13.2 0-24-10.8-24-24z"}}]})(e)}function sr(e){return $n({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"}}]})(e)}function lr(e){return $n({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function cr(e){return $n({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(e)}function ur(e){return $n({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"}}]})(e)}function dr(e){return $n({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 32h192c13.255 0 24 10.745 24 24v160c0 13.255-10.745 24-24 24H296c-13.255 0-24-10.745-24-24V56c0-13.255 10.745-24 24-24zm-80 0H24C10.745 32 0 42.745 0 56v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V56c0-13.255-10.745-24-24-24zM0 296v160c0 13.255 10.745 24 24 24h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H24c-13.255 0-24 10.745-24 24zm296 184h192c13.255 0 24-10.745 24-24V296c0-13.255-10.745-24-24-24H296c-13.255 0-24 10.745-24 24v160c0 13.255 10.745 24 24 24z"}}]})(e)}function pr(e){return $n({tag:"svg",attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"}}]})(e)}function hr(e){return $n({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}var fr="APPLICATION_SET_PLATFORM",mr="APPLICATION_SET_PLAN",gr="APPLICATION_ERROR_CLEANUP",vr="APPLICATION_IS_VERIFIED",yr="APPLICATION_IS_VERIFYING",br="APPLICATION_LOGOUT",wr="APPLICATION_LOGOUT_SUCCESS",kr="APPLICATION_SIGNIN",Er="APPLICATION_SIGNIN_SUCCESS",Or="APPLICATION_SIGNIN_FAILED",Sr="APPLICATION_SIGNUP",xr="APPLICATION_SIGNUP_SUCCESS",_r="APPLICATION_SIGNUP_FAILED",Cr="APPLICATION_COUNTS_SUCCESS",Pr="APPLICATION_SET_FILTER_META",Tr="APPLICATION_RESET_FILTER_META",Ar="APPLICATION_LOAD_DEPENDENCIES",Dr="APPLICATION_LOAD_DEPENDENCIES_SUCCESS",Mr="APPLICATION_LOAD_TAGS",Nr="APPLICATION_LOAD_TAGS_SUCCESS",Lr="APPLICATION_LOAD_TYPES",Ir="APPLICATION_LOAD_TYPES_SUCCESS",Rr="APPLICATION_LOAD_PRICING_SUCCESS",jr="APPLICATION_LOAD_PRICING_FAILED",Fr="APPLICATION_LOAD_CATEGORIES",zr="APPLICATION_LOAD_CATEGORIES_SUCCESS",Br="APPLICATION_LOAD_CATEGORIES_FAILED",Ur="APPLICATION_SET_REDIRECT",Vr="APPLICATION_LOAD_CONDITIONS",Wr="APPLICATION_LOAD_CONDITIONS_SUCCESS",Hr="APPLICATION_LOAD_CONDITIONS_BY_TEMPLATE_SUCCESS",Qr="APPLICATION_SAVE_CONDITIONS",qr="APPLICATION_SET_CONDITIONS_FOR_TEMPLATE",$r="PROFILE_SYNC",Gr="PROFILE_IS_VERIFIED",Yr="PROFILE_LOAD",Xr="LOAD_FAVOURITES",Kr="LOAD_FAVOURITES_SUCCESS",Zr="FAVOURITES_FILTER",Jr="FAVOURITES_SET_PAGE",eo="FAVOURITES_STARRED",to="MY_RATINGS",no="LOAD_DOWNLOADS",ro="LOAD_DOWNLOADS_SUCCESS",oo="LOAD_DOWNLOADS_FAILED",io="DOWNLOADS_SET_PAGE",ao="LOAD_PURCHASED_ITEMS",so="LOAD_ALL_PURCHASED_ITEMS",lo="LOAD_PURCHASED_ITEMS_SUCCESS",co="LOAD_PURCHASED_ITEMS_FAILED",uo="PURCHASED_ITEMS_SET_PAGE",po="TEMPLATES_REQUESTED",ho="TEMPLATES_LOAD",fo="TEMPLATES_LOAD_SUCCESS",mo="TEMPLATES_LOAD_FAILED",go="TEMPLATES_SET_PAGE",vo="TEMPLATES_SET_FAVOURITE",yo="TEMPLATES_SET_RATING",bo="TEMPLATES_GET_TEMPLATE",wo="TEMPLATES_GET_TEMPLATE_SUCCESS",ko="TEMPLATES_GET_TEMPLATE_FAILED",Eo="TEMPLATES_FEATURED_TEMPLATES",Oo="TEMPLATES_FEATURED_TEMPLATES_SUCCESS",So="TEMPLATES_FEATURED_TEMPLATES_FAILED",xo="SAVED_TEMPLATES_LOAD",_o="SAVED_TEMPLATES_LOADED",Co="SAVED_TEMPLATES_LOAD_SUCCESS",Po="SAVED_TEMPLATES_SET_PAGE",To="SAVED_TEMPLATES_DELETE",Ao={REQUESTED:"CLOUDS_REQUESTED",LOAD:"CLOUDS_LOAD",LOAD_SUCCESS:"CLOUDS_LOAD_SUCCESS",LOAD_FAILED:"CLOUDS_LOAD_FAILED",STATUS_LOAD:"CLOUDS_STATUS_LOAD",STATUS_REQUEST:"CLOUDS_STATUS_REQUEST",STATUS_SUCCESS:"CLOUDS_STATUS_SUCCESS",STATUS_FAILED:"CLOUDS_STATUS_FAILED",SET_USAGES:"CLOUDS_SET_USAGES",SET_LIMIT:"CLOUDS_SET_LIMIT",SET_PAGE:"CLOUDS_SET_PAGE",SET_VIEW:"CLOUDS_SET_VIEW",DOWNLOAD:"CLOUDS_DOWNLOAD",DOWNLOAD_SUCCESS:"CLOUDS_DOWNLOAD_SUCCESS",COPY:"CLOUDS_COPY",COPY_SUCCESS:"CLOUDS_COPY_SUCCESS",MOVE:"CLOUDS_MOVE",MOVE_SUCCESS:"CLOUDS_MOVE_SUCCESS",DELETE:"CLOUDS_DELETE",DELETE_SUCCESS:"CLOUDS_DELETE_SUCCESS",PUSH:"CLOUDS_PUSH",CLEAR_PUSH2CLOUD:"CLEAR_PUSH2CLOUD",PUSHED:"CLOUDS_PUSHED",PUSH_SUCCESS:"CLOUDS_PUSH_SUCCESS",PUSH_FAILED:"CLOUDS_PUSH_FAILED",SEARCH:"CLOUDS_SEARCH",SEARCH_SUCCESS:"CLOUDS_SEARCH_SUCCESS",SEARCH_FAILED:"CLOUDS_SEARCH_FAILED"},Do={REQUESTED:"WORKSPACE_REQUESTED",LOAD:"WORKSPACE_LOAD",LOAD_SUCCESS:"WORKSPACE_LOAD_SUCCESS",LOAD_FAILED:"WORKSPACE_LOAD_FAILED",SET_VIEW:"WORKSPACE_SET_VIEW",LOAD_LISTS:"WORKSPACE_LOAD_LISTS",SET_LISTS:"WORKSPACE_SET_LISTS",CREATE:"WORKSPACE_CREATE",CREATE_SUCCESS:"WORKSPACE_CREATE_SUCCESS",SAVE:"WORKSPACE_SAVE",DELETE:"WORKSPACE_DELETE",DELETE_SUCCESS:"WORKSPACE_DELETE_SUCCESS",SET_PAGE:"WORKSPACE_SET_PAGE",SEARCH:"WORKSPACE_SEARCH",SEARCH_SUCCESS:"WORKSPACE_SEARCH_SUCCESS",SEARCH_FAILED:"WORKSPACE_SEARCH_FAILED"},Mo={REQUESTED:"SHARED_WORKSPACE_REQUESTED",LOAD:"SHARED_WORKSPACE_LOAD",LOAD_SUCCESS:"SHARED_WORKSPACE_LOAD_SUCCESS",LOAD_FAILED:"SHARED_WORKSPACE_LOAD_FAILED",SET_VIEW:"SHARED_WORKSPACE_SET_VIEW",LOAD_LISTS:"SHARED_WORKSPACE_LOAD_LISTS",SET_LISTS:"SHARED_WORKSPACE_SET_LISTS",SET_PAGE:"SHARED_WORKSPACE_SET_PAGE",SEARCH:"SHARED_WORKSPACE_SEARCH",SEARCH_SUCCESS:"SHARED_WORKSPACE_SEARCH_SUCCESS",SEARCH_FAILED:"SHARED_WORKSPACE_SEARCH_FAILED"},No={LOAD:"WORKSPACE_DETAILS_LOAD",REQUESTED:"WORKSPACE_DETAILS_REQUESTED",LOAD_FAILED:"WORKSPACE_DETAILS_LOAD_FAILED",LOAD_SUCCESS:"WORKSPACE_DETAILS_LOAD_SUCCESS",SET_VIEW:"WORKSPACE_DETAILS_SET_VIEW",SET:"WORKSPACE_DETAILS_SET",SAVE:"WORKSPACE_DETAILS_SAVE",DELETE:"WORKSPACE_DETAILS_DELETE",SET_PAGE:"WORKSPACE_DETAILS_SET_PAGE",SET_FILES:"WORKSPACE_DETAILS_SET_FILES",GET_FILES:"WORKSPACE_DETAILS_GET_FILES",GET_FILES_REQUESTED:"WORKSPACE_DETAILS_GET_FILES_REQUESTED",NO_FILES:"WORKSPACE_DETAILS_NO_FILES",ADD_FILE:"WORKSPACE_DETAILS_ADD_FILE",RESET_SEARCH:"WORKSPACE_DETAILS_RESET_SEARCH",SEARCH:"WORKSPACE_DETAILS_SEARCH",SEARCH_SUCCESS:"WORKSPACE_DETAILS_SEARCH_SUCCESS",SEARCH_FAILED:"WORKSPACE_DETAILS_SEARCH_FAILED"},Lo="FULL_SITE_IMPORT_CURRENT_STEP",Io="FULL_SITE_IMPORT_CUSTOMIZER_STEP",Ro="FULL_SITE_IMPORT_FSI_CLOSED",jo="FULL_SITE_IMPORT_SET_RESULTS",Fo="FULL_SITE_IMPORT_SET_FORMDATA",zo="FULL_SITE_IMPORT_SET_CACHE_DATA",Bo="FULL_SITE_IMPORT_RESET_FULL_SITE_IMPORT",Uo="FULL_SITE_IMPORT_UPDATE_PLUGIN_STATUS",Vo="FULL_SITE_IMPORT_SET_AVAILABLE_CREDIT",Wo="FULL_SITE_IMPORT_SHOW_AI_SIDEBAR",Ho="FULL_SITE_IMPORT_HIDE_AI_SIDEBAR",Qo="FULL_SITE_IMPORT_SHOW_FSI_MODAL",qo="FULL_SITE_IMPORT_HIDE_FSI_MODAL",$o="FULL_SITE_IMPORT_FETCH_PACK_IMPORT_INFO_REQUEST",Go="FULL_SITE_IMPORT_FETCH_PACK_IMPORT_INFO_SUCCESS",Yo="FULL_SITE_IMPORT_FETCH_PACK_IMPORT_INFO_FAILURE",Xo="FULL_SITE_IMPORT_FETCH_GOOGLE_FONTS_REQUEST",Ko="FULL_SITE_IMPORT_FETCH_GOOGLE_FONTS_SUCCESS",Zo="FULL_SITE_IMPORT_FETCH_GOOGLE_FONTS_FAILURE",Jo="FULL_SITE_IMPORT_RESET_PACK_INFO",ei=Ct(Ct(Ct(Ct(Ct(Ct(Ct({SET_SETTINGS:"SETTINGS_PAGE_SET_SETTINGS",SET_PLATFORM:"SETTINGS_PAGE_SET_PLATFORM",SET_COLORS:"SETTINGS_PAGE_SET_COLORS",SET_SELECTED_TYPOGRAPHY:"SETTINGS_PAGE_SET_SELECTED_TYPOGRAPHY"},"SET_COLORS","SETTINGS_PAGE_SET_COLORS"),"SET_SCREEN","SETTINGS_PAGE_SET_SCREEN"),"SET_CUSTOM_CSS","SETTINGS_PAGE_SET_CUSTOM_CSS"),"SET_LOGO_IMAGE","SETTINGS_PAGE_SET_LOGO_IMAGE"),"SET_LOGO_SIZE","SETTINGS_PAGE_SET_LOGO_SIZE"),"SET_SITE_TITLE","SETTINGS_PAGE_SET_SITE_TITLE"),"SET_SITE_TAGLINE","SETTINGS_PAGE_SET_SITE_TAGLINE");function ti(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function ni(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){ti(i,r,o,a,s,"next",e)}function s(e){ti(i,r,o,a,s,"throw",e)}a(void 0)})}}const ri=window.regeneratorRuntime;var oi=o.n(ri);const ii=window.wp.apiFetch;var ai=o.n(ii);const si=window.wp.url;var li=o(2505),ci=o.n(li);function ui(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return di(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?di(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var _n=0,r=function(){};return{s:r,n:function(){return _n>=e.length?{done:!0}:{done:!1,value:e[_n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pi=function(e){return new Promise(function(t,n){var r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach(function(t){e[t]&&(r[t]=e[t])}),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=function(){return t(!0)},r.onerror=function(){return n(new Error("Error loading asset."))},document.body.appendChild(r),("link"===r.nodeName.toLowerCase()||"script"===r.nodeName.toLowerCase()&&!r.src)&&t()})};function hi(){return fi.apply(this,arguments)}function fi(){return fi=ni(oi().mark(function e(){var t,n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,gi(document.location.href);case 1:if(t=e.sent){e.next=2;break}return e.abrupt("return");case 2:n=(new window.DOMParser).parseFromString(t,"text/html"),r=["wp-blocks-js-after","essential-blocks-blocks-localize-js-extra","elementor-editor-js-before"],o=Array.from(n.querySelectorAll('link[rel="stylesheet"],script')).filter(function(e){return e.id&&(r.includes(e.id)||!document.getElementById(e.id))}),i=ui(o),e.prev=3,i.s();case 4:if((a=i.n()).done){e.next=6;break}return s=a.value,e.next=5,pi(s);case 5:e.next=4;break;case 6:e.next=8;break;case 7:e.prev=7,l=e.catch(3),i.e(l);case 8:return e.prev=8,i.f(),e.finish(8);case 9:case"end":return e.stop()}},e,null,[[3,7,8,9]])})),fi.apply(this,arguments)}var mi,gi=function(){var e=ni(oi().mark(function e(t){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=function(){return i=ni(oi().mark(function e(t){var i,a,s;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,ai()({url:t,parse:!1,redirect:"manual"});case 1:return i=e.sent,e.abrupt("return",i.text());case 2:if(e.prev=2,s=e.catch(0),a=s.type,s.status,!("opaqueredirect"===a&&r<n)){e.next=3;break}return r++,e.abrupt("return",o(t));case 3:return e.abrupt("return",null);case 4:case"end":return e.stop()}},e,null,[[0,2]])})),i.apply(this,arguments)},o=function(e){return i.apply(this,arguments)},n=3,r=0,e.abrupt("return",o(t));case 1:case"end":return e.stop()}},e)}));return function(_x){return e.apply(this,arguments)}}();function vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vi(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var bi=window.templately,wi=bi.rest_args,ki=bi.log,Ei=void 0!==ki&&ki;wi&&(ai().use(ai().createNonceMiddleware(null==wi?void 0:wi.nonce)),ai().use(ai().createRootURLMiddleware(null==wi?void 0:wi.endpoint))),void 0===(null===(mi=window)||void 0===mi?void 0:mi.fetch)&&ai().setFetchHandler(function(e){var t=e.url,n=e.path,r=e.data,o=e.method;return ci()({url:t||n,method:o,data:r}).then(function(e){return null==e?void 0:e.data}).catch(function(e){return Promise.reject(e.response.data)})});var Oi=function(){var e=ni(oi().mark(function e(t,n){var r,o=arguments;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},e.next=1,Si(t,n,yi(yi({},r),{},{method:"GET"}));case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)}));return function(_x,t){return e.apply(this,arguments)}}(),Si=function(){var e=ni(oi().mark(function e(t,n){var r,o,i,a=arguments;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>2&&void 0!==a[2]?a[2]:{},o=a.length>3&&void 0!==a[3]&&a[3],e.prev=1,e.next=2,xi(t,n,r,o);case 2:case 5:return e.abrupt("return",e.sent);case 3:if(e.prev=3,"retry_again"!==(null==(i=e.catch(1))?void 0:i.code)){e.next=6;break}return e.next=4,hi();case 4:return e.next=5,xi(t,n,r,o);case 6:throw i;case 7:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}(),xi=function(){var e=ni(oi().mark(function e(t,n){var r,o,i,a,s,l=arguments;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>3&&void 0!==l[3]&&l[3],o={response:void 0,error:void 0},i=yi({path:t,method:"POST",headers:{"Content-Type":"application/json"}},l.length>2&&void 0!==l[2]?l[2]:{}),n&&"POST"===i.method&&(i.data=n),n&&"GET"===i.method&&(a=(0,si.addQueryArgs)(i.path,n),i.path=a),!r){e.next=2;break}return e.next=1,ai()(i);case 1:return e.abrupt("return",e.sent);case 2:return e.prev=2,e.next=3,ai()(i).then(function(e){return o=yi(yi({},o),{},{response:e})}).catch(function(e){return o=yi(yi({},o),{},{error:e})});case 3:e.next=5;break;case 4:e.prev=4,s=e.catch(2),o=yi(yi({},o),{},{error:s});case 5:return Ei&&console.log("Templately API Return: ",t,o),e.abrupt("return",o);case 6:case"end":return e.stop()}},e,null,[[2,4]])}));return function(t,n){return e.apply(this,arguments)}}();const _i=window.lodash;var Ci,Pi;function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ti(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Di=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"packs";return"blocks"==e?"sections":e},Mi=function(e){return String(Math.floor(Number(e)))===e},Ni=function(e){return null!==e&&"object"===ne(e)&&!Li(e)},Li=function(e){return null!==e&&"object"===ne(e)&&Array.isArray(e)},Ii=function(e,t){return t?e+"_"+t.toUpperCase():e},Ri=function(e,t,n,r){void 0===r&&(r=0);for(var o=(0,_i.toPath)(t);e&&r<o.length;)e=e[o[r++]];return void 0===e?n:e},ji=function(e,t,n){for(var r=(0,_i.clone)(e),o=r,i=0,a=(0,_i.toPath)(t);i<a.length-1;i++){var s=a[i],l=Ri(e,a.slice(0,i+1));if(l&&(Ni(l)||Array.isArray(l)))o=o[s]=(0,_i.clone)(l);else{var c=a[i+1];o=o[s]=Mi(c)&&Number(c)>=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)},Fi=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},zi=function(e){return/^[A-Za-z\s-]+$/.test(e=e||"")},Bi=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},Ui=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=[];return null!=e&&e.length>0&&"object"==ne(e)&&e.map(function(e){var a=r.length>0?Bi(e,r):Ai({},e),s=!1;o.indexOf(a[n])>-1&&(s=!0),i.push(Ai(Ai({},a),{},{value:a[n],label:a.name,shared:t,isDisabled:s}))}),i},Vi=function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=t.childNodes,r=n.length;r--;)if(1==n[r].nodeType)return!0;return!1},Wi=function(e,t){var n,r;if((null==t?void 0:t.length)>0)return null!==(n=null===(r=Me(e,"/"+t))||void 0===r?void 0:r.params)&&void 0!==n?n:void 0},Hi=function(e){return e.toLowerCase().replace(/\b[a-z]/g,function(e){return e.toUpperCase()})},Qi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lifetime",t="https://templately.com/checkout/",n={};return window.templately.dev_mode&&(t="https://templately.dev/checkout/"),"lifetime"===e&&(n=Ai(Ai({},n),{},{type:"one_time"})),n=Ai(Ai({},n),{},{utm_source:"plugin",utm_medium:"upgradePlan"}),(0,si.addQueryArgs)(t,n)},qi=function(e,t){var n="https://templately.com/"+t+"/";return window.templately.dev_mode&&(n="https://templately.dev/"+t+"/"),(n+=e)+"?utm_source=plugin&utm_medium=itemDetailsHeader"},$i=null!==(Ci=window.templately)&&void 0!==Ci&&Ci.log?window.console.log.bind(window.console):function(){},Gi=(null!==(Pi=window.templately)&&void 0!==Pi&&Pi.log&&window.console.trace.bind(window.console),function(e,t){var n,r,o,i,a,s="",l=!0;if(null==(null==t?void 0:t[e])&&"email"!=e)return{isValid:l=!0};switch(e){case"email":0!=(null===(n=t.email)||void 0===n||null===(n=n.trim())||void 0===n?void 0:n.length)&&Fi(t.email)||(l=!1,s=(0,Pt.__)("Please enter a valid email address.","templately"));break;case"api_key":0==(null===(r=t.api_key)||void 0===r||null===(r=r.trim())||void 0===r?void 0:r.length)&&(l=!1),s=(0,Pt.__)("Please provide a valid API Key.","templately");break;case"first_name":0==(null===(o=t.first_name)||void 0===o||null===(o=o.trim())||void 0===o?void 0:o.length)?(l=!1,s=(0,Pt.__)("First name cannot be empty.","templately")):zi(t.first_name)||(l=!1,s=(0,Pt.__)("The First Name may only contain letters, dashes and spaces.","templately"));break;case"last_name":0==(null===(i=t.last_name)||void 0===i||null===(i=i.trim())||void 0===i?void 0:i.length)?(l=!1,s=(0,Pt.__)("Last name cannot be empty.","templately")):zi(t.last_name)||(l=!1,s=(0,Pt.__)("The Last Name may only contain letters, dashes and spaces.","templately"));break;case"password":s=(0,Pt.__)("Password cannot be empty.","templately"),null!=t.password&&((a=t.password).length<8||!/[A-Z]/g.test(a)||!/[a-z]/g.test(a)||!/[0-9]/g.test(a)||/["\\]/g.test(a))&&(l=!1,s=(0,Pt.__)("Password must contain at least 8 characters, uppercase, lowercase and numbers.","templately"));break;case"confirm_password":null!=(null==t?void 0:t.confirm_password)&&t.password!==t.confirm_password&&(l=!1,s=(0,Pt.__)("Password not matched!","templately"))}return{title:(0,Pt.__)("Opps...!","templately"),content:s,isValid:l}}),Yi=o(8465),Xi=o.n(Yi),Ki=o(9644),Zi=o.n(Ki);const Ji=function(e){var t=e.header,n=e.className,r=void 0===n?"":n;return ae().createElement("div",{className:"templately-sweetalert-header ".concat(r)},ae().createElement("h3",null,t))},ea=function(e){var t=e.children;return ae().createElement("div",{className:"templately-sweetalert-body"},t)},ta=function(e){var t=e.icon,n=void 0===t?null:t,r=e.children,o=e.className,i=void 0===o?"":o,a=e.header,s=void 0===a?null:a,l=e.headerClass,c=void 0===l?"":l,u=e.hideHeader,d=void 0!==u&&u;return ae().createElement(ae().Fragment,null,n&&ae().createElement("span",{className:"templately-sweetalert-icon --shape-1"},n),ae().createElement("div",{className:"templately-sweetalert-container ".concat(i)},null!=s&&!d&&ae().createElement(Ji,{className:c,header:s}),ae().createElement(ea,null,r)))},na=function(e){var t=e.children,n=e.className,r=void 0===n?"":n;return ae().createElement("div",{className:"templately-row ".concat(r)},t)},ra=function(e){var t=e.wrapper,n=void 0!==t&&t,r=e.wrapperClass,o=void 0===r?"":r,i=e.children,a=e.className,s=void 0===a?"":a,l=e.column,c=void 0===l?null:l,u=Vn()(s,Ct({"templately-col":null==c},"templately-col-".concat(c),null!=c));return ae().createElement("div",{className:u},n&&ae().createElement("div",{className:o},i),!n&&i)},oa=function(e){var t=e.template,n="";return"lists"===t&&(n=ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"tph-col-4 small rounded"}),ae().createElement("div",{className:"tph-item small rounded"}),ae().createElement("div",{className:"tph-col-3 small rounded"}),ae().createElement("div",{className:"tph-col-7 small rounded"}))),"clouds_status"===t&&(n=ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"tph-col-10 medium"}),ae().createElement("div",{className:"tph-item small rounded"}),ae().createElement("div",{className:"tph-col-7 tiny"}))),"featuredItems"===t&&(n=ae().createElement("div",{className:"tph-row d-flex"},ae().createElement("div",{className:"tph-col-4 rounded",style:{height:"200px",margin:"0px 10px"}}),ae().createElement("div",{className:"tph-col-4 rounded",style:{height:"200px",margin:"0px 10px"}}),ae().createElement("div",{className:"tph-col-4 rounded",style:{height:"200px",margin:"0px 10px"}}))),ae().createElement("div",{className:"templately-ph-wrapper"},n)};var ia=["code","message","platform"];const aa=function(e){var t=e.code,n=e.message,r=e.platform,o=Bn(e,ia),i=tt();return(0,oe.useEffect)(function(){"invalid_api_key"!==t&&"is_signed_failed"!==t||(o.logout({isGloballySigned:o.isGloballySigned}),i(Rg("sign-in",{platform:r}),{replace:!0,state:{signed_in_failed:!0}}))},[t]),React.createElement("div",{className:"templately-error-wrapper"},React.createElement("div",{className:"templately-error"},React.createElement("p",null,React.createElement("strong",null,t,":")," ",n)))},sa=function(e){var t,n=e.className,r=pe(xt(),1)[0],o=pe((0,oe.useState)(null!==(t=null==r?void 0:r.get("q"))&&void 0!==t?t:""),2),i=o[0],a=o[1],s=pe((0,oe.useState)(!1),2),l=s[0],c=s[1],u=tt(),d=Je();(0,oe.useEffect)(function(){var e=(0,si.getQueryArgs)(d.search),t=e.path;i.length>=3&&!0===l&&(e.q=i,u(Rg(t,e),{replace:!0}),c(!1)),"reset"===l&&(u(Rg(t,e,["q"]),{replace:!0}),a(""),c(!1))},[l]);var p=Vn()("templately-search",n,{"search-active":null!==(null==r?void 0:r.get("q"))});return ae().createElement("div",{className:p},ae().createElement(da,{wrapper:!1,onKeyDown:function(e){return c(13===(null==e?void 0:e.keyCode))},value:i,onChange:function(e){return a(e.currentTarget.value)},placeholder:(0,Pt.__)("Type and hit enter...","templately")}),ae().createElement(ca,{className:"templately-search-button",onClick:function(){null==r.get("q")?c(!0):c("reset")}},null!=r.get("q")?ae().createElement(pr,null):ae().createElement(cr,null)))};var la=["label","onClick","className","children"];const ca=function(e){var t=e.label,n=void 0===t?"":t,r=e.onClick,o=void 0===r?function(e){}:r,i=e.className,a=void 0===i?"":i,s=e.children,l=Bn(e,la);return ae().createElement("button",re({},l,{className:"templately-button ".concat(a),onClick:function(e){return o(e)}}),n,s)};var ua=["wrapper","className"];const da=function(e){var t=e.wrapper,n=void 0===t||t,r=e.className,o=Bn(e,ua);return ae().createElement(ae().Fragment,null,n?ae().createElement("div",{className:r},ae().createElement("input",re({type:"text"},o))):ae().createElement("input",re({type:"text",className:r},o)))};var pa=["href","name","wrapper","children"];const ha=function(e){var t,n=e.href,r=e.name,o=e.wrapper,i=void 0!==o&&o,a=e.children,s=Bn(e,pa),l=ae().createElement(ae().Fragment,null,n&&(t=n,new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t))?ae().createElement("a",{target:"_blank",rel:"nofollow",href:n},r):r,a);return ae().createElement("label",s,i?ae().createElement("span",null,l):l)};var fa=window.templately.loadingImage;const ma=function(e){var t=e.style,n=void 0===t?"logo":t,r=e.template,o=void 0===r?null:r,i=e.text,a=void 0===i?"":i,s=e.description,l=void 0===s?"":s,c=e.className,u=void 0===c?"":c,d=Vn()("templately-preloader",u,"templately-preloader-".concat(n));return ae().createElement("div",{className:d},"logo"===n&&ae().createElement("img",{src:fa,alt:"Templately"}),"placeholder"===n&&ae().createElement(oa,{template:o}),a&&ae().createElement("div",{className:"tp-waviy"},Array.from(a).map(function(e,t){return ae().createElement("span",{key:t,style:Ct({},"--i",t+1)},e)})),l&&ae().createElement("p",{className:"tp-description"},l))};function ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ga(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ya=Zi()(Xi()),ba=function(){var e,t,n,r,o,i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l={target:"#templately-wrapper",heightAuto:!1,showConfirmButton:!1,allowOutsideClick:!0,showCloseButton:!1,loaderHtml:ae().createElement(ma,null)},c={container:"templately-sweetalert ",popup:"templately-popup ",loader:"templately-sweetalert-loader ",closeButton:"templately-sweetalert-close ",htmlContainer:"templately-sweetalert-html "};return null!==(e=a=a!={}?va(va({},l),a):l)&&void 0!==e&&e.customClass&&(c.container+=null!==(t=a.customClass.container)&&void 0!==t?t:"",c.popup+=null!==(n=a.customClass.popup)&&void 0!==n?n:"",c.loader+=null!==(r=a.customClass.loader)&&void 0!==r?r:"",c.closeButton+=null!==(o=a.customClass.closeButton)&&void 0!==o?o:"",c.htmlContainer+=null!==(i=a.customClass.htmlContainer)&&void 0!==i?i:""),a.customClass=c,s&&(a.html=ae().createElement(It,{store:hE},a.html)),ya.fire(a).then(function(e){var t,n;return e.isDismissed?((null===(n=a)||void 0===n?void 0:n.dispatch)&&a.dispatch((0,Pm.closeModal)()),e):(null!==(t=a)&&void 0!==t&&t.onConfirm&&a.onConfirm(e),e)}).catch(function(e){var t;return null!==(t=a)&&void 0!==t&&t.onError&&a.onError(e),e})},wa=function(e,t){var n={icon:"success",timer:1500,html:null},r=null;if(!0===(null==t?void 0:t[e.key])){var o,i=va({},e.success);t.message&&(i.content=t.message),r=null!==(o=null==i?void 0:i.args)&&void 0!==o?o:null,n=va(va({},n),{},{html:ae().createElement(EO,re({},i,{contentArgs:null==t?void 0:t.contentArgs}))})}else if(!1===(null==t?void 0:t[e.key])){var a,s=va({},e.error);t.message&&(s.content=t.message),r=null!==(a=null==s?void 0:s.args)&&void 0!==a?a:null,n=va(va({},n),{},{icon:"error",html:ae().createElement(EO,re({},s,{contentArgs:null==t?void 0:t.contentArgs}))})}null!=r&&(n=va(va({},n),r)),null!=n.html&&ba(n)},ka=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=ya.getCloseButton();e?(t.classList.add("is-disabled"),t.setAttribute("disabled",!0)):(t.removeAttribute("disabled"),t.classList.remove("is-disabled"))};function Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Oa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ea(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sa(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var xa="function"==typeof Symbol&&Symbol.observable||"@@observable",_a=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ca={INIT:"@@redux/INIT"+_a(),REPLACE:"@@redux/REPLACE"+_a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_a()}};function Pa(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Sa(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Sa(1));return n(Pa)(e,t)}if("function"!=typeof e)throw new Error(Sa(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(Sa(3));return i}function d(e){if("function"!=typeof e)throw new Error(Sa(4));if(l)throw new Error(Sa(5));var t=!0;return c(),s.push(e),function(){if(t){if(l)throw new Error(Sa(6));t=!1,c();var n=s.indexOf(e);s.splice(n,1),a=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Sa(7));if(void 0===e.type)throw new Error(Sa(8));if(l)throw new Error(Sa(9));try{l=!0,i=o(i,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:Ca.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Sa(10));o=e,p({type:Ca.REPLACE})}})[xa]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Sa(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[xa]=function(){return this},e},r}function Ta(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,a=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:Ca.INIT}))throw new Error(Sa(12));if(void 0===n(void 0,{type:Ca.PROBE_UNKNOWN_ACTION()}))throw new Error(Sa(13))})}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},s=0;s<a.length;s++){var l=a[s],c=n[l],u=e[l],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(Sa(14));o[l]=d,r=r||d!==u}return(r=r||a.length!==Object.keys(e).length)?o:e}}function Aa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function Da(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||de(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ma,Na,La,Ia,Ra=["type"];function ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var za={isLoading:!0,items:[],error:null},Ba={dependencies:{include:[],exclude:[]},tags:[],results:{},doQuery:!1,prevQuery:!1},Ua={platform:"elementor",has_elementor:null!==(Ma=Boolean(window.templately.has_elementor))&&void 0!==Ma&&Ma,has_elementor_pro:null!==(Na=Boolean(window.templately.has_elementor_pro))&&void 0!==Na&&Na,current_screen:null!==(La=window.templately.current_screen)&&void 0!==La?La:"templately",ui_theme:null!==(Ia=window.templately.theme)&&void 0!==Ia?Ia:"light",plan:"all",categories:{isLoading:!0,lists:[]},templateTypes:{isLoading:!0,lists:[]},dependencies:{},tags:[],pricing:{isLoading:!0,error:null,data:[]},error:null,filter:Ba,counts:null,featured:za,redirect:null,fullSiteImport:{currentStep:1,results:null,aiSidebarContext:{id:null,show:!1,content:{}},fsiModalContext:{show:!1,aiTemplates:null},packInfo:{data:null,loading:!1,error:null},googleFonts:{data:null,loading:!1,error:null}}};var Va=["type","current_page","total_page","platform","data","meta"],Wa=["meta"];function Ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var qa=window.templately.is_signed.user,$a=null!=qa?qa:{},Ga=$a.meta,Ya=void 0===Ga?null:Ga,Xa=Bn($a,["meta"]),Ka={isLoading:!1,syncing:!1,error:null,prevData:null,favourites:{isLoading:!0,currentPage:1,totalPage:1,type:"all",plan:"all"},downloads:{isLoading:!0},purchasedItems:{isLoading:!0,all:null},data:null};Object.keys(Xa).length>0&&(Ka=Qa(Qa({},Ka),{},{data:Xa})),null!=Ya&&(Ka=Qa(Qa({},Ka),Ya));var Za=["search"],Ja=["type"],es=["type"],ts=["type"];function ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ns(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ns(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var os={isLoading:!0,limit:0,usage:0,error:null},is={status:os,isLoading:!0,view:"list",error:null,items:{},search:{},push2cloud:{isLoading:!1}};var as=["type"];function ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ls(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ss(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ss(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cs={isLoading:!0,currentPage:1,totalPage:1,error:null,view:"grid",lists:[],search:{keyword:"",context:"",data:[]}};function us(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ds(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?us(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):us(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ps={isLoading:!0,currentPage:1,totalPage:1,view:"list",error:null,lists:[],search:{keyword:"",context:"",data:[]}};var hs=["type"];function fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fs(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gs={isLoading:!1,keyword:"",context:"",data:{currentPage:1,totalPage:1,1:[]}},vs={isLoading:!0,isFilesLoading:!0,view:"list",error:null,search:gs};var ys=["type","platform","currentPage","totalPage","data"];function bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ws(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bs(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ks={isLoading:!0,elementor:{currentPage:1,totalPage:1}};var Es=["type"];function Os(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Os(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Os(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xs={platform:"elementor",isLoading:!1,conditions:[],conditionsByTemplate:{},conditionsForSave:{}};var _s,Cs,Ps,Ts,As=["type"];function Ds(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ms(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ds(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ds(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ns=(0,_i.cloneDeep)(null!==(_s=null===(Cs=window.templately)||void 0===Cs?void 0:Cs.settings)&&void 0!==_s?_s:{}),Ls={settings:Ns,platform:(null==Ns?void 0:Ns.imported_platform)||(null!=Ns&&Ns.has_elementor?"elementor":"gutenberg"),logoImage:null!==(Ps=null==Ns?void 0:Ns.site_logo)&&void 0!==Ps?Ps:null,customCSS:null!==(Ts=null==Ns?void 0:Ns.customCSS)&&void 0!==Ts?Ts:null},Is=["type","plan","platform"],Rs=["itemType","key"],js=["itemType","key"];function Fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fs(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bs={isLoading:!0};const Us=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bs,n=arguments.length>1?arguments[1]:void 0,r=n.type,o=n.plan,i=n.platform,a=Bn(n,Is),s=null!==a.search;switch(r){case Ii(po,e):return t=ji(t,[o,i],Ri(t,[o,i],{})),ji(t,["error"],null);case Ii(ho,e):return zs(zs({},t),{},{isLoading:!0});case Ii(go,e):var l=[o,i,"currentPage"];return a.filtering&&(l=[o,i,"filteredResults","currentPage"]),ji(t,l,a.page);case Ii(fo,e):if(t=zs(zs({},t),{},{isLoading:!1}),null!=a&&a.currentPage){var c=[o,i,"currentPage"];a.isFilterableQuery&&(c=[o,i,"filteredResults","currentPage"]),s&&(c=[o,i,"search","currentPage"]),t=ji(t,c,a.currentPage)}if(null!=a&&a.totalPage){var u=[o,i,"totalPage"];a.isFilterableQuery&&(u=[o,i,"filteredResults","totalPage"]),s&&(u=[o,i,"search","totalPage"]),t=ji(t,u,a.totalPage)}var d=[o,i,a.currentPage];return a.isFilterableQuery&&(d=[o,i,"filteredResults",a.currentPage]),s&&(d=[o,i,"search",a.currentPage]),ji(t,d,a.data);case Ii(mo,e):return zs(zs({},t),{},{isLoading:!1,error:null==a?void 0:a.error});case Ii(bo,e):return ji(t,[i,"itemsDetails","isLoading"],!0);case Ii(wo,e):var p=a.itemType,h=(a.key,Bn(a,Rs));return t=ji(t,[i,"itemsDetails","isLoading"],!1),ji(t,[i,"itemsDetails",h.slug],zs(zs({},h),{},{type:p}));case Ii(ko,e):var f=a.itemType,m=(a.key,Bn(a,js));return t=ji(t,[i,"itemsDetails","isLoading"],!1),ji(t,[i,"itemsDetails","error"],zs(zs({},m),{},{type:f}))}return t}},Vs={profile:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ka,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.current_page,o=void 0===r?1:r,i=t.total_page,a=void 0===i?1:i,s=t.platform,l=t.data,c=void 0===l?[]:l,u=t.meta,d=void 0===u?null:u,p=Bn(t,Va);switch(n){case $r:return Qa(Qa({},e),{},{syncing:!0});case"APPLICATION_IS_SIGNED":case Sr:case kr:return Qa(Qa({},e),{},{isLoading:!0,error:null});case gr:return Qa(Qa({},e),{},{isLoading:!1,error:null,profile:Qa(Qa({},e.profile),{},{error:null})});case xr:case Er:var h=null!=d?Qa(Qa({},e),d):e;return Qa(Qa({},h),{},{isLoading:!1,syncing:!1,data:p,prevData:null,error:null});case yr:return Qa(Qa({},e),{},{isVerifying:!0});case vr:var f=Qa(Qa({},e),{},{isVerifying:!1,data:Qa(Qa({},e.data),{},{is_verified:null==p?void 0:p.is_verified})});return Qa(Qa({},f),{},{isLoading:!1,syncing:!1,prevData:null,error:null});case wr:var m=Qa(Qa({},e),{},{data:null,is_globally_signed:!(null!=p&&p.isGloballySigned)});if(void 0!==(null==p?void 0:p.global_user)){var g=null==p?void 0:p.global_user,v=g.meta,y=Bn(g,Wa);m=Qa(Qa({},m),{},{data:y},v)}return null!=p&&p.linking&&(m=Qa(Qa({},m),{},{prevData:e.data})),null!=p&&p.trying_logout&&(m=Qa(Qa({},m),{},{data:null,error:null})),m;case _r:case Or:return Qa(Qa({},e),{},{isLoading:!1,data:null,error:p});case Zr:var b=p.filter;return Qa(Qa({},e),{},{favourites:Qa(Qa({},e.favourites),{},Ct({},"".concat(b),c))});case uo:case io:case Jr:var w=p.page,k=p.states;return k.splice(0,1),w&&(e=ji(e,[].concat(Da(k),["currentPage"]),w)),e;case Xr:var E=Qa(Qa({},e.favourites),{},{isLoading:!0,error:null});return Qa(Qa({},e),{},{favourites:E});case Kr:var O=p.plan,S=p.itemType,x=Qa(Qa({},e.favourites),{},{isLoading:!1});return e=Qa(Qa({},e),{},{favourites:x}),o&&(e=ji(e,["favourites",O,s,S,"currentPage"],o)),a&&(e=ji(e,["favourites",O,s,S,"totalPage"],a)),c&&(e=ji(e,["favourites",O,s,S,o],c)),e;case no:var _=Qa(Qa({},e.downloads),{},{isLoading:!0,error:null});return Qa(Qa({},e),{},{downloads:_});case ro:var C=Qa(Qa({},e.downloads),{},{isLoading:!1,error:null});return C=ji(C,"currentPage",o),C=ji(C,"totalPage",a),C=ji(C,o,c),Qa(Qa({},e),{},{downloads:C});case oo:var P=Qa(Qa({},e.downloads),{},{isLoading:!1,error:null});return P=ji(P,"error",c),Qa(Qa({},e),{},{downloads:P});case ao:var T=Qa(Qa({},e.purchasedItems),{},{isLoading:!0,error:null});return Qa(Qa({},e),{},{purchasedItems:T});case lo:var A=Qa(Qa({},e.purchasedItems),{},{isLoading:!1,error:null});return A=ji(A,"currentPage",o),A=ji(A,"totalPage",a),A=ji(A,o,c),Qa(Qa({},e),{},{purchasedItems:A});case so:var D=Qa(Qa({},e.purchasedItems),{},{all:null,isLoading:!1,error:null});return D=ji(D,"all",c),Qa(Qa({},e),{},{purchasedItems:D});case co:var M=Qa(Qa({},e.purchasedItems),{},{isLoading:!1,error:null});return M=ji(M,"error",c),Qa(Qa({},e),{},{purchasedItems:M});case eo:var N=Qa({},p.starred);return Qa(Qa({},e),{},{starred:N});case to:var L=Qa({},p.reviews);return Qa(Qa({},e),{},{reviews:L})}return e},conditions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xs,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=Bn(t,Es);switch(n){case fr:return Ss(Ss({},e),{},{platform:r.platform});case Vr:return Ss(Ss({},e),{},{isLoading:!0});case Wr:return Ss(Ss({},e),{},{isLoading:!1,conditions:r});case Hr:return Ss(Ss({},e),{},{isLoading:!1,conditionsByTemplate:Ss(Ss({},e.conditionsByTemplate),{},Ct({},r.id,r.data))});case qr:return Ss(Ss({},e),{},{isLoading:!1,conditionsForSave:null!=r?r:{}})}return e},general:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ua,n=arguments.length>1?arguments[1]:void 0,r=n.type,o=Bn(n,Ra);switch(r){case Uo:return Fa(Fa({},t),{},{has_elementor:o.has_elementor,has_elementor_pro:o.has_elementor_pro});case Lo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{currentStep:o.step})});case Io:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{customizerStep:o.step})});case Ro:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{fsiClosed:o.payload})});case jo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{results:o.payload})});case Fo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{formData:o.payload})});case zo:return t=ji(t,["fullSiteImport","cache_data","isLoading"],!1),ji(t,["fullSiteImport","cache_data",o.payload.type],o.payload.value);case"FULL_SITE_IMPORT_RESET_CACHE_DATA":return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{cache_data:null})});case Bo:return Fa(Fa({},t),{},{fullSiteImport:{}});case"FULL_SITE_IMPORT_SET_PROCESS_ID":return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{processId:o.payload})});case Vo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{availableCredit:o.payload})});case"FULL_SITE_IMPORT_SET_AI_PAGE_IDS":return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{AIPageIDs:o.payload})});case"FULL_SITE_IMPORT_SET_AI_SIDEBAR_CONTEXT":return ji(t,["fullSiteImport","aiSidebarContext"],Fa(Fa({},t.fullSiteImport.aiSidebarContext),o.payload));case Wo:case Ho:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{aiSidebarContext:o.payload})});case Qo:case qo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{fsiModalContext:o.payload})});case $o:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{packInfo:Fa(Fa({},t.fullSiteImport.packInfo),{},{loading:!0,error:null})})});case Go:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{packInfo:{data:o.payload,loading:!1,error:null}})});case Yo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{packInfo:{data:null,loading:!1,error:o.payload}})});case Xo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{googleFonts:Fa(Fa({},t.fullSiteImport.googleFonts),{},{loading:!0,error:null})})});case Ko:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{googleFonts:{data:o.payload,loading:!1,error:null}})});case Zo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{googleFonts:{data:null,loading:!1,error:o.payload}})});case Jo:return Fa(Fa({},t),{},{fullSiteImport:Fa(Fa({},t.fullSiteImport),{},{packInfo:{data:null,loading:!1,error:null}})});case Ur:return Fa(Fa({},t),{},{redirect:Fa({},o)});case fr:return Fa(Fa({},t),{},{platform:o.platform});case mr:return Fa(Fa({},t),{},{plan:o.plan});case"APPLICATION_META_REQUESTED":return Fa(Fa({},t),{},{isLoading:!0,error:null});case"APPLICATION_META_REQUEST_FAILED":return Fa(Fa({},t),{},{error:Fa(Fa({},t.error),o.error)});case Pr:return t=Fa({},t),ji(t,["filter",o.key],o.data);case Tr:return ji(t,["filter"],Ba);case Dr:t=Fa(Fa({},t),{},{isLoading:!1});var i=o.dependencies,a=i.elementor,s=void 0===a?[]:a,l=i.gutenberg,c=void 0===l?[]:l,u=i.unknown,d=void 0===u?[]:u;return ji(t,["dependencies"],{elementor:[].concat(Da(s),Da(d)),gutenberg:[].concat(Da(c),Da(d))});case Nr:return t=Fa(Fa({},t),{},{isLoading:!1}),ji(t,["tags"],o.tags);case Lr:return Fa(Fa({},t),{},{templateTypes:{isLoading:!0,lists:[]}});case Ir:return t=Fa(Fa({},t),{},{templateTypes:{isLoading:!1}}),ji(t,["templateTypes","lists"],o.types);case"APPLICATION_LOAD_TYPES_FAILED":return t=ji(t,["templateTypes","isLoading"],!1),ji(t,["error","templateTypes"],o.error);case"APPLICATION_LOAD_PRICING":return t=ji(t,["pricing","isLoading"],!0),ji(t,["pricing","error"],null);case Rr:return t=ji(t,["pricing","isLoading"],!1),t=ji(t,["pricing","data"],null!==(e=null==o?void 0:o.data)&&void 0!==e?e:[]),ji(t,["pricing","error"],null);case jr:return t=ji(t,["pricing","isLoading"],!1),t=ji(t,["pricing","data"],[]),ji(t,["pricing","error"],null==o?void 0:o.error);case Fr:return Fa(Fa({},t),{},{categories:{isLoading:!0,lists:[]}});case zr:return t=ji(t,["categories","isLoading"],!1),ji(t,["categories","lists"],o.categories);case Br:return t=ji(t,["categories","isLoading"],!1),ji(t,["error","categories"],o.error);case Cr:return Fa(Fa({},t),{},{counts:Fa({},o)});case Eo:return Fa(Fa({},t),{},{featured:Fa(Fa({},za),{},{isLoading:!0})});case Oo:return Fa(Fa({},t),{},{featured:{isLoading:!1,items:n.items}});case So:return Fa(Fa({},t),{},{featured:{isLoading:!1,items:[],error:n.error}})}return t},settingsPage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ls,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=Bn(t,As);switch(n){case ei.SET_PLATFORM:return Ms(Ms({},e),{},{platform:r.platform});case ei.SET_COLORS:return ji(e,[e.platform,"colors"],r.colors);case ei.SET_SELECTED_TYPOGRAPHY:return ji(e,[e.platform,"selectedTypography"],r.typography);case ei.SET_SCREEN:return ji(e,[e.platform,"screen"],r.screen);case ei.SET_CUSTOM_CSS:return ji(e,["customCSS"],r.customCSS);case ei.SET_LOGO_IMAGE:return ji(e,["logoImage"],r.logoImage);case ei.SET_SITE_TITLE:return Ms(Ms({},e),{},{siteTitle:r.siteTitle});case ei.SET_SITE_TAGLINE:return Ms(Ms({},e),{},{siteTagline:r.siteTagline})}return e},savedTemplates:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ks,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.platform,o=void 0===r?"elementor":r,i=t.currentPage,a=t.totalPage,s=t.data,l=Bn(t,ys);switch(n){case xo:return ws(ws({},e),{},{isLoading:!0});case _o:return ws(ws({},e),{},{isLoading:!1});case Po:return ji(e,[o,"currentPage"],l.page);case Co:return e=ws(ws({},e),{},{isLoading:!1}),i&&(e=ji(e,[o,"currentPage"],i)),a&&(e=ji(e,[o,"totalPage"],a)),s&&(e=ji(e,[o,i],s)),e}return e},clouds:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:is,t=arguments.length>1?arguments[1]:void 0,n=t.search,r=Bn(t,Za),o=null===n?"items":"search";switch(r.type){case Ao.PUSH:return rs(rs({},e),{},{push2cloud:{isLoading:!0}});case Ao.CLEAR_PUSH2CLOUD:return rs(rs({},e),{},{push2cloud:{isLoading:!1}});case Ao.PUSH_SUCCESS:r.type;var i=Bn(r,Ja);return rs(rs({},e),{},{push2cloud:rs({isLoading:!1},i)});case Ao.PUSH_FAILED:r.type;var a=Bn(r,es);return rs(rs({},e),{},{push2cloud:rs({isLoading:!1},a)});case Ao.SET_VIEW:return rs(rs({},e),{},{view:r.view});case Ao.SET_PAGE:return null!=r&&r.page&&(e=ji(e,[o,r.platform,"currentPage"],r.page)),e;case Ao.LOAD:case Ao.REQUESTED:return rs(rs({},e),{},{isLoading:!0,error:null});case Ao.LOAD_SUCCESS:return e=rs(rs({},e),{},{isLoading:!1,push2cloud:{isLoading:null},error:null}),null!=r&&r.currentPage&&(e=ji(e,[o,r.platform,"currentPage"],r.currentPage)),null!=r&&r.totalPage&&(e=ji(e,[o,r.platform,"totalPage"],r.totalPage)),null!=r&&r.data&&(e=ji(e,[o,r.platform,r.currentPage],r.data)),e;case Ao.LOAD_FAILED:r.type;var s=Bn(r,ts);return rs(rs({},e),{},{error:s,isLoading:!1});case Ao.STATUS_REQUEST:return rs(rs({},e),{},{status:rs(rs({},os),{},{isLoading:!0,error:null})});case Ao.STATUS_SUCCESS:return rs(rs({},e),{},{status:rs(rs({},os),{},{usage:r.usages,limit:r.limit,isLoading:!1,error:null})});case Ao.STATUS_FAILED:return rs(rs({},e),{},{status:rs(rs({},os),{},{isLoading:!1,error:r.error})});case Ao.SEARCH:return rs(rs({},e),{},{search:rs(rs({},e.search),{},{isLoading:!0,context:null==r?void 0:r.context,keyword:null==r?void 0:r.search})});case Ao.SEARCH_SUCCESS:return e=rs(rs({},e),{},{search:rs(rs({},e.search),{},{isLoading:!1})}),e=ji(e,["search","context"],r.context),ji(e,["search","data"],r.data)}return e},workspaces:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cs,n=arguments.length>1?arguments[1]:void 0,r=n.type,o=Bn(n,as);switch(r){case Do.SET_VIEW:return ls(ls({},t),{},{view:o.view});case Do.LOAD:case Do.LOAD_LISTS:return ls(ls({},t),{},{isLoading:!0});case Do.SET_LISTS:return ls(ls({},t),{},{isLoading:!1,lists:o.payload});case Do.SET_PAGE:return ls(ls({},t),{},{currentPage:o.page});case Do.DELETE_SUCCESS:if((t=ls({},t)).hasOwnProperty(o.page)){var i=Da(t[o.page]).filter(function(e){return e.id!=o.id});t[o.page]=i}return t;case Do.CREATE_SUCCESS:var a=(t=ls(ls({},t),{},{isLoading:!1})).currentPage;if(t.hasOwnProperty(a)){var s=[];s=(e=s=[ls({},o)].concat(Da(t[a])),e.reduce(function(e,t,n){var r=Math.floor(n/11)+1;return(e[r]||(e[r]=[])).push(t),e},[]))[1],t=ji(t,[a],s)}else t=ji(t,[a],[ls({},o)]);return t;case Do.LOAD_SUCCESS:return t=ls(ls({},t),{},{isLoading:!1,currentPage:o.currentPage,error:null}),o.totalPage&&(t=ls(ls({},t),{},{totalPage:o.totalPage})),ji(t,[o.currentPage],o.data);case Do.LOAD_FAILED:return ls(ls({},t),{},{error:o.error,isLoading:!1});case Do.SEARCH:return ls(ls({},t),{},{search:ls(ls({},t.search),{},{isLoading:!0,context:null==o?void 0:o.context,keyword:null==o?void 0:o.search})});case Do.SEARCH_SUCCESS:return t=ls(ls({},t),{},{search:ls(ls({},t.search),{},{isLoading:!1})}),t=ji(t,["search","context"],o.context),ji(t,["search","data"],o.data)}return t},sharedWorkspaces:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ps,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Mo.SET_VIEW:return ds(ds({},e),{},{view:t.view});case Mo.LOAD:case Mo.LOAD_LISTS:return ds(ds({},e),{},{isLoading:!0});case Mo.SET_LISTS:return ds(ds({},e),{},{isLoading:!1,lists:t.payload});case Mo.LOAD_SUCCESS:return e=ds(ds({},e),{},{isLoading:!1,currentPage:t.currentPage}),t.totalPage&&(e=ds(ds({},e),{},{totalPage:t.totalPage})),ji(e,[t.currentPage],t.data);case Mo.SEARCH:return ds(ds({},e),{},{search:ds(ds({},e.search),{},{isLoading:!0,context:null==t?void 0:t.context,keyword:null==t?void 0:t.search})});case Mo.SEARCH_SUCCESS:return e=ds(ds({},e),{},{search:ds(ds({},e.search),{},{isLoading:!1})}),e=ji(e,["search","context"],t.context),ji(e,["search","data"],t.data)}return e},workspaceDetails:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vs,n=arguments.length>1?arguments[1]:void 0,r=n.type,o=Bn(n,hs);switch(r){case No.SET_VIEW:return ms(ms({},t),{},{view:o.view});case No.REQUESTED:return ms(ms({},t),{},{error:null});case No.LOAD:return ms(ms({},t),{},{isLoading:!0,isFilesLoading:!0,error:null});case No.SET:return ms(ms({},t),{},Ct({isLoading:!1,isFilesLoading:!0},o.slug,o));case No.DELETE:return null!==(e=t=ms({},t))&&void 0!==e&&e[o.slug]&&delete t[o.slug],t;case No.SET_PAGE:return t=ms(ms({},t),{},{isFilesLoading:!0}),null!=o&&o.page&&(t=ji(t,[o.platform,o.slug,"currentPage"],o.page)),t;case No.LOAD_SUCCESS:return delete o.files,delete o.platform,delete o.args,ms(ms({},t),{},Ct({isLoading:!1},o.slug,o));case No.LOAD_FAILED:return ms(ms({},t),{},{error:o,isLoading:!1,isFilesLoading:!1});case No.GET_FILES_REQUESTED:return ms(ms({},t),{},{isFilesLoading:!0});case No.SET_FILES:return t=ms(ms({},t),{},{isLoading:!1,isFilesLoading:!1}),null!=o&&o.currentPage&&(t=ji(t,[o.platform,o.slug,"currentPage"],o.currentPage)),null!=o&&o.totalPage&&(t=ji(t,[o.platform,o.slug,"totalPage"],o.totalPage)),ji(t,[o.platform,o.slug,o.currentPage],o.data);case No.RESET_SEARCH:return ms(ms({},t),{},{search:ms({},gs)});case No.SEARCH:return ms(ms({},t),{},{search:ms(ms({},t.search),{},{isLoading:!0,context:null==n?void 0:n.context,keyword:null==n?void 0:n.search})});case No.SEARCH_SUCCESS:t=ms(ms({},t),{},{search:ms(ms({},t.search),{},{isLoading:!1})});var i=n.currentPage,a=n.totalPage;return t=ji(t,["search","context"],n.context),t=ji(t,["search","data",i],n.data),t=ji(t,["search","data","currentPage"],i),ji(t,["search","data","totalPage"],a)}return t}};function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ws(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qs(e){return Hs(Hs({},Vs),e)}var qs=function(e){var t={elementor:"https://assets.templately.com/frontend/Elementor.png",gutenberg:"https://assets.templately.com/frontend/Gutenberg.png"};return t.hasOwnProperty(e)&&t[e]},$s=["dispatch"],Gs=function(e,t){var n=e.ModalComponent,r=e.content,o={key:"isSaved",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:(0,Pt.__)("Something went wrong regarding changes in your WorkSpace. Try Later or Contact support.","templately")},success:{title:(0,Pt.__)("Successfully Saved","templately"),content:(0,Pt.__)("You have succesfully saved your WorkSpace changes.","templately")}};ba({showCloseButton:!0,onConfirm:function(e){return wa(o,e)},html:React.createElement(n,re({},t,r))},!0)},Ys=function(e,t){var n=e.ModalComponent,r=e.content,o=t.dispatch,i=Bn(t,$s),a={key:"isDeleted",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:(0,Pt.__)("Something went wrong regarding deleting your WorkSpace. Try Later or Contact Support.","templately")},success:{redirectTo:-1,title:(0,Pt.__)("Successfully Deleted","templately"),content:(0,Pt.__)("You have deleted a WorkSpace from your account.","templately")}};ba({showCloseButton:!0,onConfirm:function(e){return wa(a,e)},html:React.createElement(n,re({page:i.workspaces.currentPage},r,{dispatch:o}))},!0)},Xs=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[{name:(0,Pt.__)("Edit","templately"),icon:React.createElement(Tn,null),disabled:e,action:Gs,ModalComponent:tf},{name:(0,Pt.__)("Delete","templately"),icon:React.createElement(Pn,null),disabled:e,action:Ys,ModalComponent:Fl}]};const Ks=window.wp.blocks;function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zs(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const el=fn(null,function(e){return{forceDelete:function(t){return e(Im(Js(Js({},t),{},{force_delete_kit:!0})))}}})(function(e){return ae().createElement("div",{className:"t-kit-warning-modal"},ae().createElement("h4",null,(0,Pt.__)("Are you sure you want to delete your Site Settings?","elementor")),ae().createElement("p",null,(0,Pt.__)("By removing this template you will delete your entire Site Settings. If this template is deleted, all associated settings: Global Colors & Fonts, Theme Style, Layout, Background, and Lightbox settings will be removed from your existing site. This action can not be undone.","elementor")),ae().createElement("div",{className:"btns"},ae().createElement("button",{onClick:function(){e.forceDelete({id:e.id})},className:"templately-button force-delete"},(0,Pt.__)("Force Delete","templately")),ae().createElement("button",{className:"templately-button keep-settings"},(0,Pt.__)("Keep my settings","templately"))))}),tl=function(e){var t=e.id,n=e.isImport,r=e.setImport,o=pe((0,oe.useState)(!1),2),i=o[0],a=o[1];return(0,oe.useEffect)(function(){0!=n&&a(!i)},[n]),ae().createElement("div",{className:"templately-import tm-section"},ae().createElement("p",null,(0,Pt.__)("Import this template to your library to make it available in your Elementor Saved Templates(opens in a new tab) list for future use.","templately")),ae().createElement("button",{disabled:i,className:"templately-button tb-import",onClick:function(){return r(t)}},ae().createElement(ar,null),(0,Pt.__)("Import to Library","templately")))},nl=function(e){var t=e.id,n=e.isCreate,r=e.createPage,o=e.setPageTitle,i=pe((0,oe.useState)(!0),2),a=i[0],s=i[1],l=pe((0,oe.useState)(""),2),c=l[0],u=l[1];return(0,oe.useEffect)(function(){0!=n||c.length>0?s(!1):s(!0),o(c)},[n,c]),ae().createElement("div",{className:"templately-create-page tm-section"},ae().createElement("p",null,(0,Pt.__)("Create a new page from this template to make it available as a draft page in your pages list.","templately")),ae().createElement("div",{className:"templately-create-page-form"},ae().createElement(da,{wrapper:!1,placeholder:(0,Pt.__)("Type a title here...","templately"),value:c,onChange:function(e){return u(e.target.value)}}),ae().createElement(ca,{disabled:a,label:(0,Pt.__)("Create a Page","templately"),className:"tb-create-page",onClick:function(){return r(t)}})))};var rl=["name","id","platform"];const ol=function(e){var t=e.name,n=e.id,r=e.platform,o=Bn(e,rl),i=pe((0,oe.useState)(!1),2),a=i[0],s=i[1],l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1],d=pe((0,oe.useState)(null),2),p=d[0],h=d[1],f=pe((0,oe.useState)(!1),2),m=f[0],g=f[1],v=pe((0,oe.useState)(!1),2),y=v[0],b=v[1],w=pe((0,oe.useState)(""),2),k=w[0],E=w[1];return(0,oe.useEffect)(function(){0!=m&&"elementor"===r&&(ka(),s(!0),Dl({id:m,platform:r}).then(function(e){ka(!1),s(!1),u(e)}).catch(function(e){ka(!1),s(!1),h(e)}),g(!1))},[m]),(0,oe.useEffect)(function(){0!=y&&(ka(),s(!0),Al({id:y,title:k,platform:r}).then(function(e){ka(!1),s(!1),u(e)}).catch(function(e){ka(!1),s(!1),h(e)}),b(!1))},[y]),ae().createElement("div",{className:"templately-import-modal templately-modal"},!a&&!(0!=c||null!=p)&&ae().createElement("div",{className:"tm-header"},ae().createElement("h3",null,t)),a&&ae().createElement(ma,{text:(0,Pt.__)("Importing...","templately"),description:(0,Pt.__)("Your chosen template is being imported right now, please do not refresh or close this tab.","templately")}),!a&&ae().createElement("div",{className:"tm-body"},0==c&&null==p&&ae().createElement(ae().Fragment,null,ae().createElement(nl,{id:n,isCreate:y,createPage:b,setPageTitle:E}),"elementor"===r&&ae().createElement(tl,{isImport:m,id:n,setImport:g})),null!=p&&ae().createElement(bl,re({},p,{type:null==o?void 0:o.type,slug:null==o?void 0:o.slug})),0!=c&&null==p&&ae().createElement(Cl,re({platform:r},c))))};function il(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function al(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?il(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const sl=function(e){var t=e.requirement,n=e.completeCallback,r=e.setErrors,o=e.errors,i=pe((0,oe.useState)(!0),2),a=i[0],s=i[1],l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1],d=pe((0,oe.useState)(!1),2),p=d[0],h=d[1],f=pe((0,oe.useState)({}),2),m=f[0],g=f[1];return t?((0,oe.useEffect)(function(){uf(t).then(function(e){s(e.loading),g(e.data)}).catch(function(e){var n=e;"invalid_requirements"===(null==e?void 0:e.code)&&(n={message:e.message}),u(n),r([].concat(Da(o),[al(al({},n),t)])),s(!1)})},[]),(0,oe.useEffect)(function(){p&&(s(!0),u(!1),uf(t).then(function(e){g(e.data),s(e.loading)}).catch(function(e){var n=o.filter(function(e){return e.id!==t.id});if("invalid_requirements"===(null==e?void 0:e.code)){var i=al({message:e.message},t);n.push(i)}r(n),u(e),s(!1)}),h(!1))},[p]),(0,oe.useEffect)(function(){a||n(c)},[a]),(0,oe.useEffect)(function(){c&&r([].concat(Da(o),[al(al({},c),t)]))},[c]),ae().createElement(ae().Fragment,null,a?ae().createElement(ll,{className:"t-info-installing",title:(0,Pt.__)("Installing...","templately")}):null,c?m&&m.errorMessage?ae().createElement(ll,{className:"t-info-error",icon:"no",title:m.errorMessage}):ae().createElement(ca,{className:"tb-retry-install",onClick:function(){return h(!0)}},ae().createElement("span",{className:"dashicons dashicons-no text-danger"}),(0,Pt.__)("Retry & Proceed to Import","templately")):null,a||c?null:ae().createElement(ll,{className:"t-info-success",icon:"yes-alt",title:(0,Pt.__)("Success","templately")}))):((0,oe.useEffect)(function(){n()},[]),ae().createElement("span",{className:"templately-warning"},ae().createElement("span",{className:"dashicons dashicons-warning"})," ",(0,Pt.__)("Ignored","templately")))};var ll=function(e){var t=e.icon,n=void 0===t?"update":t,r=e.title,o=void 0===r?"":r,i=e.iconStyle,a=void 0===i?null:i,s=e.hide;if(void 0!==s&&s)return null;var l=Vn()("templately-installation-info align-center d-flex",null==e?void 0:e.className);return ae().createElement("div",{className:l},ae().createElement("span",{className:"dashicons dashicons-".concat(n),style:a}),ae().createElement("p",null,o))},cl=["dependencies"];function ul(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ul(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var pl=o(6614);const hl=function(e){var t=e.dependencies,n=void 0===t?[]:t,r=Bn(e,cl),o=r.current_screen,i=r.clickCancel,a=r.setImportModal,s=r.setIsImporting,l=pe((0,oe.useState)({}),2),c=l[0],u=l[1],d=pe((0,oe.useState)(null),2),p=d[0],h=d[1],f=pe((0,oe.useState)([]),2),m=f[0],g=f[1],v=(0,oe.useMemo)(function(){return!(0,_i.isEmpty)(c)&&Object.values(c).every(function(e){return!e})},[c]),y=function(e){return void 0===c[e]||c[e]},b=function(){h(function(e){return e+1})};return(0,oe.useEffect)(function(){n.length&&n.map(function(e,t){var n=e.is_pro,r=e.is_active;void 0===c[t]&&u(function(e){return dl(dl({},e),{},Ct({},t,!r&&!n))})})},[n]),(0,oe.useEffect)(function(){n.length<=0&&("templately"==o?a(!0):s(!0))},[n]),(0,oe.useEffect)(function(){null!=p&&p>n.length-1&&0===m.length&&("templately"==o?a(!0):s(!0))},[p,m]),ae().createElement(ae().Fragment,null,ae().createElement("h4",null,(0,Pt.__)("Required Dependencies","templately")),ae().createElement("p",null,(0,Pt.__)("To import this item you need to install all the Plugin(s) listed below:","templately")),(null==n?void 0:n.length)>0&&ae().createElement("ul",{className:"templately-dependency-list"},n.map(function(e,t){var n=e.is_pro,r=e.link,o=e.name,i=e.slug,a=e.is_active;return ae().createElement("li",{className:"templately-dependency-item",key:t},ae().createElement("div",{className:"tdi-checkbox"},ae().createElement(da,{wrapper:!1,className:"tdi-checkbox-input",type:"checkbox",id:"requirement".concat(t),value:"1",disabled:n,checked:a||"elementor"===i||y(t)&&!n,onChange:function(){return!a&&!n&&u(function(e){var n;return dl(dl({},e),{},Ct({},t,!(null===(n=e[t])||void 0===n||n)))})}}),ae().createElement(ha,{wrapper:!0,htmlFor:"requirement".concat(t),style:{marginLeft:"5px"},href:r,name:o},a&&ae().createElement(ae().Fragment,null," | ",ae().createElement("span",{className:"plugin-installed"},"Installed")))),p===t||p>t?ae().createElement(sl,{key:"installing".concat(t),requirement:y(t)&&!n?e:null,completeCallback:b,errors:m,setErrors:function(e){g(e)}}):null)})),ae().createElement("p",null,ae().createElement("strong",null,(0,Pt.__)("Note","templately"),": "),pl((0,Pt.sprintf)((0,Pt.__)("Make sure you have manually installed & activated the <em><strong>%s</strong></em> listed above","templately"),(0,Pt._n)("Pro Plugin","Pro Plugin's",n.length,"templately")))),ae().createElement("div",{className:"templately-buttons-group"},ae().createElement(ca,{label:(0,Pt.__)("Cancel","templately"),className:"tb-rd-btn bg-danger tm-btn-cancel",onClick:function(){return i(!0)},disabled:null!==p}),ae().createElement(ca,{label:v?(0,Pt.__)("Proceed to Import","templately"):(0,Pt.__)("Install & Proceed to Import","templately"),className:"tb-rd-btn tm-btn-confirm",onClick:function(){return h(0)},disabled:null!==p})))};function fl(e){return $n({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"}}]})(e)}function ml(e){return $n({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{fill:"#D9D9D9",d:"M911.9 283.9v.5L835.5 865c-1 8-7.9 14-15.9 14H204.5c-8.1 0-14.9-6.1-16-14l-76.4-580.6v-.6 1.6L188.5 866c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.1-.5.1-1 0-1.5z"}},{tag:"path",attr:{fill:"#D9D9D9",d:"M773.6 810.6l53.9-409.4-139.8 86.1L512 252.9 336.3 487.3l-139.8-86.1 53.8 409.4h523.3zm-374.2-189c0-62.1 50.5-112.6 112.6-112.6s112.6 50.5 112.6 112.6v1c0 62.1-50.5 112.6-112.6 112.6s-112.6-50.5-112.6-112.6v-1z"}},{tag:"path",attr:{d:"M512 734.2c61.9 0 112.3-50.2 112.6-112.1v-.5c0-62.1-50.5-112.6-112.6-112.6s-112.6 50.5-112.6 112.6v.5c.3 61.9 50.7 112.1 112.6 112.1zm0-160.9c26.6 0 48.2 21.6 48.2 48.3 0 26.6-21.6 48.3-48.2 48.3s-48.2-21.6-48.2-48.3c0-26.6 21.6-48.3 48.2-48.3z"}},{tag:"path",attr:{d:"M188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6v-.5c.3-6.4-6.7-10.8-12.3-7.4L705 396.4 518.4 147.5a8.06 8.06 0 0 0-12.9 0L319 396.4 124.3 276.5c-5.5-3.4-12.6.9-12.2 7.3v.6L188.5 865zm147.8-377.7L512 252.9l175.7 234.4 139.8-86.1-53.9 409.4H250.3l-53.8-409.4 139.8 86.1z"}}]})(e)}var gl=["code","message","title","contentStyles"];function vl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vl(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const bl=function(e){var t=e.code,n=e.message,r=e.title,o=void 0===r?null:r,i=e.contentStyles,a=void 0===i?{}:i,s=Bn(e,gl);return ae().createElement("div",re({className:"tm-import-failed aligncenter"},s),null!=o?o:ae().createElement("h4",null,(0,Pt.__)("Importing Failed","templately")),Vi(n)?ae().createElement("p",{dangerouslySetInnerHTML:{__html:n}}):ae().createElement("p",{style:yl({},a)},n),"required_pro_templately"===t&&ae().createElement("div",{className:"templately-pro-required-btns"},ae().createElement("a",{className:"templately-button tb-import tb-upgrade-pro-btn",href:"https://templately.com?utm_source=plugin&utm_medium=importFailedPopup#pricing",target:"_blank"},ae().createElement(ml,null),(0,Pt.__)("Upgrade to Pro","templately")),ae().createElement("a",{className:"templately-button tb-import tb-upgrade-pro-btn",href:qi(s.slug,s.type),target:"_blank"},ae().createElement(fl,null),(0,Pt.__)("Purchase This Item","templately"))))},wl=window.wp.data;var kl=["dependencies","origin","hasElementorPro"];function El(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ol(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?El(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Sl=o(6614);const xl=fn(function(e){return{platform:e.general.platform,hasElementorPro:e.general.has_elementor_pro,current_screen:e.general.current_screen}},function(e){return{checkDependencies:function(t){return e(df(t))}}})(function(e){var t=e.dependencies,n=e.origin,r=void 0===n?"remote":n,o=e.hasElementorPro,i=Bn(e,kl),a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=pe((0,oe.useState)(!0),2),u=c[0],d=c[1],p=pe((0,oe.useState)(null),2),h=p[0],f=p[1],m=pe((0,oe.useState)(!1),2),g=m[0],v=m[1],y=pe((0,oe.useState)(null),2),b=y[0],w=y[1],k=pe((0,oe.useState)(null),2),E=k[0],O=(k[1],(0,wl.useSelect)(function(e){return e("core/editor")},[]));return(0,oe.useEffect)(function(){var n,r,a,s;d(!0),"elementor"!==e.platform||"templately"!==templately.current_screen||!["header","footer"].includes(null==i||null===(n=i.template_type)||void 0===n?void 0:n.slug)||o?df({dependencies:t,platform:e.platform}).then(function(e){d(!1),f(e.dependencies),0==e.dependencies.length&&("templately"==templately.current_screen?v(!0):w(!0))}).catch(function(e){d(!1),f([])}):ba({iconHtml:'<img width="100px" src="'.concat(null===(r=templately)||void 0===r||null===(r=r.icons)||void 0===r?void 0:r.warning,'" alt="warning"/>'),showCloseButton:!0,allowOutsideClick:!1,showClass:{icon:"templately-warning-icon"},html:ae().createElement(bl,{style:{textAlign:"center",marginTop:"-35px"},contentStyles:{backgroundColor:"#F7F7F7",padding:"15px",fontSize:"14px",borderRadius:"12px"},title:ae().createElement(ae().Fragment,null,ae().createElement("p",{style:{fontSize:"18px"}},Sl((0,Pt.sprintf)((0,Pt.__)("Oops! Seems you don't have %s to import the %s Template","templately"),(0,Pt.sprintf)("<strong>%s</strong>","Elementor Pro"),Hi(null==i||null===(a=i.template_type)||void 0===a?void 0:a.slug))))),message:Sl((0,Pt.sprintf)((0,Pt.__)("%6$s %1$s is a part of a %2$s which is available in %3$s. You need to install Elementor Pro to import %1$s template from here. %4$s, you can insert this template from %5$s on your single page.","templately"),Hi(null==i||null===(s=i.template_type)||void 0===s?void 0:s.slug),(0,Pt.sprintf)("<strong>%s</strong>","Elementor Theme Builder"),(0,Pt.sprintf)('<a target="_blank" href="https://wpdeveloper.com/go/elementor">%s</a>',"Elementor Pro"),(0,Pt.sprintf)("<strong>%s</strong>","Alternatively"),(0,Pt.sprintf)("<strong>%s</strong>","Elementor Editor"),(0,Pt.sprintf)('<span style="color: red;">%s:</span>',(0,Pt.__)("NOTE","templately"))))})},!0)},[]),(0,oe.useEffect)(function(){if(null!==b&&!0===b){var t=function(){var t=ni(oi().mark(function t(){return oi().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(h.length>0)){t.next=2;break}if("gutenberg"!=templately.current_screen&&"elementor"!==templately.current_screen){t.next=2;break}return t.next=1,hi();case 1:void 0!==("undefined"==typeof elementor?"undefined":ne(elementor))&&"elementor"===templately.current_screen&&elementor.addWidgetsCache(elementor.getConfig().initial_document.widgets);case 2:ka(),Ml({id:e.id,postId:null==O?void 0:O.getCurrentPostId(),origin:r,platform:e.platform}).then(function(t){ka(!1),ya.close(Ol({insertCompleted:void 0===(null==t?void 0:t.error),platform:e.platform},t))});case 3:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();t()}},[b]),(0,oe.useEffect)(function(){s&&(ya.close({isDismissed:!0}),l(!1))},[s]),null!=b&&!0===b?ae().createElement(ma,{className:"align-center",text:(0,Pt.__)("Importing...","templately"),description:(0,Pt.__)("Your chosen template is being imported right now, please do not refresh or close this tab.","templately")}):1==u?ae().createElement(ma,{text:(0,Pt.__)("Checking...","templately"),description:(0,Pt.__)("Checking template dependencies are installed or not...","templately")}):ae().createElement("div",{className:"templately-dependency-installer-modal"},null===E&&g&&!u&&ae().createElement(ol,re({},e,{platform:e.platform})),null===E&&!u&&!g&&ae().createElement(ae().Fragment,null,null!==h&&ae().createElement(hl,{dependencies:h,clickCancel:function(e){return l(e)},current_screen:e.current_screen,setIsImporting:w,setImportModal:v})))});var _l=["platform"];const Cl=function(e){var t=e.platform,n=Bn(e,_l);return ae().createElement("div",{className:"tm-import-success"},ae().createElement("h3",null,(0,Pt.__)("Imported successfully!","templately")),ae().createElement("p",null,(0,Pt.__)("You can now edit or preview the template or, you can push it to Templately Cloud to share with your team.","templately")),ae().createElement("div",{className:"tm-import-links"},"gutenberg"==t&&ae().createElement("a",{className:"templately-button templately-import-button tb-edit-link",href:n.edit_link},(0,Pt.__)("Edit Template","templately")),(null==n?void 0:n.elementor_edit_link)&&"elementor"===t&&ae().createElement("a",{className:"templately-button templately-import-button tb-edit-with-el",href:n.elementor_edit_link},(0,Pt.__)("Edit Template with Elementor","templately")),ae().createElement("a",{className:"templately-button templately-import-button tb-visit",href:n.visit},(0,Pt.__)("View Template","templately"))))};function Pl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pl(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Al=function(e){return Si("/templately/v1/import/page",e,{},!0)},Dl=function(e){return Si("/templately/v1/import",e,{},!0)},Ml=function(e){return Si("/templately/v1/insert",e,{},!0).then(function(t){return"elementor"===(null==e?void 0:e.platform)&&Ll(t),"gutenberg"===(null==e?void 0:e.platform)&&Nl(t),Tl(Tl({},e),t)}).catch(function(t){return Tl(Tl({},e),t)})},Nl=function(e){var t=wp.data.dispatch("core/block-editor").insertBlocks;return!(null==e||!e.content||(t((0,Ks.parse)(e.content)),0))},Ll=function(e){var t=window.elementor,n=window.$e;if(void 0!==t){var r=window.TemplatelyIndex;if(void 0!==n){for(var o=0;o<e.content.length;o++)n.run("document/elements/create",{container:t.getPreviewContainer(),model:e.content[o],options:r>=0?{at:r++}:{}});n.run("document/elements/settings",{container:t.getPreviewContainer(),settings:{template:e.page_settings.template}})}else{var i=new Backbone.Model({getTitle:function(){return"Templately Insert"}});t.channels.data.trigger("template:before:insert",i);for(var a=window.TemplatelyIndex,s=0;s<e.content.length;s++)t.getPreviewView().addChildElement(e.content[s],a>=0?{at:a++}:null);t.channels.data.trigger("template:after:insert",{})}return!0}return!1},Il=function(e,t){var n=e.ModalComponent,r=e.content;r.my_cloud_id&&(r.id=r.my_cloud_id),ba({showCloseButton:!0,allowOutsideClick:!1,html:React.createElement(n,r)},!0).then(function(e){void 0===(null==e?void 0:e.code)?Rl(e.platform):ba({icon:"error",showCloseButton:!0,allowOutsideClick:!1,html:React.createElement(bl,e)},!0)})},Rl=function(e){"templately"!=window.templately.current_screen&&("gutenberg"!==e&&window.TemplatelyModal.destroy(),"gutenberg"===e&&window.TemplatelyAppManager.close("templately-gutenberg"))},jl=["dispatch","page","slug","id"],Fl=function(e){var t=e.dispatch,n=e.page,r=e.slug,o=e.id,i=(Bn(e,jl),pe((0,oe.useState)(!1),2)),a=i[0],s=i[1];return ae().createElement("div",{className:"templately-workspace-modal delete-workspace-modal"},ae().createElement("div",{className:"tm-container"},ae().createElement("h3",null,(0,Pt.__)("Are You Sure?","templately")),ae().createElement("p",null,ae().createElement("strong",null,(0,Pt.__)("Note","templately"),": "),(0,Pt.__)("The WorkSpace will be permanently deleted.","templately")),ae().createElement("p",null,ae().createElement("input",{type:"checkbox",name:"delete_files_too",id:"delete_files_too",onChange:function(){return s(!a)}}),ae().createElement("label",{htmlFor:"delete_files_too"},(0,Pt.__)("Want To Delete Files Too?","templately"))),ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column"},ae().createElement("button",{className:"tm-btn-cancel",onClick:function(){ya.hideLoading(),ya.close({isDismissed:!0})}},(0,Pt.__)("Cancel","templately"))),ae().createElement("div",{className:"tm-column"},ae().createElement("button",{className:"tm-btn-confirm",onClick:function(){ya.showLoading(),t(vm({id:o,slug:r,delete_files:a,page:n}))}},(0,Pt.__)("Delete","templately"))))))},zl=function(e){var t=e.dispatch,n=e.setTitle,r=pe((0,oe.useState)(!0),2),o=r[0],i=r[1],a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=pe((0,oe.useState)(""),2),u=c[0],d=c[1],p=pe((0,oe.useState)([]),2),h=p[0],f=p[1],m=pe((0,oe.useState)(!1),2),g=m[0],v=m[1],y=pe((0,oe.useState)(""),2),b=y[0],w=y[1],k=pe((0,oe.useState)(!1),2),E=k[0],O=k[1],S=pe((0,oe.useState)([]),2),x=S[0],_=S[1];return(0,oe.useEffect)(function(){if(g){var e=Da(x),t=b.toLowerCase();Fi(t)&&(e.includes(t)||(e.push(t),_(e)),w("")),v(!1)}},[g]),(0,oe.useEffect)(function(){if(!1!==E){var e=Da(x).filter(function(e){return E!=e});_(e),O(!1)}},[E]),(0,oe.useEffect)(function(){var e=[];x.length>0&&x.map(function(t,n){return e.push(ae().createElement("li",{key:n},t,ae().createElement("span",{onClick:function(){return O(t)}})))}),f(e)},[x]),(0,oe.useEffect)(function(){i(!(u.trim().length>0))},[u]),(0,oe.useEffect)(function(){s&&(ya.showLoading(),t(mm({title:u,share_with:x})),l(!1))},[s]),ae().createElement("div",{className:"templately-workspace-modal create-workspace-modal"},ae().createElement("div",{className:"tm-container"},ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column tm-title"},ae().createElement("span",{className:"tm-title-icon"})),ae().createElement("div",{className:"tm-column bg-light"},ae().createElement("div",{className:"tmw-name"},ae().createElement(da,{placeholder:(0,Pt.__)("Type workspace title here...","templately"),value:u,onChange:function(e){d(e.target.value),null==n||n(e.target.value)}})))),ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column tm-title"},ae().createElement("p",null,(0,Pt.__)("Add People","templately"),": ")),ae().createElement("div",{className:"tm-column bg-light templately-new-shared"},h.length>0&&ae().createElement("ul",{className:"templately-wem-new-email-list"},h),ae().createElement("div",null,ae().createElement(da,{onKeyUp:function(e){return v(13===e.keyCode)},onChange:function(e){return w(e.target.value)},value:b,placeholder:(0,Pt.__)("Type email to add","templately")}),ae().createElement(ca,{disabled:0===b.length||!Fi(b),onClick:function(){return v(!0)},label:(0,Pt.__)("Add","templately")})))),ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column flex-end"},ae().createElement(ca,{disabled:o,onClick:function(){return l(!0)},label:(0,Pt.__)("Create Workspace","templately")})))))},Bl=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ul(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,h=e.value,f=Bn(e,Bl),m=pe((0,oe.useState)(void 0!==s?s:n),2),g=m[0],v=m[1],y=pe((0,oe.useState)(void 0!==l?l:o),2),b=y[0],w=y[1],k=pe((0,oe.useState)(void 0!==h?h:a),2),E=k[0],O=k[1],S=(0,oe.useCallback)(function(e,t){"function"==typeof c&&c(e,t),O(e)},[c]),x=(0,oe.useCallback)(function(e,t){var n;"function"==typeof u&&(n=u(e,t)),v(void 0!==n?n:e)},[u]),_=(0,oe.useCallback)(function(){"function"==typeof p&&p(),w(!0)},[p]),C=(0,oe.useCallback)(function(){"function"==typeof d&&d(),w(!1)},[d]),P=void 0!==s?s:g,T=void 0!==l?l:b,A=void 0!==h?h:E;return Oa(Oa({},f),{},{inputValue:P,menuIsOpen:T,onChange:S,onInputChange:x,onMenuClose:C,onMenuOpen:_,value:A})}function Vl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_t(r.key),r)}}function Hl(e,t,n){return t&&Wl(e.prototype,t),n&&Wl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ql(e,t){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ql(e,t)}function ql(e){return ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ql(e)}function $l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($l=function(){return!!e})()}function Gl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Yl=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Xl=Math.abs,Kl=String.fromCharCode,Zl=Object.assign;function Jl(e){return e.trim()}function ec(e,t,n){return e.replace(t,n)}function tc(e,t){return e.indexOf(t)}function nc(e,t){return 0|e.charCodeAt(t)}function rc(e,t,n){return e.slice(t,n)}function oc(e){return e.length}function ic(e){return e.length}function ac(e,t){return t.push(e),e}var sc=1,lc=1,cc=0,uc=0,dc=0,pc="";function hc(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:sc,column:lc,length:a,return:""}}function fc(e,t){return Zl(hc("",null,null,"",null,null,0),e,{length:-e.length},t)}function mc(){return dc=uc>0?nc(pc,--uc):0,lc--,10===dc&&(lc=1,sc--),dc}function gc(){return dc=uc<cc?nc(pc,uc++):0,lc++,10===dc&&(lc=1,sc++),dc}function vc(){return nc(pc,uc)}function yc(){return uc}function bc(e,t){return rc(pc,e,t)}function wc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kc(e){return sc=lc=1,cc=oc(pc=e),uc=0,[]}function Ec(e){return pc="",e}function Oc(e){return Jl(bc(uc-1,_c(91===e?e+2:40===e?e+1:e)))}function Sc(e){for(;(dc=vc())&&dc<33;)gc();return wc(e)>2||wc(dc)>3?"":" "}function xc(e,t){for(;--t&&gc()&&!(dc<48||dc>102||dc>57&&dc<65||dc>70&&dc<97););return bc(e,yc()+(t<6&&32==vc()&&32==gc()))}function _c(e){for(;gc();)switch(dc){case e:return uc;case 34:case 39:34!==e&&39!==e&&_c(dc);break;case 40:41===e&&_c(e);break;case 92:gc()}return uc}function Cc(e,t){for(;gc()&&e+dc!==57&&(e+dc!==84||47!==vc()););return"/*"+bc(t,uc-1)+"*"+Kl(47===e?e:gc())}function Pc(e){for(;!wc(vc());)gc();return bc(e,uc)}var Tc="-ms-",Ac="-moz-",Dc="-webkit-",Mc="comm",Nc="rule",Lc="decl",Ic="@keyframes";function Rc(e,t){for(var n="",r=ic(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function jc(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Lc:return e.return=e.return||e.value;case Mc:return"";case Ic:return e.return=e.value+"{"+Rc(e.children,r)+"}";case Nc:e.value=e.props.join(",")}return oc(n=Rc(e.children,r))?e.return=e.value+"{"+n+"}":""}function Fc(e){return Ec(zc("",null,null,null,[""],e=kc(e),0,[0],e))}function zc(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,h=0,f=0,m=1,g=1,v=1,y=0,b="",w=o,k=i,E=r,O=b;g;)switch(f=y,y=gc()){case 40:if(108!=f&&58==nc(O,d-1)){-1!=tc(O+=ec(Oc(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:O+=Oc(y);break;case 9:case 10:case 13:case 32:O+=Sc(f);break;case 92:O+=xc(yc()-1,7);continue;case 47:switch(vc()){case 42:case 47:ac(Uc(Cc(gc(),yc()),t,n),l);break;default:O+="/"}break;case 123*m:s[c++]=oc(O)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+u:-1==v&&(O=ec(O,/\f/g,"")),h>0&&oc(O)-d&&ac(h>32?Vc(O+";",r,n,d-1):Vc(ec(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(ac(E=Bc(O,t,n,c,u,o,s,b,w=[],k=[],d),i),123===y)if(0===u)zc(O,t,E,E,w,i,d,s,k);else switch(99===p&&110===nc(O,3)?100:p){case 100:case 108:case 109:case 115:zc(e,E,E,r&&ac(Bc(e,E,E,0,0,o,s,b,o,w=[],d),k),o,k,d,s,r?w:k);break;default:zc(O,E,E,E,[""],k,0,s,k)}}c=u=h=0,m=v=1,b=O="",d=a;break;case 58:d=1+oc(O),h=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==mc())continue;switch(O+=Kl(y),y*m){case 38:v=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(oc(O)-1)*v,v=1;break;case 64:45===vc()&&(O+=Oc(gc())),p=vc(),u=d=oc(b=O+=Pc(yc())),y++;break;case 45:45===f&&2==oc(O)&&(m=0)}}return i}function Bc(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],h=ic(p),f=0,m=0,g=0;f<r;++f)for(var v=0,y=rc(e,d+1,d=Xl(m=a[f])),b=e;v<h;++v)(b=Jl(m>0?p[v]+" "+y:ec(y,/&\f/g,p[v])))&&(l[g++]=b);return hc(e,t,n,0===o?Nc:s,l,c,u)}function Uc(e,t,n){return hc(e,t,n,Mc,Kl(dc),rc(e,2,-2),0)}function Vc(e,t,n,r){return hc(e,t,n,Lc,rc(e,0,r),rc(e,r+1,-1),r)}var Wc=function(e,t,n){for(var r=0,o=0;r=o,o=vc(),38===r&&12===o&&(t[n]=1),!wc(o);)gc();return bc(e,uc)},Hc=new WeakMap,Qc=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Hc.get(n))&&!r){Hc.set(e,!0);for(var o=[],i=function(e,t){return Ec(function(e,t){var n=-1,r=44;do{switch(wc(r)){case 0:38===r&&12===vc()&&(t[n]=1),e[n]+=Wc(uc-1,t,n);break;case 2:e[n]+=Oc(r);break;case 4:if(44===r){e[++n]=58===vc()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Kl(r)}}while(r=gc());return e}(kc(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},qc=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function $c(e,t){switch(function(e,t){return 45^nc(e,0)?(((t<<2^nc(e,0))<<2^nc(e,1))<<2^nc(e,2))<<2^nc(e,3):0}(e,t)){case 5103:return Dc+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Dc+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Dc+e+Ac+e+Tc+e+e;case 6828:case 4268:return Dc+e+Tc+e+e;case 6165:return Dc+e+Tc+"flex-"+e+e;case 5187:return Dc+e+ec(e,/(\w+).+(:[^]+)/,Dc+"box-$1$2"+Tc+"flex-$1$2")+e;case 5443:return Dc+e+Tc+"flex-item-"+ec(e,/flex-|-self/,"")+e;case 4675:return Dc+e+Tc+"flex-line-pack"+ec(e,/align-content|flex-|-self/,"")+e;case 5548:return Dc+e+Tc+ec(e,"shrink","negative")+e;case 5292:return Dc+e+Tc+ec(e,"basis","preferred-size")+e;case 6060:return Dc+"box-"+ec(e,"-grow","")+Dc+e+Tc+ec(e,"grow","positive")+e;case 4554:return Dc+ec(e,/([^-])(transform)/g,"$1"+Dc+"$2")+e;case 6187:return ec(ec(ec(e,/(zoom-|grab)/,Dc+"$1"),/(image-set)/,Dc+"$1"),e,"")+e;case 5495:case 3959:return ec(e,/(image-set\([^]*)/,Dc+"$1$`$1");case 4968:return ec(ec(e,/(.+:)(flex-)?(.*)/,Dc+"box-pack:$3"+Tc+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Dc+e+e;case 4095:case 3583:case 4068:case 2532:return ec(e,/(.+)-inline(.+)/,Dc+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oc(e)-1-t>6)switch(nc(e,t+1)){case 109:if(45!==nc(e,t+4))break;case 102:return ec(e,/(.+:)(.+)-([^]+)/,"$1"+Dc+"$2-$3$1"+Ac+(108==nc(e,t+3)?"$3":"$2-$3"))+e;case 115:return~tc(e,"stretch")?$c(ec(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==nc(e,t+1))break;case 6444:switch(nc(e,oc(e)-3-(~tc(e,"!important")&&10))){case 107:return ec(e,":",":"+Dc)+e;case 101:return ec(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Dc+(45===nc(e,14)?"inline-":"")+"box$3$1"+Dc+"$2$3$1"+Tc+"$2box$3")+e}break;case 5936:switch(nc(e,t+11)){case 114:return Dc+e+Tc+ec(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Dc+e+Tc+ec(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Dc+e+Tc+ec(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Dc+e+Tc+e+e}return e}var Gc=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lc:e.return=$c(e.value,e.length);break;case Ic:return Rc([fc(e,{value:ec(e.value,"@","@"+Dc)})],r);case Nc:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Rc([fc(e,{props:[ec(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Rc([fc(e,{props:[ec(t,/:(plac\w+)/,":"+Dc+"input-$1")]}),fc(e,{props:[ec(t,/:(plac\w+)/,":-moz-$1")]}),fc(e,{props:[ec(t,/:(plac\w+)/,Tc+"input-$1")]})],r)}return""})}}],Yc=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Gc,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,p=[jc,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[Qc,qc].concat(i,p),u=ic(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,Rc(Fc(e?e+"{"+t.styles+"}":t.styles),h),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Yl({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return f.sheet.hydrate(s),f},Xc=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Kc={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Zc(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Jc=/[A-Z]|^ms/g,eu=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tu=function(e){return 45===e.charCodeAt(1)},nu=function(e){return null!=e&&"boolean"!=typeof e},ru=Zc(function(e){return tu(e)?e:e.replace(Jc,"-$&").toLowerCase()}),ou=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(eu,function(e,t,n){return au={name:t,styles:n,next:au},t})}return 1===Kc[e]||tu(e)||"number"!=typeof t||0===t?t:t+"px"};function iu(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return au={name:o.name,styles:o.styles,next:au},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)au={name:a.name,styles:a.styles,next:au},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=iu(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":nu(s)&&(r+=ru(i)+":"+ou(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=iu(e,t,a);switch(i){case"animation":case"animationName":r+=ru(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)nu(a[c])&&(r+=ru(i)+":"+ou(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=au,l=n(e);return au=s,iu(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var au,su=/label:\s*([^\s;{]+)\s*(;|$)/g;function lu(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";au=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=iu(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=iu(n,t,e[a]),r&&(o+=i[a]);su.lastIndex=0;for(var s,l="";null!==(s=su.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:au}}var cu=!!oe.useInsertionEffect&&oe.useInsertionEffect,uu=cu||function(e){return e()},du=(cu||oe.useLayoutEffect,oe.createContext("undefined"!=typeof HTMLElement?Yc({key:"css"}):null)),pu=(du.Provider,function(e){return(0,oe.forwardRef)(function(t,n){var r=(0,oe.useContext)(du);return e(t,r,n)})}),hu=oe.createContext({}),fu={}.hasOwnProperty,mu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gu=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Xc(t,n,r),uu(function(){return function(e,t,n){Xc(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},vu=pu(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[mu],i=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=lu(i,void 0,oe.useContext(hu));a+=t.key+"-"+s.name;var l={};for(var c in e)fu.call(e,c)&&"css"!==c&&c!==mu&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),oe.createElement(oe.Fragment,null,oe.createElement(gu,{cache:t,serialized:s,isStringTag:"string"==typeof o}),oe.createElement(o,l))}),yu=vu,bu=function(e,t){var n=arguments;if(null==t||!fu.call(t,"css"))return oe.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=yu,o[1]=function(e,t){var n={};for(var r in t)fu.call(t,r)&&(n[r]=t[r]);return n[mu]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return oe.createElement.apply(null,o)};function wu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return lu(t)}const ku=["top","right","bottom","left"],Eu=Math.min,Ou=Math.max,Su=Math.round,xu=Math.floor,_u=e=>({x:e,y:e}),Cu={left:"right",right:"left",bottom:"top",top:"bottom"},Pu={start:"end",end:"start"};function Tu(e,t,n){return Ou(e,Eu(t,n))}function Au(e,t){return"function"==typeof e?e(t):e}function Du(e){return e.split("-")[0]}function Mu(e){return e.split("-")[1]}function Nu(e){return"x"===e?"y":"x"}function Lu(e){return"y"===e?"height":"width"}const Iu=new Set(["top","bottom"]);function Ru(e){return Iu.has(Du(e))?"y":"x"}function ju(e){return Nu(Ru(e))}function Fu(e){return e.replace(/start|end/g,e=>Pu[e])}const zu=["left","right"],Bu=["right","left"],Uu=["top","bottom"],Vu=["bottom","top"];function Wu(e){return e.replace(/left|right|bottom|top/g,e=>Cu[e])}function Hu(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Qu(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function qu(e,t,n){let{reference:r,floating:o}=e;const i=Ru(t),a=ju(t),s=Lu(a),l=Du(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Mu(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function $u(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Au(t,e),f=Hu(h),m=s[p?"floating"===d?"reference":"floating":d],g=Qu(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Qu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+f.top)/b.y,bottom:(w.bottom-g.bottom+f.bottom)/b.y,left:(g.left-w.left+f.left)/b.x,right:(w.right-g.right+f.right)/b.x}}function Gu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yu(e){return ku.some(t=>e[t]>=0)}const Xu=new Set(["left","top"]);function Ku(){return"undefined"!=typeof window}function Zu(e){return td(e)?(e.nodeName||"").toLowerCase():"#document"}function Ju(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ed(e){var t;return null==(t=(td(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function td(e){return!!Ku()&&(e instanceof Node||e instanceof Ju(e).Node)}function nd(e){return!!Ku()&&(e instanceof Element||e instanceof Ju(e).Element)}function rd(e){return!!Ku()&&(e instanceof HTMLElement||e instanceof Ju(e).HTMLElement)}function od(e){return!(!Ku()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ju(e).ShadowRoot)}const id=new Set(["inline","contents"]);function ad(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!id.has(o)}const sd=new Set(["table","td","th"]);function ld(e){return sd.has(Zu(e))}const cd=[":popover-open",":modal"];function ud(e){return cd.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const dd=["transform","translate","scale","rotate","perspective"],pd=["transform","translate","scale","rotate","perspective","filter"],hd=["paint","layout","strict","content"];function fd(e){const t=md(),n=nd(e)?yd(e):e;return dd.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||pd.some(e=>(n.willChange||"").includes(e))||hd.some(e=>(n.contain||"").includes(e))}function md(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const gd=new Set(["html","body","#document"]);function vd(e){return gd.has(Zu(e))}function yd(e){return Ju(e).getComputedStyle(e)}function bd(e){return nd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wd(e){if("html"===Zu(e))return e;const t=e.assignedSlot||e.parentNode||od(e)&&e.host||ed(e);return od(t)?t.host:t}function kd(e){const t=wd(e);return vd(t)?e.ownerDocument?e.ownerDocument.body:e.body:rd(t)&&ad(t)?t:kd(t)}function Ed(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=kd(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ju(o);if(i){const e=Od(a);return t.concat(a,a.visualViewport||[],ad(o)?o:[],e&&n?Ed(e):[])}return t.concat(o,Ed(o,[],n))}function Od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sd(e){const t=yd(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=rd(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Su(n)!==i||Su(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function xd(e){return nd(e)?e:e.contextElement}function _d(e){const t=xd(e);if(!rd(t))return _u(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Sd(t);let a=(i?Su(n.width):n.width)/r,s=(i?Su(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Cd=_u(0);function Pd(e){const t=Ju(e);return md()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Cd}function Td(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=xd(e);let a=_u(1);t&&(r?nd(r)&&(a=_d(r)):a=_d(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ju(e))&&t}(i,n,r)?Pd(i):_u(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ju(i),t=r&&nd(r)?Ju(r):r;let n=e,o=Od(n);for(;o&&r&&t!==n;){const e=_d(o),t=o.getBoundingClientRect(),r=yd(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ju(o),o=Od(n)}}return Qu({width:u,height:d,x:l,y:c})}function Ad(e,t){const n=bd(e).scrollLeft;return t?t.left+n:Td(ed(e)).left+n}function Dd(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ad(e,n),y:n.top+t.scrollTop}}const Md=new Set(["absolute","fixed"]);function Nd(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ju(e),r=ed(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=md();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ad(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=ed(e),n=bd(e),r=e.ownerDocument.body,o=Ou(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ou(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ad(e);const s=-n.scrollTop;return"rtl"===yd(r).direction&&(a+=Ou(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(ed(e));else if(nd(t))r=function(e,t){const n=Td(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=rd(e)?_d(e):_u(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Pd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Qu(r)}function Ld(e,t){const n=wd(e);return!(n===t||!nd(n)||vd(n))&&("fixed"===yd(n).position||Ld(n,t))}function Id(e,t,n){const r=rd(t),o=ed(t),i="fixed"===n,a=Td(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=_u(0);function c(){l.x=Ad(o)}if(r||!r&&!i)if(("body"!==Zu(t)||ad(o))&&(s=bd(t)),r){const e=Td(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?_u(0):Dd(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Rd(e){return"static"===yd(e).position}function jd(e,t){if(!rd(e)||"fixed"===yd(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ed(e)===n&&(n=n.ownerDocument.body),n}function Fd(e,t){const n=Ju(e);if(ud(e))return n;if(!rd(e)){let t=wd(e);for(;t&&!vd(t);){if(nd(t)&&!Rd(t))return t;t=wd(t)}return n}let r=jd(e,t);for(;r&&ld(r)&&Rd(r);)r=jd(r,t);return r&&vd(r)&&Rd(r)&&!fd(r)?n:r||function(e){let t=wd(e);for(;rd(t)&&!vd(t);){if(fd(t))return t;if(ud(t))return null;t=wd(t)}return null}(e)||n}const zd={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ed(r),s=!!t&&ud(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=_u(1);const u=_u(0),d=rd(r);if((d||!d&&!i)&&(("body"!==Zu(r)||ad(a))&&(l=bd(r)),rd(r))){const e=Td(r);c=_d(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?_u(0):Dd(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:ed,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ud(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ed(e,[],!1).filter(e=>nd(e)&&"body"!==Zu(e)),o=null;const i="fixed"===yd(e).position;let a=i?wd(e):e;for(;nd(a)&&!vd(a);){const t=yd(a),n=fd(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Md.has(o.position)||ad(a)&&!n&&Ld(e,a))?r=r.filter(e=>e!==a):o=t,a=wd(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=Nd(t,n,o);return e.top=Ou(r.top,e.top),e.right=Eu(r.right,e.right),e.bottom=Eu(r.bottom,e.bottom),e.left=Ou(r.left,e.left),e},Nd(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Fd,getElementRects:async function(e){const t=this.getOffsetParent||Fd,n=this.getDimensions,r=await n(e.floating);return{reference:Id(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Sd(e);return{width:t,height:n}},getScale:_d,isElement:nd,isRTL:function(e){return"rtl"===yd(e).direction}};function Bd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ud(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=xd(e),u=o||i?[...c?Ed(c):[],...Ed(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=ed(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-xu(d)+"px "+-xu(o.clientWidth-(u+p))+"px "+-xu(o.clientHeight-(d+h))+"px "+-xu(u)+"px",threshold:Ou(0,Eu(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Bd(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m=l?Td(e):null;return l&&function t(){const r=Td(e);m&&!Bd(m,r)&&n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Vd=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Du(n),s=Mu(n),l="y"===Ru(n),c=Xu.has(a)?-1:1,u=i&&l?-1:1,d=Au(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Wd=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Au(e,t),c={x:n,y:r},u=await $u(t,l),d=Ru(Du(o)),p=Nu(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=Tu(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=Tu(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[d]:a}}}}}},Hd=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Au(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=Du(o),y=Ru(s),b=Du(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),k=p||(b||!m?[Wu(s)]:function(e){const t=Wu(e);return[Fu(e),t,Fu(t)]}(s)),E="none"!==f;!p&&E&&k.push(...function(e,t,n,r){const o=Mu(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Bu:zu:t?zu:Bu;case"left":case"right":return t?Uu:Vu;default:return[]}}(Du(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Fu)))),i}(s,m,f,w));const O=[s,...k],S=await $u(t,g),x=[];let _=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&x.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Mu(e),o=ju(e),i=Lu(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Wu(a)),[a,Wu(a)]}(o,a,w);x.push(S[e[0]],S[e[1]])}if(_=[..._,{placement:o,overflows:x}],!x.every(e=>e<=0)){var C,P;const e=((null==(C=i.flip)?void 0:C.index)||0)+1,t=O[e];if(t&&("alignment"!==d||y===Ru(t)||_.every(e=>Ru(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(P=_.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(h){case"bestFit":{var T;const e=null==(T=_.filter(e=>{if(E){const t=Ru(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Qd=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Au(e,t),u=await $u(t,c),d=Du(o),p=Mu(o),h="y"===Ru(o),{width:f,height:m}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g="end"===p?"top":"bottom");const y=m-u.top-u.bottom,b=f-u.left-u.right,w=Eu(m-u[g],y),k=Eu(f-u[v],b),E=!t.middlewareData.shift;let O=w,S=k;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=y),E&&!p){const e=Ou(u.left,0),t=Ou(u.right,0),n=Ou(u.top,0),r=Ou(u.bottom,0);h?S=f-2*(0!==e||0!==t?e+t:Ou(u.left,u.right)):O=m-2*(0!==n||0!==r?n+r:Ou(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:O});const x=await a.getDimensions(s.floating);return f!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}},qd=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Au(e,t);switch(r){case"referenceHidden":{const e=Gu(await $u(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Yu(e)}}}case"escaped":{const e=Gu(await $u(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Yu(e)}}}default:return{}}}}},$d=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Au(e,t)||{};if(null==c)return{};const d=Hu(u),p={x:n,y:r},h=ju(o),f=Lu(h),m=await a.getDimensions(c),g="y"===h,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[f]+i.reference[h]-p[h]-i.floating[f],k=p[h]-i.reference[h],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=E?E[b]:0;O&&await(null==a.isElement?void 0:a.isElement(E))||(O=s.floating[b]||i.floating[f]);const S=w/2-k/2,x=O/2-m[f]/2-1,_=Eu(d[v],x),C=Eu(d[y],x),P=_,T=O-m[f]-C,A=O/2-m[f]/2+S,D=Tu(P,A,T),M=!l.arrow&&null!=Mu(o)&&A!==D&&i.reference[f]/2-(A<P?_:C)-m[f]/2<0,N=M?A<P?A-P:A-T:0;return{[h]:p[h]+N,data:{[h]:D,centerOffset:A-D-N,...M&&{alignmentOffset:N}},reset:M}}}),Gd=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Au(e,t),u={x:n,y:r},d=Ru(o),p=Nu(d);let h=u[p],f=u[d];const m=Au(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=i.reference[p]-i.floating[e]+g.mainAxis,n=i.reference[p]+i.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var v,y;const e="y"===p?"width":"height",t=Xu.has(Du(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);f<n?f=n:f>r&&(f=r)}return{[p]:h,[d]:f}}}},Yd=(e,t,n)=>{const r=new Map,o={platform:zd,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=qu(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:v,data:y,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=qu(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Xd=oe.useLayoutEffect,Kd=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Zd=function(){};function Jd(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ep(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Jd(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var tp=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===ne(e)&&null!==e?[e]:[];var t},np=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Oa({},Bn(e,Kd))},rp=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function op(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ip(e){return op(e)?window.pageYOffset:e.scrollTop}function ap(e,t){op(e)?window.scrollTo(0,t):e.scrollTop=t}function sp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Zd,o=ip(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);ap(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function lp(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?ap(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&ap(e,Math.max(t.offsetTop-o,0))}function cp(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var up=!1,dp={get passive(){return up=!0}},pp="undefined"!=typeof window?window:{};pp.addEventListener&&pp.removeEventListener&&(pp.addEventListener("p",Zd,dp),pp.removeEventListener("p",Zd,!1));var hp=up;function fp(e){return null!=e}function mp(e,t,n){return e?t:n}var gp=["children","innerProps"],vp=["children","innerProps"];var yp,bp=function(e){return"auto"===e?"bottom":e},kp=(0,oe.createContext)(null),Ep=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,oe.useContext)(kp)||{}).setPortalPlacement,c=(0,oe.useRef)(null),u=pe((0,oe.useState)(r),2),d=u[0],p=u[1],h=pe((0,oe.useState)(null),2),f=h[0],m=h[1],g=s.spacing.controlHeight;return Xd(function(){var e=c.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),h=p.bottom,f=p.height,m=p.top,g=n.offsetParent.getBoundingClientRect().top,v=a||op(u=l)?window.innerHeight:u.clientHeight,y=ip(l),b=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),k=g-w,E=v-m,O=k+y,S=d-y-m,x=h-v+y+b,_=y+m-w,C=160;switch(o){case"auto":case"bottom":if(E>=f)return{placement:"bottom",maxHeight:t};if(S>=f&&!a)return i&&sp(l,x,C),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&E>=r)return i&&sp(l,x,C),{placement:"bottom",maxHeight:a?E-b:S-b};if("auto"===o||a){var P=t,T=a?k:O;return T>=r&&(P=Math.min(T-b-s,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return i&&ap(l,x),{placement:"bottom",maxHeight:t};break;case"top":if(k>=f)return{placement:"top",maxHeight:t};if(O>=f&&!a)return i&&sp(l,_,C),{placement:"top",maxHeight:t};if(!a&&O>=r||a&&k>=r){var A=t;return(!a&&O>=r||a&&k>=r)&&(A=a?k-w:O-w),i&&sp(l,_,C),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});p(s.maxHeight),m(s.placement),null==l||l(s.placement)}},[r,o,i,a,n,l,g]),t({ref:c,placerProps:Oa(Oa({},e),{},{placement:f||bp(o),maxHeight:d})})},Op=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return Oa({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Sp=Op,xp=Op,_p=["size"],Cp=["innerProps","isRtl","size"],Pp={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Tp=function(e){var t=e.size,n=Bn(e,_p);return bu("svg",re({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Pp},n))},Ap=function(e){return bu(Tp,re({size:20},e),bu("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Dp=function(e){return bu(Tp,re({size:20},e),bu("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Mp=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Oa({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Np=Mp,Lp=Mp,Ip=function(){var e=wu.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(yp||(yp=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),Rp=function(e){var t=e.delay,n=e.offset;return bu("span",{css:wu({animation:"".concat(Ip," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},jp=["data"],Fp=["innerRef","isDisabled","isHidden","inputClassName"],zp={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Bp={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oa({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},zp)},Up=function(e){return Oa({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},zp)},Vp=function(e){var t=e.children,n=e.innerProps;return bu("div",n,t)},Wp={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return bu("div",re({},rp(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||bu(Ap,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return bu("div",re({ref:o},rp(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return bu("div",re({},rp(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||bu(Dp,null))},DownChevron:Dp,CrossIcon:Ap,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return bu("div",re({},rp(e,"group",{group:!0}),s),bu(i,re({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),bu("div",null,t))},GroupHeading:function(e){var t=np(e);t.data;var n=Bn(t,jp);return bu("div",re({},rp(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return bu("div",re({},rp(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return bu("span",re({},t,rp(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=np(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=Bn(r,Fp);return bu("div",re({},rp(e,"input",{"input-container":!0}),{"data-value":n||""}),bu("input",re({className:t({input:!0},s),ref:o,style:Up(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=Bn(e,Cp);return bu("div",re({},rp(Oa(Oa({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),bu(Rp,{delay:0,offset:n}),bu(Rp,{delay:160,offset:!0}),bu(Rp,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return bu("div",re({},rp(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return bu("div",re({},rp(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,oe.useRef)(null),l=(0,oe.useRef)(null),c=pe((0,oe.useState)(bp(i)),2),u=c[0],d=c[1],p=(0,oe.useMemo)(function(){return{setPortalPlacement:d}},[]),h=pe((0,oe.useState)(null),2),f=h[0],m=h[1],g=(0,oe.useCallback)(function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===a?0:window.pageYOffset,n=e[u]+t;n===(null==f?void 0:f.offset)&&e.left===(null==f?void 0:f.rect.left)&&e.width===(null==f?void 0:f.rect.width)||m({offset:n,rect:e})}},[r,a,u,null==f?void 0:f.offset,null==f?void 0:f.rect.left,null==f?void 0:f.rect.width]);Xd(function(){g()},[g]);var v=(0,oe.useCallback)(function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=Ud(r,s.current,g,{elementResize:"ResizeObserver"in window}))},[r,g]);Xd(function(){v()},[v]);var y=(0,oe.useCallback)(function(e){s.current=e,v()},[v]);if(!t&&"fixed"!==a||!f)return null;var b=bu("div",re({ref:y},rp(Oa(Oa({},e),{},{offset:f.offset,position:a,rect:f.rect}),"menuPortal",{"menu-portal":!0}),o),n);return bu(kp.Provider,{value:p},t?(0,se.createPortal)(b,t):b)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=Bn(e,vp);return bu("div",re({},rp(Oa(Oa({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=Bn(e,gp);return bu("div",re({},rp(Oa(Oa({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return bu(l,{data:r,innerProps:Oa(Oa({},rp(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},bu(c,{data:r,innerProps:Oa({},rp(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),bu(u,{data:r,innerProps:Oa(Oa({},rp(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:Vp,MultiValueLabel:Vp,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return bu("div",re({role:"button"},n),t||bu(Ap,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return bu("div",re({},rp(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return bu("div",re({},rp(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return bu("div",re({},rp(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return bu("div",re({},rp(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return bu("div",re({},rp(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},Hp=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Qp(e,t){return e===t||!(!Hp(e)||!Hp(t))}function qp(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Qp(e[n],t[n]))return!1;return!0}for(var $p={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Gp=function(e){return bu("span",re({css:$p},e))},Yp={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Xp=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,h=s.isMulti,f=s.isOptionDisabled,m=s.isSearchable,g=s.menuIsOpen,v=s.options,y=s.screenReaderStatus,b=s.tabSelectsValue,w=s.isLoading,k=s["aria-label"],E=s["aria-live"],O=(0,oe.useMemo)(function(){return Oa(Oa({},Yp),u||{})},[u]),S=(0,oe.useMemo)(function(){var e,n="";if(t&&O.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=o||s||void 0,h=p?p.map(d):[],m=Oa({isDisabled:c&&f(c,a),label:u,labels:h},t);n=O.onChange(m)}return n},[t,O,f,a,d]),x=(0,oe.useMemo)(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&O.onFocus){var s={focused:t,label:d(t),isDisabled:f(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=O.onFocus(s)}return e},[n,r,d,f,O,o,a,c]),_=(0,oe.useMemo)(function(){var e="";if(g&&v.length&&!w&&O.onFilter){var t=y({count:o.length});e=O.onFilter({inputValue:p,resultsMessage:t})}return e},[o,p,g,O,v,y,w]),C="initial-input-focus"===(null==t?void 0:t.action),P=(0,oe.useMemo)(function(){var e="";if(O.guidance){var t=r?"value":g?"menu":"input";e=O.guidance({"aria-label":k,context:t,isDisabled:n&&f(n,a),isMulti:h,isSearchable:m,tabSelectsValue:b,isInitialFocus:C})}return e},[k,n,r,h,f,m,g,O,a,b,C]),T=bu(oe.Fragment,null,bu("span",{id:"aria-selection"},S),bu("span",{id:"aria-focused"},x),bu("span",{id:"aria-results"},_),bu("span",{id:"aria-guidance"},P));return bu(oe.Fragment,null,bu(Gp,{id:l},C&&T),bu(Gp,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!C&&T))},Kp=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Zp=new RegExp("["+Kp.map(function(e){return e.letters}).join("")+"]","g"),Jp={},eh=0;eh<Kp.length;eh++)for(var th=Kp[eh],nh=0;nh<th.letters.length;nh++)Jp[th.letters[nh]]=th.base;var rh=function(e){return e.replace(Zp,function(e){return Jp[e]})},oh=function(e,t){void 0===t&&(t=qp);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(rh),ih=function(e){return e.replace(/^\s+|\s+$/g,"")},ah=function(e){return"".concat(e.label," ").concat(e.value)},sh=["innerRef"];function lh(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=pe(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=pe(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(Bn(e,sh),"onExited","in","enter","exit","appear");return bu("input",re({ref:t},n,{css:wu({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var ch=["boxSizing","height","overflow","paddingRight","position"],uh={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function dh(e){e.cancelable&&e.preventDefault()}function ph(e){e.stopPropagation()}function hh(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function fh(){return"ontouchstart"in window||navigator.maxTouchPoints}var mh=!("undefined"==typeof window||!window.document||!window.document.createElement),gh=0,vh={capture:!1,passive:!1},yh=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},bh={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function wh(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,oe.useRef)(!1),s=(0,oe.useRef)(!1),l=(0,oe.useRef)(0),c=(0,oe.useRef)(null),u=(0,oe.useCallback)(function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,h=c.current,f=t>0,m=d-p-u,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),f&&s.current&&(i&&i(e),s.current=!1),f&&t>m?(n&&!a.current&&n(e),h.scrollTop=d,g=!0,a.current=!0):!f&&-t>u&&(o&&!s.current&&o(e),h.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,r,o,i]),d=(0,oe.useCallback)(function(e){u(e,e.deltaY)},[u]),p=(0,oe.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),h=(0,oe.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)},[u]),f=(0,oe.useCallback)(function(e){if(e){var t=!!hp&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}},[h,p,d]),m=(0,oe.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))},[h,p,d]);return(0,oe.useEffect)(function(){if(t){var e=c.current;return f(e),function(){m(e)}}},[t,f,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,oe.useRef)({}),i=(0,oe.useRef)(null),a=(0,oe.useCallback)(function(e){if(mh){var t=document.body,n=t&&t.style;if(r&&ch.forEach(function(e){var t=n&&n[e];o.current[e]=t}),r&&gh<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(uh).forEach(function(e){var t=uh[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&fh()&&(t.addEventListener("touchmove",dh,vh),e&&(e.addEventListener("touchstart",hh,vh),e.addEventListener("touchmove",ph,vh))),gh+=1}},[r]),s=(0,oe.useCallback)(function(e){if(mh){var t=document.body,n=t&&t.style;gh=Math.max(gh-1,0),r&&gh<1&&ch.forEach(function(e){var t=o.current[e];n&&(n[e]=t)}),t&&fh()&&(t.removeEventListener("touchmove",dh,vh),e&&(e.removeEventListener("touchstart",hh,vh),e.removeEventListener("touchmove",ph,vh)))}},[r]);return(0,oe.useEffect)(function(){if(t){var e=i.current;return a(e),function(){s(e)}}},[t,a,s]),function(e){i.current=e}}({isEnabled:n});return bu(oe.Fragment,null,n&&bu("div",{onClick:yh,css:bh}),t(function(e){o(e),i(e)}))}var kh={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Eh=function(e){var t=e.name,n=e.onFocus;return bu("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:kh,value:"",onChange:function(){}})};function Oh(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Sh(){return Oh(/^Mac/i)}var xh=function(e){return e.label},_h=function(e){return e.value},Ch={clearIndicator:Lp,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return Oa({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:Np,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return Oa({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Oa({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return Oa(Oa({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},Bp),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Oa({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:xp,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return Oa((Ct(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Ct(n,"position","absolute"),Ct(n,"width","100%"),Ct(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return Oa({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return Oa({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return Oa({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return Oa({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Sp,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return Oa({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return Oa({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return Oa({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Oa({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Ph={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Th={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:cp(),captureMenuScroll:!cp(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Oa({ignoreCase:!0,ignoreAccents:!0,stringify:ah,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?ih(t):t,c=a?ih(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=oh(l),c=rh(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:xh,getOptionValue:_h,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ah(e,t,n,r){return{type:"option",data:t,isDisabled:Fh(e,t,n),isSelected:zh(e,t,n),label:Rh(e,t),value:jh(e,t),index:r}}function Dh(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return Ah(e,n,t,r)}).filter(function(t){return Lh(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Ah(e,n,t,r);return Lh(e,i)?i:void 0}).filter(fp)}function Mh(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,Da(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function Nh(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,Da(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function Lh(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!Uh(e)||!i)&&Bh(e,{label:a,value:s,data:o},r)}var Ih=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},Rh=function(e,t){return e.getOptionLabel(t)},jh=function(e,t){return e.getOptionValue(t)};function Fh(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function zh(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=jh(e,t);return n.some(function(t){return jh(e,t)===r})}function Bh(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Uh=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Vh=1,Wh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ql(e,t)}(n,e);var t=function(e){var t=$l();return function(){var n,r=ql(e);if(t){var o=ql(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Gl(e)}(this,n)}}(n);function n(e){var r;if(Vl(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==c}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(Da(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=mp(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(mp(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=mp(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Ih(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Nh(Dh(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ep.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Rh(r.props,e)},r.getOptionValue=function(e){return jh(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=Ch[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,Oa(Oa({},Wp),e.components);var e},r.buildCategorizedOptions=function(){return Dh(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Mh(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Oa({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&op(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return Uh(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,h=r.state,f=h.focusedOption,m=h.focusedValue,g=h.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!f||p&&r.isOptionSelected(f,g))return;r.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(r.isComposing)return;r.selectOption(f);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!f)return;r.selectOption(f);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Vh),r.state.selectValue=tp(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=Ih(o,i[a])}return r}return Hl(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&lp(this.menuListRef,this.focusedOptionRef),(Sh()||Oh(/^iPhone/i)||Oh(/^iPad/i)||Sh()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(lp(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ph):Oa(Oa({},Ph),this.props.theme):Ph}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Fh(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return zh(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Bh(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,h=this.commonProps,f=r||this.getElementId("input"),m=Oa(Oa(Oa({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?oe.createElement(c,re({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):oe.createElement(lh,re({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Zd,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,h=c.inputValue,f=c.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!u)return h?null:oe.createElement(s,re({},l,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),f);if(p)return g.map(function(t,a){var s=t===v,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return oe.createElement(n,re({},l,{components:{Container:r,Label:o,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var b=g[0];return oe.createElement(a,re({},l,{data:b,isDisabled:d}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return oe.createElement(e,re({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?oe.createElement(e,re({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return oe.createElement(n,re({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return oe.createElement(e,re({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,f=p.inputValue,m=p.isLoading,g=p.loadingMessage,v=p.minMenuHeight,y=p.maxMenuHeight,b=p.menuIsOpen,w=p.menuPlacement,k=p.menuPosition,E=p.menuPortalTarget,O=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,x=p.noOptionsMessage,_=p.onMenuScrollToTop,C=p.onMenuScrollToBottom;if(!b)return null;var P,T=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===o,h=i?void 0:function(){return e.onOptionHover(o)},f=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:f,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:a};return oe.createElement(c,re({},u,{innerProps:g,data:o,isDisabled:i,isSelected:a,key:m,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map(function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return oe.createElement(n,re({},u,{key:s,data:o,options:i,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e,"".concat(a,"-").concat(e.index))}))}if("option"===t.type)return T(t,"".concat(t.index))});else if(m){var A=g({inputValue:f});if(null===A)return null;P=oe.createElement(s,u,A)}else{var D=x({inputValue:f});if(null===D)return null;P=oe.createElement(l,u,D)}var M={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:k,menuShouldScrollIntoView:S},N=oe.createElement(Ep,re({},u,M),function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return oe.createElement(o,re({},u,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),oe.createElement(wh,{captureEnabled:h,onTopArrive:_,onBottomArrive:C,lockEnabled:O},function(t){return oe.createElement(i,re({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:s,focusedOption:d}),P)}))});return E||"fixed"===k?oe.createElement(a,re({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:w,menuPosition:k}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return oe.createElement(Eh,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var l=s.map(function(t){return e.getOptionValue(t)}).join(n);return oe.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map(function(t,n){return oe.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):oe.createElement("input",{name:i,type:"hidden",value:""});return oe.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return oe.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return oe.createElement(Xp,re({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return oe.createElement(r,re({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),oe.createElement(t,re({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),oe.createElement(o,re({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),oe.createElement(n,re({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,h=e.isMulti,f=tp(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return Mh(Dh(e,t))}(e,f):[],v=d?Nh(Dh(e,f),"".concat(l,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,f):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:f,focusedOption:b,focusedOptionId:Ih(v,b),focusableOptionsWithIds:v,focusedValue:y,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},k=i,E=a&&s;return a&&!E&&(k={value:mp(h,f,f[0]||null),options:f,action:"initial-input-focus"},E=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(k=null),Oa(Oa(Oa({},m),w),{},{prevProps:e,ariaSelection:k,prevWasFocused:E})}}]),n}(oe.Component);Wh.defaultProps=Th;var Hh=(0,oe.forwardRef)(function(e,t){var n=Ul(e);return oe.createElement(Wh,re({ref:t},n))}),Qh=Hh,qh=["action","dispatch","workspaces","sharedWorkspaces","workspacesLoading","sharedWorkspacesLoading"],$h=["value"];const Gh=fn(function(e){var t,n;return{workspaces:null!==(t=e.workspaces.lists)&&void 0!==t?t:[],sharedWorkspaces:null!==(n=e.sharedWorkspaces.lists)&&void 0!==n?n:[],workspacesLoading:e.workspaces.isLoading,sharedWorkspacesLoading:e.sharedWorkspaces.isLoading}})(function(e){var t=e.action,n=e.dispatch,r=e.workspaces,o=e.sharedWorkspaces,i=e.workspacesLoading,a=e.sharedWorkspacesLoading,s=Bn(e,qh),l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1],d=pe((0,oe.useState)(!0),2),p=d[0],h=d[1],f=pe((0,oe.useState)(null),2),m=f[0],g=f[1],v=pe((0,oe.useState)([]),2),y=v[0],b=v[1];return(0,oe.useEffect)(function(){0==r.length&&n(dm({list_only:!0})),0==o.length&&n(dm({list_only:!0,shared:!0}))},[]),(0,oe.useEffect)(function(){var e=[];r.length&&e.push({label:(0,Pt.__)("My WorkSpace","templately"),options:Ui(r)}),o.length&&e.push({label:(0,Pt.__)("Shared WorkSpace","templately"),options:Ui(o)}),e.length>0&&b(e)},[r,o]),(0,oe.useEffect)(function(){h(null==m)},[m]),(0,oe.useEffect)(function(){if(c){var r=e.my_cloud_id,o=m.value,i=Bn(m,$h);ya.showLoading(),"copy"===t?n(Yf({my_cloud_id:r,workspace_id:o,action:t,fileContents:s,details:i})):"move"===t&&n(Kf({my_cloud_id:r,workspace_id:o,action:t,fileContents:s,details:i})),u(!1)}},[c]),ae().createElement(ta,{className:"templately-cloud-copy-n-move-modal",headerClass:"text-center",header:(0,Pt.sprintf)((0,Pt.__)("%s to WorkSpace","templately"),"copy"===t?(0,Pt.__)("Copy","templately"):(0,Pt.__)("Move","templately"))},ae().createElement(na,{className:"align-center"},ae().createElement(ra,{className:"text-right",column:4},ae().createElement("p",null,(0,Pt.__)("Item Name","templately"),":")),ae().createElement(ra,{column:8,wrapper:!0,wrapperClass:"cloud-item-name"},ae().createElement("p",null,ae().createElement("strong",null,s.name)))),ae().createElement(na,null,ae().createElement(ra,{className:"text-right",column:4},ae().createElement("p",null,"copy"===t?(0,Pt.__)("Copy to","templately"):(0,Pt.__)("Move to","templately"),":")),ae().createElement(ra,{column:8,wrapper:!0,wrapperClass:"tm-workspaces-list"},ae().createElement(Qh,{isClearable:!0,isLoading:i||a,placeholder:(0,Pt.__)("Select WorkSpace","templately"),noOptionsMessage:function(){return(0,Pt.__)("No WorkSpace Found","templately")},options:y,onChange:function(e){return g(e)}}))),ae().createElement(na,{className:"flex-end"},ae().createElement(ra,null,ae().createElement(ca,{className:"templately-copy-move-btn",disabled:p,onClick:function(){return u(!0)},label:"copy"===t?(0,Pt.__)("Copy","templately"):(0,Pt.__)("Move","templately")}))))}),Yh=function(e){var t=e.id,n=e.source,r=e.slug;return ae().createElement("div",{className:"templately-workspace-modal delete-file"},ae().createElement("h4",null,(0,Pt.__)("Are You Sure?","templately")),ae().createElement("p",null,(0,Pt.__)("You want to delete the file from your cloud.","templately")),ae().createElement("div",{className:"twm-df-actions"},ae().createElement("button",{onClick:function(){return ya.close({isDismissed:!0})},className:"templately-button tb-cancel"},(0,Pt.__)("Cancel","templately")),ae().createElement("button",{onClick:function(){ya.showLoading(),e.dispatch(Jf({id:t,source:n,slug:r}))},className:"templately-button tb-delete"},(0,Pt.__)("Delete","templately"))))};function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xh(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Zh=fn(function(e){var t,n;return{workspaces:null!==(t=e.workspaces.lists)&&void 0!==t?t:[],sharedWorkspaces:null!==(n=e.sharedWorkspaces.lists)&&void 0!==n?n:[],workspacesLoading:e.workspaces.isLoading,sharedWorkspacesLoading:e.sharedWorkspaces.isLoading,templates:{clouds:e.clouds.search,workspaces:e.workspaces.search,shared_workspaces:e.sharedWorkspaces.search}}},function(e){return{searchFiles:function(t){return e(am(Kh(Kh({},t),{},{context:"modal"})))},addFiles:function(t){return e(Cm(t))}}})(function(e){var t,n=pe((0,oe.useState)(!1),2),r=n[0],o=n[1],i=pe((0,oe.useState)(!0),2),a=i[0],s=i[1],l=pe((0,oe.useState)(null),2),c=l[0],u=l[1],d=pe((0,oe.useState)([]),2),p=d[0],h=d[1],f=pe((0,oe.useState)([]),2),m=f[0],g=f[1],v=pe((0,oe.useState)(""),2),y=v[0],b=v[1],w=pe((0,oe.useState)({value:"clouds",label:(0,Pt.__)("My Clouds","templately")}),2),k=w[0],E=w[1],O=(0,oe.useMemo)(function(){return[{value:"clouds",label:(0,Pt.__)("My Clouds","templately")},{value:"workspaces",label:(0,Pt.__)("My Workspaces","templately")},{value:"shared_workspaces",label:(0,Pt.__)("Shared Workspaces","templately")}]},[]),S=(0,oe.useCallback)(function(){var t,n;return"workspaces"===k.value&&(null===(t=e.workspaces)||void 0===t?void 0:t.length)>0?Ui(e.workspaces,!1,"slug",[],[e.slug]):"shared_workspaces"===k.value&&(null===(n=e.sharedWorkspaces)||void 0===n?void 0:n.length)>0?Ui(e.sharedWorkspaces,!0,"slug",[],[e.slug]):[]},[k,e.workspaces,e.sharedWorkspaces]);(0,oe.useEffect)(function(){u(null),h(null),s(!0)},[k]),(0,oe.useEffect)(function(){g([])},[c,k]),(0,oe.useEffect)(function(){(null==p?void 0:p.length)>0?s(!1):s(!0)},[p]),(0,oe.useEffect)(function(){if((null==y?void 0:y.length)>=3){var t={search:y};"clouds"!==k.value&&(t.source=k.value,t.slug=c.slug),e.searchFiles(t)}},[y]);var x=(0,oe.useCallback)(function(){var t={};"clouds"!==k.value&&(t.source=k.value,t.slug=c.slug),e.searchFiles(t)},[k,c]);return(0,oe.useEffect)(function(){var t;null!==(t=e.templates[k.value])&&void 0!==t&&t.isLoading?g([]):g(Ui(e.templates[k.value].data,"shared_workspaces"===k.value,"clouds"===k.value?"id":"my_cloud_id",["slug","owner","last_modified"]))},[e.templates]),(0,oe.useEffect)(function(){r&&(e.addFiles({files:p.map(function(e){return e.value}),workspace_id:null==e?void 0:e.id,slug:null==e?void 0:e.slug}),ya.showLoading(),o(!1))},[r]),ae().createElement(ta,{className:"add-file-to-workspace",headerClass:"text-center",header:(0,Pt.__)("Add Template to WorkSpace","templately")},ae().createElement(na,{className:"align-center"},ae().createElement(ra,{className:"text-right",column:4},ae().createElement("p",null,(0,Pt.__)("Select Source","templately"),":")),ae().createElement(ra,{column:8,wrapper:!0,wrapperClass:"tm-workspaces-list"},ae().createElement(Qh,{isSearchable:!1,placeholder:(0,Pt.__)("Select a source","templately"),noOptionsMessage:function(){return(0,Pt.__)("No Sources Found","templately")},value:k,options:O,onChange:function(e){return E(e)}}))),"clouds"!==(null==k?void 0:k.value)&&ae().createElement(na,{className:"align-center"},ae().createElement(ra,{className:"text-right",column:4},ae().createElement("p",null,(0,Pt.__)("Select Workspace","templately"),":")),ae().createElement(ra,{column:8,wrapper:!0,wrapperClass:"tm-workspaces-list"},ae().createElement(Qh,{isSearchable:!1,placeholder:(0,Pt.__)("Select a workspace","templately"),noOptionsMessage:function(){return(0,Pt.sprintf)((0,Pt.__)("No %s Found","templately"),"workspaces"==k.value?(0,Pt.__)("Workspace","templately"):(0,Pt.__)("Shared Workspace","templately"))},value:c,options:S(),onChange:function(e){return u(e)}}))),(void 0!==(null==c?void 0:c.slug)&&"clouds"!==k.value||"clouds"===k.value)&&ae().createElement(na,{className:"align-center"},ae().createElement(ra,{className:"text-right",column:4},ae().createElement("p",null,(0,Pt.__)("Select Templates","templately"),":")),ae().createElement(ra,{column:8,wrapper:!0,wrapperClass:"tm-workspaces-list"},ae().createElement(Qh,{isMulti:!0,isClearable:!0,isLoading:null===(t=e.templates[k.value])||void 0===t?void 0:t.isLoading,placeholder:(0,Pt.__)("Search by typing...","templately"),noOptionsMessage:function(){return(0,Pt.__)("No Templates Found","templately")},loadingMessage:function(){return(0,Pt.__)("Loading templates...","templately")},onFocus:x,options:m,onChange:function(e){return h(e)},onInputChange:function(e){return b(e)}}),ae().createElement("p",null,ae().createElement("small",null,ae().createElement("strong",null,(0,Pt.__)("Note","templately"),": "),(0,Pt.__)("You are seeing fewer items after initial load. You can search more to find your desire templates from the selected source.","templately"))))),ae().createElement(na,{className:"flex-end"},ae().createElement(ra,null,ae().createElement(ca,{className:"templately-add-templates",disabled:a,onClick:function(){return o(!0)},label:(0,Pt.__)("Add to WorkSpace","templately")}))))});function Jh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ef(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jh(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const tf=fn(function(e,t){var n,r,o=null!==(n=null===(r=e.workspaceDetails)||void 0===r?void 0:r[null==t?void 0:t.slug])&&void 0!==n?n:{};return ef(ef({},t),o)})(function(e){var t=e.sharedWith,n=e.pending_invitations,r=e.dispatch,o=pe((0,oe.useState)(e.name),2),i=o[0],a=o[1],s=pe((0,oe.useState)(!0),2),l=s[0],c=s[1],u=pe((0,oe.useState)(!1),2),d=u[0],p=u[1],h=pe((0,oe.useState)([]),2),f=h[0],m=h[1],g=pe((0,oe.useState)([]),2),v=g[0],y=g[1],b=pe((0,oe.useState)(!1),2),w=b[0],k=b[1],E=pe((0,oe.useState)(!1),2),O=E[0],S=E[1],x=pe((0,oe.useState)(!1),2),_=x[0],C=x[1],P=pe((0,oe.useState)(""),2),T=P[0],A=P[1],D=pe((0,oe.useState)(!1),2),M=D[0],N=D[1],L=pe((0,oe.useState)([]),2),I=L[0],R=L[1],j=pe((0,oe.useState)([]),2),F=j[0],z=j[1],B=pe((0,oe.useState)([]),2),U=(B[0],B[1]),V=pe((0,oe.useState)([]),2),W=V[0],H=V[1];return(0,oe.useEffect)(function(){var e=[],r=[];if(t&&t.length>0&&(t.map(function(t,n){r.push(t.email),e.push(ae().createElement("li",{key:n},t.profile_photo&&ae().createElement("img",{src:t.profile_photo}),ae().createElement("span",{className:"tae-name "},t.name),ae().createElement("span",{className:"tae-remove",onClick:function(e){S({email:t.email,currentTarget:e.currentTarget.parentElement})}}),ae().createElement("span",{className:"tae-undo",onClick:function(e){C({email:t.email,currentTarget:e.currentTarget.parentElement})}})))}),R(r),m(e)),n&&n.length>0){var o=JSON.parse(n),i=[],a=[];o.map(function(e){Fi(e)&&(a.push(e),i.push(ae().createElement("li",{key:e},ae().createElement("span",{className:"tae-name "},e,ae().createElement("em",null,(0,Pt.__)("invited","templately"))),ae().createElement("span",{className:"tae-remove",onClick:function(t){S({email:e,currentTarget:t.currentTarget.parentElement})}}),ae().createElement("span",{className:"tae-undo",onClick:function(t){C({email:e,currentTarget:t.currentTarget.parentElement})}}))))}),U(a),R([].concat(r,a)),m([].concat(e,i))}},[]),(0,oe.useEffect)(function(){if(w){var e=Da(F),t=T.toLowerCase();Fi(t)&&(e.includes(t)||(e.push(t),z(e)),A("")),k(!1)}},[w]),(0,oe.useEffect)(function(){if(!1!==M){var e=Da(F).filter(function(e){return M!=e});z(e),N(!1)}},[M]),(0,oe.useEffect)(function(){if(!1!==O||!1!==_){var e=Da(I),t=Da(W);if(0!=O&&(O.currentTarget.classList.add("removed"),t.push(O.email),e=e.filter(function(e){return O.email!=e}),R(e),H(t),S(!1)),0!=_){_.currentTarget.classList.remove("removed"),e.push(_.email);var n=t.filter(function(e){return _.email!=e});R(e),H(n),C(!1)}}},[O,_]),(0,oe.useEffect)(function(){var e=[];F.length>0&&F.map(function(t,n){return e.push(ae().createElement("li",{key:n},t,ae().createElement("span",{onClick:function(){return N(t)}})))}),y(e)},[F]),(0,oe.useEffect)(function(){F.length>0||W.length>0?c(!1):c(!0)},[I,F,W]),(0,oe.useEffect)(function(){if(d){var t=F,n=Da(W);ya.showLoading();var o=e.slug,a=e.id;r(bm({slug:o,id:a,title:i,share_with:t,remove:n})),p(!1)}},[d]),ae().createElement("div",{className:"templately-workspace-modal edit-workspace-modal"},ae().createElement("div",{className:"tm-container"},ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column tm-title"},ae().createElement("span",{className:"tm-title-icon"})),ae().createElement("div",{className:"tm-column bg-light"},ae().createElement("div",{className:"tmw-name"},ae().createElement(da,{value:i,onChange:function(e){c(0===e.target.value.trim().length),a(e.target.value)}})))),f.length>0&&ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column tm-title"},ae().createElement("p",null,(0,Pt.__)("Shared with","templately"),": ")),ae().createElement("div",{className:"tm-column templately-shared-with"},ae().createElement("ul",{className:"templately-added-email-list"},f))),ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column tm-title"},ae().createElement("p",null,(0,Pt.__)("Add People","templately"),": ")),ae().createElement("div",{className:"tm-column bg-light templately-new-shared"},v.length>0&&ae().createElement("ul",{className:"templately-wem-new-email-list"},v),ae().createElement("div",null,ae().createElement(da,{onKeyUp:function(e){return k(13===e.keyCode)},onChange:function(e){return A(e.target.value)},value:T,placeholder:(0,Pt.__)("Type email to add","templately")}),ae().createElement(ca,{disabled:0===T.length||!Fi(T),onClick:function(){return k(!0)},label:(0,Pt.__)("Add","templately")})))),ae().createElement("div",{className:"tm-row"},ae().createElement("div",{className:"tm-column flex-end"},ae().createElement(ca,{disabled:l,onClick:function(){return p(!0)},label:(0,Pt.__)("Save Changes","templately")})))))});var nf=function(e,t){var n=e.ModalComponent,r=e.content,o=t.dispatch,i=t.general;o(om({id:r.my_cloud_id,platform:i.platform}));var a={key:"isDownloaded",error:{title:(0,Pt.__)("Download Failed!!!","templately"),content:""},success:{title:(0,Pt.__)("Successfully Downloaded!","templately"),content:""}};ba({showCloseButton:!1,allowOutsideClick:!0,onConfirm:function(e){return wa(a,e)},html:React.createElement(n,null)},!0)},rf=function(e,t){var n=e.ModalComponent,r=e.content,o={key:"copy"===t?"isCopied":"isMoved",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:function(e){var t=e.message;return React.createElement("p",{dangerouslySetInnerHTML:{__html:t}})},args:{showCloseButton:!0,timer:null}},success:{title:(0,Pt.__)("Successfully Copied","templately"),content:function(e){var n=e.title;return React.createElement(React.Fragment,null,"copy"==t?(0,Pt.__)("Your file has been copied to a WorkSpace called: ","templately"):(0,Pt.__)("Your file has been moved to a WorkSpace called: ","templately"),React.createElement("strong",null,n))}}};ba({showCloseButton:!1,allowOutsideClick:!0,onConfirm:function(e){return wa(o,e)},html:React.createElement(n,re({},r,{action:t}))},!0)},of=function(e,t){var n=e.ModalComponent,r=e.content,o=e.source,i=t.dispatch,a={key:"isDeleted",error:{title:(0,Pt.__)("Something went wrong!","templately"),content:"Something went wrong regarding deleting your file. Try Later or Contact for Support."},success:{title:(0,Pt.__)("Successfully Deleted!","templately"),content:"You have deleted a file from your cloud."}};ba({showCloseButton:!0,onConfirm:function(e){return wa(a,e)},html:React.createElement(n,re({},r,{source:o,dispatch:i}))},!0)},af=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"templately",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"list";return[{include:("templately"===t||"list"!==n)&&void 0,hidden:"templately"===t||"grid"===n,className:"tb-import templately-button",name:(0,Pt.__)("Insert","templately"),icon:"",action:Il,ModalComponent:xl},{className:"tw-download",name:(0,Pt.__)("Download","templately"),icon:"",action:nf,ModalComponent:ma},{name:(0,Pt.__)("Copy to WorkSpace","templately"),icon:React.createElement(Cn,null),action:function(e,t){return rf(e,"copy")},ModalComponent:Gh},{name:(0,Pt.__)("Move to WorkSpace","templately"),icon:React.createElement(Nn,null),disabled:e,action:function(e,t){return rf(e,"move")},ModalComponent:Gh},{name:(0,Pt.__)("Delete","templately"),icon:React.createElement(Pn,null),disabled:e,action:of,ModalComponent:Yh}]},sf=function(e,t){var n;(0,t.dispatch)(Im({id:null==e||null===(n=e.content)||void 0===n?void 0:n.id}))},lf=function(e,t){var n,r,o=e.ModalComponent,i=e.content;(0,t.dispatch)(em({id:null==e||null===(n=e.content)||void 0===n?void 0:n.id,page:null==e||null===(r=e.content)||void 0===r?void 0:r.currentPage}));var a={key:"isPushed",error:{args:{timer:null,showCloseButton:!0},title:(0,Pt.__)("Something went wrong.","templately"),content:function(e){var t=e.message;return React.createElement(React.Fragment,null,React.createElement("p",{dangerouslySetInnerHTML:{__html:t}}))}},success:{title:(0,Pt.__)("Successfully Pushed","templately"),content:function(){return React.createElement(React.Fragment,null,(0,Pt.__)("Your file has been pushed successfully to your cloud store.","templately"))}}};ba({showCloseButton:!1,allowOutsideClick:!1,onConfirm:function(e){return wa(a,e)},html:React.createElement(o,i)},!0)},cf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"templately",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r={condition:!1===(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]),modalArgs:{title:"",message:React.createElement(React.Fragment,null,React.createElement("p",null,(0,Pt.__)("The required dependency ‘Elementor’ is missing. Please install it before proceeding.","templately")))},sweetArgs:{icon:"error",title:(0,Pt.__)("Elementor not installed.","templately")}};return[{include:"templately"===t&&void 0,hidden:"templately"===t,className:"tb-import templately-button",name:(0,Pt.__)("Insert","templately"),icon:"",action:Il,ModalComponent:xl,disabled:"Kit"===n},{include:"templately"!==t,className:"tw-preview templately-button",name:(0,Pt.__)("Preview","templately"),icon:"",href:"Kit"!==n,hrefKey:"preview_url",error:r,disabled:"Kit"===n},{include:"templately"!==t,className:"tw-push2cloud templately-button",name:(0,Pt.__)("Push To Cloud","templately"),icon:"",redirect:{state:["profile","data"],if:null,then:"sign-in"},disabled:e||"Kit"===n,action:lf,ModalComponent:ma,error:r},{className:"tw-download",name:(0,Pt.__)("Export","templately"),icon:"",href:"Kit"!==n,hrefKey:"export_url",error:r,disabled:"Kit"===n},{name:(0,Pt.__)("Delete","templately"),icon:React.createElement(Pn,null),disabled:e||"Kit"===n,action:sf,error:r}]},uf=function(e){var t={requirement:e},n=(0,si.addQueryArgs)("/templately/v1/dependencies/install",{disable_redirect:!0});return Si(n,t,{},!0)},df=function(e){return Si("/templately/v1/dependencies/check",e,{},!0)},pf=function(e){return!e||!!e.startsWith("clouds/")||["favourites","downloads","clouds","clouds/shared-workspace","clouds/workspace","clouds/save-template","purchased-items"].includes(e)},hf=function(e,t){return!(!e||t||(ba({icon:!1,showCloseButton:!0,allowOutsideClick:!0,html:React.createElement("div",{className:"templately-import-modal templately-modal"},React.createElement(bl,{code:"invalid_data",title:(0,Pt.__)("Template Import Failed!","templately"),message:(0,Pt.sprintf)((0,Pt.__)('Looks like your account is not verified. Verify your account to start creating your website. Need help? Reach out to our <a href="%s" target="_blank" rel="noopener noreferrer">support team</a> anytime.',"templately"),"https://wpdeveloper.com/support/")}))},!0),0))};function ff(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var mf=function(e,t){var n="elementor"===t,r=e[n?"system_colors":"global_colors"]||[],o=e.custom_colors||[],i={},a=[];return[].concat(Da(r),Da(o)).forEach(function(e){var t=n?"_id":"var",r=n?"title":"name";i[e[t]]=e.color,a.push({_id:e[t],title:e[r],color:e.color})}),{colors:i,_systemColors:a}},gf=function(e,t){return(0,oe.useMemo)(function(){return mf(e,t)},[e,t])},vf=function(e,t){var n="elementor"===t,r="gutenberg"===t,o=(0,_i.cloneDeep)(e),i=n?"custom_typography":"global_typography.custom",a=Ri(o,n?"system_typography":"global_typography",[]),s=Ri(o,i,[]);return r&&delete a.custom,{systemTypography:a,customTypography:s}},yf=function(e,t){var n="elementor"===t,r="gutenberg"===t,o=e.systemTypography,i=e.customTypography;if(r){var a={body:"Text",link:"Link",button:"Button",heading:"Headings",allHeadings:"All"},s=function(e){return Object.entries(e).map(function(e){var t=pe(e,2),n=t[0],r=t[1];return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ff(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ff(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({_id:n,name:a[n]||r.name||n},r)})};o=s(o),i=s(i)}var l=["all","h1","h2","h3","h4","h5","h6"],c={_id:"_id",_index:"_index",title:"title",selectedFont:"typography_font_family",selectedFontWeight:"typography_font_weight",transform:"typography_text_transform",decoration:"typography_text_decoration","selectedSize.desktop.value":"typography_font_size.size","selectedSize.desktop.unit":"typography_font_size.unit","selectedLineHeight.desktop.value":"typography_line_height.size","selectedLineHeight.desktop.unit":"typography_line_height.unit","selectedLetterSpacing.desktop.value":"typography_letter_spacing.size","selectedLetterSpacing.desktop.unit":"typography_letter_spacing.unit","selectedSize.tablet.value":"typography_font_size_tablet.size","selectedSize.tablet.unit":"typography_font_size_tablet.unit","selectedLineHeight.tablet.value":"typography_line_height_tablet.size","selectedLineHeight.tablet.unit":"typography_line_height_tablet.unit","selectedLetterSpacing.tablet.value":"typography_letter_spacing_tablet.size","selectedLetterSpacing.tablet.unit":"typography_letter_spacing_tablet.unit","selectedSize.mobile.value":"typography_font_size_mobile.size","selectedSize.mobile.unit":"typography_font_size_mobile.unit","selectedLineHeight.mobile.value":"typography_line_height_mobile.size","selectedLineHeight.mobile.unit":"typography_line_height_mobile.unit","selectedLetterSpacing.mobile.value":"typography_letter_spacing_mobile.size","selectedLetterSpacing.mobile.unit":"typography_letter_spacing_mobile.unit"},u={_id:"_id",_index:"_index",title:"name",selectedFont:"fontFamily",selectedFontWeight:"fontWeight",transform:"textTransform",decoration:"textDecoration","selectedSize.desktop.value":"fontSize","selectedSize.desktop.unit":"fontSizeUnit","selectedLineHeight.desktop.value":"lineHeight","selectedLineHeight.desktop.unit":"lineHeightUnit","selectedLetterSpacing.desktop.value":"letterSpacing","selectedLetterSpacing.desktop.unit":"letterSpacingUnit","selectedSize.tablet.value":"TABfontSize","selectedSize.tablet.unit":"TABfontSizeUnit","selectedLineHeight.tablet.value":"TABlineHeight","selectedLineHeight.tablet.unit":"TABlineHeightUnit","selectedLetterSpacing.tablet.value":"TABletterSpacing","selectedLetterSpacing.tablet.unit":"TABletterSpacingUnit","selectedSize.mobile.value":"MOBfontSize","selectedSize.mobile.unit":"MOBfontSizeUnit","selectedLineHeight.mobile.value":"MOBlineHeight","selectedLineHeight.mobile.unit":"MOBlineHeightUnit","selectedLetterSpacing.mobile.value":"MOBletterSpacing","selectedLetterSpacing.mobile.unit":"MOBletterSpacingUnit"},d=(0,oe.useMemo)(function(){for(var e=function(e){var t={};return Object.entries(e).forEach(function(e,r){var i=pe(e,2),a=(i[0],i[1]),s={},l=(0,_i.cloneDeep)(a);l._index=r;for(var d=0,p=Object.entries(n?c:u);d<p.length;d++){var h=pe(p[d],2),f=h[0],m=h[1],g=Ri(l,m,null);s=ji(s,f,g)}s._isSystem=o.some(function(e){return e._id===l._id}),t[s._id]=s}),t}([].concat(Da(o),Da(i))),t=[{key:"System Font",items:[]},{key:"Headings",items:[]},{key:"Custom",items:[]}],r=function(){var e=pe(s[a],2),n=(e[0],e[1]),r=l.includes(n.title.trim().toLowerCase())?1:o.some(function(e){return e._id===n._id})?0:2;t[r].items.push({_id:Ri(n,"_id",null),_index:Ri(n,"_index",null),title:Ri(n,"title",null)})},a=0,s=Object.entries(e);a<s.length;a++)r();return t[1].items.sort(function(e,t){return e.title.localeCompare(t.title,"en",{sensitivity:"base"})}),t[1].items.forEach(function(t){e[t._id].title=t.title.toUpperCase()}),t[0].items.sort(function(e,t){return e._index-t._index}),t[2].items.sort(function(e,t){return e._index-t._index}),t=t.filter(function(e){return e.items.length}),{normalizedTypography:e,groupedData:t}},[o,i]);return{normalizedTypography:d.normalizedTypography,groupedData:d.groupedData,getDeNormalizedTypography:function(e){for(var t={},r=0,o=Object.entries(e);r<o.length;r++){for(var i=pe(o[r],2),a=i[0],s=i[1],l={},d=(0,_i.cloneDeep)(s),p=0,h=Object.entries(n?c:u);p<h.length;p++){var f=pe(h[p],2),m=f[0],g=f[1],v=Ri(d,m,null);l=ji(l,g,v)}t[a]=l}return t}}};function bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bf(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kf=function(e){return{type:fr,platform:e}},Ef=function(e){return wf({type:Pr},e)},Of=function(e){return wf({type:Tr},e)},Sf=function(){return Ef({key:"doQuery",data:Date.now()})},xf=function(e){return wf({type:Dr},e)},_f=function(e){return wf({type:Nr},e)},Cf=function(e){return wf({type:Ir},e)},Pf=function(e){return{type:Rr,data:e}},Tf=function(e){return{type:jr,error:e}},Af=function(e){return wf({type:zr},e)},Df=function(e){return wf({type:Br},e)},Mf=function(e){return wf({type:Cr},e)},Nf=function(e){return wf({type:Ur},e)},Lf=function(e){return wf({type:Wr},e)},If=function(e,t){return{type:Hr,id:e,data:t}};function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ff=function(e){return jf({type:Ii(wo,e.key)},e)},zf=function(e){return jf({type:Ii(ko,e.key)},e)},Bf=function(e){return jf({type:Oo},e)},Uf=function(e){return jf({type:So},e)};function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vf(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Hf=function(e){return Wf({type:Ao.LOAD},e)},Qf=function(e){return Wf({type:Ao.LOAD_SUCCESS},e)},qf=function(e){return Wf({type:Ao.LOAD_FAILED},e)},$f=function(e){return Wf({type:Ao.STATUS_SUCCESS},e)},Gf=function(e){return Wf({type:Ao.STATUS_FAILED},e)},Yf=function(e){return Wf({type:Ao.COPY},e)},Xf=function(e){return Wf({type:Ao.COPY_SUCCESS},e)},Kf=function(e){return Wf({type:Ao.MOVE},e)},Zf=function(e){return Wf({type:Ao.MOVE_SUCCESS},e)},Jf=function(e){return Wf({type:Ao.DELETE},e)},em=function(e){return Wf({type:Ao.PUSH},e)},tm=function(e){return Wf({type:Ao.CLEAR_PUSH2CLOUD},e)},nm=function(e){return Wf({type:Ao.PUSH_SUCCESS},e)},rm=function(e){return Wf({type:Ao.PUSH_FAILED},e)},om=function(e){return Wf({type:Ao.DOWNLOAD},e)},im=function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"clouds"){case"clouds":return Ao;case"workspaces":return Do;case"shared_workspaces":return Mo;case"workspace_details":return No}},am=function(e){return Wf({type:im(null==e?void 0:e.source).SEARCH},e)},sm=function(e){return Wf({type:im(null==e?void 0:e.source).SEARCH_SUCCESS},e)};function lm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lm(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var um=function(e){var t;return cm({type:null!==(t=null==e?void 0:e.shared)&&void 0!==t&&t?Mo.LOAD:Do.LOAD},e)},dm=function(e){var t;return cm({type:null!==(t=null==e?void 0:e.shared)&&void 0!==t&&t?Mo.LOAD_LISTS:Do.LOAD_LISTS},e)},pm=function(e){var t;return cm({type:null!==(t=null==e?void 0:e.shared)&&void 0!==t&&t?Mo.SET_LISTS:Do.SET_LISTS},e)},hm=function(e){var t;return cm({type:null!==(t=null==e?void 0:e.shared)&&void 0!==t&&t?Mo.LOAD_SUCCESS:Do.LOAD_SUCCESS},e)},fm=function(e){var t;return cm({type:null!==(t=null==e?void 0:e.shared)&&void 0!==t&&t?Mo.LOAD_FAILED:Do.LOAD_FAILED},e)},mm=function(e){return cm({type:Do.CREATE},e)},gm=function(e){return cm({type:Do.CREATE_SUCCESS},e)},vm=function(e){return cm({type:Do.DELETE},e)},ym=function(e){return cm({type:Do.DELETE_SUCCESS},e)},bm=function(e){return cm({type:Do.SAVE},e)},wm=function(e){return cm({type:No.SET},e)},km=function(e){return cm({type:No.LOAD},e)},Em=function(e){return cm({type:No.LOAD_SUCCESS},e)},Om=function(e){return cm({type:No.DELETE},e)},Sm=function(e){return cm({type:No.GET_FILES},e)},xm=function(e){return cm({type:No.SET_FILES},e)},_m=function(e){return cm({type:No.LOAD_FAILED},e)},Cm=function(e){return cm({type:No.ADD_FILE},e)},Pm=o(4765);function Tm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Am(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Dm=function(e){return Am({type:xo},e)},Mm=function(e){return Am({type:_o},e)},Nm=function(e){return Am({type:Co},e)},Lm=function(e){return Am({type:"SAVED_TEMPLATES_LOAD_FAILED"},e)},Im=function(e){return Am({type:To},e)};function Rm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rm(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fm=function(e){return jm({type:br},e)},zm=function(e){return jm({type:wr},e)},Bm=function(e){return jm({type:Er},e)},Um=function(e){return jm({type:Or},e)},Vm=function(e){return jm({type:xr},e)},Wm=function(e){return jm({type:_r},e)},Hm=function(e){return jm({type:gr},e)},Qm=function(e){return jm({type:Gr},e)},qm=function(e){return jm({type:vr},e)},$m=function(e){return jm({type:Xr},e)},Gm=function(e){return jm({type:Kr},e)},Ym=function(e){return jm({type:so},e)},Xm=function(e){return jm({type:ao},e)},Km=function(e){return jm({type:lo},e)},Zm=function(e){return jm({type:co},e)},Jm=function(e){return jm({type:eo},e)},eg=function(e){return jm({type:to},e)},tg=function(e){return jm({type:no},e)},ng=function(e){return jm({type:ro},e)},rg=function(e){return jm({type:oo},e)};function og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ig(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?og(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):og(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ag=function(e){return ig({type:Uo},e)},sg=function(e){return{type:Lo,step:e}},lg=function(e){return{type:Io,step:e}},cg=function(e){return{type:Ro,payload:e}},ug=function(e){return{type:zo,payload:e}},dg=function(e){return{type:Bo,payload:e}},pg=function(e){return{type:Vo,payload:e}},hg=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:Wo,payload:ig({id:null!==(e=null==t?void 0:t.id)&&void 0!==e?e:null,show:!0},t)}},fg=function(){return{type:Qo,payload:ig({show:!0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},mg=function(){return{type:qo,payload:{show:!1,aiTemplates:null}}},gg=function(e){return{type:$o,payload:{packId:e,isAi:arguments.length>1&&void 0!==arguments[1]&&arguments[1]}}},vg=function(e){return{type:Go,payload:e}},yg=function(e){return{type:Yo,payload:e}},bg=function(e){return{type:Ko,payload:e}},wg=function(e){return{type:Zo,payload:e}},kg=function(){return{type:Jo}},Eg=function(e){return{type:ei.SET_PLATFORM,platform:e}},Og=(0,oe.createContext)();Og.displayName="Anonymous";var Sg,xg=Og.Provider;Og.Consumer,function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(Sg||(Sg={}));var _g="beforeunload";function Cg(e){e.preventDefault(),e.returnValue=""}function Pg(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(e){return e!==t})}},call:function(t){e.forEach(function(e){return e&&e(t)})}}}var Tg,Ag=o(5373);function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ng(){if(!Tg){var e=document.location.pathname,t=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,{pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"}]}var i=null;n.addEventListener("popstate",function(){if(i)d.call(i),i=null;else{var e=Sg.Pop,t=o(),n=t[0],r=t[1];if(d.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){v(-1*a)}},v(a))}}else g(e)}});var a=Sg.Pop,s=o(),l=s[0],c=s[1],u=Pg(),d=Pg();function p(e){return"string"==typeof e?e:function(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,o=void 0===r?"":r,i=e.hash,a=void 0===i?"":i;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}(e)}function h(e,t){return void 0===t&&(t=null),re({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function f(e,t){return[{usr:e.state,key:e.key,idx:t},p(e)]}function m(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function g(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function v(e){r.go(e)}return null==l&&(l=0,r.replaceState(re({},r.state,{idx:l}),"")),{get action(){return a},get location(){return c},createHref:p,push:function e(t,o){var i=Sg.Push,a=h(t,o);if(m(i,a,function(){e(t,o)})){var s=f(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}g(i)}},replace:function e(t,n){var o=Sg.Replace,i=h(t,n);if(m(o,i,function(){e(t,n)})){var a=f(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),g(o)}},go:v,back:function(){v(-1)},forward:function(){v(1)},listen:function(e){return u.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(_g,Cg),function(){t(),d.length||n.removeEventListener(_g,Cg)}}}}({basename:e.substring(0,e.lastIndexOf("/"))});Tg={get length(){return t.length},get action(){return t.action},get location(){var n=t.location,r=(0,Ag.parse)(n.search.substring(1)).path||"/";return r.startsWith("/")||(r="/"+r),Mg(Mg({},n),{},{actualPathname:e,pathname:r})},get pathname(){return this.location.pathname.substring(1)},createHref:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.createHref.apply(t,n)},push:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.push.apply(t,n)},replace:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.replace.apply(t,n)},go:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.go.apply(t,n)},goBack:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.goBack.apply(t,n)},goForward:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.goForward.apply(t,n)},block:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.block.apply(t,n)},listen:function(e){var n=this;return t.listen(function(){e(n.location,n.action)})}}}return Tg}var Lg=Ng();function Ig(){var e=Ng().location.search;return e.length&&(0,Ag.parse)(e.substring(1))||{}}var Rg=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=(0,si.getQueryArgs)(e),a=Ig(),s=Mg(Mg({},a),i);return null!=r&&(s=Mg(Mg({},s),r)),"/"===e||Array.isArray(e)?Array.isArray(e)&&(s.path=e.join("/")):s.path=e,s.path.startsWith("../")&&(s.path=s.path.substring("3")),"elementor"!==(null==a?void 0:a.action)&&"edit"!==(null==a?void 0:a.action)||null==o||o.push("page"),!0===Boolean(null==r?void 0:r.isGutenbergEditor)&&(null==o||o.push("page"),null==o||o.push("isGutenbergEditor")),null!==(t=s)&&void 0!==t&&t.platform&&null!==(n=s.path)&&void 0!==n&&n.startsWith(s.platform)&&(null==o||o.push("platform")),!0===Boolean(null==r?void 0:r.closing)&&(null==o||o.push("closing")),""===e&&(null==o||o.push("path")),(null==o?void 0:o.length)>0&&(s=Bi(s,o)),(0,si.addQueryArgs)(Ng().location.actualPathname,s)},jg=function(e){return"@@redux-saga/"+e},Fg=jg("CANCEL_PROMISE"),zg=jg("CHANNEL_END"),Bg=jg("IO"),Ug=jg("MATCH"),Vg=jg("MULTICAST"),Wg=jg("SAGA_ACTION"),Hg=jg("SELF_CANCELLATION"),Qg=jg("TASK"),qg=jg("TASK_CANCEL"),$g=jg("TERMINATE"),Gg=jg("LOCATION"),Yg=function(e){return null==e},Xg=function(e){return null!=e},Kg=function(e){return"function"==typeof e},Zg=function(e){return"string"==typeof e},Jg=Array.isArray,ev=function(e){return e&&Kg(e.then)},tv=function(e){return e&&Kg(e.next)&&Kg(e.throw)},nv=function e(t){return t&&(Zg(t)||iv(t)||Kg(t)||Jg(t)&&t.every(e))},rv=function(e){return e&&Kg(e.take)&&Kg(e.close)},ov=function(e){return Kg(e)&&e.hasOwnProperty("toString")},iv=function(e){return Boolean(e)&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype},av=function(){return function(){return true}}(),sv=function(){},lv=function(e){return e};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var cv=function(e,t){re(e,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(function(n){e[n]=t[n]})};function uv(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}var dv=function(e){throw e},pv=function(e){return{value:e,done:!0}};function hv(e,t,n){void 0===t&&(t=dv),void 0===n&&(n="iterator");var r={meta:{name:n},next:e,throw:t,return:pv,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function fv(e,t){var n=t.sagaStack;console.error(e),console.error(n)}var mv=function(e){return Array.apply(null,new Array(e))},gv=function(e){return function(t){return e(Object.defineProperty(t,Wg,{value:!0}))}},vv=function(e){return e===$g},yv=function(e){return e===qg},bv=function(e){return vv(e)||yv(e)};function wv(e,t){var n,r=Object.keys(e),o=r.length,i=0,a=Jg(e)?mv(o):{},s={};return r.forEach(function(e){var r=function(r,s){n||(s||bv(r)?(t.cancel(),t(r,s)):(a[e]=r,++i===o&&(n=!0,t(a))))};r.cancel=sv,s[e]=r}),t.cancel=function(){n||(n=!0,r.forEach(function(e){return s[e].cancel()}))},s}function kv(e){return{name:e.name||"anonymous",location:Ev(e)}}function Ev(e){return e[Gg]}function Ov(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}var Sv=function(e){return function(e,t){void 0===e&&(e=10);var n=new Array(e),r=0,o=0,i=0,a=function(t){n[o]=t,o=(o+1)%e,r++},s=function(){if(0!=r){var t=n[i];return n[i]=null,r--,i=(i+1)%e,t}},l=function(){for(var e=[];r;)e.push(s());return e};return{isEmpty:function(){return 0==r},put:function(s){var c;if(r<e)a(s);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:n[o]=s,i=o=(o+1)%e;break;case 4:c=2*e,n=l(),r=n.length,o=n.length,i=0,n.length=c,e=c,a(s)}},take:s,flush:l}}(e,4)},xv="TAKE",_v="CALL",Cv="FORK",Pv="CANCEL",Tv="SELECT",Av=function(e,t){var n;return(n={})[Bg]=!0,n.combinator=!1,n.type=e,n.payload=t,n};function Dv(e,t){return void 0===e&&(e="*"),nv(e)?(Xg(t)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),Av(xv,{pattern:e})):rv(n=e)&&n[Vg]&&Xg(t)&&nv(t)?Av(xv,{channel:e,pattern:t}):rv(e)?(Xg(t)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),Av(xv,{channel:e})):void 0;var n}function Mv(e,t){return Yg(t)&&(t=e,e=void 0),Av("PUT",{channel:e,action:t})}function Nv(e){var t=Av("ALL",e);return t.combinator=!0,t}function Lv(e,t){var n,r=null;return Kg(e)?n=e:(Jg(e)?(r=e[0],n=e[1]):(r=e.context,n=e.fn),r&&Zg(n)&&Kg(r[n])&&(n=r[n])),{context:r,fn:n,args:t}}function Iv(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Av(_v,Lv(e,n))}function Rv(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Av(Cv,Lv(e,n))}function jv(e){void 0===e&&(e=lv);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Av(Tv,{selector:e,args:n})}const Fv=function(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e};var zv=[],Bv=0;function Uv(e){try{Hv(),e()}finally{Qv()}}function Vv(e){zv.push(e),Bv||(Hv(),qv())}function Wv(e){try{return Hv(),e()}finally{qv()}}function Hv(){Bv++}function Qv(){Bv--}function qv(){var e;for(Qv();!Bv&&void 0!==(e=zv.shift());)Uv(e)}var $v=function(e){return function(t){return e.some(function(e){return Zv(e)(t)})}},Gv=function(e){return function(t){return e(t)}},Yv=function(e){return function(t){return t.type===String(e)}},Xv=function(e){return function(t){return t.type===e}},Kv=function(){return av};function Zv(e){var t="*"===e?Kv:Zg(e)?Yv:Jg(e)?$v:ov(e)?Yv:Kg(e)?Gv:iv(e)?Xv:null;if(null===t)throw new Error("invalid pattern: "+e);return t(e)}var Jv={type:zg},ey=function(e){return e&&e.type===zg};function ty(){var e=function(){var e,t=!1,n=[],r=n,o=function(){r===n&&(r=n.slice())},i=function(){t=!0;var e=n=r;r=[],e.forEach(function(e){e(Jv)})};return(e={})[Vg]=!0,e.put=function(e){if(!t)if(ey(e))i();else for(var o=n=r,a=0,s=o.length;a<s;a++){var l=o[a];l[Ug](e)&&(l.cancel(),l(e))}},e.take=function(e,n){var i,a;void 0===n&&(n=Kv),t?e(Jv):(e[Ug]=n,o(),r.push(e),e.cancel=(i=function(){o(),uv(r,e)},a=!1,function(){a||(a=!0,i())}))},e.close=i,e}(),t=e.put;return e.put=function(e){e[Wg]?t(e):Vv(function(){t(e)})},e}function ny(e,t){var n=e[Fg];Kg(n)&&(t.cancel=n),e.then(t,function(e){t(e,!0)})}var ry,oy=0,iy=function(){return++oy};function ay(e){e.isRunning()&&e.cancel()}var sy=((ry={})[xv]=function(e,t,n){var r=t.channel,o=void 0===r?e.channel:r,i=t.pattern,a=t.maybe,s=function(e){e instanceof Error?n(e,!0):!ey(e)||a?n(e):n($g)};try{o.take(s,Xg(i)?Zv(i):null)}catch(e){return void n(e,!0)}n.cancel=s.cancel},ry.PUT=function(e,t,n){var r=t.channel,o=t.action,i=t.resolve;Vv(function(){var t;try{t=(r?r.put:e.dispatch)(o)}catch(e){return void n(e,!0)}i&&ev(t)?ny(t,n):n(t)})},ry.ALL=function(e,t,n,r){var o=r.digestEffect,i=oy,a=Object.keys(t);if(0!==a.length){var s=wv(t,n);a.forEach(function(e){o(t[e],i,s[e],e)})}else n(Jg(t)?[]:{})},ry.RACE=function(e,t,n,r){var o=r.digestEffect,i=oy,a=Object.keys(t),s=Jg(t)?mv(a.length):{},l={},c=!1;a.forEach(function(e){var t=function(t,r){c||(r||bv(t)?(n.cancel(),n(t,r)):(n.cancel(),c=!0,s[e]=t,n(s)))};t.cancel=sv,l[e]=t}),n.cancel=function(){c||(c=!0,a.forEach(function(e){return l[e].cancel()}))},a.forEach(function(e){c||o(t[e],i,l[e],e)})},ry[_v]=function(e,t,n,r){var o=t.context,i=t.fn,a=t.args,s=r.task;try{var l=i.apply(o,a);if(ev(l))return void ny(l,n);if(tv(l))return void yy(e,l,s.context,oy,kv(i),!1,n);n(l)}catch(e){n(e,!0)}},ry.CPS=function(e,t,n){var r=t.context,o=t.fn,i=t.args;try{var a=function(e,t){Yg(e)?n(t):n(e,!0)};o.apply(r,i.concat(a)),a.cancel&&(n.cancel=a.cancel)}catch(e){n(e,!0)}},ry[Cv]=function(e,t,n,r){var o=t.context,i=t.fn,a=t.args,s=t.detached,l=r.task,c=function(e){var t=e.context,n=e.fn,r=e.args;try{var o=n.apply(t,r);if(tv(o))return o;var i=!1;return hv(function(e){return i?{value:e,done:!0}:(i=!0,{value:o,done:!ev(o)})})}catch(e){return hv(function(){throw e})}}({context:o,fn:i,args:a}),u=function(e,t){return e.isSagaIterator?{name:e.meta.name}:kv(t)}(c,i);Wv(function(){var t=yy(e,c,l.context,oy,u,s,void 0);s?n(t):t.isRunning()?(l.queue.addTask(t),n(t)):t.isAborted()?l.queue.abort(t.error()):n(t)})},ry.JOIN=function(e,t,n,r){var o=r.task,i=function(e,t){if(e.isRunning()){var n={task:o,cb:t};t.cancel=function(){e.isRunning()&&uv(e.joiners,n)},e.joiners.push(n)}else e.isAborted()?t(e.error(),!0):t(e.result())};if(Jg(t)){if(0===t.length)return void n([]);var a=wv(t,n);t.forEach(function(e,t){i(e,a[t])})}else i(t,n)},ry[Pv]=function(e,t,n,r){var o=r.task;t===Hg?ay(o):Jg(t)?t.forEach(ay):ay(t),n()},ry[Tv]=function(e,t,n){var r=t.selector,o=t.args;try{n(r.apply(void 0,[e.getState()].concat(o)))}catch(e){n(e,!0)}},ry.ACTION_CHANNEL=function(e,t,n){var r=t.pattern,o=function(e){void 0===e&&(e=Sv());var t=!1,n=[];return{take:function(r){t&&e.isEmpty()?r(Jv):e.isEmpty()?(n.push(r),r.cancel=function(){uv(n,r)}):r(e.take())},put:function(r){if(!t){if(0===n.length)return e.put(r);n.shift()(r)}},flush:function(n){t&&e.isEmpty()?n(Jv):n(e.flush())},close:function(){if(!t){t=!0;var e=n;n=[];for(var r=0,o=e.length;r<o;r++)(0,e[r])(Jv)}}}}(t.buffer),i=Zv(r),a=function t(n){ey(n)||e.channel.take(t,i),o.put(n)},s=o.close;o.close=function(){a.cancel(),s()},e.channel.take(a,i),n(o)},ry.CANCELLED=function(e,t,n,r){n(r.task.isCancelled())},ry.FLUSH=function(e,t,n){t.flush(n)},ry.GET_CONTEXT=function(e,t,n,r){n(r.task.context[t])},ry.SET_CONTEXT=function(e,t,n,r){var o=r.task;cv(o.context,t),n()},ry);function ly(e,t){return e+"?"+t}function cy(e){var t=e.name,n=e.location;return n?t+" "+ly(n.fileName,n.lineNumber):t}function uy(e){var t=function(e,t){var n;return(n=[]).concat.apply(n,t.map(function(e){return e.cancelledTasks}))}(0,e);return t.length?["Tasks cancelled due to error:"].concat(t).join("\n"):""}var dy=null,py=[],hy=function(e){e.crashedEffect=dy,py.push(e)},fy=function(){dy=null,py.length=0},my=function(e){dy=e},gy=function(){var e=py[0],t=py.slice(1),n=e.crashedEffect?function(e){var t=Ev(e);return t?t.code+" "+ly(t.fileName,t.lineNumber):""}(e.crashedEffect):null;return["The above error occurred in task "+cy(e.meta)+(n?" \n when executing effect "+n:"")].concat(t.map(function(e){return" created by "+cy(e.meta)}),[uy(py)]).join("\n")};function vy(e,t,n,r,o,i,a){var s;void 0===a&&(a=sv);var l,c,u=0,d=null,p=[],h=Object.create(n),f=function(e,t,n){var r,o=[],i=!1;function a(e){p.push.apply(p,f.getTasks().map(function(e){return e.meta.name})),l(),n(e,!0)}function s(t){o.push(t),t.cont=function(s,l){i||(uv(o,t),t.cont=sv,l?a(s):(t===e&&(r=s),o.length||(i=!0,n(r))))}}function l(){i||(i=!0,o.forEach(function(e){e.cont=sv,e.cancel()}),o=[])}return s(e),{addTask:s,cancelAll:l,abort:a,getTasks:function(){return o}}}(t,0,m);function m(t,n){if(n){if(u=2,hy({meta:o,cancelledTasks:p}),g.isRoot){var r=gy();fy(),e.onError(t,{sagaStack:r})}c=t,d&&d.reject(t)}else t===qg?u=1:1!==u&&(u=3),l=t,d&&d.resolve(t);g.cont(t,n),g.joiners.forEach(function(e){e.cb(t,n)}),g.joiners=null}var g=((s={})[Qg]=!0,s.id=r,s.meta=o,s.isRoot=i,s.context=h,s.joiners=[],s.queue=f,s.cancel=function(){0===u&&(u=1,f.cancelAll(),m(qg,!1))},s.cont=a,s.end=m,s.setContext=function(e){cv(h,e)},s.toPromise=function(){return d||(d=Fv(),2===u?d.reject(c):0!==u&&d.resolve(l)),d.promise},s.isRunning=function(){return 0===u},s.isCancelled=function(){return 1===u||0===u&&1===t.status},s.isAborted=function(){return 2===u},s.result=function(){return l},s.error=function(){return c},s);return g}function yy(e,t,n,r,o,i,a){var s=e.finalizeRunEffect(function(t,n,r){ev(t)?ny(t,r):tv(t)?yy(e,t,c.context,n,o,!1,r):t&&t[Bg]?(0,sy[t.type])(e,t.payload,r,u):r(t)});d.cancel=sv;var l={meta:o,cancel:function(){0===l.status&&(l.status=1,d(qg))},status:0},c=vy(e,l,n,r,o,i,a),u={task:c,digestEffect:p};return a&&(a.cancel=c.cancel),d(),c;function d(e,n){try{var o;n?(o=t.throw(e),fy()):yv(e)?(l.status=1,d.cancel(),o=Kg(t.return)?t.return(qg):{done:!0,value:qg}):o=vv(e)?Kg(t.return)?t.return():{done:!0}:t.next(e),o.done?(1!==l.status&&(l.status=3),l.cont(o.value)):p(o.value,r,d)}catch(e){if(1===l.status)throw e;l.status=2,l.cont(e,!0)}}function p(t,n,r,o){void 0===o&&(o="");var i,a=iy();function l(n,o){i||(i=!0,r.cancel=sv,e.sagaMonitor&&(o?e.sagaMonitor.effectRejected(a,n):e.sagaMonitor.effectResolved(a,n)),o&&my(t),r(n,o))}e.sagaMonitor&&e.sagaMonitor.effectTriggered({effectId:a,parentEffectId:n,label:o,effect:t}),l.cancel=sv,r.cancel=function(){i||(i=!0,l.cancel(),l.cancel=sv,e.sagaMonitor&&e.sagaMonitor.effectCancelled(a))},s(t,a,l)}}function by(e,t){for(var n=e.channel,r=void 0===n?ty():n,o=e.dispatch,i=e.getState,a=e.context,s=void 0===a?{}:a,l=e.sagaMonitor,c=e.effectMiddlewares,u=e.onError,d=void 0===u?fv:u,p=arguments.length,h=new Array(p>2?p-2:0),f=2;f<p;f++)h[f-2]=arguments[f];var m,g=t.apply(void 0,h),v=iy();if(l&&(l.rootSagaStarted=l.rootSagaStarted||sv,l.effectTriggered=l.effectTriggered||sv,l.effectResolved=l.effectResolved||sv,l.effectRejected=l.effectRejected||sv,l.effectCancelled=l.effectCancelled||sv,l.actionDispatched=l.actionDispatched||sv,l.rootSagaStarted({effectId:v,saga:t,args:h})),c){var y=Ov.apply(void 0,c);m=function(e){return function(t,n,r){return y(function(t){return e(t,n,r)})(t)}}}else m=lv;var b={channel:r,dispatch:gv(o),getState:i,sagaMonitor:l,onError:d,finalizeRunEffect:m};return Wv(function(){var e=yy(b,g,s,v,kv(t),!0,void 0);return l&&l.effectResolved(v,e),e})}const wy=function(e){var t,n=void 0===e?{}:e,r=n.context,o=void 0===r?{}:r,i=n.channel,a=void 0===i?ty():i,s=n.sagaMonitor,l=Rt(n,["context","channel","sagaMonitor"]);function c(e){var n=e.getState,r=e.dispatch;return t=by.bind(null,re({},l,{context:o,channel:a,dispatch:r,getState:n,sagaMonitor:s})),function(e){return function(t){s&&s.actionDispatched&&s.actionDispatched(t);var n=e(t);return a.put(t),n}}}return c.run=function(){return t.apply(void 0,arguments)},c.setContext=function(e){cv(o,e)},c};var ky=function(e){return{done:!0,value:e}},Ey={};function Oy(e){return rv(e)?"channel":ov(e)?String(e):Kg(e)?e.name:String(e)}function Sy(e,t,n){var r,o,i,a=t;function s(t,n){if(a===Ey)return ky(t);if(n&&!o)throw a=Ey,n;r&&r(t);var s=n?e[o](n):e[a]();return a=s.nextState,i=s.effect,r=s.stateUpdater,o=s.errorState,a===Ey?ky(t):i}return hv(s,function(e){return s(null,e)},n)}function xy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i,a={done:!1,value:Dv(e)},s=function(e){return i=e};return Sy({q1:function(){return{nextState:"q2",effect:a,stateUpdater:s}},q2:function(){return{nextState:"q1",effect:(e=i,{done:!1,value:Rv.apply(void 0,[t].concat(r,[e]))})};var e}},"q1","takeEvery("+Oy(e)+", "+t.name+")")}function _y(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i,a,s={done:!1,value:Dv(e)},l=function(e){return{done:!1,value:Rv.apply(void 0,[t].concat(r,[e]))}},c=function(e){return{done:!1,value:(t=e,void 0===t&&(t=Hg),Av(Pv,t))};var t},u=function(e){return i=e},d=function(e){return a=e};return Sy({q1:function(){return{nextState:"q2",effect:s,stateUpdater:d}},q2:function(){return i?{nextState:"q3",effect:c(i)}:{nextState:"q1",effect:l(a),stateUpdater:u}},q3:function(){return{nextState:"q1",effect:l(a),stateUpdater:u}}},"q1","takeLatest("+Oy(e)+", "+t.name+")")}function Cy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Rv.apply(void 0,[xy,e,t].concat(r))}function Py(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return Rv.apply(void 0,[_y,e,t].concat(r))}var Ty=["type"],Ay=oi().mark(My);function Dy(e){return e.type,Bn(e,Ty),oi().mark(function e(){var t,n,r;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/dependencies");case 1:if(t=e.sent,n=t.response,t.error,!n){e.next=2;break}return e.next=2,Mv(xf({dependencies:n}));case 2:e.next=4;break;case 3:e.prev=3,r=e.catch(0),console.error("DEPENDENCIES ERROR: ",r);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function My(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Ar,Dy);case 1:case"end":return e.stop()}},Ay)}var Ny=["type"],Ly=oi().mark(Ry);function Iy(e){return e.type,Bn(e,Ny),oi().mark(function e(){var t,n;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/tags");case 1:if(t=e.sent,n=t.response,t.error,!n){e.next=2;break}return e.next=2,Mv(_f({tags:n}));case 2:e.next=4;break;case 3:e.prev=3,e.catch(0);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Ry(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Mr,Iy);case 1:case"end":return e.stop()}},Ly)}var jy=["type"],Fy=oi().mark(By);function zy(e){e.type;var t=Bn(e,jy);return oi().mark(function e(){var n,r,o,i,a,s,l,c,u,d,p,h,f,m,g;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=t.key,r=t.data,!(o={tags:"tags",dependencies:"dependencies",activeFilter:"activeFilter",template_type_id:"templateType",category_id:"category"}).hasOwnProperty(n)){e.next=8;break}if(i=[],a=Ig(),s=o[n],"dependencies"!==n){e.next=1;break}a.exclude=r.exclude.join(","),a.include=r.include.join(","),0===r.exclude.length&&i.push("exclude"),0===r.include.length&&i.push("include"),e.next=7;break;case 1:if("tags"!==n){e.next=2;break}a.tags=r.join(","),e.next=7;break;case 2:if("template_type_id"!==n){e.next=4;break}return e.next=3,jv(function(e){var t,n;return{types:null!==(t=null===(n=e.general.templateTypes)||void 0===n?void 0:n.lists)&&void 0!==t?t:[]}});case 3:l=e.sent,c=l.types,u=c.find(function(e){return e.id===r}),a[s]=(null==u?void 0:u.slug)||"all",e.next=7;break;case 4:if("category_id"!==n){e.next=6;break}return e.next=5,jv(function(e){var t,n;return{categories:null!==(t=null===(n=e.general.categories)||void 0===n?void 0:n.lists)&&void 0!==t?t:[]}});case 5:d=e.sent,p=d.categories,h=p.find(function(e){return e.id===r}),a[s]=(null==h?void 0:h.slug)||"all",e.next=7;break;case 6:a[s]=r;case 7:null!=a&&a[s]||i.push(s),f=Rg(a.path,a,i),(m=Ng().location).actualPathname+m.search!==f&&Ng().push(f,{resetFilter:!1});case 8:e.next=10;break;case 9:e.prev=9,g=e.catch(0),console.error("FILTER ERROR: ",g);case 10:case"end":return e.stop()}},e,null,[[0,9]])})()}function By(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Pr,zy);case 1:case"end":return e.stop()}},Fy)}var Uy=["type"],Vy=["type"],Wy=oi().mark(qy);function Hy(e){e.type;var t=Bn(e,Uy);return oi().mark(function e(){var n,r;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){var n,r;return{typeLists:null!==(n=null===(r=e.general.templateTyps)||void 0===r||null===(r=r.lists)||void 0===r?void 0:r[null==t?void 0:t.itemType])&&void 0!==n?n:[]}});case 1:if(!(e.sent.typeLists.length>0)){e.next=2;break}return e.abrupt("return");case 2:return e.next=3,Oi("/templately/v1/templateTypes",t);case 3:if(n=e.sent,r=n.response,n.error,!r){e.next=4;break}return e.next=4,Mv(Cf({types:r}));case 4:e.next=6;break;case 5:e.prev=5,e.catch(0);case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function Qy(e){return e.type,Bn(e,Vy),oi().mark(function e(){var t,n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Oi("/templately/v1/pricing");case 1:if(t=e.sent,n=t.response,r=t.error,!n){e.next=3;break}return e.next=2,Mv(Pf(n));case 2:return e.abrupt("return");case 3:if(!r){e.next=4;break}return e.next=4,Mv(Tf({code:null!==(o=null==r?void 0:r.code)&&void 0!==o?o:"pricing_fetch_failed",message:null==r?void 0:r.message,additional_errors:null==r?void 0:r.additional_errors}));case 4:case"end":return e.stop()}},e)})()}function qy(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(fr,Qy);case 1:return e.next=2,Py(Lr,Hy);case 2:case"end":return e.stop()}},Wy)}var $y=["type"],Gy=["type"],Yy=["type"],Xy=["type"],Ky=["type"],Zy=oi().mark(ab);function Jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jy(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tb(e){e.type;var t=Bn(e,$y);return oi().mark(function e(){var n,r,o,i,a,s,l,c,u,d,p;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.platform,r=t.itemType,o=t.plan,i=t.page,e.next=1,jv(function(e){var t,a,s;return{favLists:null!==(t=null===(a=e.profile.favourites)||void 0===a||null===(a=a[o])||void 0===a||null===(a=a[n])||void 0===a||null===(a=a[r])||void 0===a?void 0:a[i])&&void 0!==t?t:[],totalPage:null===(s=e.profile.favourites)||void 0===s||null===(s=s[o])||void 0===s||null===(s=s[n])||void 0===s||null===(s=s[r])||void 0===s?void 0:s.totalPage}});case 1:if(a=e.sent,s=a.favLists,l=a.totalPage,!((null==s?void 0:s.length)>0)){e.next=3;break}return e.next=2,Mv(Gm({data:s,current_page:i,total_page:l,platform:n,itemType:r,plan:o}));case 2:return e.abrupt("return");case 3:return e.next=4,Oi("/templately/v1/profile/my-favourites",t);case 4:if(c=e.sent,u=c.response,d=c.error,!u){e.next=7;break}if(!0!==(null==u?void 0:u.redirect)){e.next=6;break}return e.next=5,Mv(Nf(u));case 5:e.next=7;break;case 6:return e.next=7,Mv(Gm(eb(eb({},u),{},{platform:n,itemType:r,plan:o})));case 7:d&&console.error("Error: P100",d),e.next=9;break;case 8:e.prev=8,p=e.catch(0),console.error("Error: P100",p);case 9:case"end":return e.stop()}},e,null,[[0,8]])})()}function nb(e){var t=e.type,n=Bn(e,Gy);return oi().mark(function e(){var r,o,i,a;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){return null!==e.profile.data});case 1:if(e.sent){e.next=2;break}return e.abrupt("return");case 2:return e.next=3,Oi("/templately/v1/profile/download-history",n);case 3:if(r=e.sent,o=r.response,i=r.error,!o){e.next=6;break}if(!0!==(null==o?void 0:o.redirect)||t===fr){e.next=5;break}return e.next=4,Mv(Nf(o));case 4:e.next=6;break;case 5:return e.next=6,Mv(ng(o));case 6:if(!i){e.next=7;break}return console.error("Error P101: ",i),e.next=7,Mv(rg(i));case 7:e.next=9;break;case 8:return e.prev=8,a=e.catch(0),console.error("Error P101: ",a),e.next=9,Mv(rg(a));case 9:case"end":return e.stop()}},e,null,[[0,8]])})()}function rb(e){return e.type,Bn(e,Yy),oi().mark(function e(){var t,n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/profile/sync");case 1:if(t=e.sent,n=t.response,r=t.error,!n){e.next=4;break}if("success"!=(null==n?void 0:n.status)){e.next=3;break}return e.next=2,Mv(Bm(null==n?void 0:n.user));case 2:ba({icon:"success",timer:2e3,html:React.createElement(EO,{title:(0,Pt.__)("Successfully Synced Account","templately")})},!1);case 3:if("error"!=(null==n?void 0:n.status)){e.next=4;break}return e.next=4,Mv(Um({code:"sync_failed",message:n.message}));case 4:if(!r){e.next=5;break}return e.next=5,Mv(Um({code:"sync_failed",message:r}));case 5:e.next=8;break;case 6:return e.prev=6,o=e.catch(0),e.next=7,Mv(Um({code:"sync_failed",message:o}));case 7:console.error("Sync Error: ",o);case 8:case"end":return e.stop()}},e,null,[[0,6]])})()}function ob(e){return e.type,Bn(e,Xy),oi().mark(function e(){var t,n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Mv({type:yr});case 1:return e.next=2,Oi("/templately/v1/profile/verified");case 2:if(t=e.sent,n=t.response,r=t.error,null==n){e.next=3;break}return e.next=3,Mv(qm({is_verified:n}));case 3:r&&console.error("Sync Error: ",r),e.next=5;break;case 4:e.prev=4,o=e.catch(0),console.error("Sync Error: ",o);case 5:case"end":return e.stop()}},e,null,[[0,4]])})()}function ib(e){var t=e.type,n=Bn(e,Ky);return oi().mark(function e(){var r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){return null!==e.profile.data});case 1:if(e.sent){e.next=2;break}return e.abrupt("return");case 2:return"APPLICATION_SET_PLATFORM"==t&&(n=eb(eb({},n),{},{all:!0})),e.next=3,Oi("/templately/v1/profile/purchased-items",n);case 3:if(r=e.sent,o=r.response,i=r.error,t===fr){e.next=4;break}if(!0!==(null==o?void 0:o.redirect)){e.next=4;break}return e.next=4,Mv(Nf(o));case 4:if(!o||"APPLICATION_SET_PLATFORM"!=t){e.next=5;break}return s={},(null==o||null===(a=o.data)||void 0===a?void 0:a.length)>0&&(null==o||o.data.map(function(e){s[e.type]=null==(null==s?void 0:s[e.type])?[e.item_id]:[].concat(Da(null==s?void 0:s[e.type]),[e.item_id])})),e.next=5,Mv(Ym({data:s}));case 5:if(!o||"APPLICATION_SET_PLATFORM"==t){e.next=6;break}return e.next=6,Mv(Km(o));case 6:if(!i||"APPLICATION_SET_PLATFORM"==t){e.next=7;break}return console.error("Error P103: ",i),e.next=7,Mv(Zm(i));case 7:e.next=9;break;case 8:if(e.prev=8,l=e.catch(0),console.error("Error P103: ",l),"APPLICATION_SET_PLATFORM"==t){e.next=9;break}return e.next=9,Mv(Zm(l));case 9:case"end":return e.stop()}},e,null,[[0,8]])})()}function ab(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Xr,tb);case 1:return e.next=2,Py(no,nb);case 2:return e.next=3,Py($r,rb);case 3:return e.next=4,Py(Gr,ob);case 4:return e.next=5,Py(ao,ib);case 5:return e.next=6,Py(fr,ib);case 6:return e.next=7,Py(fr,nb);case 7:case"end":return e.stop()}},Zy)}var sb=["type"],lb=["type","isGloballySigned"],cb=["type"],ub=["type"],db=oi().mark(gb);function pb(e){return e.type,Bn(e,sb),oi().mark(function e(){var t,n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=null,e.next=1,jv(function(e){var t,n,r,o,i;return{user:null!==(t=null!==(n=null===(r=e.profile)||void 0===r?void 0:r.prevData)&&void 0!==n?n:null===(o=e.profile)||void 0===o?void 0:o.data)&&void 0!==t?t:null,error:null!==(i=e.profile.error)&&void 0!==i?i:null}});case 1:if(n=e.sent,r=n.user,o=n.error,t=o,!r){e.next=3;break}return e.next=2,Mv(Bm(r));case 2:return e.abrupt("return");case 3:if(null!=r){e.next=7;break}return e.next=4,Oi("/templately/v1/is-signed");case 4:if(i=e.sent,a=i.response,s=i.error,t=s,!a||null===(null==a?void 0:a.user)){e.next=6;break}return e.next=5,Mv(Bm(null==a?void 0:a.user));case 5:e.next=7;break;case 6:return e.next=7,Mv(Um({code:"is_signed_failed",message:t}));case 7:if(!t){e.next=8;break}return e.next=8,Mv(Um({code:"is_signed_failed",message:t}));case 8:e.next=10;break;case 9:return e.prev=9,l=e.catch(0),e.next=10,Mv(Um({code:"is_signed_failed",message:l}));case 10:case"end":return e.stop()}},e,null,[[0,9]])})()}function hb(e){e.type;var t=e.isGloballySigned;return Bn(e,lb),oi().mark(function e(){var n,r,o,i,a;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/logout");case 1:if(n=e.sent,r=n.response,o=n.error,!r){e.next=3;break}if("success"!=(null==r?void 0:r.status)){e.next=3;break}return e.next=2,Mv(zm({isGloballySigned:t,global_user:null!==(i=null==r?void 0:r.global_user)&&void 0!==i?i:void 0}));case 2:return e.abrupt("return");case 3:if(!o){e.next=4;break}return e.next=4,Mv(Um({code:"logout_failed",message:o}));case 4:e.next=6;break;case 5:return e.prev=5,a=e.catch(0),e.next=6,Mv(Um({code:"logout_failed",message:a}));case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function fb(e){e.type;var t=Bn(e,cb);return oi().mark(function e(){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/login",t);case 1:if(n=e.sent,r=n.response,o=n.error,!r){e.next=3;break}if("success"!==(null==r?void 0:r.status)){e.next=2;break}return e.next=2,Mv(Bm(null==r?void 0:r.user));case 2:if("error"!==(null==r?void 0:r.status)){e.next=3;break}return e.next=3,Mv(Um({code:"login_failed",message:r.message}));case 3:if(!o){e.next=4;break}return e.next=4,Mv(Um({code:"login_failed",message:o}));case 4:e.next=6;break;case 5:return e.prev=5,i=e.catch(0),e.next=6,Mv(Um({code:"login_failed",message:i}));case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function mb(e){e.type;var t=Bn(e,ub);return oi().mark(function e(){var n,r,o,i,a;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/signup",t);case 1:if(n=e.sent,r=n.response,o=n.error,!r){e.next=3;break}if("success"!=(null==r?void 0:r.status)){e.next=2;break}return e.next=2,Mv(Vm(null==r?void 0:r.user));case 2:if("error"!=(null==r?void 0:r.status)){e.next=3;break}return e.next=3,Mv(Wm({code:"signup_failed",message:r.message,additional_errors:r.additional_errors}));case 3:if(!o){e.next=4;break}return e.next=4,Mv(Wm({code:null!==(i=null==o?void 0:o.code)&&void 0!==i?i:"signup_failed",message:null==o?void 0:o.message,additional_errors:null==o?void 0:o.additional_errors}));case 4:e.next=6;break;case 5:return e.prev=5,a=e.catch(0),e.next=6,Mv(Wm({code:"signup_failed",message:a}));case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function gb(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Cy(Ao.LOAD,pb);case 1:return e.next=2,Cy(Yr,pb);case 2:return e.next=3,Py(kr,fb);case 3:return e.next=4,Py(Sr,mb);case 4:return e.next=5,Py(br,hb);case 5:case"end":return e.stop()}},db)}var vb=["type"],yb=oi().mark(wb);function bb(e){return e.type,Bn(e,vb),oi().mark(function e(){var t,n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){var t,n;return{categoryLists:null!==(t=null===(n=e.general.categories)||void 0===n?void 0:n.lists)&&void 0!==t?t:[]}});case 1:if(!(e.sent.categoryLists.length>0)){e.next=2;break}return e.abrupt("return");case 2:return e.next=3,Oi("/templately/v1/categories");case 3:if(t=e.sent,n=t.response,r=t.error,!n){e.next=4;break}return e.next=4,Mv(Af({categories:n}));case 4:if(!r){e.next=5;break}return e.next=5,Mv(Df({error:r}));case 5:e.next=7;break;case 6:return e.prev=6,o=e.catch(0),e.next=7,Mv(Df({error:o}));case 7:case"end":return e.stop()}},e,null,[[0,6]])})()}function wb(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Fr,bb);case 1:case"end":return e.stop()}},yb)}var kb=["type"],Eb=oi().mark(Sb);function Ob(e){e.type;var t=Bn(e,kb);return oi().mark(function e(){var n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/dependencies/check",t);case 1:return n=e.sent,r=n.response,n.error,e.abrupt("return",r);case 2:e.prev=2,o=e.catch(0),console.error("Error D101: ",o);case 3:case"end":return e.stop()}},e,null,[[0,2]])})()}function Sb(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py("APPLICATION_CHECK_DEPENDENCIES",Ob);case 1:case"end":return e.stop()}},Eb)}var xb=["type"],_b=["type"],Cb=oi().mark(Ab);function Pb(e){e.type;var t=Bn(e,xb);return oi().mark(function e(){var n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/conditions",t);case 1:if(n=e.sent,r=n.response,n.error,!r){e.next=3;break}return e.next=2,Mv(Lf(r.config));case 2:if(null==(null==r?void 0:r.template_conditions)){e.next=3;break}return e.next=3,Mv(If(t.template_id,r.template_conditions));case 3:e.next=5;break;case 4:e.prev=4,o=e.catch(0),console.error("Condition Failed",o);case 5:case"end":return e.stop()}},e,null,[[0,4]])})()}function Tb(e){e.type;var t=Bn(e,_b);return oi().mark(function e(){var n,r,o,i,a;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.id,e.next=1,jv(function(e){return e.conditions.conditionsForSave[n]});case 1:return r=e.sent,e.next=2,Si("/templately/v1/save-conditions",{template_id:n,conditions:null!=r?r:[]});case 2:o=e.sent,i=o.response,o.error,i&&window.TemplatelyAppManager.close("templately-edit-conditions-app"),e.next=4;break;case 3:e.prev=3,a=e.catch(0),console.error("Condition Failed",a);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Ab(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Vr,Pb);case 1:return e.next=2,Py(Qr,Tb);case 2:case"end":return e.stop()}},Cb)}var Db=["type"],Mb=oi().mark(Fb),Nb=oi().mark(Ub);function Lb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ib(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lb(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return oi().mark(function n(){var r,o,i;return oi().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=1,Iv(fetch,e,Ib({method:"GET",headers:{"Content-Type":"application/json"}},t));case 1:if((r=n.sent).ok){n.next=2;break}throw new Error("HTTP error! status: ".concat(r.status));case 2:return n.next=3,Iv([r,"json"]);case 3:return o=n.sent,n.abrupt("return",{data:o,error:null});case 4:return n.prev=4,i=n.catch(0),n.abrupt("return",{data:null,error:i.message});case 5:case"end":return n.stop()}},n,null,[[0,4]])})()}function jb(e){var t=e.payload;return oi().mark(function e(){var n,r,o,i,a,s,l,c,u,d,p;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.packId,r=t.isAi,o={id:n,isAi:r,action:"templately_pack_import_info",nonce:window.templately.nonce},i=(0,si.addQueryArgs)(window.ajaxurl,o),e.next=1,Iv(Rb,i);case 1:if(a=e.sent,s=a.data,!(l=a.error)){e.next=3;break}return e.next=2,Mv(yg(l));case 2:e.next=5;break;case 3:return c=s.data,e.next=4,Mv(vg(c));case 4:return u=c.credit_balance,d=c.estimated_cost,e.next=5,Mv(pg(Ib(Ib({},u),{},{estimated_cost:d})));case 5:e.next=7;break;case 6:return e.prev=6,p=e.catch(0),e.next=7,Mv(yg(p.message));case 7:case"end":return e.stop()}},e,null,[[0,6]])})()}function Fb(){var e,t,n,r,o,i;return oi().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,e={action:"templately_pack_google_font",nonce:window.templately.nonce},t=(0,si.addQueryArgs)(window.ajaxurl,e),a.next=1,Iv(Rb,t);case 1:if(n=a.sent,r=n.data,!(o=n.error)){a.next=3;break}return a.next=2,Mv(wg(o));case 2:a.next=4;break;case 3:return a.next=4,Mv(bg(r));case 4:a.next=6;break;case 5:return a.prev=5,i=a.catch(0),a.next=6,Mv(wg(i.message));case 6:case"end":return a.stop()}},Mb,null,[[0,5]])}function zb(e){var t=e.payload;return oi().mark(function e(){var n,r;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=t.id){e.next=1;break}return console.error("Pack ID is missing for AI sidebar"),e.abrupt("return");case 1:return e.next=2,Mv(gg(n,!0));case 2:e.next=4;break;case 3:e.prev=3,r=e.catch(0),console.error("Error in handleShowAiSidebar:",r);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Bb(e){return e.type,Bn(e,Db),oi().mark(function e(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})()}function Ub(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Nv([Py("FULL_SITE_IMPORT_START",Bb),Py(Wo,zb),Py($o,jb),Py(Xo,Fb)]);case 1:case"end":return e.stop()}},Nb)}var Vb=["type"],Wb=["type"],Hb=["type"],Qb=oi().mark(Kb);function qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qb(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gb(e){e.type;var t=Bn(e,Vb);return oi().mark(function e(){var n,r,o,i,a,s;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){var n,r,o,i=e.general.platform;return{items:null!==(n=(null===(r=e.savedTemplates)||void 0===r?void 0:r[i])&&(null===(o=e.savedTemplates)||void 0===o||null===(o=o[i])||void 0===o?void 0:o[null==t?void 0:t.page]))&&void 0!==n?n:null}});case 1:if(null===e.sent.items){e.next=3;break}return e.next=2,Mv(Mm());case 2:return e.abrupt("return");case 3:return e.next=4,Oi("/templately/v1/saved-templates",t);case 4:if(r=e.sent,o=r.response,r.error,!(o&&(null==o||null===(n=o.items)||void 0===n?void 0:n.length)>=0)){e.next=7;break}return e.next=5,Mv(Nm({platform:"elementor",data:null!==(i=null==o?void 0:o.items)&&void 0!==i?i:[],currentPage:null!==(a=null==o?void 0:o.current_page)&&void 0!==a?a:1,totalPage:null!==(s=null==o?void 0:o.total_page)&&void 0!==s?s:1}));case 5:return e.next=6,Mv(ag({has_elementor:null==o?void 0:o.has_elementor,has_elementor_pro:null==o?void 0:o.has_elementor_pro}));case 6:e.next=8;break;case 7:return e.next=8,Mv(Lm({platform:"elementor",data:"Something went wrong."}));case 8:e.next=10;break;case 9:e.prev=9,e.catch(0);case 10:case"end":return e.stop()}},e,null,[[0,9]])})()}function Yb(e){e.type;var t=Bn(e,Wb);return oi().mark(function e(){var n,r,o,i,a,s;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/saved-templates/delete",t);case 1:if(n=e.sent,r=n.response,o=n.error,i={key:"isDeleted",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:""},success:{title:null==r?void 0:r.message,content:""}},!r||"success"!==(null==r?void 0:r.status)){e.next=4;break}return e.next=2,Mv(Dm());case 2:if(null!=r&&r.is_kit){e.next=3;break}return ba({icon:"success",timer:1500,html:React.createElement(EO,re({},i.success,{contentArgs:r}))},!0),e.abrupt("return");case 3:ya.close({isDeleted:!0,message:null==r?void 0:r.message}),e.next=5;break;case 4:return null!=o&&o.message&&ba({icon:"error",timer:1500,html:React.createElement(EO,{title:o.message})},!0),e.abrupt("return");case 5:"cant_delete_kit"===(null==o?void 0:o.code)?ba({onConfirm:function(e){return wa(i,e)},html:React.createElement(el,{id:null==o||null===(a=o.data)||void 0===a?void 0:a.id})},!0):"invalid_permission"===(null==o?void 0:o.code)&&ba({icon:"error",timer:1500,html:React.createElement(EO,{title:o.message})},!0),e.next=7;break;case 6:e.prev=6,s=e.catch(0),console.error("ST501","Saved Template Deleting Error.",s);case 7:case"end":return e.stop()}},e,null,[[0,6]])})()}function Xb(e){e.type;var t=Bn(e,Hb);return oi().mark(function e(){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){var n,r,o,i=e.general.platform;return{items:null!==(n=(null===(r=e.savedTemplates)||void 0===r?void 0:r[i])&&(null===(o=e.savedTemplates)||void 0===o||null===(o=o[i])||void 0===o?void 0:o[null==t?void 0:t.page]))&&void 0!==n?n:null,platform:i}});case 1:if(n=e.sent,r=n.items,o=n.platform,!(r.length>0)){e.next=2;break}return i=r.map(function(e){return $b($b({},e),{},{is_pushed:e.is_pushed?e.is_pushed:e.id===t.id})}),e.next=2,Mv(Nm({platform:o,data:null!=i?i:[],currentPage:null==t?void 0:t.page}));case 2:e.next=4;break;case 3:e.prev=3,e.catch(0);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Kb(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(xo,Gb);case 1:return e.next=2,Py(To,Yb);case 2:return e.next=3,Py(Ao.PUSHED,Xb);case 3:case"end":return e.stop()}},Qb)}var Zb=["type"],Jb=oi().mark(tw);function ew(e){return e.type,Bn(e,Zb),oi().mark(function e(){var t,n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Mv({type:Ao.STATUS_REQUEST});case 1:return e.next=2,Oi("/templately/v1/clouds/usage");case 2:if(t=e.sent,n=t.response,r=t.error,"error"!==(null==n?void 0:n.status)){e.next=3;break}return e.next=3,Mv(Gf({error:{message:null==n?void 0:n.message}}));case 3:if("success"!==(null==n?void 0:n.status)){e.next=4;break}if(!(i=null!==(o=n&&JSON.parse(null==n?void 0:n.data))&&void 0!==o?o:{})){e.next=4;break}return e.next=4,Mv($f({limit:null!==(a=null==i?void 0:i.limit)&&void 0!==a?a:0,usages:null!==(s=null==i?void 0:i.files)&&void 0!==s?s:0}));case 4:if(!r){e.next=5;break}return e.next=5,Mv(Gf({error:r}));case 5:e.next=7;break;case 6:return e.prev=6,l=e.catch(0),e.next=7,Mv(Gf({error:l}));case 7:case"end":return e.stop()}},e,null,[[0,6]])})()}function tw(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Er,ew);case 1:return e.next=2,Py(Ao.LOAD,ew);case 2:return e.next=3,Py(no,ew);case 3:return e.next=4,Py(Xr,ew);case 4:return e.next=5,Py(ao,ew);case 5:return e.next=6,Py(Do.LOAD,ew);case 6:return e.next=7,Py(Mo.LOAD,ew);case 7:return e.next=8,Py(No.LOAD,ew);case 8:case"end":return e.stop()}},Jb)}const nw=function(e){var t=(0,oe.useRef)(null);return(0,oe.useLayoutEffect)(function(){t.current=e}),(0,oe.useCallback)(function(){return t.current.apply(void 0,arguments)},[])};var rw=["action"];function ow(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ow(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ow(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aw(e,t){return{type:e,message:t,progress:arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,status:arguments.length>3&&void 0!==arguments[3]?arguments[3]:"waiting"}}var sw=0,lw=0,cw=function(){return Hl(function e(t){var n=this;Vl(this,e),this.session_id=new URLSearchParams(t).get("session_id"),this.url=window.ajaxurl+"?action=templately_pack_import_status&session_id="+this.session_id,this.onmessage=null,this.onerror=null,this.isClosed=!1,this.progressInterval=1e3,this.noLogCount=0,fetch(t+"&ic="+lw+++"&li="+sw).catch(function(e){n.onerror&&n.onerror(e)}),this.fetchProgress()},[{key:"fetchProgress",value:function(){var e=this;!0!==this.isClosed&&fetch(this.url+"&nonce="+window.templately.nonce+"&lastLogIndex="+sw).then(function(e){return e.json()}).then(function(t){var n;if(e.onmessage&&!e.isClosed&&t.log.length){var r,o=t.log.some(function(e){return"error"===e.action});if(sw+=null!==(r=t.log.length)&&void 0!==r?r:0,e.isClosed)return;for(var i=0;i<t.log.length;i++)if(!["continue","error"].includes(t.log[i].action)||i+1===t.log.length){var a={data:JSON.stringify(t.log[i])};e.onmessage(a)}if(o)return void e.close()}var s,l,c=(null===(n=t.log)||void 0===n?void 0:n[t.log.length-1])||{};e.isClosed||["complete","downloadComplete","error"].includes(c.action)||(null!==(s=t.log)&&void 0!==s&&s.length&&0!==(null===(l=t.log)||void 0===l?void 0:l.length)?(e.noLogCount=0,e.progressInterval=1e3):e.noLogCount++,e.noLogCount>=5&&e.progressInterval<5e3&&(e.noLogCount=0,e.progressInterval+=500),setTimeout(function(){e.isClosed||e.fetchProgress()},e.progressInterval))}).catch(function(t){e.onerror&&e.onerror(t)})}},{key:"close",value:function(){this.isClosed=!0}},{key:"addEventListener",value:function(e,t){}}])}();const uw=function(e,t){var n=pe((0,oe.useState)(t),2),r=n[0],o=n[1],i=pe((0,oe.useState)([]),2),a=i[0],s=i[1],l=function(e,t){var n=pe((0,oe.useState)(e),2),r=n[0],o=n[1];return(0,oe.useEffect)(function(){var n=setTimeout(function(){o(e)},t);return function(){clearTimeout(n)}},[e,t]),r}(r,500);return(0,oe.useEffect)(function(){s([{value:"",label:"All"}])},[t]),(0,oe.useEffect)(function(){var t=function(){var t=ni(oi().mark(function t(n){var r,o,i;return oi().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==n){t.next=1;break}return t.abrupt("return");case 1:return t.next=2,Oi("/templately/v1/autocomplete-condition",{payload:n,query:null!=e?e:[]});case 2:if(r=t.sent,o=r.response,i=r.error,!o){t.next=3;break}return s(o),t.abrupt("return");case 3:i&&s([]);case 4:case"end":return t.stop()}},t)}));return function(_x){return t.apply(this,arguments)}}();t(l)},[l]),[a,o]},dw={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let pw;const hw=new Uint8Array(16);function fw(){if(!pw&&(pw="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pw))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pw(hw)}const mw=[];for(let e=0;e<256;++e)mw.push((e+256).toString(16).slice(1));const gw=function(e,t,n){if(dw.randomUUID&&!t&&!e)return dw.randomUUID();const r=(e=e||{}).random||(e.rng||fw)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return mw[e[t+0]]+mw[e[t+1]]+mw[e[t+2]]+mw[e[t+3]]+"-"+mw[e[t+4]]+mw[e[t+5]]+"-"+mw[e[t+6]]+mw[e[t+7]]+"-"+mw[e[t+8]]+mw[e[t+9]]+"-"+mw[e[t+10]]+mw[e[t+11]]+mw[e[t+12]]+mw[e[t+13]]+mw[e[t+14]]+mw[e[t+15]]}(r)};var vw=function(){return Hl(function e(t){Vl(this,e),this.config=t},[{key:"getOptions",value:function(){return this.getSubOptions("general",!0).map(function(e){return{label:e.label,value:e.value}})}},{key:"getSubOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.config[e];return r?[{label:r.plural_label,value:n?e:""}].concat(Da(r.sub_conditions.map(function(e){var n,r=t.config[e];return null!==(n=r.sub_conditions)&&void 0!==n&&n.length?{label:r.label,value:e,options:t.getSubOptions(e,!0)}:{label:r.label,value:e}}))):[]}},{key:"getSubIdAutocomplete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.config[e];if(!t||"object"!==ne(t.controls))return{};var n=Object.values(t.controls);return null!=n&&n[0]?n[0]:{}}}])}();const yw=vw;function bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ww(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bw(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kw=ae().createContext(),Ew=function(e){var t=bn(),n=On(function(e){var t;return null!==(t=e.conditions.conditions)&&void 0!==t?t:[]}),r=new yw(n),o=pe((0,oe.useState)(!1),2),i=o[0],a=o[1],s=function(){var t,n;return 0===(null===(t=e.template)||void 0===t||null===(t=t.conditions)||void 0===t?void 0:t.length)?{}:null===(n=e.template)||void 0===n||null===(n=n.conditions)||void 0===n?void 0:n.reduce(function(e,t){var n=t.type,o=t.name,i=t.sub_name,a=void 0===i?"":i,s=t.sub_id,l=void 0===s?"":s,c=gw(),u={};return a&&(u.subIdAutocomplete=r.getSubIdAutocomplete(a)),ww(ww({},e),{},Ct({},c,ww(ww({},u),{},{id:c,type:n,name:o,sub_name:a,sub_id:l,options:r.getOptions(),subOptions:r.getSubOptions(o)})))},{})},l=pe((0,oe.useState)(s),2),c=l[0],u=l[1];(0,oe.useEffect)(function(){u(s())},[e.template.conditions]),(0,oe.useEffect)(function(){var n=Object.values(c).reduce(function(t,n){var r=[n.type,n.name,n.sub_name,n.sub_id].join("/").replace(/^\/+|\/+$/g,""),o=[].concat(Da((null==t?void 0:t[e.template.id])||[]),[r]);return ww(ww({},t),{},Ct({},e.template.id,o))},{});t(wf({type:qr},n))},[c]);var d={conditions:c,updateCondition:function(e,t){u(function(n){var o=n[e];return t.name&&(o.subOptions=r.getSubOptions(t.name)),(t.sub_name||t.name)&&(o.subIdAutocomplete=r.getSubIdAutocomplete(t.sub_name)),ww(ww({},n),{},Ct({},e,ww(ww({},o),t)))})},createCondition:function(e){var t=gw();u(function(e){return ww(ww({},e),{},Ct({},t,{id:t,type:"include",name:"general",sub_name:"",sub_id:"",options:r.getOptions(),subOptions:r.getSubOptions("general",!0),subIdAutocomplete:r.getSubIdAutocomplete("")}))})},removeCondition:function(e){u(function(t){return delete t[e],ww({},t)})},saveConditions:function(){var n;e.template.id&&(a(!0),t((n=e.template.id,{type:Qr,id:n})))},isSaving:i};return ae().createElement(kw.Provider,{value:d},e.children)};const Ow=function(){return(0,oe.useContext)(kw)};var Sw=["key","type"],xw=["type"],_w=["details","fileContents"],Cw=["type","saveTemplate"],Pw=["type"],Tw=["type"],Aw=["type","context"],Dw=["source","slug"],Mw=oi().mark(Rw),Nw=oi().mark(Vw);function Lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lw(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rw(e){var t,n,r,o,i,a,s;return oi().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.key,e.type,n=Bn(e,Sw),r=(null==n?void 0:n.search)||null,l.next=1,jv(function(e){return e.general.platform});case 1:if(o=l.sent,null!=(null==n?void 0:n.refresh)){l.next=2;break}return l.next=2,Mv({type:Ao.REQUESTED,platform:o});case 2:return l.next=3,Oi("/templately/v1/clouds",Iw({platform:o,type:t},n));case 3:if(i=l.sent,a=i.response,s=i.error,!0!==(null==a?void 0:a.redirect)){l.next=4;break}return l.next=4,Mv(Nf(a));case 4:if(!a){l.next=6;break}if(null==a||!a.files){l.next=5;break}return l.next=5,Mv(Qf({data:a.files.data,platform:o,currentPage:a.files.current_page,totalPage:a.files.total_page,search:r}));case 5:if(void 0!==(null==a?void 0:a.files)){l.next=6;break}return l.next=6,Mv(Qf({data:[],platform:o,currentPage:1,totalPage:0,search:r}));case 6:if(!s){l.next=7;break}return l.next=7,Mv(qf(s));case 7:case"end":return l.stop()}},Mw)}function jw(e){e.type;var t=Bn(e,xw);return oi().mark(function e(){var n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.details,r=t.fileContents,o=Bn(t,_w),e.next=1,Si("/templately/v1/clouds/copy-move",o);case 1:if(i=e.sent,a=i.response,i.error,ya.hideLoading(),s=n.label,l=n.slug,"success"!=a.status){e.next=5;break}if("copy"!==t.action){e.next=3;break}return e.next=2,Mv(Xf(Iw(Iw({},r),{},{slug:l})));case 2:e.next=4;break;case 3:if("move"!==t.action){e.next=4;break}return e.next=4,Mv(Zf(Iw(Iw({},r),{},{slug:l})));case 4:"copy"===t.action?ya.close({isCopied:!0,contentArgs:{title:s}}):"move"===t.action&&ya.close({isMoved:!0,contentArgs:{title:s}}),e.next=6;break;case 5:"error"==a.status&&("copy"===t.action?ya.close({isCopied:!1,contentArgs:{title:s,message:a.message}}):"move"===t.action&&ya.close({isMoved:!1,contentArgs:{title:s,message:a.message}}));case 6:e.next=8;break;case 7:e.prev=7,e.catch(0);case 8:case"end":return e.stop()}},e,null,[[0,7]])})()}function Fw(e){e.type;var t=e.saveTemplate,n=Bn(e,Cw);return oi().mark(function e(){var r,o,i,a,s,l,c,u;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){return{platform:e.general.platform}});case 1:return r=e.sent,o=r.platform,e.next=2,Si("/templately/v1/clouds/upload",Iw(Iw({},n),{},{platform:o}));case 2:if(i=e.sent,a=i.response,s=i.error,!t){e.next=6;break}if(!a){e.next=5;break}if("success"!==(null==a?void 0:a.status)){e.next=4;break}return l=n.workspace,c=n.workspace_id,e.next=3,Mv(nm(Iw({refresh:!0,redirect:c>0?l.shared?"clouds/shared-workspace/".concat(l.slug):"clouds/workspace/".concat(l.slug):"clouds"},a)));case 3:e.next=5;break;case 4:return e.next=5,Mv(rm(a));case 5:if(!s){e.next=6;break}return e.next=6,Mv(rm(s));case 6:if(t){e.next=12;break}if(!a){e.next=11;break}if("success"!==(null==a?void 0:a.status)){e.next=9;break}return e.next=7,Mv(Iw({type:"CLOUDS_PUSHED"},n));case 7:return e.next=8,Mv(Hf({refresh:!0,search:null}));case 8:ya.close({isPushed:!0,contentArgs:{title:"Successfully Pushed!",message:null==a?void 0:a.message}}),e.next=10;break;case 9:ya.close({isPushed:!1,contentArgs:{title:"Something went wrong!",message:null==a?void 0:a.message}});case 10:e.next=12;break;case 11:s&&ya.close({isPushed:!1,contentArgs:{title:"Something went wrong!",message:null==s?void 0:s.message}});case 12:e.next=14;break;case 13:e.prev=13,u=e.catch(0),console.error("C503",u);case 14:case"end":return e.stop()}},e,null,[[0,13]])})()}function zw(e){e.type;var t=Bn(e,Pw);return oi().mark(function e(){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/clouds/download/".concat(null==t?void 0:t.id),t);case 1:n=e.sent,r=n.response,n.error,r&&"success"===(null==r?void 0:r.status)?((o=document.createElement("a")).setAttribute("download",null==r?void 0:r.file_name),o.href=null==r?void 0:r.fileURL,o.click(),o.remove(),ya.close({isDownloaded:!0})):ya.close({isDownloaded:!1}),e.next=3;break;case 2:e.prev=2,i=e.catch(0),console.error("C501","Downloading Error: ",i);case 3:case"end":return e.stop()}},e,null,[[0,2]])})()}function Bw(e){e.type;var t=Bn(e,Tw);return oi().mark(function e(){var n,r,o,i,a,s,l,c;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.id,r=t.source,o=void 0===r?"cloud":r,i=t.slug,e.next=1,Oi("cloud"===o?"/templately/v1/clouds/delete/".concat(n):"/templately/v1/workspaces/item/delete/".concat(n));case 1:if(a=e.sent,s=a.response,l=a.error,!s||"success"!==(null==s?void 0:s.status)){e.next=5;break}if("cloud"!==o){e.next=3;break}return e.next=2,Mv(Hf({refresh:!0,search:null}));case 2:e.next=4;break;case 3:if("workspace"!==o&&"sharedWorkspace"!==o){e.next=4;break}return e.next=4,Mv(Sm({refresh:!0,slug:i}));case 4:ya.hideLoading(),ya.close({isDeleted:!0}),e.next=6;break;case 5:ya.close({isDeleted:!1});case 6:l&&console.error("Error C501: ",l),e.next=8;break;case 7:e.prev=7,c=e.catch(0),console.error("Error C501: ",c);case 8:case"end":return e.stop()}},e,null,[[0,7]])})()}function Uw(e){e.type;var t=e.context,n=void 0===t?"modal":t,r=Bn(e,Aw);return oi().mark(function e(){var t,o,i,a,s,l,c,u,d,p,h,f,m,g;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=r.source,o=void 0===t?"clouds":t,i=r.slug,a=Bn(r,Dw),e.next=1,Oi("clouds"===o?"/templately/v1/clouds":"/templately/v1/workspaces/".concat(i),a);case 1:if(s=e.sent,l=s.response,c=s.error,!l){e.next=2;break}return e.next=2,Mv(sm({keyword:null==a?void 0:a.search,context:n,source:o,data:null!==(u=null===(d=l.files)||void 0===d?void 0:d.data)&&void 0!==u?u:[],totalPage:null!==(p=null===(h=l.files)||void 0===h?void 0:h.total_page)&&void 0!==p?p:1,currentPage:null!==(f=null===(m=l.files)||void 0===m?void 0:m.current_page)&&void 0!==f?f:1}));case 2:c&&console.error("Error S100: ",c),e.next=4;break;case 3:e.prev=3,g=e.catch(0),console.error("Error S100: ",g);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Vw(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Ao.LOAD,Rw);case 1:return e.next=2,Py(Ao.COPY,jw);case 2:return e.next=3,Py(Ao.MOVE,jw);case 3:return e.next=4,Py(Ao.PUSH,Fw);case 4:return e.next=5,Py(Ao.DOWNLOAD,zw);case 5:return e.next=6,Py(Ao.DELETE,Bw);case 6:return e.next=7,Py(Ao.SEARCH,Uw);case 7:return e.next=8,Py(Do.SEARCH,Uw);case 8:return e.next=9,Py(Mo.SEARCH,Uw);case 9:return e.next=10,Py(No.SEARCH,Uw);case 10:case"end":return e.stop()}},Nw)}var Ww=["type"],Hw=["shared","key","page"],Qw=oi().mark(Yw);function qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qw(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gw(e){var t=e.type,n=Bn(e,Ww);return oi().mark(function e(){var r,o,i,a,s,l,c,u,d,p;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=n.shared,o=void 0!==r&&r,n.key,n.page,Bn(n,Hw),e.next=1,jv(function(e){return{plan:e.general.plan,platform:e.general.platform}});case 1:if(i=e.sent,a=i.plan,s=i.platform,t!==Do.LOAD&&t!==Mo.LOAD){e.next=2;break}return e.next=2,Mv({type:o?Mo.REQUESTED:Do.REQUESTED,platform:s,plan:a});case 2:return e.next=3,Oi("/templately/v1/workspaces",$w({},n));case 3:if(l=e.sent,c=l.response,u=l.error,!c){e.next=8;break}d=t,e.next=d===Do.LOAD_LISTS||d===Mo.LOAD_LISTS?4:d===Do.LOAD||d===Mo.LOAD?6:8;break;case 4:return e.next=5,Mv(pm({payload:c.data,shared:n.shared}));case 5:return e.abrupt("continue",8);case 6:return e.next=7,Mv(hm({data:c.data,shared:n.shared,currentPage:c.current_page,totalPage:c.total_page}));case 7:return e.abrupt("continue",8);case 8:if(!u){e.next=9;break}return console.error("Error W100: ",u),e.next=9,Mv(fm({shared:o,error:u}));case 9:e.next=11;break;case 10:e.prev=10,p=e.catch(0),console.error("Error W100: ",p);case 11:case"end":return e.stop()}},e,null,[[0,10]])})()}function Yw(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Do.LOAD,Gw);case 1:return e.next=2,Py(Mo.LOAD,Gw);case 2:return e.next=3,Py(Do.LOAD_LISTS,Gw);case 3:return e.next=4,Py(Mo.LOAD_LISTS,Gw);case 4:case"end":return e.stop()}},Qw)}var Xw=["type"],Kw=oi().mark(tk);function Zw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zw(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ek(e){e.type;var t=Bn(e,Xw);return oi().mark(function e(){var n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/workspaces/create",Jw(Jw({},t),{},{isCreate:!0}));case 1:if(n=e.sent,r=n.response,o=n.error,ya.hideLoading(),"success"!==(null==r?void 0:r.status)){e.next=3;break}return e.next=2,Mv(gm(Jw({},null==r?void 0:r.workspace)));case 2:ya.close({isCreated:!0,contentArgs:{title:null!==(i=null==t?void 0:t.title)&&void 0!==i?i:""}}),e.next=4;break;case 3:ya.close({isCreated:!1,message:null!==(a=null!==(s=null==r?void 0:r.message)&&void 0!==s?s:null==o?void 0:o.message)&&void 0!==a?a:null});case 4:o&&console.error("Errro W101: ",o),e.next=6;break;case 5:e.prev=5,l=e.catch(0),console.error("Errro W101: ",l);case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function tk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Do.CREATE,ek);case 1:case"end":return e.stop()}},Kw)}var nk=["type"],rk=["key","shared","refresh"],ok=["type"],ik=oi().mark(uk);function ak(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ak(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ak(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lk(e){e.type;var t=Bn(e,nk);return oi().mark(function e(){var n,r,o,i,a,s,l,c,u,d,p;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.key,t.shared,n=t.refresh,r=void 0!==n&&n,o=Bn(t,rk),i=o.slug,o.platform,e.next=1,jv(function(e){var t,n;return{platform:e.general.platform,data:null!==(t=null===(n=e.workspaceDetails)||void 0===n?void 0:n[i])&&void 0!==t?t:null}});case 1:return a=e.sent,s=a.platform,l=a.data,e.next=2,Iv(Oi,"/templately/v1/workspaces/"+i,sk({file_type:s},o));case 2:if(c=e.sent,u=c.response,d=c.error,!u){e.next=3;break}return e.next=3,Mv(Em(sk(sk({slug:i,platform:s,refresh:r},u),l)));case 3:if(!d){e.next=4;break}return console.error("Error W104: ",d),e.next=4,Mv(_m(sk({},d)));case 4:e.next=6;break;case 5:return e.prev=5,p=e.catch(0),console.error("Error W104: ",p),e.next=6,Mv(_m(p));case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function ck(e){e.type;var t=Bn(e,ok);return oi().mark(function e(){var n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.workspace_id,r=t.files,o=t.slug,e.next=1,Si("/templately/v1/workspaces/item/add",{workspace_id:n,files:r});case 1:if(i=e.sent,a=i.response,s=i.error,!a){e.next=4;break}if("success"!==(null==a?void 0:a.status)){e.next=3;break}return ya.close({isAdded:!0}),e.next=2,Mv(Sm({slug:o,refresh:!0}));case 2:e.next=4;break;case 3:ya.close({isAdded:!1});case 4:s&&console.error("Error W105: ",s),e.next=6;break;case 5:e.prev=5,l=e.catch(0),console.error("Error W105: ",l);case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function uk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(No.LOAD,lk);case 1:return e.next=2,Py(No.ADD_FILE,ck);case 2:case"end":return e.stop()}},ik)}var dk=["type"],pk=["type"],hk=oi().mark(gk);function fk(e){e.type;var t=Bn(e,dk);return oi().mark(function e(){var n,r,o,i,a,s,l;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=t.platform,i=t.slug,a=t.files,t.shared,void 0===(s=t.refresh)||!s){e.next=1;break}return e.next=1,Mv(tm({}));case 1:return e.next=2,Mv(xm({slug:i,platform:o,data:null!==(n=null==a?void 0:a.data)&&void 0!==n?n:[],currentPage:null!==(r=null==a?void 0:a.current_page)&&void 0!==r?r:1,totalPage:null==a?void 0:a.total_page}));case 2:e.next=4;break;case 3:e.prev=3,l=e.catch(0),console.error("Error W106: ",l);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function mk(e){e.type;var t=Bn(e,pk);return oi().mark(function e(){var n,r,o,i,a,s,l,c,u,d,p,h,f,m;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=t.slug,r=t.shared,o=void 0!==r&&r,i=t.page,a=t.refresh,s=void 0!==a&&a,e.next=1,jv(function(e){return e.general.platform});case 1:if(l=e.sent,!s){e.next=2;break}return e.next=2,Mv({type:No.GET_FILES_REQUESTED});case 2:return e.next=3,Oi("/templately/v1/workspaces/"+n,{file_type:l,shared:o,page:i,directLoad:!1});case 3:if(c=e.sent,u=c.response,c.error,!u){e.next=4;break}return f=u.files,e.next=4,Mv(xm({slug:n,platform:l,data:null!==(d=null==f?void 0:f.data)&&void 0!==d?d:[],currentPage:null!==(p=null==f?void 0:f.current_page)&&void 0!==p?p:1,totalPage:null!==(h=null==f?void 0:f.total_page)&&void 0!==h?h:1}));case 4:e.next=6;break;case 5:e.prev=5,m=e.catch(0),console.error("Error W107: ",m);case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function gk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(No.LOAD_SUCCESS,fk);case 1:return e.next=2,Py(No.SET,mk);case 2:return e.next=3,Py(No.GET_FILES,mk);case 3:case"end":return e.stop()}},hk)}var vk=oi().mark(Ek),yk=oi().mark(Ok),bk=oi().mark(Sk);function wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wk(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ek(e){var t,n,r,o,i,a,s;return oi().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.id,n=e.page,r=e.slug,l.prev=1,l.next=2,Si("/templately/v1/workspaces/delete/"+t,kk({},e));case 2:if(o=l.sent,i=o.response,a=o.error,ya.hideLoading(),"success"!==i.status){l.next=4;break}return l.next=3,Mv(ym({id:t,slug:r,page:n}));case 3:ya.close({isDeleted:!0}),l.next=5;break;case 4:throw ya.close({isDeleted:!1}),new Error(i.message);case 5:a&&console.error("Error W103: ",a),l.next=7;break;case 6:l.prev=6,s=l.catch(1),console.error("Error W103: ",s);case 7:case"end":return l.stop()}},vk,null,[[1,6]])}function Ok(e){var t,n;return oi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!e.id){r.next=1;break}return t=e.id,n=e.slug,r.next=1,Mv(Om({id:t,slug:n}));case 1:case"end":return r.stop()}},yk)}function Sk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Do.DELETE,Ek);case 1:return e.next=2,Cy(Do.DELETE_SUCCESS,Ok);case 2:case"end":return e.stop()}},bk)}var xk=oi().mark(Tk),_k=oi().mark(Ak);function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tk(e){var t,n,r,o,i,a,s,l,c;return oi().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return t=e.slug,u.prev=1,u.next=2,jv(function(e){return{platform:e.general.platform}});case 2:return n=u.sent,r=n.platform,u.next=3,Si("/templately/v1/workspaces/"+t,Pk(Pk({},e),{},{platform:r}));case 3:if(o=u.sent,i=o.response,a=o.error,ya.hideLoading(),"success"!==(null==i?void 0:i.status)){u.next=5;break}return u.next=4,Mv(wm(Pk({slug:t,platform:r},null==i?void 0:i.workspace)));case 4:ya.close({isSaved:!0}),u.next=6;break;case 5:throw ya.close({isSaved:!1,message:null!==(s=null!==(l=null==i?void 0:i.message)&&void 0!==l?l:null==a?void 0:a.message)&&void 0!==s?s:null}),new Error(i.message);case 6:a&&console.error("Error W102: ",a),u.next=8;break;case 7:u.prev=7,c=u.catch(1),console.error("Error W102: ",c);case 8:case"end":return u.stop()}},xk,null,[[1,7]])}function Ak(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Do.SAVE,Tk);case 1:case"end":return e.stop()}},_k)}var Dk=["type"],Mk=oi().mark(Lk);function Nk(e){e.type;var t=Bn(e,Dk);return oi().mark(function e(){var n,r,o;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/items-count",t);case 1:if(n=e.sent,r=n.response,n.error,!r){e.next=2;break}return e.next=2,Mv(Mf(r));case 2:e.next=4;break;case 3:e.prev=3,o=e.catch(0),console.error("Items Count: ",o);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function Lk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Ii(bo,"PAGES"),Nk);case 1:return e.next=2,Py(Ii(bo,"SECTIONS"),Nk);case 2:return e.next=3,Py(Ii(bo,"PACKS"),Nk);case 3:return e.next=4,Py(Ii(po,"PAGES"),Nk);case 4:return e.next=5,Py(Ii(po,"SECTIONS"),Nk);case 5:return e.next=6,Py(Ii(po,"PACKS"),Nk);case 6:case"end":return e.stop()}},Mk)}var Ik=["type","key","slug"],Rk=["type"],jk=oi().mark(Uk);function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fk(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bk(e){e.type;var t=e.key,n=e.slug,r=Bn(e,Ik);return oi().mark(function e(){var o,i,a,s,l,c,u,d,p;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,jv(function(e){return{plan:e.general.plan,platform:e.general.platform}});case 1:return o=e.sent,i=o.plan,a=o.platform,e.next=2,Oi("/templately/v1/items/"+n,zk({plan:i,platform:a,type:t},r));case 2:if(s=e.sent,l=s.response,c=s.error,!l){e.next=3;break}return u=l.type,d=Bn(l,Rk),e.next=3,Mv(Ff(zk(zk({},d),{},{itemType:u,key:t,platform:a})));case 3:if(!c){e.next=4;break}return console.error("Error ID001: ",c),e.next=4,Mv(zf(zk(zk({},c),{},{platform:a,key:t})));case 4:e.next=6;break;case 5:return e.prev=5,p=e.catch(0),console.error("Error ID002: ",p),e.next=6,Mv(zf(p));case 6:case"end":return e.stop()}},e,null,[[0,5]])})()}function Uk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Ii(bo,"PAGES"),Bk);case 1:return e.next=2,Py(Ii(bo,"SECTIONS"),Bk);case 2:return e.next=3,Py(Ii(bo,"PACKS"),Bk);case 3:case"end":return e.stop()}},jk)}var Vk=["key","type","isFilterableQuery","prevFilterableQuery"],Wk=oi().mark(Gk),Hk=oi().mark(Yk),Qk=oi().mark(Xk);function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gk(e){var t,n,r,o,i,a,s,l,c,u,d,p,h,f,m,g,v,y;return oi().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.prev=0,t=e.key,e.type,n=e.isFilterableQuery,e.prevFilterableQuery,r=Bn(e,Vk),o=!1,b.next=1,jv(function(e){var n,o=e.general.plan,i=e.general.platform,a=null!==(n=null==r?void 0:r.page)&&void 0!==n?n:1,s=e.general.filter.prevQuery,l=e.general.filter.doQuery,c=[t,o,i,a];return l||null!=(null==r?void 0:r.search)||c.push(a),l&&l===s&&(c=c.concat(["filteredResults",a])),null!==(null==r?void 0:r.search)&&(c=c.concat(["search",a])),{items:Ri(e,c,[]),isNewQuery:l!==s,plan:e.general.plan,platform:e.general.platform,prevSearch:e.general.filter.prevSearch}});case 1:if(i=b.sent,a=i.plan,s=i.platform,l=i.items,c=i.isNewQuery,u=i.prevSearch,!((null==l?void 0:l.length)>0)||c){b.next=3;break}return b.next=2,Mv({type:Ii(fo,t),data:l,currentPage:null!==(d=null==r?void 0:r.page)&&void 0!==d?d:1,platform:s,plan:a});case 2:return b.abrupt("return");case 3:return b.next=4,Mv({type:Ii(po,t),platform:s,plan:a});case 4:if(u===(null==r?void 0:r.search)){b.next=5;break}return o=!0,b.next=5,Mv(Ef({key:"prevSearch",data:null==r?void 0:r.search}));case 5:return b.next=6,Oi("/templately/v1/items",$k({plan:a,platform:s,include_search:o,type:t},r));case 6:if(p=b.sent,h=p.response,f=p.error,!h){b.next=7;break}return b.next=7,Mv({type:Ii(fo,t),data:(null===(m=h.data)||void 0===m?void 0:m.length)>0?h.data:"empty",totalPage:null!==(g=null==h?void 0:h.total_page)&&void 0!==g?g:0,currentPage:null!==(v=null==h?void 0:h.current_page)&&void 0!==v?v:1,platform:s,plan:a,isFilterableQuery:n,search:null==r?void 0:r.search});case 7:if(!f){b.next=8;break}return b.next=8,Mv({type:Ii(mo,t),error:f,isFilterableQuery:n,search:null==r?void 0:r.search});case 8:b.next=10;break;case 9:b.prev=9,y=b.catch(0),console.error("ID003: ",y);case 10:case"end":return b.stop()}},Wk,null,[[0,9]])}function Yk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Ii(ho,"PAGES"),Gk);case 1:return e.next=2,Py(Ii(ho,"SECTIONS"),Gk);case 2:return e.next=3,Py(Ii(ho,"PACKS"),Gk);case 3:case"end":return e.stop()}},Hk)}function Xk(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Nv([Yk()]);case 1:case"end":return e.stop()}},Qk)}var Kk=["type"],Zk=oi().mark(eE);function Jk(e){e.type;var t=Bn(e,Kk);return oi().mark(function e(){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/items/favourite",t);case 1:if(n=e.sent,r=n.response,o=n.error,"success"!==(null==r?void 0:r.status)){e.next=2;break}return e.next=2,Mv(Jm({starred:r.data}));case 2:o&&console.error("Error P102: ",o),e.next=4;break;case 3:e.prev=3,i=e.catch(0),console.error("Error P102: ",i);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function eE(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(vo,Jk);case 1:case"end":return e.stop()}},Zk)}var tE=["type"],nE=oi().mark(oE);function rE(e){e.type;var t=Bn(e,tE);return oi().mark(function e(){var n,r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Si("/templately/v1/items/rating",t);case 1:if(n=e.sent,r=n.response,o=n.error,"success"!==(null==r?void 0:r.status)){e.next=2;break}return e.next=2,Mv(eg({reviews:r.data.reviews}));case 2:o&&console.error("Error P102: ",o),e.next=4;break;case 3:e.prev=3,i=e.catch(0),console.error("Error P102: ",i);case 4:case"end":return e.stop()}},e,null,[[0,3]])})()}function oE(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(yo,rE);case 1:case"end":return e.stop()}},nE)}var iE=["type"],aE=oi().mark(lE);function sE(e){e.type;var t=Bn(e,iE);return oi().mark(function e(){var n,r,o,i,a,s,l,c;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Oi("/templately/v1/featured-items",t);case 1:if(o=e.sent,i=o.response,a=o.error,!(i&&null!=i&&i.data&&(null===(n=i.data)||void 0===n?void 0:n.length)>0)){e.next=2;break}return e.next=2,Mv(Bf({items:i.data}));case 2:if(!a&&null!=i&&i.data&&0!=(null==i||null===(r=i.data)||void 0===r?void 0:r.length)){e.next=3;break}throw Ct({code:null!==(s=null==a?void 0:a.code)&&void 0!==s?s:"templately_api_error"},"code",null!==(l=null==a?void 0:a.message)&&void 0!==l?l:"Something went wrong.");case 3:e.next=5;break;case 4:return e.prev=4,c=e.catch(0),e.next=5,Mv(Uf(c));case 5:case"end":return e.stop()}},e,null,[[0,4]])})()}function lE(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Py(Eo,sE);case 1:case"end":return e.stop()}},aE)}var cE=oi().mark(uE);function uE(){return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Nv([Rv(gb),Rv(ab),Rv(Sb),Rv(Ab),Rv(Ub),Rv(Kb),Rv(Lk),Rv(Xk),Rv(lE),Rv(eE),Rv(oE),Rv(Uk),Rv(wb),Rv(qy),Rv(My),Rv(Ry),Rv(By),Rv(tw),Rv(Vw),Rv(Yw),Rv(tk),Rv(uk),Rv(gk),Rv(Sk),Rv(Ak)]);case 1:case"end":return e.stop()}},cE)}const dE=uE;var pE=wy(),hE=null;hE=function(e,t){var n=Qs(),r=Pa(Ta(n),{},t);return r.asyncReducers=null!=n?n:{},r.attachReducer=function(e,t){r.asyncReducers[e]=t,r.replaceReducer(Ta(Qs(r.asyncReducers)))},r}(0,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(Sa(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map(function(e){return e(o)});return r=Aa.apply(void 0,i)(n.dispatch),Oa(Oa({},n),{},{dispatch:r})}}}(pE)),pE.run(dE),hE.attachReducer("sections",Us("SECTIONS")),hE.attachReducer("packs",Us("PACKS")),hE.attachReducer("pages",Us("PAGES"));var fE=["to","query","ignoreKeys","icon","isActive","children","label","hasDropdown","aria-current"],mE=function(e){var t=e.to,n=e.query,r=e.ignoreKeys,o=void 0===r?[]:r,i=e.icon,a=void 0!==i&&i,s=e.isActive,l=e.children,c=void 0===l?"":l,u=e.label,d=void 0===u?"":u,p=e.hasDropdown,h=void 0!==p&&p,f=e["aria-current"],m=void 0===f?"page":f,g=Bn(e,fE),v=s?m:void 0;return ae().createElement(Et,re({},g,{"aria-current":v,to:Rg(t,n,o)}),ae().isValidElement(a)?ae().createElement("i",null,a):null,"function"==typeof c?c({isActive:s}):c,"function"==typeof d?d({isActive:s}):d,h&&ae().createElement("span",{className:"tn-dropdown-icon"},s?ae().createElement(tr,null):ae().createElement(Zn,null)))};mE.displayName="NavLink";const gE=mE;var vE=["caseSensitive","end","style","className","activeItemClassName","dropdown","list"],yE=ae().forwardRef(function(e,t){e.caseSensitive;var n,r=e.end,o=void 0!==r&&r,i=e.style,a=e.className,s=void 0===a?"":a,l=e.activeItemClassName,c=void 0===l?"active":l,u=e.dropdown,d=e.list,p=void 0===d||d,h=Bn(e,vE),f=null!=u,m=Je(),g=ot(e.to),v=m.pathname,y=g.pathname,b=v===y||!o&&v.startsWith(y)&&"/"===v.charAt(y.length);n="function"==typeof s?s({isActive:b,toPathname:y,locationPathname:v}):[s,b?c:null].filter(Boolean).join(" ");var w="function"==typeof i?i({isActive:b}):i,k=Vn()("tn-item",n,{"tn-item-has-dropdown":f,"templately-nav-link":!p});return p?ae().createElement("li",{className:k,ref:t,style:w},ae().createElement(gE,re({},h,{isActive:b,hasDropdown:f})),u&&u.length>0&&ae().createElement(kE,{dropdown:!0,className:b?"dropdown-active":"",activeItemClassName:"dropdown-nav-active",routes:u})):ae().createElement(gE,re({},h,{ref:t,style:w,className:k,isActive:b}))});yE.displayName="NavItem";const bE=yE;var wE=["element"];const kE=function(e){var t=e.routes,n=e.ulClasses,r=void 0===n?"":n,o=e.liClasses,i=void 0===o?"":o,a=e.sidebar,s=void 0!==a&&a,l=e.className,c=void 0===l?"":l,u=e.activeItemClassName,d=void 0===u?"active":u,p=e.dropdown,h=void 0!==p&&p,f=Vn()("templately-nav-wrapper",c,{"templately-nav-sidebar":s,"templately-nav-dropdown":h});return ae().createElement("div",{className:f},ae().createElement("ul",{className:r},t.map(function(e){e.element;var t=Bn(e,wE);return ae().createElement(bE,re({key:t.to,className:i,activeItemClassName:d},t))})))},EE=function(e){var t=Vn()("templately-table",e.className,"tt-view-".concat(e.view));return ae().createElement("div",{className:t},"grid"!=e.view&&(null==e?void 0:e.head)&&("function"==typeof e.head?e.head():e.head),e.children)},OE=function(e){var t;return ae().createElement("div",{className:"templately-table-row ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)};var SE=[{name:"Name",id:"name"},[{name:"Last Modified",id:"last_modified"},{name:"Action",id:"action"}]];const xE=function(e){var t=e.columns,n=void 0===t?SE:t;return ae().createElement(OE,{className:"templately-table-head"},n.map(function(e,t){return Array.isArray(e)?ae().createElement(PE,{key:e.id+"-"+t},ae().createElement(OE,null,e.map(function(e,t){return ae().createElement(PE,{key:e.id+"-"+t},ae().createElement("p",null,e.name))}))):ae().createElement(PE,{key:e.id+"-"+t},ae().createElement("p",null,e.name))}))};var _E=["data","className","view"];const CE=function(e){var t=e.data,n=e.className,r=e.view,o=Bn(e,_E),i=Vn()("templately-table-body",n,"tt-view-".concat(r));return ae().createElement("div",re({},o,{className:i}),t.map(function(e,t){return ae().createElement(OE,{key:Math.random()*t},e.map(function(e,t){return Array.isArray(e)?ae().createElement(PE,{key:"".concat(e.id,"-").concat(t)},ae().createElement(OE,null,e.map(function(e,t){return ae().createElement(PE,{key:"".concat(e.id,"-").concat(t)},ae().isValidElement(e.data)?e.data:ae().createElement("p",null,e.data))}))):ae().createElement(PE,{key:"".concat(e.id,"-").concat(t)},ae().isValidElement(e.data)?e.data:ae().createElement("p",null,e.data))}))}))},PE=function(e){var t;return ae().createElement("div",{className:"templately-table-column ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)},TE=function(e){var t=e.isPro,n=e.className,r=e.inDetails,o=void 0!==r&&r,i=Vn()("templately-badge",{"templately-pro":t,"templately-free":!t},n),a=t?(0,Pt.__)("Pro","templately"):(0,Pt.__)("Starter","templately");return ae().createElement("div",{className:i},t&&!o&&ae().createElement(nr,null),ae().createElement("span",null,t&&o&&ae().createElement(nr,null),a))},AE=function(e){var t=e.dependencies,n=pe((0,oe.useState)([]),2),r=n[0],o=n[1];return(0,oe.useEffect)(function(){if(t){var e=[];t.map(function(t,n){e.push(function(e,t){return e&&ae().createElement("span",{key:t,className:"templately-dependency-icon tt-top","data-templately-tooltip":e.name},null!=e&&e.icon?ae().createElement("img",{key:e.id,src:e.icon}):ae().createElement("span",{className:"templately-dependency-icon-text-icon"},e.name[0]))}(t,n))}),o(e)}},[t]),0==r.length?null:ae().createElement("span",{className:"templately-item-dependencies"},r)},DE=function(e){var t=e.type,n=(e.slug,e.dependencies);return e.platform,ae().createElement("div",{className:"templately-item-hover"},"packs"!=t&&ae().createElement(AE,{dependencies:n}))};var ME=["panelKey","title","isActive","onClickItem"],NE=function(e){var t=e.panelKey,n=e.title,r=e.isActive,o=e.onClickItem,i=Bn(e,ME),a=Vn()("tc-panel-header",i.className,{"tc-panel-header-active":r});return ae().createElement("div",{className:a,onClick:function(){return o(t)}},ae().createElement("h4",null,n),ae().createElement("span",{className:"t-collapse-action-btn"},r?ae().createElement(tr,null):ae().createElement(Zn,null)))};const LE=ae().memo(NE);var IE=["isActive","children"],RE=function(e){var t=e.isActive,n=e.children,r=Bn(e,IE),o=Vn()("tc-panel-body",r.className,{"tc-content-active":t,"tc-content-hide":!t});return ae().createElement("div",{className:o},n)};const jE=ae().memo(RE);function FE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const BE=function(e){var t=e.children,n=pe((0,oe.useState)(["0"]),2),r=n[0],o=n[1];(0,oe.useEffect)(function(){if((null==t?void 0:t.length)>0){var e=[];t.map(function(t,n){var r;null!=t&&null!==(r=t.props)&&void 0!==r&&r.isActive&&e.push(String(n))}),e.length>0&&o(function(t){return[].concat(Da(t),e)})}},[t]);var i=(0,oe.useCallback)(function(e){var t=Da(r),n=t.indexOf(e);n>-1?t.splice(n,1):t.push(e),o(t)},[r]),a=(0,oe.useCallback)(function(e,t){if(!e)return null;var n=String(t),o=r.indexOf(n)>-1,a=zE(zE({},e.props),{},{key:n,panelKey:n,onClickItem:i,isActive:o});return ae().cloneElement(e,a)},[t,r]);return ae().createElement("div",{className:"templately-collapse"},(null==t?void 0:t.length)>0?t.map(a):t)};var UE=["panelKey","title","children","isActive","onClickItem"],VE=function(e){var t=e.panelKey,n=e.title,r=e.children,o=e.isActive,i=void 0!==o&&o,a=e.onClickItem,s=Bn(e,UE),l={isActive:i,onClickItem:a,panelKey:t},c=Vn()("tc-panel-item",s.className,{"tc-panel-active":i,"tc-panel-inactive":!i});return ae().createElement("div",{className:c},ae().createElement(LE,re({title:n},l)),i&&ae().createElement(jE,l,r))};const WE=ae().memo(VE),HE=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=tt(),o=pe(xt(),1)[0],i=pe((0,oe.useState)(n),2),a=i[0],s=i[1],l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1],d=pe((0,oe.useState)(!1),2),p=d[0],h=d[1],f=bn(),m=On(function(n){var r,o,i,a=null===(r=n.profile)||void 0===r||null===(r=r.starred)||void 0===r?void 0:r["page"==t||"block"==t?"item":"pack"];return Ni(a)&&(a=Object.values(a)),{isStarred:null!==(o=null===(i=a)||void 0===i?void 0:i.includes(e))&&void 0!==o&&o,isLoggedIn:null!==n.profile.data}}),g=m.isStarred,v=m.isLoggedIn;return(0,oe.useEffect)(function(){if(c&&!v)return u(!1),r(Rg("sign-in",Ct({},"redirect-to",o.get("path"))));c&&(h(function(e){return!e}),s(function(e){return g?e-1:e+1}),f(jf({type:vo},{action:g?"undo":"do",id:e,itemType:t})),u(!0))},[c]),(0,oe.useEffect)(function(){h(g),u(!1)},[g]),{starred:p,isClicked:c,favouriteCount:a,setIsClicked:u,setFavouriteCount:s}},QE=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return On(function(o){var i,a,s,l,c=null===(i=o.profile)||void 0===i||null===(i=i.purchasedItems)||void 0===i||null===(i=i.all)||void 0===i?void 0:i[t],u=null!==(null===(a=o.profile)||void 0===a?void 0:a.data),d=(null===(s=o.profile)||void 0===s||null===(s=s.data)||void 0===s||null===(s=s.plan)||void 0===s?void 0:s.indexOf("free"))>-1,p=null==c?void 0:c.includes(e);return null==n||p||(p=null===(l=o.profile)||void 0===l||null===(l=l.purchasedItems)||void 0===l||null===(l=l.all)||void 0===l||null===(l=l.pack)||void 0===l?void 0:l.includes(n)),r&&!p&&(p=r),d||(p=!0),u?{isPurchased:p,isSubscribed:!d}:{isPurchased:!1,isSubscribed:!1}})},qE=function(e){var t,n=e.id,r=e.type,o=e.downloads,i=void 0===o?0:o,a=e.rating,s=void 0===a?0:a,l=e.likes,c=void 0===l?0:l,u=e.setInsert,d=e.isPack,p=void 0!==d&&d,h=e.price,f=void 0===h?"0.00":h,m=e.isPurchased,g=void 0!==m&&m,v=e.fullSiteImport,y=void 0!==v&&v,b=HE(n,r,c),w=b.starred,k=b.setIsClicked,E=b.favouriteCount,O=QE(n,r,null,g),S=O.isPurchased,x=O.isSubscribed;return ae().createElement("div",{className:"templately-item-meta"},p&&y&&ae().createElement("span",{className:"templately-item-meta-single tb-full-site-import"},"Full Site Import"),null!=s&&x&&ae().createElement(ca,{"data-templately-tooltip":(0,Pt.__)("Average Rating","templately"),className:"templately-item-meta-single tb-item-rating tt-top ".concat(null==s?"not-rated":"")},ae().createElement(ur,null),ae().createElement("span",null,null!==(t=null==s?void 0:s.toFixed(1))&&void 0!==t?t:ae().createElement("small",null,(0,Pt.__)("Not Rated","templately")))),!x&&ae().createElement("span",{className:"templately-item-meta-single tb-item-price"},f>0&&!S?"$".concat(f):f>0&&S?ae().createElement(gE,{to:"purchased-items"},"PURCHASED"):"FREE"),!y&&ae().createElement(ca,{"data-templately-tooltip":w?(0,Pt.__)("Added to Favourite","templately"):(0,Pt.__)("Add to Favourite","templately"),className:"templately-item-meta-single tb-item-favourite tt-top ".concat(w?"my-favourite":""),onClick:function(){return k(!0)}},ae().createElement(sr,null),ae().createElement("span",null,null!=E?E:0)),ae().createElement(ca,{"data-templately-tooltip":p?(0,Pt.__)("Total Downloads","templately"):(0,Pt.__)("Insert","templately"),onClick:function(){return!p&&u(n)},className:"templately-item-meta-single tt-top tb-item-insert"},ae().createElement(rr,null),ae().createElement("span",null,p?null!=i?i:0:(0,Pt.__)("Insert","templately"))))};var $E=o(1921);const GE=function(e){var t=e.name,n=e.price,r=e.thumbnails,o=void 0===r?[]:r;return null==o?void 0:o.map(function(e,r){return ae().createElement("div",{key:"thumbnail-".concat(r),className:"templately-item-image-wrapper thumbnail-".concat(r)},ae().createElement(TE,{isPro:+n>0}),ae().createElement($E.LazyLoadImage,{className:"templately-item-image",width:"100%",src:e,alt:t}))})},YE=function(e){var t=e.content,n=t.id,r=t.name,o=t.price,i=t.type,a=t.slug,s=t.rating,l=t.downloads,c=t.thumbnail,u=t.thumbnail2,d=void 0===u?null:u,p=t.thumbnail3,h=void 0===p?null:p,f=t.dependencies,m=t.favourite_count,g=t.fullsite_import,v=void 0!==g&&g,y=tt(),b=pe((0,oe.useState)(null),2),w=b[0],k=b[1],E=On(function(e){return e.profile},Kt);(0,oe.useEffect)(function(){if(null!==w){if(!e.isLoggedIn)return void y(Rg("sign-in"));if(hf(e.isLoggedIn,E))return;ba({showCloseButton:!0,allowOutsideClick:!1,html:ae().createElement(xl,e.content)},!0).then(function(e){void 0===(null==e?void 0:e.code)?e.isDismissed||Rl(e.platform):ba({icon:"error",showCloseButton:!0,allowOutsideClick:!1,html:ae().createElement(bl,re({},e,{slug:a,type:i}))},!0)}),k(null)}},[w]);var O=Vn()("templately-item","templately-".concat(i,"-item"));return ae().createElement("div",{className:O},ae().createElement("div",{className:"templately-item-inner"},ae().createElement(gE,{ignoreKeys:["category","tag_id","templateType"],className:"templately-item-image-hover-wrapper ".concat("pack"==i?"templately-pack-images-wrapper":""),to:"".concat(e.platform,"/").concat(i,"s/").concat(a)},ae().createElement("div",{className:"templately-item-image-container ".concat("pack"==i?"templately-pack-images":"")},"pack"!==i&&ae().createElement(DE,{slug:a,type:i,dependencies:f,platform:e.platform}),ae().createElement(GE,{name:r,price:+o,thumbnails:"pack"==i?[h,d,c]:[c]}))),ae().createElement("div",{className:"templately-item-details"},ae().createElement(qE,{isPurchased:null==e?void 0:e.isPurchased,isPack:"pack"===i,fullSiteImport:v,type:i,downloads:l,rating:s,likes:m,id:n,price:o,setInsert:k}),ae().createElement(gE,{className:"templately-title",to:"".concat(e.platform,"/").concat(i,"s/").concat(a)},ae().createElement("h4",null,r)))))};var XE=o(5556),KE=o.n(XE),ZE=o(312),JE=o.n(ZE);function eO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eO(Object(n),!0).forEach(function(t){rO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oO(){return oO=Object.assign||function(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},oO.apply(this,arguments)}function iO(e){return iO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},iO(e)}function aO(e,t){return aO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},aO(e,t)}function sO(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,a=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){a=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||uO(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cO(e){return function(e){if(Array.isArray(e))return dO(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||uO(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uO(e,t){if(e){if("string"==typeof e)return dO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dO(e,t):void 0}}function dO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pO(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return"";var n=e;return t&&Object.keys(t).forEach(function(e){n=n.replace(e,t[e])}),n}function hO(){return void 0!==o.g.window?o.g.window.innerWidth:0}function fO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.g.window.self;return e===o.g.window.top||function(){try{return o.g.window.location.hostname!==o.g.window.parent.location.hostname}catch(e){return!0}}()?e:fO(e.parent)}var mO=300,gO=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aO(e,t)}(l,e);var t,n,r,i,a,s=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=iO(i);if(a){var n=iO(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?sO(e):t}(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=s.call(this,e)).state={isClosing:!e.animationDisabled,shouldAnimate:!1,zoomLevel:0,offsetX:0,offsetY:0,loadErrorStatus:{}},t.outerEl=ae().createRef(),t.zoomInBtn=ae().createRef(),t.zoomOutBtn=ae().createRef(),t.caption=ae().createRef(),t.closeIfClickInner=t.closeIfClickInner.bind(sO(t)),t.handleImageDoubleClick=t.handleImageDoubleClick.bind(sO(t)),t.handleImageMouseWheel=t.handleImageMouseWheel.bind(sO(t)),t.handleKeyInput=t.handleKeyInput.bind(sO(t)),t.handleMouseUp=t.handleMouseUp.bind(sO(t)),t.handleMouseDown=t.handleMouseDown.bind(sO(t)),t.handleMouseMove=t.handleMouseMove.bind(sO(t)),t.handleOuterMousewheel=t.handleOuterMousewheel.bind(sO(t)),t.handleTouchStart=t.handleTouchStart.bind(sO(t)),t.handleTouchMove=t.handleTouchMove.bind(sO(t)),t.handleTouchEnd=t.handleTouchEnd.bind(sO(t)),t.handlePointerEvent=t.handlePointerEvent.bind(sO(t)),t.handleCaptionMousewheel=t.handleCaptionMousewheel.bind(sO(t)),t.handleWindowResize=t.handleWindowResize.bind(sO(t)),t.handleZoomInButtonClick=t.handleZoomInButtonClick.bind(sO(t)),t.handleZoomOutButtonClick=t.handleZoomOutButtonClick.bind(sO(t)),t.requestClose=t.requestClose.bind(sO(t)),t.requestMoveNext=t.requestMoveNext.bind(sO(t)),t.requestMovePrev=t.requestMovePrev.bind(sO(t)),t.timeouts=[],t.currentAction=0,t.eventsSource=0,t.pointerList=[],t.preventInnerClose=!1,t.preventInnerCloseTimeout=null,t.keyPressed=!1,t.imageCache={},t.lastKeyDownTime=0,t.resizeTimeout=null,t.wheelActionTimeout=null,t.resetScrollTimeout=null,t.scrollX=0,t.scrollY=0,t.moveStartX=0,t.moveStartY=0,t.moveStartOffsetX=0,t.moveStartOffsetY=0,t.swipeStartX=0,t.swipeStartY=0,t.swipeEndX=0,t.swipeEndY=0,t.pinchTouchList=null,t.pinchDistance=0,t.keyCounter=0,t.moveRequested=!1,t}return t=l,n=[{key:"componentDidMount",value:function(){var e=this;this.props.animationDisabled||this.setState({isClosing:!1}),this.windowContext=fO(),this.listeners={resize:this.handleWindowResize,mouseup:this.handleMouseUp,touchend:this.handleTouchEnd,touchcancel:this.handleTouchEnd,pointerdown:this.handlePointerEvent,pointermove:this.handlePointerEvent,pointerup:this.handlePointerEvent,pointercancel:this.handlePointerEvent},Object.keys(this.listeners).forEach(function(t){e.windowContext.addEventListener(t,e.listeners[t])}),this.loadAllImages()}},{key:"shouldComponentUpdate",value:function(e){var t=this;return this.getSrcTypes().forEach(function(n){t.props[n.name]!==e[n.name]&&(t.moveRequested=!1)}),!this.moveRequested}},{key:"componentDidUpdate",value:function(e){var t=this,n=!1,r={},o={};this.getSrcTypes().forEach(function(i){e[i.name]!==t.props[i.name]&&(n=!0,r[e[i.name]]=!0,o[t.props[i.name]]=!0)}),(n||this.moveRequested)&&(Object.keys(r).forEach(function(e){!(e in o)&&e in t.imageCache&&(t.imageCache[e].loaded=!1)}),this.moveRequested=!1,this.loadAllImages(this.props))}},{key:"componentWillUnmount",value:function(){var e=this;this.didUnmount=!0,Object.keys(this.listeners).forEach(function(t){e.windowContext.removeEventListener(t,e.listeners[t])}),this.timeouts.forEach(function(e){return clearTimeout(e)})}},{key:"setTimeout",value:function(e){function t(_x,t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e,t){var n=this,r=setTimeout(function(){n.timeouts=n.timeouts.filter(function(e){return e!==r}),e()},t);return this.timeouts.push(r),r})},{key:"setPreventInnerClose",value:function(){var e=this;this.preventInnerCloseTimeout&&this.clearTimeout(this.preventInnerCloseTimeout),this.preventInnerClose=!0,this.preventInnerCloseTimeout=this.setTimeout(function(){e.preventInnerClose=!1,e.preventInnerCloseTimeout=null},100)}},{key:"getBestImageForType",value:function(e){var t=this.props[e],n={};if(this.isImageLoaded(t))n=this.getFitSizes(this.imageCache[t].width,this.imageCache[t].height);else{if(!this.isImageLoaded(this.props["".concat(e,"Thumbnail")]))return null;t=this.props["".concat(e,"Thumbnail")],n=this.getFitSizes(this.imageCache[t].width,this.imageCache[t].height,!0)}return{src:t,height:this.imageCache[t].height,width:this.imageCache[t].width,targetHeight:n.height,targetWidth:n.width}}},{key:"getFitSizes",value:function(e,t,n){var r=this.getLightboxRect(),o=r.height-2*this.props.imagePadding,i=r.width-2*this.props.imagePadding;return n||(o=Math.min(o,t),i=Math.min(i,e)),i/o>e/t?{width:e*o/t,height:o}:{width:i,height:t*i/e}}},{key:"getMaxOffsets",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.zoomLevel,t=this.getBestImageForType("mainSrc");if(null===t)return{maxX:0,minX:0,maxY:0,minY:0};var n,r,o=this.getLightboxRect(),i=this.getZoomMultiplier(e);return{maxX:n=i*t.width-o.width<0?(o.width-i*t.width)/2:(i*t.width-o.width)/2,maxY:r=i*t.height-o.height<0?(o.height-i*t.height)/2:(i*t.height-o.height)/2,minX:-1*n,minY:-1*r}}},{key:"getSrcTypes",value:function(){return[{name:"mainSrc",keyEnding:"i".concat(this.keyCounter)},{name:"mainSrcThumbnail",keyEnding:"t".concat(this.keyCounter)},{name:"nextSrc",keyEnding:"i".concat(this.keyCounter+1)},{name:"nextSrcThumbnail",keyEnding:"t".concat(this.keyCounter+1)},{name:"prevSrc",keyEnding:"i".concat(this.keyCounter-1)},{name:"prevSrcThumbnail",keyEnding:"t".concat(this.keyCounter-1)}]}},{key:"getZoomMultiplier",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.zoomLevel;return Math.pow(1.007,e)}},{key:"getLightboxRect",value:function(){return this.outerEl.current?this.outerEl.current.getBoundingClientRect():{width:hO(),height:void 0!==o.g.window?o.g.window.innerHeight:0,top:0,right:0,bottom:0,left:0}}},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){this.timeouts=this.timeouts.filter(function(t){return t!==e}),clearTimeout(e)})},{key:"changeZoom",value:function(e,t,n){if(this.props.enableZoom){var r=Math.max(0,Math.min(mO,e));if(r!==this.state.zoomLevel)if(0!==r){var o=this.getBestImageForType("mainSrc");if(null!==o){var i=this.getZoomMultiplier(),a=this.getZoomMultiplier(r),s=this.getLightboxRect(),l=void 0!==t?t-s.left:s.width/2,c=void 0!==n?n-s.top:s.height/2,u=(s.width-o.width*i)/2,d=(s.height-o.height*i)/2,p=l-(l-(u-this.state.offsetX))/i*a,h=c-(c-(d-this.state.offsetY))/i*a,f=(s.width-o.width*a)/2-p,m=(s.height-o.height*a)/2-h;if(3!==this.currentAction){var g=this.getMaxOffsets();this.state.zoomLevel>r&&(f=Math.max(g.minX,Math.min(g.maxX,f)),m=Math.max(g.minY,Math.min(g.maxY,m)))}this.setState({zoomLevel:r,offsetX:f,offsetY:m})}}else this.setState({zoomLevel:r,offsetX:0,offsetY:0})}}},{key:"closeIfClickInner",value:function(e){!this.preventInnerClose&&e.target.className.search(/\bril-inner\b/)>-1&&this.requestClose(e)}},{key:"handleKeyInput",value:function(e){if(e.stopPropagation(),!this.isAnimating())if("keyup"!==e.type){var t=e.which||e.keyCode,n=new Date;if(!(n.getTime()-this.lastKeyDownTime<this.props.keyRepeatLimit&&27!==t))switch(this.lastKeyDownTime=n.getTime(),t){case 27:e.preventDefault(),this.requestClose(e);break;case 37:if(!this.props.prevSrc)return;e.preventDefault(),this.keyPressed=!0,this.requestMovePrev(e);break;case 39:if(!this.props.nextSrc)return;e.preventDefault(),this.keyPressed=!0,this.requestMoveNext(e)}}else this.lastKeyDownTime-=this.props.keyRepeatKeyupBonus}},{key:"handleOuterMousewheel",value:function(e){var t=this;e.stopPropagation();var n=0;this.clearTimeout(this.resetScrollTimeout),this.resetScrollTimeout=this.setTimeout(function(){t.scrollX=0,t.scrollY=0},300),null!==this.wheelActionTimeout||this.isAnimating()||(Math.abs(e.deltaY)<Math.abs(e.deltaX)&&(this.scrollY=0,this.scrollX+=e.deltaX,this.scrollX>=200||e.deltaX>=100?(this.requestMoveNext(e),n=500,this.scrollX=0):(this.scrollX<=-200||e.deltaX<=-100)&&(this.requestMovePrev(e),n=500,this.scrollX=0)),0!==n&&(this.wheelActionTimeout=this.setTimeout(function(){t.wheelActionTimeout=null},n)))}},{key:"handleImageMouseWheel",value:function(e){if(Math.abs(e.deltaY)>=Math.abs(e.deltaX)){if(e.stopPropagation(),Math.abs(e.deltaY)<1)return;this.scrollX=0,this.scrollY+=e.deltaY,this.changeZoom(this.state.zoomLevel-e.deltaY,e.clientX,e.clientY)}}},{key:"handleImageDoubleClick",value:function(e){this.state.zoomLevel>0?this.changeZoom(0,e.clientX,e.clientY):this.changeZoom(this.state.zoomLevel+100,e.clientX,e.clientY)}},{key:"shouldHandleEvent",value:function(e){if(this.eventsSource===e)return!0;if(0===this.eventsSource)return this.eventsSource=e,!0;switch(e){case 1:default:return!1;case 2:return this.eventsSource=2,this.filterPointersBySource(),!0;case 3:return 1===this.eventsSource&&(this.eventsSource=3,this.filterPointersBySource(),!0)}}},{key:"addPointer",value:function(e){this.pointerList.push(e)}},{key:"removePointer",value:function(e){this.pointerList=this.pointerList.filter(function(t){return t.id!==e.id})}},{key:"filterPointersBySource",value:function(){var e=this;this.pointerList=this.pointerList.filter(function(t){return t.source===e.eventsSource})}},{key:"handleMouseDown",value:function(e){this.shouldHandleEvent(1)&&l.isTargetMatchImage(e.target)&&(this.addPointer(l.parseMouseEvent(e)),this.multiPointerStart(e))}},{key:"handleMouseMove",value:function(e){this.shouldHandleEvent(1)&&this.multiPointerMove(e,[l.parseMouseEvent(e)])}},{key:"handleMouseUp",value:function(e){this.shouldHandleEvent(1)&&(this.removePointer(l.parseMouseEvent(e)),this.multiPointerEnd(e))}},{key:"handlePointerEvent",value:function(e){if(this.shouldHandleEvent(3))switch(e.type){case"pointerdown":l.isTargetMatchImage(e.target)&&(this.addPointer(l.parsePointerEvent(e)),this.multiPointerStart(e));break;case"pointermove":this.multiPointerMove(e,[l.parsePointerEvent(e)]);break;case"pointerup":case"pointercancel":this.removePointer(l.parsePointerEvent(e)),this.multiPointerEnd(e)}}},{key:"handleTouchStart",value:function(e){var t=this;this.shouldHandleEvent(2)&&l.isTargetMatchImage(e.target)&&([].forEach.call(e.changedTouches,function(e){return t.addPointer(l.parseTouchPointer(e))}),this.multiPointerStart(e))}},{key:"handleTouchMove",value:function(e){this.shouldHandleEvent(2)&&this.multiPointerMove(e,[].map.call(e.changedTouches,function(e){return l.parseTouchPointer(e)}))}},{key:"handleTouchEnd",value:function(e){var t=this;this.shouldHandleEvent(2)&&([].map.call(e.changedTouches,function(e){return t.removePointer(l.parseTouchPointer(e))}),this.multiPointerEnd(e))}},{key:"decideMoveOrSwipe",value:function(e){this.state.zoomLevel<=0?this.handleSwipeStart(e):this.handleMoveStart(e)}},{key:"multiPointerStart",value:function(e){switch(this.handleEnd(null),this.pointerList.length){case 1:e.preventDefault(),this.decideMoveOrSwipe(this.pointerList[0]);break;case 2:e.preventDefault(),this.handlePinchStart(this.pointerList)}}},{key:"multiPointerMove",value:function(e,t){switch(this.currentAction){case 1:e.preventDefault(),this.handleMove(t[0]);break;case 2:e.preventDefault(),this.handleSwipe(t[0]);break;case 3:e.preventDefault(),this.handlePinch(t)}}},{key:"multiPointerEnd",value:function(e){switch(0!==this.currentAction&&(this.setPreventInnerClose(),this.handleEnd(e)),this.pointerList.length){case 0:this.eventsSource=0;break;case 1:e.preventDefault(),this.decideMoveOrSwipe(this.pointerList[0]);break;case 2:e.preventDefault(),this.handlePinchStart(this.pointerList)}}},{key:"handleEnd",value:function(e){switch(this.currentAction){case 1:this.handleMoveEnd(e);break;case 2:this.handleSwipeEnd(e);break;case 3:this.handlePinchEnd(e)}}},{key:"handleMoveStart",value:function(e){var t=e.x,n=e.y;this.props.enableZoom&&(this.currentAction=1,this.moveStartX=t,this.moveStartY=n,this.moveStartOffsetX=this.state.offsetX,this.moveStartOffsetY=this.state.offsetY)}},{key:"handleMove",value:function(e){var t=e.x,n=e.y,r=this.moveStartX-t+this.moveStartOffsetX,o=this.moveStartY-n+this.moveStartOffsetY;this.state.offsetX===r&&this.state.offsetY===o||this.setState({offsetX:r,offsetY:o})}},{key:"handleMoveEnd",value:function(){var e=this;this.currentAction=0,this.moveStartX=0,this.moveStartY=0,this.moveStartOffsetX=0,this.moveStartOffsetY=0;var t=this.getMaxOffsets(),n=Math.max(t.minX,Math.min(t.maxX,this.state.offsetX)),r=Math.max(t.minY,Math.min(t.maxY,this.state.offsetY));n===this.state.offsetX&&r===this.state.offsetY||(this.setState({offsetX:n,offsetY:r,shouldAnimate:!0}),this.setTimeout(function(){e.setState({shouldAnimate:!1})},this.props.animationDuration))}},{key:"handleSwipeStart",value:function(e){var t=e.x,n=e.y;this.currentAction=2,this.swipeStartX=t,this.swipeStartY=n,this.swipeEndX=t,this.swipeEndY=n}},{key:"handleSwipe",value:function(e){var t=e.x,n=e.y;this.swipeEndX=t,this.swipeEndY=n}},{key:"handleSwipeEnd",value:function(e){var t=this.swipeEndX-this.swipeStartX,n=Math.abs(t),r=Math.abs(this.swipeEndY-this.swipeStartY);if(this.currentAction=0,this.swipeStartX=0,this.swipeStartY=0,this.swipeEndX=0,this.swipeEndY=0,!(!e||this.isAnimating()||n<1.5*r)){if(n<200&&n<this.getLightboxRect().width/4)return;t>0&&this.props.prevSrc?(e.preventDefault(),this.requestMovePrev()):t<0&&this.props.nextSrc&&(e.preventDefault(),this.requestMoveNext())}}},{key:"calculatePinchDistance",value:function(){var e=lO(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pinchTouchList,2),t=e[0],n=e[1];return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}},{key:"calculatePinchCenter",value:function(){var e=lO(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.pinchTouchList,2),t=e[0],n=e[1];return{x:t.x-(t.x-n.x)/2,y:t.y-(t.y-n.y)/2}}},{key:"handlePinchStart",value:function(e){this.props.enableZoom&&(this.currentAction=3,this.pinchTouchList=e.map(function(e){return{id:e.id,x:e.x,y:e.y}}),this.pinchDistance=this.calculatePinchDistance())}},{key:"handlePinch",value:function(e){this.pinchTouchList=this.pinchTouchList.map(function(t){for(var n=0;n<e.length;n+=1)if(e[n].id===t.id)return e[n];return t});var t=this.calculatePinchDistance(),n=this.state.zoomLevel+t-this.pinchDistance;this.pinchDistance=t;var r=this.calculatePinchCenter(this.pinchTouchList),o=r.x,i=r.y;this.changeZoom(n,o,i)}},{key:"handlePinchEnd",value:function(){this.currentAction=0,this.pinchTouchList=null,this.pinchDistance=0}},{key:"handleWindowResize",value:function(){this.clearTimeout(this.resizeTimeout),this.resizeTimeout=this.setTimeout(this.forceUpdate.bind(this),100)}},{key:"handleZoomInButtonClick",value:function(){var e=this.state.zoomLevel+100;this.changeZoom(e),e===mO&&this.zoomOutBtn.current.focus()}},{key:"handleZoomOutButtonClick",value:function(){var e=this.state.zoomLevel-100;this.changeZoom(e),0===e&&this.zoomInBtn.current.focus()}},{key:"handleCaptionMousewheel",value:function(e){if(e.stopPropagation(),this.caption.current){var t=this.caption.current.getBoundingClientRect().height,n=this.caption.current,r=n.scrollHeight,o=n.scrollTop;(e.deltaY>0&&t+o>=r||e.deltaY<0&&o<=0)&&e.preventDefault()}}},{key:"isAnimating",value:function(){return this.state.shouldAnimate||this.state.isClosing}},{key:"isImageLoaded",value:function(e){return e&&e in this.imageCache&&this.imageCache[e].loaded}},{key:"loadImage",value:function(e,t,n){var r=this;if(this.isImageLoaded(t))this.setTimeout(function(){n()},1);else{var i=new o.g.Image;this.props.imageCrossOrigin&&(i.crossOrigin=this.props.imageCrossOrigin),i.onerror=function(o){r.props.onImageLoadError(t,e,o),r.setState(function(t){return{loadErrorStatus:tO(tO({},t.loadErrorStatus),{},rO({},e,!0))}}),n(o)},i.onload=function(){r.props.onImageLoad(t,e,i),r.imageCache[t]={loaded:!0,width:i.width,height:i.height},n()},i.src=t}}},{key:"loadAllImages",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;this.getSrcTypes().forEach(function(n){var r=n.name;t[r]&&e.state.loadErrorStatus[r]&&e.setState(function(e){return{loadErrorStatus:tO(tO({},e.loadErrorStatus),{},rO({},r,!1))}}),t[r]&&!e.isImageLoaded(t[r])&&e.loadImage(r,t[r],function(t,n){return function(r){r||e.props[t]!==n||e.didUnmount||e.forceUpdate()}}(r,t[r]))})}},{key:"requestClose",value:function(e){var t=this,n=function(){return t.props.onCloseRequest(e)};this.props.animationDisabled||"keydown"===e.type&&!this.props.animationOnKeyInput?n():(this.setState({isClosing:!0}),this.setTimeout(n,this.props.animationDuration))}},{key:"requestMove",value:function(e,t){var n=this,r={zoomLevel:0,offsetX:0,offsetY:0};this.props.animationDisabled||this.keyPressed&&!this.props.animationOnKeyInput||(r.shouldAnimate=!0,this.setTimeout(function(){return n.setState({shouldAnimate:!1})},this.props.animationDuration)),this.keyPressed=!1,this.moveRequested=!0,"prev"===e?(this.keyCounter-=1,this.setState(r),this.props.onMovePrevRequest(t)):(this.keyCounter+=1,this.setState(r),this.props.onMoveNextRequest(t))}},{key:"requestMoveNext",value:function(e){this.requestMove("next",e)}},{key:"requestMovePrev",value:function(e){this.requestMove("prev",e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.animationDisabled,r=t.animationDuration,i=t.clickOutsideToClose,a=t.discourageDownloads,s=t.enableZoom,c=t.imageTitle,u=t.nextSrc,d=t.prevSrc,p=t.toolbarButtons,h=t.reactModalStyle,f=t.onAfterOpen,m=t.imageCrossOrigin,g=t.reactModalProps,v=t.loader,y=this.state,b=y.zoomLevel,w=y.offsetX,k=y.offsetY,E=y.isClosing,O=y.loadErrorStatus,S=this.getLightboxRect(),x={};!n&&this.isAnimating()&&(x=tO(tO({},x),{},{transition:"transform ".concat(r,"ms")}));var _={};this.getSrcTypes().forEach(function(e){var t=e.name,n=e.keyEnding;_[t]=n});var C=[],P=function(t,n,r){if(e.props[t]){var o=e.getBestImageForType(t),i=tO(tO({},x),l.getTransform(tO(tO({},r),o)));if(b>0&&(i.cursor="move"),null===o&&(d=O,Object.keys(d).some(function(e){return d[e]})))C.push(ae().createElement("div",{className:"".concat(n," ril__image ril-errored"),style:i,key:e.props[t]+_[t]},ae().createElement("div",{className:"ril__errorContainer"},e.props.imageLoadErrorMessage)));else if(null!==o){var s=o.src;a?(i.backgroundImage="url('".concat(s,"')"),C.push(ae().createElement("div",{className:"".concat(n," ril__image ril__imageDiscourager"),onDoubleClick:e.handleImageDoubleClick,onWheel:e.handleImageMouseWheel,style:i,key:s+_[t]},ae().createElement("div",{className:"ril-download-blocker ril__downloadBlocker"})))):C.push(ae().createElement("img",oO({},m?{crossOrigin:m}:{},{className:"".concat(n," ril__image"),onDoubleClick:e.handleImageDoubleClick,onWheel:e.handleImageMouseWheel,onDragStart:function(e){return e.preventDefault()},style:i,src:s,key:s+_[t],alt:"string"==typeof c?c:pO("Image"),draggable:!1})))}else{var u=void 0!==v?v:ae().createElement("div",{className:"ril-loading-circle ril__loadingCircle ril__loadingContainer__icon"},cO(new Array(12)).map(function(e,t){return ae().createElement("div",{key:t,className:"ril-loading-circle-point ril__loadingCirclePoint"})}));C.push(ae().createElement("div",{className:"".concat(n," ril__image ril-not-loaded"),style:i,key:e.props[t]+_[t]},ae().createElement("div",{className:"ril__loadingContainer"},u)))}}var d},T=this.getZoomMultiplier();P("nextSrc","ril-image-next ril__imageNext",{x:S.width}),P("mainSrc","ril-image-current",{x:-1*w,y:-1*k,zoom:T}),P("prevSrc","ril-image-prev ril__imagePrev",{x:-1*S.width});var A={overlay:tO({zIndex:1e3,backgroundColor:"transparent"},h.overlay),content:tO({backgroundColor:"transparent",overflow:"hidden",border:"none",borderRadius:0,padding:0,top:0,left:0,right:0,bottom:0},h.content)};return ae().createElement(JE(),oO({isOpen:!0,onRequestClose:i?this.requestClose:void 0,onAfterOpen:function(){e.outerEl.current&&e.outerEl.current.focus(),f()},style:A,contentLabel:pO("Lightbox"),appElement:void 0!==o.g.window?o.g.window.document.body:void 0},g),ae().createElement("div",{className:"ril-outer ril__outer ril__outerAnimating ".concat(this.props.wrapperClassName," ").concat(E?"ril-closing ril__outerClosing":""),style:{transition:"opacity ".concat(r,"ms"),animationDuration:"".concat(r,"ms"),animationDirection:E?"normal":"reverse"},ref:this.outerEl,onWheel:this.handleOuterMousewheel,onMouseMove:this.handleMouseMove,onMouseDown:this.handleMouseDown,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,tabIndex:"-1",onKeyDown:this.handleKeyInput,onKeyUp:this.handleKeyInput},ae().createElement("div",{className:"ril-inner ril__inner",onClick:i?this.closeIfClickInner:void 0},C),d&&ae().createElement("button",{type:"button",className:"ril-prev-button ril__navButtons ril__navButtonPrev",key:"prev","aria-label":this.props.prevLabel,title:this.props.prevLabel,onClick:this.isAnimating()?void 0:this.requestMovePrev}),u&&ae().createElement("button",{type:"button",className:"ril-next-button ril__navButtons ril__navButtonNext",key:"next","aria-label":this.props.nextLabel,title:this.props.nextLabel,onClick:this.isAnimating()?void 0:this.requestMoveNext}),ae().createElement("div",{className:"ril-toolbar ril__toolbar"},ae().createElement("ul",{className:"ril-toolbar-left ril__toolbarSide ril__toolbarLeftSide"},ae().createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},ae().createElement("span",{className:"ril-toolbar__item__child ril__toolbarItemChild"},c))),ae().createElement("ul",{className:"ril-toolbar-right ril__toolbarSide ril__toolbarRightSide"},p&&p.map(function(e,t){return ae().createElement("li",{key:"button_".concat(t+1),className:"ril-toolbar__item ril__toolbarItem"},e)}),s&&ae().createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},ae().createElement("button",{type:"button",key:"zoom-in","aria-label":this.props.zoomInLabel,title:this.props.zoomInLabel,className:["ril-zoom-in","ril__toolbarItemChild","ril__builtinButton","ril__zoomInButton"].concat(cO(b===mO?["ril__builtinButtonDisabled"]:[])).join(" "),ref:this.zoomInBtn,disabled:this.isAnimating()||b===mO,onClick:this.isAnimating()||b===mO?void 0:this.handleZoomInButtonClick})),s&&ae().createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},ae().createElement("button",{type:"button",key:"zoom-out","aria-label":this.props.zoomOutLabel,title:this.props.zoomOutLabel,className:["ril-zoom-out","ril__toolbarItemChild","ril__builtinButton","ril__zoomOutButton"].concat(cO(0===b?["ril__builtinButtonDisabled"]:[])).join(" "),ref:this.zoomOutBtn,disabled:this.isAnimating()||0===b,onClick:this.isAnimating()||0===b?void 0:this.handleZoomOutButtonClick})),ae().createElement("li",{className:"ril-toolbar__item ril__toolbarItem"},ae().createElement("button",{type:"button",key:"close","aria-label":this.props.closeLabel,title:this.props.closeLabel,className:"ril-close ril-toolbar__item__child ril__toolbarItemChild ril__builtinButton ril__closeButton",onClick:this.isAnimating()?void 0:this.requestClose})))),this.props.imageCaption&&ae().createElement("div",{onWheel:this.handleCaptionMousewheel,onMouseDown:function(e){return e.stopPropagation()},className:"ril-caption ril__caption",ref:this.caption},ae().createElement("div",{className:"ril-caption-content ril__captionContent"},this.props.imageCaption))))}}],r=[{key:"isTargetMatchImage",value:function(e){return e&&/ril-image-current/.test(e.className)}},{key:"parseMouseEvent",value:function(e){return{id:"mouse",source:1,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"parseTouchPointer",value:function(e){return{id:e.identifier,source:2,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"parsePointerEvent",value:function(e){return{id:e.pointerId,source:3,x:parseInt(e.clientX,10),y:parseInt(e.clientY,10)}}},{key:"getTransform",value:function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.zoom,a=void 0===i?1:i,s=e.width,l=e.targetWidth,c=n,u=hO();s>u&&(c+=(u-s)/2);var d=a*(l/s);return{transform:"translate3d(".concat(c,"px,").concat(o,"px,0) scale3d(").concat(d,",").concat(d,",1)")}}}],n&&nO(t.prototype,n),r&&nO(t,r),l}(oe.Component);gO.propTypes={mainSrc:KE().string.isRequired,prevSrc:KE().string,nextSrc:KE().string,mainSrcThumbnail:KE().string,prevSrcThumbnail:KE().string,nextSrcThumbnail:KE().string,onCloseRequest:KE().func.isRequired,onMovePrevRequest:KE().func,onMoveNextRequest:KE().func,onImageLoadError:KE().func,onImageLoad:KE().func,onAfterOpen:KE().func,discourageDownloads:KE().bool,animationDisabled:KE().bool,animationOnKeyInput:KE().bool,animationDuration:KE().number,keyRepeatLimit:KE().number,keyRepeatKeyupBonus:KE().number,imageTitle:KE().node,imageCaption:KE().node,imageCrossOrigin:KE().string,reactModalStyle:KE().shape({}),imagePadding:KE().number,wrapperClassName:KE().string,toolbarButtons:KE().arrayOf(KE().node),clickOutsideToClose:KE().bool,enableZoom:KE().bool,reactModalProps:KE().shape({}),nextLabel:KE().string,prevLabel:KE().string,zoomInLabel:KE().string,zoomOutLabel:KE().string,closeLabel:KE().string,imageLoadErrorMessage:KE().node,loader:KE().node},gO.defaultProps={imageTitle:null,imageCaption:null,toolbarButtons:null,reactModalProps:{},animationDisabled:!1,animationDuration:300,animationOnKeyInput:!1,clickOutsideToClose:!0,closeLabel:"Close lightbox",discourageDownloads:!1,enableZoom:!0,imagePadding:10,imageCrossOrigin:null,keyRepeatKeyupBonus:40,keyRepeatLimit:180,mainSrcThumbnail:null,nextLabel:"Next image",nextSrc:null,nextSrcThumbnail:null,onAfterOpen:function(){},onImageLoadError:function(){},onImageLoad:function(){},onMoveNextRequest:function(){},onMovePrevRequest:function(){},prevLabel:"Previous image",prevSrc:null,prevSrcThumbnail:null,reactModalStyle:{},wrapperClassName:"",zoomInLabel:"Zoom in",zoomOutLabel:"Zoom out",imageLoadErrorMessage:"This image failed to load",loader:void 0};const vO=gO,yO=function(e){var t,n,r,o=e.isOpen,i=e.images,a=e.setIsOpen,s=pe((0,oe.useState)(0),2),l=s[0],c=s[1];return ae().createElement(ae().Fragment,null,o?ae().createElement(vO,{enableZoom:!1,reactModalProps:{style:{overlay:{position:"initial",inset:"0px"},content:{position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px",border:"none",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"0px",outline:"none",padding:"0px",zIndex:"9999"}},parentSelector:function(){return document.querySelector(".templately-container")}},mainSrc:null===(t=i[l])||void 0===t?void 0:t.url,nextSrc:null===(n=i[(l+1)%i.length])||void 0===n?void 0:n.url,prevSrc:null===(r=i[(l+i.length-1)%i.length])||void 0===r?void 0:r.url,onCloseRequest:function(){return a(!1)},onMovePrevRequest:function(){return c((l+i.length-1)%i.length)},onMoveNextRequest:function(){return c((l+1)%i.length)}}):"")},bO=fn(function(e,t){var n,r,o,i,a,s=null!==(n="blocks"===(null==t?void 0:t.type)?"sections":null==t?void 0:t.type)&&void 0!==n?n:"packs",l=1,c=1,u=e.general.platform,d=e.general.plan,p=e.general.filter.doQuery;if("sharedWorkspaces"===s||"workspaces"===s)l=null!==(r=null==e||null===(o=e[s])||void 0===o?void 0:o.currentPage)&&void 0!==r?r:1,c=null!==(i=null==e||null===(a=e[s])||void 0===a?void 0:a.totalPage)&&void 0!==i?i:1;else if("workspaceDetails"===s){var h,f,m=t.slug;l=null==e||null===(h=e[s])||void 0===h||null===(h=h[u])||void 0===h||null===(h=h[m])||void 0===h?void 0:h.currentPage,c=null==e||null===(f=e[s])||void 0===f||null===(f=f[u])||void 0===f||null===(f=f[m])||void 0===f?void 0:f.totalPage}else if("clouds"===s){var g,v,y,b;l=null!==(g=null==e||null===(v=e[s])||void 0===v||null===(v=v.items)||void 0===v||null===(v=v[u])||void 0===v?void 0:v.currentPage)&&void 0!==g?g:1,c=null!==(y=null==e||null===(b=e[s])||void 0===b||null===(b=b.items)||void 0===b||null===(b=b[u])||void 0===b?void 0:b.totalPage)&&void 0!==y?y:1}else if("savedTemplates"===s){var w,k,E,O;l=null!==(w=null==e||null===(k=e[s])||void 0===k||null===(k=k[u])||void 0===k?void 0:k.currentPage)&&void 0!==w?w:1,c=null!==(E=null==e||null===(O=e[s])||void 0===O||null===(O=O[u])||void 0===O?void 0:O.totalPage)&&void 0!==E?E:1}else{var S,x,_,C;l=null==e||null===(S=e[s])||void 0===S||null===(S=S[d])||void 0===S||null===(S=S[u])||void 0===S?void 0:S.currentPage,c=null==e||null===(x=e[s])||void 0===x||null===(x=x[d])||void 0===x||null===(x=x[u])||void 0===x?void 0:x.totalPage,p&&(l=null==e||null===(_=e[s])||void 0===_||null===(_=_[d])||void 0===_||null===(_=_[u])||void 0===_||null===(_=_.filteredResults)||void 0===_?void 0:_.currentPage,c=null==e||null===(C=e[s])||void 0===C||null===(C=C[d])||void 0===C||null===(C=C[u])||void 0===C||null===(C=C.filteredResults)||void 0===C?void 0:C.totalPage)}return t.hasOwnProperty("states")&&(l=Ri(e,[].concat(Da(t.states),["currentPage"]),1),c=Ri(e,[].concat(Da(t.states),["totalPage"]),1)),{plan:d,platform:u,page:l,totalPage:c,need:c>1,doingQuery:p}},function(e){return{setPage:function(t){return e(function(e){var t=Ii(go,e.key);return"workspaces"===e.key?t=Do.SET_PAGE:"sharedWorkspaces"===e.key?t=Mo.SET_PAGE:"workspaceDetails"===e.key?t=No.SET_PAGE:"clouds"===e.key?t=Ao.SET_PAGE:"savedTemplates"===e.key?t=Po:"favourites"===e.key?t=Jr:"downloads"===e.key?t=io:"purchasedItems"===e.key&&(t=uo),wf({type:t},e)}(t))}}})(function(e){var t,n=pe((0,oe.useState)(null!==(t=e.total)&&void 0!==t?t:1),2),r=n[0],o=n[1],i=pe((0,oe.useState)(!1),2),a=i[0],s=i[1],l=pe((0,oe.useState)([]),2),c=l[0],u=l[1],d=(0,oe.useCallback)(function(){return e.page>1},[e.page]),p=(0,oe.useCallback)(function(){return e.page<r},[e.page,r]);(0,oe.useEffect)(function(){o(e.total)},[e.type]),(0,oe.useEffect)(function(){if(a){var t={page:a,key:e.type,plan:e.plan,platform:e.platform,search:null};t.key="blocks"===t.key?"sections":t.key,e.slug&&(t.slug=e.slug),"favourites"!==e.type&&"downloads"!==e.type&&"purchasedItems"!==e.type||(t={key:e.type,page:a,states:e.states}),null!=e&&e.isSearch&&(t.search=!0),e.doingQuery&&(t.filtering=!0),e.setPage(t)}},[a]),(0,oe.useEffect)(function(){var t=1,n=r;r>10&&(t=Math.max(1,e.page-3),n=Math.min(e.page+3,r),e.page-1<=3&&(n=7),r-e.page<=3&&(t=r-6));var o=[];o.push(ae().createElement("li",{className:1==e.page?"epage-link epage-active":"epage-link",key:1,onClick:function(){return s(1)}},(0,Pt.__)(1,"templately"))),t>1?o.push(ae().createElement("li",{className:"epage-link",key:"dotdotdot"},(0,Pt.__)("...","templately"))):o.filter(function(e){return"dotdotdot"!=e.key});for(var i=function(t){o.push(ae().createElement("li",{className:e.page==t?"epage-link epage-active":"epage-link",key:t,onClick:function(){return s(t)}},(0,Pt.__)(t,"templately")))},a=t+1;a<n;a+=1)i(a);e.page+3<r&&n!==r&&o.push(ae().createElement("li",{className:"epage-link",key:"dotdotdotdot"},(0,Pt.__)("...","templately"))),o.push(ae().createElement("li",{className:e.page==r?"epage-link epage-active":"epage-link",key:r,onClick:function(){return s(r)}},(0,Pt.__)(r,"templately"))),r>=2&&u(o)},[r,e.page]);var h,f=(0,oe.useCallback)(function(){var t=e.page-1>0?e.page-1:0;s(t)},[r,e.page]),m=(0,oe.useCallback)(function(){var t=e.page+1<r?e.page+1:r;s(t)},[r,e.page]);return ae().createElement(ae().Fragment,null,!(c.length<2||!e.need)&&ae().createElement("div",{className:"templately-pagination"},ae().createElement("ul",null,(h=!d(),ae().createElement("li",{className:"epage-link pagination-arrow"},ae().createElement("button",{onClick:function(){return f()},disabled:h},ae().createElement(Jn,null)))),c,function(){var e=!p();return ae().createElement("li",{className:"epage-link pagination-arrow"},ae().createElement("button",{onClick:function(){return m()},disabled:e},ae().createElement(er,null)))}())))});var wO=["element","isLoading","error","platform"];const kO=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d="isLoading",p=null!==(n=null==t?void 0:t.stateSubKey)&&void 0!==n?n:"",h=e.general.platform;return u=null!=t&&t.stateKey?t.stateKey:"blocks"===(null==t?void 0:t.type)?"sections":null==t?void 0:t.type,null!=t&&t.loadingKey&&(d=t.loadingKey),p?(o=Ri(e,[u,h,p,d],!0),i=Ri(e,[u,h,p,"error"],null)):(o=null===(a=null==e||null===(s=e[u])||void 0===s?void 0:s[d])||void 0===a||a,i=null!==(l=null==e||null===(c=e[u])||void 0===c?void 0:c.error)&&void 0!==l?l:null),null!=t&&t.isLoadingKey&&null!=t&&t.isKey&&(o=Ri(e,t.isLoadingKey[t.isKey],!0),0===t.isLoadingKey[t.isKey].length&&(o=!1)),{isLoading:o,error:i,platform:e.general.platform,isGloballySigned:null===(r=e.profile)||void 0===r?void 0:r.is_globally_signed}},function(e){return{logout:function(t){return e(Fm(t))}}})(function(e){var t=e.element,n=e.isLoading,r=e.error,o=e.platform,i=Bn(e,wO);return ae().createElement(ae().Fragment,null,n&&ae().createElement(ma,null),!n&&null!=r&&ae().createElement(aa,re({},r,{platform:o,isGloballySigned:i.isGloballySigned,logout:i.logout})),!n&&null==r&&("function"==typeof t?t({isLoading:n}):t))});var EO=function(e){var t=Vn()("tm-message text-center");return React.createElement("div",{className:t},e.icon&&e.icon,e.title&&(Vi(e.title)?React.createElement("h3",{dangerouslySetInnerHTML:{__html:e.title}}):React.createElement("h3",null," ",e.title," ")),React.createElement("div",{className:"tm-message-body"},React.isValidElement(e.content)?e.content:"function"==typeof e.content?e.content(e.contentArgs):Ni(e.content)?Object.keys(e.content).map(function(t){return React.createElement("p",null,e.content[t])}):React.createElement("p",{dangerouslySetInnerHTML:{__html:e.content}})))};fn(function(e){return{platform:e.general.platform,sweetalert:e.sweetalert}},function(e){return{closeModal:function(){return e((0,Pm.closeModal)())}}})(function(e){return e.sweetalert.show&&ba(e.sweetalert),null});var OO=["is_verified"],SO=window.templately.no_items;const xO=function(e){var t=e.is_verified;return Bn(e,OO),ae().createElement(ae().Fragment,null,!1===t&&ae().createElement("p",{className:"text-danger templately-not-verified-account"},(0,Pt.__)("Your account is not verified. Please check your email inbox and verify your Templately account.","templately")),ae().createElement("div",{className:"templately-no-items"},ae().createElement("div",{className:"templately-no-items-inner"},ae().createElement("img",{src:SO,alt:""}))))};function _O(e){return $n({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-1.646-7.646-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708z"}}]})(e)}function CO(e){return $n({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M11.354 6.354a.5.5 0 0 0-.708-.708L8 8.293 6.854 7.146a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"}},{tag:"path",attr:{d:"M.5 1a.5.5 0 0 0 0 1h1.11l.401 1.607 1.498 7.985A.5.5 0 0 0 4 12h1a2 2 0 1 0 0 4 2 2 0 0 0 0-4h7a2 2 0 1 0 0 4 2 2 0 0 0 0-4h1a.5.5 0 0 0 .491-.408l1.5-8A.5.5 0 0 0 14.5 3H2.89l-.405-1.621A.5.5 0 0 0 2 1H.5zm3.915 10L3.102 4h10.796l-1.313 7h-8.17zM6 14a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm7 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"}}]})(e)}function PO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PO(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var AO=[{to:"../clouds",label:(0,Pt.__)("My Cloud","templately"),className:"nav-item-clouds",icon:ae().createElement(xn,null),end:!0},{to:"../clouds/workspace",label:(0,Pt.__)("My WorkSpace","templately"),className:"nav-item-workspace",icon:ae().createElement(zn,null)},{to:"../clouds/shared-workspace",label:(0,Pt.__)("Shared with Me","templately"),className:"nav-item-shared-workspace",icon:ae().createElement(Rn,null)},{to:"../favourites",label:(0,Pt.__)("My Favourites","templately"),className:"nav-item-profile-favourites",icon:ae().createElement(sr,null)},{to:"../downloads",label:(0,Pt.__)("My Downloads","templately"),className:"nav-item-profile-downloads",icon:ae().createElement(rr,null)},{to:"../purchased-items",label:(0,Pt.__)("Purchased Items","templately"),className:"nav-item-purchased-items",icon:ae().createElement(_O,null)}];const DO=fn(function(e){var t,n,r;return{isLoading:null===(t=e.clouds.status)||void 0===t?void 0:t.isLoading,statusError:null===(n=e.clouds.status)||void 0===n?void 0:n.error,percent:100*e.clouds.status.usage/e.clouds.status.limit,usage:null!==(r=e.clouds.status.usage)&&void 0!==r?r:0,limit:-1===e.clouds.status.limit?(0,Pt.__)("Unlimited","templately"):e.clouds.status.limit}})(function(e){var t,n=pe((0,oe.useState)({}),2),r=n[0],o=n[1],i=pe((0,oe.useState)({}),2),a=i[0],s=i[1];return(0,oe.useEffect)(function(){var t={},n={};e.percent>40&&(n={className:"bg-warning"},t=Ct({href:"https://templately.com/subscription?utm_source=plugin&utm_medium=cloudSidebar",target:"_blank",className:"tt-top tt-warning"},"data-templately-tooltip",(0,Pt.sprintf)((0,Pt.__)("You are using %d%% of your storage quota","templately"),e.percent))),e.percent>85&&(n={className:"bg-danger"},t=TO(TO({},t),{},Ct({className:"tt-top tt-danger"},"data-templately-tooltip",(0,Pt.__)("Your storage quota is runing out. Please upgrade your plan to upload more files.","templately")))),e.percent>99&&(n={className:"bg-danger"},t=TO(TO({},t),{},Ct({className:"tt-top tt-danger"},"data-templately-tooltip",(0,Pt.__)("You have reached your limit of files. Please upgrade your plan to upload more files.","templately")))),o(t),s(n)},[e.percent]),ae().createElement(ae().Fragment,null,ae().createElement(kE,{className:"templately-clouds-menu",activeItemClassName:"nav-item-active",routes:AO,sidebar:!0}),ae().createElement("div",{className:"templately-clouds-size"},e.isLoading?ae().createElement(ma,{style:"placeholder",template:"clouds_status"}):ae().createElement("a",r,ae().createElement("p",null,(0,Pt.__)("My Cloud Status","templately")),(null===(t=e.statusError)||void 0===t?void 0:t.message)&&ae().createElement("p",{className:"text-danger"},(0,Pt.__)("You haven't verify your account yet. Please check your email inbox.","templately")),null===e.statusError&&ae().createElement(ae().Fragment,null,ae().createElement("div",null,ae().createElement("span",re({},a,{style:{width:"".concat(e.percent,"%")}}))),ae().createElement("p",null,(0,Pt.sprintf)((0,Pt.__)("%d of %s files","templately"),e.usage,e.limit))))))}),MO=fn(function(e){var t,n,r,o,i,a;return{isLoading:null===(t=null===(n=e.general.templateTypes)||void 0===n?void 0:n.isLoading)||void 0===t||t,types:null!==(r=null===(o=e.general.templateTypes)||void 0===o?void 0:o.lists)&&void 0!==r?r:[],template_type_id:null!==(i=null===(a=e.general.filter)||void 0===a?void 0:a.template_type_id)&&void 0!==i?i:"all"}},function(e){return{getTypes:function(t){return e(function(e){return wf({type:Lr},e)}(t))},setTypes:function(t){return e(Ef({key:"template_type_id",data:t}))},doFilter:function(){return e(Sf())}}})(function(e){var t=rt();pe(xt(),1)[0],(0,oe.useEffect)(function(){e.getTypes({itemType:t.type})},[t.type]);var n=nw(function(t){e.setTypes(t)});return e.isLoading?ae().createElement(ma,{style:"placeholder",template:"lists"}):ae().createElement("div",{className:"templately-template-types"},ae().createElement("ul",{className:"templately-list tl-ul"},ae().createElement("li",{key:"templateTypes-all",className:"".concat("all"===e.template_type_id?"templately-list-item-active":"")},ae().createElement("input",{onChange:function(){return n("all")},type:"radio",checked:"all"===e.template_type_id,name:"templateTypes",id:"templateTypes-all",value:"all"}),ae().createElement("label",{htmlFor:"templateTypes-all"},(0,Pt.__)("All","templately"))),e.types.map(function(t){var r={className:t.id===e.template_type_id?"templately-list-item-active":""};return ae().createElement("li",re({key:"templateTypes-".concat(t.id)},r),ae().createElement("input",{onChange:function(){return n(t.id)},type:"radio",checked:e.template_type_id===t.id,name:"templateTypes",id:"templateTypes-".concat(t.id),value:t.id}),ae().createElement("label",{htmlFor:"templateTypes-".concat(t.id)},t.name))})))}),NO=fn(function(e){var t,n,r,o,i,a;return{isLoading:null!==(t=null===(n=e.general.categories)||void 0===n?void 0:n.isLoading)&&void 0!==t&&t,categories:null!==(r=null===(o=e.general.categories)||void 0===o?void 0:o.lists)&&void 0!==r?r:[],category_id:null!==(i=null===(a=e.general.filter)||void 0===a?void 0:a.category_id)&&void 0!==i?i:"all"}},function(e){return{getCategories:function(t){return e(function(e){return wf({type:Fr},e)}(t))},setCategory:function(t){return e(Ef({key:"category_id",data:t}))},doFilter:function(){return e(Sf())}}})(function(e){(0,oe.useEffect)(function(){e.getCategories()},[]);var t=nw(function(t){e.setCategory(t)});return e.isLoading?ae().createElement(ma,{style:"placeholder",template:"lists"}):ae().createElement("div",{className:"templately-template-categories"},ae().createElement("ul",{className:"templately-list tl-ul"},ae().createElement("li",{key:"tc-category-all",className:"".concat("all"===e.category_id?"templately-list-item-active":"")},ae().createElement("input",{onChange:function(){return t("all")},type:"radio",checked:"all"===e.category_id,name:"tcategory",id:"tc-category-all",value:"all"}),ae().createElement("label",{htmlFor:"tc-category-all"},(0,Pt.__)("All","templately"))),e.categories.map(function(n){var r={className:n.id===e.category_id?"templately-list-item-active":""};return ae().createElement("li",re({key:"tc-category-".concat(n.id)},r),ae().createElement("input",{onChange:function(){return t(n.id)},type:"radio",checked:e.category_id===n.id,name:"tcategory",id:"tc-category-".concat(n.id),value:n.id}),ae().createElement("label",{htmlFor:"tc-category-".concat(n.id)},n.name))})))}),LO=fn(function(e){var t,n,r;return{tags:null!==(t=e.general.tags)&&void 0!==t?t:[],isReseted:0===(null===(n=e.general.filter)||void 0===n?void 0:n.tags.length),selectedTags:null===(r=e.general.filter)||void 0===r?void 0:r.tags}},function(e){return{getTags:function(){return e({type:Mr})},setTags:function(t){return e(Ef({key:"tags",data:t}))}}})(function(e){var t=(0,oe.useMemo)(function(){return e.tags.filter(function(t){var n;return null===(n=e.selectedTags)||void 0===n?void 0:n.includes(t.value)})},[e.tags,e.selectedTags]);(0,oe.useEffect)(function(){var t;0===(null===(t=e.tags)||void 0===t?void 0:t.length)&&e.getTags()},[]);var n=(0,oe.useCallback)(function(t){null!=t?(t=t.map(function(e){return e.value}),e.setTags(t)):e.setTags([])},[]);return ae().createElement("div",{className:"templately-tags ts-single"},ae().createElement("label",{htmlFor:"templately_tags"},(0,Pt.__)("Filter Items by Tags","templately")),ae().createElement(Qh,{isMulti:!0,placeholder:(0,Pt.__)("Write a keyword...","templately"),name:"templately_tags",options:e.tags,classNamePrefix:"templately-tags",onChange:n,maxMenuHeight:200,value:t}))}),IO=fn(function(e){return{filter:e.general.filter,doingQuery:e.general.filter.doQuery}},function(e){return{doFilter:function(){return e(Sf())},resetFilter:function(t){return e(Of(t))}}})(function(e){var t=tt(),n=pe(xt(),1)[0],r=pe((0,oe.useState)(!0),2),o=r[0],i=r[1],a=pe((0,oe.useState)(e.filter),1)[0];(0,oe.useEffect)(function(){var t,n;t=e.filter,n=a,(0,_i.isEqual)(t,n)?i(!0):i(!1)},[e.filter]);var s="";return n.get("path")&&(s=Rg(n.get("path"),null,["category","tag_id","templateType","activeFilter","include","exclude","tags"])),ae().createElement("div",{className:"ts-single templately-filter-buttons"},ae().createElement("button",{disabled:o,className:"templately-button tf-filter",onClick:function(){return e.doFilter()}},(0,Pt.__)("Filter","templately")),e.doingQuery&&ae().createElement("button",{className:"templately-button tf-reset",onClick:function(){t(s),e.resetFilter({fromButton:!0})}},(0,Pt.__)("Reset","templately")))});var RO=(0,oe.createContext)({includes:[],excludes:[],setIncludes:function(e){return e},setExcludes:function(e){return e}}),jO=function(e){var t=e.children,n=e.isReseted,r=e.dependencies,o=e.activeFilter,i=e.setActiveFilter,a=e.activeControls,s=e.setActiveControls,l=pe((0,oe.useState)(r.map(function(e){return e.id})),2),c=l[0],u=(l[1],pe((0,oe.useState)("none"),2)),d=u[0],p=u[1];return(0,oe.useEffect)(function(){n&&s(r)},[r]),(0,oe.useEffect)(function(){a.every(function(e){return"none"===e.action})?p("none"):a.every(function(e){return"include"===e.action})?p("include"):a.every(function(e){return"exclude"===e.action})?p("exclude"):p("mixed")},[a]),ae().createElement(RO.Provider,{value:{activeFilter:o,setActiveFilter:i,controls:c,activeControls:a,setActiveControls:s,activeState:d,setActiveState:p}},t)};const FO=RO;var zO=["children","className"];function BO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BO(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const VO=function(e){e.children;var t=e.className,n=Bn(e,zO),r=(0,oe.useContext)(FO),o=r.activeControls,i=r.setActiveControls,a=r.activeState,s=r.setActiveState,l=r.activeFilter,c=r.setActiveFilter,u=(0,oe.useCallback)(function(){switch(a){case"none":case"mixed":i(o.map(function(e){return UO(UO({},e),{},{action:"include"})})),s("include");break;case"include":i(o.map(function(e){return UO(UO({},e),{},{action:"exclude"})})),s("exclude");break;default:i(o.map(function(e){return UO(UO({},e),{},{action:"none"})})),s("none")}},[o,i,s,a]);return ae().createElement("div",{className:"t-dependencies-header"},ae().createElement("div",{className:"td-batch-select","aria-checked":a},ae().createElement("span",re({role:"checkbox","aria-checked":a,tabIndex:0,onClick:u,onKeyDown:function(e){return 32===e.keyCode&&u()},className:t?"".concat(t," tri-state-all-checkbox"):"tri-state-all-checkbox"},n),n.title),ae().createElement("span",{className:"tsdf-actions",onClick:function(){var e="";"pro"===n.filter&&"pro"!==l&&(e="pro"),"free"===n.filter&&"free"!==l&&(e="free"),c(e)}},"free"===l&&"free"===n.filter||"pro"===l&&"pro"===n.filter?ae().createElement(tr,null):ae().createElement(Zn,null))))};var WO=["id","content"];function HO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HO(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qO=function(e){var t=e.id,n=e.content,r=(Bn(e,WO),(0,oe.useContext)(FO)),o=r.activeControls,i=r.setActiveControls,a=(0,oe.useCallback)(function(){var e=Da(o);e=e.map(function(e){return e.id===t?QO(QO({},e),{},{action:"none"===e.action?"include":"include"===e.action?"exclude":"exclude"===e.action?"none":"include"}):e}),i(e)},[o,t]),s=(0,oe.useCallback)(function(e){var t=o.find(function(t){return t.id===e});return t?t.action:"none"},[o]),l=Vn()("tri-state-checkbox",{"tri-state-include":"include"===s(t),"tri-state-exclude":"exclude"===s(t)});return ae().createElement("li",{className:l},ae().createElement("input",{checked:"include"===s(t),type:"checkbox",id:"tsdf-".concat(t),onChange:a}),ae().createElement("label",{htmlFor:"tsdf-".concat(t)},n.name))};function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$O(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const YO=fn(function(e){var t,n,r,o,i=e.general.platform,a=null!==(t=null===(n=e.general.dependencies)||void 0===n?void 0:n[i])&&void 0!==t?t:[],s=null!==(r=null===(o=e.general.dependencies)||void 0===o?void 0:o.unknown)&&void 0!==r?r:[];return[].concat(Da(a),Da(s)),{dependencies:a,activeFilter:e.general.filter.activeFilter||"free",filterableDeps:e.general.filter.dependencies,isReseted:0==e.general.filter.dependencies.include.length&&0==e.general.filter.dependencies.exclude.length}},function(e){return{getDependencies:function(){return e({type:Ar})},setDependencies:function(t){return e(Ef({key:"dependencies",data:t}))},setActiveFilter:function(t){return e(Ef({key:"activeFilter",data:t}))}}})(function(e){var t=e.activeFilter,n=e.setActiveFilter,r=pe((0,oe.useState)([]),2),o=r[0],i=r[1],a=pe((0,oe.useState)([]),2),s=a[0],l=a[1],c=e.activeFreeControls,u=e.setActiveFreeControls,d=e.activeProControls,p=e.setActiveProControls;(0,oe.useEffect)(function(){var t;0===(null===(t=e.dependencies)||void 0===t?void 0:t.length)&&e.getDependencies()},[]),(0,oe.useEffect)(function(){var t;0!=(null===(t=e.dependencies)||void 0===t?void 0:t.length)&&(i(e.dependencies.filter(function(e){return e.is_pro})),l(e.dependencies.filter(function(e){return!e.is_pro})))},[e.dependencies]),(0,oe.useEffect)(function(){e.isReseted&&(i(e.dependencies.filter(function(e){return e.is_pro})),l(e.dependencies.filter(function(e){return!e.is_pro})))},[e.isReseted]),(0,oe.useEffect)(function(){var t,n,r=[],o=[];d.map(function(e){"include"===e.action&&r.push(e.id),"exclude"===e.action&&o.push(e.id)}),c.map(function(e){"include"===e.action&&r.push(e.id),"exclude"===e.action&&o.push(e.id)});var i=r.length!==(null===(t=e.filterableDeps.include)||void 0===t?void 0:t.length)||r.some(function(t){return!e.filterableDeps.include.includes(t)}),a=o.length!==(null===(n=e.filterableDeps.exclude)||void 0===n?void 0:n.length)||o.some(function(t){return!e.filterableDeps.exclude.includes(t)});(i||a)&&e.setDependencies({include:r,exclude:o})},[c,d]);var h=(0,oe.useMemo)(function(){return o.map(function(e){return GO(GO({},e),{},{action:"none"})})},[o]),f=(0,oe.useMemo)(function(){return s.map(function(e){return GO(GO({},e),{},{action:"none"})})},[s]),m=Vn()("templately-pro-dependencies td-single",{"tsdf-open":"pro"===t}),g=Vn()("templately-free-dependencies td-single",{"tsdf-open":"free"===t});return 0==f.length&&0==h.length?null:ae().createElement("div",{className:"templately-dependencies ts-single"},h.length>0&&ae().createElement("div",{className:m},ae().createElement(jO,{isReseted:e.isReseted,activeFilter:t,setActiveFilter:n,dependencies:h,activeControls:d,setActiveControls:p},ae().createElement(VO,{filter:"pro",title:(0,Pt.__)("Pro Plugins Dependencies","templately")}),ae().createElement("ul",{className:"t-dependencies-list"},h.map(function(e){return ae().createElement(qO,{key:e.id,id:e.id,content:e})})))),f.length>0&&ae().createElement("div",{className:g},ae().createElement(jO,{isReseted:e.isReseted,activeFilter:t,setActiveFilter:n,dependencies:f,activeControls:c,setActiveControls:u},ae().createElement(VO,{filter:"free",title:(0,Pt.__)("Free Plugins Dependencies","templately")}),ae().createElement("ul",{className:"t-dependencies-list"},f.map(function(e){return ae().createElement(qO,{key:e.id,id:e.id,content:e})})))))});function XO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}const KO=fn(function(e){var t,n,r,o,i,a,s,l=e.general.platform,c=null!==(t=null===(n=e.general.dependencies)||void 0===n?void 0:n[l])&&void 0!==t?t:[];return{tags:null!==(r=e.general.tags)&&void 0!==r?r:[],types:null!==(o=null===(i=e.general.templateTypes)||void 0===i?void 0:i.lists)&&void 0!==o?o:[],categories:null!==(a=null===(s=e.general.categories)||void 0===s?void 0:s.lists)&&void 0!==a?a:[],dependencies:c}},function(e){return{setTypes:function(t){return e(Ef({key:"template_type_id",data:t}))},setActiveFilter:function(t){return e(Ef({key:"activeFilter",data:t}))},setDependencies:function(t){return e(Ef({key:"dependencies",data:t}))},setTags:function(t){return e(Ef({key:"tags",data:t}))},setCategory:function(t){return e(Ef({key:"category_id",data:t}))},doFilter:function(){return e(Sf())}}})(function(e){var t=rt(),n=pe(xt(),1)[0],r=pe((0,oe.useState)([]),2),o=r[0],i=r[1],a=pe((0,oe.useState)([]),2),s=a[0],l=a[1];return(0,oe.useEffect)(function(){var t,r,o,a,s,c;if((0!=(null===(t=e.types)||void 0===t?void 0:t.length)||0!=(null===(r=e.categories)||void 0===r?void 0:r.length))&&0!=(null===(o=e.dependencies)||void 0===o?void 0:o.length)){var u=n.get("templateType"),d=n.get("category"),p=n.get("activeFilter"),h=(null===(a=n.get("include"))||void 0===a?void 0:a.split(",").map(Number))||[],f=(null===(s=n.get("exclude"))||void 0===s?void 0:s.split(",").map(Number))||[],m=(null===(c=n.get("tags"))||void 0===c?void 0:c.split(",").map(Number))||[],g=m.length||h.length||f.length||p||u||d;if("all"!=u){var v=e.types.find(function(e){return e.slug===u});null!=v&&v.id&&e.setTypes(null==v?void 0:v.id)}else u&&e.setTypes("all");if("all"!=d){var y=e.categories.find(function(e){return e.slug===d});null!=y&&y.id&&e.setCategory(null==y?void 0:y.id)}else d&&e.setCategory("all");if(m&&e.setTags(m),p&&e.setActiveFilter(p),0!==h.length||0!==f.length){var b=function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({action:h.includes(e.id)?"include":f.includes(e.id)?"exclude":"none"},e)};l(e.dependencies.filter(function(e){return e.is_pro}).map(b)),i(e.dependencies.filter(function(e){return!e.is_pro}).map(b))}g&&e.doFilter()}},[e.types,e.categories,e.dependencies]),ae().createElement(ae().Fragment,null,ae().createElement(BE,null,"packs"===(null==t?void 0:t.type)&&ae().createElement(WE,{className:"ts-single",isActive:!0,title:(0,Pt.__)("Categories","templately")},ae().createElement(NO,null)),"packs"!==(null==t?void 0:t.type)&&ae().createElement(WE,{className:"ts-single",isActive:!0,title:(0,Pt.__)("Types","templately")},ae().createElement(MO,null))),ae().createElement(YO,{activeFreeControls:o,setActiveFreeControls:i,activeProControls:s,setActiveProControls:l}),ae().createElement(LO,null),ae().createElement("div",{className:"templately-sidebar-filter-buttons"},ae().createElement(IO,null)))}),ZO=function(){var e=pe(xt(),1)[0];return pf(e.get("path"))?"clouds/save-template"===e.get("path")?null:ae().createElement("div",{className:"templately-sidebar templately-clouds-sidebar"},ae().createElement(DO,null)):ae().createElement("div",{className:"templately-sidebar templately-templates-sidebar"},ae().createElement(KO,null))};var JO=["title","platform"],eS=function(e){var t=e.title,n=e.platform,r=Bn(e,JO);return ae().createElement("div",{className:"templatey-cloud-header"},qs(n)?ae().createElement("img",{src:qs(n),alt:t}):"",r.thumbnail&&ae().createElement("img",{width:"50px",src:r.thumbnail,alt:t}),ae().createElement("p",null,t))},tS=["menus","args","open","setWrapperClass"];function nS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var oS=fn(function(e,t){var n,r,o,i=null===(n=t.redirect)||void 0===n?void 0:n.state,a=void 0;return i&&(a=Ri(e,i,null)===(null===(r=t.redirect)||void 0===r?void 0:r.if)?null===(o=t.redirect)||void 0===o?void 0:o.then:a),{redirect:a}})(function(e){var t=e.premenu,n=void 0!==t&&t,r=e.name,o=e.action,i=e.args,a=e.isOpen,s=e.icon,l=void 0===s?null:s,c=e.disabled,u=void 0!==c&&c,d=e.redux,p=e.ModalComponent,h=e.className,f=e.href,m=void 0!==f&&f,g=e.hrefKey,v=e.redirect,y=e.error,b=m;if(m){var w,k=null==i||null===(w=i.content)||void 0===w?void 0:w[g];b=null!=k?k:b}var E=tt(),O={disabled:u,className:h,onClick:function(e){a(!1)}};if(null!=y&&y.condition&&y.modalArgs)O.onClick=function(e){e.preventDefault(),ba(rS(rS({showCloseButton:!0},y.sweetArgs),{},{html:ae().createElement(bl,y.modalArgs)}),!0)};else if(!u&&!1===b){var S=rS(rS({},i),{},{ModalComponent:p});O.onClick=function(e){void 0===v?(o(S,d),a(!1)):E(Rg(v))}}return ae().createElement(ae().Fragment,null,n?!1!==b?ae().createElement("a",re({},O,{href:b}),null!=l?ae().createElement("i",null,l):null,r):ae().createElement(ae().Fragment,null,ae().createElement("button",O,null!=l?ae().createElement("i",null,l):null,r)):ae().createElement("li",O,!1!==b?ae().createElement("a",{href:b},null!=l?ae().createElement("i",null,l):null,r):ae().createElement(ae().Fragment,null,null!=l?ae().createElement("i",null,l):null,r)))}),iS=ae().forwardRef(function(e,t){var n=e.menus,r=e.args,o=e.open,i=e.setWrapperClass,a=Bn(e,tS),s=pe((0,oe.useState)(o),2),l=s[0],c=s[1],u=(0,oe.useMemo)(function(){return n.filter(function(e){return void 0!==(null==e?void 0:e.include)&&!e.include&&1==!(null!=e&&e.hidden)})},[n]),d=(0,oe.useMemo)(function(){return n.filter(function(e){return(null==(null==e?void 0:e.include)||(null==e?void 0:e.include))&&1==!(null!=e&&e.hidden)})},[n]),p=null!=t?t:(0,oe.useRef)({btn:void 0,menu:void 0}),h=function(e){var t=p.current.btn.contains(e.target),n=p.current.menu&&p.current.menu.contains(e.target);t||n||c(!1)};(0,oe.useEffect)(function(){return document.addEventListener("mousedown",h),function(){return document.removeEventListener("mousedown",h)}},[]),(0,oe.useEffect)(function(){"function"==typeof i&&i(l)},[l]);var f=Vn()("templately-context-menu",{"templately-active":l});return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:f},ae().createElement("div",{className:"tcm-pre-menus"},u.map(function(e){return ae().createElement(oS,re({premenu:!0,isOpen:c,key:e.name},e,{args:r,redux:a}))})),ae().createElement("button",{onClick:function(){return c(!l)},ref:function(e){return p.current.btn=e},className:"templately-context-btn"},ae().createElement(or,null)),l&&ae().createElement("div",{className:"templately-context-menu-list",ref:function(e){return p.current.menu=e}},ae().createElement("ul",null,d.map(function(e){return ae().createElement(oS,re({isOpen:c,key:e.name},e,{args:r,redux:a}))})))))});iS.displayName="ContextMenu";const aS=fn(function(e){return{clouds:e.clouds,general:e.general,workspaces:e.workspaces,sharedWorkspaces:e.sharedWorkspaces,workspaceDetails:e.workspaceDetails}},null,null,{forwardRef:!0})(iS),sS=fn(function(e,t){var n;return{view:null==e?void 0:e[null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"clouds"].view}},function(e){return{setView:function(t,n){return e(function(e){var t=e.stateKey;return{type:"clouds"===t?Ao.SET_VIEW:"workspaces"===t?Do.SET_VIEW:"sharedWorkspaces"===t?Mo.SET_VIEW:"workspaceDetails"===t?No.SET_VIEW:Ao.SET_VIEW,view:e.view}}({view:t,stateKey:n}))}}})(function(e){var t=(0,oe.useCallback)(function(t,n){return e.view===n?"active "+t:t},[e.view]);return ae().createElement("div",{className:"templately-view-buttons"},ae().createElement("button",{onClick:function(){return e.setView("grid",e.type)},className:t("templately-grid-view","grid")},ae().createElement(dr,null)),ae().createElement("button",{onClick:function(){return e.setView("list",e.type)},className:t("templately-list-view","list")},ae().createElement(Kn,null)))});function lS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const uS=fn(function(e){var t,n;return{platform:e.general.platform,workspaces:null!==(t=e.workspaces.lists)&&void 0!==t?t:[],sharedWorkspaces:null!==(n=e.sharedWorkspaces.lists)&&void 0!==n?n:[],workspacesLoading:e.workspaces.isLoading,sharedWorkspacesLoading:e.sharedWorkspaces.isLoading}},function(e){return{dispatch:e,searchFiles:function(t){return e(am(cS(cS({},t),{},{context:"list"})))},resetSearch:function(t){return e(function(e){return Wf({type:im(null==e?void 0:e.source).RESET_SEARCH},e)}(cS(cS({},t),{},{context:"list"})))}}})(function(e){var t=e.dispatch,n=e.workspaces,r=e.sharedWorkspaces,o=(e.workspacesLoading,e.sharedWorkspacesLoading,tt()),i=pe((0,oe.useState)([]),2),a=i[0],s=i[1],l=pe((0,oe.useState)(null),2),c=l[0],u=l[1],d=pe((0,oe.useState)(""),2),p=d[0],h=d[1],f=pe((0,oe.useState)(!1),2),m=f[0],g=f[1];(0,oe.useEffect)(function(){0==n.length&&t(dm({list_only:!0})),0==r.length&&t(dm({list_only:!0,shared:!0}))},[]),(0,oe.useEffect)(function(){var e=[];n.length&&e.push({label:(0,Pt.__)("My WorkSpace","templately"),options:Ui(n)}),n.length&&e.push({label:(0,Pt.__)("Shared WorkSpace","templately"),options:Ui(r)}),e.length>0&&s(e)},[n,r]),(0,oe.useEffect)(function(){var t,o;if((null===(t=o=null!=e&&e.shared?r.filter(function(t){return t.slug==(null==e?void 0:e.slug)}):n.filter(function(t){return t.slug==(null==e?void 0:e.slug)}))||void 0===t?void 0:t.length)>0){var i={label:o[0].name,value:o[0].id,slug:o[0].slug};u(i)}},[a]);var v=(0,oe.useCallback)(function(t){u(t);var n=null!=e&&e.shared?"clouds/shared-workspace/".concat(t.slug):"clouds/workspace/".concat(t.slug);n=Rg(n),o(n)},[null==e?void 0:e.slug]),y=(0,oe.useMemo)(function(){return{key:"isAdded",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:""},success:{title:(0,Pt.__)("Successfully Added!","templately"),content:(0,Pt.__)("Your file has been added to this workspace.","templately")}}},[]);return(0,oe.useEffect)(function(){if(m){var t={search:p,slug:e.slug,source:"workspace_details",file_type:e.platform,platform:e.platform};if(p.length>0){var n=(0,si.addQueryArgs)(Rg(Ng().pathname),{q:p});o(n),e.searchFiles(t)}else e.resetSearch(t);g(!1)}},[m]),ae().createElement("div",{className:"templately-workspace-filter-n-actions"},ae().createElement("div",{className:"twfa-header"},ae().createElement("button",{onClick:function(){return o(-1)},className:"templately-button tb-back"},ae().createElement(Yn,null)),ae().createElement("h3",null,(0,Pt.__)("My Files","templately"))),ae().createElement("div",{className:"twfa-actions"},ae().createElement("div",{className:"twfa-switcher-n-search"},ae().createElement(Qh,{placeholder:(0,Pt.__)("Current Workspace","templately"),className:"twfa-switcher",classNamePrefix:"templately",options:a,value:c,isLoading:null==c,loadingMessage:function(){return(0,Pt.__)("Loading workspace and shared workspaces list.","templately")},onChange:function(e){return v(e)}}),ae().createElement("div",{className:"twfa-search"},ae().createElement(da,{wrapper:!1,placeholder:"Search...",onChange:function(e){return h(e.target.value)},onKeyDown:function(e){var t=e.keyCode;return g(13===t)}}),ae().createElement("button",{onClick:function(){return g(!0)},className:"templately-button tb-wf-search"},ae().createElement(cr,{size:14})))),ae().createElement("button",{onClick:function(){ba({customClass:{popup:"tp-large"},onConfirm:function(e){return wa(y,e)},html:ae().createElement(Zh,{slug:e.slug,id:e.id})},!0)},className:"templately-button tb-add"},ae().createElement(lr,null)),ae().createElement(sS,{type:"workspaceDetails"})))});var dS=o(6614);dS.domToReact,dS.htmlToDOM,dS.attributesToProps,dS.Comment,dS.Element,dS.ProcessingInstruction,dS.Text;const pS=dS;var hS=["name","dispatch"];const fS=fn(function(e){var t;return{is_verified:null===(t=e.profile.data)||void 0===t?void 0:t.is_verified}})(function(e){var t=e.name,n=void 0===t?(0,Pt.__)("Add New Workspace","templately"):t,r=e.dispatch,o=Bn(e,hS),i=(0,oe.useMemo)(function(){return{key:"isCreated",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:(0,Pt.__)("Something went wrong while creating workspace for you. Try Later or Contact support.","templately")},success:{title:(0,Pt.__)("Successfully Created","templately"),content:function(e){var t=e.title;return pS((0,Pt.sprintf)("%s <strong>%s</strong>",(0,Pt.__)("You have created a WorkSpace called","templately"),t))}}}},[]);return ae().createElement("div",{className:"templately-workspaces-column"},ae().createElement("div",{className:"templately-workspace templately-create-workspace",onClick:function(){o.is_verified?ba({dispatch:r,showCloseButton:!0,allowOutsideClick:!1,onConfirm:function(e){return wa(i,e)},html:ae().createElement(zl,{dispatch:r})}):ba({showCloseButton:!0,allowOutsideClick:!1,icon:"error",title:"Opps...",html:ae().createElement("p",{className:"text-danger text-center"},(0,Pt.__)("Your account is not verified. Please check your email inbox and verify your Templately account.","templately"))},!1)}},ae().createElement("div",{className:"templately-workspace-inner"},ae().createElement("span",{className:"tw-icon"}),ae().createElement("span",{className:"tw-title"},n))))}),mS=function(e){var t=e.title;return ae().createElement("div",{className:"templately-workspaces-column"},ae().createElement("div",{className:"templately-workspace templately-create-workspace templately-no-workspaces"},ae().createElement("div",{className:"templately-workspace-inner"},ae().createElement("span",{className:"tw-icon"}),ae().createElement("span",{className:"tw-title"},t))))},gS=function(e){var t=e.profile_photo,n=e.name;return ae().createElement(ae().Fragment,null,null!==t?ae().createElement("span",{id:"tw-shared-image-wrapper"},ae().createElement("img",{src:t,alt:n.slice(0,1),onError:function(e){var t;"tw-shared-image-wrapper"==(null===(t=e.target.parentNode)||void 0===t?void 0:t.id)&&(e.target.parentNode.innerHTML="<span>"+e.target.alt+"</span>")}})):ae().createElement("span",null,n.slice(0,1)))};var vS=["name","slug","addNew","sharedWith","view","shared"];function yS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}const bS=function(e){var t=e.name,n=e.slug,r=e.addNew,o=e.sharedWith,i=e.view,a=void 0!==i&&i,s=e.shared,l=void 0!==s&&s,c=(Bn(e,vS),tt()),u=bn();if(r)return ae().createElement(fS,{dispatch:u});var d=pe((0,oe.useState)([]),2),p=d[0],h=d[1],f=pe((0,oe.useState)(!1),2),m=f[0],g=f[1],v=pe((0,oe.useState)(!1),2),y=v[0],b=v[1];(0,oe.useEffect)(function(){null!=o&&o.length&&h(o.slice(0,l?5:4))},[]);var w=Vn()("templately-workspaces-column",{"templately-widefat":a}),k=Vn()("templately-workspace",{"templately-active":a||m}),E=On(function(e){var r,o,i=t,a=null===(r=e.workspaces.lists)||void 0===r?void 0:r.find(function(e){return e.slug===n});return a?i=a.name:null!==(o=e.workspaceDetails[n])&&void 0!==o&&o.name&&(i=e.workspaceDetails[n].name),i}),O=(0,oe.useRef)({btn:void 0,menu:void 0}),S=(0,oe.useRef)(),x=(0,oe.useCallback)(function(e){var t,n,r,o,i=(null===(t=O.current)||void 0===t?void 0:t.btn)&&(null===(n=O.current)||void 0===n?void 0:n.btn.contains(e.target)),a=(null===(r=O.current)||void 0===r?void 0:r.menu)&&O.current.menu.contains(e.target),s=null===(o=S.current)||void 0===o?void 0:o.contains(e.target);(!O.current&&l||!i&&!a&&!s)&&b(!0)},[n,l]);return(0,oe.useEffect)(function(){if(y&&""!==n&&!a){var t="clouds/".concat(l?"shared-workspace":"workspace","/").concat(n),r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);delete r.key,u(wm(r)),c(Rg(t),{state:{slug:n}})}},[y]),ae().createElement("div",{className:w},ae().createElement("div",{className:k,onClick:x},ae().createElement("div",{className:"templately-workspace-inner"},!l&&ae().createElement(aS,{ref:O,args:{content:e},setWrapperClass:g,menus:Xs()}),ae().createElement("header",null,ae().createElement("span",{className:"tw-icon"}),ae().createElement("span",{className:"tw-title"},E)),ae().createElement("div",{className:"tw-share-with"},ae().createElement("p",null,(0,Pt.__)("Shared with:","templately")),ae().createElement("div",{className:"tw-share-with-list"},(null==p?void 0:p.length)>0&&p.map(function(e){return ae().createElement(gS,re({key:e.name.toLowerCase().replaceAll(" ","-")},e))}),!l&&ae().createElement("button",{ref:S,onClick:function(){return Gs({content:e,ModalComponent:tf})}},ae().createElement(lr,null)))))))};function wS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ES=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d,p,h,f,m,g=t.slug,v=e.general.platform,y=null!==(n=null===(r=e.workspaceDetails)||void 0===r||null===(r=r[v])||void 0===r||null===(r=r[g])||void 0===r?void 0:r.currentPage)&&void 0!==n?n:1,b=null!==(o=null===(i=e.workspaceDetails)||void 0===i||null===(i=i[v])||void 0===i||null===(i=i[g])||void 0===i?void 0:i.totalPage)&&void 0!==o?o:1,w=e.workspaceDetails&&(null===(a=e.workspaceDetails)||void 0===a?void 0:a[v])&&(null===(s=e.workspaceDetails[v])||void 0===s?void 0:s[g])&&(null===(l=e.workspaceDetails[v][g])||void 0===l?void 0:l[y])&&e.workspaceDetails[v][g][y];return{current_screen:e.general.current_screen,details:null===(c=e.workspaceDetails)||void 0===c?void 0:c[g],items:null!=w?w:[],currentPage:y,totalPage:b,pages:{search:{currentPage:null!==(u=null===(d=e.workspaceDetails.data)||void 0===d?void 0:d.currentPage)&&void 0!==u?u:1,totalPage:null!==(p=null===(h=e.workspaceDetails.data)||void 0===h?void 0:h.totalPage)&&void 0!==p?p:1},list:{currentPage:y,totalPage:b}},userID:null!==(f=null===(m=e.profile.data)||void 0===m?void 0:m.id)&&void 0!==f?f:0,platform:e.general.platform,view:e.workspaceDetails.view,search:e.workspaceDetails.search}},function(e){return{getWorkSpaceDetails:function(t){return e(km(t))},getWorkSpaceFiles:function(t){return e(Sm(t))}}})(function(e){var t=e.items,n=e.details,r=e.slug,o=e.pages,i=pe((0,oe.useState)("list"),2),a=i[0],s=i[1],l=pe((0,oe.useState)([]),2),c=l[0],u=l[1],d=pe((0,oe.useState)(1),2),p=d[0],h=d[1],f=pe((0,oe.useState)(1),2),m=f[0],g=f[1];return(0,oe.useEffect)(function(){s("list")},[]),(0,oe.useEffect)(function(){m>=1&&e.getWorkSpaceFiles({slug:r,page:m,platform:e.platform})},[m]),(0,oe.useEffect)(function(){var n="list"===e.search.context&&e.search.keyword.length>0?e.search.data[e.search.data.currentPage]:t;if(n.length>0){var o=n.map(function(t){return[{id:"name",data:ae().createElement(eS,{title:t.name,platform:e.platform})},[{id:"last_modified",data:t.last_modified},{id:"action",data:ae().createElement(aS,{args:{content:kS(kS({},t),{},{slug:r,origin:"cloud"}),source:null!=e&&e.shared?"sharedWorkspace":"workspace"},menus:af(t.owner.id!==e.userID,e.current_screen)})}]]});u(o)}else u([])},[t,e.search]),(0,oe.useEffect)(function(){e.search.isLoading?s("search"):s("list")},[e.search]),(0,oe.useEffect)(function(){h(o[a].totalPage),g(o[a].currentPage)},[o]),ae().createElement("div",{className:"templately-workspace-details templately-workspaces"},ae().createElement("div",{className:"templately-workspaces-row"},ae().createElement(bS,re({shared:e.shared,view:!0,isSinglePage:!0},n)),ae().createElement(uS,{id:null==n?void 0:n.id,slug:null==n?void 0:n.slug,shared:null==e?void 0:e.shared}),ae().createElement(kO,{stateKey:"workspaceDetails",loadingKey:"isFilesLoading",isKey:a,isLoadingKey:{search:["workspaceDetails","search","isLoading"],list:["workspaceDetails","isFilesLoading"]},element:function(t){return t.isLoading,0==c.length?ae().createElement(xO,null):ae().createElement("div",{className:"templately-workspaces-files"},ae().createElement(EE,{view:e.view,head:ae().createElement(xE,null)},ae().createElement(CE,{view:e.view,data:c})),p>1&&ae().createElement(bO,{slug:r,type:"workspaceDetails",total:p}))}})))});var OS=["user","isLoading","platform"];fn(function(e){var t,n,r,o,i,a,s,l,c;return{platform:e.general.platform,isLoading:e.profile.isLoading,user:null!==(t=null===(n=e.profile)||void 0===n?void 0:n.data)&&void 0!==t?t:null,isLoggedIn:null!==(null===(r=e.profile)||void 0===r?void 0:r.data),canLinkAccount:null!==(o=null===(i=e.profile)||void 0===i?void 0:i.link_account)&&void 0!==o&&o,canUnLinkAccount:null!==(a=null===(s=e.profile)||void 0===s?void 0:s.unlink_account)&&void 0!==a&&a,isGloballySigned:null===(l=e.profile)||void 0===l?void 0:l.is_globally_signed,signedAsGlobal:null===(c=e.profile)||void 0===c?void 0:c.signed_as_global}},function(e){return{loadProfile:function(t){return e(function(e){return jm({type:Yr},e)}(t))},logout:function(t){return e(Fm(t))},linkAccount:function(){return e(zm({linking:!0}))}}})(function(e){var t=e.user,n=(e.isLoading,e.platform),r=Bn(e,OS),o=tt();return(0,oe.useEffect)(function(){r.loadProfile()},[]),(0,oe.useEffect)(function(){r.isLoggedIn||o(Rg("sign-in",{platform:n}),{replace:!0})},[r.isLoggedIn]),ae().createElement("div",{className:"templately-profile"},null!==(null==t?void 0:t.profile_photo)?ae().createElement("div",{className:"tp-image-wrap"},ae().createElement("img",{className:"tp-image",src:null==t?void 0:t.profile_photo,alt:null==t?void 0:t.name,onError:function(e){var t;e.target.src=null===(t=window)||void 0===t||null===(t=t.templately)||void 0===t||null===(t=t.icons)||void 0===t?void 0:t.profile}})):ae().createElement("div",{className:"tp-image-wrap"},ae().createElement(In,null)),ae().createElement("h1",{className:"tp-title"},(null==t?void 0:t.name)||"".concat(null==t?void 0:t.first_name," ").concat(null==t?void 0:t.last_name)),ae().createElement("ul",{className:"tp-details"},ae().createElement("li",null,ae().createElement("strong",null,(0,Pt.__)("Email","templately")),": ",null==t?void 0:t.email),ae().createElement("li",null,ae().createElement("strong",null,(0,Pt.__)("Joining Date","templately")),": ",null==t?void 0:t.joined),!(null!=t&&t.is_verified)&&ae().createElement("li",null,ae().createElement("p",{className:"text-danger"},(0,Pt.__)("You haven't verify your account yet. Please check your email inbox.","templately")))),ae().createElement("div",{className:"tp-managerial-links"},ae().createElement("a",{className:"tb-manage-account templately-button",target:"_blank",href:"https://templately.com/profile?utm_source=plugin&utm_medium=profile"},(0,Pt.__)("Manage Account","templately")),r.canLinkAccount&&ae().createElement(gE,{to:"sign-in",query:{"add-account":!0},className:"tb-link-account templately-button"},(0,Pt.__)("Link My Account","templately")),r.isLoggedIn&&!r.canLinkAccount&&ae().createElement(ca,{className:"tb-logout",onClick:function(){return r.logout({isGloballySigned:!r.signedAsGlobal&&r.canUnLinkAccount?!r.isGloballySigned:r.isGloballySigned})},label:!r.signedAsGlobal&&r.canUnLinkAccount?(0,Pt.__)("Unlink My Account","templately"):(0,Pt.__)("Logout","templately")})))});var SS=[{name:"Name",id:"name"},[{name:"Type",id:"type"},{name:"Downloaded At",id:"downloaded_at"}]];const xS=fn(function(e){var t,n,r,o,i,a,s,l=e.general.platform,c=null!==(t=null===(n=e.profile.downloads)||void 0===n?void 0:n.currentPage)&&void 0!==t?t:1;return{currentPage:c,totalPage:null!==(r=null===(o=e.profile.downloads)||void 0===o?void 0:o.totalPage)&&void 0!==r?r:1,platform:l,items:null!==(i=(null===(a=e.profile.downloads)||void 0===a?void 0:a[c])&&e.profile.downloads[c])&&void 0!==i?i:[],isLoading:null===(s=e.profile.downloads)||void 0===s?void 0:s.isLoading}},function(e){return{getDownloads:function(t){return e(tg(t))}}})(function(e){var t=pe((0,oe.useState)([]),2),n=t[0],r=t[1];(0,oe.useEffect)(function(){e.currentPage>1&&0==e.items.length&&e.getDownloads({page:e.currentPage})},[e.currentPage]),(0,oe.useEffect)(function(){if(e.items.length>0){var t=e.items.map(function(t){return[{id:"name",data:ae().createElement(gE,{className:"templately-downloaded-item",to:"".concat(e.platform,"/").concat(t.type,"s/").concat(t.slug)},ae().createElement(eS,{title:t.name,thumbnail:t.thumbnail}))},[{id:"type",data:t.type},{id:"downloaded_at",data:t.downloaded_at}]]});r(t)}},[e.items]);var o=Vn()("templately-my-downloads",{"templately-has-no-items":0==n.length});return ae().createElement("div",{className:o},ae().createElement("div",{className:"templately-items templately-download-items"},n.length>0&&!e.isLoading&&ae().createElement(EE,{view:"list",head:ae().createElement(xE,{columns:SS})},ae().createElement(CE,{view:"list",data:n})),0===n.length&&!e.isLoading&&ae().createElement(xO,null)),e.totalPage>1&&ae().createElement(bO,{states:["profile","downloads"],type:"downloads",total:e.totalPage}))});function _S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_S(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const PS=fn(function(e){var t,n,r,o,i,a,s,l,c,u,d,p,h=e.general.platform,f=null!==(t=e.profile.favourites.type)&&void 0!==t?t:"all",m=null!==(n=e.profile.favourites.plan)&&void 0!==n?n:"all",g=null!==(r=null===(o=e.profile.favourites)||void 0===o||null===(o=o[m])||void 0===o||null===(o=o[h])||void 0===o||null===(o=o[f])||void 0===o?void 0:o.currentPage)&&void 0!==r?r:1;return{currentPage:g,totalPage:null!==(i=null===(a=e.profile.favourites)||void 0===a||null===(a=a[m])||void 0===a||null===(a=a[h])||void 0===a||null===(a=a[f])||void 0===a?void 0:a.totalPage)&&void 0!==i?i:1,platform:h,type:f,plan:m,items:null!==(s=(null===(l=e.profile.favourites)||void 0===l?void 0:l[m])&&(null===(c=e.profile.favourites[m])||void 0===c?void 0:c[h])&&(null===(u=e.profile.favourites[m][h])||void 0===u?void 0:u[f])&&(null===(d=e.profile.favourites[m][h][f])||void 0===d?void 0:d[g])&&e.profile.favourites[m][h][f][g])&&void 0!==s?s:[],isLoggedIn:null!==(null===(p=e.profile)||void 0===p?void 0:p.data)}},function(e){return{getFavourites:function(t){return e($m(t))}}})(function(e){var t,n=pe((0,oe.useState)(e.plan),2),r=n[0],o=n[1],i=pe((0,oe.useState)(e.type),2),a=i[0],s=i[1],l=pe((0,oe.useState)(e.currentPage),2),c=l[0],u=l[1];(0,oe.useEffect)(function(){e.type===a&&e.plan===r&&e.currentPage==c||(e.getFavourites({platform:e.platform,itemType:e.type,plan:e.plan,page:e.currentPage}),o(r),s(a),u(e.currentPage))},[e.type,e.plan,e.currentPage]);var d=Vn()("templately-my-favourites",{"templately-has-no-items":0==e.items.length||"empty"===e.items});return ae().createElement("div",{className:d},ae().createElement(lx,{items:null===(t=e.items)||void 0===t?void 0:t.map(function(e){return CS(CS({},e),{},{id:parseInt(e.id)})}),isLoggedIn:e.isLoggedIn,platform:e.platform,totalPage:e.totalPage,type:"favourites",pagination:{states:["profile","favourites",e.plan,e.platform,e.type]}}))}),TS=fn(function(e){var t,n;return{activeType:null!==(t=e.profile.favourites.type)&&void 0!==t?t:"all",activePlan:null!==(n=e.profile.favourites.plan)&&void 0!==n?n:"all"}},function(e){return{setFavouriteFilter:function(t,n){return e(jm({type:Zr},{filter:t,data:n}))}}})(function(e){var t=function(t){e.setFavouriteFilter("type",t)},n=function(t){e.setFavouriteFilter("plan",t)};return ae().createElement("div",{className:"templatley-favourites-filter"},ae().createElement("div",{className:"tf-type-filter templately-plan-switcher"},ae().createElement("button",{onClick:function(){return t("all")},className:"templately-button components-button tb-all tf-filter-btn ".concat("all"==e.activeType?"templately-plan-active":"")},(0,Pt.__)("All","templately")),ae().createElement("button",{onClick:function(){return t("block")},className:"templately-button components-button tb-blocks tf-filter-btn ".concat("block"==e.activeType?"templately-plan-active":"")},(0,Pt.__)("Blocks","templately")),ae().createElement("button",{onClick:function(){return t("page")},className:"templately-button components-button tb-pages tf-filter-btn ".concat("page"==e.activeType?"templately-plan-active":"")},(0,Pt.__)("Pages","templately")),ae().createElement("button",{onClick:function(){return t("pack")},className:"templately-button components-button tb-packs tf-filter-btn ".concat("pack"==e.activeType?"templately-plan-active":"")},(0,Pt.__)("Packs","templately"))),ae().createElement("div",{className:"tf-plan-filter templately-plan-switcher"},ae().createElement("button",{onClick:function(){return n("all")},className:"templately-button components-button tb-all tf-plan-btn ".concat("all"==e.activePlan?"templately-plan-active":"")},(0,Pt.__)("All","templately")),ae().createElement("button",{onClick:function(){return n("starter")},className:"templately-button components-button tb-starter tf-plan-btn ".concat("starter"==e.activePlan?"templately-plan-active":"")},(0,Pt.__)("Starter","templately")),ae().createElement("button",{onClick:function(){return n("pro")},className:"templately-button components-button tb-pro tf-plan-btn ".concat("pro"==e.activePlan?"templately-plan-active":"")},(0,Pt.__)("Pro","templately"))))});function AS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var MS=[{name:"Name",id:"name"},[{name:"Type",id:"type"},{name:"Actions",id:"actions"},{name:"Purchasd Date",id:"downloaded_at"}]];const NS=fn(function(e){var t,n,r,o,i,a,s,l,c=e.general.platform,u=null!==(t=null===(n=e.profile.purchasedItems)||void 0===n?void 0:n.currentPage)&&void 0!==t?t:1;return{currentPage:u,totalPage:null!==(r=null===(o=e.profile.purchasedItems)||void 0===o?void 0:o.totalPage)&&void 0!==r?r:1,platform:c,items:null!==(i=(null===(a=e.profile.purchasedItems)||void 0===a?void 0:a[u])&&e.profile.purchasedItems[u])&&void 0!==i?i:[],isLoggedIn:null!==(null===(s=e.profile)||void 0===s?void 0:s.data),isLoading:null===(l=e.profile.purchasedItems)||void 0===l?void 0:l.isLoading}},function(e){return{getPurchasedItems:function(t){return e(Xm(t))}}})(function(e){var t=pe((0,oe.useState)([]),2),n=t[0],r=t[1],o=tt();(0,oe.useEffect)(function(){e.currentPage>1&&0==e.items.length&&e.getPurchasedItems({page:e.currentPage})},[e.currentPage]),(0,oe.useEffect)(function(){if(e.items.length>0){var t=e.items.map(function(t){return[{id:"name",data:ae().createElement(gE,{className:"templately-downloaded-item",to:"".concat(e.platform,"/").concat(t.type,"s/").concat(t.slug)},ae().createElement(eS,{title:t.name,thumbnail:t.thumbnail}))},[{id:"type",data:Hi(t.type)},{id:"actions",data:ae().createElement(ae().Fragment,null,"pack"!=t.type&&ae().createElement(ca,{className:"tb-import tb-import-secondary",onClick:function(){e.isLoggedIn?Il({ModalComponent:xl,content:DS(DS({},t),{},{origin:"remote",id:t.item_id})}):o(Rg("sign-in"))},label:ae().createElement(ae().Fragment,null,ae().createElement(rr,null),(0,Pt.__)("Insert","templately"))}),"pack"==t.type&&ae().createElement(gE,{className:"templately-purchased-item-btn tb-import templately-button tb-import-secondary",to:"".concat(e.platform,"/").concat(t.type,"s/").concat(t.slug)},ae().createElement(ir,null),(0,Pt.__)("View","templately")))},{id:"purchased_at",data:t.purchased_at}]]});r(t)}},[e.items]);var i=Vn()("templately-my-downloads",{"templately-has-no-items":0==n.length});return ae().createElement("div",{className:i},ae().createElement("div",{className:"templately-items templately-download-items"},n.length>0&&!e.isLoading&&ae().createElement(EE,{view:"list",head:ae().createElement(xE,{columns:MS})},ae().createElement(CE,{view:"list",data:n})),0===n.length&&!e.isLoading&&ae().createElement(xO,null)),e.totalPage>1&&ae().createElement(bO,{states:["profile","purchasedItems"],type:"purchasedItems",total:e.totalPage}))}),LS=function(e){var t=[];return"clouds"===e.type&&t.push(ae().createElement(sa,{key:"search"})),"favourites"===e.type&&t.push(ae().createElement(TS,{key:"favourites"})),["favourites","purchasedItems","downloads","profile"].includes(e.type)||t.push(ae().createElement(sS,{key:"view_buttons",type:e.type})),0==t.length?null:ae().createElement("div",{className:"templately-cloud-actions tca-".concat(e.type)},t)};function IS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const jS=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d,p=null==(null==t?void 0:t.q)?"items":"search",h=e.general.platform,f=null!==(n=null===(r=e.clouds[p])||void 0===r||null===(r=r[h])||void 0===r?void 0:r.currentPage)&&void 0!==n?n:1,m=null!==(o=null===(i=e.clouds[p])||void 0===i||null===(i=i[h])||void 0===i?void 0:i.totalPage)&&void 0!==o?o:1;return{items:null!==(a=(null===(s=e.clouds[p])||void 0===s?void 0:s[h])&&(null===(l=e.clouds[p])||void 0===l||null===(l=l[h])||void 0===l?void 0:l[f]))&&void 0!==a?a:[],current_screen:e.general.current_screen,platform:h,currentPage:f,totalPage:m,isLoggedIn:null!==(null===(c=e.profile)||void 0===c?void 0:c.data),view:e.clouds.view,is_verified:null!==(u=null===(d=e.profile.data)||void 0===d?void 0:d.is_verified)&&void 0!==u&&u}},function(e){return{getClouds:function(t){return e(Hf(t))}}})(function(e){var t=pe((0,oe.useState)([]),2),n=t[0],r=t[1],o=tt(),i=pe(xt(),1)[0],a=(0,oe.useRef)(e.currentPage);(0,oe.useEffect)(function(){e.currentPage>1&&a.current!==e.currentPage&&e.getClouds({page:e.currentPage,search:i.get("q")})},[e.currentPage]),(0,oe.useEffect)(function(){if(e.items.length>0){var t=e.items.map(function(t){return[{id:"name",data:ae().createElement(eS,{title:t.name,platform:e.platform})},[{id:"last_modified",data:ae().createElement(ae().Fragment,null,ae().createElement("p",null,t.last_modified),"templately"!==e.current_screen&&"grid"===e.view&&ae().createElement(ca,{className:"tb-import tb-import-secondary",onClick:function(){e.isLoggedIn?Il({ModalComponent:xl,content:RS(RS({},t),{},{origin:"cloud",my_cloud_id:t.id})}):o(Rg("sign-in"))},label:ae().createElement(ae().Fragment,null,ae().createElement(rr,null),(0,Pt.__)("Insert","templately"))}))},{id:"action",data:ae().createElement(aS,{args:{content:RS(RS({},t),{},{my_cloud_id:t.id,origin:"cloud"})},menus:af(!1,e.current_screen,e.view)})}]]});r(t)}},[e.items,e.view]);var s=Vn()("templately-my-clouds",{"templately-has-no-items":0==n.length});return ae().createElement("div",{className:s},n.length>0?ae().createElement(EE,{view:e.view,head:ae().createElement(xE,null)},ae().createElement(CE,{view:e.view,data:n})):ae().createElement(xO,{is_verified:e.is_verified}),e.totalPage>1&&ae().createElement(bO,{type:"clouds",total:e.totalPage,isSearch:i.has("q"),states:["clouds",i.has("q")?"search":"items",e.platform]}))}),FS=fn(function(e){var t,n,r,o;return{platform:e.general.platform,cloud_activity:null!==(t=null===(n=e.profile)||void 0===n?void 0:n.cloud_activity)&&void 0!==t?t:null,workspaces:null!==(r=e.workspaces.lists)&&void 0!==r?r:[],sharedWorkspaces:null!==(o=e.sharedWorkspaces.lists)&&void 0!==o?o:[],workspacesLoading:e.workspaces.isLoading,sharedWorkspacesLoading:e.sharedWorkspaces.isLoading,isPushing:e.clouds.push2cloud.isLoading,push2cloud:e.clouds.push2cloud}},function(e){return{getWorkSpaceLists:function(t){return e(dm(t))},pushToCloud:function(t){return e(em(t))}}})(function(e){var t,n=e.workspaces,r=e.sharedWorkspaces,o=(e.workspacesLoading,e.sharedWorkspacesLoading,pe((0,oe.useState)(""),2)),i=o[0],a=o[1],s=pe((0,oe.useState)(null),2),l=s[0],c=s[1],u=pe((0,oe.useState)(e.cloud_activity),2),d=u[0],p=u[1],h=pe((0,oe.useState)(!0),2),f=h[0],m=h[1],g=pe((0,oe.useState)(!1),2),v=g[0],y=g[1];(0,oe.useEffect)(function(){0==n.length&&e.getWorkSpaceLists({list_only:!0}),0==r.length&&e.getWorkSpaceLists({list_only:!0,shared:!0})},[]),(0,oe.useEffect)(function(){var e=[{label:(0,Pt.__)("My Clouds","templately"),value:"clouds"}];n.length&&e.push({label:(0,Pt.__)("My WorkSpace","templately"),options:Ui(n)}),n.length&&e.push({label:(0,Pt.__)("Shared WorkSpace","templately"),options:Ui(r)}),e.length>0&&c(e)},[n,r]),(0,oe.useEffect)(function(){i.length>0&&null!=(null==d?void 0:d.value)?m(!1):m(!0)},[i,d]);var b=(0,wl.useSelect)(function(e){return e("core/editor")},[]),w=(0,wl.useDispatch)("core/editor",[]);if((0,oe.useEffect)(function(){if(v){var t,n=null,r="clouds"===d.value?0:null!==(t=null==d?void 0:d.value)&&void 0!==t?t:0;if("gutenberg"===e.platform&&((n={__file:"wp_block",id:null==b?void 0:b.getCurrentPostId(),type:null==b?void 0:b.getCurrentPostType(),title:null==b?void 0:b.getEditedPostAttribute("title"),content:null==b?void 0:b.getEditedPostContent()}).content.length,null==w||w.savePost()),"elementor"===e.platform){var o,a=e.page,s=null==a||!0===a?null===(o=window)||void 0===o||null===(o=o.elementor)||void 0===o||null===(o=o.previewView)||void 0===o||null===(o=o.el)||void 0===o||null===(o=o.firstElementChild)||void 0===o?void 0:o.firstElementChild:null==e?void 0:e.currentElement;null!=s&&(l=s,p=window.elementor,null!=l&&l.model&&l.model.get("elType"),null!=p&&null!==(c=p.config)&&void 0!==c&&null!==(c=c.document)&&void 0!==c&&c.library&&null!==(u=p.config.document.library)&&void 0!==u&&u.save_as_same_type&&p.config.document.type,n=null!=l&&l.model?[l.model.toJSON({remove:["default"]})]:p.elements.toJSON({remove:["default"]}))}null==n&&ba({icon:"error",html:ae().createElement(EO,{title:(0,Pt.__)("Page is empty","templately"),content:(0,Pt.__)("Please add some content before saving your template.","templately")})},!1),null!=n&&e.pushToCloud({saveTemplate:!0,workspace_id:r,workspace:r>0?d:null,name:i,file_content:n}),y(!1)}var l,c,u,p},[v]),(0,oe.useEffect)(function(){var t;void 0!==(null===(t=e.push2cloud)||void 0===t?void 0:t.status)&&"success"!==e.push2cloud.status&&ba({icon:"error",html:ae().createElement(EO,{title:(0,Pt.__)("Something must went wrong!","templately"),content:e.push2cloud.message})},!1)},[e.push2cloud]),!0===e.isPushing)return ae().createElement("div",{className:"templately-save-templates"},ae().createElement(ma,{text:(0,Pt.__)("Uploading...","templately"),description:(0,Pt.__)("Your template content is being pushed into Templately Cloud. Please do not refresh or close this tab.","templately")}));if(0==e.isPushing&&null!=(null===(t=e.push2cloud)||void 0===t?void 0:t.redirect)){var k;"success"===e.push2cloud.status&&ba({icon:"success",timer:1500,html:ae().createElement(EO,{title:(0,Pt.__)("Successfully Pushed!","templately"),content:(0,Pt.__)("Your template is successfully pushed to your desire cloud folder. You will be redirected there.","templately")})},!1),"success"!==e.push2cloud.status&&ba({icon:"error",timer:1500,html:ae().createElement(EO,{title:(0,Pt.__)("Something must went wrong!","templately"),content:e.push2cloud.message})},!1);var E=null!==(k=e.push2cloud)&&void 0!==k&&k.refresh?{refresh:!0}:null;return ae().createElement(ft,{to:Rg(e.push2cloud.redirect,E),replace:!0})}return ae().createElement("div",{className:"templately-save-templates"},ae().createElement("div",{className:"tst-form-wrapper"},ae().createElement("h3",null,(0,Pt.__)("Save your templates and push to cloud","templately")),ae().createElement("div",{className:"tst-form"},ae().createElement("div",{className:"tst-form-inputs"},ae().createElement(da,{placeholder:(0,Pt.__)("Type a name for the template...","templately"),value:i,onChange:function(e){return a(e.target.value)},wrapper:!1}),ae().createElement(Qh,{placeholder:(0,Pt.__)("Select ","templately"),className:"twfa-switcher",classNamePrefix:"templately",options:l,value:d,isLoading:null==l,loadingMessage:function(){return(0,Pt.__)("Loading workspace and shared workspaces list.","templately")},onChange:function(e){return p(e)}})),ae().createElement(ca,{disabled:f,onClick:function(){return y(!0)},label:(0,Pt.__)("Save & Push","templately"),className:"templately-button tb-save-n-push"}))))}),zS=fn(function(e,t){var n,r,o=t.shared?"sharedWorkspaces":"workspaces",i=null==e?void 0:e[o].isLoading,a=null==e?void 0:e[o].currentPage,s=null==e?void 0:e[o].totalPage,l=null!==(n=null==e||null===(r=e[o])||void 0===r?void 0:r[a])&&void 0!==n?n:[];return{view:null==e?void 0:e[o].view,isLoading:i,currentPage:a,totalPage:s,items:l}},function(e){return{getWorkSpaces:function(t){return e(um(t))}}})(function(e){var t=e.shared,n=e.view,r=void 0!==n&&n,o=Vn()("templately-workspaces",{"templately-shared":t||r,"templately-list-view":"list"===e.view});return(0,oe.useEffect)(function(){!e.isLoading&&e.currentPage>1&&e.getWorkSpaces({page:e.currentPage,shared:t})},[e.currentPage]),ae().createElement("div",{className:o},ae().createElement("div",{className:"templately-workspaces-row"},!t&&ae().createElement(bS,{addNew:!0,name:(0,Pt.__)("Add New WorkSpace","templately")}),e.items.length>0?e.items.map(function(e){return ae().createElement(bS,re({shared:t},e,{key:e.slug}))}):ae().createElement(mS,{title:t?(0,Pt.__)("No shared workspaces yet.","templately"):(0,Pt.__)("You do not have any workspaces.","templately")})),e.totalPage>1&&ae().createElement(bO,{type:e.shared?"sharedWorkspaces":"workspaces",total:e.totalPage}))}),BS=window.wp.element,US=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 14"},ae().createElement("path",{d:"M14.58 0H3.42C1.54 0 0 1.522 0 3.4v6.39c0 1.878 1.522 3.4 3.42 3.4h11.16c1.88 0 3.401-1.522 3.42-3.42V3.4C18 1.523 16.46 0 14.58 0zm0 1.202c.376 0 .733.094 1.053.282l-4.698 3.514a3.27 3.27 0 01-3.87 0L2.367 1.484c.32-.169.677-.282 1.053-.282h11.16zm2.217 8.587a2.221 2.221 0 01-2.217 2.217H3.42A2.221 2.221 0 011.203 9.79V3.401c0-.376.112-.752.3-1.09l4.848 3.626a4.454 4.454 0 005.298 0l4.848-3.626c.188.338.3.695.3 1.09v6.388z"}))},VS=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 18"},ae().createElement("path",{d:"M12.136 6.435h-.856V4.29A4.295 4.295 0 006.99 0a4.295 4.295 0 00-4.291 4.29v2.145h-.856A1.845 1.845 0 000 8.278v7.879C0 17.173.827 18 1.843 18h10.293a1.845 1.845 0 001.843-1.843v-7.88a1.845 1.845 0 00-1.843-1.842zM4.08 4.29a2.912 2.912 0 012.908-2.909 2.912 2.912 0 012.909 2.909v2.144H4.08V4.291zm8.516 11.866c0 .254-.207.46-.461.46H1.843a.461.461 0 01-.46-.46v-7.88c0-.253.206-.46.46-.46h10.293c.254 0 .46.207.46.46v7.88z"}))},WS=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},ae().createElement("g",{mask:"url(#mask0_39_149)"},ae().createElement("path",{d:"M12.888 16.153c1.25 0 2.312-.437 3.187-1.312s1.313-1.938 1.313-3.188c0-1.25-.438-2.312-1.313-3.187s-1.937-1.313-3.187-1.313c-1.25 0-2.313.438-3.188 1.313s-1.312 1.937-1.312 3.187c0 1.25.437 2.313 1.312 3.188s1.938 1.312 3.188 1.312zm0-1.8c-.75 0-1.388-.262-1.913-.787a2.604 2.604 0 01-.787-1.913c0-.75.262-1.387.787-1.912a2.604 2.604 0 011.913-.788c.75 0 1.387.263 1.912.788.525.525.788 1.162.788 1.912s-.263 1.388-.788 1.913a2.604 2.604 0 01-1.912.787zm0 4.8c-2.434 0-4.65-.679-6.65-2.037-2-1.358-3.45-3.18-4.35-5.463.9-2.283 2.35-4.104 4.35-5.462 2-1.358 4.216-2.038 6.65-2.038 2.433 0 4.65.68 6.65 2.038 2 1.358 3.45 3.18 4.35 5.462-.9 2.284-2.35 4.105-4.35 5.463-2 1.358-4.217 2.037-6.65 2.037zm0-2a9.544 9.544 0 005.187-1.487 9.773 9.773 0 003.613-4.013 9.773 9.773 0 00-3.613-4.012 9.545 9.545 0 00-5.187-1.488A9.545 9.545 0 007.7 7.641a9.773 9.773 0 00-3.612 4.012A9.773 9.773 0 007.7 15.666a9.544 9.544 0 005.188 1.487z"})))},HS=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 25"},ae().createElement("g",{mask:"url(#mask0_39_140)"},ae().createElement("path",{d:"M16.988 13.925l-1.45-1.45c.15-.783-.075-1.516-.675-2.2-.6-.683-1.375-.95-2.325-.8l-1.45-1.45c.283-.133.57-.233.862-.3.292-.066.604-.1.938-.1 1.25 0 2.312.438 3.187 1.313s1.313 1.937 1.313 3.187c0 .334-.034.646-.1.938-.067.291-.167.579-.3.862zm3.2 3.15l-1.45-1.4a10.951 10.951 0 001.687-1.587 8.898 8.898 0 001.263-1.963c-.834-1.683-2.03-3.02-3.588-4.012-1.558-.992-3.296-1.488-5.212-1.488-.484 0-.959.034-1.425.1a9.625 9.625 0 00-1.375.3l-1.55-1.55a11.081 11.081 0 014.35-.85c2.516 0 4.758.696 6.725 2.088 1.966 1.391 3.391 3.196 4.275 5.412a11.696 11.696 0 01-1.513 2.738 11.007 11.007 0 01-2.187 2.212zm.5 6.15l-4.2-4.15c-.584.184-1.171.321-1.763.413-.591.091-1.204.137-1.837.137-2.517 0-4.759-.696-6.725-2.087-1.967-1.392-3.392-3.196-4.275-5.413.35-.883.791-1.704 1.325-2.462a11.514 11.514 0 011.825-2.038l-2.75-2.8 1.4-1.4 18.4 18.4-1.4 1.4zm-14.25-14.2c-.484.434-.925.909-1.325 1.425a9.016 9.016 0 00-1.025 1.675c.833 1.684 2.029 3.021 3.587 4.013 1.559.991 3.296 1.487 5.213 1.487.333 0 .658-.02.975-.062.316-.042.641-.088.975-.138l-.9-.95c-.184.05-.359.088-.525.113a3.539 3.539 0 01-.525.037c-1.25 0-2.313-.437-3.188-1.312s-1.312-1.938-1.312-3.188c0-.183.012-.358.037-.525.025-.166.063-.341.113-.525l-2.1-2.05z"})))};var QS=["id","onChange","onBlur","name","placeholder","type","withP","label","icon","typeChange","error"];function qS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const GS=function(e){var t=e.id,n=e.onChange,r=void 0===n?null:n,o=e.onBlur,i=void 0===o?null:o,a=e.name,s=e.placeholder,l=void 0===s?null:s,c=e.type,u=void 0===c?"text":c,d=(e.withP,e.label),p=e.icon,h=e.typeChange,f=void 0===h?void 0:h,m=e.error,g=Bn(e,QS),v=pe((0,oe.useState)(u),2),y=v[0],b=v[1],w=null!=t?t:a,k={type:y,name:a,id:w};return(0,oe.useEffect)(function(){f&&b(u)},[]),null!=l&&(k=$S($S({},k),{},{placeholder:l})),null!=i&&(k=$S($S({},k),{},{onBlur:i})),null!=r&&(k=$S($S({},k),{},{onChange:r})),ae().createElement("div",{className:"tf-input tf-input-".concat(null!=u?u:"text")},d&&"checkbox"!==u&&"radio"!==u?ae().createElement("label",{htmlFor:w,className:"tf-input-label"},d):"",ae().createElement("div",{className:"".concat(f?"has-change-button":""," ").concat(p?"has-icon":""," ").concat(null!=m&&m.hasError?"has-error":"")},null!=p?p:"",ae().createElement("input",re({},k,g)),f?ae().createElement("button",{onClick:function(){b(y===u?null==f?void 0:f.type:u)}},y===u?null==f?void 0:f.primaryText:null==f?void 0:f.secondaryText):""),!d||"checkbox"!==u&&"radio"!==u?"":ae().createElement("label",{htmlFor:w,className:"tf-input-label"},d),(null==m?void 0:m.hasError)&&(null==m?void 0:m.errorMessage)&&ae().createElement("div",{className:"tf-error-message"},ae().createElement(Fn,null),ae().createElement(BS.RawHTML,null,null==m?void 0:m.errorMessage)))};var YS=["isLoading","setTab","getSignedIn"];function XS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XS(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ZS=fn(function(e){var t,n,r,o;return{platform:e.general.platform,isLoading:e.profile.isLoading,isLoggedIn:null!=e.profile.data,profileData:e.profile.data,loggedInError:null!==(t=null===(n=e.profile)||void 0===n?void 0:n.error)&&void 0!==t&&t,isGloballySigned:null!==(r=null===(o=e.profile)||void 0===o?void 0:o.is_globally_signed)&&void 0!==r&&r}},function(e){return{logout:function(t){return e(Fm(t))},logoutSuccess:function(t){return e(zm(t))},getSignedIn:function(t){return e(function(e){return jm({type:kr},e)}(t))},errorCleanUp:function(t){return e(Hm(t))}}})(function(e){var t,n,r,o,i,a,s,l,c,u=e.isLoading,d=(e.setTab,e.getSignedIn),p=Bn(e,YS),h=tt(),f=pe(xt(),1)[0],m=Je(),g=pe((0,oe.useState)(null),2),v=g[0],y=g[1],b=pe((0,oe.useState)(!1),2),w=b[0],k=b[1],E=pe((0,oe.useState)(!1),2),O=E[0],S=E[1],x=pe((0,oe.useState)(!0),2),_=x[0],C=x[1],P=pe((0,oe.useState)(!1),2),T=P[0],A=P[1],D=pe((0,oe.useState)({viaAPI:!1}),2),M=D[0],N=D[1],L=pe((0,oe.useState)(null),2),I=L[0],R=L[1],j=pe((0,oe.useState)({}),2),F=j[0],z=j[1],B=function(e){var t=Gi(e,M),n=t.isValid,r=t.title,o=t.content;z(KS(KS({},F),{},Ct({},e,{isValid:n,title:r,content:o}))),n||C(!0)};return(0,oe.useEffect)(function(){p.errorCleanUp(),R({}),null===v&&y(p.profileData)},[]),(0,oe.useEffect)(function(){if(O){var e,t,n=!(null===(e=null==F||null===(t=F.api_key)||void 0===t?void 0:t.isValid)||void 0===e||e)||void 0===(null==M?void 0:M.api_key)||""===(null==M?void 0:M.api_key);C(n)}else{var r=!1;["email","password"].map(function(e){var t,n;r||(r=void 0===(null==M?void 0:M[e])||""==(null==M?void 0:M[e])),r||(r=!(null===(t=null===(n=F[e])||void 0===n?void 0:n.isValid)||void 0===t||t))}),C(r)}I&&R(null)},[M,F]),(0,oe.useEffect)(function(){N(function(e){return KS(KS({},e),{},{viaAPI:O})})},[O]),(0,oe.useEffect)(function(){var e;T&&(k(!0),d(M),C(!0),A(!1),null!=m&&null!==(e=m.state)&&void 0!==e&&e.redirectTo&&h(Rg(m.state.redirectTo),{replace:!0}))},[T]),(0,oe.useEffect)(function(){var e,t,n,r,o,i,a,s,l,c="".concat(p.platform,"/packs");if(null!==v&&(null===(e=p.profileData)||void 0===e?void 0:e.id)!==v.id&&p.isLoggedIn&&f.get("add-account")&&!Ni(null==m||null===(t=m.state)||void 0===t?void 0:t.is_logging_out)&&h(Rg(c,{platform:p.platform},["add-account"])),p.isLoggedIn&&!f.get("add-account")&&(null==m||null===(n=m.state)||void 0===n||!n.signed_in_failed)&&!Ni(null==m||null===(r=m.state)||void 0===r?void 0:r.is_logging_out)){var u=(null==f?void 0:f.get("redirect-to"))||c;h(Rg(u,{platform:p.platform},["redirect-to"]))}Ni(null===(o=m.state)||void 0===o?void 0:o.is_logging_out)&&(p.logoutSuccess({trying_logout:!0,isGloballySigned:null===(a=m.state)||void 0===a?void 0:a.is_logging_out}),p.logout(null===(s=m.state)||void 0===s?void 0:s.is_logging_out),null!=m&&null!==(l=m.state)&&void 0!==l&&l.is_logging_out&&delete m.state.is_logging_out),null!=m&&null!==(i=m.state)&&void 0!==i&&i.signed_in_failed&&delete m.state.signed_in_failed},[p.isLoggedIn,p.profileData]),(0,oe.useEffect)(function(){if(p.loggedInError)if(k(!1),C(!1),Ni(p.loggedInError.message)){var e,t={},n=(0,Pt.__)("Opps...!","templately"),r=(null===(e=p.loggedInError.message)||void 0===e?void 0:e.message)||{};"login_error"===p.loggedInError.message.code&&Object.keys(r).map(function(e){var o=r[e];t[e]={isValid:!1,title:n,content:o}}),Object.keys(t).length>0&&z(KS({},t))}else"string"==typeof p.loggedInError.message&&R(p.loggedInError.message);else R({})},[p.loggedInError]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"tfu-signin tfu-content"},O?ae().createElement(ae().Fragment,null,ae().createElement(GS,{type:"password",name:"api_key",key:"api_key",className:"tf-api-key",label:(0,Pt.__)("API Key","templately"),placeholder:(0,Pt.__)("Your API Key","templately"),disabled:w,error:{hasError:!(null===(t=null==F||null===(n=F.api_key)||void 0===n?void 0:n.isValid)||void 0===t||t),errorMessage:null===(r=F.api_key)||void 0===r?void 0:r.content},onBlur:function(){return B("api_key")},onChange:function(e){null==e||e.persist(),N(function(t){var n;return KS(KS({},t),{},{api_key:null==e||null===(n=e.target)||void 0===n?void 0:n.value})})}})):ae().createElement(ae().Fragment,null,ae().createElement(GS,{type:"email",name:"email",key:"email",disabled:w,onBlur:function(){return B("email")},error:{hasError:!(null===(o=null==F||null===(i=F.email)||void 0===i?void 0:i.isValid)||void 0===o||o),errorMessage:null===(a=F.email)||void 0===a?void 0:a.content},label:(0,Pt.__)("Email Address","templately"),placeholder:(0,Pt.__)("Enter Your Email Address","templately"),icon:ae().createElement(US,null),onChange:function(e){null==e||e.persist(),N(function(t){var n;return KS(KS({},t),{},{email:null==e||null===(n=e.target)||void 0===n?void 0:n.value})})}}),ae().createElement("div",{className:"tf-input-wrapper"},ae().createElement(GS,{type:"password",name:"password",key:"password",disabled:w,label:(0,Pt.__)("Password","templately"),placeholder:(0,Pt.__)("Password","templately"),icon:ae().createElement(VS,null),onBlur:function(){return z(KS(KS({},F),{},{password:{isValid:!0,title:"",content:""}}))},error:{hasError:!(null===(s=null==F||null===(l=F.password)||void 0===l?void 0:l.isValid)||void 0===s||s),errorMessage:null===(c=F.password)||void 0===c?void 0:c.content},typeChange:{type:"text",primaryText:ae().createElement(HS,null),secondaryText:ae().createElement(WS,null)},onChange:function(e){null==e||e.persist(),N(function(t){var n;return KS(KS({},t),{},{password:null==e||null===(n=e.target)||void 0===n?void 0:n.value})})}}),ae().createElement("a",{className:"tf-forget-link",href:"https://templately.com/forgot-password?utm_source=plugin&utm_medium=SignIn",target:"_blank"},(0,Pt.__)("Forgot Password?","templately")))),I&&"string"==typeof I&&ae().createElement("div",{className:"tf-global-error-message"},ae().createElement(Fn,null),ae().createElement(BS.RawHTML,null,I)),!p.isGloballySigned&&ae().createElement("div",{className:"tf-global_signin"},ae().createElement(GS,{type:"checkbox",name:"global_signin",label:(0,Pt.__)("Global Sign In","templately"),disabled:w,onChange:function(e){null==e||e.persist(),N(function(t){var n;return KS(KS({},t),{},{global_signin:null==e||null===(n=e.target)||void 0===n?void 0:n.checked})})}}),ae().createElement("p",{className:"global_signin-helptext"},(0,Pt.__)("All the sitewide users will be logged in with this Templately account","templately"))),ae().createElement("div",{className:"tfus-footer"},ae().createElement("button",{className:"templately-button tb-signin",onClick:function(){return A(!_)},disabled:_},!u&&(0,Pt.__)("Sign In","templately"),u&&(0,Pt.__)("Signing In...","templately")),ae().createElement("span",null,"or"),ae().createElement(ca,{className:"tb-viapi",onClick:function(){return S(!O)}},!O&&(0,Pt.__)("Connect via API","templately"),O&&(0,Pt.__)("Connect via Login Credentials","templately")))),O?ae().createElement("div",{className:"tfus-link-wrap"},ae().createElement("a",{href:"https://templately.com/manage-sites",target:"_blank"},"Manage Site"),ae().createElement("a",{href:"https://docs.templately.com/home/how-to-manage-sites-in-templately/",target:"_blank"},"Documentation")):"")}),JS=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 19"},ae().createElement("path",{d:"M8.263 10.051a4.777 4.777 0 01-4.77-4.774A4.778 4.778 0 018.262.5a4.783 4.783 0 014.778 4.777 4.782 4.782 0 01-4.778 4.774zm0-7.991a3.217 3.217 0 000 6.432 3.22 3.22 0 003.218-3.215A3.222 3.222 0 008.263 2.06zM15.88 18.5a.78.78 0 01-.78-.78v-1.715a3.41 3.41 0 00-3.407-3.403H4.96a3.404 3.404 0 00-3.4 3.403v1.715a.78.78 0 11-1.56 0v-1.715a4.967 4.967 0 014.96-4.963h6.733a4.972 4.972 0 014.967 4.963v1.715a.78.78 0 01-.78.78z"}))};var ex=["setTab","getSignedUp"];function tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tx(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const rx=fn(function(e){return{platform:e.general.platform,isLoading:e.profile.isLoading,isLoggedIn:null!=e.profile.data,error:e.profile.error}},function(e){return{getSignedUp:function(t){return e(function(e){return jm({type:Sr},e)}(t))},errorCleanUp:function(t){return e(Hm(t))}}})(function(e){e.setTab;var t,n,r,o,i,a,s,l,c,u,d,p,h=e.getSignedUp,f=Bn(e,ex),m=tt(),g=pe((0,oe.useState)(!0),2),v=g[0],y=g[1],b=pe((0,oe.useState)(!1),2),w=b[0],k=b[1],E=pe((0,oe.useState)({}),2),O=E[0],S=E[1],x=pe((0,oe.useState)(null),2),_=x[0],C=x[1],P=pe((0,oe.useState)({}),2),T=P[0],A=P[1],D={first_name_error:"first_name",last_name_error:"last_name",email_error:"email"},M=(0,oe.useMemo)(function(){var e,t,n,r,o,i="",a=!0,s=!(null===(e=null===(t=T.first_name)||void 0===t?void 0:t.isValid)||void 0===e||e),l=!(null===(n=null===(r=T.last_name)||void 0===r?void 0:r.isValid)||void 0===n||n);if(s&&l)a=!1,i=(null===(o=T.first_name)||void 0===o?void 0:o.content)||"",i=new RegExp("First Name","i").test(i)?i.replace(/First Name/i,"First Name and Last Name"):(0,Pt.__)("First name and Last name cannot be empty.","templately");else if(s){var c;a=!1,i=null===(c=T.first_name)||void 0===c?void 0:c.content}else if(l){var u;a=!1,i=null===(u=T.last_name)||void 0===u?void 0:u.content}return{title:(0,Pt.__)("Opps...!","templately"),isValid:a,content:i}},[O,T]),N=function(e){var t=Gi(e,O),n=t.isValid,r=t.title,o=t.content;A(function(t){return nx(nx({},t),{},Ct({},e,{isValid:n,title:r,content:o}))})};return(0,oe.useEffect)(function(){f.errorCleanUp(),C({})},[]),(0,oe.useEffect)(function(){f.isLoggedIn&&m(Rg([f.platform,"packs"]))},[f.isLoggedIn]),(0,oe.useEffect)(function(){if(Object.keys(O).length>=7){var e=!1;Object.keys(O).map(function(t){var n,r;e||(e=null==O[t].length?!O[t]:0==O[t].length),e||(e=!(null===(n=null===(r=T[t])||void 0===r?void 0:r.isValid)||void 0===n||n))}),y(e)}else y(!0);_&&C(null)},[O,T]),(0,oe.useEffect)(function(){w&&(h(O),y(!0),k(!1))},[w]),(0,oe.useEffect)(function(){if(f.error){var e={},t=(0,Pt.__)("Opps...!","templately");if(D[f.error.code]&&"string"==typeof f.error.message){var n=D[f.error.code],r=f.error.message;e[n]={isValid:!1,title:t,content:r}}else"signup_errors"==f.error.code&&Ni(f.error.message)?Object.keys(f.error.message).map(function(n){var r=f.error.message[n];e[n]={isValid:!1,title:t,content:r}}):"string"==typeof f.error.message&&C(f.error.message);Li(f.error.additional_errors)&&Object.values(f.error.additional_errors).map(function(n){if(D[null==n?void 0:n.code]){var r=D[null==n?void 0:n.code],o=n.message;e[r]={isValid:!1,title:t,content:o}}}),Ni(e)&&Object.keys(e).length>0&&A(nx({},e))}else C({})},[f.error]),ae().createElement("div",{className:"tfu-signup tfu-content"},ae().createElement("div",{className:"tfu-row tfu-cols-2"},ae().createElement(GS,{name:"first_name",label:(0,Pt.__)("First Name","templately"),placeholder:(0,Pt.__)("First Name","templately"),onBlur:function(){return N("first_name")},error:{hasError:!(null===(t=null===(n=T.first_name)||void 0===n?void 0:n.isValid)||void 0===t||t)},icon:ae().createElement(JS,null),onChange:function(e){return S(function(t){return nx(nx({},t),{},{first_name:e.target.value})})}}),ae().createElement(GS,{name:"last_name",label:(0,Pt.__)("Last Name","templately"),placeholder:(0,Pt.__)("Last Name","templately"),onBlur:function(){return N("last_name")},error:{hasError:!(null===(r=null===(o=T.last_name)||void 0===o?void 0:o.isValid)||void 0===r||r)},icon:ae().createElement(JS,null),onChange:function(e){return S(function(t){return nx(nx({},t),{},{last_name:e.target.value})})}}),ae().createElement("div",{className:"tfu-error-wrapper"},!(null===(i=null==M?void 0:M.isValid)||void 0===i||i)&&M.content&&ae().createElement("div",{className:"tf-error-message"},ae().createElement(Fn,null),ae().createElement(BS.RawHTML,null,M.content)))),ae().createElement(GS,{type:"text",name:"email",label:(0,Pt.__)("Email Address","templately"),placeholder:(0,Pt.__)("Enter Your Email Address","templately"),onBlur:function(){return N("email")},error:{hasError:!(null===(a=null===(s=T.email)||void 0===s?void 0:s.isValid)||void 0===a||a),errorMessage:null===(l=T.email)||void 0===l?void 0:l.content},icon:ae().createElement(US,null),onChange:function(e){return S(function(t){return nx(nx({},t),{},{email:e.target.value})})}}),ae().createElement("div",{className:"tfu-row tfu-cols-2"},ae().createElement(GS,{type:"password",name:"password",label:(0,Pt.__)("Password","templately"),placeholder:(0,Pt.__)("Password","templately"),onBlur:function(){N("password"),N("confirm_password")},error:{hasError:!(null===(c=null===(u=T.password)||void 0===u?void 0:u.isValid)||void 0===c||c)},icon:ae().createElement(VS,null),onChange:function(e){return S(function(t){return nx(nx({},t),{},{password:e.target.value})})}}),ae().createElement(GS,{type:"password",name:"confirm_password",label:(0,Pt.__)("Confirm Password","templately"),placeholder:(0,Pt.__)("Confirm Password","templately"),onBlur:function(){return N("confirm_password")},error:{hasError:!(null===(d=null===(p=T.confirm_password)||void 0===p?void 0:p.isValid)||void 0===d||d)},icon:ae().createElement(VS,null),onChange:function(e){return S(function(t){return nx(nx({},t),{},{confirm_password:e.target.value})})}}),ae().createElement("div",{className:"tfu-error-wrapper"},["password","confirm_password","password_mismatched"].map(function(e){var t,n,r,o;return null!==(t=null===(n=T[e])||void 0===n?void 0:n.isValid)&&void 0!==t&&!t&&null!==(r=T[e])&&void 0!==r&&r.content?ae().createElement("div",{className:"tf-error-message"},ae().createElement(Fn,null),ae().createElement(BS.RawHTML,null,null===(o=T[e])||void 0===o?void 0:o.content)):ae().createElement(ae().Fragment,null)}))),ae().createElement("div",{className:"tfu-consent-wrapper"},ae().createElement("div",{className:"tfu-consent"},ae().createElement(GS,{withP:!1,type:"checkbox",name:"privacy_consent",id:"tfu-privacy_consent",label:ae().createElement(ae().Fragment,null,(0,Pt.__)("I agree to the Templately ","templately")," ",ae().createElement("a",{href:"https://templately.com/privacy-policy?utm_source=plugin&utm_medium=SignUp",target:"_blank"},(0,Pt.__)("Privacy Policy","templately")),"."),onChange:function(e){return S(function(t){return nx(nx({},t),{},{privacy_consent:e.target.checked})})}})),ae().createElement("div",{className:"tfu-consent"},ae().createElement(GS,{withP:!1,type:"checkbox",name:"terms_consent",id:"tfu-terms_consent",label:ae().createElement(ae().Fragment,null,(0,Pt.__)("I agree to the Templately ","templately")," ",ae().createElement("a",{href:"https://templately.com/terms-of-services?utm_source=plugin&utm_medium=SignUp",target:"_blank"},(0,Pt.__)("Terms of Services","templately")),"."),onChange:function(e){return S(function(t){return nx(nx({},t),{},{terms_consent:e.target.checked})})}}))),_&&"string"==typeof _&&ae().createElement("div",{className:"tf-global-error-message"},ae().createElement(Fn,null),ae().createElement(BS.RawHTML,null,_)),ae().createElement("div",{className:"tfus-footer"},ae().createElement("button",{disabled:v,onClick:function(){return k(!0)},className:"templately-button tb-signin"},(0,Pt.__)("Sign Up","templately"))))}),ox=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"356",height:"246",fill:"none",viewBox:"0 0 356 246"},ae().createElement("g",{clipPath:"url(#clip0_21_2)"},ae().createElement("g",{opacity:"0.7"},ae().createElement("path",{fill:"url(#paint0_linear_21_2)",d:"M96.12 45.877l.574.92a168.403 168.403 0 015.545-3.305l-.536-.942a156.796 156.796 0 00-5.583 3.328z"}),ae().createElement("path",{fill:"url(#paint1_linear_21_2)",d:"M85.376 53.208l.644.866c1.72-1.277 3.49-2.543 5.264-3.75l-.612-.892a158.97 158.97 0 00-5.296 3.776z"}),ae().createElement("path",{fill:"url(#paint2_linear_21_2)",d:"M65.84 70.38l.779.752a158.383 158.383 0 014.588-4.556l-.747-.784a167.953 167.953 0 00-4.62 4.588z"}),ae().createElement("path",{fill:"url(#paint3_linear_21_2)",d:"M107.422 39.456l.498.963c1.904-.98 3.852-1.937 5.794-2.84l-.455-.98a161.844 161.844 0 00-5.837 2.857z"}),ae().createElement("path",{fill:"url(#paint4_linear_21_2)",d:"M75.26 61.393l.713.812a157.06 157.06 0 014.94-4.166l-.682-.839a159.63 159.63 0 00-4.977 4.199l.005-.006z"}),ae().createElement("path",{fill:"url(#paint5_linear_21_2)",d:"M119.199 33.98l.417 1.002a157.236 157.236 0 016.021-2.36l-.373-1.016a160.349 160.349 0 00-6.065 2.375z"}),ae().createElement("path",{fill:"url(#paint6_linear_21_2)",d:"M156.761 23.577l.157 1.07c2.12-.313 4.279-.589 6.416-.816l-.114-1.077c-2.147.228-4.322.503-6.459.823z"}),ae().createElement("path",{fill:"url(#paint7_linear_21_2)",d:"M169.708 22.198l.07 1.082c2.137-.141 4.312-.238 6.46-.293l-.027-1.081a161.94 161.94 0 00-6.503.292z"}),ae().createElement("path",{fill:"url(#paint8_linear_21_2)",d:"M57.173 80.1l.838.688a158.449 158.449 0 014.204-4.918l-.806-.72a153.358 153.358 0 00-4.23 4.95h-.006z"}),ae().createElement("path",{fill:"url(#paint9_linear_21_2)",d:"M143.972 26.006l.243 1.055a154.67 154.67 0 016.33-1.336l-.2-1.06c-2.126.405-4.269.854-6.373 1.347v-.006z"}),ae().createElement("path",{fill:"url(#paint10_linear_21_2)",d:"M131.421 29.485l.33 1.028c2.045-.66 4.128-1.282 6.194-1.856l-.286-1.044a165.428 165.428 0 00-6.238 1.867v.005z"}),ae().createElement("path",{fill:"url(#paint11_linear_21_2)",d:"M46.64 96.515l-.915-.579a158.67 158.67 0 00-3.375 5.578l.935.541a153.157 153.157 0 013.355-5.54z"}),ae().createElement("path",{fill:"url(#paint12_linear_21_2)",d:"M40.164 107.73l-.958-.503a163.113 163.113 0 00-2.91 5.837l.98.466c.919-1.942 1.887-3.89 2.888-5.8z"}),ae().createElement("path",{fill:"url(#paint13_linear_21_2)",d:"M34.63 119.443l-.996-.422a158.523 158.523 0 00-2.418 6.059l1.011.379a156.57 156.57 0 012.403-6.022v.006z"}),ae().createElement("path",{fill:"url(#paint14_linear_21_2)",d:"M182.708 22.955c2.153.033 4.328.108 6.465.227l.06-1.082c-2.154-.119-4.339-.195-6.509-.227l-.016 1.082z"}),ae().createElement("path",{fill:"url(#paint15_linear_21_2)",d:"M49.33 90.5l.892.616c1.222-1.764 2.5-3.527 3.792-5.248l-.865-.649a165.582 165.582 0 00-3.82 5.28z"}),ae().createElement("path",{fill:"url(#paint16_linear_21_2)",d:"M24.048 156.713l-1.072-.162c-.33 2.131-.616 4.301-.86 6.454l1.077.119c.238-2.137.53-4.296.855-6.411z"}),ae().createElement("path",{fill:"url(#paint17_linear_21_2)",d:"M26.542 144.021l-1.05-.255a160.784 160.784 0 00-1.385 6.363l1.06.211c.412-2.105.877-4.231 1.38-6.319h-.005z"}),ae().createElement("path",{fill:"url(#paint18_linear_21_2)",d:"M30.069 131.583l-1.028-.341a159.776 159.776 0 00-1.904 6.227l1.038.298c.59-2.072 1.223-4.15 1.894-6.184z"}),ae().createElement("path",{fill:"url(#paint19_linear_21_2)",d:"M328.725 123.652a165.764 165.764 0 00-2.462-6.006l-.99.433c.85 1.964 1.678 3.971 2.446 5.968l1.011-.39-.005-.005z"}),ae().createElement("path",{fill:"url(#paint20_linear_21_2)",d:"M332.912 135.981a164.505 164.505 0 00-1.964-6.21l-1.022.346a157.938 157.938 0 011.953 6.167l1.039-.303h-.006z"}),ae().createElement("path",{fill:"url(#paint21_linear_21_2)",d:"M317.418 100.281a174.14 174.14 0 00-3.413-5.535l-.909.59a167.51 167.51 0 013.392 5.497l.93-.552z"}),ae().createElement("path",{fill:"url(#paint22_linear_21_2)",d:"M323.553 111.739a161.275 161.275 0 00-2.948-5.789l-.953.509a163.515 163.515 0 012.933 5.751l.973-.471h-.005z"}),ae().createElement("path",{fill:"url(#paint23_linear_21_2)",d:"M195.622 23.669c2.137.206 4.301.46 6.422.752l.146-1.071a151.495 151.495 0 00-6.465-.758l-.103 1.077z"}),ae().createElement("path",{fill:"url(#paint24_linear_21_2)",d:"M336.072 148.614a161.62 161.62 0 00-1.45-6.346l-1.05.26c.52 2.083 1.007 4.209 1.439 6.302l1.061-.216z"}),ae().createElement("path",{fill:"url(#paint25_linear_21_2)",d:"M245.432 36.967a160.69 160.69 0 015.843 2.797l.487-.969a163.088 163.088 0 00-5.886-2.818l-.449.984.005.006z"}),ae().createElement("path",{fill:"url(#paint26_linear_21_2)",d:"M257.004 42.799a159.106 159.106 0 015.594 3.267l.563-.925a166.837 166.837 0 00-5.632-3.289l-.525.947z"}),ae().createElement("path",{fill:"url(#paint27_linear_21_2)",d:"M233.422 32.103c2.018.72 4.057 1.499 6.059 2.305l.406-1a151.502 151.502 0 00-6.103-2.322l-.362 1.017z"}),ae().createElement("path",{fill:"url(#paint28_linear_21_2)",d:"M208.433 25.438c2.115.385 4.252.812 6.34 1.277l.238-1.055c-2.104-.47-4.252-.903-6.384-1.287l-.194 1.065z"}),ae().createElement("path",{fill:"url(#paint29_linear_21_2)",d:"M221.054 28.251a159.25 159.25 0 016.216 1.796l.319-1.033a161.378 161.378 0 00-6.254-1.807l-.281 1.044z"}),ae().createElement("path",{fill:"url(#paint30_linear_21_2)",d:"M289.031 64.85l-.741.79a164.273 164.273 0 014.631 4.518l.774-.758a161.252 161.252 0 00-4.658-4.55h-.006z"}),ae().createElement("path",{fill:"url(#paint31_linear_21_2)",d:"M305.646 84.78a149.235 149.235 0 013.83 5.205l.882-.622a159.55 159.55 0 00-3.857-5.237l-.86.66.005-.005z"}),ae().createElement("path",{fill:"url(#paint32_linear_21_2)",d:"M297.363 74.859c1.439 1.59 2.868 3.23 4.247 4.874l.828-.692a154.042 154.042 0 00-4.274-4.907l-.801.725z"}),ae().createElement("path",{fill:"url(#paint33_linear_21_2)",d:"M268.046 49.556a161.142 161.142 0 015.307 3.711l.639-.876a158.039 158.039 0 00-5.34-3.733l-.601.898h-.005z"}),ae().createElement("path",{fill:"url(#paint34_linear_21_2)",d:"M278.498 57.184a158.015 158.015 0 014.983 4.128l.708-.817a159.06 159.06 0 00-5.015-4.155l-.671.85-.005-.006z"})),ae().createElement("path",{stroke:"#9292FF",strokeMiterlimit:"10",strokeWidth:"1.082",d:"M21.613 155.144l156.551 25.578M75.73 59.608l102.433 121.115M179.197 22.1l-1.033 158.623M278.996 58.272L178.164 180.723M333.248 147.38l-155.084 33.342",opacity:"0.7"}),ae().createElement("path",{fill:"url(#paint35_linear_21_2)",d:"M330.846 173.707c13.726 0 24.854-11.127 24.854-24.853 0-13.727-11.128-24.854-24.854-24.854-13.726 0-24.854 11.127-24.854 24.854 0 13.726 11.128 24.853 24.854 24.853z"}),ae().createElement("path",{fill:"#fff",d:"M338.019 141.808a3.043 3.043 0 003.037-3.039c-.151-4.026-5.921-4.025-6.074 0a3.046 3.046 0 003.037 3.039z"}),ae().createElement("path",{fill:"#fff",d:"M342.985 143.9a5.602 5.602 0 00-2.283-2.285c-1.368 1.405-3.998 1.405-5.365 0-1.412.789-3.256 2.629-2.236 4.37a2.089 2.089 0 001.803 1.02h6.231c1.549.051 2.624-1.768 1.85-3.105zM323.955 141.808a3.043 3.043 0 003.036-3.039c-.151-4.026-5.92-4.025-6.073 0a3.046 3.046 0 003.037 3.039z"}),ae().createElement("path",{fill:"#fff",d:"M328.873 145.985c1.018-1.742-.82-3.581-2.236-4.37-1.367 1.405-3.997 1.405-5.364 0-1.413.789-3.256 2.629-2.236 4.37a2.089 2.089 0 001.803 1.02h6.23a2.08 2.08 0 001.803-1.02zM327.951 152.013a3.045 3.045 0 003.037 3.039c4.023-.154 4.021-5.927 0-6.078a3.042 3.042 0 00-3.037 3.039z"}),ae().createElement("path",{fill:"#fff",d:"M333.67 154.859c-1.367 1.406-3.997 1.405-5.364 0a5.624 5.624 0 00-2.284 2.286c-.775 1.336.307 3.155 1.851 3.104h6.23c1.549.051 2.625-1.768 1.851-3.105a5.604 5.604 0 00-2.284-2.285zM328.9 142.337a7.596 7.596 0 014.17 0c.219-.249.451-.481.7-.696a8.47 8.47 0 00-5.57 0c.254.21.486.442.7.696zM323.55 149.47c0-.539.057-1.073.171-1.589h-.893a8.29 8.29 0 002.94 8.047c.171-.236.363-.455.565-.665a7.423 7.423 0 01-2.783-5.793zM338.255 147.881a7.44 7.44 0 01-2.608 7.382c.202.21.39.429.565.665a8.292 8.292 0 002.936-8.047h-.893z"}),ae().createElement("path",{fill:"url(#paint36_linear_21_2)",d:"M24.846 178.707c13.726 0 24.854-11.127 24.854-24.853C49.7 140.127 38.572 129 24.846 129 11.12 129-.008 140.127-.008 153.854c0 13.726 11.128 24.853 24.854 24.853z"}),ae().createElement("path",{fill:"#fff",d:"M31.268 154.252a3.534 3.534 0 00-5.477-3.618c-.997-1.554-2.81-2.592-4.88-2.592-3.146 0-5.695 2.393-5.695 5.346 0 .305.028.603.08.894a4.932 4.932 0 001.53 9.623h13.011a4.932 4.932 0 001.43-9.653z"}),ae().createElement("path",{fill:"#fff",d:"M37.931 153.606a4.032 4.032 0 01-2.13 3.553 6.171 6.171 0 00-3.167-3.754 4.836 4.836 0 00-6.477-4.409 6.984 6.984 0 00-3.596-2.064c.795-1.338 2.317-2.243 4.062-2.243 1.691 0 3.17.848 3.983 2.114a2.884 2.884 0 014.47 2.952c.825.25 1.54.759 2.047 1.434.508.671.808 1.509.808 2.417z"}),ae().createElement("path",{fill:"url(#paint37_linear_21_2)",d:"M77.846 86.707c13.726 0 24.854-11.127 24.854-24.853C102.7 48.127 91.572 37 77.846 37 64.12 37 52.992 48.127 52.992 61.854c0 13.726 11.128 24.853 24.854 24.853z"}),ae().createElement("path",{fill:"url(#paint38_linear_21_2)",d:"M277.846 84.707c13.726 0 24.854-11.127 24.854-24.853C302.7 46.127 291.572 35 277.846 35c-13.726 0-24.854 11.127-24.854 24.854 0 13.726 11.128 24.853 24.854 24.853z"}),ae().createElement("g",{fill:"#fff",clipPath:"url(#clip1_21_2)"},ae().createElement("path",{d:"M281.153 68.765c1.421-.072 2.574.44 3.468 1.551.073-.073.136-.136.211-.214-.366-.266-.51-.61-.299-1.027.178-.352.503-.438.888-.371.014-.046.029-.086.039-.13.124-.524.438-.88.957-1.025.272-.076.559-.099.835-.162.483-.109.875-.342 1.036-.849.121-.38.069-.734-.159-1.059-.017-.023-.036-.046-.052-.069-.074-.099-.08-.197.018-.279.105-.086.208-.054.289.044a1.5 1.5 0 01.343 1.153c-.041.4-.207.747-.508 1.02-.025.02-.044.047-.078.085.113.048.216.086.312.134.653.325.917.906 1.03 1.581.036.216.042.439.044.659 0 .06-.05.15-.103.178-.052.027-.167.019-.203-.021-.203-.22-.483-.258-.743-.352-.263-.097-.537-.191-.774-.338-.31-.19-.481-.495-.506-.87-.009-.136.023-.256.177-.268.155-.013.203.094.214.235.029.402.291.622.63.754.285.111.584.18.877.269.1-.69-.488-1.495-1.185-1.606-.508-.08-1.006.004-1.488.161a.903.903 0 00-.592.845c.006.352.28.734.615.858.22.081.433.056.636-.061.051-.03.097-.065.145-.097.1-.065.207-.052.255.046.032.065.023.197-.023.244-.096.094-.228.153-.349.22-.049.027-.103.04-.155.06a6.383 6.383 0 01-.053.072c.065.038.149.06.191.117.184.246.356.5.534.75.169.24.347.466.694.5.005-.063.013-.118.015-.172v-1.185c0-.182.069-.274.201-.262.159.015.184.132.184.264V71.7c0 .228-.06.291-.289.291-1.588 0-3.177 0-4.765.002-.182 0-.266-.077-.318-.25a1.704 1.704 0 00-1.484-1.21c-.708-.055-1.373.316-1.67.936-.015.03-.024.063-.049.126.141 0 .26.013.375-.006.048-.007.098-.07.128-.12.249-.413.611-.63 1.092-.614.484.017.829.262 1.045.694l.008.015c.098.211.077.354-.059.409-.123.05-.203-.015-.295-.235a.803.803 0 00-1.312-.264c-.023.022-.038.052-.071.1.063.008.102.019.146.021.168.002.337-.002.505.004.115.007.205.063.203.193 0 .126-.086.195-.203.195-.603.004-1.206.006-1.809 0-.18-.002-.251-.163-.18-.386a2.05 2.05 0 01.815-1.096 2.095 2.095 0 013.131.958c.021.05.073.126.113.126.339.01.68.006 1.044.006-.021-.071-.031-.12-.048-.166-.739-2.075-3.261-2.933-5.103-1.719-.255.168-.46.415-.506.755-.048.352-.249.629-.473.895a1.637 1.637 0 00-.226.38c-.048.105-.101.21-.218.176-.073-.021-.13-.122-.182-.195-.057-.082-.084-.19-.153-.262-.318-.338-.544-.705-.607-1.185-.023-.178-.199-.375-.358-.488-1.854-1.33-4.497-.47-5.236 1.692-.009.027-.015.054-.027.102.06.007.108.015.157.017.265 0 .533-.004.799.002.109.002.159-.031.203-.136.297-.713.829-1.149 1.587-1.29.994-.186 2 .41 2.331 1.367.021.061.038.124.044.187.017.178-.054.264-.236.266-.4.005-.8 0-1.2 0-.127 0-.236-.035-.247-.184-.01-.149.088-.201.22-.212.021 0 .042-.01.065-.017-.105-.228-.431-.38-.724-.333a.797.797 0 00-.651.514c-.027.067-.065.149-.122.178-.052.03-.177.025-.198-.01-.046-.072-.082-.185-.057-.26a1.18 1.18 0 011.222-.812c.388.034.708.208.905.543.094.161.192.226.368.2.061-.01.123 0 .184 0 .013-.015.025-.032.036-.047-.109-.157-.205-.331-.333-.472-.848-.945-2.434-.62-2.853.58-.113.326-.127.335-.469.335h-4.504c-.33 0-.395-.068-.393-.397v-1.463c0-.115.029-.208.153-.241.138-.038.238.06.238.234v1.42a.613.613 0 00.503-.189c.111-.109.203-.237.295-.365.215-.297.425-.6.646-.912-.031-.008-.087-.014-.136-.037-.144-.07-.293-.139-.429-.225-.098-.063-.136-.167-.06-.27.077-.105.171-.103.288-.038.139.078.289.162.442.182.343.045.584-.152.768-.417.18-.256.22-.536.086-.824-.119-.255-.308-.455-.59-.528-.444-.115-.894-.201-1.356-.138-.501.067-.863.34-1.059.8-.107.252-.164.525-.243.787.021.014.039.03.06.044.358-.126.725-.23 1.068-.388.27-.124.427-.37.441-.681.007-.133.072-.216.203-.208.134.008.183.105.18.233-.01.427-.219.748-.571.956-.22.13-.475.207-.72.291-.255.088-.525.13-.726.346-.105.115-.308.038-.308-.117 0-.736.101-1.45.666-1.986.194-.186.456-.304.722-.476-.042-.031-.107-.067-.157-.12-.538-.547-.584-1.51-.101-2.07.105-.122.226-.147.314-.06.113.116.051.217-.027.324a1.186 1.186 0 00.103 1.547c.284.285.657.377 1.04.432.161.023.322.044.479.084.572.148.917.515 1.04 1.094.005.023.015.044.025.078.398-.057.737.04.905.434.161.381.029.7-.302.956.067.07.124.134.197.213.896-1.107 2.053-1.612 3.481-1.532-2.435-.88-4.301-2.413-5.457-4.739-1.161-2.337-1.237-4.757-.423-7.214-.188 0-.366.008-.544 0-.736-.036-1.304-.56-1.322-1.243-.005-.18.058-.363.09-.545.027-.147.077-.292.077-.436.006-1.047.004-2.09.004-3.137 0-.046-.014-.107.009-.136.052-.067.123-.164.186-.162.065 0 .138.095.19.16.023.029.007.09.007.136v2.895c.272-.065.529-.138.793-.186.169-.032.347-.015.519-.038.412-.059.693-.461.588-.83a.596.596 0 00-.745-.426c-.067.017-.13.05-.195.073-.117.047-.209.01-.261-.098-.055-.111.004-.189.096-.248.379-.24.965-.155 1.258.187.263.304.333.65.19 1.023-.169.436-.502.67-.965.713-.219.021-.439.025-.657.057-.561.081-.816.58-.808.966.011.468.396.85.913.883.226.015.46-.032.686-.07.059-.01.126-.081.153-.142.287-.62.67-1.178 1.072-1.725.397-.541.416-1.156.236-1.78-.148-.516-.427-.963-.768-1.374a6.15 6.15 0 00-.172-.197c-.09-.098-.123-.205-.01-.304.111-.096.209-.046.306.042.205.189.403.384.621.556.471.369.99.643 1.595.725a1.98 1.98 0 001.178-.212 12.19 12.19 0 012.646-1c.326-.077.661-.117.994-.161.113-.015.182-.046.241-.155a1.53 1.53 0 01.286-.388c.176-.164.392-.151.559.019.096.098.184.214.241.337.056.126.138.164.264.176 1.283.13 2.463.575 3.591 1.183.571.308 1.162.268 1.75.044.6-.23 1.101-.614 1.553-1.063.037-.038.069-.099.111-.105.081-.014.199-.03.245.015.046.044.054.174.023.24-.049.102-.147.18-.218.27-.448.557-.787 1.163-.848 1.893-.039.47.094.886.352 1.283.36.553.693 1.123 1.042 1.683a.378.378 0 00.186.153c.342.097.689.12 1.02-.042.341-.165.538-.431.529-.826-.008-.38-.232-.752-.577-.85-.281-.08-.58-.102-.873-.125-.643-.052-1.114-.597-1.03-1.22.082-.608.762-1.088 1.497-.706.106.054.152.148.096.262-.063.123-.166.12-.283.073-.335-.136-.586-.099-.766.105-.341.386-.119.979.406 1.086.063.012.126.017.191.019.443.012.881.046 1.272.352.007-.071.015-.115.015-.157V51.41c0-.059-.017-.132.012-.17.047-.063.122-.136.189-.14.054-.005.132.077.169.138.03.048.013.124.013.189 0 1.144-.002 2.287.002 3.432 0 .19.044.38.054.57.036.69-.414 1.248-1.107 1.363-.236.038-.481.027-.736.04.943 2.442.843 4.855-.319 7.198-1.155 2.325-3.013 3.868-5.456 4.746v-.012zm3.604-8.974c.149.036.249.03.306-.15a.878.878 0 01.533-.563c.105-.042.151-.088.124-.203-.071-.304-.119-.617-.203-.916a7.494 7.494 0 00-1.664-3.024c-.065-.073-.115-.067-.207-.046-.163.038-.343.061-.507.036-.117-.017-.176 0-.247.084-.498.574-1 1.145-1.5 1.717-.042.048-.088.105-.143.121a.258.258 0 01-.19-.02.196.196 0 01-.071-.162c.008-.063.056-.126.1-.176.503-.577 1.007-1.153 1.516-1.728.071-.082.087-.142.056-.258a1.407 1.407 0 01-.025-.505c.01-.096.002-.145-.078-.199a7.511 7.511 0 00-3.168-1.266c-.105-.017-.155.006-.187.115-.092.33-.307.55-.625.675-.051.021-.084.088-.126.132.055.027.107.078.163.082a6.508 6.508 0 013.01.929c.109.065.222.13.316.216.044.042.077.14.059.195-.017.056-.099.115-.162.125-.056.01-.131-.031-.188-.067a6.1 6.1 0 00-2.29-.924c-.198-.036-.401-.055-.646-.086.05.069.067.098.09.121.299.3.598.598.9.898.238.237.481.47.709.717.05.054.071.167.057.245-.009.044-.118.1-.176.096-.065-.004-.134-.06-.186-.113-.344-.337-.683-.679-1.022-1.02-.268-.271-.533-.548-.803-.825-.053.046-.084.072-.111.099l-1.373 1.358c-.17.168-.337.338-.511.5-.084.077-.197.083-.257-.015-.038-.063-.019-.166-.009-.248.004-.031.052-.06.08-.088l1.544-1.532c.042-.042.078-.09.118-.135l-.03-.041c-1.27.102-2.39.58-3.392 1.404.092.105.167.191.242.28.264.301.532.599.789.905a.291.291 0 01.059.218c-.008.05-.098.124-.147.12a.369.369 0 01-.217-.112c-.312-.344-.616-.696-.923-1.044-.03-.033-.063-.06-.103-.098-1.101 1.088-1.72 2.381-1.844 3.918a.49.49 0 00.149-.107l1.969-1.968c.046-.044.09-.114.143-.122.079-.013.19-.01.243.038.039.035.018.153 0 .23-.011.044-.067.078-.103.116l-2.055 2.054c-.08.08-.157.164-.201.21l5.929 5.975c1.97-1.981 3.943-3.967 5.921-5.96-.013-.015-.038-.047-.065-.076l-2.191-2.19c-.052-.053-.122-.103-.149-.168-.025-.06-.031-.162.004-.2.044-.048.139-.069.21-.069.046 0 .098.057.138.097.636.635 1.272 1.27 1.907 1.907.083.084.169.166.278.273.008-.067.017-.094.012-.12-.121-1.172-.527-2.228-1.251-3.161-.101-.128-.207-.25-.31-.378-.071-.088-.079-.184.004-.266.092-.086.191-.067.281.013.025.023.048.05.071.077.858.977 1.367 2.118 1.555 3.403.031.216.046.436.067.659l.004-.009zm-6.306 8.175l.048.012.13-.11a8.273 8.273 0 011.668-1.158c1.358-.696 2.782-.964 4.295-.64.031.007.079.011.096-.006.182-.195.36-.394.54-.593l-.025-.061c-.327-.042-.651-.107-.977-.12-1.149-.046-2.248.202-3.301.648-1.566.667-3.152.755-4.766.216-.46-.155-.908-.352-1.371-.497-1.073-.337-2.168-.496-3.29-.268-.065.013-.127.036-.228.063.18.203.331.384.496.551a.256.256 0 00.205.063 5.902 5.902 0 012.52.01c1.315.282 2.439.928 3.439 1.808.036.031.073.057.134.105v-.298c0-.136.042-.251.199-.25.15 0 .186.114.186.244v.287l.002-.006zm-.781-1.9c-1.804-1.815-3.65-3.673-5.475-5.514.197 3.128 2.991 5.45 5.475 5.514zm1.133.007c.965.172 3.081-.896 4.112-2.12a5.963 5.963 0 001.424-3.45c-1.863 1.873-3.707 3.729-5.536 5.57zm-9.421-6.743c.329-.107.641-.206.948-.317.042-.014.076-.092.088-.144.086-.374.143-.753.249-1.12a7.797 7.797 0 011.681-3.034.433.433 0 00.08-.222c.023-.18.033-.36.041-.543.003-.059.003-.136-.031-.176-.27-.319-.546-.631-.822-.944-.028-.031-.063-.054-.099-.084-.012.021-.019.028-.017.032.009.063.017.126.028.189.098.673-.021 1.293-.446 1.838a7.948 7.948 0 00-1.469 2.992 7.127 7.127 0 00-.231 1.537v-.004zm15.549-6.594c-.034.008-.055.008-.065.019-.287.325-.576.652-.858.983-.023.027-.021.097-.004.134.079.189.109.373.044.577-.017.052.006.14.044.182a7.9 7.9 0 012.007 4.244c.008.052.077.117.132.14.261.103.529.193.797.288.025.008.052.012.1.025-.006-.095-.006-.174-.016-.252-.203-1.587-.833-2.996-1.779-4.27-.402-.544-.538-1.145-.444-1.808l.038-.26.004-.002zm-2.551 12.297c.056.012.073.02.09.019.47-.05.941-.101 1.412-.16a.263.263 0 00.157-.086c.911-1.084 1.457-2.331 1.679-3.728.014-.096-.004-.146-.101-.184a.864.864 0 01-.538-.535c-.062-.178-.152-.207-.324-.147-.098 1.927-.883 3.531-2.373 4.816l-.002.005zm-8.272.019a.8.8 0 01.046-.055c-.04-.021-.086-.036-.119-.065-1.383-1.216-2.135-2.745-2.256-4.587-.004-.053-.046-.128-.09-.15-.094-.04-.122.038-.151.116-.096.262-.266.478-.529.566-.203.067-.214.172-.183.346a7.675 7.675 0 001.48 3.376c.161.21.323.35.601.304.061-.01.128.004.19.012l1.011.134v.002zm3.366-13.893c-.105.01-.201.015-.295.03-.681.098-1.332.304-1.968.557-.446.179-.879.388-1.316.587-.674.304-1.35.27-2.028.02-.038-.015-.08-.024-.134-.038.012.04.014.06.025.073.335.386.667.77 1.009 1.151.025.03.096.04.134.03a.8.8 0 01.558.024c.042.017.116.005.155-.023a7.934 7.934 0 013.558-1.432c.044-.006.111-.054.12-.092.067-.287.121-.574.184-.885l-.002-.002zm1.548-.031c.067.325.128.589.174.857.019.107.061.143.163.158 1.216.165 2.33.6 3.343 1.287.14.094.259.174.431.067a.278.278 0 01.22-.023c.287.109.435-.059.592-.254.22-.27.456-.526.684-.788.026-.03.044-.06.09-.128-.203.063-.366.117-.529.161-.588.154-1.168.133-1.708-.159-.749-.404-1.524-.738-2.346-.95-.356-.092-.722-.148-1.116-.228h.002zm-9.663 9.477c.048.346.08.673.138.995a8.487 8.487 0 001.455 3.414c.027.038.084.088.117.082.316-.063.63-.137.957-.208-.021-.034-.036-.07-.059-.1a7.67 7.67 0 01-1.507-3.496c-.042-.258-.13-.369-.385-.419-.232-.044-.45-.166-.714-.268h-.002zm15.128 4.29c.287.058.557.094.816.171.162.048.233.004.321-.124a8.686 8.686 0 001.385-3.258c.067-.343.101-.694.149-1.03-.346.108-.664.202-.978.31-.039.014-.073.096-.081.15a7.78 7.78 0 01-1.16 3.122c-.14.218-.293.43-.45.658h-.002zM277.26 52.53c-.031-.003-.054-.009-.075-.005a7.372 7.372 0 00-3.288 1.325c-.038.028-.061.12-.046.168.067.2.054.386-.027.577-.019.044-.026.12 0 .153.077.105.171.197.261.295.042-.031.071-.052.096-.073a6.435 6.435 0 012.031-1.111 6.476 6.476 0 011.72-.325c.046 0 .088-.048.132-.076-.036-.044-.063-.098-.107-.128-.067-.044-.148-.06-.218-.102-.263-.158-.406-.405-.479-.696v-.002zm-4.527 2.373l-.048-.042c-.025.046-.04.1-.073.138-.59.68-1.082 1.424-1.375 2.277-.176.514-.287 1.049-.425 1.575-.025.094-.009.16.104.195.321.1.52.329.639.64.019.047.092.077.14.115.029-.047.082-.09.084-.139.102-1.608.709-2.996 1.821-4.162.188-.197.184-.192.008-.413-.084-.102-.157-.123-.293-.1-.151.027-.316-.017-.473-.036-.038-.004-.073-.033-.109-.05v.002zm11.61 11.514c-.097-.02-.136-.03-.176-.037a5.465 5.465 0 00-2.039.065c-1.329.287-2.436.977-3.44 1.872-.272.243-.243.51-.235.799 0 .035.044.088.078.1.029.011.085-.016.111-.041.075-.08.14-.17.215-.252 1.268-1.415 2.815-2.16 4.747-1.988.044.005.102.007.132-.016.192-.154.381-.313.605-.5l.002-.002zm-12.11-.014c.012.04.012.06.023.069.134.117.276.23.406.354.1.097.207.118.345.105a5.153 5.153 0 012.658.451c.877.403 1.591 1.008 2.2 1.749.031.037.088.054.134.08.023-.049.063-.097.069-.15.042-.329-.029-.59-.31-.834-.881-.76-1.835-1.373-2.963-1.692a5.641 5.641 0 00-2.56-.136l-.002.004zm15.325 5.195c-.214-.32-.411-.618-.612-.912a1.436 1.436 0 00-.157-.186c-.525-.554-1.362-.533-1.833.044-.073.088-.094.161-.034.278.107.206.193.422.268.64.038.109.09.14.199.138.436-.006.869-.002 1.304-.002h.867-.002zm-18.488-.03c.04.02.051.028.061.028.676 0 1.354.004 2.03-.002.051 0 .12-.073.147-.128.09-.195.155-.398.245-.593.115-.25.121-.248-.069-.44a.736.736 0 00-.105-.09 1.163 1.163 0 00-1.555.199c-.276.312-.496.675-.751 1.027h-.003zm9.182-21.089c-.065.086-.115.136-.146.197a4.271 4.271 0 00-.459 1.646.605.605 0 00.601.665.596.596 0 00.601-.642 4.124 4.124 0 00-.448-1.663c-.032-.063-.086-.117-.149-.2v-.003zm.829 19.278l.14-.17c.733-.872 1.643-1.465 2.757-1.704.404-.086.745-.27 1.084-.482.031-.019.054-.05.096-.088-.042-.015-.061-.025-.081-.025a4.833 4.833 0 00-1.654.278c-.961.355-1.733.967-2.386 1.745-.178.212-.176.214.044.446zm-1.595-.056c.214-.262.187-.172-.004-.422a3.744 3.744 0 00-.314-.348c-.843-.864-1.833-1.45-3.047-1.604-.243-.031-.488-.031-.731-.046l-.018.065c.299.162.558.403.906.468.751.14 1.456.398 2.063.868.4.31.762.67 1.147 1.019h-.002zm-6.984-9.123c.435.007.71-.253.705-.605-.004-.344-.276-.602-.638-.588-.398.017-.756.16-1.074.392-.184.135-.182.269 0 .405.318.237.681.363 1.007.394v.002zm15.597 0c.295-.025.628-.146.916-.377.201-.161.203-.285-.006-.444-.291-.225-.619-.363-.99-.37-.36-.008-.63.248-.63.592 0 .352.27.608.712.602l-.002-.003zm-7.824 10.689c.145-.195.291-.356.398-.539.295-.507.063-.9-.339-1.174a.16.16 0 00-.128-.013c-.343.135-.569.615-.456.973.09.29.283.512.527.75l-.002.003zm5.421-17.05a.367.367 0 00-.358-.369.363.363 0 00-.356.37.357.357 0 10.714 0zm1.49 15.568a.371.371 0 00.369-.36.366.366 0 00-.369-.36.347.347 0 00-.354.35.352.352 0 00.354.37zm-13.87 0c.186 0 .36-.164.366-.346a.374.374 0 00-.357-.373.366.366 0 00-.373.354c0 .201.161.363.364.365zm2.183-15.507a.348.348 0 00-.36-.363.36.36 0 00-.354.357c0 .201.166.367.367.365a.35.35 0 00.347-.359z"}),ae().createElement("path",{d:"M278.242 48.801c.245-.27.505-.455.831-.54.58-.152 1.097-.034 1.526.383.18.176.318.396.475.596.138.178.253.381.418.528.27.239.61.306.942.15.36-.17.542-.486.544-.884 0-.306-.171-.52-.437-.66-.115-.061-.157-.162-.088-.277.063-.107.163-.12.272-.063.021.01.042.02.061.034.519.295.72.91.483 1.48-.408.987-1.609 1.132-2.279.268-.132-.17-.232-.36-.356-.537-.173-.25-.372-.476-.661-.6a1.197 1.197 0 00-1.517.516c-.042.07-.132.154-.199.154-.069 0-.166-.078-.205-.147-.406-.698-1.3-.837-1.884-.27a3.32 3.32 0 00-.442.578c-.209.32-.431.618-.801.767-.517.21-1.109.093-1.476-.3a1.253 1.253 0 01-.196-1.396c.115-.228.288-.405.508-.535.111-.065.214-.067.289.047.075.115.027.21-.08.278-.343.223-.523.527-.437.944.134.648.969.91 1.48.455.161-.143.284-.333.404-.518.219-.342.458-.66.818-.862a1.598 1.598 0 011.894.273c.036.036.067.08.115.136l-.002.002zM282.708 51.319c-.067-.026-.138-.147-.136-.22.002-.055.12-.143.193-.15.4-.041.709-.245 1.015-.488.27-.212.569-.394.875-.551a.75.75 0 01.705.019c.115.06.165.15.103.272-.318.627-1.024 1.332-1.901 1.323-.004.015-.579-.105-.854-.205zm.831-.212c.463.09 1.164-.344 1.432-.879-.607.08-.923.594-1.432.879zM273.047 51.52c-.4.009-.754-.128-1.072-.352a2.66 2.66 0 01-.799-.906c-.101-.182-.059-.289.138-.367.333-.13.644-.033.931.13.214.124.413.28.601.44.289.248.596.435.984.477a.315.315 0 01.213.157c.05.117-.048.2-.153.23-.274.084-.837.204-.841.19l-.002.001zm-.023-.404c-.381-.438-1.091-.885-1.367-.866.201.467.931.941 1.367.866zM268.171 57.638v3.263c0 .052.018.12-.007.153-.05.067-.125.125-.188.125-.065 0-.134-.06-.188-.125-.021-.026-.007-.078-.007-.12 0-1.195-.002-2.39.005-3.583 0-.096.041-.222.11-.28.103-.091.191.035.287.079.197.088.404.16.613.212.13.033.268.041.256.215-.013.168-.145.196-.283.175-.192-.03-.383-.07-.596-.11l-.002-.004zM288.332 57.64c-.232.042-.429.084-.63.111-.138.019-.253-.038-.258-.188-.004-.145.109-.191.239-.198.264-.01.496-.09.703-.262.051-.042.161-.063.218-.035.054.027.107.126.107.193.006 1.243.006 2.486.006 3.727 0 .132-.046.235-.199.229-.148-.006-.188-.107-.186-.241v-3.17-.168.002zM288.284 48.86c-.222.249-.441.5-.663.75-.103.117-.205.235-.312.352-.086.095-.188.126-.291.038-.103-.088-.088-.19-.002-.29.444-.505.883-1.012 1.335-1.511.05-.057.176-.099.237-.073.06.023.121.138.121.216.009.706.004 1.415.006 2.121 0 .134-.05.235-.196.233-.147-.002-.189-.109-.189-.241v-1.409c0-.057-.004-.113-.006-.168l-.042-.017.002-.002zM268.219 48.828c-.004.103-.008.157-.008.214 0 .47-.002.941 0 1.411 0 .136-.046.23-.187.245-.119.015-.205-.09-.207-.245 0-.702-.004-1.405.007-2.107 0-.078.06-.2.119-.218.071-.021.197.019.251.078.444.488.877.987 1.314 1.484.086.099.128.205.017.304-.117.105-.224.052-.314-.053l-.839-.953c-.04-.044-.082-.086-.153-.162v.002zM271.352 48.482h-1.233c-.133 0-.238-.05-.238-.19 0-.141.105-.193.238-.193h2.499c.132 0 .239.05.239.193 0 .144-.107.19-.239.19h-1.266zM285.232 48.482h-1.197c-.143 0-.272-.03-.272-.193 0-.167.134-.193.272-.193h2.43c.142 0 .274.032.274.193 0 .158-.128.195-.274.195-.411-.004-.821 0-1.233 0v-.002zM269.065 56.09a.59.59 0 01-.601-.605.597.597 0 01.596-.596.603.603 0 11.005 1.204v-.002zm.219-.586c-.004-.143-.104-.235-.23-.225-.132.01-.197.097-.205.216-.008.116.115.218.232.208.13-.013.193-.092.203-.2zM287.378 56.091a.6.6 0 11.023-1.201.6.6 0 01.588.606.595.595 0 01-.613.595h.002zm.004-.386a.23.23 0 00.226-.216c0-.113-.105-.213-.226-.211-.132.002-.199.081-.214.203-.012.113.099.222.214.224zM268.578 51.732c0-.46.352-.845.798-.868.071-.004.194.07.211.128.136.478-.004 1.004-.619 1.136-.27.057-.365-.019-.386-.291-.004-.04-.004-.082-.006-.105h.002zm.404-.044c.182-.034.264-.153.243-.352-.178.065-.251.172-.243.352zM287.977 51.713c0 .424-.141.518-.54.371-.473-.174-.601-.641-.471-1.09.016-.06.14-.134.209-.13.45.027.797.407.8.85h.002zm-.658-.388c.005.229.072.325.258.378.014-.19-.057-.298-.258-.378zM271.068 49.151c.004.518-.291.843-.764.887-.164.015-.245-.05-.279-.212-.104-.53.222-.993.758-1.067.132-.019.216.034.247.16.023.09.029.182.036.232h.002zm-.394.067c-.215.099-.289.22-.249.392.176-.065.245-.193.249-.392zM285.456 49.2c0-.452.147-.544.555-.35.399.188.584.565.485.987-.033.146-.113.216-.272.2-.477-.043-.768-.355-.768-.838zm.653.406c0-.22-.067-.319-.253-.373-.013.197.058.306.253.373z"}),ae().createElement("path",{d:"M277.655 49.816c-.129-.021-.207-.038-.288-.044-.536-.05-.919.205-1.223.616-.086.116-.159.267-.341.157-.123-.073-.113-.197.032-.39.41-.549.937-.85 1.64-.76.074.008.164.016.214.06.059.053.115.15.107.22-.007.06-.105.11-.141.143v-.002zM279.316 49.749c-.147.02-.245.031-.342.05-.121.023-.228.007-.263-.128-.036-.14.044-.216.173-.25.522-.136.988-.008 1.398.322.174.138.31.325.455.496.083.101.098.216-.028.3-.123.084-.217.025-.293-.084-.169-.245-.366-.467-.648-.582-.157-.065-.329-.093-.455-.126l.003.002zM282.642 49.082a.556.556 0 01-.561.543.552.552 0 01.018-1.103.556.556 0 01.545.562l-.002-.002zm-.547.218c.073-.107.153-.17.151-.23 0-.053-.105-.152-.144-.145a.237.237 0 00-.155.155c-.011.046.073.113.15.218l-.002.002zM274.491 49.625a.555.555 0 01-.549-.558.56.56 0 01.542-.547.558.558 0 01.557.55.56.56 0 01-.55.555zm.014-.789c-.085.111-.165.172-.167.233 0 .052.092.155.136.151.065-.004.159-.078.172-.138.012-.055-.067-.128-.141-.248v.002zM268.633 64.538h.626c.126 0 .226.044.232.18.007.147-.1.2-.23.202-.423.002-.845 0-1.266 0-.132 0-.234-.049-.23-.2.004-.14.104-.18.228-.18h.642l-.002-.002zM287.902 64.53h.626c.128 0 .222.054.222.188 0 .135-.094.19-.222.19h-1.285c-.125 0-.22-.05-.22-.19 0-.142.097-.188.22-.188.22-.002.44 0 .659 0zM269.485 66.104h-.588c-.13 0-.236-.04-.241-.186-.004-.15.103-.193.233-.193h1.195c.132 0 .243.044.243.186 0 .153-.116.197-.254.195-.196-.002-.393 0-.588 0v-.002zM287.026 66.094h-.626c-.132 0-.216-.065-.211-.197.004-.124.09-.178.213-.178h1.235c.128 0 .22.052.222.19 0 .139-.099.187-.222.187h-.609l-.002-.002zM288.032 64.311h-.485c-.126 0-.224-.046-.229-.182-.004-.149.101-.197.233-.2h.99c.127 0 .217.068.211.2-.006.122-.092.178-.213.178h-.505l-.002.004zM270.165 66.706c-.157 0-.311.004-.468 0-.12-.006-.226-.052-.224-.19 0-.148.104-.196.236-.196h.919c.123 0 .222.04.23.18.009.152-.098.202-.224.206-.155.006-.312 0-.469 0zM286.365 66.314h.468c.124 0 .201.063.203.189 0 .117-.073.184-.186.186-.341.005-.682.007-1.023 0-.113-.002-.184-.077-.178-.193.006-.115.081-.176.197-.178.173-.002.347 0 .521 0l-.002-.004zM268.465 64.318h-.502c-.126 0-.201-.063-.203-.187 0-.127.081-.186.203-.186.341 0 .682-.002 1.023 0 .12 0 .203.056.201.186-.002.139-.09.19-.22.19h-.502v-.003zM288.173 63.716h-.347c-.122 0-.201-.059-.207-.184-.007-.12.069-.19.18-.193.259-.009.521-.015.778.006.065.006.157.12.168.193.014.107-.076.174-.193.176-.128.002-.253 0-.381 0l.002.002zM268.32 63.72h-.346c-.121 0-.205-.054-.211-.177-.004-.124.069-.195.192-.197.249-.005.496-.007.746 0 .119.002.203.075.196.197-.006.12-.088.18-.213.178-.122-.002-.243 0-.364 0zM285.47 67.301c-.096-.004-.207.01-.301-.023-.071-.025-.157-.107-.172-.178-.02-.107.059-.187.176-.189.197-.004.396-.017.588.007.067.008.157.098.176.17.03.108-.052.184-.167.197-.099.01-.197.01-.302.016h.002zM271.042 67.297c-.099 0-.197.008-.293-.002-.116-.015-.214-.086-.183-.203.019-.072.122-.16.195-.17.18-.025.366-.01.551-.007.119.003.2.063.205.19.004.127-.084.184-.199.194-.092.009-.184 0-.276 0v-.002zM288.305 63.12c-.088 0-.174.005-.261 0-.116-.008-.201-.079-.18-.188.012-.071.1-.172.165-.182.182-.026.37-.026.552 0 .065.008.172.125.164.178-.013.071-.105.153-.182.186-.074.032-.172.007-.258.007zM268.199 63.123c-.085 0-.182.023-.257-.006-.071-.03-.167-.11-.17-.172-.002-.063.088-.178.149-.187.188-.025.383-.023.569 0 .063.008.157.122.153.185-.002.063-.098.146-.169.172-.082.029-.182.006-.275.006v.002zM286.83 65.49c-.072-.027-.155-.111-.164-.18-.006-.053.088-.166.145-.172.199-.021.395-.02.594.002.055.006.145.12.142.18-.002.06-.087.147-.152.168-.088.029-.486.033-.565 0v.002zM269.41 65.132c.092 0 .194-.026.274.006.071.027.155.113.165.182.009.05-.09.164-.15.17a2.389 2.389 0 01-.586 0c-.061-.006-.145-.117-.149-.186-.004-.055.086-.145.153-.168.088-.03.194-.007.293-.007v.003zM288.391 62.532c-.07-.004-.151.012-.203-.02-.065-.039-.147-.119-.147-.18 0-.06.086-.163.149-.176a1.04 1.04 0 01.41 0c.061.013.144.116.144.179 0 .06-.083.14-.148.178-.053.031-.134.015-.203.019h-.002zM268.114 62.527c-.057 0-.115.005-.172 0-.115-.01-.173-.08-.173-.19 0-.145.098-.16.167-.179.113-.03.239-.014.36-.008.113.006.182.08.18.193 0 .115-.075.176-.188.184-.057.005-.116 0-.172 0h-.002zM270.165 66.886c.023 0 .044.013.059.03.048.06.111.121.121.188.017.122-.081.208-.192.183-.074-.017-.178-.118-.18-.183 0-.063.073-.128.127-.19a.078.078 0 01.065-.028zM278.468 49.77c-.071.05-.134.125-.211.142-.122.025-.201-.063-.203-.178-.002-.12.081-.203.199-.184.077.012.144.09.215.138v.082zM269.083 66.506c-.119.09-.184.177-.261.19-.111.018-.199-.058-.199-.183 0-.124.077-.206.195-.185.077.013.144.095.265.18v-.002zM269.97 50.384c0 .025-.01.05-.031.065-.065.048-.128.11-.199.122-.109.019-.18-.067-.182-.18-.002-.116.069-.2.175-.187.072.008.137.067.201.115a.08.08 0 01.034.065h.002zM268.125 61.8c-.063.092-.186.126-.28.065-.053-.034-.072-.084-.057-.149a.288.288 0 01.182-.176c.115-.021.205.071.184.188a.173.173 0 01-.031.072h.002zM279.303 60.299a.97.97 0 00-.748.396c-.031.042-.062.084-.088.13-.056.103-.129.174-.251.107-.121-.067-.102-.17-.046-.27.214-.374.526-.615.955-.686.175-.03.358-.032.533-.065.312-.059.578-.204.775-.46.071-.092.157-.148.266-.066.11.083.073.18.004.272a1.456 1.456 0 01-.808.539c-.117.031-.155.086-.151.205.006.243-.01.489-.004.732a.993.993 0 01-.523.937 1.753 1.753 0 01-1.589.12c-.613-.246-.91-.745-.952-1.382-.034-.49-.042-.99.006-1.478.119-1.229 1.191-1.709 2.256-1.357.427.14.714.422.798.879.033.182-.034.3-.174.32-.14.022-.224-.066-.249-.26a.688.688 0 00-.454-.588c-.844-.325-1.691.07-1.744 1.06-.025.487-.033.977.007 1.462.088 1.059 1.067 1.32 1.802.97a.637.637 0 00.383-.628c-.004-.29 0-.58 0-.89h-.004zM283.591 55.271c.078.052.143.082.185.13.78.88 1.295 1.889 1.463 3.063.018.134-.021.24-.166.258-.136.017-.194-.071-.211-.2-.155-1.091-.645-2.022-1.352-2.855a.366.366 0 01-.078-.24c.005-.053.095-.097.159-.156zM269.163 48.476a.186.186 0 100-.372.186.186 0 000 .372zM287.427 48.442a.187.187 0 100-.373.187.187 0 000 .373zM286.923 50.407a.186.186 0 11-.373 0 .186.186 0 01.373 0zM288.725 61.733a.186.186 0 11-.371 0 .186.186 0 01.371 0zM286.539 67.102a.187.187 0 01-.187.187.187.187 0 010-.373c.103 0 .187.084.187.186z"})),ae().createElement("path",{fill:"url(#paint39_linear_21_2)",d:"M181.846 49.708c13.726 0 24.854-11.128 24.854-24.854C206.7 11.127 195.572 0 181.846 0c-13.726 0-24.854 11.127-24.854 24.854 0 13.726 11.128 24.854 24.854 24.854z"}),ae().createElement("path",{fill:"url(#paint40_linear_21_2)",d:"M177.877 245.93c36.091 0 65.348-29.258 65.348-65.348 0-36.091-29.257-65.348-65.348-65.348-36.09 0-65.348 29.257-65.348 65.348 0 36.09 29.258 65.348 65.348 65.348z"}),ae().createElement("g",{clipPath:"url(#clip2_21_2)"},ae().createElement("path",{fill:"#FFB45A",d:"M155.387 214.925a7.693 7.693 0 007.693-7.693 7.693 7.693 0 10-15.386 0 7.693 7.693 0 007.693 7.693z"}),ae().createElement("path",{fill:"#FF7B8E",d:"M177.644 214.925a7.693 7.693 0 007.693-7.693 7.693 7.693 0 00-7.693-7.693 7.693 7.693 0 00-7.693 7.693 7.693 7.693 0 007.693 7.693z"}),ae().createElement("path",{fill:"#5AC0FF",d:"M199.896 214.925a7.693 7.693 0 007.693-7.693 7.693 7.693 0 00-7.693-7.693 7.693 7.693 0 00-7.693 7.693 7.693 7.693 0 007.693 7.693z"}),ae().createElement("path",{fill:"#5633D1",d:"M191.159 158.779c-.416 0-.822.028-1.222.055-1.672-7.304-8.208-12.763-16.02-12.763-2.055 0-4.019.379-5.837 1.077 0 2.056.011 4.425.027 5.432 2.099.01 6.157.027 7.947.027v7.774h-7.909v13.135h8.137c-.228.579-.579 1.44-.725 1.775-1.477 3.565-5.151 5.556-8.954 4.869-3.619-.66-6.308-3.738-6.508-7.515-.054-1.103-.027-2.218-.027-3.321v-8.997h-2.786c-5.622 2.607-9.533 8.293-9.533 14.899 0 9.078 7.358 16.43 16.43 16.43h27.164c8.997-.092 16.246-7.411 16.246-16.43s-7.357-16.447-16.43-16.447z"})),ae().createElement("g",{fill:"#fff",clipPath:"url(#clip3_21_2)"},ae().createElement("path",{d:"M181.77 25.565l-3.242 9.42a10.808 10.808 0 006.644-.174.983.983 0 01-.077-.149l-3.321-9.1-.004.003zM170.775 24.62a10.81 10.81 0 006.092 9.727l-5.156-14.126a10.72 10.72 0 00-.936 4.398z"}),ae().createElement("path",{d:"M188.877 24.075c0-1.334-.478-2.258-.892-2.98-.547-.892-1.062-1.642-1.062-2.534 0-.994.754-1.919 1.816-1.919.048 0 .095.004.142.008a10.773 10.773 0 00-7.296-2.835 10.79 10.79 0 00-9.029 4.869c.253.007.493.01.696.01 1.131 0 2.879-.137 2.879-.137.584-.036.653.82.069.888 0 0-.587.07-1.237.105l3.935 11.704 2.364-7.092-1.682-4.612a20.787 20.787 0 01-1.135-.105c-.584-.036-.515-.924.069-.888 0 0 1.784.138 2.846.138 1.128 0 2.879-.138 2.879-.138.584-.033.653.82.069.888 0 0-.587.07-1.236.105l3.905 11.617 1.077-3.6c.468-1.494.823-2.57.823-3.495v.003zM191.064 19.434c.047.345.073.714.073 1.113 0 1.095-.203 2.328-.823 3.872l-3.3 9.543a10.804 10.804 0 005.374-9.34c0-1.878-.479-3.647-1.324-5.184v-.004z"}),ae().createElement("path",{d:"M181.582 10.555c-7.768 0-14.066 6.298-14.066 14.064s6.298 14.064 14.066 14.064c7.767 0 14.066-6.298 14.066-14.064s-6.299-14.064-14.066-14.064zm0 26.395c-6.799 0-12.329-5.53-12.329-12.331 0-6.802 5.53-12.328 12.329-12.328s12.329 5.53 12.329 12.328c0 6.798-5.53 12.331-12.329 12.331z"})),ae().createElement("g",{clipPath:"url(#clip4_21_2)"},ae().createElement("path",{fill:"#fff",d:"M87.793 49.902H67.402c-.644 0-1.166.522-1.166 1.165V71.46c0 .643.522 1.165 1.166 1.165h20.391c.644 0 1.165-.522 1.165-1.165V51.067c0-.643-.521-1.165-1.165-1.165zM74.538 66.39h-1.98V56.136h1.98V66.39zm8.098 0h-5.942v-2.127h5.942v2.127zm0-4.064h-5.942V60.2h5.942v2.126zm0-4.063h-5.942v-2.127h5.942v2.127z"}))),ae().createElement("defs",null,ae().createElement("linearGradient",{id:"paint0_linear_21_2",x1:"98.365",x2:"107.763",y1:"21.3",y2:"290.338",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint1_linear_21_2",x1:"87.284",x2:"96.683",y1:"21.689",y2:"290.727",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint2_linear_21_2",x1:"66.918",x2:"76.316",y1:"22.399",y2:"291.437",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint3_linear_21_2",x1:"109.954",x2:"119.353",y1:"20.898",y2:"289.936",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint4_linear_21_2",x1:"76.777",x2:"86.175",y1:"22.054",y2:"291.092",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint5_linear_21_2",x1:"121.976",x2:"131.374",y1:"20.479",y2:"289.517",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint6_linear_21_2",x1:"159.89",x2:"169.289",y1:"19.152",y2:"288.191",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint7_linear_21_2",x1:"172.849",x2:"182.247",y1:"18.699",y2:"287.737",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint8_linear_21_2",x1:"57.767",x2:"67.166",y1:"22.717",y2:"291.755",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint9_linear_21_2",x1:"147.041",x2:"156.44",y1:"19.6",y2:"288.638",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint10_linear_21_2",x1:"134.371",x2:"143.769",y1:"20.044",y2:"289.082",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint11_linear_21_2",x1:"41.858",x2:"51.256",y1:"23.278",y2:"292.31",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint12_linear_21_2",x1:"35.201",x2:"44.599",y1:"23.507",y2:"292.546",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint13_linear_21_2",x1:"29.484",x2:"38.883",y1:"23.707",y2:"292.745",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint14_linear_21_2",x1:"185.827",x2:"195.226",y1:"18.245",y2:"287.283",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint15_linear_21_2",x1:"49.397",x2:"58.795",y1:"23.015",y2:"292.053",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint16_linear_21_2",x1:"18.35",x2:"27.748",y1:"24.098",y2:"293.136",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint17_linear_21_2",x1:"21.032",x2:"30.431",y1:"24.005",y2:"293.044",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint18_linear_21_2",x1:"24.747",x2:"34.145",y1:"23.872",y2:"292.91",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint19_linear_21_2",x1:"323.253",x2:"332.651",y1:"13.445",y2:"282.483",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint20_linear_21_2",x1:"327.244",x2:"336.642",y1:"13.308",y2:"282.346",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint21_linear_21_2",x1:"312.33",x2:"321.728",y1:"13.827",y2:"282.865",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint22_linear_21_2",x1:"318.272",x2:"327.671",y1:"13.619",y2:"282.657",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint23_linear_21_2",x1:"198.709",x2:"208.108",y1:"17.798",y2:"286.836",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint24_linear_21_2",x1:"330.202",x2:"339.6",y1:"13.201",y2:"282.239",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint25_linear_21_2",x1:"247.84",x2:"257.238",y1:"16.08",y2:"285.119",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint26_linear_21_2",x1:"259.099",x2:"268.497",y1:"15.689",y2:"284.727",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint27_linear_21_2",x1:"236.089",x2:"245.487",y1:"16.49",y2:"285.528",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint28_linear_21_2",x1:"211.439",x2:"220.837",y1:"17.353",y2:"286.391",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint29_linear_21_2",x1:"223.915",x2:"233.313",y1:"16.916",y2:"285.955",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint30_linear_21_2",x1:"289.151",x2:"298.549",y1:"14.636",y2:"283.674",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint31_linear_21_2",x1:"305.461",x2:"314.86",y1:"14.065",y2:"283.103",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint32_linear_21_2",x1:"297.717",x2:"307.116",y1:"14.336",y2:"283.375",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint33_linear_21_2",x1:"269.774",x2:"279.172",y1:"15.316",y2:"284.348",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint34_linear_21_2",x1:"279.817",x2:"289.215",y1:"14.963",y2:"284.001",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#9292FF"}),ae().createElement("stop",{offset:"1",stopColor:"#9292FF",stopOpacity:"0.05"})),ae().createElement("linearGradient",{id:"paint35_linear_21_2",x1:"325.897",x2:"344.81",y1:"164.814",y2:"103.778",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#019FB4"}),ae().createElement("stop",{offset:"1",stopColor:"#68FF61"})),ae().createElement("linearGradient",{id:"paint36_linear_21_2",x1:"8.897",x2:"39.054",y1:"173.763",y2:"136.125",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#FFA970"}),ae().createElement("stop",{offset:"0.11",stopColor:"#FFAF79"}),ae().createElement("stop",{offset:"0.42",stopColor:"#FFBB8F"}),ae().createElement("stop",{offset:"0.72",stopColor:"#FFC39B"}),ae().createElement("stop",{offset:"1",stopColor:"#FFC6A0"})),ae().createElement("linearGradient",{id:"paint37_linear_21_2",x1:"77.114",x2:"78.852",y1:"37.379",y2:"95.798",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#FF7B8E"}),ae().createElement("stop",{offset:"0.23",stopColor:"#FA768A"}),ae().createElement("stop",{offset:"0.47",stopColor:"#EE6A80"}),ae().createElement("stop",{offset:"0.71",stopColor:"#D95470"}),ae().createElement("stop",{offset:"0.96",stopColor:"#BC3759"}),ae().createElement("stop",{offset:"1",stopColor:"#B73255"})),ae().createElement("linearGradient",{id:"paint38_linear_21_2",x1:"257.38",x2:"322.679",y1:"54.177",y2:"72.279",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#AA6AFF"}),ae().createElement("stop",{offset:"0.26",stopColor:"#8B56EE"}),ae().createElement("stop",{offset:"0.64",stopColor:"#643CD9"}),ae().createElement("stop",{offset:"0.84",stopColor:"#5533D1"})),ae().createElement("linearGradient",{id:"paint39_linear_21_2",x1:"165.405",x2:"198.41",y1:"6.509",y2:"43.342",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#34C6FF"}),ae().createElement("stop",{offset:"0.19",stopColor:"#35C1FE"}),ae().createElement("stop",{offset:"0.39",stopColor:"#3BB5FE"}),ae().createElement("stop",{offset:"0.59",stopColor:"#449FFE"}),ae().createElement("stop",{offset:"0.8",stopColor:"#5082FD"}),ae().createElement("stop",{offset:"1",stopColor:"#605EFD"})),ae().createElement("linearGradient",{id:"paint40_linear_21_2",x1:"177.877",x2:"177.877",y1:"124.501",y2:"263.274",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{offset:"0.01",stopColor:"#fff"}),ae().createElement("stop",{offset:"0.26",stopColor:"#fff",stopOpacity:"0.99"}),ae().createElement("stop",{offset:"0.43",stopColor:"#fff",stopOpacity:"0.95"}),ae().createElement("stop",{offset:"0.58",stopColor:"#fff",stopOpacity:"0.89"}),ae().createElement("stop",{offset:"0.71",stopColor:"#fff",stopOpacity:"0.81"}),ae().createElement("stop",{offset:"0.84",stopColor:"#fff",stopOpacity:"0.7"}),ae().createElement("stop",{offset:"0.95",stopColor:"#fff",stopOpacity:"0.56"}),ae().createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:"0.5"})),ae().createElement("clipPath",{id:"clip0_21_2"},ae().createElement("path",{fill:"#fff",d:"M0 0H355.975V246H0z"})),ae().createElement("clipPath",{id:"clip1_21_2"},ae().createElement("path",{fill:"#fff",d:"M0 0H22.531V24H0z",transform:"translate(266.992 48)"})),ae().createElement("clipPath",{id:"clip2_21_2"},ae().createElement("path",{fill:"#fff",d:"M0 0H59.895V68.848H0z",transform:"translate(147.694 146.071)"})),ae().createElement("clipPath",{id:"clip3_21_2"},ae().createElement("path",{fill:"#fff",d:"M0 0H28.132V28.132H0z",transform:"translate(167.516 10.555)"})),ae().createElement("clipPath",{id:"clip4_21_2"},ae().createElement("path",{fill:"#fff",d:"M0 0H22.722V22.722H0z",transform:"translate(66.236 49.902)"}))))},ix=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 39 39"},ae().createElement("path",{fillRule:"evenodd",d:"M39 19.5C39 30.27 30.27 39 19.5 39S0 30.27 0 19.5 8.73 0 19.5 0 39 8.73 39 19.5zm-21.695 3.8l6.582-3.8-6.582-3.8v7.6z",clipRule:"evenodd"}))},ax=function(e){var t=pe((0,oe.useState)("signin"),2),n=t[0],r=t[1],o=pe((0,oe.useState)(!1),2),i=o[0],a=o[1];return(0,oe.useEffect)(function(){i&&ba({showConfirmButton:!1,showDenyButton:!1,icon:!1,type:"warning",title:!1,showCloseButton:!0,customClass:{container:"templately-video-container",popup:"templately-video-popup",closeButton:"templately-video-close-button",htmlContainer:"templately-video-html"},html:ae().createElement("iframe",{width:"850",height:"480",src:"https://www.youtube.com/embed/ljYUsuxeOEg?si=EhLdxQyOB8lpk6I1",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0})},!1).then(function(e){(null!=e&&e.isConfirmed||null!=e&&e.isDismissed)&&a(!1)})},[i]),ae().createElement("div",{className:"templately-container-row"},ae().createElement("div",{className:"templately-contents templately-frontpage"},ae().createElement("div",{className:"tf-content-box"},ae().createElement("div",{className:"tf-promo-title"},ae().createElement(ox,null),ae().createElement("h1",null,(0,Pt.__)("Ultimate Templates ","templately"),ae().createElement("b",null,(0,Pt.__)("Cloud for WordPress","templately"))),ae().createElement("p",null,(0,Pt.__)("Take Your Favourite Page Builders To A Whole New Level & Manage All Your Designs In One Place With Templately","templately")),ae().createElement("button",{onClick:function(){return a(!i)}},ae().createElement(ix,null),ae().createElement("span",null,"Play Video"))),ae().createElement("div",{className:"tf-user-form"},ae().createElement("div",{className:"tf-user-form-tab"},ae().createElement("ul",{className:"tf-uft-menu"},ae().createElement("li",{onClick:function(){return r("signin")},className:"signin"===n?"active":""},(0,Pt.__)("Sign In","templately")),ae().createElement("li",{onClick:function(){return r("signup")},className:"signup"===n?"active":""},(0,Pt.__)("Free Sign Up","templately"))),ae().createElement("div",{className:"tf-uft-content"},"signin"===n?ae().createElement(ZS,{setTab:r}):ae().createElement(rx,{setTab:r})))))))},sx=fn(function(e){return{isLoggedIn:null!=e.profile.data,profileData:e.profile.data}})(function(e){var t,n,r;return null!=e&&e.isLoggedIn?null!=e&&e.isLoggedIn&&"free"!==(null==e||null===(t=e.profileData)||void 0===t?void 0:t.plan)?null:void 0===(null==e||null===(n=e.profileData)||void 0===n?void 0:n.show_notice)||null!=e&&null!==(r=e.profileData)&&void 0!==r&&r.show_notice?ae().createElement("div",{className:"templately-server-notice"},ae().createElement("p",null,"Hi there, you can now use ",ae().createElement("strong",null,"Templately")," in unlimited local sites & 2 live sites for Free! Manage your preferences"," ",ae().createElement("strong",null,ae().createElement("a",{target:"_blank",href:"https://templately.com/manage-sites"},"here"))," ","or"," ",ae().createElement("a",{target:"_blank",href:"https://docs.templately.com/home/how-to-manage-sites-in-templately/"},ae().createElement("strong",null,"learn more")),".")):null:null}),lx=function(e){var t,n,r=0===(null===(t=e.items)||void 0===t?void 0:t.length)||"empty"===e.items,o=Vn()("templately-items",{"templately-has-no-items":r});return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:o},e.items&&Array.isArray(e.items)&&(null===(n=e.items)||void 0===n?void 0:n.length)>0?e.items.map(function(t){return ae().createElement(YE,{key:t.id,isLoggedIn:e.isLoggedIn,platform:e.platform,content:t})}):ae().createElement(xO,null)),e.totalPage>1&&ae().createElement(bO,re({type:e.type,total:e.totalPage},e.pagination)))},cx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"173",height:"21",fill:"none",viewBox:"0 0 173 21"},oe.createElement("g",{clipPath:"url(#paint0_angular_15309_5198_clip_path)","data-figma-skip-parse":"true"},oe.createElement("foreignObject",{width:"1274.23",height:"1274.23",x:"-637.117",y:"-637.117",transform:"matrix(.01356 -.02498 .04769 .0259 10.016 10.016)"},oe.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",opacity:"1",style:{background:"conic-gradient(from 90deg,#62c2fc 0deg,#f2d7bc 57.4692deg,#f4e0c4 153.531deg,#5935d0 218.669deg,#5cc1ff 357.335deg,#62c2fc 360deg)",height:"100%",width:"100%"}}))),oe.createElement("path",{d:"M0 10.016c0-.503.409-.906.91-.956A9.11 9.11 0 0 0 9.06.91c.05-.501.453-.91.956-.91s.906.409.955.91a9.11 9.11 0 0 0 8.151 8.15c.5.05.91.453.91.956s-.41.906-.91.955a9.11 9.11 0 0 0-8.15 8.151c-.05.5-.453.91-.956.91s-.906-.41-.956-.91a9.11 9.11 0 0 0-8.15-8.15c-.501-.05-.91-.453-.91-.956","data-figma-gradient-fill":'{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":0.95190250873565674,"g":0.84607875347137451,"b":0.74025493860244751,"a":1.0},"position":0.15963670611381531},{"color":{"r":0.95686274766921997,"g":0.87843137979507446,"b":0.76862746477127075,"a":1.0},"position":0.42647594213485718},{"color":{"r":0.34901961684226990,"g":0.20784313976764679,"b":0.81568628549575806,"a":1.0},"position":0.60741454362869263},{"color":{"r":0.36078432202339172,"g":0.75686275959014893,"b":1.0,"a":1.0},"position":0.99259722232818604}],"stopsVar":[{"color":{"r":0.95190250873565674,"g":0.84607875347137451,"b":0.74025493860244751,"a":1.0},"position":0.15963670611381531},{"color":{"r":0.95686274766921997,"g":0.87843137979507446,"b":0.76862746477127075,"a":1.0},"position":0.42647594213485718},{"color":{"r":0.34901961684226990,"g":0.20784313976764679,"b":0.81568628549575806,"a":1.0},"position":0.60741454362869263},{"color":{"r":0.36078432202339172,"g":0.75686275959014893,"b":1.0,"a":1.0},"position":0.99259722232818604}],"transform":{"m00":27.126356124877930,"m01":95.376968383789062,"m02":-51.235877990722656,"m10":-49.955394744873047,"m11":51.790794372558594,"m12":9.0981588363647461},"opacity":1.0,"blendMode":"NORMAL","visible":true}'}),oe.createElement("path",{fill:"url(#paint1_linear_15309_5198)",d:"M24.668 5.646V3.88h9.284v1.767h-3.597v9.87h-2.09v-9.87zm13.58 10.04q-1.311 0-2.267-.545a3.7 3.7 0 0 1-1.46-1.557q-.51-1.012-.511-2.38 0-1.348.511-2.365a3.87 3.87 0 0 1 1.444-1.59q.925-.574 2.176-.574.807 0 1.522.261.722.255 1.273.796.557.54.875 1.375.318.83.318 1.977v.63h-7.153v-1.386h5.182a2.2 2.2 0 0 0-.256-1.051q-.25-.466-.699-.733a1.96 1.96 0 0 0-1.034-.267q-.63 0-1.108.307-.477.3-.744.795a2.3 2.3 0 0 0-.267 1.074v1.21q0 .762.278 1.307.279.54.778.83.5.284 1.171.284.45 0 .813-.125.363-.13.63-.38.267-.252.404-.62l1.92.216q-.181.76-.693 1.33a3.4 3.4 0 0 1-1.296.874q-.789.307-1.806.307m5.621-.17V6.788h1.966v1.483h.102q.273-.75.904-1.17.63-.426 1.506-.426.886 0 1.494.432.613.426.864 1.164h.09q.291-.727.978-1.159.694-.437 1.642-.437 1.204 0 1.966.761.76.761.761 2.222v5.858H54.08v-5.54q0-.813-.432-1.188a1.54 1.54 0 0 0-1.057-.38q-.744 0-1.165.466-.415.46-.415 1.198v5.444h-2.017V9.89q0-.676-.409-1.08-.403-.403-1.057-.403-.443 0-.806.227a1.6 1.6 0 0 0-.58.63 2 2 0 0 0-.216.944v5.307zm14.36 3.272v-12h2.022v1.444h.12q.159-.319.449-.677.29-.363.784-.619.495-.261 1.261-.261 1.011 0 1.824.517.818.51 1.295 1.517.483 1 .483 2.454 0 1.438-.471 2.444-.472 1.005-1.284 1.534a3.3 3.3 0 0 1-1.841.528q-.75 0-1.245-.25a2.5 2.5 0 0 1-.795-.602 4 4 0 0 1-.46-.676h-.086v4.647zm2.017-7.636q0 .846.238 1.483.244.636.7.994.459.353 1.113.353.681 0 1.142-.364.46-.37.693-1.006.24-.642.239-1.46a4.2 4.2 0 0 0-.233-1.443q-.234-.63-.693-.989-.46-.357-1.148-.358-.66 0-1.12.347-.46.346-.698.971-.233.626-.233 1.472m10.04-7.273v11.637h-2.057V3.879zm4.626 11.813a3.6 3.6 0 0 1-1.494-.296q-.66-.3-1.046-.886-.38-.585-.38-1.443 0-.74.272-1.222.273-.483.745-.773a3.8 3.8 0 0 1 1.062-.437 9 9 0 0 1 1.233-.222q.767-.08 1.244-.142.478-.067.694-.204.22-.142.221-.438v-.034q0-.643-.38-.994-.381-.352-1.097-.352-.756 0-1.2.33-.436.328-.59.778l-1.92-.273q.226-.795.75-1.33.522-.54 1.278-.807a4.9 4.9 0 0 1 1.67-.272q.631 0 1.256.147.625.148 1.142.49.517.334.83.914.318.58.318 1.449v5.84h-1.977v-1.198h-.069a2.5 2.5 0 0 1-.528.682 2.5 2.5 0 0 1-.847.505q-.506.188-1.187.188m.534-1.512q.619 0 1.074-.244.454-.25.699-.659.25-.41.25-.892v-1.028a1 1 0 0 1-.33.147 5 5 0 0 1-.511.12q-.284.051-.563.09l-.483.069q-.46.062-.823.204a1.37 1.37 0 0 0-.574.398q-.21.25-.21.648 0 .568.414.858.415.29 1.057.29m10.5-7.392V8.38h-5.017V6.79zm-3.778-2.09h2.056v8.193q0 .414.125.636.131.216.341.295.21.08.466.08.193 0 .352-.028.166-.029.25-.052l.347 1.608a5 5 0 0 1-.472.125 4 4 0 0 1-.738.08 3.35 3.35 0 0 1-1.392-.233 2.17 2.17 0 0 1-.983-.807q-.358-.546-.352-1.364zm9.268 10.988q-1.312 0-2.267-.545a3.7 3.7 0 0 1-1.46-1.557q-.512-1.012-.512-2.38 0-1.348.512-2.365a3.87 3.87 0 0 1 1.443-1.59q.926-.574 2.176-.574.807 0 1.523.261.72.255 1.273.796.556.54.875 1.375.318.83.318 1.977v.63h-7.154v-1.386h5.182a2.2 2.2 0 0 0-.255-1.051q-.25-.466-.7-.733a1.96 1.96 0 0 0-1.034-.267q-.63 0-1.107.307-.478.3-.745.795a2.3 2.3 0 0 0-.267 1.074v1.21q0 .762.279 1.307.278.54.778.83.5.284 1.17.284.45 0 .813-.125.364-.13.63-.38.268-.252.404-.62l1.92.216q-.18.76-.693 1.33a3.4 3.4 0 0 1-1.295.874q-.79.307-1.807.307M99.114 3.88v11.637h-2.057V3.879zm3.393 14.91q-.42 0-.778-.069a3 3 0 0 1-.563-.148l.477-1.602q.45.13.802.125a1 1 0 0 0 .619-.221q.273-.21.46-.705l.176-.472-3.164-8.909h2.181l2.012 6.591h.091l2.017-6.59h2.187l-3.494 9.783a3.9 3.9 0 0 1-.648 1.188 2.6 2.6 0 0 1-.989.761q-.579.267-1.386.267m8.432-3.273h-2.25l4.097-11.637h2.602l4.102 11.637h-2.25l-3.108-9.25h-.091zm.074-4.563h6.136v1.693h-6.136zm12.118-7.074v11.637h-2.108V3.879z"}),oe.createElement("rect",{width:"43",height:"20",x:"129.031",y:"0.016",fill:"#EFE8FF",rx:"10"}),oe.createElement("path",{fill:"#70628D",d:"M137.99 14.016V5.288h3.196q.929 0 1.538.307.61.303.912.823.303.515.303 1.163 0 .545-.2.92a1.66 1.66 0 0 1-.537.597 2.4 2.4 0 0 1-.733.324v.085q.434.021.848.281.417.256.69.729t.273 1.15q0 .67-.316 1.202-.31.529-.963.84-.651.306-1.666.307zm1.317-1.13h1.9q.947 0 1.355-.366.41-.366.41-.916 0-.414-.209-.759a1.5 1.5 0 0 0-.597-.55 1.9 1.9 0 0 0-.912-.204h-1.947zm0-3.822h1.764q.443 0 .797-.17.358-.17.567-.478.213-.311.213-.733 0-.54-.38-.907-.378-.367-1.163-.367h-1.798zm9.253 5.084q-.967 0-1.666-.414a2.8 2.8 0 0 1-1.074-1.171q-.375-.76-.375-1.777 0-1.006.375-1.773.38-.767 1.057-1.198.682-.43 1.594-.43.553 0 1.074.183.519.183.933.575.414.393.652 1.019.239.622.239 1.513v.451h-5.204v-.954h3.955q0-.503-.205-.89a1.55 1.55 0 0 0-.575-.619 1.6 1.6 0 0 0-.861-.226q-.537 0-.937.265-.396.26-.614.682a2 2 0 0 0-.213.907v.746q0 .656.23 1.116.235.46.652.704.418.238.976.238.363 0 .661-.102.298-.107.515-.315.218-.21.333-.516l1.206.217q-.145.533-.52.934-.37.396-.933.617a3.5 3.5 0 0 1-1.275.218m7.278-6.678v1.023h-3.576V7.47zm-2.617-1.568h1.274v6.192q0 .37.111.558a.58.58 0 0 0 .286.251q.178.064.387.064.154 0 .269-.021l.179-.034.23 1.052a2.504 2.504 0 0 1-.827.136 2.24 2.24 0 0 1-.937-.178 1.6 1.6 0 0 1-.703-.58q-.269-.392-.269-.984zm5.931 8.259q-.622 0-1.125-.23a1.9 1.9 0 0 1-.797-.678q-.29-.444-.29-1.087 0-.554.213-.912a1.57 1.57 0 0 1 .576-.566q.362-.21.809-.316.449-.106.912-.162l.955-.11q.366-.048.533-.15.166-.102.166-.332v-.03q0-.558-.316-.865-.31-.307-.929-.307-.643 0-1.014.286a1.53 1.53 0 0 0-.507.626l-1.197-.273a2.3 2.3 0 0 1 .622-.963q.413-.37.95-.537.537-.17 1.129-.17.393 0 .831.094.443.09.827.332.388.243.635.695.247.447.247 1.163v4.347h-1.244v-.895h-.051a1.8 1.8 0 0 1-.371.486q-.248.238-.635.396a2.5 2.5 0 0 1-.929.158m.277-1.023q.528 0 .903-.209.38-.21.576-.546.2-.34.2-.728v-.844a.7.7 0 0 1-.264.128q-.192.056-.439.098-.247.038-.482.072-.234.03-.392.052a3 3 0 0 0-.677.157 1.16 1.16 0 0 0-.486.32q-.179.204-.179.545 0 .473.349.716.35.24.891.239"}),oe.createElement("defs",null,oe.createElement("linearGradient",{id:"paint1_linear_15309_5198",x1:"24.031",x2:"125.031",y1:"0.516",y2:"0.516",gradientUnits:"userSpaceOnUse"},oe.createElement("stop",{stopColor:"#7F56D9"}),oe.createElement("stop",{offset:"1",stopColor:"#9E77ED"})),oe.createElement("clipPath",{id:"paint0_angular_15309_5198_clip_path"},oe.createElement("path",{d:"M0 10.016c0-.503.409-.906.91-.956A9.11 9.11 0 0 0 9.06.91c.05-.501.453-.91.956-.91s.906.409.955.91a9.11 9.11 0 0 0 8.151 8.15c.5.05.91.453.91.956s-.41.906-.91.955a9.11 9.11 0 0 0-8.15 8.151c-.05.5-.453.91-.956.91s-.906-.41-.956-.91a9.11 9.11 0 0 0-8.15-8.15c-.501-.05-.91-.453-.91-.956"}))))},ux=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"61",height:"66",fill:"none",viewBox:"0 0 61 66"},oe.createElement("path",{fill:"url(#paint0_linear_13916_7701)",d:"M-.004 35.057c0-1.257 1.022-2.264 2.273-2.388 10.757-1.067 19.312-9.621 20.378-20.378.124-1.251 1.131-2.273 2.389-2.273s2.264 1.022 2.388 2.273c1.066 10.757 9.621 19.311 20.378 20.378 1.25.124 2.273 1.131 2.273 2.388s-1.022 2.265-2.273 2.389c-10.757 1.066-19.312 9.62-20.378 20.378-.124 1.25-1.131 2.273-2.388 2.273-1.258 0-2.265-1.022-2.389-2.273-1.066-10.757-9.62-19.312-20.378-20.378-1.25-.124-2.273-1.132-2.273-2.389"}),oe.createElement("path",{fill:"#F6EDFF",d:"M45.066 7.512c0-.377.307-.68.682-.717A6.83 6.83 0 0 0 51.862.682c.037-.375.34-.682.716-.682.377 0 .68.307.717.682a6.83 6.83 0 0 0 6.113 6.113c.375.038.682.34.682.717s-.307.68-.682.716a6.83 6.83 0 0 0-6.113 6.114c-.037.375-.34.682-.717.682s-.68-.307-.716-.682a6.83 6.83 0 0 0-6.114-6.114c-.375-.037-.682-.339-.682-.716M40.066 60.098c0-.503.41-.906.91-.956a9.11 9.11 0 0 0 8.15-8.15c.05-.501.453-.91.956-.91s.906.409.956.91a9.11 9.11 0 0 0 8.15 8.15c.501.05.91.453.91.956s-.409.906-.91.955a9.11 9.11 0 0 0-8.15 8.151c-.05.5-.453.91-.956.91s-.906-.41-.955-.91a9.11 9.11 0 0 0-8.151-8.15c-.5-.05-.91-.453-.91-.956"}),oe.createElement("defs",null,oe.createElement("linearGradient",{id:"paint0_linear_13916_7701",x1:"25.036",x2:"25.036",y1:"10.018",y2:"60.097",gradientUnits:"userSpaceOnUse"},oe.createElement("stop",{stopColor:"#FAF4FF"}),oe.createElement("stop",{offset:"1",stopColor:"#F4E8FF"}))))},dx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"12",fill:"none",viewBox:"0 0 11 12"},oe.createElement("g",{fill:"#949DA8",clipPath:"url(#clip0_13907_5910)"},oe.createElement("path",{d:"M.806 11.333a.521.521 0 0 1-.368-.89L10.063.82a.52.52 0 1 1 .736.736L1.174 11.18a.52.52 0 0 1-.368.153"}),oe.createElement("path",{d:"M10.431 11.333a.52.52 0 0 1-.368-.153L.438 1.555A.52.52 0 1 1 1.174.82l9.625 9.625a.52.52 0 0 1-.368.889"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"clip0_13907_5910"},oe.createElement("path",{fill:"#fff",d:"M.285.666h10.667v10.667H.285z"}))))},px=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"19",fill:"none",viewBox:"0 0 18 19"},oe.createElement("mask",{id:"mask0_13916_779",width:"19",height:"19",x:"-1",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#D9D9D9",d:"M-.004.016h18v18h-18z"})),oe.createElement("g",{mask:"url(#mask0_13916_779)"},oe.createElement("path",{fill:"#949DA8",d:"M8.996 12.766q.319 0 .534-.216a.73.73 0 0 0 .216-.534.73.73 0 0 0-.216-.535.73.73 0 0 0-.534-.215.73.73 0 0 0-.534.215.73.73 0 0 0-.216.535q0 .318.216.534a.73.73 0 0 0 .534.216m0-3q.319 0 .534-.216a.73.73 0 0 0 .216-.534v-3a.73.73 0 0 0-.216-.535.73.73 0 0 0-.534-.215.73.73 0 0 0-.534.215.73.73 0 0 0-.216.535v3q0 .318.216.534a.73.73 0 0 0 .534.216m0 6.75a7.3 7.3 0 0 1-2.925-.591 7.6 7.6 0 0 1-2.381-1.603 7.6 7.6 0 0 1-1.603-2.381 7.3 7.3 0 0 1-.59-2.925q0-1.557.59-2.925A7.6 7.6 0 0 1 3.69 3.709 7.6 7.6 0 0 1 6.07 2.106a7.3 7.3 0 0 1 2.925-.59q1.557 0 2.925.59a7.6 7.6 0 0 1 2.381 1.603 7.6 7.6 0 0 1 1.604 2.382q.59 1.368.59 2.925a7.3 7.3 0 0 1-.59 2.925 7.6 7.6 0 0 1-1.604 2.38 7.6 7.6 0 0 1-2.38 1.604 7.3 7.3 0 0 1-2.926.59m0-1.5q2.513 0 4.256-1.744t1.744-4.256-1.744-4.257Q11.51 3.016 8.996 3.016q-2.513 0-4.256 1.743-1.744 1.745-1.744 4.257t1.744 4.256q1.743 1.743 4.256 1.744"})))},hx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"92",height:"72",fill:"none",viewBox:"0 0 92 72"},oe.createElement("path",{stroke:"#C3CBD5",strokeLinecap:"round",d:"M1.433 61.41c8.094 8.58 12.48 13.001 21.885 5.545 4.71-3.736 5.573-7.252 3.193-12.157-1.582-3.261-6.133-.148-4.51 3.198 2.12 4.366 5.928 7.779 10.849 8.824C44.342 69.26 54.61 55.17 57.71 46.226c1.232-3.553-1.376-10.59-4.721-5.566-2.362 3.548 2.399 8.26 5.49 9.234 14.007 4.412 20.822-11.01 24.397-21.322 1.2-3.464 3.204-11.054 2.59-14.558-.498-2.84 8.892 2.774 3.768.248-2.965-1.462-8.287-3.1-11.607-1.945-1.602.557 5.901-5.42 6.899-6.602C86.2 3.73 89.888-1.228 89.76 2.39c-.106 2.994.03 7.93 1.275 10.494"}))},fx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 28 28"},oe.createElement("mask",{id:"mask0_2_32",width:"28",height:"28",x:"0",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#D9D9D9",d:"M27.328.698v26.667H.661V.698z"})),oe.createElement("g",{mask:"url(#mask0_2_32)"},oe.createElement("path",{fill:"#fff",d:"M17.55 12.922 14.33 9.699a1.05 1.05 0 0 1-.306-.777q0-.472.306-.778.305-.306.777-.306t.778.306l5.111 5.111q.334.333.334.778 0 .444-.334.778l-5.11 5.11a1.05 1.05 0 0 1-.779.306q-.472 0-.777-.305a1.05 1.05 0 0 1-.306-.778q0-.472.306-.778l3.222-3.222H8.44q-.473 0-.792-.32a1.08 1.08 0 0 1-.32-.791q0-.473.32-.792t.792-.32z"})))},mx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 28 28"},oe.createElement("mask",{id:"mask0_4_47",width:"28",height:"28",x:"0",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#D9D9D9",d:"M.664.668h26.667v26.667H.664z"})),oe.createElement("g",{mask:"url(#mask0_4_47)"},oe.createElement("path",{fill:"#fff",d:"m12.888 10.446-3.222 3.222a1.05 1.05 0 0 1-.778.306q-.472 0-.778-.306a1.05 1.05 0 0 1-.305-.778q0-.472.305-.778l5.111-5.11q.334-.334.778-.334t.778.333l5.111 5.111q.306.306.306.778t-.306.778a1.05 1.05 0 0 1-.778.306q-.473 0-.777-.306l-3.223-3.222v9.11q0 .474-.32.793-.319.318-.79.319-.474 0-.793-.32a1.08 1.08 0 0 1-.319-.791z"})))},gx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",fill:"none",viewBox:"0 0 17 17"},oe.createElement("mask",{id:"mask0_4_54",width:"17",height:"17",x:"0",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#D9D9D9",d:"M.776.357h16v16h-16z"})),oe.createElement("g",{mask:"url(#mask0_4_54)"},oe.createElement("path",{fill:"#737A85",d:"M3.56 14.358a.61.61 0 0 1-.609-.175.61.61 0 0 1-.175-.609l.667-3.183 3.3 3.3zm3.183-.667-3.3-3.3 7.633-7.633a1.3 1.3 0 0 1 .95-.384q.567 0 .95.384l1.4 1.4q.384.383.383.95 0 .566-.383.95zm5.283-10-6.9 6.9 1.417 1.417 6.9-6.9z"})))},vx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 20 21"},oe.createElement("g",{stroke:"#949DA8",strokeWidth:"1.5",clipPath:"url(#clip0_14513_3614)"},oe.createElement("path",{strokeLinecap:"round",d:"M18.334 9.825v.207c0 3.928 0 5.893-1.22 7.113-1.221 1.22-3.185 1.22-7.114 1.22s-5.892 0-7.113-1.22c-1.22-1.22-1.22-3.184-1.22-7.113 0-3.928 0-5.892 1.22-7.113C4.107 1.7 4.822 1.697 8.75 1.697H10"}),oe.createElement("path",{d:"m13.877 2.91.54-.54a2.294 2.294 0 0 1 3.245 3.243l-.54.54M13.876 2.91s.068 1.149 1.081 2.163c1.014 1.013 2.163 1.08 2.163 1.08M13.877 2.91l-4.97 4.97c-.337.337-.506.506-.65.691q-.258.33-.437.707c-.101.212-.177.438-.327.89l-.482 1.446m10.11-5.46-4.97 4.97c-.337.337-.506.506-.691.65q-.33.258-.707.437c-.212.101-.438.177-.89.327l-1.446.482m0 0-.936.312a.619.619 0 0 1-.782-.782l.312-.936m1.406 1.406-1.406-1.406"})),oe.createElement("defs",null,oe.createElement("clipPath",{id:"clip0_14513_3614"},oe.createElement("path",{fill:"#fff",d:"M0 .031h20v20H0z"}))))},yx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"33",fill:"none",viewBox:"0 0 32 33"},oe.createElement("g",{clipPath:"url(#paint0_angular_13916_1349_clip_path)","data-figma-skip-parse":"true"},oe.createElement("foreignObject",{width:"974.416",height:"974.416",x:"-487.208",y:"-487.208",transform:"matrix(.02167 -.0399 .09682 .05258 16 16.031)"},oe.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",opacity:"1",style:{background:"conic-gradient(from 90deg,#62c2fc 0deg,#f2d7bc 57.4692deg,#f4e0c4 153.531deg,#5935d0 218.669deg,#5cc1ff 357.335deg,#62c2fc 360deg)",height:"100%",width:"100%"}}))),oe.createElement("rect",{width:"32",height:"32",y:"0.031","data-figma-gradient-fill":'{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":0.95190250873565674,"g":0.84607875347137451,"b":0.74025493860244751,"a":1.0},"position":0.15963670611381531},{"color":{"r":0.95686274766921997,"g":0.87843137979507446,"b":0.76862746477127075,"a":1.0},"position":0.42647594213485718},{"color":{"r":0.34901961684226990,"g":0.20784313976764679,"b":0.81568628549575806,"a":1.0},"position":0.60741454362869263},{"color":{"r":0.36078432202339172,"g":0.75686275959014893,"b":1.0,"a":1.0},"position":0.99259722232818604}],"stopsVar":[{"color":{"r":0.95190250873565674,"g":0.84607875347137451,"b":0.74025493860244751,"a":1.0},"position":0.15963670611381531},{"color":{"r":0.95686274766921997,"g":0.87843137979507446,"b":0.76862746477127075,"a":1.0},"position":0.42647594213485718},{"color":{"r":0.34901961684226990,"g":0.20784313976764679,"b":0.81568628549575806,"a":1.0},"position":0.60741454362869263},{"color":{"r":0.36078432202339172,"g":0.75686275959014893,"b":1.0,"a":1.0},"position":0.99259722232818604}],"transform":{"m00":43.333770751953125,"m01":193.64140319824219,"m02":-102.48758697509766,"m10":-79.802070617675781,"m11":105.15031433105469,"m12":3.3571283817291260},"opacity":1.0,"blendMode":"NORMAL","visible":true}',rx:"16"}),oe.createElement("path",{fill:"#fff",d:"M9.355 26.272a2.276 2.276 0 1 0 0-4.551 2.276 2.276 0 0 0 0 4.55M16.016 26.272a2.276 2.276 0 1 0 0-4.551 2.276 2.276 0 0 0 0 4.55M22.636 26.27a2.276 2.276 0 1 0 0-4.551 2.276 2.276 0 0 0 0 4.55M20.03 9.597h-.373a4.88 4.88 0 0 0-4.758-3.806c-.62 0-1.2.124-1.738.331v1.614h2.358v2.317h-2.358v3.93h2.441c-.083.165-.165.414-.207.538-.455 1.076-1.53 1.655-2.69 1.448-1.075-.207-1.86-1.117-1.944-2.276v-3.682h-.827c-1.655.786-2.855 2.483-2.855 4.427a4.89 4.89 0 0 0 4.882 4.882h8.11c2.689-.041 4.84-2.193 4.84-4.882 0-2.648-2.193-4.84-4.882-4.84"}),oe.createElement("defs",null,oe.createElement("clipPath",{id:"paint0_angular_13916_1349_clip_path"},oe.createElement("rect",{width:"32",height:"32",y:"0.031",rx:"16"}))))};var bx=["Agency","Restaurant","Entrepreneur","Event","Non-profit","Fitness","Beauty","Travel","Real Estate","Education","Technology","Healthcare","Finance","Legal","Consulting","E-commerce","Photography","Music","Art","Fashion","Food","Sports","Gaming","Automotive","Construction","Manufacturing","Retail","Hospitality","Transportation","Insurance","Marketing","Media","Entertainment","Wellness","Personal Care","Home Services","Professional Services","Dentists","Law Firms","Wedding Photographers"],wx=function(e){try{if(!e||"string"!=typeof e)return{isValid:!1,errorMessage:(0,Pt.__)("Email is required","templately")};var t=e.trim();if(!t)return{isValid:!1,errorMessage:(0,Pt.__)("Email is required","templately")};if(!/^(?!\.)("[^"\r\\]*(\\.[^"\r\\]*)*"|[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*)@(?!-)[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/.test(t))return{isValid:!1,errorMessage:(0,Pt.__)("Enter a valid email","templately")};if(t.length>254)return{isValid:!1,errorMessage:(0,Pt.__)("Email address is too long","templately")};var n=t.split("@");if(2!==n.length)return{isValid:!1,errorMessage:(0,Pt.__)("Enter a valid email","templately")};var r=pe(n,2),o=r[0],i=r[1];return o.length>64?{isValid:!1,errorMessage:(0,Pt.__)("Email address is too long","templately")}:i.length<1||i.length>253||t.includes("..")?{isValid:!1,errorMessage:(0,Pt.__)("Enter a valid email","templately")}:{isValid:!0,errorMessage:""}}catch(e){return console.error("Error in validateEmail:",e),{isValid:!1,errorMessage:(0,Pt.__)("Enter a valid email","templately")}}},kx=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;try{if(!e||"string"!=typeof e)return{isValid:!0,errorMessage:""};var n=e.trim();if(!n)return{isValid:!0,errorMessage:""};var r=n.split(/\s+/).filter(function(e){return e.length>0}).length;return r>t?{isValid:!1,errorMessage:(0,Pt.__)("Maximum ".concat(t," words allowed. You have ").concat(r," words."),"templately")}:{isValid:!0,errorMessage:""}}catch(e){return console.error("Error in validateWordCount:",e),{isValid:!1,errorMessage:(0,Pt.__)("Maximum ".concat(t," words allowed"),"templately")}}},Ex=function(e){try{if(!e||"string"!=typeof e)return{isValid:!1,errorMessage:(0,Pt.__)("Phone number is required","templately")};var t=e.trim();if(!t)return{isValid:!1,errorMessage:(0,Pt.__)("Phone number is required","templately")};var n=t.replace(/[^\d+]/g,"");if(!/^[\d\s\-\(\)\.\+]+$/.test(t))return{isValid:!1,errorMessage:(0,Pt.__)("Contains invalid characters","templately")};var r=n.replace(/\+/g,"");if(r.length<4)return{isValid:!1,errorMessage:(0,Pt.__)("Phone number is too short","templately")};if(r.length>15)return{isValid:!1,errorMessage:(0,Pt.__)("Phone number is too long","templately")};var o=(t.match(/\+/g)||[]).length;if(o>1)return{isValid:!1,errorMessage:(0,Pt.__)("Only one + allowed","templately")};if(1===o&&!t.startsWith("+"))return{isValid:!1,errorMessage:(0,Pt.__)("+ must be at the beginning","templately")};if(t.startsWith("+")){if(r.length<5)return{isValid:!1,errorMessage:(0,Pt.__)("Phone number is too short","templately")};var i=r.match(/^(\d{1,3})/);if(i){var a=parseInt(i[1]);if(a<1||a>999)return{isValid:!1,errorMessage:(0,Pt.__)("Invalid country code","templately")}}}if(/[\s\-\(\)\.]{4,}/.test(t))return{isValid:!1,errorMessage:(0,Pt.__)("Invalid phone number format","templately")};if((t.match(/\(/g)||[]).length!==(t.match(/\)/g)||[]).length)return{isValid:!1,errorMessage:(0,Pt.__)("Unmatched parentheses","templately")};var s=[/^\+\d{4,15}$/,/^\+\d{1,3}\s\d{1,4}(\s\d{1,4})*$/,/^\+\d{1,3}-\d{1,4}(-\d{1,4})*$/,/^\+\d{1,3}\s?\(\d{1,4}\)\s?\d{1,4}(-\d{1,4})*$/,/^\d{4,15}$/,/^\(\d{1,4}\)\s?\d{1,4}(-\d{1,4})*$/,/^\d{1,4}(\.\d{1,4})+$/,/^\d{1,4}(\s\d{1,4})+$/,/^\d{1,4}(-\d{1,4})+$/].some(function(e){return e.test(n.replace(/\s/g," "))});return s?/^(\+?0+|(\+?\d)\1{6,})$/.test(n)?{isValid:!1,errorMessage:(0,Pt.__)("Invalid phone number pattern","templately")}:{isValid:!0,errorMessage:""}:{isValid:!1,errorMessage:(0,Pt.__)("Invalid phone number format","templately")}}catch(e){return console.error("Error in validatePhoneNumber:",e),{isValid:!1,errorMessage:(0,Pt.__)("Enter a valid number","templately")}}},Ox=null,Sx=null,xx=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Sx===e&&Ox?Ox:(Sx=e,Ox=[{key:"start",question:"<p>".concat((0,Pt.__)("Hi","templately")," ").concat(e||(0,Pt.__)("there","templately"),"! 👋 ").concat((0,Pt.__)("Ready to build your website?","templately"),"</p>"),answer:(0,Pt.__)("Yes, let’s start!","templately"),result:null,skip:!1,done:!1,editable:!1,tooltip:null},{key:"name",question:"<p>".concat((0,Pt.__)("Great! What’s your business name?","templately"),"</p>"),answer:null,result:null,skip:!1,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share the name of your business only.","templately"),"<br/>").concat((0,Pt.__)("Note","templately"),": ").concat((0,Pt.__)("If your business name is ‘BizRise’, share the name only.","templately")," ").concat((0,Pt.__)("For example","templately"),": ‘BizRise’")},{key:"category",question:"<p>".concat((0,Pt.__)("Love that!","templately")," 💡 ").concat((0,Pt.__)("What type of business or industry are you in?","templately"),"</p>"),answer:null,result:null,skip:!1,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share your business type. You can either select from the available categories in the dropdown or write down any specific type.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("Agency/Restaurant/Technology","templately"))},{key:"description",question:"<p>".concat((0,Pt.__)("Sounds great! Tell me more about your business — what you do, who you serve, and what makes you special. Please write at least 50 words.","templately"),"</p>"),answer:null,result:null,skip:!1,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share your business details with us.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("It’s an agency website that offers education consultancy to students who want to study abroad.","templately"))},{key:"email",question:"<p>".concat((0,Pt.__)("Thank you! What’s the email address you’d like to show on your website?","templately"),"</p>"),answer:null,result:null,skip:!1,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share the email address that you want to show on your website.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("xyz@gmail.com","templately"))},{key:"contactNumber",question:"<p>".concat((0,Pt.__)("Do you also want to add a contact number? If yes, please share it.","templately"),"</p>"),answer:null,result:null,skip:!0,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share the contact number you want to add.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("+02860630","templately"))},{key:"businessAddress",question:"<p>".concat((0,Pt.__)("Nice! What’s your business address?","templately"),"</p>"),answer:null,result:null,skip:!0,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share your business address you want to show.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("123 Business Lane, Suite 456 Downtown District, New York, NY 10001 United States","templately"))},{key:"openingHour",question:"<p>".concat((0,Pt.__)("Awesome","templately")," 👌 ").concat((0,Pt.__)("Do you have any opening hours you want to display?","templately"),"</p>"),answer:null,result:null,skip:!0,done:!1,editable:!0,tooltip:"".concat((0,Pt.__)("Share your opening hours.","templately"),"<br/>").concat((0,Pt.__)("For example","templately"),": ").concat((0,Pt.__)("We stay open from 08:00 AM to 06:00 PM (GMT+6)","templately"))},{key:"finalize",question:"<p>".concat((0,Pt.__)("Thank you! That’s all we need for now. Should we go ahead and generate your website content?","templately")," 🚀</p>"),answer:(0,Pt.__)("Yes, Generate and Proceed.","templately"),result:null,skip:!1,done:!1,editable:!1,tooltip:null}])},Cx=function(){try{var e;return null===(e=window.templately)||void 0===e?void 0:e.ai_animate_ignore_mode}catch(e){return!1}};"undefined"!=typeof window&&(window.shouldBypassAnimations=Cx);var Px=ae().memo(function(e){var t=e.currentStep,n=e.isCatchFetching,r=e.conversation,o=e.onTypingComplete,i=e.intervalRefs,a=pe((0,oe.useState)(""),2),s=a[0],l=a[1];(0,oe.useEffect)(function(){null!=t&&t.isTyping&&(null==t?void 0:t.key)===(null==r?void 0:r.key)||l("")},[null==t?void 0:t.isTyping,null==t?void 0:t.key,null==r?void 0:r.key]);var c=(0,oe.useCallback)(function(e){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;try{if(!e||"string"!=typeof e)return console.warn("startTypingEffect: Invalid content provided:",e),null==n||n(""),void(null==r||r());if(!n||"function"!=typeof n)return void console.warn("startTypingEffect: Invalid setTypingContent function provided");var i=function(e){try{if(!e)return"";var t=document.createElement("div");t.innerHTML=e,t.textContent||t.innerText;var n=e.replace(/<br\s*\/?>/gi,"\n");return t.innerHTML=n,(t.textContent||t.innerText||"").trim()}catch(t){return console.error("Error in stripHtmlTags:",t),e}}(e);if(!i.trim())return console.warn("startTypingEffect: No content after HTML stripping"),null==n||n(""),void(null==r||r());if(Cx())return n(i),void("function"==typeof r&&r());var a=Math.max(10,Math.min(1e3,Number(t)||30)),s=Array.from(i);n("");var l=0,c=setInterval(function(){try{l<s.length?(n(function(e){return e+s[l]}),l+=1):(clearInterval(c),null!=o&&o.current&&Array.isArray(o.current)&&(o.current=o.current.filter(function(e){return e!==c})),"function"==typeof r&&r())}catch(e){console.error("Error in typing interval:",e),clearInterval(c),null!=o&&o.current&&Array.isArray(o.current)&&(o.current=o.current.filter(function(e){return e!==c})),"function"==typeof r&&r()}},a);null!=o&&o.current&&Array.isArray(o.current)&&o.current.push(c)}catch(e){console.error("Error in startTypingEffect:",e),null==n||n(""),"function"==typeof r&&r()}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,l,o,i)},[i,o]),u=(0,oe.useMemo)(function(){try{return s?s.split("\n"):[]}catch(e){return console.error("Error splitting typing content:",e),[]}},[s]);if((0,oe.useEffect)(function(){null!=t&&t.isTyping&&null!=t&&t.key&&null!=r&&r.question&&(Cx()?(l(r.question),o&&o()):c(r.question))},[null==t?void 0:t.isTyping,null==t?void 0:t.key,null==r?void 0:r.question,c,o]),(0,oe.useEffect)(function(){return function(){l("")}},[]),null!=t&&t.isThinking||n)return ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-thinking-wrapper"},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-thinking"}));if(null!=t&&t.isTyping)return ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text"},ae().createElement("div",{style:{minHeight:"1.6em"}},u.map(function(e,t){return ae().createElement(ae().Fragment,{key:t},e,t<u.length-1&&ae().createElement("br",null))}),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-text-cursor"},"|")));try{var d;return ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text",dangerouslySetInnerHTML:{__html:null!==(d=null==r?void 0:r.question)&&void 0!==d?d:""}})}catch(e){var p;return console.error("Error rendering conversation content:",e),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text"},null!==(p=null==r?void 0:r.question)&&void 0!==p?p:"")}},function(e,t){var n,r,o,i,a,s,l,c,u,d;return(null===(n=e.currentStep)||void 0===n?void 0:n.isThinking)===(null===(r=t.currentStep)||void 0===r?void 0:r.isThinking)&&(null===(o=e.currentStep)||void 0===o?void 0:o.isTyping)===(null===(i=t.currentStep)||void 0===i?void 0:i.isTyping)&&(null===(a=e.currentStep)||void 0===a?void 0:a.key)===(null===(s=t.currentStep)||void 0===s?void 0:s.key)&&e.isCatchFetching===t.isCatchFetching&&(null===(l=e.conversation)||void 0===l?void 0:l.key)===(null===(c=t.conversation)||void 0===c?void 0:c.key)&&(null===(u=e.conversation)||void 0===u?void 0:u.question)===(null===(d=t.conversation)||void 0===d?void 0:d.question)});Px.displayName="ConversationTypingEffect";const Tx=Px;function Ax(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ax(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ax(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Mx=function(e){var t=e.timeoutRefs,n=e.onStepStatusUpdate,r=e.onProgressUpdate,o=e.onUtilityFunctionsReady,i=e.onNoPendingSteps,a=e.isVisible,s=void 0!==a&&a,l=pe((0,oe.useState)({start:!1,complete:!1,errorMessage:null,steps:[{key:"downloading",message:(0,Pt.__)("Downloading template pack","templately"),status:"waiting"},{key:"analyzing",message:(0,Pt.__)("Analyzing the details you provided","templately"),status:"waiting"},{key:"generating",message:(0,Pt.__)("Generating website content","templately"),status:"waiting"},{key:"updating",message:(0,Pt.__)("Updating content in the template","templately"),status:"waiting"},{key:"preparing",message:(0,Pt.__)("Preparing live preview","templately"),status:"waiting"}]}),2),c=l[0],u=l[1],d=pe((0,oe.useState)([]),2),p=d[0],h=d[1],f=(0,oe.useRef)(!1);(0,oe.useEffect)(function(){var e=function(){if(!document.hidden&&p.length>0){var e=setTimeout(function(){h(function(e){return 0===e.length?e:Da(e)})},100);t&&t.current&&t.current.push(e)}};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}},[p,t]);var m=(0,oe.useCallback)(function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(r&&r.delayUntil){var o=Date.now();if(o<r.delayUntil)return{allowed:!1,scheduleAfter:r.delayUntil-o};delete r.delayUntil}var i=e[t],a=Date.now();if("active"===n){if(0===t)return{allowed:!0,scheduleAfter:0};if(!e.slice(0,t).every(function(e){return"done"===e.status}))return{allowed:!1,scheduleAfter:0};var s=e[t-1];if("done"===s.status&&s.completedAt){var l=a-s.completedAt;if(l<3e3)return{allowed:!1,scheduleAfter:3e3-l}}return{allowed:!0,scheduleAfter:0}}if("done"===n){if("active"!==i.status)return{allowed:!1,scheduleAfter:0};if(!e.slice(0,t).every(function(e){return"done"===e.status}))return{allowed:!1,scheduleAfter:0};if(t>0){var c=e[t-1];if("done"===c.status&&c.completedAt){var u=a-c.completedAt;if(u<3e3)return{allowed:!1,scheduleAfter:3e3-u}}}return{allowed:!0,scheduleAfter:0}}if("has-error"===n){if("active"!==i.status)return{allowed:!1,scheduleAfter:0};if(i.activatedAt){var d=a-i.activatedAt;if(d<3e3)return{allowed:!1,scheduleAfter:3e3-d}}return{allowed:!0,scheduleAfter:0}}return"waiting"===n?{allowed:!0,scheduleAfter:0}:{allowed:!1,scheduleAfter:0}},[]),g=(0,oe.useCallback)(function(e,t){try{if(!e||"string"!=typeof e)return void console.warn("setGeneratingContentStepStatus: Invalid key provided:",e);if(!t||"string"!=typeof t)return void console.warn("setGeneratingContentStepStatus: Invalid status provided:",t);if(!["waiting","active","done","has-error"].includes(t))return void console.warn("setGeneratingContentStepStatus: Invalid status value:",t);h(function(n){return-1===n.findIndex(function(n){return n.key===e&&n.status===t})?[].concat(Da(n),[{key:e,status:t,timestamp:Date.now()}]):n})}catch(e){console.error("Error in setGeneratingContentStepStatus:",e)}},[]);(0,oe.useEffect)(function(){p.length>0&&function(){try{h(function(e){for(var n=Da(e),r=!1,o=function(e){var o=n[e];if(!o||!o.key||!o.status)return console.warn("Invalid pending step:",o),n.splice(e,1),r=!0,e--,i=e,0;var a=c.steps.findIndex(function(e){return e.key===o.key});if(-1===a)return console.warn("Step not found:",o.key),n.splice(e,1),r=!0,e--,i=e,0;var s=m(c.steps,a,o.status,o);if(s.allowed)n.splice(e,1),r=!0,e--,u(function(e){return Dx(Dx({},e),{},{steps:e.steps.map(function(e,t){if(e.key===o.key){var n=Dx(Dx({},e),{},{status:o.status});return"active"===o.status?n.activatedAt=Date.now():"done"===o.status&&(n.completedAt=Date.now()),n}return"done"===o.status&&t===a+1&&"waiting"===e.status?Dx(Dx({},e),{},{status:"active",activatedAt:Date.now()}):e})})});else if(s.scheduleAfter>0){o.delayUntil=Date.now()+s.scheduleAfter;var l=setTimeout(function(){h(function(e){return Da(e)})},s.scheduleAfter);t&&t.current&&t.current.push(l)}i=e},i=0;i<n.length;i++)o(i);return r?n:e})}catch(e){console.error("Error processing pending steps:",e)}}()},[c.steps,p,m,t]),(0,oe.useEffect)(function(){if(i&&!f.current){var e=c.steps.every(function(e){return"done"===e.status});if(0===p.length&&e||e&&c.start&&!c.complete){f.current=!0;var n=setTimeout(function(){i()},900);t&&t.current&&t.current.push(n)}}},[p,c.steps,c.start,c.complete,i,t]);var v=(0,oe.useCallback)(function(){u(function(e){return Dx(Dx({},e),{},{start:!1,complete:!1,errorMessage:null,steps:e.steps.map(function(e){return Dx(Dx({},e),{},{status:"waiting",completedAt:void 0,activatedAt:void 0})})})}),h([]),f.current=!1},[]),y=(0,oe.useCallback)(function(){h([]),f.current=!1,u(function(e){return Dx(Dx({},e),{},{start:!0,complete:!1,errorMessage:null,steps:e.steps.map(function(e,t){return Dx(Dx({},e),{},{status:0===t?"active":"waiting",completedAt:void 0,activatedAt:0===t?Date.now():void 0})})})})},[]),b=(0,oe.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{u(function(t){return Dx(Dx({},t),{},{start:!1,complete:!0,errorMessage:e})})}catch(e){console.error("Error completing progress:",e)}},[]),w=(0,oe.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{h([]),u(function(n){var r="string"==typeof e?e:"An unknown error occurred",o=n.steps.findIndex(function(e){return"active"===e.status});null!==t&&"number"==typeof t||(t=-1!==o?o:0),t=Math.max(0,Math.min(t,n.steps.length-1));var i=n.steps.map(function(e,n){return n<t&&["waiting","active"].includes(e.status)||n===t?Dx(Dx({},e),{},{status:"has-error",completedAt:void 0,activatedAt:void 0}):n===t+1?Dx(Dx({},e),{},{status:"waiting",completedAt:void 0,activatedAt:void 0}):e});return Dx(Dx({},n),{},{start:!1,complete:!0,errorMessage:r,steps:i})})}catch(e){console.error("Error setting progress error:",e)}},[]);if((0,oe.useEffect)(function(){r&&r({start:c.start,complete:c.complete,errorMessage:c.errorMessage,steps:c.steps})},[c.start,c.complete,c.errorMessage,c.steps,r]),(0,oe.useEffect)(function(){n&&n(g)},[g,n]),(0,oe.useEffect)(function(){o&&o({resetProgress:v,startProgress:y,completeProgress:b,setProgressError:w})},[o,v,y,b,w]),(0,oe.useEffect)(function(){r&&r({start:c.start,complete:c.complete,errorMessage:c.errorMessage,steps:c.steps})},[]),!s)return null;if(!c||!Array.isArray(c.steps))return console.warn("GeneratingContentProgress: Invalid progress state"),null;try{return ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation current-question"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-icon"},ae().createElement(yx,null)),ae().createElement("div",{style:{display:"flex",flexDirection:"column",gap:"12px"}},ae().createElement("div",{className:"templately-fsi-ai-sidebar-generating-content-wrapper"},c.steps.map(function(e){return e&&e.key&&e.message?ae().createElement("div",{key:e.key,className:"templately-fsi-ai-sidebar-generating-content-step templately-fsi-ai-sidebar-generating-content-step-".concat(e.status||"waiting")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-generating-content-step-icon"}),ae().createElement("span",{className:"templately-fsi-ai-sidebar-generating-content-step-message"},e.message)):(console.warn("GeneratingContentProgress: Invalid step data",e),null)})),null==c||!c.start||null!=c&&c.complete?null!=c&&c.complete&&null!=c&&c.errorMessage?ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-processing-error"},"".concat(c.errorMessage," ").concat((0,Pt.__)("Please try again or","templately")," "),ae().createElement("a",{href:"https://wpdeveloper.com/support",target:"_blank"},(0,Pt.__)("contact support.","templately"))):null:ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-processing-placeholder"},(0,Pt.__)("Generating your website content… This may take a moment. Thanks for waiting!","templately"))))}catch(e){return console.error("GeneratingContentProgress render error:",e),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-processing-error"},"".concat((0,Pt.__)("An error occurred while displaying progress. Please try again or","templately")," "),ae().createElement("a",{href:"https://wpdeveloper.com/support",target:"_blank"},(0,Pt.__)("contact support.","templately")))}};Mx.defaultProps={timeoutRefs:{current:[]},onStepStatusUpdate:null,onProgressUpdate:null,onUtilityFunctionsReady:null,isVisible:!1},Mx.resetProgress=function(e){return e&&e()},Mx.startProgress=function(e){return e&&e()},Mx.completeProgress=function(e,t){return e&&e(t)},Mx.setProgressError=function(e,t,n){return e&&e(t,n)};const Nx=Mx,Lx=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",fill:"none",viewBox:"0 0 14 15"},oe.createElement("mask",{id:"mask0_13963_9821",width:"15",height:"15",x:"-1",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#7F7F7F",d:"M-.005.532h14v14h-14z"})),oe.createElement("g",{mask:"url(#mask0_13963_9821)"},oe.createElement("path",{fill:"#7F7F7F",d:"M6.995 9.253a.7.7 0 0 1-.219-.037.5.5 0 0 1-.19-.124L3.904 6.41a.57.57 0 0 1-.167-.401.54.54 0 0 1 .167-.416.55.55 0 0 1 .409-.16q.247 0 .408.16l2.275 2.26 2.275-2.26a.57.57 0 0 1 .401-.168.54.54 0 0 1 .416.168q.16.16.16.409a.55.55 0 0 1-.16.408L7.403 9.092a.5.5 0 0 1-.19.124.7.7 0 0 1-.218.037"})))},Ix=function(e){return oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",fill:"none",viewBox:"0 0 14 15"},oe.createElement("mask",{id:"mask0_13963_9816",width:"15",height:"15",x:"-1",y:"0",maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},oe.createElement("path",{fill:"#7F7F7F",d:"M-.005.532h14v14h-14z"})),oe.createElement("g",{mask:"url(#mask0_13963_9816)"},oe.createElement("path",{fill:"#7F7F7F",d:"M6.995 13.365q-.48 0-.824-.343a1.12 1.12 0 0 1-.343-.824h2.334q0 .482-.343.824a1.12 1.12 0 0 1-.824.343m-1.75-1.75a.56.56 0 0 1-.416-.168.56.56 0 0 1-.167-.415q0-.248.167-.416a.56.56 0 0 1 .416-.168h3.5q.248 0 .416.168t.167.416a.56.56 0 0 1-.167.415.56.56 0 0 1-.416.168zm-.437-1.75A4.47 4.47 0 0 1 3.21 8.261q-.59-1.006-.59-2.188 0-1.823 1.275-3.099 1.275-1.275 3.1-1.276 1.821 0 3.098 1.276 1.275 1.276 1.276 3.1 0 1.18-.59 2.187a4.47 4.47 0 0 1-1.597 1.604zm.35-1.167h3.675a3.24 3.24 0 0 0 1.013-1.152 3.14 3.14 0 0 0 .357-1.473q0-1.34-.933-2.275-.933-.933-2.275-.933t-2.275.933-.933 2.275q0 .788.357 1.473.357.686 1.014 1.152"})))},Rx=function(e){var t=e.currentStepTooltip,n=e.isVisible,r=void 0!==n&&n,o=e.isThinkingOrTyping,i=void 0!==o&&o,a=e.timeoutRefs,s=pe((0,oe.useState)(!1),2),l=s[0],c=s[1],u=pe((0,oe.useState)(null),2),d=u[0],p=u[1],h=pe((0,oe.useState)(!1),2),f=h[0],m=h[1],g=Boolean(t||d)&&r&&!i,v=(0,oe.useCallback)(function(){f||c(function(e){return!e})},[f]),y=(0,oe.useMemo)(function(){return(0,_i.throttle)(function(e,t){if(t){m(!0),c(!1);var n=setTimeout(function(){p(e),m(!1),null!=a&&a.current&&(a.current=a.current.filter(function(e){return e!==n}))},300);null!=a&&a.current&&a.current.push(n)}else{m(!0);var r=setTimeout(function(){p(e),m(!1),null!=a&&a.current&&(a.current=a.current.filter(function(e){return e!==r}))},100);null!=a&&a.current&&a.current.push(r)}},50)},[a]);(0,oe.useEffect)(function(){try{t&&t!==d&&g?y(t,l):t&&!d?p(t):!t&&d&&(p(null),c(!1))}catch(e){console.warn("HelpPanel: Error during content transition:",e),m(!1),p(t||null)}},[t,d,l,g,y]),(0,oe.useEffect)(function(){return function(){y.cancel()}},[y]),(0,oe.useEffect)(function(){!g&&l&&c(!1)},[g,l]);var b=d||"";return g&&b?ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-info-panel ".concat(g?"templately-fsi-ai-sidebar-footer-info-panel--visible":"templately-fsi-ai-sidebar-footer-info-panel--hidden"," ").concat(l?"templately-fsi-ai-sidebar-footer-info-panel--open":""," ").concat(f?"templately-fsi-ai-sidebar-footer-info-panel--transitioning":""),role:"complementary","aria-label":(0,Pt.__)("Help information","templately")},ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-info-panel-head"},ae().createElement("button",{className:"templately-fsi-ai-sidebar-footer-info-button",onClick:v,disabled:f,"aria-expanded":l,"aria-controls":"help-panel-content",type:"button"},ae().createElement("span",{className:"templately-fsi-ai-sidebar-footer-info-button-icon"},ae().createElement(Ix,null)),ae().createElement("span",{className:"templately-fsi-ai-sidebar-footer-info-button-text"},(0,Pt.__)("How should I pick?","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-footer-info-button-icon ".concat(l?"templately-fsi-ai-sidebar-footer-info-button-icon--rotated":"")},ae().createElement(Lx,null)))),ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-info-panel-body"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-info-panel-body-inner"},ae().createElement("div",{id:"help-panel-content",className:"templately-fsi-ai-sidebar-footer-info-panel-content ".concat(f?"templately-fsi-ai-sidebar-footer-info-panel-content--transitioning":""),dangerouslySetInnerHTML:{__html:b},role:"region","aria-live":"polite"})))):null};function jx(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Fx(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function zx(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Fx(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Fx(e[t],null)}}}}function Bx(...e){return oe.useCallback(zx(...e),e)}"undefined"==typeof window||!window.document||window.document.createElement;var Ux=o(4848);function Vx(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>oe.createContext(e));return function(n){const r=n?.[e]||t;return oe.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=oe.createContext(r),i=n.length;n=[...n,r];const a=t=>{const{scope:n,children:r,...a}=t,s=n?.[e]?.[i]||o,l=oe.useMemo(()=>a,Object.values(a));return(0,Ux.jsx)(s.Provider,{value:l,children:r})};return a.displayName=t+"Provider",[a,function(n,a){const s=a?.[e]?.[i]||o,l=oe.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Wx(r,...t)]}function Wx(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return oe.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Hx(e){const t=Qx(e),n=oe.forwardRef((e,n)=>{const{children:r,...o}=e,i=oe.Children.toArray(r),a=i.find($x);if(a){const e=a.props.children,r=i.map(t=>t===a?oe.Children.count(e)>1?oe.Children.only(null):oe.isValidElement(e)?e.props.children:null:t);return(0,Ux.jsx)(t,{...o,ref:n,children:oe.isValidElement(e)?oe.cloneElement(e,void 0,r):null})}return(0,Ux.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Qx(e){const t=oe.forwardRef((e,t)=>{const{children:n,...r}=e;if(oe.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==oe.Fragment&&(o.ref=t?zx(t,e):e),oe.cloneElement(n,o)}return oe.Children.count(n)>1?oe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qx=Symbol("radix.slottable");function $x(e){return oe.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===qx}var Gx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Hx(`Primitive.${t}`),r=oe.forwardRef((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,Ux.jsx)(a,{...i,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yx(e){const t=oe.useRef(e);return oe.useEffect(()=>{t.current=e}),oe.useMemo(()=>(...e)=>t.current?.(...e),[])}var Xx,Kx="dismissableLayer.update",Zx=oe.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jx=oe.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=oe.useContext(Zx),[u,d]=oe.useState(null),p=u?.ownerDocument??globalThis?.document,[,h]=oe.useState({}),f=Bx(t,e=>d(e)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,k=function(e,t=globalThis?.document){const n=Yx(e),r=oe.useRef(!1),o=oe.useRef(()=>{});return oe.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){n_("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...c.branches].some(e=>e.contains(t));w&&!n&&(o?.(e),a?.(e),e.defaultPrevented||s?.())},p),E=function(e,t=globalThis?.document){const n=Yx(e),r=oe.useRef(!1);return oe.useEffect(()=>{const e=e=>{e.target&&!r.current&&n_("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(i?.(e),a?.(e),e.defaultPrevented||s?.())},p);return function(e,t=globalThis?.document){const n=Yx(e);oe.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{y===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),oe.useEffect(()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Xx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),t_(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Xx)}},[u,p,n,c]),oe.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),t_())},[u,c]),oe.useEffect(()=>{const e=()=>h({});return document.addEventListener(Kx,e),()=>document.removeEventListener(Kx,e)},[]),(0,Ux.jsx)(Gx.div,{...l,ref:f,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:jx(e.onFocusCapture,E.onFocusCapture),onBlurCapture:jx(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jx(e.onPointerDownCapture,k.onPointerDownCapture)})});Jx.displayName="DismissableLayer";var e_=oe.forwardRef((e,t)=>{const n=oe.useContext(Zx),r=oe.useRef(null),o=Bx(t,r);return oe.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,Ux.jsx)(Gx.div,{...e,ref:o})});function t_(){const e=new CustomEvent(Kx);document.dispatchEvent(e)}function n_(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&se.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}e_.displayName="DismissableLayerBranch";var r_=0;function o_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var i_="focusScope.autoFocusOnMount",a_="focusScope.autoFocusOnUnmount",s_={bubbles:!1,cancelable:!0},l_=oe.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=oe.useState(null),c=Yx(o),u=Yx(i),d=oe.useRef(null),p=Bx(t,e=>l(e)),h=oe.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;oe.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:p_(d.current,{select:!0})},t=function(e){if(h.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||p_(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&p_(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,s,h.paused]),oe.useEffect(()=>{if(s){h_.add(h);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(i_,s_);s.addEventListener(i_,c),s.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(p_(r,{select:t}),document.activeElement!==n)return}(c_(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&p_(s))}return()=>{s.removeEventListener(i_,c),setTimeout(()=>{const t=new CustomEvent(a_,s_);s.addEventListener(a_,u),s.dispatchEvent(t),t.defaultPrevented||p_(e??document.body,{select:!0}),s.removeEventListener(a_,u),h_.remove(h)},0)}}},[s,c,u,h]);const f=oe.useCallback(e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=function(e){const t=c_(e);return[u_(t,e),u_(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&p_(i,{select:!0})):(e.preventDefault(),n&&p_(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,h.paused]);return(0,Ux.jsx)(Gx.div,{tabIndex:-1,...a,ref:p,onKeyDown:f})});function c_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function u_(e,t){for(const n of e)if(!d_(n,{upTo:t}))return n}function d_(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function p_(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}l_.displayName="FocusScope";var h_=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=f_(e,t),e.unshift(t)},remove(t){e=f_(e,t),e[0]?.resume()}}}();function f_(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var m_=globalThis?.document?oe.useLayoutEffect:()=>{},g_=ie[" useId ".trim().toString()]||(()=>{}),v_=0;function y_(e){const[t,n]=oe.useState(g_());return m_(()=>{e||n(e=>e??String(v_++))},[e]),e||(t?`radix-${t}`:"")}var b_="undefined"!=typeof document?oe.useLayoutEffect:function(){};function w_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!w_(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||w_(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function k_(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function E_(e,t){const n=k_(e);return Math.round(t*n)/n}function O_(e){const t=oe.useRef(e);return b_(()=>{t.current=e}),t}const S_=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?$d({element:n.current,padding:r}).fn(t):{}:n?$d({element:n,padding:r}).fn(t):{}}}),x_=(e,t)=>({...Vd(e),options:[e,t]}),C_=(e,t)=>({...Wd(e),options:[e,t]}),P_=(e,t)=>({...Gd(e),options:[e,t]}),T_=(e,t)=>({...Hd(e),options:[e,t]}),A_=(e,t)=>({...Qd(e),options:[e,t]}),D_=(e,t)=>({...qd(e),options:[e,t]}),M_=(e,t)=>({...S_(e),options:[e,t]});var N_=oe.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return(0,Ux.jsx)(Gx.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,Ux.jsx)("polygon",{points:"0,0 30,0 15,10"})})});N_.displayName="Arrow";var L_=N_,I_="Popper",[R_,j_]=Vx(I_),[F_,z_]=R_(I_),B_=e=>{const{__scopePopper:t,children:n}=e,[r,o]=oe.useState(null);return(0,Ux.jsx)(F_,{scope:t,anchor:r,onAnchorChange:o,children:n})};B_.displayName=I_;var U_="PopperAnchor",V_=oe.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=z_(U_,n),a=oe.useRef(null),s=Bx(t,a),l=oe.useRef(null);return oe.useEffect(()=>{const e=l.current;l.current=r?.current||a.current,e!==l.current&&i.onAnchorChange(l.current)}),r?null:(0,Ux.jsx)(Gx.div,{...o,ref:s})});V_.displayName=U_;var W_="PopperContent",[H_,Q_]=R_(W_),q_=oe.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:f,...m}=e,g=z_(W_,n),[v,y]=oe.useState(null),b=Bx(t,e=>y(e)),[w,k]=oe.useState(null),E=function(e){const[t,n]=oe.useState(void 0);return m_(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(w),O=E?.width??0,S=E?.height??0,x=r+("center"!==i?"-"+i:""),_="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},C=Array.isArray(c)?c:[c],P=C.length>0,T={padding:_,boundary:C.filter(X_),altBoundary:P},{refs:A,floatingStyles:D,placement:M,isPositioned:N,middlewareData:L}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=oe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=oe.useState(r);w_(p,r)||h(r);const[f,m]=oe.useState(null),[g,v]=oe.useState(null),y=oe.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=oe.useCallback(e=>{e!==O.current&&(O.current=e,v(e))},[]),w=i||f,k=a||g,E=oe.useRef(null),O=oe.useRef(null),S=oe.useRef(u),x=null!=l,_=O_(l),C=O_(o),P=O_(c),T=oe.useCallback(()=>{if(!E.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),Yd(E.current,O.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!w_(S.current,t)&&(S.current=t,se.flushSync(()=>{d(t)}))})},[p,t,n,C,P]);b_(()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const A=oe.useRef(!1);b_(()=>(A.current=!0,()=>{A.current=!1}),[]),b_(()=>{if(w&&(E.current=w),k&&(O.current=k),w&&k){if(_.current)return _.current(w,k,T);T()}},[w,k,T,_,x]);const D=oe.useMemo(()=>({reference:E,floating:O,setReference:y,setFloating:b}),[y,b]),M=oe.useMemo(()=>({reference:w,floating:k}),[w,k]),N=oe.useMemo(()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=E_(M.floating,u.x),r=E_(M.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...k_(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return oe.useMemo(()=>({...u,update:T,refs:D,elements:M,floatingStyles:N}),[u,T,D,M,N])}({strategy:"fixed",placement:x,whileElementsMounted:(...e)=>Ud(...e,{animationFrame:"always"===h}),elements:{reference:g.anchor},middleware:[x_({mainAxis:o+S,alignmentAxis:a}),l&&C_({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?P_():void 0,...T}),l&&T_({...T}),A_({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),w&&M_({element:w,padding:s}),K_({arrowWidth:O,arrowHeight:S}),p&&D_({strategy:"referenceHidden",...T})]}),[I,R]=Z_(M),j=Yx(f);m_(()=>{N&&j?.()},[N,j]);const F=L.arrow?.x,z=L.arrow?.y,B=0!==L.arrow?.centerOffset,[U,V]=oe.useState();return m_(()=>{v&&V(window.getComputedStyle(v).zIndex)},[v]),(0,Ux.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:N?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Ux.jsx)(H_,{scope:n,placedSide:I,onArrowChange:k,arrowX:F,arrowY:z,shouldHideArrow:B,children:(0,Ux.jsx)(Gx.div,{"data-side":I,"data-align":R,...m,ref:b,style:{...m.style,animation:N?void 0:"none"}})})})});q_.displayName=W_;var $_="PopperArrow",G_={top:"bottom",right:"left",bottom:"top",left:"right"},Y_=oe.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=Q_($_,n),i=G_[o.placedSide];return(0,Ux.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,Ux.jsx)(L_,{...r,ref:t,style:{...r.style,display:"block"}})})});function X_(e){return null!==e}Y_.displayName=$_;var K_=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Z_(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+s/2;let h="",f="";return"bottom"===l?(h=i?u:`${d}px`,f=-s+"px"):"top"===l?(h=i?u:`${d}px`,f=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",f=i?u:`${p}px`):"left"===l&&(h=`${r.floating.width+s}px`,f=i?u:`${p}px`),{data:{x:h,y:f}}}});function Z_(e){const[t,n="center"]=e.split("-");return[t,n]}var J_=B_,eC=V_,tC=q_,nC=Y_,rC=oe.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=oe.useState(!1);m_(()=>i(!0),[]);const a=n||o&&globalThis?.document?.body;return a?se.createPortal((0,Ux.jsx)(Gx.div,{...r,ref:t}),a):null});rC.displayName="Portal";var oC=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=oe.useState(),r=oe.useRef(null),o=oe.useRef(e),i=oe.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return oe.useReducer((e,n)=>t[e][n]??e,e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return oe.useEffect(()=>{const e=iC(r.current);i.current="mounted"===s?e:"none"},[s]),m_(()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=iC(t);l(e?"MOUNT":"none"===a||"none"===t?.display?"UNMOUNT":n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),m_(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=iC(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&a&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(i.current=iC(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:oe.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):oe.Children.only(n),i=Bx(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(o));return"function"==typeof n||r.isPresent?oe.cloneElement(o,{ref:i}):null};function iC(e){return e?.animationName||"none"}oC.displayName="Presence";var aC=ie[" useInsertionEffect ".trim().toString()]||m_;Symbol("RADIX:SYNC_STATE");var sC=new WeakMap,lC=new WeakMap,cC={},uC=0,dC=function(e){return e&&(e.host||dC(e.parentNode))},pC=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=dC(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);cC[n]||(cC[n]=new WeakMap);var i=cC[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(sC.get(e)||0)+1,c=(i.get(e)||0)+1;sC.set(e,l),i.set(e,c),a.push(e),1===l&&o&&lC.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return u(t),s.clear(),uC++,function(){a.forEach(function(e){var t=sC.get(e)-1,o=i.get(e)-1;sC.set(e,t),i.set(e,o),t||(lC.has(e)||e.removeAttribute(r),lC.delete(e)),o||e.removeAttribute(n)}),--uC||(sC=new WeakMap,sC=new WeakMap,lC=new WeakMap,cC={})}}(r,o,n,"aria-hidden")):function(){return null}},hC=o(1635),fC="right-scroll-bar-position",mC="width-before-scroll-bar";function gC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var vC="undefined"!=typeof window?oe.useLayoutEffect:oe.useEffect,yC=new WeakMap;function bC(e){return e}var wC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=bC);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=(0,hC.__assign)({async:!0,ssr:!1},e),t}(),kC=function(){},EC=oe.forwardRef(function(e,t){var n,r,o,i=oe.useRef(null),a=oe.useState({onScrollCapture:kC,onWheelCapture:kC,onTouchMoveCapture:kC}),s=a[0],l=a[1],c=e.forwardProps,u=e.children,d=e.className,p=e.removeScrollBar,h=e.enabled,f=e.shards,m=e.sideCar,g=e.noRelative,v=e.noIsolation,y=e.inert,b=e.allowPinchZoom,w=e.as,k=void 0===w?"div":w,E=e.gapMode,O=(0,hC.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,x=(n=[i,t],o=function(e,t){var n=(0,oe.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(r||null,function(e){return n.forEach(function(t){return gC(t,e)})}),vC(function(){var e=yC.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||gC(e,null)}),r.forEach(function(e){t.has(e)||gC(e,i)})}yC.set(o,n)},[n]),o),_=(0,hC.__assign)((0,hC.__assign)({},O),s);return oe.createElement(oe.Fragment,null,h&&oe.createElement(S,{sideCar:wC,removeScrollBar:p,shards:f,noRelative:g,noIsolation:v,inert:y,setCallbacks:l,allowPinchZoom:!!b,lockRef:i,gapMode:E}),c?oe.cloneElement(oe.Children.only(u),(0,hC.__assign)((0,hC.__assign)({},_),{ref:x})):oe.createElement(k,(0,hC.__assign)({},_,{className:d,ref:x}),u))});EC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},EC.classNames={fullWidth:mC,zeroRight:fC};var OC=function(e){var t=e.sideCar,n=(0,hC.__rest)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return oe.createElement(r,(0,hC.__assign)({},n))};OC.isSideCarExport=!0;var SC=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=o.nc;return t&&e.setAttribute("nonce",t),e}())&&(function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xC=function(){var e,t=(e=SC(),function(t,n){oe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},_C={left:0,top:0,right:0,gap:0},CC=function(e){return parseInt(e||"",10)||0},PC=xC(),TC="data-scroll-locked",AC=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(TC,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(fC," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(mC," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(fC," .").concat(fC," {\n right: 0 ").concat(r,";\n }\n \n .").concat(mC," .").concat(mC," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(TC,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},DC=function(){var e=parseInt(document.body.getAttribute(TC)||"0",10);return isFinite(e)?e:0},MC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;oe.useEffect(function(){return document.body.setAttribute(TC,(DC()+1).toString()),function(){var e=DC()-1;e<=0?document.body.removeAttribute(TC):document.body.setAttribute(TC,e.toString())}},[]);var i=oe.useMemo(function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return _C;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[CC(n),CC(r),CC(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}}(o)},[o]);return oe.createElement(PC,{styles:AC(i,!t,o,n?"":"!important")})},NC=!1;if("undefined"!=typeof window)try{var LC=Object.defineProperty({},"passive",{get:function(){return NC=!0,!0}});window.addEventListener("test",LC,LC),window.removeEventListener("test",LC,LC)}catch(e){NC=!1}var IC=!!NC&&{passive:!1},RC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},jC=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),FC(e,r)){var o=zC(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FC=function(e,t){return"v"===e?function(e){return RC(e,"overflowY")}(t):function(e){return RC(e,"overflowX")}(t)},zC=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},BC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UC=function(e){return[e.deltaX,e.deltaY]},VC=function(e){return e&&"current"in e?e.current:e},WC=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},HC=0,QC=[];function qC(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $C=(GC=function(e){var t=oe.useRef([]),n=oe.useRef([0,0]),r=oe.useRef(),o=oe.useState(HC++)[0],i=oe.useState(xC)[0],a=oe.useRef(e);oe.useEffect(function(){a.current=e},[e]),oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,hC.__spreadArray)([e.lockRef.current],(e.shards||[]).map(VC),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=oe.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=BC(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=jC(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=jC(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{if(!a)break;var p=zC(e,a),h=p[0],f=p[1]-p[2]-o*h;(h||f)&&FC(e,a)&&(u+=f,d+=h);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(Math.abs(u)<1||!1)||!c&&(Math.abs(d)<1||!1))&&(l=!0),l}(h,t,e,"h"===h?l:c)},[]),l=oe.useCallback(function(e){var n=e;if(QC.length&&QC[QC.length-1]===i){var r="deltaY"in n?UC(n):BC(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(a.current.shards||[]).map(VC).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=oe.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:qC(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),u=oe.useCallback(function(e){n.current=BC(e),r.current=void 0},[]),d=oe.useCallback(function(t){c(t.type,UC(t),t.target,s(t,e.lockRef.current))},[]),p=oe.useCallback(function(t){c(t.type,BC(t),t.target,s(t,e.lockRef.current))},[]);oe.useEffect(function(){return QC.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,IC),document.addEventListener("touchmove",l,IC),document.addEventListener("touchstart",u,IC),function(){QC=QC.filter(function(e){return e!==i}),document.removeEventListener("wheel",l,IC),document.removeEventListener("touchmove",l,IC),document.removeEventListener("touchstart",u,IC)}},[]);var h=e.removeScrollBar,f=e.inert;return oe.createElement(oe.Fragment,null,f?oe.createElement(i,{styles:WC(o)}):null,h?oe.createElement(MC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},wC.useMedium(GC),OC);var GC,YC=oe.forwardRef(function(e,t){return oe.createElement(EC,(0,hC.__assign)({},e,{ref:t,sideCar:$C}))});YC.classNames=EC.classNames;const XC=YC;var KC="Popover",[ZC,JC]=Vx(KC,[j_]),eP=j_(),[tP,nP]=ZC(KC),rP=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=eP(t),l=oe.useRef(null),[c,u]=oe.useState(!1),[d,p]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=function({defaultProp:e,onChange:t}){const[n,r]=oe.useState(e),o=oe.useRef(n),i=oe.useRef(t);return aC(()=>{i.current=t},[t]),oe.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=oe.useRef(void 0!==e);oe.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}const c=oe.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&a.current?.(n)}else i(t)},[s,e,i,a]);return[l,c]}({prop:r,defaultProp:o??!1,onChange:i,caller:KC});return(0,Ux.jsx)(J_,{...s,children:(0,Ux.jsx)(tP,{scope:t,contentId:y_(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:oe.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:c,onCustomAnchorAdd:oe.useCallback(()=>u(!0),[]),onCustomAnchorRemove:oe.useCallback(()=>u(!1),[]),modal:a,children:n})})};rP.displayName=KC;var oP="PopoverAnchor";oe.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nP(oP,n),i=eP(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return oe.useEffect(()=>(a(),()=>s()),[a,s]),(0,Ux.jsx)(eC,{...i,...r,ref:t})}).displayName=oP;var iP="PopoverTrigger",aP=oe.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nP(iP,n),i=eP(n),a=Bx(t,o.triggerRef),s=(0,Ux.jsx)(Gx.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yP(o.open),...r,ref:a,onClick:jx(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,Ux.jsx)(eC,{asChild:!0,...i,children:s})});aP.displayName=iP;var sP="PopoverPortal",[lP,cP]=ZC(sP,{forceMount:void 0}),uP=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=nP(sP,t);return(0,Ux.jsx)(lP,{scope:t,forceMount:n,children:(0,Ux.jsx)(oC,{present:n||i.open,children:(0,Ux.jsx)(rC,{asChild:!0,container:o,children:r})})})};uP.displayName=sP;var dP="PopoverContent",pP=oe.forwardRef((e,t)=>{const n=cP(dP,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=nP(dP,e.__scopePopover);return(0,Ux.jsx)(oC,{present:r||i.open,children:i.modal?(0,Ux.jsx)(fP,{...o,ref:t}):(0,Ux.jsx)(mP,{...o,ref:t})})});pP.displayName=dP;var hP=Hx("PopoverContent.RemoveScroll"),fP=oe.forwardRef((e,t)=>{const n=nP(dP,e.__scopePopover),r=oe.useRef(null),o=Bx(t,r),i=oe.useRef(!1);return oe.useEffect(()=>{const e=r.current;if(e)return pC(e)},[]),(0,Ux.jsx)(XC,{as:hP,allowPinchZoom:!0,children:(0,Ux.jsx)(gP,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:jx(e.onCloseAutoFocus,e=>{e.preventDefault(),i.current||n.triggerRef.current?.focus()}),onPointerDownOutside:jx(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:jx(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),mP=oe.forwardRef((e,t)=>{const n=nP(dP,e.__scopePopover),r=oe.useRef(!1),o=oe.useRef(!1);return(0,Ux.jsx)(gP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const i=t.target,a=n.triggerRef.current?.contains(i);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),gP=oe.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=nP(dP,n),h=eP(n);return oe.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??o_()),document.body.insertAdjacentElement("beforeend",e[1]??o_()),r_++,()=>{1===r_&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),r_--}},[]),(0,Ux.jsx)(l_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,Ux.jsx)(Jx,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:(0,Ux.jsx)(tC,{"data-state":yP(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),vP="PopoverClose";function yP(e){return e?"open":"closed"}oe.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nP(vP,n);return(0,Ux.jsx)(Gx.button,{type:"button",...r,ref:t,onClick:jx(e.onClick,()=>o.onOpenChange(!1))})}).displayName=vP,oe.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=eP(n);return(0,Ux.jsx)(nC,{...o,...r,ref:t})}).displayName="PopoverArrow";var bP=rP,wP=aP,kP=uP,EP=pP;const OP=function(e){var t=e.open,n=e.onOpenChange,r=e.children,o=e.content;return React.createElement(bP,{open:t,onOpenChange:n},React.createElement(wP,{asChild:!0},r),React.createElement(kP,null,React.createElement(EP,{className:"templately-fsi-ai-sidebar-conversation-categories-panel",sideOffset:12,side:"top",align:"end"},o)))};function SP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SP(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _P=function(){return Hl(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Vl(this,e),this.callbacks=t,this.state="idle",this.data={},this.errors=[]},[{key:"setState",value:function(e){var t,n,r,o,i,a,s,l,c,u,d,p,h,f,m,g,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,y=this.state;switch(this.state=e,v&&(this.data=xP(xP({},this.data),v)),$i("AI Workflow: ".concat(y," → ").concat(e),v),e){case"session_created":null===(t=(n=this.callbacks).onSessionCreated)||void 0===t||t.call(n,v);break;case"ai_content_started":null===(r=(o=this.callbacks).onAIContentStarted)||void 0===r||r.call(o,v);break;case"both_completed":null===(i=(a=this.callbacks).onBothCompleted)||void 0===i||i.call(a,this.data);break;case"polling_complete":null===(s=(l=this.callbacks).onPollingComplete)||void 0===s||s.call(l,v);break;case"updating":null===(c=(u=this.callbacks).onUpdating)||void 0===c||c.call(u,v);break;case"preparing":null===(d=(p=this.callbacks).onPreparing)||void 0===d||d.call(p,v);break;case"workflow_complete":null===(h=(f=this.callbacks).onWorkflowComplete)||void 0===h||h.call(f,v);break;case"error":this.errors.push(v),null===(m=(g=this.callbacks).onError)||void 0===m||m.call(g,v)}}},{key:"getState",value:function(){return this.state}},{key:"getData",value:function(){return this.data}},{key:"getErrors",value:function(){return this.errors}}])}(),CP=function(){var e=ni(oi().mark(function e(t,n,r){var o,i,a,s,l,c,u,d,p,h,f;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l=Object.values(t.ai_page_ids||{}).flat(),(null===(o=t.preview_pages)||void 0===o?void 0:o.length)>0&&(l=l.filter(function(e){return!t.preview_pages.includes(e)})),(c=new FormData).append("id",n),c.append("session_id",t.session_id),c.append("ai_page_ids",JSON.stringify(t.ai_page_ids)),c.append("content_ids",JSON.stringify(l)),c.append("platform",t.platform),u=(0,si.addQueryArgs)(window.ajaxurl,{action:"templately_pack_create_session_and_download",is_lightspeed:!0,nonce:window.templately.nonce}),e.next=1,fetch(u,{method:"POST",body:c,signal:r});case 1:if((d=e.sent).ok){e.next=2;break}throw new Error("HTTP error! status: ".concat(d.status));case 2:return e.next=3,d.json();case 3:if("error"!==(null==(p=e.sent)?void 0:p.status)&&null!=p&&p.success){e.next=4;break}throw new Error((null==p?void 0:p.message)||(null==p||null===(h=p.data)||void 0===h?void 0:h.message)||(0,Pt.__)("Failed to create session and download pack","templately"));case 4:if(null!==(i=p.data)&&void 0!==i&&i.session_id){e.next=5;break}throw new Error((0,Pt.__)("Session creation failed","templately"));case 5:return e.abrupt("return",xP({session_id:null===(a=p.data)||void 0===a?void 0:a.session_id,pack_downloaded:(null===(s=p.data)||void 0===s?void 0:s.pack_downloaded)||!1},p.data));case 6:throw e.prev=6,f=e.catch(0),console.error("Error in createSessionAndDownloadPack:",f),f;case 7:case"end":return e.stop()}},e,null,[[0,6]])}));return function(_x,t,n){return e.apply(this,arguments)}}(),PP=function(){var e=ni(oi().mark(function e(t,n){var r,o,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Object.values(t.ai_page_ids||{}).flat(),(null===(r=t.preview_pages)||void 0===r?void 0:r.length)>0&&(o=o.filter(function(e){return!t.preview_pages.includes(e)})),!(0,_i.isEmpty)(t.preview_pages)){e.next=1;break}throw{message:(0,Pt.__)("Please select at least one page to modify.","templately"),type:"error",errorType:"EMPTY_PAGE_SELECTION"};case 1:if(t.description){e.next=2;break}throw{message:(0,Pt.__)("Please enter a prompt describing your business and content needs.","templately"),type:"error",errorType:"MISSING_PROMPT"};case 2:if(t.pack_id){e.next=3;break}throw{message:(0,Pt.__)("Template pack ID is missing.","templately"),type:"error",errorType:"MISSING_PACK_ID"};case 3:if(t.platform){e.next=4;break}throw{message:(0,Pt.__)("Platform selection is required.","templately"),type:"error",errorType:"MISSING_PLATFORM"};case 4:return e.prev=4,e.next=5,ai()({method:"POST",path:(0,si.addQueryArgs)("/templately/v1/ai-content/modify-content/"),data:xP(xP({},t),{},{content_ids:o,preview_pages:t.preview_pages||[]}),signal:n});case 5:if(i=e.sent,$i(i),"success"===i.status){e.next=6;break}throw new Error((null==i?void 0:i.message)||(0,Pt.__)("Failed to start AI content modification","templately"));case 6:if(null!=i&&i.process_id){e.next=7;break}throw new Error((0,Pt.__)("Failed to start AI content modification","templately"));case 7:return e.abrupt("return",i);case 8:throw e.prev=8,e.catch(4);case 9:case"end":return e.stop()}},e,null,[[4,8]])}));return function(t,n){return e.apply(this,arguments)}}(),TP=function(){var e=ni(oi().mark(function e(t){var n,r,o,i,a,s,l,c,u,d,p,h,f,m,g,v,y,b,w,k,E,O,S,x,_,C,P,T,A,D,M,N=arguments;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=N.length>2&&void 0!==N[2]?N[2]:null,r=new _P(N.length>1&&void 0!==N[1]?N[1]:{}),o=new AbortController,i=setTimeout(function(){o.abort("Workflow timeout")},DP.OVERALL_TIMEOUT),e.prev=1,r.setState("validating"),null!=t&&t.pack_id){e.next=2;break}throw new Error((0,Pt.__)("Template pack ID is missing","templately"));case 2:if(null!=t&&t.description){e.next=3;break}throw new Error((0,Pt.__)("AI prompt is missing","templately"));case 3:if(a=gw(),s=xP(xP({},t),{},{session_id:a}),l=[new AbortController,new AbortController],c=[],u=function(e){l.forEach(function(t){t.signal.aborted||t.abort(e)}),c.forEach(function(e){try{e()}catch(e){console.warn("Cleanup task failed:",e)}})},!n){e.next=5;break}if(!n.signal.aborted){e.next=4;break}throw new Error((0,Pt.__)("AI content workflow was cancelled","templately"));case 4:d=function(){return u("External abort signal received")},n.signal.addEventListener("abort",d),c.push(function(){n.signal.removeEventListener("abort",d)});case 5:return r.setState("executing_parallel_operations"),e.next=6,Promise.allSettled([CP(s,t.pack_id,l[0].signal).then(function(e){return r.setState("session_created",e),{success:!0,data:e}}),PP(s,l[1].signal).then(function(e){return r.setState("ai_content_started",e),{success:!0,data:e}})]);case 6:if(p=e.sent,h=pe(p,2),f=h[0],m=h[1],g=[],"rejected"===f.status&&((y=new Error((null===(v=f.reason)||void 0===v?void 0:v.message)||(0,Pt.__)("Session creation and pack download failed","templately"))).cause="createSessionAndDownloadPack",y.originalError=f.reason,g.push(y)),"rejected"===m.status&&((w=new Error((null===(b=m.reason)||void 0===b?void 0:b.message)||(0,Pt.__)("AI content modification failed to start","templately"))).cause="startModifyAiContent",w.originalError=m.reason,g.push(w)),!(g.length>0)){e.next=7;break}throw u("Critical operation failed"),g[0];case 7:if(k=f.value.data,E=m.value.data,O=E.is_local_site,r.setState("both_completed",{sessionResult:k,aiContentResult:E}),r.setState("fetching_preview_content"),(S=null==E?void 0:E.templates)&&0!==Object.keys(S).length){e.next=11;break}return e.prev=8,e.next=9,new Promise(function(e,r){var o=setTimeout(function(){var e=null,t=function(){if(e&&(document.removeEventListener("visibilitychange",e),e=null),window.confirm((0,Pt.__)("AI content generation is taking longer than expected. Click OK to cancel or Cancel to keep waiting. Credits will still apply.","templately")))return s.cleanup(),void r(new Error((0,Pt.__)("Polling timeout: AI content generation took too long","templately")))};try{!document.hidden&&s.isActive?t():(e=function(){!document.hidden&&s.isActive&&t()},document.addEventListener("visibilitychange",e))}catch(t){return $i("Error showing confirmation dialog:",t),void(e&&(document.removeEventListener("visibilitychange",e),e=null))}},DP.POLLING_TIMEOUT),i=t.preview_pages||[],a={};Object.entries(t.ai_page_ids||{}).forEach(function(e){var t=pe(e,2),n=t[0],r=(t[1]||[]).filter(function(e){return i.includes(e)});r.length>0&&(a[n]=r)});var s=MP(k.session_id,E.process_id,a,[],function(){},function(t){clearTimeout(o),$i("Workflow polling completed successfully"),e(t)},function(e){clearTimeout(o),$i("Workflow polling failed:",e.message),r(new Error(e.message||(0,Pt.__)("Polling for AI content failed","templately")))},null==n?void 0:n.signal,O);if(null!=n&&n.signal){var l=function(){clearTimeout(o),null!=s&&s.cleanup&&s.cleanup(),r(new Error((0,Pt.__)("AI content workflow was cancelled","templately")))};if(n.signal.aborted)return void l();n.signal.addEventListener("abort",l)}});case 9:S=e.sent,e.next=11;break;case 10:throw e.prev=10,D=e.catch(8),new Error(D.message||(0,Pt.__)("Polling for AI content failed","templately"));case 11:if(S&&0!==Object.keys(S).length){e.next=12;break}throw new Error((0,Pt.__)("No AI templates were generated","templately"));case 12:return r.setState("polling_complete",{templates:S}),x={isLocalSite:O,session_id:k.session_id,process_id:E.process_id,templates:S||{},pack_downloaded:k.pack_downloaded,ai_page_ids:Object.values(t.AIPageIDs||{}).flat().filter(function(e){return(t.preview_pages||[]).includes(e)})},u("Workflow completed successfully"),clearTimeout(i),r.setState("updating"),r.setState("preparing"),r.setState("workflow_complete",x),e.abrupt("return",x);case 13:if(e.prev=13,M=e.catch(1),clearTimeout(i),!(null!==(_=M.message)&&void 0!==_&&_.includes("timeout")||o.signal.aborted)){e.next=14;break}throw $i("AI Content Workflow timed out"),(T=new Error((0,Pt.__)("AI content workflow timed out","templately"))).cause="timeout",r.setState("error",T),T;case 14:if(!("AbortError"===M.name||null!==(C=M.message)&&void 0!==C&&C.includes("cancelled")||null!==(P=M.message)&&void 0!==P&&P.includes("abort"))){e.next=15;break}throw $i("AI Content Workflow was cancelled"),(A=new Error((0,Pt.__)("AI content workflow was cancelled","templately"))).cause="cancelled",r.setState("error",A),A;case 15:throw console.error("AI Content Workflow Error:",M),M.cause||(M.cause="workflowGeneral"),r.setState("error",M),M;case 16:case"end":return e.stop()}},e,null,[[1,13],[8,10]])}));return function(t){return e.apply(this,arguments)}}(),AP=5e3,DP={OVERALL_TIMEOUT:3e5,POLLING_TIMEOUT:3e5,PARALLEL_OPERATIONS_TIMEOUT:12e4},MP=function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8?arguments[8]:void 0;if(!t||!e||(0,_i.isEmpty)(n))return null==a||a(new Error((0,Pt.__)("Process ID or page IDs missing","templately"))),null;if(null!=s&&s.aborted)return null==a||a(new Error((0,Pt.__)("Polling was cancelled","templately"))),null;var c=Date.now(),u=(Date.now(),l?15e3:2e3),d=0,p=null,h={},f=!1,m=function(e){var t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return n>0?"".concat(n,"m ").concat(r,"s"):"".concat(t,"s")},g=Object.values(n||{}).flat(),v=g,y={isActive:!0,cleanup:function(){y.isActive=!1,p&&(clearTimeout(p),p=null)}},b=function(){if(l)return 15e3;var e=2*(Math.random()-.5)*.05,t=Math.min(u*(1+e),AP);return u=Math.min(1.3*u,AP),Math.round(t)},w=function(){var r=ni(oi().mark(function r(){var k,E,O,S,x,_,C,P,T,A,D,M,N,L,I,R;return oi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!(!y.isActive||null!=s&&s.aborted||f)){r.next=1;break}return r.abrupt("return");case 1:return f=!0,d++,r.prev=2,E=Date.now(),O=Date.now()-c,$i("AI polling attempt ".concat(d,", elapsed time: ").concat(m(O))),S=l?"templately_pack_ai_poll_template":"templately_pack_ai_get_json",x=(0,si.addQueryArgs)(window.ajaxurl,{action:S,session_id:e,is_lightspeed:!0,nonce:window.templately.nonce}),r.next=3,fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({process_id:t,ai_page_ids:n}),signal:s});case 3:return _=r.sent,r.next=4,_.json();case 4:if(C=r.sent,P=Date.now()-E,null==C||!C.success||null===(k=C.data)||void 0===k||!k.templates){r.next=8;break}if(A=xP({},C.data.templates),Object.assign(h,A),v=g.filter(function(e){return!h[e]}),$i("missing pages: ".concat(v.length," of ").concat(g.length)),$i("receivedData",h),Object.keys(h).forEach(function(e){(0,_i.isEmpty)(h[e])&&delete h[e]}),null==o||o(h,v),D=null===(T=C.data)||void 0===T?void 0:T.is_last_part,!l||!D){r.next=6;break}if(y.cleanup(),M=Date.now()-c,$i("AI polling completed (is_last_part=true) after ".concat(d," attempts in ").concat(m(M))),!(v.length>0)){r.next=5;break}return null==a||a(new Error((0,Pt.__)("AI content generation incomplete: ".concat(v.length," pages still missing when process marked as complete"),"templately"))),r.abrupt("return");case 5:return null==i||i(h,v),r.abrupt("return");case 6:if(0!==v.length){r.next=7;break}return y.cleanup(),N=Date.now()-c,$i("AI polling completed after ".concat(d," attempts in ").concat(m(N))),null==i||i(h,v),r.abrupt("return");case 7:Object.keys(A).length>0&&(Date.now(),l||(u=2e3)),!l&&P>3e3&&(u=Math.min(1.5*u,AP)),r.next=9;break;case 8:if(null!=C&&C.success){r.next=9;break}return y.cleanup(),null==a||a(new Error((null==C?void 0:C.data)||(0,Pt.__)("Polling failed","templately"))),r.abrupt("return");case 9:r.next=12;break;case 10:if(r.prev=10,!("AbortError"===(R=r.catch(2)).name||null!=s&&s.aborted)){r.next=11;break}return $i("AI polling was cancelled"),y.cleanup(),null==a||a(new Error((0,Pt.__)("Polling was cancelled","templately"))),r.abrupt("return");case 11:L=Date.now()-c,$i("AI polling attempt ".concat(d," failed after ").concat(m(L),":"),R.message),!l&&R.status>=500&&(u=Math.min(2*u,AP));case 12:f=!1,!y.isActive||null!=s&&s.aborted||(I=b(),p=setTimeout(w,I));case 13:case"end":return r.stop()}},r,null,[[2,10]])}));return function(){return r.apply(this,arguments)}}();if(s){var k=function(){y.cleanup(),null==a||a(new Error((0,Pt.__)("Polling was cancelled","templately")))};s.addEventListener("abort",k);var E=y.cleanup;y.cleanup=function(){E(),s.removeEventListener("abort",k)}}return w(),y};function NP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NP(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IP(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const jP=fn(function(e){var t,n;return{profile:null!==(t=null==e||null===(n=e.profile)||void 0===n?void 0:n.data)&&void 0!==t?t:{}}})(function(e){var t,n,r=e.setSidebarShowState,o=e.hideAiSidebar,i=e.packId,a=e.creditDataLoading,s=e.creditData,l=e.setCreditLimitPopoverOpen,c=e.setCreditLimitWarningPopover,u=e.profile,d=void 0===u?{}:u,p=e.onGeneratingProgressVisibilityChange,h=bn(),f=On(function(e){return e.general.platform}),m=On(function(e){var t;return(null==e||null===(t=e.general)||void 0===t||null===(t=t.fullSiteImport)||void 0===t?void 0:t.packInfo)||{data:null}},Kt),g=pe((0,oe.useState)(null),2),v=g[0],y=g[1],b=pe((0,oe.useState)(!1),2),w=b[0],k=b[1],E=pe((0,oe.useState)([]),2),O=E[0],S=E[1],x=(0,oe.useCallback)(function(e){try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),ie(!0),Ue.current=setTimeout(function(){L(function(t){return RP(RP({},t),{},{key:e})}),Ue.current=null;var t=setTimeout(function(){ie(!1)},150);ze.current.push(t)},100)}catch(t){console.error("Error in changeStepWithDelay:",t),L(function(t){return RP(RP({},t),{},{key:e})}),ie(!1)}},[]),_=(0,oe.useCallback)(function(){try{var e;return(null===(e=window)||void 0===e||null===(e=e.templately)||void 0===e?void 0:e.wp_user_avatar)||(null!=d&&d.profile_photo?d.profile_photo:null)}catch(e){return console.error("Error getting profile image source:",e),(null==d?void 0:d.profile_photo)||null}},[null==d?void 0:d.profile_photo]),C=(0,oe.useMemo)(function(){try{var e=Array.isArray(O)?O.filter(function(e){return!bx.includes(e)}):[];return[].concat(Da(bx),Da(e))}catch(e){return console.error("Error creating categories:",e),[]}},[O]),P=pe((0,oe.useState)(function(){return xx(null==d?void 0:d.first_name)}),2),T=P[0],A=P[1],D=(0,oe.useMemo)(function(){return xx(null==d?void 0:d.first_name)},[null==d?void 0:d.first_name]);(0,oe.useEffect)(function(){A(function(e){var t,n,r=xx(null==d?void 0:d.first_name);return(null===(t=e[0])||void 0===t?void 0:t.question)!==(null===(n=r[0])||void 0===n?void 0:n.question)?r.map(function(t,n){var r,o,i;return RP(RP({},t),{},{done:(null===(r=e[n])||void 0===r?void 0:r.done)||!1,result:(null===(o=e[n])||void 0===o?void 0:o.result)||null,editMode:(null===(i=e[n])||void 0===i?void 0:i.editMode)||!1})}):e})},[null==d?void 0:d.first_name]);var M=pe((0,oe.useState)({key:"start",isThinking:!1,isTyping:!1}),2),N=M[0],L=M[1],I=pe((0,oe.useState)(""),2),R=I[0],j=I[1],F=pe((0,oe.useState)(""),2),z=F[0],B=F[1],U=pe((0,oe.useState)(""),2),V=U[0],W=U[1],H=pe((0,oe.useState)([]),2),Q=H[0],q=H[1],$=pe((0,oe.useState)({}),2),G=$[0],Y=$[1],X=pe((0,oe.useState)({}),2),K=X[0],Z=X[1],J=pe((0,oe.useState)(!1),2),ee=J[0],te=J[1],ne=pe((0,oe.useState)(!1),2),re=ne[0],ie=ne[1],se=pe((0,oe.useState)(!0),2),le=se[0],ce=se[1],ue=pe((0,oe.useState)(new Set),2),de=ue[0],he=ue[1],fe=pe((0,oe.useState)(!1),2),me=fe[0],ge=fe[1],ve=pe((0,oe.useState)(!1),2),ye=ve[0],be=ve[1],we=(0,oe.useRef)(null),ke=pe((0,oe.useState)({isValid:!0,errorMessage:""}),2),Ee=ke[0],Oe=ke[1],Se=pe((0,oe.useState)({isValid:!0,errorMessage:""}),2),xe=Se[0],_e=Se[1],Ce=pe((0,oe.useState)({isValid:!0,errorMessage:""}),2),Pe=Ce[0],Te=Ce[1],Ae=pe((0,oe.useState)({start:!1,complete:!1,errorMessage:null}),2),De=Ae[0],Me=Ae[1],Ne=(0,oe.useRef)(null),Le=(0,oe.useRef)({stepStatusSetter:null,resetProgress:null,startProgress:null,completeProgress:null,setProgressError:null}),Ie=(0,oe.useCallback)(function(e){Me(e)},[]),Re=(0,oe.useCallback)(function(e){Le.current.stepStatusSetter=e},[]),je=(0,oe.useCallback)(function(e){Le.current.resetProgress=e.resetProgress,Le.current.startProgress=e.startProgress,Le.current.completeProgress=e.completeProgress,Le.current.setProgressError=e.setProgressError},[]),Fe=(0,oe.useCallback)(function(){Ne.current&&($i("No pending steps detected, submitting immediately with AI templates:",Ne.current),ct(Ne.current),Ne.current=null,Le.current.completeProgress&&Le.current.completeProgress(),Ue.current=null)},[ct]);(0,oe.useEffect)(function(){var e=(null==De?void 0:De.start)&&!De.complete;p&&p(e)},[De,p]);var ze=(0,oe.useRef)([]),Be=(0,oe.useRef)([]),Ue=(0,oe.useRef)(null),Ve=(0,oe.useRef)(null);(0,oe.useEffect)(function(){return function(){if(ze.current.forEach(function(e){e&&clearTimeout(e)}),ze.current=[],Be.current.forEach(function(e){e&&clearInterval(e)}),Be.current=[],Ue.current&&(clearTimeout(Ue.current),Ue.current=null),qe.cancel(),Ve.current)try{Ve.current.abort("Component unmounted"),Ve.current=null}catch(e){console.warn("Error aborting AI workflow:",e)}}},[qe]),(0,oe.useEffect)(function(){var e=function(e){if("Enter"===e.key&&"start"===(null==N?void 0:N.key)){var t=document.activeElement;t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||"true"===t.contentEditable)||(e.preventDefault(),e.stopPropagation())}};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}},[null==N?void 0:N.key]),(0,oe.useEffect)(function(){(null==C?void 0:C.length)>0&&q(C)},[C]),(0,oe.useEffect)(function(){if(m.data){var e=function(e){var t,n,r,o,i,a,s,l={businessNiches:null,aiProcess:null,creditInfo:null,aiPageIDs:null,previewPages:null,ai_preview_content:null};if(null!=e&&null!==(t=e.data)&&void 0!==t&&t.business_niches&&(l.businessNiches=e.data.business_niches),null!=e&&null!==(n=e.data)&&void 0!==n&&n.ai_preview_content&&(l.ai_preview_content=e.data.ai_preview_content),null!=e&&null!==(r=e.data)&&void 0!==r&&r.ai_process){var c=e.data.ai_process;l.aiProcess={processId:null==c?void 0:c.process_id,name:null==c?void 0:c.name,category:null==c?void 0:c.category,description:null==c?void 0:c.description,email:null==c?void 0:c.email,contactNumber:null==c?void 0:c.contactNumber,businessAddress:null==c?void 0:c.businessAddress,openingHour:null==c?void 0:c.openingHour}}if(null!=e&&null!==(o=e.data)&&void 0!==o&&o.credit_balance||null!=e&&null!==(i=e.data)&&void 0!==i&&i.estimated_cost){var u,d,p=null!==(u=e.data.credit_balance)&&void 0!==u?u:{},h=null!==(d=e.data.estimated_cost)&&void 0!==d?d:0;l.creditInfo=LP(LP({},p),{},{estimated_cost:h})}if(null!=e&&null!==(a=e.data)&&void 0!==a&&null!==(a=a.manifest)&&void 0!==a&&null!==(a=a.content)&&void 0!==a&&a.page||null!=e&&null!==(s=e.data)&&void 0!==s&&null!==(s=s.manifest)&&void 0!==s&&s.templates){var f,m,g,v,y=null!==(f=null==e||null===(m=e.data)||void 0===m||null===(m=m.manifest)||void 0===m||null===(m=m.content)||void 0===m?void 0:m.page)&&void 0!==f?f:{},b=null!==(g=null==e||null===(v=e.data)||void 0===v||null===(v=v.manifest)||void 0===v?void 0:v.templates)&&void 0!==g?g:{},w=Object.values(b),k=Object.values(y).filter(function(e){var t;return!0!==(null===(t=e.page_settings)||void 0===t?void 0:t.page_for_posts)}),E=Object.values(y).filter(function(e){var t;return!0===(null===(t=e.page_settings)||void 0===t?void 0:t.page_on_front)}).map(function(e){return e.post_id}),O=k.map(function(e){return e.post_id}),S=w.filter(function(e){return!O.includes(e.post_id)}).map(function(e){return e.post_id}),x=w.filter(function(e){return"header"===e.type||"footer"===e.type}).map(function(e){return e.post_id}),_=Da(x);x.length>0&&(l.headerFooterIDs=x),(E.length>0||_.length>0)&&(l.previewPages=[].concat(Da(E),Da(_))),(O.length>0||S.length>0)&&(l.aiPageIDs={"content/page":O,templates:S})}return l}(m);if(m.data.business_niches&&S(m.data.business_niches),e.aiProcess){var t=e.aiProcess;A(function(e){return e.map(function(e){var n,r=null===(n=D.find(function(t){return t.key===e.key}))||void 0===n?void 0:n.editable;return"start"===e.key?RP(RP({},e),{},{editable:!1,done:!0}):"finalize"===e.key?RP(RP({},e),{},{editable:!1,question:"<p>".concat("Welcome back,"," ",(null==d?void 0:d.first_name)||(0,Pt.__)("there","templately"),"! 👋 ").concat((0,Pt.__)("Would you like us to generate your website content based on your previous conversation?","templately"),"</p>")}):Object.hasOwn(t,e.key)&&t[e.key]?RP(RP({},Je(t[e.key],{key:e.key},e)),{},{editable:r}):Object.hasOwn(t,e.key)&&!t[e.key]?RP(RP({},e),{},{done:!0,editable:r,answer:(0,Pt.__)("I want to skip the question","templately")}):RP(RP({},e),{},{editable:!1})})}),L({key:"finalize",isThinking:!1,isTyping:!1})}y(e)}},[m]),(0,oe.useEffect)(function(){v&&ce(!1)},[v]);var We=(0,oe.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;try{if(!e||!Array.isArray(e))return console.warn("getNextStep: Invalid conversationSteps provided"),null;var r=null!=n?n:t,o=e.findIndex(function(e){return(null==e?void 0:e.key)===r});return-1!==o&&o<e.length-1?e[o+1]:null}catch(e){return console.error("Error in getNextStep:",e),null}}(T,null==N?void 0:N.key,e)},[T,null==N?void 0:N.key]),He=ae().useMemo(function(){return function(e){try{return e&&Array.isArray(e)?e.some(function(e){return!0===(null==e?void 0:e.editMode)}):(console.warn("checkAnyConversationInEditMode: Invalid conversationSteps provided"),!1)}catch(e){return console.error("Error in checkAnyConversationInEditMode:",e),!1}}(T)},[T]),Qe=(0,oe.useCallback)(function(e){if(e.preventDefault(),!Ue.current&&!He)if("category"===(null==N?void 0:N.key))try{if(null==R||!R.trim())return void console.warn("Category submission blocked: Invalid category data");var t=kx(R,4);if(Te(t),!t.isValid)return void console.warn("Category submission blocked: Too many words");te(!1),et(R)}catch(e){return void console.error("Error submitting category:",e)}else if("email"===(null==N?void 0:N.key)){var n=wx(V);if(Oe(n),!n.isValid)return void console.warn("Email submission blocked: Invalid email");te(!1),et(V.trim())}else if("contactNumber"===(null==N?void 0:N.key)){var r=Ex(V);if(_e(r),!r.isValid)return void console.warn("Phone submission blocked: Invalid phone number");te(!1),et(V.trim())}else{if(null==V||!V.trim())return;te(!1),et(V)}},[null==N?void 0:N.key,R,V,He,et]),qe=(0,oe.useMemo)(function(){return(0,_i.throttle)(function(e,t,n){!function(e,t,n){try{var r=(null!=t?t:[]).map(function(t){try{if(!t||"string"!=typeof t)return null;var n=e.toLowerCase(),r=t.toLowerCase(),o=n.split(/\s+/).filter(function(e){return e.length>0}),i=r.split(/\s+/).filter(function(e){return e.length>0}),a=0,s=!1;r===n&&(a+=1e3,s=!0),r.startsWith(n)&&(a+=500,s=!0),n.startsWith(r)&&(a+=400,s=!0),r.includes(n)?(a+=300,s=!0):n.includes(r)&&(a+=250,s=!0);var l=o.length,c=0;return o.forEach(function(e,t){i.forEach(function(n){var r=0,o=!1;if(n===e?(r=100,o=!0):n.startsWith(e)?(r=80,o=!0):e.startsWith(n)?(r=70,o=!0):n.includes(e)?(r=50,o=!0):e.includes(n)&&(r=40,o=!0),o)if(s=!0,t<l)l=t,c=r+(1e4-1e3*t);else if(t===l){var i=r+(1e4-1e3*t);c=Math.max(c,i)}})}),a+=c,i.forEach(function(e){n.includes(e)?(a+=30,s=!0):e.includes(n)&&(a+=25,s=!0)}),s?{category:t,relevanceScore:a}:null}catch(e){return console.warn("Error scoring category:",t,e),null}}).filter(Boolean).sort(function(e,t){return t.relevanceScore-e.relevanceScore}).map(function(e){return e.category});n(r.length>0?r:[])}catch(e){console.error("Error in performCategorySearch:",e),n(t)}}(e,t,n)},150)},[]),$e=(0,oe.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{var n="string"==typeof e?e:"";B(n);var r=n.trim(),o=kx(n,4);if(Te(o),!r)return j(""),q(C),qe.cancel(),void Te({isValid:!0,errorMessage:""});if(j(r),t&&ge(!1),t){var i=setTimeout(function(){try{if(!(null==T?void 0:T.some(function(e){return null==e?void 0:e.editMode}))&&null!=we&&we.current)try{we.current.focus();var e=r.length;we.current.setSelectionRange(e,e)}catch(e){console.warn("Could not focus category input:",e)}ze.current=ze.current.filter(function(e){return e!==i})}catch(e){console.warn("Error in focus timeout:",e)}},50);ze.current.push(i)}qe(r,C,q)}catch(e){console.error("Error in handleCategoryInputChange:",e),B(""),j(""),q(C),Te({isValid:!0,errorMessage:""})}},[C,T,qe]),Ge=(0,oe.useCallback)(function(e){try{if(W(null!=e?e:""),"email"===(null==N?void 0:N.key)){var t=wx(e);Oe(t),_e({isValid:!0,errorMessage:""})}else if("contactNumber"===(null==N?void 0:N.key)){var n=Ex(e);_e(n),Oe({isValid:!0,errorMessage:""})}else Oe({isValid:!0,errorMessage:""}),_e({isValid:!0,errorMessage:""});"category"!==(null==N?void 0:N.key)&&Te({isValid:!0,errorMessage:""})}catch(e){console.error("Error in handleTextInputChange:",e),W(""),Oe({isValid:!0,errorMessage:""}),_e({isValid:!0,errorMessage:""}),Te({isValid:!0,errorMessage:""})}},[null==N?void 0:N.key]),Ye=(0,oe.useCallback)(function(){te(!1),ie(!0),A(function(e){return e.map(function(e){return"start"===(null==e?void 0:e.key)?RP(RP({},e),{},{done:!0}):e})});var e=setTimeout(function(){x("name"),ze.current=ze.current.filter(function(t){return t!==e})},30);ze.current.push(e)},[x]),Xe=(0,oe.useCallback)(function(){var e=xx(null==d?void 0:d.first_name).filter(function(e){return"start"!==e.key});A(e),L({key:"name",isThinking:!1,isTyping:!1}),te(!1),y(function(e){return RP(RP({},e),{},{aiProcess:null})})},[null==d?void 0:d.first_name]),Ke=(0,oe.useMemo)(function(){var e;return(null==T||null===(e=T.find(function(e){return(null==e?void 0:e.key)===(null==N?void 0:N.key)}))||void 0===e?void 0:e.tooltip)||null},[T,null==N?void 0:N.key]);(0,oe.useEffect)(function(){var e;return(null==N?void 0:N.isThinking)||(null==N?void 0:N.isTyping)||le?be(!1):Ke?(e=setTimeout(function(){be(!0),null!=ze&&ze.current&&(ze.current=ze.current.filter(function(t){return t!==e}))},120),null!=ze&&ze.current&&ze.current.push(e)):be(!1),function(){e&&(clearTimeout(e),null!=ze&&ze.current&&(ze.current=ze.current.filter(function(t){return t!==e})))}},[Ke,null==N?void 0:N.isThinking,null==N?void 0:N.isTyping,le,ze]),(0,oe.useEffect)(function(){var e=(null==T?void 0:T.filter(function(e){return null==e?void 0:e.done}))||[],t=[];return e.forEach(function(e){if(null!=e&&e.key){var n=setTimeout(function(){he(function(t){return new Set([].concat(Da(t),[e.key]))})},200);t.push(n)}}),function(){t.forEach(function(e){return clearTimeout(e)})}},[T]),(0,oe.useEffect)(function(){if(!(null!=N&&N.isThinking||null!=N&&N.isTyping)){ie(!0),L(function(e){return RP(RP({},e),{},{isThinking:!0})});var e=setTimeout(function(){ie(!1),ze.current=ze.current.filter(function(t){return t!==e})},100);ze.current.push(e)}},[null==N?void 0:N.key]),(0,oe.useEffect)(function(){if(null!=N&&N.isThinking){if(Cx())return void L(function(e){return RP(RP({},e),{},{isThinking:!1,isTyping:!0})});var e=setTimeout(function(){ie(!0),L(function(e){return RP(RP({},e),{},{isThinking:!1,isTyping:!0})}),ie(!1)},1800);return ze.current.push(e),function(){clearTimeout(e),ze.current=ze.current.filter(function(t){return t!==e})}}},[null==N?void 0:N.isThinking]),(0,oe.useEffect)(function(){var e;return(null==N?void 0:N.isThinking)||(null==N?void 0:N.isTyping)?te(!1):(e=setTimeout(function(){te(function(e){return e||!0})},120),ze.current.push(e)),function(){e&&(clearTimeout(e),ze.current=ze.current.filter(function(t){return t!==e}))}},[null==N?void 0:N.isThinking,null==N?void 0:N.isTyping,null==N?void 0:N.key]);var Ze=(0,oe.useCallback)(function(){try{A(function(e){var t;return null!==(t=null==e?void 0:e.map(function(e){return(null==e?void 0:e.key)===(null==N?void 0:N.key)?RP(RP({},e),{},{done:!0,answer:(0,Pt.__)("I want to skip the question","templately")}):e}))&&void 0!==t?t:[]});var e=We();null!=e&&e.key&&x(e.key)}catch(e){console.error("Error in handleAnswerSkip:",e)}},[null==N?void 0:N.key,We,x]),Je=function(e,t,n){if((null==n?void 0:n.key)===(null==t?void 0:t.key)){var r=null!=e?e:"",o=null!=e?e:"";return RP(RP({},n),{},{done:!0,answer:r,result:o})}return n},et=(0,oe.useCallback)(function(e){try{if("category"===(null==N?void 0:N.key))try{var t=null!=e?e:"",n=(null!=C?C:[]).some(function(e){try{return e===t}catch(t){return console.warn("Error checking category:",e,t),!1}});k(!n)}catch(e){console.error("Error detecting category type:",e),k(!0)}A(function(t){var n;return null!==(n=null==t?void 0:t.map(function(t){return Je(e,N,t)}))&&void 0!==n?n:[]}),"category"!==(null==N?void 0:N.key)&&W("");var r=We();null!=r&&r.key&&x(r.key)}catch(e){console.error("Error in handleAnswerSubmit:",e)}},[null==N?void 0:N.key,We,C,x]),tt=(0,oe.useCallback)(function(e){try{if(!e)return void console.warn("handleEdit: No key provided");var t=null==T?void 0:T.find(function(t){return(null==t?void 0:t.key)===e});if(!t)return void console.warn("handleEdit: No conversation found for key: ".concat(e));if("category"===e)try{if(null!=t&&t.result){var n=(null!=C?C:[]).find(function(e){try{return e===t.result}catch(t){return console.warn("Error checking category in edit:",e,t),!1}});n?(B(n||""),j(n||""),q(C),k(!1),Z(function(n){return RP(RP({},n),{},Ct({},e,t.result))})):(B(t.result),j(t.result),q([]),k(!0),Z(function(n){return RP(RP({},n),{},Ct({},e,t.result))}))}else B(""),j(""),q(C),k(!1)}catch(e){console.error("Error in category edit setup:",e),B(""),j(""),q(C),k(!1)}else null!=t&&t.result&&(Y(function(n){return RP(RP({},n),{},Ct({},e,t.result))}),Z(function(n){return RP(RP({},n),{},Ct({},e,t.result))}));A(function(t){var n;return null!==(n=null==t?void 0:t.map(function(t){return(null==t?void 0:t.key)===e?RP(RP({},t),{},{editMode:!0}):t}))&&void 0!==n?n:[]})}catch(e){console.error("Error in handleEdit:",e)}},[T,C]),nt=(0,oe.useCallback)(function(e){if("category"===e){var t=R||z||"",n=(null==K?void 0:K[e])||"";return t.trim()!==n.trim()}var r=(null==G?void 0:G[e])||"",o=(null==K?void 0:K[e])||"";return r.trim()!==o.trim()},[R,z,G,K]),rt=(0,oe.useCallback)(function(e,t){try{if(!e)return void console.warn("handleEditInputChange: No key provided");if(Y(function(n){return RP(RP({},n),{},Ct({},e,null!=t?t:""))}),"email"===e){var n=wx(t);Oe(n)}else if("contactNumber"===e){var r=Ex(t);_e(r)}}catch(e){console.error("Error in handleEditInputChange:",e)}},[]),ot=(0,oe.useCallback)(function(e){try{var t,n;if(!e)return void console.warn("handleEditSubmit: No key provided");if(!nt(e))return void $i("handleEditSubmit: No changes detected, skipping submission");var r=null!==(t=null==G||null===(n=G[e])||void 0===n?void 0:n.trim())&&void 0!==t?t:"";if("category"!==e&&!r)return void console.warn("handleEditSubmit: No value provided");if("email"===e){var o=wx(r);if(Oe(o),!o.isValid)return void console.warn("Email edit submission blocked: Invalid email")}else if("contactNumber"===e){var i=Ex(r);if(_e(i),!i.isValid)return void console.warn("Phone edit submission blocked: Invalid phone number")}if("category"===e){var a=kx(R,4);if(Te(a),!a.isValid)return void console.warn("".concat(e," edit submission blocked: Too many words"))}A(function(t){var n;return null!==(n=null==t?void 0:t.map(function(t){if((null==t?void 0:t.key)===e){var n="category"===e?R:r,o="category"===e?R:r;return RP(RP({},t),{},{editMode:!1,answer:n,result:o})}return t}))&&void 0!==n?n:[]}),"category"===e?(B(""),j(""),q(C),k(!1)):Y(function(t){var n=RP({},t);return delete n[e],n}),Z(function(t){var n=RP({},t);return delete n[e],n}),y(function(e){return RP(RP({},e),{},{ai_preview_content:null})})}catch(e){console.error("Error in handleEditSubmit:",e)}},[G,T,We,R,C,nt]),it=(0,oe.useCallback)(function(e){try{if(!e)return void console.warn("handleEditCancel: No key provided");A(function(t){var n;return null!==(n=null==t?void 0:t.map(function(t){return(null==t?void 0:t.key)===e?RP(RP({},t),{},{editMode:!1}):t}))&&void 0!==n?n:[]}),"category"===e?(B(""),j(""),q(C),k(!1)):Y(function(t){var n=RP({},t);return delete n[e],n}),Z(function(t){var n=RP({},t);return delete n[e],n})}catch(e){console.error("Error in handleEditCancel:",e)}},[C]),at=(0,oe.useCallback)(function(){try{L(function(e){return RP(RP({},e),{},{isTyping:!1})})}catch(e){console.error("Error in handleTypingComplete:",e)}},[]),st=(0,oe.useCallback)(ni(oi().mark(function e(){var t,n,r,o,u,d,p,h,m,g,y,b;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("AI_GENERATION_IN_PROGRESS"!==Ue.current){e.next=1;break}return console.warn("AI generation already in progress"),e.abrupt("return");case 1:if(!a&&s){e.next=2;break}return console.warn("Credit data is still loading"),e.abrupt("return");case 2:if(s.is_first_generation){e.next=3;break}if(s.available_credit&&!(s.available_credit<s.estimated_cost)){e.next=3;break}return l(!0),c(!0),e.abrupt("return");case 3:if(e.prev=3,t=new AbortController,Ve.current=t,Ue.current="AI_GENERATION_IN_PROGRESS",A(function(e){return e.map(function(e){return"finalize"===(null==e?void 0:e.key)?RP(RP({},e),{},{done:!0}):e})}),n={},T.forEach(function(e){e.done&&e.result&&(n[e.key]=e.result)}),i){e.next=4;break}return console.error("Pack ID not found in AI sidebar context"),Ue.current=null,te(!0),e.abrupt("return");case 4:if((r={pack_id:i,platform:f,isBusinessNichesNew:w,ai_page_ids:(null==v?void 0:v.aiPageIDs)||{},preview_pages:(null==v?void 0:v.previewPages)||[],name:n.name||"",category:n.category||"",description:n.description||"",email:n.email||"",contactNumber:n.contactNumber||"",businessAddress:n.businessAddress||"",openingHour:n.openingHour||""}).description){e.next=5;break}return console.error("AI prompt is missing from conversation results"),Ue.current=null,te(!0),e.abrupt("return");case 5:return Le.current.startProgress?Le.current.startProgress():console.warn("Progress start function not available"),o=Date.now(),e.next=6,TP(r,{onSessionCreated:function(e){Le.current.stepStatusSetter&&Le.current.stepStatusSetter("downloading","done"),$i("Session created:",e.session_id)},onAIContentStarted:function(e){Le.current.stepStatusSetter&&Le.current.stepStatusSetter("analyzing","done"),$i("AI content generation started:",e.process_id)},onBothCompleted:function(e){var t=e.sessionResult,n=e.aiContentResult;$i("Both AJAX calls completed:",{sessionId:t.session_id,processId:n.process_id})},onPollingComplete:function(e){Le.current.stepStatusSetter&&Le.current.stepStatusSetter("generating","done"),$i("AI content polling completed:",e)},onUpdating:function(){Le.current.stepStatusSetter&&Le.current.stepStatusSetter("updating","done")},onPreparing:function(){Le.current.stepStatusSetter&&Le.current.stepStatusSetter("preparing","done")},onWorkflowComplete:function(e){$i("AI workflow completed successfully:",e),Ve.current=null}},t);case 6:u=e.sent,d=Date.now(),p=((d-o)/1e3).toFixed(2),$i("AI workflow took ".concat(p," seconds")),h={isLocalSite:u.isLocalSite,templates:u.templates,session_id:u.session_id,process_id:u.process_id,ai_page_ids:r.ai_page_ids,preview_pages:r.preview_pages,headerFooterIDs:v.headerFooterIDs},Ne.current=h,$i("AI content generation workflow completed, templates stored for submission:",u),e.next=14;break;case 7:e.prev=7,y=e.catch(3),console.error("Error in startAIGeneration:",y),m=y.message||(0,Pt.__)("Oops! An unexpected error occurred.","templately"),g=null,b=y.cause,e.next="cancelled"===b?8:"timeout"===b?9:"createSessionAndDownloadPack"===b?10:"startModifyAiContent"===b?11:12;break;case 8:return $i("AI generation was cancelled"),Ue.current=null,Ve.current=null,te(!0),Le.current.resetProgress&&Le.current.resetProgress(),e.abrupt("return");case 9:return m=(0,Pt.__)("Oops! It's taking a bit longer than usual.","templately"),g=null,e.abrupt("continue",13);case 10:return m=(0,Pt.__)("Sorry, something went wrong. Please try again or contact support.","templately"),g=0,console.error("Session/Download Error:",y.originalError),e.abrupt("continue",13);case 11:return m=(0,Pt.__)("Oops! Something went wrong while updating your content.","templately"),g=2,console.error("AI Content Error:",y.originalError),e.abrupt("continue",13);case 12:return m=(0,Pt.__)("Sorry, something went wrong. Please try again or contact support.","templately"),g=3,e.abrupt("continue",13);case 13:Ue.current=null,Ve.current=null,te(!0),Le.current.setProgressError&&Le.current.setProgressError(m,g);case 14:case"end":return e.stop()}},e,null,[[3,7]])})),[i,T,f,v,w,s,l,c,ct,De]),lt=(0,oe.useCallback)(function(){var e;if(null!=m&&null!==(e=m.data)&&void 0!==e&&null!==(e=e.ai_process)&&void 0!==e&&e.process_id){var t=m.data.ai_process,n={templates:m.data.ai_preview_content,session_id:t.session_id,process_id:t.process_id,ai_page_ids:t.ai_page_ids,preview_pages:t.ai_preview_ids,headerFooterIDs:v.headerFooterIDs};ct(n)}},[m,v,ct]),ct=(0,oe.useCallback)(function(e){null==r||r(function(e){return RP(RP({},e),{},{finishAnimation:!0})});var t=setTimeout(function(){null==o||o(),null==r||r(function(e){return RP(RP({},e),{},{show:!1,finishAnimation:!1})}),h(fg({aiTemplates:e})),ze.current=ze.current.filter(function(e){return e!==t})},500);return ze.current.push(t),t},[r,o,h]),ut=(0,oe.useCallback)(function(){try{var e,t=null!==(e=null==Q?void 0:Q.slice(2))&&void 0!==e?e:[];return ae().createElement(ae().Fragment,null,t.map(function(e,t){try{if(!e)return null;var n="category-more-".concat(t),r="category-radio-more-".concat(n);return ae().createElement("label",{key:n,htmlFor:r,className:"templately-fsi-ai-sidebar-conversation-category"},ae().createElement("input",{id:r,type:"radio",name:"category",value:n,checked:R===e,onChange:function(){return $e(e,!0)}}),ae().createElement("span",null,null!=e?e:(0,Pt.__)("Unknown Category","templately")))}catch(t){return console.warn("Error rendering category in MoreCategoryPanel:",e,t),null}}))}catch(e){return console.error("Error in MoreCategoryPanel:",e),ae().createElement(ae().Fragment,null)}},[Q,R,$e]);return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-fsi-ai-sidebar-body"},"start"===(null==N?void 0:N.key)&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-info-wrapper"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-info"},(0,Pt.__)("You can check your AI Credits here!","templately"),ae().createElement("br",null),(0,Pt.__)("Buy credits if you needed!","templately")),ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-info-icon"},ae().createElement(hx,null))),ae().createElement("div",{className:"templately-fsi-ai-sidebar-body-inner"},null==T?void 0:T.map(function(e,t){var n,r,o,i,a,s,l,c,u,p,h,f;return null!=e&&e.done?ae().createElement(ae().Fragment,{key:"conversation-".concat(null==e?void 0:e.key,"-").concat(t)},ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation ai-conversation ".concat(de.has(null==e?void 0:e.key)?"animate-in":"")},ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-icon"},ae().createElement(yx,null)),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text-wrapper"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text",dangerouslySetInnerHTML:{__html:null!==(n=null==e?void 0:e.question)&&void 0!==n?n:""}}))),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation client-conversation ".concat(de.has(null==e?void 0:e.key)?"animate-in":"")},_()?ae().createElement("img",{src:_(),className:"templately-fsi-ai-sidebar-conversation-image",alt:null!==(r=null==d?void 0:d.name)&&void 0!==r?r:(0,Pt.__)("Profile","templately"),onError:function(e){var t,n;null!=e&&e.target&&(null!=d&&d.profile_photo&&e.target.src!==d.profile_photo?e.target.src=d.profile_photo:e.target.src=null!==(t=null===(n=window)||void 0===n||null===(n=n.templately)||void 0===n||null===(n=n.icons)||void 0===n?void 0:n.profile)&&void 0!==t?t:"")}}):ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-icon"},ae().createElement("span",null,null!=d&&d.first_name&&null!=d&&d.last_name?"".concat(null==d||null===(o=d.first_name)||void 0===o||null===(o=o.slice(0,1))||void 0===o?void 0:o.toUpperCase()).concat(null==d||null===(i=d.last_name)||void 0===i||null===(i=i.slice(0,1))||void 0===i?void 0:i.toUpperCase()):null!=d&&d.first_name?"".concat(null==d||null===(a=d.first_name)||void 0===a||null===(a=a.slice(0,2))||void 0===a?void 0:a.toUpperCase()):"".concat(null==d||null===(s=d.name)||void 0===s||null===(s=s.slice(0,2))||void 0===s?void 0:s.toUpperCase()))),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text-wrapper"},null!=e&&e.editable&&null!=e&&e.editMode?ae().createElement("form",{onSubmit:function(t){t.preventDefault(),ot(null==e?void 0:e.key)},className:"templately-fsi-ai-sidebar-conversation-text ".concat(null!=e&&e.editable&&null!=e&&e.editMode?"templately-fsi-ai-sidebar-conversation-text-editing":"")},"description"===(null==e?void 0:e.key)?ae().createElement("textarea",{className:"templately-fsi-ai-sidebar-conversation-edit-textarea",placeholder:(0,Pt.__)("Type your answer...","templately"),value:null!==(l=null==G?void 0:G[null==e?void 0:e.key])&&void 0!==l?l:"",onChange:function(t){var n,r;return rt(null==e?void 0:e.key,null!==(n=null==t||null===(r=t.target)||void 0===r?void 0:r.value)&&void 0!==n?n:"")},onKeyDown:function(t){"Enter"===t.key&&(t.preventDefault(),ot(null==e?void 0:e.key))},autoFocus:!0}):ae().createElement("input",{type:"contactNumber"===(null==e?void 0:e.key)?"tel":"email"===(null==e?void 0:e.key)?"email":"text",className:"templately-fsi-ai-sidebar-conversation-edit-input ".concat("email"===(null==e?void 0:e.key)&&!Ee.isValid||"contactNumber"===(null==e?void 0:e.key)&&!xe.isValid?"templately-fsi-ai-sidebar-conversation-edit-input-has-error":""),placeholder:"email"===(null==e?void 0:e.key)?(0,Pt.__)("Enter your email address...","templately"):"contactNumber"===(null==e?void 0:e.key)?(0,Pt.__)("Enter your phone number...","templately"):(0,Pt.__)("Type your answer...","templately"),value:"category"===(null==e?void 0:e.key)?null!=z?z:"":null!==(c=null==G?void 0:G[null==e?void 0:e.key])&&void 0!==c?c:"",onChange:function(t){var n,r,o,i;"category"===(null==e?void 0:e.key)?$e(null!==(n=null==t||null===(r=t.target)||void 0===r?void 0:r.value)&&void 0!==n?n:""):rt(null==e?void 0:e.key,null!==(o=null==t||null===(i=t.target)||void 0===i?void 0:i.value)&&void 0!==o?o:"")},autoFocus:!0}),"category"===(null==e?void 0:e.key)&&(null==Q?void 0:Q.length)>0&&Pe.isValid?ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-categories-wrapper"},Q.map(function(e,t){var n="category-edit-".concat(t),r="category-radio-edit-".concat(n);return ae().createElement("label",{key:n,htmlFor:r,className:"templately-fsi-ai-sidebar-conversation-category"},ae().createElement("input",{id:r,type:"radio",name:"edit-category",value:n,checked:R===e,onChange:function(){return $e(e,!0)}}),ae().createElement("span",null,null!=e?e:(0,Pt.__)("Unknown Category","templately")))})):null,ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-edit-footer"},"email"===(null==e?void 0:e.key)&&!Ee.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},Ee.errorMessage),"contactNumber"===(null==e?void 0:e.key)&&!xe.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},xe.errorMessage),"category"===(null==e?void 0:e.key)&&!Pe.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},Pe.errorMessage),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-edit-buttons"},ae().createElement("button",{type:"button",onClick:function(){return it(null==e?void 0:e.key)},className:"templately-fsi-ai-sidebar-conversation-edit-cancel","aria-label":(0,Pt.__)("Cancel editing","templately")},(0,Pt.__)("Cancel","templately")),ae().createElement("button",{type:"submit",className:"templately-fsi-ai-sidebar-conversation-edit-submit",disabled:"category"===(null==e?void 0:e.key)?!(null!=z&&z.trim()&&nt(null==e?void 0:e.key)&&Pe.isValid):"email"===(null==e?void 0:e.key)?!(null!=G&&null!==(u=G[null==e?void 0:e.key])&&void 0!==u&&u.trim()&&Ee.isValid&&nt(null==e?void 0:e.key)):"contactNumber"===(null==e?void 0:e.key)?!(null!=G&&null!==(p=G[null==e?void 0:e.key])&&void 0!==p&&p.trim()&&xe.isValid&&nt(null==e?void 0:e.key)):!(null!=G&&null!==(h=G[null==e?void 0:e.key])&&void 0!==h&&h.trim()&&nt(null==e?void 0:e.key)),"aria-label":(0,Pt.__)("Save changes","templately")},(0,Pt.__)("Save","templately"))))):ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text"},ae().createElement("p",null,null!==(f=null==e?void 0:e.answer)&&void 0!==f?f:"")),(null==e?void 0:e.editable)&&"AI_GENERATION_IN_PROGRESS"!==Ue.current&&ae().createElement("button",{onClick:function(){return tt(null==e?void 0:e.key)},disabled:He,className:"templately-fsi-ai-sidebar-conversation-text-edit","aria-label":(0,Pt.__)("Edit answer","templately"),title:"AI_GENERATION_IN_PROGRESS"===Ue.current?(0,Pt.__)("Cannot edit while AI generation is in progress","templately"):He?(0,Pt.__)("Please finish editing the current conversation first","templately"):(0,Pt.__)("Edit","templately")},ae().createElement(gx,null))))):(null==e?void 0:e.key)===(null==N?void 0:N.key)?ae().createElement("div",{key:"current-".concat(null==e?void 0:e.key),className:"templately-fsi-ai-sidebar-conversation current-question ".concat(re?"transitioning":""," ").concat("finalize"===(null==N?void 0:N.key)&&null!=De&&De.start?"finalize-completed":"")},ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-icon"},ae().createElement(yx,null)),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-text-wrapper"},ae().createElement(Tx,{currentStep:N,isCatchFetching:le,conversation:e,onTypingComplete:at,intervalRefs:Be}))):null}),"finalize"===(null==N?void 0:N.key)?ae().createElement(Nx,{timeoutRefs:ze,onStepStatusUpdate:Re,onProgressUpdate:Ie,onUtilityFunctionsReady:je,onNoPendingSteps:Fe,isVisible:(null==De?void 0:De.start)&&!De.complete||De.complete&&De.errorMessage}):null)),null==De||!De.start||null!=De&&De.complete?ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer"},ae().createElement(Rx,{currentStepTooltip:Ke,isVisible:ye,isThinkingOrTyping:(null==N?void 0:N.isThinking)||(null==N?void 0:N.isTyping)||le,timeoutRefs:ze}),ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-panel-wrapper"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-panel"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-footer-panel-content ".concat(!ee||a||le?"templately-fsi-ai-sidebar-footer-panel-content--no-animation":"templately-fsi-ai-sidebar-footer-panel-content--animate-in")},ee&&!a&&!le&&ae().createElement(ae().Fragment,null,"start"===(null==N?void 0:N.key)?ae().createElement("button",{className:"templately-fsi-ai-sidebar-conversation-start-button",onClick:function(){return Ye()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),document.activeElement===e.target&&Ye())},disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before starting","templately"):(0,Pt.__)("Yes, let’s start","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-start-button-text"},(0,Pt.__)("Yes, let’s start","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-start-button-icon"},ae().createElement(fx,null))):"finalize"===(null==N?void 0:N.key)?null==v||!v.aiProcess||null!=De&&De.start||null!=De&&De.complete||null!=De&&De.errorMessage?null!=De&&De.complete&&null!=De&&De.errorMessage?ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-button-wrapper"},ae().createElement("button",{onClick:function(){return Xe()},className:"templately-fsi-ai-sidebar-conversation-new-chat-button-with-tooltip",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before starting new chat","templately"):(0,Pt.__)("New Chat","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-text"},(0,Pt.__)("New Chat","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-icon"},ae().createElement(vx,null))),ae().createElement("button",{onClick:function(){return st()},disabled:He||"AI_GENERATION_IN_PROGRESS"===Ue.current,className:"templately-fsi-ai-sidebar-conversation-finish-button",title:(0,Pt.__)("Generate Again","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-text"},(0,Pt.__)("Generate Again","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-icon"},ae().createElement(fx,null)))):ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-button-wrapper"},ae().createElement("button",{onClick:function(){return Xe()},className:"templately-fsi-ai-sidebar-conversation-new-chat-button",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before starting new chat","templately"):(0,Pt.__)("New Chat","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-icon"},ae().createElement(vx,null)),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-text"},(0,Pt.__)("No, Let’s Start Fresh","templately"))),ae().createElement("button",{onClick:function(){return st()},disabled:He||"AI_GENERATION_IN_PROGRESS"===Ue.current,className:"templately-fsi-ai-sidebar-conversation-finish-button",title:"AI_GENERATION_IN_PROGRESS"===Ue.current?(0,Pt.__)("AI generation in progress...","templately"):He?(0,Pt.__)("Please finish editing conversations before proceeding","templately"):(0,Pt.__)("Generate and Proceed","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-text"},(0,Pt.__)("Yes, Let’s Do It!","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-icon"},ae().createElement(fx,null)))):null!=v&&v.ai_preview_content?ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-button-wrapper"},ae().createElement("button",{onClick:function(){return Xe()},className:"templately-fsi-ai-sidebar-conversation-new-chat-button",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before starting new chat","templately"):(0,Pt.__)("New Chat","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-icon"},ae().createElement(vx,null)),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-text"},(0,Pt.__)("No, Let’s Start Fresh","templately"))),ae().createElement("button",{onClick:function(e){(e.metaKey||e.ctrlKey)&&e.shiftKey?lt():st()},className:"templately-fsi-ai-sidebar-conversation-finish-button",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before proceeding","templately"):(0,Pt.__)("Generate and Proceed...","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-text"},(0,Pt.__)("Yes, Let’s Do It!","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-icon"},ae().createElement(fx,null)))):ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-button-wrapper"},ae().createElement("button",{onClick:function(){return Xe()},className:"templately-fsi-ai-sidebar-conversation-new-chat-button",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before starting new chat","templately"):(0,Pt.__)("New Chat","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-icon"},ae().createElement(vx,null)),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-new-chat-button-text"},(0,Pt.__)("No, Let’s Start Fresh","templately"))),ae().createElement("button",{onClick:st,className:"templately-fsi-ai-sidebar-conversation-finish-button",disabled:He,title:He?(0,Pt.__)("Please finish editing conversations before proceeding","templately"):(0,Pt.__)("Generate and Proceed...","templately")},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-text"},(0,Pt.__)("Yes, Let’s Do It!","templately")),ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-finish-button-icon"},ae().createElement(fx,null)))):ae().createElement(ae().Fragment,null,"category"===(null==N?void 0:N.key)?ae().createElement("form",{onSubmit:Qe},ae().createElement("input",{ref:we,type:"text",className:"templately-fsi-ai-sidebar-conversation-category-input",placeholder:(0,Pt.__)("Type your business category...","templately"),value:z,onChange:function(e){var t,n;return $e(null!==(t=null==e||null===(n=e.target)||void 0===n?void 0:n.value)&&void 0!==t?t:"")},autoFocus:!0}),!Pe.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},Pe.errorMessage),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-categories-wrapper"},(null==Q?void 0:Q.length)>0&&Pe.isValid?ae().createElement(ae().Fragment,null,Q.length<=2?Q.map(function(e,t){var n="category-".concat(t),r="category-radio-".concat(n);return ae().createElement("label",{key:n,htmlFor:r,className:"templately-fsi-ai-sidebar-conversation-category"},ae().createElement("input",{id:r,type:"radio",name:"category",value:n,checked:R===e,onChange:function(){return $e(e,!0)}}),ae().createElement("span",null,null!=e?e:(0,Pt.__)("Unknown Category","templately")))}):ae().createElement(ae().Fragment,null,null==Q||null===(t=Q.slice(0,2))||void 0===t?void 0:t.map(function(e,t){var n="category-main-".concat(t),r="category-radio-main-".concat(n);return ae().createElement("label",{key:n,htmlFor:r,className:"templately-fsi-ai-sidebar-conversation-category"},ae().createElement("input",{id:r,type:"radio",name:"category",value:n,checked:R===e,onChange:function(){return $e(e,!0)}}),ae().createElement("span",null,null!=e?e:(0,Pt.__)("Unknown Category","templately")))}),ae().createElement(OP,{open:me,onOpenChange:ge,content:ae().createElement(ut,null)},ae().createElement("span",{className:"templately-fsi-ai-sidebar-conversation-category-more-button"},Q.length-2,"+")))):null)):ae().createElement("form",{className:"templately-fsi-ai-sidebar-conversation-form",onSubmit:Qe},"description"===(null==N?void 0:N.key)?ae().createElement("textarea",{className:"templately-fsi-ai-sidebar-conversation-input",placeholder:(0,Pt.__)("Type your answer...","templately"),value:V,onChange:function(e){var t,n;return Ge(null!==(t=null==e||null===(n=e.target)||void 0===n?void 0:n.value)&&void 0!==t?t:"")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),Qe(e))},autoFocus:!0}):ae().createElement("input",{type:"contactNumber"===(null==N?void 0:N.key)?"tel":"email"===(null==N?void 0:N.key)?"email":"text",className:"templately-fsi-ai-sidebar-conversation-input",placeholder:"email"===(null==N?void 0:N.key)?(0,Pt.__)("Enter your email address...","templately"):"contactNumber"===(null==N?void 0:N.key)?(0,Pt.__)("Enter your phone number...","templately"):(0,Pt.__)("Type your answer...","templately"),value:V,onChange:function(e){var t,n;return Ge(null!==(t=null==e||null===(n=e.target)||void 0===n?void 0:n.value)&&void 0!==t?t:"")},autoFocus:!0}),"email"===(null==N?void 0:N.key)&&!Ee.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},Ee.errorMessage),"contactNumber"===(null==N?void 0:N.key)&&!xe.isValid&&ae().createElement("div",{className:"templately-fsi-ai-sidebar-email-error"},xe.errorMessage)),ae().createElement("div",{className:"templately-fsi-ai-sidebar-conversation-button-wrapper"},(null==T||null===(n=T.find(function(e){return(null==e?void 0:e.key)===(null==N?void 0:N.key)}))||void 0===n?void 0:n.skip)&&ae().createElement("button",{onClick:Ze,disabled:He,className:"templately-fsi-ai-sidebar-conversation-skip-button",type:"button",title:He?(0,Pt.__)("Please finish editing conversations before skipping","templately"):(0,Pt.__)("Skip this question","templately")},(0,Pt.__)("Skip","templately")),ae().createElement("button",{onClick:function(){return et("category"===(null==N?void 0:N.key)?R:V)},disabled:He||("category"===(null==N?void 0:N.key)?!(null!=R&&R.trim()&&Pe.isValid):"email"===(null==N?void 0:N.key)?!(null!=V&&V.trim()&&Ee.isValid):"contactNumber"===(null==N?void 0:N.key)?!(null!=V&&V.trim()&&xe.isValid):!(null!=V&&V.trim())),className:"templately-fsi-ai-sidebar-conversation-submit-button",type:"button","aria-label":(0,Pt.__)("Submit answer","templately"),title:He?(0,Pt.__)("Please finish editing conversations before submitting","templately"):(0,Pt.__)("Submit answer","templately")},ae().createElement(mx,null))))))))):null)});var FP=ae().memo(function(e){var t=e.isOpenWarningPopover,n=e.open,r=e.onOpenChange,o=e.children,i=e.content;return ae().createElement(bP,{open:n,onOpenChange:r},ae().createElement(wP,{asChild:!0},o),ae().createElement(kP,null,ae().createElement(EP,{style:t?zP:{},className:"templately-fsi-ai-sidebar-credit-limit-panel",sideOffset:12,align:"end"},i)))});FP.displayName="CreditLimitPopover";var zP={backgroundColor:"#fbf3f3",border:"1px solid #ff7a8e"};const BP=FP;function UP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UP(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const WP=fn(function(e){var t,n;return{aiSidebarContext:null!==(t=null==e||null===(n=e.general)||void 0===n||null===(n=n.fullSiteImport)||void 0===n?void 0:n.aiSidebarContext)&&void 0!==t?t:{id:null,show:!1,content:{}}}},function(e){return{hideAiSidebar:function(){try{return e({type:Ho,payload:{show:!1,content:{}}})}catch(e){return console.error("Error dispatching hideAiSidebar:",e),null}}}})(function(e){var t=e.className,n=void 0===t?"":t,r=e.aiSidebarContext,o=void 0===r?{id:null,show:!1,content:{}}:r,i=e.hideAiSidebar,a=e.packId,s=pe((0,oe.useState)(function(){return{show:!1,showAnimation:!1,hideAnimation:!1,finishAnimation:!1}}),2),l=s[0],c=s[1],u=pe((0,oe.useState)(!1),2),d=u[0],p=u[1],h=pe((0,oe.useState)(!1),2),f=h[0],m=h[1],g=pe((0,oe.useState)(!1),2),v=g[0],y=g[1],b=On(function(e){return e.general.fullSiteImport.availableCredit},Kt),w=(0,oe.useMemo)(function(){var e=null!=b?b:{is_first_generation:null,available_credit:0,purchased_credit:0,subscription_credit:0,subscription_plan:{billing_interval:"",type:""},total_credit:0,total_used_credit:0,estimated_cost:0};return{is_first_generation:e.is_first_generation,available_credit:Number(e.available_credit)||0,purchased_credit:Number(e.purchased_credit)||0,subscription_credit:Number(e.subscription_credit)||0,subscription_plan:e.subscription_plan||{billing_interval:"",type:""},total_credit:Number(e.total_credit)||0,total_used_credit:Number(e.total_used_credit)||0,estimated_cost:Number(e.estimated_cost)||0}},[b]);(0,oe.useEffect)(function(){!k&&null!==w.is_first_generation&&l.show&&(w.is_first_generation||(!w.available_credit||w.available_credit<w.estimated_cost)&&(m(function(e){return e||!0}),y(function(e){return e||!0})))},[w,k,l.show]);var k=On(function(e){var t,n;return null===(t=null===(n=e.general.fullSiteImport.packInfo)||void 0===n?void 0:n.loading)||void 0===t||t},Kt),E=(0,oe.useRef)(null);(0,oe.useEffect)(function(){return E.current&&(clearTimeout(E.current),E.current=null),null!=o&&o.show&&(c(function(e){return VP(VP({},e),{},{show:!0,showAnimation:!0})}),E.current=setTimeout(function(){c(function(e){return VP(VP({},e),{},{showAnimation:!1})})},300)),function(){E.current&&(clearTimeout(E.current),E.current=null)}},[null==o?void 0:o.show]);var O=(0,oe.useCallback)(function(e){p(e)},[]),S=(0,oe.useCallback)(function(){if(d)try{if(!window.confirm((0,Pt.__)("Are you sure you want to cancel the template building process? Note: Credits will be deducted based on usage.","templately")))return}catch(e){return void console.error("Error showing confirmation dialog:",e)}E.current&&(clearTimeout(E.current),E.current=null),m(!1),y(!1),p(!1),c(function(e){return VP(VP({},e),{},{hideAnimation:!0})}),E.current=setTimeout(function(){null==i||i(),c(function(e){return VP(VP({},e),{},{show:!1,hideAnimation:!1})})},300)},[i,d]),x=(0,oe.useMemo)(function(){return["templately-fsi-ai-sidebar",n,null!=l&&l.showAnimation?"show-animation":"",null!=l&&l.hideAnimation?"hide-animation":"",null!=l&&l.finishAnimation?"finish-animation":""].filter(Boolean).join(" ")},[n,l]),_=(0,oe.useMemo)(function(){return["templately-fsi-ai-sidebar-overlay",null!=l&&l.showAnimation?"show-animation":"",null!=l&&l.hideAnimation?"hide-animation":"",null!=l&&l.finishAnimation?"finish-animation":""].filter(Boolean).join(" ")},[l]),C=(0,oe.useCallback)(function(){var e,t,n="recurring",r=w.total_used_credit,o=w.total_credit,i=w.available_credit,a=w.subscription_credit,s=w.purchased_credit,l=w.estimated_cost,c=(null===(e=w.subscription_plan)||void 0===e?void 0:e.type)||"one_time",u=o>0?Math.min(Math.round(r/o*100),100):0;return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-header"},ae().createElement("h3",{className:"templately-fsi-ai-sidebar-credit-limit-panel-title"},(0,Pt.__)("Your AI Credits","templately")),ae().createElement("a",{href:null!==(t=window.templately)&&void 0!==t&&t.dev_mode?"https://www.templately.dev/#credit":"https://www.templately.com/#credit",target:"_blank",className:"templately-fsi-ai-sidebar-credit-limit-panel-increase-limit-btn"},!i||i<l?(0,Pt.__)("Buy Credits","templately"):(0,Pt.__)("Increase Limit","templately"))),c===n&&a?ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-credits-info"},"(".concat(a," ").concat((0,Pt.__)("AI Credits","templately"),"/").concat((0,Pt.__)("Month","templately")," + ").concat(s," ").concat((0,Pt.__)("AI Credits","templately"),")")):ae().createElement(ae().Fragment,null),ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-usage-wrapper"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-usage-text"},"".concat(null==r?void 0:r.toLocaleString(),"/").concat(null==o?void 0:o.toLocaleString()," ").concat((0,Pt.__)("Credits","templately"))),ae().createElement("span",{className:"templately-fsi-ai-sidebar-credit-limit-panel-credits-reset-info"},i?c===n&&a?"".concat((0,Pt.__)("Monthly reset in","templately")," ").concat(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n+1,0);if(e.getDate()===r.getDate()&&e.getMonth()===r.getMonth()&&e.getFullYear()===r.getFullYear()){var o=24-e.getHours();return"".concat(o," hour").concat(1!==o?"s":"")}var i=r.getDate()-e.getDate();return"".concat(i," day").concat(1!==i?"s":"")}()):(0,Pt.__)("AI credits validity: Lifetime – use anytime.","templately"):(0,Pt.__)("To generate AI content - buy credits now!","templately"))),ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-progress-wrapper"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-credit-limit-panel-progress-bar",style:{width:"".concat(u,"%")}})),!w.is_first_generation&&l>0&&ae().createElement("p",{className:"templately-fsi-ai-sidebar-credit-limit-panel-estimated-credit"},(0,Pt.__)("Estimated AI Credits for this generation:","templately")," ",ae().createElement("strong",null,l)))},[w]);return ae().createElement(ae().Fragment,null,(null==l?void 0:l.show)&&ae().createElement(ae().Fragment,null,ae().createElement("div",{className:_}),ae().createElement("div",{className:x},ae().createElement("button",{className:"templately-fixed-sidebar-close",onClick:S,"aria-label":(0,Pt.__)("Close AI Sidebar","templately")},ae().createElement(dx,null)),ae().createElement("div",{className:"templately-fsi-ai-sidebar-content"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-header"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-header-left"},ae().createElement(cx,null)),ae().createElement("div",{className:"templately-fsi-ai-sidebar-header-right"},ae().createElement("div",{className:"templately-fsi-ai-sidebar-header-right-bg"},ae().createElement(ux,null)),!k&&ae().createElement(BP,{isOpenWarningPopover:v,open:f,onOpenChange:m,content:ae().createElement(C,null)},ae().createElement("button",{className:"templately-fsi-ai-sidebar-header-right-button"},ae().createElement("span",{className:"templately-fsi-ai-sidebar-header-right-icon"},ae().createElement(px,null)),ae().createElement("span",{className:"templately-fsi-ai-sidebar-header-right-content"},"".concat(w.available_credit>0?"".concat(w.available_credit.toLocaleString()," ").concat((0,Pt.__)("Credits Left","templately")):(0,Pt.__)("No Credit Remaining","templately"))))))),ae().createElement(jP,{setSidebarShowState:c,creditDataLoading:k,creditData:w,packId:a,hideAiSidebar:i,setCreditLimitPopoverOpen:m,setCreditLimitWarningPopover:y,onGeneratingProgressVisibilityChange:O})))))});var HP=["type","title","id","isPurchased"];function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const $P=function(e){var t=e.type,n=e.title,r=e.id,o=e.isPurchased,i=Bn(e,HP),a=tt(),s=pe(xt(),1)[0],l=On(function(e){return e.profile},Kt);return ae().createElement("div",{className:"templately-item-details-header"},ae().createElement("div",{className:"templately-row align-center justify-between"},ae().createElement("div",{className:"templately-col"},ae().createElement("div",{className:"templately-items-header"},ae().createElement("h3",null,n))),"pack"!==t&&ae().createElement("div",{className:"templately-col"},!o&&i.price>0&&ae().createElement("a",{target:"_blank",href:qi(i.slug,t),className:"templately-button tb-import tb-purchase"},ae().createElement(CO,null),(0,Pt.__)("Purchase This Item","templately")),(o||i.price<=0)&&ae().createElement("button",{onClick:function(){i.isLoggedIn?hf(i.isLoggedIn,l)||Il({ModalComponent:xl,content:qP({id:r},i)}):a(Rg("sign-in",{"redirect-to":s.get("path")}))},className:"templately-button tb-import"},ae().createElement(rr,null),(0,Pt.__)("Insert","templately")))))},GP=function(e){var t=e.tags,n=e.pack,r=e.type;return ae().createElement("div",{className:"templately-item-tags templately-item-widget"},ae().createElement("h3",null,(0,Pt.__)("Tags","templately")),ae().createElement("p",null,null==t?void 0:t.map(function(e){return ae().createElement(gE,{to:"/".concat(n?"".concat(r,"s"):"","?tag_id=").concat(null==e?void 0:e.id),key:null==e?void 0:e.id},ae().createElement("span",null,e.name))})))},YP=function(e){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"24",fill:"none",viewBox:"0 0 16 18"},React.createElement("path",{fill:"url(#paint0_linear_2112_1918)",d:"M.5 9c0-.323.262-.582.584-.614a5.846 5.846 0 0 0 5.231-5.231c.032-.321.29-.584.613-.584s.582.263.613.584a5.846 5.846 0 0 0 5.232 5.231c.321.032.583.29.583.614 0 .322-.262.58-.583.613a5.846 5.846 0 0 0-5.232 5.231c-.031.321-.29.584-.613.584s-.581-.263-.613-.584a5.846 5.846 0 0 0-5.231-5.231C.762 9.58.5 9.323.5 9"}),React.createElement("path",{fill:"url(#paint1_linear_2112_1918)",d:"M12.07 1.928a.19.19 0 0 1 .175-.183 1.754 1.754 0 0 0 1.57-1.57.19.19 0 0 1 .184-.175.19.19 0 0 1 .184.175 1.754 1.754 0 0 0 1.57 1.57.19.19 0 0 1 .174.183.19.19 0 0 1-.175.184 1.754 1.754 0 0 0-1.57 1.57.19.19 0 0 1-.183.175.19.19 0 0 1-.184-.175 1.754 1.754 0 0 0-1.57-1.57.19.19 0 0 1-.175-.184"}),React.createElement("path",{fill:"url(#paint2_linear_2112_1918)",d:"M10.786 15.429c0-.13.105-.233.234-.245a2.34 2.34 0 0 0 2.092-2.093.253.253 0 0 1 .245-.234c.13 0 .233.105.246.234a2.34 2.34 0 0 0 2.092 2.093.253.253 0 0 1 .234.245c0 .129-.105.232-.234.245a2.34 2.34 0 0 0-2.092 2.093.253.253 0 0 1-.246.233.253.253 0 0 1-.245-.233 2.34 2.34 0 0 0-2.092-2.093.253.253 0 0 1-.234-.245"}),React.createElement("defs",null,React.createElement("linearGradient",{id:"paint0_linear_2112_1918",x1:"6.928",x2:"6.928",y1:"2.571",y2:"15.428",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E5C8FF"}),React.createElement("stop",{offset:"1",stopColor:"#BA6DFC"})),React.createElement("linearGradient",{id:"paint1_linear_2112_1918",x1:"13.999",x2:"13.999",y1:"0",y2:"3.857",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E7CBFF"}),React.createElement("stop",{offset:"1",stopColor:"#F5E9FF"})),React.createElement("linearGradient",{id:"paint2_linear_2112_1918",x1:"13.357",x2:"13.357",y1:"12.857",y2:"18",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E7CBFF"}),React.createElement("stop",{offset:"1",stopColor:"#F5E9FF"}))))},XP=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 25 24"},ae().createElement("mask",{id:"mask0_1187_1618",style:{maskType:"alpha"},width:"25",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},ae().createElement("path",{fill:"#D9D9D9",d:"M24.81 24H48.81V48H24.81z",transform:"rotate(-180 24.81 24)"})),ae().createElement("g",{mask:"url(#mask0_1187_1618)"},ae().createElement("path",{fill:"#667085",d:"M9.81 5l1.425 1.4-4.6 4.6H22.81v2H6.635l4.575 4.6-1.4 1.4-7-7 7-7z"})))},KP=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 25 24"},ae().createElement("mask",{id:"mask0_1187_1613",style:{maskType:"alpha"},width:"25",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},ae().createElement("path",{fill:"#D9D9D9",d:"M0.191 0H24.191V24H0.191z"})),ae().createElement("g",{mask:"url(#mask0_1187_1613)"},ae().createElement("path",{fill:"#fff",d:"M15.191 19l-1.425-1.4 4.6-4.6H2.191v-2h16.175l-4.575-4.6 1.4-1.4 7 7-7 7z"})))},ZP=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17",fill:"none",viewBox:"0 0 17 17"},ae().createElement("path",{fill:"#B7B9BD",d:"M8.258 15.465c-1.79 0-3.348-.593-4.677-1.78-1.328-1.185-2.09-2.667-2.284-4.442H2.89c.182 1.348.781 2.463 1.799 3.344 1.017.882 2.207 1.322 3.568 1.322 1.516 0 2.803-.528 3.86-1.584 1.056-1.057 1.584-2.343 1.584-3.86s-.528-2.803-1.585-3.86C11.061 3.55 9.774 3.02 8.258 3.02a5.25 5.25 0 00-2.508.623 5.78 5.78 0 00-1.963 1.71h2.138V6.91H1.258V2.243h1.555V4.07a6.791 6.791 0 012.421-1.925 6.946 6.946 0 013.024-.68c.972 0 1.883.185 2.732.554.849.37 1.588.869 2.216 1.497a7.115 7.115 0 011.498 2.217c.37.849.554 1.76.554 2.732 0 .972-.185 1.883-.554 2.732a7.114 7.114 0 01-1.498 2.217 7.117 7.117 0 01-2.216 1.497c-.85.37-1.76.554-2.732.554zm2.178-3.733L7.48 8.776v-4.2h1.556v3.578l2.489 2.489-1.09 1.088z"}))};var JP=["id","onChange","onBlur","name","placeholder","type","withP","label","icon","typeChange","error"];function eT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nT=function(e,t){var n=e.id,r=e.onChange,o=void 0===r?null:r,i=e.onBlur,a=void 0===i?null:i,s=e.name,l=e.placeholder,c=void 0===l?null:l,u=e.type,d=void 0===u?"text":u,p=(e.withP,e.label),h=e.icon,f=e.typeChange,m=void 0===f?void 0:f,g=e.error,v=Bn(e,JP),y=pe((0,oe.useState)(d),2),b=y[0],w=y[1],k=null!=n?n:s,E={type:b,name:s,id:k};return(0,oe.useEffect)(function(){m&&w(d)},[]),null!=c&&(E=tT(tT({},E),{},{placeholder:c})),null!=a&&(E=tT(tT({},E),{},{onBlur:a})),null!=o&&(E=tT(tT({},E),{},{onChange:o})),ae().createElement("div",{className:"templately-dmc-input templately-dmc-input-".concat(null!=d?d:"text")},p&&"checkbox"!==d&&"radio"!==d?ae().createElement("label",{htmlFor:k,className:"templately-dmc-input-label"},p):"",ae().createElement("div",{className:"".concat(m?"has-change-button":""," ").concat(h?"has-icon":""," ").concat(null!=g&&g.hasError?"has-error":"")},null!=h?h:"",ae().createElement("input",re({ref:t},E,v)),m?ae().createElement("button",{onClick:function(){w(b===d?null==m?void 0:m.type:d)}},b===d?null==m?void 0:m.primaryText:null==m?void 0:m.secondaryText):""),!p||"checkbox"!==d&&"radio"!==d?"":ae().createElement("label",{htmlFor:k,className:"templately-dmc-input-label"},p),(null==g?void 0:g.hasError)&&ae().createElement("div",{className:"templately-dmc-error-message"},ae().createElement(Fn,null),null==g?void 0:g.errorMessage))};const rT=ae().forwardRef(nT),oT=window.wp.components,iT=window.wp.mediaUtils,aT=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22"},ae().createElement("path",{d:"M12.778 11L5 3.222 7.222 1l10 10-10 10L5 18.778 12.778 11z"}))},sT=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"11",fill:"none",viewBox:"0 0 11 11"},ae().createElement("path",{fill:"#475467",d:"M1.658 10.465l-1.4-1.4 3.6-3.6-3.6-3.575 1.4-1.4 3.6 3.6L8.833.49l1.4 1.4-3.6 3.575 3.6 3.6-1.4 1.4-3.575-3.6-3.6 3.6z"}))},lT=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"51",height:"52",fill:"none",viewBox:"0 0 51 52"},ae().createElement("rect",{width:"44",height:"44",x:"3.5",y:"4.142",fill:"#F2F4F7",rx:"22"}),ae().createElement("g",{clipPath:"url(#clip0_397_310)"},ae().createElement("path",{fill:"#475467",d:"M14.5 28.642a6.495 6.495 0 013.064-5.52 8.001 8.001 0 0115.872 0 6.5 6.5 0 01-2.936 12l-10 .02c-3.356-.274-6-3.078-6-6.5zm15.848 4.487a4.5 4.5 0 002.03-8.31l-.807-.502-.12-.942a6.001 6.001 0 00-11.903 0l-.12.942-.805.503a4.5 4.5 0 002.029 8.309l.173.013h9.35l.173-.013zM26.5 27.142v4h-2v-4h-3l4-5 4 5h-3z"})),ae().createElement("rect",{width:"44",height:"44",x:"3.5",y:"4.142",stroke:"#F9FAFB",strokeWidth:"7",rx:"22"}),ae().createElement("defs",null,ae().createElement("clipPath",{id:"clip0_397_310"},ae().createElement("path",{fill:"#fff",d:"M0 0H24V24H0z",transform:"translate(13.5 14.142)"}))))};var cT=function(e){var t=e.name,n=e.color,r=e.setColor,o=e.defaultColor,i=e.setColorPickerOpen,a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=(0,oe.useRef)(null);return(0,oe.useEffect)(function(){i(s)},[s]),function(e){(0,oe.useEffect)(function(){var t=function(t){e.current&&!e.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}},[e])}(c),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-colorpicker-wrap",ref:c},ae().createElement("span",{"data-templately-tooltip":(0,Pt.__)("".concat(t),"templately"),className:"templately-colorpicker-screen tt-top tt-black",onClick:function(){return l(!s)}},ae().createElement("span",{className:"templately-picker-display",style:{backgroundColor:n}})),s&&ae().createElement("div",{className:"templately-colorpicker"},ae().createElement("span",{className:"templately-title"},t),ae().createElement(oT.ColorPicker,{color:n,onChangeComplete:function(e){return r(e.hex)},enableAlpha:!0,defaultValue:null!=n?n:o}))))};const uT=function(e){var t,n=e.title,r=e.children,o=e.current,i=e.setCurrent,a=e.id,s=pe((0,oe.useState)(null!==(t=e.initialCollapsed)&&void 0!==t&&t),2),l=s[0],c=s[1];return(0,oe.useEffect)(function(){null!=o&&null!=a&&c(o!=a)},[o]),ae().createElement("div",{className:"templately-new-collapser"},ae().createElement("div",{className:"templately-new-collapser-header ".concat(l?"collapsed":"show"),onClick:function(){null!=o&&null!=a?i(l?a:-1):c(!l)}},ae().createElement("h4",{className:"templately-title"},n),ae().createElement("div",{className:"templately-icon"},ae().createElement(Sn,null))),ae().createElement("div",{className:"templately-new-collapser-body ".concat(l?"collapsed":"show")},ae().createElement("div",{className:"templately-new-collapser-body-inner"},r)))};var dT=o(124);function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var fT={},mT=function(e){return{getFormData:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.get(t);if("string"==typeof r)try{return JSON.parse(r)||n}catch(e){return r||n}return r||n}}},gT=function(e,t){var n=bn(),r=On(function(e){var t;return null!==(t=e.general.fullSiteImport.cache_data)&&void 0!==t?t:{}}),o=pe((0,oe.useState)(function(){var n;return null!==(n=r[e])&&void 0!==n?n:t}),2),i=o[0],a=o[1];return(0,oe.useEffect)(function(){void 0!==r[e]&&a(r[e])},[r]),[i,function(t){t=(0,_i.isFunction)(t)?t(i):t,a(t),n(ug({type:e,value:t}))},function(e){return i}]},vT=function(){fT={}},yT=function(){var e=bn(),t=On(function(e){var t;return null!==(t=e.general.fullSiteImport.cache_data)&&void 0!==t?t:{}}),n=function(){var n=ni(oi().mark(function n(r,o){var i;return oi().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!t[r]){n.next=1;break}return n.abrupt("return",Promise.resolve(t[r]));case 1:if(!fT[r]){n.next=2;break}return n.abrupt("return",fT[r]);case 2:return i=ai()(o).then(function(t){return e(ug({type:r,value:t})),delete fT[r],t}),fT[r]=i,n.abrupt("return",i);case 3:case"end":return n.stop()}},n)}));return function(_x,e){return n.apply(this,arguments)}}();return n},bT=["Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"],wT=function(e,t){if(e&&"Default"!==e&&!bT.includes(e)){var n={ru_RU:"cyrillic",uk:"cyrillic",bg_BG:"cyrillic",vi:"vietnamese",el:"greek",he_IL:"hebrew"},r="https://fonts.googleapis.com/css?family="+e+":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic";n[t]&&(r+="&subset="+n[t]);var o='link[href="'+r+'"]',i=document.createElement("link");if(i.href=r,i.rel="stylesheet",i.type="text/css",i.crossOrigin="anonymous",!document.querySelector(o)){var a=document.querySelectorAll("link"),s=a[a.length-1];s?s.after(i):document.body.appendChild(i)}}};function kT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ET(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const OT=function(e){var t,n,r=e.label,o=e.title,i=void 0===o?"":o,a=e.screen,s=e.setScreen,l=e.field,c=e.typography,u=e.setTypography,d=null!==(t=c[l][a].value)&&void 0!==t?t:"",p=null!==(n=c[l][a].unit)&&void 0!==n?n:"px",h=function(e,t){var n=t[e]||{};return hT(hT({},{px:{min:0,max:100,step:1},em:{min:.1,max:10,step:.1},rem:{min:.1,max:10,step:.1},vh:{min:0,max:100,step:1},vw:{min:0,max:100,step:1}}[e]),n)}(p,{selectedSize:{px:{min:1,max:200},em:{max:20},rem:{max:20},vw:{min:.1,max:10,step:.1}},selectedLetterSpacing:{px:{min:-5,max:10,step:.1},em:{min:0,max:1,step:.01},rem:{min:0,max:1,step:.01}},selectedLineHeight:{px:{min:1}}}[l]),f=h.min,m=h.max,g=h.step,v=Math.max(f,Math.min(m,d)),y=function(e){u("".concat(l,".").concat(a,".value"),e),c[l][a].unit||u("".concat(l,".").concat(a,".unit"),p)},b=function(e){s(e)};return(0,oe.useEffect)(function(){c[l][a].unit||u("".concat(l,".").concat(a,".unit"),"px")},[]),ae().createElement("div",{className:"templately-typography-picker-field"},ae().createElement("label",{className:"templately-typography-picker-field-label"},ae().createElement("span",{title:i},r),ae().createElement("div",{className:"templately-device-dropdown"},ae().createElement("button",{className:"templately-device-dropdown-selected"},"desktop"===a?ae().createElement("span",{className:"dashicons dashicons-desktop"}):"tablet"===a?ae().createElement("span",{className:"dashicons dashicons-tablet"}):ae().createElement("span",{className:"dashicons dashicons-smartphone"})),ae().createElement("ul",{className:"templately-device-dropdown-menu"},ae().createElement("li",{className:"templately-device-dropdown-menu-item ".concat("desktop"===a?"active":""),onClick:function(){return b("desktop")}},ae().createElement("span",{className:"dashicons dashicons-desktop"})),ae().createElement("li",{className:"templately-device-dropdown-menu-item ".concat("tablet"===a?"active":""),onClick:function(){return b("tablet")}},ae().createElement("span",{className:"dashicons dashicons-tablet"})),ae().createElement("li",{className:"templately-device-dropdown-menu-item ".concat("mobile"===a?"active":""),onClick:function(){return b("mobile")}},ae().createElement("span",{className:"dashicons dashicons-smartphone"}))))),ae().createElement("div",{className:"templately-typography-picker-field-inner"},ae().createElement(oT.TextControl,{min:f,max:m,step:g,value:d,onChange:y,type:"number",label:"Text Control",hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),ae().createElement(oT.SelectControl,{value:p||defaultUnit,onChange:function(e){u("".concat(l,".").concat(a),{unit:e,value:null})},options:[{label:"PX",value:"px"},{label:"EM",value:"em"},{label:"REM",value:"rem"},{label:"VW",value:"vw"},{label:"VH",value:"vh"}],label:"Select Option",hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),ae().createElement(dT.Range,{values:[v],step:g,min:f,max:m,onChange:function(e){return y(e[0])},renderTrack:function(e){var t=e.props,n=e.children;return ae().createElement("div",{onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,style:ET(ET({},t.style),{},{height:"12px",display:"flex",width:"100%"})},ae().createElement("div",{ref:t.ref,style:{height:"2px",width:"100%",borderRadius:"2px",background:(0,dT.getTrackBackground)({values:[v],colors:["#798294","#798294"],min:f,max:m}),alignSelf:"center"}},n))},renderThumb:function(e){var t=e.props,n=e.isDragged;return ae().createElement("div",re({},t,{key:t.key,style:ET(ET({},t.style),{},{height:"12px",width:"12px",borderRadius:"12px",backgroundColor:"#D0D5DD",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 6px rgba(16, 24, 40, 0.059)"})}),ae().createElement("div",{style:{height:"12px",width:"12px",borderRadius:"12px",backgroundColor:n?"#548BF4":"#D0D5DD"}}))}})))};var ST=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xT(e,t){return e===t||!(!ST(e)||!ST(t))}function _T(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xT(e[n],t[n]))return!1;return!0}const CT=function(e,t){var n;void 0===t&&(t=_T);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}};var PT="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function TT(e){cancelAnimationFrame(e.id)}var AT=-1;function DT(e){if(void 0===e&&(e=!1),-1===AT||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),AT=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return AT}var MT=null;function NT(e){if(void 0===e&&(e=!1),null===MT||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?MT="positive-descending":(t.scrollLeft=1,MT=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),MT}return MT}var LT=function(e,t){return e};function IT(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Gl(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Gl(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=CT(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=CT(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=CT(function(e,__,t){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(NT()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){var e,t,n,o;null!==r._resetIsScrollingTimeoutId&&TT(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=(e=r._resetIsScrolling,t=150,n=PT(),o={id:requestAnimationFrame(function r(){PT()-n>=t?e.call(null):o.id=requestAnimationFrame(r)})})},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}(function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ql(e,t)})(t,e),t.getDerivedStateFromProps=function(e,t){return RT(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?DT():0:l.scrollHeight>l.clientHeight?DT():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(NT()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&TT(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?LT:d,h=e.layout,f=e.outerElementType,m=e.outerTagName,g=e.style,v=e.useIsScrolling,y=e.width,b=this.state.isScrolling,w="horizontal"===o||"horizontal"===h,k=w?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),O=E[0],S=E[1],x=[];if(c>0)for(var _=O;_<=S;_++)x.push((0,oe.createElement)(t,{data:u,key:p(_,u),index:_,isScrolling:v?b:void 0,style:this._getItemStyle(_)}));var C=r(this.props,this._instanceProps);return(0,oe.createElement)(f||m||"div",{className:n,onScroll:k,ref:this._outerRefSetter,style:re({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},(0,oe.createElement)(s||l||"div",{children:x,ref:a,style:{height:w?"100%":C,pointerEvents:b?"none":void 0,width:w?C:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(oe.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var RT=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},jT=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},FT=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=jT(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},zT=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},BT=IT({getItemOffset:function(e,t,n){return jT(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:zT,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=jT(e,t,o),p=zT(e,o),h=Math.max(0,Math.min(p-u,d.offset)),f=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=f-u&&r<=h+u?"auto":"center"),n){case"start":return h;case"end":return f;case"center":return Math.round(f+(h-f)/2);default:return r>=f&&r<=h?r:r<f?f:h}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?FT(e,t,o,0,n):function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&jT(e,n,t).offset<r;)n+=i,i*=2;return FT(e,t,Math.min(n,o-1),Math.floor(n/2),r)}(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=jT(e,t,r),d=n+c,p=u.offset+u.size,h=t;h<a-1&&p<d;)h++,p+=jT(e,h,r).size;return h},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}}),UT=["options","children","maxHeight","getValue","loadedFonts"];function VT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var HT=ae().createContext({}),QT=function(e){var t=e.children,n=e.index,r=(e.style,e.isScrolling),o=ae().useContext(HT),i=o.setSize,a=o.windowWidth,s=o.loadedFonts,l=o.options,c=ae().useRef(),u=l[n];return(0,oe.useEffect)(function(){r||!u.value||s.current.includes(u.value)||(wT(u.value,window.templately.locale),s.current=[].concat(Da(s.current),[u.value]))},[]),(0,oe.useEffect)(function(){i(n,c.current.getBoundingClientRect().height)},[a]),ae().createElement("div",{ref:c},t)};function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const GT=function(e){e.normalizedTypography;var t=e.setShowPicker,n=e.typography,r=e.setTypography,o=e.fontList,i=e.reset,a=e.screen,s=e.setScreen,l=[{label:"Default",value:""},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"},{label:"Normal",value:"none"}],c=[{label:"Default",value:""},{label:"Overline",value:"overline"},{label:"Line Through",value:"line-through"},{label:"Underline",value:"underline"},{label:"Underline Overline",value:"underline overline"},{label:"Initial",value:"initial"},{label:"None",value:"none"}],u=[{value:"100",label:"100 (Thin)"},{value:"200",label:"200 (Extra Light)"},{value:"300",label:"300 (Light)"},{value:"400",label:"400 (Normal)"},{value:"500",label:"500 (Medium)"},{value:"600",label:"600 (Semi Bold)"},{value:"700",label:"700 (Bold)"},{value:"800",label:"800 (Extra Bold)"},{value:"900",label:"900 (Black)"},{value:"",label:"Default"},{value:"normal",label:"Normal"},{value:"bold",label:"Bold"}];return(0,oe.useEffect)(function(){wT(n.selectedFont,window.templately.locale)},[n.selectedFont]),ae().createElement("td",{className:"templately-typography-picker"},ae().createElement("div",{className:"templately-typography-picker-title-wrapper"},ae().createElement("div",{className:"templately-typography-picker-title-inner"},ae().createElement("h4",{className:"templately-typography-picker-title"},null==n?void 0:n.title),ae().createElement("button",{className:"templately-color-picker-reset-button",onClick:i},ae().createElement(ZP,null))),ae().createElement("button",{className:"templately-color-picker-close-button",onClick:function(){return t(!1)}},ae().createElement(sT,null))),ae().createElement("div",{className:"templately-typography-picker-preview",style:{fontFamily:n.selectedFont,fontSize:"40px",lineHeight:"1.5"}},"Ag"),ae().createElement("div",{className:"templately-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-typography-picker-field-label"},"Family"),ae().createElement("div",{className:"templately-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",value:o.find(function(e){return e.value===n.selectedFont}),options:o,onChange:function(e){return r("selectedFont",e.value)},components:{MenuList:function(t){return function(e){var t,n=e.options,r=e.children,o=e.maxHeight,i=e.getValue,a=e.loadedFonts,s=(Bn(e,UT),pe(i(),1)[0]),l=null!==(t=n.indexOf(s))&&void 0!==t?t:0,c=ae().useRef(),u=ae().useRef({}),d=ae().useCallback(function(e,t){var n;u.current=WT(WT({},u.current),{},Ct({},e,t)),null===(n=c.current)||void 0===n||n.resetAfterIndex(e)},[]),p=function(){var e=pe((0,oe.useState)([0,0]),2),t=e[0],n=e[1];return(0,oe.useLayoutEffect)(function(){function e(){n([window.innerWidth,window.innerHeight])}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}},[]),t}(),h=pe(p,1)[0];return(0,oe.useEffect)(function(){var e;null===(e=c.current)||void 0===e||e.scrollToItem(l,"center")},[]),ae().createElement(HT.Provider,{value:{setSize:d,windowWidth:h,loadedFonts:a,options:n,listRef:c}},ae().createElement("div",null,ae().createElement(BT,{useIsScrolling:!0,height:o,itemSize:function(e){return u.current[e]||35},itemCount:r.length,ref:c},function(e){var t=e.index,o=e.style,i=(e.data,e.isScrolling);return ae().createElement("div",{style:WT(WT({},o),{},{fontFamily:n[t].value})},ae().createElement(QT,{index:t,style:o,isScrolling:i},r[t]))})))}($T($T({},t),{},{loadedFonts:e.loadedFonts}))}},className:"templately-typography-picker-select",classNamePrefix:"templately-typography-picker-select"}))),ae().createElement(OT,{label:"Size",screen:a,setScreen:s,typography:n,setTypography:r,field:"selectedSize"}),ae().createElement(OT,{label:"Line",title:"Line Height",screen:a,setScreen:s,field:"selectedLineHeight",typography:n,setTypography:r}),ae().createElement(OT,{label:"Letter",title:"Letter Spacing",screen:a,setScreen:s,field:"selectedLetterSpacing",typography:n,setTypography:r}),ae().createElement("div",{className:"templately-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-typography-picker-field-label"},"Weight"),ae().createElement("div",{className:"templately-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",value:u.find(function(e){return e.value===n.selectedFontWeight}),options:u,onChange:function(e){return r("selectedFontWeight",e.value)},className:"templately-typography-picker-select",classNamePrefix:"templately-typography-picker-select"}))),ae().createElement("div",{className:"templately-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-typography-picker-field-label"},"Transform"),ae().createElement("div",{className:"templately-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",defaultValue:l.find(function(e){return e.value==n.transform}),onChange:function(e){return r("transform",e.value)},options:l,className:"templately-typography-picker-select",classNamePrefix:"templately-typography-picker-select"}))),ae().createElement("div",{className:"templately-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-typography-picker-field-label"},"Decoration"),ae().createElement("div",{className:"templately-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",defaultValue:c.find(function(e){return e.value==n.decoration}),onChange:function(e){return r("decoration",e.value)},options:c,className:"templately-typography-picker-select",classNamePrefix:"templately-typography-picker-select"}))))};var YT=function(e){var t=e.setTypographyPickerOpen,n=e.normalizedTypography,r=e.typography,o=e.setTypography,i=e.fontList,a=e.reset,s=e.screen,l=e.setScreen,c=pe((0,oe.useState)(!1),2),u=c[0],d=c[1],p=(0,oe.useRef)(null);return r.selectedFont?r.selectedFont:(0,Pt.__)("Default","templately"),(0,oe.useEffect)(function(){t(u)},[u]),function(e){(0,oe.useEffect)(function(){var t=function(t){e.current&&!e.current.contains(t.target)&&d(!1)};return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}},[e])}(p),(0,oe.useEffect)(function(){wT(r.selectedFont,window.templately.locale)},[r.selectedFont]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-typography-panel-item",ref:p,key:null==r?void 0:r._id},ae().createElement("div",{className:"templately-typography-mini-preview",style:{fontFamily:r.selectedFont}},"Ag"),ae().createElement("div",{className:"templately-typography-title"},r.title),ae().createElement("div",{className:"templately-typography-popup-button",onClick:function(){return d(!u)}},ae().createElement(Ln,null)),u&&ae().createElement(GT,{normalizedTypography:n,setShowPicker:d,typography:r,setTypography:o,fontList:i,reset:a,screen:s,setScreen:l,loadedFonts:e.loadedFonts})))};function XT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ZT=function(e){var t=e.platform,n=e.originalTypography,r=e.setTypographyPickerOpen,o=e.setNormalizedTypography,i=e.fontList,a=e.formData,s=e.screen,l=e.setScreen,c="gutenberg"===t,u=(0,oe.useRef)([]),d=(mT(a).getFormData,n.systemTypography),p=n.customTypography;if((0,_i.isEmpty)(d)&&(0,_i.isEmpty)(p))return ae().createElement(ae().Fragment,null);var h=yf(n,t),f=h.normalizedTypography,m=h.groupedData,g=h.getDeNormalizedTypography,v=(0,oe.useMemo)(function(){var e=bT.map(function(e){return{value:e,label:e}});return[{value:"",label:(0,Pt.__)("Default","templately")},{label:(0,Pt.__)("System","templately"),isDisabled:!0}].concat(Da(e),[{label:(0,Pt.__)("Google","templately"),isDisabled:!0}],Da(i))},[i]),y=pe(gT("selectedTypography",f),2),b=y[0],w=y[1],k=pe((0,oe.useState)(-1),2),E=k[0],O=k[1],S=(0,_i.throttle)(function(e,t,n){var r=g(t);if(c){r.custom={};for(var i=0,s=Object.entries(t);i<s.length;i++){var l=pe(s[i],2),u=l[0];l[1]._isSystem||(r.custom[u]=r[u],delete r[u])}}a.set("typography",JSON.stringify(r)),o({screen:e,selectedTypography:t,locale:n})},500);return(0,oe.useEffect)(function(){S(s,b,window.templately.locale)},[s,b]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-color-picker-section"},ae().createElement("div",{className:"templately-color-picker-section-label-wrapper"},ae().createElement("div",{style:{display:"flex",alignItems:"center",gap:10}},ae().createElement("label",{className:"templately-color-picker-section-label"},"Typography"),ae().createElement("div",{className:"templately-device-tab"},ae().createElement("button",{className:"templately-device-tab-button ".concat("desktop"===s?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return l("desktop")}},ae().createElement("span",{className:"dashicons dashicons-desktop"})),ae().createElement("button",{className:"templately-device-tab-button ".concat("tablet"===s?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return l("tablet")}},ae().createElement("span",{className:"dashicons dashicons-tablet"})),ae().createElement("button",{className:"templately-device-tab-button ".concat("mobile"===s?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return l("mobile")}},ae().createElement("span",{className:"dashicons dashicons-smartphone"})))),ae().createElement("button",{className:"templately-color-picker-reset-button",onClick:function(){w(f)}},ae().createElement(ZP,null))),ae().createElement("div",{className:"templately-typography-panel-wrapper"},m.map(function(e,t){var n=e.key,o=e.items;return ae().createElement(uT,{title:n,key:n,initialCollapsed:!0,current:E,setCurrent:O,id:t},ae().createElement("div",{className:"templately-typography-panel"},o&&o.map(function(e){var t=e._id;return ae().createElement(YT,{key:t,setTypographyPickerOpen:r,reset:function(){return function(e){w(KT(KT({},b),{},Ct({},e,f[e])))}(t)},normalizedTypography:f,typography:b[t],setTypography:function(e,n){return function(e,t,n){w(function(r){var o=ji(r[e],t,n);return KT(KT({},r),{},Ct({},e,o))})}(t,e,n)},fontList:v,screen:s,setScreen:l,loadedFonts:u})})))}))))};function JT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JT(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const tA=function(e){var t,n,r,o,i=e.name,a=e.id,s=e.next,l=(e.back,e.formData),c=e.live_url,u=e.has_settings,d=e.showErrorAlert,p=(e.isAi,e.setShowFSIModal),h=e.ogIsAi,f=(e.startModifyAiContent,mT(l).getFormData),m=null==i?void 0:i.split("-"),g=pe((0,oe.useState)(!0),2),v=g[0],y=g[1],b=((0,oe.useRef)(),(0,oe.useRef)(),On(function(e){return e.general.platform},Kt)),w=On(function(e){var t;return(null==e||null===(t=e.general)||void 0===t||null===(t=t.fullSiteImport)||void 0===t||null===(t=t.fsiModalContext)||void 0===t?void 0:t.aiTemplates)||{templates:null,process_id:null,ai_page_ids:null}},Kt),k=pe((0,oe.useState)(Math.random()),2),E=k[0],O=(k[1],pe((0,oe.useState)(null!==(t=l.get("title"))&&void 0!==t?t:""),2)),S=O[0],x=O[1],_=pe((0,oe.useState)(null!==(n=l.get("slogan"))&&void 0!==n?n:""),2),C=_[0],P=_[1],T=pe((0,oe.useState)(""),2),A=T[0],D=T[1],M=pe((0,oe.useState)(null!==(r=(0,si.isURL)(l.get("logo"))?"":null===(o=f("logo",{}))||void 0===o?void 0:o.url)&&void 0!==r?r:""),2),N=M[0],L=M[1],I=pe((0,oe.useState)(f("logo_size",211)),2),R=I[0],j=I[1],F=pe((0,oe.useState)(!1),2),z=F[0],B=F[1],U=pe((0,oe.useState)(!0),2),V=U[0],W=U[1],H=pe((0,oe.useState)([]),2),Q=H[0],q=H[1],$=pe((0,oe.useState)(f("color",{})),2),G=$[0],Y=$[1],X=pe((0,oe.useState)(!1),2),K=X[0],Z=X[1],J=pe((0,oe.useState)(!1),2),ee=J[0],te=J[1],ne=pe(gT("typography",{}),2),re=ne[0],ie=ne[1],ae=pe(gT("normalizedTypography",{}),2),se=ae[0],le=ae[1],ce=pe((0,oe.useState)(null),2),ue=ce[0],de=ce[1],he=pe((0,oe.useState)(null),2),fe=he[0],me=he[1],ge=(0,oe.useRef)(null),ve=(0,_i.throttle)(function(e,t,n){var r,o,i={type:"templately_css_variable",log:(null===(r=window.templately)||void 0===r?void 0:r.log)||!1,platform:b,logo:N,color:e,logoSize:t,typography:n};null===(o=Ae.current.contentWindow)||void 0===o||o.postMessage(i,"*")},500),ye=(0,oe.useMemo)(function(){return(0,_i.throttle)(function(e,t){var n,r,o=Ct({type:"templately_ai_data",log:(null===(n=window.templately)||void 0===n?void 0:n.log)||!1,platform:b,aiData:e,ai_page_ids:t,api_key:window.templately.api_key,dev_mode:window.templately.dev_mode},"log",window.templately.log||!1);null===(r=Ae.current.contentWindow)||void 0===r||r.postMessage(o,"*")},500)},[b]),be=(0,oe.useCallback)(function(e,t){var n,r=eA(eA({},e),t.templates||{});if(null!==(n=window.templately)&&void 0!==n&&n.log&&$i("AI data update detected, sending to iframe:",r,{iframeLoaded:Me}),!(0,_i.isEmpty)(r)){var o,i=(null===(o=t.ai_page_ids)||void 0===o?void 0:o["content/page"])||[];ye(r,i)}},[ye,Me]),we=pe((0,oe.useState)([]),2),ke=we[0],Ee=we[1],Oe=pe((0,oe.useState)("desktop"),2),Se=Oe[0],xe=Oe[1],_e=On(function(e){var t;return null!==(t=e.general.fullSiteImport.customizerStep)&&void 0!==t?t:0},Kt),Ce=On(function(e){return{packInfo:e.general.fullSiteImport.packInfo||{},googleFonts:e.general.fullSiteImport.googleFonts||{}}},Kt),Pe=Ce.packInfo,Te=Ce.googleFonts,Ae=(0,oe.useRef)(),De=pe((0,oe.useState)(0),2),Me=De[0],Ne=De[1],Le=(yT(),bn()),Ie=function(){s()},Re=function(e){if(_e>=1&&e>0)return l.set("title",S||m[0]||""),l.set("slogan",C||m[1]||""),l.set("color",JSON.stringify(G)),l.get("logo")||l.set("logo",A),l.get("logo")&&l.set("logo_size",R),void Ie();Le(lg(_e+e<=0?0:_e+e))};return(0,oe.useEffect)(function(){Me&&be(ue,w)},[ue,Me,be,w]),(0,oe.useEffect)(function(){Pe.data||Pe.loading||Le(gg(a,!!h)),Te.data||Te.loading||Le({type:Xo})},[a,h,Pe.data,Pe.loading,Te.data,Te.loading,Le]),(0,oe.useEffect)(function(){var e;if(Pe.data&&null!==(e=Pe.data)&&void 0!==e&&null!==(e=e.manifest)&&void 0!==e&&e.has_settings&&Pe.data.settings){var t=Pe.data.settings,n="elementor"===b,r=mf(t,b),o=r.colors,i=r._systemColors;if(q(i),(0,_i.isEmpty)(G)&&Y(o),(0,_i.isEmpty)(re)){var a=vf(t,b),s=a.systemTypography,l=a.customTypography;ie({systemTypography:s,customTypography:l})}if(B(!0),n){var c=t.site_logo;null!=c&&c.url&&D(c.url)}else{var u=t.logo;null!=u&&u.url&&D(null==u?void 0:u.url)}}else Pe.data&&null!==Pe.data&&B(0)},[Pe.data,b]),(0,oe.useEffect)(function(){Pe.error&&(B(0),d(Pe.error),window.templately.log&&console.error("Pack info error:",Pe.error))},[Pe.error]),(0,oe.useEffect)(function(){var e;(null===(e=Te.data)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.length)>0&&Ee(Te.data.data.map(function(e){return{value:e.family,label:e.family,variants:e.variants.map(function(e){return{value:e,label:e}})}}))},[Te.data]),(0,oe.useEffect)(function(){ve(G,R,se)},[G,R,se,ve,Me]),(0,oe.useEffect)(function(){var e=function(t){var n,r;if("templately_preview_window_loaded"===(null===(n=t.data)||void 0===n?void 0:n.type))return W(!1),void Ne(function(e){return e+1});"templately_css_variable"===(null===(r=t.data)||void 0===r?void 0:r.type)&&t.data.logoWidth&&(j(parseFloat(t.data.logoWidth)),window.removeEventListener("message",e))};return window.addEventListener("message",e),function(){window.removeEventListener("message",e)}},[]),(0,oe.useEffect)(function(){if(w.session_id&&(l.set("session_id",w.session_id),l.set("process_id",w.process_id)),w.templates){var e;$i("AI templates detected in Redux state:",w.templates);var t=(null===(e=w.ai_page_ids)||void 0===e?void 0:e["content/page"])||[];!function(e,t,n,r,o,i){if(e&&t){var a=document.createElement("form");a.method="POST",a.action=(0,si.addQueryArgs)(e,{plugin_preview:r,has_ai_json:"true",platform:o,dev_mode:window.templately.dev_mode||!1,log:window.templately.log||!1,ai_page_ids:JSON.stringify(n)}),a.target="customizer-iframe";var s=document.createElement("input");s.type="hidden",s.name="api_key",s.value=window.templately.api_key,a.appendChild(s);var l=document.createElement("input");l.type="hidden",l.name="data",l.value=JSON.stringify(t),a.appendChild(l),document.body.appendChild(a),a.submit(),setTimeout(function(){document.body.removeChild(a),null==i||i()},200)}}(c,w.templates,t,E,b,function(){$i("AI data sent to iframe successfully")})}if(w.process_id&&w.ai_page_ids){var n=new AbortController;ge.current=n,l.set("missing_pages",Object.keys(w.ai_page_ids||{}).length);var r=MP(w.session_id,w.process_id,w.ai_page_ids,w.preview_pages,function(e,t){var n;null!==(n=window.templately)&&void 0!==n&&n.log&&$i("AI content polling update:",Object.keys(e),t),l.set("missing_pages",null==t?void 0:t.length),be(e,w),de(e)},function(e,t){var n;null!==(n=window.templately)&&void 0!==n&&n.log&&$i("AI content polling completed:",e,t),l.set("missing_pages",null==t?void 0:t.length),be(e,w),ge.current=null,me(null),de(updatedData)},function(e){console.error("AI content polling error:",e),ge.current=null,me(null)},n.signal,w.isLocalSite);me(r)}return function(){if(null!=fe&&fe.cleanup&&fe.cleanup(),ge.current)try{ge.current.abort("Component unmounted or aiTemplates changed"),ge.current=null}catch(e){console.warn("Error aborting AI polling:",e)}me(null)}},[w]),React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-dependency-modal-customizer"},React.createElement("div",{className:"templately-dependency-modal-customizer-left ".concat(v?"show":"hide")},React.createElement("div",{className:"templately-dmc-header"},React.createElement("p",{className:"templately-dmc-header-label"},"Template Name:"),React.createElement("h2",{className:"templately-dmc-header-title"},i),React.createElement("button",{className:"templately-dmc-header-close-button",onClick:function(){return p()}},React.createElement(sT,null)),React.createElement("button",{className:"templately-dmc-header-toggle-button ".concat(v?"show":"hide"),onClick:function(){return y(!v)}},React.createElement(aT,null))),React.createElement("div",{className:"templately-dmc-body"},React.createElement("div",{className:"templately-dmc-body-inner"},0===_e&&React.createElement(React.Fragment,null,React.createElement(rT,{type:"text",name:"page_title",placeholder:m[0]?"i.e: ".concat(m[0]):"",label:(0,Pt.__)("Site Title","templately"),value:S,onChange:function(e){return x(e.target.value)}}),React.createElement(rT,{type:"text",name:"page_name",placeholder:m[1]?"i.e: ".concat(m[1]):"",label:(0,Pt.__)("Site Tagline","templately"),value:C,onChange:function(e){return P(e.target.value)}}),u&&!0===z&&React.createElement("div",{className:"templately-dmc-file-uploader-wrapper"},React.createElement("h4",{className:"templately-title"},"Upload a logo"),React.createElement("p",{className:"templately-info"},"Upload a logo for your site. You can upload/update it anytime later."),React.createElement(iT.MediaUpload,{onSelect:function(e){null!=e&&e.url&&(l.set("logo",JSON.stringify({id:e.id,url:e.url})),L(e.url))},allowedTypes:["image"],value:N,render:function(e){var t=e.open;return React.createElement("button",{onClick:t,className:"templately-dmc-file-uploader"},React.createElement("span",{className:"icon"},N&&React.createElement(React.Fragment,null,React.createElement("span",{className:"templately-dmc-file-remove-button",onClick:function(e){e.preventDefault(),e.stopPropagation(),L(""),l.delete("logo")}},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 -0.5 21 21"},React.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},React.createElement("g",{fill:"#fff",transform:"translate(-179 -360)"},React.createElement("g",{transform:"translate(56 160)"},React.createElement("path",{d:"M130.35 216h2.1v-8h-2.1v8zm4.2 0h2.1v-8h-2.1v8zm-6.3 2h10.5v-12h-10.5v12zm2.1-14h6.3v-2h-6.3v2zm8.4 0v-4h-10.5v4H123v2h3.15v14h14.7v-14H144v-2h-5.25z"})))))),React.createElement("img",{src:N,alt:""})),!N&&React.createElement(lT,null)),React.createElement("span",{className:"content"},React.createElement("span",{className:"title"},React.createElement("span",{className:"highlighted"},"Click to upload")," logo"),React.createElement("span",{className:"info"},"SVG, PNG, JPG or GIF (max. 800x400 px)")))}}),N&&React.createElement(React.Fragment,null,React.createElement("br",null),React.createElement(oT.RangeControl,{label:"Logo Width (px)",value:R,onChange:function(e){j(e)},min:20,max:800})))),1===_e&&u&&!0===z&&React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-color-picker-section"},React.createElement("div",{className:"templately-color-picker-section-label-wrapper"},React.createElement("label",{className:"templately-color-picker-section-label"},"Select Color"),React.createElement("button",{className:"templately-color-picker-reset-button",onClick:function(){var e={};Q.forEach(function(t){e[t._id]=t.color}),Y(e)}},React.createElement(ZP,null))),React.createElement("div",{className:"templately-color-picker-panel"},Q&&(null==Q?void 0:Q.map(function(e,t){var n;return React.createElement(cT,{key:e._id,name:e.title,setColorPickerOpen:Z,color:null!==(n=null==G?void 0:G[e._id])&&void 0!==n?n:e.color,setColor:function(t){return Y(function(n){return eA(eA({},n),{},Ct({},e._id,t))})},defaultValue:e.color})})))),React.createElement(ZT,{platform:b,originalTypography:re,setTypographyPickerOpen:te,setNormalizedTypography:le,fontList:ke,formData:l,screen:Se,setScreen:xe})),u&&!1===z&&React.createElement(ma,null)),React.createElement("div",{className:"templately-dmc-button-wrapper"},React.createElement("button",{disabled:u&&!1===z,onClick:function(){return u?Re(1):Ie()},className:"templately-dmc-submit-button"},React.createElement("span",null,u&&0===_e?"Style Website":"Confirm Setup"),React.createElement(KP,null)),(u||h)&&React.createElement("button",{onClick:function(){0===_e&&h?(Le(hg({id:a})),Le(mg())):Re(-1)},disabled:0===_e&&!h,className:"templately-dmc-back-button"},React.createElement(XP,null),React.createElement("span",null,"Back"))))),React.createElement("div",{className:"templately-dependency-modal-customizer-right"},(K||ee)&&React.createElement("div",{className:"templately-dependency-modal-customizer-right-overlay"}),React.createElement("div",{style:{margin:"auto",maxWidth:"100%",maxHeight:"100%",width:"tablet"===Se?"720px":"mobile"===Se?"320px":"100%",height:"tablet"===Se?"1080px":"mobile"===Se?"480px":"100%"}},React.createElement("iframe",{ref:Ae,name:"customizer-iframe",src:c+"?plugin_preview="+E,frameBorder:0,width:"100%",height:"100%",onLoad:function(e){$i("iframe loaded",e),W(!1),Ne(function(e){return e+1})},onError:function(e){W(!1)}})),V&&React.createElement("div",{className:"templately-dependency-modal-customizer-right-loader"},React.createElement(ma,null)))))},nA=function(e){var t="string"==typeof(null==e?void 0:e.value)?"true"===(null==e?void 0:e.value.toLowerCase()):null==e?void 0:e.value;return ae().createElement("label",{className:"templately-checkbox"},ae().createElement("input",{type:"checkbox",className:"templately-checkbox-input",checked:t,disabled:null==e?void 0:e.disabled,onChange:null==e?void 0:e.onChange}),ae().createElement("span",{className:"templately-checkbox-content"},ae().createElement("span",{className:"templately-checkbox-content-inner"},null==e?void 0:e.label,null!=e&&e.disabled?ae().createElement(ae().Fragment,null," | ",ae().createElement("span",{className:"installed"},"Installed")):"",null!=e&&e.recommended?ae().createElement(ae().Fragment,null," ",ae().createElement("span",{className:"recommended"},"( Recommended )")):"")))},rA=function(e){var t,n=e.isAi,r=e.back,o=e.next,i=e.setSteps,a=e.formData,s=e.dependencies,l=e.categories,c=e.hasAttachment,u=pe((0,oe.useState)([]),2),d=u[0],p=u[1],h=pe((0,oe.useState)(null===(t=a.get("import_demo_content"))||void 0===t||t),2),f=h[0],m=h[1],g=pe((0,oe.useState)(!0),2),v=g[0],y=g[1],b=pe((0,oe.useState)([]),2),w=b[0],k=b[1],E=On(function(e){return e.general.platform}),O=pe((0,oe.useState)({}),2),S=O[0],x=O[1],_=yT();(0,oe.useEffect)(function(){$i("Dependencies mounted")},[]),(0,oe.useEffect)(function(){var e;a.set("import_demo_content",null===(e=a.get("import_demo_content"))||void 0===e||e)},[]),(0,oe.useEffect)(function(){var e={dependencies:Object.fromEntries(s)||{},platform:E,categories:l||[]};_("plugins",{path:"/templately/v1/dependencies/plugins",method:"POST",data:e}).then(function(e){k(e.dependencyList||[]),p(e.requiredPlugins||[])}),_("themes",{path:"/templately/v1/dependencies/themes",method:"POST",data:{platform:E}}).then(function(e){x(e),a.set("theme",JSON.stringify(e))})},[s,E]);var C=(0,oe.useCallback)(function(e){return void 0!==(null==d?void 0:d.find(function(t){return t.plugin_file===e}))},[d]),P=[];return null==w||w.map(function(e){var t,n=function(){return null};e.mustHave||(n=function(){return function(e){var t=Da(d);t=C(e.plugin_file)?t.filter(function(t){return(null==t?void 0:t.plugin_file)!==e.plugin_file}):[].concat(Da(t),[e]),p(t)}(e)}),P.push(React.createElement(nA,{key:e.plugin_file,value:C(e.plugin_file),onChange:n,label:null==e?void 0:e.name,disabled:null!==(t=null==e?void 0:e.installed)&&void 0!==t&&t}))}),React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-dependency-modal-header"},React.createElement("h3",{className:"templately-title"},"Required Dependencies"),React.createElement("p",{className:"templately-details"},"To import this pack, please install all the listed plugins, theme, and demo contents to avoid missing dependent sections.")),React.createElement("div",{className:"templately-dependency-modal-body"},React.createElement(uT,{title:"Plugin Dependencies",current:void 0,setCurrent:function(){},id:null},P),(null==S?void 0:S.name)&&React.createElement(uT,{title:"Theme Dependency",current:void 0,setCurrent:function(){},id:null},React.createElement(nA,{value:v,onChange:function(e){return function(e,t){y(e.target.checked),"active"!==t.status&&e.target.checked?a.set("theme",JSON.stringify(t)):a.delete("theme")}(e,S)},label:S.name,recommended:"active"!==S.status,disabled:"active"===S.status}),!v&&React.createElement("p",{className:"templately-details"},"We recommend you to use this theme for a smooth importing experience.")),React.createElement("div",{className:"templately-new-collapser"},React.createElement("div",{className:"templately-new-collapser-header not-clickable"},React.createElement("div",null,React.createElement(nA,{value:"true"===f||f,onChange:function(e){m(!f),f?a.delete("import_demo_content"):a.set("import_demo_content",!0)},label:"Import Demo Content"}),!f&&React.createElement("p",{className:"templately-details"},"Demo content such as posts, products, forms, etc will be excluded from the import."))))),React.createElement("div",{className:"templately-dependency-modal-footer"},React.createElement("button",{className:"templately-button close-button",onClick:function(){r()}},(0,Pt.__)("Back","templately")),React.createElement("button",{onClick:function(){var e=[aw("writing_permission_check","Permission Passed",1,"processing"),aw("download","Downloading Template Pack","--","processing"),aw("theme","Installing Required Theme","--","processing"),aw("plugin","Installing Required Theme","--","processing"),aw("attachments","Importing Media Attachments","--","processing"),aw("templates","Importing Templates (i.e: Header, Footer, etc)","--","processing"),aw("content","Importing Page and Post Templates","--","processing"),aw("wp-content","Importing Content (Pages, Posts, Products, Navigation)","--","processing"),aw("finalize","Finalizing Your Imports","--","processing")];0===d.length&&(e=e.filter(function(e){return"plugin"!==e.type})),c||(e=e.filter(function(e){return"attachments"!==e.type})),n&&(e=e.filter(function(e){return"download"!==e.type})),i(e),a.set("plugins",JSON.stringify(d)),o()},className:"templately-dmc-submit-button"},React.createElement("span",null,"Install & Proceed"),React.createElement(KP,null))))};var oA,iA,aA=o(4552);function sA(e,t){return e+Math.random()*(t-e)}!function(e){e[e.Circle=0]="Circle",e[e.Square=1]="Square",e[e.Strip=2]="Strip"}(oA||(oA={})),function(e){e[e.Positive=1]="Positive",e[e.Negative=-1]="Negative"}(iA||(iA={}));const lA=1e3/60;class cA{constructor(e,t,n,r){this.getOptions=t;const{colors:o,initialVelocityX:i,initialVelocityY:a}=this.getOptions();this.context=e,this.x=n,this.y=r,this.w=sA(5,20),this.h=sA(5,20),this.radius=sA(5,10),this.vx="number"==typeof i?sA(-i,i):sA(i.min,i.max),this.vy="number"==typeof a?sA(-a,0):sA(a.min,a.max),this.shape=Math.floor(0+3*Math.random()),this.angle=sA(0,360)*Math.PI/180,this.angularSpin=sA(-.2,.2),this.color=o[Math.floor(Math.random()*o.length)],this.rotateY=sA(0,1),this.rotationDirection=sA(0,1)?iA.Positive:iA.Negative}update(e){const{gravity:t,wind:n,friction:r,opacity:o,drawShape:i}=this.getOptions(),a=e/lA;this.x+=this.vx*a,this.y+=this.vy*a,this.vy+=t*a,this.vx+=n*a,this.vx*=r**a,this.vy*=r**a,this.rotateY>=1&&this.rotationDirection===iA.Positive?this.rotationDirection=iA.Negative:this.rotateY<=-1&&this.rotationDirection===iA.Negative&&(this.rotationDirection=iA.Positive);const s=.1*this.rotationDirection*a;if(this.rotateY+=s,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=o,this.context.lineCap="round",this.context.lineWidth=2,i&&"function"==typeof i)i.call(this,this.context);else switch(this.shape){case oA.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case oA.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case oA.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}this.context.closePath(),this.context.restore()}}class uA{constructor(e,t){this.x=0,this.y=0,this.w=0,this.h=0,this.lastNumberOfPieces=0,this.tweenProgress=0,this.tweenFrom=0,this.particles=[],this.particlesGenerated=0,this.removeParticleAt=e=>{this.particles.splice(e,1)},this.getParticle=()=>{const e=sA(this.x,this.w+this.x),t=sA(this.y,this.h+this.y);return new cA(this.context,this.getOptions,e,t)},this.animate=e=>{const{canvas:t,context:n,particlesGenerated:r,lastNumberOfPieces:o}=this,{run:i,recycle:a,numberOfPieces:s,debug:l,tweenFunction:c,tweenDuration:u}=this.getOptions();if(!i)return!1;const d=this.particles.length,p=a?d:r;if(p<s){o!==s&&(this.tweenProgress=0,this.tweenFrom=p,this.lastNumberOfPieces=s),this.tweenProgress=Math.min(u,Math.max(0,this.tweenProgress+e));const t=c(this.tweenProgress,this.tweenFrom,s,u),n=Math.round(t-p);for(let e=0;e<n;e++)this.particles.push(this.getParticle());this.particlesGenerated+=n}l&&(n.font="12px sans-serif",n.fillStyle="#333",n.textAlign="right",n.fillText(`Particles: ${d}`,t.width-10,t.height-20));for(let n=this.particles.length-1;n>=0;n--){const r=this.particles[n];r.update(e),(r.y>t.height||r.y<-100||r.x>t.width+100||r.x<-100)&&(a&&p<=s?this.particles[n]=this.getParticle():this.removeParticleAt(n))}return d>0||p<s},this.canvas=e;const n=this.canvas.getContext("2d");if(!n)throw new Error("Could not get canvas context");this.context=n,this.getOptions=t}}const dA={width:"undefined"!=typeof window?window.innerWidth:300,height:"undefined"!=typeof window?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:aA.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0};class pA{constructor(e,t){this.lastFrameTime=0,this.setOptionsWithDefaults=e=>{const t={confettiSource:{x:0,y:0,w:this.canvas.width,h:0}};this._options={...t,...dA,...e},Object.assign(this,e.confettiSource)},this.update=(e=0)=>{const{options:{run:t,onConfettiComplete:n,frameRate:r},canvas:o,context:i}=this,a=Math.min(e-this.lastFrameTime,50);r&&a<1e3/r?this.rafId=requestAnimationFrame(this.update):(this.lastFrameTime=e-(r?a%r:0),t&&(i.fillStyle="white",i.clearRect(0,0,o.width,o.height)),this.generator.animate(a)?this.rafId=requestAnimationFrame(this.update):(n&&"function"==typeof n&&this.generator.particlesGenerated>0&&n.call(this,this),this._options.run=!1))},this.reset=()=>{this.generator&&this.generator.particlesGenerated>0&&(this.generator.particlesGenerated=0,this.generator.particles=[],this.generator.lastNumberOfPieces=0)},this.stop=()=>{this.options={run:!1},this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)},this.canvas=e;const n=this.canvas.getContext("2d");if(!n)throw new Error("Could not get canvas context");this.context=n,this.generator=new uA(this.canvas,()=>this.options),this.options=t,this.update()}get options(){return this._options}set options(e){const t=this._options?.run,n=this._options?.recycle;this.setOptionsWithDefaults(e),this.generator&&(Object.assign(this.generator,this.options.confettiSource),"boolean"==typeof e.recycle&&e.recycle&&!1===n&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),"boolean"==typeof e.run&&e.run&&!1===t&&this.update()}}const hA=oe.createRef();class fA extends oe.Component{constructor(e){super(e),this.canvas=oe.createRef(),this.canvas=e.canvasRef||hA}componentDidMount(){if(this.canvas.current){const e=mA(this.props)[0];this.confetti=new pA(this.canvas.current,e)}}componentDidUpdate(){const e=mA(this.props)[0];this.confetti&&(this.confetti.options=e)}componentWillUnmount(){this.confetti&&this.confetti.stop(),this.confetti=void 0}render(){const[e,t]=mA(this.props),n={zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0,...t.style};return(0,Ux.jsx)("canvas",{width:e.width,height:e.height,ref:this.canvas,...t,style:n})}}function mA(e){const t={},n={},r=[...Object.keys(dA),"confettiSource","drawShape","onConfettiComplete","frameRate"],o=["canvasRef"];for(const i in e){const a=e[i];r.includes(i)?t[i]=a:o.includes(i)?o[i]=a:n[i]=a}return[t,n,{}]}fA.defaultProps={...dA},fA.displayName="ReactConfetti";const gA=oe.forwardRef((e,t)=>(0,Ux.jsx)(fA,{canvasRef:t,...e}));var vA=o(4364);function yA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yA(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const wA=function(e){var t,n,r,o,i,a=e.results,s=(e.steps,e.isAi),l=(e.importCounter,pe((0,oe.useState)({0:!0}),2)),c=l[0],u=l[1],d=pe((0,oe.useState)(!0),2),p=d[0],h=d[1];(0,oe.useEffect)(function(){var e=setTimeout(function(){h(!1)},3500);return function(){return clearTimeout(e)}},[]);var f=(0,vA.A)(),m=f.width,g=f.height;function v(e){var t=e.filter(function(e){return e}).map(function(e){return e.replace(/_/g," ").split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")});return t.slice(0,-1).join(", ")+(t.length>1?" & ":"")+t.slice(-1)}var y,b=[];if(s){var w,k,E,O={label:" ",details:[]};if(null==a||null===(w=a.results)||void 0===w||!w.ai_content)return O.label=(0,Pt.__)("AI Content Processing Information Unavailable","templately"),void b.push(O);if(void 0!==(null==a||null===(k=a.results)||void 0===k||null===(k=k.ai_content)||void 0===k||null===(k=k.processed)||void 0===k?void 0:k.credit_cost)){var S=a.results.ai_content.processed.credit_cost;O.label=(0,Pt.__)("Credit Cost:","templately")+" ".concat(S)}else O.label=(0,Pt.__)("Credit Cost: Not Available","templately");if((0,_i.isEmpty)(null==a||null===(E=a.results)||void 0===E||null===(E=E.ai_content)||void 0===E||null===(E=E.processed)||void 0===E?void 0:E.pages))O.details.push(React.createElement(React.Fragment,null,(0,Pt.__)("No AI pages were processed","templately")));else{var x=a.results.ai_content.processed.pages,_=Object.values(x).filter(function(e){return"1"!==e}).length;O.details.push(React.createElement(React.Fragment,null,(0,Pt.__)("AI Generated Pages & Templates:","templately")," ",_));var C=a.results.ai_content.requested,P=a.results.ai_content.processed.pages,T=Object.values(C).flat().filter(function(e){return!P.hasOwnProperty(e)});T.length>0&&O.details.push(React.createElement(React.Fragment,null,(0,Pt.__)("Failed:","templately")," ",T.length," ",(0,Pt.__)("pages or templates","templately")))}b.push(O)}if(null!=a&&null!==(t=a.results)&&void 0!==t&&null!==(t=t.dependency_data)&&void 0!==t&&null!==(t=t.plugins)&&void 0!==t&&t.total){var A,D=a.results.dependency_data.plugins,M={label:" ".concat((0,Pt.__)("Installed Required Plugins","templately")," (").concat(D.succeed,"/").concat(D.total,")"),details:[]},N={"elementor-pro":"https://wpdeveloper.com/go/elementor","essential-addons-elementor":"https://essential-addons.com/#pricing","essential-blocks-pro":"https://essential-blocks.com/#pricing"};if((null===(A=D.failed)||void 0===A?void 0:A.length)>0)for(var L=0;L<D.failed.length;L++){var I=D.failed[L];M.details.push(React.createElement(React.Fragment,null,I.name," ",(0,Pt.__)("not found.","templately"),N[I.slug]&&React.createElement(React.Fragment,null," ".concat((0,Pt.__)("Please get it","templately")," "),React.createElement("a",{href:N[I.slug],target:"_blank",rel:"noopener noreferrer"},(0,Pt.__)("here","templately")),".")))}b.push(M)}if(null!=a&&null!==(n=a.results)&&void 0!==n&&null!==(n=n.dependency_data)&&void 0!==n&&n.theme&&(y=a.results.dependency_data.theme.success?{label:(0,Pt.__)("Installed Recommended Theme","templately")}:{label:(0,Pt.__)("Theme Installation Failed","templately")},b.push(y)),(null==a||null===(r=a.results)||void 0===r?void 0:r.attachments)>0){var R=a.results.attachments;b.push({label:"".concat((0,Pt.__)("Imported Attachments:","templately")," ").concat(R)})}if((null==a||null===(o=a.results)||void 0===o||null===(o=o.post_types)||void 0===o?void 0:o.length)>0){var j=v(a.results.post_types);b.push({label:"".concat((0,Pt.__)("Imported Contents:","templately")," ").concat(j)})}if((null==a||null===(i=a.results)||void 0===i||null===(i=i.template_types)||void 0===i?void 0:i.length)>0){var F=a.results.template_types;F=F.map(function(e){return e.includes("single")?(0,Pt.__)("Single Post type","templately"):e});var z=v(F=Da(new Set(F)));b.push({label:"".concat((0,Pt.__)("Imported Templates:","templately")," ").concat(z)})}return b.push({label:(0,Pt.__)("Imported Site Settings: Layout, Fonts, Colors, Typography, Images, Custom CSS, etc.","templately")}),React.createElement(React.Fragment,null,React.createElement(gA,{className:"templately-confetti-canvas",width:m,height:g,recycle:p}),React.createElement("div",{className:"templately-dependency-modal-header"},React.createElement("h3",{className:"templately-title"},(0,Pt.__)("Congratulations! Your Website is ready 🚀","templately")),React.createElement("p",{className:"templately-details"},(0,Pt.__)("You have imported and applied the following to your site:","templately"))),React.createElement("div",{className:"templately-dependency-modal-body"},React.createElement("ul",{className:"templately-dependency-processing-wrapper"},null==b?void 0:b.map(function(e,t){var n,r,o;return React.createElement("li",{key:t,className:"templately-dependency-processing-item complete ".concat((null==e||null===(n=e.details)||void 0===n?void 0:n.length)>0?"has-sub-menu":""," ").concat(null!=c&&c[t]?"collapsed":"show")},React.createElement("span",{className:"templately-label"},null==e?void 0:e.label,React.createElement("div",{className:"templately-collapse-icon",onClick:function(){return u(function(e){return bA(bA({},e),{},Ct({},t,!(null!=e&&e[t])))})}},React.createElement(Sn,null))),(null==e||null===(r=e.details)||void 0===r?void 0:r.length)>0&&React.createElement("div",{className:"templately-dependency-processing-details-wrapper"},React.createElement("ul",{className:"templately-dependency-processing-details"},null==e||null===(o=e.details)||void 0===o?void 0:o.map(function(e,t){return React.createElement("li",{key:t},e)}))))}))),React.createElement("div",{className:"templately-dependency-modal-footer"},React.createElement("a",{href:templately.url,target:"_blank",className:"templately-dependency-modal-footer-final-button",style:{marginLeft:0,width:"100%",color:"#FFF"}},(0,Pt.__)("Visit your website","templately"))))},kA=function(e){var t,n,r,o,i=e.steps,a=e.formData,s=e.start,l=(e.startModifyAiContent,e.isAi),c=pe((0,oe.useState)(!1),2),u=c[0],d=c[1],p=pe(gT("process_id",""),2),h=(p[0],p[1],pe(gT("aiRequestData",[]),1)[0]),f=pe(gT("isRequestStarted",!1),2),m=f[0],g=f[1],v=pe(gT("isAIRequestDone",!1),2),y=(v[0],v[1],(0,_i.isEmpty)(h)||null==h||!h.prompt||null==h||h.AIPageIDs,On(function(e){return{processId:e.general.fullSiteImport.processId,AIPageIDs:e.general.fullSiteImport.AIPageIDs}},Kt));return y.processId,y.AIPageIDs,(0,oe.useEffect)(function(){m||(g(!0),s(a))},[]),React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-dependency-modal-header"},React.createElement("h3",{className:"templately-title"},"Your website is being ready..."),React.createElement("p",{className:"templately-details"},l?(0,Pt.__)("This usually takes a few minutes. Please do not close the window until the process is complete.","templately"):(0,Pt.__)("This usually takes a few moments. Please do not close the window until the process is complete.","templately"))),React.createElement("div",{className:"templately-dependency-modal-body"},React.createElement("ul",{className:"templately-dependency-processing-wrapper"},null==i||null===(t=i.filter(function(e){return"error"!==(null==e?void 0:e.type)}))||void 0===t?void 0:t.map(function(e){return React.createElement("li",{key:e.type,className:"templately-dependency-processing-item ".concat(null==e?void 0:e.status)},React.createElement("span",{className:"templately-label"},null==e?void 0:e.message),"error"!==(null==e?void 0:e.status)&&React.createElement("span",{className:"templately-count"},"string"==typeof(null==e?void 0:e.progress)?null==e?void 0:e.progress:"".concat(null==e?void 0:e.progress,"%")))})),(null==i||null===(n=i.filter(function(e){return"error"===(null==e?void 0:e.type)}))||void 0===n?void 0:n.length)>0&&React.createElement("div",{className:"templately-dependency-processing-wrapper"},null==i||null===(r=i.filter(function(e){return"error"===(null==e?void 0:e.type)&&(null==e?void 0:e.handleRetry)}))||void 0===r?void 0:r.map(function(e){return React.createElement("button",{id:"templately-fsi-retry-button",_isDisabled:u,onClick:function(t){d(!0),e.handleRetry(t)}},React.createElement(jn,null))}),React.createElement("ul",null,null==i||null===(o=i.filter(function(e){return"error"===(null==e?void 0:e.type)}))||void 0===o?void 0:o.map(function(e){return React.createElement("li",{key:e.type,className:"templately-dependency-processing-item ".concat(null==e?void 0:e.status," warning no-icon")},React.createElement("h4",{className:"templately-title"},(null==e?void 0:e.title)||"Something went wrong"),React.createElement("span",{className:"templately-label"},React.createElement(BS.RawHTML,null,null==e?void 0:e.message)))}))),React.createElement("div",{style:{width:"300px",marginLeft:"auto",marginRight:"auto"}},React.createElement("img",{src:templately.icons.construction,alt:"construction",style:{width:"100%"}}))))};var EA=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],OA=function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),r=String(t.getOptionValue(e)).toLowerCase(),o=String(t.getOptionLabel(e)).toLowerCase();return r===n||o===n},SA={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some(function(t){return OA(e,t,r)})||n.some(function(t){return OA(e,t,r)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},xA=(0,oe.forwardRef)(function(e,t){var n=function(e){var t=e.allowCreateWhileLoading,n=void 0!==t&&t,r=e.createOptionPosition,o=void 0===r?"last":r,i=e.formatCreateLabel,a=void 0===i?SA.formatCreateLabel:i,s=e.isValidNewOption,l=void 0===s?SA.isValidNewOption:s,c=e.getNewOptionData,u=void 0===c?SA.getNewOptionData:c,d=e.onCreateOption,p=e.options,h=void 0===p?[]:p,f=e.onChange,m=Bn(e,EA),g=m.getOptionValue,v=void 0===g?_h:g,y=m.getOptionLabel,b=void 0===y?xh:y,w=m.inputValue,k=m.isLoading,E=m.isMulti,O=m.value,S=m.name,x=(0,oe.useMemo)(function(){return l(w,tp(O),h,{getOptionValue:v,getOptionLabel:b})?u(w,a(w)):void 0},[a,u,b,v,w,l,h,O]),_=(0,oe.useMemo)(function(){return!n&&k||!x?h:"first"===o?[x].concat(Da(h)):[].concat(Da(h),[x])},[n,o,k,x,h]),C=(0,oe.useCallback)(function(e,t){if("select-option"!==t.action)return f(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==x)f(e,t);else if(d)d(w);else{var r=u(w,w),o={action:"create-option",name:S,option:r};f(mp(E,[].concat(Da(tp(O)),[r]),r),o)}},[u,w,E,S,x,d,f,O]);return Oa(Oa({},m),{},{options:_,onChange:C})}(Ul(e));return oe.createElement(Wh,re({ref:t},n))}),_A=xA;const CA=function(){return ae().createElement("svg",{className:"templately-ai-content-header-bg",xmlns:"http://www.w3.org/2000/svg",width:"61",height:"71",fill:"none",viewBox:"0 0 61 71"},ae().createElement("path",{fill:"url(#paint0_linear_2112_1895)",d:"M.275 35.21c0-1.258 1.022-2.265 2.274-2.389C13.305 31.755 21.86 23.2 22.927 12.443c.123-1.251 1.13-2.273 2.388-2.273 1.257 0 2.264 1.022 2.388 2.273C28.77 23.2 37.324 31.755 48.081 32.821c1.251.124 2.273 1.131 2.273 2.389s-1.022 2.264-2.273 2.388c-10.757 1.066-19.311 9.621-20.378 20.378-.124 1.251-1.131 2.273-2.388 2.273s-2.265-1.022-2.389-2.273C21.86 47.22 13.307 38.664 2.55 37.598 1.297 37.474.275 36.467.275 35.21"}),ae().createElement("path",{fill:"#F5EAFF",d:"M45.344 7.665c0-.377.306-.68.682-.716A6.83 6.83 0 0 0 52.139.835c.037-.375.34-.682.717-.682s.679.307.716.682a6.83 6.83 0 0 0 6.113 6.114c.376.037.682.34.682.716 0 .377-.306.68-.681.717a6.83 6.83 0 0 0-6.114 6.113c-.037.376-.34.682-.716.682-.378 0-.68-.306-.717-.682a6.83 6.83 0 0 0-6.113-6.113c-.376-.037-.682-.34-.682-.717M40.344 60.251c0-.503.409-.905.909-.955a9.11 9.11 0 0 0 8.151-8.151c.05-.5.453-.91.955-.91.503 0 .906.41.956.91a9.11 9.11 0 0 0 8.151 8.15c.5.05.91.453.91.956s-.41.906-.91.956a9.11 9.11 0 0 0-8.151 8.15c-.05.501-.453.91-.956.91s-.905-.409-.955-.91a9.11 9.11 0 0 0-8.151-8.15c-.5-.05-.91-.453-.91-.956"}),ae().createElement("defs",null,ae().createElement("linearGradient",{id:"paint0_linear_2112_1895",x1:"25.315",x2:"25.315",y1:"10.17",y2:"60.249",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#F7EEFF"}),ae().createElement("stop",{offset:"1",stopColor:"#F4E7FF"}))))},PA=function(){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"18",fill:"none",style:{marginLeft:0,marginRight:"8px"},viewBox:"0 0 16 18"},ae().createElement("path",{fill:"url(#paint0_linear_2112_1918)",d:"M.5 9c0-.323.262-.582.584-.614a5.846 5.846 0 0 0 5.231-5.231c.032-.321.29-.584.613-.584s.582.263.613.584a5.846 5.846 0 0 0 5.232 5.231c.321.032.583.29.583.614 0 .322-.262.58-.583.613a5.846 5.846 0 0 0-5.232 5.231c-.031.321-.29.584-.613.584s-.581-.263-.613-.584a5.846 5.846 0 0 0-5.231-5.231C.762 9.58.5 9.323.5 9"}),ae().createElement("path",{fill:"url(#paint1_linear_2112_1918)",d:"M12.07 1.928a.19.19 0 0 1 .175-.183 1.754 1.754 0 0 0 1.57-1.57.19.19 0 0 1 .184-.175.19.19 0 0 1 .184.175 1.754 1.754 0 0 0 1.57 1.57.19.19 0 0 1 .174.183.19.19 0 0 1-.175.184 1.754 1.754 0 0 0-1.57 1.57.19.19 0 0 1-.183.175.19.19 0 0 1-.184-.175 1.754 1.754 0 0 0-1.57-1.57.19.19 0 0 1-.175-.184"}),ae().createElement("path",{fill:"url(#paint2_linear_2112_1918)",d:"M10.786 15.429c0-.13.105-.233.234-.245a2.34 2.34 0 0 0 2.092-2.093.253.253 0 0 1 .245-.234c.13 0 .233.105.246.234a2.34 2.34 0 0 0 2.092 2.093.253.253 0 0 1 .234.245c0 .129-.105.232-.234.245a2.34 2.34 0 0 0-2.092 2.093.253.253 0 0 1-.246.233.253.253 0 0 1-.245-.233 2.34 2.34 0 0 0-2.092-2.093.253.253 0 0 1-.234-.245"}),ae().createElement("defs",null,ae().createElement("linearGradient",{id:"paint0_linear_2112_1918",x1:"6.928",x2:"6.928",y1:"2.571",y2:"15.428",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#E5C8FF"}),ae().createElement("stop",{offset:"1",stopColor:"#BA6DFC"})),ae().createElement("linearGradient",{id:"paint1_linear_2112_1918",x1:"13.999",x2:"13.999",y1:"0",y2:"3.857",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#E7CBFF"}),ae().createElement("stop",{offset:"1",stopColor:"#F5E9FF"})),ae().createElement("linearGradient",{id:"paint2_linear_2112_1918",x1:"13.357",x2:"13.357",y1:"12.857",y2:"18",gradientUnits:"userSpaceOnUse"},ae().createElement("stop",{stopColor:"#E7CBFF"}),ae().createElement("stop",{offset:"1",stopColor:"#F5E9FF"}))))};var TA=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getFullYear(),n=e.getMonth(),r=new Date(t,n+1,0);if(e.getDate()===r.getDate()&&e.getMonth()===r.getMonth()&&e.getFullYear()===r.getFullYear()){var o=24-e.getHours();return"".concat(o," hour").concat(1!==o?"s":"")}var i=r.getDate()-e.getDate();return"".concat(i," day").concat(1!==i?"s":"")};const AA=function(e){var t,n=e.creditData,r=Number(n.total_used_credit)||0,o=Number(n.total_credit)||0,i=Number(n.available_credit)||0,a=Number(n.estimated_cost)||0,s=n.subscription_credit.interval||"one_time",l=o>0?Math.min(Math.round(r/o*100),100):0;return React.createElement("div",{className:"optimizer-container"},React.createElement("div",{className:"optimizer-header"},React.createElement("div",{className:"title-area"},React.createElement("h3",{className:"optimizer-title"},(0,Pt.__)("Your AI Credit","templately"))),React.createElement("a",{href:null!==(t=window.templately)&&void 0!==t&&t.dev_mode?"https://www.templately.dev/#credit":"https://www.templately.com/#credit",target:"_blank",className:"increase-limit-btn"},(0,Pt.__)("Increase Limit","templately"))),React.createElement("div",{className:"usage-container"},React.createElement("div",{className:"usage-text"},React.createElement(React.Fragment,null,r.toLocaleString(),"/",o.toLocaleString()," ",(0,Pt.__)("Credit","templately"))),React.createElement("span",{className:"credits-info tt-top","data-templately-tooltip":i?"recurring"===s?(0,Pt.__)("Monthly reset in ".concat(TA()),"templately"):(0,Pt.__)("AI credit validity: Lifetime – use anytime.","templately"):(0,Pt.__)("To generate AI content - buy credits now!","templately")},React.createElement("i",{className:"dashicons dashicons-info"}))),React.createElement("div",{className:"progress-container"},React.createElement("div",{className:"progress-bar",style:{width:"".concat(l,"%")}})),a>0&&React.createElement("p",{className:"estimated-credit"},(0,Pt.__)("Estimated AI Credits for this generation:","templately")," ",React.createElement("strong",null,a)))};function DA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DA(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const NA=function(e){var t,n=e.pack_id,r=(e.startModifyAiContent,e.back,e.next),o=e.setIsAi,i=e.removeStep,a=pe((0,oe.useState)("website-information"),2),s=a[0],l=a[1],c=pe((0,oe.useState)(!1),2),u=c[0],d=c[1],p=pe((0,oe.useState)(""),2),h=p[0],f=p[1],m=pe(gT("prompt",""),2),g=m[0],v=m[1],y=pe(gT("businessNiches",[]),2),b=y[0],w=y[1],k=pe(gT("address",""),2),E=k[0],O=k[1],S=pe(gT("email",""),2),x=S[0],_=S[1],C=pe(gT("phone",""),2),P=C[0],T=C[1],A=bn(),D=yT(),M=pe((0,oe.useState)([]),2),N=M[0],L=M[1],I=pe(gT("AIPageIDs",{"content/page":[],templates:[]}),2),R=I[0],j=I[1],F=pe(gT("aiRequestData",[]),2),z=(F[0],F[1]),B=pe(gT("previewPages",[]),2),U=B[0],V=B[1],W=pe(gT("process_id",""),2),H=(W[0],W[1]),Q=pe(gT("cachedPreviewInput",{}),2),q=Q[0],$=Q[1],G=(0,oe.useMemo)(function(){return Object.values(R).flat().length},[R]),Y=["Agency","Restaurant","Entrepreneur","Event","Non-profit","Local business","Gym","Spa","SaaS","Dentist","Blog","Construction","Creative","Cyber","eCommerce","Education","Entertainment","Fashion","Restaurants","Health","Holiday","Multipurpose","NFT","Photography","Portfolio","Technology","Travel","Dentists","Law Firms","Wedding Photographers"].concat(Da((0,_i.isArray)(N)?N:[])),X=On(function(e){return e.general.platform},Kt),K=On(function(e){var t;return null!==(t=e.general.fullSiteImport.availableCredit)&&void 0!==t?t:{available_credit:0,interval:"",purchased_credit:0,subscription_credit:0,total_credit:0,total_used_credit:0,estimated_cost:0}},Kt),Z=K.available_credit-K.estimated_cost,J=function(e,t){var o,i;if(e.preventDefault(),!g||!g.length||!g.trim())return f((0,Pt.__)("Oops! We need some details about your website.","templately")),l("website-information"),!1;f(""),z({address:E,email:x,phone:P,platform:X,pack_id:n,prompt:g,AIPageIDs:R,preview_pages:U,businessNiches:null!==(o=null==b?void 0:b.value)&&void 0!==o?o:"",isBusinessNichesNew:!Y.includes(null!==(i=null==b?void 0:b.value)&&void 0!==i?i:"")}),r()};return(0,oe.useEffect)(function(){g&&f("")},[g]),(0,oe.useEffect)(function(){d(!0);var e={id:n,isAi:!0,action:"templately_pack_import_info",nonce:window.templately.nonce};D("import_info_".concat(n),{url:(0,si.addQueryArgs)(window.ajaxurl,e),headers:{"Content-Type":"application/json"}}).then(function(e){var t,n,r,o,i;if(null!=e&&e.business_niches&&L(null==e?void 0:e.business_niches),null!=e&&null!==(t=e.data)&&void 0!==t&&t.ai_process){var a,s=null==e||null===(a=e.data)||void 0===a?void 0:a.ai_process;H(null==s?void 0:s.process_id),v(null==s?void 0:s.prompt),w({value:null==s?void 0:s.business_niches,label:null==s?void 0:s.business_niches}),O(null==s?void 0:s.address),_(null==s?void 0:s.email),T(null==s?void 0:s.phone),$(s)}if(null!=e&&null!==(n=e.data)&&void 0!==n&&n.credit_balance||null!=e&&null!==(r=e.data)&&void 0!==r&&r.estimated_cost){var l,c,u=null!==(l=e.data.credit_balance)&&void 0!==l?l:{},p=null!==(c=e.data.estimated_cost)&&void 0!==c?c:0;A(pg(MA(MA({},u),{},{estimated_cost:p})))}if(null!=e&&null!==(o=e.data)&&void 0!==o&&null!==(o=o.manifest)&&void 0!==o&&null!==(o=o.content)&&void 0!==o&&o.page||null!=e&&null!==(i=e.data)&&void 0!==i&&null!==(i=i.manifest)&&void 0!==i&&i.templates){var h,f,m,g,y=null!==(h=null==e||null===(f=e.data)||void 0===f||null===(f=f.manifest)||void 0===f||null===(f=f.content)||void 0===f?void 0:f.page)&&void 0!==h?h:{},b=null!==(m=null==e||null===(g=e.data)||void 0===g||null===(g=g.manifest)||void 0===g?void 0:g.templates)&&void 0!==m?m:{},k=Object.values(y).filter(function(e){var t;return!0!==(null===(t=e.page_settings)||void 0===t?void 0:t.page_for_posts)}),E=Object.values(y).filter(function(e){var t;return!0===(null===(t=e.page_settings)||void 0===t?void 0:t.page_on_front)}).map(function(e){return e.post_id}),S=Object.values(b),x=k.map(function(e){return e.post_id}),C=S.filter(function(e){return!x.includes(e.post_id)}).map(function(e){return e.post_id});E.length>0&&V(E),(x.length>0||C.length>0)&&j({"content/page":x,templates:C})}d(!1)}).catch(function(e){d(!1),window.templately.log&&console.error(e)})},[]),(0,oe.useEffect)(function(){(0,_i.isEmpty)(q)||(q.prompt!==g||q.business_niches!==(null==b?void 0:b.value)||q.address!==E||q.email!==x||q.phone!==P)&&H("")},[q,g,b,E,x,P]),u?React.createElement("div",{className:"templately-dependency-modal-customizer-right-loader ai-content-loader"},React.createElement(ma,null)):React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-dependency-modal-header templately-ai-content-header"},React.createElement("h3",{className:"templately-title"},(0,Pt.__)("Launch your website in seconds!","templately")),React.createElement("p",{className:"templately-details"},(0,Pt.__)("Just a few details about your site – we’ll take care of the rest.","templately")),React.createElement(CA,null)),React.createElement("div",{className:"templately-dependency-modal-body"},React.createElement("div",{className:"templately-ai-content-wrapper"},React.createElement(React.Fragment,null,React.createElement("div",{className:"templately-ai-content-inner-wrapper"},React.createElement(uT,{title:(0,Pt.__)("Website Information","templately"),current:s,setCurrent:l,id:"website-information"},React.createElement("div",{className:"templately-ai-content business-type"},React.createElement("h4",{className:"templately-ai-content-title"},(0,Pt.__)("Select website type","templately")),React.createElement(_A,{placeholder:(0,Pt.__)(" e.g., Portfolio, Blog, Business, etc.","templately"),noOptionsMessage:function(){return(0,Pt.__)("No category found, create new one!","templately")},value:b,options:Y.map(function(e){return{value:e,label:e}}),className:"templately-ai-prompt-category",classNamePrefix:"templately-ai-prompt-category",onChange:function(e){w(e)}})),React.createElement("div",{className:"templately-ai-content"},React.createElement("h4",{className:"templately-ai-content-title"},(0,Pt.__)("Tell us what your site is about","templately")),React.createElement(oT.TextareaControl,{value:g,onChange:function(e){return v(e)},className:"templately-ai-prompt ".concat(h?"templately-ai-prompt-error":""),placeholder:"Briefly describe your website’s purpose",help:(0,Pt.__)("Your input will reflect throughout the entire templates.","templately"),rows:4}),h&&React.createElement(oT.Notice,{status:"error",isDismissible:!1},h))),React.createElement(uT,{title:(0,Pt.__)("Contact Information","templately"),current:s,setCurrent:l,initialCollapsed:!0,id:"contact-information"},React.createElement("div",{className:"templately-ai-content"},React.createElement(oT.TextControl,{label:(0,Pt.__)("Full address","templately"),value:E,onChange:function(e){return O(e)},placeholder:(0,Pt.__)("123 Main St, Anytown, USA","templately"),className:"templately-ai-prompt"}),React.createElement(oT.TextControl,{label:(0,Pt.__)("Email address","templately"),value:x,onChange:function(e){return _(e)},placeholder:(0,Pt.__)("you@example.com","templately"),className:"templately-ai-prompt"}),React.createElement(oT.TextControl,{label:(0,Pt.__)("Contact number","templately"),value:P,onChange:function(e){return T(e)},placeholder:(0,Pt.__)("(123) 456-7890","templately"),className:"templately-ai-prompt"}))))),React.createElement(AA,{creditData:K}),0===G&&React.createElement(oT.Notice,{status:"error",isDismissible:!1},(0,Pt.__)("Oops! Something went wrong while generating AI content for this template. Need help? Please contact","templately")," ",React.createElement("a",{href:"https://wpdeveloper.com/support",target:"_blank"},(0,Pt.__)("support","templately"))))),React.createElement("div",{className:"templately-dependency-modal-footer"},React.createElement("button",{className:"templately-button skip-button",onClick:function(){f(""),z(null),o(!1),i({type:"ai-content"}),r()}},(0,Pt.__)("Switch to Regular","templately")),Z<=0&&React.createElement("a",{target:"_blank",href:null!==(t=window.templately)&&void 0!==t&&t.dev_mode?"https://www.templately.dev/#credit":"https://www.templately.com/#credit",className:"templately-dmc-submit-button"},React.createElement(PA,null),React.createElement("span",null,(0,Pt.__)("Buy Credit","templately")),React.createElement(KP,null)),Z>0&&React.createElement("button",{disabled:0===G,onClick:function(e){return J(e)},className:"templately-dmc-submit-button"},React.createElement(PA,null),React.createElement("span",null,(0,Pt.__)("Preview","templately"))),Z>0&&React.createElement("button",{disabled:0===G,onClick:function(e){return J(e)},className:"templately-dmc-submit-button"},React.createElement(PA,null),React.createElement("span",null,(0,Pt.__)("Set Branding","templately")),React.createElement(KP,null))))},LA=function(e){var t,n,r,o=function(){var e=pe((0,oe.useState)([]),2),t=e[0],n=e[1],r=pe((0,oe.useState)({}),2),o=r[0],i=(r[1],(0,oe.useRef)(null)),a=(0,oe.useRef)(null),s=bn(),l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1],d=(0,oe.useRef)(0),p=On(function(e){var t=e.general.fullSiteImport.formData;return e.general.fullSiteImport.formData||(t=new FormData,s({type:Fo,payload:t})),t},Kt),h=(On(function(e){return{processId:e.general.fullSiteImport.processId,AIPageIDs:e.general.fullSiteImport.AIPageIDs}},Kt).AIPageIDs,(0,oe.useCallback)(function(e){n(function(t){var n=t.map(function(t){var n;return(null==e?void 0:e.type)===(null==t?void 0:t.type)?iw(iw(iw({},t),e),{},{status:null!==(n=e.status)&&void 0!==n?n:100===e.progress?"complete":"processing"}):"error"===(null==e?void 0:e.type)&&"complete"!==t.status?iw(iw({},t),{},{status:e.status}):t});if(!m(e,n))if(null!=e&&e.position){var r=n.findIndex(function(t){return t.type===(null==e?void 0:e.position)});r>=0&&n.splice(r+1,0,iw({status:"processing"},e))}else n.push(iw({status:"processing"},e));return n})},[t])),f=(0,oe.useCallback)(function(){n(function(e){return e.filter(function(e){return"error"!==e.type}).map(function(e){return"error"===e.status?iw(iw({},e),{},{status:"processing"}):e})})},[t]),m=function(e,t){var n;return 1===(null==t||null===(n=t.filter(function(t){return t.type===e.type}))||void 0===n?void 0:n.length)},g=function(e){return n(function(t){return t.filter(function(t){return t.type!==e.type})})},v=function(e){var t,n,r=null===(t=e)||void 0===t?void 0:t.session_id,o=null===(n=e)||void 0===n?void 0:n.is_lightspeed,l=new(o?cw:EventSource)((0,si.addQueryArgs)(window.ajaxurl,{action:"templately_pack_import",nonce:window.templately.nonce,session_id:r,is_lightspeed:o}));i.current=l,l.addEventListener("log",function(){});var c=function(t){d.current+=1,null==t||t.preventDefault(),f(),t&&d.current>=7&&(e=iw(iw({},e),{},{is_lightspeed:!0})),l.close(),v(e)};l.onmessage=function(t){l.clearTimeout(),g({type:"error"});var n=JSON.parse(t.data),r=n.action,o=Bn(n,rw);switch(r){case"error":u(!1),l.close(),null!=o&&o.retry&&d.current<5?c():requestAnimationFrame(function(){h(iw(iw({},o),{},{handleRetry:c}))});break;case"updateLog":default:requestAnimationFrame(function(){h(o)});break;case"removeLog":requestAnimationFrame(function(){g(o)});break;case"complete":u(!1),s({type:jo,payload:o}),s(sg(4)),l.close();break;case"continue":l.close(),v(e);break;case"wait":l.close(),setTimeout(function(){v(e)},5e3);case"eventLog":}"error"!==r&&"complete"!==r&&"downloadComplete"!==r&&l.startTimeout()},l.onerror=function(e){var t;u(!1),null!==(t=window.templately)&&void 0!==t&&t.log&&console.error("EventSource failed:",e),l.clearTimeout(),l.close(),d.current<5?c():requestAnimationFrame(function(){h({type:"error",title:(0,Pt.__)("Oops!","templately"),message:(0,Pt.sprintf)((0,Pt.__)("It seems we're experiencing technical difficulties. Please try again or contact <a href='%s' target='_blank'>support</a>.","templately"),"https://wpdeveloper.com/support"),status:"error",handleRetry:function(e){d.current=0,c(e)}})})},l.startTimeout=function(e){l.clearTimeout(),a.current=setTimeout(function(){u(!1),l.close(),d.current<5?c():requestAnimationFrame(function(){h({type:"error",title:(0,Pt.__)("Sorry for the delay!","templately"),message:(0,Pt.sprintf)((0,Pt.__)("If it's taking longer than expected, please try again or contact <a href='%s' target='_blank'>support</a>.","templately"),"https://wpdeveloper.com/support"),status:"error",handleRetry:function(e){d.current=0,c(e)}})})},6e4)},l.clearTimeout=function(e){a.current&&(clearTimeout(a.current),a.current=null)},l.startTimeout()};return{startImporting:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;sw=0,u(!0);var r=(0,si.addQueryArgs)(window.ajaxurl,{action:"templately_pack_import_settings",nonce:window.templately.nonce});t&&e.set("process_id",t),n&&e.set("ai_page_ids",JSON.stringify(n)),fetch(r,{method:"POST",body:e}).then(function(e){return e.json()}).then(function(e){null!=e&&e.success&&v(e.data)})},steps:t,formData:p,setSteps:n,removeStep:g,currentStep:o,eventSourceRef:i,isImportRunning:c,updateStep:h}}(),i=o.setSteps,a=o.steps,s=o.removeStep,l=o.formData,c=o.startImporting,u=o.eventSourceRef,d=o.isImportRunning,p=o.startModifyAiContent,h=On(function(e){var t;return{currentStep:null!==(t=e.general.fullSiteImport.currentStep)&&void 0!==t?t:1,results:e.general.fullSiteImport.results}},Kt),f=h.currentStep,m=h.results,g=pe(gT("isAi",e.isAi),2),v=g[0],y=g[1],b=bn(),w=new Map;null===(t=e.items)||void 0===t||t.map(function(e){var t;null===(t=e.dependencies)||void 0===t||t.map(function(e){w.set(e.plugin_file,e)})}),l.set("id",null==e?void 0:e.id);var k=pe(ae().useState(!1),2),E=k[0],O=k[1],S=function(){var e=pe((0,oe.useState)(window.location),2),t=e[0],n=e[1];return(0,oe.useEffect)(function(){var e=function(e){n(iw({},window.location))};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}},[]),t}(),x=null!==(n=null===(r=window.history.state)||void 0===r?void 0:r.usr)&&void 0!==n?n:{};return(0,oe.useEffect)(function(){var t=null==x?void 0:x.isRunning;d?t||e.pushState("isRunning"):e.removeState("isRunning")},[d]),(0,oe.useEffect)(function(){!(null==x?void 0:x.isRunning)&&E&&d&&e.pushState("isRunning")},[S,E]),(0,oe.useEffect)(function(){!0!==(null==x?void 0:x.modal)&&E&&!d&&(O(!1),ya.close())},[S]),(e=>{const t="function"==typeof e,n=(0,oe.useRef)(e);(0,oe.useEffect)(()=>{n.current=e}),(0,oe.useEffect)(()=>{if(t){const e=e=>{const t=n.current(e);return"string"==typeof t?(e.preventDefault(),e.returnValue=t):e.defaultPrevented?e.returnValue="":void 0};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}},[t])})(function(e){if((null==x?void 0:x.isRunning)&&E&&d)return e.preventDefault(),alert((0,Pt.__)("Please wait until the import process is complete before navigating back.","templately")),!1}),(0,oe.useEffect)(function(){return O(!0),function(){var e;null===(e=u.current)||void 0===e||e.close(),O(!1)}},[]),ae().createElement(ae().Fragment,null,0===f&&ae().createElement("div",{className:"templately-dependency-modal-container"},ae().createElement("div",{className:"templately-dependency-modal"},ae().createElement(NA,{back:function(){return b(sg(0))},next:function(){return b(sg(1))},pack_id:null==e?void 0:e.id,formData:l,removeStep:s,setIsAi:y}),ae().createElement("button",{type:"button",className:"templately-dependency-modal-close-button",onClick:function(){return e.setShowFSIModal()}},ae().createElement(sT,null)))),1===f&&ae().createElement("div",{className:"templately-dependency-modal-container full-screen"},ae().createElement("div",{className:"templately-dependency-modal"},ae().createElement(tA,{id:null==e?void 0:e.id,live_url:null==e?void 0:e.live_url,has_settings:null==e?void 0:e.has_settings,name:e.name,back:function(){return b(sg(0))},next:function(){return b(sg(2))},formData:l,showErrorAlert:e.showErrorAlert,isAi:v,ogIsAi:e.isAi,setShowFSIModal:e.setShowFSIModal,startModifyAiContent:p}))),2===f&&(null==a?void 0:a.length)<=0&&ae().createElement("div",{className:"templately-dependency-modal-container"},ae().createElement("div",{className:"templately-dependency-modal"},ae().createElement(rA,{back:function(){return b(sg(1))},next:function(){return b(sg(3))},dependencies:w,categories:e.categories,formData:l,setSteps:i,steps:a,hasAttachment:e.hasAttachment,isAi:v}),ae().createElement("button",{type:"button",className:"templately-dependency-modal-close-button",onClick:function(){return e.setShowFSIModal()}},ae().createElement(sT,null)))),3===f&&(null==a?void 0:a.length)>0&&ae().createElement("div",{className:"templately-dependency-modal-container"},ae().createElement("div",{className:"templately-dependency-modal"},ae().createElement(kA,{steps:a,formData:l,start:c,startModifyAiContent:p,isAi:v}),ae().createElement("button",{type:"button",className:"templately-dependency-modal-close-button",onClick:function(){return e.setShowFSIModal()}},ae().createElement(sT,null)))),4===f&&ae().createElement("div",{className:"templately-dependency-modal-container"},ae().createElement("div",{className:"templately-dependency-modal"},ae().createElement(wA,{results:m,steps:a,isAi:v}),ae().createElement("button",{type:"button",className:"templately-dependency-modal-close-button",onClick:function(){return e.setShowFSIModal()}},ae().createElement(sT,null)))))},IA=function(e){var t=On(function(e){var t,n;return null!==(t=null==e||null===(n=e.general)||void 0===n||null===(n=n.fullSiteImport)||void 0===n||null===(n=n.fsiModalContext)||void 0===n?void 0:n.show)&&void 0!==t&&t},Kt),n=pe(gT("isAi",!1),2),r=n[0],o=n[1],i=On(function(e){return null!=e.profile.data},Kt),a=On(function(e){return e.profile},Kt),s=bn(),l=tt(),c=Je(),u=function(){var e,t,n=bn(),r=pe((0,oe.useState)(!1),2),o=r[0],i=r[1],a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=pe((0,oe.useState)(null),2),u=c[0],d=c[1],p=On(function(e){var t;return null!==(t=e.profile.isVerifying)&&void 0!==t&&t}),h=On(function(e){return e.profile}),f=On(function(e){return null!==e.profile.data});return(0,oe.useEffect)(function(){var e,t;s&&!p&&(i(!1),l(!1),ya.close(),u&&(u.resolve({is_verified:null!==(e=null==h||null===(t=h.data)||void 0===t?void 0:t.is_verified)&&void 0!==e&&e}),d(null)))},[p,s,null==h||null===(e=h.data)||void 0===e?void 0:e.is_verified,u]),(0,oe.useCallback)(ni(oi().mark(function e(){var t;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!f||null!=h&&null!==(t=h.data)&&void 0!==t&&t.is_verified||o||p){e.next=1;break}return i(!0),l(!0),ba({icon:"info",showCloseButton:!0,allowOutsideClick:!0,showConfirmButton:!1,html:React.createElement("div",{className:"templately-import-modal templately-modal"},React.createElement(bl,{code:"verification_check",title:(0,Pt.__)("Checking Account Verification...","templately"),message:(0,Pt.sprintf)((0,Pt.__)('We are checking your account verification status. Please wait while we verify your account. If you haven\'t verified your account yet, please check your email for the verification link. Need help? Contact our <a href="%s" target="_blank" rel="noopener noreferrer">support team</a>.',"templately"),"https://wpdeveloper.com/support/")}))},!0),n(Qm()),e.abrupt("return",new Promise(function(e,t){var n=setTimeout(function(){i(!1),l(!1),window.Swal&&window.Swal.isVisible()&&window.Swal.close(),t(new Error("Verification check timeout"))},1e4);d({resolve:function(t){clearTimeout(n),e(t)},reject:function(e){clearTimeout(n),t(e)}})}));case 1:return e.abrupt("return",!1);case 2:case"end":return e.stop()}},e)})),[n,f,null==h||null===(t=h.data)||void 0===t?void 0:t.is_verified,o,p])}(),d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal";null!==(e=c.state)&&void 0!==e&&e[t]||l(Rg(c.pathname.replace(/^\/+/,"")),{state:Ct({},t,!0)})},p=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal";null!==(e=window.history.state)&&void 0!==e&&null!==(e=e.usr)&&void 0!==e&&e[t]&&l(-1)},h=function(){var t=ni(oi().mark(function t(n){var r,h,f,m;return oi().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i){t.next=1;break}return l(Rg("sign-in"),{state:{redirectTo:c.pathname.replace(/^\/(.*)/,"$1")}}),t.abrupt("return");case 1:return h=n.currentTarget.classList.contains("with-ai"),f=null==a||null===(r=a.data)||void 0===r?void 0:r.is_verified,t.prev=2,t.next=3,u();case 3:!0===(null==(m=t.sent)?void 0:m.is_verified)&&(f=!0),t.next=5;break;case 4:t.prev=4,t.catch(2);case 5:if(!hf(i,f)){t.next=6;break}return t.abrupt("return");case 6:if(p(),p("isRunning"),d(),s(dg()),s(kg()),s(sg(1)),s(lg(0)),s(cg(!1)),window.templately.can_fsi){t.next=7;break}return ba({icon:"warning",showCloseButton:!0,html:React.createElement(EO,{title:(0,Pt.__)("Oops!","templately"),content:(0,Pt.__)("Unfortunately, you don't have permission to import templates. Please check your permissions or contact the website admin for help.","templately")})},!1),t.abrupt("return");case 7:s(h?hg({id:e.id}):fg()),o(h);case 8:case"end":return t.stop()}},t,null,[[2,4]])}));return function(_x){return t.apply(this,arguments)}}(),f=function(){vT(),s(dg()),p(),p("isRunning"),s(cg(!0)),s(mg())};return(0,oe.useEffect)(function(){t||f()},[t]),React.createElement(React.Fragment,null,React.createElement(JE(),{isOpen:t,onRequestClose:function(){return f()},className:"templately-dependency-modal-content",portalClassName:"templately-dependency-modal-portal",overlayClassName:"templately-dependency-modal-overlay",style:{overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",zIndex:"159999"},content:{position:"fixed",top:0,left:0,right:0,bottom:0,border:"none",background:"transparent",borderRadius:"0",outline:"none",padding:"0",width:"100vw",height:"100vh"}}},React.createElement(LA,re({},e,{pushState:d,removeState:p,setShowFSIModal:function(){return s(mg())},showErrorAlert:function(e){vT(),s(dg()),s(cg(!0)),ba({icon:"error",showCloseButton:!0,html:React.createElement(EO,{title:(0,Pt.__)("Oops!","templately"),content:e})},!1)},isAi:r}))),React.createElement("div",{className:"templately-import-buttons"},(null==e?void 0:e.ai_compatible)&&React.createElement("div",{className:"templately-ai-import-btn"},React.createElement("button",{className:"templately-button btn-insert-pack with-ai",onClick:h},React.createElement(YP,null),(0,Pt.__)("Build with Templately AI","templately"),React.createElement("span",{className:"templately-button-badge"},"Beta"))),React.createElement("button",{className:"templately-button btn-insert-pack",onClick:h},React.createElement(An,null),(0,Pt.__)("Build Full Website","templately"))),React.createElement("small",{className:"full-site-doc"},React.createElement("i",{className:"dashicons dashicons-info"}),React.createElement("a",{href:"https://docs.templately.com/home/how-templately-full-site-import-works/",target:"_blank",rel:"noopener noreferrer"},"Learn more")," ","about full site import"))};function RA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RA(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var FA=function(e){var t,n=e.label,r=e.data,o=void 0===r?[]:r,i=e.setType,a=e.activeType,s=e.type,l=e.templateType,c=void 0===l?null:l,u=e.setTemplateType,d=e.isOpen,p=e.setIsOpen,h=pe((0,oe.useState)({}),2),f=h[0],m=h[1],g=pe((0,oe.useState)([]),2),v=g[0],y=g[1];(0,oe.useEffect)(function(){if(o.length>0){var e={};o.map(function(t){null!=e&&e[t.template_type.id]?e[t.template_type.id].count=e[t.template_type.id].count+1:e[t.template_type.id]={id:t.template_type.id,count:1,name:t.template_type.name}}),m(e)}},[o]),(0,oe.useEffect)(function(){if(Object.keys(f).length>0){var e=[],t=function(t){e.push(ae().createElement("li",{onClick:function(){u(f[t].id),p(function(e){return jA(jA({},e),{},Ct({},s,!e[s]))})},key:f[t].name},f[t].name," (",f[t].count,")"))};for(var n in f)t(n);y(e)}},[f]);var b=Vn()("templately-pack-filter-btn",s,c,{active:s===a,"menu-open":s===a&&"all"!==s&&d[s]}),w=Vn()("templately-button","btn-".concat(s),{active:s===a});return ae().createElement("div",{className:b},ae().createElement("button",{className:w,onClick:function(){i(s),!p||d[s]&&s!==a||p(function(e){return jA(jA({},e),{},Ct({},s,!e[s]))})}},"all"!=s?ae().createElement("span",null,null!==(t=null==o?void 0:o.length)&&void 0!==t?t:0):"",n),v.length>0&&ae().createElement("ul",null,v))};const zA=function(e){var t=e.blocksData,n=e.pagesData,r=e.setType,o=e.setTemplateType,i=e.type,a=e.templateType,s=e.isOpen,l=e.setIsOpen,c=e.url;return ae().createElement("div",{className:"templately-packs-filters"},ae().createElement(FA,{type:"all",activeType:i,setType:r,label:(0,Pt.__)("All","templately")}),ae().createElement(FA,{type:"blocks",isOpen:s,setIsOpen:l,activeType:i,templateType:a,data:t,label:(0,Pt.__)("Blocks","templately"),setType:r,setTemplateType:o}),ae().createElement(FA,{type:"pages",isOpen:s,setIsOpen:l,activeType:i,templateType:a,data:n,label:(0,Pt.__)("Pages","templately"),setType:r,setTemplateType:o}),ae().createElement("a",{href:c,target:"_blank",className:"templately-button btn-live-demo"},(0,Pt.__)("Live Demo","templately")))};var BA=["children","details"],UA=(0,oe.createContext)({items:[],templateType:"",type:"",setType:function(e){return e}}),VA=function(e){var t,n,r,o,i,a=e.children,s=e.details,l=(Bn(e,BA),pe((0,oe.useState)({blocks:!1,pages:!1}),2)),c=l[0],u=l[1],d=pe((0,oe.useState)("all"),2),p=d[0],h=d[1],f=pe((0,oe.useState)(null),2),m=f[0],g=f[1],v=pe((0,oe.useState)([]),2),y=v[0],b=v[1],w=pe((0,oe.useState)([]),2),k=w[0],E=w[1];return(0,oe.useEffect)(function(){var e;if((null==s||null===(e=s.items)||void 0===e?void 0:e.length)>0){var t=null==s?void 0:s.items.filter(function(e){return"block"===e.type}),n=null==s?void 0:s.items.filter(function(e){return"page"===e.type});b(t),E(n)}},[s]),(0,oe.useEffect)(function(){g(null)},[p]),ae().createElement(UA.Provider,{value:{id:null==s?void 0:s.id,name:null==s?void 0:s.name,fullsite_import:null!==(t=null==s?void 0:s.fullsite_import)&&void 0!==t&&t,ai_compatible:null!==(n=null==s?void 0:s.ai_compatible)&&void 0!==n&&n,has_settings:null!==(r=null==s?void 0:s.has_settings)&&void 0!==r&&r,hasAttachment:null!==(o=null==s?void 0:s.has_attachments)&&void 0!==o&&o,items:null==s?void 0:s.items,live_url:null==s?void 0:s.live_url,categories:null!==(i=null==s?void 0:s.categories)&&void 0!==i?i:[],blocksData:y,pagesData:k,type:p,setType:h,templateType:m,setTemplateType:g,isOpen:c,setIsOpen:u}},a)},WA=UA.Consumer;const HA=function(e){var t=e.url,n=e.thumbnail,r=e.alt,o=e.screenshotsEnabled,i=e.price,a=e.isPack,s=void 0!==a&&a,l=o.hasShots,c=o.setIsOpen,u=Vn()("templately-items-banner-wrapper",{"is-pack":s});return ae().createElement("div",{className:u},!s&&ae().createElement("div",{className:"templately-items-banner"},ae().createElement(TE,{inDetails:!0,className:"templately-details-banner-badge",isPro:+i>0}),ae().createElement("img",{src:n,alt:r}),!s&&ae().createElement("div",{className:"tib-hover"},l&&ae().createElement("button",{className:"templately-button btn-screenshots",onClick:function(){return c(!0)}},(0,Pt.__)("Screenshots","templately")),ae().createElement("a",{href:t,target:"_blank",className:"templately-button btn-live-demo"},(0,Pt.__)("Live Demo","templately")))),s&&ae().createElement(WA,null,function(e){return ae().createElement(zA,re({},e,{url:t}))}))};var QA=[1,2,3,4,5];const qA=function(e){var t=e.onStarClick,n=e.rating;return ae().createElement("ul",{className:"tly__rate__with__star"},QA.map(function(e){return ae().createElement("li",{onClick:function(){return t(e)},key:e,style:{cursor:"pointer"},className:"tly__star ".concat(e<=n?"active":"")},ae().createElement(ur,null))}))};var $A=["template_type","categories","pack","platform","dependencies","isPurchased","isSubscribed","details"];const GA=function(e){var t,n=e.template_type,r=e.categories,o=e.pack,i=e.platform,a=e.dependencies,s=e.isPurchased,l=e.isSubscribed,c=e.details,u=Bn(e,$A),d=bn(),p=tt(),h=pe(xt(),1)[0],f=On(function(e){return null!=e.profile.data}),m=u.downloads,g=u.favourite_count,v=u.params,y=u.price,b=u.rating,w=HE(u.id,u.type,g),k=w.starred,E=w.setIsClicked,O=w.favouriteCount,S=On(function(e){var t,n=null==e||null===(t=e.profile)||void 0===t||null===(t=t.reviews)||void 0===t?void 0:t.pack,r=null,o=b;return f&&"pack"===u.type&&(r=null==n?void 0:n[u.id],o=(null==n?void 0:n["avg_".concat(u.id)])||b),{myRating:r,avgRating:o}}),x=S.myRating,_=S.avgRating,C=(0,oe.useMemo)(function(){return(null==r?void 0:r.length)>0?r.map(function(e,t){return ae().createElement(ae().Fragment,{key:t},ae().createElement(gE,{query:{category:e.id},ignoreKeys:["tag_id"],to:"".concat(i,"/").concat(u.type,"s")},e.name),r.length-1!==t?", ":"")}):[]},[]),P=(0,oe.useMemo)(function(){if("pack"==u.type){var e,t={};return null===(e=u.items)||void 0===e||e.filter(function(e){var n;(null==e||null===(n=e.dependencies)||void 0===n?void 0:n.length)>0&&e.dependencies.map(function(e){t[e.id]=e})}),Object.values(t)}return a},[]);return ae().createElement("div",{className:"templately-items-sidebar templately-item-widget"},ae().createElement("ul",null,null!=n&&ae().createElement("li",null,ae().createElement("span",{className:"label"},(0,Pt.__)("Template Type","templately")," :"),ae().createElement(gE,{ignoreKeys:["tag_id","category"],query:{templateType:null==n?void 0:n.slug},to:"".concat(i,"/").concat(null==v?void 0:v.type)},null==n?void 0:n.name)),(null==C?void 0:C.length)>0&&ae().createElement("li",null,ae().createElement("span",{className:"label"},(0,Pt.__)("Category","templately")," :"),C),null!=o&&ae().createElement("li",null,ae().createElement("span",{className:"label"},(0,Pt.__)("Item Parent","templately")," :"),ae().createElement(gE,{ignoreKeys:["tag_id","category"],to:"".concat(i,"/packs/").concat(null==o?void 0:o.slug)},null==o?void 0:o.name)),(null==P?void 0:P.length)>0&&ae().createElement("li",{className:"templately-details-dependencies-wrapper"},ae().createElement("span",{className:"label"},(0,Pt.__)("Dependency","templately")," :"),ae().createElement("span",{className:"templately-details-dependencies"},ae().createElement(AE,{dependencies:P}))),y>0&&!s&&ae().createElement("li",{className:"templately-details-price-wrapper"},ae().createElement("span",{className:"label"},(0,Pt.__)("Price","templately")," :"),ae().createElement("span",{className:"templately-details-price"},"$",y)),ae().createElement("li",null,ae().createElement("div",{className:"templately-item-details-meta d-inline-flex"},void 0!==g&&ae().createElement(ca,{className:"tt-top","data-templately-tooltip":k?(0,Pt.__)("Added to Favourite","templately"):(0,Pt.__)("Add to Favourite","templately"),onClick:function(){return E(!0)}},ae().createElement(sr,{color:k?"f5365b":"#ddd"}),O),ae().createElement("span",{className:"d-inline-flex align-center"},ae().createElement(rr,{style:{color:"#5453fd"}}),null!=m?m:0),(null==u?void 0:u.fullsite_import)&&ae().createElement("span",{className:"t-full-site-import"},"Full Site Import"))),ae().createElement("li",null,"pack"==u.type&&ae().createElement("div",{className:"templately-details-rating-wrapper"},ae().createElement(ca,{"data-templately-tooltip":(0,Pt.__)("Average Rating","templately"),className:"templately-details-rating tt-top ".concat(null==_?"not-rated":"")},ae().createElement(ur,null),ae().createElement("span",null,null!==(t=null==_?void 0:_.toFixed(1))&&void 0!==t?t:ae().createElement("small",null,(0,Pt.__)("Not Rated","templately")))),ae().createElement("div",{className:"templately-details-rating-submit",style:{rowGap:2,columnGap:5}},ae().createElement("label",null,x&&0!==x?"Your rating:":"Submit your rating here:"),ae().createElement(qA,{onStarClick:function(e){var t;f?d((t={type_id:u.id,itemType:u.type,rating:e},jf({type:yo},t))):p(Rg("sign-in",{"redirect-to":h.get("path")}))},rating:x})))),y>0&&!s&&"pack"===(null==u?void 0:u.type)&&ae().createElement("li",{style:{marginTop:"30px"}},ae().createElement("a",{target:"_blank",href:qi(null==u?void 0:u.slug,"pack"),className:"templately-button tb-import tb-purchase"},ae().createElement(CO,null),(0,Pt.sprintf)((0,Pt.__)("Purchase This %s","templately"),"pack")))),(null==u?void 0:u.fullsite_import)&&"pack"===(null==u?void 0:u.type)&&(0===parseInt(y)||s||l||0===y)&&ae().createElement(VA,{details:c},ae().createElement(WA,null,function(e){return ae().createElement(IA,re({sidebar:!0,platform:i},e))})))};var YA=["isLoggedIn","isPurchased"];const XA=function(e){var t,n=e.isLoggedIn,r=e.isPurchased,o=null!==(t=Bn(e,YA).platform)&&void 0!==t?t:"elementor";return ae().createElement("div",{className:"templately-pack-items"},ae().createElement("div",{className:"templately-items"},ae().createElement(WA,null,function(e){var t=e.items;return"blocks"===e.type?t=e.blocksData:"pages"===e.type&&(t=e.pagesData),null!=e.templateType&&(t=t.filter(function(t){return(null==t?void 0:t.template_type.id)==e.templateType})),t.map(function(e){return ae().createElement(YE,{isPurchased:r,isLoggedIn:n,key:e.id,platform:o,content:e})})})))};var KA=o(4145),ZA={desktop:{breakpoint:{max:3e3,min:1170},items:3,slidesToSlide:3},tablet:{breakpoint:{max:1170,min:464},items:2,slidesToSlide:2},mobile:{breakpoint:{max:464,min:0},items:1,slidesToSlide:1}};const JA=function(e){var t=e.children;return ae().createElement("div",{className:"templately-carousel-wrapper"},ae().createElement(KA.default,{deviceType:"desktop",autoPlay:!1,arrows:!1,showDots:!0,renderDotsOutside:!0,responsive:ZA,itemClass:"templately-carousel-item",containerClass:"templately-carousel",dotListClass:"templately-carousel-dot-list"},t))};var eD=["title","slug","platform"];const tD=function(e){var t=e.title,n=e.slug,r=e.platform,o=Bn(e,eD);return ae().createElement("div",{className:"templately-layouts-in-packs templately-item-widget"},ae().createElement("h3",null,null!=t?t:ae().createElement(ae().Fragment,null,(0,Pt.__)("Layouts In This Pack","templately"),": ",o.items.length)),ae().createElement(JA,null,o.items.map(function(e){var t=e.name,o=e.slug,i=e.type,a=e.price,s=e.thumbnail,l="";return n===o&&(l="templately-layouts-in-packs-item-active"),ae().createElement("div",{key:o,className:"templately-layouts-in-packs-item ".concat(l)},ae().createElement(bE,{list:!1,to:"".concat(r,"/").concat(i,"s/").concat(o)},ae().createElement("div",{"data-templately-tooltip":t,className:"templately-layouts-in-packs-item-image"},ae().createElement(TE,{inDetails:!0,className:"ribbon ribbon-top-right",isPro:+a>0}),ae().createElement("img",{style:{width:"100%"},src:s,alt:t}))))})))},nD=fn(function(e){return{platform:e.general.platform,items:e.general.featured.items,isLoading:e.general.featured.isLoading}},function(e){return{getFeaturedTemplates:function(t){return e(function(e){return jf({type:Eo},e)}(t))}}})(function(e){return(0,oe.useEffect)(function(){e.getFeaturedTemplates({platform:e.platform})},[]),e.isLoading?ae().createElement(ma,{style:"placeholder",template:"featuredItems"}):0===e.items.length?null:ae().createElement(tD,{title:(0,Pt.__)("Featured Items","templately"),slug:e.slug,platform:e.platform,items:e.items})});function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const iD=fn(function(e,t){var n,r,o,i;return{counts:e.general.counts,profile:e.profile.data,isLoggedIn:null!=e.profile.data,pricing:null!==(n=null===(r=e.general)||void 0===r||null===(r=r.pricing)||void 0===r?void 0:r.data)&&void 0!==n?n:[],isPricingLoading:null===(o=null===(i=e.general)||void 0===i||null===(i=i.pricing)||void 0===i?void 0:i.isLoading)||void 0===o||o}},function(e){return{}})(function(e){var t,n,r,o,i,a,s,l,c,u=pe((0,oe.useState)("lifetime"),2),d=u[0],p=u[1],h=pe((0,oe.useState)(Qi("lifetime")),2),f=h[0],m=h[1],g=pe((0,oe.useState)({starter:0,pro:0}),2),v=g[0],y=g[1];(0,oe.useEffect)(function(){if(Ni(e.counts)){var t=0,n=0;Object.keys(e.counts).map(function(r){Object.keys(e.counts[r]).map(function(o){t+=e.counts[r][o].starter,n+=e.counts[r][o].pro})}),y(function(e){return oD(oD({},e),{},{starter:t,pro:n})})}},[e.counts]),(0,oe.useEffect)(function(){m(Qi(d))},[d]),(0,oe.useEffect)(function(){null!=e.profile&&e.profile.plan.indexOf("yearly")>-1&&p("lifetime")},[e.profile]);var b=(null===(t=e.profile)||void 0===t||null===(t=t.plan)||void 0===t?void 0:t.indexOf("free"))>-1,w=(null===(n=e.profile)||void 0===n||null===(n=n.plan)||void 0===n?void 0:n.indexOf("lifetime"))>-1;if(!b&&e.isLoggedIn)return null;var k={},E={},O="";if(e.details.price>0&&!w){var S=e.pricing.filter(function(e){return"year"==e.type&&e.price>0});if(E=S[0],"premium"===d){if((null==S?void 0:S.length)>0){k=S[0];var x=S[0].discounted_price/12;O="".concat(x.toString().substr(0,x.toString().indexOf(".")+3),"/month")}}else if("lifetime"===d){var _=e.pricing.filter(function(e){return"one_time"==e.type});(null==_?void 0:_.length)>0&&(k=_[0],O="<del>$".concat(_[0].price,"</del> $").concat(_[0].discounted_price))}}return ae().createElement(ae().Fragment,null,e.details.price>0&&!w&&ae().createElement("div",{className:"tly__sidebar__widget tly__site__promote__widget templately-subscription-upgrade-widget templately-item-widget"},ae().createElement("div",{className:"tly__promo_heading"},ae().createElement("img",{src:window.templately.promo_image,alt:"Ultimate Access To All Premium Templates"}),ae().createElement("div",{className:"tly__plan__card tly__center"},ae().createElement("h5",{className:"tly__plan__heading tly__lg"},"Ultimate Access To All Premium Templates"),ae().createElement("div",{className:"tly__plan__description_wrapper tly__mt_0"},ae().createElement("p",{className:"tly__plan__description"},"Build your websites with any of our powerful, premium WordPress templates & the ultimate cloud-based WorkSpace. Go PRO now!")))),ae().createElement("div",{className:"tly__promo_body"},ae().createElement("div",{className:"tly__plan__card"},ae().createElement("h5",{className:"tly__plan__heading"},"Select Your Plan"),ae().createElement("div",{className:"tly__plan__wrapper"},ae().createElement("label",{className:"tly__plan",htmlFor:"templately-subscription-plan-free"},ae().createElement("input",{id:"templately-subscription-plan-free",type:"radio",name:"plan",value:"premium",onChange:function(){return p("premium")},checked:"premium"===d}),ae().createElement("span",{className:"tly__plan_content"},"Premium",ae().createElement("span",{className:"tly__plan__badge"},"Save ",Math.floor(((null===(r=E)||void 0===r?void 0:r.price)-(null===(o=E)||void 0===o?void 0:o.discounted_price))/(null===(i=E)||void 0===i?void 0:i.price)*100),"%"))),ae().createElement("label",{className:"tly__plan",htmlFor:"templately-subscription-plan-lifetime"},ae().createElement("input",{type:"radio",name:"plan",id:"templately-subscription-plan-lifetime",value:"lifetime",onChange:function(){return p("lifetime")},checked:"lifetime"===d}),ae().createElement("span",{className:"tly__plan_content"},"Lifetime"))),ae().createElement("div",{className:"tly__plan__description_wrapper"},ae().createElement("h5",{className:"tly__plan__heading"},"Get Unlimited Access & Save Up To ",Math.floor(((null===(a=k)||void 0===a?void 0:a.price)-(null===(s=k)||void 0===s?void 0:s.discounted_price))/(null===(l=k)||void 0===l?void 0:l.price)*100),"%"),ae().createElement("ul",{className:"tly__plan__description_list"},ae().createElement("li",null,v.starter," STARTER Items"),ae().createElement("li",null,v.pro," PRO Items"),ae().createElement("li",null,"Unlimited WorkSpace"),ae().createElement("li",null,"Unlimited Items On My Cloud")),ae().createElement("h5",{className:"tly__plan__heading tly__mt_1",dangerouslySetInnerHTML:{__html:"".concat("premium"===d?"Starting from: $"+O:"Price: "+O)}}),ae().createElement("a",{href:f,className:"tly__button tly__success__button templately-button",target:"_blank"},ae().createElement("span",null,e.isLoggedIn?"Upgrade Now":"Go With Subscription")))))),0==e.details.price&&!e.isLoggedIn&&ae().createElement("div",{className:"tly__sidebar__widget tly__site__promote__widget templately-item-widget"},ae().createElement("div",{className:"tly__promo_heading"},ae().createElement("img",{src:window.templately.promo_image,alt:"Get Free Access To"})),ae().createElement("div",{className:"tly__promo_body"},ae().createElement("div",{className:"tly__plan__card tly__center"},ae().createElement("h5",{className:"tly__plan__heading tly__lg"},"Get Free Access To ",null==e||null===(c=e.details)||void 0===c?void 0:c.name),ae().createElement("div",{className:"tly__plan__description_wrapper tly__mt_0"},ae().createElement("p",{className:"tly__plan__description"},"Build your website with this powerful, customizable, and FREE WordPress template. To get started, register now!"),ae().createElement(gE,{to:"sign-in",style:{marginTop:10},className:"tly__button templately-button tly__success__button tly__mt_1_5"},ae().createElement("span",null,"Access This Template")))))))}),aD=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d=null!==(n="blocks"===(null==t||null===(r=t.params)||void 0===r?void 0:r.type)?"sections":null==t||null===(o=t.params)||void 0===o?void 0:o.type)&&void 0!==n?n:"packs",p=null==t||null===(i=t.params)||void 0===i?void 0:i.slug,h=null!==(a=null==t||null===(s=t.params)||void 0===s?void 0:s.platform)&&void 0!==a?a:e.general.platform;return{details:null!=e&&e[d]&&null!==(l=e[d])&&void 0!==l&&l[h]&&null!==(c=e[d][h])&&void 0!==c&&c.itemsDetails&&null!==(u=e[d][h].itemsDetails)&&void 0!==u&&u[p]?e[d][h].itemsDetails[p]:{},platform:h,profile:e.profile.data,isLoggedIn:null!=e.profile.data}},function(e){return{getTemplate:function(t){return e(function(e){return jf({type:Ii(bo,e.key)},e)}(t))},setPlatform:function(t){return e(kf(t))}}})(function(e){var t,n,r=pe((0,oe.useState)(!1),2),o=r[0],i=r[1],a=e.params,s=e.details,l=e.platform,c=pe(xt(),1)[0],u=tt(),d=bn(),p=(0,oe.useRef)(!1);(0,oe.useEffect)(function(){e.setPlatform(e.platform),e.getTemplate({key:Di(a.type),slug:a.slug,platform:l})},[a.slug,a.type,l]),(0,oe.useEffect)(function(){var t=c.get("process");if("pack"===s.type&&"ai"===t&&s.id&&!p.current){if(p.current=!0,!e.isLoggedIn){var n=c.get("path")||"";return void u(Rg("sign-in",{"redirect-to":n}),{})}d(hg({id:s.id}));var r=c.get("path")||"",o=Rg(r,null,["process"]);u(o,{replace:!0})}},[s.type,s.id,c,u,d,e.isLoggedIn]);var h=(null===(t=e.profile)||void 0===t||null===(t=t.plan)||void 0===t?void 0:t.indexOf("lifetime"))>-1,f=QE(s.id,s.type,null==s||null===(n=s.pack)||void 0===n?void 0:n.id),m=f.isPurchased,g=f.isSubscribed;return ae().createElement("div",{className:"templately-container-row"},ae().createElement(kO,{type:a.type,stateSubKey:"itemsDetails",element:ae().createElement(sD,{className:"templately-item-details",render:function(){var t,n,r,c,u,d,p,f,v;return ae().createElement(ae().Fragment,null,"packs"!==a.type&&(null==s||null===(t=s.screenshots)||void 0===t?void 0:t.length)>0&&ae().createElement(yO,{images:null==s?void 0:s.screenshots,isOpen:o,setIsOpen:i}),ae().createElement($P,re({isPurchased:m,isLoggedIn:e.isLoggedIn,type:null==s?void 0:s.type,title:null==s?void 0:s.name},s)),ae().createElement("div",{className:"templately-row"},ae().createElement("div",{className:"templately-col-8"},ae().createElement(VA,{details:s},ae().createElement(HA,{isPack:"packs"===a.type,price:null==s?void 0:s.price,thumbnail:null!==(n=null==s?void 0:s.banner)&&void 0!==n?n:null==s?void 0:s.thumbnail,alt:null==s?void 0:s.name,url:null==s?void 0:s.live_url,screenshotsEnabled:{setIsOpen:i,hasShots:"packs"!==a.type&&(null==s||null===(r=s.screenshots)||void 0===r?void 0:r.length)>0}}),"packs"===(null==a?void 0:a.type)&&(null==s||null===(c=s.items)||void 0===c?void 0:c.length)>0&&ae().createElement(XA,{isPurchased:m,platform:l,items:null==s?void 0:s.items,isLoggedIn:e.isLoggedIn})),"packs"!==(null==a?void 0:a.type)&&(null==s||null===(u=s.description)||void 0===u?void 0:u.length)>0&&ae().createElement("div",{className:"templately-item-description",dangerouslySetInnerHTML:{__html:s.description}}),(null==s||null===(d=s.tags)||void 0===d?void 0:d.length)>0&&0==h&&ae().createElement("div",{className:"templately-row"},ae().createElement("div",{className:"templately-col-12"},ae().createElement(GP,{tags:null==s?void 0:s.tags,type:null==s?void 0:s.type,pack:null==s?void 0:s.pack})))),ae().createElement("div",{className:"templately-col-4"},ae().createElement("div",{className:"templately-item-details-sidebar-wrapper"},ae().createElement(GA,re({details:s,isPurchased:m,isSubscribed:g,params:a},s,{platform:e.params.platform,isLoggedIn:e.isLoggedIn})),"packs"===a.type&&ae().createElement(nD,{slug:a.slug}),"packs"!==a.type&&(null==s||null===(p=s.pack)||void 0===p||null===(p=p.items)||void 0===p?void 0:p.length)>0&&ae().createElement(tD,{slug:a.slug,platform:e.platform,items:null==s||null===(f=s.pack)||void 0===f?void 0:f.items}),ae().createElement(iD,{details:s})))),(null==s||null===(v=s.tags)||void 0===v?void 0:v.length)>0&&h&&ae().createElement("div",{className:"templately-row"},ae().createElement("div",{className:"templately-col-12"},ae().createElement(GP,{tags:null==s?void 0:s.tags,type:null==s?void 0:s.type,pack:null==s?void 0:s.pack}))))}})}),ae().createElement(WP,{packId:null==s?void 0:s.id}))}),sD=function(e){var t=e.render,n=e.hasSticky,r=void 0===n||n,o=e.header,i=void 0===o?"":o,a=(0,oe.useRef)(null),s=pe((0,oe.useState)(""),2),l=s[0],c=s[1],u=(0,oe.useCallback)(function(e){null!=a&&a.current&&r&&(e.target.scrollTop>250&&""===l?c("templately-sticky"):c(""))},[]);(0,oe.useEffect)(function(){return a.current=!0,function(){return a.current=!1}},[]);var d=Vn()("templately-contents",e.className,{"templately-has-sticky":r&&""!==l});return ae().createElement("div",{className:d,onScroll:r?u:null},"function"==typeof i?i({stickyClass:l}):i,"function"==typeof t?t({stickyClass:l}):t)};var lD=function(){var e=rt(),t=Vn()("templately-container",Ct(Ct({},"templately-".concat(null==e?void 0:e.type,"-container"),void 0!==(null==e?void 0:e.type)),"templately-templates-container",void 0===(null==e?void 0:e.type)&&"elementor"===e.platform));return ae().createElement("div",{className:t},ae().createElement(mt,null))};const cD=ae().memo(lD);function uD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const pD=fn(function(e){var t,n,r,o,i,a,s=e.general.platform,l=e.general.current_screen,c=null!==(t=null===(n=e.savedTemplates)||void 0===n||null===(n=n[s])||void 0===n?void 0:n.currentPage)&&void 0!==t?t:1,u=null!==(r=null===(o=e.savedTemplates)||void 0===o||null===(o=o[s])||void 0===o?void 0:o.totalPage)&&void 0!==r?r:1;return{platform:s,current_screen:l,has_elementor:e.general.has_elementor,currentPage:c,totalPage:u,items:null!==(i=null===(a=e.savedTemplates)||void 0===a||null===(a=a[s])||void 0===a?void 0:a[c])&&void 0!==i?i:[]}})(function(e){var t=pe((0,oe.useState)([]),2),n=t[0],r=t[1];(0,oe.useEffect)(function(){if(e.items.length>0){var t=e.items.map(function(t){return[{id:"name",data:ae().createElement(eS,{title:t.title,platform:e.platform})},[{id:"last_modified",data:t.date},{id:"action",data:ae().createElement("div",{className:"tt-actions"},ae().createElement(aS,{current_screen:e.current_screen,args:{content:dD(dD({},t),{},{my_cloud_id:t.id,origin:"local",currentPage:e.currentPage})},menus:cf(t.is_pushed,e.current_screen,e.has_elementor,t.type)}))}]]});r(t)}},[e.items,e.has_elementor]);var o=Vn()("templately-saved-templates",{"templately-nas-no-items":0==n.length});return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:o},n.length>0?ae().createElement(EE,{view:"list",head:ae().createElement(xE,null)},ae().createElement(CE,{view:"list",data:n})):ae().createElement(xO,null),e.totalPage>1&&ae().createElement(bO,{type:"savedTemplates",total:e.totalPage})))});var hD=["plan","active","label","total"],fD=function(e){var t=e.plan,n=void 0===t?"all":t,r=e.active,o=void 0===r||r,i=e.label,a=e.total,s=Bn(e,hD),l=Vn()("components-button","templately-plan-".concat(n),{"templately-plan-active":o});return ae().createElement("button",re({className:l},s),i," (",a,")")};const mD=fn(function(e){var t,n=e.general.platform;return{plan:e.general.plan,counts:null===(t=e.general.counts)||void 0===t?void 0:t[n]}},function(e){return{setPlan:function(t){return e(function(e){return{type:mr,plan:e}}(t))}}})(function(e){var t,n,r,o,i,a,s=pe((0,oe.useState)(e.plan),2),l=s[0],c=s[1],u=rt();return(0,oe.useEffect)(function(){l!==e.plan&&e.setPlan(l)},[e.plan,l]),ae().createElement("div",{className:"templately-plan-switcher"},ae().createElement(fD,{onClick:function(){return c("all")},label:(0,Pt.__)("All","templately"),active:"all"===l,total:null!==(t=null===(n=e.counts)||void 0===n||null===(n=n[null==u?void 0:u.type])||void 0===n?void 0:n.total)&&void 0!==t?t:0,plan:"all"}),ae().createElement(fD,{onClick:function(){return c("starter")},label:(0,Pt.__)("Starter","templately"),active:"starter"===l,total:null!==(r=null===(o=e.counts)||void 0===o||null===(o=o[null==u?void 0:u.type])||void 0===o?void 0:o.starter)&&void 0!==r?r:0,plan:"starter"}),ae().createElement(fD,{onClick:function(){return c("pro")},label:(0,Pt.__)("Pro","templately"),active:"pro"===l,total:null!==(i=null===(a=e.counts)||void 0===a||null===(a=a[null==u?void 0:u.type])||void 0===a?void 0:a.pro)&&void 0!==i?i:0,plan:"pro"}))}),gD=function(e){var t=e.className,n=e.label,r=void 0===n?null:n,o=e.element,i=e.hideTitle,a=void 0!==i&&i,s=rt();return ae().createElement("div",{className:"templately-contents-header ".concat(null!=t?t:"")},(0,ce.applyFilters)("templately_before_content_header","",s),ae().createElement("div",{className:"templately-contents-header-inner"},!a&&ae().createElement("div",{className:"templately-header-title"},ae().createElement("h3",null,null===r?(0,Pt.__)("All","templately")+" "+(null==s?void 0:s.type):r)),"function"==typeof o?o():o))},vD=function(){var e=tt(),t=rt();return ae().createElement("div",{className:"templately-logo"},ae().createElement(Dn,{width:"37.66px"}),null==(null==t?void 0:t.slug)&&ae().createElement(Mn,null),null!=(null==t?void 0:t.slug)&&ae().createElement("span",{className:"templately-back-2-library",onClick:function(){return e(-1)}},ae().createElement(Xn,{color:"#000"}),(0,Pt.__)("Back to Library","templately")))};function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wD=function(e){return e.join("/")};const kD=fn(function(e){var t;return{platform:null!==(t=e.general.platform)&&void 0!==t?t:"elementor",isLoggedIn:null!=e.profile.data}})(function(e){var t=rt(),n=Je(),r=tt(),o=pe((0,oe.useState)([]),2),i=o[0],a=o[1];return(0,oe.useEffect)(function(){var o,i=function(e){var t=e.platform,n=void 0===t?"elementor":t,r=[],o=["q","add-account","redirect-to","tag_id","category","templateType","activeFilter","include","exclude","tags"];return r.push({to:wD([n,"packs"]),label:(0,Pt.__)("Packs","templately"),element:!1,query:{}}),"gutenberg"===n&&r.push({to:wD([n,"blocks"]),label:(0,Pt.__)("Blocks","templately"),element:!1,query:{}}),r.push({to:wD([n,"pages"]),label:(0,Pt.__)("Pages","templately"),element:!1,capability:"templately_read",query:{}}),"elementor"===n&&r.push({to:wD([n,"blocks"]),label:(0,Pt.__)("Blocks","templately"),element:!1,query:{}}),"elementor"===n&&r.push({to:wD([n,"templates"]),label:(0,Pt.__)("Templates","templately"),element:!1,query:{}}),r.push({to:"clouds",query:{platform:n},label:(0,Pt.__)("My Cloud","templately"),element:!1,icon:React.createElement(xn,null)}),r.map(function(e){return bD(bD({},e),{},{ignoreKeys:o})})}({platform:null!==(o=t.platform)&&void 0!==o?o:e.platform});a(i),i.filter(function(e){return e.to===n.pathname.substring(1)}).length||null!=(null==t?void 0:t.slug)||"clouds/save-template"==n.pathname.substring(1)||r(Rg(i[0].to))},[e.platform]),ae().createElement(kE,{className:"templately-menu",ulClasses:"templately-nav",liClasses:function(e){var t=e.isActive,n=e.toPathname,r=e.locationPathname,o=["templately-nav-item",t?"templately-nav-active":null];return"/clouds"!==n||"/favourites"!==r&&"/downloads"!==r&&"/purchased-items"!==r||o.push("templately-nav-active"),o.filter(Boolean).join(" ")},activeItemClassName:"templately-nav-active",routes:i})});function ED(e){return $n({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12zM7 9h2v2H7zm4 0h2v2h-2zm4 0h2v2h-2z"}}]})(e)}const OD=fn(function(e){return{platform:e.general.platform}},function(e){return{setPlatform:function(t){return e(kf(t))}}})(function(e){var t=rt(),n=Je(),r=tt(),o=pe(xt(),1)[0],i=On(function(e){var n,r,o;if(null==t||!t.slug)return{hasVariation:!1,variation:null};var i=null==t?void 0:t.platform,a=null==t?void 0:t.slug,s=null===(r=e[null!==(n="blocks"===(null==t?void 0:t.type)?"sections":null==t?void 0:t.type)&&void 0!==n?n:"packs"])||void 0===r||null===(r=r[i])||void 0===r||null===(r=r.itemsDetails)||void 0===r?void 0:r[a],l=Boolean(null==s||null===(o=s.variations)||void 0===o?void 0:o.length);return{hasVariation:l,variation:l?s.variations:null}}),a=i.hasVariation,s=i.variation,l=pe((0,oe.useState)([{value:"elementor",label:ae().createElement(ae().Fragment,null,ae().createElement("span",{className:"tswitcher-icon tswitch-elementor"}),ae().createElement("span",{className:"templately-editor-name"},(0,Pt.__)("Elementor","templately")))},{value:"gutenberg",label:ae().createElement(ae().Fragment,null,ae().createElement("span",{className:"tswitcher-icon tswitch-gutenberg"}),ae().createElement("span",{className:"templately-editor-name"},(0,Pt.__)("Gutenberg","templately")))}]),1)[0],c=pe((0,oe.useState)(null==l?void 0:l[0]),2),u=c[0],d=c[1];return(0,oe.useEffect)(function(){var r,i,a,s,c,u,p=null!==(r=null!==(i=null!==(a=null!==(s=null==t?void 0:t.platform)&&void 0!==s?s:o.get("platform"))&&void 0!==a?a:null===(c=n.state)||void 0===c?void 0:c.platform)&&void 0!==i?i:e.platform)&&void 0!==r?r:"elementor",h=l.filter(function(e){return e.value==p});h.length>0&&d(null!==(u=h[0])&&void 0!==u?u:l[0])},[]),ae().createElement(Qh,{options:l,classNamePrefix:"templately-switcher",onChange:function(o){if(d(o),e.setPlatform(o.value),t.type){var i=[],l=[o.value,t.type];if(t.slug&&i.push("q"),a){var c=s.find(function(e){return e.platform===o.value});c&&(l=[o.value,t.type,c.slug])}r(Rg(l,{platform:o.value},i))}else r(Rg(n.pathname.substring(1),{platform:o.value}))},value:u,isSearchable:!1})}),SD=fn(function(e){var t,n,r,o,i,a,s;return{isLoggedIn:null!==(null===(t=e.profile)||void 0===t?void 0:t.data),canLinkAccount:null!==(n=null===(r=e.profile)||void 0===r?void 0:r.link_account)&&void 0!==n&&n,canUnLinkAccount:null!==(o=null===(i=e.profile)||void 0===i?void 0:i.unlink_account)&&void 0!==o&&o,isGloballySigned:null===(a=e.profile)||void 0===a?void 0:a.is_globally_signed,signedAsGlobal:null===(s=e.profile)||void 0===s?void 0:s.signed_as_global}},function(e){return{logout:function(t){return e(Fm(t))},linkAccount:function(){return e(zm({linking:!0}))}}})(function(e){var t=tt();return e.canLinkAccount?ae().createElement(gE,{to:"sign-in",query:{"add-account":!0},className:"tb-link-account templately-button"},(0,Pt.__)("Link My Account","templately")):e.isLoggedIn&&!e.canLinkAccount?ae().createElement(ca,{className:"tb-logout",onClick:function(){t(Rg("sign-in"),{state:{is_logging_out:{isGloballySigned:!e.signedAsGlobal&&e.canUnLinkAccount?!e.isGloballySigned:e.isGloballySigned}}})},label:!e.signedAsGlobal&&e.canUnLinkAccount?(0,Pt.__)("Unlink My Account","templately"):(0,Pt.__)("Logout","templately")}):void 0}),xD=function(e){var t=e.name,n=e.first_name,r=e.last_name,o=e.email,i=e.profile_photo,a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=(0,oe.useRef)(null),u=function(e){if(c.current.contains(e.target)&&"A"!==e.target.nodeName)l(!0);else var t=setTimeout(function(){l(!1),clearTimeout(t)},100)};return(0,oe.useEffect)(function(){return document.addEventListener("mousedown",u),function(){return document.removeEventListener("mousedown",u)}},[s]),ae().createElement("div",{className:"templately-profile-drops-wrapper",ref:c},ae().createElement("span",{className:"templately-profile-btn templately-button"},null!=i?ae().createElement("img",{src:i,alt:t,onError:function(e){var t;e.target.src=null===(t=window)||void 0===t||null===(t=t.templately)||void 0===t||null===(t=t.icons)||void 0===t?void 0:t.profile}}):ae().createElement(In,null)),s&&ae().createElement("div",{className:"templately-profile-drops-inner"},ae().createElement("ul",null,ae().createElement("li",{className:"templately-profile-drops"},ae().createElement("div",{className:"d-flex align-center"},null!=i?ae().createElement("img",{width:"40px",height:"40px",src:i,alt:t,onError:function(e){var t;e.target.src=null===(t=window)||void 0===t||null===(t=t.templately)||void 0===t||null===(t=t.icons)||void 0===t?void 0:t.profile}}):ae().createElement(In,{width:"40px",height:"40px"}),ae().createElement("div",{className:"templately-profile-drops-details"},ae().createElement("h4",null,null!=t?t:n+" "+r),ae().createElement("p",null,o)))),ae().createElement("li",null,ae().createElement("a",{target:"_blank",className:"d-flex align-center",href:"https://templately.com/profile?utm_source=plugin&utm_medium=profileDrops"},(0,Pt.__)("Manage Account","templately"))),ae().createElement("li",null,ae().createElement(gE,{isActive:!0,className:"d-flex align-center",to:"favourites",children:function(e){return e.isActive,ae().createElement(ae().Fragment,null,ae().createElement(sr,null),(0,Pt.__)("My Favourites","templately"))}})),ae().createElement("li",null,ae().createElement(gE,{className:"d-flex align-center",to:"downloads"},ae().createElement(rr,null),(0,Pt.__)("My Downloads","templately"))),ae().createElement("li",null,ae().createElement(gE,{className:"d-flex align-center",to:"purchased-items"},ae().createElement(_O,null),(0,Pt.__)("Purchased Items","templately"))),ae().createElement("li",null,ae().createElement(SD,null)))))},_D=fn(function(e){return{platform:e.general.platform,isLoggedIn:null!=e.profile.data,profile:e.profile.data,syncing:e.profile.syncing,shouldClose:e.clouds.push2cloud.isLoading}},function(e){return{syncProfile:function(t){return e(function(e){return jm({type:$r},e)}(t))}}})(function(e){var t,n=e.platform,r=e.isLoggedIn,o=pe(xt(),1)[0];return ae().createElement("div",{className:"templately-actions"},("templately"===o.get("page")||"templately_settings"===o.get("page"))&&ae().createElement(OD,null),ae().createElement("a",{className:"templately-button templately-chat-button",href:"https://wpdeveloper.com/support/",target:"_blank",rel:"noopener"},ae().createElement(ED,null),ae().createElement("span",null,"Talk to Support")),r&&o.get("path")&&pf(o.get("path"))&&ae().createElement(ca,{className:"templately-cloud-sync ".concat(e.syncing?"tc-syncing":""),onClick:function(){return e.syncProfile()}},ae().createElement(jn,null)),!r&&ae().createElement(gE,{to:"sign-in",query:{"redirect-to":o.get("path")},className:"components-button templately-button tb-login"},ae().createElement(hr,{style:{marginRight:"10px"}}),(0,Pt.__)("Login","templately")),r&&ae().createElement(xD,e.profile),"templately"!==o.get("page")&&ae().createElement(ca,{disabled:null!==(t=e.shouldClose)&&void 0!==t&&t,className:"templately-close",onClick:function(){"gutenberg"===n&&window.TemplatelyAppManager.close("templately-gutenberg"),"elementor"===n&&window.TemplatelyModal.hide()}},ae().createElement(pr,{color:"#a4b0c1"})))}),CD=function(e){return ae().createElement("div",{className:"templately-header"},ae().createElement(vD,null),ae().createElement(kD,null),ae().createElement(_D,null))},PD=function(e){var t,n,r,o,i=null===(t=window)||void 0===t?void 0:t.templately,a=i.current_screen,s=void 0===a?"templately":a,l=i.theme,c=void 0===l?"light":l,u=Vn()("templately-wrapper","templately-theme-".concat(c),"templately-screen-".concat(s));return ae().createElement("div",{className:u,id:"templately-wrapper"},ae().createElement(CD,null),ae().createElement(cD,null),e.isLoggedIn&&!(null!==(n=e.user)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&n.is_verified)&&ae().createElement("div",{className:"templately-verification"},ae().createElement("p",null,(0,Pt.__)("Please complete your account by the verification email we sent you, If you don't get an email","templately")," ",ae().createElement("a",{target:"_blank",href:"https://templately.com/resend-verification-email?email=".concat(window.btoa(null===(r=e.user)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.email),"&from=plugin&utm_source=plugin&utm_medium=globalLayout")},(0,Pt.__)("click here","templately"))," ",(0,Pt.__)("to resend verification mail.","templately")),ae().createElement("button",{onClick:function(){return e.isVerifiedProfile()},className:"templately-button components-button tb-verified"},null!==(o=e.user)&&void 0!==o&&o.isVerifying?(0,Pt.__)("Verifying . . .","templately"):(0,Pt.__)("I've verified & Close","templately"))))},TD=fn(function(e,t){var n,r="clouds";location.pathname.startsWith("/clouds/workspace")?r="workspaces":location.pathname.startsWith("/clouds/shared-workspace")&&(r="sharedWorkspaces");var o=null==e?void 0:e[r].view,i=(null==e||e[r].isLoading,null==e?void 0:e[r].currentPage);return null==e||e[r].totalPage,null==e||null===(n=e[r])||void 0===n?void 0:n[i],{view:o,platform:e.general.platform,isLoggedIn:null!=e.profile.data,favouritesType:e.profile.favourites.type,favouritesPlan:e.profile.favourites.plan}},function(e){return{getClouds:function(t){return e(Hf(t))},getWorkSpaces:function(t){return e(um(t))},getWorkSpaceDetails:function(t){return e(km(t))},getFavourites:function(t){return e($m(t))},getDownloads:function(t){return e(tg(t))},getPurchasedItems:function(t){return e(Xm(t))}}})(function(e){var t=rt(),n=Je(),r=tt(),o=pe(xt(),1)[0],i=pe((0,oe.useState)(""),2),a=i[0],s=i[1],l=pe((0,oe.useState)((0,Pt.__)("My Clouds","templately")),2),c=l[0],u=l[1],d=pe((0,oe.useState)(!1),2),p=d[0],h=d[1],f=pe((0,oe.useState)(e.isLoggedIn),2),m=f[0],g=f[1];return(0,oe.useEffect)(function(){var t=Rg("sign-in",{platform:e.platform});!1===e.isLoggedIn&&!0===m&&"/profile"!==n.pathname&&"profile"!==n.pathname&&(g(!m),r(t,{replace:!0})),!1!==e.isLoggedIn||!0!==m||"/profile"!==n.pathname&&"profile"!==n.pathname||r(t,{replace:!0}),!1===e.isLoggedIn&&!1===m&&r(t,{replace:!0})},[e.isLoggedIn]),(0,oe.useEffect)(function(){if(null!=o.get("path")){var e=o.get("path").split("/").pop();switch(h(!1),e){case"profile":u((0,Pt.__)("Profile","templately")),s("profile");break;case"favourites":u((0,Pt.__)("My Favourites","templately")),s("favourites");break;case"downloads":u((0,Pt.__)("My Downloads","templately")),s("downloads");break;case"clouds":u((0,Pt.__)("My Clouds","templately")),s("clouds");break;case"workspace":u((0,Pt.__)("My WorkSpace","templately")),s("workspaces");break;case"shared-workspace":u((0,Pt.__)("Shared with Me","templately")),s("sharedWorkspaces");break;case"save-template":u((0,Pt.__)("Save your template","templately")),s("saveTemplate");break;case"purchased-items":u((0,Pt.__)("Purchased Items","templately")),s("purchasedItems");break;default:null!=t&&t.slug&&(u((0,Pt.__)("My Clouds","templately")),s("workspaceDetails"),h(!0))}}},[o.get("path")]),(0,oe.useEffect)(function(){if(""!==a){var r=o.get("q");if("clouds"===a){var i={page:1,search:r};(o.has("q")||o.has("refresh"))&&(i.refresh=!0),e.getClouds(i)}if("favourites"===a&&e.getFavourites({platform:e.platform,itemType:e.favouritesType,plan:e.favouritesPlan}),"purchasedItems"===a&&e.getPurchasedItems({platform:e.platform,itemType:e.favouritesType,plan:e.favouritesPlan}),"downloads"===a&&e.getDownloads(),"workspaceDetails"===a&&null!=t&&t.slug){var s,l,c,u=!((null==n||null===(s=n.state)||void 0===s?void 0:s.slug)===t.slug),d={slug:null==t?void 0:t.slug,directLoad:!((null==n||null===(l=n.state)||void 0===l?void 0:l.slug)===t.slug),shared:"sharedWorkspaces"===a,platform:null!==(c=e.platform)&&void 0!==c?c:"elementor",refresh:o.has("refresh")};u&&e.getWorkSpaceDetails(d)}"sharedWorkspaces"!==a&&"workspaces"!==a||e.getWorkSpaces({page:1,shared:"sharedWorkspaces"===a,refresh:o.has("refresh")})}},[a,e.platform,o.get("q")]),ae().createElement("div",{className:"templately-clouds-layout templately-container-row"},ae().createElement(ZO,null),ae().createElement(kO,{type:a,isKey:a,isLoadingKey:{clouds:["clouds","isLoading"],workspaces:["workspaces","isLoading"],sharedWorkspaces:["sharedWorkspaces","isLoading"],workspaceDetails:["workspaceDetails","isLoading"],profile:["profile","isLoading"],favourites:["profile","favourites","isLoading"],purchasedItems:["profile","purchasedItems","isLoading"],downloads:["profile","downloads","isLoading"],saveTemplate:[]},element:function(e){return e.isLoading,ae().createElement(sD,{header:function(e){var t=e.stickyClass;if("profile"!==a&&"purchasedItems"!==a&&"downloads"!==a&&"saveTemplate"!==a&&!p)return ae().createElement(gD,{hideTitle:"favourites"===a||"purchasedItems"===a,element:ae().createElement(LS,{type:a}),label:c,className:t})},render:function(){return ae().createElement(mt,null)}})}}))}),AD=fn(function(e){var t,n,r,o,i=e.general.platform;return{platform:i,currentPage:null!==(t=null===(n=e.savedTemplates)||void 0===n||null===(n=n[i])||void 0===n?void 0:n.currentPage)&&void 0!==t?t:1,totalPage:null!==(r=null===(o=e.savedTemplates)||void 0===o||null===(o=o[i])||void 0===o?void 0:o.totalPage)&&void 0!==r?r:1}},function(e){return{getSavedTemplates:function(t){return e(Dm(t))}}})(function(e){return(0,oe.useEffect)(function(){e.getSavedTemplates({platform:e.platform,page:e.currentPage})},[e.currentPage]),ae().createElement("div",{className:"templately-container-row"},ae().createElement(kO,{type:"savedTemplates",element:ae().createElement(sD,{header:function(e){var t=e.stickyClass;return ae().createElement(gD,{label:"Saved Templates",className:t})},render:ae().createElement(pD,null)})}))});var DD=["prevQuery","doQuery","results"];function MD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ND(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const LD=fn(function(e,t){var n,r=t.type,o=t.query,i=void 0===o?null:o,a=null!==(n="blocks"===r?"sections":r)&&void 0!==n?n:"packs",s=e.general.plan,l=e.general.platform,c=e.general.filter,u=c.prevQuery,d=c.doQuery,p=(c.results,Bn(c,DD)),h=1,f=0,m=[a,s,l];return d||null!=i||(h=Ri(e,[].concat(Da(m),["currentPage"]),1),f=Ri(e,[].concat(Da(m),["totalPage"]),0),m.push(h)),d&&d===u&&(m.push("filteredResults"),h=Ri(e,[].concat(Da(m),["currentPage"]),1),f=Ri(e,[].concat(Da(m),["totalPage"]),0),m=m.concat([h])),null!==i&&(m.push("search"),h=Ri(e,[].concat(Da(m),["currentPage"]),1),f=Ri(e,[].concat(Da(m),["totalPage"]),0),m=m.concat([h])),{plan:s,currentPage:h,totalPage:f,items:Ri(e,m,[]),platform:e.general.platform,isLoggedIn:null!=e.profile.data,prevFilterableQuery:u,isFilterableQuery:d,filteredQuery:p}},function(e){return{getTemplates:function(t){return e(function(e){return jf({type:Ii(ho,e.key)},e)}(t))},setPlatform:function(t){return e(kf(t))},setPrevQuery:function(t){return e(Ef({key:"prevQuery",data:null!=t?t:Date.now()}))}}})(function(e){var t=rt(),n=pe(xt(),1)[0],r=pe((0,oe.useState)(n.get("q")),2),o=r[0],i=r[1];return(0,oe.useEffect)(function(){e.setPlatform(t.platform)},[]),(0,oe.useEffect)(function(){e.isFilterableQuery===e.prevFilterableQuery||e.items.length||e.setPrevQuery(e.isFilterableQuery)},[e.isFilterableQuery]),(0,oe.useEffect)(function(){var r=n.get("q");i(null!=r?(0,Pt.sprintf)((0,Pt.__)("You are looking for: %s","templately"),n.get("q")):null);var o=n.get("category");e.getTemplates(ND(ND({key:Di(t.type),page:e.currentPage,search:r,prevFilterableQuery:e.prevFilterableQuery,isFilterableQuery:e.isFilterableQuery,category_id:o},e.filteredQuery),{},{platform:e.platform}))},[t.type,e.currentPage,e.platform,e.plan,e.isFilterableQuery,n.get("q")]),ae().createElement("div",{className:"templately-container-row"},ae().createElement(ZO,null),ae().createElement(kO,{type:t.type,element:ae().createElement(sD,{className:"templately-search-results",header:function(e){var t=e.stickyClass;return ae().createElement(gD,{label:o,element:ae().createElement(ae().Fragment,null,ae().createElement(sa,null),ae().createElement(mD,null)),className:t})},render:ae().createElement(lx,{platform:e.platform,items:e.items,currentPage:e.currentPage,totalPage:e.totalPage,type:null==t?void 0:t.type,isLoggedIn:e.isLoggedIn})})}))});var ID=["selected","setSelected","settings"];function RD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const FD=fn(function(e){return{platform:e.general.platform}},function(e){return{setPlatform:function(t){return e(Eg(t))}}})(function(e){var t=e.selected,n=(e.setSelected,e.settings),r=Bn(e,ID),o=rt(),i=Je(),a=tt(),s=pe(xt(),1)[0],l=(0,oe.useMemo)(function(){var e=[{value:"elementor",label:ae().createElement(ae().Fragment,null,ae().createElement("span",{className:"tswitcher-icon tswitch-elementor"}),ae().createElement("span",{className:"templately-editor-name"},(0,Pt.__)("Elementor","templately")))},{value:"gutenberg",label:ae().createElement(ae().Fragment,null,ae().createElement("span",{className:"tswitcher-icon tswitch-gutenberg"}),ae().createElement("span",{className:"templately-editor-name"},(0,Pt.__)("Gutenberg","templately")))}];return n.has_elementor?e:[e[1],e[0]]},[n.has_elementor,n.has_eb]),c=(0,oe.useState)((null==l?void 0:l.find(function(e){return e.value===t}))||(null==l?void 0:l[0])),u=pe(c,2),d=u[0],p=u[1];(0,oe.useEffect)(function(){var e,t,n,a,c,u=null!==(e=null!==(t=null!==(n=null!==(a=null==o?void 0:o.platform)&&void 0!==a?a:s.get("platform"))&&void 0!==n?n:null===(c=i.state)||void 0===c?void 0:c.platform)&&void 0!==t?t:r.platform)&&void 0!==e?e:"elementor",d=l.filter(function(e){return e.value==u&&!e.isdisabled});if(d.length>0){var f;p(null!==(f=d[0])&&void 0!==f?f:l[0])}else{var m=l.find(function(e){return!e.isdisabled});m&&h(m)}},[]);var h=function(e){var t=e.value;if("elementor"===t&&!n.has_elementor){var o=(0,Pt.__)("Please Install Elementor.","templately");return 0===n.has_elementor&&(o=(0,Pt.__)("Please Activate Elementor.","templately")),ba({icon:"error",timer:2e3,html:ae().createElement(EO,{title:o})},!1),!1}p(e),r.setPlatform(t);var i=Wi("/settings/:platform/:tab",s.get("path")).tab;a(Rg(["settings",t,i]))};return ae().createElement(Qh,{components:{Option:function(e){return ae().createElement(Wp.Option,re({},e,{className:"tt-top",innerProps:jD(jD({},e.innerProps),{},{"data-templately-tooltip":e.data.tooltip})}))}},options:l,className:"templately-switcher",classNamePrefix:"templately-switcher",onChange:h,value:d,isSearchable:!1,isOptionDisabled:function(e){return e.isdisabled}})});function zD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const UD=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d,p,h,f,m,g,v,y,b,w,k,E,O,S,x,_=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor",C=null!==(r=null===(o=e.settingsPage)||void 0===o?void 0:o[_])&&void 0!==r?r:{};return BD(BD({},t),{},{platform:_,settings:null!==(i=null===(a=e.settingsPage.settings)||void 0===a?void 0:a[_])&&void 0!==i?i:{},templatelySettings:null!==(s=null===(l=e.settingsPage)||void 0===l?void 0:l.settings)&&void 0!==s?s:{},importedPlatform:null!==(c=e.settingsPage.settings.imported_platform)&&void 0!==c&&c,formData:{siteTitle:null!==(u=null!==(d=null===(p=e.settingsPage)||void 0===p?void 0:p.siteTitle)&&void 0!==d?d:null===(h=e.settingsPage)||void 0===h||null===(h=h.settings)||void 0===h?void 0:h.siteTitle)&&void 0!==u?u:"",siteTagline:null!==(f=null!==(m=null===(g=e.settingsPage)||void 0===g?void 0:g.siteTagline)&&void 0!==m?m:null===(v=e.settingsPage)||void 0===v||null===(v=v.settings)||void 0===v?void 0:v.siteTagline)&&void 0!==f?f:"",logoImage:null!==(y=null===(b=e.settingsPage)||void 0===b?void 0:b.logoImage)&&void 0!==y?y:"",customCSS:null!==(w=null!==(k=null===(E=e.settingsPage)||void 0===E?void 0:E.customCSS)&&void 0!==k?k:null===(O=e.settingsPage)||void 0===O||null===(O=O.settings)||void 0===O?void 0:O.customCSS)&&void 0!==w?w:"",colors:null!==(S=null==C?void 0:C.colors)&&void 0!==S?S:{},typography:null!==(x=null==C?void 0:C.selectedTypography)&&void 0!==x?x:{}}})},function(e){return{setSettings:function(t){return e((0,Pm.setSettings)(t))},setPlatform:function(t){return e(Eg(t))}}})(function(e){var t=e.templatelySettings,n=e.settings,r=e.platform,o=e.setPlatform,i=e.formData,a=(e.importedPlatform,rt()),s=Je(),l=tt(),c=pe(xt(),1)[0].get("path"),u=Me("/settings/:platform/:tab","/"+c).params.tab,d=gf(n,r)._systemColors,p=vf(n,r),h=yf(p,r),f=h.normalizedTypography,m=h.groupedData,g=h.getDeNormalizedTypography,v=(0,oe.useMemo)(function(){return[{key:"general",label:"General"},{key:"colors",label:"Colors"},{key:"typography",label:"Typography"},{key:"custom_css",label:"Custom CSS"},{key:"miscellaneous",label:"Revert"}].filter(function(e){if("general"===e.key||"custom_css"===e.key||"miscellaneous"===e.key)return!0;if("elementor"===a.platform)return t.has_elementor;if("gutenberg"===a.platform){if(t.has_eb){if("colors"===e.key&&(0,_i.isEmpty)(d))return!1;if("typography"===e.key&&(0,_i.isEmpty)(m))return!1}return t.has_eb}return!1})},[r,a.platform,t]);(0,oe.useEffect)(function(){o(a.platform),Me("/settings/:platform/:tab","/"+c);var e=v.some(function(e){return e.key===u});if(!e&&v.length>0){var t=v[0];l(Rg(["settings",a.platform,t.key]))}},[u,v,l,a.platform,o]);var y=(0,oe.useMemo)(function(){return v.map(function(e){var t=Ie(r+"/"+e.key,"/settings"),n=t.pathname.startsWith("/")?t.pathname.slice(1):t.pathname,o=s.pathname===t.pathname||"general"===e.key&&"/settings"===s.pathname;return{key:e.key,label:e.label,to:n,isActive:o}})},[v,r,s.pathname]);return React.createElement("div",{className:"templately-setting-container templately-wrapper"},React.createElement("div",{className:"wrap"},React.createElement("h1",{className:"wp-heading-inline"},"Templately Settings ",window.templately.dev_mode&&"(".concat(r,")")),React.createElement("hr",{className:"wp-header-end"}),React.createElement("div",{className:"templately-builder-nav"},React.createElement("ul",{className:"nav-tab-wrapper"},y.map(function(e){var t=e.key,n=e.label,r=e.to,o=e.isActive;return React.createElement("li",{key:t,className:"nav-tab ".concat(t," ").concat(o?"active":"")},React.createElement(gE,{to:r,isActive:o},n))})),React.createElement(FD,{selected:r,setSelected:o,settings:t}))),React.createElement("div",{className:"wrap"},React.createElement("div",{className:"templately-setting-tab-panel-wrapper"},React.createElement(mt,{context:{normalizedTypography:f,groupedData:m}}),"miscellaneous"!==u&&React.createElement("div",{className:"templately-setting-save-button-wrapper"},React.createElement("button",{onClick:function(e){e.preventDefault();var t=BD(BD({},i),{},{platform:r}),n=g(i.typography);if("gutenberg"===r&&!(0,_i.isEmpty)(n)){n.custom={};for(var o=0,a=Object.entries(i.typography);o<a.length;o++){var s=pe(a[o],2),l=s[0];s[1]._isSystem||(n.custom[l]=n[l],delete n[l])}}t.typography=n,ai()({path:"/templately/v1/settings/update",method:"POST",data:{settings:t}}).then(function(e){ba({icon:"success",timer:2e3,html:React.createElement(EO,{title:(0,Pt.__)("Successfully Updated Settings","templately")})},!1)}).catch(function(e){var t;ba({icon:"error",timer:2e3,html:React.createElement(EO,{title:null!==(t=null==e?void 0:e.message)&&void 0!==t?t:(0,Pt.__)("Failed to Update Settings","templately")})},!1)})},className:"components-button templately-setting-save-button"},"Save")))))});var VD=function(e){var t=e.name,n=e.color,r=e.setColor,o=e.defaultColor,i=e.setColorPickerOpen,a=pe((0,oe.useState)(!1),2),s=a[0],l=a[1],c=(0,oe.useRef)(null);return(0,oe.useEffect)(function(){i(s)},[s]),function(e){(0,oe.useEffect)(function(){var t=function(t){e.current&&!e.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}},[e])}(c),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-setting-colorpicker-wrap"},ae().createElement("div",{className:"templately-colorpicker-screen"},ae().createElement("span",{className:"templately-picker-title"},t),ae().createElement("span",{className:"templately-picker-sub-title"},n),ae().createElement("span",{className:"templately-picker-display-wrapper",onClick:function(){return l(!s)}},ae().createElement("span",{className:"templately-picker-display",style:{backgroundColor:n}}))),s&&ae().createElement("div",{className:"templately-colorpicker-wrapper"},ae().createElement("div",{className:"templately-colorpicker",ref:c},ae().createElement("span",{className:"templately-title"},t),ae().createElement(oT.ColorPicker,{color:n,onChangeComplete:function(e){return r(e.hex)},enableAlpha:!0,defaultValue:null!=n?n:o})))))};function WD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WD(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const QD=fn(function(e,t){var n,r,o,i,a,s=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor";return HD(HD({},t),{},{platform:s,settings:null!==(r=null===(o=e.settingsPage.settings)||void 0===o?void 0:o[s])&&void 0!==r?r:{},colors:null!==(i=null===(a=e.settingsPage)||void 0===a||null===(a=a[s])||void 0===a?void 0:a.colors)&&void 0!==i?i:{}})},function(e){return{setColors:function(t){return e(function(e){return{type:ei.SET_COLORS,colors:e}}(t))}}})(function(e){var t=e.platform,n=e.settings,r=e.colors,o=e.setColors,i=gf(n,t),a=i.colors,s=i._systemColors,l=pe((0,oe.useState)(!1),2),c=l[0],u=l[1];return(0,oe.useEffect)(function(){(0,_i.isEmpty)(r)&&o(a)},[t]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-setting-tab-panel templately-setting-tab-panel-colors"},ae().createElement("div",{className:"templately-setting-color-picker-section"},ae().createElement("div",{className:"templately-setting-color-picker-section-label-wrapper"},ae().createElement("label",{className:"templately-setting-color-picker-section-label"},"Select Color"),ae().createElement("button",{className:"templately-setting-color-picker-reset-button",onClick:function(){o(a)}},ae().createElement(ZP,null))),"elementor"===t?ae().createElement("div",{className:"templately-setting-color-picker-panel"},s&&(null==s?void 0:s.map(function(e,t){var n;return ae().createElement(VD,{key:e._id,name:e.title,setColorPickerOpen:u,color:null!==(n=null==r?void 0:r[e._id])&&void 0!==n?n:e.color,setColor:function(t){return o(HD(HD({},r),{},Ct({},e._id,t)))},defaultValue:e.color})}))):ae().createElement("div",{className:"templately-setting-color-picker-panel-2"},s&&(null==s?void 0:s.map(function(e,t){var n;return ae().createElement(VD,{key:e._id,name:e.title,setColorPickerOpen:u,color:null!==(n=null==r?void 0:r[e._id])&&void 0!==n?n:e.color,setColor:function(t){return o(HD(HD({},r),{},Ct({},e._id,t)))},defaultValue:e.color})}))))),c&&ae().createElement("div",{className:"templately-setting-overlay"}))}),qD=1024;let $D=0;class GD{constructor(e,t){this.from=e,this.to=t}}class YD{constructor(e={}){this.id=$D++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=ZD.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}YD.closedBy=new YD({deserialize:e=>e.split(" ")}),YD.openedBy=new YD({deserialize:e=>e.split(" ")}),YD.group=new YD({deserialize:e=>e.split(" ")}),YD.isolate=new YD({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),YD.contextHash=new YD({perNode:!0}),YD.lookAhead=new YD({perNode:!0}),YD.mounted=new YD({perNode:!0});class XD{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[YD.mounted.id]}}const KD=Object.create(null);class ZD{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):KD,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new ZD(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(YD.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(YD.group),r=-1;r<(n?n.length:0);r++){let o=t[r<0?e.name:n[r]];if(o)return o}}}}ZD.none=new ZD("",Object.create(null),0,8);class JD{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);e&&(r||(r=Object.assign({},n.props)),r[e[0].id]=e[1])}t.push(r?new ZD(n.name,r,n.id,n.flags):n)}return new JD(t)}}const eM=new WeakMap,tM=new WeakMap;var nM;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(nM||(nM={}));class rM{constructor(e,t,n,r,o){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[e,t]of o)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=XD.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new gM(this.topNode,e)}cursorAt(e,t=0,n=0){let r=eM.get(this)||this.topNode,o=new gM(r);return o.moveTo(e,t),eM.set(this,o._tree),o}get topNode(){return new cM(this,0,0,null)}resolve(e,t=0){let n=sM(eM.get(this)||this.topNode,e,t,!1);return eM.set(this,n),n}resolveInner(e,t=0){let n=sM(tM.get(this)||this.topNode,e,t,!0);return tM.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),o=null;for(let e=r instanceof cM?r:r.context.parent;e;e=e.parent)if(e.index<0){let i=e.parent;(o||(o=[r])).push(i.resolve(t,n)),e=i}else{let i=XD.get(e.tree);if(i&&i.overlay&&i.overlay[0].from<=t&&i.overlay[i.overlay.length-1].to>=t){let a=new cM(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[r])).push(sM(a,t,n,!1))}}return o?fM(o):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:o=this.length}=e,i=e.mode||0,a=(i&nM.IncludeAnonymous)>0;for(let e=this.cursor(i|nM.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=r&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:wM(ZD.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new rM(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new rM(ZD.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=qD,reused:i=[],minRepeatType:a=r.types.length}=e,s=Array.isArray(n)?new oM(n,n.length):n,l=r.types,c=0,u=0;function d(e,t,n,g,v,y){let{id:b,start:w,end:k,size:E}=s,O=u,S=c;for(;E<0;){if(s.next(),-1==E){let t=i[b];return n.push(t),void g.push(w-e)}if(-3==E)return void(c=b);if(-4==E)return void(u=b);throw new RangeError(`Unrecognized record size: ${E}`)}let x,_,C=l[b],P=w-e;if(k-w<=o&&(_=function(e,t){let n=s.fork(),r=0,i=0,l=0,c=n.end-o,u={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=i,u.skip=l,l+=4,r+=4,n.next();continue}let s=n.pos-e;if(e<0||s<o||n.start<c)break;let d=n.id>=a?4:0,p=n.start;for(n.next();n.pos>s;){if(n.size<0){if(-3!=n.size)break e;d+=4}else n.id>=a&&(d+=4);n.next()}i=p,r+=e,l+=d}return(t<0||r==e)&&(u.size=r,u.start=i,u.skip=l),u.size>4?u:void 0}(s.pos-t,v))){let t=new Uint16Array(_.size-_.skip),n=s.pos-_.size,o=t.length;for(;s.pos>n;)o=m(_.start,t,o);x=new iM(t,k-_.start,r),P=_.start-e}else{let e=s.pos-E;s.next();let t=[],n=[],r=b>=a?b:-1,i=0,l=k;for(;s.pos>e;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-o&&(h(t,n,w,i,s.end,l,r,O,S),i=t.length,l=s.end),s.next()):y>2500?p(w,e,t,n):d(w,e,t,n,r,y+1);if(r>=0&&i>0&&i<t.length&&h(t,n,w,i,w,l,r,O,S),t.reverse(),n.reverse(),r>-1&&i>0){let e=function(e,t){return(n,r,o)=>{let i,a,s=0,l=n.length-1;if(l>=0&&(i=n[l])instanceof rM){if(!l&&i.type==e&&i.length==o)return i;(a=i.prop(YD.lookAhead))&&(s=r[l]+i.length+a)}return f(e,n,r,o,s,t)}}(C,S);x=wM(C,t,n,0,t.length,0,k-w,e,e)}else x=f(C,t,n,k-w,O-k,S)}n.push(x),g.push(P)}function p(e,t,n,i){let a=[],l=0,c=-1;for(;s.pos>t;){let{id:e,start:t,end:n,size:r}=s;if(r>4)s.next();else{if(c>-1&&t<c)break;c<0&&(c=n-o),a.push(e,t,n),l++,s.next()}}if(l){let t=new Uint16Array(4*l),o=a[a.length-2];for(let e=a.length-3,n=0;e>=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-o,t[n++]=a[e+2]-o,t[n++]=n;n.push(new iM(t,a[2]-o,r)),i.push(o-e)}}function h(e,t,n,o,i,a,s,l,c){let u=[],d=[];for(;e.length>o;)u.push(e.pop()),d.push(t.pop()+n-i);e.push(f(r.types[s],u,d,a-i,l-a,c)),t.push(i-n)}function f(e,t,n,r,o,i,a){if(i){let e=[YD.contextHash,i];a=a?[e].concat(a):[e]}if(o>25){let e=[YD.lookAhead,o];a=a?[e].concat(a):[e]}return new rM(e,t,n,r,a)}function m(e,t,n){let{id:r,start:o,end:i,size:l}=s;if(s.next(),l>=0&&r<a){let a=n;if(l>4){let r=s.pos-(l-4);for(;s.pos>r;)n=m(e,t,n)}t[--n]=a,t[--n]=i-e,t[--n]=o-e,t[--n]=r}else-3==l?c=r:-4==l&&(u=r);return n}let g=[],v=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,g,v,-1,0);let y=null!==(t=e.length)&&void 0!==t?t:g.length?v[0]+g[0].length:0;return new rM(l[e.topID],g.reverse(),v.reverse(),y)}(e)}}rM.empty=new rM(ZD.none,[],[],0);class oM{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new oM(this.buffer,this.index)}}class iM{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return ZD.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],o=r.name;if(/\W/.test(o)&&!r.isError&&(o=JSON.stringify(o)),n==(e+=4))return o;let i=[];for(;e<n;)i.push(this.childString(e)),e=this.buffer[e+3];return o+"("+i.join(",")+")"}findChild(e,t,n,r,o){let{buffer:i}=this,a=-1;for(let s=e;s!=t&&!(aM(o,r,i[s+1],i[s+2])&&(a=s,n>0));s=i[s+3]);return a}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a<t;){o[s++]=r[a++],o[s++]=r[a++]-n;let t=o[s++]=r[a++]-n;o[s++]=r[a++]-e,i=Math.max(i,t)}return new iM(o,i,this.set)}}function aM(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function sM(e,t,n,r){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof cM&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:nM.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof cM&&r.index<0&&(null===(o=a.enter(t,n,i))||void 0===o?void 0:o.from)!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}class lM{cursor(e=0){return new gM(this,e)}getChild(e,t=null,n=null){let r=uM(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return uM(this,e,t,n)}resolve(e,t=0){return sM(this,e,t,!1)}resolveInner(e,t=0){return sM(this,e,t,!0)}matchContext(e){return dM(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class cM extends lM{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,o=0){for(let i=this;;){for(let{children:a,positions:s}=i._tree,l=t>0?a.length:-1;e!=l;e+=t){let l=a[e],c=s[e]+i.from;if(aM(r,n,c,c+l.length))if(l instanceof iM){if(o&nM.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-c,r);if(a>-1)return new hM(new pM(i,l,e,c),null,a)}else if(o&nM.IncludeAnonymous||!l.type.isAnonymous||vM(l)){let a;if(!(o&nM.IgnoreMounts)&&(a=XD.get(l))&&!a.overlay)return new cM(a.tree,c,e,i);let s=new cM(l,c,e,i);return o&nM.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(o&nM.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&nM.IgnoreOverlays)&&(r=XD.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:o}of r.overlay)if((t>0?e<=n:e<n)&&(t<0?o>=n:o>n))return new cM(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function uM(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function dM(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class pM{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class hM extends lM{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new hM(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&nM.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new hM(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new hM(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new hM(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new rM(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function fM(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let o=e[r];(o.from>n.from||o.to<n.to)&&(n=o,t=r)}let r=n instanceof cM&&n.index<0?null:n.parent,o=e.slice();return r?o[t]=r:o.splice(t,1),new mM(o,n)}class mM{constructor(e,t){this.heads=e,this.node=t}get next(){return fM(this.heads)}}class gM{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof cM)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof cM?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&nM.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&nM.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&nM.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let e=n._tree.children[r];if(this.mode&nM.IncludeAnonymous||e instanceof iM||!e.type.isAnonymous||vM(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,o=this.stack.length;o>=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(let e=n;e<this.stack.length;e++)t=new hM(this.buffer,t,this.stack[e]);return this.bufferNode=new hM(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return dM(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,o=this.stack.length-1;r>=0;o--){if(o<0)return dM(this._tree,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}function vM(e){return e.children.some(e=>e instanceof iM||!e.type.isAnonymous||vM(e))}const yM=new WeakMap;function bM(e,t){if(!e.isAnonymous||t instanceof iM||t.type!=e)return 1;let n=yM.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof rM)){n=1;break}n+=bM(e,r)}yM.set(t,n)}return n}function wM(e,t,n,r,o,i,a,s,l){let c=0;for(let n=r;n<o;n++)c+=bM(e,t[n]);let u=Math.ceil(1.5*c/8),d=[],p=[];return function t(n,r,o,a,s){for(let c=o;c<a;){let o=c,h=r[c],f=bM(e,n[c]);for(c++;c<a;c++){let t=bM(e,n[c]);if(f+t>=u)break;f+=t}if(c==o+1){if(f>u){let e=n[o];t(e.children,e.positions,0,e.children.length,r[o]+s);continue}d.push(n[o])}else{let t=r[c-1]+n[c-1].length-h;d.push(wM(e,n,r,o,c,h,t,null,l))}p.push(h+s-i)}}(t,n,r,o,0),(s||l)(d,p,a)}class kM{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof hM?this.setBuffer(e.context.buffer,e.index,t):e instanceof cM&&this.map.set(e.tree,t)}get(e){return e instanceof hM?this.getBuffer(e.context.buffer,e.index):e instanceof cM?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class EM{constructor(e,t,n,r,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(o?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new EM(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let c=a<t.length?t[a]:null,u=c?c.fromA:1e9;if(u-s>=n)for(;i&&i.from<u;){let t=i;if(s>=t.from||u<=t.to||l){let e=Math.max(t.from,s)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new EM(e,n,t.tree,t.offset+l,a>0,!!c)}if(t&&r.push(t),i.to>u)break;i=o<e.length?e[o++]:null}if(!c)break;s=c.toA,l=c.toA-c.toB}return r}}class OM{startParse(e,t,n){return"string"==typeof e&&(e=new SM(e)),n=n?n.length?n.map(e=>new GD(e.from,e.to)):[new GD(0,0)]:[new GD(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class SM{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new YD({perNode:!0});class xM{constructor(e,t,n,r,o,i,a,s,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=o,this.score=i,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new xM(e,[],t,n,n,0,[],0,r?new _M(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:o}=this.p,i=this.reducePos<this.pos-25;i&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(r);if(a&&(this.score+=a),0==n)return this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r<o.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,i?8:4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(n-1)-(262144&e?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,c=this.reducePos-l;c>=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let u=s?this.stack[s-1]:0,d=this.bufferBase+this.buffer.length-u;if(r<o.minRepeatTerm||131072&e){let e=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,e,d+4,!0)}if(262144&e)this.state=this.stack[s];else{let e=this.stack[s-3];this.state=o.getGoto(e,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,o=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(0==r&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(o&&this.pos!=n){let o=this.buffer.length;if(o>0&&0!=this.buffer[o-4]){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let o=e,{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new xM(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new CM(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,o=0;o<t.length;o+=2)(r=t[o+1])!=this.state&&this.p.parser.hasAction(r,e)&&n.push(t[o],r);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[e],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(65536&t))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=65535&t,o=this.stack.length-3*n;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,o)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-o;if(n>1){let r=65535&t,o=this.stack.length-3*n;if(o>=0&&e.getGoto(this.stack[o],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,o+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new _M(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class _M{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class CM{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class PM{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new PM(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new PM(this.stack,this.pos,this.index)}}function TM(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,o=0;r<e.length;){let i=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){i=65535;break}t>=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,n=!0),i+=o,n)break;i*=46}n?n[o++]=i:n=new t(i)}return n}class AM{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const DM=new AM;class MM{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=DM,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,o=this.pos+e;for(;o<n.from;){if(!r)return null;let e=this.ranges[--r];o-=n.from-e.to,n=e}for(;t<0?o>n.to:o>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];o+=e.from-n.to,n=e}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(e,1);if(null==r)return-1;if(t=r,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,r=this.range;for(;r.to<=t;)r=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=DM,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class NM{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;RM(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}NM.prototype.contextual=NM.prototype.fallback=NM.prototype.extend=!1;class LM{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?TM(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,o=e.resolveOffset(1,1);if(RM(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(n||r++,null==o)break;e.reset(o,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}LM.prototype.contextual=NM.prototype.fallback=NM.prototype.extend=!1;class IM{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function RM(e,t,n,r,o,i){let a=0,s=1<<r,{dialect:l}=n.p.parser;e:for(;0!=(s&e[a]);){let n=e[a+1];for(let r=a+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||FM(n,t.token.value,o,i))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[a+2];if(!(t.next<0&&u>c&&65535==e[n+3*u-3])){for(;c<u;){let o=c+u>>1,i=n+o+(o<<1),s=e[i],l=e[i+1]||65536;if(r<s)u=o;else{if(!(r>=l)){a=e[i+2],t.advance();continue e}c=o+1}}break}a=e[n+3*u-1]}}function jM(e,t,n){for(let r,o=t;65535!=(r=e[o]);o++)if(r==n)return o-t;return-1}function FM(e,t,n,r){let o=jM(n,r,t);return o<0||jM(n,r,e)<o}const zM="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let BM=null;function UM(e,t,n){let r=e.cursor(nM.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class VM{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?UM(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?UM(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[r],i=this.start[t]+n.positions[r];if(i>e)return this.nextStart=i,null;if(o instanceof rM){if(i==e){if(i<this.safeFrom)return null;let e=i+o.length;if(e<=this.safeTo){let t=o.prop(YD.lookAhead);if(!t||e+t<this.fragment.to)return o}}this.index[t]++,i+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}}class WM{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new AM)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:o}=r,i=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<o.length;r++){if(!(1<<r&i))continue;let l=o[r],c=this.tokens[r];if((!n||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=i||c.context!=a)&&(this.updateCachedToken(c,l,e),c.mask=i,c.context=a),c.lookAhead>c.end+25&&(s=Math.max(c.lookAhead,s)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||(n=new AM,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new AM,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let o=t.specializers[r](this.stream.read(e.start,e.end),n);if(o>=0&&n.p.parser.dialect.allows(o>>1)){1&o?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:o}=e,{parser:i}=e.p,{data:a}=i;for(let e=0;e<2;e++)for(let s=i.stateSlot(o,e?2:1);;s+=3){if(65535==a[s]){if(1!=a[s+1]){0==r&&2==a[s+1]&&(r=this.putAction(GM(a,s+2),t,n,r));break}s=GM(a,s+2)}a[s]==t&&(r=this.putAction(GM(a,s+1),t,n,r))}return r}}class HM{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new MM(t,r),this.tokens=new WM(e,this.stream),this.topTerm=e.top[1];let{from:o}=r[0];this.stacks=[xM.start(this,e.top[0],o)],this.fragments=n.length&&this.stream.end-o>4*e.bufferLength?new VM(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;i<n.length;i++){let a=n[i];for(;;){if(this.tokens.mainToken=null,a.pos>r)o.push(a);else{if(this.advanceStack(a,o,n))continue;{e||(e=[],t=[]),e.push(a);let n=this.tokens.getMainToken(a);t.push(n.value,n.end)}}break}}if(!o.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return zM&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw zM&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,o);if(n)return zM&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort((e,t)=>t.score-e.score);o.length>e;)o.pop();o.some(e=>e.reducePos>r)&&this.recovering--}else if(o.length>1){e:for(let e=0;e<o.length-1;e++){let t=o[e];for(let n=e+1;n<o.length;n++){let r=o[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(n--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;e<o.length;e++)o[e].pos<this.minStackPos&&(this.minStackPos=o[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:o}=this,i=zM?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(YD.contextHash)||0)==n))return e.useNode(a,r),zM&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof rM)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof rM&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),zM&&console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;a<s.length;){let l=s[a++],c=s[a++],u=s[a++],d=a==s.length||!n,p=d?e:e.split(),h=this.tokens.mainToken;if(p.apply(l,c,h?h.start:p.pos,u),zM&&console.log(i+this.stackID(p)+` (via ${65536&l?`reduce of ${o.getName(65535&l)}`:"shift"} for ${o.getName(c)} @ ${r}${p==e?"":", split"})`),d)return!0;p.pos>r?t.push(p):n.push(p)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return QM(e,t),!0}}runRecovery(e,t,n){let r=null,o=!1;for(let i=0;i<e.length;i++){let a=e[i],s=t[i<<1],l=t[1+(i<<1)],c=zM?this.stackID(a)+" -> ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),zM&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}let u=a.split(),d=c;for(let e=0;u.forceReduce()&&e<10&&(zM&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,n));e++)zM&&(d=this.stackID(u)+" -> ");for(let e of a.recoverByInsert(s))zM&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),zM&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),QM(a,n)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(e){return e.close(),rM.build({buffer:PM.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(BM||(BM=new WeakMap)).get(e);return t||BM.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function QM(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}class qM{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class $M extends OM{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function o(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=YD[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let a=-r;a>0;a--)o(t[n++],e,i);n++}}}this.nodeSet=new JD(t.map((t,o)=>ZD.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=qD;let i=TM(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(YM),this.states=TM(e.states,Uint32Array),this.data=TM(e.stateData),this.goto=TM(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new NM(i,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new HM(this,e,t,n);for(let o of this.wrappers)r=o(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let t=r[o++],i=1&t,a=r[o++];if(i&&n)return a;for(let n=o+(t>>1);o<n;o++)if(r[o]==e)return a;if(i)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let o,i=this.stateSlot(e,r?2:1);;i+=3){if(65535==(o=n[i])){if(1!=n[i+1]){if(2==n[i+1])return GM(n,i+2);break}o=n[i=GM(n,i+2)]}if(o==t||0==o)return GM(n,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=GM(this.data,n+2)}r=t(GM(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=GM(this.data,n+2)}if(!(1&this.data[n+2])){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create($M.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let o=e.specializers.find(e=>e.from==n.external);if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[r]=YM(i),i})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n,o=this.dialects[t[e]];65535!=(n=this.data[o++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[n]=1;return new qM(e,n,r)}static deserialize(e){return new $M(e)}}function GM(e,t){return e[t]|e[t+1]<<16}function YM(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}let XM=0;class KM{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=XM++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof KM&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let r=new KM(n,[],null,[]);if(r.set.push(r),t)for(let e of t.set)r.set.push(e);return r}static defineModifier(e){let t=new JM(e);return e=>e.modified.indexOf(t)>-1?e:JM.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let ZM=0;class JM{constructor(e){this.name=e,this.instances=[],this.id=ZM++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{return n.base==e&&(r=t,o=n.modified,r.length==o.length&&r.every((e,t)=>e==o[t]));var r,o});if(n)return n;let r=[],o=new KM(e.name,r,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,o=t.length;r<o;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)r.push(JM.get(t,e));return o}}function eN(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new nN(r,o,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return tN.add(t)}const tN=new YD;class nN{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function rN(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:o=null}=t||{};return{style:e=>{let t=o;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function oN(e,t,n,r=0,o=e.length){let i=new iN(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}nN.empty=new nN([],2,null);class iN{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,o){let{type:i,from:a,to:s}=e;if(a>=n||s<=t)return;i.isTop&&(o=this.highlighters.filter(e=>!e.scope||e.scope(i)));let l=r,c=function(e){let t=e.type.prop(tN);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||nN.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(o,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,a),l),c.opaque)return;let d=e.tree&&e.tree.prop(YD.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),c=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let p=0,h=a;;p++){let f=p<d.overlay.length?d.overlay[p]:null,m=f?f.from+a:s,g=Math.max(t,h),v=Math.min(n,m);if(g<v&&u)for(;e.from<v&&(this.highlightRange(e,g,v,r,o),this.startSpan(Math.min(v,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>n)break;h=f.to+a,h>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(n,h),"",c),this.startSpan(Math.min(n,h),l))}u&&e.parent()}else if(e.firstChild()){d&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const aN=KM.define,sN=aN(),lN=aN(),cN=aN(lN),uN=aN(lN),dN=aN(),pN=aN(dN),hN=aN(dN),fN=aN(),mN=aN(fN),gN=aN(),vN=aN(),yN=aN(),bN=aN(yN),wN=aN(),kN={comment:sN,lineComment:aN(sN),blockComment:aN(sN),docComment:aN(sN),name:lN,variableName:aN(lN),typeName:cN,tagName:aN(cN),propertyName:uN,attributeName:aN(uN),className:aN(lN),labelName:aN(lN),namespace:aN(lN),macroName:aN(lN),literal:dN,string:pN,docString:aN(pN),character:aN(pN),attributeValue:aN(pN),number:hN,integer:aN(hN),float:aN(hN),bool:aN(dN),regexp:aN(dN),escape:aN(dN),color:aN(dN),url:aN(dN),keyword:gN,self:aN(gN),null:aN(gN),atom:aN(gN),unit:aN(gN),modifier:aN(gN),operatorKeyword:aN(gN),controlKeyword:aN(gN),definitionKeyword:aN(gN),moduleKeyword:aN(gN),operator:vN,derefOperator:aN(vN),arithmeticOperator:aN(vN),logicOperator:aN(vN),bitwiseOperator:aN(vN),compareOperator:aN(vN),updateOperator:aN(vN),definitionOperator:aN(vN),typeOperator:aN(vN),controlOperator:aN(vN),punctuation:yN,separator:aN(yN),bracket:bN,angleBracket:aN(bN),squareBracket:aN(bN),paren:aN(bN),brace:aN(bN),content:fN,heading:mN,heading1:aN(mN),heading2:aN(mN),heading3:aN(mN),heading4:aN(mN),heading5:aN(mN),heading6:aN(mN),contentSeparator:aN(fN),list:aN(fN),quote:aN(fN),emphasis:aN(fN),strong:aN(fN),link:aN(fN),monospace:aN(fN),strikethrough:aN(fN),inserted:aN(),deleted:aN(),changed:aN(),invalid:aN(),meta:wN,documentMeta:aN(wN),annotation:aN(wN),processingInstruction:aN(wN),definition:KM.defineModifier("definition"),constant:KM.defineModifier("constant"),function:KM.defineModifier("function"),standard:KM.defineModifier("standard"),local:KM.defineModifier("local"),special:KM.defineModifier("special")};for(let e in kN){let t=kN[e];t instanceof KM&&(t.name=e)}rN([{tag:kN.link,class:"tok-link"},{tag:kN.heading,class:"tok-heading"},{tag:kN.emphasis,class:"tok-emphasis"},{tag:kN.strong,class:"tok-strong"},{tag:kN.keyword,class:"tok-keyword"},{tag:kN.atom,class:"tok-atom"},{tag:kN.bool,class:"tok-bool"},{tag:kN.url,class:"tok-url"},{tag:kN.labelName,class:"tok-labelName"},{tag:kN.inserted,class:"tok-inserted"},{tag:kN.deleted,class:"tok-deleted"},{tag:kN.literal,class:"tok-literal"},{tag:kN.string,class:"tok-string"},{tag:kN.number,class:"tok-number"},{tag:[kN.regexp,kN.escape,kN.special(kN.string)],class:"tok-string2"},{tag:kN.variableName,class:"tok-variableName"},{tag:kN.local(kN.variableName),class:"tok-variableName tok-local"},{tag:kN.definition(kN.variableName),class:"tok-variableName tok-definition"},{tag:kN.special(kN.variableName),class:"tok-variableName2"},{tag:kN.definition(kN.propertyName),class:"tok-propertyName tok-definition"},{tag:kN.typeName,class:"tok-typeName"},{tag:kN.namespace,class:"tok-namespace"},{tag:kN.className,class:"tok-className"},{tag:kN.macroName,class:"tok-macroName"},{tag:kN.propertyName,class:"tok-propertyName"},{tag:kN.operator,class:"tok-operator"},{tag:kN.comment,class:"tok-comment"},{tag:kN.meta,class:"tok-meta"},{tag:kN.invalid,class:"tok-invalid"},{tag:kN.punctuation,class:"tok-punctuation"}]);const EN=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function ON(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function SN(e){return e>=48&&e<=57}function xN(e){return SN(e)||e>=97&&e<=102||e>=65&&e<=70}const _N=(e,t,n)=>(r,o)=>{for(let i=!1,a=0,s=0;;s++){let{next:l}=r;if(ON(l)||45==l||95==l||i&&SN(l))!i&&(45!=l||s>0)&&(i=!0),a===s&&45==l&&a++,r.advance();else{if(92!=l||10==r.peek(1)){i&&r.acceptToken(2==a&&o.canShift(2)?t:40==l?n:e);break}if(r.advance(),xN(r.next)){do{r.advance()}while(xN(r.next));32==r.next&&r.advance()}else r.next>-1&&r.advance();i=!0}}},CN=new IM(_N(123,2,124)),PN=new IM(_N(125,3,4)),TN=new IM(e=>{if(EN.includes(e.peek(-1))){let{next:t}=e;(ON(t)||95==t||35==t||46==t||42==t||91==t||58==t&&ON(e.peek(1))||45==t||38==t)&&e.acceptToken(122)}}),AN=new IM(e=>{if(!EN.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),ON(t)){do{e.advance()}while(ON(e.next)||SN(e.next));e.acceptToken(1)}}}),DN=eN({"AtKeyword import charset namespace keyframes media supports":kN.definitionKeyword,"from to selector":kN.keyword,NamespaceName:kN.namespace,KeyframeName:kN.labelName,KeyframeRangeName:kN.operatorKeyword,TagName:kN.tagName,ClassName:kN.className,PseudoClassName:kN.constant(kN.className),IdName:kN.labelName,"FeatureName PropertyName":kN.propertyName,AttributeName:kN.attributeName,NumberLiteral:kN.number,KeywordQuery:kN.keyword,UnaryQueryOp:kN.operatorKeyword,"CallTag ValueName":kN.atom,VariableName:kN.variableName,Callee:kN.operatorKeyword,Unit:kN.unit,"UniversalSelector NestingSelector":kN.definitionOperator,"MatchOp CompareOp":kN.compareOperator,"ChildOp SiblingOp, LogicOp":kN.logicOperator,BinOp:kN.arithmeticOperator,Important:kN.modifier,Comment:kN.blockComment,ColorLiteral:kN.color,"ParenthesizedContent StringLiteral":kN.string,":":kN.punctuation,"PseudoOp #":kN.derefOperator,"; ,":kN.separator,"( )":kN.paren,"[ ]":kN.squareBracket,"{ }":kN.brace}),MN={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},NN={__proto__:null,or:98,and:98,not:106,only:106,layer:170},LN={__proto__:null,selector:112,layer:166},IN={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},RN={__proto__:null,to:207},jN=$M.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",maxTerm:143,nodeProps:[["isolate",-2,5,36,""],["openedBy",20,"(",28,"[",31,"{"],["closedBy",21,")",29,"]",32,"}"]],propSources:[DN],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[TN,AN,CN,PN,1,2,3,4,new LM("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>MN[e]||-1},{term:125,get:e=>NN[e]||-1},{term:4,get:e=>LN[e]||-1},{term:25,get:e=>IN[e]||-1},{term:123,get:e=>RN[e]||-1}],tokenPrec:1963});let FN=[],zN=[];function BN(e){if(e<768)return!1;for(let t=0,n=FN.length;;){let r=t+n>>1;if(e<FN[r])n=r;else{if(!(e>=zN[r]))return!0;t=r+1}if(t==n)return!1}}function UN(e){return e>=127462&&e<=127487}function VN(e,t,n=!0,r=!0){return(n?WN:HN)(e,t,r)}function WN(e,t,n){if(t==e.length)return t;t&&qN(e.charCodeAt(t))&&$N(e.charCodeAt(t-1))&&t--;let r=QN(e,t);for(t+=GN(r);t<e.length;){let o=QN(e,t);if(8205==r||8205==o||n&&BN(o))t+=GN(o),r=o;else{if(!UN(o))break;{let n=0,r=t-2;for(;r>=0&&UN(QN(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function HN(e,t,n){for(;t>0;){let r=WN(e,t-2,n);if(r<t)return r;t--}return 0}function QN(e,t){let n=e.charCodeAt(t);if(!$N(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return qN(r)?r-56320+(n-55296<<10)+65536:n}function qN(e){return e>=56320&&e<57344}function $N(e){return e>=55296&&e<56320}function GN(e){return e<65536?1:2}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?zN:FN).push(n+=e[t])})();class YN{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=oL(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),KN.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=oL(this,e,t);let n=[];return this.decompose(e,t,n,0),KN.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new eL(this),o=new eL(e);for(let e=t,i=t;;){if(r.next(e),o.next(e),e=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(i+=r.value.length,r.done||i>=n)return!0}}iter(e=1){return new eL(this,e)}iterRange(e,t=this.length){return new tL(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new nL(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new XN(e):KN.from(XN.split(e,[])):YN.empty}}class XN extends YN{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.text[o],a=r+i.length;if((t?n:a)>=e)return new rL(r,a,n,i);r=a+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new XN(JN(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=ZN(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new XN(t,e.length+o.length));else{let e=t.length>>1;n.push(new XN(t.slice(0,e)),new XN(t.slice(e)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof XN))return super.replace(e,t,n);[e,t]=oL(this,e,t);let r=ZN(this.text,ZN(n.text,JN(this.text,0,e)),t),o=this.length+n.length-(t-e);return r.length<=32?new XN(r,o):KN.from(XN.split(r,[]),o)}sliceString(e,t=this.length,n="\n"){[e,t]=oL(this,e,t);let r="";for(let o=0,i=0;o<=t&&i<this.text.length;i++){let a=this.text[i],s=o+a.length;o>e&&i&&(r+=n),e<s&&t>o&&(r+=a.slice(Math.max(0,e-o),t-o)),o=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let o of e)n.push(o),r+=o.length+1,32==n.length&&(t.push(new XN(n,r)),n=[],r=-1);return r>-1&&t.push(new XN(n,r)),t}}class KN extends YN{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.children[o],a=r+i.length,s=n+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,n,r);r=a+1,n=s+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o<this.children.length;o++){let a=this.children[o],s=i+a.length;if(e<=s&&t>=i){let o=r&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?n.push(a):a.decompose(e-i,t-i,n,o)}i=s+1}}replace(e,t,n){if([e,t]=oL(this,e,t),n.lines<this.lines)for(let r=0,o=0;r<this.children.length;r++){let i=this.children[r],a=o+i.length;if(e>=o&&t<=a){let s=i.replace(e-o,t-o,n),l=this.lines-i.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let o=this.children.slice();return o[r]=s,new KN(o,this.length-(t-e)+n.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=oL(this,e,t);let r="";for(let o=0,i=0;o<this.children.length&&i<=t;o++){let a=this.children[o],s=i+a.length;i>e&&o&&(r+=n),e<s&&t>i&&(r+=a.sliceString(e-i,t-i,n)),i=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof KN))return 0;let n=0,[r,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==i||o==a)return n;let s=this.children[r],l=e.children[o];if(s!=l)return n+s.scanIdentical(l,t);n+=s.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new XN(n,t)}let r=Math.max(32,n>>5),o=r<<1,i=r>>1,a=[],s=0,l=-1,c=[];function u(e){let t;if(e.lines>o&&e instanceof KN)for(let t of e.children)u(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof XN&&s&&(t=c[c.length-1])instanceof XN&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,c[c.length-1]=new XN(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&d(),s+=e.lines,l+=e.length+1,c.push(e))}function d(){0!=s&&(a.push(1==c.length?c[0]:KN.from(c,l)),l=-1,s=c.length=0)}for(let t of e)u(t);return d(),1==a.length?a[0]:new KN(a,t)}}function ZN(e,t,n=0,r=1e9){for(let o=0,i=0,a=!0;i<e.length&&o<=r;i++){let s=e[i],l=o+s.length;l>=n&&(l>r&&(s=s.slice(0,r-o)),o<n&&(s=s.slice(n-o)),a?(t[t.length-1]+=s,a=!1):t.push(s)),o=l+1}return t}function JN(e,t,n){return ZN(e,[""],t,n)}YN.empty=new XN([""],0);class eL{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof XN?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],o=this.offsets[n],i=o>>1,a=r instanceof XN?r.text.length:r.children.length;if(i==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof XN){let o=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof XN?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class tL{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new eL(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class nL{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(YN.prototype[Symbol.iterator]=function(){return this.iter()},eL.prototype[Symbol.iterator]=tL.prototype[Symbol.iterator]=nL.prototype[Symbol.iterator]=function(){return this});class rL{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function oL(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function iL(e,t,n=!0,r=!0){return VN(e,t,n,r)}function aL(e,t){let n=e.charCodeAt(t);if(!((r=n)>=55296&&r<56320&&t+1!=e.length))return n;var r;let o=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(o)?o-56320+(n-55296<<10)+65536:n}function sL(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function lL(e){return e<65536?1:2}const cL=/\r\n?|\n/;var uL=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(uL||(uL={}));class dL{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let o=this.sections[t++],i=this.sections[t++];i<0?(e(n,r,o),r+=o):r+=i,n+=o}}iterChangedRanges(e,t=!1){mL(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new dL(e)}composeDesc(e){return this.empty?e:e.empty?this:vL(this,e)}mapDesc(e,t=!1){return e.empty?this:gL(this,e,t)}mapPos(e,t=-1,n=uL.Simple){let r=0,o=0;for(let i=0;i<this.sections.length;){let a=this.sections[i++],s=this.sections[i++],l=r+a;if(s<0){if(l>e)return o+(e-r);o+=a}else{if(n!=uL.Simple&&l>=e&&(n==uL.TrackDel&&r<e&&l>e||n==uL.TrackBefore&&r<e||n==uL.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?o:o+s;o+=s}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let o=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&o>=e)return!(r<e&&o>t)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeDesc");return new dL(e)}static create(e){return new dL(e)}}class pL extends dL{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return mL(this,(t,n,r,o,i)=>e=e.replace(r,r+(n-t),i),!1),e}mapDesc(e,t=!1){return gL(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,o=0;r<t.length;r+=2){let i=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=i;let s=r>>1;for(;n.length<s;)n.push(YN.empty);n.push(i?e.slice(o,o+i):YN.empty)}o+=i}return new pL(t,n)}compose(e){return this.empty?e:e.empty?this:vL(this,e,!0)}map(e,t=!1){return e.empty?this:gL(this,e,t,!0)}iterChanges(e,t=!1){mL(this,e,t)}get desc(){return dL.create(this.sections)}filter(e){let t=[],n=[],r=[],o=new yL(this);e:for(let i=0,a=0;;){let s=i==e.length?1e9:e[i++];for(;a<s||a==s&&0==o.len;){if(o.done)break e;let e=Math.min(o.len,s-a);hL(r,e,-1);let i=-1==o.ins?-1:0==o.off?o.ins:0;hL(t,e,i),i>0&&fL(n,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a<l;){if(o.done)break e;let e=Math.min(o.len,l-a);hL(t,e,-1),hL(r,e,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(e),a+=e}}return{changes:new pL(t,n),filtered:dL.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],o=[],i=0,a=null;function s(e=!1){if(!e&&!r.length)return;i<t&&hL(r,t-i,-1);let n=new pL(r,o);a=a?a.compose(n.map(a)):n,r=[],o=[],i=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof pL){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:e,to:a=e,insert:c}=l;if(e>a||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let u=c?"string"==typeof c?YN.of(c.split(n||cL)):c:YN.empty,d=u.length;if(e==a&&0==d)return;e<i&&s(),e>i&&hL(r,e-i,-1),hL(r,a-e,d),fL(o,r,u),i=a}}(e),s(!a),a}static empty(e){return new pL(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let o=e[r];if("number"==typeof o)t.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some((e,t)=>t&&"string"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;n.length<r;)n.push(YN.empty);n[r]=YN.of(o.slice(1)),t.push(o[0],n[r].length)}}}return new pL(t,n)}static createSet(e,t){return new pL(e,t)}}function hL(e,t,n,r=!1){if(0==t&&n<=0)return;let o=e.length-2;o>=0&&n<=0&&n==e[o+1]?e[o]+=t:o>=0&&0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function fL(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(YN.empty);e.push(n)}}function mL(e,t,n){let r=e.inserted;for(let o=0,i=0,a=0;a<e.sections.length;){let s=e.sections[a++],l=e.sections[a++];if(l<0)o+=s,i+=s;else{let c=o,u=i,d=YN.empty;for(;c+=s,u+=l,l&&r&&(d=d.append(r[a-2>>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,c,i,u,d),o=c,i=u}}}function gL(e,t,n,r=!1){let o=[],i=r?[]:null,a=new yL(e),s=new yL(t);for(let e=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);hL(o,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!n))){let t=s.len;for(hL(o,s.ins,-1);t;){let n=Math.min(a.len,t);a.ins>=0&&e<a.i&&a.len<=n&&(hL(o,0,a.ins),i&&fL(i,o,a.text),e=a.i),a.forward(n),t-=n}s.next()}else{if(!(a.ins>=0)){if(a.done&&s.done)return i?pL.createSet(o,i):dL.create(o);throw new Error("Mismatched change set lengths")}{let t=0,n=a.len;for(;n;)if(-1==s.ins){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else{if(!(0==s.ins&&s.len<n))break;n-=s.len,s.next()}hL(o,t,e<a.i?a.ins:0),i&&e<a.i&&fL(i,o,a.text),e=a.i,a.forward(a.len-n)}}}}function vL(e,t,n=!1){let r=[],o=n?[]:null,i=new yL(e),a=new yL(t);for(let e=!1;;){if(i.done&&a.done)return o?pL.createSet(r,o):dL.create(r);if(0==i.ins)hL(r,i.len,0,e),i.next();else if(0!=a.len||a.done){if(i.done||a.done)throw new Error("Mismatched change set lengths");{let t=Math.min(i.len2,a.len),n=r.length;if(-1==i.ins){let n=-1==a.ins?-1:a.off?0:a.ins;hL(r,t,n,e),o&&n&&fL(o,r,a.text)}else-1==a.ins?(hL(r,i.off?0:i.len,t,e),o&&fL(o,r,i.textBit(t))):(hL(r,i.off?0:i.len,a.off?0:a.ins,e),o&&!a.off&&fL(o,r,a.text));e=(i.ins>t||a.ins>=0&&a.len>t)&&(e||r.length>n),i.forward2(t),a.forward(t)}}else hL(r,0,a.ins,e),o&&fL(o,r,a.text),a.next()}}class yL{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?YN.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?YN.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class bL{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new bL(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return wL.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return wL.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return wL.range(e.anchor,e.head)}static create(e,t,n){return new bL(e,t,n)}}class wL{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:wL.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new wL([this.main],0)}addRange(e,t=!0){return wL.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,wL.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new wL(e.ranges.map(e=>bL.fromJSON(e)),e.main)}static single(e,t=e){return new wL([wL.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let o=e[r];if(o.empty?o.from<=n:o.from<n)return wL.normalized(e.slice(),t);n=o.to}return new wL(e,t)}static cursor(e,t=0,n,r){return bL.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}static range(e,t,n,r){let o=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return t<e?bL.create(t,e,48|o):bL.create(e,t,(t>e?8:0)|o)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],o=e[n-1];if(r.empty?r.from<=o.to:r.from<o.to){let i=o.from,a=Math.max(r.to,o.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?wL.range(a,i):wL.range(i,a))}}return new wL(e,t)}}function kL(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let EL=0;class OL{constructor(e,t,n,r,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=EL++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(e={}){return new OL(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:SL),!!e.static,e.enables)}of(e){return new xL([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xL(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xL(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function SL(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class xL{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=EL++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||c.push(e[n.id]);return{create:e=>(e.values[i]=n(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||CL(e,c)){let t=n(e);if(a?!_L(t,e.values[i],r):!r(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=FL(t,l);if(this.dependencies.every(n=>n instanceof OL?t.facet(n)===e.facet(n):!(n instanceof AL)||t.field(n,!1)==e.field(n,!1))||(a?_L(s=n(e),o,r):r(s=n(e),o)))return e.values[i]=o,0}else s=n(e);return e.values[i]=s,1}}}}function _L(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function CL(e,t){let n=!1;for(let r of t)1&jL(e,r)&&(n=!0);return n}function PL(e,t,n){let r=n.map(t=>e[t.id]),o=n.map(e=>e.type),i=r.filter(e=>!(1&e)),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let i=FL(e,r[t]);if(2==o[t])for(let e of i)n.push(e);else n.push(i)}return t.combine(n)}return{create(e){for(let t of r)jL(e,t);return e.values[a]=s(e),1},update(e,n){if(!CL(e,i))return 0;let r=s(e);return t.compare(r,e.values[a])?0:(e.values[a]=r,1)},reconfigure(e,o){let i=CL(e,r),l=o.config.facets[t.id],c=o.facet(t);if(l&&!i&&SL(n,l))return e.values[a]=c,0;let u=s(e);return t.compare(u,c)?(e.values[a]=c,0):(e.values[a]=u,1)}}}const TL=OL.define({static:!0});class AL{constructor(e,t,n,r,o){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=o,this.provides=void 0}static define(e){let t=new AL(EL++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(TL).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],o=this.updateF(r,n);return this.compareF(r,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>{let r,o=e.facet(TL),i=n.facet(TL);return(r=o.find(e=>e.field==this))&&r!=i.find(e=>e.field==this)?(e.values[t]=r.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,TL.of({field:this,create:e})]}get extension(){return this}}function DL(e){return t=>new NL(t,e)}const ML={highest:DL(0),high:DL(1),default:DL(2),low:DL(3),lowest:DL(4)};class NL{constructor(e,t){this.inner=e,this.prec=t}}class LL{of(e){return new IL(this,e)}reconfigure(e){return LL.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class IL{constructor(e,t){this.compartment=e,this.inner=t}}class RL{constructor(e,t,n,r,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],o=Object.create(null),i=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],o=new Map;return function e(i,a){let s=o.get(i);if(null!=s){if(s<=a)return;let e=r[s].indexOf(i);e>-1&&r[s].splice(e,1),i instanceof IL&&n.delete(i.compartment)}if(o.set(i,a),Array.isArray(i))for(let t of i)e(t,a);else if(i instanceof IL){if(n.has(i.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(i.compartment)||i.inner;n.set(i.compartment,r),e(r,a)}else if(i instanceof NL)e(i.inner,i.prec);else if(i instanceof AL)r[a].push(i),i.provides&&e(i.provides,a);else if(i instanceof xL)r[a].push(i),i.facet.extensions&&e(i.facet.extensions,2);else{let t=i.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${i}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,a)}}(e,2),r.reduce((e,t)=>e.concat(t))}(e,t,i))n instanceof AL?r.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),s=[],l=[];for(let e of r)a[e.id]=l.length<<1,l.push(t=>e.slot(t));let c=null==n?void 0:n.config.facets;for(let e in o){let t=o[e],r=t[0].facet,i=c&&c[e]||[];if(t.every(e=>0==e.type))if(a[r.id]=s.length<<1|1,SL(i,t))s.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));s.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));a[r.id]=l.length<<1,l.push(e=>PL(e,r,t))}}let u=l.map(e=>e(a));return new RL(e,i,u,a,s,o)}}function jL(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function FL(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const zL=OL.define(),BL=OL.define({combine:e=>e.some(e=>e),static:!0}),UL=OL.define({combine:e=>e.length?e[0]:void 0,static:!0}),VL=OL.define(),WL=OL.define(),HL=OL.define(),QL=OL.define({combine:e=>!!e.length&&e[0]});class qL{constructor(e,t){this.type=e,this.value=t}static define(){return new $L}}class $L{of(e){return new qL(this,e)}}class GL{constructor(e){this.map=e}of(e){return new YL(this,e)}}class YL{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new YL(this.type,t)}is(e){return this.type==e}static define(e={}){return new GL(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}YL.reconfigure=YL.define(),YL.appendConfig=YL.define();class XL{constructor(e,t,n,r,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&kL(n,t.newLength),o.some(e=>e.type==XL.time)||(this.annotations=o.concat(XL.time.of(Date.now())))}static create(e,t,n,r,o,i){return new XL(e,t,n,r,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(XL.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function KL(e,t){let n=[];for(let r=0,o=0;;){let i,a;if(r<e.length&&(o==t.length||t[o]>=e[r]))i=e[r++],a=e[r++];else{if(!(o<t.length))return n;i=t[o++],a=t[o++]}!n.length||n[n.length-1]<i?n.push(i,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function ZL(e,t,n){var r;let o,i,a;return n?(o=t.changes,i=pL.empty(t.changes.length),a=e.changes.compose(t.changes)):(o=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(o)),{changes:a,selection:t.selection?t.selection.map(i):null===(r=e.selection)||void 0===r?void 0:r.map(o),effects:YL.mapEffects(e.effects,o).concat(YL.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function JL(e,t,n){let r=t.selection,o=nI(t.annotations);return t.userEvent&&(o=o.concat(XL.userEvent.of(t.userEvent))),{changes:t.changes instanceof pL?t.changes:pL.of(t.changes||[],n,e.facet(UL)),selection:r&&(r instanceof wL?r:wL.single(r.anchor,r.head)),effects:nI(t.effects),annotations:o,scrollIntoView:!!t.scrollIntoView}}function eI(e,t,n){let r=JL(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let o=1;o<t.length;o++){!1===t[o].filter&&(n=!1);let i=!!t[o].sequential;r=ZL(r,JL(e,t[o],i?r.changes.newLength:e.doc.length),i)}let o=XL.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(HL),r=e;for(let o=n.length-1;o>=0;o--){let i=n[o](e);i&&Object.keys(i).length&&(r=ZL(r,JL(t,i,e.changes.newLength),!0))}return r==e?e:XL.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(VL)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:KL(n,t))}if(!0!==n){let r,o;if(!1===n)o=e.changes.invertedDesc,r=pL.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=XL.create(t,r,e.selection&&e.selection.map(o),YL.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let r=t.facet(WL);for(let n=r.length-1;n>=0;n--){let o=r[n](e);e=o instanceof XL?o:Array.isArray(o)&&1==o.length&&o[0]instanceof XL?o[0]:eI(t,nI(o),!1)}return e}(o):o)}XL.time=qL.define(),XL.userEvent=qL.define(),XL.addToHistory=qL.define(),XL.remote=qL.define();const tI=[];function nI(e){return null==e?tI:Array.isArray(e)?e:[e]}var rI=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(rI||(rI={}));const oI=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let iI;try{iI=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class aI{constructor(e,t,n,r,o,i){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)jL(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return jL(this,n),FL(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return eI(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:o}=n;for(let t of e.effects)t.is(LL.reconfigure)?(n&&(o=new Map,n.compartments.forEach((e,t)=>o.set(t,e)),n=null),o.set(t.value.compartment,t.value.extension)):t.is(YL.reconfigure)?(n=null,r=t.value):t.is(YL.appendConfig)&&(n=null,r=nI(r).concat(t.value));n?t=e.startState.values.slice():(n=RL.resolve(r,o,this),t=new aI(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let i=e.startState.facet(BL)?e.newSelection:e.newSelection.asSingle();new aI(n,e.newDoc,i,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:wL.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),o=[n.range],i=nI(n.effects);for(let n=1;n<t.ranges.length;n++){let a=e(t.ranges[n]),s=this.changes(a.changes),l=s.map(r);for(let e=0;e<n;e++)o[e]=o[e].map(l);let c=r.mapDesc(s,!0);o.push(a.range.map(c)),r=r.compose(l),i=YL.mapEffects(i,l).concat(YL.mapEffects(nI(a.effects),c))}return{changes:r,selection:wL.create(o,t.mainIndex),effects:i}}changes(e=[]){return e instanceof pL?e:pL.of(e,this.doc.length,this.facet(aI.lineSeparator))}toText(e){return YN.of(e.split(this.facet(aI.lineSeparator)||cL))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(jL(this,t),FL(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof AL&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let o=n[t],i=e[t];r.push(o.init(e=>o.spec.fromJSON(i,e)))}return aI.create({doc:e.doc,selection:wL.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=RL.resolve(e.extensions||[],new Map),n=e.doc instanceof YN?e.doc:YN.of((e.doc||"").split(t.staticFacet(aI.lineSeparator)||cL)),r=e.selection?e.selection instanceof wL?e.selection:wL.single(e.selection.anchor,e.selection.head):wL.single(0);return kL(r,n.length),t.staticFacet(BL)||(r=r.asSingle()),new aI(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(aI.tabSize)}get lineBreak(){return this.facet(aI.lineSeparator)||"\n"}get readOnly(){return this.facet(QL)}phrase(e,...t){for(let t of this.facet(aI.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let o of this.facet(zL))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&r.push(i[e]);return r}charCategorizer(e){return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return rI.Space;if(function(e){if(iI)return iI.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||oI.test(n)))return!0}return!1}(e))return rI.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return rI.Word;return rI.Other};var t}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-n,a=e-n;for(;i>0;){let e=iL(t,i,!1);if(o(t.slice(e,i))!=rI.Word)break;i=e}for(;a<r;){let e=iL(t,a);if(o(t.slice(a,e))!=rI.Word)break;a=e}return i==a?null:wL.range(i+n,a+n)}}function sI(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let o=t[e],i=r[e];if(void 0===i)r[e]=o;else if(i===o||void 0===o);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](i,o)}}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}aI.allowMultipleSelections=BL,aI.tabSize=OL.define({combine:e=>e.length?e[0]:4}),aI.lineSeparator=UL,aI.readOnly=QL,aI.phrases=OL.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),aI.languageData=zL,aI.changeFilter=VL,aI.transactionFilter=WL,aI.transactionExtender=HL,LL.reconfigure=YL.define();class lI{eq(e){return this==e}range(e,t=e){return cI.create(e,t,this)}}lI.prototype.startSide=lI.prototype.endSide=0,lI.prototype.point=!1,lI.prototype.mapMode=uL.TrackDel;class cI{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new cI(e,t,n)}}function uI(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class dI{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let o=n?this.to:this.from;for(let i=r,a=o.length;;){if(i==a)return i;let r=i+a>>1,s=o[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==i)return s>=0?i:a;s>=0?a=r:i=r+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);o<i;o++)if(!1===r(this.from[o]+e,this.to[o]+e,this.value[o]))return!1}map(e,t){let n=[],r=[],o=[],i=-1,a=-1;for(let s=0;s<this.value.length;s++){let l,c,u=this.value[s],d=this.from[s]+e,p=this.to[s]+e;if(d==p){let e=t.mapPos(d,u.startSide,u.mapMode);if(null==e)continue;if(l=c=e,u.startSide!=u.endSide&&(c=t.mapPos(d,u.endSide),c<l))continue}else if(l=t.mapPos(d,u.startSide),c=t.mapPos(p,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(i<0&&(i=l),u.point&&(a=Math.max(a,c-l)),n.push(u),r.push(l-i),o.push(c-i))}return{mapped:n.length?new dI(r,o,n,a):null,pos:i}}}class pI{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new pI(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(n&&(t=t.slice().sort(uI)),this.isEmpty)return t.length?pI.of(t):this;let a=new mI(this,null,-1).goto(0),s=0,l=[],c=new hI;for(;a.value||s<t.length;)if(s<t.length&&(a.from-t[s].from||a.startSide-t[s].value.startSide)>=0){let e=t[s++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==t.length||this.chunkEnd(a.chunkIndex)<t[s].from)&&(!i||r>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!i||r>a.to||o<a.from||i(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||l.push(cI.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?pI.empty:this.nextLayer.update({add:l,filter:i,filterFrom:r,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let o=0;o<this.chunk.length;o++){let i=this.chunkPos[o],a=this.chunk[o],s=e.touchesRange(i,i+a.length);if(!1===s)r=Math.max(r,a.maxPoint),t.push(a),n.push(e.mapPos(i));else if(!0===s){let{mapped:o,pos:s}=a.map(i,e);o&&(r=Math.max(r,o.maxPoint),t.push(o),n.push(s))}}let o=this.nextLayer.map(e);return 0==t.length?o:new pI(n,t,o||pI.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],i=this.chunk[r];if(t>=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return gI.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return gI.from(e).goto(t)}static compare(e,t,n,r,o=-1){let i=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),a=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o),s=fI(i,a,n),l=new yI(i,s,o),c=new yI(a,s,o);n.iterGaps((e,t,n)=>bI(l,e,c,t,n,r)),n.empty&&0==n.length&&bI(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let o=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),i=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(o.length!=i.length)return!1;if(!o.length)return!0;let a=fI(o,i),s=new yI(o,a,0).goto(n),l=new yI(i,a,0).goto(n);for(;;){if(s.to!=l.to||!wI(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(e,t,n,r,o=-1){let i=new yI(e,null,o).goto(t),a=t,s=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFrom<t?n.length+1:i.point.startSide<0?n.length:Math.min(n.length,s);r.point(a,e,i.point,n,o,i.pointRank),s=Math.min(i.openEnd(e),n.length)}else e>a&&(r.span(a,e,i.active,s),s=i.openEnd(e));if(i.to>n)return s+(i.point&&i.to>n?1:0);a=i.to,i.next()}}static of(e,t=!1){let n=new hI;for(let r of e instanceof cI?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(uI(t,r)>0)return e.slice().sort(uI);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return pI.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=pI.empty;r=r.nextLayer)t=new pI(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}pI.empty=new pI([],[],null,-1),pI.empty.nextLayer=pI.empty;class hI{finishChunk(e){this.chunks.push(new dI(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new hI)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),0))}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(pI.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=pI.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function fI(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let o=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let i=r.get(e.chunk[t]);null==i||(n?n.mapPos(i):i)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(i,i+e.chunk[t].length))||o.add(e.chunk[t])}return o}class mI{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class gI{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let o=0;o<e.length;o++)for(let i=e[o];!i.isEmpty;i=i.nextLayer)i.maxPoint>=n&&r.push(new mI(i,t,n,o));return 1==r.length?r[0]:new gI(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)vI(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)vI(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vI(this.heap,0)}}}function vI(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let o=e[r];if(r+1<e.length&&o.compare(e[r+1])>=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class yI{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=gI.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){kI(this.active,e),kI(this.activeTo,e),kI(this.activeRank,e),this.minActive=OI(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:o}=this.cursor;for(;t<this.activeRank.length&&(o-this.activeRank[t]||r-this.activeTo[t])>0;)t++;EI(this.active,t,n),EI(this.activeTo,t,r),EI(this.activeRank,t,o),e&&EI(e,t,this.cursor.from),this.minActive=OI(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&kI(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function bI(e,t,n,r,o,i){e.goto(t),n.goto(r);let a=r+o,s=r,l=r-t;for(;;){let t=e.to+l-n.to,r=t||e.endSide-n.endSide,o=r<0?e.to+l:n.to,c=Math.min(o,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&wI(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(s,c,e.point,n.point):c>s&&!wI(e.active,n.active)&&i.compareRange(s,c,e.active,n.active),o>a)break;(t||e.openEnd!=n.openEnd)&&i.boundChange&&i.boundChange(o),s=o,r<=0&&e.next(),r>=0&&n.next()}}function wI(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function kI(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function EI(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function OI(e,t){let n=-1,r=1e9;for(let o=0;o<t.length;o++)(t[o]-r||e[o].endSide-e[n].endSide)<0&&(n=o,r=t[o]);return n}function SI(e,t,n=e.length){let r=0;for(let o=0;o<n&&o<e.length;)9==e.charCodeAt(o)?(r+=t-r%t,o++):(r++,o=iL(e,o));return r}function xI(e,t,n,r){for(let r=0,o=0;;){if(o>=t)return r;if(r==e.length)break;o+=9==e.charCodeAt(r)?n-o%n:1,r=iL(e,r)}return!0===r?-1:e.length}const _I="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),CI="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),PI="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class TI{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let n in t){let a=t[n];if(/&/.test(n))o(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");o(r(n),a,s,c)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+a+";")}(s.length||c)&&i.push((!n||l||a?e:e.map(n)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=PI[_I]||1;return PI[_I]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[CI],o=n&&n.nonce;r?o&&r.setNonce(o):r=new DI(e,o),r.mount(Array.isArray(t)?t:[t],e)}}let AI=new Map;class DI{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=AI.get(n);if(t)return e[CI]=t;this.sheet=new r.CSSStyleSheet,AI.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[CI]=this}mount(e,t){let n=this.sheet,r=0,o=0;for(let t=0;t<e.length;t++){let i=e[t],a=this.modules.indexOf(i);if(a<o&&a>-1&&(this.modules.splice(a,1),o--,a=-1),-1==a){if(this.modules.splice(o++,0,i),n)for(let e=0;e<i.rules.length;e++)n.insertRule(i.rules[e],r++)}else{for(;o<a;)r+=this.modules[o++].rules.length;r+=i.rules.length,o++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var MI={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},NI={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},LI="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),II="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),RI=0;RI<10;RI++)MI[48+RI]=MI[96+RI]=String(RI);for(RI=1;RI<=24;RI++)MI[RI+111]="F"+RI;for(RI=65;RI<=90;RI++)MI[RI]=String.fromCharCode(RI+32),NI[RI]=String.fromCharCode(RI);for(var jI in MI)NI.hasOwnProperty(jI)||(NI[jI]=MI[jI]);function FI(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function zI(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function BI(e,t){if(!t.anchorNode)return!1;try{return zI(e,t.anchorNode)}catch(e){return!1}}function UI(e){return 3==e.nodeType?eR(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function VI(e,t,n,r){return!!n&&(QI(e,t,n,r,-1)||QI(e,t,n,r,1))}function WI(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function HI(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function QI(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:qI(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=WI(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?qI(e):0}}}function qI(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function $I(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function GI(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function YI(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class XI{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?qI(t):0),n,Math.min(e.focusOffset,n?qI(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let KI,ZI=null;function JI(e){if(e.setActive)return e.setActive();if(ZI)return e.focus(ZI);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==ZI?{get preventScroll(){return ZI={preventScroll:!0},!0}}:void 0),!ZI){ZI=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],o=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=o&&(n.scrollLeft=o)}}}function eR(e,t,n=t){let r=KI||(KI=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function tR(e,t,n,r){let o={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:o.altKey,ctrlKey:o.ctrlKey,shiftKey:o.shiftKey,metaKey:o.metaKey}=r);let i=new KeyboardEvent("keydown",o);i.synthetic=!0,e.dispatchEvent(i);let a=new KeyboardEvent("keyup",o);return a.synthetic=!0,e.dispatchEvent(a),i.defaultPrevented||a.defaultPrevented}function nR(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function rR(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function oR(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=qI(n)}else{if(!n.parentNode||HI(n))return null;r=WI(n),n=n.parentNode}}}function iR(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r<n.nodeValue.length)return{node:n,offset:r};if(1==n.nodeType&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||HI(n))return null;r=WI(n)+1,n=n.parentNode}}}class aR{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new aR(e.parentNode,WI(e),t)}static after(e,t){return new aR(e.parentNode,WI(e)+1,t)}}const sR=[];class lR{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,o=null;for(let i of this.children){if(7&i.flags){if(!i.dom&&(n=o?o.nextSibling:r.firstChild)){let e=lR.get(n);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(n)}i.sync(e,t),i.flags&=-8}if(n=o?o.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=i.dom&&(t.written=!0),i.dom.parentNode==r)for(;n&&n!=i.dom;)n=cR(n);else r.insertBefore(i.dom,n);o=i.dom}for(n=o?o.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=cR(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==qI(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!lR.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,o=-1,i=-1,a=-1;for(let s=0,l=n,c=n;s<this.children.length;s++){let n=this.children[s],u=l+n.length;if(l<e&&u>t)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=s,o=l),l>t&&n.dom.parentNode==this.dom){i=s,a=c;break}c=u,l=u+n.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i<this.children.length&&i>=0?this.children[i].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=sR){this.markDirty();for(let r=e;r<t;r++){let e=this.children[r];e.parent==this&&n.indexOf(e)<0&&e.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new uR(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,r,o,i){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}function cR(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}lR.prototype.breakAfter=0;class uR{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function dR(e,t,n,r,o,i,a,s,l){let{children:c}=e,u=c.length?c[t]:null,d=i.length?i[i.length-1]:null,p=d?d.breakAfter:a;if(!(t==r&&u&&!a&&!p&&i.length<2&&u.merge(n,o,i.length?d:null,0==n,s,l))){if(r<c.length){let e=c[r];e&&(o<e.length||e.breakAfter&&(null==d?void 0:d.breakAfter))?(t==r&&(e=e.split(o),o=0),!p&&d&&e.merge(0,o,d,!0,0,l)?i[i.length-1]=e:((o||e.children.length&&!e.children[0].length)&&e.merge(0,o,null,!1,0,l),i.push(e))):(null==e?void 0:e.breakAfter)&&(d?d.breakAfter=1:a=1),r++}for(u&&(u.breakAfter=a,n>0&&(!a&&i.length&&u.merge(n,u.length,i[0],!1,s,0)?u.breakAfter=i.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,s,0),t++));t<r&&i.length;)if(c[r-1].become(i[i.length-1]))r--,i.pop(),l=i.length?0:s;else{if(!c[t].become(i[0]))break;t++,i.shift(),s=i.length?0:l}!i.length&&t&&r<c.length&&!c[t-1].breakAfter&&c[r].merge(0,0,c[t-1],!1,s,l)&&t--,(t<r||i.length)&&e.replaceChildren(t,r,i)}}function pR(e,t,n,r,o,i){let a=e.childCursor(),{i:s,off:l}=a.findPos(n,1),{i:c,off:u}=a.findPos(t,-1),d=t-n;for(let e of r)d+=e.length;e.length+=d,dR(e,c,u,s,l,r,0,o,i)}let hR="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},fR="undefined"!=typeof document?document:{documentElement:{style:{}}};const mR=/Edge\/(\d+)/.exec(hR.userAgent),gR=/MSIE \d/.test(hR.userAgent),vR=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hR.userAgent),yR=!!(gR||vR||mR),bR=!yR&&/gecko\/(\d+)/i.test(hR.userAgent),wR=!yR&&/Chrome\/(\d+)/.exec(hR.userAgent),kR="webkitFontSmoothing"in fR.documentElement.style,ER=!yR&&/Apple Computer/.test(hR.vendor),OR=ER&&(/Mobile\/\w+/.test(hR.userAgent)||hR.maxTouchPoints>2);var SR={mac:OR||/Mac/.test(hR.platform),windows:/Win/.test(hR.platform),linux:/Linux|X11/.test(hR.platform),ie:yR,ie_version:gR?fR.documentMode||6:vR?+vR[1]:mR?+mR[1]:0,gecko:bR,gecko_version:bR?+(/Firefox\/(\d+)/.exec(hR.userAgent)||[0,0])[1]:0,chrome:!!wR,chrome_version:wR?+wR[1]:0,ios:OR,android:/Android\b/.test(hR.userAgent),webkit:kR,safari:ER,webkit_version:kR?+(/\bAppleWebKit\/(\d+)/.exec(hR.userAgent)||[0,0])[1]:0,tabSize:null!=fR.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class xR extends lR{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof xR)||this.length-(t-e)+n.length>256||8&n.flags)||(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),0))}split(e){let t=new xR(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new aR(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let o=t,i=t,a=0;0==t&&n<0||t==r&&n>=0?SR.chrome||SR.gecko||(t?(o--,a=1):i<r&&(i++,a=-1)):n<0?o--:i<r&&i++;let s=eR(e,o,i).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return SR.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,e=>e.width)||l),a?$I(l,a<0):l||null}(this.dom,e,t)}}class _R extends lR{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(nR(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof _R&&n.mark.eq(this.mark))||e&&o<=0||t<this.length&&i<=0)||(pR(this,e,t,n?n.children.slice():[],o-1,i-1),this.markDirty(),0))}split(e){let t=[],n=0,r=-1,o=0;for(let i of this.children){let a=n+i.length;a>e&&t.push(n<e?i.split(e-n):i),r<0&&n>=e&&(r=o),n=a,o++}let i=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new _R(this.mark,t,i)}domAtPos(e){return TR(this,e)}coordsAt(e,t){return DR(this,e,t)}}class CR extends lR{static create(e,t,n){return new CR(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=CR.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof CR&&this.widget.compare(n.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(n?n.length:0)+(this.length-t),0))}become(e){return e instanceof CR&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return YN.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):YN.empty}domAtPos(e){return(this.length?0==e:this.side>0)?aR.before(this.dom):aR.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?r.length-1:0;o=r[t],!(e>0?0==t:t==r.length-1||o.top<o.bottom);t+=i?-1:1);return $I(o,!i)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class PR extends lR{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof PR&&e.side==this.side}split(){return new PR(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?aR.before(this.dom):aR.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return YN.empty}get isHidden(){return!0}}function TR(e,t){let n=e.dom,{children:r}=e,o=0;for(let e=0;o<r.length;o++){let i=r[o],a=e+i.length;if(!(a==e&&i.getSide()<=0)){if(t>e&&t<a&&i.dom.parentNode==n)return i.domAtPos(t-e);if(t<=e)break;e=a}}for(let e=o;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=o;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new aR(n,0)}function AR(e,t,n){let r,{children:o}=e;n>0&&t instanceof _R&&o.length&&(r=o[o.length-1])instanceof _R&&r.mark.eq(t.mark)?AR(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function DR(e,t,n){let r=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,c=0;l<t.children.length&&c<=s;l++){let u=t.children[l],d=c+u.length;d>=s&&(u.children.length?e(u,s-c):(!i||i.isHidden&&(n>0||MR(i,u)))&&(d>s||c==d&&u.getSide()>0)?(i=u,a=s-c):(c<s||c==d&&u.getSide()<0&&!u.isHidden)&&(r=u,o=s-c)),c=d}}(e,t);let s=(n<0?r:i)||r||i;return s?s.coordsAt(Math.max(0,s==r?o:a),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=UI(t);return n[n.length-1]||null}(e)}function MR(e,t){let n=e.coordsAt(0,1),r=t.coordsAt(0,1);return n&&r&&r.top<n.bottom}function NR(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}xR.prototype.children=CR.prototype.children=PR.prototype.children=sR;const LR=Object.create(null);function IR(e,t,n){if(e==t)return!0;e||(e=LR),t||(t=LR);let r=Object.keys(e),o=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function RR(e,t,n){let r=!1;if(t)for(let o in t)n&&o in n||(r=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function jR(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}class FR{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var zR=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(zR||(zR={}));class BR extends lI{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new UR(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new WR(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:o,end:i}=HR(e,r);t=(o?r?-3e8:-1:5e8)-1,n=1+(i?r?2e8:1:-6e8)}return new WR(e,t,n,r,e.widget||null,!0)}static line(e){return new VR(e)}static set(e,t=!1){return pI.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}BR.none=pI.empty;class UR extends BR{constructor(e){let{start:t,end:n}=HR(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof UR&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&IR(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}UR.prototype.point=!1;class VR extends BR{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof VR&&this.spec.class==e.spec.class&&IR(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}VR.prototype.mapMode=uL.TrackBefore,VR.prototype.point=!0;class WR extends BR{constructor(e,t,n,r,o,i){super(t,n,o,e),this.block=r,this.isReplace=i,this.mapMode=r?t<=0?uL.TrackBefore:uL.TrackAfter:uL.TrackDel}get type(){return this.startSide!=this.endSide?zR.WidgetRange:this.startSide<=0?zR.WidgetBefore:zR.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof WR&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function HR(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function QR(e,t,n,r=0){let o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}WR.prototype.point=!0;class qR extends lR{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,o,i){if(n){if(!(n instanceof qR))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),pR(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let t=new qR;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){IR(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){AR(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=NR(t,this.attrs||{})),n&&(this.attrs=NR({class:n},this.attrs||{}))}domAtPos(e){return TR(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(nR(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(RR(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&lR.get(r)instanceof _R;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=lR.get(r))||void 0===n?void 0:n.isEditable)||SR.ios&&this.children.some(e=>e instanceof xR)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof xR)||/[^ -~]/.test(n.text))return null;let r=UI(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=DR(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight<t){let r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return e instanceof qR&&0==this.children.length&&0==e.children.length&&IR(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let o=e.children[n],i=r+o.length;if(i>=t){if(o instanceof qR)return o;if(i>t)break}r=i+o.breakAfter}return null}}class $R extends lR{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,o,i){return!(n&&(!(n instanceof $R&&this.widget.compare(n.widget))||e>0&&o<=0||t<this.length&&i<=0)||(this.length=e+(n?n.length:0)+(this.length-t),0))}domAtPos(e){return 0==e?aR.before(this.dom):aR.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new $R(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return sR}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):YN.empty}domBoundsAround(){return null}become(e){return e instanceof $R&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)||(this.widget instanceof GR?null:$I(this.dom.getBoundingClientRect(),this.length?0==e:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}class GR extends FR{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class YR{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof $R&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new qR),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(XR(new PR(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof $R||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(XR(new xR(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof WR){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof WR)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new $R(n.widget||KR.block,a,n));else{let i=CR.create(n.widget||KR.inline,a,a?0:n.startSide),s=this.atCursorPos&&!i.isEditable&&o<=r.length&&(e<t||n.startSide>0),l=!i.isEditable&&(e<t||o>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(c.append(XR(new PR(1),r),o),o=r.length+Math.max(0,o-r.length)),c.append(XR(i,r),o),this.atCursorPos=l,this.pendingBuffer=l?e<t||o>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=o)}static build(e,t,n,r,o){let i=new YR(e,t,n,o);return i.openEnd=pI.spans(r,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function XR(e,t){for(let n of t)e=new _R(n,[e],e.length);return e}class KR extends FR{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}KR.inline=new KR("span"),KR.block=new KR("div");var ZR=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(ZR||(ZR={}));const JR=ZR.LTR,ej=ZR.RTL;function tj(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const nj=tj("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),rj=tj("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),oj=Object.create(null),ij=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);oj[t]=n,oj[n]=-t}function aj(e){return e<=247?nj[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?rj[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const sj=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class lj{get dir(){return this.level%2?ej:JR}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let o=-1;for(let i=0;i<e.length;i++){let a=e[i];if(a.from<=t&&a.to>=t){if(a.level==n)return i;(o<0||(0!=r?r<0?a.from<t:a.to>t:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}function cj(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],o=t[n];if(r.from!=o.from||r.to!=o.to||r.direction!=o.direction||!cj(r.inner,o.inner))return!1}return!0}const uj=[];function dj(e,t,n,r,o,i,a){let s=r%2?2:1;if(r%2==o%2)for(let l=t,c=0;l<n;){let t=!0,u=!1;if(c==i.length||l<i[c].from){let e=uj[l];e!=s&&(t=!1,u=16==e)}let d=t||1!=s?null:[],p=t?r:r+1,h=l;e:for(;;)if(c<i.length&&h==i[c].from){if(u)break e;let f=i[c];if(!t)for(let e=f.to,t=c+1;;){if(e==n)break e;if(!(t<i.length&&i[t].from==e)){if(uj[e]==s)break e;break}e=i[t++].to}c++,d?d.push(f):(f.from>l&&a.push(new lj(l,f.from,p)),pj(e,f.direction==JR!=!(p%2)?r+1:r,o,f.inner,f.from,f.to,a),l=f.to),h=f.to}else{if(h==n||(t?uj[h]!=s:uj[h]==s))break;h++}d?dj(e,l,h,r+1,o,d,a):l<h&&a.push(new lj(l,h,p)),l=h}else for(let l=n,c=i.length;l>t;){let n=!0,u=!1;if(!c||l>i[c-1].to){let e=uj[l-1];e!=s&&(n=!1,u=16==e)}let d=n||1!=s?null:[],p=n?r:r+1,h=l;e:for(;;)if(c&&h==i[c-1].to){if(u)break e;let f=i[--c];if(!n)for(let e=f.from,n=c;;){if(e==t)break e;if(!n||i[n-1].to!=e){if(uj[e-1]==s)break e;break}e=i[--n].from}d?d.push(f):(f.to<l&&a.push(new lj(f.to,l,p)),pj(e,f.direction==JR!=!(p%2)?r+1:r,o,f.inner,f.from,f.to,a),l=f.from),h=f.from}else{if(h==t||(n?uj[h-1]!=s:uj[h-1]==s))break;h--}d?dj(e,h,l,r+1,o,d,a):h<l&&a.push(new lj(h,l,p)),l=h}}function pj(e,t,n,r,o,i,a){let s=t%2?2:1;!function(e,t,n,r,o){for(let i=0;i<=r.length;i++){let a=i?r[i-1].to:t,s=i<r.length?r[i].from:n,l=i?256:o;for(let t=a,n=l,r=l;t<s;t++){let o=aj(e.charCodeAt(t));512==o?o=n:8==o&&4==r&&(o=16),uj[t]=4==o?2:o,7&o&&(r=o),n=o}for(let e=a,t=l,r=l;e<s;e++){let o=uj[e];if(128==o)e<s-1&&t==uj[e+1]&&24&t?o=uj[e]=t:uj[e]=256;else if(64==o){let o=e+1;for(;o<s&&64==uj[o];)o++;let i=e&&8==t||o<n&&8==uj[o]?1==r?1:8:256;for(let t=e;t<o;t++)uj[t]=i;e=o-1}else 8==o&&1==r&&(uj[e]=1);t=o,7&o&&(r=o)}}}(e,o,i,r,s),function(e,t,n,r,o){let i=1==o?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let c=a?r[a-1].to:t,u=a<r.length?r[a].from:n;for(let t,n,r,a=c;a<u;a++)if(n=oj[t=e.charCodeAt(a)])if(n<0){for(let e=s-3;e>=0;e-=3)if(ij[e+1]==-n){let t=ij[e+2],n=2&t?o:4&t?1&t?i:o:0;n&&(uj[a]=uj[ij[e]]=n),s=e;break}}else{if(189==ij.length)break;ij[s++]=a,ij[s++]=t,ij[s++]=l}else if(2==(r=uj[a])||1==r){let e=r==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let n=ij[t+2];if(2&n)break;if(e)ij[t+2]|=2;else{if(4&n)break;ij[t+2]|=4}}}}}(e,o,i,r,s),function(e,t,n,r){for(let o=0,i=r;o<=n.length;o++){let a=o?n[o-1].to:e,s=o<n.length?n[o].from:t;for(let l=a;l<s;){let a=uj[l];if(256==a){let a=l+1;for(;;)if(a==s){if(o==n.length)break;a=n[o++].to,s=o<n.length?n[o].from:t}else{if(256!=uj[a])break;a++}let c=1==i,u=c==(1==(a<t?uj[a]:r))?c?1:2:r;for(let t=a,r=o,i=r?n[r-1].to:e;t>l;)t==i&&(t=n[--r].from,i=r?n[r-1].to:e),uj[--t]=u;l=a}else i=a,l++}}}(o,i,r,s),dj(e,o,i,t,n,r,a)}function hj(e){return[new lj(0,e,0)]}let fj="";function mj(e,t,n,r,o){var i;let a=r.head-e.from,s=lj.find(t,a,null!==(i=r.bidiLevel)&&void 0!==i?i:-1,r.assoc),l=t[s],c=l.side(o,n);if(a==c){let e=s+=o?1:-1;if(e<0||e>=t.length)return null;l=t[s=e],a=l.side(!o,n),c=l.side(o,n)}let u=iL(e.text,a,l.forward(o,n));(u<l.from||u>l.to)&&(u=c),fj=e.text.slice(Math.min(a,u),Math.max(a,u));let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d&&u==c&&d.level+(o?0:1)<l.level?wL.cursor(d.side(!o,n)+e.from,d.forward(o,n)?1:-1,d.level):wL.cursor(u+e.from,l.forward(o,n)?-1:1,l.level)}function gj(e,t,n){for(let r=t;r<n;r++){let t=aj(e.charCodeAt(r));if(1==t)return JR;if(2==t||4==t)return ej}return JR}const vj=OL.define(),yj=OL.define(),bj=OL.define(),wj=OL.define(),kj=OL.define(),Ej=OL.define(),Oj=OL.define(),Sj=OL.define(),xj=OL.define(),_j=OL.define({combine:e=>e.some(e=>e)}),Cj=OL.define({combine:e=>e.some(e=>e)}),Pj=OL.define();class Tj{constructor(e,t="nearest",n="nearest",r=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new Tj(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Tj(wL.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Aj=YL.define({map:(e,t)=>e.map(t)}),Dj=YL.define();function Mj(e,t,n){let r=e.facet(wj);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}const Nj=OL.define({combine:e=>!e.length||e[0]});let Lj=0;const Ij=OL.define({combine:e=>e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})});class Rj{constructor(e,t,n,r,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=o(this),this.extension=this.baseExtensions.concat(Ij.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Ij.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:o,decorations:i}=t||{};return new Rj(Lj++,e,n,r,e=>{let t=[];return i&&t.push(Bj.of(t=>{let n=t.plugin(e);return n?i(n):BR.none})),o&&t.push(o(e)),t})}static fromClass(e,t){return Rj.define((t,n)=>new e(t,n),t)}}class jj{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Mj(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Mj(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Mj(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Fj=OL.define(),zj=OL.define(),Bj=OL.define(),Uj=OL.define(),Vj=OL.define(),Wj=OL.define();function Hj(e,t){let n=e.state.facet(Wj);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),o=[];return pI.spans(r,t.from,t.to,{point(){},span(e,n,r,i){let a=e-t.from,s=n-t.from,l=o;for(let e=r.length-1;e>=0;e--,i--){let n,o=r[e].spec.bidiIsolate;if(null==o&&(o=gj(t.text,a,s)),i>0&&l.length&&(n=l[l.length-1]).to==a&&n.direction==o)n.to=s,l=n.inner;else{let e={from:a,to:s,direction:o,inner:[]};l.push(e),l=e.inner}}}}),o}const Qj=OL.define();function qj(e){let t=0,n=0,r=0,o=0;for(let i of e.state.facet(Qj)){let a=i(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(n=Math.max(n,a.right)),null!=a.top&&(r=Math.max(r,a.top)),null!=a.bottom&&(o=Math.max(o,a.bottom)))}return{left:t,right:n,top:r,bottom:o}}const $j=OL.define();class Gj{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new Gj(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,o=0,i=0,a=0;;r++){let s=r==e.length?null:e[r],l=i-a,c=s?s.fromB:1e9;for(;o<t.length&&t[o]<c;){let e=t[o],r=t[o+1],i=Math.max(a,e),s=Math.min(c,r);if(i<=s&&new Gj(i+l,s+l,i,s).addToSet(n),r>c)break;o+=2}if(!s)return n;new Gj(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),i=s.toA,a=s.toB}}}class Yj{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=pL.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,o)=>r.push(new Gj(e,t,n,o))),this.changedRanges=r}static create(e,t,n){return new Yj(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}class Xj extends lR{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=BR.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new qR],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Gj(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let o=r>-1?function(e,t,n){let r=Kj(e,n);if(!r)return null;let{node:o,from:i,to:a}=r,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;let l=t.invertedDesc,c=new Gj(l.mapPos(i),l.mapPos(a),i,a),u=[];for(let t=o.parentNode;;t=t.parentNode){let n=lR.get(t);if(n instanceof _R)u.push({node:t,deco:n.mark});else{if(n instanceof qR||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:o,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new UR({inclusive:!0,attributes:jR(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new Gj(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(SR.ie||SR.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,n){let r=new Zj;return pI.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=Gj.extendWithRanges(n,i),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=SR.chrome||SR.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof $R&&e.widget instanceof GR&&o.push(e.dom);r.updateGaps(o)}updateChildren(e,t,n){let r=n?n.range.addToSet(e.slice()):e,o=this.childCursor(t);for(let e=r.length-1;;e--){let t=e>=0?r[e]:null;if(!t)break;let i,a,s,l,{fromA:c,toA:u,fromB:d,toB:p}=t;if(n&&n.range.fromB<p&&n.range.toB>d){let e=YR.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=YR.build(this.view.state.doc,n.range.toB,p,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),i=e.content.concat(r).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=YR.build(this.view.state.doc,d,p,this.decorations,this.dynamicDecorationMap));let{i:h,off:f}=o.findPos(u,1),{i:m,off:g}=o.findPos(c,-1);dR(this,m,g,h,f,i,a,s,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Dj)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new xR(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new _R(n,[t],t.length);let n=new qR;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some(e=>7&e.flags)?1:0),this.markedForComposition.add(t);let n=lR.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let o=e.marks.length-1;o>=-1;o--)n=r.childPos(n.off,1),r=r.children[n.i],t(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,o=!r&&!(this.view.state.facet(Nj)||this.dom.tabIndex>-1)&&BI(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||o))return;let i=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(SR.gecko&&a.empty&&!this.hasComposition&&1==(c=s).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null)),s=l=new aR(e,0),i=!0}var c;let u=this.view.observer.selectionRange;!i&&u.focusNode&&(VI(s.node,s.offset,u.anchorNode,u.anchorOffset)&&VI(l.node,l.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,a))||(this.view.observer.ignore(()=>{SR.android&&SR.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=FI(this.view.root);if(e)if(a.empty){if(SR.gecko){let e=function(e,t){return 1!=e.nodeType?0:(t&&"false"==e.childNodes[t-1].contentEditable?1:0)|(t<e.childNodes.length&&"false"==e.childNodes[t].contentEditable?2:0)}(s.node,s.offset);if(e&&3!=e){let t=(1==e?oR:iR)(s.node,s.offset);t&&(s=new aR(t.node,t.offset))}}e.collapse(s.node,s.offset),null!=a.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=a.bidiLevel)}else if(e.extend){e.collapse(s.node,s.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();a.anchor>a.head&&([s,l]=[l,s]),t.setEnd(l.node,l.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new aR(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new aR(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&VI(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=FI(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let i=qR.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,o)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r<n.childNodes.length;r++){let e=lR.get(n.childNodes[r]);e instanceof qR&&(t=e.domAtPos(0))}for(let r=e.offset-1;!t&&r>=0;r--){let e=lR.get(n.childNodes[r]);e instanceof qR&&(t=e.domAtPos(e.length))}return t?new aR(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=lR.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof qR)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,r=0;for(let o=this.length,i=this.children.length-1;i>=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(s<e)break;if(l<=e&&(l<e||a.covers(-1))&&(s>e||a.covers(1))&&(!n||a instanceof qR&&!(n instanceof qR&&t>=0)))n=a,r=l;else if(n&&l==e&&s==e&&a instanceof $R&&Math.abs(t)<2){if(a.deco.startSide<0)break;i&&(n=null)}o=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof qR))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof xR))return null;let o=iL(r.text,n);if(o==n)return null;let i=eR(r.dom,n,o).getClientRects();for(let e=0;e<i.length;e++){let t=i[e];if(e==i.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,o=this.view.contentDOM.clientWidth,i=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==ZR.LTR;for(let e=0,l=0;l<this.children.length;l++){let c=this.children[l],u=e+c.length;if(u>r)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),i){let t=c.dom.lastChild,r=t?UI(t):[];if(r.length){let t=r[r.length-1],i=s?t.right-n.left:n.right-t.left;i>a&&(a=i,this.minWidth=o,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?ZR.RTL:ZR.LTR}measureTextSize(){for(let e of this.children)if(e instanceof qR){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let o=UI(r.firstChild)[0];e=r.getBoundingClientRect().height,t=o?o.width/27:7,n=o?o.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new uR(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){let r=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(BR.replace({widget:new GR(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return BR.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Bj).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,r=this.view.state.facet(Uj).map((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(pI.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}for(let t of this.view.state.facet(Pj))try{if(t(this.view,e.range,e))return!0}catch(e){Mj(this.view.state,e,"scroll handler")}let t,{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let o=qj(this.view),i={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,r,o,i,a,s){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,p=u==l.body,h=1,f=1;if(p)e=GI(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:h,scaleY:f}=YI(u,t)),e={left:t.left,right:t.left+u.clientWidth*h,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top<e.top?(g=t.top-(e.top+a),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,n<0&&t.top-g<e.top&&(g=t.top-(e.top+a)));else{let r=t.bottom-t.top,i=e.bottom-e.top;g=("center"==o&&r<=i?t.top+r/2-i/2:"start"==o||"center"==o&&n<0?t.top-a:t.bottom-i+a)-e.top}if("nearest"==r?t.left<e.left?(m=t.left-(e.left+i),n>0&&t.right>e.right+m&&(m=t.right-e.right+i)):t.right>e.right&&(m=t.right-e.right+i,n<0&&t.left<e.left+m&&(m=t.left-(e.left+i))):m=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==s?t.left-i:t.right-(e.right-e.left)+i)-e.left,m||g)if(p)c.scrollBy(m,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/f,n=(u.scrollTop-e)*f}if(m){let t=u.scrollLeft;u.scrollLeft+=m/h,e=(u.scrollLeft-t)*h}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-m)<1&&(r="nearest"),n&&Math.abs(n-g)<1&&(o="nearest")}if(p)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,i,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==ZR.LTR)}}function Kj(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=oR(n.focusNode,n.focusOffset),o=iR(n.focusNode,n.focusOffset),i=r||o;if(o&&r&&o.node!=r.node){let t=lR.get(o.node);if(!t||t instanceof xR&&t.text!=o.node.nodeValue)i=o;else if(e.docView.lastCompositionAfterCursor){let e=lR.get(r.node);!e||e instanceof xR&&e.text!=r.node.nodeValue||(i=o)}}if(e.docView.lastCompositionAfterCursor=i!=r,!i)return null;let a=t-i.offset;return{from:a,to:a+i.node.nodeValue.length,node:i.node}}let Zj=class{constructor(){this.changes=[]}compareRange(e,t){QR(e,t,this.changes)}comparePoint(e,t){QR(e,t,this.changes)}boundChange(e){QR(e,e,this.changes)}};function Jj(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function eF(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function tF(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function nF(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function rF(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function oF(e,t,n){let r,o,i,a,s,l,c,u,d=!1;for(let p=e.firstChild;p;p=p.nextSibling){let e=UI(p);for(let h=0;h<e.length;h++){let f=e[h];o&&tF(o,f)&&(f=nF(rF(f,o.bottom),o.top));let m=Jj(t,f),g=eF(n,f);if(0==m&&0==g)return 3==p.nodeType?iF(p,t,n):oF(p,t,n);(!r||a>g||a==g&&i>m)&&(r=p,o=f,i=m,a=g,d=!m||(t<f.left?h>0:h<e.length-1)),0==m?n>f.bottom&&(!c||c.bottom<f.bottom)?(s=p,c=f):n<f.top&&(!u||u.top>f.top)&&(l=p,u=f):c&&tF(c,f)?c=rF(c,f.bottom):u&&tF(u,f)&&(u=nF(u,f.top))}}if(c&&c.bottom>=n?(r=s,o=c):u&&u.top<=n&&(r=l,o=u),!r)return{node:e,offset:0};let p=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?iF(r,p,n):d&&"false"!=r.contentEditable?oF(r,p,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function iF(e,t,n){let r=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;s<r;s++){let r=eR(e,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;a||(a=t-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u<i){let n=t>=(c.left+c.right)/2,r=n;if((SR.chrome||SR.gecko)&&eR(e,s).getBoundingClientRect().left==c.right&&(r=!n),u<=0)return{node:e,offset:s+(r?1:0)};o=s+(r?1:0),i=u}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function aF(e,t,n,r=-1){var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,p=d-l;if(p<0)return 0;if(p>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(p),a.type!=zR.Text;)for(;p=r>0?a.bottom+t:a.top-t,!(p>=0&&p<=c);){if(o)return n?null:0;o=!0,r=-r}d=l+p;let h=a.from;if(h<e.viewport.from)return 0==e.viewport.from?0:n?null:sF(e,s,a,u,d);if(h>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:sF(e,s,a,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(s.left+1,Math.min(s.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let v,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:v,offset:y}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:v,startOffset:y}=t),(!e.contentDOM.contains(v)||SR.safari&&function(e,t,n){let r,o=e;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(;;){let e=o.nextSibling;if(e){if("BR"==e.nodeName)break;return!1}{let e=o.parentNode;if(!e||"DIV"==e.nodeName)break;o=e}}return eR(e,r-1,r).getBoundingClientRect().right>n}(v,y,u)||SR.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return n-(1==e.nodeType?e.getBoundingClientRect():eR(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(v,y,u))&&(v=void 0))}v&&(y=Math.min(qI(v),y))}if(!v||!e.docView.dom.contains(v)){let t=qR.find(e.docView,h);if(!t)return p>a.top+a.height/2?a.to:a.from;({node:v,offset:y}=oF(t.dom,u,d))}let b=e.docView.nearest(v);if(!b)return null;if(b.isWidget&&1==(null===(i=b.dom)||void 0===i?void 0:i.nodeType)){let e=b.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?b.posAtStart:b.posAtEnd}return b.localPosFromDOM(v,y)+b.posAtStart}function sF(e,t,n,r,o){let i=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+xI(a,i,e.state.tabSize)}function lF(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let o of r.type){if(o.from>t)break;if(!(o.to<t)){if(o.from<t&&o.to>t)return o;e&&(o.type!=zR.Text||e.type==o.type&&!(n<0?o.from<t:o.to>t))||(e=o)}}return e||r}return r}function cF(e,t,n,r){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=mj(o,i,a,s,n),c=fj;if(!t){if(o.number==(n?e.state.doc.lines:1))return s;c="\n",o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),t=e.visualLineSide(o,!n)}if(l){if(!l(c))return s}else{if(!r)return t;l=r(c)}s=t}}function uF(e,t,n){for(;;){let r=0;for(let o of e)o.between(t-1,t+1,(e,o,i)=>{if(t>e&&t<o){let i=r||n||(t-e<o-t?-1:1);t=i<0?e:o,r=i}});if(!r)return t}}function dF(e,t,n){let r=uF(e.state.facet(Vj).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:wL.cursor(r,r<n.from?1:-1)}const pF="";class hF{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(aI.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=pF}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let o=r.nextSibling;if(o==t)break;let i=lR.get(r),a=lR.get(o);(i&&a?i.breakAfter:(i?i.breakAfter:HI(r))||HI(o)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){if(e.cmIgnore)return;let t=lR.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(fF(e,n.node,n.offset)?t:0))}}function fF(e,t,n){for(;;){if(!t||n<qI(t))return!1;if(t==e)return!0;n=WI(t)+1,t=t.parentNode}}class mF{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class gF{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:o,impreciseAnchor:i}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;return n&&(t.push(new mF(n,r)),o==n&&i==r||t.push(new mF(o,i))),t}(e),n=new hF(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?wL.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!zI(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!zI(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((SR.ios||SR.chrome)&&e.state.selection.main.empty&&n!=r&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,r),o=Math.max(n,r),i=a.from-t,s=a.to-o;0!=i&&1!=i&&0!=t||0!=s&&-1!=s&&o!=e.state.doc.length||(n=0,r=e.state.doc.length)}this.newSel=wL.single(r,n)}}}function vF(e,t){let n,{newSel:r}=t,o=e.state.selection.main,i=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:a}=t.bounds,s=o.from,l=null;(8===i||SR.android&&t.text.length<a-r)&&(s=o.to,l="end");let c=function(e,t,n,r){let o=Math.min(e.length,t.length),i=0;for(;i<o&&e.charCodeAt(i)==t.charCodeAt(i);)i++;if(i==o&&e.length==t.length)return null;let a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;return"end"==r&&(n-=a+Math.max(0,i-Math.min(a,s))-i),a<i&&e.length<t.length?(i-=n<=i&&n>=a?i-n:0,s=i+(s-a),a=i):s<i&&(i-=n<=i&&n>=s?i-n:0,a=i+(a-s),s=i),{from:i,toA:a,toB:s}}(e.state.doc.sliceString(r,a,pF),t.text,s-r,l);c&&(SR.chrome&&13==i&&c.toB==c.from+2&&t.text.slice(c.from,c.toB)==pF+pF&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:YN.of(t.text.slice(c.from,c.toB).split(pF))})}else r&&(!e.hasFocus&&e.state.facet(Nj)||r.main.eq(o))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!o.empty&&r&&r.main.empty?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,o.to)}:(SR.mac||SR.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=wL.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:YN.of([n.insert.toString().replace("."," ")])}):n&&n.from>=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:SR.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=wL.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:YN.of([" "])}),n)return yF(e,n,r,i);if(r&&!r.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function yF(e,t,n,r=-1){if(SR.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(SR.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&" "==e.state.sliceDoc(t.from,o.from))&&1==t.insert.length&&2==t.insert.lines&&tR(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.length<t.to-t.from&&t.to>o.head)&&tR(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&tR(e.contentDOM,"Delete",46)))return!0;let i,a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>i||(i=function(e,t,n){let r,o=e.state,i=o.selection.main;if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=i.from<t.from?o.sliceDoc(i.from,t.from):"",a=i.to>t.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=i.to&&t.to>=i.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&Kj(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to,p=i.to-i.from;r=o.changeByRange(n=>{if(n.from==i.from&&n.to==i.to)return{changes:a,range:s||n.map(a)};let r=n.to-d,u=r-c.length;if(n.to-n.from!=p||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let h=o.changes({from:u,to:r,insert:t.insert}),f=n.to-i.to;return{changes:h,range:s?wL.range(Math.max(0,s.anchor+f),Math.max(0,s.head+f)):n.map(h)}})}else r={changes:a,selection:s&&o.selection.replaceRange(s)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),o.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(Ej).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}class bF{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,SR.safari&&e.contentDOM.addEventListener("input",()=>null),SR.gecko&&function(e){qF.has(e)||(qF.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=lR.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=kF(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=n[e];i&&o!=!i.handlers.length&&(r.removeEventListener(e,this.handleEvent),i=null),i||r.addEventListener(e,this.handleEvent,{passive:o})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&SF.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),SR.android&&SR.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!SR.ios||e.synthetic||e.altKey||e.metaKey||!((t=EF.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||OF.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&!("Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,tR(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(SR.safari&&!SR.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function wF(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Mj(n.state,e)}}}function kF(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,o=e&&e.plugin.domEventObservers;if(r)for(let e in r){let o=r[e];o&&n(e).handlers.push(wF(t.value,o))}if(o)for(let e in o){let r=o[e];r&&n(e).observers.push(wF(t.value,r))}}for(let e in CF)n(e).handlers.push(CF[e]);for(let e in PF)n(e).observers.push(PF[e]);return t}const EF=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],OF="dthko",SF=[16,17,18,20,91,92,224,225];function xF(e){return.7*Math.max(0,e)+8}class _F{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t,n,r=e.ownerDocument;for(let o=e.parentNode;o&&!(o==r.body||t&&n);)if(1==o.nodeType)!n&&o.scrollHeight>o.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(Vj).map(t=>t(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(aI.allowMultipleSelections)&&function(e,t){let n=e.state.facet(vj);return n.length?n[0](t):SR.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=FI(e.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let e=0;e<o.length;e++){let n=o[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=BF(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(t=this.startEvent,n=e,Math.max(Math.abs(t.clientX-n.clientX),Math.abs(t.clientY-n.clientY))<10))return;var t,n;this.select(this.lastEvent=e);let r=0,o=0,i=0,a=0,s=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:a,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=qj(this.view);e.clientX-c.left<=i+6?r=-xF(i-e.clientX):e.clientX+c.right>=s-6&&(r=xF(e.clientX-s)),e.clientY-c.top<=a+6?o=-xF(a-e.clientY):e.clientY+c.bottom>=l-6&&(o=xF(e.clientY-l)),this.setScrollSpeed(r,o)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let r=e.ranges[n],o=null;if(r.empty){let e=uF(this.atoms,r.from,0);e!=r.from&&(o=wL.cursor(e,-1))}else{let e=uF(this.atoms,r.from,-1),t=uF(this.atoms,r.to,1);e==r.from&&t==r.to||(o=wL.range(r.from==r.anchor?e:t,r.from==r.head?e:t))}o&&(t||(t=e.ranges.slice()),t[n]=o)}return t?wL.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}const CF=Object.create(null),PF=Object.create(null),TF=SR.ie&&SR.ie_version<15||SR.ios&&SR.webkit_version<604;function AF(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function DF(e,t){t=AF(e.state,Sj,t);let n,{state:r}=e,o=1,i=r.toText(t),a=i.lines==r.selection.ranges.length;if(null!=VF&&r.selection.ranges.every(e=>e.empty)&&VF==i.toString()){let e=-1;n=r.changeByRange(n=>{let s=r.doc.lineAt(n.from);if(s.from==e)return{range:n};e=s.from;let l=r.toText((a?i.line(o++).text:t)+r.lineBreak);return{changes:{from:s.from,insert:l},range:wL.cursor(n.from+l.length)}})}else n=a?r.changeByRange(e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:wL.cursor(e.from+t.length)}}):r.replaceSelection(i);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function MF(e,t,n,r){if(1==r)return wL.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return wL.cursor(t);0==i?n=1:i==o.length&&(n=-1);let a=i,s=i;n<0?a=iL(o.text,i,!1):s=iL(o.text,i);let l=r(o.text.slice(a,s));for(;a>0;){let e=iL(o.text,a,!1);if(r(o.text.slice(e,a))!=l)break;a=e}for(;s<o.length;){let e=iL(o.text,s);if(r(o.text.slice(s,e))!=l)break;s=e}return wL.range(a+o.from,s+o.from)}(e.state,t,n);{let n=qR.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),o=n?n.posAtStart:r.from,i=n?n.posAtEnd:r.to;return i<e.state.doc.length&&i==r.to&&i++,wL.range(o,i)}}PF.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},CF.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),PF.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},PF.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},CF.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(bj))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=IF(e,t),r=BF(t),o=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get(t,i,a){let s,l=IF(e,t),c=MF(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!i){let t=MF(e,n.pos,n.bias,r),o=Math.min(t.from,c.from),i=Math.max(t.to,c.to);c=o<c.from?wL.range(o,i):wL.range(i,o)}return i?o.replaceRange(o.main.extend(c.from,c.to)):a&&1==r&&o.ranges.length>1&&(s=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:o}=e.ranges[n];if(r<=t&&o>=t)return wL.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(o,l.pos))?s:a?o.addRange(c):wL.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new _F(e,t,n,r)),r&&e.observer.ignore(()=>{JI(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}return!1};let NF=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function LF(e,t,n,r){let o=qR.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&NF(n,r,a))return-1;let s=o.coordsAt(i,1);return s&&NF(n,r,s)?1:a&&a.bottom>=r?-1:1}function IF(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:LF(e,n,t.clientX,t.clientY)}}const RF=SR.ie&&SR.ie_version<=11;let jF=null,FF=0,zF=0;function BF(e){if(!RF)return e.detail;let t=jF,n=zF;return jF=e,zF=Date.now(),FF=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(FF+1)%3:1}function UF(e,t,n,r){if(!(n=AF(e.state,Sj,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=r&&i&&function(e,t){let n=e.state.facet(yj);return n.length?n[0](t):SR.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:n},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}CF.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=wL.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",AF(e.state,xj,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},CF.dragend=e=>(e.inputState.draggedContent=null,!1),CF.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{++o==n.length&&UF(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=i,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return UF(e,t,n,!0),!0}return!1},CF.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=TF?null:t.clipboardData;return n?(DF(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),DF(e,n.value)},50)}(e),!1)};let VF=null;CF.copy=CF.cut=(e,t)=>{let{text:n,ranges:r,linewise:o}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let o=-1;for(let{from:r}of e.selection.ranges){let i=e.doc.lineAt(r);i.number>o&&(t.push(i.text),n.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}r=!0}return{text:AF(e,xj,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!o)return!1;VF=o?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=TF?null:t.clipboardData;return i?(i.clearData(),i.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const WF=qL.define();function HF(e,t){let n=[];for(let r of e.facet(Oj)){let o=r(e,t);o&&n.push(o)}return n.length?e.update({effects:n,annotations:WF.of(!0)}):null}function QF(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=HF(e.state,t);n?e.dispatch(n):e.update([])}},10)}PF.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),QF(e)},PF.blur=e=>{e.observer.clearSelectionRange(),QF(e)},PF.compositionstart=PF.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},PF.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,SR.chrome&&SR.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},PF.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},CF.beforeinput=(e,t)=>{var n,r;if("insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),o=t.getTargetRanges();if(r&&o.length){let t=o[0],n=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return yF(e,{from:n,to:i,insert:e.state.toText(r)},null),!0}}let o;if(SR.chrome&&SR.android&&(o=EF.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return SR.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),SR.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>PF.compositionend(e,t),20),!1};const qF=new Set,$F=["pre-wrap","normal","pre-line","break-spaces"];let GF=!1;function YF(){GF=!1}class XF{constructor(e){this.lineWrapping=e,this.doc=YN.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return $F.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,o,i){let a=$F.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=o,s){this.heightSamples={};for(let e=0;e<i.length;e++){let t=i[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return s}}class KF{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class ZF{constructor(e,t,n,r,o){this.from=e,this.length=t,this.top=n,this.height=r,this._content=o}get type(){return"number"==typeof this._content?zR.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof WR?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new ZF(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var JF=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(JF||(JF={}));const ez=.001;class tz{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>ez&&(GF=!0),this.height=e)}replace(e,t,n){return tz.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let o=this,i=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:c,toB:u}=r[a],d=o.lineAt(s,JF.ByPosNoHeight,n.setDoc(t),0,0),p=d.to>=l?d:o.lineAt(l,JF.ByPosNoHeight,n,0,0);for(u+=p.to-l,l=p.to;a>0&&d.from<=r[a-1].toA;)s=r[a-1].fromA,c=r[a-1].fromB,a--,s<d.from&&(d=o.lineAt(s,JF.ByPosNoHeight,n,0,0));c+=d.from-s,s=d.from;let h=lz.build(n.setDoc(i),e,c,u);o=nz(o,o.replace(s,l,h))}return o.updateHeight(n,0)}static empty(){return new oz(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,o=0;for(;;)if(t==n)if(r>2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,r-=o.size}else{if(!(o>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,o-=t.size}}else if(r<o){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(o+=t.size)}let i=0;return null==e[t-1]?(i=1,t--):null==e[t]&&(i=1,n++),new az(tz.of(e.slice(0,t)),i,tz.of(e.slice(n)))}}function nz(e,t){return e==t?e:(e.constructor!=t.constructor&&(GF=!0),t)}tz.prototype.size=1;class rz extends tz{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new ZF(r,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,r,o){return this.blockAt(0,n,r,o)}forEachLine(e,t,n,r,o,i){e<=o+this.length&&t>=o&&i(this.blockAt(0,n,r,o))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class oz extends rz{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new ZF(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof oz||r instanceof iz&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof iz?r=new oz(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):tz.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class iz extends tz{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-r+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);n=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:a}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let o=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),i=t.doc.lineAt(o),l=a+i.length*s,c=Math.max(n,e-l/2);return new ZF(i.from,i.length,c,l,0)}{let r=Math.max(0,Math.min(i-o,Math.floor((e-n)/a))),{from:s,length:l}=t.doc.line(o+r);return new ZF(s,l,n+a*r,a,0)}}lineAt(e,t,n,r,o){if(t==JF.ByHeight)return this.blockAt(e,n,r,o);if(t==JF.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new ZF(t,r-t,0,0,0)}let{firstLine:i,perLine:a,perChar:s}=this.heightMetrics(n,o),l=n.doc.lineAt(e),c=a+l.length*s,u=l.number-i,d=r+a*u+s*(l.from-o-u);return new ZF(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,0)}forEachLine(e,t,n,r,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(n,o);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-a;u+=s*n+l*(e-o-n)}let r=s+l*t.length;i(new ZF(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof iz?n[n.length-1]=new iz(e.length+r):n.push(null,new iz(r-1))}if(e>0){let t=n[0];t instanceof iz?n[0]=new iz(e+t.length):n.unshift(new iz(e-1),null)}return tz.of(n)}decomposeLeft(e,t){t.push(new iz(e-1),null)}decomposeRight(e,t){t.push(null,new iz(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],i=Math.max(t,r.from),a=-1;for(r.from>t&&n.push(new iz(r.from-t-1).updateHeight(e,t));i<=o&&r.more;){let t=e.doc.lineAt(i).length;n.length&&n.push(null);let o=r.heights[r.index++];-1==a?a=o:Math.abs(o-a)>=ez&&(a=-2);let s=new oz(t,o);s.outdated=!1,n.push(s),i+=t+1}i<=o&&n.push(null,new iz(o-i).updateHeight(e,i));let s=tz.of(n);return(a<0||Math.abs(s.height-this.height)>=ez||Math.abs(a-this.heightMetrics(e,t).perLine)>=ez)&&(GF=!0),nz(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class az extends tz{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let o=n+this.left.height;return e<o?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,o,r+this.left.length+this.break)}lineAt(e,t,n,r,o){let i=r+this.left.height,a=o+this.left.length+this.break,s=t==JF.ByHeight?e<i:e<a,l=s?this.left.lineAt(e,t,n,r,o):this.right.lineAt(e,t,n,i,a);if(this.break||(s?l.to<a:l.from>a))return l;let c=t==JF.ByPosNoHeight?JF.ByPosNoHeight:JF.ByPos;return s?l.join(this.right.lineAt(a,c,n,i,a)):this.left.lineAt(a,c,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let a=r+this.left.height,s=o+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,o,i),t>=s&&this.right.forEachLine(e,t,n,a,s,i);else{let l=this.lineAt(s,JF.ByPos,n,r,o);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,o,i),l.to>=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,i)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of n)o.push(e);if(e>0&&sz(o,i-1),t<this.length){let e=o.length;this.decomposeRight(t,o),sz(o,e)}return tz.of(o)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?tz.of(this.break?[e,null,t]:[e,t]):(this.left=nz(this.left,e),this.right=nz(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:o,right:i}=this,a=t+o.length+this.break,s=null;return r&&r.from<=t+o.length&&r.more?s=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=a+i.length&&r.more?s=i=i.updateHeight(e,a,n,r):i.updateHeight(e,a,n),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function sz(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof iz&&(r=e[t+1])instanceof iz&&e.splice(t-1,3,new iz(n.length+1+r.length))}class lz{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof oz?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new oz(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,o=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let i=t-e;n.block?this.addBlock(new rz(i,r,n)):(i||o||r>=5)&&this.addLineDeco(r,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new oz(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new iz(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof oz)return e;let t=new oz(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof oz||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new oz(0,-1));let n=e;for(let e of this.nodes)e instanceof oz&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let o=new lz(n,e);return pI.spans(t,n,r,o,0),o.finish(n)}}class cz{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&QR(e,t,this.changes,5)}}function uz(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,o=r.defaultView||window,i=Math.max(0,n.left),a=Math.min(o.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(o.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();i=Math.max(i,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(t==e.parentNode?o.innerHeight:l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}}function dz(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class pz{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],o=t[n];if(r.from!=o.from||r.to!=o.to||r.size!=o.size)return!1}return!0}draw(e,t){return BR.replace({widget:new hz(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class hz extends FR{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class fz{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=yz,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ZR.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(zj).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new XF(t),this.stateDeco=e.facet(Bj).filter(e=>"function"!=typeof e),this.heightMap=tz.empty().applyChanges(this.stateDeco,YN.empty,this.heightOracle.setDoc(e.doc),[new Gj(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=BR.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new mz(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?yz:new bz(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(wz(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(Bj).filter(e=>"function"!=typeof e);let r=e.changedRanges,o=Gj.extendWithRanges(r,function(e,t,n){let r=new cz;return pI.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:pL.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);YF(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=i||GF)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=i);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Cj)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?ZR.RTL:ZR.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,c=0;if(a.width&&a.height){let{scaleX:e,scaleY:n}=YI(t,a);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,i=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=rR(e.scrollDOM);let h=(this.printing?dz:uz)(t,this.paddingTop),f=h.top-this.pixelViewport.top,m=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}(e.dom))return 0;let v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(i=!0),i||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=n>0&&r.refresh(o,n,a,s,Math.max(5,v/a),t),i&&(e.docView.minWidth=0,l|=16)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),YF();for(let n of this.viewports){let o=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(i?tz.empty().applyChanges(this.stateDeco,YN.empty,this.heightOracle,[new Gj(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new KF(n.from,o))}GF&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new mz(r.lineAt(i-1e3*n,JF.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-n),JF.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,JF.ByPos,o,0,0);n="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e<s.from?a.top:a.bottom-i,s=new mz(r.lineAt(n-500,JF.ByHeight,o,0,0).from,r.lineAt(n+i+500,JF.ByHeight,o,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new mz(this.heightMap.lineAt(n,JF.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,JF.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,JF.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,JF.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:a}=this;return(0==e||r<=i-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||o>=a+Math.max(10,Math.min(n,250)))&&r>i-2e3&&o<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new pz(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,o=r>>1,i=r<<1;if(this.defaultTextDirection!=ZR.LTR&&!n)return[];let a=[],s=(r,i,l,c)=>{if(i-r<o)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<i)return s(r,e-10,l,c),void s(e+10,i,l,c);let p=function(e,t){for(let n of e)if(t(n))return n}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<o&&Math.abs(e.to-i)<o&&!d.some(t=>e.from<t&&e.to>t));if(!p){if(i<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=i&&e.to>=i)){let e=t.moveToLineBoundary(wL.cursor(i),!1,!0).head;e>r&&(i=e)}let e=this.gapSize(l,r,i,c);p=new pz(r,i,e,n||e<2e6?e:2e6)}a.push(p)},l=t=>{if(t.length<i||t.type!=zR.Text)return;let o=function(e,t,n){let r=[],o=e,i=0;return pI.spans(n,e,t,{span(){},point(e,t){e>o&&(r.push({from:o,to:e}),i+=e-o),o=t}},20),o<t&&(r.push({from:o,to:t}),i+=t-o),{total:i,ranges:r}}(t.from,t.to,this.stateDeco);if(o.total<i)return;let a,l,c=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,i=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=c){let r=vz(o,c),a=((this.visibleBottom-this.visibleTop)/2+i)/t.height;e=r-a,n=r+a}else e=(this.visibleTop-t.top-i)/t.height,n=(this.visibleBottom-t.top+i)/t.height;a=gz(o,e),l=gz(o,n)}else{let n=o.total*this.heightOracle.charWidth,i=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u,d,p=this.pixelViewport.left+s,h=this.pixelViewport.right+s;if(null!=c){let e=vz(o,c),t=((h-p)/2+i)/n;u=e-t,d=e+t}else u=(p-i)/n,d=(h+i)/n;a=gz(o,u),l=gz(o,d)}a>t.from&&s(t.from,a,t,o),l<t.to&&s(l,t.to,t,o)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return a}gapSize(e,t,n,r){let o=vz(r,n)-vz(r,t);return this.heightOracle.lineWrapping?e.height*o:r.total*this.heightOracle.charWidth*o}updateLineGaps(e){pz.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=BR.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];pI.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(8&r);t++){let o=this.visibleRanges[t],i=n[t];o.from==i.from&&o.to==i.to||(r|=4,e&&e.mapPos(o.from,-1)==i.from&&e.mapPos(o.to,1)==i.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||wz(this.heightMap.lineAt(e,JF.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||wz(this.heightMap.lineAt(this.scaler.fromDOM(e),JF.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return wz(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class mz{constructor(e,t){this.from=e,this.to=t}}function gz({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:o}=t[e],i=o-n;if(r<=i)return n+r;r-=i}}function vz(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}const yz={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class bz{constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map(({from:n,to:o})=>{let i=t.lineAt(n,JF.ByPos,e,0,0).top,a=t.lineAt(o,JF.ByPos,e,0,0).bottom;return r+=a-i,{from:n,to:o,top:i,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return r+(e-n)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);n=o.bottom,r=o.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return n+(e-r)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);n=o.bottom,r=o.domBottom}}eq(e){return e instanceof bz&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function wz(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new ZF(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>wz(e,t)):e._content)}const kz=OL.define({combine:e=>e.join(" ")}),Ez=OL.define({combine:e=>e.indexOf(!0)>-1}),Oz=TI.newName(),Sz=TI.newName(),xz=TI.newName(),_z={"&light":"."+Sz,"&dark":"."+xz};function Cz(e,t,n){return new TI(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t})}const Pz=Cz("."+Oz,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},_z),Tz={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Az=SR.ie&&SR.ie_version<=11;class Dz{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new XI,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(SR.ie&&SR.ie_version<=11||SR.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!SR.android||!1===e.constructor.EDIT_CONTEXT||SR.chrome&&SR.chrome_version<126||(this.editContext=new Lz(e),e.state.facet(Nj)&&(e.contentDOM.editContext=this.editContext.editContext)),Az&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Nj)?n.root.activeElement!=this.dom:!BI(this.dom,r))return;let o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(SR.ie&&SR.ie_version<=11||SR.android&&SR.chrome)&&!n.state.selection.main.empty&&r.focusNode&&VI(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=FI(e.root);if(!t)return!1;let n=SR.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Nz(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?Nz(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=BI(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,qI(n));;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=qI(n))}else{if(n==e)return!0;r=WI(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Tz),Az&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Az&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&tR(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let o of e){let e=this.readMutation(o);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&BI(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new gF(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=vF(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=Mz(t,e.previousSibling||e.target.previousSibling,-1),r=Mz(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Nj)!=e.state.facet(Nj)&&(e.view.contentDOM.editContext=e.state.facet(Nj)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Mz(e,t,n){for(;t;){let r=lR.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function Nz(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return VI(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}class Lz{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=t=>{let n=e.state.selection.main,{anchor:r,head:o}=n,i=this.toEditorPos(t.updateRangeStart),a=this.toEditorPos(t.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:t.updateRangeStart,editorBase:i,drifted:!1});let s={from:i,to:a,insert:YN.of(t.text.split("\n"))};if(s.from==this.from&&r<this.from?s.from=r:s.to==this.to&&r>this.to&&(s.to=r),s.from==s.to&&!s.insert.length){let r=wL.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd));return void(r.main.eq(n)||e.dispatch({selection:r,userEvent:"select"}))}if((SR.mac||SR.android)&&s.from==o-1&&/^\. ?$/.test(t.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(s={from:i,to:a,insert:YN.of([t.text.replace("."," ")])}),this.pendingContextChange=s,!e.state.readOnly){let n=this.to-this.from+(s.to-s.from+s.insert.length);yF(e,s,wL.single(this.toEditorPos(t.selectionStart,n),this.toEditorPos(t.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let r=[],o=null;for(let t=this.toEditorPos(n.rangeStart),i=this.toEditorPos(n.rangeEnd);t<i;t++){let n=e.coordsForChar(t);o=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||o||new DOMRect,r.push(o)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if("None"!=t&&"None"!=r){let o=this.toEditorPos(e.rangeStart),i=this.toEditorPos(e.rangeEnd);if(o<i){let e=`text-decoration: underline ${"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${"Thin"==r?1:2}px`;n.push(BR.mark({attributes:{style:e}}).range(o,i))}}}e.dispatch({effects:Dj.of(BR.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=FI(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((o,i,a,s,l)=>{if(n)return;let c=l.length-(i-o);if(r&&i>=r.to){if(r.from==o&&r.to==i&&r.insert.eq(l))return r=this.pendingContextChange=null,t+=c,void(this.to+=c);r=null,this.revertPending(e.state)}if(o+=t,(i+=t)<=this.from)this.from+=c,this.to+=c;else if(o<this.to){if(o<this.from||i>this.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),l.toString()),this.to+=c}t+=c}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==r||this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Iz{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new fz(e.state||aI.create(e)),e.scrollTo&&e.scrollTo.is(Aj)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ij).map(e=>new jj(e));for(let e of this.plugins)e.update(this);this.observer=new Dz(this),this.inputState=new bF(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Xj(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=1==e.length&&e[0]instanceof XL?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let i=this.hasFocus,a=0,s=null;e.some(e=>e.annotation(WF))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=HF(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(aI.phrases)!=this.state.facet(aI.phrases))return this.setState(o);t=Yj.create(this,o,e),t.flags|=a;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new Tj(e.empty?e:wL.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Aj)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=Fz.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet($j)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(kz)!=t.state.facet(kz)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(kj))try{e(t)}catch(e){Mj(this.state,e,"update listener")}(s||c)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),c&&!vF(this,c)&&l.force&&tR(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new fz(e),this.plugins=e.facet(Ij).map(e=>new jj(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Xj(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Ij),n=e.state.facet(Ij);if(t!=n){let r=[];for(let o of n){let n=t.indexOf(o);if(n<0)r.push(new jj(o));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){Mj(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(rR(n))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);o=e.from,i=e.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map(e=>{try{return e.read(this)}catch(e){return Mj(this.state,e),jz}}),c=Yj.create(this,this.state,[]),u=!1;c.flags|=a,t?t.flags|=a:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(l[e]!=jz)try{let t=s[e];t.write&&t.write(l[e],this)}catch(e){Mj(this.state,e)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,i=-1;continue}{let e=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-i;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(kj))e(t)}get themeClasses(){return Oz+" "+(this.state.facet(Ez)?xz:Sz)+" "+this.state.facet(kz)}updateAttrs(){let e=zz(this,Fj,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Nj)?"true":"false",class:"cm-content",style:`${SR.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),zz(this,zj,t);let n=this.observer.ignore(()=>{let n=RR(this.contentDOM,this.contentAttrs,t),r=RR(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)e.is(Iz.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet($j);let e=this.state.facet(Iz.cspNonce);TI.mount(this.root,this.styleModules.concat(Pz).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return dF(this,e,cF(this,e,t,n))}moveByGroup(e,t){return dF(this,e,cF(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),o=r(n);return e=>{let t=r(e);return o==rI.Space&&(o=t),o==t}}(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=n[t?n.length-1:0];return wL.cursor(o.side(t,r)+e.from,o.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let o=lF(e,t.head,t.assoc||-1),i=r&&o.type==zR.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(o.from),a=e.posAtCoords({x:n==(r==ZR.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return wL.cursor(a,n?-1:1)}return wL.cursor(n?o.to:o.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return dF(this,e,function(e,t,n,r){let o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return wL.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(o,t.assoc||-1),u=e.documentTop;if(c)null==s&&(s=c.left-l.left),a=i<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+u}let d=l.left+s,p=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=a+(p+t)*i,r=aF(e,{x:d,y:n},!1,i);if(n<l.top||n>l.bottom||(i<0?r<o:r>o)){let t=e.docView.coordsForChar(r),o=!t||n<t.top?-1:1;return wL.cursor(r,o,void 0,s)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),aF(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),o=this.bidiSpans(r);return $I(n,o[lj.find(o,e-r.from,-1,t)].dir==ZR.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(_j)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Rz)return hj(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||cj(r.isolates,t=Hj(this,e))))return r.order;t||(t=Hj(this,e));let r=function(e,t,n){if(!e)return[new lj(0,0,t==ej?1:0)];if(t==JR&&!n.length&&!sj.test(e))return hj(e.length);if(n.length)for(;e.length>uj.length;)uj[uj.length]=256;let r=[],o=t==JR?0:1;return pj(e,o,o,n,0,e.length,r),r}(e.text,n,t);return this.bidiCache.push(new Fz(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||SR.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{JI(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Aj.of(new Tj("number"==typeof e?wL.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Aj.of(new Tj(wL.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Rj.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Rj.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=TI.newName(),r=[kz.of(n),$j.of(Cz(`.${n}`,e))];return t&&t.dark&&r.push(Ez.of(!0)),r}static baseTheme(e){return ML.lowest($j.of(Cz("."+Oz,e,_z)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&lR.get(n)||lR.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}Iz.styleModule=$j,Iz.inputHandler=Ej,Iz.clipboardInputFilter=Sj,Iz.clipboardOutputFilter=xj,Iz.scrollHandler=Pj,Iz.focusChangeEffect=Oj,Iz.perLineTextDirection=_j,Iz.exceptionSink=wj,Iz.updateListener=kj,Iz.editable=Nj,Iz.mouseSelectionStyle=bj,Iz.dragMovesSelection=yj,Iz.clickAddsSelectionRange=vj,Iz.decorations=Bj,Iz.outerDecorations=Uj,Iz.atomicRanges=Vj,Iz.bidiIsolatedRanges=Wj,Iz.scrollMargins=Qj,Iz.darkTheme=Ez,Iz.cspNonce=OL.define({combine:e=>e.length?e[0]:""}),Iz.contentAttributes=zj,Iz.editorAttributes=Fj,Iz.lineWrapping=Iz.contentAttributes.of({class:"cm-lineWrapping"}),Iz.announce=YL.define();const Rz=4096,jz={};class Fz{constructor(e,t,n,r,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:ZR.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let i=e[o];i.dir!=r||t.touchesRange(i.from,i.to)||n.push(new Fz(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.isolates,!1,i.order))}return n}}function zz(e,t,n){for(let r=e.state.facet(t),o=r.length-1;o>=0;o--){let t=r[o],i="function"==typeof t?t(e):t;i&&NR(i,n)}return n}const Bz=SR.mac?"mac":SR.windows?"win":SR.linux?"linux":"key";function Uz(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const Vz=ML.default(Iz.domEventHandlers({keydown:(e,t)=>Yz(Qz(t.state),e,t,"editor")})),Wz=OL.define({enables:Vz}),Hz=new WeakMap;function Qz(e){let t=e.facet(Wz),n=Hz.get(t);return n||Hz.set(t,n=function(e,t=Bz){let n=Object.create(null),r=Object.create(null),o=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,r,i,a,s)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,o,i,a,s=n[n.length-1];"Space"==s&&(s=" ");for(let e=0;e<n.length-1;++e){const s=n[e];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))o=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);"mac"==t?a=!0:o=!0}}return r&&(s="Alt-"+s),o&&(s="Ctrl-"+s),a&&(s="Meta-"+s),i&&(s="Shift-"+s),s}(e,t));for(let t=1;t<d.length;t++){let n=d.slice(0,t).join(" ");o(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=qz={view:t,prefix:n,scope:e};return setTimeout(()=>{qz==r&&(qz=null)},$z),!0}]})}let p=d.join(" ");o(p,!1);let h=u[p]||(u[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});i&&h.run.push(i),a&&(h.preventDefault=!0),s&&(h.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=r;for(let t in e)e[t].run.push(e=>o(e,Gz))}let o=r[t]||r.key;if(o)for(let t of e)i(t,o,r.run,r.preventDefault,r.stopPropagation),r.shift&&i(t,"Shift-"+o,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let qz=null;const $z=4e3;let Gz=null;function Yz(e,t,n,r){Gz=t;let o=function(e){var t=!(LI&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||II&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?NI:MI)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=lL(aL(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,c=!1;qz&&qz.view==n&&qz.scope==r&&(a=qz.prefix+" ",SF.indexOf(t.keyCode)<0&&(l=!0,qz=null));let u,d,p=new Set,h=e=>{if(e){for(let t of e.run)if(!p.has(t)&&(p.add(t),t(n)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(h(f[a+Uz(o,t,!i)])?s=!0:!i||!(t.altKey||t.metaKey||t.ctrlKey)||SR.windows&&t.ctrlKey&&t.altKey||SR.mac&&t.altKey&&!t.ctrlKey||!(u=MI[t.keyCode])||u==o?i&&t.shiftKey&&h(f[a+Uz(o,t,!0)])&&(s=!0):(h(f[a+Uz(u,t,!0)])||t.shiftKey&&(d=NI[t.keyCode])!=o&&d!=u&&h(f[a+Uz(d,t,!1)]))&&(s=!0),!s&&h(f._any)&&(s=!0)),l&&(s=!0),s&&c&&t.stopPropagation(),Gz=null,s}class Xz{constructor(e,t,n,r,o){this.className=e,this.left=t,this.top=n,this.width=r,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let o=Kz(e);return[new Xz(t,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),o=Math.min(n.to,e.viewport.to),i=e.textDirection==ZR.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=Kz(e),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),p=s.right-(u?parseInt(u.paddingRight):0),h=lF(e,r,1),f=lF(e,o,-1),m=h.type==zR.Text?h:null,g=f.type==zR.Text?f:null;if(m&&(e.lineWrapping||h.widgetLineBreaks)&&(m=Zz(e,r,1,m)),g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=Zz(e,o,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return y(b(n.from,n.to,m));{let t=m?b(n.from,null,m):w(h,!1),r=g?b(null,n.to,g):w(f,!0),o=[];return(m||h).to<(g||f).from-(m&&g?1:0)||h.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?o.push(v(d,t.bottom,p,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==zR.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),y(t).concat(o).concat(y(r))}function v(e,n,r,o){return new Xz(t,e-l.left,n-l.top,r-e,o-n)}function y({top:e,bottom:t,horizontal:n}){let r=[];for(let o=0;o<n.length;o+=2)r.push(v(n[o],e,n[o+1],t));return r}function b(t,n,r){let o=1e9,a=-1e9,s=[];function l(t,n,l,c,u){let h=e.coordsAtPos(t,t==r.to?-2:2),f=e.coordsAtPos(l,l==r.from?2:-2);h&&f&&(o=Math.min(h.top,f.top,o),a=Math.max(h.bottom,f.bottom,a),u==ZR.LTR?s.push(i&&n?d:h.left,i&&c?p:f.right):s.push(!i&&c?d:f.left,!i&&n?p:h.right))}let c=null!=t?t:r.from,u=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>c&&r.from<u)for(let o=Math.max(r.from,c),i=Math.min(r.to,u);;){let r=e.state.doc.lineAt(o);for(let a of e.bidiSpans(r)){let e=a.from+r.from,s=a.to+r.from;if(e>=i)break;s>o&&l(Math.max(e,o),null==t&&e<=c,Math.min(s,i),null==n&&s>=u,a.dir)}if(o=r.to+1,o>=i)break}return 0==s.length&&l(c,null==t,u,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function w(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function Kz(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==ZR.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function Zz(e,t,n,r){let o=e.coordsAtPos(t,2*n);if(!o)return r;let i=e.dom.getBoundingClientRect(),a=(o.top+o.bottom)/2,s=e.posAtCoords({x:i.left+1,y:a}),l=e.posAtCoords({x:i.right-1,y:a});return null==s||null==l?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class Jz{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(eB)!=e.state.facet(eB)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(eB);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;e==this.scaleX&&t==this.scaleY||(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{return n=e,r=this.drawn[t],!(n.constructor==r.constructor&&n.eq(r));var n,r})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const eB=OL.define();function tB(e){return[Rj.define(t=>new Jz(t,e)),eB.of(e)]}const nB=OL.define({combine:e=>sI(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function rB(e){return e.startState.facet(nB)!=e.state.facet(nB)}const oB=tB({above:!0,markers(e){let{state:t}=e,n=t.facet(nB),r=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty||n.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:wL.cursor(o.head,o.head>o.anchor?-1:1);for(let o of Xz.forRange(e,t,n))r.push(o)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=rB(e);return n&&iB(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){iB(t.state,e)},class:"cm-cursorLayer"});function iB(e,t){t.style.animationDuration=e.facet(nB).cursorBlinkRate+"ms"}const aB=tB({above:!1,markers:e=>e.state.selection.ranges.map(t=>t.empty?[]:Xz.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t)),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||rB(e),class:"cm-selectionLayer"}),sB=ML.highest(Iz.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),lB=YL.define({map:(e,t)=>null==e?null:t.mapPos(e)}),cB=AL.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(lB)?t.value:e,e))}),uB=Rj.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(cB);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(cB)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(cB),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(cB)!=e&&this.view.dispatch({effects:lB.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dB(e,t,n,r,o){t.lastIndex=0;for(let i,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class pB{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,o)=>r(o,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,o)=>{let i=n(e,t,r);i&&o(r,r+e[0].length,i)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,o)=>o(r,r+e[0].length,n)}this.boundary=o,this.maxLength=i}createDeco(e){let t=new hI,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:o,to:i}of n)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}(e,this.maxLength))dB(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,o,i,a)=>{a>=e.view.viewport.from&&i<=e.view.viewport.to&&(n=Math.min(i,n),r=Math.max(a,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let o of e.visibleRanges){let i=Math.max(o.from,n),a=Math.min(o.to,r);if(a>=i){let n=e.state.doc.lineAt(i),r=n.to<a?e.state.doc.lineAt(a):n,s=Math.max(o.from,n.from),l=Math.min(o.to,r.to);if(this.boundary){for(;i>n.from;i--)if(this.boundary.test(n.text[i-1-n.from])){s=i;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let c,u=[],d=(e,t,n)=>u.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,e,c.index+n.from,d);else dB(e.state.doc,this.regexp,s,l,(t,n)=>this.addMatch(n,e,t,d));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>e<s||t>l,add:u})}}return t}}const hB=null!=/x/.unicode?"gu":"g",fB=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",hB),mB={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gB=null;const vB=OL.define({combine(e){let t=sI(e,{render:null,specialChars:fB,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==gB&&"undefined"!=typeof document&&document.body){let t=document.body.style;gB=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return gB||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,hB)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,hB)),t}});let yB=null;class bB extends FR{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(mB[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let o=document.createElement("span");return o.textContent=t,o.title=n,o.setAttribute("aria-label",n),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class wB extends FR{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const kB=BR.line({class:"cm-activeLine"}),EB=Rj.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let o=e.lineBlockAt(r.head);o.from>t&&(n.push(kB.range(o.from)),t=o.from)}return BR.set(n)}},{decorations:e=>e.decorations});class OB extends FR{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?UI(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=$I(t[0],"rtl"!=n.direction),o=parseInt(n.lineHeight);return r.bottom-r.top>1.5*o?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}}const SB=2e3;function xB(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),o=n-r.from,i=o>SB?-1:o==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):SI(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}const _B={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},CB={style:"cursor: crosshair"},PB="-10000px";class TB{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let o=null;this.tooltipViews=this.tooltips.map(e=>o=n(e,o))}update(e,t){var n;let r=e.state.facet(this.facet),o=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let n=0;n<o.length;n++){let r=o[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)i[n]=this.createTooltipView(r,n?i[n-1]:null),a&&(a[n]=!!r.above);else{let r=i[n]=this.tooltipViews[s];a&&(a[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)i.indexOf(e)<0&&(this.removeTooltipView(e),null===(n=e.destroy)||void 0===n||n.call(e));return t&&(a.forEach((e,n)=>t[n]=e),t.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=i,!0}}function AB(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const DB=OL.define({combine:e=>{var t,n,r;return{position:SR.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find(e=>e.parent))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find(e=>e.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||AB}}}),MB=new WeakMap,NB=Rj.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(DB);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new TB(e,jB,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(DB);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=PB,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(SR.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==PB&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),o=qj(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(DB).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],c=this.manager.tooltipViews[s],{dom:u}=c,d=e.pos[s],p=e.size[s];if(!d||!1!==l.clip&&(d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1)){u.style.top=PB;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,m=p.right-p.left,g=null!==(t=MB.get(c))&&void 0!==t?t:p.bottom-p.top,v=c.offset||RB,y=this.view.textDirection==ZR.LTR,b=p.width>r.right-r.left?y?r.left:r.right-p.width:y?Math.max(r.left,Math.min(d.left-(h?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(h?14:0)-v.x),r.right-m),w=this.above[s];!l.strictSide&&(w?d.top-g-f-v.y<r.top:d.bottom+g+f+v.y>r.bottom)&&w==r.bottom-d.bottom>d.top-r.top&&(w=this.above[s]=!w);let k=(w?d.top-r.top:r.bottom-d.bottom)-f;if(k<g&&!1!==c.resize){if(k<this.view.defaultLineHeight){u.style.top=PB;continue}MB.set(c,g),u.style.height=(g=k)/i+"px"}else u.style.height&&(u.style.height="");let E=w?d.top-g-f-v.y:d.bottom+f+v.y,O=b+m;if(!0!==c.overlap)for(let e of a)e.left<O&&e.right>b&&e.top<E+g&&e.bottom>E&&(E=w?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(u.style.top=(E-e.parent.top)/i+"px",LB(u,(b-e.parent.left)/o)):(u.style.top=E/i+"px",LB(u,b/o)),h){let e=d.left+(y?v.x:-v.x)-(b+14-7);h.style.left=e/o+"px"}!0!==c.overlap&&a.push({left:b,top:E,right:O,bottom:E+g}),u.classList.toggle("cm-tooltip-above",w),u.classList.toggle("cm-tooltip-below",!w),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=PB}},{eventObservers:{scroll(){this.maybeMeasure()}}});function LB(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const IB=Iz.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),RB={x:0,y:0},jB=OL.define({enables:[NB,IB]}),FB=OL.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class zB{static create(e){return new zB(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TB(e,FB,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const BB=jB.compute([FB],e=>{let t=e.facet(FB);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos})),create:zB.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class UB{constructor(e,t,n,r,o){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let r,o=1;if(n instanceof CR)r=n.posAtStart;else{if(r=e.posAtCoords(t),null==r)return;let n=e.coordsAtPos(r);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),a=i&&i.dir==ZR.RTL?-1:1;o=t.x<n.left?-a:a}let i=this.source(e,r,o);if(null==i?void 0:i.then){let t=this.pending={pos:r};i.then(n=>{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))},t=>Mj(e.state,t,"hover tooltip"))}else!i||Array.isArray(i)&&!i.length||e.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])})}get tooltip(){let e=this.view.plugin(NB),t=e?e.manager.tooltips.findIndex(e=>e.create==zB.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!function(e,t){let n,{left:r,right:o,top:i,bottom:a}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=r-VB&&t.clientX<=o+VB&&t.clientY>=i-VB&&t.clientY<=a+VB}(o.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,i=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:o;(o==i?this.view.posAtCoords(this.lastMove)==o:function(e,t,n,r,o){let i=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(i.left>r||i.right<r||i.top>o||Math.min(i.bottom,a)<o)return!1;let s=e.posAtCoords({x:r,y:o},!1);return s>=t&&s<=n}(this.view,o,i,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const VB=4;function WB(e,t={}){let n=YL.define(),r=AL.define({create:()=>[],update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(r,e))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,uL.TrackDel);if(null!=e){let o=Object.assign(Object.create(null),n);o.pos=e,null!=o.end&&(o.end=r.changes.mapPos(o.end)),t.push(o)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(QB)&&(e=[]);return e},provide:e=>FB.from(e)});return{active:r,extension:[r,Rj.define(o=>new UB(o,e,r,n,t.hoverTime||300)),BB]}}function HB(e,t){let n=e.plugin(NB);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const QB=YL.define(),qB=OL.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function $B(e,t){let n=e.plugin(GB),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const GB=Rj.fromClass(class{constructor(e){this.input=e.state.facet(KB),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(qB);this.top=new YB(e,!0,t.topContainer),this.bottom=new YB(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(qB);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new YB(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new YB(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(KB);if(n!=this.input){let t=n.filter(e=>e),r=[],o=[],i=[],a=[];for(let n of t){let t,s=this.specs.indexOf(n);s<0?(t=n(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),r.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=r,this.top.sync(o),this.bottom.sync(i);for(let e of a)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Iz.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class YB{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=XB(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=XB(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function XB(e){let t=e.nextSibling;return e.remove(),t}const KB=OL.define({enables:GB});class ZB extends lI{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ZB.prototype.elementClass="",ZB.prototype.toDOM=void 0,ZB.prototype.mapMode=uL.TrackBefore,ZB.prototype.startSide=ZB.prototype.endSide=-1,ZB.prototype.point=!0;const JB=OL.define(),eU=OL.define(),tU={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>pI.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},nU=OL.define();function rU(e){return[iU(),nU.of({...tU,...e})]}const oU=OL.define({combine:e=>e.some(e=>e)});function iU(e){let t=[aU];return e&&!1===e.fixed&&t.push(oU.of(!0)),t}const aU=Rj.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(nU).map(t=>new uU(e,t)),this.fixed=!e.state.facet(oU);for(let e of this.gutters)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(oU)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=pI.iter(this.view.state.facet(JB),this.view.viewport.from),r=[],o=this.gutters.map(e=>new cU(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let i of e.type)if(i.type==zR.Text&&t){lU(n,r,i.from);for(let e of o)e.line(this.view,i,r);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==zR.Text){lU(n,r,e.from);for(let t of o)t.line(this.view,e,r)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(nU),n=e.state.facet(nU),r=e.docChanged||e.heightChanged||e.viewportChanged||!pI.eq(e.startState.facet(JB),e.state.facet(JB),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let o=[];for(let r of n){let n=t.indexOf(r);n<0?o.push(new uU(this.view,r)):(this.gutters[n].update(e),o.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=o}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Iz.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,o=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==ZR.LTR?{left:r,right:o}:{right:r,left:o}})});function sU(e){return Array.isArray(e)?e:[e]}function lU(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class cU{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=pI.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==r.elements.length){let t=new dU(e,i,o,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];lU(this.cursor,r,t.from),n.length&&(r=r.concat(n));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let i=this.gutter;(0!=r.length||i.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(eU)){let o=n(e,t.widget,t);o&&(r||(r=[])).push(o)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class uU{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let o,i=r.target;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,r)&&r.preventDefault()});this.markers=sU(t.markers(e)),t.initialSpacer&&(this.spacer=new dU(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=sU(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!pI.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class dU{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let o=0,i=0;;){let a=i,s=o<t.length?t[o++]:null,l=!1;if(s){let e=s.elementClass;e&&(n+=" "+e);for(let e=i;e<this.markers.length;e++)if(this.markers[e].compare(s)){a=e,l=!0;break}}else a=this.markers.length;for(;i<a;){let e=this.markers[i++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),l&&i++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const pU=OL.define(),hU=OL.define(),fU=OL.define({combine:e=>sI(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],o=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||o(e,t,n):o}return n}})});class mU extends ZB{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function gU(e,t){return e.state.facet(fU).formatNumber(t,e.state)}const vU=nU.compute([fU],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(pU),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new mU(gU(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(hU)){let o=r(e,t,n);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(fU)!=e.state.facet(fU),initialSpacer:e=>new mU(gU(e,yU(e.state.doc.lines))),updateSpacer(e,t){let n=gU(t.view,yU(t.view.state.doc.lines));return n==e.number?e:new mU(n)},domEventHandlers:e.facet(fU).domEventHandlers,side:"before"}));function yU(e){let t=9;for(;t<e;)t=10*t+9;return t}const bU=new class extends ZB{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},wU=JB.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.head).from;o>n&&(n=o,t.push(bU.range(o)))}return pI.of(t)});var kU;const EU=new YD;const OU=new YD;class SU{constructor(e,t,n=[],r=""){this.data=e,this.name=r,aI.prototype.hasOwnProperty("tree")||Object.defineProperty(aI.prototype,"tree",{get(){return CU(this)}}),this.parser=t,this.extension=[RU.of(this),aI.languageData.of((e,t,n)=>{let r=xU(e,t,n),o=r.type.prop(EU);if(!o)return[];let i=e.facet(o),a=r.type.prop(OU);if(a){let o=r.resolve(t-r.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i})].concat(n)}isActiveAt(e,t,n=-1){return xU(e,t,n).type.prop(EU)==this.data}findRegions(e){let t=e.facet(RU);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(EU)==this.data)return void n.push({from:t,to:t+e.length});let o=e.prop(YD.mounted);if(o){if(o.tree.prop(EU)==this.data){if(o.overlay)for(let e of o.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(o.overlay){let e=n.length;if(r(o.tree,o.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let o=e.children[n];o instanceof rM&&r(o,e.positions[n]+t)}};return r(CU(e),0),n}get allowsNesting(){return!0}}function xU(e,t,n){let r=e.facet(RU),o=CU(e).topNode;if(!r||r.allowsNesting)for(let e=o;e;e=e.enter(t,n,nM.ExcludeBuffers))e.type.isTop&&(o=e);return o}SU.setState=YL.define();class _U extends SU{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=(n=e.languageData,OL.define({combine:n?e=>e.concat(n):void 0}));var n;return new _U(t,e.parser.configure({props:[EU.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new _U(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function CU(e){let t=e.field(SU.state,!1);return t?t.tree:rM.empty}class PU{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let TU=null;class AU{constructor(e,t,n=[],r,o,i,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new AU(e,t,[],rM.empty,0,n,[],null)}startParse(){return this.parser.startParse(new PU(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=rM.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(EM.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(EM.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=TU;TU=this;try{return e()}finally{TU=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=DU(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,o)=>t.push({fromA:e,toA:n,fromB:r,toB:o})),n=EM.applyChanges(n,t),r=rM.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&a.push({from:n,to:r})}}}return new AU(this.parser,t,n,r,o,i,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=DU(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends OM{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance(){let t=TU;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=i,new rM(ZD.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return TU}}function DU(e,t,n){return EM.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class MU{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new MU(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=AU.create(e.facet(RU).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new MU(n)}}SU.state=AL.define({create:MU.init,update(e,t){for(let e of t.effects)if(e.is(SU.setState))return e.value;return t.startState.facet(RU)!=t.state.facet(RU)?MU.init(t.state):e.apply(t)}});let NU=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(NU=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const LU="undefined"!=typeof navigator&&(null===(kU=navigator.scheduling)||void 0===kU?void 0:kU.isInputPending)?()=>navigator.scheduling.isInputPending():null,IU=Rj.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(SU.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(SU.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=NU(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,o=n.field(SU.state);if(o.tree==o.context.tree&&o.context.isDone(r+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,e&&!LU?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<r&&n.doc.length>r+1e3,s=o.context.work(()=>LU&&LU()||Date.now()>i,r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:SU.setState.of(new MU(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>Mj(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),RU=OL.define({combine:e=>e.length?e[0]:null,enables:e=>[SU.state,IU,Iz.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class jU{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const FU=OL.define(),zU=OL.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function BU(e){let t=e.facet(zU);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function UU(e,t){let n="",r=e.tabSize,o=e.facet(zU)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(let e=0;e<t;e++)n+=o;return n}function VU(e,t){e instanceof aI&&(e=new WU(e));for(let n of e.state.facet(FU)){let r=n(e,t);if(void 0!==r)return r}let n=CU(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),o=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(o!=r.node){let e=[];for(let t=o;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return QU(r,e,n)}(e,n,t):null}class WU{constructor(e,t={}){this.state=e,this.options=t,this.unit=BU(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=n.from&&r<=n.to?o&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.countColumn(n,e-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return i>-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return SI(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const HU=new YD;function QU(e,t,n){for(let r=e;r;r=r.next){let e=qU(r.node);if(e)return e(GU.create(t,n,r))}return 0}function qU(e){let t=e.type.prop(HU);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(YD.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>function(e,t,n,r,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=n.to;;){let o=t.childAfter(e);if(!o||o==r)return null;if(!o.type.isSkipped){if(o.from>=a)return null;let e=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+e}}e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*n)}(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?$U:null}function $U(){return 0}class GU extends WU{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new GU(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(YU(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return QU(this.context.next,this.base,this.pos)}}function YU(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function XU({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const KU=OL.define(),ZU=new YD;function JU(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function eV(e,t,n){for(let r of e.facet(KU)){let o=r(e,t,n);if(o)return o}return function(e,t,n){let r=CU(e);if(r.length<n)return null;let o=null;for(let i=r.resolveStack(n,1);i;i=i.next){let a=i.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<t)break;let s=a.type.prop(ZU);if(s&&(a.to<r.length-50||r.length==e.doc.length||!JU(a))){let r=s(a,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function tV(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const nV=YL.define({map:tV}),rV=YL.define({map:tV});function oV(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}const iV=AL.define({create:()=>BR.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,n)=>e=aV(e,t,n)),e=e.map(t.changes);for(let n of t.effects)if(n.is(nV)&&!lV(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(hV),o=r?BR.replace({widget:new vV(r(t.state,n.value))}):gV;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(rV)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=aV(e,t.selection.main.head)),e},provide:e=>Iz.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],o=e[n++];if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid JSON for fold state");t.push(gV.range(r,o))}return BR.set(t,!0)}});function aV(e,t,n=t){let r=!1;return e.between(t,n,(e,o)=>{e<n&&o>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function sV(e,t,n){var r;let o=null;return null===(r=e.field(iV,!1))||void 0===r||r.between(t,n,(e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})}),o}function lV(e,t,n){let r=!1;return e.between(t,t,(e,o)=>{e==t&&o==n&&(r=!0)}),r}function cV(e,t){return e.field(iV,!1)?t:t.concat(YL.appendConfig.of(fV()))}function uV(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return Iz.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${o}.`)}const dV=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of oV(e)){let n=eV(e.state,t.from,t.to);if(n)return e.dispatch({effects:cV(e.state,[nV.of(n),uV(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(iV,!1))return!1;let t=[];for(let n of oV(e)){let r=sV(e.state,n.from,n.to);r&&t.push(rV.of(r),uV(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let o=e.lineBlockAt(r),i=eV(t,o.from,o.to);i&&n.push(nV.of(i)),r=(i?e.lineBlockAt(i.to):o).to+1}return n.length&&e.dispatch({effects:cV(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(iV,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(rV.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],pV={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},hV=OL.define({combine:e=>sI(e,pV)});function fV(e){let t=[iV,wV];return e&&t.push(hV.of(e)),t}function mV(e,t){let{state:n}=e,r=n.facet(hV),o=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=sV(e.state,n.from,n.to);r&&e.dispatch({effects:rV.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const gV=BR.replace({widget:new class extends FR{toDOM(e){return mV(e,null)}}});class vV extends FR{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return mV(e,this.value)}}const yV={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class bV extends ZB{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}const wV=Iz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class kV{constructor(e,t){let n;function r(e){let t=TI.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof SU?e=>e.prop(EU)==i.data:i?e=>e==i:void 0,this.style=rN(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:o}).style,this.module=n?new TI(n):null,this.themeType=t.themeType}static define(e,t){return new kV(e,t||{})}}const EV=OL.define(),OV=OL.define({combine:e=>e.length?[e[0]]:null});function SV(e){let t=e.facet(EV);return t.length?t:e.facet(OV)}function xV(e,t){let n,r=[CV];return e instanceof kV&&(e.module&&r.push(Iz.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(OV.of(e)):n?r.push(EV.computeN([Iz.darkTheme],t=>t.facet(Iz.darkTheme)==("dark"==n)?[e]:[])):r.push(EV.of(e)),r}class _V{constructor(e){this.markCache=Object.create(null),this.tree=CU(e.state),this.decorations=this.buildDeco(e,SV(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=CU(e.state),n=SV(e.state),r=n!=SV(e.startState),{viewport:o}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length<o.to&&!r&&t.type==this.tree.type&&i>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return BR.none;let n=new hI;for(let{from:r,to:o}of e.visibleRanges)oN(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=BR.mark({class:r})))},r,o);return n.finish()}}const CV=ML.high(Rj.fromClass(_V,{decorations:e=>e.decorations})),PV=kV.define([{tag:kN.meta,color:"#404740"},{tag:kN.link,textDecoration:"underline"},{tag:kN.heading,textDecoration:"underline",fontWeight:"bold"},{tag:kN.emphasis,fontStyle:"italic"},{tag:kN.strong,fontWeight:"bold"},{tag:kN.strikethrough,textDecoration:"line-through"},{tag:kN.keyword,color:"#708"},{tag:[kN.atom,kN.bool,kN.url,kN.contentSeparator,kN.labelName],color:"#219"},{tag:[kN.literal,kN.inserted],color:"#164"},{tag:[kN.string,kN.deleted],color:"#a11"},{tag:[kN.regexp,kN.escape,kN.special(kN.string)],color:"#e40"},{tag:kN.definition(kN.variableName),color:"#00f"},{tag:kN.local(kN.variableName),color:"#30a"},{tag:[kN.typeName,kN.namespace],color:"#085"},{tag:kN.className,color:"#167"},{tag:[kN.special(kN.variableName),kN.macroName],color:"#256"},{tag:kN.definition(kN.propertyName),color:"#00c"},{tag:kN.comment,color:"#940"},{tag:kN.invalid,color:"#f00"}]),TV=Iz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),AV="()[]{}",DV=OL.define({combine:e=>sI(e,{afterCursor:!0,brackets:AV,maxScanDistance:1e4,renderMatch:LV})}),MV=BR.mark({class:"cm-matchingBracket"}),NV=BR.mark({class:"cm-nonmatchingBracket"});function LV(e){let t=[],n=e.matched?MV:NV;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const IV=AL.define({create:()=>BR.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(DV);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=BV(t.state,e.head,-1,r)||e.head>0&&BV(t.state,e.head-1,1,r)||r.afterCursor&&(BV(t.state,e.head,1,r)||e.head<t.state.doc.length&&BV(t.state,e.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,t.state)))}return BR.set(n,!0)},provide:e=>Iz.decorations.from(e)}),RV=[IV,TV],jV=new YD;function FV(e,t,n){let r=e.prop(t<0?YD.openedBy:YD.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function zV(e){let t=e.type.prop(jV);return t?t(e.node):e}function BV(e,t,n,r={}){let o=r.maxScanDistance||1e4,i=r.brackets||AV,a=CU(e),s=a.resolveInner(t,n);for(let e=s;e;e=e.parent){let r=FV(e.type,n,i);if(r&&e.from<e.to){let o=zV(e);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return UV(0,0,n,e,o,r,i)}}return function(e,t,n,r,o,i,a){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=i;){let i=u.value;n<0&&(e+=i.length);let s=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=a.indexOf(i[e]);if(!(t<0||r.resolveInner(s+e,1).type!=o))if(t%2==0==n>0)d++;else{if(1==d)return{start:c,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=i.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,a,s.type,o,i)}function UV(e,t,n,r,o,i,a){let s=r.parent,l={from:o.from,to:o.to},c=0,u=null==s?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&i.indexOf(u.type.name)>-1&&u.from<u.to){let e=zV(u);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(FV(u.type,n,a))c++;else if(FV(u.type,-n,a)){if(0==c){let e=zV(u);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const VV=Object.create(null),WV=[ZD.none],HV=[],QV=Object.create(null),qV=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])qV[e]=GV(VV,t);function $V(e,t){HV.indexOf(e)>-1||(HV.push(e),console.warn(t))}function GV(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||kN[n];r?"function"==typeof r?t.length?t=t.map(r):$V(n,`Modifier ${n} used at start of tag`):t.length?$V(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:$V(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map(e=>e.id),i=QV[o];if(i)return i.id;let a=QV[o]=ZD.define({id:WV.length,name:r,props:[eN({[r]:n})]});return WV.push(a),a.id}ZR.RTL,ZR.LTR;let YV=null;function XV(){if(!YV&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof e[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));YV=t.sort().map(e=>({type:"property",label:e,apply:e+": "}))}return YV||[]}const KV=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),ZV=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),JV=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),eW=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),tW=/^(\w[\w-]*|-\w[\w-]*|)$/,nW=/^-(-[\w-]*)?$/,rW=new kM,oW=["Declaration"];function iW(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function aW(e,t,n){if(t.to-t.from>4096){let r=rW.get(t);if(r)return r;let o=[],i=new Set,a=t.cursor(nM.IncludeAnonymous);if(a.firstChild())do{for(let t of aW(e,a.node,n))i.has(t.label)||(i.add(t.label),o.push(t))}while(a.nextSibling());return rW.set(t,o),o}{let r=[],o=new Set;return t.cursor().iterate(t=>{var i;if(n(t)&&t.matchContext(oW)&&":"==(null===(i=t.node.nextSibling)||void 0===i?void 0:i.name)){let n=e.sliceString(t.from,t.to);o.has(n)||(o.add(n),r.push({label:n,type:"variable"}))}}),r}}const sW=e=>t=>{let{state:n,pos:r}=t,o=CU(n).resolveInner(r,-1),i=o.type.isError&&o.from==o.to-1&&"-"==n.doc.sliceString(o.from,o.to);if("PropertyName"==o.name||(i||"TagName"==o.name)&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:XV(),validFor:tW};if("ValueName"==o.name)return{from:o.from,options:ZV,validFor:tW};if("PseudoClassName"==o.name)return{from:o.from,options:KV,validFor:tW};if(e(o)||(t.explicit||i)&&function(e,t){var n;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let r=null===(n=e.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==t.sliceString(r.from,r.to)}(o,n.doc))return{from:e(o)||i?o.from:r,options:aW(n.doc,iW(o),e),validFor:nW};if("TagName"==o.name){for(let{parent:e}=o;e;e=e.parent)if("Block"==e.name)return{from:o.from,options:XV(),validFor:tW};return{from:o.from,options:JV,validFor:tW}}if("AtKeyword"==o.name)return{from:o.from,options:eW,validFor:tW};if(!t.explicit)return null;let a=o.resolve(r),s=a.childBefore(r);return s&&":"==s.name&&"PseudoClassSelector"==a.name?{from:r,options:KV,validFor:tW}:s&&":"==s.name&&"Declaration"==a.name||"ArgList"==a.name?{from:r,options:ZV,validFor:tW}:"Block"==a.name||"Styles"==a.name?{from:r,options:XV(),validFor:tW}:null},lW=sW(e=>"VariableName"==e.name),cW=_U.define({name:"css",parser:jN.configure({props:[HU.add({Declaration:XU()}),ZU.add({"Block KeyframeList":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function uW(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}t++}for(;t<arguments.length;t++)dW(e,arguments[t]);return e}function dW(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)dW(e,t[n])}}class pW{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class hW{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(CW).markerFilter;r&&(e=r(e,n));let o=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),i=new hI,a=[],s=0;for(let e=0;;){let t,r,l=e==o.length?null:o[e];if(!l&&!a.length)break;for(a.length?(t=s,r=a.reduce((e,t)=>Math.min(e,t.to),l&&l.from>t?l.from:1e8)):(t=l.from,r=l.to,a.push(l),e++);e<o.length;){let n=o[e];if(n.from!=t||!(n.to>n.from||n.to==t)){r=Math.min(n.from,r);break}a.push(n),e++,r=Math.min(n.to,r)}let c=FW(a);if(a.some(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from))i.add(t,t,BR.widget({widget:new DW(c),diagnostics:a.slice()}));else{let e=a.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");i.add(t,r,BR.mark({class:"cm-lintRange cm-lintRange-"+c+e,diagnostics:a.slice(),inclusiveEnd:a.some(e=>e.to>r)}))}s=r;for(let e=0;e<a.length;e++)a[e].to<=s&&a.splice(e--,1)}let l=i.finish();return new hW(l,t,fW(l))}}function fW(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:o})=>{if(!(t&&o.diagnostics.indexOf(t)<0))if(r){if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new pW(r.from,n,r.diagnostic)}else r=new pW(e,n,t||o.diagnostics[0])}),r}function mW(e,t){let n=t.pos,r=t.end||n,o=e.state.facet(CW).hideOn(e,n,r);if(null!=o)return o;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some(e=>e.is(vW))&&!e.changes.touchesRange(i.from,Math.max(i.to,r)))}function gW(e,t){return e.field(wW,!1)?t:t.concat(YL.appendConfig.of(qW))}const vW=YL.define(),yW=YL.define(),bW=YL.define(),wW=AL.define({create:()=>new hW(BR.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,o=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=fW(n,e.selected.diagnostic,o)||fW(n,null,o)}!n.size&&o&&t.state.facet(CW).autoPanel&&(o=null),e=new hW(n,o,r)}for(let n of t.effects)if(n.is(vW)){let r=t.state.facet(CW).autoPanel?n.value.length?NW.open:null:e.panel;e=hW.init(n.value,r,t.state)}else n.is(yW)?e=new hW(e.diagnostics,n.value?NW.open:null,e.selected):n.is(bW)&&(e=new hW(e.diagnostics,e.panel,n.value));return e},provide:e=>[KB.from(e,e=>e.panel),Iz.decorations.from(e,e=>e.diagnostics)]}),kW=BR.mark({class:"cm-lintRange cm-lintRange-active"});function EW(e,t,n){let r,{diagnostics:o}=e.state.field(wW),i=-1,a=-1;o.between(t-(n<0?1:0),t+(n>0?1:0),(e,o,{spec:s})=>{if(t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t<o||n<0)))return r=s.diagnostics,i=e,a=o,!1});let s=e.state.facet(CW).tooltipFilter;return r&&s&&(r=s(r,e.state)),r?{pos:i,end:a,above:e.state.doc.lineAt(i).to<a,create:()=>({dom:OW(e,r)})}:null}function OW(e,t){return uW("ul",{class:"cm-tooltip-lint"},t.map(t=>AW(e,t,!1)))}const SW=e=>{let t=e.state.field(wW,!1);return!(!t||!t.panel||(e.dispatch({effects:yW.of(!1)}),0))},xW=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(wW,!1);t&&t.panel||e.dispatch({effects:gW(e.state,[yW.of(!0)])});let n=$B(e,NW.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(wW,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)||(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],_W=Rj.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(CW);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(CW);t.length&&function(e,t,n){let r=[],o=-1;for(let i of e)i.then(n=>{r.push(n),clearTimeout(o),r.length==e.length?t(r):o=setTimeout(()=>t(r),200)},n)}(t.map(e=>Promise.resolve(e(this.view))),t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:gW(e,[vW.of(t)])}}(this.view.state,t.reduce((e,t)=>e.concat(t))))},e=>{Mj(this.view.state,e)})}}update(e){let t=e.state.facet(CW);(e.docChanged||t!=e.startState.facet(CW)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),CW=OL.define({combine:e=>Object.assign({sources:e.map(e=>e.source).filter(e=>null!=e)},sI(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function PW(e,t={}){return[CW.of({source:e,config:t}),_W,qW]}function TW(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function AW(e,t,n){var r;let o=n?TW(t.actions):[];return uW("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},uW("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let i=!1,a=r=>{if(r.preventDefault(),i)return;i=!0;let o=fW(e.state.field(wW).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:s}=n,l=o[r]?s.indexOf(o[r]):-1,c=l<0?s:[s.slice(0,l),uW("u",s.slice(l,l+1)),s.slice(l+1)];return uW("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[r]})"`}.`},c)}),t.source&&uW("div",{class:"cm-diagnosticSource"},t.source))}class DW extends FR{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return uW("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class MW{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=AW(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class NW{constructor(e){this.view=e,this.items=[],this.list=uW("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)SW(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=TW(n.actions);for(let o=0;o<r.length;o++)if(r[o].toUpperCase().charCodeAt(0)==t.keyCode){let t=fW(this.view.state.field(wW).diagnostics,n);t&&n.actions[o].apply(e,t.from,t.to)}}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=uW("div",{class:"cm-panel-lint"},this.list,uW("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>SW(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(wW).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(wW),n=0,r=!1,o=null,i=new Set;for(e.between(0,this.view.state.doc.length,(e,a,{spec:s})=>{for(let e of s.diagnostics){if(i.has(e))continue;i.add(e);let a,s=-1;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){s=t;break}s<0?(a=new MW(this.view,e),this.items.splice(n,0,a),r=!0):(a=this.items[s],s>n&&(this.items.splice(n,s-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),o=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new MW(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=fW(this.view.state.field(wW).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:bW.of(t)})}static open(e){return new NW(e)}}function LW(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function IW(e){return LW(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const RW=Iz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:IW("#d11")},".cm-lintRange-warning":{backgroundImage:IW("orange")},".cm-lintRange-info":{backgroundImage:IW("#999")},".cm-lintRange-hint":{backgroundImage:IW("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function jW(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function FW(e){let t="hint",n=1;for(let r of e){let e=jW(r.severity);e>n&&(n=e,t=r.severity)}return t}class zW extends ZB{constructor(e){super(),this.diagnostics=e,this.severity=FW(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet($W).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:WW.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:OW(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientX<o.right+10&&r.clientY>o.top-10&&r.clientY<o.bottom+10)){for(let e=r.target;e;e=e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),e.state.field(HW)&&e.dispatch({effects:WW.of(null)})}};window.addEventListener("mousemove",n)}(e,t)}let{hoverTime:o}=e.state.facet($W),i=setTimeout(r,o);t.onmouseout=()=>{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),i=setTimeout(r,o)}}(e,t,n)),t}}function BW(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new zW(n[e]).range(+e));return pI.of(r,!0)}const UW=rU({class:"cm-gutter-lint",markers:e=>e.state.field(VW),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(VW).between(n.from,n.to,(e,t,o)=>{e>n.from&&e<n.to&&r.push(...o.diagnostics)}),r.length?new zW(r):null}}),VW=AL.define({create:()=>pI.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet($W).markerFilter;for(let r of t.effects)if(r.is(vW)){let o=r.value;n&&(o=n(o||[],t.state)),e=BW(t.state.doc,o.slice(0))}return e}}),WW=YL.define(),HW=AL.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=mW(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce((e,t)=>t.is(WW)?t.value:e,e)),provide:e=>jB.from(e)}),QW=Iz.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:LW('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:LW('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:LW('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),qW=[wW,Iz.decorations.compute([wW],e=>{let{selected:t,panel:n}=e.field(wW);return t&&n&&t.from!=t.to?BR.set([kW.range(t.from,t.to)]):BR.none}),WB(EW,{hideOn:mW}),RW],$W=OL.define({combine:e=>sI(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function GW(e={}){return[$W.of(e),VW,UW,QW,HW]}function YW(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const XW=YW(nH,0),KW=YW(tH,0),ZW=YW((e,t)=>tH(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t)),0);function JW(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const eH=50;function tH(e,t,n=t.selection.ranges){let r=n.map(e=>JW(t,e.from).block);if(!r.every(e=>e))return null;let o=n.map((e,n)=>function(e,{open:t,close:n},r,o){let i,a,s=e.sliceDoc(r-eH,r),l=e.sliceDoc(o,o+eH),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(l)[0].length,d=s.length-c;if(s.slice(d-t.length,d)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:o+u,margin:u&&1}};o-r<=2*eH?i=a=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+eH),a=e.sliceDoc(o-eH,o));let p=/^\s*/.exec(i)[0].length,h=/\s*$/.exec(a)[0].length,f=a.length-h-n.length;return i.slice(p,p+t.length)==t&&a.slice(f,f+n.length)==n?{open:{pos:r+p+t.length,margin:/\s/.test(i.charAt(p+t.length))?1:0},close:{pos:o-h-n.length,margin:/\s/.test(a.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to));if(2!=e&&!o.every(e=>e))return{changes:t.changes(n.map((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&o.some(e=>e)){let e=[];for(let t,n=0;n<o.length;n++)if(t=o[n]){let o=r[n],{open:i,close:a}=t;e.push({from:i.pos-o.open.length,to:i.pos+i.margin},{from:a.pos-a.margin,to:a.pos+o.close.length})}return{changes:e}}return null}function nH(e,t,n=t.selection.ranges){let r=[],o=-1;for(let{from:e,to:i}of n){let n=r.length,a=1e9,s=JW(t,e).line;if(s){for(let n=e;n<=i;){let l=t.doc.lineAt(n);if(l.from>o&&(e==i||i>l.from)){o=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+s.length)==s?e:-1;e<l.text.length&&e<a&&(a=e),r.push({line:l,comment:n,token:s,indent:e,empty:t,single:!1})}n=l.to+1}if(a<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=a);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of r)!a&&i||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const rH=qL.define(),oH=qL.define(),iH=OL.define(),aH=OL.define({combine:e=>sI(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),sH=AL.define({create:()=>OH.empty,update(e,t){let n=t.state.facet(aH),r=t.annotation(rH);if(r){let o=hH.fromTransaction(t,r.selection),i=r.side,a=0==i?e.undone:e.done;return a=o?fH(a,a.length,n.minDepth,o):yH(a,t.startState.selection),new OH(0==i?r.rest:a,0==i?a:r.rest)}let o=t.annotation(oH);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(XL.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=hH.fromTransaction(t),a=t.annotation(XL.time),s=t.annotation(XL.userEvent);return i?e=e.addChanges(i,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new OH(e.done.map(hH.fromJSON),e.undone.map(hH.fromJSON))});function lH(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(sH,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const cH=lH(0,!1),uH=lH(1,!1),dH=lH(0,!0),pH=lH(1,!0);class hH{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new hH(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new hH(e.changes&&pL.fromJSON(e.changes),[],e.mapped&&dL.fromJSON(e.mapped),e.startSelection&&wL.fromJSON(e.startSelection),e.selectionsAfter.map(wL.fromJSON))}static fromTransaction(e,t){let n=gH;for(let t of e.startState.facet(iH)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new hH(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,gH)}static selection(e){return new hH(void 0,gH,void 0,void 0,e)}}function fH(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function mH(e,t){return e.length?t.length?e.concat(t):e:t}const gH=[],vH=200;function yH(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-vH));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),fH(e,e.length-1,1e9,n.setSelAfter(r)))}return[hH.selection([t])]}function bH(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function wH(e,t){if(!e.length)return e;let n=e.length,r=gH;for(;n;){let o=kH(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[hH.selection(r)]:gH}function kH(e,t,n){let r=mH(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):gH,n);if(!e.changes)return hH.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new hH(o,YL.mapEffects(e.effects,t),a,e.startSelection.map(i),r)}const EH=/^(input\.type|delete)($|\.)/;class OH{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new OH(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!n||EH.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,function(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,o,i)=>{for(let e=0;e<n.length;){let t=n[e++],a=n[e++];i>=t&&o<=a&&(r=!0)}}),r}(a.changes,e.changes))||"input.type.compose"==n)?fH(i,i.length-1,r.minDepth,new hH(e.changes.compose(a.changes),mH(YL.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,gH)):fH(i,i.length,r.minDepth,e),new OH(i,gH,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:gH;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1],a=e,i.ranges.length==a.ranges.length&&0===i.ranges.filter((e,t)=>e.empty!=a.ranges[t].empty).length)?this:new OH(yH(this.done,e),this.undone,t,n);var i,a}addMapping(e){return new OH(wH(this.done,e),wH(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:rH.of({side:e,rest:bH(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?gH:r.slice(0,r.length-1);return o.mapped&&(n=wH(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:rH.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}OH.empty=new OH(gH,gH);const SH=[{key:"Mod-z",run:cH,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:uH,preventDefault:!0},{linux:"Ctrl-Shift-z",run:uH,preventDefault:!0},{key:"Mod-u",run:dH,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:pH,preventDefault:!0}];function xH(e,t){return wL.create(e.ranges.map(t),e.mainIndex)}function _H(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function CH({state:e,dispatch:t},n){let r=xH(e.selection,n);return!r.eq(e.selection,!0)&&(t(_H(e,r)),!0)}function PH(e,t){return wL.cursor(t?e.to:e.from)}function TH(e,t){return CH(e,n=>n.empty?e.moveByChar(n,t):PH(n,t))}function AH(e){return e.textDirectionAt(e.state.selection.main.head)==ZR.LTR}const DH=e=>TH(e,!AH(e)),MH=e=>TH(e,AH(e));function NH(e,t){return CH(e,n=>n.empty?e.moveByGroup(n,t):PH(n,t))}function LH(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function IH(e,t,n){let r,o,i=CU(e).resolveInner(t.head),a=n?YD.closedBy:YD.openedBy;for(let r=t.head;;){let t=n?i.childAfter(r):i.childBefore(r);if(!t)break;LH(e,t,a)?i=t:r=n?t.to:t.from}return o=i.type.prop(a)&&(r=n?BV(e,i.from,1):BV(e,i.to,-1))&&r.matched?n?r.end.to:r.end.from:n?i.to:i.from,wL.cursor(o,n?-1:1)}function RH(e,t){return CH(e,n=>{if(!n.empty)return PH(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;const jH=e=>RH(e,!1),FH=e=>RH(e,!0);function zH(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,o=0;if(n){for(let t of e.state.facet(Iz.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(o=Math.max(null==n?void 0:n.bottom,o))}t=e.scrollDOM.clientHeight-r-o}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:o,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function BH(e,t){let n,r=zH(e),{state:o}=e,i=xH(o.selection,n=>n.empty?e.moveVertically(n,t,r.height):PH(n,t));if(i.eq(o.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;t&&t.top>s&&t.bottom<l&&(n=Iz.scrollIntoView(i.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(_H(o,i),{effects:n}),!0}const UH=e=>BH(e,!1),VH=e=>BH(e,!0);function WH(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(o=wL.cursor(r.from+n))}return o}function HH(e,t){let n=xH(e.state.selection,e=>{let n=t(e);return wL.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(_H(e.state,n)),!0)}function QH(e,t){return HH(e,n=>e.moveByChar(n,t))}const qH=e=>QH(e,!AH(e)),$H=e=>QH(e,AH(e));function GH(e,t){return HH(e,n=>e.moveByGroup(n,t))}function YH(e,t){return HH(e,n=>e.moveVertically(n,t))}const XH=e=>YH(e,!1),KH=e=>YH(e,!0);function ZH(e,t){return HH(e,n=>e.moveVertically(n,t,zH(e).height))}const JH=e=>ZH(e,!1),eQ=e=>ZH(e,!0),tQ=({state:e,dispatch:t})=>(t(_H(e,{anchor:0})),!0),nQ=({state:e,dispatch:t})=>(t(_H(e,{anchor:e.doc.length})),!0),rQ=({state:e,dispatch:t})=>(t(_H(e,{anchor:e.selection.main.anchor,head:0})),!0),oQ=({state:e,dispatch:t})=>(t(_H(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function iQ(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange(r=>{let{from:o,to:i}=r;if(o==i){let a=t(r);a<o?(n="delete.backward",a=aQ(e,a,!1)):a>o&&(n="delete.forward",a=aQ(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=aQ(e,o,!1),i=aQ(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:wL.cursor(o,o<r.head?-1:1)}});return!o.changes.empty&&(e.dispatch(r.update(o,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?Iz.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function aQ(e,t,n){if(e instanceof Iz)for(let r of e.state.facet(Iz.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}const sQ=(e,t,n)=>iQ(e,r=>{let o,i,a=r.from,{state:s}=e,l=s.doc.lineAt(a);if(n&&!t&&a>l.from&&a<l.from+200&&!/[^ \t]/.test(o=l.text.slice(0,a-l.from))){if("\t"==o[o.length-1])return a-1;let e=SI(o,s.tabSize)%BU(s)||BU(s);for(let t=0;t<e&&" "==o[o.length-1-t];t++)a--;i=a}else i=iL(l.text,a-l.from,t,t)+l.from,i==a&&l.number!=(t?s.doc.lines:1)?i+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(i-l.from,a-l.from))&&(i=iL(l.text,i-l.from,!1,!1)+l.from);return i}),lQ=e=>sQ(e,!1,!0),cQ=e=>sQ(e,!0,!1),uQ=(e,t)=>iQ(e,n=>{let r=n.head,{state:o}=e,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let e=null;;){if(r==(t?i.to:i.from)){r==n.head&&i.number!=(t?o.doc.lines:1)&&(r+=t?1:-1);break}let s=iL(i.text,r-i.from,t)+i.from,l=i.text.slice(Math.min(r,s)-i.from,Math.max(r,s)-i.from),c=a(l);if(null!=e&&c!=e)break;" "==l&&r==n.head||(e=c),r=s}return r}),dQ=e=>uQ(e,!1);function pQ(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function hQ(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let t of pQ(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),a=i.length+1;if(n){r.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)o.push(wL.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(wL.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:wL.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function fQ(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of pQ(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const mQ=gQ(!1);function gQ(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:o}=n,i=t.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=CU(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop(YD.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(t,r);e&&(r=o=(o<=i.to?i:t.doc.lineAt(o)).to);let s=new WU(t,{simulateBreak:r,simulateDoubleBreak:!!a}),l=VU(s,r);for(null==l&&(l=SI(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));o<i.to&&/\s/.test(i.text[o-i.from]);)o++;a?({from:r,to:o}=a):r>i.from&&r<i.from+100&&!/\S/.test(i.text.slice(0,r))&&(r=i.from);let c=["",UU(t,l)];return a&&c.push(UU(t,s.lineIndent(i.from,-1))),{changes:{from:r,to:o,insert:YN.of(c)},range:wL.cursor(r+1+c[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function vQ(e,t){let n=-1;return e.changeByRange(r=>{let o=[];for(let i=r.from;i<=r.to;){let a=e.doc.lineAt(i);a.number>n&&(r.empty||r.to>a.from)&&(t(a,o,r),n=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:wL.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}})}const yQ=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(vQ(e,(t,n)=>{n.push({from:t.from,insert:e.facet(zU)})}),{userEvent:"input.indent"})),!0),bQ=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(vQ(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let o=SI(r,e.tabSize),i=0,a=UU(e,Math.max(0,o-BU(e)));for(;i<r.length&&i<a.length&&r.charCodeAt(i)==a.charCodeAt(i);)i++;n.push({from:t.from+i,to:t.from+r.length,insert:a.slice(i)})}),{userEvent:"delete.dedent"})),!0),wQ=[{key:"Ctrl-b",run:DH,shift:qH,preventDefault:!0},{key:"Ctrl-f",run:MH,shift:$H},{key:"Ctrl-p",run:jH,shift:XH},{key:"Ctrl-n",run:FH,shift:KH},{key:"Ctrl-a",run:e=>CH(e,t=>wL.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>HH(e,t=>wL.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>CH(e,t=>wL.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>HH(e,t=>wL.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:cQ},{key:"Ctrl-h",run:lQ},{key:"Ctrl-k",run:e=>iQ(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:dQ},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:YN.of(["",""])},range:wL.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),o=n==r.from?n-1:iL(r.text,n-r.from,!1)+r.from,i=n==r.to?n+1:iL(r.text,n-r.from,!0)+r.from;return{changes:{from:o,to:i,insert:e.doc.slice(n,i).append(e.doc.slice(o,n))},range:wL.cursor(i)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:VH}],kQ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>CH(e,t=>IH(e.state,t,!AH(e))),shift:e=>HH(e,t=>IH(e.state,t,!AH(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>CH(e,t=>IH(e.state,t,AH(e))),shift:e=>HH(e,t=>IH(e.state,t,AH(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>hQ(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>fQ(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>hQ(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>fQ(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=wL.create([n.main]):n.main.empty||(r=wL.create([wL.cursor(n.main.head)])),!!r&&(t(_H(e,r)),!0)}},{key:"Mod-Enter",run:gQ(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=pQ(e).map(({from:t,to:n})=>wL.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:wL.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=xH(e.selection,t=>{let n=CU(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return wL.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(_H(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:bQ},{key:"Mod-]",run:yQ},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new WU(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=vQ(e,(t,o,i)=>{let a=VU(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=UU(e,a);(s!=l||i.from<t.from+s.length)&&(n[t.from]=a,o.push({from:t.from,to:t.from+s.length,insert:l}))});return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(pQ(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=xH(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let r=!1,o=xH(e.selection,t=>{let o=BV(e,t.head,-1)||BV(e,t.head,1)||t.head>0&&BV(e,t.head-1,1)||t.head<e.doc.length&&BV(e,t.head+1,-1);if(!o||!o.end)return t;r=!0;let i=o.start.from==t.head?o.end.to:o.end.from;return n?wL.range(t.anchor,i):wL.cursor(i)});return!!r&&(t(_H(e,o)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=JW(e.state,n.from);return r.line?XW(e):!!r.block&&ZW(e)}},{key:"Alt-A",run:KW},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:DH,shift:qH,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>NH(e,!AH(e)),shift:e=>GH(e,!AH(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>CH(e,t=>WH(e,t,!AH(e))),shift:e=>HH(e,t=>WH(e,t,!AH(e))),preventDefault:!0},{key:"ArrowRight",run:MH,shift:$H,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>NH(e,AH(e)),shift:e=>GH(e,AH(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>CH(e,t=>WH(e,t,AH(e))),shift:e=>HH(e,t=>WH(e,t,AH(e))),preventDefault:!0},{key:"ArrowUp",run:jH,shift:XH,preventDefault:!0},{mac:"Cmd-ArrowUp",run:tQ,shift:rQ},{mac:"Ctrl-ArrowUp",run:UH,shift:JH},{key:"ArrowDown",run:FH,shift:KH,preventDefault:!0},{mac:"Cmd-ArrowDown",run:nQ,shift:oQ},{mac:"Ctrl-ArrowDown",run:VH,shift:eQ},{key:"PageUp",run:UH,shift:JH},{key:"PageDown",run:VH,shift:eQ},{key:"Home",run:e=>CH(e,t=>WH(e,t,!1)),shift:e=>HH(e,t=>WH(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:tQ,shift:rQ},{key:"End",run:e=>CH(e,t=>WH(e,t,!0)),shift:e=>HH(e,t=>WH(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:nQ,shift:oQ},{key:"Enter",run:mQ,shift:mQ},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:lQ,shift:lQ},{key:"Delete",run:cQ},{key:"Mod-Backspace",mac:"Alt-Backspace",run:dQ},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>uQ(e,!0)},{mac:"Mod-Backspace",run:e=>iQ(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})},{mac:"Mod-Delete",run:e=>iQ(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})}].concat(wQ.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),EQ={key:"Tab",run:yQ,shift:bQ},OQ="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class SQ{constructor(e,t,n=0,r=e.length,o,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=o?e=>o(OQ(e)):OQ,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return aL(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=sL(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=lL(e);let r=this.normalize(t);if(r.length)for(let e=0,o=n;;e++){let i=r.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}o==n&&e<t.length&&t.charCodeAt(e)==i&&o++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let o=this.matches[t],i=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,i=!0)),i||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(SQ.prototype[Symbol.iterator]=function(){return this});const xQ={from:-1,to:-1,match:/.*/.exec("")},_Q="gm"+(null==/x/.unicode?"":"u");class CQ{constructor(e,t,n,r=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=xQ,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new AQ(e,t,n,r,o);this.re=new RegExp(t,_Q+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let i=e.lineAt(r);this.curLineStart=i.from,this.matchPos=DQ(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=DQ(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const PQ=new WeakMap;class TQ{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=PQ.get(e);if(!r||r.from>=n||r.to<=t){let r=new TQ(t,e.sliceString(t,n));return PQ.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:i}=r;return i>t&&(o=e.sliceString(t,i)+o,i=t),r.to<n&&(o+=e.sliceString(r.to,n)),PQ.set(e,new TQ(i,o)),new TQ(t,o.slice(t-i,n-i))}}class AQ{constructor(e,t,n,r,o){this.text=e,this.to=o,this.done=!1,this.value=xQ,this.matchPos=DQ(e,r),this.re=new RegExp(t,_Q+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=TQ.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=DQ(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=TQ.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function DQ(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function MQ(e){let t=uW("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,o=r.doc.lineAt(r.selection.main.head),[,i,a,s,l]=n,c=s?+s.slice(1):0,u=a?+a:o.number;if(a&&l){let e=u/100;i&&(e=e*("-"==i?-1:1)+o.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else a&&i&&(u=u*("-"==i?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),p=wL.cursor(d.from+Math.max(0,Math.min(c,d.length)));e.dispatch({effects:[NQ.of(!1),Iz.scrollIntoView(p.from,{y:"center"})],selection:p}),e.focus()}return{dom:uW("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:NQ.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},uW("label",e.state.phrase("Go to line"),": ",t)," ",uW("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),uW("button",{name:"close",onclick:()=>{e.dispatch({effects:NQ.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(CQ.prototype[Symbol.iterator]=AQ.prototype[Symbol.iterator]=function(){return this});const NQ=YL.define(),LQ=AL.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(NQ)&&(e=n.value);return e},provide:e=>KB.from(e,e=>e?MQ:null)}),IQ=Iz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),RQ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},jQ=OL.define({combine:e=>sI(e,RQ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),FQ=BR.mark({class:"cm-selectionMatch"}),zQ=BR.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function BQ(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==rI.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==rI.Word)}const UQ=Rj.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(jQ),{state:n}=e,r=n.selection;if(r.ranges.length>1)return BR.none;let o,i=r.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return BR.none;let e=n.wordAt(i.head);if(!e)return BR.none;a=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return BR.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!BQ(a,n,i.from,i.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==rI.Word&&e(t.sliceDoc(r-1,r))==rI.Word}(a,n,i.from,i.to))return BR.none}else if(o=n.sliceDoc(i.from,i.to),!o)return BR.none}let s=[];for(let r of e.visibleRanges){let e=new SQ(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!a||BQ(a,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?s.push(zQ.range(r,o)):(r>=i.to||o<=i.from)&&s.push(FQ.range(r,o)),s.length>t.maxMatches))return BR.none}}return BR.set(s)}},{decorations:e=>e.decorations}),VQ=Iz.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),WQ=OL.define({combine:e=>sI(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new yq(e),scrollToMatch:e=>Iz.scrollIntoView(e)})});class HQ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,_Q),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new KQ(this):new $Q(this)}getCursor(e,t=0,n){let r=e.doc?e:aI.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?GQ(this,r,t,n):qQ(this,r,t,n)}}class QQ{constructor(e){this.spec=e}}function qQ(e,t,n,r){return new SQ(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?function(e,t){return(n,r,o,i)=>((i>n||i+o.length<r)&&(i=Math.max(0,n-2),o=e.sliceString(i,Math.min(e.length,r+2))),!(t(YQ(o,n-i))==rI.Word&&t(XQ(o,n-i))==rI.Word||t(XQ(o,r-i))==rI.Word&&t(YQ(o,r-i))==rI.Word))}(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}class $Q extends QQ{constructor(e){super(e)}nextMatch(e,t,n){let r=qQ(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=qQ(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),o=qQ(this.spec,e,n,r),i=null;for(;!o.nextOverlapping().done;)i=o.value;if(i)return i;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),!r||r.from==t&&r.to==n?null:r}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=qQ(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=qQ(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function GQ(e,t,n,r){return new CQ(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(o(YQ(n.input,n.index))!=rI.Word||o(XQ(n.input,n.index))!=rI.Word)&&(o(XQ(n.input,n.index+n[0].length))!=rI.Word||o(YQ(n.input,n.index+n[0].length))!=rI.Word)):void 0},n,r);var o}function YQ(e,t){return e.slice(iL(e,t,!1),t)}function XQ(e,t){return e.slice(t,iL(e,t))}class KQ extends QQ{nextMatch(e,t,n){let r=GQ(this.spec,e,n,e.doc.length).next();return r.done&&(r=GQ(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),i=GQ(this.spec,e,o,n),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=GQ(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=GQ(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const ZQ=YL.define(),JQ=YL.define(),eq=AL.define({create:e=>new tq(pq(e).create(),null),update(e,t){for(let n of t.effects)n.is(ZQ)?e=new tq(n.value.create(),e.panel):n.is(JQ)&&(e=new tq(e.query,n.value?dq:null));return e},provide:e=>KB.from(e,e=>e.panel)});class tq{constructor(e,t){this.query=e,this.panel=t}}const nq=BR.mark({class:"cm-searchMatch"}),rq=BR.mark({class:"cm-searchMatch cm-searchMatch-selected"}),oq=Rj.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(eq))}update(e){let t=e.state.field(eq);(t!=e.startState.field(eq)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return BR.none;let{view:n}=this,r=new hI;for(let t=0,o=n.visibleRanges,i=o.length;t<i;t++){let{from:a,to:s}=o[t];for(;t<i-1&&s>o[t+1].from-500;)s=o[++t].to;e.highlight(n.state,a,s,(e,t)=>{let o=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,o?rq:nq)})}return r.finish()}},{decorations:e=>e.decorations});function iq(e){return t=>{let n=t.state.field(eq,!1);return n&&n.query.spec.valid?e(t,n):mq(t)}}const aq=iq((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let o=wL.single(r.from,r.to),i=e.state.facet(WQ);return e.dispatch({selection:o,effects:[Eq(e,r),i.scrollToMatch(o.main,e)],userEvent:"select.search"}),fq(e),!0}),sq=iq((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,o=t.prevMatch(n,r,r);if(!o)return!1;let i=wL.single(o.from,o.to),a=e.state.facet(WQ);return e.dispatch({selection:i,effects:[Eq(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),fq(e),!0}),lq=iq((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length||(e.dispatch({selection:wL.create(n.map(e=>wL.range(e.from,e.to))),userEvent:"select.search.matches"}),0))}),cq=iq((e,{query:t})=>{let{state:n}=e,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=t.nextMatch(n,r,r);if(!i)return!1;let a,s,l=i,c=[],u=[];l.from==r&&l.to==o&&(s=n.toText(t.getReplacement(l)),c.push({from:l.from,to:l.to,insert:s}),l=t.nextMatch(n,l.from,l.to),u.push(Iz.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=e.state.changes(c);return l&&(a=wL.single(l.from,l.to).map(d),u.push(Eq(e,l)),u.push(n.facet(WQ).scrollToMatch(a.main,e))),e.dispatch({changes:d,selection:a,effects:u,userEvent:"input.replace"}),!0}),uq=iq((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Iz.announce.of(r),userEvent:"input.replace.all"}),!0});function dq(e){return e.state.facet(WQ).createPanel(e)}function pq(e,t){var n,r,o,i,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let c=e.facet(WQ);return new HQ({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(o=null==t?void 0:t.literal)&&void 0!==o?o:c.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:c.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:c.wholeWord})}function hq(e){let t=$B(e,dq);return t&&t.dom.querySelector("[main-field]")}function fq(e){let t=hq(e);t&&t==e.root.activeElement&&t.select()}const mq=e=>{let t=e.state.field(eq,!1);if(t&&t.panel){let n=hq(e);if(n&&n!=e.root.activeElement){let r=pq(e.state,t.query.spec);r.valid&&e.dispatch({effects:ZQ.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[JQ.of(!0),t?ZQ.of(pq(e.state,t.query.spec)):YL.appendConfig.of(Sq)]});return!0},gq=e=>{let t=e.state.field(eq,!1);if(!t||!t.panel)return!1;let n=$B(e,dq);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:JQ.of(!1)}),!0},vq=[{key:"Mod-f",run:mq,scope:"editor search-panel"},{key:"F3",run:aq,shift:sq,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:aq,shift:sq,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gq,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:o}=n.main,i=[],a=0;for(let t=new SQ(e.doc,e.sliceDoc(r,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==r&&(a=i.length),i.push(wL.range(t.value.from,t.value.to))}return t(e.update({selection:wL.create(i,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=$B(e,MQ);if(!t){let n=[NQ.of(!0)];null==e.state.field(LQ,!1)&&n.push(YL.appendConfig.of([LQ,IQ])),e.dispatch({effects:n}),t=$B(e,MQ)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=wL.create(n.ranges.map(t=>e.wordAt(t.head)||wL.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let o=function(e,t){let{main:n,ranges:r}=e.selection,o=e.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let n=!1,o=new SQ(e.doc,t,r[r.length-1].to);;){if(o.next(),!o.done){if(n&&r.some(e=>e.from==o.value.from))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(n)return null;o=new SQ(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!o&&(t(e.update({selection:e.selection.addRange(wL.range(o.from,o.to),!1),effects:Iz.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class yq{constructor(e){this.view=e;let t=this.query=e.state.field(eq).query.spec;function n(e,t,n){return uW("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=uW("input",{value:t.search,placeholder:bq(e,"Find"),"aria-label":bq(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=uW("input",{value:t.replace,placeholder:bq(e,"Replace"),"aria-label":bq(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=uW("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=uW("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=uW("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=uW("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>aq(e),[bq(e,"next")]),n("prev",()=>sq(e),[bq(e,"previous")]),n("select",()=>lq(e),[bq(e,"all")]),uW("label",null,[this.caseField,bq(e,"match case")]),uW("label",null,[this.reField,bq(e,"regexp")]),uW("label",null,[this.wordField,bq(e,"by word")]),...e.state.readOnly?[]:[uW("br"),this.replaceField,n("replace",()=>cq(e),[bq(e,"replace")]),n("replaceAll",()=>uq(e),[bq(e,"replace all")])],uW("button",{name:"close",onclick:()=>gq(e),"aria-label":bq(e,"close"),type:"button"},["×"])])}commit(){let e=new HQ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ZQ.of(e)}))}keydown(e){var t,n;t=this.view,n=e,Yz(Qz(t.state),n,t,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?sq:aq)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),cq(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(ZQ)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(WQ).top}}function bq(e,t){return e.state.phrase(t)}const wq=30,kq=/[\s\.,:;?!]/;function Eq(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),o=e.state.doc.lineAt(n).to,i=Math.max(r.from,t-wq),a=Math.min(o,n+wq),s=e.state.sliceDoc(i,a);if(i!=r.from)for(let e=0;e<wq;e++)if(!kq.test(s[e+1])&&kq.test(s[e])){s=s.slice(e);break}if(a!=o)for(let e=s.length-1;e>s.length-wq;e--)if(!kq.test(s[e-1])&&kq.test(s[e])){s=s.slice(0,e);break}return Iz.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`)}const Oq=Iz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Sq=[eq,ML.low(oq),Oq];class xq{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=CU(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),o=r.search(Tq(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function _q(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}class Cq{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function Pq(e){return e.selection.main.from}function Tq(e,t){var n;let{source:r}=e,o=t&&"^"!=r[0],i="$"!=r[r.length-1];return o||i?new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const Aq=qL.define(),Dq=new WeakMap;function Mq(e){if(!Array.isArray(e))return e;let t=Dq.get(e);return t||Dq.set(e,t=function(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=_q(t)+_q(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let o=e.matchBefore(r);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}(e)),t}const Nq=YL.define(),Lq=YL.define();class Iq{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=aL(e,t),r=lL(n);this.chars.push(n);let o=e.slice(t,t+r),i=o.toUpperCase();this.folded.push(aL(i==o?o.toLowerCase():i,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:o,byWord:i}=this;if(1==t.length){let r=aL(e,0),o=lL(r),i=o==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;i+=-200}return this.ret(i,[0,o])}let a=e.indexOf(this.pattern);if(0==a)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,l=0;if(a<0){for(let o=0,i=Math.min(e.length,200);o<i&&l<s;){let i=aL(e,o);i!=t[l]&&i!=n[l]||(r[l++]=o),o+=lL(i)}if(l<s)return null}let c=0,u=0,d=!1,p=0,h=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let r=0,l=Math.min(e.length,200),v=0;r<l&&u<s;){let l=aL(e,r);a<0&&(c<s&&l==t[c]&&(o[c++]=r),p<s&&(l==t[p]||l==n[p]?(0==p&&(h=r),f=r+1,p++):p=0));let y,b=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=sL(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!r||1==b&&m||0==v&&0!=b)&&(t[u]==l||n[u]==l&&(d=!0)?i[u++]=r:i.length&&(g=!1)),v=b,r+=lL(l)}return u==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):p==s&&0==h?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==s?this.ret(-900-e.length,[h,f]):u==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],o=0;for(let e of t){let t=e+(this.astral?lL(aL(n,e)):1);o&&r[o-1]==e?r[o-1]=t:(r[o++]=e,r[o++]=t)}return this.ret(e-n.length,r)}}class Rq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const jq=OL.define({combine:e=>sI(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:zq,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Fq(e(n),t(n)),optionClass:(e,t)=>n=>Fq(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function Fq(e,t){return e?t?e+" "+t:e:t}function zq(e,t,n,r,o,i){let a,s,l=e.textDirection==ZR.RTL,c=l,u=!1,d="top",p=t.left-o.left,h=o.right-t.right,f=r.right-r.left,m=r.bottom-r.top;if(c&&p<Math.min(f,h)?c=!1:!c&&h<Math.min(f,p)&&(c=!0),f<=(c?p:h))a=Math.max(o.top,Math.min(n.top,o.bottom-m))-t.top,s=Math.min(400,c?p:h);else{u=!0,s=Math.min(400,(l?t.right:o.right-t.left)-30);let e=o.bottom-t.bottom;e>=m||e>t.top?a=n.bottom-t.top:(d="bottom",a=t.bottom-n.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function Bq(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class Uq{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:i}=r.open,a=e.state.facet(jq);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>a&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,n))),s.className="cm-completionMatchedText",a=n}return a<i.length&&o.appendChild(document.createTextNode(i.slice(a))),o},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=Bq(o.length,i,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t,o=n.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]<r.length)return this.applyCompletion(e,r[+t[1]]),void n.preventDefault()}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(jq).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Lq.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:o,selected:i,disabled:a}=n.open;r.open&&r.open.options==o||(this.range=Bq(o.length,i,e.state.facet(jq).maxRenderedOptions),this.showOptions(o,n.id)),this.updateSel(),a!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Bq(t.options.length,t.selected,this.view.state.facet(jq).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let o="string"==typeof r?document.createTextNode(r):r(n);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>Mj(this.view.state,e,"completion info")):this.addInfoPane(o,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/o:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/o)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let e=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottom<Math.max(o.top,t.top)+10?null:this.view.state.facet(jq).positionInfo(this.view,t,r,n,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let o=null;for(let i=n.from;i<n.to;i++){let{completion:a,match:s}=e[i],{section:l}=a;if(l){let e="string"==typeof l?l:l.name;e!=o&&(i>n.from||0==n.from)&&(o=e,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=e)}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(a);u&&(c.className=u);for(let e of this.optionContent){let t=e(a,this.view.state,this.view,s);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Vq(e,t){return n=>new Uq(n,e,t)}function Wq(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class Hq{constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Hq(this.options,Gq(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o,i){if(r&&!i&&e.some(e=>e.isPending))return r.setDisabled();let a=function(e,t){let n=[],r=null,o=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},i=t.facet(jq);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)o(new Cq(t,r.source,e?e(t):[],1e9-n.length));else{let n,a=t.sliceDoc(r.from,r.to),s=i.filterStrict?new Rq(a):new Iq(a);for(let t of r.result.options)if(n=s.match(t.label)){let i=t.displayLabel?e?e(t,n.matched):[]:n.matched;o(new Cq(t,r.source,i,n.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0,o=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.name<t.name?-1:1)};for(let n of r.sort(o))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let a=[],s=null,l=i.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!s||s.label!=t.label||s.detail!=t.detail||null!=s.type&&null!=t.type&&s.type!=t.type||s.apply!=t.apply||s.boost!=t.boost?a.push(e):Wq(e.completion)>Wq(s)&&(a[a.length-1]=e),s=e.completion}return a}(e,t);if(!a.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let s=t.facet(jq).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<a.length;t++)if(a[t].completion==e){s=t;break}}return new Hq(a,Gq(n,s),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:r$,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new Hq(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Hq(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Qq{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Qq(Yq,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(jq),r=(n.override||t.languageDataAt("autocomplete",Pq(t)).map(Mq)).map(t=>(this.active.find(e=>e.source==t)||new Kq(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let o=this.open,i=e.effects.some(e=>e.is(Jq));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let o=n==e.length,i=r==t.length;if(o||i)return o==i;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||i?o=Hq.build(r,t,this.id,o,n,i):o&&o.disabled&&!r.some(e=>e.isPending)&&(o=null),!o&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new Kq(e.source,0):e));for(let t of e.effects)t.is(e$)&&(o=o&&o.setSelected(t.value,this.id));return r==this.active&&o==this.open?this:new Qq(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?qq:$q}}const qq={"aria-autocomplete":"list"},$q={};function Gq(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const Yq=[];function Xq(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(Aq);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class Kq{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=Xq(e,t),r=this;(8&n||16&n&&this.touches(e))&&(r=new Kq(r.source,0)),4&n&&0==r.state&&(r=new Kq(this.source,1)),r=r.updateFor(e,n);for(let t of e.effects)if(t.is(Nq))r=new Kq(r.source,1,t.value);else if(t.is(Lq))r=new Kq(r.source,0);else if(t.is(Jq))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Pq(e.state))}}class Zq extends Kq{constructor(e,t,n,r,o,i){super(e,3,t),this.limit=n,this.result=r,this.from=o,this.to=i}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=Pq(e.state);if(a>i||!r||2&t&&(Pq(e.startState)==this.from||a<this.limit))return new Kq(this.source,4&t?1:0);let s=e.changes.mapPos(this.limit);return function(e,t,n,r){if(!e)return!1;let o=t.sliceDoc(n,r);return"function"==typeof e?e(o,n,r,t):Tq(e,!0).test(o)}(r.validFor,e.state,o,i)?new Zq(this.source,this.explicit,s,r,o,i):r.update&&(r=r.update(r,o,i,new xq(e.state,a,!1)))?new Zq(this.source,this.explicit,s,r,r.from,null!==(n=r.to)&&void 0!==n?n:Pq(e.state)):new Kq(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Zq(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Kq(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}const Jq=YL.define({map:(e,t)=>e.map(e=>e.map(t))}),e$=YL.define(),t$=AL.define({create:()=>Qq.start(),update:(e,t)=>e.update(t),provide:e=>[jB.from(e,e=>e.tooltip),Iz.contentAttributes.from(e,e=>e.attrs)]});function n$(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(t$).active.find(e=>e.source==t.source);return r instanceof Zq&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:o}=e.selection,i=n-o.from,a=r-o.from;return Object.assign(Object.assign({},e.changeByRange(s=>{if(s!=o&&n!=r&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:l},range:wL.cursor(s.from+i+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:Aq.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}const r$=Vq(t$,n$);function o$(e,t="option"){return n=>{let r=n.state.field(t$,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(jq).interactionDelay)return!1;let o,i=1;"page"==t&&(o=HB(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:e$.of(s)}),!0}}const i$=e=>!!e.state.field(t$,!1)&&(e.dispatch({effects:Nq.of(!0)}),!0);class a${constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const s$=Rj.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(t$).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(t$),n=e.state.facet(jq);if(!e.selectionSet&&!e.docChanged&&e.startState.field(t$)==t)return;let r=e.transactions.some(e=>{let t=Xq(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){Mj(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Nq)))&&(this.pendingStart=!0);let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),o):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(t$);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(jq).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=Pq(t),r=new xq(t,n,e.explicit,this.view),o=new a$(e,r);this.running.push(o),Promise.resolve(e.source(r)).then(e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:Lq.of(null)}),Mj(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(jq).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(jq),r=this.view.state.field(t$);for(let o=0;o<this.running.length;o++){let i=this.running[o];if(void 0===i.done)continue;if(this.running.splice(o--,1),i.done){let r=Pq(i.updates.length?i.updates[0].startState:this.view.state),o=Math.min(r,i.done.from+(i.active.explicit?0:1)),a=new Zq(i.active.source,i.active.explicit,o,i.done,i.done.from,null!==(e=i.done.to)&&void 0!==e?e:r);for(let e of i.updates)a=a.update(e,n);if(a.hasResult()){t.push(a);continue}}let a=r.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(null==i.done){let e=new Kq(i.active.source,0);for(let t of i.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(a)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Jq.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(t$,!1);if(t&&t.tooltip&&this.view.state.facet(jq).closeOnBlur){let n=t.open&&HB(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:Lq.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:Nq.of(!1)}),20),this.composing=0}}}),l$="object"==typeof navigator&&/Win/.test(navigator.platform),c$=ML.highest(Iz.domEventHandlers({keydown(e,t){let n=t.state.field(t$,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!l$||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find(e=>e.source==r.source),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&n$(t,r),!1}})),u$=Iz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),d$={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},p$=YL.define({map(e,t){let n=t.mapPos(e,-1,uL.TrackAfter);return null==n?void 0:n}}),h$=new class extends lI{};h$.startSide=1,h$.endSide=-1;const f$=AL.define({create:()=>pI.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(p$)&&(e=e.update({add:[h$.range(n.value,n.value+1)]}));return e}}),m$="()[]{}<>«»»«[]{}";function g$(e){for(let t=0;t<16;t+=2)if(m$.charCodeAt(t)==e)return m$.charAt(t+1);return sL(e<128?e:e+1)}function v$(e,t){return e.languageDataAt("closeBrackets",t)[0]||d$}const y$="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),b$=Iz.inputHandler.of((e,t,n,r)=>{if((y$?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(r.length>2||2==r.length&&1==lL(aL(r,0))||t!=o.from||n!=o.to)return!1;let i=function(e,t){let n=v$(e,e.selection.main.head),r=n.brackets||d$.brackets;for(let o of r){let i=g$(aL(o,0));if(t==o)return i==o?x$(e,o,r.indexOf(o+o+o)>-1,n):O$(e,o,i,n.before||d$.before);if(t==i&&k$(e,e.selection.main.from))return S$(e,0,i)}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)}),w$=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=v$(e,e.selection.main.head).brackets||d$.brackets,r=null,o=e.changeByRange(t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return lL(aL(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let o of n)if(o==r&&E$(e.doc,t.head)==g$(aL(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:wL.cursor(t.head-o.length)}}return{range:r=t}});return r||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function k$(e,t){let n=!1;return e.field(f$).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function E$(e,t){let n=e.sliceString(t,t+2);return n.slice(0,lL(aL(n,0)))}function O$(e,t,n,r){let o=null,i=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:p$.of(i.to+t.length),range:wL.range(i.anchor+t.length,i.head+t.length)};let a=E$(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:p$.of(i.head+t.length),range:wL.cursor(i.head+t.length)}:{range:o=i}});return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function S$(e,t,n){let r=null,o=e.changeByRange(t=>t.empty&&E$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:wL.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function x$(e,t,n,r){let o=r.stringPrefixes||d$.stringPrefixes,i=null,a=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:p$.of(r.to+t.length),range:wL.range(r.anchor+t.length,r.head+t.length)};let a,s=r.head,l=E$(e.doc,s);if(l==t){if(_$(e,s))return{changes:{insert:t+t,from:s},effects:p$.of(s+t.length),range:wL.cursor(s+t.length)};if(k$(e,s)){let r=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:wL.cursor(s+r.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=C$(e,s-2*t.length,o))>-1&&_$(e,a))return{changes:{insert:t+t+t+t,from:s},effects:p$.of(s+t.length),range:wL.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=rI.Word&&C$(e,s,o)>-1&&!function(e,t,n,r){let o=CU(e).resolveInner(t,-1),i=r.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:p$.of(s+t.length),range:wL.cursor(s+t.length)}}return{range:i=r}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function _$(e,t){let n=CU(e).resolveInner(t+1);return n.parent&&n.from==t}function C$(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=rI.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&r(e.sliceDoc(n-1,n))!=rI.Word)return n}return-1}const P$=[{key:"Ctrl-Space",run:i$},{mac:"Alt-`",run:i$},{key:"Escape",run:e=>{let t=e.state.field(t$,!1);return!(!t||!t.active.some(e=>0!=e.state)||(e.dispatch({effects:Lq.of(null)}),0))}},{key:"ArrowDown",run:o$(!0)},{key:"ArrowUp",run:o$(!1)},{key:"PageDown",run:o$(!0,"page")},{key:"PageUp",run:o$(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(t$,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(jq).interactionDelay)&&n$(e,t.open.options[t.open.selected])}}],T$=ML.highest(Wz.computeN([jq],e=>e.facet(jq).defaultKeymap?[P$]:[]));var A$=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(w$)),!1!==e.defaultKeymap&&(n=n.concat(kQ)),!1!==e.searchKeymap&&(n=n.concat(vq)),!1!==e.historyKeymap&&(n=n.concat(SH)),!1!==e.foldKeymap&&(n=n.concat(dV)),!1!==e.completionKeymap&&(n=n.concat(P$)),!1!==e.lintKeymap&&(n=n.concat(xW));var r=[];return!1!==e.lineNumbers&&r.push(function(e={}){return[fU.of(e),iU(),vU]}()),!1!==e.highlightActiveLineGutter&&r.push(wU),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[vB.of(e),yB||(yB=Rj.fromClass(class{constructor(e){this.view=e,this.decorations=BR.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(vB)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new pB({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:o}=n.state,i=aL(t[0],0);if(9==i){let e=o.lineAt(r),t=n.state.tabSize,i=SI(e.text,t,r-e.from);return BR.replace({widget:new wB((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=BR.replace({widget:new bB(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(vB);e.startState.facet(vB)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&r.push(function(e={}){return[sH,aH.of(e),Iz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?cH:"historyRedo"==e.inputType?uH:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t={...yV,...e},n=new bV(t,!0),r=new bV(t,!1),o=Rj.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(RU)!=e.state.facet(RU)||e.startState.field(iV,!1)!=e.state.field(iV,!1)||CU(e.startState)!=CU(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new hI;for(let o of e.viewportLineBlocks){let i=sV(e.state,o.from,o.to)?r:eV(e.state,o.from,o.to)?n:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,rU({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||pI.empty},initialSpacer:()=>new bV(t,!1),domEventHandlers:{...i,click:(e,t,n)=>{if(i.click&&i.click(e,t,n))return!0;let r=sV(e.state,t.from,t.to);if(r)return e.dispatch({effects:rV.of(r)}),!0;let o=eV(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:nV.of(o)}),!0)}}}),fV()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[nB.of(e),oB,aB,sB,Cj.of(!0)]}()),!1!==e.dropCursor&&r.push([cB,uB]),!1!==e.allowMultipleSelections&&r.push(aI.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(aI.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,o=n.lineAt(r);if(r>o.from+200)return e;let i=n.sliceString(o.from,r);if(!t.some(e=>e.test(i)))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=VU(a,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],o=UU(a,n);r!=o&&l.push({from:t.from,to:t.from+r.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e})),!1!==e.syntaxHighlighting&&r.push(xV(PV,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[DV.of(e),RV]}()),!1!==e.closeBrackets&&r.push([b$,f$]),!1!==e.autocompletion&&r.push(function(e={}){return[c$,t$,jq.of(e),s$,T$,u$]}()),!1!==e.rectangularSelection&&r.push(function(){let e=e=>e.altKey&&0==e.button;return Iz.mouseSelectionStyle.of((t,n)=>e(n)?function(e,t){let n=xB(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),o=e.state.doc.lineAt(t);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(e.changes)}},get(t,o,i){let a=xB(e,t);if(!a)return r;let s=function(e,t,n){let r=Math.min(t.line,n.line),o=Math.max(t.line,n.line),i=[];if(t.off>SB||n.off>SB||t.col<0||n.col<0){let a=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=r;t<=o;t++){let n=e.doc.line(t);n.length<=s&&i.push(wL.range(n.from+a,n.to+s))}}else{let a=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=r;t<=o;t++){let n=e.doc.line(t),r=xI(n.text,a,e.tabSize,!0);if(r<0)i.push(wL.cursor(n.to));else{let t=xI(n.text,s,e.tabSize);i.push(wL.range(n.from+r,n.from+t))}}}return i}(e.state,n,a);return s.length?i?wL.create(s.concat(r.ranges)):wL.create(s):r}}:null}(t,n):null)}()),!1!==t&&r.push(function(e={}){let[t,n]=_B[e.key||"Alt"],r=Rj.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,Iz.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?CB:null})]}()),!1!==e.highlightActiveLine&&r.push(EB),!1!==e.highlightSelectionMatches&&r.push(function(){let e=[VQ,UQ];return e}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(zU.of(" ".repeat(e.tabSize))),r.concat([Wz.of(n.flat())]).filter(Boolean)};const D$="#e06c75",M$="#abb2bf",N$="#7d8799",L$="#d19a66",I$="#2c313a",R$="#282c34",j$="#353a42",F$="#528bff",z$=[Iz.theme({"&":{color:M$,backgroundColor:R$},".cm-content":{caretColor:F$},".cm-cursor, .cm-dropCursor":{borderLeftColor:F$},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:M$},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:R$,color:N$,border:"none"},".cm-activeLineGutter":{backgroundColor:I$},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:j$},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:j$,borderBottomColor:j$},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:I$,color:M$}}},{dark:!0}),xV(kV.define([{tag:kN.keyword,color:"#c678dd"},{tag:[kN.name,kN.deleted,kN.character,kN.propertyName,kN.macroName],color:D$},{tag:[kN.function(kN.variableName),kN.labelName],color:"#61afef"},{tag:[kN.color,kN.constant(kN.name),kN.standard(kN.name)],color:L$},{tag:[kN.definition(kN.name),kN.separator],color:M$},{tag:[kN.typeName,kN.className,kN.number,kN.changed,kN.annotation,kN.modifier,kN.self,kN.namespace],color:"#e5c07b"},{tag:[kN.operator,kN.operatorKeyword,kN.url,kN.escape,kN.regexp,kN.link,kN.special(kN.string)],color:"#56b6c2"},{tag:[kN.meta,kN.comment],color:N$},{tag:kN.strong,fontWeight:"bold"},{tag:kN.emphasis,fontStyle:"italic"},{tag:kN.strikethrough,textDecoration:"line-through"},{tag:kN.link,color:N$,textDecoration:"underline"},{tag:kN.heading,fontWeight:"bold",color:D$},{tag:[kN.atom,kN.bool,kN.special(kN.variableName)],color:L$},{tag:[kN.processingInstruction,kN.string,kN.inserted],color:"#98c379"},{tag:kN.invalid,color:"#ffffff"}]))];var B$=Iz.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),U$=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:o="light",placeholder:i="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(Wz.of([EQ])),a&&("boolean"==typeof a?s.unshift(A$()):s.unshift(A$(a))),i&&s.unshift(function(e){let t=Rj.fromClass(class{constructor(t){this.view=t,this.placeholder=e?BR.set([BR.widget({widget:new OB(e),side:1}).range(0)]):BR.none}get decorations(){return this.view.state.doc.length?BR.none:this.placeholder}},{decorations:e=>e.decorations});return"string"==typeof e?[t,Iz.contentAttributes.of({"aria-placeholder":e})]:t}(i)),o){case"light":s.push(B$);break;case"dark":s.push(z$);break;case"none":break;default:s.push(o)}return!1===n&&s.push(Iz.editable.of(!1)),r&&s.push(aI.readOnly.of(!0)),[...s]};class V${constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error("TimeoutLatch callback error:",e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class W${constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),0===this.latches.size&&this.stop()}start(){null===this.interval&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){null!==this.interval&&(clearInterval(this.interval),this.interval=null)}}var H$=null,Q$=qL.define(),q$=[];var $$=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],G$=(0,oe.forwardRef)((e,t)=>{var{className:n,value:r="",selection:o,extensions:i=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:p,minHeight:h,maxHeight:f,width:m,minWidth:g,maxWidth:v,basicSetup:y,placeholder:b,indentWithTab:w,editable:k,readOnly:E,root:O,initialState:S}=e,x=Rt(e,$$),_=(0,oe.useRef)(null),{state:C,view:P,container:T,setContainer:A}=function(e){var{value:t,selection:n,onChange:r,onStatistics:o,onCreateEditor:i,onUpdate:a,extensions:s=q$,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:p=null,width:h=null,minWidth:f=null,maxWidth:m=null,placeholder:g="",editable:v=!0,readOnly:y=!1,indentWithTab:b=!0,basicSetup:w=!0,root:k,initialState:E}=e,[O,S]=(0,oe.useState)(),[x,_]=(0,oe.useState)(),[C,P]=(0,oe.useState)(),T=(0,oe.useState)(()=>({current:null}))[0],A=(0,oe.useState)(()=>({current:null}))[0],D=Iz.theme({"&":{height:u,minHeight:d,maxHeight:p,width:h,minWidth:f,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),M=Iz.updateListener.of(e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some(e=>e.annotation(Q$))){T.current?T.current.reset():(T.current=new V$(()=>{if(A.current){var e=A.current;A.current=null,e()}T.current=null},200),("undefined"==typeof window?new W$:(H$||(H$=new W$),H$)).add(T.current));var t=e.state.doc.toString();r(t,e)}o&&o((e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}))(e))}),N=[M,D,...U$({theme:c,editable:v,readOnly:y,placeholder:g,indentWithTab:b,basicSetup:w})];return a&&"function"==typeof a&&N.push(Iz.updateListener.of(a)),N=N.concat(s),(0,oe.useLayoutEffect)(()=>{if(O&&!C){var e={doc:t,selection:n,extensions:N},r=E?aI.fromJSON(E.json,e,E.fields):aI.create(e);if(P(r),!x){var o=new Iz({state:r,parent:O,root:k});_(o),i&&i(o,r)}}return()=>{x&&(P(void 0),_(void 0))}},[O,C]),(0,oe.useEffect)(()=>{e.container&&S(e.container)},[e.container]),(0,oe.useEffect)(()=>()=>{x&&(x.destroy(),_(void 0)),T.current&&(T.current.cancel(),T.current=null)},[x]),(0,oe.useEffect)(()=>{l&&x&&x.focus()},[l,x]),(0,oe.useEffect)(()=>{x&&x.dispatch({effects:YL.reconfigure.of(N)})},[c,s,u,d,p,h,f,m,g,v,y,b,w,r,a]),(0,oe.useEffect)(()=>{if(void 0!==t){var e=x?x.state.doc.toString():"";if(x&&t!==e){var n=()=>{x&&t!==x.state.doc.toString()&&x.dispatch({changes:{from:0,to:x.state.doc.toString().length,insert:t||""},annotations:[Q$.of(!0)]})};T.current&&!T.current.isDone?A.current=n:n()}}},[t,x]),{state:C,setState:P,view:x,setView:_,container:O,setContainer:S}}({root:O,value:r,autoFocus:u,theme:d,height:p,minHeight:h,maxHeight:f,width:m,minWidth:g,maxWidth:v,basicSetup:y,placeholder:b,indentWithTab:w,editable:k,readOnly:E,selection:o,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:i,initialState:S});(0,oe.useImperativeHandle)(t,()=>({editor:_.current,state:C,view:P}),[_,T,C,P]);var D=(0,oe.useCallback)(e=>{_.current=e,A(e)},[A]);if("string"!=typeof r)throw new Error("value must be typeof string but got "+typeof r);var M="string"==typeof d?"cm-theme-"+d:"cm-theme";return(0,Ux.jsx)("div",re({ref:D,className:M+(n?" "+n:"")},x))});G$.displayName="CodeMirror";const Y$=G$,X$=0,K$=1,Z$=2,J$=3,eG=4,tG=5,nG=7,rG=9,oG=10,iG=11,aG=12,sG=13,lG=14,cG=15,uG=16,dG=17,pG=18,hG=19,fG=20,mG=21,gG=22,vG=23,yG=24,bG=25,wG=0;function kG(e){return e>=48&&e<=57}function EG(e){return kG(e)||e>=65&&e<=70||e>=97&&e<=102}function OG(e){return e>=65&&e<=90}function SG(e){return function(e){return OG(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function xG(e){return SG(e)||kG(e)||45===e}function _G(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function CG(e){return 10===e||13===e||12===e}function PG(e){return CG(e)||32===e||9===e}function TG(e,t){return 92===e&&!CG(t)&&t!==wG}function AG(e,t,n){return 45===e?SG(t)||45===t||TG(t,n):!!SG(e)||92===e&&TG(e,t)}function DG(e,t,n){return 43===e||45===e?kG(t)?2:46===t&&kG(n)?3:0:46===e?kG(t)?2:0:kG(e)?1:0}function MG(e){return 65279===e||65534===e?1:0}const NG=new Array(128),LG=130;for(let e=0;e<NG.length;e++)NG[e]=(PG(e)?LG:kG(e)&&131)||SG(e)&&132||_G(e)&&133||e||128;function IG(e){return e<128?NG[e]:132}function RG(e,t){return t<e.length?e.charCodeAt(t):0}function jG(e,t,n){return 13===n&&10===RG(e,t+1)?2:1}function FG(e,t,n){let r=e.charCodeAt(t);return OG(r)&&(r|=32),r===n}function zG(e,t,n,r){if(n-t!==r.length)return!1;if(t<0||n>e.length)return!1;for(let o=t;o<n;o++){const n=r.charCodeAt(o-t);let i=e.charCodeAt(o);if(OG(i)&&(i|=32),i!==n)return!1}return!0}function BG(e,t){for(;t<e.length&&PG(e.charCodeAt(t));t++);return t}function UG(e,t){for(;t<e.length&&kG(e.charCodeAt(t));t++);return t}function VG(e,t){if(EG(RG(e,(t+=2)-1))){for(const n=Math.min(e.length,t+5);t<n&&EG(RG(e,t));t++);const n=RG(e,t);PG(n)&&(t+=jG(e,t,n))}return t}function WG(e,t){for(;t<e.length;t++){const n=e.charCodeAt(t);if(!xG(n)){if(!TG(n,RG(e,t+1)))break;t=VG(e,t)-1}}return t}function HG(e,t){let n=e.charCodeAt(t);if(43!==n&&45!==n||(n=e.charCodeAt(t+=1)),kG(n)&&(t=UG(e,t+1),n=e.charCodeAt(t)),46===n&&kG(e.charCodeAt(t+1))&&(t=UG(e,t+=2)),FG(e,t,101)){let r=0;n=e.charCodeAt(t+1),45!==n&&43!==n||(r=1,n=e.charCodeAt(t+2)),kG(n)&&(t=UG(e,t+1+r+1))}return t}function QG(e,t){for(;t<e.length;t++){const n=e.charCodeAt(t);if(41===n){t++;break}TG(n,RG(e,t+1))&&(t=VG(e,t))}return t}function qG(e){if(1===e.length&&!EG(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}const $G=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function GG(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function YG(e){const t=e.source,n=t.length,r=t.length>0?MG(t.charCodeAt(0)):0,o=GG(e.lines,n),i=GG(e.columns,n);let a=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){const r=t.charCodeAt(e);o[e]=a,i[e]=s++,10!==r&&13!==r&&12!==r||(13===r&&e+1<n&&10===t.charCodeAt(e+1)&&(e++,o[e]=a,i[e]=s),a++,s=1)}o[n]=a,i[n]=s,e.lines=o,e.columns=i,e.computed=!0}class XG{constructor(e,t,n,r){this.setSource(e,t,n,r),this.lines=null,this.columns=null}setSource(e="",t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||YG(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||YG(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}}const KG=16777215,ZG=24,JG=new Uint8Array(32);function eY(e){return 0!==JG[e]}JG[Z$]=gG,JG[mG]=gG,JG[hG]=fG,JG[vG]=yG;class tY{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){const n=(e=String(e||"")).length,r=GG(this.offsetAndType,e.length+1),o=GG(this.balance,e.length+1);let i=0,a=-1,s=0,l=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),t(e,(e,t,n)=>{const c=i++;if(r[c]=e<<ZG|n,-1===a&&(a=t),o[c]=l,e===s){const e=o[l];o[l]=c,l=e,s=JG[r[e]>>ZG]}else eY(e)&&(l=c,s=JG[e])}),r[i]=X$<<ZG|n,o[i]=i;for(let e=0;e<i;e++){const t=o[e];if(t<=e){const n=o[t];n!==e&&(o[e]=n)}else t>i&&(o[e]=i)}this.source=e,this.firstCharOffset=-1===a?0:a,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>ZG:X$}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){const n=this.offsetAndType[t]>>ZG;if(n!==sG&&n!==bG&&0===e--)return n}return X$}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&KG:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){const n=this.offsetAndType[t]>>ZG;if(n!==sG&&n!==bG&&0===e--)return t-this.tokenIndex}return X$}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&zG(this.source,this.offsetAndType[e-1]&KG,this.offsetAndType[e]&KG,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&KG:this.offsetAndType[this.tokenCount]&KG:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===rG&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===rG&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&KG,t=this.offsetAndType[t],this.tokenType=t>>ZG,this.tokenEnd=t&KG):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>ZG,this.tokenEnd=e&KG):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=X$,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===sG||this.tokenType===bG;)this.next()}skipUntilBalanced(e,t){let n=e,r=0,o=0;e:for(;n<this.tokenCount&&(r=this.balance[n],!(r<e));n++)switch(o=n>0?this.offsetAndType[n-1]&KG:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:eY(this.offsetAndType[n]>>ZG)&&(n=r)}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){const r=n,o=this.offsetAndType[t],i=o&KG;n=i,e(o>>ZG,r,i,t)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:$G[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}}function nY(e,t){function n(t){return t<a?e.charCodeAt(t):0}function r(){return c=HG(e,c),AG(n(c),n(c+1),n(c+2))?(s=aG,void(c=WG(e,c))):37===n(c)?(s=iG,void c++):void(s=oG)}function o(){const t=c;return c=WG(e,c),zG(e,t,c,"url")&&40===n(c)?(c=BG(e,c+1),34===n(c)||39===n(c)?(s=Z$,void(c=t+4)):void function(){for(s=nG,c=BG(e,c);c<e.length;c++){const t=e.charCodeAt(c);switch(IG(t)){case 41:return void c++;case LG:return c=BG(e,c),41===n(c)||c>=e.length?void(c<e.length&&c++):(c=QG(e,c),void(s=8));case 34:case 39:case 40:case 133:return c=QG(e,c),void(s=8);case 92:if(TG(t,n(c+1))){c=VG(e,c)-1;break}return c=QG(e,c),void(s=8)}}}()):40===n(c)?(s=Z$,void c++):void(s=K$)}function i(t){for(t||(t=n(c++)),s=tG;c<e.length;c++){const r=e.charCodeAt(c);switch(IG(r)){case t:return void c++;case LG:if(CG(r))return c+=jG(e,c,r),void(s=6);break;case 92:if(c===e.length-1)break;const o=n(c+1);CG(o)?c+=jG(e,c+1,o):TG(r,o)&&(c=VG(e,c)-1)}}}const a=(e=String(e||"")).length;let s,l=MG(n(0)),c=l;for(;c<a;){const a=e.charCodeAt(c);switch(IG(a)){case LG:s=sG,c=BG(e,c+1);break;case 34:i();break;case 35:xG(n(c+1))||TG(n(c+1),n(c+2))?(s=eG,c=WG(e,c+1)):(s=rG,c++);break;case 39:i();break;case 40:s=mG,c++;break;case 41:s=gG,c++;break;case 43:DG(a,n(c+1),n(c+2))?r():(s=rG,c++);break;case 44:s=pG,c++;break;case 45:DG(a,n(c+1),n(c+2))?r():45===n(c+1)&&62===n(c+2)?(s=cG,c+=3):AG(a,n(c+1),n(c+2))?o():(s=rG,c++);break;case 46:DG(a,n(c+1),n(c+2))?r():(s=rG,c++);break;case 47:42===n(c+1)?(s=bG,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(s=rG,c++);break;case 58:s=uG,c++;break;case 59:s=dG,c++;break;case 60:33===n(c+1)&&45===n(c+2)&&45===n(c+3)?(s=lG,c+=4):(s=rG,c++);break;case 64:AG(n(c+1),n(c+2),n(c+3))?(s=J$,c=WG(e,c+1)):(s=rG,c++);break;case 91:s=hG,c++;break;case 92:TG(a,n(c+1))?o():(s=rG,c++);break;case 93:s=fG,c++;break;case 123:s=vG,c++;break;case 125:s=yG,c++;break;case 131:r();break;case 132:o();break;default:s=rG,c++}t(s,l,l=c)}}let rY=null;class oY{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return oY.createItem(e)}allocateCursor(e,t){let n;return null!==rY?(n=rY,rY=rY.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){const{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=rY,rY=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;null!==o;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){const e=oY.createItem(n);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){const n=this.allocateCursor(null,this.head);for(;null!==n.next;){const r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){const n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){const r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r,o=this.allocateCursor(null,this.head),i=t;for(;null!==o.next;)r=o.next,o.next=r.next,i=e.call(n,i,r.data,r,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r,o=this.allocateCursor(this.tail,null),i=t;for(;null!==o.prev;)r=o.prev,o.prev=r.prev,i=e.call(n,i,r.data,r,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){const n=new oY;for(let r=this.head;null!==r;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){const n=new oY;for(let r=this.head;null!==r;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(null===e)return;const r=this.allocateCursor(null,e);for(;null!==r.next;){const e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(null===e)return;const r=this.allocateCursor(e,null);for(;null!==r.prev;){const e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const e=new oY;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(oY.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(oY.createItem(e))}insert(e,t=null){if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(oY.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(oY.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(oY.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}}function iY(e,t){const n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}function aY({source:e,line:t,column:n,baseLine:r,baseColumn:o},i){function a(e,t){return s.slice(e,t).map((t,n)=>String(e+n+1).padStart(u)+" |"+t).join("\n")}const s=("\n".repeat(Math.max(r-1,0))+" ".repeat(Math.max(o-1,0))+e).split(/\r\n?|\n|\f/),l=Math.max(1,t-i)-1,c=Math.min(t+i,s.length+1),u=Math.max(4,String(c).length)+1;let d=0;(n+=3*(s[t-1].substr(0,n-1).match(/\t/g)||[]).length)>100&&(d=n-60+3,n=58);for(let e=l;e<=c;e++)e>=0&&e<s.length&&(s[e]=s[e].replace(/\t/g," "),s[e]=(d>0&&s[e].length>d?"…":"")+s[e].substr(d,98)+(s[e].length>d+100-1?"…":""));return[a(l,t),new Array(n+u+2).join("-")+"^",a(t,c)].filter(Boolean).join("\n").replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function sY(e,t,n,r,o,i=1,a=1){return Object.assign(iY("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment:e=>aY({source:t,line:r,column:o,baseLine:i,baseColumn:a},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+aY({source:t,line:r,column:o,baseLine:i,baseColumn:a},2)}})}function lY(e){const t=this.createList();let n=!1;const r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case bG:this.next();continue;case sG:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(void 0===o)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}const cY=()=>{};function uY(e){return function(){return this[e]()}}function dY(e){const t=Object.create(null);for(const n of Object.keys(e)){const r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}var pY=o(1527);const hY=new Set(["Atrule","Selector","Declaration"]),fY=(e,t)=>{if(e===rG&&(e=t),"string"==typeof e){const t=e.charCodeAt(0);return t>127?32768:t<<8}return e},mY=[[K$,K$],[K$,Z$],[K$,nG],[K$,8],[K$,"-"],[K$,oG],[K$,iG],[K$,aG],[K$,cG],[K$,mG],[J$,K$],[J$,Z$],[J$,nG],[J$,8],[J$,"-"],[J$,oG],[J$,iG],[J$,aG],[J$,cG],[eG,K$],[eG,Z$],[eG,nG],[eG,8],[eG,"-"],[eG,oG],[eG,iG],[eG,aG],[eG,cG],[aG,K$],[aG,Z$],[aG,nG],[aG,8],[aG,"-"],[aG,oG],[aG,iG],[aG,aG],[aG,cG],["#",K$],["#",Z$],["#",nG],["#",8],["#","-"],["#",oG],["#",iG],["#",aG],["#",cG],["-",K$],["-",Z$],["-",nG],["-",8],["-","-"],["-",oG],["-",iG],["-",aG],["-",cG],[oG,K$],[oG,Z$],[oG,nG],[oG,8],[oG,oG],[oG,iG],[oG,aG],[oG,"%"],[oG,cG],["@",K$],["@",Z$],["@",nG],["@",8],["@","-"],["@",cG],[".",oG],[".",iG],[".",aG],["+",oG],["+",iG],["+",aG],["/","*"]],gY=mY.concat([[K$,eG],[aG,eG],[eG,eG],[J$,mG],[J$,tG],[J$,uG],[iG,iG],[iG,aG],[iG,Z$],[iG,"-"],[gG,K$],[gG,Z$],[gG,iG],[gG,aG],[gG,eG],[gG,"-"]]);function vY(e){const t=new Set(e.map(([e,t])=>fY(e)<<16|fY(t)));return function(e,n,r){const o=fY(n,r),i=r.charCodeAt(0);return(45===i&&n!==K$&&n!==Z$&&n!==cG||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",sG,!0),o}}const yY=vY(mY),bY=vY(gY);function wY(e,t){if("function"==typeof t){let n=null;return void e.children.forEach(e=>{null!==n&&t.call(this,n),this.node(e),n=e})}e.children.forEach(this.node,this)}function kY(e){nY(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}const{hasOwnProperty:EY}=Object.prototype,OY=function(){};function SY(e){return"function"==typeof e?e:OY}function xY(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function _Y(e,t){const n=t.structure,r=[];for(const e in n){if(!1===EY.call(n,e))continue;let t=n[e];const o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(const e of t)null===e?o.nullable=!0:"string"==typeof e?o.type="node":Array.isArray(e)&&(o.type="list");o.type&&r.push(o)}return r.length?{context:t.walkContext,fields:r}:null}function CY(e,t){const n=e.fields.slice(),r=e.context,o="string"==typeof r;return t&&n.reverse(),function(e,i,a,s){let l;o&&(l=i[r],i[r]=e);for(const r of n){const n=e[r.name];if(!r.nullable||n)if("list"===r.type){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(a(n))return!0}o&&(i[r]=l)}}function PY({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function TY(e){return e}function AY(e,t,n,r){let o;switch(e.type){case"Group":o=function(e,t,n,r){const o=" "===e.combinator||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(e=>AY(e,t,n,r)).join(o);return e.explicit||n?(r||","===i[0]?"[":"[ ")+i+(r?"]":" ]"):i}(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return AY(e.term,t,n,r)+t(function(e){const{min:t,max:n,comma:r}=e;return 0===t&&0===n?r?"#?":"*":0===t&&1===n?"?":1===t&&0===n?r?"#":"+":1===t&&1===n?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(0!==n?n:"")+"}")}(e),e);case"Boolean":o="<boolean-expr["+AY(e.term,t,n,r)+"]>";break;case"Type":o="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function DY(e,t){let n=TY,r=!1,o=!1;return"function"==typeof t?n=t:t&&(r=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(n=t.decorate)),AY(e,n,r,o)}const MY={offset:0,line:1,column:1};function NY(e,t){const n=e&&e.loc&&e.loc[t];return n?"line"in n?LY(n):n:null}function LY({offset:e,line:t,column:n},r){const o={offset:e,line:t,column:n};if(r){const e=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=e.length-1,o.column=1===e.length?o.column+r.length:e.pop().length+1}return o}const IY=function(e,t){const n=iY("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},RY=function(e,t,n,r){const o=iY("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:s,start:l,end:c}=function(e,t){const n=e.tokens,r=e.longestMatch,o=r<n.length&&n[r].node||null,i=o!==t?o:null;let a,s,l=0,c=0,u=0,d="";for(let e=0;e<n.length;e++){const t=n[e].value;e===r&&(c=t.length,l=d.length),null!==i&&n[e].node===i&&(e<=r?u++:u=0),d+=t}return r===n.length||u>1?(a=NY(i||t,"end")||LY(MY,d),s=LY(a)):(a=NY(i,"start")||LY(NY(t,"start")||MY,d.slice(0,l)),s=NY(i,"end")||LY(a,d.substr(l,c))),{css:d,mismatchOffset:l,mismatchLength:c,start:a,end:s}}(r,n);return o.rawMessage=e,o.syntax=t?DY(t):"<generic>",o.css=i,o.mismatchOffset=a,o.mismatchLength=s,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"<empty string>")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},jY=new Map,FY=new Map,zY=45,BY=function(e){if(jY.has(e))return jY.get(e);const t=e.toLowerCase();let n=jY.get(t);if(void 0===n){const e=VY(t,0),r=e?"":WY(t,0);n=Object.freeze({basename:t.substr(r.length),name:t,prefix:r,vendor:r,custom:e})}return jY.set(e,n),n},UY=function(e){if(FY.has(e))return FY.get(e);let t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");const r=VY(t,n.length);if(!r&&(t=t.toLowerCase(),FY.has(t))){const n=FY.get(t);return FY.set(e,n),n}const o=r?"":WY(t,n.length),i=t.substr(0,n.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return FY.set(e,a),a};function VY(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===zY&&e.charCodeAt(t+1)===zY}function WY(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===zY&&e.charCodeAt(t+1)!==zY){const n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}const HY=["initial","inherit","unset","revert","revert-layer"],QY=45,qY=!0;function $Y(e,t){return null!==e&&e.type===rG&&e.value.charCodeAt(0)===t}function GY(e,t,n){for(;null!==e&&(e.type===sG||e.type===bG);)e=n(++t);return t}function YY(e,t,n,r){if(!e)return 0;const o=e.value.charCodeAt(t);if(43===o||o===QY){if(n)return 0;t++}for(;t<e.value.length;t++)if(!kG(e.value.charCodeAt(t)))return 0;return r+1}function XY(e,t,n){let r=!1,o=GY(e,t,n);if(null===(e=n(o)))return t;if(e.type!==oG){if(!$Y(e,43)&&!$Y(e,QY))return t;if(r=!0,o=GY(n(++o),o,n),null===(e=n(o))||e.type!==oG)return 0}if(!r){const t=e.value.charCodeAt(0);if(43!==t&&t!==QY)return 0}return YY(e,r?0:1,r,o)}function KY(e,t){return null!==e&&e.type===rG&&e.value.charCodeAt(0)===t}function ZY(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){const i=e.value.charCodeAt(o);if(45===i&&n&&0!==r)return ZY(e,t+r+1,!1),6;if(!EG(i))return 0;if(++r>6)return 0}return r}function JY(e,t,n){if(!e)return 0;for(;KY(n(t),63);){if(++e>6)return 0;t++}return t}const eX=["calc(","-moz-calc(","-webkit-calc("],tX=new Map([[Z$,gG],[mG,gG],[hG,fG],[vG,yG]]);function nX(e,t){return t<e.length?e.charCodeAt(t):0}function rX(e,t){return zG(e,0,e.length,t)}function oX(e,t){for(let n=0;n<t.length;n++)if(rX(e,t[n]))return!0;return!1}function iX(e,t){return t===e.length-2&&92===nX(e,t)&&kG(nX(e,t+1))}function aX(e,t,n){if(e&&"Range"===e.type){const r=Number(void 0!==n&&n!==t.length?t.substr(0,n):t);if(isNaN(r))return!0;if(null!==e.min&&r<e.min&&"string"!=typeof e.min)return!0;if(null!==e.max&&r>e.max&&"string"!=typeof e.max)return!0}return!1}function sX(e){return function(t,n,r){return null===t?0:t.type===Z$&&oX(t.value,eX)?function(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case yG:case gG:case fG:if(e.type!==n)break e;if(n=r.pop(),0===r.length){o++;break e}break;case Z$:case mG:case hG:case vG:r.push(n),n=tX.get(e.type)}o++}while(e=t(o));return o}(t,n):e(t,n,r)}}function lX(e){return function(t){return null===t||t.type!==e?0:1}}function cX(e){return null===e||e.type!==K$||45!==nX(e.value,0)||45!==nX(e.value,1)?0:1}function uX(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||t.type!==aG)return 0;const o=HG(t.value,0);if(null!==e){const n=t.value.indexOf("\\",o),r=-1!==n&&iX(t.value,n)?t.value.substring(o,n):t.value.substr(o);if(!1===e.has(r.toLowerCase()))return 0}return aX(r,t.value,o)?0:1}}function dX(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===oG&&0===Number(t.value)?1:e(t,n,r)}}const pX={"ident-token":lX(K$),"function-token":lX(Z$),"at-keyword-token":lX(J$),"hash-token":lX(eG),"string-token":lX(tG),"bad-string-token":lX(6),"url-token":lX(nG),"bad-url-token":lX(8),"delim-token":lX(rG),"number-token":lX(oG),"percentage-token":lX(iG),"dimension-token":lX(aG),"whitespace-token":lX(sG),"CDO-token":lX(lG),"CDC-token":lX(cG),"colon-token":lX(uG),"semicolon-token":lX(dG),"comma-token":lX(pG),"[-token":lX(hG),"]-token":lX(fG),"(-token":lX(mG),")-token":lX(gG),"{-token":lX(vG),"}-token":lX(yG)},hX={string:lX(tG),ident:lX(K$),percentage:sX(function(e,t,n){return null===e||e.type!==iG||aX(n,e.value,e.value.length-1)?0:1}),zero:dX(),number:sX(function(e,t,n){if(null===e)return 0;const r=HG(e.value,0);return r===e.value.length||iX(e.value,r)?aX(n,e.value,r)?0:1:0}),integer:sX(function(e,t,n){if(null===e||e.type!==oG)return 0;let r=43===nX(e.value,0)||45===nX(e.value,0)?1:0;for(;r<e.value.length;r++)if(!kG(nX(e.value,r)))return 0;return aX(n,e.value,r)?0:1}),"custom-ident":function(e){if(null===e||e.type!==K$)return 0;const t=e.value.toLowerCase();return oX(t,HY)||rX(t,"default")?0:1},"dashed-ident":cX,"custom-property-name":function(e){return cX(e)?"--"===e.value?0:1:0},"hex-color":function(e){if(null===e||e.type!==eG)return 0;const t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(let n=1;n<t;n++)if(!EG(nX(e.value,n)))return 0;return 1},"id-selector":function(e){return null===e||e.type!==eG?0:AG(nX(e.value,1),nX(e.value,2),nX(e.value,3))?1:0},"an-plus-b":function(e,t){let n=0;if(!e)return 0;if(e.type===oG)return YY(e,0,!1,n);if(e.type===K$&&e.value.charCodeAt(0)===QY){if(!FG(e.value,1,110))return 0;switch(e.value.length){case 2:return XY(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==QY?0:(n=GY(t(++n),n,t),YY(e=t(n),0,qY,n));default:return e.value.charCodeAt(2)!==QY?0:YY(e,3,qY,n)}}else if(e.type===K$||$Y(e,43)&&t(n+1).type===K$){if(e.type!==K$&&(e=t(++n)),null===e||!FG(e.value,0,110))return 0;switch(e.value.length){case 1:return XY(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==QY?0:(n=GY(t(++n),n,t),YY(e=t(n),0,qY,n));default:return e.value.charCodeAt(1)!==QY?0:YY(e,2,qY,n)}}else if(e.type===aG){let r=e.value.charCodeAt(0),o=43===r||r===QY?1:0,i=o;for(;i<e.value.length&&kG(e.value.charCodeAt(i));i++);return i===o?0:FG(e.value,i,110)?i+1===e.value.length?XY(t(++n),n,t):e.value.charCodeAt(i+1)!==QY?0:i+2===e.value.length?(n=GY(t(++n),n,t),YY(e=t(n),0,qY,n)):YY(e,i+2,qY,n):0}return 0},urange:function(e,t){let n=0;if(null===e||e.type!==K$||!FG(e.value,0,117))return 0;if(null===(e=t(++n)))return 0;if(KY(e,43))return null===(e=t(++n))?0:e.type===K$?JY(ZY(e,0,!0),++n,t):KY(e,63)?JY(1,++n,t):0;if(e.type===oG){const r=ZY(e,1,!0);return 0===r?0:null===(e=t(++n))?n:e.type===aG||e.type===oG?function(e){return 45===e.value.charCodeAt(0)}(e)&&ZY(e,1,!1)?n+1:0:JY(r,n,t)}return e.type===aG?JY(ZY(e,1,!0),++n,t):0},"declaration-value":function(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case yG:case gG:case fG:if(e.type!==n)break e;n=r.pop();break;case dG:if(0===n)break e;break;case rG:if(0===n&&"!"===e.value)break e;break;case Z$:case mG:case hG:case vG:r.push(n),n=tX.get(e.type)}o++}while(e=t(o));return o},"any-value":function(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case yG:case gG:case fG:if(e.type!==n)break e;n=r.pop();break;case Z$:case mG:case hG:case vG:r.push(n),n=tX.get(e.type)}o++}while(e=t(o));return o}};function fX(e){const{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:a,semitones:s,time:l}=e||{};return{dimension:sX(uX(null)),angle:sX(uX(t)),decibel:sX(uX(n)),frequency:sX(uX(r)),flex:sX(uX(o)),length:sX(dX(uX(i))),resolution:sX(uX(a)),semitones:sX(uX(s)),time:sX(uX(l))}}const mX=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],gX=["deg","grad","rad","turn"],vX=["s","ms"],yX=["hz","khz"],bX=["dpi","dpcm","dppx","x"],wX=["fr"],kX=["db"],EX=["st"];function OX(e,t,n){return Object.assign(iY("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((n||t.length)+1).join("-")+"^"})}const SX=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0);class xX{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}isNameCharCode(e=this.charCode()){return e<128&&1===SX[e]}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}skipWs(){this.pos=this.findWsEnd(this.pos)}findWsEnd(e){for(;e<this.str.length;e++){const t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new OX(e,this.str,this.pos)}scanSpaces(){return this.substringToPos(this.findWsEnd(this.pos))}scanWord(){let e=this.pos;for(;e<this.str.length;e++){const t=this.str.charCodeAt(e);if(t>=128||0===SX[t])break}return this.pos===e&&this.error("Expect a keyword"),this.substringToPos(e)}scanNumber(){let e=this.pos;for(;e<this.str.length;e++){const t=this.str.charCodeAt(e);if(t<48||t>57)break}return this.pos===e&&this.error("Expect a number"),this.substringToPos(e)}scanString(){const e=this.str.indexOf("'",this.pos+1);return-1===e&&(this.pos=this.str.length,this.error("Expect an apostrophe")),this.substringToPos(e+1)}}const _X=123,CX={" ":1,"&&":2,"||":3,"|":4};function PX(e){let t=null,n=null;return e.eat(_X),e.skipWs(),t=e.scanNumber(e),e.skipWs(),44===e.charCode()?(e.pos++,e.skipWs(),125!==e.charCode()&&(n=e.scanNumber(e),e.skipWs())):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function TX(e,t){const n=function(e){let t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,e.charCode()===_X?t=PX(e):63===e.charCode()?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case _X:t=PX(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,35===e.charCode()&&43===e.charCodeAt(e.pos-1)?TX(e,n):n):t}function AX(e){const t=e.peek();return""===t?null:TX(e,{type:"Token",value:t})}function DX(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((e,t)=>CX[e]-CX[t]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){const t=e[o];"Combinator"===t.type&&(t.value===r?(-1===i&&(i=o-1),e.splice(o,1),o--):(-1!==i&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function MX(e,t){const n=Object.create(null),r=[];let o,i=null,a=e.pos;for(;e.charCode()!==t&&(o=NX(e,t));)"Spaces"!==o.type&&("Combinator"===o.type?(null!==i&&"Combinator"!==i.type||(e.pos=a,e.error("Unexpected combinator")),n[o.value]=!0):null!==i&&"Combinator"!==i.type&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(o),i=o,a=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=a,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:DX(r,n)||" ",disallowEmpty:!1,explicit:!1}}function NX(e,t){let n=e.charCode();switch(n){case 93:break;case 91:return TX(e,function(e,t){let n;return e.eat(91),n=MX(e,t),e.eat(93),n.explicit=!0,33===e.charCode()&&(e.pos++,n.disallowEmpty=!0),n}(e,t));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=e.scanWord(),e.eat(39),e.eat(62),TX(e,{type:"Property",name:t})}(e):function(e){let t,n=null;if(e.eat(60),t=e.scanWord(),"boolean-expr"===t){e.eat(91);const t=MX(e,93);return e.eat(93),e.eat(62),TX(e,{type:"Boolean",term:1===t.terms.length?t.terms[0]:t})}return 40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(e.skipWs(),n=function(e){let t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():(t=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(t+=e.scanWord())),e.skipWs(),e.eat(44),e.skipWs(),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(e.scanNumber(e)),e.isNameCharCode()&&(n+=e.scanWord())),e.eat(93),{type:"Range",min:t,max:n}}(e)),e.eat(62),TX(e,{type:"Type",name:t,opts:n})}(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return TX(e,{type:"String",value:e.scanString()});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:e.scanSpaces()};case 64:return n=e.nextCharCode(),e.isNameCharCode(n)?(e.pos++,{type:"AtKeyword",name:e.scanWord()}):AX(e);case 42:case 43:case 63:case 35:case 33:break;case _X:if(n=e.nextCharCode(),n<48||n>57)return AX(e);break;default:return e.isNameCharCode(n)?function(e){const t=e.scanWord();return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):TX(e,{type:"Keyword",name:t})}(e):AX(e)}}function LX(e){const t=new xX(e),n=MX(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}const IX=function(){};const RX={decorator(e){const t=[];let n=null;return{...e,node(t){const r=n;n=t,e.node.call(this,t),n=r},emit(e,r,o){t.push({type:r,value:e,node:o?null:n})},result:()=>t}}};const jX={type:"Match"},FX={type:"Mismatch"},zX={type:"DisallowEmpty"};function BX(e,t,n){return t===jX&&n===FX||e===jX&&t===jX&&n===jX?e:("If"===e.type&&e.else===FX&&t===jX&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function UX(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function VX(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&UX(e.name)}function WX(e,t=" ",n=!1){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:n}}function HX(e,t,n=new Set){if(!n.has(e))switch(n.add(e),e.type){case"If":e.match=HX(e.match,t,n),e.then=HX(e.then,t,n),e.else=HX(e.else,t,n);break;case"Type":return t[e.name]||e}return e}function QX(e,t,n){switch(e){case" ":{let e=jX;for(let n=t.length-1;n>=0;n--)e=BX(t[n],e,FX);return e}case"|":{let e=FX,n=null;for(let r=t.length-1;r>=0;r--){let o=t[r];if(VX(o)&&(null===n&&r>0&&VX(t[r-1])&&(n=Object.create(null),e=BX({type:"Enum",map:n},jX,e)),null!==n)){const e=(UX(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(e in n==0){n[e]=o;continue}}n=null,e=BX(o,jX,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=FX;for(let r=t.length-1;r>=0;r--){const o=t[r];let i;i=t.length>1?QX(e,t.filter(function(e){return e!==o}),!1):jX,n=BX(o,i,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?jX:FX;for(let n=t.length-1;n>=0;n--){const o=t[n];let i;i=t.length>1?QX(e,t.filter(function(e){return e!==o}),!0):jX,r=BX(o,i,r)}return r}}}function qX(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=QX(e.combinator,e.terms.map(qX),!1);return e.disallowEmpty&&(t=BX(t,zX,FX)),t}case"Multiplier":return function(e){let t=jX,n=qX(e.term);if(0===e.max)n=BX(n,zX,FX),t=BX(n,null,FX),t.then=BX(jX,jX,t),e.comma&&(t.then.else=BX({type:"Comma",syntax:e},t,FX));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==jX&&(t=BX({type:"Comma",syntax:e},t,FX)),t=BX(n,BX(jX,jX,t),FX);if(0===e.min)t=BX(jX,jX,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==jX&&(t=BX({type:"Comma",syntax:e},t,FX)),t=BX(n,t,FX);return t}(e);case"Boolean":{const t=qX(e.term),n=qX(WX([WX([{type:"Keyword",name:"not"},{type:"Type",name:"!boolean-group"}]),WX([{type:"Type",name:"!boolean-group"},WX([{type:"Multiplier",comma:!1,min:0,max:0,term:WX([{type:"Keyword",name:"and"},{type:"Type",name:"!boolean-group"}])},{type:"Multiplier",comma:!1,min:0,max:0,term:WX([{type:"Keyword",name:"or"},{type:"Type",name:"!boolean-group"}])}],"|")])],"|")),r=qX(WX([{type:"Type",name:"!term"},WX([{type:"Token",value:"("},{type:"Type",name:"!self"},{type:"Token",value:")"}]),{type:"Type",name:"general-enclosed"}],"|"));return HX(r,{"!term":t,"!self":n}),HX(n,{"!boolean-group":r}),n}case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function $X(e,t){return"string"==typeof e&&(e=LX(e)),{type:"MatchGraph",match:qX(e),syntax:t||null,source:e}}const{hasOwnProperty:GX}=Object.prototype,YX="Match";let XX=0;function KX(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const r=t.charCodeAt(n);let o=e.charCodeAt(n);if(o>=65&&o<=90&&(o|=32),o!==r)return!1}return!0}function ZX(e){return null===e||e.type===pG||e.type===Z$||e.type===mG||e.type===hG||e.type===vG||function(e){return e.type===rG&&"?"!==e.value}(e)}function JX(e){return null===e||e.type===gG||e.type===fG||e.type===yG||e.type===rG&&"/"===e.value}function eK(e,t,n){const r=function(e,t,n){function r(){do{y++,v=y<e.length?e[y]:null}while(null!==v&&(v.type===sG||v.type===bG))}function o(t){const n=y+t;return n<e.length?e[n]:null}function i(e,t){return{nextState:e,matchStack:w,syntaxStack:d,thenStack:p,tokenIndex:y,prev:t}}function a(e){p={nextState:e,matchStack:w,syntaxStack:d,prev:p}}function s(e){h=i(e,h)}function l(){w={type:1,syntax:t.syntax,token:v,prev:w},r(),f=null,y>b&&(b=y)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||null!==d&&d.opts||null,prev:d},w={type:2,syntax:t.syntax,token:w.token,prev:w}}function u(){w=2===w.type?w.prev:{type:3,syntax:d.syntax,token:w.token,prev:w},d=d.prev}let d=null,p=null,h=null,f=null,m=0,g=null,v=null,y=-1,b=0,w={type:0,syntax:null,token:null,prev:null};for(r();null===g&&++m<15e3;)switch(t.type){case"Match":if(null===p){if(null!==v&&(y!==e.length-1||"\\0"!==v.value&&"\\9"!==v.value)){t=FX;break}g=YX;break}if((t=p.nextState)===zX){if(p.matchStack===w){t=FX;break}t=jX}for(;p.syntaxStack!==d;)u();p=p.prev;break;case"Mismatch":if(null!==f&&!1!==f)(null===h||y>h.tokenIndex)&&(h=f,f=!1);else if(null===h){g="Mismatch";break}t=h.nextState,p=h.thenStack,d=h.syntaxStack,w=h.matchStack,y=h.tokenIndex,v=y<e.length?e[y]:null,h=h.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==FX&&s(t.else),t.then!==jX&&a(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{const e=t.syntax.terms;if(t.index===e.length){if(0===t.mask||t.syntax.all){t=FX;break}t=jX;break}if(t.mask===(1<<e.length)-1){t=jX;break}for(;t.index<e.length;t.index++){const n=1<<t.index;if(0===(t.mask&n)){s(t),a({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|n}),t=e[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==v){let e=v.value.toLowerCase();if(-1!==e.indexOf("\\")&&(e=e.replace(/\\[09].*$/,"")),GX.call(t.map,e)){t=t.map[e];break}}t=FX;break;case"Generic":{const e=null!==d?d.opts:null,n=y+Math.floor(t.fn(v,o,e));if(!isNaN(n)&&n>y){for(;y<n;)l();t=jX}else t=FX;break}case"Type":case"Property":{const e="Type"===t.type?"types":"properties",r=GX.call(n,e)?n[e][t.name]:null;if(!r||!r.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==f&&null!==v&&"Type"===t.type&&("custom-ident"===t.name&&v.type===K$||"length"===t.name&&"0"===v.value)){null===f&&(f=i(t,h)),t=FX;break}c(),t=r.matchRef||r.match;break}case"Keyword":{const e=t.name;if(null!==v){let n=v.value;if(-1!==n.indexOf("\\")&&(n=n.replace(/\\[09].*$/,"")),KX(n,e)){l(),t=jX;break}}t=FX;break}case"AtKeyword":case"Function":if(null!==v&&KX(v.value,t.name)){l(),t=jX;break}t=FX;break;case"Token":if(null!==v&&v.value===t.value){l(),t=jX;break}t=FX;break;case"Comma":null!==v&&v.type===pG?ZX(w.token)?t=FX:(l(),t=JX(v)?FX:jX):t=ZX(w.token)||JX(v)?jX:FX;break;case"String":let r="",m=y;for(;m<e.length&&r.length<t.value.length;m++)r+=e[m].value;if(KX(r,t.value)){for(;y<m;)l();t=jX}else t=FX;break;default:throw new Error("Unknown node type: "+t.type)}switch(XX+=m,g){case null:console.warn("[csstree-match] BREAK after 15000 iterations"),g="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",w=null;break;case YX:for(;null!==d;)u();break;default:w=null}return{tokens:e,reason:g,iterations:m,match:w,longestMatch:b}}(e,t,n||{});if(null===r.match)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]};const a=[i];for(o=function(e){let t=null,n=null,r=e;for(;null!==r;)n=r.prev,r.prev=t,t=r,r=n;return t}(o).prev;null!==o;){switch(o.type){case 2:i.match.push(i={syntax:o.syntax,match:[]}),a.push(i);break;case 3:a.pop(),i=a[a.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}function tK(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}let n=null;return null!==this.matched&&function r(o){if(Array.isArray(o.match)){for(let e=0;e<o.match.length;e++)if(r(o.match[e]))return t(o.syntax)&&n.unshift(o.syntax),!0}else if(o.node===e)return n=t(o.syntax)?[o.syntax]:[],!0;return!1}(this.matched),n}function nK(e,t){return iK(this,e,e=>"Type"===e.type&&e.name===t)}function rK(e,t){return iK(this,e,e=>"Property"===e.type&&e.name===t)}function oK(e){return iK(this,e,e=>"Keyword"===e.type)}function iK(e,t,n){const r=tK.call(e,t);return null!==r&&r.some(n)}function aK(e){return"node"in e?e.node:aK(e.match[0])}function sK(e){return"node"in e?e.node:sK(e.match[e.match.length-1])}function lK(e,t,n,r,o){const i=[];return null!==n.matched&&function n(a){if(null!==a.syntax&&a.syntax.type===r&&a.syntax.name===o){const n=aK(a),r=sK(a);e.syntax.walk(t,function(e,t,o){if(e===n){const e=new oY;do{if(e.appendData(t.data),t.data===r)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}})}Array.isArray(a.match)&&a.match.forEach(n)}(n.matched),i}const{hasOwnProperty:cK}=Object.prototype;function uK(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function dK(e){return Boolean(e)&&uK(e.offset)&&uK(e.line)&&uK(e.column)}function pK(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(!1!==cK.call(n,o)){if("type"===o)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===o){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!=typeof n.loc.source)o+=".source";else if(dK(n.loc.start)){if(dK(n.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e<t[o].length;e++){const r=t[o][e];switch(r){case String:i="string"==typeof n[o];break;case Boolean:i="boolean"==typeof n[o];break;case null:i=null===n[o];break;default:"string"==typeof r?i=n[o]&&n[o].type===r:Array.isArray(r)&&(i=n[o]instanceof oY)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(const o in t)cK.call(t,o)&&!1===cK.call(n,o)&&r(n,"Field `"+e+"."+o+"` is missed")}}function hK(e,t){const n=[];for(let r=0;r<e.length;r++){const o=e[r];if(o===String||o===Boolean)n.push(o.name.toLowerCase());else if(null===o)n.push("null");else if("string"==typeof o)n.push(o);else{if(!Array.isArray(o))throw new Error("Wrong value `"+o+"` in `"+t+"` structure definition");n.push("List<"+(hK(o,t)||"any")+">")}}return n.join(" | ")}function fK(e,t){const n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(const t in n){if(!1===cK.call(n,t))continue;const i=r[t]=Array.isArray(n[t])?n[t].slice():[n[t]];o[t]=hK(i,e+"."+t)}return{docs:o,check:pK(e,r)}}function mK(e,t,n){const r={};for(const o in e)e[o].syntax&&(r[o]=n?e[o].syntax:DY(e[o].syntax,{compact:t}));return r}function gK(e,t,n){const r={};for(const[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:DY(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&mK(i.descriptors,t,n)};return r}function vK(e,t,r){return{matched:e,iterations:r,error:t,...n}}function yK(e,t,n,r){const o=function(e,t){return"string"==typeof e?function(e){const t=[];return nY(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}(e):t.generate(e,RX)}(n,e.syntax);let i;return function(e){for(let t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(o)?vK(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=eK(o,e.cssWideKeywordsSyntax,e)),r&&i.match||(i=eK(o,t.match,e),i.match)?vK(i.match,null,i.iterations):vK(null,new RY(i.reason,t.syntax,n,i),i.iterations))}class bK{constructor(e,n,r){if(this.cssWideKeywords=HY,this.syntax=n,this.generic=!1,this.units={...t},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||function(e){const t={};if(e.node)for(const n in e.node)if(cK.call(e.node,n)){const r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=fK(n,r)}return t}(e),e){if(e.cssWideKeywords&&(this.cssWideKeywords=e.cssWideKeywords),e.units)for(const n of Object.keys(t))Array.isArray(e.units[n])&&(this.units[n]=e.units[n]);if(e.types)for(const[t,n]of Object.entries(e.types))this.addType_(t,n);if(e.generic){this.generic=!0;for(const[e,t]of Object.entries((o=this.units,{...pX,...hX,...fX(o)})))this.addType_(e,t)}if(e.atrules)for(const[t,n]of Object.entries(e.atrules))this.addAtrule_(t,n);if(e.properties)for(const[t,n]of Object.entries(e.properties))this.addProperty_(t,n)}var o;this.cssWideKeywordsSyntax=$X(this.cssWideKeywords.join(" | "))}checkStructure(e){function t(e,t){r.push({node:e,message:t})}const n=this.structure,r=[];return this.syntax.walk(e,function(e){n.hasOwnProperty(e.type)?n[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")}),!!r.length&&r}createDescriptor(e,t,n,r=null){const o={type:t,name:n},i={type:t,name:n,parent:r,serializable:"string"==typeof e||e&&"string"==typeof e.type,syntax:null,match:null,matchRef:null};return"function"==typeof e?i.match=$X(e,o):("string"==typeof e?Object.defineProperty(i,"syntax",{get:()=>(Object.defineProperty(i,"syntax",{value:LX(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:$X(i.syntax,o)}),i.match)}),"Property"===t&&Object.defineProperty(i,"matchRef",{get(){const e=i.syntax,t=function(e){const t=e.terms[0];return!1===e.explicit&&1===e.terms.length&&"Multiplier"===t.type&&!0===t.comma}(e)?$X({...e,terms:[e.terms[0].term]},o):null;return Object.defineProperty(i,"matchRef",{value:t}),t}})),i}addAtrule_(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new IY("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){const n=this.checkAtruleName(e);if(n)return n;const r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||yK(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){const n=this.checkAtruleName(e);if(n)return n;const r=this.getAtrule(e),o=BY(t);return r.descriptors?r.descriptors[o.name]||r.descriptors[o.basename]?void 0:new IY("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new IY("Unknown property",e)}matchAtrulePrelude(e,t){const n=this.checkAtrulePrelude(e,t);if(n)return vK(null,n);const r=this.getAtrule(e);return r.prelude?yK(this,r.prelude,t||"",!1):vK(null,null)}matchAtruleDescriptor(e,t,n){const r=this.checkAtruleDescriptorName(e,t);if(r)return vK(null,r);const o=this.getAtrule(e),i=BY(t);return yK(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return"Declaration"!==e.type?vK(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(UY(e).custom)return vK(null,new Error("Lexer matching doesn't applicable for custom properties"));const n=this.checkPropertyName(e);return n?vK(null,n):yK(this,this.getProperty(e),t,!0)}matchType(e,t){const n=this.getType(e);return n?yK(this,n,t,!1):vK(null,new IY("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?("string"!=typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),yK(this,e,t,!1)):vK(null,new IY("Bad syntax"))}findValueFragments(e,t,n,r){return lK(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return lK(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){const r=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{r.push.apply(r,this.findDeclarationValueFragments(e,t,n))}}),r}getAtrule(e,t=!0){const n=BY(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){const n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){const n=UY(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(e,t){return t?`<${e}>`:`<'${e}'>`}function t(i,a,s,l){if(s.has(a))return s.get(a);s.set(a,!1),null!==l.syntax&&function(e,t,n){let r=IX,o=IX;if(r=t,r===IX&&o===IX)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":case"Boolean":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}o.call(n,t)}(e)}(l.syntax,function(l){if("Type"!==l.type&&"Property"!==l.type)return;const c="Type"===l.type?i.types:i.properties,u="Type"===l.type?r:o;hasOwnProperty.call(c,l.name)?t(i,l.name,u,c[l.name])&&(n.push(`${e(a,s===r)} used broken syntax definition ${e(l.name,"Type"===l.type)}`),s.set(a,!0)):(n.push(`${e(a,s===r)} used missed syntax definition ${e(l.name,"Type"===l.type)}`),s.set(a,!0))},this)}const n=[];let r=new Map,o=new Map;for(const e in this.types)t(this,e,r,this.types[e]);for(const e in this.properties)t(this,e,o,this.properties[e]);const i=[...r.keys()].filter(e=>r.get(e)),a=[...o.keys()].filter(e=>o.get(e));return i.length||a.length?{errors:n,types:i,properties:a}:null}dump(e,t){return{generic:this.generic,cssWideKeywords:this.cssWideKeywords,units:this.units,types:mK(this.types,!t,e),properties:mK(this.properties,!t,e),atrules:gK(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}}function wK(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function kK(e,t){const n=Object.create(null);for(const[r,o]of Object.entries(e))if(o){n[r]={};for(const e of Object.keys(o))t.includes(e)&&(n[r][e]=o[e])}return n}function EK(e,t){const n={...e};for(const[r,o]of Object.entries(t))switch(r){case"generic":n[r]=Boolean(o);break;case"cssWideKeywords":n[r]=e[r]?[...e[r],...o]:o||[];break;case"units":n[r]={...e[r]};for(const[e,t]of Object.entries(o))n[r][e]=Array.isArray(t)?t:[];break;case"atrules":n[r]={...e[r]};for(const[e,t]of Object.entries(o)){const o=n[r][e]||{},i=n[r][e]={prelude:o.prelude||null,descriptors:{...o.descriptors}};if(t){i.prelude=t.prelude?wK(i.prelude,t.prelude):i.prelude||null;for(const[e,n]of Object.entries(t.descriptors||{}))i.descriptors[e]=n?wK(i.descriptors[e],n):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(const[e,t]of Object.entries(o))n[r][e]=wK(n[r][e],t);break;case"scope":case"features":n[r]={...e[r]};for(const[e,t]of Object.entries(o))n[r][e]={...n[r][e],...t};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...kK(o,["parse"])};break;case"node":n[r]={...e[r],...kK(o,["name","structure","parse","generate","walkContext"])}}return n}function OK(t){const n=function(e){let t="",n="<unknown>",r=!1,o=cY,i=!1;const a=new XG,s=Object.assign(new tY,function(e){const t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:dY(e.atrule),pseudo:dY(e.pseudo),node:dY(e.node)};for(const[n,r]of Object.entries(e.parseContext))switch(typeof r){case"function":t.context[n]=r;break;case"string":t.context[n]=uY(r)}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:lY,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new oY,createSingleNodeList:e=>(new oY).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){const n=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;this.skip(n-this.tokenIndex);const r=t.call(this);return i=!0,o(e,r),i=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),t!==sG&&t!==bG)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,n)=>t.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>FG(t,e,n),cmpStr:(e,n,r)=>zG(t,e,n,r),consume(e){const t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){const e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(Z$),e},consumeNumber(e){const n=t.substring(this.tokenStart,HG(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){const t=$G[e].slice(0,-6).replace(/-/g," ").replace(/^./,e=>e.toUpperCase());let n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case K$:this.tokenType===Z$||this.tokenType===nG?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case eG:this.isDelim(35)&&(this.next(),r++,n="Name is expected");break;case iG:this.tokenType===oG&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){this.tokenType===K$&&!1!==this.lookupValue(0,e)||this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>r?a.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){const t=this.getFirstListNode(e),r=this.getLastListNode(e);return a.getLocationRange(null!==t?t.loc.start.offset-a.startOffset:this.tokenStart,null!==r?r.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(e,n){const r=void 0!==n&&n<t.length?a.getLocation(n):this.eof?a.getLocation(function(e,t){for(;t>=0&&PG(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new sY(e||"Unexpected input",t,r.offset,r.line,r.column,a.startLine,a.startColumn)}});return Object.assign(function(e,l){t=e,l=l||{},s.setSource(t,nY),a.setSource(t,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:cY,i=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);const{context:c="default",onComment:u}=l;if(c in s.context==0)throw new Error("Unknown context `"+c+"`");"function"==typeof u&&s.forEachToken((e,n,r)=>{if(e===bG){const e=s.getLocation(n,r),o=zG(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(o,e)}});const d=s.context[c].call(s,l);return s.eof||s.error(),d},{SyntaxError:sY,config:s.config})}(t),r=function(e){const t=function(e){const t={};for(const n in e.node)if(EY.call(e.node,n)){const r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=_Y(0,r)}return t}(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(const e in t)EY.call(t,e)&&null!==t[e]&&(n[e]=CY(t[e],!1),r[e]=CY(t[e],!0));const a=PY(n),s=PY(r),l=function(e,l){function c(e,t,n){const r=u.call(f,e,t,n);return r===o||r!==i&&(!(!p.hasOwnProperty(e.type)||!p[e.type](e,f,c,h))||d.call(f,e,t,n)===o)}let u=OY,d=OY,p=n,h=(e,t,n,r)=>e||c(t,n,r);const f={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=SY(l.enter),d=SY(l.leave),l.reverse&&(p=r),l.visit)){if(a.hasOwnProperty(l.visit))p=l.reverse?s[l.visit]:a[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=xY(u,l.visit),d=xY(d,l.visit)}if(u===OY&&d===OY)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let n=null;return l(e,function(e,r,i){if(t.call(this,e,r,i))return n=e,o}),n},l.findLast=function(e,t){let n=null;return l(e,{reverse:!0,enter(e,r,i){if(t.call(this,e,r,i))return n=e,o}}),n},l.findAll=function(e,t){const n=[];return l(e,function(e,r,o){t.call(this,e,r,o)&&n.push(e)}),n},l}(t),o=function(t){const n=new Map;for(let[e,r]of Object.entries(t.node))"function"==typeof(r.generate||r)&&n.set(e,r.generate||r);return function(t,r){let o="",i=0,a={node(e){if(!n.has(e.type))throw new Error("Unknown node type: "+e.type);n.get(e.type).call(s,e)},tokenBefore:bY,token(e,t){i=this.tokenBefore(i,e,t),this.emit(t,e,!1),e===rG&&92===t.charCodeAt(0)&&this.emit("\n",sG,!0)},emit(e){o+=e},result:()=>o};r&&("function"==typeof r.decorator&&(a=r.decorator(a)),r.sourceMap&&(a=function(e){const t=new pY.x,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o};let a=1,s=0,l=!1;const c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&hY.has(e.type)){const c=e.loc.start.line,u=e.loc.start.column-1;r.line===c&&r.column===u||(r.line=c,r.column=u,n.line=a,n.column=s,l&&(l=!1,n.line===o.line&&n.column===o.column||t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&hY.has(e.type)&&(o.line=a,o.column=s)};const u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(a++,s=0):s++;u(e,t,n)};const d=e.result;return e.result=function(){return l&&t.addMapping(i),{css:d(),map:t}},e}(a)),r.mode in e&&(a.tokenBefore=e[r.mode]));const s={node:e=>a.node(e),children:wY,token:(e,t)=>a.token(e,t),tokenize:kY};return a.node(t),a.result()}}(t),{fromPlainObject:i,toPlainObject:a}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&e.children instanceof oY==0&&(e.children=(new oY).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof oY&&(e.children=e.children.toArray())}}),t)}}(r),s={lexer:null,createLexer:e=>new bK(e,s,s.lexer.structure),tokenize:nY,parse:n,generate:o,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:i,toPlainObject:a,fork(e){const n=EK({},t);return OK("function"==typeof e?e(n):EK(n,e))}};return s.lexer=new bK({generic:t.generic,cssWideKeywords:t.cssWideKeywords,units:t.units,types:t.types,atrules:t.atrules,properties:t.properties,node:t.node},s),s}const SK=43,xK=45,_K=110,CK=!0,PK=!1;function TK(e,t){let n=this.tokenStart+e;const r=this.charCodeAt(n);for(r!==SK&&r!==xK||(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)kG(this.charCodeAt(n))||this.error("Integer is expected",n)}function AK(e){return TK.call(this,0,e)}function DK(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case _K:n="N is expected";break;case xK:n="HyphenMinus is expected"}this.error(n,this.tokenStart+e)}}function MK(){let e=0,t=0,n=this.tokenType;for(;n===sG||n===bG;)n=this.lookupType(++e);if(n!==oG){if(!this.isDelim(SK,e)&&!this.isDelim(xK,e))return null;t=this.isDelim(SK,e)?SK:xK;do{n=this.lookupType(++e)}while(n===sG||n===bG);n!==oG&&(this.skip(e),AK.call(this,CK))}return e>0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==SK&&n!==xK&&this.error("Number sign is expected")),AK.call(this,0!==t),t===xK?"-"+this.consume(oG):this.consume(oG)}const NK="AnPlusB",LK={a:[String,null],b:[String,null]};function IK(){const e=this.tokenStart;let t=null,n=null;if(this.tokenType===oG)AK.call(this,PK),n=this.consume(oG);else if(this.tokenType===K$&&this.cmpChar(this.tokenStart,xK))switch(t="-1",DK.call(this,1,_K),this.tokenEnd-this.tokenStart){case 2:this.next(),n=MK.call(this);break;case 3:DK.call(this,2,xK),this.next(),this.skipSC(),AK.call(this,CK),n="-"+this.consume(oG);break;default:DK.call(this,2,xK),TK.call(this,3,CK),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===K$||this.isDelim(SK)&&this.lookupType(1)===K$){let r=0;switch(t="1",this.isDelim(SK)&&(r=1,this.next()),DK.call(this,0,_K),this.tokenEnd-this.tokenStart){case 1:this.next(),n=MK.call(this);break;case 2:DK.call(this,1,xK),this.next(),this.skipSC(),AK.call(this,CK),n="-"+this.consume(oG);break;default:DK.call(this,1,xK),TK.call(this,2,CK),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===aG){const r=this.charCodeAt(this.tokenStart),o=r===SK||r===xK;let i=this.tokenStart+o;for(;i<this.tokenEnd&&kG(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),DK.call(this,i-this.tokenStart,_K),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=MK.call(this)):(DK.call(this,i-this.tokenStart+1,xK),i+2===this.tokenEnd?(this.next(),this.skipSC(),AK.call(this,CK),n="-"+this.consume(oG)):(TK.call(this,i-this.tokenStart+2,CK),this.next(),n=this.substrToCursor(i+1)))}else this.error();return null!==t&&t.charCodeAt(0)===SK&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===SK&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function RK(e){if(e.a){const t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){const n="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}function jK(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function FK(){for(let e,t=1;e=this.lookupType(t);t++){if(e===yG)return!0;if(e===vG||e===J$)return!1}return!1}const zK="Atrule",BK="atrule",UK={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function VK(e=!1){const t=this.tokenStart;let n,r,o=null,i=null;switch(this.eat(J$),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),!1===this.eof&&this.tokenType!==vG&&this.tokenType!==dG&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),jK):jK.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case dG:this.next();break;case vG:i=hasOwnProperty.call(this.atrule,r)&&"function"==typeof this.atrule[r].block?this.atrule[r].block.call(this,e):this.Block(FK.call(this))}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function WK(e){this.token(J$,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(dG,";")}const HK="AtrulePrelude",QK="atrulePrelude",qK={children:[[]]};function $K(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&this.tokenType!==vG&&this.tokenType!==dG&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function GK(e){this.children(e)}const YK=36,XK=42,KK=61,ZK=94,JK=124,eZ=126;function tZ(){this.eof&&this.error("Unexpected end of input");const e=this.tokenStart;let t=!1;return this.isDelim(XK)?(t=!0,this.next()):this.isDelim(JK)||this.eat(K$),this.isDelim(JK)?this.charCodeAt(this.tokenStart+1)!==KK?(this.next(),this.eat(K$)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function nZ(){const e=this.tokenStart,t=this.charCodeAt(e);return t!==KK&&t!==eZ&&t!==ZK&&t!==YK&&t!==XK&&t!==JK&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==KK&&(this.isDelim(KK)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}const rZ="AttributeSelector",oZ={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function iZ(){const e=this.tokenStart;let t,n=null,r=null,o=null;return this.eat(hG),this.skipSC(),t=tZ.call(this),this.skipSC(),this.tokenType!==fG&&(this.tokenType!==K$&&(n=nZ.call(this),this.skipSC(),r=this.tokenType===tG?this.String():this.Identifier(),this.skipSC()),this.tokenType===K$&&(o=this.consume(K$),this.skipSC())),this.eat(fG),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function aZ(e){this.token(rG,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(K$,e.flags),this.token(rG,"]")}const sZ=38;function lZ(){return this.Raw(null,!0)}function cZ(){return this.parseWithFallback(this.Rule,lZ)}function uZ(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function dZ(){if(this.tokenType===dG)return uZ.call(this,this.tokenIndex);const e=this.parseWithFallback(this.Declaration,uZ);return this.tokenType===dG&&this.next(),e}const pZ="Block",hZ="block",fZ={children:[["Atrule","Rule","Declaration"]]};function mZ(e){const t=e?dZ:cZ,n=this.tokenStart;let r=this.createList();this.eat(vG);e:for(;!this.eof;)switch(this.tokenType){case yG:break e;case sG:case bG:this.next();break;case J$:r.push(this.parseWithFallback(this.Atrule.bind(this,e),lZ));break;default:e&&this.isDelim(sZ)?r.push(cZ.call(this)):r.push(t.call(this))}return this.eof||this.eat(yG),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function gZ(e){this.token(vG,"{"),this.children(e,e=>{"Declaration"===e.type&&this.token(dG,";")}),this.token(yG,"}")}const vZ="Brackets",yZ={children:[[]]};function bZ(e,t){const n=this.tokenStart;let r=null;return this.eat(hG),r=e.call(this,t),this.eof||this.eat(fG),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function wZ(e){this.token(rG,"["),this.children(e),this.token(rG,"]")}const kZ="CDC",EZ=[];function OZ(){const e=this.tokenStart;return this.eat(cG),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function SZ(){this.token(cG,"--\x3e")}const xZ="CDO",_Z=[];function CZ(){const e=this.tokenStart;return this.eat(lG),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function PZ(){this.token(lG,"\x3c!--")}const TZ=46,AZ="ClassSelector",DZ={name:String};function MZ(){return this.eatDelim(TZ),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(K$)}}function NZ(e){this.token(rG,"."),this.token(K$,e.name)}const LZ=43,IZ=47,RZ=62,jZ=126,FZ="Combinator",zZ={name:String};function BZ(){const e=this.tokenStart;let t;switch(this.tokenType){case sG:t=" ";break;case rG:switch(this.charCodeAt(this.tokenStart)){case RZ:case LZ:case jZ:this.next();break;case IZ:this.next(),this.eatIdent("deep"),this.eatDelim(IZ);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function UZ(e){this.tokenize(e.name)}const VZ=42,WZ=47,HZ="Comment",QZ={value:String};function qZ(){const e=this.tokenStart;let t=this.tokenEnd;return this.eat(bG),t-e+2>=2&&this.charCodeAt(t-2)===VZ&&this.charCodeAt(t-1)===WZ&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function $Z(e){this.token(bG,"/*"+e.value+"*/")}const GZ=new Set([uG,gG,X$]),YZ="Condition",XZ={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function KZ(e){return this.lookupTypeNonSC(1)===K$&&GZ.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}const ZZ={media:KZ,container:KZ,supports(){return this.SupportsDeclaration()}};function JZ(e="media"){const t=this.createList();e:for(;!this.eof;)switch(this.tokenType){case bG:case sG:this.next();continue;case K$:t.push(this.Identifier());break;case mG:{let n=this.parseWithFallback(()=>ZZ[e].call(this,e),()=>null);n||(n=this.parseWithFallback(()=>{this.eat(mG);const t=this.Condition(e);return this.eat(gG),t},()=>this.GeneralEnclosed(e))),t.push(n);break}case Z$:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||(n=this.GeneralEnclosed(e)),t.push(n);break}default:break e}return t.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(t),kind:e,children:t}}function eJ(e){e.children.forEach(e=>{"Condition"===e.type?(this.token(mG,"("),this.node(e),this.token(gG,")")):this.node(e)})}const tJ=33,nJ=35,rJ=36,oJ=38,iJ=42,aJ=43,sJ=47;function lJ(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function cJ(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function uJ(){const e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&this.tokenType!==dG&&!1===this.isDelim(tJ)&&!1===this.isBalanceEdge(e)&&this.error(),t}const dJ="Declaration",pJ="declaration",hJ={important:[Boolean,String],property:String,value:["Value","Raw"]};function fJ(){const e=this.tokenStart,t=this.tokenIndex,n=gJ.call(this),r=VY(n),o=r?this.parseCustomProperty:this.parseValue,i=r?cJ:lJ;let a,s=!1;this.skipSC(),this.eat(uG);const l=this.tokenIndex;if(r||this.skipSC(),a=o?this.parseWithFallback(uJ,i):i.call(this,this.tokenIndex),r&&"Value"===a.type&&a.children.isEmpty)for(let e=l-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===sG){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(tJ)&&(s=vJ.call(this),this.skipSC()),!1===this.eof&&this.tokenType!==dG&&!1===this.isBalanceEdge(t)&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function mJ(e){this.token(K$,e.property),this.token(uG,":"),this.node(e.value),e.important&&(this.token(rG,"!"),this.token(K$,!0===e.important?"important":e.important))}function gJ(){const e=this.tokenStart;if(this.tokenType===rG)switch(this.charCodeAt(this.tokenStart)){case iJ:case rJ:case aJ:case nJ:case oJ:this.next();break;case sJ:this.next(),this.isDelim(sJ)&&this.next()}return this.tokenType===eG?this.eat(eG):this.eat(K$),this.substrToCursor(e)}function vJ(){this.eat(rG),this.skipSC();const e=this.consume(K$);return"important"===e||e}const yJ=38;function bJ(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const wJ="DeclarationList",kJ={children:[["Declaration","Atrule","Rule"]]};function EJ(){const e=this.createList();for(;!this.eof;)switch(this.tokenType){case sG:case bG:case dG:this.next();break;case J$:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),bJ));break;default:this.isDelim(yJ)?e.push(this.parseWithFallback(this.Rule,bJ)):e.push(this.parseWithFallback(this.Declaration,bJ))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function OJ(e){this.children(e,e=>{"Declaration"===e.type&&this.token(dG,";")})}const SJ="Dimension",xJ={value:String,unit:String};function _J(){const e=this.tokenStart,t=this.consumeNumber(aG);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function CJ(e){this.token(aG,e.value+e.unit)}const PJ=47,TJ="Feature",AJ={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function DJ(e){const t=this.tokenStart;let n,r=null;if(this.eat(mG),this.skipSC(),n=this.consume(K$),this.skipSC(),this.tokenType!==gG){switch(this.eat(uG),this.skipSC(),this.tokenType){case oG:r=this.lookupNonWSType(1)===rG?this.Ratio():this.Number();break;case aG:r=this.Dimension();break;case K$:r=this.Identifier();break;case Z$:r=this.parseWithFallback(()=>{const e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(PJ)&&this.error(),e},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(gG),{type:"Feature",loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function MJ(e){this.token(mG,"("),this.token(K$,e.name),null!==e.value&&(this.token(uG,":"),this.node(e.value)),this.token(gG,")")}const NJ="FeatureFunction",LJ={kind:String,feature:String,value:["Declaration","Selector"]};function IJ(e,t){const n=(this.features[e]||{})[t];return"function"!=typeof n&&this.error(`Unknown feature ${t}()`),n}function RJ(e="unknown"){const t=this.tokenStart,n=this.consumeFunctionName(),r=IJ.call(this,e,n.toLowerCase());this.skipSC();const o=this.parseWithFallback(()=>{const e=this.tokenIndex,t=r.call(this);return!1===this.eof&&!1===this.isBalanceEdge(e)&&this.error(),t},()=>this.Raw(null,!1));return this.eof||this.eat(gG),{type:"FeatureFunction",loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:o}}function jJ(e){this.token(Z$,e.feature+"("),this.node(e.value),this.token(gG,")")}const FJ=47,zJ=60,BJ=61,UJ=62,VJ="FeatureRange",WJ={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function HJ(){switch(this.skipSC(),this.tokenType){case oG:return this.isDelim(FJ,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case aG:return this.Dimension();case K$:return this.Identifier();case Z$:return this.parseWithFallback(()=>{const e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(FJ)&&this.error(),e},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function QJ(e){if(this.skipSC(),this.isDelim(zJ)||this.isDelim(UJ)){const e=this.source[this.tokenStart];return this.next(),this.isDelim(BJ)?(this.next(),e+"="):e}if(this.isDelim(BJ))return"=";this.error(`Expected ${e?'":", ':""}"<", ">", "=" or ")"`)}function qJ(e="unknown"){const t=this.tokenStart;this.skipSC(),this.eat(mG);const n=HJ.call(this),r=QJ.call(this,"Identifier"===n.type),o=HJ.call(this);let i=null,a=null;return this.lookupNonWSType(0)!==gG&&(i=QJ.call(this),a=HJ.call(this)),this.skipSC(),this.eat(gG),{type:"FeatureRange",loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:o,rightComparison:i,right:a}}function $J(e){this.token(mG,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(gG,")")}const GJ="Function",YJ="function",XJ={name:String,children:[[]]};function KJ(e,t){const n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase();let i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(gG),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function ZJ(e){this.token(Z$,e.name+"("),this.children(e),this.token(gG,")")}const JJ="GeneralEnclosed",e0={kind:String,function:[String,null],children:[[]]};function t0(e){const t=this.tokenStart;let n=null;this.tokenType===Z$?n=this.consumeFunctionName():this.eat(mG);const r=this.parseWithFallback(()=>{const e=this.tokenIndex,t=this.readSequence(this.scope.Value);return!1===this.eof&&!1===this.isBalanceEdge(e)&&this.error(),t},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(gG),{type:"GeneralEnclosed",loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function n0(e){e.function?this.token(Z$,e.function+"("):this.token(mG,"("),this.children(e),this.token(gG,")")}const r0="XXX",o0="Hash",i0={value:String};function a0(){const e=this.tokenStart;return this.eat(eG),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function s0(e){this.token(eG,"#"+e.value)}const l0="Identifier",c0={name:String};function u0(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(K$)}}function d0(e){this.token(K$,e.name)}const p0="IdSelector",h0={name:String};function f0(){const e=this.tokenStart;return this.eat(eG),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function m0(e){this.token(rG,"#"+e.name)}const g0=46,v0="Layer",y0={name:String};function b0(){let e=this.tokenStart,t=this.consume(K$);for(;this.isDelim(g0);)this.eat(rG),t+="."+this.consume(K$);return{type:"Layer",loc:this.getLocation(e,this.tokenStart),name:t}}function w0(e){this.tokenize(e.name)}const k0="LayerList",E0={children:[["Layer"]]};function O0(){const e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===pG);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(e),children:e}}function S0(e){this.children(e,()=>this.token(pG,","))}const x0="MediaQuery",_0={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function C0(){const e=this.tokenStart;let t=null,n=null,r=null;if(this.skipSC(),this.tokenType===K$&&this.lookupTypeNonSC(1)!==mG){const e=this.consume(K$),o=e.toLowerCase();switch("not"===o||"only"===o?(this.skipSC(),t=o,n=this.consume(K$)):n=e,this.lookupTypeNonSC(0)){case K$:this.skipSC(),this.eatIdent("and"),r=this.Condition("media");break;case vG:case dG:case pG:case X$:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case K$:case mG:case Z$:r=this.Condition("media");break;case vG:case dG:case X$:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function P0(e){e.mediaType?(e.modifier&&this.token(K$,e.modifier),this.token(K$,e.mediaType),e.condition&&(this.token(K$,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}const T0="MediaQueryList",A0={children:[["MediaQuery"]]};function D0(){const e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===pG);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function M0(e){this.children(e,()=>this.token(pG,","))}const N0=38,L0="NestingSelector",I0={};function R0(){const e=this.tokenStart;return this.eatDelim(N0),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function j0(){this.token(rG,"&")}const F0="Nth",z0={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function B0(){this.skipSC();const e=this.tokenStart;let t,n=e,r=null;return t=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(e,n),nth:t,selector:r}}function U0(e){this.node(e.nth),null!==e.selector&&(this.token(K$,"of"),this.node(e.selector))}const V0="Number",W0={value:String};function H0(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(oG)}}function Q0(e){this.token(oG,e.value)}const q0="Operator",$0={value:String};function G0(){const e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Y0(e){this.tokenize(e.value)}const X0="Parentheses",K0={children:[[]]};function Z0(e,t){const n=this.tokenStart;let r=null;return this.eat(mG),r=e.call(this,t),this.eof||this.eat(gG),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function J0(e){this.token(mG,"("),this.children(e),this.token(gG,")")}const e1="Percentage",t1={value:String};function n1(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(iG)}}function r1(e){this.token(iG,e.value+"%")}const o1="PseudoClassSelector",i1="function",a1={name:String,children:[["Raw"],null]};function s1(){const e=this.tokenStart;let t,n,r=null;return this.eat(uG),this.tokenType===Z$?(t=this.consumeFunctionName(),n=t.toLowerCase(),this.lookupNonWSType(0)==gG?r=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),r=this.pseudo[n].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(null,!1))),this.eat(gG)):t=this.consume(K$),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:t,children:r}}function l1(e){this.token(uG,":"),null===e.children?this.token(K$,e.name):(this.token(Z$,e.name+"("),this.children(e),this.token(gG,")"))}const c1="PseudoElementSelector",u1="function",d1={name:String,children:[["Raw"],null]};function p1(){const e=this.tokenStart;let t,n,r=null;return this.eat(uG),this.eat(uG),this.tokenType===Z$?(t=this.consumeFunctionName(),n=t.toLowerCase(),this.lookupNonWSType(0)==gG?r=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),r=this.pseudo[n].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(null,!1))),this.eat(gG)):t=this.consume(K$),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:t,children:r}}function h1(e){this.token(uG,":"),this.token(uG,":"),null===e.children?this.token(K$,e.name):(this.token(Z$,e.name+"("),this.children(e),this.token(gG,")"))}const f1=47;function m1(){switch(this.skipSC(),this.tokenType){case oG:return this.Number();case Z$:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}const g1="Ratio",v1={left:["Number","Function"],right:["Number","Function",null]};function y1(){const e=this.tokenStart,t=m1.call(this);let n=null;return this.skipSC(),this.isDelim(f1)&&(this.eatDelim(f1),n=m1.call(this)),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function b1(e){this.node(e.left),this.token(rG,"/"),e.right?this.node(e.right):this.node(oG,1)}function w1(){return this.tokenIndex>0&&this.lookupType(-1)===sG?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const k1="Raw",E1={value:String};function O1(e,t){const n=this.getTokenStart(this.tokenIndex);let r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),r=t&&this.tokenStart>n?w1.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function S1(e){this.tokenize(e.value)}function x1(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function _1(){const e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&this.tokenType!==vG&&this.error(),e}const C1="Rule",P1="rule",T1={prelude:["SelectorList","Raw"],block:["Block"]};function A1(){const e=this.tokenIndex,t=this.tokenStart;let n,r;return n=this.parseRulePrelude?this.parseWithFallback(_1,x1):x1.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function D1(e){this.node(e.prelude),this.node(e.block)}const M1="Scope",N1={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function L1(){let e=null,t=null;this.skipSC();const n=this.tokenStart;return this.tokenType===mG&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(gG)),this.lookupNonWSType(0)===K$&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(mG),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(gG)),{type:"Scope",loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function I1(e){e.root&&(this.token(mG,"("),this.node(e.root),this.token(gG,")")),e.limit&&(this.token(K$,"to"),this.token(mG,"("),this.node(e.limit),this.token(gG,")"))}const R1="Selector",j1={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function F1(){const e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function z1(e){this.children(e)}const B1="SelectorList",U1="selector",V1={children:[["Selector","Raw"]]};function W1(){const e=this.createList();for(;!this.eof&&(e.push(this.Selector()),this.tokenType===pG);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function H1(e){this.children(e,()=>this.token(pG,","))}const Q1=92,q1=34,$1=39;function G1(e){const t=e.length,n=e.charCodeAt(0),r=n===q1||n===$1?1:0,o=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1;let i="";for(let n=r;n<=o;n++){let r=e.charCodeAt(n);if(r===Q1){if(n===o){n!==t-1&&(i=e.substr(n+1));break}if(r=e.charCodeAt(++n),TG(Q1,r)){const t=n-1,r=VG(e,t);n=r-1,i+=qG(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else i+=e[n]}return i}const Y1="String",X1={value:String};function K1(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:G1(this.consume(tG))}}function Z1(e){this.token(tG,function(e){const t=q1;let n="",r=!1;for(let o=0;o<e.length;o++){const i=e.charCodeAt(o);0!==i?i<=31||127===i?(n+="\\"+i.toString(16),r=!0):i===t||i===Q1?(n+="\\"+e.charAt(o),r=!1):(r&&(EG(i)||PG(i))&&(n+=" "),n+=e.charAt(o),r=!1):n+="�"}return'"'+n+'"'}(e.value))}const J1=33;function e2(){return this.Raw(null,!1)}const t2="StyleSheet",n2="stylesheet",r2={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function o2(){const e=this.tokenStart,t=this.createList();let n;for(;!this.eof;){switch(this.tokenType){case sG:this.next();continue;case bG:if(this.charCodeAt(this.tokenStart+2)!==J1){this.next();continue}n=this.Comment();break;case lG:n=this.CDO();break;case cG:n=this.CDC();break;case J$:n=this.parseWithFallback(this.Atrule,e2);break;default:n=this.parseWithFallback(this.Rule,e2)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function i2(e){this.children(e)}const a2="SupportsDeclaration",s2={declaration:"Declaration"};function l2(){const e=this.tokenStart;this.eat(mG),this.skipSC();const t=this.Declaration();return this.eof||this.eat(gG),{type:"SupportsDeclaration",loc:this.getLocation(e,this.tokenStart),declaration:t}}function c2(e){this.token(mG,"("),this.node(e.declaration),this.token(gG,")")}const u2=42,d2=124;function p2(){this.tokenType!==K$&&!1===this.isDelim(u2)&&this.error("Identifier or asterisk is expected"),this.next()}const h2="TypeSelector",f2={name:String};function m2(){const e=this.tokenStart;return this.isDelim(d2)?(this.next(),p2.call(this)):(p2.call(this),this.isDelim(d2)&&(this.next(),p2.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function g2(e){this.tokenize(e.name)}const v2=43,y2=45,b2=63;function w2(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){const o=this.charCodeAt(r);if(o===y2&&t&&0!==n)return w2.call(this,e+n+1,!1),-1;EG(o)||this.error(t&&0!==n?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function k2(e){let t=0;for(;this.isDelim(b2);)++t>e&&this.error("Too many question marks"),this.next()}function E2(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===v2?"Plus sign":"Hyphen minus")+" is expected")}function O2(){let e=0;switch(this.tokenType){case oG:if(e=w2.call(this,1,!0),this.isDelim(b2)){k2.call(this,6-e);break}if(this.tokenType===aG||this.tokenType===oG){E2.call(this,y2),w2.call(this,1,!1);break}break;case aG:e=w2.call(this,1,!0),e>0&&k2.call(this,6-e);break;default:if(this.eatDelim(v2),this.tokenType===K$){e=w2.call(this,0,!0),e>0&&k2.call(this,6-e);break}if(this.isDelim(b2)){this.next(),k2.call(this,5);break}this.error("Hex digit or question mark is expected")}}const S2="UnicodeRange",x2={value:String};function _2(){const e=this.tokenStart;return this.eatIdent("u"),O2.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function C2(e){this.tokenize(e.value)}const P2=32,T2=92,A2=34,D2=39,M2=40,N2=41,L2="Url",I2={value:String};function R2(){const e=this.tokenStart;let t;switch(this.tokenType){case nG:t=function(e){const t=e.length;let n=4,r=e.charCodeAt(t-1)===N2?t-2:t-1,o="";for(;n<r&&PG(e.charCodeAt(n));)n++;for(;n<r&&PG(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let n=e.charCodeAt(i);if(n===T2){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(n=e.charCodeAt(++i),TG(T2,n)){const t=i-1,n=VG(e,t);i=n-1,o+=qG(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(i+1)&&i++}else o+=e[i]}return o}(this.consume(nG));break;case Z$:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(Z$),this.skipSC(),t=G1(this.consume(tG)),this.skipSC(),this.eof||this.eat(gG);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function j2(e){this.token(nG,function(e){let t="",n=!1;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);0!==o?o<=31||127===o?(t+="\\"+o.toString(16),n=!0):o===P2||o===T2||o===A2||o===D2||o===M2||o===N2?(t+="\\"+e.charAt(r),n=!1):(n&&EG(o)&&(t+=" "),t+=e.charAt(r),n=!1):t+="�"}return"url("+t+")"}(e.value))}const F2="Value",z2={children:[[]]};function B2(){const e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function U2(e){this.children(e)}const V2=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),W2="WhiteSpace",H2={value:String};function Q2(){return this.eat(sG),V2}function q2(e){this.token(sG,e.value)}const $2={generic:!0,cssWideKeywords:HY,generic:!0,cssWideKeywords:["initial","inherit","unset","revert","revert-layer"],units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|x|y","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<xywh()>|<rect()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<color-base>|currentColor|<system-color>|<device-cmyk()>|<light-dark()>|<-non-standard-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>","color-interpolation-method":"in [<rectangular-color-space>|<polar-color-space> <hue-interpolation-method>?|<custom-color-space>]",combinator:"'>'|'+'|'~'|['|' '|']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<complex-selector-unit> [<combinator>? <complex-selector-unit>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value>? )]|[( <any-value>? )]","generic-family":"<generic-script-specific>|<generic-complete>|<generic-incomplete>|<-non-standard-generic-family>","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hue-interpolation-method":"[shorter|longer|increasing|decreasing] hue","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>|<timeline-range-name> <percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","light-dark()":"light-dark( <color> , <color> )","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [[<angle>|to <side-or-corner>]||<color-interpolation-method>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,∞]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )","polar-color-space":"hsl|hwb|lch|oklch",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>|<legacy-pseudo-element-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","ray()":"ray( <angle>&&<ray-size>?&&contain?&&[at <position>]? )","ray-size":"closest-side|closest-corner|farthest-side|farthest-corner|sides","rectangular-color-space":"srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020|lab|oklab|xyz|xyz-d50|xyz-d65","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )","scroll()":"scroll( [<axis>||<scroller>]? )",scroller:"root|nearest|self","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<'animation-duration'>||<easing-function>||<'animation-delay'>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]||<single-animation-timeline>","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<dashed-ident>|<scroll()>|<view()>","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>||<transition-behavior-value>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","system-color":"AccentColor|AccentColorText|ActiveText|ButtonBorder|ButtonFace|ButtonText|Canvas|CanvasText|Field|FieldText|GrayText|Highlight|HighlightText|LinkText|Mark|MarkText|SelectedItem|SelectedItemText|VisitedText","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-range-name":"cover|contain|entry|exit|entry-crossing|exit-crossing","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","transition-behavior-value":"normal|allow-discrete","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","view()":"view( [<axis>||<'view-timeline-inset'>]? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"overlay|-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-size":"intrinsic|min-intrinsic|-webkit-fill-available|-webkit-fit-content|-webkit-min-content|-webkit-max-content|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","absolute-color-base":"<hex-color>|<absolute-color-function>|<named-color>|transparent","absolute-color-function":"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<oklab()>|<oklch()>|<color()>",age:"child|young|old","anchor-name":"<dashed-ident>","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","coord-box":"content-box|padding-box|border-box|fill-box|stroke-box|view-box","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral","generic-script-specific":"generic( kai )|generic( fangsong )|generic( nastaliq )","generic-complete":"serif|sans-serif|system-ui|cursive|fantasy|math|monospace","generic-incomplete":"ui-serif|ui-sans-serif|ui-monospace|ui-rounded","-non-standard-generic-family":"-apple-system|BlinkMacSystemFont",left:"<length>|auto","color-base":"<hex-color>|<color-function>|<named-color>|<color-mix()>|transparent","color-function":"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<oklab()>|<oklch()>|<color()>","device-cmyk()":"<legacy-device-cmyk-syntax>|<modern-device-cmyk-syntax>","legacy-device-cmyk-syntax":"device-cmyk( <number>#{4} )","modern-device-cmyk-syntax":"device-cmyk( <cmyk-component>{4} [/ [<alpha-value>|none]]? )","cmyk-component":"<number>|<percentage>|none","color-mix()":"color-mix( <color-interpolation-method> , [<color>&&<percentage [0,100]>?]#{2} )","color-space":"<rectangular-color-space>|<polar-color-space>|<custom-color-space>","custom-color-space":"<dashed-ident>",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke","palette-identifier":"<dashed-ident>",right:"<length>|auto","scope-start":"<forgiving-selector-list>","scope-end":"<forgiving-selector-list>","forgiving-selector-list":"<complex-real-selector-list>","forgiving-relative-selector-list":"<relative-real-selector-list>","selector-list":"<complex-selector-list>","complex-real-selector-list":"<complex-real-selector>#","simple-selector-list":"<simple-selector>#","relative-real-selector-list":"<relative-real-selector>#","complex-selector-unit":"[<compound-selector>? <pseudo-compound-selector>*]!","complex-real-selector":"<compound-selector> [<combinator>? <compound-selector>]*","relative-real-selector":"<combinator>? <complex-real-selector>","pseudo-compound-selector":"<pseudo-element-selector> <pseudo-class-selector>*","simple-selector":"<type-selector>|<subclass-selector>","legacy-pseudo-element-selector":"':' [before|after|first-line|first-letter]","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","color()":"color( <colorspace-params> [/ [<alpha-value>|none]]? )","colorspace-params":"[<predefined-rgb-params>|<xyz-params>]","predefined-rgb-params":"<predefined-rgb> [<number>|<percentage>|none]{3}","predefined-rgb":"srgb|srgb-linear|display-p3|a98-rgb|prophoto-rgb|rec2020","xyz-params":"<xyz-space> [<number>|<percentage>|none]{3}","xyz-space":"xyz|xyz-d50|xyz-d65","oklab()":"oklab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","oklch()":"oklch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","offset-path":"<ray()>|<url>|<basic-shape>","rect()":"rect( [<length-percentage>|auto]{4} [round <'border-radius'>]? )","xywh()":"xywh( <length-percentage>{2} <length-percentage [0,∞]>{2} [round <'border-radius'>]? )","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box","inset-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]","position-area":"[[left|center|right|span-left|span-right|x-start|x-end|span-x-start|span-x-end|x-self-start|x-self-end|span-x-self-start|span-x-self-end|span-all]||[top|center|bottom|span-top|span-bottom|y-start|y-end|span-y-start|span-y-end|y-self-start|y-self-end|span-y-self-start|span-y-self-end|span-all]|[block-start|center|block-end|span-block-start|span-block-end|span-all]||[inline-start|center|inline-end|span-inline-start|span-inline-end|span-all]|[self-block-start|center|self-block-end|span-self-block-start|span-self-block-end|span-all]||[self-inline-start|center|self-inline-end|span-self-inline-start|span-self-inline-end|span-all]|[start|center|end|span-start|span-end|span-all]{1,2}|[self-start|center|self-end|span-self-start|span-self-end|span-all]{1,2}]","anchor()":"anchor( <anchor-element>?&&<anchor-side> , <length-percentage>? )","anchor-side":"inside|outside|top|left|right|bottom|start|end|self-start|self-end|<percentage>|center","anchor-size()":"anchor-size( [<anchor-element>||<anchor-size>]? , <length-percentage>? )","anchor-size":"width|height|block|inline|self-block|self-inline","anchor-element":"<dashed-ident>","try-size":"most-width|most-height|most-block-size|most-inline-size","try-tactic":"flip-block||flip-inline||flip-start","font-variant-css2":"normal|small-caps","font-width-css3":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded","system-family-name":"caption|icon|menu|message-box|small-caption|status-bar"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer","anchor-name":"none|<dashed-ident>#","anchor-scope":"none|all|<dashed-ident>#",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-range":"[<'animation-range-start'> <'animation-range-end'>?]#","animation-range-end":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-range-start":"[normal|<length-percentage>|<timeline-range-name> <length-percentage>?]#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto||<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none","clip-rule":"nonzero|evenodd",color:"<color>","color-interpolation-filters":"auto|sRGB|linearRGB","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[auto? [none|<length>]]{1,2}","contain-intrinsic-block-size":"auto? [none|<length>]","contain-intrinsic-height":"auto? [none|<length>]","contain-intrinsic-inline-size":"auto? [none|<length>]","contain-intrinsic-width":"auto? [none|<length>]",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",d:"none|path( <string> )",cx:"<length>|<percentage>",cy:"<length>|<percentage>",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge","empty-cells":"show|hide","field-sizing":"content|fixed",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css2>||<'font-weight'>||<font-width-css3>]? <'font-size'> [/ <'line-height'>]? <'font-family'>#]|<system-family-name>|<-non-standard-font>","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-palette":"normal|light|dark|<palette-identifier>","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps||position]","font-synthesis-position":"auto|none","font-synthesis-small-caps":"auto|none","font-synthesis-style":"auto|none","font-synthesis-weight":"auto|none","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-emoji":"normal|text|emoji|unicode","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none|preserve-parent-color",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","hyphenate-character":"auto|<string>","hyphenate-limit-chars":"[auto|<integer>]{1,3}",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>","interpolate-size":"numeric-only|allow-keywords",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|<offset-path>||<coord-box>","offset-position":"normal|auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-width'>||<'outline-style'>||<'outline-color'>]","outline-color":"auto|<color>","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto",overlay:"none|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>",page:"auto|<custom-ident>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky","position-anchor":"auto|<anchor-name>","position-area":"none|<position-area>","position-try":"<'position-try-order'>? <'position-try-fallbacks'>","position-try-fallbacks":"none|[[<dashed-ident>||<try-tactic>]|<'position-area'>]#","position-try-order":"normal|<try-size>","position-visibility":"always|[anchors-valid||anchors-visible||no-overflow]","print-color-adjust":"economy|exact",quotes:"none|auto|[<string> <string>]+",r:"<length>|<percentage>",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",rx:"<length>|<percentage>",ry:"<length>|<percentage>",scale:"none|[<number>|<percentage>]{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"[<'scroll-timeline-name'>||<'scroll-timeline-axis'>]#","scroll-timeline-axis":"[block|inline|x|y]#","scroll-timeline-name":"[none|<dashed-ident>]#","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<'opacity'>","stroke-width":"<svg-length>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-anchor":"start|middle|end","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"auto|[over|under]&&[right|left]?","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-spacing-trim":"space-all|normal|space-first|trim-start|trim-both|trim-all|auto","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]","text-wrap":"<'text-wrap-mode'>||<'text-wrap-style'>","text-wrap-mode":"auto|wrap|nowrap","text-wrap-style":"auto|balance|stable|pretty","timeline-scope":"none|<dashed-ident>#",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-behavior":"<transition-behavior-value>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vector-effect":"none|non-scaling-stroke|non-scaling-size|non-rotation|fixed-position","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>","view-timeline":"[<'view-timeline-name'> <'view-timeline-axis'>?]#","view-timeline-axis":"[block|inline|x|y]#","view-timeline-inset":"[[auto|<length-percentage>]{1,2}]#","view-timeline-name":"none|<dashed-ident>#","view-transition-name":"none|<custom-ident>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces|[<'white-space-collapse'>||<'text-wrap'>||<'white-space-trim'>]","white-space-collapse":"collapse|discard|preserve|preserve-breaks|preserve-spaces|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|stretch|<-non-standard-size>","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word|auto-phrase","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>",x:"<length>|<percentage>",y:"<length>|<percentage>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|never|always","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]","white-space-trim":"none|discard-before||discard-after||discard-inner"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-palette-values":{prelude:"<dashed-ident>",descriptors:{"base-palette":"light|dark|<integer [0,∞]>","font-family":"<family-name>#","override-colors":"[<integer [0,∞]> <absolute-color-base>]#"}},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]","page-orientation":"upright|rotate-left|rotate-right",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},"position-try":{prelude:"<dashed-ident>",descriptors:{top:"<'top'>",left:"<'left'>",bottom:"<'bottom'>",right:"<'right'>","inset-block-start":"<'inset-block-start'>","inset-block-end":"<'inset-block-end'>","inset-inline-start":"<'inset-inline-start'>","inset-inline-end":"<'inset-inline-end'>","inset-block":"<'inset-block'>","inset-inline":"<'inset-inline'>",inset:"<'inset'>","margin-top":"<'margin-top'>","margin-left":"<'margin-left'>","margin-bottom":"<'margin-bottom'>","margin-right":"<'margin-right'>","margin-block-start":"<'margin-block-start'>","margin-block-end":"<'margin-block-end'>","margin-inline-start":"<'margin-inline-start'>","margin-inline-end":"<'margin-inline-end'>",margin:"<'margin'>","margin-block":"<'margin-block'>","margin-inline":"<'margin-inline'>",width:"<'width'>",height:"<'height'>","min-width":"<'min-width'>","min-height":"<'min-height'>","max-width":"<'max-width'>","max-height":"<'max-height'>","block-size":"<'block-size'>","inline-size":"<'inline-size'>","min-block-size":"<'min-block-size'>","min-inline-size":"<'min-inline-size'>","max-block-size":"<'max-block-size'>","max-inline-size":"<'max-inline-size'>","align-self":"<'align-self'>|anchor-center","justify-self":"<'justify-self'>|anchor-center"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<declaration-value>?"}},scope:{prelude:"[( <scope-start> )]? [to ( <scope-end> )]?",descriptors:null},"starting-style":{prelude:null,descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}},node:J};function G2(e){switch(this.tokenType){case eG:return this.Hash();case pG:return this.Operator();case mG:return this.Parentheses(this.readSequence,e.recognizer);case hG:return this.Brackets(this.readSequence,e.recognizer);case tG:return this.String();case aG:return this.Dimension();case iG:return this.Percentage();case oG:return this.Number();case Z$:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case nG:return this.Url();case K$:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case rG:{const e=this.charCodeAt(this.tokenStart);if(47===e||42===e||43===e||45===e)return this.Operator();35===e&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}const Y2={getNode:G2},X2={onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case hG:return this.AttributeSelector();case eG:return this.IdSelector();case uG:return this.lookupType(1)===uG?this.PseudoElementSelector():this.PseudoClassSelector();case K$:return this.TypeSelector();case oG:case iG:return this.Percentage();case aG:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case rG:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}}}};function K2(e){return null!==e&&"Operator"===e.type&&("-"===e.value[e.value.length-1]||"+"===e.value[e.value.length-1])}const Z2={getNode:G2,onWhiteSpace(e,t){K2(e)&&(e.value=" "+e.value),K2(t.last)&&(t.last.value+=" ")},expression:function(){return this.createSingleNodeList(this.Raw(null,!1))},var:function(){const e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===pG){e.push(this.Operator());const t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if("Value"===n.type&&n.children.isEmpty)for(let e=t-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===sG){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(n)}return e}},J2=new Set(["none","and","not","or"]),e3={parse:{prelude(){const e=this.createList();if(this.tokenType===K$){const t=this.substring(this.tokenStart,this.tokenEnd);J2.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition("container")),e},block(e=!1){return this.Block(e)}}},t3={parse:{prelude:null,block(){return this.Block(!0)}}};function n3(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==gG&&this.error()}},t||(()=>this.Raw(null,!0)))}const r3={layer(){this.skipSC();const e=this.createList(),t=n3.call(this,this.Layer);return"Raw"===t.type&&""===t.value||e.push(t),e},supports(){this.skipSC();const e=this.createList(),t=n3.call(this,this.Declaration,()=>n3.call(this,()=>this.Condition("supports")));return"Raw"===t.type&&""===t.value||e.push(t),e}},o3={container:e3,"font-face":t3,import:{parse:{prelude(){const e=this.createList();switch(this.tokenType){case tG:e.push(this.String());break;case nG:case Z$:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===K$&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?e.push(this.Identifier()):this.tokenType===Z$&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&e.push(this.Function(null,r3)),this.skipSC(),this.tokenType===Z$&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&e.push(this.Function(null,r3)),this.lookupNonWSType(0)!==K$&&this.lookupNonWSType(0)!==mG||e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(e=!1){return this.Block(e)}}}},i3={parse(){return this.createSingleNodeList(this.SelectorList())}},a3={parse(){return this.createSingleNodeList(this.Selector())}},s3={parse(){return this.createSingleNodeList(this.Identifier())}},l3={parse:function(){const e=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case K$:e.push(this.Identifier());break;case tG:e.push(this.String());break;case pG:e.push(this.Operator());break;case gG:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}},c3={parse(){return this.createSingleNodeList(this.Nth())}},u3={dir:s3,has:i3,lang:l3,matches:i3,is:i3,"-moz-any":i3,"-webkit-any":i3,where:i3,not:i3,"nth-child":c3,"nth-last-child":c3,"nth-last-of-type":c3,"nth-of-type":c3,slotted:a3,host:a3,"host-context":a3},d3={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(e){return this.Condition(e.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:ee,atrule:o3,pseudo:u3,node:te},p3=(e=>OK(EK({},e)))({...$2,...d3,node:J}),{tokenize:h3,parse:f3,generate:m3,lexer:g3,createLexer:v3,walk:y3,find:b3,findLast:w3,findAll:k3,toPlainObject:E3,fromPlainObject:O3,fork:S3}=p3;function x3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const C3=fn(function(e,t){var n,r,o,i,a,s,l=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor",c=null!==(r=null===(o=e.settingsPage)||void 0===o?void 0:o[l])&&void 0!==r?r:{},u=null!==(i=null!==(a=e.settingsPage.customCSS)&&void 0!==a?a:null===(s=e.settingsPage)||void 0===s||null===(s=s.settings)||void 0===s?void 0:s.customCSS)&&void 0!==i?i:"";return _3(_3({},t),{},{platform:l,settings:c,code:u})},function(e){return{setCode:function(t){return e(function(e){return{type:ei.SET_CUSTOM_CSS,customCSS:e}}(t))}}})(function(e){var t=e.code,n=e.setCode,r=(0,oe.useCallback)(function(e,t){n(e)},[]);return React.createElement("div",{className:"templately-setting-tab-panel templately-setting-tab-panel-custom-css"},React.createElement(Y$,{value:t,height:"300px",theme:"light",onChange:r,extensions:[new jU(cW,cW.data.of({autocomplete:lW})),GW(),PW(function(e){var t=[],n=e.state.doc.toString();try{f3(n,{positions:!0,onParseError:function(n){var r=n.line,o=n.column,i=e.state.doc.line(r);t.push({from:i.from+o-1,to:i.from+o,severity:"error",message:n.formattedMessage||n.message})}})}catch(e){console.error("CSSTree parse failed:",e)}return t})]}))});var P3=["id","onChange","onBlur","name","placeholder","type","withP","label","icon","typeChange","error"];function T3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var D3=function(e,t){var n=e.id,r=e.onChange,o=void 0===r?null:r,i=e.onBlur,a=void 0===i?null:i,s=e.name,l=e.placeholder,c=void 0===l?null:l,u=e.type,d=void 0===u?"text":u,p=(e.withP,e.label),h=e.icon,f=e.typeChange,m=void 0===f?void 0:f,g=e.error,v=Bn(e,P3),y=pe((0,oe.useState)(d),2),b=y[0],w=y[1],k=null!=n?n:s,E={type:b,name:s,id:k};return(0,oe.useEffect)(function(){m&&w(d)},[]),null!=c&&(E=A3(A3({},E),{},{placeholder:c})),null!=a&&(E=A3(A3({},E),{},{onBlur:a})),null!=o&&(E=A3(A3({},E),{},{onChange:o})),ae().createElement("div",{className:"templately-setting-input templately-setting-input-".concat(null!=d?d:"text")},p&&"checkbox"!==d&&"radio"!==d?ae().createElement("label",{htmlFor:k,className:"templately-setting-input-label"},p):"",ae().createElement("div",{className:"".concat(m?"has-change-button":""," ").concat(h?"has-icon":""," ").concat(null!=g&&g.hasError?"has-error":"")},null!=h?h:"",ae().createElement("input",re({ref:t},E,v)),m?ae().createElement("button",{onClick:function(){w(b===d?null==m?void 0:m.type:d)}},b===d?null==m?void 0:m.primaryText:null==m?void 0:m.secondaryText):""),!p||"checkbox"!==d&&"radio"!==d?"":ae().createElement("label",{htmlFor:k,className:"templately-setting-input-label"},p),(null==g?void 0:g.hasError)&&ae().createElement("div",{className:"templately-setting-error-message"},ae().createElement(Fn,null),null==g?void 0:g.errorMessage))};const M3=ae().forwardRef(D3);function N3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function L3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const I3=fn(function(e,t){var n,r,o,i,a,s,l,c,u,d,p,h,f,m,g,v,y,b,w=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor",k=null!==(r=null===(o=e.settingsPage)||void 0===o?void 0:o[w])&&void 0!==r?r:{},E=(null===(i=e.settingsPage.settings)||void 0===i?void 0:i[w],null!==(a=null!==(s=null===(l=e.settingsPage)||void 0===l?void 0:l.siteTitle)&&void 0!==s?s:null===(c=e.settingsPage)||void 0===c||null===(c=c.settings)||void 0===c?void 0:c.siteTitle)&&void 0!==a?a:""),O=null!==(u=null!==(d=null===(p=e.settingsPage)||void 0===p?void 0:p.siteTagline)&&void 0!==d?d:null===(h=e.settingsPage)||void 0===h||null===(h=h.settings)||void 0===h?void 0:h.siteTagline)&&void 0!==u?u:"",S=null!==(f=null!==(m=null===(g=e.settingsPage)||void 0===g?void 0:g.logoImage)&&void 0!==m?m:null===(v=e.settingsPage)||void 0===v||null===(v=v.settings)||void 0===v?void 0:v.site_logo)&&void 0!==f?f:null;return S||(S={url:"",id:"",size:211}),S.size||(S.size=211),L3(L3({},t),{},{platform:w,settings:k,siteTitle:E,siteTagline:O,logoImage:S,templatelySettings:null!==(y=null===(b=e.settingsPage)||void 0===b?void 0:b.settings)&&void 0!==y?y:{}})},function(e){return{setSiteTitle:function(t){return e(function(e){return{type:ei.SET_SITE_TITLE,siteTitle:e}}(t))},setSiteTagline:function(t){return e(function(e){return{type:ei.SET_SITE_TAGLINE,siteTagline:e}}(t))},setLogoImage:function(t){return e(function(e){return{type:ei.SET_LOGO_IMAGE,logoImage:e}}(t))}}})(function(e){e.platform;var t=e.siteTitle,n=e.setSiteTitle,r=e.siteTagline,o=e.setSiteTagline,i=e.logoImage,a=e.setLogoImage,s=(e.templatelySettings,function(e){e.preventDefault(),e.stopPropagation(),a({url:"",id:"",size:i.size})});return React.createElement("div",{className:"templately-setting-tab-panel templately-setting-tab-panel-general"},React.createElement(M3,{type:"text",label:(0,Pt.__)("Site Title","templately"),value:t,onChange:function(e){return n(e.target.value)}}),React.createElement(M3,{type:"text",label:(0,Pt.__)("Site Tagline","templately"),value:r,onChange:function(e){return o(e.target.value)}}),React.createElement("div",{className:"templately-setting-file-uploader-wrapper"},React.createElement("h4",{className:"templately-title"},"Upload a logo"),React.createElement("p",{className:"templately-info"},"Upload a logo for your site. You can upload/update it anytime later."),React.createElement(iT.MediaUpload,{onSelect:function(e){var t,n;a(L3(L3({},i),{},{url:null!==(t=null==e?void 0:e.url)&&void 0!==t?t:"",id:null!==(n=null==e?void 0:e.id)&&void 0!==n?n:""}))},allowedTypes:["image"],value:i.url,render:function(e){var t=e.open;return React.createElement("button",{onClick:t,className:"templately-setting-file-uploader"},React.createElement("span",{className:"icon"},i.url&&React.createElement(React.Fragment,null,React.createElement("span",{className:"templately-setting-file-remove-button",onClick:s},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 -0.5 21 21"},React.createElement("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1"},React.createElement("g",{fill:"#fff",transform:"translate(-179 -360)"},React.createElement("g",{transform:"translate(56 160)"},React.createElement("path",{d:"M130.35 216h2.1v-8h-2.1v8zm4.2 0h2.1v-8h-2.1v8zm-6.3 2h10.5v-12h-10.5v12zm2.1-14h6.3v-2h-6.3v2zm8.4 0v-4h-10.5v4H123v2h3.15v14h14.7v-14H144v-2h-5.25z"})))))),React.createElement("img",{src:i.url,alt:""})),!i.url&&React.createElement(lT,null)),React.createElement("span",{className:"content"},React.createElement("span",{className:"title"},React.createElement("span",{className:"highlighted"},"Click to upload")," logo"),React.createElement("span",{className:"info"},"SVG, PNG, JPG or GIF (max. 800x400 px)")))}})))}),R3=function(e){return ae().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ae().createElement("path",{fillRule:"evenodd",d:"M12 22c-4.714 0-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12s0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22zM8.97 8.97a.75.75 0 011.06 0L12 10.94l1.97-1.97a.75.75 0 011.06 1.06L13.06 12l1.97 1.97a.75.75 0 11-1.06 1.06L12 13.06l-1.97 1.97a.75.75 0 11-1.06-1.06L10.94 12l-1.97-1.97a.75.75 0 010-1.06z",clipRule:"evenodd"}))},j3=function(){var e=pe((0,oe.useState)(!1),2),t=e[0],n=e[1],r=function(){ya.close()};return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-display-condition-modal-header"},ae().createElement("div",{className:"templately-logo"}),ae().createElement("button",{className:"close-button",onClick:r},ae().createElement(R3,null))),ae().createElement("div",{className:"templately-display-condition-modal-body"},!t&&ae().createElement("div",{className:"normal"},ae().createElement("h2",null,(0,Pt.__)("Are you sure you want to revert to your old website?","templately")),ae().createElement("div",{className:"warning-text"},(0,Pt.__)("Warning: This will remove your existing settings and content with the previous one.","templately"))),ae().createElement("div",{className:"reverting",style:{display:t?"":"none"}},ae().createElement(ma,null),ae().createElement("div",null,ae().createElement("p",null,(0,Pt.__)("Restoring previous version of your website. This usually takes a few moments. Please wait…","templately"))))),ae().createElement("div",{className:"templately-display-condition-modal-footer"},ae().createElement(ca,{className:"confirm-revert",disabled:t,onClick:function(e){var t;n(!0);var r=null===(t=e.target.closest(".templately-sweetalert"))||void 0===t?void 0:t.querySelector(".swal2-icon");r&&(r.style.display="none"),ai()({url:(0,si.addQueryArgs)(ajaxurl,{action:"templately_pack_import_revert",nonce:window.templately.nonce})}).then(function(e){n(!1),ya.close(e),null!=e&&e.success})},label:t?(0,Pt.__)("Processing...","templately"):(0,Pt.__)("Yes, Revert","templately")}),ae().createElement(ca,{disabled:t,onClick:r,label:(0,Pt.__)("Cancel","templately")})))};function F3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const B3=fn(function(e,t){var n,r,o=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor";return z3(z3({},t),{},{platform:o,hasRevert:null!==(r=e.settingsPage.settings.has_revert)&&void 0!==r&&r})},function(e){return{}})(function(e){var t=e.hasRevert,n=(0,oe.useMemo)(function(){return{key:"success",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:(0,Pt.__)("Something went wrong while creating workspace for you. Try Later or Contact support.","templately"),args:{timer:null,showCloseButton:!0,showCancelButton:!0,cancelButtonText:"Close"}},success:{title:(0,Pt.__)("Successfully Reverted","templately"),content:(0,Pt.__)("Old website has been successfully restored.","templately"),args:{timer:null,showCloseButton:!0,showConfirmButton:!0,confirmButtonText:"Visit Site"}}}},[]);return ae().createElement("div",{className:"templately-setting-tab-panel templately-setting-tab-panel-miscellaneous"},ae().createElement("div",{className:"templately-setting-miscellaneous-panel"},ae().createElement("h3",{className:"templately-title"},"Revert to previous website"),ae().createElement("p",{className:"templately-sub-title"},"Here you can revert back to your old website. We will restore previous settings, posts, pages, menus, etc."),ae().createElement("button",{onClick:function(e){e.preventDefault(),ba({icon:"warning",onConfirm:function(e){var t;if(null!=e&&null!==(t=e.data)&&void 0!==t&&t.site_url){var r=e.data.site_url;n.success.args.confirmButtonText='<a href="'.concat(r,'" target="_blank">Visit Site</a>'),n.success.args.didDestroy=function(t){e.success&&e.data.redirect&&setTimeout(function(){window.location.reload()},500)}}wa(n,e)},html:ae().createElement(j3,null),didDestroy:function(){}},!0).then(function(e){e.success})},className:"templately-button",disabled:!t,title:t?"templately":"Nothing to revert"},ae().createElement("span",null,"Revert Now"))))}),U3=function(e){var t,n=e.title,r=e.children,o=e.current,i=e.setCurrent,a=e.id,s=pe((0,oe.useState)(null!==(t=e.initialCollapsed)&&void 0!==t&&t),2),l=s[0],c=s[1];return(0,oe.useEffect)(function(){null!=o&&null!=a&&c(o!=a)},[o]),ae().createElement("div",{className:"templately-setting-new-collapser"},ae().createElement("div",{className:"templately-setting-new-collapser-header ".concat(l?"collapsed":"show"),onClick:function(){null!=o&&null!=a?i(l?a:-1):c(!l)}},ae().createElement("h4",{className:"templately-setting-title"},n),ae().createElement("div",{className:"templately-setting-icon"},ae().createElement(Sn,null))),ae().createElement("div",{className:"templately-setting-new-collapser-body ".concat(l?"collapsed":"show")},ae().createElement("div",{className:"templately-setting-new-collapser-body-inner"},r)))};function V3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var H3={},Q3=["Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"],q3=function(e,t){if(e&&"Default"!==e&&!Q3.includes(e)){var n={ru_RU:"cyrillic",uk:"cyrillic",bg_BG:"cyrillic",vi:"vietnamese",el:"greek",he_IL:"hebrew"},r="https://fonts.googleapis.com/css?family="+e+":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic";n[t]&&(r+="&subset="+n[t]);var o='link[href="'+r+'"]',i=document.createElement("link");if(i.href=r,i.rel="stylesheet",i.type="text/css",i.crossOrigin="anonymous",!document.querySelector(o)){var a=document.querySelectorAll("link"),s=a[a.length-1];s?s.after(i):document.body.appendChild(i)}}},$3=["options","children","maxHeight","getValue","loadedFonts"];function G3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var X3=ae().createContext({}),K3=function(e){var t=e.children,n=e.index,r=(e.style,e.isScrolling),o=ae().useContext(X3),i=o.setSize,a=o.windowWidth,s=o.loadedFonts,l=o.options,c=ae().useRef(),u=l[n];return(0,oe.useEffect)(function(){r||!u.value||s.current.includes(u.value)||(q3(u.value,window.templately.locale),s.current=[].concat(Da(s.current),[u.value]))},[]),(0,oe.useEffect)(function(){i(n,c.current.getBoundingClientRect().height)},[a]),ae().createElement("div",{ref:c},t)};function Z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J3(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z3(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const e5=function(e){var t,n,r=e.label,o=e.title,i=void 0===o?"":o,a=e.screen,s=e.setScreen,l=e.field,c=e.typography,u=e.setTypography,d=null!==(t=c[l][a].value)&&void 0!==t?t:"",p=null!==(n=c[l][a].unit)&&void 0!==n?n:"px",h=function(e,t){var n=t[e]||{};return W3(W3({},{px:{min:0,max:100,step:1},em:{min:.1,max:10,step:.1},rem:{min:.1,max:10,step:.1},vh:{min:0,max:100,step:1},vw:{min:0,max:100,step:1}}[e]),n)}(p,{selectedSize:{px:{min:1,max:200},em:{max:20},rem:{max:20},vw:{min:.1,max:10,step:.1}},selectedLetterSpacing:{px:{min:-5,max:10,step:.1},em:{min:0,max:1,step:.01},rem:{min:0,max:1,step:.01}},selectedLineHeight:{px:{min:1}}}[l]),f=h.min,m=h.max,g=h.step,v=Math.max(f,Math.min(m,d)),y=function(e){u("".concat(l,".").concat(a,".value"),e),c[l][a].unit||u("".concat(l,".").concat(a,".unit"),p)},b=function(e){s(e)};return(0,oe.useEffect)(function(){c[l][a].unit||u("".concat(l,".").concat(a,".unit"),"px")},[]),ae().createElement("div",{className:"templately-setting-typography-picker-field"},ae().createElement("label",{className:"templately-setting-typography-picker-field-label"},ae().createElement("span",{title:i},r),ae().createElement("div",{className:"templately-setting-device-dropdown"},ae().createElement("button",{className:"templately-setting-device-dropdown-selected"},"desktop"===a?ae().createElement("span",{className:"dashicons dashicons-desktop"}):"tablet"===a?ae().createElement("span",{className:"dashicons dashicons-tablet"}):ae().createElement("span",{className:"dashicons dashicons-smartphone"})),ae().createElement("ul",{className:"templately-setting-device-dropdown-menu"},ae().createElement("li",{className:"templately-setting-device-dropdown-menu-item ".concat("desktop"===a?"active":""),onClick:function(){return b("desktop")}},ae().createElement("span",{className:"dashicons dashicons-desktop"})),ae().createElement("li",{className:"templately-setting-device-dropdown-menu-item ".concat("tablet"===a?"active":""),onClick:function(){return b("tablet")}},ae().createElement("span",{className:"dashicons dashicons-tablet"})),ae().createElement("li",{className:"templately-setting-device-dropdown-menu-item ".concat("mobile"===a?"active":""),onClick:function(){return b("mobile")}},ae().createElement("span",{className:"dashicons dashicons-smartphone"}))))),ae().createElement("div",{className:"templately-setting-typography-picker-field-inner"},ae().createElement(oT.TextControl,{min:f,max:m,step:g,value:d,onChange:y,type:"number",label:"Text Control",hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),ae().createElement(oT.SelectControl,{value:p||defaultUnit,onChange:function(e){u("".concat(l,".").concat(a),{unit:e,value:null})},options:[{label:"PX",value:"px"},{label:"EM",value:"em"},{label:"REM",value:"rem"},{label:"VW",value:"vw"},{label:"VH",value:"vh"}],label:"Select Option",hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),ae().createElement(dT.Range,{values:[v],step:g,min:f,max:m,onChange:function(e){return y(e[0])},renderTrack:function(e){var t=e.props,n=e.children;return ae().createElement("div",{onMouseDown:t.onMouseDown,onTouchStart:t.onTouchStart,style:J3(J3({},t.style),{},{height:"12px",display:"flex",width:"100%"})},ae().createElement("div",{ref:t.ref,style:{height:"2px",width:"100%",borderRadius:"2px",background:(0,dT.getTrackBackground)({values:[v],colors:["#798294","#798294"],min:f,max:m}),alignSelf:"center"}},n))},renderThumb:function(e){var t=e.props,n=e.isDragged;return ae().createElement("div",re({},t,{key:t.key,style:J3(J3({},t.style),{},{height:"12px",width:"12px",borderRadius:"12px",backgroundColor:"#D0D5DD",display:"flex",justifyContent:"center",alignItems:"center",boxShadow:"0px 2px 6px rgba(16, 24, 40, 0.059)"})}),ae().createElement("div",{style:{height:"12px",width:"12px",borderRadius:"12px",backgroundColor:n?"#548BF4":"#D0D5DD"}}))}})))};function t5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t5(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const r5=function(e){e.normalizedTypography;var t=e.setShowPicker,n=e.typography,r=e.setTypography,o=e.fontList,i=e.reset,a=e.screen,s=e.setScreen,l=e.closeRef,c=[{label:"Default",value:""},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"},{label:"Normal",value:"none"}],u=[{label:"Default",value:""},{label:"Overline",value:"overline"},{label:"Line Through",value:"line-through"},{label:"Underline",value:"underline"},{label:"Underline Overline",value:"underline overline"},{label:"Initial",value:"initial"},{label:"None",value:"none"}],d=[{value:"100",label:"100 (Thin)"},{value:"200",label:"200 (Extra Light)"},{value:"300",label:"300 (Light)"},{value:"400",label:"400 (Normal)"},{value:"500",label:"500 (Medium)"},{value:"600",label:"600 (Semi Bold)"},{value:"700",label:"700 (Bold)"},{value:"800",label:"800 (Extra Bold)"},{value:"900",label:"900 (Black)"},{value:"",label:"Default"},{value:"normal",label:"Normal"},{value:"bold",label:"Bold"}];return(0,oe.useEffect)(function(){q3(n.selectedFont,window.templately.locale)},[n.selectedFont]),ae().createElement("td",{className:"templately-setting-typography-picker-wrapper"},ae().createElement("div",{className:"templately-setting-typography-picker",ref:l},ae().createElement("div",{className:"templately-setting-typography-picker-title-wrapper"},ae().createElement("div",{className:"templately-setting-typography-picker-title-inner"},ae().createElement("h4",{className:"templately-setting-typography-picker-title"},null==n?void 0:n.title),ae().createElement("button",{className:"templately-setting-typography-picker-reset-button",onClick:i},ae().createElement(ZP,null))),ae().createElement("button",{className:"templately-setting-typography-picker-close-button",onClick:function(){return t(!1)}},ae().createElement(sT,null))),ae().createElement("div",{className:"templately-setting-typography-picker-preview",style:{fontFamily:n.selectedFont,fontSize:"40px",lineHeight:"1.5"}},"Ag"),ae().createElement("div",{className:"templately-setting-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-setting-typography-picker-field-label"},"Family"),ae().createElement("div",{className:"templately-setting-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",value:o.find(function(e){return e.value===n.selectedFont}),options:o,onChange:function(e){return r("selectedFont",e.value)},components:{MenuList:function(t){return function(e){var t,n=e.options,r=e.children,o=e.maxHeight,i=e.getValue,a=e.loadedFonts,s=(Bn(e,$3),pe(i(),1)[0]),l=null!==(t=n.indexOf(s))&&void 0!==t?t:0,c=ae().useRef(),u=ae().useRef({}),d=ae().useCallback(function(e,t){var n;u.current=Y3(Y3({},u.current),{},Ct({},e,t)),null===(n=c.current)||void 0===n||n.resetAfterIndex(e)},[]),p=function(){var e=pe((0,oe.useState)([0,0]),2),t=e[0],n=e[1];return(0,oe.useLayoutEffect)(function(){function e(){n([window.innerWidth,window.innerHeight])}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}},[]),t}(),h=pe(p,1)[0];return(0,oe.useEffect)(function(){var e;null===(e=c.current)||void 0===e||e.scrollToItem(l,"center")},[]),ae().createElement(X3.Provider,{value:{setSize:d,windowWidth:h,loadedFonts:a,options:n,listRef:c}},ae().createElement("div",null,ae().createElement(BT,{useIsScrolling:!0,height:o,itemSize:function(e){return u.current[e]||35},itemCount:r.length,ref:c},function(e){var t=e.index,o=e.style,i=(e.data,e.isScrolling);return ae().createElement("div",{style:Y3(Y3({},o),{},{fontFamily:n[t].value})},ae().createElement(K3,{index:t,style:o,isScrolling:i},r[t]))})))}(n5(n5({},t),{},{loadedFonts:e.loadedFonts}))}},className:"templately-setting-typography-picker-select",classNamePrefix:"templately-setting-typography-picker-select"}))),ae().createElement(e5,{label:"Size",screen:a,setScreen:s,typography:n,setTypography:r,field:"selectedSize"}),ae().createElement(e5,{label:"Line",title:"Line Height",screen:a,setScreen:s,field:"selectedLineHeight",typography:n,setTypography:r}),ae().createElement(e5,{label:"Letter",title:"Letter Spacing",screen:a,setScreen:s,field:"selectedLetterSpacing",typography:n,setTypography:r}),ae().createElement("div",{className:"templately-setting-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-setting-typography-picker-field-label"},"Weight"),ae().createElement("div",{className:"templately-setting-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",value:d.find(function(e){return e.value===n.selectedFontWeight}),options:d,onChange:function(e){return r("selectedFontWeight",e.value)},className:"templately-setting-typography-picker-select",classNamePrefix:"templately-setting-typography-picker-select"}))),ae().createElement("div",{className:"templately-setting-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-setting-typography-picker-field-label"},"Transform"),ae().createElement("div",{className:"templately-setting-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",defaultValue:c.find(function(e){return e.value==n.transform}),onChange:function(e){return r("transform",e.value)},options:c,className:"templately-setting-typography-picker-select",classNamePrefix:"templately-setting-typography-picker-select"}))),ae().createElement("div",{className:"templately-setting-typography-picker-field"},ae().createElement("label",{htmlFor:"",className:"templately-setting-typography-picker-field-label"},"Decoration"),ae().createElement("div",{className:"templately-setting-typography-picker-field-inner"},ae().createElement(Qh,{isSearchable:!0,menuPlacement:"top",defaultValue:u.find(function(e){return e.value==n.decoration}),onChange:function(e){return r("decoration",e.value)},options:u,className:"templately-setting-typography-picker-select",classNamePrefix:"templately-setting-typography-picker-select"})))))};var o5=function(e){var t=e.setTypographyPickerOpen,n=e.normalizedTypography,r=e.typography,o=e.setTypography,i=e.fontList,a=e.reset,s=e.screen,l=e.setScreen,c=pe((0,oe.useState)(!1),2),u=c[0],d=c[1],p=(0,oe.useRef)(null);return null!=r&&r.selectedFont?r.selectedFont:(0,Pt.__)("Default","templately"),(0,oe.useEffect)(function(){t(u)},[u]),function(e){(0,oe.useEffect)(function(){var t=function(t){e.current&&!e.current.contains(t.target)&&d(!1)};return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}},[e])}(p),(0,oe.useEffect)(function(){q3(r.selectedFont,window.templately.locale)},[r.selectedFont]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-setting-typography-panel-item",key:null==r?void 0:r._id},ae().createElement("div",{className:"templately-setting-typography-mini-preview",style:{fontFamily:r.selectedFont}},"Ag"),ae().createElement("div",{className:"templately-setting-typography-title"},r.title),ae().createElement("div",{className:"templately-setting-typography-popup-button",onClick:function(){return d(!u)}},ae().createElement(Ln,null)),u&&ae().createElement(r5,{normalizedTypography:n,setShowPicker:d,typography:r,setTypography:o,fontList:i,reset:a,screen:s,setScreen:l,loadedFonts:e.loadedFonts,closeRef:p})))};function i5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i5(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const s5=fn(function(e,t){var n,r,o,i,a,s,l,c=null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor";return a5(a5({},t),{},{platform:c,settings:null!==(r=null===(o=e.settingsPage.settings)||void 0===o?void 0:o[c])&&void 0!==r?r:{},screen:null!==(i=null===(a=e.settingsPage)||void 0===a||null===(a=a[c])||void 0===a?void 0:a.screen)&&void 0!==i?i:"desktop",selectedTypography:null!==(s=null===(l=e.settingsPage)||void 0===l||null===(l=l[c])||void 0===l?void 0:l.selectedTypography)&&void 0!==s?s:{}})},function(e){return{setScreen:function(t){return e(function(e){return{type:ei.SET_SCREEN,screen:e}}(t))},setSelectedTypography:function(t){return e((n=t,{type:ei.SET_SELECTED_TYPOGRAPHY,typography:n}));var n}}})(function(e){e.settings;var t=e.platform,n=e.screen,r=e.setScreen,o=e.selectedTypography,i=e.setSelectedTypography,a=pe((0,oe.useState)(0),2),s=a[0],l=a[1],c=pe((0,oe.useState)(!1),2),u=c[0],d=c[1],p=(0,oe.useRef)([]),h=pe((0,oe.useState)([]),2),f=h[0],m=h[1],g=function(){var e=bn(),t=On(function(e){var t;return null!==(t=e.general.fullSiteImport.cache_data)&&void 0!==t?t:{}}),n=function(){var n=ni(oi().mark(function n(r,o){var i;return oi().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!t[r]){n.next=1;break}return n.abrupt("return",Promise.resolve(t[r]));case 1:if(!H3[r]){n.next=2;break}return n.abrupt("return",H3[r]);case 2:return i=ai()(o).then(function(t){return e(ug({type:r,value:t})),delete H3[r],t}),H3[r]=i,n.abrupt("return",i);case 3:case"end":return n.stop()}},n)}));return function(_x,e){return n.apply(this,arguments)}}();return n}(),v=oe.useContext(nt),y=v.normalizedTypography,b=v.groupedData,w=(0,oe.useMemo)(function(){var e=Q3.map(function(e){return{value:e,label:e}});return[{value:"",label:(0,Pt.__)("Default","templately")},{label:(0,Pt.__)("System","templately"),isDisabled:!0}].concat(Da(e),[{label:(0,Pt.__)("Google","templately"),isDisabled:!0}],Da(f))},[f]);return(0,oe.useEffect)(function(){l(0),(0,_i.isEmpty)(o)&&i(y)},[t]),(0,oe.useEffect)(function(){var e={action:"templately_pack_google_font",nonce:window.templately.nonce,page:0};g("google_font",{url:(0,si.addQueryArgs)(window.ajaxurl,e),headers:{"Content-Type":"application/json"}}).then(function(e){var t;(null==e||null===(t=e.data)||void 0===t?void 0:t.length)>0&&m(e.data.map(function(e){return{value:e.family,label:e.family,variants:e.variants.map(function(e){return{value:e,label:e}})}}))})},[]),ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-setting-tab-panel templately-setting-tab-panel-typography"},ae().createElement("div",{className:"templately-setting-typography-picker-section"},ae().createElement("div",{className:"templately-setting-typography-picker-section-label-wrapper"},ae().createElement("div",{style:{display:"flex",alignItems:"center",gap:10}},ae().createElement("label",{className:"templately-setting-typography-picker-section-label"},"Typography"),ae().createElement("div",{className:"templately-setting-device-tab"},ae().createElement("button",{className:"templately-setting-device-tab-button ".concat("desktop"===n?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return r("desktop")}},ae().createElement("span",{className:"dashicons dashicons-desktop"})),ae().createElement("button",{className:"templately-setting-device-tab-button ".concat("tablet"===n?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return r("tablet")}},ae().createElement("span",{className:"dashicons dashicons-tablet"})),ae().createElement("button",{className:"templately-setting-device-tab-button ".concat("mobile"===n?"active":""),style:{padding:"7px",margin:"5px"},onClick:function(){return r("mobile")}},ae().createElement("span",{className:"dashicons dashicons-smartphone"})))),ae().createElement("button",{className:"templately-setting-typography-picker-reset-button",onClick:function(){i(y)}},ae().createElement(ZP,null))),ae().createElement("div",{className:"templately-setting-typography-panel-wrapper"},b.map(function(e,t){var a=e.key,c=e.items;return ae().createElement(U3,{title:a,key:a,initialCollapsed:!0,current:s,setCurrent:l,id:t},ae().createElement("div",{className:"templately-setting-typography-panel"},c&&c.map(function(e){var t=e._id;return o[t]?ae().createElement(o5,{key:t,setTypographyPickerOpen:d,reset:function(){return function(e){i(a5(a5({},o),{},Ct({},e,y[e])))}(t)},normalizedTypography:y,typography:o[t],setTypography:function(e,n){return function(e,t,n){var r=ji(o,"".concat(e,".").concat(t),n);i(r)}(t,e,n)},fontList:w,screen:n,setScreen:r,loadedFonts:p}):null})))})))),u&&ae().createElement("div",{className:"templately-setting-overlay"}))});function l5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l5(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const u5=fn(function(e,t){var n,r,o,i,a;return c5(c5({},t),{},{settingsPlatform:null!==(n=e.settingsPage.platform)&&void 0!==n?n:"elementor",isLoggedIn:null!==e.profile.data,user:null!==(r=e.profile)&&void 0!==r&&r,redirect:null===(o=e.general)||void 0===o?void 0:o.redirect,isGloballySigned:null!==(i=null===(a=e.profile)||void 0===a?void 0:a.is_globally_signed)&&void 0!==i&&i})},function(e){return{setPlatform:function(t){return e(kf(t))},resetFilter:function(){return e(Of())},isVerifiedProfile:function(t){return e(Qm(t))}}})(function(e){var t=pe(xt(),1)[0],n=tt(),r=Je(),o=(rt(),bn());return(0,oe.useEffect)(function(){var t,r,i;null!==e.redirect&&(o(zm({trying_logout:!0,isGloballySigned:null==e?void 0:e.isGloballySigned,global_user:null!==(t=null===(r=e.redirect)||void 0===r?void 0:r.user)&&void 0!==t?t:void 0})),n(Rg(null===(i=e.redirect)||void 0===i?void 0:i.url)))},[e.redirect]),(0,oe.useEffect)(function(){if(null!=e&&e.platform&&e.setPlatform(e.platform),"templately_settings"!==(null==t?void 0:t.get("page"))||null!=t&&t.get("path")){if(e.route){var r={};null!=e&&e.platform&&(r={platform:null==e?void 0:e.platform}),n(Rg(e.route,r))}else t.get("path")&&"/"!==(null==t?void 0:t.get("path"))||("gutenberg"===(null==e?void 0:e.platform)&&n(Rg("gutenberg/packs",{platform:"gutenberg",isGutenbergEditor:!0})),"elementor"!==(null==e?void 0:e.platform)&&void 0!==(null==e?void 0:e.platform)||n(Rg("elementor/packs")));return function(){if(void 0!==e.route){var t,r=Ig(),o=null===(t=r.path)||void 0===t?void 0:t.startsWith("clouds/save-template");n(Rg(o?"":r.path,{closing:!0}))}}}n(Rg("settings/".concat(e.settingsPlatform,"/general")))},[]),(0,oe.useEffect)(function(){var t;!1!==(null==r||null===(t=r.state)||void 0===t?void 0:t.resetFilter)&&e.resetFilter()},[r]),(0,oe.useEffect)(function(){var e=function(e){var r;if(!e.metaKey&&!e.ctrlKey){var o=e.target.closest("a");if(o){var i=o.getAttribute("href");if(i){var a=new URLSearchParams(null===(r=i.split("?"))||void 0===r?void 0:r[1]).get("page"),s=null;if("templately"===a)s=Rg("elementor/packs");else if("templately_settings"===a){var l,c=Wi("/settings/:platform/:tab",t.get("path"));s=Rg(["settings",null!=c&&c.platform||null!==(l=window.templately)&&void 0!==l&&null!==(l=l.settings)&&void 0!==l&&l.has_elementor?"elementor":"gutenberg","general"])}s&&(e.preventDefault(),n(s),document.querySelectorAll("#toplevel_page_templately li").forEach(function(e){return e.classList.remove("current")}),o.parentNode.classList.add("current"))}}}},r=document.querySelector("#toplevel_page_templately");if(r){var o;r.addEventListener("click",e);var i=null!==(o=t.get("path"))&&void 0!==o?o:"",a=null;if("elementor/packs"===i?a="admin.php?page=templately":i.startsWith("settings/")&&(a="admin.php?page=templately_settings"),i&&a){r.querySelectorAll("li.current").forEach(function(e){return e.classList.remove("current")});var s=r.querySelector('ul.wp-submenu a[href="'.concat(a,'"]'));s&&s.parentNode.classList.add("current")}}return function(){r&&r.removeEventListener("click",e)}},[n]),it([{element:ae().createElement(PD,{isLoggedIn:e.isLoggedIn,user:e.user,isVerifiedProfile:e.isVerifiedProfile}),children:[{path:"/sign-in",index:!0,exact:!0,element:ae().createElement(ax,null)}]},{path:"/settings",exact:!0,element:ae().createElement(UD,null),children:[{index:!0,element:ae().createElement(ft,{to:"elementor/general",replace:!0})},{path:":platform/general",element:ae().createElement(I3,null)},{path:":platform/miscellaneous",element:ae().createElement(B3,null)},{path:":platform/custom_css",element:ae().createElement(C3,null)},{path:":platform/typography",element:ae().createElement(s5,null)},{path:":platform/colors",element:ae().createElement(QD,null)}]},{element:ae().createElement(PD,{isLoggedIn:e.isLoggedIn,user:e.user,isVerifiedProfile:e.isVerifiedProfile}),children:[{path:"/:platform/:type",exact:!0,element:ae().createElement(LD,re({},Wi("/:platform/:type",t.get("path")),{query:t.get("q")}))},{path:"/:platform/:type/:slug",exact:!0,element:ae().createElement(aD,{params:Wi("/:platform/:type/:slug",t.get("path"))})},{path:"/:platform/templates",exact:!0,element:ae().createElement(AD,null)}]},{element:ae().createElement(PD,{isLoggedIn:e.isLoggedIn,user:e.user,isVerifiedProfile:e.isVerifiedProfile}),children:[{path:"clouds",exact:!0,element:ae().createElement(TD,null),children:[{path:"workspace",element:ae().createElement(zS,null)},{path:"workspace/:slug",element:ae().createElement(ES,Wi("/clouds/workspace/:slug",t.get("path")))},{path:"shared-workspace",element:ae().createElement(zS,{shared:!0})},{path:"shared-workspace/:slug",element:ae().createElement(ES,re({shared:!0},Wi("/clouds/shared-workspace/:slug",t.get("path"))))},{path:"save-template",element:ae().createElement(FS,e)},{index:!0,element:ae().createElement(jS,{title:"My Clouds",q:t.get("q")})}]},{element:ae().createElement(TD,null),children:[{exact:!0,path:"downloads",element:ae().createElement(xS,null)},{exact:!0,path:"favourites",element:ae().createElement(PS,null)},{exact:!0,path:"purchased-items",element:ae().createElement(NS,null)}]}]},{path:"*",element:ae().createElement(ft,{to:Rg("elementor/packs")})}])});function d5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const p5=function(e){var t,n=function(e,t){var r=e.find(function(e){return t==e.value});if(r)return r;var o,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return d5(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d5(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var _n=0,r=function(){};return{s:r,n:function(){return _n>=e.length?{done:!0}:{done:!1,value:e[_n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}(e);try{for(i.s();!(o=i.n()).done;){var a=o.value;if(a.options){var s=n(a.options,t);if(s)return s}}}catch(e){i.e(e)}finally{i.f()}},r=0===(null===(t=e.value)||void 0===t?void 0:t.length)?e.options[0]:n(e.options,e.value);return ae().createElement(Qh,re({isSearchable:!1,classNamePrefix:"templately-condition"},e,{className:"".concat(e.className," templately-condition"),value:r}))};var h5=["update"];const f5=function(e){var t=e.update,n=Bn(e,h5),r=[{value:"include",label:(0,Pt.__)("Include","templately")},{value:"exclude",label:(0,Pt.__)("Exclude","templately")}];return ae().createElement(p5,{options:r,onChange:function(e){return t(n.id,{type:e.value,name:"general",sub_name:"",sub_id:""})},value:n.type,className:"templately-condition-type"})};var m5=["update"];const g5=function(e){var t=e.update,n=Bn(e,m5);return ae().createElement(p5,{options:n.options,onChange:function(e){return t(n.id,{name:e.value,sub_name:"",sub_id:""})},value:n.name,className:"templately-condition-name"})};var v5=["update"];const y5=function(e){var t=e.update,n=Bn(e,v5);return"general"!==n.name&&n.subOptions.length?ae().createElement(p5,{options:n.subOptions,onChange:function(e){return t(n.id,{sub_name:e.value,sub_id:""})},value:n.sub_name,className:"templately-condition-sub-name"}):""};var b5=["update"];const w5=function(e){var t=e.update,n=Bn(e,b5);if(!n.sub_name||null==n||!n.subIdAutocomplete||!Object.keys(null==n?void 0:n.subIdAutocomplete).length)return"";var r=pe(uw(n.subIdAutocomplete,n.sub_id),2),o=r[0],i=r[1];return ae().createElement(p5,{value:n.sub_id,options:o,onInputChange:function(e){return i(e)},onChange:function(e){var r;return t(n.id,{sub_id:null!==(r=null==e?void 0:e.value)&&void 0!==r?r:""})},className:"templately-condition-id",isSearchable:!0,isClearable:!0})},k5=function(){var e,t=Ow(),n=t.conditions,r=t.updateCondition,o=t.createCondition,i=t.removeCondition,a=(t.isSaving,null===(e=Object.values(n))||void 0===e?void 0:e.map(function(e){return ae().createElement("div",{className:"templately-display-condition-wrapper",key:e.id},ae().createElement("div",{className:"templately-display-condition"},ae().createElement(f5,re({},e,{update:r})),ae().createElement(g5,re({},e,{update:r})),ae().createElement(y5,re({},e,{update:r})),ae().createElement(w5,re({},e,{update:r}))),ae().createElement("button",{onClick:function(){return i(e.id)},className:"delete-button"},ae().createElement(R3,null)))}));return ae().createElement("div",{className:"templately-display-conditions"},a,ae().createElement(ca,{onClick:o,label:(0,Pt.__)("Add New Condition","templately")}))},E5=function(){var e=Ow(),t=e.saveConditions,n=e.isSaving;return ae().createElement("div",{className:"templately-display-condition-modal-footer"},ae().createElement(ca,{disabled:n,onClick:t,label:n?(0,Pt.__)("Saving...","templately"):(0,Pt.__)("Save & Close","templately")}))},O5=function(){return ae().createElement("div",{className:"templately-display-condition-modal-header"},ae().createElement("div",{className:"templately-logo"},ae().createElement(Dn,{width:"37.66px",className:"vector-logo"}),ae().createElement(Mn,{className:"text-logo"})),ae().createElement("button",{className:"close-button",onClick:function(){window.TemplatelyAppManager.close("templately-edit-conditions-app")}},ae().createElement(R3,null)))};function S5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S5(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const _5=fn(function(e,t){var n,r,o,i;return x5(x5({},t),{},{isLoading:null!==(n=e.conditions.isLoading)&&void 0!==n&&n,conditions:null!==(r=e.conditions.conditions)&&void 0!==r?r:[],conditionsByTemplate:null!==(o=null===(i=e.conditions.conditionsByTemplate)||void 0===i?void 0:i[null==t?void 0:t.templateID])&&void 0!==o?o:[]})},function(e){return{getConditions:function(t){return e(function(e){return{type:Vr,template_id:e}}(t))}}})(function(e){var t;if((0,oe.useEffect)(function(){e.getConditions(e.templateID)},[]),e.isLoading)return ae().createElement("div",{className:"templately-display-condition-loader"},ae().createElement(ma,null));var n={id:e.templateID,conditions:[]};return(null===(t=e.conditionsByTemplate)||void 0===t?void 0:t.length)>0&&(n.conditions=e.conditionsByTemplate),ae().createElement(ae().Fragment,null,ae().createElement(Ew,{template:n},ae().createElement("div",{className:"templately-display-condition-modal-wrapper"},ae().createElement(O5,null),ae().createElement("div",{className:"templately-display-condition-modal-body"},ae().createElement("h1",null,"Where Do You Want to Display This Template"),ae().createElement("p",null,"Set the conditions that determine where your Template is used throughout your site.",ae().createElement("br",null),"For example, choose 'Entire Site' to display the template across your site."),ae().createElement(k5,null)),ae().createElement(E5,null))))});function C5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C5(Object(n),!0).forEach(function(t){Ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const T5=function(){var e,t,n=pe((0,oe.useState)(!1),2),r=n[0],o=n[1],i=pe((0,oe.useState)({platform:"elementor",type:"",title:""}),2),a=i[0],s=i[1],l=function(){var e=ni(oi().mark(function e(){var t,n,r,i;return oi().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.next=1,Si("/templately/v1/create-template",P5({nonce:templately.nonce},a));case 1:t=e.sent,n=t.response,r=t.error,n&&(i=new URL(n))&&(window.location.href=i.href),r&&console.error("Error: Template Creation",r),o(!1);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return ae().createElement("div",{className:"templately-theme-builder-modal-html-body-inner"},ae().createElement(oT.RadioControl,{className:"templately-theme-builder__choose-platform",selected:null==a?void 0:a.platform,options:[{label:"Elementor",value:"elementor"},{label:"Gutenberg",value:"gutenberg"}],onChange:function(e){return s(P5(P5({},a),{},{platform:e}))}}),ae().createElement("div",{className:"templately-theme-builder__choose-type-wrapper"},ae().createElement("label",null,"Chose the type of template you want to work on"),ae().createElement(Qh,{isSearchable:!1,className:"templately-theme-builder__choose-type",classNamePrefix:"templately-theme-builder__choose-type",placeholder:(0,Pt.__)("Select template type","templately"),required:!0,noOptionsMessage:function(){return(0,Pt.__)("No type Found","templately")},options:null===(e=templately)||void 0===e?void 0:e.types,onChange:function(e){return s(P5(P5({},a),{},{type:null==e?void 0:e.value}))}})),ae().createElement(oT.TextControl,{className:"templately-theme-builder__choose-title",label:"Name your template",value:null===(t=templately)||void 0===t?void 0:t.title,placeholder:"Enter template name (optional)",onChange:function(e){return s(P5(P5({},a),{},{title:e}))}}),ae().createElement("button",{className:"submit-button ".concat(""===(null==a?void 0:a.type)||r?"disabled":""),onClick:l,disabled:r||!(null!=a&&a.type)},(0,Pt.__)("Create Template","templately")))},A5=function(){return ae().createElement("span",{onClick:function(){ba({showConfirmButton:!1,showDenyButton:!1,icon:!1,title:!1,showCloseButton:!0,customClass:{container:"templately-theme-builder-modal-container",popup:"templately-theme-builder-modal-popup",closeButton:"templately-theme-builder-modal-close-button",htmlContainer:"templately-theme-builder-modal-html"},html:ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-theme-builder-modal-html-header"},ae().createElement("h3",{className:"templately-title"},(0,Pt.__)("Templates Make your Work More Efficient","templately")),ae().createElement("p",{className:"templately-details"},(0,Pt.__)("Templates help you create different sections of your site, and with just a single click, you can reuse them whenever needed","templately"))),ae().createElement("div",{className:"templately-theme-builder-modal-html-body"},ae().createElement(T5,null)))},!0).then(function(e){})}},(0,Pt.__)("Add New Template","templately"))},D5=function(e){return ae().createElement(A5,null)},M5=function(){var e=pe((0,oe.useState)(!1),2),t=e[0],n=e[1],r=function(){ya.close()};return ae().createElement(ae().Fragment,null,ae().createElement("div",{className:"templately-display-condition-modal-header"},ae().createElement("div",{className:"templately-logo"}),ae().createElement("button",{className:"close-button",onClick:r},ae().createElement(R3,null))),ae().createElement("div",{className:"templately-display-condition-modal-body"},!t&&ae().createElement("div",{className:"normal"},ae().createElement("h2",null,(0,Pt.__)("Are you sure you want to revert to your old website?","templately")),ae().createElement("div",{className:"warning-text"},(0,Pt.__)("Warning: This will remove your existing settings and content with the previous one.","templately"))),ae().createElement("div",{className:"reverting",style:{display:t?"":"none"}},ae().createElement(ma,null),ae().createElement("div",null,ae().createElement("p",null,(0,Pt.__)("Restoring previous version of your website. This usually takes a few moments. Please wait…","templately"))))),ae().createElement("div",{className:"templately-display-condition-modal-footer"},ae().createElement(ca,{className:"confirm-revert",disabled:t,onClick:function(e){var t;n(!0);var r=null===(t=e.target.closest(".templately-sweetalert"))||void 0===t?void 0:t.querySelector(".swal2-icon");r&&(r.style.display="none"),ai()({url:(0,si.addQueryArgs)(ajaxurl,{action:"templately_pack_import_revert",nonce:window.templately.nonce})}).then(function(e){n(!1),ya.close(e),null!=e&&e.success})},label:t?(0,Pt.__)("Processing...","templately"):(0,Pt.__)("Yes, Revert","templately")}),ae().createElement(ca,{disabled:t,onClick:r,label:(0,Pt.__)("Cancel","templately")})))},N5=function(e){var t=(0,oe.useMemo)(function(){return{key:"success",error:{title:(0,Pt.__)("Something went wrong.","templately"),content:(0,Pt.__)("Something went wrong while creating workspace for you. Try Later or Contact support.","templately"),args:{timer:null,showCloseButton:!0,showCancelButton:!0,cancelButtonText:"Close"}},success:{title:(0,Pt.__)("Successfully Reverted","templately"),content:(0,Pt.__)("Old website has been successfully restored.","templately"),args:{timer:null,showCloseButton:!0,showConfirmButton:!0,confirmButtonText:"Visit Site"}}}},[]);return ae().createElement("span",{onClick:function(e){e.preventDefault(),ba({icon:"warning",onConfirm:function(e){var n;if(null!=e&&null!==(n=e.data)&&void 0!==n&&n.site_url){var r=e.data.site_url;t.success.args.confirmButtonText='<a href="'.concat(r,'" target="_blank">Visit Site</a>'),t.success.args.didDestroy=function(t){e.success&&e.data.redirect&&setTimeout(function(){window.location=e.data.redirect},500)}}wa(t,e)},html:ae().createElement(M5,null),didDestroy:function(){}},!0).then(function(e){e.success})}},(0,Pt.__)("Revert Now","templately"))},L5=function(e){var t=pe((0,oe.useState)({action:Lg.action,location:Lg.location}),2),n=t[0],r=t[1];return(0,oe.useLayoutEffect)(function(){return Lg.listen(function(e,t){r({action:t,location:e})})},[Lg]),ae().createElement(ae().StrictMode,null,ae().createElement(xg,{value:{store:hE,history:Lg}},ae().createElement(It,{displayName:"ReduxProvider",store:hE,context:Tt},(null==e?void 0:e.conditions)&&ae().createElement(_5,e),(null==e?void 0:e.revert)&&ae().createElement(N5,e),!(null!=e&&e.settings)&&!(null!=e&&e.conditions)&&!(null!=e&&e.revert)&&!e.addNewTemplate&&ae().createElement(gt,{location:n.location,basename:"/",navigator:Lg,navigationType:n.action},ae().createElement(u5,e)))))};window.wp.domReady,(0,ce.addFilter)("templately_before_content_header","templately",function(e){return React.createElement(sx,e)});var I5=function(e){return React.createElement("div",{className:"templately-gutenberg"},React.createElement(L5,re({platform:"gutenberg"},e)))};if(null!=document.getElementById("templatelyAdmin")&&(document.querySelectorAll(".toplevel_page_templately #wpbody-content > .notice, #ehe-admin-cb").forEach(function(e){return e.remove()}),le().render(React.createElement(L5,{root:!0}),document.getElementById("templatelyAdmin"))),null!=document.getElementById("templatelyAdminSetting")&&(document.querySelectorAll(".templately_page_templately_settings #wpbody-content > .notice, #ehe-admin-cb").forEach(function(e){return e.remove()}),le().render(React.createElement(L5,{isSettings:!0}),document.getElementById("templatelyAdminSetting"))),null!=document.getElementById("templately-theme-builder-admin-header")){var R5=document.querySelector(".post-type-templately_library a.page-title-action");R5&&(le().render(React.createElement(D5,{platform:"elementor"}),R5),R5.classList.add("rendered"),R5.addEventListener("click",function(e){e.preventDefault()}))}window.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".templately-edit-conditions").forEach(function(e){e.addEventListener("click",function(t){t.preventDefault();var n=e.getAttribute("data-template_id");window.TemplatelyAppManager.open({templateID:n},"templately-edit-conditions-app","conditions"),document.querySelector(".templately-edit-conditions-app-wrapper.open").addEventListener("click",function(e){e.target.matches(".templately-edit-conditions-app-wrapper.open")&&window.TemplatelyAppManager.close("templately-edit-conditions-app")})})})}),function(e){e.TemplatelyAppManager={open:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"elementor",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return this.id=t,this.platform=n,null===r&&"elementor"===n&&(r=React.createElement(L5,re({platform:"elementor"},e))),null===r&&"gutenberg"===n&&(t=document.getElementById(t),r=React.createElement(I5,e)),null===r&&"conditions"===n&&(t=document.getElementById(t),r=React.createElement(L5,re({conditions:!0,root:!0},e)),t.parentElement.classList.add("open")),le().render(r,t)},close:function(t){var n,r;if(null!==(r=t=null!==(n=this.id)&&void 0!==n?n:t)&&void 0!==r&&r.tagName||(t=document.getElementById(t)),t.parentElement.classList.contains("open")&&t.parentElement.classList.remove("open"),"elementor"!==this.platform)return le().unmountComponentAtNode(t);e.TemplatelyModal.hide()}}}(window);var j5=function(){var e=document.getElementById("templatelyAdmin");if("templatelyAdmin"===(null==e?void 0:e.id)){if(window.scrollY+window.innerHeight===document.documentElement.scrollHeight){var t=document.querySelector(".templately-sidebar-filter-buttons");t&&(t.style.bottom="40px")}var n=document.querySelector("#adminmenuwrap"),r=document.querySelector("body"),o=document.querySelector(".toplevel_page_templately");(null==n?void 0:n.offsetHeight)>(null==r?void 0:r.offsetHeight)?"object"==ne(o)&&"BODY"===(null==o?void 0:o.nodeName)&&(o.style.height=(null==n?void 0:n.offsetHeight)+"px"):o.style.height="100%"}};if(window.addEventListener("DOMContentLoaded",j5),window.addEventListener("resize",j5),window.addEventListener("scroll",function(){var e=document.getElementById("templatelyAdmin");if("templatelyAdmin"===(null==e?void 0:e.id)){var t=document.querySelector(".templately-sidebar-filter-buttons");if(null!=t){var n=window.scrollY+window.innerHeight,r=document.documentElement.scrollHeight,o=r-40;t.style.bottom=n>=o?n-o+"px":"0px",n===r?t.classList.add("tsfb-scroll-end"):t.classList.remove("tsfb-scroll-end")}}}),null!=document.getElementById("templately-fsi-revert-wrapper")){var F5=document.getElementById("templately-fsi-revert-wrapper"),z5=F5.getElementsByTagName("button");if(z5&&z5[0]){le().render(React.createElement(N5,null),z5[0]);var B5=F5.parentNode.querySelector(".subsubsub"),U5=F5.parentNode.parentNode.querySelector("#posts-filter");F5.style.display="block",B5.style.display="none",U5.style.display="none"}}})()})();