@yext/visual-editor 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +72 -14
- package/dist/index.d.ts +72 -14
- package/dist/visual-editor.cjs +203 -1
- package/dist/visual-editor.js +20004 -47
- package/package.json +3 -3
- package/dist/debugger-C-GK2f4q-BCULTx7R.cjs +0 -1
- package/dist/debugger-C-GK2f4q-BMyeCsO4.js +0 -286
- package/dist/index-BGhAL0Pq.js +0 -48497
- package/dist/index-eGvjhehK.cjs +0 -297
package/dist/index-eGvjhehK.cjs
DELETED
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
"use strict";var K1=Object.defineProperty;var U1=(e,t,n)=>t in e?K1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var hl=(e,t,n)=>U1(e,typeof t!="symbol"?t+"":t,n);const H=require("react"),Iu=require("react-dom"),Hn=require("@measured/puck"),Ag=require("uuid");function oE(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=oE(H),iE=oE(Iu),ar=["http://localhost","https://dev.yext.com","https://qa.yext.com","https://sandbox.yext.com","https://www.yext.com","https://app-qa.eu.yext.com","https://app.eu.yext.com"],aE=(e,t,n="*")=>t==null?void 0:t.postMessage(e,{targetOrigin:n}),zo=(e,t)=>{const[n,r]=H.useState("pending");return sE(e,t,V1(r)),{sendToParent:i=>{if(!window.parent)throw new Error("Parent window has closed");r("pending");for(const a of t)aE({...i,type:e},window.parent,a)},status:n}},Ma=(e,t,n)=>{sE(e,t,(o,i,a)=>{const{type:l,payload:u}=o;l===e&&typeof n=="function"&&n(p=>aE({...p,type:e},a,i),u)})},sE=(e,t,n)=>{const[r,o]=H.useState(),[i,a]=H.useState(),l=H.useRef(),u=H.useRef();l.current=r,u.current=i;const p=H.useCallback(({origin:m,source:b,data:C})=>{var y;if((y=C==null?void 0:C.source)!=null&&y.startsWith("react-devtools")||!t.includes(m))return;const{type:_}=C;_===e&&(a(b),o(m),n(C,m,b))},[e,t,a,o,n]);H.useEffect(()=>(window.addEventListener("message",p),()=>window.removeEventListener("message",p)),[e,i,r,p])},V1=e=>(t,n,r)=>{const{status:o}=t;o==="success"?e("success"):o==="error"&&e("error")},Y1=()=>{const[e,t]=H.useState();return Ma("getEntityDocument",ar,(n,r)=>{t(r),n({status:"success",payload:{message:"getEntityDocument received"}})}),e},q1=()=>{const[e,t]=H.useState(void 0);return Ma("getTemplateStream",ar,(n,r)=>{t(r.stream.schema.fields),n({status:"success",payload:{message:"templateStream received"}})}),Ma("getDevEntityFields",ar,(n,r)=>{t(lE(r)),n({status:"success",payload:{message:"getDevEntityFields received"}})}),e},lE=e=>e.map(t=>({name:t.name,definition:{name:t.name,typeName:t.typeName,type:t.type,registryId:t.registryId,typeRegistryId:t.typeRegistryId,isList:t.isList},children:t.children?{fields:lE(t.children)}:{}})),cE=ge.createContext(void 0),uE=()=>{const e=ge.useContext(cE);if(!e)throw new Error("useEntityFields must be used within VisualEditorProvider");return e},Rg=ge.createContext(void 0),Vr=()=>{const e=ge.useContext(Rg);if(!e)throw new Error("useDocument must be used within VisualEditorProvider");return e},$g=ge.createContext(void 0),dE=()=>{const e=ge.useContext($g);if(!e)throw new Error("useTailwindConfig must be used within VisualEditorProvider");return e},Z1=(e,t)=>{const n=J1(e);return t&&Object.entries(n).forEach(([r])=>{t[r]&&(n[r]=t[r])}),n},J1=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if("default"in i)t[`--${i.plugin}-${n}-${o}`]=typeof i.default=="number"?`${i.default}px`:i.default;else if("styles"in i)for(const a in i.styles)t[`--${i.plugin}-${n}-${o}-${a}`]=typeof i.styles[a].default=="number"?`${i.styles[a].default}px`:i.styles[a].default}}return t},X1=(e,t,n)=>{const r={};for(const o in n.styles){const i=n.styles[o];if("default"in i)i.type==="number"?r[`--${i.plugin}-${t}-${o}`]=e[o]+"px":r[`--${i.plugin}-${t}-${o}`]=e[o];else for(const a in i.styles)i.styles[a].type==="number"?r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]+"px":r[`--${i.plugin}-${t}-${o}-${a}`]=e[o][a]}return r},yi=class yi{constructor(t=!1){hl(this,"enable",t=>{yi.enabled=t,yi.enabled&&console.log("[DEBUG] xYextDebug enabled")});hl(this,"logData",(t,n)=>{yi.enabled&&console.log("[DEBUG]",t,"-",n)});hl(this,"logFunc",t=>{yi.enabled&&console.log("[DEBUG] -->",t,"called")});hl(this,"log",t=>{yi.enabled&&console.log("[DEBUG]",t)});yi.enabled=t,yi.enabled&&console.log("[DEBUG] xYextDebug enabled")}};hl(yi,"enabled");let Ur=yi;const Dg={Alegreya:{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Asap:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Bitter:{italics:!0,minWeight:100,maxWeight:900,fallback:"serif"},Cabin:{italics:!0,minWeight:400,maxWeight:700,fallback:"sans-serif"},Cinzel:{italics:!1,minWeight:400,maxWeight:900,fallback:"serif"},"EB Garamond":{italics:!0,minWeight:400,maxWeight:800,fallback:"serif"},"Exo 2":{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},Inconsolata:{italics:!1,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Josefin Sans":{italics:!0,minWeight:100,maxWeight:700,fallback:"sans-serif"},Lora:{italics:!0,minWeight:400,maxWeight:700,fallback:"serif"},Montserrat:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Open Sans":{italics:!0,minWeight:300,maxWeight:800,fallback:"sans-serif"},"Playfair Display":{italics:!0,minWeight:400,maxWeight:900,fallback:"serif"},Raleway:{italics:!0,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Flex":{italics:!1,minWeight:100,maxWeight:900,fallback:"sans-serif"},"Roboto Slab":{italics:!1,minWeight:100,maxWeight:900,fallback:"serif"},"Source Code Pro":{italics:!0,minWeight:200,maxWeight:900,fallback:"monospace"},"Source Sans 3":{italics:!0,minWeight:200,maxWeight:900,fallback:"sans-serif"},"Ubuntu Sans":{italics:!0,minWeight:100,maxWeight:800,fallback:"sans-serif"}},Q1=e=>{const t=[];for(const n in e){const r=e[n];t.push({label:n,value:`'${n}', ${r.fallback}`})}return t},eO=e=>{const t=`<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
2
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
3
|
-
<link href="https://fonts.googleapis.com/css2?`,n='display=swap" rel="stylesheet">';let r="";for(const o in e){const i=e[o],a=i.italics?":ital,wght@":":wght@",l=`${i.minWeight}..${i.maxWeight}`,u=i.italics?`0,${l};1,${l}`:l;r+="family="+o.replaceAll(" ","+")+a+u+"&"}return t+r+n},tO=eO(Dg),jp=[{label:"Thin",value:"100"},{label:"Extralight",value:"200"},{label:"Light",value:"300"},{label:"Normal",value:"400"},{label:"Medium",value:"500"},{label:"Semibold",value:"600"},{label:"Bold",value:"700"},{label:"Extrabold",value:"800"},{label:"Black",value:"900"}],nO=e=>{var i;const{fontCssVariable:t,weightOptions:n=jp}=e;if(!t||typeof window>"u")return n;const r=document.getElementById(Mg),o=(i=r==null?void 0:r.contentDocument)==null?void 0:i.getElementById("visual-editor-theme");return o?fE(o,e):jp},Xl=async e=>new Promise(t=>{const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(Mg).contentDocument)==null?void 0:i.getElementById(kg);if(o){n.disconnect();const a=fE(o,e);t([{label:"Default",value:"default"},...a])}});n.observe(document,{childList:!0,subtree:!0})}),fE=(e,{fontCssVariable:t,weightOptions:n=jp,fontList:r=Dg})=>{var l;const o=e.textContent||e.innerHTML,i=new RegExp(`${t}:\\s*(['"]?([^',\\s]+(?:\\s+[^',\\s]+)*)['"]?)(?:,|\\s|;|$)`,"i"),a=(l=o.match(i))==null?void 0:l[2];return!a||!r[a]?n:n.filter(u=>Number(u.value)<=r[a].maxWeight&&Number(u.value)>=r[a].minWeight)},kg="visual-editor-theme",Mg="preview-frame",af=new Ur,rO=(e,t,n)=>{var i;af.logFunc("applyTheme");const r=(i=e==null?void 0:e.__)==null?void 0:i.theme,o=r?JSON.parse(r):void 0;return Object.keys(t).length>0?`${n??""}${tO}<style id="${kg}" type="text/css">${hE(o,t)}</style>`:n??""},hE=(e,t)=>{af.logFunc("internalApplyTheme");const n=Z1(t,e);return!n||Object.keys(n).length===0?"":(af.logData("THEME_VALUES_TO_APPLY",n),".components{"+Object.entries(n).map(([r,o])=>`${r}:${o} !important`).join(";")+"}")},Ou=async(e,t)=>{af.logFunc("updateThemeInEditor");const n=new MutationObserver(()=>{var i;const o=(i=document.getElementById(Mg).contentDocument)==null?void 0:i.getElementById(kg);o&&(n.disconnect(),o.innerText=hE(e,t))});n.observe(document,{childList:!0,subtree:!0})},br=(e,t)=>{if(!(!t||typeof t!="object"||!("field"in t)||!("constantValue"in t))){if(t.constantValueEnabled||!t.field)return t.constantValue;try{const n=t.field.split(".");let r=!1,o=e;for(let i=0;i<n.length;i++)if((o==null?void 0:o[n[i]])!==void 0)o=o[n[i]];else{r=!0;break}if(!r)return o}catch(n){console.error("Error in resolveYextEntityField:",n)}console.warn(`The field ${t.field} was not found in the document.`)}},oO=e=>{const t={};for(const n in e){const r=e[n].styles;for(const o in r){const i=r[o];if(t[i.plugin]||(t[i.plugin]={}),"default"in i)t[i.plugin][`${n}-${o}`]=`var(--${i.plugin}-${n}-${o})`;else if("styles"in i){const a={};for(const l in i.styles)a[l]=`var(--${i.plugin}-${n}-${o}-${l})`;t[i.plugin][`${n}-${o}`]=a}}}return t},pE=(e,t)=>{const n={...t};for(const r in e)if(r in e){const o=e[r],i=n[r];zy(o)&&zy(i)?n[r]=pE(o,i):(o&&i&&console.warn(`Both theme.config.ts and tailwind.config.ts provided a value for ${r}. Using the value from theme.config.ts (${i})`),n[r]=i??o)}return n},zy=e=>e!==null&&typeof e=="object",iO=(e,t)=>{const n=oO(t);return pE(e,n)};function gE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=gE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mE(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=gE(e))&&(r&&(r+=" "),r+=t);return r}const Pg="-",aO=e=>{const t=lO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(Pg);return l[0]===""&&l.length!==1&&l.shift(),yE(l,t)||sO(a)},getConflictingClassGroupIds:(a,l)=>{const u=n[a]||[];return l&&r[a]?[...u,...r[a]]:u}}},yE=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?yE(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Pg);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},Hy=/^\[(.+)\]$/,sO=e=>{if(Hy.test(e)){const t=Hy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},lO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return uO(Object.entries(e.classGroups),n).forEach(([i,a])=>{Bp(a,r,i,t)}),r},Bp=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Gy(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(cO(o)){Bp(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Bp(a,Gy(t,i),n,r)})})},Gy=(e,t)=>{let n=e;return t.split(Pg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cO=e=>e.isThemeGetter,uO=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e,dO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},vE="!",fO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=l=>{const u=[];let p=0,m=0,b;for(let T=0;T<l.length;T++){let O=l[T];if(p===0){if(O===o&&(r||l.slice(T,T+i)===t)){u.push(l.slice(m,T)),m=T+i;continue}if(O==="/"){b=T;continue}}O==="["?p++:O==="]"&&p--}const C=u.length===0?l:l.substring(m),_=C.startsWith(vE),y=_?C.substring(1):C,v=b&&b>m?b-m:void 0;return{modifiers:u,hasImportantModifier:_,baseClassName:y,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:a}):a},hO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},pO=e=>({cache:dO(e.cacheSize),parseClassName:fO(e),...aO(e)}),gO=/\s+/,mO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(gO);let l="";for(let u=a.length-1;u>=0;u-=1){const p=a[u],{modifiers:m,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:_}=n(p);let y=!!_,v=r(y?C.substring(0,_):C);if(!v){if(!y){l=p+(l.length>0?" "+l:l);continue}if(v=r(C),!v){l=p+(l.length>0?" "+l:l);continue}y=!1}const T=hO(m).join(":"),O=b?T+vE:T,R=O+v;if(i.includes(R))continue;i.push(R);const k=o(v,y);for(let P=0;P<k.length;++P){const M=k[P];i.push(O+M)}l=p+(l.length>0?" "+l:l)}return l};function yO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bE(t))&&(r&&(r+=" "),r+=n);return r}const bE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bE(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ky(e,...t){let n,r,o,i=a;function a(u){const p=t.reduce((m,b)=>b(m),e());return n=pO(p),r=n.cache.get,o=n.cache.set,i=l,l(u)}function l(u){const p=r(u);if(p)return p;const m=mO(u,n);return o(u,m),m}return function(){return i(yO.apply(null,arguments))}}const wn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_E=/^\[(?:([a-z-]+):)?(.+)\]$/i,vO=/^\d+\/\d+$/,bO=new Set(["px","full","screen"]),_O=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,EO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,CO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hi=e=>Bl(e)||bO.has(e)||vO.test(e),Na=e=>Ql(e,"length",DO),Bl=e=>!!e&&!Number.isNaN(Number(e)),Mh=e=>Ql(e,"number",Bl),ru=e=>!!e&&Number.isInteger(Number(e)),TO=e=>e.endsWith("%")&&Bl(e.slice(0,-1)),qt=e=>_E.test(e),Sa=e=>_O.test(e),NO=new Set(["length","size","percentage"]),SO=e=>Ql(e,NO,xE),OO=e=>Ql(e,"position",xE),AO=new Set(["image","url"]),RO=e=>Ql(e,AO,MO),$O=e=>Ql(e,"",kO),ou=()=>!0,Ql=(e,t,n)=>{const r=_E.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},DO=e=>xO.test(e)&&!EO.test(e),xE=()=>!1,kO=e=>CO.test(e),MO=e=>wO.test(e),Uy=()=>{const e=wn("colors"),t=wn("spacing"),n=wn("blur"),r=wn("brightness"),o=wn("borderColor"),i=wn("borderRadius"),a=wn("borderSpacing"),l=wn("borderWidth"),u=wn("contrast"),p=wn("grayscale"),m=wn("hueRotate"),b=wn("invert"),C=wn("gap"),_=wn("gradientColorStops"),y=wn("gradientColorStopPositions"),v=wn("inset"),T=wn("margin"),O=wn("opacity"),R=wn("padding"),k=wn("saturate"),P=wn("scale"),M=wn("sepia"),Y=wn("skew"),X=wn("space"),oe=wn("translate"),Z=()=>["auto","contain","none"],U=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",qt,t],de=()=>[qt,t],pe=()=>["",Hi,Na],te=()=>["auto",Bl,qt],fe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",qt],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Bl,qt];return{cacheSize:500,separator:":",theme:{colors:[ou],spacing:[Hi,Na],blur:["none","",Sa,qt],brightness:W(),borderColor:[e],borderRadius:["none","","full",Sa,qt],borderSpacing:de(),borderWidth:pe(),contrast:W(),grayscale:re(),hueRotate:W(),invert:re(),gap:de(),gradientColorStops:[e],gradientColorStopPositions:[TO,Na],inset:Q(),margin:Q(),opacity:W(),padding:de(),saturate:W(),scale:W(),sepia:re(),skew:W(),space:de(),translate:de()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[Sa]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...fe(),qt]}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ru,qt]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",ru,qt]}],"grid-cols":[{"grid-cols":[ou]}],"col-start-end":[{col:["auto",{span:["full",ru,qt]},qt]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[ou]}],"row-start-end":[{row:["auto",{span:[ru,qt]},qt]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],ms:[{ms:[T]}],me:[{me:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[Sa]},Sa]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Sa,Na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mh]}],"font-family":[{font:[ou]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",Bl,Mh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hi,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hi,Na]}],"underline-offset":[{"underline-offset":["auto",Hi,qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:de()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...fe(),OO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[Hi,qt]}],"outline-w":[{outline:[Hi,Na]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[Hi,Na]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Sa,$O]}],"shadow-color":[{shadow:[ou]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":[...j(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Sa,qt]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[b]}],saturate:[{saturate:[k]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qt]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[ru,qt]}],"translate-x":[{"translate-x":[oe]}],"translate-y":[{"translate-y":[oe]}],"skew-x":[{"skew-x":[Y]}],"skew-y":[{"skew-y":[Y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":de()}],"scroll-mx":[{"scroll-mx":de()}],"scroll-my":[{"scroll-my":de()}],"scroll-ms":[{"scroll-ms":de()}],"scroll-me":[{"scroll-me":de()}],"scroll-mt":[{"scroll-mt":de()}],"scroll-mr":[{"scroll-mr":de()}],"scroll-mb":[{"scroll-mb":de()}],"scroll-ml":[{"scroll-ml":de()}],"scroll-p":[{"scroll-p":de()}],"scroll-px":[{"scroll-px":de()}],"scroll-py":[{"scroll-py":de()}],"scroll-ps":[{"scroll-ps":de()}],"scroll-pe":[{"scroll-pe":de()}],"scroll-pt":[{"scroll-pt":de()}],"scroll-pr":[{"scroll-pr":de()}],"scroll-pb":[{"scroll-pb":de()}],"scroll-pl":[{"scroll-pl":de()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Hi,Na,Mh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},PO=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:o,extend:i={},override:a={}})=>{_u(e,"cacheSize",t),_u(e,"prefix",n),_u(e,"separator",r),_u(e,"experimentalParseClassName",o);for(const l in a)IO(e[l],a[l]);for(const l in i)LO(e[l],i[l]);return e},_u=(e,t,n)=>{n!==void 0&&(e[t]=n)},IO=(e,t)=>{if(t)for(const n in t)_u(e,n,t[n])},LO=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},EE=(e,...t)=>typeof e=="function"?Ky(Uy,e,...t):Ky(()=>PO(Uy(),e),...t),CE={extend:{classGroups:{"font-family":[{font:[e=>e.endsWith("-fontFamily")]}],"font-weight":[{font:[e=>e.endsWith("-fontWeight")]}],"font-size":[{text:[e=>e.endsWith("-fontSize")]}],"text-color":[{text:[e=>e.endsWith("-color")]}],"gap-y":[{"gap-y":[e=>e.endsWith("-verticalSpacing")]}],"max-w":[{"max-w":[e=>e.endsWith("-maxWidth")]}],"bg-color":[{"bg-color":[e=>e.endsWith("-backgroundColor")]}],rounded:[{rounded:[e=>e.endsWith("-borderRadius")]}]}}},FO=EE(CE);function jr(...e){return FO(mE(e))}const jO=EE({prefix:"ve-"});function sr(...e){return jO(mE(e))}var Sd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function BO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}},iu={};/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var Vy;function WO(){if(Vy)return iu;Vy=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,b={},C=null,_=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(_=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(b[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)b[m]===void 0&&(b[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:_,props:b,_owner:o.current}}return iu.Fragment=n,iu.jsx=a,iu.jsxs=a,iu}var au={};/**
|
|
12
|
-
* @license React
|
|
13
|
-
* react-jsx-runtime.development.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var Yy;function zO(){return Yy||(Yy=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(ae){if(ae===null||typeof ae!="object")return null;var $e=y&&ae[y]||ae[v];return typeof $e=="function"?$e:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(ae){{for(var $e=arguments.length,je=new Array($e>1?$e-1:0),at=1;at<$e;at++)je[at-1]=arguments[at];k("error",ae,je)}}function k(ae,$e,je){{var at=O.ReactDebugCurrentFrame,xt=at.getStackAddendum();xt!==""&&($e+="%s",je=je.concat([xt]));var bt=je.map(function(ht){return String(ht)});bt.unshift("Warning: "+$e),Function.prototype.apply.call(console[ae],console,bt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||oe||ae===o||ae===p||ae===m||X||ae===_||P||M||Y||typeof ae=="object"&&ae!==null&&(ae.$$typeof===C||ae.$$typeof===b||ae.$$typeof===a||ae.$$typeof===l||ae.$$typeof===u||ae.$$typeof===Z||ae.getModuleId!==void 0))}function Q(ae,$e,je){var at=ae.displayName;if(at)return at;var xt=$e.displayName||$e.name||"";return xt!==""?je+"("+xt+")":je}function de(ae){return ae.displayName||"Context"}function pe(ae){if(ae==null)return null;if(typeof ae.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ae=="function")return ae.displayName||ae.name||null;if(typeof ae=="string")return ae;switch(ae){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof ae=="object")switch(ae.$$typeof){case l:var $e=ae;return de($e)+".Consumer";case a:var je=ae;return de(je._context)+".Provider";case u:return Q(ae,ae.render,"ForwardRef");case b:var at=ae.displayName||null;return at!==null?at:pe(ae.type)||"Memo";case C:{var xt=ae,bt=xt._payload,ht=xt._init;try{return pe(ht(bt))}catch{return null}}}return null}var te=Object.assign,fe=0,V,j,ee,re,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){V=console.log,j=console.info,ee=console.warn,re=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var ae={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:ae,log:ae,warn:ae,error:ae,group:ae,groupCollapsed:ae,groupEnd:ae})}fe++}}function N(){{if(fe--,fe===0){var ae={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},ae,{value:V}),info:te({},ae,{value:j}),warn:te({},ae,{value:ee}),error:te({},ae,{value:re}),group:te({},ae,{value:B}),groupCollapsed:te({},ae,{value:W}),groupEnd:te({},ae,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(ae,$e,je){{if(q===void 0)try{throw Error()}catch(xt){var at=xt.stack.trim().match(/\n( *(at )?)/);q=at&&at[1]||""}return`
|
|
20
|
-
`+q+ae}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(ae,$e){if(!ae||he)return"";{var je=se.get(ae);if(je!==void 0)return je}var at;he=!0;var xt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=I.current,I.current=null,w();try{if($e){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(qn){at=qn}Reflect.construct(ae,[],ht)}else{try{ht.call()}catch(qn){at=qn}ae.call(ht.prototype)}}else{try{throw Error()}catch(qn){at=qn}ae()}}catch(qn){if(qn&&at&&typeof qn.stack=="string"){for(var At=qn.stack.split(`
|
|
21
|
-
`),Ut=at.stack.split(`
|
|
22
|
-
`),Mt=At.length-1,Yt=Ut.length-1;Mt>=1&&Yt>=0&&At[Mt]!==Ut[Yt];)Yt--;for(;Mt>=1&&Yt>=0;Mt--,Yt--)if(At[Mt]!==Ut[Yt]){if(Mt!==1||Yt!==1)do if(Mt--,Yt--,Yt<0||At[Mt]!==Ut[Yt]){var mn=`
|
|
23
|
-
`+At[Mt].replace(" at new "," at ");return ae.displayName&&mn.includes("<anonymous>")&&(mn=mn.replace("<anonymous>",ae.displayName)),typeof ae=="function"&&se.set(ae,mn),mn}while(Mt>=1&&Yt>=0);break}}}finally{he=!1,I.current=bt,N(),Error.prepareStackTrace=xt}var Er=ae?ae.displayName||ae.name:"",Cn=Er?ue(Er):"";return typeof ae=="function"&&se.set(ae,Cn),Cn}function Be(ae,$e,je){return Oe(ae,!1)}function ce(ae){var $e=ae.prototype;return!!($e&&$e.isReactComponent)}function le(ae,$e,je){if(ae==null)return"";if(typeof ae=="function")return Oe(ae,ce(ae));if(typeof ae=="string")return ue(ae);switch(ae){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof ae=="object")switch(ae.$$typeof){case u:return Be(ae.render);case b:return le(ae.type,$e,je);case C:{var at=ae,xt=at._payload,bt=at._init;try{return le(bt(xt),$e,je)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Pe.setExtraStackFrame(je)}else Pe.setExtraStackFrame(null)}function Xe(ae,$e,je,at,xt){{var bt=Function.call.bind(ve);for(var ht in ae)if(bt(ae,ht)){var At=void 0;try{if(typeof ae[ht]!="function"){var Ut=Error((at||"React class")+": "+je+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ae[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ut.name="Invariant Violation",Ut}At=ae[ht]($e,ht,at,je,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Mt){At=Mt}At&&!(At instanceof Error)&&(We(xt),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",at||"React class",je,ht,typeof At),We(null)),At instanceof Error&&!(At.message in Me)&&(Me[At.message]=!0,We(xt),R("Failed %s type: %s",je,At.message),We(null))}}}var st=Array.isArray;function dt(ae){return st(ae)}function Ct(ae){{var $e=typeof Symbol=="function"&&Symbol.toStringTag,je=$e&&ae[Symbol.toStringTag]||ae.constructor.name||"Object";return je}}function Se(ae){try{return me(ae),!1}catch{return!0}}function me(ae){return""+ae}function _e(ae){if(Se(ae))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(ae)),me(ae)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(ae){if(ve.call(ae,"ref")){var $e=Object.getOwnPropertyDescriptor(ae,"ref").get;if($e&&$e.isReactWarning)return!1}return ae.ref!==void 0}function Et(ae){if(ve.call(ae,"key")){var $e=Object.getOwnPropertyDescriptor(ae,"key").get;if($e&&$e.isReactWarning)return!1}return ae.key!==void 0}function Bt(ae,$e){if(typeof ae.ref=="string"&&De.current&&$e&&De.current.stateNode!==$e){var je=pe(De.current.type);tt[je]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),ae.ref),tt[je]=!0)}}function Qe(ae,$e){{var je=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"key",{get:je,configurable:!0})}}function et(ae,$e){{var je=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",$e))};je.isReactWarning=!0,Object.defineProperty(ae,"ref",{get:je,configurable:!0})}}var lt=function(ae,$e,je,at,xt,bt,ht){var At={$$typeof:t,type:ae,key:$e,ref:je,props:ht,_owner:bt};return At._store={},Object.defineProperty(At._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(At,"_self",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.defineProperty(At,"_source",{configurable:!1,enumerable:!1,writable:!1,value:xt}),Object.freeze&&(Object.freeze(At.props),Object.freeze(At)),At};function wt(ae,$e,je,at,xt){{var bt,ht={},At=null,Ut=null;je!==void 0&&(_e(je),At=""+je),Et($e)&&(_e($e.key),At=""+$e.key),ut($e)&&(Ut=$e.ref,Bt($e,xt));for(bt in $e)ve.call($e,bt)&&!Fe.hasOwnProperty(bt)&&(ht[bt]=$e[bt]);if(ae&&ae.defaultProps){var Mt=ae.defaultProps;for(bt in Mt)ht[bt]===void 0&&(ht[bt]=Mt[bt])}if(At||Ut){var Yt=typeof ae=="function"?ae.displayName||ae.name||"Unknown":ae;At&&Qe(ht,Yt),Ut&&et(ht,Yt)}return lt(ae,At,Ut,xt,at,De.current,ht)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(ae){if(ae){var $e=ae._owner,je=le(ae.type,ae._source,$e?$e.type:null);Rt.setExtraStackFrame(je)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function kt(){{if(_t.current){var ae=pe(_t.current.type);if(ae)return`
|
|
24
|
-
|
|
25
|
-
Check the render method of \``+ae+"`."}return""}}function Dt(ae){return""}var Kt={};function sn(ae){{var $e=kt();if(!$e){var je=typeof ae=="string"?ae:ae.displayName||ae.name;je&&($e=`
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+je+">.")}return $e}}function ur(ae,$e){{if(!ae._store||ae._store.validated||ae.key!=null)return;ae._store.validated=!0;var je=sn($e);if(Kt[je])return;Kt[je]=!0;var at="";ae&&ae._owner&&ae._owner!==_t.current&&(at=" It was passed a child from "+pe(ae._owner.type)+"."),qe(ae),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',je,at),qe(null)}}function wr(ae,$e){{if(typeof ae!="object")return;if(dt(ae))for(var je=0;je<ae.length;je++){var at=ae[je];yt(at)&&ur(at,$e)}else if(yt(ae))ae._store&&(ae._store.validated=!0);else if(ae){var xt=T(ae);if(typeof xt=="function"&&xt!==ae.entries)for(var bt=xt.call(ae),ht;!(ht=bt.next()).done;)yt(ht.value)&&ur(ht.value,$e)}}}function Xo(ae){{var $e=ae.type;if($e==null||typeof $e=="string")return;var je;if(typeof $e=="function")je=$e.propTypes;else if(typeof $e=="object"&&($e.$$typeof===u||$e.$$typeof===b))je=$e.propTypes;else return;if(je){var at=pe($e);Xe(je,ae.props,"prop",at,ae)}else if($e.PropTypes!==void 0&&!ot){ot=!0;var xt=pe($e);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",xt||"Unknown")}typeof $e.getDefaultProps=="function"&&!$e.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function oa(ae){{for(var $e=Object.keys(ae.props),je=0;je<$e.length;je++){var at=$e[je];if(at!=="children"&&at!=="key"){qe(ae),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",at),qe(null);break}}ae.ref!==null&&(qe(ae),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}var Tr={};function Yn(ae,$e,je,at,xt,bt){{var ht=U(ae);if(!ht){var At="";(ae===void 0||typeof ae=="object"&&ae!==null&&Object.keys(ae).length===0)&&(At+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ut=Dt();Ut?At+=Ut:At+=kt();var Mt;ae===null?Mt="null":dt(ae)?Mt="array":ae!==void 0&&ae.$$typeof===t?(Mt="<"+(pe(ae.type)||"Unknown")+" />",At=" Did you accidentally export a JSX literal instead of a component?"):Mt=typeof ae,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Mt,At)}var Yt=wt(ae,$e,je,xt,bt);if(Yt==null)return Yt;if(ht){var mn=$e.children;if(mn!==void 0)if(at)if(dt(mn)){for(var Er=0;Er<mn.length;Er++)wr(mn[Er],ae);Object.freeze&&Object.freeze(mn)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wr(mn,ae)}if(ve.call($e,"key")){var Cn=pe(ae),qn=Object.keys($e).filter(function(Qo){return Qo!=="key"}),Mr=qn.length>0?"{key: someKey, "+qn.join(": ..., ")+": ...}":"{key: someKey}";if(!Tr[Cn+Mr]){var aa=qn.length>0?"{"+qn.join(": ..., ")+": ...}":"{}";R(`A props object containing a "key" prop is being spread into JSX:
|
|
28
|
-
let props = %s;
|
|
29
|
-
<%s {...props} />
|
|
30
|
-
React keys must be passed directly to JSX without using spread:
|
|
31
|
-
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,Mr,Cn,aa,Cn),Tr[Cn+Mr]=!0}}return ae===r?oa(Yt):Xo(Yt),Yt}}function xr(ae,$e,je){return Yn(ae,$e,je,!0)}function ho(ae,$e,je){return Yn(ae,$e,je,!1)}var ia=ho,Ee=xr;au.Fragment=r,au.jsx=ia,au.jsxs=Ee}()),au}process.env.NODE_ENV==="production"?Wp.exports=WO():Wp.exports=zO();var ne=Wp.exports;const HO=({document:e,entityFields:t,tailwindConfig:n,children:r})=>ne.jsx(Rg.Provider,{value:e,children:ne.jsx(cE.Provider,{value:t,children:ne.jsx($g.Provider,{value:n,children:r})})});function Af(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];function p(b){const{scope:C,children:_,...y}=b,v=(C==null?void 0:C[e][u])||l,T=ge.useMemo(()=>y,Object.values(y));return ne.jsx(v.Provider,{value:T,children:_})}function m(b,C){const _=(C==null?void 0:C[e][u])||l,y=ge.useContext(_);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${b}\` must be used within \`${i}\``)}return p.displayName=i+"Provider",[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,GO(o,...t)]}function GO(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const b=u(i)[`__scope${p}`];return{...l,...b}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function KO(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function wE(...e){return t=>e.forEach(n=>KO(n,t))}function lr(...e){return ge.useCallback(wE(...e),e)}var xs=ge.forwardRef((e,t)=>{const{children:n,...r}=e,o=ge.Children.toArray(n),i=o.find(UO);if(i){const a=i.props.children,l=o.map(u=>u===i?ge.Children.count(a)>1?ge.Children.only(null):ge.isValidElement(a)?a.props.children:null:u);return ne.jsx(zp,{...r,ref:t,children:ge.isValidElement(a)?ge.cloneElement(a,void 0,l):null})}return ne.jsx(zp,{...r,ref:t,children:n})});xs.displayName="Slot";var zp=ge.forwardRef((e,t)=>{const{children:n,...r}=e;if(ge.isValidElement(n)){const o=YO(n);return ge.cloneElement(n,{...VO(r,n.props),ref:t?wE(t,o):o})}return ge.Children.count(n)>1?ge.Children.only(null):null});zp.displayName="SlotClone";var Ig=({children:e})=>ne.jsx(ne.Fragment,{children:e});function UO(e){return ge.isValidElement(e)&&e.type===Ig}function VO(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]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function YO(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Dn=qO.reduce((e,t)=>{const n=ge.forwardRef((r,o)=>{const{asChild:i,...a}=r,l=i?xs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),ne.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZO(e,t){e&&iE.flushSync(()=>e.dispatchEvent(t))}var Lg="Progress",Fg=100,[JO,HJ]=Af(Lg),[XO,QO]=JO(Lg),TE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eA,...a}=e;(o||o===0)&&!qy(o)&&console.error(tA(`${o}`,"Progress"));const l=qy(o)?o:Fg;r!==null&&!Zy(r,l)&&console.error(nA(`${r}`,"Progress"));const u=Zy(r,l)?r:null,p=sf(u)?i(u,l):void 0;return ne.jsx(XO,{scope:n,value:u,max:l,children:ne.jsx(Dn.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":sf(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":OE(u,l),"data-value":u??void 0,"data-max":l,...a,ref:t})})});TE.displayName=Lg;var NE="ProgressIndicator",SE=ge.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=QO(NE,n);return ne.jsx(Dn.div,{"data-state":OE(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});SE.displayName=NE;function eA(e,t){return`${Math.round(e/t*100)}%`}function OE(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function sf(e){return typeof e=="number"}function qy(e){return sf(e)&&!isNaN(e)&&e>0}function Zy(e,t){return sf(e)&&!isNaN(e)&&e<=t&&e>=0}function tA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Fg}\`.`}function nA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
33
|
-
- a positive number
|
|
34
|
-
- less than the value passed to \`max\` (or ${Fg} if no \`max\` prop is set)
|
|
35
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
36
|
-
|
|
37
|
-
Defaulting to \`null\`.`}var AE=TE,rA=SE;const RE=ge.forwardRef(({className:e,value:t,...n},r)=>ne.jsx(AE,{ref:r,className:sr("ve-relative ve-h-4 ve-w-full ve-overflow-hidden ve-rounded-full ve-bg-secondary",e),...n,children:ne.jsx(rA,{className:"ve-h-full ve-w-full ve-flex-1 ve-bg-primary ve-transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));RE.displayName=AE.displayName;function jg({progress:e}){return ne.jsxs("div",{className:"ve-flex ve-h-screen ve-loading-wrapper ve-w-screen ve-flex-col ve-items-center ve-justify-center",children:[ne.jsx(RE,{className:"ve-w-1/3 ve-loading-progress",value:e}),ne.jsx("div",{children:"Loading Visual Editor..."})]})}var Jy=["light","dark"],oA="(prefers-color-scheme: dark)",iA=ge.createContext(void 0),aA={setTheme:e=>{},themes:[]},sA=()=>{var e;return(e=ge.useContext(iA))!=null?e:aA};ge.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:u})=>{let p=i==="system",m=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,b=o?Jy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",C=(y,v=!1,T=!0)=>{let O=a?a[y]:y,R=v?y+"|| ''":`'${O}'`,k="";return o&&T&&!v&&Jy.includes(y)&&(k+=`d.style.colorScheme = '${y}';`),n==="class"?v||O?k+=`c.add(${R})`:k+="null":O&&(k+=`d[s](n,${R})`),k},_=e?`!function(){${m}${C(e)}}()`:r?`!function(){try{${m}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${p})){var t='${oA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${C("dark")}}else{${C("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}${p?"":"else{"+C(i,!1,!1)+"}"}${b}}catch(e){}}()`:`!function(){try{${m}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${C(a?"x[e]":"e",!0)}}else{${C(i,!1,!1)};}${b}}catch(t){}}();`;return ge.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:_}})});var lA=e=>{switch(e){case"success":return dA;case"info":return hA;case"warning":return fA;case"error":return pA;default:return null}},cA=Array(12).fill(0),uA=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},cA.map((n,r)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),dA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),fA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),hA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),gA=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mA=()=>{let[e,t]=H.useState(document.hidden);return H.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Hp=1,yA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Hp++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,a=r.then(async u=>{if(i=["resolve",u],H.isValidElement(u))o=!1,this.create({id:n,type:"default",message:u});else if(bA(u)&&!u.ok){o=!1;let p=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:p,description:m})}else if(t.success!==void 0){o=!1;let p=typeof t.success=="function"?await t.success(u):t.success,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:p,description:m})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){o=!1;let p=typeof t.error=="function"?await t.error(u):t.error,m=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:p,description:m})}}).finally(()=>{var u;o&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),l=()=>new Promise((u,p)=>a.then(()=>i[0]==="reject"?p(i[1]):u(i[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Hp++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},io=new yA,vA=(e,t)=>{let n=(t==null?void 0:t.id)||Hp++;return io.addToast({title:e,...t,id:n}),n},bA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_A=vA,xA=()=>io.toasts;Object.assign(_A,{success:io.success,info:io.info,warning:io.warning,error:io.error,custom:io.custom,message:io.message,promise:io.promise,dismiss:io.dismiss,loading:io.loading},{getHistory:xA});function EA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}EA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
38
|
-
`);function Od(e){return e.label!==void 0}var CA=3,wA="32px",Xy=4e3,TA=356,NA=14,SA=20,OA=200;function AA(...e){return e.filter(Boolean).join(" ")}var RA=e=>{var t,n,r,o,i,a,l,u,p,m,b;let{invert:C,toast:_,unstyled:y,interacting:v,setHeights:T,visibleToasts:O,heights:R,index:k,toasts:P,expanded:M,removeToast:Y,defaultRichColors:X,closeButton:oe,style:Z,cancelButtonStyle:U,actionButtonStyle:Q,className:de="",descriptionClassName:pe="",duration:te,position:fe,gap:V,loadingIcon:j,expandByDefault:ee,classNames:re,icons:B,closeButtonAriaLabel:W="Close toast",pauseWhenPageIsHidden:J,cn:F}=e,[w,N]=H.useState(!1),[I,q]=H.useState(!1),[ue,he]=H.useState(!1),[se,Ce]=H.useState(!1),[Oe,Be]=H.useState(!1),[ce,le]=H.useState(0),[ve,Me]=H.useState(0),Pe=H.useRef(_.duration||te||Xy),We=H.useRef(null),Xe=H.useRef(null),st=k===0,dt=k+1<=O,Ct=_.type,Se=_.dismissible!==!1,me=_.className||"",_e=_.descriptionClassName||"",De=H.useMemo(()=>R.findIndex(qe=>qe.toastId===_.id)||0,[R,_.id]),Fe=H.useMemo(()=>{var qe;return(qe=_.closeButton)!=null?qe:oe},[_.closeButton,oe]);H.useMemo(()=>_.duration||te||Xy,[_.duration,te]);let ke=H.useRef(0),ze=H.useRef(0),tt=H.useRef(0),ut=H.useRef(null),[Et,Bt]=fe.split("-"),Qe=H.useMemo(()=>R.reduce((qe,ot,yt)=>yt>=De?qe:qe+ot.height,0),[R,De]),et=mA(),lt=_.invert||C,wt=Ct==="loading";ze.current=H.useMemo(()=>De*V+Qe,[De,Qe]),H.useEffect(()=>{N(!0)},[]),H.useEffect(()=>{let qe=Xe.current;if(qe){let ot=qe.getBoundingClientRect().height;return Me(ot),T(yt=>[{toastId:_.id,height:ot,position:_.position},...yt]),()=>T(yt=>yt.filter(kt=>kt.toastId!==_.id))}},[T,_.id]),H.useLayoutEffect(()=>{if(!w)return;let qe=Xe.current,ot=qe.style.height;qe.style.height="auto";let yt=qe.getBoundingClientRect().height;qe.style.height=ot,Me(yt),T(kt=>kt.find(Dt=>Dt.toastId===_.id)?kt.map(Dt=>Dt.toastId===_.id?{...Dt,height:yt}:Dt):[{toastId:_.id,height:yt,position:_.position},...kt])},[w,_.title,_.description,T,_.id]);let _t=H.useCallback(()=>{q(!0),le(ze.current),T(qe=>qe.filter(ot=>ot.toastId!==_.id)),setTimeout(()=>{Y(_)},OA)},[_,Y,T,ze]);H.useEffect(()=>{if(_.promise&&Ct==="loading"||_.duration===1/0||_.type==="loading")return;let qe;return M||v||J&&et?(()=>{if(tt.current<ke.current){let ot=new Date().getTime()-ke.current;Pe.current=Pe.current-ot}tt.current=new Date().getTime()})():Pe.current!==1/0&&(ke.current=new Date().getTime(),qe=setTimeout(()=>{var ot;(ot=_.onAutoClose)==null||ot.call(_,_),_t()},Pe.current)),()=>clearTimeout(qe)},[M,v,_,Ct,J,et,_t]),H.useEffect(()=>{_.delete&&_t()},[_t,_.delete]);function Rt(){var qe,ot,yt;return B!=null&&B.loading?H.createElement("div",{className:F(re==null?void 0:re.loader,(qe=_==null?void 0:_.classNames)==null?void 0:qe.loader,"sonner-loader"),"data-visible":Ct==="loading"},B.loading):j?H.createElement("div",{className:F(re==null?void 0:re.loader,(ot=_==null?void 0:_.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Ct==="loading"},j):H.createElement(uA,{className:F(re==null?void 0:re.loader,(yt=_==null?void 0:_.classNames)==null?void 0:yt.loader),visible:Ct==="loading"})}return H.createElement("li",{tabIndex:0,ref:Xe,className:F(de,me,re==null?void 0:re.toast,(t=_==null?void 0:_.classNames)==null?void 0:t.toast,re==null?void 0:re.default,re==null?void 0:re[Ct],(n=_==null?void 0:_.classNames)==null?void 0:n[Ct]),"data-sonner-toast":"","data-rich-colors":(r=_.richColors)!=null?r:X,"data-styled":!(_.jsx||_.unstyled||y),"data-mounted":w,"data-promise":!!_.promise,"data-swiped":Oe,"data-removed":I,"data-visible":dt,"data-y-position":Et,"data-x-position":Bt,"data-index":k,"data-front":st,"data-swiping":ue,"data-dismissible":Se,"data-type":Ct,"data-invert":lt,"data-swipe-out":se,"data-expanded":!!(M||ee&&w),style:{"--index":k,"--toasts-before":k,"--z-index":P.length-k,"--offset":`${I?ce:ze.current}px`,"--initial-height":ee?"auto":`${ve}px`,...Z,..._.style},onPointerDown:qe=>{wt||!Se||(We.current=new Date,le(ze.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(he(!0),ut.current={x:qe.clientX,y:qe.clientY}))},onPointerUp:()=>{var qe,ot,yt,kt;if(se||!Se)return;ut.current=null;let Dt=Number(((qe=Xe.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Kt=new Date().getTime()-((ot=We.current)==null?void 0:ot.getTime()),sn=Math.abs(Dt)/Kt;if(Math.abs(Dt)>=SA||sn>.11){le(ze.current),(yt=_.onDismiss)==null||yt.call(_,_),_t(),Ce(!0),Be(!1);return}(kt=Xe.current)==null||kt.style.setProperty("--swipe-amount","0px"),he(!1)},onPointerMove:qe=>{var ot,yt,kt;if(!ut.current||!Se)return;let Dt=qe.clientY-ut.current.y,Kt=((ot=window.getSelection())==null?void 0:ot.toString().length)>0;Number(((yt=Xe.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&Be(!0),!Kt&&((kt=Xe.current)==null||kt.style.setProperty("--swipe-amount",`${Math.max(0,Dt)}px`))}},Fe&&!_.jsx?H.createElement("button",{"aria-label":W,"data-disabled":wt,"data-close-button":!0,onClick:wt||!Se?()=>{}:()=>{var qe;_t(),(qe=_.onDismiss)==null||qe.call(_,_)},className:F(re==null?void 0:re.closeButton,(o=_==null?void 0:_.classNames)==null?void 0:o.closeButton)},(i=B==null?void 0:B.close)!=null?i:gA):null,_.jsx||H.isValidElement(_.title)?_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title:H.createElement(H.Fragment,null,Ct||_.icon||_.promise?H.createElement("div",{"data-icon":"",className:F(re==null?void 0:re.icon,(a=_==null?void 0:_.classNames)==null?void 0:a.icon)},_.promise||_.type==="loading"&&!_.icon?_.icon||Rt():null,_.type!=="loading"?_.icon||(B==null?void 0:B[Ct])||lA(Ct):null):null,H.createElement("div",{"data-content":"",className:F(re==null?void 0:re.content,(l=_==null?void 0:_.classNames)==null?void 0:l.content)},H.createElement("div",{"data-title":"",className:F(re==null?void 0:re.title,(u=_==null?void 0:_.classNames)==null?void 0:u.title)},typeof _.title=="function"?_.title():_.title),_.description?H.createElement("div",{"data-description":"",className:F(pe,_e,re==null?void 0:re.description,(p=_==null?void 0:_.classNames)==null?void 0:p.description)},typeof _.description=="function"?_.description():_.description):null),H.isValidElement(_.cancel)?_.cancel:_.cancel&&Od(_.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||U,onClick:qe=>{var ot,yt;Od(_.cancel)&&Se&&((yt=(ot=_.cancel).onClick)==null||yt.call(ot,qe),_t())},className:F(re==null?void 0:re.cancelButton,(m=_==null?void 0:_.classNames)==null?void 0:m.cancelButton)},_.cancel.label):null,H.isValidElement(_.action)?_.action:_.action&&Od(_.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||Q,onClick:qe=>{var ot,yt;Od(_.action)&&((yt=(ot=_.action).onClick)==null||yt.call(ot,qe),!qe.defaultPrevented&&_t())},className:F(re==null?void 0:re.actionButton,(b=_==null?void 0:_.classNames)==null?void 0:b.actionButton)},_.action.label):null))};function Qy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var $A=H.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:p="light",richColors:m,duration:b,style:C,visibleToasts:_=CA,toastOptions:y,dir:v=Qy(),gap:T=NA,loadingIcon:O,icons:R,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:P,cn:M=AA}=e,[Y,X]=H.useState([]),oe=H.useMemo(()=>Array.from(new Set([r].concat(Y.filter(J=>J.position).map(J=>J.position)))),[Y,r]),[Z,U]=H.useState([]),[Q,de]=H.useState(!1),[pe,te]=H.useState(!1),[fe,V]=H.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=H.useRef(null),ee=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),re=H.useRef(null),B=H.useRef(!1),W=H.useCallback(J=>{X(F=>{var w;return(w=F.find(N=>N.id===J.id))!=null&&w.delete||io.dismiss(J.id),F.filter(({id:N})=>N!==J.id)})},[]);return H.useEffect(()=>io.subscribe(J=>{if(J.dismiss){X(F=>F.map(w=>w.id===J.id?{...w,delete:!0}:w));return}setTimeout(()=>{Iu.flushSync(()=>{X(F=>{let w=F.findIndex(N=>N.id===J.id);return w!==-1?[...F.slice(0,w),{...F[w],...J},...F.slice(w+1)]:[J,...F]})})})}),[]),H.useEffect(()=>{if(p!=="system"){V(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:F})=>{V(F?"dark":"light")})}catch{J.addListener(({matches:w})=>{try{V(w?"dark":"light")}catch(N){console.error(N)}})}},[p]),H.useEffect(()=>{Y.length<=1&&de(!1)},[Y]),H.useEffect(()=>{let J=F=>{var w,N;o.every(I=>F[I]||F.code===I)&&(de(!0),(w=j.current)==null||w.focus()),F.code==="Escape"&&(document.activeElement===j.current||(N=j.current)!=null&&N.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[o]),H.useEffect(()=>{if(j.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,B.current=!1)}},[j.current]),H.createElement("section",{"aria-label":`${k} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},oe.map((J,F)=>{var w;let[N,I]=J.split("-");return Y.length?H.createElement("ol",{key:J,dir:v==="auto"?Qy():v,tabIndex:-1,ref:j,className:l,"data-sonner-toaster":!0,"data-theme":fe,"data-y-position":N,"data-lifted":Q&&Y.length>1&&!i,"data-x-position":I,style:{"--front-toast-height":`${((w=Z[0])==null?void 0:w.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||wA,"--width":`${TA}px`,"--gap":`${T}px`,...C},onBlur:q=>{B.current&&!q.currentTarget.contains(q.relatedTarget)&&(B.current=!1,re.current&&(re.current.focus({preventScroll:!0}),re.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||B.current||(B.current=!0,re.current=q.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{pe||de(!1)},onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},Y.filter(q=>!q.position&&F===0||q.position===J).map((q,ue)=>{var he,se;return H.createElement(RA,{key:q.id,icons:R,index:ue,toast:q,defaultRichColors:m,duration:(he=y==null?void 0:y.duration)!=null?he:b,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:_,closeButton:(se=y==null?void 0:y.closeButton)!=null?se:a,interacting:pe,position:J,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:W,toasts:Y.filter(Ce=>Ce.position==q.position),heights:Z.filter(Ce=>Ce.position==q.position),setHeights:U,expandByDefault:i,gap:T,loadingIcon:O,expanded:Q,pauseWhenPageIsHidden:P,cn:M})})):null}))});const DA=({...e})=>{const{theme:t="system"}=sA();return ne.jsx($A,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:ve-bg-background group-[.toaster]:ve-text-foreground group-[.toaster]:ve-border-border group-[.toaster]:ve-shadow-lg",description:"group-[.toast]:ve-text-muted-foreground",actionButton:"group-[.toast]:ve-bg-primary group-[.toast]:ve-text-primary-foreground",cancelButton:"group-[.toast]:ve-bg-muted group-[.toast]:ve-text-muted-foreground"}},...e})},Ns=()=>{const{sendToParent:e}=zo("iFrameLoaded",ar),{sendToParent:t}=zo("pushPageSets",ar),{sendToParent:n}=zo("openQuickFind",ar),{sendToParent:r}=zo("sendDevLayoutSaveStateData",ar),{sendToParent:o}=zo("sendDevThemeSaveStateData",ar);return{iFrameLoaded:e,pushPageSets:t,openQuickFind:n,sendDevLayoutSaveStateData:r,sendDevThemeSaveStateData:o}},kA=()=>{const{openQuickFind:e}=Ns(),t=n=>{(n.ctrlKey||n.metaKey)&&n.key==="k"&&e()};H.useEffect(()=>(window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}),[])},lf=e=>JSON.parse(e.replace(/\\"/g,'"')),su=new Ur,MA=e=>{const{iFrameLoaded:t}=Ns();H.useEffect(()=>{t({payload:{message:"iFrame is loaded"}})},[]);const[n,r]=H.useState(),[o,i]=H.useState(),[a,l]=H.useState(),[u,p]=H.useState(!1),[m,b]=H.useState(),[C,_]=H.useState(!1);return Ma("getTemplateMetadata",ar,(y,v)=>{const T=e.get(v.templateId);i(T);const O=v;r(v),su.enable(O.isxYextDebug),su.logData("TEMPLATE_METADATA",O),su.logData("PUCK_CONFIG",T),y({status:"success",payload:{message:"payload received"}})}),Ma("getLayoutData",ar,(y,v)=>{const T=lf(v.layoutData);su.logData("LAYOUT_DATA",T),l(T),p(!0),y({status:"success",payload:{message:"getLayoutData received"}})}),Ma("getThemeData",ar,(y,v)=>{const T=v,O=T?lf(T):{};su.logData("THEME_DATA",O),b(O),_(!0),y({status:"success",payload:{message:"getThemeData received"}})}),{layoutData:a,layoutDataFetched:u,themeData:m,themeDataFetched:C,templateMetadata:n,puckConfig:o}};function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function PA(e,t){const n=ge.createContext(t),r=i=>{const{children:a,...l}=i,u=ge.useMemo(()=>l,Object.values(l));return ne.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function o(i){const a=ge.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function ec(e,t=[]){let n=[];function r(i,a){const l=ge.createContext(a),u=n.length;n=[...n,a];const p=b=>{var O;const{scope:C,children:_,...y}=b,v=((O=C==null?void 0:C[e])==null?void 0:O[u])||l,T=ge.useMemo(()=>y,Object.values(y));return ne.jsx(v.Provider,{value:T,children:_})};p.displayName=i+"Provider";function m(b,C){var v;const _=((v=C==null?void 0:C[e])==null?void 0:v[u])||l,y=ge.useContext(_);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${b}\` must be used within \`${i}\``)}return[p,m]}const o=()=>{const i=n.map(a=>ge.createContext(a));return function(l){const u=(l==null?void 0:l[e])||i;return ge.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return o.scopeName=e,[r,IA(o,...t)]}function IA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:u,scopeName:p})=>{const b=u(i)[`__scope${p}`];return{...l,...b}},{});return ge.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function qi(e){const t=ge.useRef(e);return ge.useEffect(()=>{t.current=e}),ge.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function LA(e,t=globalThis==null?void 0:globalThis.document){const n=qi(e);ge.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var FA="DismissableLayer",Gp="dismissableLayer.update",jA="dismissableLayer.pointerDownOutside",BA="dismissableLayer.focusOutside",ev,$E=ge.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bg=ge.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...u}=e,p=ge.useContext($E),[m,b]=ge.useState(null),C=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=ge.useState({}),y=lr(t,X=>b(X)),v=Array.from(p.layers),[T]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),O=v.indexOf(T),R=m?v.indexOf(m):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,P=R>=O,M=HA(X=>{const oe=X.target,Z=[...p.branches].some(U=>U.contains(oe));!P||Z||(o==null||o(X),a==null||a(X),X.defaultPrevented||l==null||l())},C),Y=GA(X=>{const oe=X.target;[...p.branches].some(U=>U.contains(oe))||(i==null||i(X),a==null||a(X),X.defaultPrevented||l==null||l())},C);return LA(X=>{R===p.layers.size-1&&(r==null||r(X),!X.defaultPrevented&&l&&(X.preventDefault(),l()))},C),ge.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ev=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),tv(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=ev)}},[m,C,n,p]),ge.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),tv())},[m,p]),ge.useEffect(()=>{const X=()=>_({});return document.addEventListener(Gp,X),()=>document.removeEventListener(Gp,X)},[]),ne.jsx(Dn.div,{...u,ref:y,style:{pointerEvents:k?P?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,Y.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,M.onPointerDownCapture)})});Bg.displayName=FA;var WA="DismissableLayerBranch",zA=ge.forwardRef((e,t)=>{const n=ge.useContext($E),r=ge.useRef(null),o=lr(t,r);return ge.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),ne.jsx(Dn.div,{...e,ref:o})});zA.displayName=WA;function HA(e,t=globalThis==null?void 0:globalThis.document){const n=qi(e),r=ge.useRef(!1),o=ge.useRef(()=>{});return ge.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let u=function(){DE(jA,n,p,{discrete:!0})};const p={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function GA(e,t=globalThis==null?void 0:globalThis.document){const n=qi(e),r=ge.useRef(!1);return ge.useEffect(()=>{const o=i=>{i.target&&!r.current&&DE(BA,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function tv(){const e=new CustomEvent(Gp);document.dispatchEvent(e)}function DE(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?ZO(o,i):o.dispatchEvent(i)}var Es=globalThis!=null&&globalThis.document?ge.useLayoutEffect:()=>{},KA=ge.useId||(()=>{}),UA=0;function wu(e){const[t,n]=ge.useState(KA());return Es(()=>{n(r=>r??String(UA++))},[e]),t?`radix-${t}`:""}const VA=["top","right","bottom","left"],Ia=Math.min,ao=Math.max,cf=Math.round,Ad=Math.floor,_i=e=>({x:e,y:e}),YA={left:"right",right:"left",bottom:"top",top:"bottom"},qA={start:"end",end:"start"};function Kp(e,t,n){return ao(e,Ia(t,n))}function Zi(e,t){return typeof e=="function"?e(t):e}function Ji(e){return e.split("-")[0]}function tc(e){return e.split("-")[1]}function Wg(e){return e==="x"?"y":"x"}function zg(e){return e==="y"?"height":"width"}function La(e){return["top","bottom"].includes(Ji(e))?"y":"x"}function Hg(e){return Wg(La(e))}function ZA(e,t,n){n===void 0&&(n=!1);const r=tc(e),o=Hg(e),i=zg(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=uf(a)),[a,uf(a)]}function JA(e){const t=uf(e);return[Up(e),t,Up(t)]}function Up(e){return e.replace(/start|end/g,t=>qA[t])}function XA(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function QA(e,t,n,r){const o=tc(e);let i=XA(Ji(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Up)))),i}function uf(e){return e.replace(/left|right|bottom|top/g,t=>YA[t])}function eR(e){return{top:0,right:0,bottom:0,left:0,...e}}function kE(e){return typeof e!="number"?eR(e):{top:e,right:e,bottom:e,left:e}}function df(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 nv(e,t,n){let{reference:r,floating:o}=e;const i=La(t),a=Hg(t),l=zg(a),u=Ji(t),p=i==="y",m=r.x+r.width/2-o.width/2,b=r.y+r.height/2-o.height/2,C=r[l]/2-o[l]/2;let _;switch(u){case"top":_={x:m,y:r.y-o.height};break;case"bottom":_={x:m,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:b};break;case"left":_={x:r.x-o.width,y:b};break;default:_={x:r.x,y:r.y}}switch(tc(t)){case"start":_[a]-=C*(n&&p?-1:1);break;case"end":_[a]+=C*(n&&p?-1:1);break}return _}const tR=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let p=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:b}=nv(p,r,u),C=r,_={},y=0;for(let v=0;v<l.length;v++){const{name:T,fn:O}=l[v],{x:R,y:k,data:P,reset:M}=await O({x:m,y:b,initialPlacement:r,placement:C,strategy:o,middlewareData:_,rects:p,platform:a,elements:{reference:e,floating:t}});m=R??m,b=k??b,_={..._,[T]:{..._[T],...P}},M&&y<=50&&(y++,typeof M=="object"&&(M.placement&&(C=M.placement),M.rects&&(p=M.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):M.rects),{x:m,y:b}=nv(p,C,u)),v=-1)}return{x:m,y:b,placement:C,strategy:o,middlewareData:_}};async function Au(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:_=0}=Zi(t,e),y=kE(_),T=l[C?b==="floating"?"reference":"floating":b],O=df(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:m,strategy:u})),R=b==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),P=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},M=df(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:R,offsetParent:k,strategy:u}):R);return{top:(O.top-M.top+y.top)/P.y,bottom:(M.bottom-O.bottom+y.bottom)/P.y,left:(O.left-M.left+y.left)/P.x,right:(M.right-O.right+y.right)/P.x}}const nR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:u}=t,{element:p,padding:m=0}=Zi(e,t)||{};if(p==null)return{};const b=kE(m),C={x:n,y:r},_=Hg(o),y=zg(_),v=await a.getDimensions(p),T=_==="y",O=T?"top":"left",R=T?"bottom":"right",k=T?"clientHeight":"clientWidth",P=i.reference[y]+i.reference[_]-C[_]-i.floating[y],M=C[_]-i.reference[_],Y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(p));let X=Y?Y[k]:0;(!X||!await(a.isElement==null?void 0:a.isElement(Y)))&&(X=l.floating[k]||i.floating[y]);const oe=P/2-M/2,Z=X/2-v[y]/2-1,U=Ia(b[O],Z),Q=Ia(b[R],Z),de=U,pe=X-v[y]-Q,te=X/2-v[y]/2+oe,fe=Kp(de,te,pe),V=!u.arrow&&tc(o)!=null&&te!==fe&&i.reference[y]/2-(te<de?U:Q)-v[y]/2<0,j=V?te<de?te-de:te-pe:0;return{[_]:C[_]+j,data:{[_]:fe,centerOffset:te-fe-j,...V&&{alignmentOffset:j}},reset:V}}}),rR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:u,elements:p}=t,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...T}=Zi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const O=Ji(o),R=La(l),k=Ji(l)===l,P=await(u.isRTL==null?void 0:u.isRTL(p.floating)),M=C||(k||!v?[uf(l)]:JA(l)),Y=y!=="none";!C&&Y&&M.push(...QA(l,v,y,P));const X=[l,...M],oe=await Au(t,T),Z=[];let U=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&Z.push(oe[O]),b){const te=ZA(o,a,P);Z.push(oe[te[0]],oe[te[1]])}if(U=[...U,{placement:o,overflows:Z}],!Z.every(te=>te<=0)){var Q,de;const te=(((Q=i.flip)==null?void 0:Q.index)||0)+1,fe=X[te];if(fe)return{data:{index:te,overflows:U},reset:{placement:fe}};let V=(de=U.filter(j=>j.overflows[0]<=0).sort((j,ee)=>j.overflows[1]-ee.overflows[1])[0])==null?void 0:de.placement;if(!V)switch(_){case"bestFit":{var pe;const j=(pe=U.filter(ee=>{if(Y){const re=La(ee.placement);return re===R||re==="y"}return!0}).map(ee=>[ee.placement,ee.overflows.filter(re=>re>0).reduce((re,B)=>re+B,0)]).sort((ee,re)=>ee[1]-re[1])[0])==null?void 0:pe[0];j&&(V=j);break}case"initialPlacement":V=l;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function rv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ov(e){return VA.some(t=>e[t]>=0)}const oR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Zi(e,t);switch(r){case"referenceHidden":{const i=await Au(t,{...o,elementContext:"reference"}),a=rv(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ov(a)}}}case"escaped":{const i=await Au(t,{...o,altBoundary:!0}),a=rv(i,n.floating);return{data:{escapedOffsets:a,escaped:ov(a)}}}default:return{}}}}};async function iR(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Ji(n),l=tc(n),u=La(n)==="y",p=["left","top"].includes(a)?-1:1,m=i&&u?-1:1,b=Zi(t,e);let{mainAxis:C,crossAxis:_,alignmentAxis:y}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return l&&typeof y=="number"&&(_=l==="end"?y*-1:y),u?{x:_*m,y:C*p}:{x:C*p,y:_*m}}const aR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,u=await iR(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},sR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:T=>{let{x:O,y:R}=T;return{x:O,y:R}}},...u}=Zi(e,t),p={x:n,y:r},m=await Au(t,u),b=La(Ji(o)),C=Wg(b);let _=p[C],y=p[b];if(i){const T=C==="y"?"top":"left",O=C==="y"?"bottom":"right",R=_+m[T],k=_-m[O];_=Kp(R,_,k)}if(a){const T=b==="y"?"top":"left",O=b==="y"?"bottom":"right",R=y+m[T],k=y-m[O];y=Kp(R,y,k)}const v=l.fn({...t,[C]:_,[b]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[C]:i,[b]:a}}}}}},lR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:u=!0,crossAxis:p=!0}=Zi(e,t),m={x:n,y:r},b=La(o),C=Wg(b);let _=m[C],y=m[b];const v=Zi(l,t),T=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=C==="y"?"height":"width",P=i.reference[C]-i.floating[k]+T.mainAxis,M=i.reference[C]+i.reference[k]-T.mainAxis;_<P?_=P:_>M&&(_=M)}if(p){var O,R;const k=C==="y"?"width":"height",P=["top","left"].includes(Ji(o)),M=i.reference[b]-i.floating[k]+(P&&((O=a.offset)==null?void 0:O[b])||0)+(P?0:T.crossAxis),Y=i.reference[b]+i.reference[k]+(P?0:((R=a.offset)==null?void 0:R[b])||0)-(P?T.crossAxis:0);y<M?y=M:y>Y&&(y=Y)}return{[C]:_,[b]:y}}}},cR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...p}=Zi(e,t),m=await Au(t,p),b=Ji(o),C=tc(o),_=La(o)==="y",{width:y,height:v}=i.floating;let T,O;b==="top"||b==="bottom"?(T=b,O=C===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(O=b,T=C==="end"?"top":"bottom");const R=v-m.top-m.bottom,k=y-m.left-m.right,P=Ia(v-m[T],R),M=Ia(y-m[O],k),Y=!t.middlewareData.shift;let X=P,oe=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(oe=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(X=R),Y&&!C){const U=ao(m.left,0),Q=ao(m.right,0),de=ao(m.top,0),pe=ao(m.bottom,0);_?oe=y-2*(U!==0||Q!==0?U+Q:ao(m.left,m.right)):X=v-2*(de!==0||pe!==0?de+pe:ao(m.top,m.bottom))}await u({...t,availableWidth:oe,availableHeight:X});const Z=await a.getDimensions(l.floating);return y!==Z.width||v!==Z.height?{reset:{rects:!0}}:{}}}};function Rf(){return typeof window<"u"}function nc(e){return ME(e)?(e.nodeName||"").toLowerCase():"#document"}function lo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ci(e){var t;return(t=(ME(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ME(e){return Rf()?e instanceof Node||e instanceof lo(e).Node:!1}function Uo(e){return Rf()?e instanceof Element||e instanceof lo(e).Element:!1}function Ei(e){return Rf()?e instanceof HTMLElement||e instanceof lo(e).HTMLElement:!1}function iv(e){return!Rf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lo(e).ShadowRoot}function Lu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function uR(e){return["table","td","th"].includes(nc(e))}function $f(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gg(e){const t=Kg(),n=Uo(e)?Vo(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function dR(e){let t=Fa(e);for(;Ei(t)&&!Yl(t);){if(Gg(t))return t;if($f(t))return null;t=Fa(t)}return null}function Kg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yl(e){return["html","body","#document"].includes(nc(e))}function Vo(e){return lo(e).getComputedStyle(e)}function Df(e){return Uo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fa(e){if(nc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iv(e)&&e.host||Ci(e);return iv(t)?t.host:t}function PE(e){const t=Fa(e);return Yl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ei(t)&&Lu(t)?t:PE(t)}function Ru(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=PE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=lo(o);if(i){const l=Vp(a);return t.concat(a,a.visualViewport||[],Lu(o)?o:[],l&&n?Ru(l):[])}return t.concat(o,Ru(o,[],n))}function Vp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function IE(e){const t=Vo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ei(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=cf(n)!==i||cf(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Ug(e){return Uo(e)?e:e.contextElement}function Wl(e){const t=Ug(e);if(!Ei(t))return _i(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=IE(t);let a=(i?cf(n.width):n.width)/r,l=(i?cf(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const fR=_i(0);function LE(e){const t=lo(e);return!Kg()||!t.visualViewport?fR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==lo(e)?!1:t}function Cs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ug(e);let a=_i(1);t&&(r?Uo(r)&&(a=Wl(r)):a=Wl(e));const l=hR(i,n,r)?LE(i):_i(0);let u=(o.left+l.x)/a.x,p=(o.top+l.y)/a.y,m=o.width/a.x,b=o.height/a.y;if(i){const C=lo(i),_=r&&Uo(r)?lo(r):r;let y=C,v=Vp(y);for(;v&&r&&_!==y;){const T=Wl(v),O=v.getBoundingClientRect(),R=Vo(v),k=O.left+(v.clientLeft+parseFloat(R.paddingLeft))*T.x,P=O.top+(v.clientTop+parseFloat(R.paddingTop))*T.y;u*=T.x,p*=T.y,m*=T.x,b*=T.y,u+=k,p+=P,y=lo(v),v=Vp(y)}}return df({width:m,height:b,x:u,y:p})}function Vg(e,t){const n=Df(e).scrollLeft;return t?t.left+n:Cs(Ci(e)).left+n}function FE(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Vg(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function pR(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Ci(r),l=t?$f(t.floating):!1;if(r===a||l&&i)return n;let u={scrollLeft:0,scrollTop:0},p=_i(1);const m=_i(0),b=Ei(r);if((b||!b&&!i)&&((nc(r)!=="body"||Lu(a))&&(u=Df(r)),Ei(r))){const _=Cs(r);p=Wl(r),m.x=_.x+r.clientLeft,m.y=_.y+r.clientTop}const C=a&&!b&&!i?FE(a,u,!0):_i(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-u.scrollLeft*p.x+m.x+C.x,y:n.y*p.y-u.scrollTop*p.y+m.y+C.y}}function gR(e){return Array.from(e.getClientRects())}function mR(e){const t=Ci(e),n=Df(e),r=e.ownerDocument.body,o=ao(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ao(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Vg(e);const l=-n.scrollTop;return Vo(r).direction==="rtl"&&(a+=ao(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function yR(e,t){const n=lo(e),r=Ci(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;const p=Kg();(!p||p&&t==="fixed")&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l,y:u}}function vR(e,t){const n=Cs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ei(e)?Wl(e):_i(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,u=o*i.x,p=r*i.y;return{width:a,height:l,x:u,y:p}}function av(e,t,n){let r;if(t==="viewport")r=yR(e,n);else if(t==="document")r=mR(Ci(e));else if(Uo(t))r=vR(t,n);else{const o=LE(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return df(r)}function jE(e,t){const n=Fa(e);return n===t||!Uo(n)||Yl(n)?!1:Vo(n).position==="fixed"||jE(n,t)}function bR(e,t){const n=t.get(e);if(n)return n;let r=Ru(e,[],!1).filter(l=>Uo(l)&&nc(l)!=="body"),o=null;const i=Vo(e).position==="fixed";let a=i?Fa(e):e;for(;Uo(a)&&!Yl(a);){const l=Vo(a),u=Gg(a);!u&&l.position==="fixed"&&(o=null),(i?!u&&!o:!u&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Lu(a)&&!u&&jE(e,a))?r=r.filter(m=>m!==a):o=l,a=Fa(a)}return t.set(e,r),r}function _R(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?$f(t)?[]:bR(t,this._c):[].concat(n),r],l=a[0],u=a.reduce((p,m)=>{const b=av(t,m,o);return p.top=ao(b.top,p.top),p.right=Ia(b.right,p.right),p.bottom=Ia(b.bottom,p.bottom),p.left=ao(b.left,p.left),p},av(t,l,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function xR(e){const{width:t,height:n}=IE(e);return{width:t,height:n}}function ER(e,t,n){const r=Ei(t),o=Ci(t),i=n==="fixed",a=Cs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const u=_i(0);if(r||!r&&!i)if((nc(t)!=="body"||Lu(o))&&(l=Df(t)),r){const C=Cs(t,!0,i,t);u.x=C.x+t.clientLeft,u.y=C.y+t.clientTop}else o&&(u.x=Vg(o));const p=o&&!r&&!i?FE(o,l):_i(0),m=a.left+l.scrollLeft-u.x-p.x,b=a.top+l.scrollTop-u.y-p.y;return{x:m,y:b,width:a.width,height:a.height}}function Ph(e){return Vo(e).position==="static"}function sv(e,t){if(!Ei(e)||Vo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ci(e)===n&&(n=n.ownerDocument.body),n}function BE(e,t){const n=lo(e);if($f(e))return n;if(!Ei(e)){let o=Fa(e);for(;o&&!Yl(o);){if(Uo(o)&&!Ph(o))return o;o=Fa(o)}return n}let r=sv(e,t);for(;r&&uR(r)&&Ph(r);)r=sv(r,t);return r&&Yl(r)&&Ph(r)&&!Gg(r)?n:r||dR(e)||n}const CR=async function(e){const t=this.getOffsetParent||BE,n=this.getDimensions,r=await n(e.floating);return{reference:ER(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wR(e){return Vo(e).direction==="rtl"}const TR={convertOffsetParentRelativeRectToViewportRelativeRect:pR,getDocumentElement:Ci,getClippingRect:_R,getOffsetParent:BE,getElementRects:CR,getClientRects:gR,getDimensions:xR,getScale:Wl,isElement:Uo,isRTL:wR};function NR(e,t){let n=null,r;const o=Ci(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),i();const{left:p,top:m,width:b,height:C}=e.getBoundingClientRect();if(l||t(),!b||!C)return;const _=Ad(m),y=Ad(o.clientWidth-(p+b)),v=Ad(o.clientHeight-(m+C)),T=Ad(p),R={rootMargin:-_+"px "+-y+"px "+-v+"px "+-T+"px",threshold:ao(0,Ia(1,u))||1};let k=!0;function P(M){const Y=M[0].intersectionRatio;if(Y!==u){if(!k)return a();Y?a(!1,Y):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(P,{...R,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,R)}n.observe(e)}return a(!0),i}function SR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,p=Ug(e),m=o||i?[...p?Ru(p):[],...Ru(t)]:[];m.forEach(O=>{o&&O.addEventListener("scroll",n,{passive:!0}),i&&O.addEventListener("resize",n)});const b=p&&l?NR(p,n):null;let C=-1,_=null;a&&(_=new ResizeObserver(O=>{let[R]=O;R&&R.target===p&&_&&(_.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var k;(k=_)==null||k.observe(t)})),n()}),p&&!u&&_.observe(p),_.observe(t));let y,v=u?Cs(e):null;u&&T();function T(){const O=Cs(e);v&&(O.x!==v.x||O.y!==v.y||O.width!==v.width||O.height!==v.height)&&n(),v=O,y=requestAnimationFrame(T)}return n(),()=>{var O;m.forEach(R=>{o&&R.removeEventListener("scroll",n),i&&R.removeEventListener("resize",n)}),b==null||b(),(O=_)==null||O.disconnect(),_=null,u&&cancelAnimationFrame(y)}}const OR=aR,AR=sR,RR=rR,$R=cR,DR=oR,lv=nR,kR=lR,MR=(e,t,n)=>{const r=new Map,o={platform:TR,...n},i={...o.platform,_c:r};return tR(e,t,{...o,platform:i})};var Jd=typeof document<"u"?H.useLayoutEffect:H.useEffect;function ff(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ff(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;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ff(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function WE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cv(e,t){const n=WE(e);return Math.round(t*n)/n}function Ih(e){const t=ge.useRef(e);return Jd(()=>{t.current=e}),t}function PR(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:u,open:p}=e,[m,b]=ge.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[C,_]=ge.useState(r);ff(C,r)||_(r);const[y,v]=ge.useState(null),[T,O]=ge.useState(null),R=ge.useCallback(ee=>{ee!==Y.current&&(Y.current=ee,v(ee))},[]),k=ge.useCallback(ee=>{ee!==X.current&&(X.current=ee,O(ee))},[]),P=i||y,M=a||T,Y=ge.useRef(null),X=ge.useRef(null),oe=ge.useRef(m),Z=u!=null,U=Ih(u),Q=Ih(o),de=Ih(p),pe=ge.useCallback(()=>{if(!Y.current||!X.current)return;const ee={placement:t,strategy:n,middleware:C};Q.current&&(ee.platform=Q.current),MR(Y.current,X.current,ee).then(re=>{const B={...re,isPositioned:de.current!==!1};te.current&&!ff(oe.current,B)&&(oe.current=B,iE.flushSync(()=>{b(B)}))})},[C,t,n,Q,de]);Jd(()=>{p===!1&&oe.current.isPositioned&&(oe.current.isPositioned=!1,b(ee=>({...ee,isPositioned:!1})))},[p]);const te=ge.useRef(!1);Jd(()=>(te.current=!0,()=>{te.current=!1}),[]),Jd(()=>{if(P&&(Y.current=P),M&&(X.current=M),P&&M){if(U.current)return U.current(P,M,pe);pe()}},[P,M,pe,U,Z]);const fe=ge.useMemo(()=>({reference:Y,floating:X,setReference:R,setFloating:k}),[R,k]),V=ge.useMemo(()=>({reference:P,floating:M}),[P,M]),j=ge.useMemo(()=>{const ee={position:n,left:0,top:0};if(!V.floating)return ee;const re=cv(V.floating,m.x),B=cv(V.floating,m.y);return l?{...ee,transform:"translate("+re+"px, "+B+"px)",...WE(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:B}},[n,l,V.floating,m.x,m.y]);return ge.useMemo(()=>({...m,update:pe,refs:fe,elements:V,floatingStyles:j}),[m,pe,fe,V,j])}const IR=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lv({element:r.current,padding:o}).fn(n):{}:r?lv({element:r,padding:o}).fn(n):{}}}},LR=(e,t)=>({...OR(e),options:[e,t]}),FR=(e,t)=>({...AR(e),options:[e,t]}),jR=(e,t)=>({...kR(e),options:[e,t]}),BR=(e,t)=>({...RR(e),options:[e,t]}),WR=(e,t)=>({...$R(e),options:[e,t]}),zR=(e,t)=>({...DR(e),options:[e,t]}),HR=(e,t)=>({...IR(e),options:[e,t]});var GR="Arrow",zE=ge.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return ne.jsx(Dn.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:ne.jsx("polygon",{points:"0,0 30,0 15,10"})})});zE.displayName=GR;var KR=zE;function Yg(e){const[t,n]=ge.useState(void 0);return Es(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;a=p.inlineSize,l=p.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var qg="Popper",[HE,GE]=Af(qg),[UR,KE]=HE(qg),UE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=ge.useState(null);return ne.jsx(UR,{scope:t,anchor:r,onAnchorChange:o,children:n})};UE.displayName=qg;var VE="PopperAnchor",YE=ge.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=KE(VE,n),a=ge.useRef(null),l=lr(t,a);return ge.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:ne.jsx(Dn.div,{...o,ref:l})});YE.displayName=VE;var Zg="PopperContent",[VR,YR]=HE(Zg),qE=ge.forwardRef((e,t)=>{var q,ue,he,se,Ce,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:b="partial",hideWhenDetached:C=!1,updatePositionStrategy:_="optimized",onPlaced:y,...v}=e,T=KE(Zg,n),[O,R]=ge.useState(null),k=lr(t,Be=>R(Be)),[P,M]=ge.useState(null),Y=Yg(P),X=(Y==null?void 0:Y.width)??0,oe=(Y==null?void 0:Y.height)??0,Z=r+(i!=="center"?"-"+i:""),U=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},Q=Array.isArray(p)?p:[p],de=Q.length>0,pe={padding:U,boundary:Q.filter(ZR),altBoundary:de},{refs:te,floatingStyles:fe,placement:V,isPositioned:j,middlewareData:ee}=PR({strategy:"fixed",placement:Z,whileElementsMounted:(...Be)=>SR(...Be,{animationFrame:_==="always"}),elements:{reference:T.anchor},middleware:[LR({mainAxis:o+oe,alignmentAxis:a}),u&&FR({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?jR():void 0,...pe}),u&&BR({...pe}),WR({...pe,apply:({elements:Be,rects:ce,availableWidth:le,availableHeight:ve})=>{const{width:Me,height:Pe}=ce.reference,We=Be.floating.style;We.setProperty("--radix-popper-available-width",`${le}px`),We.setProperty("--radix-popper-available-height",`${ve}px`),We.setProperty("--radix-popper-anchor-width",`${Me}px`),We.setProperty("--radix-popper-anchor-height",`${Pe}px`)}}),P&&HR({element:P,padding:l}),JR({arrowWidth:X,arrowHeight:oe}),C&&zR({strategy:"referenceHidden",...pe})]}),[re,B]=XE(V),W=qi(y);Es(()=>{j&&(W==null||W())},[j,W]);const J=(q=ee.arrow)==null?void 0:q.x,F=(ue=ee.arrow)==null?void 0:ue.y,w=((he=ee.arrow)==null?void 0:he.centerOffset)!==0,[N,I]=ge.useState();return Es(()=>{O&&I(window.getComputedStyle(O).zIndex)},[O]),ne.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...fe,transform:j?fe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--radix-popper-transform-origin":[(se=ee.transformOrigin)==null?void 0:se.x,(Ce=ee.transformOrigin)==null?void 0:Ce.y].join(" "),...((Oe=ee.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:ne.jsx(VR,{scope:n,placedSide:re,onArrowChange:M,arrowX:J,arrowY:F,shouldHideArrow:w,children:ne.jsx(Dn.div,{"data-side":re,"data-align":B,...v,ref:k,style:{...v.style,animation:j?void 0:"none"}})})})});qE.displayName=Zg;var ZE="PopperArrow",qR={top:"bottom",right:"left",bottom:"top",left:"right"},JE=ge.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=YR(ZE,r),a=qR[i.placedSide];return ne.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:ne.jsx(KR,{...o,ref:n,style:{...o.style,display:"block"}})})});JE.displayName=ZE;function ZR(e){return e!==null}var JR=e=>({name:"transformOrigin",options:e,fn(t){var T,O,R;const{placement:n,rects:r,middlewareData:o}=t,a=((T=o.arrow)==null?void 0:T.centerOffset)!==0,l=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[p,m]=XE(n),b={start:"0%",center:"50%",end:"100%"}[m],C=(((O=o.arrow)==null?void 0:O.x)??0)+l/2,_=(((R=o.arrow)==null?void 0:R.y)??0)+u/2;let y="",v="";return p==="bottom"?(y=a?b:`${C}px`,v=`${-u}px`):p==="top"?(y=a?b:`${C}px`,v=`${r.floating.height+u}px`):p==="right"?(y=`${-u}px`,v=a?b:`${_}px`):p==="left"&&(y=`${r.floating.width+u}px`,v=a?b:`${_}px`),{data:{x:y,y:v}}}});function XE(e){const[t,n="center"]=e.split("-");return[t,n]}var XR=UE,QR=YE,e$=qE,t$=JE,n$="Portal",QE=ge.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=ge.useState(!1);Es(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Iu.createPortal(ne.jsx(Dn.div,{...r,ref:t}),a):null});QE.displayName=n$;function r$(e,t){return ge.useReducer((n,r)=>t[n][r]??n,e)}var rc=e=>{const{present:t,children:n}=e,r=o$(t),o=typeof n=="function"?n({present:r.isPresent}):ge.Children.only(n),i=lr(r.ref,i$(o));return typeof n=="function"||r.isPresent?ge.cloneElement(o,{ref:i}):null};rc.displayName="Presence";function o$(e){const[t,n]=ge.useState(),r=ge.useRef({}),o=ge.useRef(e),i=ge.useRef("none"),a=e?"mounted":"unmounted",[l,u]=r$(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ge.useEffect(()=>{const p=Rd(r.current);i.current=l==="mounted"?p:"none"},[l]),Es(()=>{const p=r.current,m=o.current;if(m!==e){const C=i.current,_=Rd(p);e?u("MOUNT"):_==="none"||(p==null?void 0:p.display)==="none"?u("UNMOUNT"):u(m&&C!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),Es(()=>{if(t){let p;const m=t.ownerDocument.defaultView??window,b=_=>{const v=Rd(r.current).includes(_.animationName);if(_.target===t&&v&&(u("ANIMATION_END"),!o.current)){const T=t.style.animationFillMode;t.style.animationFillMode="forwards",p=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=T)})}},C=_=>{_.target===t&&(i.current=Rd(r.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",b),t.addEventListener("animationend",b),()=>{m.clearTimeout(p),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",b),t.removeEventListener("animationend",b)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:ge.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function Rd(e){return(e==null?void 0:e.animationName)||"none"}function i$(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Fu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=a$({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,l=qi(n),u=ge.useCallback(p=>{if(i){const b=typeof p=="function"?p(e):p;b!==e&&l(b)}else o(p)},[i,e,o,l]);return[a,u]}function a$({defaultProp:e,onChange:t}){const n=ge.useState(e),[r]=n,o=ge.useRef(r),i=qi(t);return ge.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var s$="VisuallyHidden",eC=ge.forwardRef((e,t)=>ne.jsx(Dn.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));eC.displayName=s$;var l$=eC,[kf,GJ]=ec("Tooltip",[GE]),Mf=GE(),tC="TooltipProvider",c$=700,Yp="tooltip.open",[u$,Jg]=kf(tC),nC=e=>{const{__scopeTooltip:t,delayDuration:n=c$,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,l]=ge.useState(!0),u=ge.useRef(!1),p=ge.useRef(0);return ge.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),ne.jsx(u$,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:ge.useCallback(()=>{window.clearTimeout(p.current),l(!1)},[]),onClose:ge.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:ge.useCallback(m=>{u.current=m},[]),disableHoverableContent:o,children:i})};nC.displayName=tC;var Pf="Tooltip",[d$,If]=kf(Pf),rC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:l}=e,u=Jg(Pf,e.__scopeTooltip),p=Mf(t),[m,b]=ge.useState(null),C=wu(),_=ge.useRef(0),y=a??u.disableHoverableContent,v=l??u.delayDuration,T=ge.useRef(!1),[O=!1,R]=Fu({prop:r,defaultProp:o,onChange:X=>{X?(u.onOpen(),document.dispatchEvent(new CustomEvent(Yp))):u.onClose(),i==null||i(X)}}),k=ge.useMemo(()=>O?T.current?"delayed-open":"instant-open":"closed",[O]),P=ge.useCallback(()=>{window.clearTimeout(_.current),T.current=!1,R(!0)},[R]),M=ge.useCallback(()=>{window.clearTimeout(_.current),R(!1)},[R]),Y=ge.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{T.current=!0,R(!0)},v)},[v,R]);return ge.useEffect(()=>()=>window.clearTimeout(_.current),[]),ne.jsx(XR,{...p,children:ne.jsx(d$,{scope:t,contentId:C,open:O,stateAttribute:k,trigger:m,onTriggerChange:b,onTriggerEnter:ge.useCallback(()=>{u.isOpenDelayed?Y():P()},[u.isOpenDelayed,Y,P]),onTriggerLeave:ge.useCallback(()=>{y?M():window.clearTimeout(_.current)},[M,y]),onOpen:P,onClose:M,disableHoverableContent:y,children:n})})};rC.displayName=Pf;var qp="TooltipTrigger",oC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=If(qp,n),i=Jg(qp,n),a=Mf(n),l=ge.useRef(null),u=lr(t,l,o.onTriggerChange),p=ge.useRef(!1),m=ge.useRef(!1),b=ge.useCallback(()=>p.current=!1,[]);return ge.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),ne.jsx(QR,{asChild:!0,...a,children:ne.jsx(Dn.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:Sn(e.onPointerMove,C=>{C.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Sn(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Sn(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:Sn(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:Sn(e.onBlur,o.onClose),onClick:Sn(e.onClick,o.onClose)})})});oC.displayName=qp;var f$="TooltipPortal",[KJ,h$]=kf(f$,{forceMount:void 0}),ql="TooltipContent",iC=ge.forwardRef((e,t)=>{const n=h$(ql,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=If(ql,e.__scopeTooltip);return ne.jsx(rc,{present:r||a.open,children:a.disableHoverableContent?ne.jsx(aC,{side:o,...i,ref:t}):ne.jsx(p$,{side:o,...i,ref:t})})}),p$=ge.forwardRef((e,t)=>{const n=If(ql,e.__scopeTooltip),r=Jg(ql,e.__scopeTooltip),o=ge.useRef(null),i=lr(t,o),[a,l]=ge.useState(null),{trigger:u,onClose:p}=n,m=o.current,{onPointerInTransitChange:b}=r,C=ge.useCallback(()=>{l(null),b(!1)},[b]),_=ge.useCallback((y,v)=>{const T=y.currentTarget,O={x:y.clientX,y:y.clientY},R=y$(O,T.getBoundingClientRect()),k=v$(O,R),P=b$(v.getBoundingClientRect()),M=x$([...k,...P]);l(M),b(!0)},[b]);return ge.useEffect(()=>()=>C(),[C]),ge.useEffect(()=>{if(u&&m){const y=T=>_(T,m),v=T=>_(T,u);return u.addEventListener("pointerleave",y),m.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",v)}}},[u,m,_,C]),ge.useEffect(()=>{if(a){const y=v=>{const T=v.target,O={x:v.clientX,y:v.clientY},R=(u==null?void 0:u.contains(T))||(m==null?void 0:m.contains(T)),k=!_$(O,a);R?C():k&&(C(),p())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,m,a,p,C]),ne.jsx(aC,{...e,ref:i})}),[g$,m$]=kf(Pf,{isInside:!1}),aC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,u=If(ql,n),p=Mf(n),{onClose:m}=u;return ge.useEffect(()=>(document.addEventListener(Yp,m),()=>document.removeEventListener(Yp,m)),[m]),ge.useEffect(()=>{if(u.trigger){const b=C=>{const _=C.target;_!=null&&_.contains(u.trigger)&&m()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[u.trigger,m]),ne.jsx(Bg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:b=>b.preventDefault(),onDismiss:m,children:ne.jsxs(e$,{"data-state":u.stateAttribute,...p,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[ne.jsx(Ig,{children:r}),ne.jsx(g$,{scope:n,isInside:!0,children:ne.jsx(l$,{id:u.contentId,role:"tooltip",children:o||r})})]})})});iC.displayName=ql;var sC="TooltipArrow",lC=ge.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mf(n);return m$(sC,n).isInside?null:ne.jsx(t$,{...o,...r,ref:t})});lC.displayName=sC;function y$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function v$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function b$(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function _$(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i].x,u=t[i].y,p=t[a].x,m=t[a].y;u>r!=m>r&&n<(p-l)*(r-u)/(m-u)+l&&(o=!o)}return o}function x$(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),E$(t)}function E$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var C$=nC,w$=rC,T$=oC,cC=iC,N$=lC;const uC=C$,dC=w$,fC=T$,hC=N$,Xg=ge.forwardRef(({className:e,sideOffset:t=4,...n},r)=>ne.jsx(cC,{ref:r,sideOffset:t,className:sr("ve-z-50 ve-overflow-hidden ve-rounded-[6px] ve-bg-popover ve-px-3 ve-py-1.5 ve-text-sm ve-text-popover-foreground",e),...n}));Xg.displayName=cC.displayName;const uo=({displayName:e,fieldId:t,constantValueEnabled:n,children:r})=>{const{tooltipsVisible:o}=mC();if(!o)return r;let i="";return e&&t?i=`${e} (${t})`:t?i=`${t}`:e&&(i=`${e}`),ne.jsx("div",{children:ne.jsx(uC,{children:ne.jsxs(dC,{open:!!i&&!n,children:[ne.jsx(fC,{asChild:!0,children:ne.jsx("div",{className:"ve-outline-2 ve-outline-dotted ve-outline-[#5A58F2]",children:r})}),ne.jsxs(Xg,{children:[ne.jsx("p",{children:i}),ne.jsx(hC,{fill:"bg-popover"})]})]})})})},pC=H.createContext(void 0),gC=({children:e})=>{const[t,n]=H.useState(!1),r=()=>{n(o=>!o)};return ne.jsx(pC.Provider,{value:{tooltipsVisible:t,toggleTooltips:r},children:e})},mC=()=>{const e=H.useContext(pC);return e||{tooltipsVisible:!1,toggleTooltips:()=>{}}};/**
|
|
39
|
-
* @license lucide-react v0.414.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/const S$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yC=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
44
|
-
* @license lucide-react v0.414.0 - ISC
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the ISC license.
|
|
47
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var O$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
49
|
-
* @license lucide-react v0.414.0 - ISC
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the ISC license.
|
|
52
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const A$=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},u)=>H.createElement("svg",{ref:u,...O$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yC("lucide",o),...l},[...a.map(([p,m])=>H.createElement(p,m)),...Array.isArray(i)?i:[i]]));/**
|
|
54
|
-
* @license lucide-react v0.414.0 - ISC
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the ISC license.
|
|
57
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const wi=(e,t)=>{const n=H.forwardRef(({className:r,...o},i)=>H.createElement(A$,{ref:i,iconNode:t,className:yC(`lucide-${S$(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
59
|
-
* @license lucide-react v0.414.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const Qg=wi("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
64
|
-
* @license lucide-react v0.414.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const R$=wi("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
69
|
-
* @license lucide-react v0.414.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const $$=wi("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
74
|
-
* @license lucide-react v0.414.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const D$=wi("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
79
|
-
* @license lucide-react v0.414.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const k$=wi("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
84
|
-
* @license lucide-react v0.414.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const M$=wi("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
|
|
89
|
-
* @license lucide-react v0.414.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const P$=wi("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
94
|
-
* @license lucide-react v0.414.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const I$=wi("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
99
|
-
* @license lucide-react v0.414.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const L$=wi("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
104
|
-
* @license lucide-react v0.414.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const F$=wi("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function vC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=vC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function j$(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=vC(e))&&(r&&(r+=" "),r+=t);return r}const uv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,dv=j$,kr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return dv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(p=>{const m=n==null?void 0:n[p],b=i==null?void 0:i[p];if(m===null)return null;const C=uv(m)||uv(b);return o[p][C]}),l=n&&Object.entries(n).reduce((p,m)=>{let[b,C]=m;return C===void 0||(p[b]=C),p},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,m)=>{let{class:b,className:C,..._}=m;return Object.entries(_).every(y=>{let[v,T]=y;return Array.isArray(T)?T.includes({...i,...l}[v]):{...i,...l}[v]===T})?[...p,b,C]:p},[]);return dv(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},em=kr("ve-inline-flex ve-items-center ve-justify-center ve-whitespace-nowrap ve-rounded-md ve-text-sm ve-font-medium ve-ring-offset-background ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 disabled:ve-pointer-events-none disabled:ve-opacity-50",{variants:{variant:{default:"ve-bg-primary ve-text-primary-foreground hover:ve-bg-primary/90",destructive:"ve-bg-destructive ve-text-destructive-foreground hover:ve-bg-destructive/90",outline:"ve-border ve-border-input ve-bg-background hover:ve-bg-accent hover:ve-text-accent-foreground",secondary:"ve-bg-secondary ve-text-secondary-foreground hover:ve-bg-secondary/80",ghost:"hover:ve-bg-accent hover:ve-text-accent-foreground",link:"ve-text-primary ve-underline-offset-4 hover:ve-underline"},size:{default:"ve-h-10 ve-rounded-md ve-px-4 ve-py-2",sm:"ve-h-9 ve-rounded-md ve-px-3",lg:"ve-h-11 ve-rounded-md ve-px-8",icon:"ve-h-10 ve-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Yi=ge.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?xs:"button";return ne.jsx(a,{className:sr(em({variant:t,size:n,className:e})),ref:i,...o})});Yi.displayName="Button";const bC=()=>{const{dispatch:e,appState:{ui:{leftSideBarVisible:t,rightSideBarVisible:n}}}=Hn.usePuck(),r=H.useCallback(o=>{const i=window.matchMedia("(min-width: 638px)").matches,a=o==="left"?t:n,l=o==="left"?"rightSideBarVisible":"leftSideBarVisible";e({type:"setUi",ui:{[`${o}SideBarVisible`]:!a,...i?{}:{[l]:!1}}})},[e,t,n]);return ne.jsxs(ne.Fragment,{children:[ne.jsx(Yi,{variant:"ghost",size:"icon",onClick:()=>{r("left")},children:ne.jsx(D$,{className:"sm-icon"})}),ne.jsx(Yi,{variant:"ghost",size:"icon",onClick:()=>{r("right")},children:ne.jsx(k$,{className:"sm-icon"})})]})};function _C(e){const t=ge.useRef({value:e,previous:e});return ge.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var tm="Switch",[B$,UJ]=ec(tm),[W$,z$]=B$(tm),xC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:l,value:u="on",onCheckedChange:p,form:m,...b}=e,[C,_]=ge.useState(null),y=lr(t,k=>_(k)),v=ge.useRef(!1),T=C?m||!!C.closest("form"):!0,[O=!1,R]=Fu({prop:o,defaultProp:i,onChange:p});return ne.jsxs(W$,{scope:n,checked:O,disabled:l,children:[ne.jsx(Dn.button,{type:"button",role:"switch","aria-checked":O,"aria-required":a,"data-state":wC(O),"data-disabled":l?"":void 0,disabled:l,value:u,...b,ref:y,onClick:Sn(e.onClick,k=>{R(P=>!P),T&&(v.current=k.isPropagationStopped(),v.current||k.stopPropagation())})}),T&&ne.jsx(H$,{control:C,bubbles:!v.current,name:r,value:u,checked:O,required:a,disabled:l,form:m,style:{transform:"translateX(-100%)"}})]})});xC.displayName=tm;var EC="SwitchThumb",CC=ge.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=z$(EC,n);return ne.jsx(Dn.span,{"data-state":wC(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});CC.displayName=EC;var H$=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=_C(n),l=Yg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&b){const C=new Event("click",{bubbles:r});b.call(u,n),u.dispatchEvent(C)}},[a,n,r]),ne.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function wC(e){return e?"checked":"unchecked"}var TC=xC,G$=CC;const NC=ge.forwardRef(({className:e,...t},n)=>ne.jsx(TC,{className:sr("ve-self-center ve-peer ve-inline-flex ve-h-5 ve-w-9 ve-shrink-0 ve-cursor-pointer ve-items-center ve-rounded-full ve-border-2 ve-border-transparent ve-transition-colors focus-visible:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-ring focus-visible:ve-ring-offset-2 focus-visible:ve-ring-offset-background disabled:ve-cursor-not-allowed disabled:ve-opacity-50 data-[state=checked]:ve-bg-primary data-[state=unchecked]:ve-bg-input",e),...t,ref:n,children:ne.jsx(G$,{className:sr("ve-self-center ve-pointer-events-none ve-block ve-h-4 ve-w-4 ve-rounded-full ve-bg-background ve-shadow-lg ve-ring-0 ve-transition-transform data-[state=checked]:ve-translate-x-4 data-[state=unchecked]:ve-translate-x-0")})}));NC.displayName=TC.displayName;const SC=()=>{const{toggleTooltips:e,tooltipsVisible:t}=mC();return ne.jsx(uC,{children:ne.jsxs(dC,{children:[ne.jsx(fC,{asChild:!0,children:ne.jsxs("div",{className:"ve-flex ve-flex-row ve-self-center ve-gap-3 ve-pl-2",children:[ne.jsx(NC,{onCheckedChange:e,checked:t}),ne.jsx("p",{className:"ve-self-center ve-text-sm",children:"Entity Fields"})]})}),ne.jsxs(Xg,{children:[t?"Hide Entity Fields":"Show Entity Fields",ne.jsx(hC,{fill:"ve-bg-popover"})]})]})})};var Lh="focusScope.autoFocusOnMount",Fh="focusScope.autoFocusOnUnmount",fv={bubbles:!1,cancelable:!0},K$="FocusScope",OC=ge.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,u]=ge.useState(null),p=qi(o),m=qi(i),b=ge.useRef(null),C=lr(t,v=>u(v)),_=ge.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;ge.useEffect(()=>{if(r){let v=function(k){if(_.paused||!l)return;const P=k.target;l.contains(P)?b.current=P:Ra(b.current,{select:!0})},T=function(k){if(_.paused||!l)return;const P=k.relatedTarget;P!==null&&(l.contains(P)||Ra(b.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&Ra(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",T);const R=new MutationObserver(O);return l&&R.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",T),R.disconnect()}}},[r,l,_.paused]),ge.useEffect(()=>{if(l){pv.add(_);const v=document.activeElement;if(!l.contains(v)){const O=new CustomEvent(Lh,fv);l.addEventListener(Lh,p),l.dispatchEvent(O),O.defaultPrevented||(U$(J$(AC(l)),{select:!0}),document.activeElement===v&&Ra(l))}return()=>{l.removeEventListener(Lh,p),setTimeout(()=>{const O=new CustomEvent(Fh,fv);l.addEventListener(Fh,m),l.dispatchEvent(O),O.defaultPrevented||Ra(v??document.body,{select:!0}),l.removeEventListener(Fh,m),pv.remove(_)},0)}}},[l,p,m,_]);const y=ge.useCallback(v=>{if(!n&&!r||_.paused)return;const T=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,O=document.activeElement;if(T&&O){const R=v.currentTarget,[k,P]=V$(R);k&&P?!v.shiftKey&&O===P?(v.preventDefault(),n&&Ra(k,{select:!0})):v.shiftKey&&O===k&&(v.preventDefault(),n&&Ra(P,{select:!0})):O===R&&v.preventDefault()}},[n,r,_.paused]);return ne.jsx(Dn.div,{tabIndex:-1,...a,ref:C,onKeyDown:y})});OC.displayName=K$;function U$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ra(r,{select:t}),document.activeElement!==n)return}function V$(e){const t=AC(e),n=hv(t,e),r=hv(t.reverse(),e);return[n,r]}function AC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hv(e,t){for(const n of e)if(!Y$(n,{upTo:t}))return n}function Y$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function q$(e){return e instanceof HTMLInputElement&&"select"in e}function Ra(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&q$(e)&&t&&e.select()}}var pv=Z$();function Z$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=gv(e,t),e.unshift(t)},remove(t){var n;e=gv(e,t),(n=e[0])==null||n.resume()}}}function gv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function J$(e){return e.filter(t=>t.tagName!=="A")}var jh=0;function X$(){ge.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mv()),document.body.insertAdjacentElement("beforeend",e[1]??mv()),jh++,()=>{jh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jh--}},[])}function mv(){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 bi=function(){return bi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},bi.apply(this,arguments)};function RC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,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 Q$(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Xd="right-scroll-bar-position",Qd="width-before-scroll-bar",eD="with-scroll-bars-hidden",tD="--removed-body-scroll-bar-size";function Bh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nD(e,t){var n=H.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var rD=typeof window<"u"?ge.useLayoutEffect:ge.useEffect,yv=new WeakMap;function oD(e,t){var n=nD(null,function(r){return e.forEach(function(o){return Bh(o,r)})});return rD(function(){var r=yv.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Bh(l,null)}),i.forEach(function(l){o.has(l)||Bh(l,a)})}yv.set(n,e)},[e]),n}function iD(e){return e}function aD(e,t){t===void 0&&(t=iD);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var u=function(){var m=a;a=[],m.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),n={push:function(m){a.push(m),p()},filter:function(m){return a=a.filter(m),n}}}};return o}function sD(e){e===void 0&&(e={});var t=aD(null);return t.options=bi({async:!0,ssr:!1},e),t}var $C=function(e){var t=e.sideCar,n=RC(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 ge.createElement(r,bi({},n))};$C.isSideCarExport=!0;function lD(e,t){return e.useMedium(t),$C}var DC=sD(),Wh=function(){},Lf=ge.forwardRef(function(e,t){var n=ge.useRef(null),r=ge.useState({onScrollCapture:Wh,onWheelCapture:Wh,onTouchMoveCapture:Wh}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,u=e.className,p=e.removeScrollBar,m=e.enabled,b=e.shards,C=e.sideCar,_=e.noIsolation,y=e.inert,v=e.allowPinchZoom,T=e.as,O=T===void 0?"div":T,R=e.gapMode,k=RC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=C,M=oD([n,t]),Y=bi(bi({},k),o);return ge.createElement(ge.Fragment,null,m&&ge.createElement(P,{sideCar:DC,removeScrollBar:p,shards:b,noIsolation:_,inert:y,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:R}),a?ge.cloneElement(ge.Children.only(l),bi(bi({},Y),{ref:M})):ge.createElement(O,bi({},Y,{className:u,ref:M}),l))});Lf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Lf.classNames={fullWidth:Qd,zeroRight:Xd};var cD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cD();return t&&e.setAttribute("nonce",t),e}function dD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function fD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uD())&&(dD(t,n),fD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pD=function(){var e=hD();return function(t,n){ge.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},kC=function(){var e=pD(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},gD={left:0,top:0,right:0,gap:0},zh=function(e){return parseInt(e||"",10)||0},mD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[zh(n),zh(r),zh(o)]},yD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gD;var t=mD(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])}},vD=kC(),zl="data-scroll-locked",bD=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
109
|
-
.`.concat(eD,` {
|
|
110
|
-
overflow: hidden `).concat(r,`;
|
|
111
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
112
|
-
}
|
|
113
|
-
body[`).concat(zl,`] {
|
|
114
|
-
overflow: hidden `).concat(r,`;
|
|
115
|
-
overscroll-behavior: contain;
|
|
116
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
117
|
-
padding-left: `.concat(o,`px;
|
|
118
|
-
padding-top: `).concat(i,`px;
|
|
119
|
-
padding-right: `).concat(a,`px;
|
|
120
|
-
margin-left:0;
|
|
121
|
-
margin-top:0;
|
|
122
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
123
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.`).concat(Xd,` {
|
|
127
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.`).concat(Qd,` {
|
|
131
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.`).concat(Xd," .").concat(Xd,` {
|
|
135
|
-
right: 0 `).concat(r,`;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.`).concat(Qd," .").concat(Qd,` {
|
|
139
|
-
margin-right: 0 `).concat(r,`;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
body[`).concat(zl,`] {
|
|
143
|
-
`).concat(tD,": ").concat(l,`px;
|
|
144
|
-
}
|
|
145
|
-
`)},vv=function(){var e=parseInt(document.body.getAttribute(zl)||"0",10);return isFinite(e)?e:0},_D=function(){ge.useEffect(function(){return document.body.setAttribute(zl,(vv()+1).toString()),function(){var e=vv()-1;e<=0?document.body.removeAttribute(zl):document.body.setAttribute(zl,e.toString())}},[])},xD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;_D();var i=ge.useMemo(function(){return yD(o)},[o]);return ge.createElement(vD,{styles:bD(i,!t,o,n?"":"!important")})},Zp=!1;if(typeof window<"u")try{var $d=Object.defineProperty({},"passive",{get:function(){return Zp=!0,!0}});window.addEventListener("test",$d,$d),window.removeEventListener("test",$d,$d)}catch{Zp=!1}var pl=Zp?{passive:!1}:!1,ED=function(e){return e.tagName==="TEXTAREA"},MC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ED(e)&&n[t]==="visible")},CD=function(e){return MC(e,"overflowY")},wD=function(e){return MC(e,"overflowX")},bv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=PC(e,r);if(o){var i=IC(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ND=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},PC=function(e,t){return e==="v"?CD(t):wD(t)},IC=function(e,t){return e==="v"?TD(t):ND(t)},SD=function(e,t){return e==="h"&&t==="rtl"?-1:1},OD=function(e,t,n,r,o){var i=SD(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,u=t.contains(l),p=!1,m=a>0,b=0,C=0;do{var _=IC(e,l),y=_[0],v=_[1],T=_[2],O=v-T-i*y;(y||O)&&PC(e,l)&&(b+=O,C+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(m&&(Math.abs(b)<1||!o)||!m&&(Math.abs(C)<1||!o))&&(p=!0),p},Dd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_v=function(e){return[e.deltaX,e.deltaY]},xv=function(e){return e&&"current"in e?e.current:e},AD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},RD=function(e){return`
|
|
146
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
147
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
148
|
-
`)},$D=0,gl=[];function DD(e){var t=ge.useRef([]),n=ge.useRef([0,0]),r=ge.useRef(),o=ge.useState($D++)[0],i=ge.useState(kC)[0],a=ge.useRef(e);ge.useEffect(function(){a.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Q$([e.lockRef.current],(e.shards||[]).map(xv),!0).filter(Boolean);return v.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=ge.useCallback(function(v,T){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var O=Dd(v),R=n.current,k="deltaX"in v?v.deltaX:R[0]-O[0],P="deltaY"in v?v.deltaY:R[1]-O[1],M,Y=v.target,X=Math.abs(k)>Math.abs(P)?"h":"v";if("touches"in v&&X==="h"&&Y.type==="range")return!1;var oe=bv(X,Y);if(!oe)return!0;if(oe?M=X:(M=X==="v"?"h":"v",oe=bv(X,Y)),!oe)return!1;if(!r.current&&"changedTouches"in v&&(k||P)&&(r.current=M),!M)return!0;var Z=r.current||M;return OD(Z,T,v,Z==="h"?k:P,!0)},[]),u=ge.useCallback(function(v){var T=v;if(!(!gl.length||gl[gl.length-1]!==i)){var O="deltaY"in T?_v(T):Dd(T),R=t.current.filter(function(M){return M.name===T.type&&(M.target===T.target||T.target===M.shadowParent)&&AD(M.delta,O)})[0];if(R&&R.should){T.cancelable&&T.preventDefault();return}if(!R){var k=(a.current.shards||[]).map(xv).filter(Boolean).filter(function(M){return M.contains(T.target)}),P=k.length>0?l(T,k[0]):!a.current.noIsolation;P&&T.cancelable&&T.preventDefault()}}},[]),p=ge.useCallback(function(v,T,O,R){var k={name:v,delta:T,target:O,should:R,shadowParent:kD(O)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(P){return P!==k})},1)},[]),m=ge.useCallback(function(v){n.current=Dd(v),r.current=void 0},[]),b=ge.useCallback(function(v){p(v.type,_v(v),v.target,l(v,e.lockRef.current))},[]),C=ge.useCallback(function(v){p(v.type,Dd(v),v.target,l(v,e.lockRef.current))},[]);ge.useEffect(function(){return gl.push(i),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:C}),document.addEventListener("wheel",u,pl),document.addEventListener("touchmove",u,pl),document.addEventListener("touchstart",m,pl),function(){gl=gl.filter(function(v){return v!==i}),document.removeEventListener("wheel",u,pl),document.removeEventListener("touchmove",u,pl),document.removeEventListener("touchstart",m,pl)}},[]);var _=e.removeScrollBar,y=e.inert;return ge.createElement(ge.Fragment,null,y?ge.createElement(i,{styles:RD(o)}):null,_?ge.createElement(xD,{gapMode:e.gapMode}):null)}function kD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const MD=lD(DC,DD);var LC=ge.forwardRef(function(e,t){return ge.createElement(Lf,bi({},e,{ref:t,sideCar:MD}))});LC.classNames=Lf.classNames;var PD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ml=new WeakMap,kd=new WeakMap,Md={},Hh=0,FC=function(e){return e&&(e.host||FC(e.parentNode))},ID=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},LD=function(e,t,n,r){var o=ID(t,Array.isArray(e)?e:[e]);Md[n]||(Md[n]=new WeakMap);var i=Md[n],a=[],l=new Set,u=new Set(o),p=function(b){!b||l.has(b)||(l.add(b),p(b.parentNode))};o.forEach(p);var m=function(b){!b||u.has(b)||Array.prototype.forEach.call(b.children,function(C){if(l.has(C))m(C);else try{var _=C.getAttribute(r),y=_!==null&&_!=="false",v=(ml.get(C)||0)+1,T=(i.get(C)||0)+1;ml.set(C,v),i.set(C,T),a.push(C),v===1&&y&&kd.set(C,!0),T===1&&C.setAttribute(n,"true"),y||C.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",C,O)}})};return m(t),l.clear(),Hh++,function(){a.forEach(function(b){var C=ml.get(b)-1,_=i.get(b)-1;ml.set(b,C),i.set(b,_),C||(kd.has(b)||b.removeAttribute(r),kd.delete(b)),_||b.removeAttribute(n)}),Hh--,Hh||(ml=new WeakMap,ml=new WeakMap,kd=new WeakMap,Md={})}},FD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=PD(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),LD(r,o,n,"aria-hidden")):function(){return null}},nm="Dialog",[jC,BC]=ec(nm),[jD,qo]=jC(nm),WC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=ge.useRef(null),u=ge.useRef(null),[p=!1,m]=Fu({prop:r,defaultProp:o,onChange:i});return ne.jsx(jD,{scope:t,triggerRef:l,contentRef:u,contentId:wu(),titleId:wu(),descriptionId:wu(),open:p,onOpenChange:m,onOpenToggle:ge.useCallback(()=>m(b=>!b),[m]),modal:a,children:n})};WC.displayName=nm;var zC="DialogTrigger",HC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(zC,n),i=lr(t,o.triggerRef);return ne.jsx(Dn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":im(o.open),...r,ref:i,onClick:Sn(e.onClick,o.onOpenToggle)})});HC.displayName=zC;var rm="DialogPortal",[BD,GC]=jC(rm,{forceMount:void 0}),KC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=qo(rm,t);return ne.jsx(BD,{scope:t,forceMount:n,children:ge.Children.map(r,a=>ne.jsx(rc,{present:n||i.open,children:ne.jsx(QE,{asChild:!0,container:o,children:a})}))})};KC.displayName=rm;var hf="DialogOverlay",UC=ge.forwardRef((e,t)=>{const n=GC(hf,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=qo(hf,e.__scopeDialog);return i.modal?ne.jsx(rc,{present:r||i.open,children:ne.jsx(WD,{...o,ref:t})}):null});UC.displayName=hf;var WD=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(hf,n);return ne.jsx(LC,{as:xs,allowPinchZoom:!0,shards:[o.contentRef],children:ne.jsx(Dn.div,{"data-state":im(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ws="DialogContent",VC=ge.forwardRef((e,t)=>{const n=GC(ws,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=qo(ws,e.__scopeDialog);return ne.jsx(rc,{present:r||i.open,children:i.modal?ne.jsx(zD,{...o,ref:t}):ne.jsx(HD,{...o,ref:t})})});VC.displayName=ws;var zD=ge.forwardRef((e,t)=>{const n=qo(ws,e.__scopeDialog),r=ge.useRef(null),o=lr(t,n.contentRef,r);return ge.useEffect(()=>{const i=r.current;if(i)return FD(i)},[]),ne.jsx(YC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:Sn(e.onFocusOutside,i=>i.preventDefault())})}),HD=ge.forwardRef((e,t)=>{const n=qo(ws,e.__scopeDialog),r=ge.useRef(!1),o=ge.useRef(!1);return ne.jsx(YC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((p=n.triggerRef.current)==null?void 0:p.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),YC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=qo(ws,n),u=ge.useRef(null),p=lr(t,u);return X$(),ne.jsxs(ne.Fragment,{children:[ne.jsx(OC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:ne.jsx(Bg,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":im(l.open),...a,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),ne.jsxs(ne.Fragment,{children:[ne.jsx(KD,{titleId:l.titleId}),ne.jsx(VD,{contentRef:u,descriptionId:l.descriptionId})]})]})}),om="DialogTitle",qC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(om,n);return ne.jsx(Dn.h2,{id:o.titleId,...r,ref:t})});qC.displayName=om;var ZC="DialogDescription",JC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(ZC,n);return ne.jsx(Dn.p,{id:o.descriptionId,...r,ref:t})});JC.displayName=ZC;var XC="DialogClose",QC=ge.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=qo(XC,n);return ne.jsx(Dn.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>o.onOpenChange(!1))})});QC.displayName=XC;function im(e){return e?"open":"closed"}var ew="DialogTitleWarning",[GD,tw]=PA(ew,{contentName:ws,titleName:om,docsSlug:"dialog"}),KD=({titleId:e})=>{const t=tw(ew),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
149
|
-
|
|
150
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
151
|
-
|
|
152
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},UD="DialogDescriptionWarning",VD=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tw(UD).contentName}}.`;return ge.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},YD=WC,qD=HC,ZD=KC,JD=UC,XD=VC,QD=qC,ek=JC,nw=QC,rw="AlertDialog",[tk,VJ]=ec(rw,[BC]),ea=BC(),ow=e=>{const{__scopeAlertDialog:t,...n}=e,r=ea(t);return ne.jsx(YD,{...r,...n,modal:!0})};ow.displayName=rw;var nk="AlertDialogTrigger",iw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(qD,{...o,...r,ref:t})});iw.displayName=nk;var rk="AlertDialogPortal",aw=e=>{const{__scopeAlertDialog:t,...n}=e,r=ea(t);return ne.jsx(ZD,{...r,...n})};aw.displayName=rk;var ok="AlertDialogOverlay",sw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(JD,{...o,...r,ref:t})});sw.displayName=ok;var Hl="AlertDialogContent",[ik,ak]=tk(Hl),lw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=ea(n),a=ge.useRef(null),l=lr(t,a),u=ge.useRef(null);return ne.jsx(GD,{contentName:Hl,titleName:cw,docsSlug:"alert-dialog",children:ne.jsx(ik,{scope:n,cancelRef:u,children:ne.jsxs(XD,{role:"alertdialog",...i,...o,ref:l,onOpenAutoFocus:Sn(o.onOpenAutoFocus,p=>{var m;p.preventDefault(),(m=u.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[ne.jsx(Ig,{children:r}),ne.jsx(lk,{contentRef:a})]})})})});lw.displayName=Hl;var cw="AlertDialogTitle",uw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(QD,{...o,...r,ref:t})});uw.displayName=cw;var dw="AlertDialogDescription",fw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(ek,{...o,...r,ref:t})});fw.displayName=dw;var sk="AlertDialogAction",hw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=ea(n);return ne.jsx(nw,{...o,...r,ref:t})});hw.displayName=sk;var pw="AlertDialogCancel",gw=ge.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=ak(pw,n),i=ea(n),a=lr(t,o);return ne.jsx(nw,{...i,...r,ref:a})});gw.displayName=pw;var lk=({contentRef:e})=>{const t=`\`${Hl}\` requires a description for the component to be accessible for screen reader users.
|
|
153
|
-
|
|
154
|
-
You can add a description to the \`${Hl}\` by passing a \`${dw}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
155
|
-
|
|
156
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Hl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
157
|
-
|
|
158
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return ge.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},ck=ow,uk=iw,dk=aw,mw=sw,yw=lw,vw=hw,bw=gw,_w=uw,xw=fw;const fk=ck,hk=uk,pk=dk,Ew=ge.forwardRef(({className:e,...t},n)=>ne.jsx(mw,{className:sr("ve-fixed ve-inset-0 ve-z-50 ve-bg-black/80 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0",e),...t,ref:n}));Ew.displayName=mw.displayName;const Cw=ge.forwardRef(({className:e,...t},n)=>ne.jsxs(pk,{children:[ne.jsx(Ew,{}),ne.jsx(yw,{ref:n,className:sr("ve-fixed ve-left-[50%] ve-top-[50%] ve-z-50 ve-grid ve-w-full ve-max-w-lg ve-translate-x-[-50%] ve-translate-y-[-50%] ve-gap-4 ve-border ve-bg-background ve-p-6 ve-shadow-lg ve-duration-200 data-[state=open]:ve-animate-in data-[state=closed]:ve-animate-out data-[state=closed]:ve-fade-out-0 data-[state=open]:ve-fade-in-0 data-[state=closed]:ve-zoom-out-95 data-[state=open]:ve-zoom-in-95 data-[state=closed]:ve-slide-out-to-left-1/2 data-[state=closed]:ve-slide-out-to-top-[48%] data-[state=open]:ve-slide-in-from-left-1/2 data-[state=open]:ve-slide-in-from-top-[48%] sm:ve-rounded-lg",e),...t})]}));Cw.displayName=yw.displayName;const ww=({className:e,...t})=>ne.jsx("div",{className:sr("ve-flex ve-flex-col ve-space-y-2 ve-text-center sm:ve-text-left",e),...t});ww.displayName="AlertDialogHeader";const Tw=({className:e,...t})=>ne.jsx("div",{className:sr("ve-flex ve-flex-col-reverse sm:ve-flex-row sm:ve-justify-end sm:ve-space-x-2",e),...t});Tw.displayName="AlertDialogFooter";const Nw=ge.forwardRef(({className:e,...t},n)=>ne.jsx(_w,{ref:n,className:sr("ve-text-lg ve-font-semibold",e),...t}));Nw.displayName=_w.displayName;const Sw=ge.forwardRef(({className:e,...t},n)=>ne.jsx(xw,{ref:n,className:sr("ve-text-sm ve-text-muted-foreground",e),...t}));Sw.displayName=xw.displayName;const gk=ge.forwardRef(({className:e,...t},n)=>ne.jsx(vw,{ref:n,className:sr(em(),e),...t}));gk.displayName=vw.displayName;const Ow=ge.forwardRef(({className:e,...t},n)=>ne.jsx(bw,{ref:n,className:sr(em({variant:"outline"}),"ve-mt-2 sm:ve-mt-0",e),...t}));Ow.displayName=bw.displayName;const Aw=({disabled:e,onClearLocalChanges:t})=>{const[n,r]=H.useState(!1),o=()=>{t(),r(!1)};return ne.jsxs(fk,{open:n,onOpenChange:r,children:[ne.jsx(hk,{disabled:e,asChild:!0,children:ne.jsx(Yi,{variant:"outline",children:"Clear Local Changes"})}),ne.jsxs(Cw,{children:[ne.jsxs(ww,{children:[ne.jsx(Nw,{children:"Clear Local Changes"}),ne.jsx(Sw,{children:"This action will remove your local changes. It cannot be undone."})]}),ne.jsxs(Tw,{children:[ne.jsx(Ow,{children:"Cancel"}),ne.jsx(Yi,{onClick:o,children:"Confirm"})]})]})]})},mk=e=>{const{onClearLocalChanges:t,onHistoryChange:n,onPublishLayout:r,isDevMode:o}=e,{appState:i,history:{back:a,forward:l,histories:u,index:p,hasPast:m,hasFuture:b,setHistories:C}}=Hn.usePuck();return H.useEffect(()=>{n(u,p)},[p,u,n]),ne.jsxs("header",{className:"puck-header",children:[ne.jsxs("div",{className:"header-left",children:[ne.jsx(bC,{}),ne.jsx(SC,{})]}),ne.jsx("div",{className:"header-center"}),ne.jsxs("div",{className:"actions",children:[ne.jsx(Yi,{variant:"ghost",size:"icon",disabled:!m,onClick:a,children:ne.jsx(I$,{className:"sm-icon"})}),ne.jsx(Yi,{variant:"ghost",size:"icon",disabled:!b,onClick:l,children:ne.jsx(L$,{className:"sm-icon"})}),ne.jsx(Aw,{disabled:u.length===1,onClearLocalChanges:()=>{t(),C([{id:"root",state:{data:u[0].state.data}}])}}),!o&&ne.jsx(Yi,{variant:"secondary",disabled:u.length===1,onClick:async()=>{await r(i.data),t(),C([{id:"root",state:{data:i.data}}])},children:"Publish"})]})]})},yl=new Ur,yk=({puckConfig:e,puckInitialHistory:t,isLoading:n,clearHistory:r,templateMetadata:o,layoutSaveState:i,saveLayoutSaveState:a,publishLayout:l,sendDevSaveStateData:u,buildVisualConfigLocalStorageKey:p})=>{const[m,b]=H.useState(!1),C=H.useRef(0),_=H.useCallback((O,R)=>{R!==0&&C.current!==R&&O.length>0&&(yl.logFunc("handleHistoryChange"),yl.logData("PUCK_INDEX",R),yl.logData("PUCK_HISTORY",O),C.current=R,yl.logFunc("saveToLocalStorage"),window.localStorage.setItem(p(),JSON.stringify(O)),(i==null?void 0:i.hash)!==O[R].id&&(o.isDevMode&&!o.devOverride?(yl.logFunc("sendDevSaveStateData"),u({payload:{devSaveStateData:JSON.stringify(O[R].state.data)}})):(yl.logFunc("saveLayoutSaveState"),a({payload:{hash:O[R].id,history:JSON.stringify(O[R].state)}}))))},[o,p,i]),y=()=>{r(),C.current=0},v=async O=>{l({payload:{layoutData:JSON.stringify(O)}})},T=async()=>{if(!n&&!m){b(!0);return}};return ne.jsx(gC,{children:ne.jsx(Hn.Puck,{config:e,data:{},initialHistory:t,onChange:T,overrides:{header:()=>ne.jsx(mk,{onClearLocalChanges:y,onHistoryChange:_,onPublishLayout:v,isDevMode:o.isDevMode})}})})},vk={GLOBAL:"global",INDIVIDUAL:"individual"},Ev="ROLE_",Cv="TEMPLATE_",bk="LAYOUT_",_k="ENTITY_",xk=new Ur,Rw=e=>{const t=H.useCallback(()=>e?Ek(e.isDevMode&&!e.devOverride,e.role,e.templateId,e.layoutId,e.entityId):"",[e]);return{clearVisualConfigLocalStorage:()=>{xk.logFunc("clearVisualConfigLocalStorage"),window.localStorage.removeItem(t())},buildVisualConfigLocalStorageKey:t}};function Ek(e,t,n,r,o){const i=e?"dev":"";if(!t||!n||!o&&!r)throw new Error(`Unable to generate local storage key, missing query parameters${!o&&" entityId"}${!r&&" layoutId"}`);if(t===vk.INDIVIDUAL){if(!o)throw new Error(`EntityId required for role ${t}`);return i+Ev+t+Cv+n+_k+o}if(!r)throw new Error(`LayoutId required for role ${t}`);return i+Ev+t+Cv+n+bk+r}const Ck=()=>{const{sendToParent:e}=zo("saveLayoutSaveState",ar),{sendToParent:t}=zo("deleteLayoutSaveState",ar),{sendToParent:n}=zo("publishLayout",ar);return{saveLayoutSaveState:e,deleteLayoutSaveState:t,publishLayout:n}},wk=new Ur,Tk=()=>{const{iFrameLoaded:e}=Ns();H.useEffect(()=>{e({payload:{message:"Layout Editor is loaded"}})},[]);const[t,n]=H.useState(),[r,o]=H.useState(!1);return Ma("getLayoutSaveState",ar,(i,a)=>{let l;a!=null&&a.history&&(l={hash:a.hash,history:lf(a.history)}),wk.logData("LAYOUT_SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"layoutSaveState received"}})}),{layoutSaveState:t,layoutSaveStateFetched:r}},Nk="SITE_",Sk="THEME_",Ok=new Ur,$w=e=>{const t=H.useCallback(()=>e!=null&&e.themeEntityId?Ak(e.isDevMode,e.siteId,e.themeEntityId):"",[e]);return{clearThemeLocalStorage:()=>{Ok.logFunc("clearThemeLocalStorage"),window.localStorage.removeItem(t())},buildThemeLocalStorageKey:t}};function Ak(e,t,n){if(!n)throw new Error("Unable to generate local storage key for themes, missing themeEntityId");return(e?"dev":"")+Nk+t+Sk+n}const fi=new Ur,Rk=e=>{const{puckConfig:t,templateMetadata:n,layoutData:r,themeData:o,themeConfig:i}=e,{saveLayoutSaveState:a,publishLayout:l,deleteLayoutSaveState:u}=Ck(),{sendDevLayoutSaveStateData:p,sendDevThemeSaveStateData:m}=Ns(),{layoutSaveState:b,layoutSaveStateFetched:C}=Tk(),{buildVisualConfigLocalStorageKey:_,clearVisualConfigLocalStorage:y}=Rw(n),{buildThemeLocalStorageKey:v}=$w(n),[T,O]=H.useState(),[R,k]=H.useState(!1),P=()=>{fi.logFunc("clearHistory"),y(),u()};H.useEffect(()=>{if(!i)return;const oe=window.localStorage.getItem(v());if(n.isDevMode&&oe){const Z=JSON.parse(oe);if(Z.length>0){const U=Z[Z.length-1].data;fi.log("Layout Dev Mode - Using theme data from local storage"),m({payload:{devThemeSaveStateData:JSON.stringify(U)}}),Ou(U,i);return}}o&&Ou(o,i)},[o,i,n]);const M=H.useCallback(()=>{if(!n)return;if(fi.logFunc("loadPuckInitialHistory"),n.isDevMode&&!n.devOverride){const U=window.localStorage.getItem(_());if(U){fi.log("Layout Dev Mode - Using layout data from localStorage");const Q=JSON.parse(U),de=Q.length-1;O({histories:Q,index:de,appendData:!1}),k(!0);return}fi.log("Layout Dev Mode - No localStorage. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}if(!b){y(),fi.log("Layout Prod Mode - No saveState. Using layout data from Content"),r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0);return}const oe=window.localStorage.getItem(_());if(!oe){fi.log("Layout Prod Mode - No localStorage. Using layout saveState"),O({histories:r?[{id:"root",state:{data:r}},{id:b.hash,state:{data:b.history.data}}]:[{id:b.hash,state:{data:b.history.data}}],index:r?1:0,appendData:!1}),k(!0);return}const Z=JSON.parse(oe).findIndex(U=>U.id===(b==null?void 0:b.hash));if(Z!==-1){fi.log("Layout Prod Mode - Using localStorage visual configuration"),O({histories:JSON.parse(oe),index:Z,appendData:!1}),k(!0);return}y()},[O,k,y,_]);H.useEffect(()=>{C&&M()},[n,C]),H.useEffect(()=>{T&&fi.logData("PUCK_INITIAL_HISTORY",T)},[T]),H.useEffect(()=>{if(!R)return;const oe=T==null?void 0:T.histories[T.histories.length-1].state.data;fi.logFunc("sendDevSaveStateData useEffect"),p({payload:{devSaveStateData:JSON.stringify(oe)}})},[R,T,n]);const Y=!R||!C,X=60+(R+C)*20;return Y?ne.jsx(jg,{progress:X}):ne.jsx(yk,{puckConfig:t,puckInitialHistory:T,isLoading:Y,clearHistory:P,templateMetadata:n,layoutSaveState:b,saveLayoutSaveState:a,publishLayout:l,sendDevSaveStateData:p,buildVisualConfigLocalStorageKey:_})},$k=kr("ve-relative ve-rounded ve-border ve-mx-4 ve-my-3 ve-p-4 ve-[&>svg~*]:pl-7 ve-[&>svg+div]:translate-y-[-3px] ve-[&>svg]:absolute ve-[&>svg]:left-4 ve-[&>svg]:top-4 ve-[&>svg]:text-foreground",{variants:{variant:{default:"ve-bg-background ve-text-foreground",destructive:"ve-border-destructive/50 ve-text-destructive ve-dark:border-destructive ve-[&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Jp=H.forwardRef(({className:e,variant:t,...n},r)=>ne.jsx("div",{ref:r,role:"alert",className:sr($k({variant:t}),e),...n}));Jp.displayName="Alert";const Dk=H.forwardRef(({className:e,...t},n)=>ne.jsx("h5",{ref:n,className:sr("ve-mb-1 ve-font-medium ve-leading-none ve-tracking-tight",e),...t}));Dk.displayName="AlertTitle";const Xp=H.forwardRef(({className:e,...t},n)=>ne.jsx("div",{ref:n,className:sr("ve-text-sm [&_p]:ve-leading-relaxed",e),...t}));Xp.displayName="AlertDescription";var xo={},ju={},kk=typeof Sd=="object"&&Sd&&Sd.Object===Object&&Sd,Dw=kk,Mk=Dw,Pk=typeof self=="object"&&self&&self.Object===Object&&self,Ik=Mk||Pk||Function("return this")(),Ti=Ik,Lk=Ti,Fk=Lk.Symbol,Bu=Fk,wv=Bu,kw=Object.prototype,jk=kw.hasOwnProperty,Bk=kw.toString,lu=wv?wv.toStringTag:void 0;function Wk(e){var t=jk.call(e,lu),n=e[lu];try{e[lu]=void 0;var r=!0}catch{}var o=Bk.call(e);return r&&(t?e[lu]=n:delete e[lu]),o}var zk=Wk,Hk=Object.prototype,Gk=Hk.toString;function Kk(e){return Gk.call(e)}var Uk=Kk,Tv=Bu,Vk=zk,Yk=Uk,qk="[object Null]",Zk="[object Undefined]",Nv=Tv?Tv.toStringTag:void 0;function Jk(e){return e==null?e===void 0?Zk:qk:Nv&&Nv in Object(e)?Vk(e):Yk(e)}var Ss=Jk,Xk=Array.isArray,Zo=Xk;function Qk(e){return e!=null&&typeof e=="object"}var ta=Qk,eM=Ss,tM=Zo,nM=ta,rM="[object String]";function oM(e){return typeof e=="string"||!tM(e)&&nM(e)&&eM(e)==rM}var iM=oM;function aM(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(n(i[u],u,i)===!1)break}return t}}var sM=aM,lM=sM,cM=lM(),uM=cM;function dM(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fM=dM,hM=Ss,pM=ta,gM="[object Arguments]";function mM(e){return pM(e)&&hM(e)==gM}var yM=mM,Sv=yM,vM=ta,Mw=Object.prototype,bM=Mw.hasOwnProperty,_M=Mw.propertyIsEnumerable,xM=Sv(function(){return arguments}())?Sv:function(e){return vM(e)&&bM.call(e,"callee")&&!_M.call(e,"callee")},Pw=xM,pf={exports:{}};function EM(){return!1}var CM=EM;pf.exports;(function(e,t){var n=Ti,r=CM,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,u=l?l.isBuffer:void 0,p=u||r;e.exports=p})(pf,pf.exports);var am=pf.exports,wM=9007199254740991,TM=/^(?:0|[1-9]\d*)$/;function NM(e,t){var n=typeof e;return t=t??wM,!!t&&(n=="number"||n!="symbol"&&TM.test(e))&&e>-1&&e%1==0&&e<t}var Iw=NM,SM=9007199254740991;function OM(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SM}var sm=OM,AM=Ss,RM=sm,$M=ta,DM="[object Arguments]",kM="[object Array]",MM="[object Boolean]",PM="[object Date]",IM="[object Error]",LM="[object Function]",FM="[object Map]",jM="[object Number]",BM="[object Object]",WM="[object RegExp]",zM="[object Set]",HM="[object String]",GM="[object WeakMap]",KM="[object ArrayBuffer]",UM="[object DataView]",VM="[object Float32Array]",YM="[object Float64Array]",qM="[object Int8Array]",ZM="[object Int16Array]",JM="[object Int32Array]",XM="[object Uint8Array]",QM="[object Uint8ClampedArray]",eP="[object Uint16Array]",tP="[object Uint32Array]",Tn={};Tn[VM]=Tn[YM]=Tn[qM]=Tn[ZM]=Tn[JM]=Tn[XM]=Tn[QM]=Tn[eP]=Tn[tP]=!0;Tn[DM]=Tn[kM]=Tn[KM]=Tn[MM]=Tn[UM]=Tn[PM]=Tn[IM]=Tn[LM]=Tn[FM]=Tn[jM]=Tn[BM]=Tn[WM]=Tn[zM]=Tn[HM]=Tn[GM]=!1;function nP(e){return $M(e)&&RM(e.length)&&!!Tn[AM(e)]}var rP=nP;function oP(e){return function(t){return e(t)}}var lm=oP,gf={exports:{}};gf.exports;(function(e,t){var n=Dw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(gf,gf.exports);var cm=gf.exports,iP=rP,aP=lm,Ov=cm,Av=Ov&&Ov.isTypedArray,sP=Av?aP(Av):iP,Lw=sP,lP=fM,cP=Pw,uP=Zo,dP=am,fP=Iw,hP=Lw,pP=Object.prototype,gP=pP.hasOwnProperty;function mP(e,t){var n=uP(e),r=!n&&cP(e),o=!n&&!r&&dP(e),i=!n&&!r&&!o&&hP(e),a=n||r||o||i,l=a?lP(e.length,String):[],u=l.length;for(var p in e)(t||gP.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||fP(p,u)))&&l.push(p);return l}var Fw=mP,yP=Object.prototype;function vP(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yP;return e===n}var um=vP;function bP(e,t){return function(n){return e(t(n))}}var jw=bP,_P=jw,xP=_P(Object.keys,Object),EP=xP,CP=um,wP=EP,TP=Object.prototype,NP=TP.hasOwnProperty;function SP(e){if(!CP(e))return wP(e);var t=[];for(var n in Object(e))NP.call(e,n)&&n!="constructor"&&t.push(n);return t}var OP=SP;function AP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var oc=AP,RP=Ss,$P=oc,DP="[object AsyncFunction]",kP="[object Function]",MP="[object GeneratorFunction]",PP="[object Proxy]";function IP(e){if(!$P(e))return!1;var t=RP(e);return t==kP||t==MP||t==DP||t==PP}var Bw=IP,LP=Bw,FP=sm;function jP(e){return e!=null&&FP(e.length)&&!LP(e)}var Ff=jP,BP=Fw,WP=OP,zP=Ff;function HP(e){return zP(e)?BP(e):WP(e)}var Wu=HP,GP=uM,KP=Wu;function UP(e,t){return e&&GP(e,t,KP)}var Ww=UP;function VP(e){return e}var zw=VP,YP=zw;function qP(e){return typeof e=="function"?e:YP}var ZP=qP,JP=Ww,XP=ZP;function QP(e,t){return e&&JP(e,XP(t))}var dm=QP,eI=jw,tI=eI(Object.getPrototypeOf,Object),fm=tI,nI=Ss,rI=fm,oI=ta,iI="[object Object]",aI=Function.prototype,sI=Object.prototype,Hw=aI.toString,lI=sI.hasOwnProperty,cI=Hw.call(Object);function uI(e){if(!oI(e)||nI(e)!=iI)return!1;var t=rI(e);if(t===null)return!0;var n=lI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Hw.call(n)==cI}var dI=uI;function fI(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var Gw=fI;function hI(){this.__data__=[],this.size=0}var pI=hI;function gI(e,t){return e===t||e!==e&&t!==t}var hm=gI,mI=hm;function yI(e,t){for(var n=e.length;n--;)if(mI(e[n][0],t))return n;return-1}var jf=yI,vI=jf,bI=Array.prototype,_I=bI.splice;function xI(e){var t=this.__data__,n=vI(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():_I.call(t,n,1),--this.size,!0}var EI=xI,CI=jf;function wI(e){var t=this.__data__,n=CI(t,e);return n<0?void 0:t[n][1]}var TI=wI,NI=jf;function SI(e){return NI(this.__data__,e)>-1}var OI=SI,AI=jf;function RI(e,t){var n=this.__data__,r=AI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var $I=RI,DI=pI,kI=EI,MI=TI,PI=OI,II=$I;function ic(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ic.prototype.clear=DI;ic.prototype.delete=kI;ic.prototype.get=MI;ic.prototype.has=PI;ic.prototype.set=II;var Bf=ic,LI=Bf;function FI(){this.__data__=new LI,this.size=0}var jI=FI;function BI(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var WI=BI;function zI(e){return this.__data__.get(e)}var HI=zI;function GI(e){return this.__data__.has(e)}var KI=GI,UI=Ti,VI=UI["__core-js_shared__"],YI=VI,Gh=YI,Rv=function(){var e=/[^.]+$/.exec(Gh&&Gh.keys&&Gh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qI(e){return!!Rv&&Rv in e}var ZI=qI,JI=Function.prototype,XI=JI.toString;function QI(e){if(e!=null){try{return XI.call(e)}catch{}try{return e+""}catch{}}return""}var Kw=QI,eL=Bw,tL=ZI,nL=oc,rL=Kw,oL=/[\\^$.*+?()[\]{}|]/g,iL=/^\[object .+?Constructor\]$/,aL=Function.prototype,sL=Object.prototype,lL=aL.toString,cL=sL.hasOwnProperty,uL=RegExp("^"+lL.call(cL).replace(oL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dL(e){if(!nL(e)||tL(e))return!1;var t=eL(e)?uL:iL;return t.test(rL(e))}var fL=dL;function hL(e,t){return e==null?void 0:e[t]}var pL=hL,gL=fL,mL=pL;function yL(e,t){var n=mL(e,t);return gL(n)?n:void 0}var Os=yL,vL=Os,bL=Ti,_L=vL(bL,"Map"),pm=_L,xL=Os,EL=xL(Object,"create"),Wf=EL,$v=Wf;function CL(){this.__data__=$v?$v(null):{},this.size=0}var wL=CL;function TL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var NL=TL,SL=Wf,OL="__lodash_hash_undefined__",AL=Object.prototype,RL=AL.hasOwnProperty;function $L(e){var t=this.__data__;if(SL){var n=t[e];return n===OL?void 0:n}return RL.call(t,e)?t[e]:void 0}var DL=$L,kL=Wf,ML=Object.prototype,PL=ML.hasOwnProperty;function IL(e){var t=this.__data__;return kL?t[e]!==void 0:PL.call(t,e)}var LL=IL,FL=Wf,jL="__lodash_hash_undefined__";function BL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=FL&&t===void 0?jL:t,this}var WL=BL,zL=wL,HL=NL,GL=DL,KL=LL,UL=WL;function ac(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ac.prototype.clear=zL;ac.prototype.delete=HL;ac.prototype.get=GL;ac.prototype.has=KL;ac.prototype.set=UL;var VL=ac,Dv=VL,YL=Bf,qL=pm;function ZL(){this.size=0,this.__data__={hash:new Dv,map:new(qL||YL),string:new Dv}}var JL=ZL;function XL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var QL=XL,eF=QL;function tF(e,t){var n=e.__data__;return eF(t)?n[typeof t=="string"?"string":"hash"]:n.map}var zf=tF,nF=zf;function rF(e){var t=nF(this,e).delete(e);return this.size-=t?1:0,t}var oF=rF,iF=zf;function aF(e){return iF(this,e).get(e)}var sF=aF,lF=zf;function cF(e){return lF(this,e).has(e)}var uF=cF,dF=zf;function fF(e,t){var n=dF(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var hF=fF,pF=JL,gF=oF,mF=sF,yF=uF,vF=hF;function sc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sc.prototype.clear=pF;sc.prototype.delete=gF;sc.prototype.get=mF;sc.prototype.has=yF;sc.prototype.set=vF;var gm=sc,bF=Bf,_F=pm,xF=gm,EF=200;function CF(e,t){var n=this.__data__;if(n instanceof bF){var r=n.__data__;if(!_F||r.length<EF-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xF(r)}return n.set(e,t),this.size=n.size,this}var wF=CF,TF=Bf,NF=jI,SF=WI,OF=HI,AF=KI,RF=wF;function lc(e){var t=this.__data__=new TF(e);this.size=t.size}lc.prototype.clear=NF;lc.prototype.delete=SF;lc.prototype.get=OF;lc.prototype.has=AF;lc.prototype.set=RF;var mm=lc,$F="__lodash_hash_undefined__";function DF(e){return this.__data__.set(e,$F),this}var kF=DF;function MF(e){return this.__data__.has(e)}var PF=MF,IF=gm,LF=kF,FF=PF;function mf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new IF;++t<n;)this.add(e[t])}mf.prototype.add=mf.prototype.push=LF;mf.prototype.has=FF;var jF=mf;function BF(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var WF=BF;function zF(e,t){return e.has(t)}var HF=zF,GF=jF,KF=WF,UF=HF,VF=1,YF=2;function qF(e,t,n,r,o,i){var a=n&VF,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var b=-1,C=!0,_=n&YF?new GF:void 0;for(i.set(e,t),i.set(t,e);++b<l;){var y=e[b],v=t[b];if(r)var T=a?r(v,y,b,t,e,i):r(y,v,b,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(_){if(!KF(t,function(O,R){if(!UF(_,R)&&(y===O||o(y,O,n,r,i)))return _.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}var Uw=qF,ZF=Ti,JF=ZF.Uint8Array,Vw=JF;function XF(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var QF=XF;function e2(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var t2=e2,kv=Bu,Mv=Vw,n2=hm,r2=Uw,o2=QF,i2=t2,a2=1,s2=2,l2="[object Boolean]",c2="[object Date]",u2="[object Error]",d2="[object Map]",f2="[object Number]",h2="[object RegExp]",p2="[object Set]",g2="[object String]",m2="[object Symbol]",y2="[object ArrayBuffer]",v2="[object DataView]",Pv=kv?kv.prototype:void 0,Kh=Pv?Pv.valueOf:void 0;function b2(e,t,n,r,o,i,a){switch(n){case v2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y2:return!(e.byteLength!=t.byteLength||!i(new Mv(e),new Mv(t)));case l2:case c2:case f2:return n2(+e,+t);case u2:return e.name==t.name&&e.message==t.message;case h2:case g2:return e==t+"";case d2:var l=o2;case p2:var u=r&a2;if(l||(l=i2),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=s2,a.set(e,t);var m=r2(l(e),l(t),r,o,i,a);return a.delete(e),m;case m2:if(Kh)return Kh.call(e)==Kh.call(t)}return!1}var _2=b2;function x2(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Yw=x2,E2=Yw,C2=Zo;function w2(e,t,n){var r=t(e);return C2(e)?r:E2(r,n(e))}var qw=w2;function T2(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var N2=T2;function S2(){return[]}var Zw=S2,O2=N2,A2=Zw,R2=Object.prototype,$2=R2.propertyIsEnumerable,Iv=Object.getOwnPropertySymbols,D2=Iv?function(e){return e==null?[]:(e=Object(e),O2(Iv(e),function(t){return $2.call(e,t)}))}:A2,ym=D2,k2=qw,M2=ym,P2=Wu;function I2(e){return k2(e,P2,M2)}var Jw=I2,Lv=Jw,L2=1,F2=Object.prototype,j2=F2.hasOwnProperty;function B2(e,t,n,r,o,i){var a=n&L2,l=Lv(e),u=l.length,p=Lv(t),m=p.length;if(u!=m&&!a)return!1;for(var b=u;b--;){var C=l[b];if(!(a?C in t:j2.call(t,C)))return!1}var _=i.get(e),y=i.get(t);if(_&&y)return _==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++b<u;){C=l[b];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var W2=B2,z2=Os,H2=Ti,G2=z2(H2,"DataView"),K2=G2,U2=Os,V2=Ti,Y2=U2(V2,"Promise"),q2=Y2,Z2=Os,J2=Ti,X2=Z2(J2,"Set"),Q2=X2,ej=Os,tj=Ti,nj=ej(tj,"WeakMap"),rj=nj,Qp=K2,eg=pm,tg=q2,ng=Q2,rg=rj,Xw=Ss,cc=Kw,Fv="[object Map]",oj="[object Object]",jv="[object Promise]",Bv="[object Set]",Wv="[object WeakMap]",zv="[object DataView]",ij=cc(Qp),aj=cc(eg),sj=cc(tg),lj=cc(ng),cj=cc(rg),ms=Xw;(Qp&&ms(new Qp(new ArrayBuffer(1)))!=zv||eg&&ms(new eg)!=Fv||tg&&ms(tg.resolve())!=jv||ng&&ms(new ng)!=Bv||rg&&ms(new rg)!=Wv)&&(ms=function(e){var t=Xw(e),n=t==oj?e.constructor:void 0,r=n?cc(n):"";if(r)switch(r){case ij:return zv;case aj:return Fv;case sj:return jv;case lj:return Bv;case cj:return Wv}return t});var Hf=ms,Uh=mm,uj=Uw,dj=_2,fj=W2,Hv=Hf,Gv=Zo,Kv=am,hj=Lw,pj=1,Uv="[object Arguments]",Vv="[object Array]",Pd="[object Object]",gj=Object.prototype,Yv=gj.hasOwnProperty;function mj(e,t,n,r,o,i){var a=Gv(e),l=Gv(t),u=a?Vv:Hv(e),p=l?Vv:Hv(t);u=u==Uv?Pd:u,p=p==Uv?Pd:p;var m=u==Pd,b=p==Pd,C=u==p;if(C&&Kv(e)){if(!Kv(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new Uh),a||hj(e)?uj(e,t,n,r,o,i):dj(e,t,u,n,r,o,i);if(!(n&pj)){var _=m&&Yv.call(e,"__wrapped__"),y=b&&Yv.call(t,"__wrapped__");if(_||y){var v=_?e.value():e,T=y?t.value():t;return i||(i=new Uh),o(v,T,n,r,i)}}return C?(i||(i=new Uh),fj(e,t,n,r,o,i)):!1}var yj=mj,vj=yj,qv=ta;function Qw(e,t,n,r,o){return e===t?!0:e==null||t==null||!qv(e)&&!qv(t)?e!==e&&t!==t:vj(e,t,n,r,Qw,o)}var eT=Qw,bj=mm,_j=eT,xj=1,Ej=2;function Cj(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var l=n[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<i;){l=n[o];var u=l[0],p=e[u],m=l[1];if(a&&l[2]){if(p===void 0&&!(u in e))return!1}else{var b=new bj;if(r)var C=r(p,m,u,e,t,b);if(!(C===void 0?_j(m,p,xj|Ej,r,b):C))return!1}}return!0}var wj=Cj,Tj=oc;function Nj(e){return e===e&&!Tj(e)}var tT=Nj,Sj=tT,Oj=Wu;function Aj(e){for(var t=Oj(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Sj(o)]}return t}var Rj=Aj;function $j(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var nT=$j,Dj=wj,kj=Rj,Mj=nT;function Pj(e){var t=kj(e);return t.length==1&&t[0][2]?Mj(t[0][0],t[0][1]):function(n){return n===e||Dj(n,e,t)}}var Ij=Pj,Lj=Ss,Fj=ta,jj="[object Symbol]";function Bj(e){return typeof e=="symbol"||Fj(e)&&Lj(e)==jj}var vm=Bj,Wj=Zo,zj=vm,Hj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gj=/^\w*$/;function Kj(e,t){if(Wj(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||zj(e)?!0:Gj.test(e)||!Hj.test(e)||t!=null&&e in Object(t)}var bm=Kj,rT=gm,Uj="Expected a function";function _m(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Uj);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(_m.Cache||rT),n}_m.Cache=rT;var Vj=_m,Yj=Vj,qj=500;function Zj(e){var t=Yj(e,function(r){return n.size===qj&&n.clear(),r}),n=t.cache;return t}var Jj=Zj,Xj=Jj,Qj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eB=/\\(\\)?/g,tB=Xj(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qj,function(n,r,o,i){t.push(o?i.replace(eB,"$1"):r||n)}),t}),nB=tB,Zv=Bu,rB=Gw,oB=Zo,iB=vm,aB=1/0,Jv=Zv?Zv.prototype:void 0,Xv=Jv?Jv.toString:void 0;function oT(e){if(typeof e=="string")return e;if(oB(e))return rB(e,oT)+"";if(iB(e))return Xv?Xv.call(e):"";var t=e+"";return t=="0"&&1/e==-aB?"-0":t}var sB=oT,lB=sB;function cB(e){return e==null?"":lB(e)}var uB=cB,dB=Zo,fB=bm,hB=nB,pB=uB;function gB(e,t){return dB(e)?e:fB(e,t)?[e]:hB(pB(e))}var iT=gB,mB=vm,yB=1/0;function vB(e){if(typeof e=="string"||mB(e))return e;var t=e+"";return t=="0"&&1/e==-yB?"-0":t}var Gf=vB,bB=iT,_B=Gf;function xB(e,t){t=bB(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[_B(t[n++])];return n&&n==r?e:void 0}var aT=xB,EB=aT;function CB(e,t,n){var r=e==null?void 0:EB(e,t);return r===void 0?n:r}var wB=CB;function TB(e,t){return e!=null&&t in Object(e)}var NB=TB,SB=iT,OB=Pw,AB=Zo,RB=Iw,$B=sm,DB=Gf;function kB(e,t,n){t=SB(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=DB(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&$B(o)&&RB(a,o)&&(AB(e)||OB(e)))}var MB=kB,PB=NB,IB=MB;function LB(e,t){return e!=null&&IB(e,t,PB)}var FB=LB,jB=eT,BB=wB,WB=FB,zB=bm,HB=tT,GB=nT,KB=Gf,UB=1,VB=2;function YB(e,t){return zB(e)&&HB(t)?GB(KB(e),t):function(n){var r=BB(n,e);return r===void 0&&r===t?WB(n,e):jB(t,r,UB|VB)}}var qB=YB;function ZB(e){return function(t){return t==null?void 0:t[e]}}var JB=ZB,XB=aT;function QB(e){return function(t){return XB(t,e)}}var eW=QB,tW=JB,nW=eW,rW=bm,oW=Gf;function iW(e){return rW(e)?tW(oW(e)):nW(e)}var aW=iW,sW=Ij,lW=qB,cW=zw,uW=Zo,dW=aW;function fW(e){return typeof e=="function"?e:e==null?cW:typeof e=="object"?uW(e)?lW(e[0],e[1]):sW(e):dW(e)}var hW=fW,pW=Ff;function gW(e,t){return function(n,r){if(n==null)return n;if(!pW(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var mW=gW,yW=Ww,vW=mW,bW=vW(yW),_W=bW,xW=_W,EW=Ff;function CW(e,t){var n=-1,r=EW(e)?Array(e.length):[];return xW(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var wW=CW,TW=Gw,NW=hW,SW=wW,OW=Zo;function AW(e,t){var n=OW(e)?TW:SW;return n(e,NW(t))}var RW=AW;Object.defineProperty(ju,"__esModule",{value:!0});ju.flattenNames=void 0;var $W=iM,DW=Kf($W),kW=dm,MW=Kf(kW),PW=dI,IW=Kf(PW),LW=RW,FW=Kf(LW);function Kf(e){return e&&e.__esModule?e:{default:e}}var jW=ju.flattenNames=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,FW.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,IW.default)(r)?(0,MW.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,DW.default)(r)&&n.push(r)}),n};ju.default=jW;var zu={};function BW(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var WW=BW,zW=Os,HW=function(){try{var e=zW(Object,"defineProperty");return e({},"",{}),e}catch{}}(),GW=HW,Qv=GW;function KW(e,t,n){t=="__proto__"&&Qv?Qv(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var sT=KW,UW=sT,VW=hm,YW=Object.prototype,qW=YW.hasOwnProperty;function ZW(e,t,n){var r=e[t];(!(qW.call(e,t)&&VW(r,n))||n===void 0&&!(t in e))&&UW(e,t,n)}var lT=ZW,JW=lT,XW=sT;function QW(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=r?r(n[l],e[l],l,n,e):void 0;u===void 0&&(u=e[l]),o?XW(n,l,u):JW(n,l,u)}return n}var Uf=QW,e3=Uf,t3=Wu;function n3(e,t){return e&&e3(t,t3(t),e)}var r3=n3;function o3(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var i3=o3,a3=oc,s3=um,l3=i3,c3=Object.prototype,u3=c3.hasOwnProperty;function d3(e){if(!a3(e))return l3(e);var t=s3(e),n=[];for(var r in e)r=="constructor"&&(t||!u3.call(e,r))||n.push(r);return n}var f3=d3,h3=Fw,p3=f3,g3=Ff;function m3(e){return g3(e)?h3(e,!0):p3(e)}var xm=m3,y3=Uf,v3=xm;function b3(e,t){return e&&y3(t,v3(t),e)}var _3=b3,yf={exports:{}};yf.exports;(function(e,t){var n=Ti,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,l=a?a.allocUnsafe:void 0;function u(p,m){if(m)return p.slice();var b=p.length,C=l?l(b):new p.constructor(b);return p.copy(C),C}e.exports=u})(yf,yf.exports);var x3=yf.exports;function E3(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var C3=E3,w3=Uf,T3=ym;function N3(e,t){return w3(e,T3(e),t)}var S3=N3,O3=Yw,A3=fm,R3=ym,$3=Zw,D3=Object.getOwnPropertySymbols,k3=D3?function(e){for(var t=[];e;)O3(t,R3(e)),e=A3(e);return t}:$3,cT=k3,M3=Uf,P3=cT;function I3(e,t){return M3(e,P3(e),t)}var L3=I3,F3=qw,j3=cT,B3=xm;function W3(e){return F3(e,B3,j3)}var z3=W3,H3=Object.prototype,G3=H3.hasOwnProperty;function K3(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&G3.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var U3=K3,e0=Vw;function V3(e){var t=new e.constructor(e.byteLength);return new e0(t).set(new e0(e)),t}var Em=V3,Y3=Em;function q3(e,t){var n=t?Y3(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Z3=q3,J3=/\w*$/;function X3(e){var t=new e.constructor(e.source,J3.exec(e));return t.lastIndex=e.lastIndex,t}var Q3=X3,t0=Bu,n0=t0?t0.prototype:void 0,r0=n0?n0.valueOf:void 0;function ez(e){return r0?Object(r0.call(e)):{}}var tz=ez,nz=Em;function rz(e,t){var n=t?nz(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var oz=rz,iz=Em,az=Z3,sz=Q3,lz=tz,cz=oz,uz="[object Boolean]",dz="[object Date]",fz="[object Map]",hz="[object Number]",pz="[object RegExp]",gz="[object Set]",mz="[object String]",yz="[object Symbol]",vz="[object ArrayBuffer]",bz="[object DataView]",_z="[object Float32Array]",xz="[object Float64Array]",Ez="[object Int8Array]",Cz="[object Int16Array]",wz="[object Int32Array]",Tz="[object Uint8Array]",Nz="[object Uint8ClampedArray]",Sz="[object Uint16Array]",Oz="[object Uint32Array]";function Az(e,t,n){var r=e.constructor;switch(t){case vz:return iz(e);case uz:case dz:return new r(+e);case bz:return az(e,n);case _z:case xz:case Ez:case Cz:case wz:case Tz:case Nz:case Sz:case Oz:return cz(e,n);case fz:return new r;case hz:case mz:return new r(e);case pz:return sz(e);case gz:return new r;case yz:return lz(e)}}var Rz=Az,$z=oc,o0=Object.create,Dz=function(){function e(){}return function(t){if(!$z(t))return{};if(o0)return o0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),kz=Dz,Mz=kz,Pz=fm,Iz=um;function Lz(e){return typeof e.constructor=="function"&&!Iz(e)?Mz(Pz(e)):{}}var Fz=Lz,jz=Hf,Bz=ta,Wz="[object Map]";function zz(e){return Bz(e)&&jz(e)==Wz}var Hz=zz,Gz=Hz,Kz=lm,i0=cm,a0=i0&&i0.isMap,Uz=a0?Kz(a0):Gz,Vz=Uz,Yz=Hf,qz=ta,Zz="[object Set]";function Jz(e){return qz(e)&&Yz(e)==Zz}var Xz=Jz,Qz=Xz,e5=lm,s0=cm,l0=s0&&s0.isSet,t5=l0?e5(l0):Qz,n5=t5,r5=mm,o5=WW,i5=lT,a5=r3,s5=_3,l5=x3,c5=C3,u5=S3,d5=L3,f5=Jw,h5=z3,p5=Hf,g5=U3,m5=Rz,y5=Fz,v5=Zo,b5=am,_5=Vz,x5=oc,E5=n5,C5=Wu,w5=xm,T5=1,N5=2,S5=4,uT="[object Arguments]",O5="[object Array]",A5="[object Boolean]",R5="[object Date]",$5="[object Error]",dT="[object Function]",D5="[object GeneratorFunction]",k5="[object Map]",M5="[object Number]",fT="[object Object]",P5="[object RegExp]",I5="[object Set]",L5="[object String]",F5="[object Symbol]",j5="[object WeakMap]",B5="[object ArrayBuffer]",W5="[object DataView]",z5="[object Float32Array]",H5="[object Float64Array]",G5="[object Int8Array]",K5="[object Int16Array]",U5="[object Int32Array]",V5="[object Uint8Array]",Y5="[object Uint8ClampedArray]",q5="[object Uint16Array]",Z5="[object Uint32Array]",En={};En[uT]=En[O5]=En[B5]=En[W5]=En[A5]=En[R5]=En[z5]=En[H5]=En[G5]=En[K5]=En[U5]=En[k5]=En[M5]=En[fT]=En[P5]=En[I5]=En[L5]=En[F5]=En[V5]=En[Y5]=En[q5]=En[Z5]=!0;En[$5]=En[dT]=En[j5]=!1;function ef(e,t,n,r,o,i){var a,l=t&T5,u=t&N5,p=t&S5;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!x5(e))return e;var m=v5(e);if(m){if(a=g5(e),!l)return c5(e,a)}else{var b=p5(e),C=b==dT||b==D5;if(b5(e))return l5(e,l);if(b==fT||b==uT||C&&!o){if(a=u||C?{}:y5(e),!l)return u?d5(e,s5(a,e)):u5(e,a5(a,e))}else{if(!En[b])return o?e:{};a=m5(e,b,l)}}i||(i=new r5);var _=i.get(e);if(_)return _;i.set(e,a),E5(e)?e.forEach(function(T){a.add(ef(T,t,n,T,e,i))}):_5(e)&&e.forEach(function(T,O){a.set(O,ef(T,t,n,O,e,i))});var y=p?u?h5:f5:u?w5:C5,v=m?void 0:y(e);return o5(v||e,function(T,O){v&&(O=T,T=e[O]),i5(a,O,ef(T,t,n,O,e,i))}),a}var J5=ef,X5=J5,Q5=1,eH=4;function tH(e){return X5(e,Q5|eH)}var nH=tH;Object.defineProperty(zu,"__esModule",{value:!0});zu.mergeClasses=void 0;var rH=dm,oH=hT(rH),iH=nH,aH=hT(iH),sH=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};function hT(e){return e&&e.__esModule?e:{default:e}}var lH=zu.mergeClasses=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,aH.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,oH.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=sH({},r[l],i[l])}),o}),r};zu.default=lH;var Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.autoprefix=void 0;var cH=dm,c0=dH(cH),uH=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};function dH(e){return e&&e.__esModule?e:{default:e}}var fH={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var n=t&&t.split(" ");return{position:"absolute",top:n&&n[0],right:n&&n[1],bottom:n&&n[2],left:n&&n[3]}},extend:function(t,n){var r=n[t];return r||{extend:t}}},hH=Hu.autoprefix=function(t){var n={};return(0,c0.default)(t,function(r,o){var i={};(0,c0.default)(r,function(a,l){var u=fH[l];u?i=uH({},i,u(a)):i[l]=a}),n[o]=i}),n};Hu.default=hH;var Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.hover=void 0;var pH=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},gH=H,Vh=mH(gH);function mH(e){return e&&e.__esModule?e:{default:e}}function yH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function vH(e,t){if(typeof t!="function"&&t!==null)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)}var bH=Gu.hover=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){vH(o,r);function o(){var i,a,l,u;yH(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=u0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return Vh.default.createElement(n,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},Vh.default.createElement(t,pH({},l.props,l.state)))},a),u0(l,u)}return o}(Vh.default.Component)};Gu.default=bH;var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.active=void 0;var _H=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},xH=H,Yh=EH(xH);function EH(e){return e&&e.__esModule?e:{default:e}}function CH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function wH(e,t){if(typeof t!="function"&&t!==null)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)}var TH=Ku.active=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){wH(o,r);function o(){var i,a,l,u;CH(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=d0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return Yh.default.createElement(n,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},Yh.default.createElement(t,_H({},l.props,l.state)))},a),d0(l,u)}return o}(Yh.default.Component)};Ku.default=TH;var Cm={};Object.defineProperty(Cm,"__esModule",{value:!0});var NH=function(t,n){var r={},o=function(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Cm.default=NH;Object.defineProperty(xo,"__esModule",{value:!0});xo.ReactCSS=xo.loop=xo.handleActive=wm=xo.handleHover=xo.hover=void 0;var SH=ju,OH=uc(SH),AH=zu,RH=uc(AH),$H=Hu,DH=uc($H),kH=Gu,pT=uc(kH),MH=Ku,PH=uc(MH),IH=Cm,LH=uc(IH);function uc(e){return e&&e.__esModule?e:{default:e}}xo.hover=pT.default;var wm=xo.handleHover=pT.default;xo.handleActive=PH.default;xo.loop=LH.default;var FH=xo.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=(0,OH.default)(r),a=(0,RH.default)(t,i);return(0,DH.default)(a)},zt=xo.default=FH,jH=function(t,n,r,o,i){var a=i.clientWidth,l=i.clientHeight,u=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,p=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,m=u-(i.getBoundingClientRect().left+window.pageXOffset),b=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var C=void 0;if(b<0?C=0:b>l?C=1:C=Math.round(b*100/l)/100,n.a!==C)return{h:n.h,s:n.s,l:n.l,a:C,source:"rgb"}}else{var _=void 0;if(m<0?_=0:m>a?_=1:_=Math.round(m*100/a)/100,o!==_)return{h:n.h,s:n.s,l:n.l,a:_,source:"rgb"}}return null},qh={},BH=function(t,n,r,o){if(typeof document>"u"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},WH=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(qh[i])return qh[i];var a=BH(t,n,r,o);return qh[i]=a,a},f0=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},dc=function(t){var n=t.white,r=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,l=t.boxShadow,u=t.children,p=zt({default:{grid:{borderRadius:a,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+WH(n,r,o,i.canvas)+") center left"}}});return H.isValidElement(u)?H.cloneElement(u,f0({},u.props,{style:f0({},u.props.style,p.grid)})):H.createElement("div",{style:p.grid})};dc.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var zH=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},HH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function GH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function KH(e,t){if(typeof t!="function"&&t!==null)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)}var Tm=function(e){KH(t,e);function t(){var n,r,o,i;GH(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=h0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=jH(p,o.props.hsl,o.props.direction,o.props.a,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},r),h0(o,i)}return HH(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,o=this.props.rgb,i=zt({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
159
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:o.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+o.r+","+o.g+","+o.b+`, 0) 0%,
|
|
160
|
-
rgba(`+o.r+","+o.g+","+o.b+", 1) 100%)"},pointer:{left:0,top:o.a*100+"%"}},overwrite:zH({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return H.createElement("div",{style:i.alpha},H.createElement("div",{style:i.checkboard},H.createElement(dc,{renderers:this.props.renderers})),H.createElement("div",{style:i.gradient}),H.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("div",{style:i.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:i.slider}))))}}]),t}(H.PureComponent||H.Component),UH=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function VH(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qH(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function ZH(e,t){if(typeof t!="function"&&t!==null)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)}var JH=1,gT=38,XH=40,QH=[gT,XH],e4=function(t){return QH.indexOf(t)>-1},t4=function(t){return Number(String(t).replace(/%/g,""))},n4=1,en=function(e){ZH(t,e);function t(n){YH(this,t);var r=qH(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=t4(o.target.value);if(!isNaN(i)&&e4(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===gT?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+n4++,r}return UH(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return VH({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||JH}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=zt({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return H.createElement("div",{style:o.wrap},H.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?H.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(H.PureComponent||H.Component),r4=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(o.getBoundingClientRect().left+window.pageXOffset),m=u-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var b=void 0;if(m<0)b=359;else if(m>a)b=0;else{var C=-(m*100/a)+100;b=360*C/100}if(r.h!==b)return{h:b,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var _=void 0;if(p<0)_=0;else if(p>i)_=359;else{var y=p*100/i;_=360*y/100}if(r.h!==_)return{h:_,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},o4=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function a4(e,t){if(typeof t!="function"&&t!==null)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)}var fc=function(e){a4(t,e);function t(){var n,r,o,i;i4(this,t);for(var a=arguments.length,l=Array(a),u=0;u<a;u++)l[u]=arguments[u];return i=(r=(o=p0(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.handleChange=function(p){var m=r4(p,o.props.direction,o.props.hsl,o.container);m&&typeof o.props.onChange=="function"&&o.props.onChange(m,p)},o.handleMouseDown=function(p){o.handleChange(p),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},r),p0(o,i)}return o4(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.direction,i=o===void 0?"horizontal":o,a=zt({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return H.createElement("div",{style:a.hue},H.createElement("div",{className:"hue-"+i,style:a.container,ref:function(u){return r.container=u},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
161
|
-
.hue-horizontal {
|
|
162
|
-
background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0
|
|
163
|
-
33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
164
|
-
background: -webkit-linear-gradient(to right, #f00 0%, #ff0
|
|
165
|
-
17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.hue-vertical {
|
|
169
|
-
background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,
|
|
170
|
-
#0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
171
|
-
background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,
|
|
172
|
-
#0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
|
|
173
|
-
}
|
|
174
|
-
`),H.createElement("div",{style:a.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:a.slider}))))}}]),t}(H.PureComponent||H.Component),og={exports:{}},Id={exports:{}},un={};/** @license React v16.13.1
|
|
175
|
-
* react-is.production.min.js
|
|
176
|
-
*
|
|
177
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the MIT license found in the
|
|
180
|
-
* LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/var g0;function s4(){if(g0)return un;g0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(M){if(typeof M=="object"&&M!==null){var Y=M.$$typeof;switch(Y){case t:switch(M=M.type,M){case u:case p:case r:case i:case o:case b:return M;default:switch(M=M&&M.$$typeof,M){case l:case m:case y:case _:case a:return M;default:return Y}}case n:return Y}}}function P(M){return k(M)===p}return un.AsyncMode=u,un.ConcurrentMode=p,un.ContextConsumer=l,un.ContextProvider=a,un.Element=t,un.ForwardRef=m,un.Fragment=r,un.Lazy=y,un.Memo=_,un.Portal=n,un.Profiler=i,un.StrictMode=o,un.Suspense=b,un.isAsyncMode=function(M){return P(M)||k(M)===u},un.isConcurrentMode=P,un.isContextConsumer=function(M){return k(M)===l},un.isContextProvider=function(M){return k(M)===a},un.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},un.isForwardRef=function(M){return k(M)===m},un.isFragment=function(M){return k(M)===r},un.isLazy=function(M){return k(M)===y},un.isMemo=function(M){return k(M)===_},un.isPortal=function(M){return k(M)===n},un.isProfiler=function(M){return k(M)===i},un.isStrictMode=function(M){return k(M)===o},un.isSuspense=function(M){return k(M)===b},un.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===p||M===i||M===o||M===b||M===C||typeof M=="object"&&M!==null&&(M.$$typeof===y||M.$$typeof===_||M.$$typeof===a||M.$$typeof===l||M.$$typeof===m||M.$$typeof===T||M.$$typeof===O||M.$$typeof===R||M.$$typeof===v)},un.typeOf=k,un}var dn={};/** @license React v16.13.1
|
|
182
|
-
* react-is.development.js
|
|
183
|
-
*
|
|
184
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the MIT license found in the
|
|
187
|
-
* LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/var m0;function l4(){return m0||(m0=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,b=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,_=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function k(Oe){return typeof Oe=="string"||typeof Oe=="function"||Oe===r||Oe===p||Oe===i||Oe===o||Oe===b||Oe===C||typeof Oe=="object"&&Oe!==null&&(Oe.$$typeof===y||Oe.$$typeof===_||Oe.$$typeof===a||Oe.$$typeof===l||Oe.$$typeof===m||Oe.$$typeof===T||Oe.$$typeof===O||Oe.$$typeof===R||Oe.$$typeof===v)}function P(Oe){if(typeof Oe=="object"&&Oe!==null){var Be=Oe.$$typeof;switch(Be){case t:var ce=Oe.type;switch(ce){case u:case p:case r:case i:case o:case b:return ce;default:var le=ce&&ce.$$typeof;switch(le){case l:case m:case y:case _:case a:return le;default:return Be}}case n:return Be}}}var M=u,Y=p,X=l,oe=a,Z=t,U=m,Q=r,de=y,pe=_,te=n,fe=i,V=o,j=b,ee=!1;function re(Oe){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Oe)||P(Oe)===u}function B(Oe){return P(Oe)===p}function W(Oe){return P(Oe)===l}function J(Oe){return P(Oe)===a}function F(Oe){return typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===t}function w(Oe){return P(Oe)===m}function N(Oe){return P(Oe)===r}function I(Oe){return P(Oe)===y}function q(Oe){return P(Oe)===_}function ue(Oe){return P(Oe)===n}function he(Oe){return P(Oe)===i}function se(Oe){return P(Oe)===o}function Ce(Oe){return P(Oe)===b}dn.AsyncMode=M,dn.ConcurrentMode=Y,dn.ContextConsumer=X,dn.ContextProvider=oe,dn.Element=Z,dn.ForwardRef=U,dn.Fragment=Q,dn.Lazy=de,dn.Memo=pe,dn.Portal=te,dn.Profiler=fe,dn.StrictMode=V,dn.Suspense=j,dn.isAsyncMode=re,dn.isConcurrentMode=B,dn.isContextConsumer=W,dn.isContextProvider=J,dn.isElement=F,dn.isForwardRef=w,dn.isFragment=N,dn.isLazy=I,dn.isMemo=q,dn.isPortal=ue,dn.isProfiler=he,dn.isStrictMode=se,dn.isSuspense=Ce,dn.isValidElementType=k,dn.typeOf=P}()),dn}var y0;function mT(){return y0||(y0=1,process.env.NODE_ENV==="production"?Id.exports=s4():Id.exports=l4()),Id.exports}/*
|
|
189
|
-
object-assign
|
|
190
|
-
(c) Sindre Sorhus
|
|
191
|
-
@license MIT
|
|
192
|
-
*/var Zh,v0;function c4(){if(v0)return Zh;v0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var u=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(u.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Zh=o()?Object.assign:function(i,a){for(var l,u=r(i),p,m=1;m<arguments.length;m++){l=Object(arguments[m]);for(var b in l)t.call(l,b)&&(u[b]=l[b]);if(e){p=e(l);for(var C=0;C<p.length;C++)n.call(l,p[C])&&(u[p[C]]=l[p[C]])}}return u},Zh}var Jh,b0;function Nm(){if(b0)return Jh;b0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jh=e,Jh}var Xh,_0;function yT(){return _0||(_0=1,Xh=Function.call.bind(Object.prototype.hasOwnProperty)),Xh}var Qh,x0;function u4(){if(x0)return Qh;x0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Nm(),n={},r=yT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,l,u,p){if(process.env.NODE_ENV!=="production"){for(var m in i)if(r(i,m)){var b;try{if(typeof i[m]!="function"){var C=Error((u||"React class")+": "+l+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}b=i[m](a,m,u,l,null,t)}catch(y){b=y}if(b&&!(b instanceof Error)&&e((u||"React class")+": type specification of "+l+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in n)){n[b.message]=!0;var _=p?p():"";e("Failed "+l+" type: "+b.message+(_??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qh=o,Qh}var ep,E0;function d4(){if(E0)return ep;E0=1;var e=mT(),t=c4(),n=Nm(),r=yT(),o=u4(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var u="Warning: "+l;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function a(){return null}return ep=function(l,u){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(B){var W=B&&(p&&B[p]||B[m]);if(typeof W=="function")return W}var C="<<anonymous>>",_={array:O("array"),bigint:O("bigint"),bool:O("boolean"),func:O("function"),number:O("number"),object:O("object"),string:O("string"),symbol:O("symbol"),any:R(),arrayOf:k,element:P(),elementType:M(),instanceOf:Y,node:U(),objectOf:oe,oneOf:X,oneOfType:Z,shape:de,exact:pe};function y(B,W){return B===W?B!==0||1/B===1/W:B!==B&&W!==W}function v(B,W){this.message=B,this.data=W&&typeof W=="object"?W:{},this.stack=""}v.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var W={},J=0;function F(N,I,q,ue,he,se,Ce){if(ue=ue||C,se=se||q,Ce!==n){if(u){var Oe=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 Oe.name="Invariant Violation",Oe}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Be=ue+":"+q;!W[Be]&&J<3&&(i("You are manually calling a React.PropTypes validation function for the `"+se+"` prop on `"+ue+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[Be]=!0,J++)}}return I[q]==null?N?I[q]===null?new v("The "+he+" `"+se+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new v("The "+he+" `"+se+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:B(I,q,ue,he,se)}var w=F.bind(null,!1);return w.isRequired=F.bind(null,!0),w}function O(B){function W(J,F,w,N,I,q){var ue=J[F],he=V(ue);if(he!==B){var se=j(ue);return new v("Invalid "+N+" `"+I+"` of type "+("`"+se+"` supplied to `"+w+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(W)}function R(){return T(a)}function k(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var q=J[F];if(!Array.isArray(q)){var ue=V(q);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an array."))}for(var he=0;he<q.length;he++){var se=B(q,he,w,N,I+"["+he+"]",n);if(se instanceof Error)return se}return null}return T(W)}function P(){function B(W,J,F,w,N){var I=W[J];if(!l(I)){var q=V(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement."))}return null}return T(B)}function M(){function B(W,J,F,w,N){var I=W[J];if(!e.isValidElementType(I)){var q=V(I);return new v("Invalid "+w+" `"+N+"` of type "+("`"+q+"` supplied to `"+F+"`, expected a single ReactElement type."))}return null}return T(B)}function Y(B){function W(J,F,w,N,I){if(!(J[F]instanceof B)){var q=B.name||C,ue=re(J[F]);return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected ")+("instance of `"+q+"`."))}return null}return T(W)}function X(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function W(J,F,w,N,I){for(var q=J[F],ue=0;ue<B.length;ue++)if(y(q,B[ue]))return null;var he=JSON.stringify(B,function(Ce,Oe){var Be=j(Oe);return Be==="symbol"?String(Oe):Oe});return new v("Invalid "+N+" `"+I+"` of value `"+String(q)+"` "+("supplied to `"+w+"`, expected one of "+he+"."))}return T(W)}function oe(B){function W(J,F,w,N,I){if(typeof B!="function")return new v("Property `"+I+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type "+("`"+ue+"` supplied to `"+w+"`, expected an object."));for(var he in q)if(r(q,he)){var se=B(q,he,w,N,I+"."+he,n);if(se instanceof Error)return se}return null}return T(W)}function Z(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<B.length;W++){var J=B[W];if(typeof J!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(J)+" at index "+W+"."),a}function F(w,N,I,q,ue){for(var he=[],se=0;se<B.length;se++){var Ce=B[se],Oe=Ce(w,N,I,q,ue,n);if(Oe==null)return null;Oe.data&&r(Oe.data,"expectedType")&&he.push(Oe.data.expectedType)}var Be=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new v("Invalid "+q+" `"+ue+"` supplied to "+("`"+I+"`"+Be+"."))}return T(F)}function U(){function B(W,J,F,w,N){return te(W[J])?null:new v("Invalid "+w+" `"+N+"` supplied to "+("`"+F+"`, expected a ReactNode."))}return T(B)}function Q(B,W,J,F,w){return new v((B||"React class")+": "+W+" type `"+J+"."+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function de(B){function W(J,F,w,N,I){var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));for(var he in B){var se=B[he];if(typeof se!="function")return Q(w,N,I,he,j(se));var Ce=se(q,he,w,N,I+"."+he,n);if(Ce)return Ce}return null}return T(W)}function pe(B){function W(J,F,w,N,I){var q=J[F],ue=V(q);if(ue!=="object")return new v("Invalid "+N+" `"+I+"` of type `"+ue+"` "+("supplied to `"+w+"`, expected `object`."));var he=t({},J[F],B);for(var se in he){var Ce=B[se];if(r(B,se)&&typeof Ce!="function")return Q(w,N,I,se,j(Ce));if(!Ce)return new v("Invalid "+N+" `"+I+"` key `"+se+"` supplied to `"+w+"`.\nBad object: "+JSON.stringify(J[F],null," ")+`
|
|
193
|
-
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Oe=Ce(q,se,w,N,I+"."+se,n);if(Oe)return Oe}return null}return T(W)}function te(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(te);if(B===null||l(B))return!0;var W=b(B);if(W){var J=W.call(B),F;if(W!==B.entries){for(;!(F=J.next()).done;)if(!te(F.value))return!1}else for(;!(F=J.next()).done;){var w=F.value;if(w&&!te(w[1]))return!1}}else return!1;return!0;default:return!1}}function fe(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function V(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":fe(W,B)?"symbol":W}function j(B){if(typeof B>"u"||B===null)return""+B;var W=V(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function ee(B){var W=j(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function re(B){return!B.constructor||!B.constructor.name?C:B.constructor.name}return _.checkPropTypes=o,_.resetWarningCache=o.resetWarningCache,_.PropTypes=_,_},ep}var tp,C0;function f4(){if(C0)return tp;C0=1;var e=Nm();function t(){}function n(){}return n.resetWarningCache=t,tp=function(){function r(a,l,u,p,m,b){if(b!==e){var C=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 C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},tp}if(process.env.NODE_ENV!=="production"){var h4=mT(),p4=!0;og.exports=d4()(h4.isElement,p4)}else og.exports=f4()();var g4=og.exports;const ct=BO(g4);function m4(){this.__data__=[],this.size=0}function Uu(e,t){return e===t||e!==e&&t!==t}function Vf(e,t){for(var n=e.length;n--;)if(Uu(e[n][0],t))return n;return-1}var y4=Array.prototype,v4=y4.splice;function b4(e){var t=this.__data__,n=Vf(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():v4.call(t,n,1),--this.size,!0}function _4(e){var t=this.__data__,n=Vf(t,e);return n<0?void 0:t[n][1]}function x4(e){return Vf(this.__data__,e)>-1}function E4(e,t){var n=this.__data__,r=Vf(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function na(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}na.prototype.clear=m4;na.prototype.delete=b4;na.prototype.get=_4;na.prototype.has=x4;na.prototype.set=E4;function C4(){this.__data__=new na,this.size=0}function w4(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function T4(e){return this.__data__.get(e)}function N4(e){return this.__data__.has(e)}var vT=typeof global=="object"&&global&&global.Object===Object&&global,S4=typeof self=="object"&&self&&self.Object===Object&&self,Jo=vT||S4||Function("return this")(),ja=Jo.Symbol,bT=Object.prototype,O4=bT.hasOwnProperty,A4=bT.toString,cu=ja?ja.toStringTag:void 0;function R4(e){var t=O4.call(e,cu),n=e[cu];try{e[cu]=void 0;var r=!0}catch{}var o=A4.call(e);return r&&(t?e[cu]=n:delete e[cu]),o}var $4=Object.prototype,D4=$4.toString;function k4(e){return D4.call(e)}var M4="[object Null]",P4="[object Undefined]",w0=ja?ja.toStringTag:void 0;function As(e){return e==null?e===void 0?P4:M4:w0&&w0 in Object(e)?R4(e):k4(e)}function wo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var I4="[object AsyncFunction]",L4="[object Function]",F4="[object GeneratorFunction]",j4="[object Proxy]";function Sm(e){if(!wo(e))return!1;var t=As(e);return t==L4||t==F4||t==I4||t==j4}var np=Jo["__core-js_shared__"],T0=function(){var e=/[^.]+$/.exec(np&&np.keys&&np.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B4(e){return!!T0&&T0 in e}var W4=Function.prototype,z4=W4.toString;function Rs(e){if(e!=null){try{return z4.call(e)}catch{}try{return e+""}catch{}}return""}var H4=/[\\^$.*+?()[\]{}|]/g,G4=/^\[object .+?Constructor\]$/,K4=Function.prototype,U4=Object.prototype,V4=K4.toString,Y4=U4.hasOwnProperty,q4=RegExp("^"+V4.call(Y4).replace(H4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z4(e){if(!wo(e)||B4(e))return!1;var t=Sm(e)?q4:G4;return t.test(Rs(e))}function J4(e,t){return e==null?void 0:e[t]}function $s(e,t){var n=J4(e,t);return Z4(n)?n:void 0}var $u=$s(Jo,"Map"),Du=$s(Object,"create");function X4(){this.__data__=Du?Du(null):{},this.size=0}function Q4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var e6="__lodash_hash_undefined__",t6=Object.prototype,n6=t6.hasOwnProperty;function r6(e){var t=this.__data__;if(Du){var n=t[e];return n===e6?void 0:n}return n6.call(t,e)?t[e]:void 0}var o6=Object.prototype,i6=o6.hasOwnProperty;function a6(e){var t=this.__data__;return Du?t[e]!==void 0:i6.call(t,e)}var s6="__lodash_hash_undefined__";function l6(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Du&&t===void 0?s6:t,this}function Ts(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ts.prototype.clear=X4;Ts.prototype.delete=Q4;Ts.prototype.get=r6;Ts.prototype.has=a6;Ts.prototype.set=l6;function c6(){this.size=0,this.__data__={hash:new Ts,map:new($u||na),string:new Ts}}function u6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Yf(e,t){var n=e.__data__;return u6(t)?n[typeof t=="string"?"string":"hash"]:n.map}function d6(e){var t=Yf(this,e).delete(e);return this.size-=t?1:0,t}function f6(e){return Yf(this,e).get(e)}function h6(e){return Yf(this,e).has(e)}function p6(e,t){var n=Yf(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ra(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ra.prototype.clear=c6;ra.prototype.delete=d6;ra.prototype.get=f6;ra.prototype.has=h6;ra.prototype.set=p6;var g6=200;function m6(e,t){var n=this.__data__;if(n instanceof na){var r=n.__data__;if(!$u||r.length<g6-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ra(r)}return n.set(e,t),this.size=n.size,this}function xi(e){var t=this.__data__=new na(e);this.size=t.size}xi.prototype.clear=C4;xi.prototype.delete=w4;xi.prototype.get=T4;xi.prototype.has=N4;xi.prototype.set=m6;var vf=function(){try{var e=$s(Object,"defineProperty");return e({},"",{}),e}catch{}}();function Om(e,t,n){t=="__proto__"&&vf?vf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ig(e,t,n){(n!==void 0&&!Uu(e[t],n)||n===void 0&&!(t in e))&&Om(e,t,n)}function y6(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[++o];if(n(i[u],u,i)===!1)break}return t}}var _T=y6(),xT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N0=xT&&typeof module=="object"&&module&&!module.nodeType&&module,v6=N0&&N0.exports===xT,S0=v6?Jo.Buffer:void 0;S0&&S0.allocUnsafe;function b6(e,t){return e.slice()}var bf=Jo.Uint8Array;function _6(e){var t=new e.constructor(e.byteLength);return new bf(t).set(new bf(e)),t}function x6(e,t){var n=_6(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function E6(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var O0=Object.create,C6=function(){function e(){}return function(t){if(!wo(t))return{};if(O0)return O0(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ET(e,t){return function(n){return e(t(n))}}var CT=ET(Object.getPrototypeOf,Object),w6=Object.prototype;function Am(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||w6;return e===n}function T6(e){return typeof e.constructor=="function"&&!Am(e)?C6(CT(e)):{}}function Ba(e){return e!=null&&typeof e=="object"}var N6="[object Arguments]";function A0(e){return Ba(e)&&As(e)==N6}var wT=Object.prototype,S6=wT.hasOwnProperty,O6=wT.propertyIsEnumerable,_f=A0(function(){return arguments}())?A0:function(e){return Ba(e)&&S6.call(e,"callee")&&!O6.call(e,"callee")},fo=Array.isArray,A6=9007199254740991;function Rm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A6}function hc(e){return e!=null&&Rm(e.length)&&!Sm(e)}function R6(e){return Ba(e)&&hc(e)}function $6(){return!1}var TT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,R0=TT&&typeof module=="object"&&module&&!module.nodeType&&module,D6=R0&&R0.exports===TT,$0=D6?Jo.Buffer:void 0,k6=$0?$0.isBuffer:void 0,xf=k6||$6,M6="[object Object]",P6=Function.prototype,I6=Object.prototype,NT=P6.toString,L6=I6.hasOwnProperty,F6=NT.call(Object);function j6(e){if(!Ba(e)||As(e)!=M6)return!1;var t=CT(e);if(t===null)return!0;var n=L6.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&NT.call(n)==F6}var B6="[object Arguments]",W6="[object Array]",z6="[object Boolean]",H6="[object Date]",G6="[object Error]",K6="[object Function]",U6="[object Map]",V6="[object Number]",Y6="[object Object]",q6="[object RegExp]",Z6="[object Set]",J6="[object String]",X6="[object WeakMap]",Q6="[object ArrayBuffer]",eG="[object DataView]",tG="[object Float32Array]",nG="[object Float64Array]",rG="[object Int8Array]",oG="[object Int16Array]",iG="[object Int32Array]",aG="[object Uint8Array]",sG="[object Uint8ClampedArray]",lG="[object Uint16Array]",cG="[object Uint32Array]",Nn={};Nn[tG]=Nn[nG]=Nn[rG]=Nn[oG]=Nn[iG]=Nn[aG]=Nn[sG]=Nn[lG]=Nn[cG]=!0;Nn[B6]=Nn[W6]=Nn[Q6]=Nn[z6]=Nn[eG]=Nn[H6]=Nn[G6]=Nn[K6]=Nn[U6]=Nn[V6]=Nn[Y6]=Nn[q6]=Nn[Z6]=Nn[J6]=Nn[X6]=!1;function uG(e){return Ba(e)&&Rm(e.length)&&!!Nn[As(e)]}function dG(e){return function(t){return e(t)}}var ST=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tu=ST&&typeof module=="object"&&module&&!module.nodeType&&module,fG=Tu&&Tu.exports===ST,rp=fG&&vT.process,D0=function(){try{var e=Tu&&Tu.require&&Tu.require("util").types;return e||rp&&rp.binding&&rp.binding("util")}catch{}}(),k0=D0&&D0.isTypedArray,$m=k0?dG(k0):uG;function ag(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var hG=Object.prototype,pG=hG.hasOwnProperty;function gG(e,t,n){var r=e[t];(!(pG.call(e,t)&&Uu(r,n))||n===void 0&&!(t in e))&&Om(e,t,n)}function mG(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var l=t[i],u=void 0;u===void 0&&(u=e[l]),o?Om(n,l,u):gG(n,l,u)}return n}function yG(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vG=9007199254740991,bG=/^(?:0|[1-9]\d*)$/;function Dm(e,t){var n=typeof e;return t=t??vG,!!t&&(n=="number"||n!="symbol"&&bG.test(e))&&e>-1&&e%1==0&&e<t}var _G=Object.prototype,xG=_G.hasOwnProperty;function OT(e,t){var n=fo(e),r=!n&&_f(e),o=!n&&!r&&xf(e),i=!n&&!r&&!o&&$m(e),a=n||r||o||i,l=a?yG(e.length,String):[],u=l.length;for(var p in e)(t||xG.call(e,p))&&!(a&&(p=="length"||o&&(p=="offset"||p=="parent")||i&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Dm(p,u)))&&l.push(p);return l}function EG(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var CG=Object.prototype,wG=CG.hasOwnProperty;function TG(e){if(!wo(e))return EG(e);var t=Am(e),n=[];for(var r in e)r=="constructor"&&(t||!wG.call(e,r))||n.push(r);return n}function AT(e){return hc(e)?OT(e,!0):TG(e)}function NG(e){return mG(e,AT(e))}function SG(e,t,n,r,o,i,a){var l=ag(e,n),u=ag(t,n),p=a.get(u);if(p){ig(e,n,p);return}var m=i?i(l,u,n+"",e,t,a):void 0,b=m===void 0;if(b){var C=fo(u),_=!C&&xf(u),y=!C&&!_&&$m(u);m=u,C||_||y?fo(l)?m=l:R6(l)?m=E6(l):_?(b=!1,m=b6(u)):y?(b=!1,m=x6(u)):m=[]:j6(u)||_f(u)?(m=l,_f(l)?m=NG(l):(!wo(l)||Sm(l))&&(m=T6(u))):b=!1}b&&(a.set(u,m),o(m,u,r,i,a),a.delete(u)),ig(e,n,m)}function RT(e,t,n,r,o){e!==t&&_T(t,function(i,a){if(o||(o=new xi),wo(i))SG(e,t,a,n,RT,r,o);else{var l=r?r(ag(e,a),i,a+"",e,t,o):void 0;l===void 0&&(l=i),ig(e,a,l)}},AT)}function qf(e){return e}function OG(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var M0=Math.max;function AG(e,t,n){return t=M0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=M0(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(a),OG(e,this,l)}}function RG(e){return function(){return e}}var $G=vf?function(e,t){return vf(e,"toString",{configurable:!0,enumerable:!1,value:RG(t),writable:!0})}:qf,DG=800,kG=16,MG=Date.now;function PG(e){var t=0,n=0;return function(){var r=MG(),o=kG-(r-n);if(n=r,o>0){if(++t>=DG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var IG=PG($G);function LG(e,t){return IG(AG(e,t,qf),e+"")}function FG(e,t,n){if(!wo(n))return!1;var r=typeof t;return(r=="number"?hc(n)&&Dm(t,n.length):r=="string"&&t in n)?Uu(n[t],e):!1}function jG(e){return LG(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&FG(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t})}var Yr=jG(function(e,t,n){RT(e,t,n)}),Vu=function(t){var n=t.zDepth,r=t.radius,o=t.background,i=t.children,a=t.styles,l=a===void 0?{}:a,u=zt(Yr({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+n+"px "+n*4+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},l),{"zDepth-1":n===1});return H.createElement("div",{style:u.wrap},H.createElement("div",{style:u.bg}),H.createElement("div",{style:u.content},i))};Vu.propTypes={background:ct.string,zDepth:ct.oneOf([0,1,2,3,4,5]),radius:ct.number,styles:ct.object};Vu.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var op=function(){return Jo.Date.now()},BG=/\s/;function WG(e){for(var t=e.length;t--&&BG.test(e.charAt(t)););return t}var zG=/^\s+/;function HG(e){return e&&e.slice(0,WG(e)+1).replace(zG,"")}var GG="[object Symbol]";function Zf(e){return typeof e=="symbol"||Ba(e)&&As(e)==GG}var P0=NaN,KG=/^[-+]0x[0-9a-f]+$/i,UG=/^0b[01]+$/i,VG=/^0o[0-7]+$/i,YG=parseInt;function I0(e){if(typeof e=="number")return e;if(Zf(e))return P0;if(wo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=HG(e);var n=UG.test(e);return n||VG.test(e)?YG(e.slice(2),n?2:8):KG.test(e)?P0:+e}var qG="Expected a function",ZG=Math.max,JG=Math.min;function $T(e,t,n){var r,o,i,a,l,u,p=0,m=!1,b=!1,C=!0;if(typeof e!="function")throw new TypeError(qG);t=I0(t)||0,wo(n)&&(m=!!n.leading,b="maxWait"in n,i=b?ZG(I0(n.maxWait)||0,t):i,C="trailing"in n?!!n.trailing:C);function _(Y){var X=r,oe=o;return r=o=void 0,p=Y,a=e.apply(oe,X),a}function y(Y){return p=Y,l=setTimeout(O,t),m?_(Y):a}function v(Y){var X=Y-u,oe=Y-p,Z=t-X;return b?JG(Z,i-oe):Z}function T(Y){var X=Y-u,oe=Y-p;return u===void 0||X>=t||X<0||b&&oe>=i}function O(){var Y=op();if(T(Y))return R(Y);l=setTimeout(O,v(Y))}function R(Y){return l=void 0,C&&r?_(Y):(r=o=void 0,a)}function k(){l!==void 0&&clearTimeout(l),p=0,r=u=o=l=void 0}function P(){return l===void 0?a:R(op())}function M(){var Y=op(),X=T(Y);if(r=arguments,o=this,u=Y,X){if(l===void 0)return y(u);if(b)return clearTimeout(l),l=setTimeout(O,t),_(u)}return l===void 0&&(l=setTimeout(O,t)),a}return M.cancel=k,M.flush=P,M}var XG="Expected a function";function QG(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(XG);return wo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),$T(e,t,{leading:r,maxWait:t,trailing:o})}var e8=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,u=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,p=l-(r.getBoundingClientRect().left+window.pageXOffset),m=u-(r.getBoundingClientRect().top+window.pageYOffset);p<0?p=0:p>i&&(p=i),m<0?m=0:m>a&&(m=a);var b=p/i,C=1-m/a;return{h:n.h,s:b,v:C,a:n.a,source:"hsv"}},t8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function n8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function o8(e,t){if(typeof t!="function"&&t!==null)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)}var Jf=function(e){o8(t,e);function t(n){n8(this,t);var r=r8(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.handleChange=function(o){typeof r.props.onChange=="function"&&r.throttle(r.props.onChange,e8(o,r.props.hsl,r.container),o)},r.handleMouseDown=function(o){r.handleChange(o);var i=r.getContainerRenderWindow();i.addEventListener("mousemove",r.handleChange),i.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=QG(function(o,i,a){o(i,a)},50),r}return t8(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var r=this.container,o=window;!o.document.contains(r)&&o.parent!==o;)o=o.parent;return o}},{key:"unbindEventListeners",value:function(){var r=this.getContainerRenderWindow();r.removeEventListener("mousemove",this.handleChange),r.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,o=this.props.style||{},i=o.color,a=o.white,l=o.black,u=o.pointer,p=o.circle,m=zt({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(this.props.hsv.v*100)+100+"%",left:this.props.hsv.s*100+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:`0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),
|
|
194
|
-
0 0 1px 2px rgba(0,0,0,.4)`,borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:i,white:a,black:l,pointer:u,circle:p}},{custom:!!this.props.style});return H.createElement("div",{style:m.color,ref:function(C){return r.container=C},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},H.createElement("style",null,`
|
|
195
|
-
.saturation-white {
|
|
196
|
-
background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
197
|
-
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
|
198
|
-
}
|
|
199
|
-
.saturation-black {
|
|
200
|
-
background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
201
|
-
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
|
202
|
-
}
|
|
203
|
-
`),H.createElement("div",{style:m.white,className:"saturation-white"},H.createElement("div",{style:m.black,className:"saturation-black"}),H.createElement("div",{style:m.pointer},this.props.pointer?H.createElement(this.props.pointer,this.props):H.createElement("div",{style:m.circle}))))}}]),t}(H.PureComponent||H.Component);function i8(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var a8=ET(Object.keys,Object),s8=Object.prototype,l8=s8.hasOwnProperty;function c8(e){if(!Am(e))return a8(e);var t=[];for(var n in Object(e))l8.call(e,n)&&n!="constructor"&&t.push(n);return t}function km(e){return hc(e)?OT(e):c8(e)}function u8(e,t){return e&&_T(e,t,km)}function d8(e,t){return function(n,r){if(n==null)return n;if(!hc(n))return e(n,r);for(var o=n.length,i=-1,a=Object(n);++i<o&&r(a[i],i,a)!==!1;);return n}}var DT=d8(u8);function f8(e){return typeof e=="function"?e:qf}function h8(e,t){var n=fo(e)?i8:DT;return n(e,f8(t))}function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}var p8=/^\s+/,g8=/\s+$/;function Ot(e,t){if(e=e||"",t=t||{},e instanceof Ot)return e;if(!(this instanceof Ot))return new Ot(e,t);var n=m8(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Ot.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,i,a,l;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?i=n/12.92:i=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?l=o/12.92:l=Math.pow((o+.055)/1.055,2.4),.2126*i+.7152*a+.0722*l},setAlpha:function(t){return this._a=kT(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=F0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=F0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=L0(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=L0(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return j0(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return _8(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round($n(this._r,255)*100)+"%",g:Math.round($n(this._g,255)*100)+"%",b:Math.round($n(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round($n(this._r,255)*100)+"%, "+Math.round($n(this._g,255)*100)+"%, "+Math.round($n(this._b,255)*100)+"%)":"rgba("+Math.round($n(this._r,255)*100)+"%, "+Math.round($n(this._g,255)*100)+"%, "+Math.round($n(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:D8[j0(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+B0(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var i=Ot(t);r="#"+B0(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,i=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return i?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Ot(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w8,arguments)},brighten:function(){return this._applyModification(T8,arguments)},darken:function(){return this._applyModification(N8,arguments)},desaturate:function(){return this._applyModification(x8,arguments)},saturate:function(){return this._applyModification(E8,arguments)},greyscale:function(){return this._applyModification(C8,arguments)},spin:function(){return this._applyModification(S8,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(R8,arguments)},complement:function(){return this._applyCombination(O8,arguments)},monochromatic:function(){return this._applyCombination($8,arguments)},splitcomplement:function(){return this._applyCombination(A8,arguments)},triad:function(){return this._applyCombination(W0,[3])},tetrad:function(){return this._applyCombination(W0,[4])}};Ot.fromRatio=function(e,t){if(Ef(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=xu(e[r]));e=n}return Ot(e,t)};function m8(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,l=!1;return typeof e=="string"&&(e=I8(e)),Ef(e)=="object"&&(Gi(e.r)&&Gi(e.g)&&Gi(e.b)?(t=y8(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Gi(e.h)&&Gi(e.s)&&Gi(e.v)?(r=xu(e.s),o=xu(e.v),t=b8(e.h,r,o),a=!0,l="hsv"):Gi(e.h)&&Gi(e.s)&&Gi(e.l)&&(r=xu(e.s),i=xu(e.l),t=v8(e.h,r,i),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=kT(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function y8(e,t,n){return{r:$n(e,255)*255,g:$n(t,255)*255,b:$n(n,255)*255}}function L0(e,t,n){e=$n(e,255),t=$n(t,255),n=$n(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=(r+o)/2;if(r==o)i=a=0;else{var u=r-o;switch(a=l>.5?u/(2-r-o):u/(r+o),r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,l}}function v8(e,t,n){var r,o,i;e=$n(e,360),t=$n(t,100),n=$n(n,100);function a(p,m,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?p+(m-p)*6*b:b<1/2?m:b<2/3?p+(m-p)*(2/3-b)*6:p}if(t===0)r=o=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;r=a(u,l,e+1/3),o=a(u,l,e),i=a(u,l,e-1/3)}return{r:r*255,g:o*255,b:i*255}}function F0(e,t,n){e=$n(e,255),t=$n(t,255),n=$n(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i,a,l=r,u=r-o;if(a=r===0?0:u/r,r==o)i=0;else{switch(r){case e:i=(t-n)/u+(t<n?6:0);break;case t:i=(n-e)/u+2;break;case n:i=(e-t)/u+4;break}i/=6}return{h:i,s:a,v:l}}function b8(e,t,n){e=$n(e,360)*6,t=$n(t,100),n=$n(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),l=n*(1-(1-o)*t),u=r%6,p=[n,a,i,i,l,n][u],m=[l,n,n,a,i,i][u],b=[i,i,l,n,n,a][u];return{r:p*255,g:m*255,b:b*255}}function j0(e,t,n,r){var o=[Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function _8(e,t,n,r,o){var i=[Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16)),Ho(MT(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function B0(e,t,n,r){var o=[Ho(MT(r)),Ho(Math.round(e).toString(16)),Ho(Math.round(t).toString(16)),Ho(Math.round(n).toString(16))];return o.join("")}Ot.equals=function(e,t){return!e||!t?!1:Ot(e).toRgbString()==Ot(t).toRgbString()};Ot.random=function(){return Ot.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function x8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s-=t/100,n.s=Xf(n.s),Ot(n)}function E8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.s+=t/100,n.s=Xf(n.s),Ot(n)}function C8(e){return Ot(e).desaturate(100)}function w8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l+=t/100,n.l=Xf(n.l),Ot(n)}function T8(e,t){t=t===0?0:t||10;var n=Ot(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),Ot(n)}function N8(e,t){t=t===0?0:t||10;var n=Ot(e).toHsl();return n.l-=t/100,n.l=Xf(n.l),Ot(n)}function S8(e,t){var n=Ot(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Ot(n)}function O8(e){var t=Ot(e).toHsl();return t.h=(t.h+180)%360,Ot(t)}function W0(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Ot(e).toHsl(),r=[Ot(e)],o=360/t,i=1;i<t;i++)r.push(Ot({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function A8(e){var t=Ot(e).toHsl(),n=t.h;return[Ot(e),Ot({h:(n+72)%360,s:t.s,l:t.l}),Ot({h:(n+216)%360,s:t.s,l:t.l})]}function R8(e,t,n){t=t||6,n=n||30;var r=Ot(e).toHsl(),o=360/n,i=[Ot(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(Ot(r));return i}function $8(e,t){t=t||6;for(var n=Ot(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(Ot({h:r,s:o,v:i})),i=(i+l)%1;return a}Ot.mix=function(e,t,n){n=n===0?0:n||50;var r=Ot(e).toRgb(),o=Ot(t).toRgb(),i=n/100,a={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return Ot(a)};Ot.readability=function(e,t){var n=Ot(e),r=Ot(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};Ot.isReadable=function(e,t,n){var r=Ot.readability(e,t),o,i;switch(i=!1,o=L8(n),o.level+o.size){case"AAsmall":case"AAAlarge":i=r>=4.5;break;case"AAlarge":i=r>=3;break;case"AAAsmall":i=r>=7;break}return i};Ot.mostReadable=function(e,t,n){var r=null,o=0,i,a,l,u;n=n||{},a=n.includeFallbackColors,l=n.level,u=n.size;for(var p=0;p<t.length;p++)i=Ot.readability(e,t[p]),i>o&&(o=i,r=Ot(t[p]));return Ot.isReadable(e,r,{level:l,size:u})||!a?r:(n.includeFallbackColors=!1,Ot.mostReadable(e,["#fff","#000"],n))};var sg=Ot.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D8=Ot.hexNames=k8(sg);function k8(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function kT(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $n(e,t){M8(e)&&(e="100%");var n=P8(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Xf(e){return Math.min(1,Math.max(0,e))}function oo(e){return parseInt(e,16)}function M8(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function P8(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ho(e){return e.length==1?"0"+e:""+e}function xu(e){return e<=1&&(e=e*100+"%"),e}function MT(e){return Math.round(parseFloat(e)*255).toString(16)}function z0(e){return oo(e)/255}var Wo=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Gi(e){return!!Wo.CSS_UNIT.exec(e)}function I8(e){e=e.replace(p8,"").replace(g8,"").toLowerCase();var t=!1;if(sg[e])e=sg[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Wo.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Wo.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Wo.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Wo.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Wo.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Wo.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Wo.hex8.exec(e))?{r:oo(n[1]),g:oo(n[2]),b:oo(n[3]),a:z0(n[4]),format:t?"name":"hex8"}:(n=Wo.hex6.exec(e))?{r:oo(n[1]),g:oo(n[2]),b:oo(n[3]),format:t?"name":"hex"}:(n=Wo.hex4.exec(e))?{r:oo(n[1]+""+n[1]),g:oo(n[2]+""+n[2]),b:oo(n[3]+""+n[3]),a:z0(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Wo.hex3.exec(e))?{r:oo(n[1]+""+n[1]),g:oo(n[2]+""+n[2]),b:oo(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function L8(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var H0=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return h8(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},Eu=function(t,n){var r=t.hex?Ot(t.hex):Ot(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var u=l==="000000"&&a.a===0;return{hsl:o,hex:u?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},Wa=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Ot(t).isValid()},Mm=function(t){if(!t)return"#fff";var n=Eu(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},ip=function(t,n){var r=t.replace("°","");return Ot(n+" ("+r+")")._ok},uu=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},F8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function j8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B8(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function W8(e,t){if(typeof t!="function"&&t!==null)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)}var qr=function(t){var n=function(r){W8(o,r);function o(i){j8(this,o);var a=B8(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return a.handleChange=function(l,u){var p=H0(l);if(p){var m=Eu(l,l.h||a.state.oldHue);a.setState(m),a.props.onChangeComplete&&a.debounce(a.props.onChangeComplete,m,u),a.props.onChange&&a.props.onChange(m,u)}},a.handleSwatchHover=function(l,u){var p=H0(l);if(p){var m=Eu(l,l.h||a.state.oldHue);a.props.onSwatchHover&&a.props.onSwatchHover(m,u)}},a.state=uu({},Eu(i.color,0)),a.debounce=$T(function(l,u,p){l(u,p)},100),a}return F8(o,[{key:"render",value:function(){var a={};return this.props.onSwatchHover&&(a.onSwatchHover=this.handleSwatchHover),H.createElement(t,uu({},this.props,this.state,{onChange:this.handleChange},a))}}],[{key:"getDerivedStateFromProps",value:function(a,l){return uu({},Eu(a.color,l.oldHue))}}]),o}(H.PureComponent||H.Component);return n.propTypes=uu({},t.propTypes),n.defaultProps=uu({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),n},z8=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},H8=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function G8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G0(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function K8(e,t){if(typeof t!="function"&&t!==null)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)}var U8=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){K8(o,r);function o(){var i,a,l,u;G8(this,o);for(var p=arguments.length,m=Array(p),b=0;b<p;b++)m[b]=arguments[b];return u=(a=(l=G0(this,(i=o.__proto__||Object.getPrototypeOf(o)).call.apply(i,[this].concat(m))),l),l.state={focus:!1},l.handleFocus=function(){return l.setState({focus:!0})},l.handleBlur=function(){return l.setState({focus:!1})},a),G0(l,u)}return H8(o,[{key:"render",value:function(){return H.createElement(n,{onFocus:this.handleFocus,onBlur:this.handleBlur},H.createElement(t,z8({},this.props,this.state)))}}]),o}(H.Component)},K0=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},V8=13,Y8=function(t){var n=t.color,r=t.style,o=t.onClick,i=o===void 0?function(){}:o,a=t.onHover,l=t.title,u=l===void 0?n:l,p=t.children,m=t.focus,b=t.focusStyle,C=b===void 0?{}:b,_=n==="transparent",y=zt({default:{swatch:K0({background:n,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,m?C:{})}}),v=function(P){return i(n,P)},T=function(P){return P.keyCode===V8&&i(n,P)},O=function(P){return a(n,P)},R={};return a&&(R.onMouseOver=O),H.createElement("div",K0({style:y.swatch,onClick:v,title:u,tabIndex:0,onKeyDown:T},R),p,_&&H.createElement(dc,{borderRadius:y.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};const Ds=U8(Y8);var q8=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},Z8=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},PT=function(t){var n=t.rgb,r=t.hsl,o=t.width,i=t.height,a=t.onChange,l=t.direction,u=t.style,p=t.renderers,m=t.pointer,b=t.className,C=b===void 0?"":b,_=zt({default:{picker:{position:"relative",width:o,height:i},alpha:{radius:"2px",style:u}}});return H.createElement("div",{style:_.picker,className:"alpha-picker "+C},H.createElement(Tm,Z8({},_.alpha,{rgb:n,hsl:r,pointer:m,renderers:p,onChange:a,direction:l})))};PT.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:q8};qr(PT);function IT(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var J8="__lodash_hash_undefined__";function X8(e){return this.__data__.set(e,J8),this}function Q8(e){return this.__data__.has(e)}function Cf(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ra;++t<n;)this.add(e[t])}Cf.prototype.add=Cf.prototype.push=X8;Cf.prototype.has=Q8;function eK(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function tK(e,t){return e.has(t)}var nK=1,rK=2;function LT(e,t,n,r,o,i){var a=n&nK,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var b=-1,C=!0,_=n&rK?new Cf:void 0;for(i.set(e,t),i.set(t,e);++b<l;){var y=e[b],v=t[b];if(r)var T=a?r(v,y,b,t,e,i):r(y,v,b,e,t,i);if(T!==void 0){if(T)continue;C=!1;break}if(_){if(!eK(t,function(O,R){if(!tK(_,R)&&(y===O||o(y,O,n,r,i)))return _.push(R)})){C=!1;break}}else if(!(y===v||o(y,v,n,r,i))){C=!1;break}}return i.delete(e),i.delete(t),C}function oK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function iK(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var aK=1,sK=2,lK="[object Boolean]",cK="[object Date]",uK="[object Error]",dK="[object Map]",fK="[object Number]",hK="[object RegExp]",pK="[object Set]",gK="[object String]",mK="[object Symbol]",yK="[object ArrayBuffer]",vK="[object DataView]",U0=ja?ja.prototype:void 0,ap=U0?U0.valueOf:void 0;function bK(e,t,n,r,o,i,a){switch(n){case vK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case yK:return!(e.byteLength!=t.byteLength||!i(new bf(e),new bf(t)));case lK:case cK:case fK:return Uu(+e,+t);case uK:return e.name==t.name&&e.message==t.message;case hK:case gK:return e==t+"";case dK:var l=oK;case pK:var u=r&aK;if(l||(l=iK),e.size!=t.size&&!u)return!1;var p=a.get(e);if(p)return p==t;r|=sK,a.set(e,t);var m=LT(l(e),l(t),r,o,i,a);return a.delete(e),m;case mK:if(ap)return ap.call(e)==ap.call(t)}return!1}function _K(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function xK(e,t,n){var r=t(e);return fo(e)?r:_K(r,n(e))}function EK(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function CK(){return[]}var wK=Object.prototype,TK=wK.propertyIsEnumerable,V0=Object.getOwnPropertySymbols,NK=V0?function(e){return e==null?[]:(e=Object(e),EK(V0(e),function(t){return TK.call(e,t)}))}:CK;function Y0(e){return xK(e,km,NK)}var SK=1,OK=Object.prototype,AK=OK.hasOwnProperty;function RK(e,t,n,r,o,i){var a=n&SK,l=Y0(e),u=l.length,p=Y0(t),m=p.length;if(u!=m&&!a)return!1;for(var b=u;b--;){var C=l[b];if(!(a?C in t:AK.call(t,C)))return!1}var _=i.get(e),y=i.get(t);if(_&&y)return _==t&&y==e;var v=!0;i.set(e,t),i.set(t,e);for(var T=a;++b<u;){C=l[b];var O=e[C],R=t[C];if(r)var k=a?r(R,O,C,t,e,i):r(O,R,C,e,t,i);if(!(k===void 0?O===R||o(O,R,n,r,i):k)){v=!1;break}T||(T=C=="constructor")}if(v&&!T){var P=e.constructor,M=t.constructor;P!=M&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(v=!1)}return i.delete(e),i.delete(t),v}var lg=$s(Jo,"DataView"),cg=$s(Jo,"Promise"),ug=$s(Jo,"Set"),dg=$s(Jo,"WeakMap"),q0="[object Map]",$K="[object Object]",Z0="[object Promise]",J0="[object Set]",X0="[object WeakMap]",Q0="[object DataView]",DK=Rs(lg),kK=Rs($u),MK=Rs(cg),PK=Rs(ug),IK=Rs(dg),$a=As;(lg&&$a(new lg(new ArrayBuffer(1)))!=Q0||$u&&$a(new $u)!=q0||cg&&$a(cg.resolve())!=Z0||ug&&$a(new ug)!=J0||dg&&$a(new dg)!=X0)&&($a=function(e){var t=As(e),n=t==$K?e.constructor:void 0,r=n?Rs(n):"";if(r)switch(r){case DK:return Q0;case kK:return q0;case MK:return Z0;case PK:return J0;case IK:return X0}return t});var LK=1,eb="[object Arguments]",tb="[object Array]",Ld="[object Object]",FK=Object.prototype,nb=FK.hasOwnProperty;function jK(e,t,n,r,o,i){var a=fo(e),l=fo(t),u=a?tb:$a(e),p=l?tb:$a(t);u=u==eb?Ld:u,p=p==eb?Ld:p;var m=u==Ld,b=p==Ld,C=u==p;if(C&&xf(e)){if(!xf(t))return!1;a=!0,m=!1}if(C&&!m)return i||(i=new xi),a||$m(e)?LT(e,t,n,r,o,i):bK(e,t,u,n,r,o,i);if(!(n&LK)){var _=m&&nb.call(e,"__wrapped__"),y=b&&nb.call(t,"__wrapped__");if(_||y){var v=_?e.value():e,T=y?t.value():t;return i||(i=new xi),o(v,T,n,r,i)}}return C?(i||(i=new xi),RK(e,t,n,r,o,i)):!1}function Pm(e,t,n,r,o){return e===t?!0:e==null||t==null||!Ba(e)&&!Ba(t)?e!==e&&t!==t:jK(e,t,n,r,Pm,o)}var BK=1,WK=2;function zK(e,t,n,r){var o=n.length,i=o;if(e==null)return!i;for(e=Object(e);o--;){var a=n[o];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){a=n[o];var l=a[0],u=e[l],p=a[1];if(a[2]){if(u===void 0&&!(l in e))return!1}else{var m=new xi,b;if(!(b===void 0?Pm(p,u,BK|WK,r,m):b))return!1}}return!0}function FT(e){return e===e&&!wo(e)}function HK(e){for(var t=km(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,FT(o)]}return t}function jT(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function GK(e){var t=HK(e);return t.length==1&&t[0][2]?jT(t[0][0],t[0][1]):function(n){return n===e||zK(n,e,t)}}var KK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UK=/^\w*$/;function Im(e,t){if(fo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Zf(e)?!0:UK.test(e)||!KK.test(e)||t!=null&&e in Object(t)}var VK="Expected a function";function Lm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VK);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Lm.Cache||ra),n}Lm.Cache=ra;var YK=500;function qK(e){var t=Lm(e,function(r){return n.size===YK&&n.clear(),r}),n=t.cache;return t}var ZK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JK=/\\(\\)?/g,XK=qK(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZK,function(n,r,o,i){t.push(o?i.replace(JK,"$1"):r||n)}),t}),QK=1/0,rb=ja?ja.prototype:void 0,ob=rb?rb.toString:void 0;function BT(e){if(typeof e=="string")return e;if(fo(e))return IT(e,BT)+"";if(Zf(e))return ob?ob.call(e):"";var t=e+"";return t=="0"&&1/e==-QK?"-0":t}function eU(e){return e==null?"":BT(e)}function WT(e,t){return fo(e)?e:Im(e,t)?[e]:XK(eU(e))}var tU=1/0;function Qf(e){if(typeof e=="string"||Zf(e))return e;var t=e+"";return t=="0"&&1/e==-tU?"-0":t}function zT(e,t){t=WT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Qf(t[n++])];return n&&n==r?e:void 0}function nU(e,t,n){var r=e==null?void 0:zT(e,t);return r===void 0?n:r}function rU(e,t){return e!=null&&t in Object(e)}function oU(e,t,n){t=WT(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=Qf(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&Rm(o)&&Dm(a,o)&&(fo(e)||_f(e)))}function iU(e,t){return e!=null&&oU(e,t,rU)}var aU=1,sU=2;function lU(e,t){return Im(e)&&FT(t)?jT(Qf(e),t):function(n){var r=nU(n,e);return r===void 0&&r===t?iU(n,e):Pm(t,r,aU|sU)}}function cU(e){return function(t){return t==null?void 0:t[e]}}function uU(e){return function(t){return zT(t,e)}}function dU(e){return Im(e)?cU(Qf(e)):uU(e)}function fU(e){return typeof e=="function"?e:e==null?qf:typeof e=="object"?fo(e)?lU(e[0],e[1]):GK(e):dU(e)}function hU(e,t){var n=-1,r=hc(e)?Array(e.length):[];return DT(e,function(o,i,a){r[++n]=t(o,i,a)}),r}function ks(e,t){var n=fo(e)?IT:hU;return n(e,fU(t))}var pU=function(t){var n=t.colors,r=t.onClick,o=t.onSwatchHover,i=zt({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return H.createElement("div",{style:i.swatches},ks(n,function(a){return H.createElement(Ds,{key:a,color:a,style:i.swatch,onClick:r,onHover:o,focusStyle:{boxShadow:"0 0 4px "+a}})}),H.createElement("div",{style:i.clear}))},Fm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=o==="transparent",_=function(T,O){Wa(T)&&n({hex:T,source:"hex"},O)},y=zt(Yr({default:{card:{width:a,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:Mm(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},p),{"hide-triangle":l==="hide"});return H.createElement("div",{style:y.card,className:"block-picker "+b},H.createElement("div",{style:y.triangle}),H.createElement("div",{style:y.head},C&&H.createElement(dc,{borderRadius:"6px 6px 0 0"}),H.createElement("div",{style:y.label},o)),H.createElement("div",{style:y.body},H.createElement(pU,{colors:i,onClick:_,onSwatchHover:r}),H.createElement(en,{style:{input:y.input},value:o,onChange:_})))};Fm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["top","hide"]),styles:ct.object};Fm.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}};qr(Fm);var El={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},Cl={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},wl={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},Tl={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},Nl={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},Sl={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},Ol={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},Al={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},Rl={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},Cu={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},$l={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},Dl={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},kl={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},Ml={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},Pl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},Il={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},Ll={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},Fl={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},HT=function(t){var n=t.color,r=t.onClick,o=t.onSwatchHover,i=t.hover,a=t.active,l=t.circleSize,u=t.circleSpacing,p=zt({default:{swatch:{width:l,height:l,marginRight:u,marginBottom:u,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(l/2+1)+"px "+n,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+n}}},{hover:i,active:a});return H.createElement("div",{style:p.swatch},H.createElement(Ds,{style:p.Swatch,color:n,onClick:r,onHover:o,focusStyle:{boxShadow:p.Swatch.boxShadow+", 0 0 5px "+n}}))};HT.defaultProps={circleSize:28,circleSpacing:14};const gU=wm(HT);var jm=function(t){var n=t.width,r=t.onChange,o=t.onSwatchHover,i=t.colors,a=t.hex,l=t.circleSize,u=t.styles,p=u===void 0?{}:u,m=t.circleSpacing,b=t.className,C=b===void 0?"":b,_=zt(Yr({default:{card:{width:n,display:"flex",flexWrap:"wrap",marginRight:-m,marginBottom:-m}}},p)),y=function(T,O){return r({hex:T,source:"hex"},O)};return H.createElement("div",{style:_.card,className:"circle-picker "+C},ks(i,function(v){return H.createElement(gU,{key:v,color:v,onClick:y,onSwatchHover:o,active:a===v.toLowerCase(),circleSize:l,circleSpacing:m})}))};jm.propTypes={width:ct.oneOfType([ct.string,ct.number]),circleSize:ct.number,circleSpacing:ct.number,styles:ct.object};jm.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[El[500],Cl[500],wl[500],Tl[500],Nl[500],Sl[500],Ol[500],Al[500],Rl[500],Cu[500],$l[500],Dl[500],kl[500],Ml[500],Pl[500],Il[500],Ll[500],Fl[500]],styles:{}};qr(jm);function ib(e){return e===void 0}var GT={};Object.defineProperty(GT,"__esModule",{value:!0});var ab=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},mU=H,sb=yU(mU);function yU(e){return e&&e.__esModule?e:{default:e}}function vU(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Fd=24,bU=GT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Fd:r,i=e.height,a=i===void 0?Fd:i,l=e.style,u=l===void 0?{}:l,p=vU(e,["fill","width","height","style"]);return sb.default.createElement("svg",ab({viewBox:"0 0 "+Fd+" "+Fd,style:ab({fill:n,width:o,height:a},u)},p),sb.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},_U=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function xU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EU(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function CU(e,t){if(typeof t!="function"&&t!==null)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)}var KT=function(e){CU(t,e);function t(n){xU(this,t);var r=EU(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.toggleViews=function(){r.state.view==="hex"?r.setState({view:"rgb"}):r.state.view==="rgb"?r.setState({view:"hsl"}):r.state.view==="hsl"&&(r.props.hsl.a===1?r.setState({view:"hex"}):r.setState({view:"rgb"}))},r.handleChange=function(o,i){o.hex?Wa(o.hex)&&r.props.onChange({hex:o.hex,source:"hex"},i):o.r||o.g||o.b?r.props.onChange({r:o.r||r.props.rgb.r,g:o.g||r.props.rgb.g,b:o.b||r.props.rgb.b,source:"rgb"},i):o.a?(o.a<0?o.a=0:o.a>1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(ib(o.s)?r.props.hsl.s:o.s),l:Number(ib(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return _U(t,[{key:"render",value:function(){var r=this,o=zt({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=H.createElement("div",{style:o.fields,className:"flexbox-fix"},H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.field},H.createElement(en,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),H.createElement("div",{style:o.alpha},H.createElement(en,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),H.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,H.createElement("div",{style:o.toggle},H.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},H.createElement(bU,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(H.Component);KT.defaultProps={view:"hex"};var lb=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},wU=function(){var t=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return H.createElement("div",{style:t.picker})},Bm=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,u=t.hex,p=t.renderers,m=t.styles,b=m===void 0?{}:m,C=t.className,_=C===void 0?"":C,y=t.defaultView,v=zt(Yr({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},b),{disableAlpha:o});return H.createElement("div",{style:v.picker,className:"chrome-picker "+_},H.createElement("div",{style:v.saturation},H.createElement(Jf,{style:v.Saturation,hsl:a,hsv:l,pointer:wU,onChange:r})),H.createElement("div",{style:v.body},H.createElement("div",{style:v.controls,className:"flexbox-fix"},H.createElement("div",{style:v.color},H.createElement("div",{style:v.swatch},H.createElement("div",{style:v.active}),H.createElement(dc,{renderers:p}))),H.createElement("div",{style:v.toggles},H.createElement("div",{style:v.hue},H.createElement(fc,{style:v.Hue,hsl:a,pointer:lb,onChange:r})),H.createElement("div",{style:v.alpha},H.createElement(Tm,{style:v.Alpha,rgb:i,hsl:a,pointer:lb,renderers:p,onChange:r})))),H.createElement(KT,{rgb:i,hsl:a,hex:u,view:y,onChange:r,disableAlpha:o})))};Bm.propTypes={width:ct.oneOfType([ct.string,ct.number]),disableAlpha:ct.bool,styles:ct.object,defaultView:ct.oneOf(["hex","rgb","hsl"])};Bm.defaultProps={width:225,disableAlpha:!1,styles:{}};qr(Bm);var TU=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=zt({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Mm(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(Ds,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:l.dot}))},NU=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=zt({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(u,p){u.r||u.g||u.b?o({r:u.r||r.r,g:u.g||r.g,b:u.b||r.b,source:"rgb"},p):o({hex:u.hex,source:"hex"},p)};return H.createElement("div",{style:i.fields,className:"flexbox-fix"},H.createElement("div",{style:i.active}),H.createElement(en,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),H.createElement(en,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},Wm=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,b=zt(Yr({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},u)),C=function(y,v){y.hex?Wa(y.hex)&&n({hex:y.hex,source:"hex"},v):n(y,v)};return H.createElement(Vu,{style:b.Compact,styles:u},H.createElement("div",{style:b.compact,className:"compact-picker "+m},H.createElement("div",null,ks(o,function(_){return H.createElement(TU,{key:_,color:_,active:_.toLowerCase()===i,onClick:C,onSwatchHover:r})}),H.createElement("div",{style:b.clear})),H.createElement(NU,{hex:i,rgb:a,onChange:C})))};Wm.propTypes={colors:ct.arrayOf(ct.string),styles:ct.object};Wm.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};qr(Wm);var SU=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=zt({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return H.createElement("div",{style:l.swatch},H.createElement(Ds,{color:r,onClick:o,onHover:i,focusStyle:a}))};const OU=wm(SU);var zm=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,u=l===void 0?{}:l,p=t.className,m=p===void 0?"":p,b=zt(Yr({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},u),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),C=function(y,v){return o({hex:y,source:"hex"},v)};return H.createElement("div",{style:b.card,className:"github-picker "+m},H.createElement("div",{style:b.triangleShadow}),H.createElement("div",{style:b.triangle}),ks(r,function(_){return H.createElement(OU,{color:_,key:_,onClick:C,onSwatchHover:i})}))};zm.propTypes={width:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.string),triangle:ct.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:ct.object};zm.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};qr(zm);var AU=function(t){var n=t.direction,r=zt({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return H.createElement("div",{style:r.picker})},RU=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},Hm=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.hsl,a=t.direction,l=t.pointer,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(Yr({default:{picker:{position:"relative",width:n,height:r},hue:{radius:"2px"}}},p)),_=function(v){return o({a:1,h:v.h,l:.5,s:1})};return H.createElement("div",{style:C.picker,className:"hue-picker "+b},H.createElement(fc,RU({},C.hue,{hsl:i,pointer:l,onChange:_,direction:a})))};Hm.propTypes={styles:ct.object};Hm.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:AU,styles:{}};qr(Hm);var $U=function(t){var n=t.onChange,r=t.hex,o=t.rgb,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(Yr({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},a)),m=function(C,_){C.hex?Wa(C.hex)&&n({hex:C.hex,source:"hex"},_):(C.r||C.g||C.b)&&n({r:C.r||o.r,g:C.g||o.g,b:C.b||o.b,source:"rgb"},_)};return H.createElement(Vu,{styles:a},H.createElement("div",{style:p.material,className:"material-picker "+u},H.createElement(en,{style:{wrap:p.HEXwrap,input:p.HEXinput,label:p.HEXlabel},label:"hex",value:r,onChange:m}),H.createElement("div",{style:p.split,className:"flexbox-fix"},H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"r",value:o.r,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"g",value:o.g,onChange:m})),H.createElement("div",{style:p.third},H.createElement(en,{style:{wrap:p.RGBwrap,input:p.RGBinput,label:p.RGBlabel},label:"b",value:o.b,onChange:m})))))};qr($U);var DU=function(t){var n=t.onChange,r=t.rgb,o=t.hsv,i=t.hex,a=zt({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),l=function(p,m){p["#"]?Wa(p["#"])&&n({hex:p["#"],source:"hex"},m):p.r||p.g||p.b?n({r:p.r||r.r,g:p.g||r.g,b:p.b||r.b,source:"rgb"},m):(p.h||p.s||p.v)&&n({h:p.h||o.h,s:p.s||o.s,v:p.v||o.v,source:"hsv"},m)};return H.createElement("div",{style:a.fields},H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"h",value:Math.round(o.h),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"s",value:Math.round(o.s*100),onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"v",value:Math.round(o.v*100),onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:r.r,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:r.g,onChange:l}),H.createElement(en,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:r.b,onChange:l}),H.createElement("div",{style:a.divider}),H.createElement(en,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"#",value:i.replace("#",""),onChange:l}),H.createElement("div",{style:a.fieldSymbols},H.createElement("div",{style:a.symbol},"°"),H.createElement("div",{style:a.symbol},"%"),H.createElement("div",{style:a.symbol},"%")))},kU=function(t){var n=t.hsl,r=zt({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":n.l>.5});return H.createElement("div",{style:r.picker})},MU=function(){var t=zt({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return H.createElement("div",{style:t.pointer},H.createElement("div",{style:t.left},H.createElement("div",{style:t.leftInside})),H.createElement("div",{style:t.right},H.createElement("div",{style:t.rightInside})))},cb=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=zt({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return H.createElement("div",{style:a.button,onClick:n},r||o)},PU=function(t){var n=t.rgb,r=t.currentColor,o=zt({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return H.createElement("div",null,H.createElement("div",{style:o.label},"new"),H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.new}),H.createElement("div",{style:o.current})),H.createElement("div",{style:o.label},"current"))},IU=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function LU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FU(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function jU(e,t){if(typeof t!="function"&&t!==null)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)}var Gm=function(e){jU(t,e);function t(n){LU(this,t);var r=FU(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.state={currentColor:n.hex},r}return IU(t,[{key:"render",value:function(){var r=this.props,o=r.styles,i=o===void 0?{}:o,a=r.className,l=a===void 0?"":a,u=zt(Yr({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},i));return H.createElement("div",{style:u.picker,className:"photoshop-picker "+l},H.createElement("div",{style:u.head},this.props.header),H.createElement("div",{style:u.body,className:"flexbox-fix"},H.createElement("div",{style:u.saturation},H.createElement(Jf,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:kU,onChange:this.props.onChange})),H.createElement("div",{style:u.hue},H.createElement(fc,{direction:"vertical",hsl:this.props.hsl,pointer:MU,onChange:this.props.onChange})),H.createElement("div",{style:u.controls},H.createElement("div",{style:u.top,className:"flexbox-fix"},H.createElement("div",{style:u.previews},H.createElement(PU,{rgb:this.props.rgb,currentColor:this.state.currentColor})),H.createElement("div",{style:u.actions},H.createElement(cb,{label:"OK",onClick:this.props.onAccept,active:!0}),H.createElement(cb,{label:"Cancel",onClick:this.props.onCancel}),H.createElement(DU,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(H.Component);Gm.propTypes={header:ct.string,styles:ct.object};Gm.defaultProps={header:"Color Picker",styles:{}};qr(Gm);var BU=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,l=zt({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),u=function(m,b){m.hex?Wa(m.hex)&&n({hex:m.hex,source:"hex"},b):m.r||m.g||m.b?n({r:m.r||r.r,g:m.g||r.g,b:m.b||r.b,a:r.a,source:"rgb"},b):m.a&&(m.a<0?m.a=0:m.a>100&&(m.a=100),m.a/=100,n({h:o.h,s:o.s,l:o.l,a:m.a,source:"rgb"},b))};return H.createElement("div",{style:l.fields,className:"flexbox-fix"},H.createElement("div",{style:l.double},H.createElement(en,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:u})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.single},H.createElement(en,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:u,dragLabel:"true",dragMax:"255"})),H.createElement("div",{style:l.alpha},H.createElement(en,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:u,dragLabel:"true",dragMax:"100"})))},WU=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},UT=function(t){var n=t.colors,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=zt({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!n||!n.length}),l=function(p,m){o({hex:p,source:"hex"},m)};return H.createElement("div",{style:a.colors,className:"flexbox-fix"},n.map(function(u){var p=typeof u=="string"?{color:u}:u,m=""+p.color+(p.title||"");return H.createElement("div",{key:m,style:a.swatchWrap},H.createElement(Ds,WU({},p,{style:a.swatch,onClick:l,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+p.color}})))}))};UT.propTypes={colors:ct.arrayOf(ct.oneOfType([ct.string,ct.shape({color:ct.string,title:ct.string})])).isRequired};var zU=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},Km=function(t){var n=t.width,r=t.rgb,o=t.hex,i=t.hsv,a=t.hsl,l=t.onChange,u=t.onSwatchHover,p=t.disableAlpha,m=t.presetColors,b=t.renderers,C=t.styles,_=C===void 0?{}:C,y=t.className,v=y===void 0?"":y,T=zt(Yr({default:zU({picker:{width:n,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},_),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},_),{disableAlpha:p});return H.createElement("div",{style:T.picker,className:"sketch-picker "+v},H.createElement("div",{style:T.saturation},H.createElement(Jf,{style:T.Saturation,hsl:a,hsv:i,onChange:l})),H.createElement("div",{style:T.controls,className:"flexbox-fix"},H.createElement("div",{style:T.sliders},H.createElement("div",{style:T.hue},H.createElement(fc,{style:T.Hue,hsl:a,onChange:l})),H.createElement("div",{style:T.alpha},H.createElement(Tm,{style:T.Alpha,rgb:r,hsl:a,renderers:b,onChange:l}))),H.createElement("div",{style:T.color},H.createElement(dc,null),H.createElement("div",{style:T.activeColor}))),H.createElement(BU,{rgb:r,hsl:a,hex:o,onChange:l,disableAlpha:p}),H.createElement(UT,{colors:m,onClick:l,onSwatchHover:u}))};Km.propTypes={disableAlpha:ct.bool,width:ct.oneOfType([ct.string,ct.number]),styles:ct.object};Km.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};const HU=qr(Km);var du=function(t){var n=t.hsl,r=t.offset,o=t.onClick,i=o===void 0?function(){}:o,a=t.active,l=t.first,u=t.last,p=zt({default:{swatch:{height:"12px",background:"hsl("+n.h+", 50%, "+r*100+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:a,first:l,last:u}),m=function(C){return i({h:n.h,s:.5,l:r,source:"hsl"},C)};return H.createElement("div",{style:p.swatch,onClick:m})},GU=function(t){var n=t.onClick,r=t.hsl,o=zt({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return H.createElement("div",{style:o.swatches},H.createElement("div",{style:o.swatch},H.createElement(du,{hsl:r,offset:".80",active:Math.abs(r.l-.8)<i&&Math.abs(r.s-.5)<i,onClick:n,first:!0})),H.createElement("div",{style:o.swatch},H.createElement(du,{hsl:r,offset:".65",active:Math.abs(r.l-.65)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(du,{hsl:r,offset:".50",active:Math.abs(r.l-.5)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(du,{hsl:r,offset:".35",active:Math.abs(r.l-.35)<i&&Math.abs(r.s-.5)<i,onClick:n})),H.createElement("div",{style:o.swatch},H.createElement(du,{hsl:r,offset:".20",active:Math.abs(r.l-.2)<i&&Math.abs(r.s-.5)<i,onClick:n,last:!0})),H.createElement("div",{style:o.clear}))},KU=function(){var t=zt({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return H.createElement("div",{style:t.picker})},Um=function(t){var n=t.hsl,r=t.onChange,o=t.pointer,i=t.styles,a=i===void 0?{}:i,l=t.className,u=l===void 0?"":l,p=zt(Yr({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},a));return H.createElement("div",{style:p.wrap||{},className:"slider-picker "+u},H.createElement("div",{style:p.hue},H.createElement(fc,{style:p.Hue,hsl:n,pointer:o,onChange:r})),H.createElement("div",{style:p.swatches},H.createElement(GU,{hsl:n,onClick:r})))};Um.propTypes={styles:ct.object};Um.defaultProps={pointer:KU,styles:{}};qr(Um);var VT={};Object.defineProperty(VT,"__esModule",{value:!0});var ub=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},UU=H,db=VU(UU);function VU(e){return e&&e.__esModule?e:{default:e}}function YU(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var jd=24,qU=VT.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?jd:r,i=e.height,a=i===void 0?jd:i,l=e.style,u=l===void 0?{}:l,p=YU(e,["fill","width","height","style"]);return db.default.createElement("svg",ub({viewBox:"0 0 "+jd+" "+jd,style:ub({fill:n,width:o,height:a},u)},p),db.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},ZU=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,u=t.active,p=zt({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Mm(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:u,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return H.createElement(Ds,{color:n,style:p.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},H.createElement("div",{style:p.check},H.createElement(qU,null)))},JU=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=zt({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return H.createElement("div",{style:a.group},ks(o,function(l,u){return H.createElement(ZU,{key:l,color:l,active:l.toLowerCase()===i,first:u===0,last:u===o.length-1,onClick:n,onSwatchHover:r})}))},Vm=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(Yr({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},p)),_=function(v,T){return o({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.picker,className:"swatches-picker "+b},H.createElement(Vu,null,H.createElement("div",{style:C.overflow},H.createElement("div",{style:C.body},ks(a,function(y){return H.createElement(JU,{key:y.toString(),group:y,active:l,onClick:_,onSwatchHover:i})}),H.createElement("div",{style:C.clear})))))};Vm.propTypes={width:ct.oneOfType([ct.string,ct.number]),height:ct.oneOfType([ct.string,ct.number]),colors:ct.arrayOf(ct.arrayOf(ct.string)),styles:ct.object};Vm.defaultProps={width:320,height:240,colors:[[El[900],El[700],El[500],El[300],El[100]],[Cl[900],Cl[700],Cl[500],Cl[300],Cl[100]],[wl[900],wl[700],wl[500],wl[300],wl[100]],[Tl[900],Tl[700],Tl[500],Tl[300],Tl[100]],[Nl[900],Nl[700],Nl[500],Nl[300],Nl[100]],[Sl[900],Sl[700],Sl[500],Sl[300],Sl[100]],[Ol[900],Ol[700],Ol[500],Ol[300],Ol[100]],[Al[900],Al[700],Al[500],Al[300],Al[100]],[Rl[900],Rl[700],Rl[500],Rl[300],Rl[100]],["#194D33",Cu[700],Cu[500],Cu[300],Cu[100]],[$l[900],$l[700],$l[500],$l[300],$l[100]],[Dl[900],Dl[700],Dl[500],Dl[300],Dl[100]],[kl[900],kl[700],kl[500],kl[300],kl[100]],[Ml[900],Ml[700],Ml[500],Ml[300],Ml[100]],[Pl[900],Pl[700],Pl[500],Pl[300],Pl[100]],[Il[900],Il[700],Il[500],Il[300],Il[100]],[Ll[900],Ll[700],Ll[500],Ll[300],Ll[100]],[Fl[900],Fl[700],Fl[500],Fl[300],Fl[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};qr(Vm);var Ym=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,u=t.styles,p=u===void 0?{}:u,m=t.className,b=m===void 0?"":m,C=zt(Yr({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},p),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),_=function(v,T){Wa(v)&&n({hex:v,source:"hex"},T)};return H.createElement("div",{style:C.card,className:"twitter-picker "+b},H.createElement("div",{style:C.triangleShadow}),H.createElement("div",{style:C.triangle}),H.createElement("div",{style:C.body},ks(i,function(y,v){return H.createElement(Ds,{key:v,color:y,hex:y,style:C.swatch,onClick:_,onHover:r,focusStyle:{boxShadow:"0 0 4px "+y}})}),H.createElement("div",{style:C.hash},"#"),H.createElement(en,{label:null,style:{input:C.input},value:o.replace("#",""),onChange:_}),H.createElement("div",{style:C.clear})))};Ym.propTypes={width:ct.oneOfType([ct.string,ct.number]),triangle:ct.oneOf(["hide","top-left","top-right"]),colors:ct.arrayOf(ct.string),styles:ct.object};Ym.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};qr(Ym);var qm=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return H.createElement("div",{style:n.picker})};qm.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};qm.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Zm=function(t){var n=zt({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return H.createElement("div",{style:n.picker})};Zm.propTypes={hsl:ct.shape({h:ct.number,s:ct.number,l:ct.number,a:ct.number})};Zm.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var XU=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(_,y){if(_.hex)Wa(_.hex)&&n({hex:_.hex,source:"hex"},y);else if(_.rgb){var v=_.rgb.split(",");ip(_.rgb,"rgb")&&n({r:v[0],g:v[1],b:v[2],a:1,source:"rgb"},y)}else if(_.hsv){var T=_.hsv.split(",");ip(_.hsv,"hsv")&&(T[2]=T[2].replace("%",""),T[1]=T[1].replace("%",""),T[0]=T[0].replace("°",""),T[1]==1?T[1]=.01:T[2]==1&&(T[2]=.01),n({h:Number(T[0]),s:Number(T[1]),v:Number(T[2]),source:"hsv"},y))}else if(_.hsl){var O=_.hsl.split(",");ip(_.hsl,"hsl")&&(O[2]=O[2].replace("%",""),O[1]=O[1].replace("%",""),O[0]=O[0].replace("°",""),b[1]==1?b[1]=.01:b[2]==1&&(b[2]=.01),n({h:Number(O[0]),s:Number(O[1]),v:Number(O[2]),source:"hsl"},y))}},u=zt({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),p=r.r+", "+r.g+", "+r.b,m=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",b=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return H.createElement("div",{style:u.wrap,className:"flexbox-fix"},H.createElement("div",{style:u.fields},H.createElement("div",{style:u.double},H.createElement(en,{style:{input:u.input,label:u.label},label:"hex",value:i,onChange:l})),H.createElement("div",{style:u.column},H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"rgb",value:p,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsv",value:b,onChange:l})),H.createElement("div",{style:u.single},H.createElement(en,{style:{input:u.input2,label:u.label2},label:"hsl",value:m,onChange:l})))))},Jm=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,u=t.header,p=t.styles,m=p===void 0?{}:p,b=t.className,C=b===void 0?"":b,_=zt(Yr({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},m));return H.createElement("div",{style:_.picker,className:"google-picker "+C},H.createElement("div",{style:_.head},u),H.createElement("div",{style:_.swatch}),H.createElement("div",{style:_.saturation},H.createElement(Jf,{hsl:i,hsv:a,pointer:qm,onChange:r})),H.createElement("div",{style:_.body},H.createElement("div",{style:_.controls,className:"flexbox-fix"},H.createElement("div",{style:_.hue},H.createElement(fc,{style:_.Hue,hsl:i,radius:"4px",pointer:Zm,onChange:r}))),H.createElement(XU,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};Jm.propTypes={width:ct.oneOfType([ct.string,ct.number]),styles:ct.object,header:ct.string};Jm.defaultProps={width:652,styles:{},header:"Color picker"};qr(Jm);const QU=({field:e,value:t,onChange:n})=>{const[r,o]=H.useState(!1),i=eV(t);return ne.jsx(ne.Fragment,{children:ne.jsxs(Hn.FieldLabel,{label:e.label||"Label is undefined",className:"ve-mt-2.5",children:[ne.jsx("div",{style:i.swatch,onClick:()=>o(a=>!a),children:ne.jsx("div",{style:i.color})}),r&&ne.jsxs("div",{style:i.popover,children:[ne.jsx("div",{style:i.cover,onClick:()=>o(!1)}),ne.jsx(HU,{disableAlpha:!0,color:t,onChange:a=>{n(a.hex)}})]})]})})},eV=e=>({color:{width:"36px",height:"14px",borderRadius:"2px",background:e},swatch:{padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}),tV=({label:e,onChange:t,value:n,options:r})=>{var p;const[o,i]=H.useState(!1),a=()=>{i(!o)},l=m=>{t(m),i(!1)},u=((p=r.find(m=>m.value===n))==null?void 0:p.label)??"Choose a font";return ne.jsx(Hn.FieldLabel,{label:e,icon:ne.jsx(Qg,{size:16}),children:ne.jsxs("div",{style:{position:"relative"},children:[ne.jsx("button",{onClick:a,className:"font-select",style:{fontFamily:n},children:u}),o&&ne.jsx("div",{className:"font-select-dropdown",children:r.map(m=>ne.jsx("button",{value:m.value,onClick:b=>{b.preventDefault(),l(m.value)},style:{fontFamily:m.value,backgroundColor:m.value===n?"var(--puck-color-grey-09)":""},className:"font-select-option",children:m.label},m.value))})]})})},nV=e=>{const t={label:e.label,type:"object",objectFields:{}};return Object.entries(e.styles).forEach(([n,r])=>{if("type"in r){const o=fb(r,r.plugin);o&&(t.objectFields[n]=o)}else{const o={label:r.label,type:"object",objectFields:{}};for(const i in r.styles)o.objectFields[i]=fb(r.styles[i],r.plugin);t.objectFields[n]=o}}),t},fb=(e,t)=>{switch(e.type){case"number":return{label:e.label,type:"number"};case"select":return t==="fontFamily"?{label:e.label,type:"custom",options:e.options,render:H.useCallback(({onChange:n,value:r})=>tV({label:e.label,options:typeof e.options=="function"?e.options():e.options,value:r,onChange:n}),[])}:{label:e.label,type:"select",options:typeof e.options=="function"?e.options():e.options};case"color":return{label:e.label,type:"custom",render:QU}}},rV=(e,t,n="")=>{const r={};return Object.entries(t.styles).forEach(([o,i])=>{if("type"in i){const a=e==null?void 0:e[`--${i.plugin}-${n}-${o}`];r[o]=hb(i,a)}else{const a={};for(const l in i.styles){const u=i.styles[l],p=e==null?void 0:e[`--${i.plugin}-${n}-${o}-${l}`];a[l]=hb(u,p)}r[o]=a}}),r},hb=(e,t)=>{if(t)if(e.type==="number"){const n=Number.parseInt(t);return isNaN(n)?e.default:n}else return t;else return e.default},oV=e=>{var u,p;const{themeConfig:t,themeHistoriesRef:n,onThemeChange:r}=e;if(!n.current)return;if(!t)return ne.jsx("div",{children:ne.jsx(Jp,{children:ne.jsx(Xp,{children:"Please contact your developer to set up theme management."})})});const[o,i]=H.useState(Object.keys(t).reduce((m,b)=>({...m,[b]:!0}),{})),a=m=>{i(b=>({...b,[m]:!b[m]}))},l=(p=n.current)==null?void 0:p.histories[(u=n.current)==null?void 0:u.index].data;return ne.jsxs("div",{children:[ne.jsx(Jp,{children:ne.jsx(Xp,{children:"Changes to the theme will affect all templates and layouts for the entire site."})}),Object.entries(t).map(([m,b])=>{const C=nV(b),_=rV(l,b,m),y=o[m];return ne.jsxs("div",{className:"theme-field",children:[ne.jsxs("button",{className:"ve-flex ve-items-center ve-w-full ve-justify-between",onClick:()=>a(m),children:[`${C.label??""}`,ne.jsx("div",{children:y?ne.jsx(Qg,{size:12}):ne.jsx(R$,{size:12})})]}),!y&&ne.jsx(Hn.AutoField,{field:C,onChange:v=>r(m,b,v),value:_})]},m)})]})},iV=e=>{var p,m;const{isDevMode:t,setThemeHistories:n,onPublishTheme:r,themeConfig:o,themeHistories:i,clearThemeHistory:a,puckInitialHistory:l}=e,{history:{setHistories:u}}=Hn.usePuck();return H.useEffect(()=>{u((l==null?void 0:l.histories)||[])},[l]),H.useEffect(()=>{const b=document.querySelector("[class*='PuckLayout-leftSideBar'] > div[class*='SidebarSection--noBorderTop']");b&&(b.style.display="none");const C=document.querySelector("[class*='PuckLayout-rightSideBar'] > div[class*='SidebarSection--noBorderTop'] > div[class*='SidebarSection-title']");C&&(C.style.display="none")},[]),ne.jsxs("header",{className:"puck-header",children:[ne.jsxs("div",{className:"header-left",children:[ne.jsx(bC,{}),ne.jsx(SC,{})]}),ne.jsx("div",{className:"header-center"}),ne.jsxs("div",{className:"actions",children:[ne.jsx(Aw,{disabled:((p=i==null?void 0:i.histories)==null?void 0:p.length)===1,onClearLocalChanges:()=>{var b,C,_,y,v,T;a(),o&&Ou((C=(b=i==null?void 0:i.histories)==null?void 0:b[0])==null?void 0:C.data,o),n({histories:[{id:((y=(_=i==null?void 0:i.histories)==null?void 0:_[0])==null?void 0:y.id)??"",data:((T=(v=i==null?void 0:i.histories)==null?void 0:v[0])==null?void 0:T.data)??{}}],index:0})}}),!t&&ne.jsx(Yi,{variant:"secondary",disabled:((m=i==null?void 0:i.histories)==null?void 0:m.length)===1,onClick:async()=>{await r()},children:"Publish"})]})]})},sp=new Ur,aV=({puckConfig:e,puckInitialHistory:t,isLoading:n,templateMetadata:r,publishTheme:o,themeConfig:i,saveThemeSaveState:a,themeHistories:l,setThemeHistories:u,clearThemeHistory:p,sendDevThemeSaveStateData:m,buildThemeLocalStorageKey:b})=>{const[C,_]=H.useState(!1),y=H.useRef(l);H.useEffect(()=>{y.current=l},[l]);const v=async()=>{if(sp.logFunc("saveThemeData"),!l)return;const k=l.histories[l.index];o({payload:{saveThemeData:JSON.stringify(k.data)}}),p(),u({histories:[k],index:0})},T=(k,P,M)=>{var oe,Z,U,Q;if(!y.current||!i)return;const Y={...(oe=y.current.histories[y.current.index])==null?void 0:oe.data,...X1(M,k,P)},X={histories:[...y.current.histories,{id:Ag.v4(),data:Y}],index:y.current.histories.length};window.localStorage.setItem(b(),JSON.stringify(X.histories)),r.isDevMode&&!r.devOverride?(sp.logFunc("sendDevThemeSaveStateData"),m({payload:{devThemeSaveStateData:JSON.stringify((Z=X.histories[X.index])==null?void 0:Z.data)}})):(sp.logFunc("saveTheme"),a({payload:{history:JSON.stringify((U=X.histories[X.index])==null?void 0:U.data),hash:(Q=X.histories[X.index])==null?void 0:Q.id}})),Ou(Y,i),u(X)},O=async()=>{if(!n&&!C){_(!0);return}},R=H.useCallback(()=>ne.jsx(oV,{themeHistoriesRef:y,themeConfig:i,onThemeChange:T}),[]);return ne.jsx(gC,{children:ne.jsx(Hn.Puck,{config:e,data:{},initialHistory:t,onChange:O,permissions:{drag:!1,duplicate:!1,delete:!1,insert:!1,edit:!1},overrides:{header:()=>ne.jsx(iV,{themeConfig:i,themeHistories:l,onPublishTheme:v,isDevMode:r.isDevMode,setThemeHistories:u,clearThemeHistory:p,puckInitialHistory:t}),actionBar:()=>ne.jsx(ne.Fragment,{}),components:()=>ne.jsx(ne.Fragment,{}),fields:R}})})},sV=()=>{const{sendToParent:e}=zo("saveThemeSaveState",ar),{sendToParent:t}=zo("deleteThemeSaveState",ar),{sendToParent:n}=zo("publishTheme",ar);return{saveThemeSaveState:e,deleteThemeSaveState:t,publishTheme:n}},lV=new Ur,cV=()=>{const{iFrameLoaded:e}=Ns();H.useEffect(()=>{e({payload:{message:"Theme Editor is loaded"}})},[]);const[t,n]=H.useState(void 0),[r,o]=H.useState(!1);return Ma("getThemeSaveState",ar,(i,a)=>{let l;a!=null&&a.history&&(l={hash:a.hash,history:lf(a.history)}),lV.logData("THEME_SAVE_STATE",l),n(l),o(!0),i({status:"success",payload:{message:"themeSaveState received"}})}),{themeSaveState:t,themeSaveStateFetched:r}},Gr=new Ur,uV=e=>{const{puckConfig:t,templateMetadata:n,layoutData:r,themeData:o,themeConfig:i}=e,{sendDevLayoutSaveStateData:a,sendDevThemeSaveStateData:l}=Ns(),{saveThemeSaveState:u,publishTheme:p,deleteThemeSaveState:m}=sV(),{themeSaveState:b,themeSaveStateFetched:C}=cV(),{buildThemeLocalStorageKey:_,clearThemeLocalStorage:y}=$w(n),{buildVisualConfigLocalStorageKey:v}=Rw(n),[T,O]=H.useState(),[R,k]=H.useState(!1),[P,M]=H.useState(),[Y,X]=H.useState(!1),oe=H.useCallback(()=>{if(!n)return;Gr.logFunc("loadPuckInitialHistory");const pe=window.localStorage.getItem(v());if(n.isDevMode&&pe){const te=JSON.parse(pe),fe=te.length-1;if(fe>=0){Gr.log("Theme Dev Mode - Using layout data from local storage"),O({histories:te.map(j=>({id:j.id,state:{data:{...j.state.data}}})),index:fe,appendData:!1});const V=T==null?void 0:T.histories[T.histories.length-1].state.data;a({payload:{devSaveStateData:JSON.stringify(V)}})}k(!0);return}r&&O({histories:[{id:"root",state:{data:r}}],appendData:!1}),k(!0)},[O,k,r]),Z=H.useCallback(()=>{if(!n)return;if(Gr.logFunc("loadThemeHistory"),Gr.logData("THEME_DATA",o),Gr.logData("THEME_SAVE_STATE",b),n.isDevMode&&!n.devOverride){const fe=window.localStorage.getItem(_());if(fe){Gr.log("Theme Dev Mode - Using theme localStorage");const V=JSON.parse(fe),j=V.length-1;M({histories:V,index:j}),X(!0);return}Gr.log("Theme Dev Mode - No localStorage. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}if(!b){y(),Gr.log("Theme Prod Mode - No saveState. Using theme data from Content"),o&&M({histories:[{id:"root",data:o}],index:0}),X(!0);return}const pe=window.localStorage.getItem(_());if(!pe){Gr.log("Theme Prod Mode - No localStorage. Using themeSaveState"),M({histories:o?[{id:"root",data:o},{id:b.hash,data:b.history.data}]:[{id:b.hash,data:b.history.data}],index:o?1:0}),X(!0);return}const te=JSON.parse(pe).findIndex(fe=>fe.id===(b==null?void 0:b.hash));if(te!==-1){Gr.log("Theme Prod Mode - Using localStorage theme data"),M({histories:JSON.parse(pe),index:te}),X(!0);return}y()},[M,X,y,_]);H.useEffect(()=>{var pe;Gr.logData("THEME_HISTORIES",P),P&&i&&Ou((pe=P.histories[P.index])==null?void 0:pe.data,i)},[P,i]),H.useEffect(()=>{C&&(oe(),Z())},[n,C,r]),H.useEffect(()=>{T&&Gr.logData("PUCK_INITIAL_HISTORY",T)},[T]);const U=()=>{Gr.logFunc("clearHistory"),y(),m()};H.useEffect(()=>{var te;if(!Y)return;const pe=(te=P==null?void 0:P.histories[P.index])==null?void 0:te.data;Gr.logFunc("sendDevThemeSaveStateData useEffect"),l({payload:{devThemeSaveStateData:JSON.stringify(pe)}})},[Y,P,n]);const Q=!R||!Y||!C,de=60+(R+Y+C)*13.33;return Q?ne.jsx(jg,{progress:de}):ne.jsx(aV,{puckConfig:t,puckInitialHistory:T,isLoading:Q,templateMetadata:n,publishTheme:p,themeConfig:i,saveThemeSaveState:u,themeHistories:P,setThemeHistories:M,clearThemeHistory:U,sendDevThemeSaveStateData:l,buildThemeLocalStorageKey:_})},dV=new Ur,fV=({document:e,componentRegistry:t,themeConfig:n})=>{e&&dV.logData("DOCUMENT",e);const[r,o]=H.useState(void 0),[i,a]=H.useState(void 0),[l,u]=H.useState(!1),{templateMetadata:p,puckConfig:m,layoutData:b,layoutDataFetched:C,themeData:_,themeDataFetched:y}=MA(t),{pushPageSets:v}=Ns();kA(),H.useEffect(()=>{if(typeof window<"u"){const R=window.location.ancestorOrigins;R.length===0||!R[0].includes("pagescdn")&&!R[0].includes("yext.com")&&!R[0].includes("localhost")?window.location.assign("/404.html"):u(!0)}},[]),H.useEffect(()=>{if(p!=null&&p.isDevMode)try{o(pageSets),a(siteStream)}catch{console.warn("pageSets are not defined")}},[p==null?void 0:p.isDevMode]),H.useEffect(()=>{typeof window<"u"&&(p!=null&&p.isDevMode)&&r&&v({payload:{...r,siteStream:i}})},[p==null?void 0:p.isDevMode,r]);const T=!m||!p||!e||!C||!y,O=60*((!!m+!!p+!!e+C+y)/5);return ne.jsxs(ne.Fragment,{children:[T?l&&ne.jsx(jg,{progress:O}):p.isThemeMode?ne.jsx(uV,{puckConfig:m,templateMetadata:p,layoutData:b,themeData:_,themeConfig:n}):ne.jsx(Rk,{puckConfig:m,templateMetadata:p,layoutData:b,themeData:_,themeConfig:n}),ne.jsx(DA,{closeButton:!0,richColors:!0})]})},hV=["uid","meta","slug","c_visualConfigurations","c_pages_layouts"],pV=[],YT=e=>qT(e,""),qT=(e,t)=>{var o,i,a;const n=t?`${t}.${e.name}`:e.name;if(pV.includes(ZT(e)))return[{name:n,schemaField:e}];if(e.definition.isList)return[{name:n,schemaField:e}];const r=[{name:n,schemaField:e}];if((o=e.children)!=null&&o.fields&&((a=(i=e.children)==null?void 0:i.fields)==null?void 0:a.length)>0)for(const l of e.children.fields)r.push(...qT(l,n));return r},ZT=e=>e.definition.typeName||e.definition.typeRegistryId||Object.entries(e.definition.type)[0][1];function gV(e,t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),e}const mV=e=>e.reduce((t,n)=>{const r=YT(n);for(const o of r){const i=ZT(o.schemaField);i&&(t=gV(t,i,o.name))}return t},new Map),yV=e=>{let n=uE().filter(o=>!hV.includes(o.name));if(e!=null&&e.allowList){const o=n.map(i=>i.name);e.allowList.forEach(i=>{o.includes(i)||console.warn(`The entity field filter allowList included ${i}, which does not exist in the stream.`)}),n=n.filter(i=>e.allowList.includes(i.name))}e!=null&&e.disallowList&&(n=n.filter(o=>!e.disallowList.includes(o.name)));let r=[];for(const o of n){const i=YT(o);for(const a of i)r.push({...a.schemaField,name:a.name})}if(e!=null&&e.types){const o=mV(r),i=[];e.types.forEach(a=>{i.push(...r.filter(l=>{var u;return(u=o.get(a))==null?void 0:u.includes(l.name)}))}),r=i}return r=r.filter(o=>!!o.definition.isList==!!(e!=null&&e.includeListsOnly)),r};function vV(e){const t=e+"CollectionProvider",[n,r]=Af(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=_=>{const{scope:y,children:v}=_,T=H.useRef(null),O=H.useRef(new Map).current;return ne.jsx(o,{scope:y,itemMap:O,collectionRef:T,children:v})};a.displayName=t;const l=e+"CollectionSlot",u=H.forwardRef((_,y)=>{const{scope:v,children:T}=_,O=i(l,v),R=lr(y,O.collectionRef);return ne.jsx(xs,{ref:R,children:T})});u.displayName=l;const p=e+"CollectionItemSlot",m="data-radix-collection-item",b=H.forwardRef((_,y)=>{const{scope:v,children:T,...O}=_,R=H.useRef(null),k=lr(y,R),P=i(p,v);return H.useEffect(()=>(P.itemMap.set(R,{ref:R,...O}),()=>void P.itemMap.delete(R))),ne.jsx(xs,{[m]:"",ref:k,children:T})});b.displayName=p;function C(_){const y=i(e+"CollectionConsumer",_);return H.useCallback(()=>{const T=y.collectionRef.current;if(!T)return[];const O=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(y.itemMap.values()).sort((P,M)=>O.indexOf(P.ref.current)-O.indexOf(M.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:b},C,r]}var bV=ge.createContext(void 0);function JT(e){const t=ge.useContext(bV);return e||t||"ltr"}var lp="rovingFocusGroup.onEntryFocus",_V={bubbles:!1,cancelable:!0},eh="RovingFocusGroup",[fg,XT,xV]=vV(eh),[EV,QT]=Af(eh,[xV]),[CV,wV]=EV(eh),eN=ge.forwardRef((e,t)=>ne.jsx(fg.Provider,{scope:e.__scopeRovingFocusGroup,children:ne.jsx(fg.Slot,{scope:e.__scopeRovingFocusGroup,children:ne.jsx(TV,{...e,ref:t})})}));eN.displayName=eh;var TV=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...b}=e,C=ge.useRef(null),_=lr(t,C),y=JT(i),[v=null,T]=Fu({prop:a,defaultProp:l,onChange:u}),[O,R]=ge.useState(!1),k=qi(p),P=XT(n),M=ge.useRef(!1),[Y,X]=ge.useState(0);return ge.useEffect(()=>{const oe=C.current;if(oe)return oe.addEventListener(lp,k),()=>oe.removeEventListener(lp,k)},[k]),ne.jsx(CV,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:ge.useCallback(oe=>T(oe),[T]),onItemShiftTab:ge.useCallback(()=>R(!0),[]),onFocusableItemAdd:ge.useCallback(()=>X(oe=>oe+1),[]),onFocusableItemRemove:ge.useCallback(()=>X(oe=>oe-1),[]),children:ne.jsx(Dn.div,{tabIndex:O||Y===0?-1:0,"data-orientation":r,...b,ref:_,style:{outline:"none",...e.style},onMouseDown:Sn(e.onMouseDown,()=>{M.current=!0}),onFocus:Sn(e.onFocus,oe=>{const Z=!M.current;if(oe.target===oe.currentTarget&&Z&&!O){const U=new CustomEvent(lp,_V);if(oe.currentTarget.dispatchEvent(U),!U.defaultPrevented){const Q=P().filter(V=>V.focusable),de=Q.find(V=>V.active),pe=Q.find(V=>V.id===v),fe=[de,pe,...Q].filter(Boolean).map(V=>V.ref.current);rN(fe,m)}}M.current=!1}),onBlur:Sn(e.onBlur,()=>R(!1))})})}),tN="RovingFocusGroupItem",nN=ge.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,l=wu(),u=i||l,p=wV(tN,n),m=p.currentTabStopId===u,b=XT(n),{onFocusableItemAdd:C,onFocusableItemRemove:_}=p;return ge.useEffect(()=>{if(r)return C(),()=>_()},[r,C,_]),ne.jsx(fg.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:ne.jsx(Dn.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...a,ref:t,onMouseDown:Sn(e.onMouseDown,y=>{r?p.onItemFocus(u):y.preventDefault()}),onFocus:Sn(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:Sn(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){p.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=OV(y,p.orientation,p.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let O=b().filter(R=>R.focusable).map(R=>R.ref.current);if(v==="last")O.reverse();else if(v==="prev"||v==="next"){v==="prev"&&O.reverse();const R=O.indexOf(y.currentTarget);O=p.loop?AV(O,R+1):O.slice(R+1)}setTimeout(()=>rN(O))}})})})});nN.displayName=tN;var NV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OV(e,t,n){const r=SV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NV[r]}function rN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function AV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RV=eN,$V=nN,Xm="Radio",[DV,oN]=ec(Xm),[kV,MV]=DV(Xm),iN=ge.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:l="on",onCheck:u,form:p,...m}=e,[b,C]=ge.useState(null),_=lr(t,T=>C(T)),y=ge.useRef(!1),v=b?p||!!b.closest("form"):!0;return ne.jsxs(kV,{scope:n,checked:o,disabled:a,children:[ne.jsx(Dn.button,{type:"button",role:"radio","aria-checked":o,"data-state":lN(o),"data-disabled":a?"":void 0,disabled:a,value:l,...m,ref:_,onClick:Sn(e.onClick,T=>{o||u==null||u(),v&&(y.current=T.isPropagationStopped(),y.current||T.stopPropagation())})}),v&&ne.jsx(PV,{control:b,bubbles:!y.current,name:r,value:l,checked:o,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});iN.displayName=Xm;var aN="RadioIndicator",sN=ge.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=MV(aN,n);return ne.jsx(rc,{present:r||i.checked,children:ne.jsx(Dn.span,{"data-state":lN(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});sN.displayName=aN;var PV=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=ge.useRef(null),a=_C(n),l=Yg(t);return ge.useEffect(()=>{const u=i.current,p=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(p,"checked").set;if(a!==n&&b){const C=new Event("click",{bubbles:r});b.call(u,n),u.dispatchEvent(C)}},[a,n,r]),ne.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function lN(e){return e?"checked":"unchecked"}var IV=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qm="RadioGroup",[LV,YJ]=ec(Qm,[QT,oN]),cN=QT(),uN=oN(),[FV,jV]=LV(Qm),dN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:u,dir:p,loop:m=!0,onValueChange:b,...C}=e,_=cN(n),y=JT(p),[v,T]=Fu({prop:i,defaultProp:o,onChange:b});return ne.jsx(FV,{scope:n,name:r,required:a,disabled:l,value:v,onValueChange:T,children:ne.jsx(RV,{asChild:!0,..._,orientation:u,dir:y,loop:m,children:ne.jsx(Dn.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":l?"":void 0,dir:y,...C,ref:t})})})});dN.displayName=Qm;var fN="RadioGroupItem",hN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=jV(fN,n),a=i.disabled||r,l=cN(n),u=uN(n),p=ge.useRef(null),m=lr(t,p),b=i.value===o.value,C=ge.useRef(!1);return ge.useEffect(()=>{const _=v=>{IV.includes(v.key)&&(C.current=!0)},y=()=>C.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",y)}},[]),ne.jsx($V,{asChild:!0,...l,focusable:!a,active:b,children:ne.jsx(iN,{disabled:a,required:i.required,checked:b,...u,...o,name:i.name,ref:m,onCheck:()=>i.onValueChange(o.value),onKeyDown:Sn(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:Sn(o.onFocus,()=>{var _;C.current&&((_=p.current)==null||_.click())})})})});hN.displayName=fN;var BV="RadioGroupIndicator",pN=ge.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=uN(n);return ne.jsx(sN,{...o,...r,ref:t})});pN.displayName=BV;var gN=dN,mN=hN,WV=pN;const yN=ge.forwardRef(({className:e,...t},n)=>ne.jsx(gN,{className:sr("ve-grid ve-gap-2",e),...t,ref:n}));yN.displayName=gN.displayName;const hg=ge.forwardRef(({className:e,...t},n)=>ne.jsx(mN,{ref:n,className:sr("ve-aspect-square ve-h-4 ve-w-4 ve-rounded-full ve-border ve-border-[#dcdcdc] ve-ring-offset focus:ve-outline-none focus-visible:ve-ring-2 focus-visible:ve-ring-offset-2 disabled:ve-cursor-not-allowed disabled:ve-opacity-50",e),...t,children:ne.jsx(WV,{className:"ve-flex ve-items-center ve-justify-center",children:ne.jsx($$,{className:"ve-h-2.5 ve-w-2.5 ve-fill-current ve-text-current"})})}));hg.displayName=mN.displayName;var zV="Label",vN=ge.forwardRef((e,t)=>ne.jsx(Dn.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));vN.displayName=zV;var bN=vN;const HV=kr("ve-text-sm ve-font-medium ve-leading-none peer-disabled:ve-cursor-not-allowed peer-disabled:ve-opacity-70"),pg=ge.forwardRef(({className:e,...t},n)=>ne.jsx(bN,{ref:n,className:sr(HV(),e),...t}));pg.displayName=bN.displayName;function ey(e){const t=[];return e.fields.forEach(n=>{t.push(GV(e,n))}),ne.jsx(ne.Fragment,{children:t})}function GV(e,t){return ne.jsx(Hn.FieldLabel,{label:t.label,className:"ve-inline-block ve-pt-4",children:ne.jsx(Hn.AutoField,{field:{type:t.fieldType},value:e.value[t.field],onChange:n=>{e.onChange({...e.value,[t.field]:n})}})},`constant-${t.field}-label`)}const KV={type:"custom",render:({onChange:e,value:t})=>ey({onChange:e,value:t,fields:[{label:"Alternate Text",field:"alternateText",fieldType:"text"},{label:"URL",field:"url",fieldType:"text"},{label:"Height",field:"height",fieldType:"number"},{label:"Width",field:"width",fieldType:"number"}]})},pb={type:"text"},UV={type:"custom",render:({onChange:e,value:t})=>ey({onChange:e,value:t,fields:[{label:"Line 1",field:"line1",fieldType:"text"},{label:"Line 2",field:"line2",fieldType:"text"},{label:"Line 3",field:"line3",fieldType:"text"},{label:"City",field:"city",fieldType:"text"},{label:"State/Region",field:"region",fieldType:"text"},{label:"Sublocality",field:"sublocality",fieldType:"text"},{label:"Postal Code",field:"postalCode",fieldType:"text"},{label:"Country Code",field:"countryCode",fieldType:"text"}]})},gb="#969696",VV={type:"custom",render:({onChange:e,value:t})=>{const[n,r]=H.useState(t),o=(l,u)=>{const p=[...n];p[l]=u,r(p),e(p)},i=l=>{const u=n.filter((p,m)=>m!==l);r(u),e(u)},a=()=>{r([...n,""])};return ne.jsxs("div",{children:[n.map((l,u)=>ne.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"8px",gap:"4px"},children:[ne.jsx(Hn.AutoField,{field:{type:"text"},value:l,onChange:p=>o(u,p)}),ne.jsx("span",{style:{color:gb},children:ne.jsx(Hn.IconButton,{onClick:()=>i(u),variant:"secondary",title:"Delete",disabled:n.length===1,children:ne.jsx(F$,{})})})]},u)),ne.jsx("span",{style:{color:gb,width:"auto"},children:ne.jsx(Hn.Button,{onClick:a,variant:"secondary",icon:ne.jsx(P$,{}),fullWidth:!0,children:ne.jsx(ne.Fragment,{})})})]})}},YV={type:"custom",render:({onChange:e,value:t})=>ey({onChange:e,value:t,fields:[{label:"Label",field:"label",fieldType:"text"},{label:"Link",field:"link",fieldType:"text"}]})},gg=new Ur,qV={"type.string":pb,"type.phone":pb,"type.image":KV,"type.address":UV,"type.cta":YV},ZV=(e,t)=>{if(t)return VV;const n=qV[e];if(!n){gg.log(`No constant configuration for ${e}`);return}return n},JV=(e,t)=>{let n;for(const r of e){const o=ZV(r,t);if(!o){gg.log(`No mapped configuration for ${r}`);return}if(n||(n=o),n!==o){gg.log(`Could not resolve configuration for ${r}`);return}}return n},_r=e=>{const t=JV(e.filter.types,!!e.filter.includeListsOnly);return{type:"custom",label:e.label,render:({field:n,value:r,onChange:o})=>{const i=yV(e.filter),a=l=>{o({field:(r==null?void 0:r.field)??"",constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:l})};return ne.jsxs(ne.Fragment,{children:[!!t&&ne.jsx(XV,{constantValueEnabled:r==null?void 0:r.constantValueEnabled,toggleConstantValueEnabled:a}),r!=null&&r.constantValueEnabled?ne.jsx(Hn.FieldLabel,{label:"Constant Value",className:"entityField-constantValue",children:t&&ne.jsx(Hn.AutoField,{onChange:l=>o({field:(r==null?void 0:r.field)??"",constantValue:l,constantValueEnabled:!0}),value:r==null?void 0:r.constantValue,field:t})}):ne.jsx(Hn.FieldLabel,{label:n.label||"Label is undefined",className:"ve-mt-2.5",children:ne.jsx(Hn.AutoField,{field:{type:"select",options:[{value:"",label:"Select a Content field"},...i.map(l=>({label:l.name,value:l.name}))]},onChange:l=>{o({field:l,constantValue:(r==null?void 0:r.constantValue)??"",constantValueEnabled:!1})},value:r==null?void 0:r.field})})]})}}},XV=({constantValueEnabled:e,toggleConstantValueEnabled:t})=>ne.jsx("div",{className:"ve-mb-2 ve-w-full",children:ne.jsxs(yN,{defaultValue:(e==null?void 0:e.toString())??"false",children:[ne.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[ne.jsx(hg,{value:"false",id:"ve-use-entity-value",onClick:()=>t(!1)}),ne.jsx(pg,{htmlFor:"ve-use-entity-value",children:"Use Entity Value"})]}),ne.jsxs("div",{className:"ve-flex ve-items-center ve-space-x-2",children:[ne.jsx(hg,{value:"true",id:"ve-use-constant-value",onClick:()=>t(!0)}),ne.jsx(pg,{htmlFor:"ve-use-constant-value",children:"Use Constant Value"})]})]})}),QV=({label:e,defaultCustomValue:t})=>({type:"custom",render:({onChange:n,value:r})=>ne.jsxs(Hn.FieldLabel,{label:e,children:[ne.jsx(Hn.AutoField,{field:{type:"radio",options:[{value:"default",label:"Default"},{value:"custom",label:"Custom"}]},onChange:o=>n(o==="default"?"default":t),value:r==="default"?"default":"custom"}),r!=="default"&&ne.jsx(Hn.AutoField,{field:{type:"number"},value:r,onChange:n})]})}),e9=[{label:"Default",value:"default",px:""},{label:"XS",value:"xs",px:"12"},{label:"SM",value:"sm",px:"14"},{label:"Base",value:"base",px:"16"},{label:"LG",value:"lg",px:"18"},{label:"XL",value:"xl",px:"20"},{label:"2XL",value:"2xl",px:"24"},{label:"3XL",value:"3xl",px:"30"},{label:"4XL",value:"4xl",px:"36"},{label:"5XL",value:"5xl",px:"48"},{label:"6XL",value:"6xl",px:"60"},{label:"7XL",value:"7xl",px:"72"},{label:"8XL",value:"8xl",px:"96"},{label:"9XL",value:"9xl",px:"128"}],mb=e=>{if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}if(e.endsWith("%")){const t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)/100*t}throw new Error("Unknown font size unit")},t9=(e,t)=>{var r,o;const n=(o=(r=e==null?void 0:e.theme)==null?void 0:r.extend)==null?void 0:o.fontSize[t];return typeof n=="string"?mb(n):Array.isArray(n)&&n.length>0?mb(n[0]):0},n9=(e,t)=>e.map(n=>{const r=t9(t,n.value),o=r?r.toString():n.px;return{label:n.label+(n.px?` (${o}px)`:""),value:n.value}}),Pa=e=>({type:"custom",render:({value:t,onChange:n})=>{const r=dE();return ne.jsx(Hn.FieldLabel,{label:e??"Font Size",icon:ne.jsx(Qg,{size:16}),children:ne.jsx(Hn.AutoField,{value:t,onChange:n,field:{type:"select",options:n9(e9,r)}})})}}),_N=kr("components font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"}}),th=ge.forwardRef(({className:e,fontSize:t,fontWeight:n,color:r,textTransform:o,...i},a)=>ne.jsx("p",{className:jr(_N({fontSize:t,fontWeight:n,color:r,textTransform:o,className:e}),e),ref:a,...i,children:i.children}));th.displayName="Body";const xN=kr("py-4 components inline-flex items-center justify-center whitespace-nowrap rounded-button-borderRadius font-body-fontFamily font-button-fontWeight ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"bg-button-backgroundColor text-button-textColor border-2 border-button-backgroundColor hover:border-button-textColor focus:border-button-textColor active:bg-button-textColor active:text-button-backgroundColor active:border-button-backgroundColor",link:"text-button-textColor underline-offset-4 underline"},size:{default:"w-full md:w-fit h-10 px-4 py-2",small:"h-9 px-3",large:"h-11 px-8",icon:"h-10 w-10"},fontSize:{default:"text-button-fontSize",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},borderRadius:{default:"",none:"rounded-none",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default"}}),nh=ge.forwardRef(({className:e,variant:t,size:n,borderRadius:r,asChild:o=!1,fontSize:i,...a},l)=>{const u=o?xs:"button";return ne.jsx(u,{className:jr(xN({variant:t,size:n,borderRadius:r,fontSize:i}),e),ref:l,...a})});nh.displayName="Button";var r9=Object.defineProperty,o9=(e,t,n)=>t in e?r9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,so=(e,t,n)=>o9(e,typeof t!="symbol"?t+"":t,n),yb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function i9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mg={exports:{}},fu={};/**
|
|
204
|
-
* @license React
|
|
205
|
-
* react-jsx-runtime.production.min.js
|
|
206
|
-
*
|
|
207
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the MIT license found in the
|
|
210
|
-
* LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/var vb;function a9(){if(vb)return fu;vb=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(l,u,p){var m,b={},C=null,_=null;p!==void 0&&(C=""+p),u.key!==void 0&&(C=""+u.key),u.ref!==void 0&&(_=u.ref);for(m in u)r.call(u,m)&&!i.hasOwnProperty(m)&&(b[m]=u[m]);if(l&&l.defaultProps)for(m in u=l.defaultProps,u)b[m]===void 0&&(b[m]=u[m]);return{$$typeof:t,type:l,key:C,ref:_,props:b,_owner:o.current}}return fu.Fragment=n,fu.jsx=a,fu.jsxs=a,fu}var Bd={};/**
|
|
212
|
-
* @license React
|
|
213
|
-
* react-jsx-runtime.development.js
|
|
214
|
-
*
|
|
215
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the MIT license found in the
|
|
218
|
-
* LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/var bb;function s9(){return bb||(bb=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function T(Ee){if(Ee===null||typeof Ee!="object")return null;var ae=y&&Ee[y]||Ee[v];return typeof ae=="function"?ae:null}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(Ee){{for(var ae=arguments.length,$e=new Array(ae>1?ae-1:0),je=1;je<ae;je++)$e[je-1]=arguments[je];k("error",Ee,$e)}}function k(Ee,ae,$e){{var je=O.ReactDebugCurrentFrame,at=je.getStackAddendum();at!==""&&(ae+="%s",$e=$e.concat([at]));var xt=$e.map(function(bt){return String(bt)});xt.unshift("Warning: "+ae),Function.prototype.apply.call(console[Ee],console,xt)}}var P=!1,M=!1,Y=!1,X=!1,oe=!1,Z;Z=Symbol.for("react.module.reference");function U(Ee){return!!(typeof Ee=="string"||typeof Ee=="function"||Ee===r||Ee===i||oe||Ee===o||Ee===p||Ee===m||X||Ee===_||P||M||Y||typeof Ee=="object"&&Ee!==null&&(Ee.$$typeof===C||Ee.$$typeof===b||Ee.$$typeof===a||Ee.$$typeof===l||Ee.$$typeof===u||Ee.$$typeof===Z||Ee.getModuleId!==void 0))}function Q(Ee,ae,$e){var je=Ee.displayName;if(je)return je;var at=ae.displayName||ae.name||"";return at!==""?$e+"("+at+")":$e}function de(Ee){return Ee.displayName||"Context"}function pe(Ee){if(Ee==null)return null;if(typeof Ee.tag=="number"&&R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Ee=="function")return Ee.displayName||Ee.name||null;if(typeof Ee=="string")return Ee;switch(Ee){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if(typeof Ee=="object")switch(Ee.$$typeof){case l:var ae=Ee;return de(ae)+".Consumer";case a:var $e=Ee;return de($e._context)+".Provider";case u:return Q(Ee,Ee.render,"ForwardRef");case b:var je=Ee.displayName||null;return je!==null?je:pe(Ee.type)||"Memo";case C:{var at=Ee,xt=at._payload,bt=at._init;try{return pe(bt(xt))}catch{return null}}}return null}var te=Object.assign,fe=0,V,j,ee,re,B,W,J;function F(){}F.__reactDisabledLog=!0;function w(){{if(fe===0){V=console.log,j=console.info,ee=console.warn,re=console.error,B=console.group,W=console.groupCollapsed,J=console.groupEnd;var Ee={configurable:!0,enumerable:!0,value:F,writable:!0};Object.defineProperties(console,{info:Ee,log:Ee,warn:Ee,error:Ee,group:Ee,groupCollapsed:Ee,groupEnd:Ee})}fe++}}function N(){{if(fe--,fe===0){var Ee={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},Ee,{value:V}),info:te({},Ee,{value:j}),warn:te({},Ee,{value:ee}),error:te({},Ee,{value:re}),group:te({},Ee,{value:B}),groupCollapsed:te({},Ee,{value:W}),groupEnd:te({},Ee,{value:J})})}fe<0&&R("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=O.ReactCurrentDispatcher,q;function ue(Ee,ae,$e){{if(q===void 0)try{throw Error()}catch(at){var je=at.stack.trim().match(/\n( *(at )?)/);q=je&&je[1]||""}return`
|
|
220
|
-
`+q+Ee}}var he=!1,se;{var Ce=typeof WeakMap=="function"?WeakMap:Map;se=new Ce}function Oe(Ee,ae){if(!Ee||he)return"";{var $e=se.get(Ee);if($e!==void 0)return $e}var je;he=!0;var at=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xt;xt=I.current,I.current=null,w();try{if(ae){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(Cn){je=Cn}Reflect.construct(Ee,[],bt)}else{try{bt.call()}catch(Cn){je=Cn}Ee.call(bt.prototype)}}else{try{throw Error()}catch(Cn){je=Cn}Ee()}}catch(Cn){if(Cn&&je&&typeof Cn.stack=="string"){for(var ht=Cn.stack.split(`
|
|
221
|
-
`),At=je.stack.split(`
|
|
222
|
-
`),Ut=ht.length-1,Mt=At.length-1;Ut>=1&&Mt>=0&&ht[Ut]!==At[Mt];)Mt--;for(;Ut>=1&&Mt>=0;Ut--,Mt--)if(ht[Ut]!==At[Mt]){if(Ut!==1||Mt!==1)do if(Ut--,Mt--,Mt<0||ht[Ut]!==At[Mt]){var Yt=`
|
|
223
|
-
`+ht[Ut].replace(" at new "," at ");return Ee.displayName&&Yt.includes("<anonymous>")&&(Yt=Yt.replace("<anonymous>",Ee.displayName)),typeof Ee=="function"&&se.set(Ee,Yt),Yt}while(Ut>=1&&Mt>=0);break}}}finally{he=!1,I.current=xt,N(),Error.prepareStackTrace=at}var mn=Ee?Ee.displayName||Ee.name:"",Er=mn?ue(mn):"";return typeof Ee=="function"&&se.set(Ee,Er),Er}function Be(Ee,ae,$e){return Oe(Ee,!1)}function ce(Ee){var ae=Ee.prototype;return!!(ae&&ae.isReactComponent)}function le(Ee,ae,$e){if(Ee==null)return"";if(typeof Ee=="function")return Oe(Ee,ce(Ee));if(typeof Ee=="string")return ue(Ee);switch(Ee){case p:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof Ee=="object")switch(Ee.$$typeof){case u:return Be(Ee.render);case b:return le(Ee.type,ae,$e);case C:{var je=Ee,at=je._payload,xt=je._init;try{return le(xt(at),ae,$e)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Me={},Pe=O.ReactDebugCurrentFrame;function We(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Pe.setExtraStackFrame($e)}else Pe.setExtraStackFrame(null)}function Xe(Ee,ae,$e,je,at){{var xt=Function.call.bind(ve);for(var bt in Ee)if(xt(Ee,bt)){var ht=void 0;try{if(typeof Ee[bt]!="function"){var At=Error((je||"React class")+": "+$e+" type `"+bt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Ee[bt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw At.name="Invariant Violation",At}ht=Ee[bt](ae,bt,je,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ut){ht=Ut}ht&&!(ht instanceof Error)&&(We(at),R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",$e,bt,typeof ht),We(null)),ht instanceof Error&&!(ht.message in Me)&&(Me[ht.message]=!0,We(at),R("Failed %s type: %s",$e,ht.message),We(null))}}}var st=Array.isArray;function dt(Ee){return st(Ee)}function Ct(Ee){{var ae=typeof Symbol=="function"&&Symbol.toStringTag,$e=ae&&Ee[Symbol.toStringTag]||Ee.constructor.name||"Object";return $e}}function Se(Ee){try{return me(Ee),!1}catch{return!0}}function me(Ee){return""+Ee}function _e(Ee){if(Se(Ee))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ct(Ee)),me(Ee)}var De=O.ReactCurrentOwner,Fe={key:!0,ref:!0,__self:!0,__source:!0},ke,ze,tt;tt={};function ut(Ee){if(ve.call(Ee,"ref")){var ae=Object.getOwnPropertyDescriptor(Ee,"ref").get;if(ae&&ae.isReactWarning)return!1}return Ee.ref!==void 0}function Et(Ee){if(ve.call(Ee,"key")){var ae=Object.getOwnPropertyDescriptor(Ee,"key").get;if(ae&&ae.isReactWarning)return!1}return Ee.key!==void 0}function Bt(Ee,ae){if(typeof Ee.ref=="string"&&De.current&&ae&&De.current.stateNode!==ae){var $e=pe(De.current.type);tt[$e]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',pe(De.current.type),Ee.ref),tt[$e]=!0)}}function Qe(Ee,ae){{var $e=function(){ke||(ke=!0,R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"key",{get:$e,configurable:!0})}}function et(Ee,ae){{var $e=function(){ze||(ze=!0,R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ae))};$e.isReactWarning=!0,Object.defineProperty(Ee,"ref",{get:$e,configurable:!0})}}var lt=function(Ee,ae,$e,je,at,xt,bt){var ht={$$typeof:t,type:Ee,key:ae,ref:$e,props:bt,_owner:xt};return ht._store={},Object.defineProperty(ht._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ht,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(ht,"_source",{configurable:!1,enumerable:!1,writable:!1,value:at}),Object.freeze&&(Object.freeze(ht.props),Object.freeze(ht)),ht};function wt(Ee,ae,$e,je,at){{var xt,bt={},ht=null,At=null;$e!==void 0&&(_e($e),ht=""+$e),Et(ae)&&(_e(ae.key),ht=""+ae.key),ut(ae)&&(At=ae.ref,Bt(ae,at));for(xt in ae)ve.call(ae,xt)&&!Fe.hasOwnProperty(xt)&&(bt[xt]=ae[xt]);if(Ee&&Ee.defaultProps){var Ut=Ee.defaultProps;for(xt in Ut)bt[xt]===void 0&&(bt[xt]=Ut[xt])}if(ht||At){var Mt=typeof Ee=="function"?Ee.displayName||Ee.name||"Unknown":Ee;ht&&Qe(bt,Mt),At&&et(bt,Mt)}return lt(Ee,ht,At,at,je,De.current,bt)}}var _t=O.ReactCurrentOwner,Rt=O.ReactDebugCurrentFrame;function qe(Ee){if(Ee){var ae=Ee._owner,$e=le(Ee.type,Ee._source,ae?ae.type:null);Rt.setExtraStackFrame($e)}else Rt.setExtraStackFrame(null)}var ot;ot=!1;function yt(Ee){return typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===t}function kt(){{if(_t.current){var Ee=pe(_t.current.type);if(Ee)return`
|
|
224
|
-
|
|
225
|
-
Check the render method of \``+Ee+"`."}return""}}function Dt(Ee){return""}var Kt={};function sn(Ee){{var ae=kt();if(!ae){var $e=typeof Ee=="string"?Ee:Ee.displayName||Ee.name;$e&&(ae=`
|
|
226
|
-
|
|
227
|
-
Check the top-level render call using <`+$e+">.")}return ae}}function ur(Ee,ae){{if(!Ee._store||Ee._store.validated||Ee.key!=null)return;Ee._store.validated=!0;var $e=sn(ae);if(Kt[$e])return;Kt[$e]=!0;var je="";Ee&&Ee._owner&&Ee._owner!==_t.current&&(je=" It was passed a child from "+pe(Ee._owner.type)+"."),qe(Ee),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,je),qe(null)}}function wr(Ee,ae){{if(typeof Ee!="object")return;if(dt(Ee))for(var $e=0;$e<Ee.length;$e++){var je=Ee[$e];yt(je)&&ur(je,ae)}else if(yt(Ee))Ee._store&&(Ee._store.validated=!0);else if(Ee){var at=T(Ee);if(typeof at=="function"&&at!==Ee.entries)for(var xt=at.call(Ee),bt;!(bt=xt.next()).done;)yt(bt.value)&&ur(bt.value,ae)}}}function Xo(Ee){{var ae=Ee.type;if(ae==null||typeof ae=="string")return;var $e;if(typeof ae=="function")$e=ae.propTypes;else if(typeof ae=="object"&&(ae.$$typeof===u||ae.$$typeof===b))$e=ae.propTypes;else return;if($e){var je=pe(ae);Xe($e,Ee.props,"prop",je,Ee)}else if(ae.PropTypes!==void 0&&!ot){ot=!0;var at=pe(ae);R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",at||"Unknown")}typeof ae.getDefaultProps=="function"&&!ae.getDefaultProps.isReactClassApproved&&R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function oa(Ee){{for(var ae=Object.keys(Ee.props),$e=0;$e<ae.length;$e++){var je=ae[$e];if(je!=="children"&&je!=="key"){qe(Ee),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),qe(null);break}}Ee.ref!==null&&(qe(Ee),R("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}function Tr(Ee,ae,$e,je,at,xt){{var bt=U(Ee);if(!bt){var ht="";(Ee===void 0||typeof Ee=="object"&&Ee!==null&&Object.keys(Ee).length===0)&&(ht+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var At=Dt();At?ht+=At:ht+=kt();var Ut;Ee===null?Ut="null":dt(Ee)?Ut="array":Ee!==void 0&&Ee.$$typeof===t?(Ut="<"+(pe(Ee.type)||"Unknown")+" />",ht=" Did you accidentally export a JSX literal instead of a component?"):Ut=typeof Ee,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ut,ht)}var Mt=wt(Ee,ae,$e,at,xt);if(Mt==null)return Mt;if(bt){var Yt=ae.children;if(Yt!==void 0)if(je)if(dt(Yt)){for(var mn=0;mn<Yt.length;mn++)wr(Yt[mn],Ee);Object.freeze&&Object.freeze(Yt)}else R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else wr(Yt,Ee)}return Ee===r?oa(Mt):Xo(Mt),Mt}}function Yn(Ee,ae,$e){return Tr(Ee,ae,$e,!0)}function xr(Ee,ae,$e){return Tr(Ee,ae,$e,!1)}var ho=xr,ia=Yn;Bd.Fragment=r,Bd.jsx=ho,Bd.jsxs=ia}()),Bd}process.env.NODE_ENV==="production"?mg.exports=a9():mg.exports=s9();var an=mg.exports;function l9(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const c9={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},_b={GOOGLE:"google",APPLE:"apple",BING:"bing"},u9=(e,t)=>{const n={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return n&&t[n]},EN=(e,t=[],n,r={route:!1},o)=>{const i="Failed to construct query for maps service.";let a=e&&wb([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case _b.APPLE:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return xb(`${o.latitude},${o.longitude}`,r.route);if(!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return xb(a,r.route)}case _b.BING:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Eb(`${o.latitude},${o.longitude}`,r.route);if(a=e&&wb([e.line1,e.city,e.region,e.postalCode]),!a){console.warn(`${i} Check that you've provided a valid Yext Address.`);break}return Eb(a,r.route)}default:{if(o!=null&&o.latitude&&o!=null&&o.longitude)return Cb(`${o.latitude},${o.longitude}`,r.route);const l=t.find(u=>{var p;return((p=u==null?void 0:u.publisher)==null?void 0:p.toUpperCase())===c9.GOOGLEMYBUSINESS});if(l!=null&&l.listingUrl)return l.listingUrl;if(!a){console.warn(`${i} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return Cb(a,r.route)}}},xb=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,Eb=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,Cb=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,wb=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},d9=({address:e,lines:t,separator:n=",",...r})=>{const o=(t||l9(e.countryCode)).map(i=>an.jsx(f9,{address:e,line:i,separator:n},i.toString()));return H.createElement("div",{...r,key:e.toString()},o)},f9=({address:e,line:t,separator:n})=>{const r=[];for(const o of t){if(o===","){r.push(an.jsx("span",{children:n},o));continue}const i=e[o];if(!i)continue;const a=u9(o,e);if(a){r.push(an.jsxs(ge.Fragment,{children:[" ",an.jsx("abbr",{title:a,children:i})]},o));continue}r.push(an.jsx("span",{children:" "+i},o))}return an.jsx("div",{className:"address-line",children:r})};var pc={};Object.defineProperty(pc,"__esModule",{value:!0});var h9=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p9=typeof window<"u"&&typeof window.document<"u",g9=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,m9=(typeof self>"u"?"undefined":h9(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",y9=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),v9=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Tb=pc.isBrowser=p9;pc.isWebWorker=m9;var b9=pc.isNode=g9;pc.isJsDom=y9;var _9=pc.isDeno=v9;class x9{constructor(){so(this,"name"),so(this,"isServerSide"),so(this,"version");var t;_9?(this.name="deno",this.version="",Tb&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):b9?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Tb?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const CN=()=>new x9,E9=H.createContext(null);H.lazy(()=>Promise.resolve().then(()=>require("./debugger-C-GK2f4q-BCULTx7R.cjs")));const C9=H.createContext({name:""}),w9=()=>H.useContext(C9).name;function T9(){const e=H.useContext(E9);if(!e)return e;CN().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=w9();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const ys={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},N9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const o=e.pathname.replace(/^\//,"").split("/");if(o.length<2||o.length>3){console.error(`Invalid path: ${e}`);return}let i;if(o[0]==="f")i="prod";else switch(o[0].replace("f-","")){case"sandbox":{i="sbx";break}case"qa":{i="qa";break}case"dev":{i="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(i==="dev"||i==="sbx")){console.error(`Invalid path: ${e}`);return}let a;if(o.length===3&&(a=parseInt(o[1]),Number.isNaN(a))){console.error(`Invalid account id: ${e}`);return}const l=o[o.length-1].split("."),u=l.length===2?`.${l[1]}`:"",p=l[0];return{scheme:t,partition:r,env:i,accountId:a,contentHash:p,extension:u}},S9=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let o="f";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}const i=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${o}/${i}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},O9=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const o=n[1];let i;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(i=parseFloat(n[2]),Number.isNaN(i)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const a=n[n.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:t,env:r,contentHash:o,aspectRatio:i,name:u,extension:l}},A9=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let o="p";switch(e.env){case"prod":break;case"sbx":{o+="-sandbox";break}default:o+=`-${e.env.toString()}`}return`${r}/${o}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},yg=(e,t,n)=>{if(!wN(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const o=O9(r);if(o)return A9(o,t,n)}else if(r.pathname.startsWith("/f")){const o=N9(r);if(o)return S9(o,t,n)}return e},wN=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},ty=({image:e,className:t,width:n,height:r,aspectRatio:o,layout:i=ys.INTRINSIC,placeholder:a,imgOverrides:l,style:u={},loading:p="lazy"})=>{const m=H.useRef(null),[b,C]=H.useState(!1),_="image"in e?e.image:e;H.useEffect(()=>{var oe;(oe=m.current)!=null&&oe.complete&&C(!0)},[]),R9(i,_.width,_.height,n,r,o);const y=Math.abs(_.width);y||console.warn("Invalid image width.");const v=Math.abs(_.height);if(v||console.warn("Invalid image height."),!wN(_.url))return console.error(`Invalid image url: ${_.url}`),an.jsx(an.Fragment,{children:a!=null&&a});const T=n&&n>0?n:void 0,O=r&&r>0?r:void 0,{src:R,imgStyle:k,widths:P}=$9(i,y,v,u,_.url,T,O,o),M=P.map(oe=>`${yg(_.url,oe,v/y*oe)} ${oe}w`).join(", "),Y=[640,768,1024,1280,1536],X=P.map((oe,Z)=>Z===P.length-1?`${oe}px`:`(max-width: ${Y[Z]}px) ${oe}px`).join(", ");return an.jsxs(an.Fragment,{children:[!b&&a!=null&&a,an.jsx("img",{ref:m,style:k,src:R,className:t,width:T,height:O,srcSet:M,sizes:X,loading:p,alt:_.alternateText||"",...l})]})},R9=(e,t,n,r,o,i)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===ys.FIXED){if(!r&&!o){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),o&&o<0&&console.warn(`Using fixed layout but height is invalid: ${o}.`);return}(r||o)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===ys.ASPECT&&!i&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},$9=(e,t,n,r,o,i,a,l)=>{let u=[100,320,640,960,1280,1920],p=yg(o,500,500);const m={...r};switch(m.objectFit=m.objectFit||"cover",m.objectPosition=m.objectPosition||"center",e){case ys.INTRINSIC:m.maxWidth=t,m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FIXED:{const{fixedWidth:b,fixedHeight:C,fixedWidths:_}=D9(t,n,u,i,a);m.width=b,m.height=C,u=_,p=yg(o,b,C);break}case ys.ASPECT:m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;case ys.FILL:m.width="100%",m.aspectRatio=l?`${l}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:p,imgStyle:m,widths:u}},D9=(e,t,n,r,o)=>r&&o?{fixedWidth:r,fixedHeight:o,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:o?{fixedWidth:o/t*e,fixedHeight:o,fixedWidths:[o/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var TN={exports:{}};/*!
|
|
228
|
-
Copyright (c) 2018 Jed Watson.
|
|
229
|
-
Licensed under the MIT License (MIT), see
|
|
230
|
-
http://jedwatson.github.io/classnames
|
|
231
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var l=n.apply(null,i);l&&r.push(l)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(TN);var k9=TN.exports;const ku=i9(k9),Nb=e=>e.linkType==="Email"||!e.linkType&&NN(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,NN=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),M9=e=>"href"in e,rh=H.forwardRef(function(e,t){const n=M9(e)?{link:e.href}:e.cta,{children:r,onClick:o,className:i,eventName:a,scope:l,currency:u,amount:p,cta:m,obfuscate:b,customTags:C,customValues:_,...y}=e,v=m?"CTA_CLICK":"LINK",T=a||(m?"cta":"link"),O=T9();if(!(n!=null&&n.link))throw new Error("CTA's link is undefined");const R=b||b!==!1&&NN(n.link),k=async Y=>{const X=Y.currentTarget;let oe="";if(R){Y.preventDefault();const Z=X.href.split("/").at(-1);Z&&(oe=atob(Z))}if(O!==null)try{await O.track({action:v,scope:e.scope,eventName:T,currency:u,amount:p,destinationUrl:oe||X.href,customTags:C,customValues:_})}catch{console.error("Failed to report click Analytics Event")}o&&o(Y),oe&&(window.location.href=oe)},P=R?"Obfuscated, set a label or child":n.link,M={className:ku("Link",i),href:R?btoa(Nb(n)):Nb(n),onClick:k,rel:e.target&&!e.rel?"noopener":void 0,ref:t};return O!=null&&O.getDebugEnabled()&&(M["data-ya-action"]=v,M["data-ya-scopeoverride"]=l,M["data-ya-eventname"]=T),an.jsx("a",{...M,...y,suppressHydrationWarning:!0,children:r||n.label||P})}),vr=Object.freeze({DEGREE:Symbol("deg"),KILOMETER:Symbol("km"),MILE:Symbol("mi"),RADIAN:Symbol("r")}),Wd=Object.freeze({MERCATOR:Symbol("mercator"),SPHERICAL:Symbol("spherical")}),cp=3959,up=6371,P9=["latitude","lat"],I9=["longitude","lon","lng","long"];function Sb(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Ob(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function vs(e){return e*Math.PI/180}function Ki(e){return e/Math.PI*180}function L9(e,t){const n=vs(e.latitude),r=vs(t.latitude),o=r-n,i=vs(t.longitude-e.longitude),a=Math.pow(Math.sin(o/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(i/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function F9(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function j9(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(n)*360/Math.PI-90}class gc{constructor(t,n){let r=t;typeof t=="object"&&(r=Sb(t,P9),n=Sb(t,I9),r=typeof r=="function"?r():r,n=typeof n=="function"?n():n),this.latitude=r,this.longitude=n}get latitude(){return this._lat}get longitude(){return this._lon}get normalLon(){return((this._lon+180)%360+360)%360-180}set latitude(t){this._lat=Math.max(-90,Math.min(Ob(t),90))}set longitude(t){this._lon=Ob(t)}add(t,n,r=vr.DEGREE,o=Wd.SPHERICAL){if(o===Wd.MERCATOR&&(r===vr.DEGREE||r===vr.RADIAN)){const i=r===vr.DEGREE?vs(t):t,a=r===vr.DEGREE?n:Ki(n);this.latitude=j9(this.latitude,i),this.longitude+=a}else switch(r){case vr.DEGREE:this.latitude+=t,this.longitude+=n;break;case vr.KILOMETER:this.latitude+=Ki(t)*up,this.longitude+=Ki(n)*up*Math.cos(vs(this.latitude));break;case vr.MILE:this.latitude+=Ki(t)*cp,this.longitude+=Ki(n)*cp*Math.cos(vs(this.latitude));break;case vr.RADIAN:this.latitude+=Ki(t),this.longitude+=Ki(n);break;default:throw new Error(`unit unhandled: ${r}`)}}distanceTo(t,n=vr.MILE,r=Wd.SPHERICAL){if(r===Wd.MERCATOR&&(n===vr.DEGREE||n===vr.RADIAN)){const o=F9(this.latitude,t.latitude),i=Math.abs(t.normalLon-this.normalLon),a=vs(Math.min(i,360-i)),l=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));switch(n){case vr.DEGREE:return Ki(l);case vr.RADIAN:return l;default:throw new Error(`unit unhandled: ${n}`)}}else{const o=L9(this,t);switch(n){case vr.DEGREE:return Ki(o);case vr.KILOMETER:return o*up;case vr.MILE:return o*cp;case vr.RADIAN:return o;default:throw new Error(`unit unhandled: ${n}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function SN(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}const Gl={UNDEFINED:"undefined",NULL:"object",BOOLEAN:"boolean",NUMBER:"number",BIGINT:"bigint",STRING:"string",SYMBOL:"symbol",FUNCTION:"function",OBJECT:"object"};function Kl(e,t){if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Zl(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class B9{constructor(t,n){Zl(t,ry),Zl(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Kl(t,Gl.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Kl(t,Gl.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class mc{constructor(t){Zl(t,B9),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class W9{constructor(t){Zl(t,ry),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={}}withClickHandler(t){return Kl(t,Gl.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Kl(t,Gl.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Kl(t,Gl.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}build(){const t=this.providerPinClass;return new t(this)}}class ny{constructor(t){Zl(t,W9),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const z9=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class oh extends ny{static get baseStyle(){return z9}constructor(t){super(t),this._pinEl=document.createElement("button"),Object.assign(this._pinEl.style,this.constructor.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}addListeners(){this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const n=t.getClass(),r=t.getElement()||this._pinEl,o=t.getZIndex();r.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=o,this._wrapper.setAttribute("class",n),r!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(r)))}setElementProperties(t){const n=t.getAnchorX(),r=t.getAnchorY(),o=t.getHeight(),i=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:o+"px",transform:`translate(${-100*n}%, ${-100*r}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class Ms{constructor(){this.loadFunction=(t,n,r,o)=>t(),this.mapClass=mc,this.pinClass=ny,this.providerName=""}withLoadFunction(t){return Kl(t,Gl.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new ry(this)}}class ry{constructor(t){Zl(t,Ms),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){this._loadInvoked||(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}const Ab={GEOCODER:"geocoder",PLACES:"places"};class H9 extends mc{constructor(t){super(t),this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()})}getCenter(){return new gc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new google.maps.LatLng(t.latitude,t.longitude);n?this.map.panTo(r):this.map.setCenter(r)}setZoom(t,n){this.map.setZoom(Math.floor(t))}setZoomCenter(t,n,r){this.setCenter(n,r),this.setZoom(t,r)}}class G9 extends oh{constructor(t){super(t),this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper);const n=this;class r extends google.maps.OverlayView{draw(){var i;const a=(i=this.getProjection())==null?void 0:i.fromLatLngToDivPixel(n._latLng);a&&(n._wrapper.style.left=a.x+"px",n._wrapper.style.top=a.y+"px")}onAdd(){this.getPanes().floatPane.appendChild(n._wrapper)}onRemove(){var i;(i=n._wrapper.parentNode)==null||i.removeChild(n._wrapper)}}this.pin=new r}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,n){this.pin.setMap(t?t.getProviderMap().map:null)}}const Rb="GoogleMapsCallback_b7d77ff2",K9="https://maps.googleapis.com/maps/api/js";function U9(e,t,n,{autocomplete:r=!1,channel:o=window.location.hostname,client:i,language:a,region:l,libraries:u=[],loading:p="async",params:m={}}={}){window[Rb]=e,r&&u.push(Ab.GEOCODER,Ab.PLACES);const b={callback:Rb,channel:o,libraries:u.join(","),...m};n&&(b.key=n),i&&(b.client=i),a&&(b.language=a),l&&(b.region=l),p&&(b.loading=p),SN(K9+"?"+Object.entries(b).map(([C,_])=>C+"="+_).join("&"))}new Ms().withLoadFunction(U9).withMapClass(H9).withPinClass(G9).withProviderName("Google").build();H.createContext(null);H.createContext(null);var dp={},hu={},$b;function V9(){if($b)return hu;$b=1;var e=H;const t=e.createContext(null);function n(o,i){let a=null;o!=null&&(a=o[1]);function l(){return i??(a!=null?a.getTheme():null)}return{getTheme:l}}function r(){const o=e.useContext(t);if(o==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return o}return hu.LexicalComposerContext=t,hu.createLexicalComposerContext=n,hu.useLexicalComposerContext=r,hu}var pu={},Db;function Y9(){if(Db)return pu;Db=1;var e=H;function t(r){let o=new URLSearchParams;o.append("code",r);for(let i=1;i<arguments.length;i++)o.append("v",arguments[i]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${o} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return pu.LexicalComposerContext=n,pu.createLexicalComposerContext=function(r,o){let i=null;return r!=null&&(i=r[1]),{getTheme:function(){return o??(i!=null?i.getTheme():null)}}},pu.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},pu}var kb,Mb;function cr(){return Mb||(Mb=1,kb=process.env.NODE_ENV==="development"?V9():Y9()),kb}var Ke={},Pb;function q9(){if(Pb)return Ke;Pb=1;function e(g){return{type:g}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("CLICK_COMMAND"),r=e("DELETE_CHARACTER_COMMAND"),o=e("INSERT_LINE_BREAK_COMMAND"),i=e("INSERT_PARAGRAPH_COMMAND"),a=e("CONTROLLED_TEXT_INSERTION_COMMAND"),l=e("PASTE_COMMAND"),u=e("REMOVE_TEXT_COMMAND"),p=e("DELETE_WORD_COMMAND"),m=e("DELETE_LINE_COMMAND"),b=e("FORMAT_TEXT_COMMAND"),C=e("UNDO_COMMAND"),_=e("REDO_COMMAND"),y=e("KEYDOWN_COMMAND"),v=e("KEY_ARROW_RIGHT_COMMAND"),T=e("MOVE_TO_END"),O=e("KEY_ARROW_LEFT_COMMAND"),R=e("MOVE_TO_START"),k=e("KEY_ARROW_UP_COMMAND"),P=e("KEY_ARROW_DOWN_COMMAND"),M=e("KEY_ENTER_COMMAND"),Y=e("KEY_SPACE_COMMAND"),X=e("KEY_BACKSPACE_COMMAND"),oe=e("KEY_ESCAPE_COMMAND"),Z=e("KEY_DELETE_COMMAND"),U=e("KEY_TAB_COMMAND"),Q=e("INSERT_TAB_COMMAND"),de=e("INDENT_CONTENT_COMMAND"),pe=e("OUTDENT_CONTENT_COMMAND"),te=e("DROP_COMMAND"),fe=e("FORMAT_ELEMENT_COMMAND"),V=e("DRAGSTART_COMMAND"),j=e("DRAGOVER_COMMAND"),ee=e("DRAGEND_COMMAND"),re=e("COPY_COMMAND"),B=e("CUT_COMMAND"),W=e("SELECT_ALL_COMMAND"),J=e("CLEAR_EDITOR_COMMAND"),F=e("CLEAR_HISTORY_COMMAND"),w=e("CAN_REDO_COMMAND"),N=e("CAN_UNDO_COMMAND"),I=e("FOCUS_COMMAND"),q=e("BLUR_COMMAND"),ue=e("KEY_MODIFIER_COMMAND"),he=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",se=he&&"documentMode"in document?document.documentMode:null,Ce=he&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Oe=he&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Be=he&&"InputEvent"in window&&!se?"getTargetRanges"in new window.InputEvent("input"):!1,ce=he&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),le=he&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ve=he&&/Android/.test(navigator.userAgent),Me=he&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Pe=he&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Me,We=1,Xe=3,st=0,dt=1,Ct=2,Se=0,me=1,_e=2,De=1,Fe=2,ke=4,ze=8,tt=16,ut=32,Et=64,Bt=128,Qe=De|Fe|ke|ze|tt|ut|Et|Bt,et=1,lt=2,wt=1,_t=2,Rt=3,qe=4,ot=5,yt=6,kt=" ",Dt=ce||le||Pe?kt:"",Kt=`
|
|
232
|
-
|
|
233
|
-
`,sn=Oe?kt:Dt,ur="֑-߿יִ-﷽ﹰ-ﻼ",wr="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Xo=new RegExp("^[^"+wr+"]*["+ur+"]"),oa=new RegExp("^[^"+ur+"]*["+wr+"]"),Tr={bold:De,code:tt,highlight:Bt,italic:Fe,strikethrough:ke,subscript:ut,superscript:Et,underline:ze},Yn={directionless:et,unmergeable:lt},xr={center:_t,end:yt,justify:qe,left:wt,right:Rt,start:ot},ho={[_t]:"center",[yt]:"end",[qe]:"justify",[wt]:"left",[Rt]:"right",[ot]:"start"},ia={normal:Se,segmented:_e,token:me},Ee={[Se]:"normal",[_e]:"segmented",[me]:"token"},ae=100;let $e=!1,je=0;function at(){return $e}function xt(g){je=g.timeStamp}function bt(g){je===0&&Ao(g).addEventListener("textInput",xt,!0)}function ht(g,c,h){return c.__lexicalLineBreak===g||g[`__lexicalKey_${h._key}`]!==void 0}function At(g){return g.getEditorState().read(()=>{const c=_n();return c!==null?c.clone():null})}function Ut(g,c,h){const E=Br(h._window);let S=null,$=null;E!==null&&E.anchorNode===g&&(S=E.anchorOffset,$=E.focusOffset);const G=g.nodeValue;G!==null&&Hs(c,G,S,$,!1)}function Mt(g,c,h){if(Tt(g)){const E=g.anchor.getNode();if(E.is(h)&&g.format!==E.getFormat())return!1}return c.nodeType===Xe&&h.isAttached()}function Yt(g,c,h){$e=!0;const E=performance.now()-je>ae;try{no(g,()=>{const S=_n()||At(g),$=new Map,G=g.getRootElement(),K=g._editorState,be=g._blockCursorElement;let ye=!1,Ne="";for(let Ae=0;Ae<c.length;Ae++){const Te=c[Ae],He=Te.type,Le=Te.target;let Je=Xr(Le,K);if(!(Je===null&&Le!==G||Bn(Je))){if(He==="characterData")E&&St(Je)&&Mt(S,Le,Je)&&Ut(Le,Je,g);else if(He==="childList"){ye=!0;const ft=Te.addedNodes;for(let Ht=0;Ht<ft.length;Ht++){const Pt=ft[Ht],Zt=js(Pt),jt=Pt.parentNode;if(jt!=null&&Pt!==be&&Zt===null&&(Pt.nodeName!=="BR"||!ht(Pt,jt,g))){if(Oe){const Jt=Pt.innerText||Pt.nodeValue;Jt&&(Ne+=Jt)}jt.removeChild(Pt)}}const Ye=Te.removedNodes,Ft=Ye.length;if(Ft>0){let Ht=0;for(let Pt=0;Pt<Ft;Pt++){const Zt=Ye[Pt];(Zt.nodeName==="BR"&&ht(Zt,Le,g)||be===Zt)&&(Le.appendChild(Zt),Ht++)}Ft!==Ht&&(Le===G&&(Je=Ws(K)),$.set(Le,Je))}}}}if($.size>0)for(const[Ae,Te]of $)if(rt(Te)){const He=Te.getChildrenKeys();let Le=Ae.firstChild;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=g.getElementByKey(ft);Ye!==null&&(Le==null?(Ae.appendChild(Ye),Le=Ye):Le!==Ye&&Ae.replaceChild(Ye,Le),Le=Le.nextSibling)}}else St(Te)&&Te.markDirty();const we=h.takeRecords();if(we.length>0){for(let Ae=0;Ae<we.length;Ae++){const Te=we[Ae],He=Te.addedNodes,Le=Te.target;for(let Je=0;Je<He.length;Je++){const ft=He[Je],Ye=ft.parentNode;Ye!=null&&ft.nodeName==="BR"&&!ht(ft,Le,g)&&Ye.removeChild(ft)}}h.takeRecords()}S!==null&&(ye&&(S.dirty=!0,hr(S)),Oe&&ti(g)&&S.insertRawText(Ne))})}finally{$e=!1}}function mn(g){const c=g._observer;if(c!==null){const h=c.takeRecords();Yt(g,h,c)}}function Er(g){bt(g),g._observer=new MutationObserver((c,h)=>{Yt(g,c,h)})}function Cn(g,c){const h=g.__mode,E=g.__format,S=g.__style,$=c.__mode,G=c.__format,K=c.__style;return(h===null||h===$)&&(E===null||E===G)&&(S===null||S===K)}function qn(g,c){const h=g.mergeWithSibling(c),E=Rn()._normalizedNodes;return E.add(g.__key),E.add(c.__key),h}function Mr(g){let c=g;if(c.__text===""&&c.isSimpleText()&&!c.isUnmergeable()){c.remove();return}let h;for(;(h=c.getPreviousSibling())!==null&&St(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(Cn(h,c)){c=qn(h,c);break}else break;let E;for(;(E=c.getNextSibling())!==null&&St(E)&&E.isSimpleText()&&!E.isUnmergeable();)if(E.__text==="")E.remove();else if(Cn(c,E)){c=qn(c,E);break}else break}function aa(g){return Qo(g.anchor),Qo(g.focus),g}function Qo(g){for(;g.type==="element";){const c=g.getNode(),h=g.offset;let E,S;if(h===c.getChildrenSize()?(E=c.getChildAtIndex(h-1),S=!0):(E=c.getChildAtIndex(h),S=!1),St(E)){g.set(E.__key,S?E.getTextContentSize():0,"text");break}else if(!rt(E))break;g.set(E.__key,S?E.getChildrenSize():0,"element")}}let xc=1;function Ec(){return""+xc++}function Cc(g,c){const h=g._nodes.get(c);if(h===void 0)throw Error(`registeredNode: Type ${c} not found`);return h}const po=typeof queueMicrotask=="function"?queueMicrotask:g=>{Promise.resolve().then(g)};function Ls(g){return Bn(Xr(g))}function wc(g){const c=document.activeElement;if(c===null)return!1;const h=c.nodeName;return Bn(Xr(g))&&(h==="INPUT"||h==="TEXTAREA"||c.contentEditable==="true"&&c.__lexicalEditor==null)}function ei(g,c,h){const E=g.getRootElement();try{return E!==null&&E.contains(c)&&E.contains(h)&&c!==null&&!wc(c)&&Ni(c)===g}catch{return!1}}function Ni(g){let c=g;for(;c!=null;){const h=c.__lexicalEditor;if(h!=null)return h;c=Us(c)}return null}function Tc(g){return Xo.test(g)?"rtl":oa.test(g)?"ltr":null}function Fs(g){return g.isToken()||g.isSegmented()}function fh(g){return g.nodeType===Xe}function On(g){let c=g;for(;c!=null;){if(fh(c))return c;c=c.firstChild}return null}function Xn(g,c,h){const E=Tr[c];if(h!==null&&(g&E)===(h&E))return g;let S=g^E;return c==="subscript"?S&=~Tr.superscript:c==="superscript"&&(S&=~Tr.subscript),S}function To(g){return St(g)||Do(g)||Bn(g)}function No(g,c){if(c!=null){g.__key=c;return}Ar(),Ay();const h=Rn(),E=di(),S=Ec();E._nodeMap.set(S,g),rt(g)?h._dirtyElements.set(S,!0):h._dirtyLeaves.add(S),h._cloneNotNeeded.add(S),h._dirtyType=dt,g.__key=S}function dr(g,c,h){let E=g;for(;E!==null;){if(h.has(E))return;const S=c.get(E);if(S===void 0)break;h.set(E,!1),E=S.__parent}}function Zr(g){const c=g.getParent();if(c!==null){const h=g.getWritable(),E=c.getWritable(),S=g.getPreviousSibling(),$=g.getNextSibling();if(S===null)if($!==null){const G=$.getWritable();E.__first=$.__key,G.__prev=null}else E.__first=null;else{const G=S.getWritable();if($!==null){const K=$.getWritable();K.__prev=G.__key,G.__next=K.__key}else G.__next=null;h.__prev=null}if($===null)if(S!==null){const G=S.getWritable();E.__last=S.__key,G.__next=null}else E.__last=null;else{const G=$.getWritable();if(S!==null){const K=S.getWritable();K.__next=G.__key,G.__prev=K.__key}else G.__prev=null;h.__next=null}E.__size--,h.__parent=null}}function Ga(g){Ay();const c=g.getLatest(),h=c.__parent,E=di(),S=Rn(),$=E._nodeMap,G=S._dirtyElements;h!==null&&dr(h,$,G);const K=c.__key;S._dirtyType=dt,rt(g)?G.set(K,!0):S._dirtyLeaves.add(K)}function Nc(g){const c=g.getPreviousSibling(),h=g.getNextSibling();c!==null&&Ga(c),h!==null&&Ga(h)}function kn(g){Ar();const c=Rn(),h=c._compositionKey;if(g!==h){if(c._compositionKey=g,h!==null){const E=In(h);E!==null&&E.getWritable()}if(g!==null){const E=In(g);E!==null&&E.getWritable()}}}function Jr(){return cl()?null:Rn()._compositionKey}function In(g,c){const h=(c||di())._nodeMap.get(g);return h===void 0?null:h}function js(g,c){const h=Rn(),E=g[`__lexicalKey_${h._key}`];return E!==void 0?In(E,c):null}function Xr(g,c){let h=g;for(;h!=null;){const E=js(h,c);if(E!==null)return E;h=Us(h)}return null}function So(g){const c=g._decorators,h=Object.assign({},c);return g._pendingDecorators=h,h}function Bs(g){return g.read(()=>fr().getTextContent())}function Ka(g,c){no(g,()=>{const h=di();if(h.isEmpty())return;if(c==="root"){fr().markDirty();return}const E=h._nodeMap;for(const[,S]of E)S.markDirty()},g._pendingEditorState===null?{tag:"history-merge"}:void 0)}function fr(){return Ws(di())}function Ws(g){return g._nodeMap.get("root")}function hr(g){Ar();const c=di();if(g!==null){if(Object.isFrozen(g))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");g.dirty=!0,g.setCachedNodes(null)}c._selection=g}function ed(){Ar();const g=Rn();mn(g)}function Si(g){const c=Rn(),h=Sc(g,c);if(h===null){const E=c.getRootElement();return g===E?In("root"):null}return In(h)}function Ua(g,c){return c?g.getTextContentSize():0}function Sc(g,c){let h=g;for(;h!=null;){const E=h[`__lexicalKey_${c._key}`];if(E!==void 0)return E;h=Us(h)}return null}function Oc(g){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(g)}function zs(g){const c=[];let h=g;for(;h!==null;)c.push(h),h=h._parentEditor;return c}function Ac(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Va(g){return g.nodeType===Xe?g.nodeValue:null}function Oi(g,c,h){const E=Br(c._window);if(E===null)return;const S=E.anchorNode;let{anchorOffset:$,focusOffset:G}=E;if(S!==null){let K=Va(S);const be=Xr(S);if(K!==null&&St(be)){if(K===Dt&&h){const ye=h.length;K=h,$=ye,G=ye}K!==null&&Hs(be,K,$,G,g)}}}function Hs(g,c,h,E,S){let $=g;if($.isAttached()&&(S||!$.isDirty())){const G=$.isComposing();let K=c;(G||S)&&c[c.length-1]===Dt&&(K=c.slice(0,-1));const be=$.getTextContent();if(S||K!==be){if(K===""){if(kn(null),!ce&&!le&&!Pe){const Le=Rn();setTimeout(()=>{Le.update(()=>{$.isAttached()&&$.remove()})},20)}else $.remove();return}const ye=$.getParent(),Ne=ll(),we=$.getTextContentSize(),Ae=Jr(),Te=$.getKey();if($.isToken()||Ae!==null&&Te===Ae&&!G||Tt(Ne)&&(ye!==null&&!ye.canInsertTextBefore()&&Ne.anchor.offset===0||Ne.anchor.key===g.__key&&Ne.anchor.offset===0&&!$.canInsertTextBefore()||Ne.focus.key===g.__key&&Ne.focus.offset===we&&!$.canInsertTextAfter())){$.markDirty();return}const He=_n();if(!Tt(He)||h===null||E===null){$.setTextContent(K);return}if(He.setTextNodeRange($,h,$,E),$.isSegmented()){const Le=$.getTextContent(),Je=Gn(Le);$.replace(Je),$=Je}$.setTextContent(K)}}}function Rc(g){const c=g.getPreviousSibling();return(St(c)||rt(c)&&c.isInline())&&!c.canInsertTextAfter()}function $c(g,c){if(c.isSegmented())return!0;if(!g.isCollapsed())return!1;const h=g.anchor.offset,E=c.getParentOrThrow(),S=c.isToken();return h===0?!c.canInsertTextBefore()||!E.canInsertTextBefore()||S||Rc(c):h===c.getTextContentSize()?!c.canInsertTextAfter()||!E.canInsertTextAfter()||S:!1}function Oo(g,c,h,E){return g===9&&!c&&!h&&!E}function Dc(g,c,h,E){return g===66&&!c&&Ai(h,E)}function Ya(g,c,h,E){return g===73&&!c&&Ai(h,E)}function td(g,c,h,E){return g===85&&!c&&Ai(h,E)}function nd(g,c){return ca(g)&&!c}function sa(g,c){return ca(g)&&c}function qa(g,c){return Ce&&c&&g===79}function kc(g,c,h){return Xa(g)&&(Ce?c:h)}function Mc(g,c,h){return Qa(g)&&(Ce?c:h)}function Za(g,c){return Ce&&c&&Xa(g)}function Ja(g,c){return Ce&&c&&Qa(g)}function rd(g,c,h,E){return Ce?c||h?!1:Xa(g)||g===72&&E:E||c||h?!1:Xa(g)}function od(g,c,h,E,S){return Ce?h||E||S?!1:Qa(g)||g===68&&c:c||E||S?!1:Qa(g)}function id(g,c,h,E){return g===90&&!c&&Ai(h,E)}function ad(g,c,h,E){return Ce?g===90&&h&&c:g===89&&E||g===90&&E&&c}function hh(g,c,h,E){return c?!1:g===67?Ce?h:E:!1}function ph(g,c,h,E){return c?!1:g===88?Ce?h:E:!1}function Pc(g){return g===37}function sd(g){return g===39}function gh(g){return g===38}function mh(g){return g===40}function yh(g,c,h,E){return Pc(g)&&!c&&!E&&!h}function Ic(g,c,h,E,S){return Pc(g)&&!E&&!h&&(c||S)}function vh(g,c,h,E){return sd(g)&&!c&&!E&&!h}function bh(g,c,h,E,S){return sd(g)&&!E&&!h&&(c||S)}function ld(g,c,h){return gh(g)&&!c&&!h}function la(g,c,h){return mh(g)&&!c&&!h}function cd(g,c,h,E){return g||c||h||E}function _h(g){return g===32}function Ai(g,c){return Ce?g:c}function ca(g){return g===13}function Xa(g){return g===8}function ua(g){return g===27}function Qa(g){return g===46}function Ri(g,c,h){return g===65&&Ai(c,h)}function $i(){const g=fr(),c=g.select(0,g.getChildrenSize());hr(aa(c))}function Di(g,c){g.__lexicalClassNameCache===void 0&&(g.__lexicalClassNameCache={});const h=g.__lexicalClassNameCache,E=h[c];if(E!==void 0)return E;const S=g[c];if(typeof S=="string"){const $=S.split(" ");return h[c]=$,$}return S}function es(g,c,h,E,S){if(h.size===0)return;const $=E.__type,G=E.__key,K=c.get($);if(K===void 0)throw Error(`Type ${$} not in registeredNodes`);const be=K.klass;let ye=g.get(be);ye===void 0&&(ye=new Map,g.set(be,ye));const Ne=ye.get(G),we=Ne==="destroyed"&&S==="created";(Ne===void 0||we)&&ye.set(G,we?"updated":S)}function Lc(g){const c=di(),h=c._readOnly,E=g.getType(),S=c._nodeMap,$=[];for(const[,G]of S)G instanceof g&&G.__type===E&&(h||G.isAttached())&&$.push(G);return $}function Gs(g,c,h){const E=g.getParent();let S=h,$=g;return E!==null&&(c&&h===0?(S=$.getIndexWithinParent(),$=E):!c&&h===$.getChildrenSize()&&(S=$.getIndexWithinParent()+1,$=E)),$.getChildAtIndex(c?S-1:S)}function da(g,c){const h=g.offset;if(g.type==="element"){const E=g.getNode();return Gs(E,c,h)}else{const E=g.getNode();if(c&&h===0||!c&&h===E.getTextContentSize()){const S=c?E.getPreviousSibling():E.getNextSibling();return S===null?Gs(E.getParentOrThrow(),c,E.getIndexWithinParent()+(c?0:1)):S}}return null}function ti(g){const c=Ao(g).event,h=c&&c.inputType;return h==="insertFromPaste"||h==="insertFromPasteAsQuotation"}function mt(g,c,h){return My(g,c,h)}function Ks(g){return!ro(g)&&!g.isLastChild()&&!g.isInline()}function ts(g,c){const h=g._keyToDOMMap.get(c);if(h===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${c}`);return h}function Us(g){const c=g.assignedSlot||g.parentElement;return c!==null&&c.nodeType===11?c.host:c}function xh(g,c,h){const E=h.ownerDocument,S=E.defaultView;if(S===null)return;let{top:$,bottom:G}=c,K=0,be=0,ye=h;for(;ye!==null;){const Ne=ye===E.body;if(Ne)K=0,be=Ao(g).innerHeight;else{const Ae=ye.getBoundingClientRect();K=Ae.top,be=Ae.bottom}let we=0;if($<K?we=-(K-$):G>be&&(we=G-be),we!==0)if(Ne)S.scrollBy(0,we);else{const Ae=ye.scrollTop;ye.scrollTop+=we;const Te=ye.scrollTop-Ae;$-=Te,G-=Te}if(Ne)break;ye=Us(ye)}}function ud(g){return Rn()._updateTags.has(g)}function Eh(g){Ar(),Rn()._updateTags.add(g)}function ni(g){const c=_n();if(!Tt(c)||!rt(g))return c;const{anchor:h,focus:E}=c,S=h.getNode(),$=E.getNode();return Ln(S,g)&&h.set(g.__key,0,"element"),Ln($,g)&&E.set(g.__key,0,"element"),c}function Ln(g,c){let h=g.getParent();for(;h!==null;){if(h.is(c))return!0;h=h.getParent()}return!1}function Nt(g){const c=g.ownerDocument;return c&&c.defaultView||null}function Ao(g){const c=g._window;if(c===null)throw Error("window object not found");return c}function Vs(g){return rt(g)&&g.isInline()||Bn(g)&&g.isInline()}function Fc(g){let c=g.getParentOrThrow();for(;c!==null;){if(Qn(c))return c;c=c.getParentOrThrow()}return c}function Qn(g){return ro(g)||rt(g)&&g.isShadowRoot()}function Ys(g){const c=g.constructor.clone(g);return No(c,null),c}function fa(g){const c=Rn(),h=g.constructor.getType(),E=c._nodes.get(h);if(E===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const S=E.replace;if(S!==null){const $=S(g);if(!($ instanceof g.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return $}return g}function qs(g,c){const h=g.getParent();if(ro(h)&&!rt(c)&&!Bn(c))throw Error("Only element or decorator nodes can be inserted in to the root node")}function ri(g){const c=g.theme,h=document.createElement("div");h.contentEditable="false",h.setAttribute("data-lexical-cursor","true");let E=c.blockCursor;if(E!==void 0){if(typeof E=="string"){const S=E.split(" ");E=c.blockCursor=S}E!==void 0&&h.classList.add(...E)}return h}function ns(g){return(Bn(g)||rt(g)&&!g.canBeEmpty())&&!g.isInline()}function ha(g,c,h){h.style.removeProperty("caret-color"),c._blockCursorElement=null;const E=g.parentElement;E!==null&&E.removeChild(g)}function Lt(g,c,h){let E=g._blockCursorElement;if(Tt(h)&&h.isCollapsed()&&h.anchor.type==="element"&&c.contains(document.activeElement)){const S=h.anchor,$=S.getNode(),G=S.offset,K=$.getChildrenSize();let be=!1,ye=null;if(G===K){const Ne=$.getChildAtIndex(G-1);ns(Ne)&&(be=!0)}else{const Ne=$.getChildAtIndex(G);if(ns(Ne)){const we=Ne.getPreviousSibling();(we===null||ns(we))&&(be=!0,ye=g.getElementByKey(Ne.__key))}}if(be){const Ne=g.getElementByKey($.__key);E===null&&(g._blockCursorElement=E=ri(g._config)),c.style.caretColor="transparent",ye===null?Ne.appendChild(E):Ne.insertBefore(E,ye);return}}E!==null&&ha(E,g,c)}function Br(g){return he?(g||window).getSelection():null}function jc(g,c){let h=g.getChildAtIndex(c);if(h==null&&(h=g),Qn(g))throw Error("Can not call $splitNode() on root element");const E=G=>{const K=G.getParentOrThrow(),be=Qn(K),ye=G===h&&!be?G:Ys(G);if(be)return G.insertAfter(ye),[G,ye,ye];{const[Ne,we,Ae]=E(K),Te=G.getNextSiblings();return Ae.append(ye,...Te),[Ne,we,ye]}},[S,$]=E(h);return[S,$]}function ki(g,c){let h=g;for(;h!==fr()&&h!=null;){if(c(h))return h;h=h.getParent()}return null}function dd(g){const c=[],h=[g];for(;h.length>0;){const E=h.pop();if(E===void 0)throw Error("Stack.length > 0; can't be undefined");rt(E)&&h.unshift(...E.getChildren()),E!==g&&c.push(E)}return c}function Mi(g){return oi(g)&&g.tagName==="A"}function oi(g){return g.nodeType===1}function pa(g){if(Bn(g)&&!g.isInline())return!0;if(!rt(g)||Qn(g))return!1;const c=g.getFirstChild(),h=c===null||Do(c)||St(c)||c.isInline();return!g.isInline()&&g.canBeEmpty()!==!1&&h}function rs(g,c){let h=g;for(;h!==null&&h.getParent()!==null&&!c(h);)h=h.getParentOrThrow();return c(h)?h:null}function fd(g,c){const h=g._decorators;let E=g._pendingDecorators||h;const S=c._nodeMap;let $;for($ in E)S.has($)||(E===h&&(E=So(g)),delete E[$])}function Bc(g,c,h,E,S,$){let G=g.getFirstChild();for(;G!==null;){const K=G.__key;G.__parent===c&&(rt(G)&&Bc(G,K,h,E,S,$),h.has(K)||$.delete(K),S.push(K)),G=G.getNextSibling()}}function hd(g,c,h,E){const S=g._nodeMap,$=c._nodeMap,G=[];for(const[K]of E){const be=$.get(K);be!==void 0&&(be.isAttached()||(rt(be)&&Bc(be,K,S,$,G,E),S.has(K)||E.delete(K),G.push(K)))}for(const K of G)$.delete(K);for(const K of h){const be=$.get(K);be!==void 0&&!be.isAttached()&&(S.has(K)||h.delete(K),$.delete(K))}}let Fn="",pr="",go="",mo,Cr,Pi,hn=!1,ii=!1,Ii,os=null,Wc,ga,ai,Ro,Zs,Li;function Js(g,c){const h=ai.get(g);if(c!==null){const E=el(g);E.parentNode===c&&c.removeChild(E)}if(Ro.has(g)||Cr._keyToDOMMap.delete(g),rt(h)){const E=Qs(h,ai);jn(E,0,E.length-1,null)}h!==void 0&&es(Li,Pi,Ii,h,"destroyed")}function jn(g,c,h,E){let S=c;for(;S<=h;++S){const $=g[S];$!==void 0&&Js($,E)}}function vn(g,c){g.setProperty("text-align",c)}const Nr="40px";function Xs(g,c){const h=mo.theme.indent;if(typeof h=="string"){const S=g.classList.contains(h);c>0&&!S?g.classList.add(h):c<1&&S&&g.classList.remove(h)}const E=getComputedStyle(g).getPropertyValue("--lexical-indent-base-value")||Nr;g.style.setProperty("padding-inline-start",c===0?"":`calc(${c} * ${E})`)}function ma(g,c){const h=g.style;c===0?vn(h,""):c===wt?vn(h,"left"):c===_t?vn(h,"center"):c===Rt?vn(h,"right"):c===qe?vn(h,"justify"):c===ot?vn(h,"start"):c===yt&&vn(h,"end")}function is(g,c,h){const E=Ro.get(g);if(E===void 0)throw Error("createNode: node does not exist in nodeMap");const S=E.createDOM(mo,Cr);if(Pr(g,S,Cr),St(E)?S.setAttribute("data-lexical-text","true"):Bn(E)&&S.setAttribute("data-lexical-decorator","true"),rt(E)){const $=E.__indent,G=E.__size;if($!==0&&Xs(S,$),G!==0){const be=G-1,ye=Qs(E,Ro);ya(ye,be,E,S)}const K=E.__format;K!==0&&ma(S,K),E.isInline()||bn(null,E,S),Ks(E)&&(Fn+=Kt,go+=Kt)}else{const $=E.getTextContent();if(Bn(E)){const G=E.decorate(Cr,mo);G!==null&&si(g,G),S.contentEditable="false"}else St(E)&&(E.isDirectionless()||(pr+=$));Fn+=$,go+=$}if(c!==null)if(h!=null)c.insertBefore(S,h);else{const $=c.__lexicalLineBreak;$!=null?c.insertBefore(S,$):c.appendChild(S)}return Object.freeze(E),es(Li,Pi,Ii,E,"created"),S}function ya(g,c,h,E){const S=pr;pr="",er(g,h,0,c,E,null),zc(h,E),pr=S}function er(g,c,h,E,S,$){const G=Fn;Fn="";let K=h;for(;K<=E;++K)is(g[K],S,$);Ks(c)&&(Fn+=Kt),S.__lexicalTextContent=Fn,Fn=G+Fn}function Qr(g,c){const h=c.get(g);return Do(h)||Bn(h)&&h.isInline()}function bn(g,c,h){const E=g!==null&&(g.__size===0||Qr(g.__last,ai)),S=c.__size===0||Qr(c.__last,Ro);if(E){if(!S){const $=h.__lexicalLineBreak;$!=null&&h.removeChild($),h.__lexicalLineBreak=null}}else if(S){const $=document.createElement("br");h.__lexicalLineBreak=$,h.appendChild($)}}function zc(g,c){const h=c.__lexicalDirTextContent,E=c.__lexicalDir;if(h!==pr||E!==os){const S=pr==="",$=S?os:Tc(pr);if($!==E){const G=c.classList,K=mo.theme;let be=E!==null?K[E]:void 0,ye=$!==null?K[$]:void 0;if(be!==void 0){if(typeof be=="string"){const Ne=be.split(" ");be=K[E]=Ne}G.remove(...be)}if($===null||S&&$==="ltr")c.removeAttribute("dir");else{if(ye!==void 0){if(typeof ye=="string"){const Ne=ye.split(" ");ye=K[$]=Ne}ye!==void 0&&G.add(...ye)}c.dir=$}if(!ii){const Ne=g.getWritable();Ne.__dir=$}}os=$,c.__lexicalDirTextContent=pr,c.__lexicalDir=$}}function Ch(g,c,h){const E=pr;pr="",Hc(g,c,h),zc(c,h),pr=E}function Qs(g,c){const h=[];let E=g.__first;for(;E!==null;){const S=c.get(E);if(S===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");h.push(E),E=S.__next}return h}function Hc(g,c,h){const E=Fn,S=g.__size,$=c.__size;if(Fn="",S===1&&$===1){const G=g.__first,K=c.__first;if(G===K)va(G,h);else{const be=el(G),ye=is(K,null,null);h.replaceChild(ye,be),Js(G,null)}}else{const G=Qs(g,ai),K=Qs(c,Ro);if(S===0)$!==0&&er(K,c,0,$-1,h,null);else if($===0){if(S!==0){const be=h.__lexicalLineBreak==null;jn(G,0,S-1,be?null:h),be&&(h.textContent="")}}else pd(c,G,K,S,$,h)}Ks(c)&&(Fn+=Kt),h.__lexicalTextContent=Fn,Fn=E+Fn}function va(g,c){const h=ai.get(g);let E=Ro.get(g);if(h===void 0||E===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const S=hn||ga.has(g)||Wc.has(g),$=ts(Cr,g);if(h===E&&!S){if(rt(h)){const G=$.__lexicalTextContent;G!==void 0&&(Fn+=G,go+=G);const K=$.__lexicalDirTextContent;K!==void 0&&(pr+=K)}else{const G=h.getTextContent();St(h)&&!h.isDirectionless()&&(pr+=G),go+=G,Fn+=G}return $}if(h!==E&&S&&es(Li,Pi,Ii,E,"updated"),E.updateDOM(h,$,mo)){const G=is(g,null,null);if(c===null)throw Error("reconcileNode: parentDOM is null");return c.replaceChild(G,$),Js(g,null),G}if(rt(h)&&rt(E)){const G=E.__indent;G!==h.__indent&&Xs($,G);const K=E.__format;K!==h.__format&&ma($,K),S&&(Ch(h,E,$),!ro(E)&&!E.isInline()&&bn(h,E,$)),Ks(E)&&(Fn+=Kt,go+=Kt)}else{const G=E.getTextContent();if(Bn(E)){const K=E.decorate(Cr,mo);K!==null&&si(g,K)}else St(E)&&!E.isDirectionless()&&(pr+=G);Fn+=G,go+=G}return!ii&&ro(E)&&E.__cachedText!==go&&(E=E.getWritable(),E.__cachedText=go),Object.freeze(E),$}function si(g,c){let h=Cr._pendingDecorators;const E=Cr._decorators;if(h===null){if(E[g]===c)return;h=So(Cr)}h[g]=c}function as(g){return g.firstChild}function pt(g){let c=g.nextSibling;return c!==null&&c===Cr._blockCursorElement&&(c=c.nextSibling),c}function pd(g,c,h,E,S,$){const G=E-1,K=S-1;let be,ye,Ne=as($),we=0,Ae=0;for(;we<=G&&Ae<=K;){const Le=c[we],Je=h[Ae];if(Le===Je)Ne=pt(va(Je,$)),we++,Ae++;else{be===void 0&&(be=new Set(c)),ye===void 0&&(ye=new Set(h));const ft=ye.has(Le),Ye=be.has(Je);if(!ft)Ne=pt(el(Le)),Js(Le,$),we++;else if(!Ye)is(Je,$,Ne),Ae++;else{const Ft=ts(Cr,Je);Ft===Ne?Ne=pt(va(Je,$)):(Ne!=null?$.insertBefore(Ft,Ne):$.appendChild(Ft),va(Je,$)),we++,Ae++}}}const Te=we>G,He=Ae>K;if(Te&&!He){const Le=h[K+1],Je=Le===void 0?null:Cr.getElementByKey(Le);er(h,g,Ae,K,$,Je)}else He&&!Te&&jn(c,we,G,$)}function gd(g,c,h,E,S,$){Fn="",go="",pr="",hn=E===Ct,os=null,Cr=h,mo=h._config,Pi=h._nodes,Ii=Cr._listeners.mutation,Wc=S,ga=$,ai=g._nodeMap,Ro=c._nodeMap,ii=c._readOnly,Zs=new Map(h._keyToDOMMap);const G=new Map;return Li=G,va("root",null),Cr=void 0,Pi=void 0,Wc=void 0,ga=void 0,ai=void 0,Ro=void 0,mo=void 0,Zs=void 0,Li=void 0,G}function Pr(g,c,h){const E=h._keyToDOMMap;c["__lexicalKey_"+h._key]=g,E.set(g,c)}function el(g){const c=Zs.get(g);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${g}`);return c}const on=Object.freeze({}),$o=30,nt=[["keydown",A],["pointerdown",Wr],["compositionstart",s],["compositionend",x],["input",f],["click",Kc],["cut",on],["copy",on],["dragstart",on],["dragover",on],["dragend",on],["paste",on],["focus",on],["blur",on],["drop",on]];Be&&nt.push(["beforeinput",(g,c)=>ls(g,c)]);let ba=0,Fi=0,Sr=0,_a=null,ji=0,tl=!1,xa=!1,yo=!1,ss=!1,vo=[0,"",0,"root",0];function Gc(g,c,h,E,S){const $=g.anchor,G=g.focus,K=$.getNode(),be=Rn(),ye=Br(be._window),Ne=ye!==null?ye.anchorNode:null,we=$.key,Ae=be.getElementByKey(we),Te=h.length;return we!==G.key||!St(K)||(!S&&(!Be||Sr<E+50)||K.isDirty()&&Te<2||Oc(h))&&$.offset!==G.offset&&!K.isComposing()||Fs(K)||K.isDirty()&&Te>1||(S||!Be)&&Ae!==null&&!K.isComposing()&&Ne!==On(Ae)||ye!==null&&c!==null&&(!c.collapsed||c.startContainer!==ye.anchorNode||c.startOffset!==ye.anchorOffset)||K.getFormat()!==g.format||K.getStyle()!==g.style||$c(g,K)}function md(g,c){return g!==null&&g.nodeValue!==null&&g.nodeType===Xe&&c!==0&&c!==g.nodeValue.length}function yd(g,c,h){const{anchorNode:E,anchorOffset:S,focusNode:$,focusOffset:G}=g;tl&&(tl=!1,md(E,S)&&md($,G))||no(c,()=>{if(!h){hr(null);return}if(!ei(c,E,$))return;const K=_n();if(Tt(K)){const be=K.anchor,ye=be.getNode();if(K.isCollapsed()){g.type==="Range"&&g.anchorNode===g.focusNode&&(K.dirty=!0);const Ne=Ao(c).event,we=Ne?Ne.timeStamp:performance.now(),[Ae,Te,He,Le,Je]=vo,ft=fr(),Ye=c.isComposing()===!1&&ft.getTextContent()==="";we<Je+200&&be.offset===He&&be.key===Le?(K.format=Ae,K.style=Te):be.type==="text"?(K.format=ye.getFormat(),K.style=ye.getStyle()):be.type==="element"&&!Ye&&(K.format=0,K.style="")}else{let Ne=Qe,we=!1;const Ae=K.getNodes(),Te=Ae.length;for(let He=0;He<Te;He++){const Le=Ae[He];if(St(Le)&&(we=!0,Ne&=Le.getFormat(),Ne===0))break}K.format=we?Ne:0}}mt(c,t,void 0)})}function Kc(g,c){no(c,()=>{const h=_n(),E=Br(c._window),S=ll();if(E){if(Tt(h)){const $=h.anchor,G=$.getNode();if($.type==="element"&&$.offset===0&&h.isCollapsed()&&!ro(G)&&fr().getChildrenSize()===1&&G.getTopLevelElementOrThrow().isEmpty()&&S!==null&&h.is(S))E.removeAllRanges(),h.dirty=!0;else if(g.detail===3&&!h.isCollapsed()){const K=h.focus.getNode();G!==K&&(rt(G)?G.select(0):G.getParentOrThrow().select(0))}}else if(g.pointerType==="touch"){const $=E.anchorNode;if($!==null){const G=$.nodeType;if(G===We||G===Xe){const K=Nh(S,E,c);hr(K)}}}}mt(c,n,g)})}function Wr(g,c){const h=g.target,E=g.pointerType;h instanceof Node&&E!=="touch"&&no(c,()=>{Ls(h)||(xa=!0)})}function Uc(g){if(!g.getTargetRanges)return null;const c=g.getTargetRanges();return c.length===0?null:c[0]}function Vc(g,c){return g!==c||rt(g)||rt(c)||!g.isToken()||!c.isToken()}function vd(g){return Fi===229&&g<ba+$o}function ls(g,c){const h=g.inputType,E=Uc(g);h==="deleteCompositionText"||Oe&&ti(c)||h!=="insertCompositionText"&&no(c,()=>{const S=_n();if(h==="deleteContentBackward"){if(S===null){const Ne=ll();if(!Tt(Ne))return;hr(Ne.clone())}if(Tt(S)){if(ve&&kn(S.anchor.key),vd(g.timeStamp)&&c.isComposing()&&S.anchor.key===S.focus.key){if(kn(null),ba=0,setTimeout(()=>{no(c,()=>{kn(null)})},$o),Tt(S)){const Ne=S.anchor.getNode();Ne.markDirty(),S.format=Ne.getFormat(),S.style=Ne.getStyle()}S.anchor.getNode().getTextContent().length<=1&&(g.preventDefault(),mt(c,r,!0))}else g.preventDefault(),mt(c,r,!0);return}}if(!Tt(S))return;const $=g.data;_a!==null&&Oi(!1,c,_a),(!S.dirty||_a!==null)&&S.isCollapsed()&&!ro(S.anchor.getNode())&&E!==null&&S.applyDOMRange(E),_a=null;const G=S.anchor,K=S.focus,be=G.getNode(),ye=K.getNode();if(h==="insertText"||h==="insertTranspose"){if($===`
|
|
234
|
-
`)g.preventDefault(),mt(c,o,!1);else if($===Kt)g.preventDefault(),mt(c,i,void 0);else if($==null&&g.dataTransfer){const Ne=g.dataTransfer.getData("text/plain");g.preventDefault(),S.insertRawText(Ne)}else $!=null&&Gc(S,E,$,g.timeStamp,!0)?(g.preventDefault(),mt(c,a,$)):_a=$;Sr=g.timeStamp;return}switch(g.preventDefault(),h){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{mt(c,a,g);break}case"insertFromComposition":{kn(null),mt(c,a,g);break}case"insertLineBreak":{kn(null),mt(c,o,!1);break}case"insertParagraph":{kn(null),yo&&!le?(yo=!1,mt(c,o,!1)):mt(c,i,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{mt(c,l,g);break}case"deleteByComposition":{Vc(be,ye)&&mt(c,u,g);break}case"deleteByDrag":case"deleteByCut":{mt(c,u,g);break}case"deleteContent":{mt(c,r,!1);break}case"deleteWordBackward":{mt(c,p,!0);break}case"deleteWordForward":{mt(c,p,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{mt(c,m,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{mt(c,m,!1);break}case"formatStrikeThrough":{mt(c,b,"strikethrough");break}case"formatBold":{mt(c,b,"bold");break}case"formatItalic":{mt(c,b,"italic");break}case"formatUnderline":{mt(c,b,"underline");break}case"historyUndo":{mt(c,C,void 0);break}case"historyRedo":{mt(c,_,void 0);break}}})}function f(g,c){g.stopPropagation(),no(c,()=>{const h=_n(),E=g.data,S=Uc(g);if(E!=null&&Tt(h)&&Gc(h,S,E,g.timeStamp,!1)){ss&&(d(c,E),ss=!1);const $=h.anchor,G=$.getNode(),K=Br(c._window);if(K===null)return;const be=$.offset;(!Be||h.isCollapsed()||!St(G)||K.anchorNode===null||G.getTextContent().slice(0,be)+E+G.getTextContent().slice(be+h.focus.offset)!==Va(K.anchorNode))&&mt(c,a,E);const ye=E.length;Oe&&ye>1&&g.inputType==="insertCompositionText"&&!c.isComposing()&&(h.anchor.offset-=ye),!ce&&!le&&!Pe&&c.isComposing()&&(ba=0,kn(null))}else Oi(!1,c,E!==null?E:void 0),ss&&(d(c,E||void 0),ss=!1);ed()}),_a=null}function s(g,c){no(c,()=>{const h=_n();if(Tt(h)&&!c.isComposing()){const E=h.anchor,S=h.anchor.getNode();kn(E.key),(g.timeStamp<ba+$o||E.type==="element"||!h.isCollapsed()||S.getFormat()!==h.format||S.getStyle()!==h.style)&&mt(c,a,sn)}})}function d(g,c){const h=g._compositionKey;if(kn(null),h!==null&&c!=null){if(c===""){const E=In(h),S=On(g.getElementByKey(h));S!==null&&S.nodeValue!==null&&St(E)&&Hs(E,S.nodeValue,null,null,!0);return}if(c[c.length-1]===`
|
|
235
|
-
`){const E=_n();if(Tt(E)){const S=E.focus;E.anchor.set(S.key,S.offset,S.type),mt(g,M,null);return}}}Oi(!0,g,c)}function x(g,c){Oe?ss=!0:no(c,()=>{d(c,g.data)})}function A(g,c){if(ba=g.timeStamp,Fi=g.keyCode,c.isComposing())return;const{keyCode:h,shiftKey:E,ctrlKey:S,metaKey:$,altKey:G}=g;if(!mt(c,y,g)){if(vh(h,S,G,$))mt(c,v,g);else if(bh(h,S,E,G,$))mt(c,T,g);else if(yh(h,S,G,$))mt(c,O,g);else if(Ic(h,S,E,G,$))mt(c,R,g);else if(ld(h,S,$))mt(c,k,g);else if(la(h,S,$))mt(c,P,g);else if(sa(h,E))yo=!0,mt(c,M,g);else if(_h(h))mt(c,Y,g);else if(qa(h,S))g.preventDefault(),yo=!0,mt(c,o,!0);else if(nd(h,E))yo=!1,mt(c,M,g);else if(rd(h,G,$,S))Xa(h)?mt(c,X,g):(g.preventDefault(),mt(c,r,!0));else if(ua(h))mt(c,oe,g);else if(od(h,S,E,G,$))Qa(h)?mt(c,Z,g):(g.preventDefault(),mt(c,r,!1));else if(kc(h,G,S))g.preventDefault(),mt(c,p,!0);else if(Mc(h,G,S))g.preventDefault(),mt(c,p,!1);else if(Za(h,$))g.preventDefault(),mt(c,m,!0);else if(Ja(h,$))g.preventDefault(),mt(c,m,!1);else if(Dc(h,G,$,S))g.preventDefault(),mt(c,b,"bold");else if(td(h,G,$,S))g.preventDefault(),mt(c,b,"underline");else if(Ya(h,G,$,S))g.preventDefault(),mt(c,b,"italic");else if(Oo(h,G,S,$))mt(c,U,g);else if(id(h,E,$,S))g.preventDefault(),mt(c,C,void 0);else if(ad(h,E,$,S))g.preventDefault(),mt(c,_,void 0);else{const K=c._editorState._selection;gr(K)?hh(h,E,$,S)?(g.preventDefault(),mt(c,re,g)):ph(h,E,$,S)?(g.preventDefault(),mt(c,B,g)):Ri(h,$,S)&&(g.preventDefault(),mt(c,W,g)):!Oe&&Ri(h,$,S)&&(g.preventDefault(),mt(c,W,g))}cd(S,E,G,$)&&mt(c,ue,g)}}function D(g){let c=g.__lexicalEventHandles;return c===void 0&&(c=[],g.__lexicalEventHandles=c),c}const z=new Map;function ie(g){const c=g.target,h=c==null?null:c.nodeType===9?c.defaultView:c.ownerDocument.defaultView,E=Br(h);if(E===null)return;const S=Ni(E.anchorNode);if(S===null)return;xa&&(xa=!1,no(S,()=>{const Ne=ll(),we=E.anchorNode;if(we===null)return;const Ae=we.nodeType;if(Ae!==We&&Ae!==Xe)return;const Te=Nh(Ne,E,S);hr(Te)}));const $=zs(S),G=$[$.length-1],K=G._key,be=z.get(K),ye=be||G;ye!==S&&yd(E,ye,!1),yd(E,S,!0),S!==G?z.set(K,S):be&&z.delete(K)}function xe(g){g._lexicalHandled=!0}function Re(g){return g._lexicalHandled===!0}function Ve(g,c){ji===0&&g.ownerDocument.addEventListener("selectionchange",ie),ji++,g.__lexicalEditor=c;const h=D(g);for(let E=0;E<nt.length;E++){const[S,$]=nt[E],G=typeof $=="function"?K=>{Re(K)||(xe(K),c.isEditable()&&$(K,c))}:K=>{if(!Re(K)&&(xe(K),c.isEditable()))switch(S){case"cut":return mt(c,B,K);case"copy":return mt(c,re,K);case"paste":return mt(c,l,K);case"dragstart":return mt(c,V,K);case"dragover":return mt(c,j,K);case"dragend":return mt(c,ee,K);case"focus":return mt(c,I,K);case"blur":return mt(c,q,K);case"drop":return mt(c,te,K)}};g.addEventListener(S,G),h.push(()=>{g.removeEventListener(S,G)})}}function Ze(g){ji!==0&&(ji--,ji===0&&g.ownerDocument.removeEventListener("selectionchange",ie));const c=g.__lexicalEditor;c!=null&&(Ge(c),g.__lexicalEditor=null);const h=D(g);for(let E=0;E<h.length;E++)h[E]();g.__lexicalEventHandles=[]}function Ge(g){if(g._parentEditor!==null){const c=zs(g),h=c[c.length-1]._key;z.get(h)===g&&z.delete(h)}else z.delete(g._key)}function Ie(){tl=!0}function it(g,c,h,E,S){vo=[g,c,h,E,S]}function vt(g,c,h){Ar();const E=g.__key,S=g.getParent();if(S===null)return;const $=ni(g);let G=!1;if(Tt($)&&c){const K=$.anchor,be=$.focus;K.key===E&&(wd(K,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0),be.key===E&&(wd(be,g,S,g.getPreviousSibling(),g.getNextSibling()),G=!0)}else gr($)&&c&&g.isSelected()&&g.selectPrevious();if(Tt($)&&c&&!G){const K=g.getIndexWithinParent();Zr(g),Cd($,S,K,-1)}else Zr(g);!h&&!Qn(S)&&!S.canBeEmpty()&&S.isEmpty()&&vt(S,c),c&&ro(S)&&S.isEmpty()&&S.selectEnd()}class $t{static getType(){throw Error(`LexicalNode: Node ${this.name} does not implement .getType().`)}static clone(c){throw Error(`LexicalNode: Node ${this.name} does not implement .clone().`)}constructor(c){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,No(this,c),this.__type!=="root"&&(Ar(),Vt(this.__type,this.constructor))}getType(){return this.__type}isAttached(){let c=this.__key;for(;c!==null;){if(c==="root")return!0;const h=In(c);if(h===null)break;c=h.__parent}return!1}isSelected(c){const h=c||_n();if(h==null)return!1;const E=h.getNodes().some(S=>S.__key===this.__key);return St(this)?E:Tt(h)&&h.anchor.type==="element"&&h.focus.type==="element"&&h.anchor.key===h.focus.key&&h.anchor.offset===h.focus.offset?!1:E}getKey(){return this.__key}getIndexWithinParent(){const c=this.getParent();if(c===null)return-1;let h=c.getFirstChild(),E=0;for(;h!==null;){if(this.is(h))return E;E++,h=h.getNextSibling()}return-1}getParent(){const c=this.getLatest().__parent;return c===null?null:In(c)}getParentOrThrow(){const c=this.getParent();if(c===null)throw Error(`Expected node ${this.__key} to have a parent.`);return c}getTopLevelElement(){let c=this;for(;c!==null;){const h=c.getParent();if(Qn(h))return c;c=h}return null}getTopLevelElementOrThrow(){const c=this.getTopLevelElement();if(c===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return c}getParents(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h),h=h.getParent();return c}getParentKeys(){const c=[];let h=this.getParent();for(;h!==null;)c.push(h.__key),h=h.getParent();return c}getPreviousSibling(){const c=this.getLatest().__prev;return c===null?null:In(c)}getPreviousSiblings(){const c=[],h=this.getParent();if(h===null)return c;let E=h.getFirstChild();for(;E!==null&&!E.is(this);)c.push(E),E=E.getNextSibling();return c}getNextSibling(){const c=this.getLatest().__next;return c===null?null:In(c)}getNextSiblings(){const c=[];let h=this.getNextSibling();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getCommonAncestor(c){const h=this.getParents(),E=c.getParents();rt(this)&&h.unshift(this),rt(c)&&E.unshift(c);const S=h.length,$=E.length;if(S===0||$===0||h[S-1]!==E[$-1])return null;const G=new Set(E);for(let K=0;K<S;K++){const be=h[K];if(G.has(be))return be}return null}is(c){return c==null?!1:this.__key===c.__key}isBefore(c){if(this===c)return!1;if(c.isParentOf(this))return!0;if(this.isParentOf(c))return!1;const h=this.getCommonAncestor(c);let E=0,S=0,$=this;for(;;){const G=$.getParentOrThrow();if(G===h){E=$.getIndexWithinParent();break}$=G}for($=c;;){const G=$.getParentOrThrow();if(G===h){S=$.getIndexWithinParent();break}$=G}return E<S}isParentOf(c){const h=this.__key;if(h===c.__key)return!1;let E=c;for(;E!==null;){if(E.__key===h)return!0;E=E.getParent()}return!1}getNodesBetween(c){const h=this.isBefore(c),E=[],S=new Set;let $=this;for(;;){const G=$.__key;if(S.has(G)||(S.add(G),E.push($)),$===c)break;const K=rt($)?h?$.getFirstChild():$.getLastChild():null;if(K!==null){$=K;continue}const be=h?$.getNextSibling():$.getPreviousSibling();if(be!==null){$=be;continue}const ye=$.getParentOrThrow();if(S.has(ye.__key)||E.push(ye),ye===c)break;let Ne=null,we=ye;do{if(we===null)throw Error("getNodesBetween: ancestor is null");Ne=h?we.getNextSibling():we.getPreviousSibling(),we=we.getParent(),we!==null&&Ne===null&&!S.has(we.__key)&&E.push(we)}while(Ne===null);$=Ne}return h||E.reverse(),E}isDirty(){const c=Rn()._dirtyLeaves;return c!==null&&c.has(this.__key)}getLatest(){const c=In(this.__key);if(c===null)throw Error("Lexical node does not exist in active editor state. Avoid using the same node references between nested closures from editorState.read/editor.update.");return c}getWritable(){Ar();const c=di(),h=Rn(),E=c._nodeMap,S=this.__key,$=this.getLatest(),G=$.__parent,K=h._cloneNotNeeded,be=_n();if(nr(be)&&be.setCachedNodes(null),K.has(S))return Ga($),$;const ye=$.constructor.clone($);return ye.__parent=G,ye.__next=$.__next,ye.__prev=$.__prev,rt($)&&rt(ye)?(ye.__first=$.__first,ye.__last=$.__last,ye.__size=$.__size,ye.__indent=$.__indent,ye.__format=$.__format,ye.__dir=$.__dir):St($)&&St(ye)&&(ye.__format=$.__format,ye.__style=$.__style,ye.__mode=$.__mode,ye.__detail=$.__detail),K.add(S),ye.__key=S,Ga(ye),E.set(S,ye),ye}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(c,h){throw Error("createDOM: base method not extended")}updateDOM(c,h,E){throw Error("updateDOM: base method not extended")}exportDOM(c){return{element:this.createDOM(c._config,c)}}exportJSON(){throw Error("exportJSON: base method not extended")}static importJSON(c){throw Error(`LexicalNode: Node ${this.name} does not implement .importJSON().`)}static transform(){return null}remove(c){vt(this,!0,c)}replace(c,h){Ar();let E=_n();E!==null&&(E=E.clone()),qs(this,c);const S=this.getLatest(),$=this.__key,G=c.__key,K=c.getWritable(),be=this.getParentOrThrow().getWritable(),ye=be.__size;Zr(K);const Ne=S.getPreviousSibling(),we=S.getNextSibling(),Ae=S.__prev,Te=S.__next,He=S.__parent;if(vt(S,!1,!0),Ne===null)be.__first=G;else{const Le=Ne.getWritable();Le.__next=G}if(K.__prev=Ae,we===null)be.__last=G;else{const Le=we.getWritable();Le.__prev=G}if(K.__next=Te,K.__parent=He,be.__size=ye,h&&this.getChildren().forEach(Le=>{K.append(Le)}),Tt(E)){hr(E);const Le=E.anchor,Je=E.focus;Le.key===$&&il(Le,K),Je.key===$&&il(Je,K)}return Jr()===$&&kn(G),K}insertAfter(c,h=!0){Ar(),qs(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.getParent(),G=_n();let K=!1,be=!1;if($!==null){const Te=c.getIndexWithinParent();if(Zr(S),Tt(G)){const He=$.__key,Le=G.anchor,Je=G.focus;K=Le.type==="element"&&Le.key===He&&Le.offset===Te+1,be=Je.type==="element"&&Je.key===He&&Je.offset===Te+1}}const ye=this.getNextSibling(),Ne=this.getParentOrThrow().getWritable(),we=S.__key,Ae=E.__next;if(ye===null)Ne.__last=we;else{const Te=ye.getWritable();Te.__prev=we}if(Ne.__size++,E.__next=we,S.__next=Ae,S.__prev=E.__key,S.__parent=E.__parent,h&&Tt(G)){const Te=this.getIndexWithinParent();Cd(G,Ne,Te+1);const He=Ne.__key;K&&G.anchor.set(He,Te+2,"element"),be&&G.focus.set(He,Te+2,"element")}return c}insertBefore(c,h=!0){Ar(),qs(this,c);const E=this.getWritable(),S=c.getWritable(),$=S.__key;Zr(S);const G=this.getPreviousSibling(),K=this.getParentOrThrow().getWritable(),be=E.__prev,ye=this.getIndexWithinParent();if(G===null)K.__first=$;else{const we=G.getWritable();we.__next=$}K.__size++,E.__prev=$,S.__prev=be,S.__next=E.__key,S.__parent=E.__parent;const Ne=_n();if(h&&Tt(Ne)){const we=this.getParentOrThrow();Cd(Ne,we,ye)}return c}isParentRequired(){return!1}createParentElementNode(){return Wi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(c,h){Ar();const E=this.getPreviousSibling(),S=this.getParentOrThrow();if(E===null)return S.select(0,0);if(rt(E))return E.select();if(!St(E)){const $=E.getIndexWithinParent()+1;return S.select($,$)}return E.select(c,h)}selectNext(c,h){Ar();const E=this.getNextSibling(),S=this.getParentOrThrow();if(E===null)return S.select();if(rt(E))return E.select(0,0);if(!St(E)){const $=E.getIndexWithinParent();return S.select($,$)}return E.select(c,h)}markDirty(){this.getWritable()}}function Vt(g,c){const h=Rn()._nodes.get(g);if(h===void 0)throw Error(`Create node: Attempted to create node ${c.name} that was not configured to be used on the editor.`);const E=h.klass;if(E!==c)throw Error(`Create node: Type ${g} in node ${c.name} does not match registered node ${E.name} with the same type`)}function An(g,c,h){const E=c.getParentOrThrow().getLastChild();let S=c;const $=[c];for(;S!==E;){if(!S.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");S=S.getNextSibling(),$.push(S)}let G=g;for(const K of $)G=G.insertAfter(K)}class Zn extends $t{static getType(){return"linebreak"}static clone(c){return new Zn(c.__key)}constructor(c){super(c)}getTextContent(){return`
|
|
236
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:c=>{const h=c.parentElement;let E,S;return h!==null&&((E=h.firstChild)===c||E.nextSibling===c&&E.nodeType===Xe&&(E.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((S=h.lastChild)===c||S.previousSibling===c&&S.nodeType===Xe&&(S.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:cs,priority:0}}}}static importJSON(c){return Or()}exportJSON(){return{type:"linebreak",version:1}}}function cs(g){return{node:Or()}}function Or(){return fa(new Zn)}function Do(g){return g instanceof Zn}function nl(g,c){return c&tt?"code":c&Bt?"mark":c&ut?"sub":c&Et?"sup":null}function Ea(g,c){return c&De?"strong":c&Fe?"em":"span"}function bd(g,c,h,E,S){const $=E.classList;let G=Di(S,"base");G!==void 0&&$.add(...G),G=Di(S,"underlineStrikethrough");let K=!1;const be=c&ze&&c&ke,ye=h&ze&&h&ke;G!==void 0&&(ye?(K=!0,be||$.add(...G)):be&&$.remove(...G));for(const Ne in Tr){const we=Tr[Ne];if(G=Di(S,Ne),G!==void 0)if(h&we){if(K&&(Ne==="underline"||Ne==="strikethrough")){c&we&&$.remove(...G);continue}(!(c&we)||be&&Ne==="underline"||Ne==="strikethrough")&&$.add(...G)}else c&we&&$.remove(...G)}}function Yc(g,c){const h=g.length,E=c.length;let S=0,$=0;for(;S<h&&S<E&&g[S]===c[S];)S++;for(;$+S<h&&$+S<E&&g[h-$-1]===c[E-$-1];)$++;return[S,h-S-$,c.slice(S,E-$)]}function eo(g,c,h){const E=c.firstChild,S=h.isComposing(),$=g+(S?Dt:"");if(E==null)c.textContent=$;else{const G=E.nodeValue;if(G!==$)if(S||Oe){const[K,be,ye]=Yc(G,$);be!==0&&E.deleteData(K,be),E.insertData(K,ye)}else E.nodeValue=$}}function Ca(g,c,h,E,S,$){eo(S,g,c);const G=$.theme.text;G!==void 0&&bd(h,0,E,g,G)}function wa(g,c){const h=document.createElement(c);return h.appendChild(g),h}class li extends $t{static getType(){return"text"}static clone(c){return new li(c.__text,c.__key)}constructor(c,h){super(h),this.__text=c,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const c=this.getLatest();return Ee[c.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===me}isComposing(){return this.__key===Jr()}isSegmented(){return this.getLatest().__mode===_e}isDirectionless(){return(this.getLatest().__detail&et)!==0}isUnmergeable(){return(this.getLatest().__detail<)!==0}hasFormat(c){const h=Tr[c];return(this.getFormat()&h)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(c,h){const E=this.getLatest().__format;return Xn(E,c,h)}createDOM(c){const h=this.__format,E=nl(this,h),S=Ea(this,h),$=E===null?S:E,G=document.createElement($);let K=G;this.hasFormat("code")&&G.setAttribute("spellcheck","false"),E!==null&&(K=document.createElement(S),G.appendChild(K));const be=this.__text;Ca(K,this,S,h,be,c);const ye=this.__style;return ye!==""&&(G.style.cssText=ye),G}updateDOM(c,h,E){const S=this.__text,$=c.__format,G=this.__format,K=nl(this,$),be=nl(this,G),ye=Ea(this,$),Ne=Ea(this,G);if((K===null?ye:K)!==(be===null?Ne:be))return!0;if(K===be&&ye!==Ne){const Le=h.firstChild;if(Le==null)throw Error("updateDOM: prevInnerDOM is null or undefined");const Je=document.createElement(Ne);return Ca(Je,this,Ne,G,S,E),h.replaceChild(Je,Le),!1}let we=h;if(be!==null&&K!==null&&(we=h.firstChild,we==null))throw Error("updateDOM: innerDOM is null or undefined");eo(S,we,this);const Ae=E.theme.text;Ae!==void 0&&$!==G&&bd(Ne,$,G,we,Ae);const Te=c.__style,He=this.__style;return Te!==He&&(h.style.cssText=He),!1}static importDOM(){return{"#text":()=>({conversion:Zc,priority:0}),b:()=>({conversion:_d,priority:0}),code:()=>({conversion:to,priority:0}),em:()=>({conversion:to,priority:0}),i:()=>({conversion:to,priority:0}),s:()=>({conversion:to,priority:0}),span:()=>({conversion:wh,priority:0}),strong:()=>({conversion:to,priority:0}),sub:()=>({conversion:to,priority:0}),sup:()=>({conversion:to,priority:0}),u:()=>({conversion:to,priority:0})}}static importJSON(c){const h=Gn(c.text);return h.setFormat(c.format),h.setDetail(c.detail),h.setMode(c.mode),h.setStyle(c.style),h}exportDOM(c){let{element:h}=super.exportDOM(c);if(!(h!==null&&oi(h)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return h.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(h=wa(h,"b")),this.hasFormat("italic")&&(h=wa(h,"i")),this.hasFormat("strikethrough")&&(h=wa(h,"s")),this.hasFormat("underline")&&(h=wa(h,"u")),{element:h}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(c,h){}setFormat(c){const h=this.getWritable();return h.__format=typeof c=="string"?Tr[c]:c,h}setDetail(c){const h=this.getWritable();return h.__detail=typeof c=="string"?Yn[c]:c,h}setStyle(c){const h=this.getWritable();return h.__style=c,h}toggleFormat(c){const h=this.getFormat(),E=Xn(h,c,null);return this.setFormat(E)}toggleDirectionless(){const c=this.getWritable();return c.__detail^=et,c}toggleUnmergeable(){const c=this.getWritable();return c.__detail^=lt,c}setMode(c){const h=ia[c];if(this.__mode===h)return this;const E=this.getWritable();return E.__mode=h,E}setTextContent(c){if(this.__text===c)return this;const h=this.getWritable();return h.__text=c,h}select(c,h){Ar();let E=c,S=h;const $=_n(),G=this.getTextContent(),K=this.__key;if(typeof G=="string"){const be=G.length;E===void 0&&(E=be),S===void 0&&(S=be)}else E=0,S=0;if(Tt($)){const be=Jr();(be===$.anchor.key||be===$.focus.key)&&kn(K),$.setTextNodeRange(this,E,this,S)}else return Cy(K,E,K,S,"text","text");return $}selectStart(){return this.select(0,0)}selectEnd(){const c=this.getTextContentSize();return this.select(c,c)}spliceText(c,h,E,S){const $=this.getWritable(),G=$.__text,K=E.length;let be=c;be<0&&(be=K+be,be<0&&(be=0));const ye=_n();if(S&&Tt(ye)){const we=c+K;ye.setTextNodeRange($,we,$,we)}const Ne=G.slice(0,be)+E+G.slice(be+h);return $.__text=Ne,$}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...c){Ar();const h=this.getLatest(),E=h.getTextContent(),S=h.__key,$=Jr(),G=new Set(c),K=[],be=E.length;let ye="";for(let jt=0;jt<be;jt++)ye!==""&&G.has(jt)&&(K.push(ye),ye=""),ye+=E[jt];ye!==""&&K.push(ye);const Ne=K.length;if(Ne===0)return[];if(K[0]===E)return[h];const we=K[0],Ae=h.getParentOrThrow();let Te;const He=h.getFormat(),Le=h.getStyle(),Je=h.__detail;let ft=!1;h.isSegmented()?(Te=Gn(we),Te.__format=He,Te.__style=Le,Te.__detail=Je,ft=!0):(Te=h.getWritable(),Te.__text=we);const Ye=_n(),Ft=[Te];let Ht=we.length;for(let jt=1;jt<Ne;jt++){const Jt=K[jt],cn=Jt.length,Wt=Gn(Jt).getWritable();Wt.__format=He,Wt.__style=Le,Wt.__detail=Je;const Wn=Wt.__key,Io=Ht+cn;if(Tt(Ye)){const zi=Ye.anchor,fl=Ye.focus;zi.key===S&&zi.type==="text"&&zi.offset>Ht&&zi.offset<=Io&&(zi.key=Wn,zi.offset-=Ht,Ye.dirty=!0),fl.key===S&&fl.type==="text"&&fl.offset>Ht&&fl.offset<=Io&&(fl.key=Wn,fl.offset-=Ht,Ye.dirty=!0)}$===S&&kn(Wn),Ht=Io,Ft.push(Wt)}Nc(this);const Pt=Ae.getWritable(),Zt=this.getIndexWithinParent();return ft?(Pt.splice(Zt,0,Ft),this.remove()):Pt.splice(Zt,1,Ft),Tt(Ye)&&Cd(Ye,Ae,Zt,Ne-1),Ft}mergeWithSibling(c){const h=c===this.getPreviousSibling();if(!h&&c!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const E=this.__key,S=c.__key,$=this.__text,G=$.length;Jr()===S&&kn(E);const K=_n();if(Tt(K)){const we=K.anchor,Ae=K.focus;we!==null&&we.key===S&&(Ty(we,h,E,c,G),K.dirty=!0),Ae!==null&&Ae.key===S&&(Ty(Ae,h,E,c,G),K.dirty=!0)}const be=c.__text,ye=h?be+$:$+be;this.setTextContent(ye);const Ne=this.getWritable();return c.remove(),Ne}isTextEntity(){return!1}}function wh(g){const c=g,h=c.style.fontWeight==="700",E=c.style.textDecoration==="line-through",S=c.style.fontStyle==="italic",$=c.style.textDecoration==="underline",G=c.style.verticalAlign;return{forChild:K=>(St(K)&&(h&&K.toggleFormat("bold"),E&&K.toggleFormat("strikethrough"),S&&K.toggleFormat("italic"),$&&K.toggleFormat("underline"),G==="sub"&&K.toggleFormat("subscript"),G==="super"&&K.toggleFormat("superscript")),K),node:null}}function _d(g){const c=g.style.fontWeight==="normal";return{forChild:h=>(St(h)&&!c&&h.toggleFormat("bold"),h),node:null}}const qc=new WeakMap;function rl(g){return g.nodeName==="PRE"||g.nodeType===We&&g.style!==void 0&&g.style.whiteSpace!==void 0&&g.style.whiteSpace.startsWith("pre")}function xd(g){let c,h=g.parentNode;const E=[g];for(;h!==null&&(c=qc.get(h))===void 0&&!rl(h);)E.push(h),h=h.parentNode;const S=c===void 0?h:c;for(let $=0;$<E.length;$++)qc.set(E[$],S);return S}function Zc(g){const c=g;if(g.parentElement===null)throw Error("Expected parentElement of Text not to be null");let h=c.textContent||"";if(xd(c)!==null){const E=h.split(/(\r?\n|\t)/),S=[],$=E.length;for(let G=0;G<$;G++){const K=E[G];K===`
|
|
237
|
-
`||K===`\r
|
|
238
|
-
`?S.push(Or()):K===" "?S.push(Ta()):K!==""&&S.push(Gn(K))}return{node:S}}if(h=h.replace(/\r/g,"").replace(/[ \t\n]+/g," "),h==="")return{node:null};if(h[0]===" "){let E=c,S=!0;for(;E!==null&&(E=Xc(E,!1))!==null;){const $=E.textContent||"";if($.length>0){/[ \t\n]$/.test($)&&(h=h.slice(1)),S=!1;break}}S&&(h=h.slice(1))}if(h[h.length-1]===" "){let E=c,S=!0;for(;E!==null&&(E=Xc(E,!0))!==null;)if((E.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){S=!1;break}S&&(h=h.slice(0,h.length-1))}return h===""?{node:null}:{node:Gn(h)}}const Jc=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Xc(g,c){let h=g;for(;;){let E;for(;(E=c?h.nextSibling:h.previousSibling)===null;){const $=h.parentElement;if($===null)return null;h=$}if(h=E,h.nodeType===We){const $=h.style.display;if($===""&&h.nodeName.match(Jc)===null||$!==""&&!$.startsWith("inline"))return null}let S=h;for(;(S=c?h.firstChild:h.lastChild)!==null;)h=S;if(h.nodeType===Xe)return h;if(h.nodeName==="BR")return null}}const us={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function to(g){const c=us[g.nodeName.toLowerCase()];return c===void 0?{node:null}:{forChild:h=>(St(h)&&!h.hasFormat(c)&&h.toggleFormat(c),h),node:null}}function Gn(g=""){return fa(new li(g))}function St(g){return g instanceof li}class ci extends li{static getType(){return"tab"}static clone(c){const h=new ci(c.__key);return h.__text=c.__text,h.__format=c.__format,h.__style=c.__style,h}constructor(c){super(" ",c),this.__detail=lt}static importDOM(){return null}static importJSON(c){const h=Ta();return h.setFormat(c.format),h.setStyle(c.style),h}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(c){throw Error("TabNode does not support setTextContent")}setDetail(c){throw Error("TabNode does not support setDetail")}setMode(c){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ta(){return fa(new ci)}function ds(g){return g instanceof ci}class ol{constructor(c,h,E){this._selection=null,this.key=c,this.offset=h,this.type=E}is(c){return this.key===c.key&&this.offset===c.offset&&this.type===c.type}isBefore(c){let h=this.getNode(),E=c.getNode();const S=this.offset,$=c.offset;return rt(h)&&(h=h.getDescendantByIndex(S)??h),rt(E)&&(E=E.getDescendantByIndex($)??E),h===E?S<$:h.isBefore(E)}getNode(){const c=this.key,h=In(c);if(h===null)throw Error("Point.getNode: node not found");return h}set(c,h,E){const S=this._selection,$=this.key;this.key=c,this.offset=h,this.type=E,cl()||(Jr()===$&&kn(c),S!==null&&(S.setCachedNodes(null),S.dirty=!0))}}function tr(g,c,h){return new ol(g,c,h)}function Qc(g,c){let h=c.__key,E=g.offset,S="element";if(St(c)){S="text";const $=c.getTextContentSize();E>$&&(E=$)}else if(!rt(c)){const $=c.getNextSibling();if(St($))h=$.__key,E=0,S="text";else{const G=c.getParent();G&&(h=G.__key,E=c.getIndexWithinParent()+1)}}g.set(h,E,S)}function il(g,c){if(rt(c)){const h=c.getLastDescendant();rt(h)||St(h)?Qc(g,h):Qc(g,c)}else Qc(g,c)}function Ed(g,c,h,E){const S=g.getNode(),$=S.getChildAtIndex(g.offset),G=Gn(),K=ro(S)?Wi().append(G):G;G.setFormat(h),G.setStyle(E),$===null?S.append(K):$.insertBefore(K),g.is(c)&&c.set(G.__key,0,"text"),g.set(G.__key,0,"text")}function ko(g,c,h,E){g.key=c,g.offset=h,g.type=E}class al{constructor(c,h){this.anchor=c,this.focus=h,c._selection=this,h._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return nr(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Po(this)}}class pn{constructor(c){this.dirty=!1,this._nodes=c,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){if(!gr(c))return!1;const h=this._nodes,E=c._nodes;return h.size===E.size&&Array.from(h).every(S=>E.has(S))}add(c){this.dirty=!0,this._nodes.add(c),this._cachedNodes=null}delete(c){this.dirty=!0,this._nodes.delete(c),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(c){return this._nodes.has(c)}clone(){return new pn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.getNodes(),E=h.length,S=h[E-1];let $;if(St(S))$=S.select();else{const G=S.getIndexWithinParent()+1;$=S.getParentOrThrow().select(G,G)}$.insertNodes(c);for(let G=0;G<E;G++)h[G].remove()}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this._nodes,E=[];for(const S of h){const $=In(S);$!==null&&E.push($)}return cl()||(this._cachedNodes=E),E}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Tt(g){return g instanceof rr}function nr(g){return g instanceof al}function zr(g){const[c,,h]=Sy(g),E=h.getChildren(),S=E.length,$=E[0].getChildren().length,G=new Array(S);for(let K=0;K<S;K++)G[K]=new Array($);for(let K=0;K<S;K++){const be=E[K].getChildren();let ye=0;for(let Ne=0;Ne<be.length;Ne++){for(;G[K][ye];)ye++;const we=be[Ne],Ae=we.__rowSpan||1,Te=we.__colSpan||1;for(let He=0;He<Ae;He++)for(let Le=0;Le<Te;Le++)G[K+He][ye+Le]=we;if(c===we)return{colSpan:Te,columnIndex:ye,rowIndex:K,rowSpan:Ae};ye+=Te}}return null}class ui extends al{constructor(c,h,E){super(h,E),this.gridKey=c}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Ir(c)?this.gridKey===c.gridKey&&this.anchor.is(c.anchor)&&this.focus.is(c.focus):!1}set(c,h,E){this.dirty=!0,this.gridKey=c,this.anchor.key=h,this.focus.key=E,this._cachedNodes=null}clone(){return new ui(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(c){}insertText(){}insertNodes(c){const h=this.focus.getNode();aa(h.select(0,h.getChildrenSize())).insertNodes(c)}getShape(){const c=In(this.anchor.key);if(!bo(c))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");const h=zr(c);if(h===null)throw Error("getCellRect: expected to find AnchorNode");const E=In(this.focus.key);if(!bo(E))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const S=zr(E);if(S===null)throw Error("getCellRect: expected to find focusCellNode");const $=Math.min(h.columnIndex,S.columnIndex),G=Math.max(h.columnIndex,S.columnIndex),K=Math.min(h.rowIndex,S.rowIndex),be=Math.max(h.rowIndex,S.rowIndex);return{fromX:Math.min($,G),fromY:Math.min(K,be),toX:Math.max($,G),toY:Math.max(K,be)}}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor.getNode(),E=this.focus.getNode(),S=ki(h,bo),$=ki(E,bo);if(!bo(S))throw Error("Expected GridSelection anchor to be (or a child of) GridCellNode");if(!bo($))throw Error("Expected GridSelection focus to be (or a child of) GridCellNode");const G=S.getParent();if(!nu(G))throw Error("Expected anchorCell to have a parent GridRowNode");const K=G.getParent();if(!kh(K))throw Error("Expected tableNode to have a parent GridNode");const be=$.getParents()[1];if(be!==K){if(K.isParentOf($)){const jt=be.getParent();if(jt==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,$.getKey(),jt.getKey())}else{const jt=K.getParent();if(jt==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,jt.getKey(),$.getKey())}return this.getNodes()}const[ye,Ne,we]=Ny(K,S,$);let Ae=Math.min(Ne.startColumn,we.startColumn),Te=Math.min(Ne.startRow,we.startRow),He=Math.max(Ne.startColumn+Ne.cell.__colSpan-1,we.startColumn+we.cell.__colSpan-1),Le=Math.max(Ne.startRow+Ne.cell.__rowSpan-1,we.startRow+we.cell.__rowSpan-1),Je=Ae,ft=Te,Ye=Ae,Ft=Te;function Ht(jt){const{cell:Jt,startColumn:cn,startRow:Wt}=jt;Ae=Math.min(Ae,cn),Te=Math.min(Te,Wt),He=Math.max(He,cn+Jt.__colSpan-1),Le=Math.max(Le,Wt+Jt.__rowSpan-1)}for(;Ae<Je||Te<ft||He>Ye||Le>Ft;){if(Ae<Je){const jt=Ft-ft,Jt=Je-1;for(let cn=0;cn<=jt;cn++)Ht(ye[ft+cn][Jt]);Je=Jt}if(Te<ft){const jt=Ye-Je,Jt=ft-1;for(let cn=0;cn<=jt;cn++)Ht(ye[Jt][Je+cn]);ft=Jt}if(He>Ye){const jt=Ft-ft,Jt=Ye+1;for(let cn=0;cn<=jt;cn++)Ht(ye[ft+cn][Jt]);Ye=Jt}if(Le>Ft){const jt=Ye-Je,Jt=Ft+1;for(let cn=0;cn<=jt;cn++)Ht(ye[Jt][Je+cn]);Ft=Jt}}const Pt=[K];let Zt=null;for(let jt=Te;jt<=Le;jt++)for(let Jt=Ae;Jt<=He;Jt++){const{cell:cn}=ye[jt][Jt],Wt=cn.getParent();if(!nu(Wt))throw Error("Expected GridCellNode parent to be a GridRowNode");Wt!==Zt&&Pt.push(Wt),Pt.push(cn,...dd(cn)),Zt=Wt}return cl()||(this._cachedNodes=Pt),Pt}getTextContent(){const c=this.getNodes();let h="";for(let E=0;E<c.length;E++)h+=c[E].getTextContent();return h}}function Ir(g){return g instanceof ui}class rr extends al{constructor(c,h,E,S){super(c,h),this.format=E,this.style=S}getCachedNodes(){return this._cachedNodes}setCachedNodes(c){this._cachedNodes=c}is(c){return Tt(c)?this.anchor.is(c.anchor)&&this.focus.is(c.focus)&&this.format===c.format&&this.style===c.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const c=this._cachedNodes;if(c!==null)return c;const h=this.anchor,E=this.focus,S=h.isBefore(E),$=S?h:E,G=S?E:h;let K=$.getNode(),be=G.getNode();const ye=$.offset,Ne=G.offset;if(rt(K)&&(K=K.getDescendantByIndex(ye)??K),rt(be)){let Ae=be.getDescendantByIndex(Ne);Ae!==null&&Ae!==K&&be.getChildAtIndex(Ne)===Ae&&(Ae=Ae.getPreviousSibling()),be=Ae??be}let we;return K.is(be)?rt(K)&&K.getChildrenSize()>0?we=[]:we=[K]:we=K.getNodesBetween(be),cl()||(this._cachedNodes=we),we}setTextNodeRange(c,h,E,S){ko(this.anchor,c.__key,h,"text"),ko(this.focus,E.__key,S,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const c=this.getNodes();if(c.length===0)return"";const h=c[0],E=c[c.length-1],S=this.anchor,$=this.focus,G=S.isBefore($),[K,be]=Po(this);let ye="",Ne=!0;for(let we=0;we<c.length;we++){const Ae=c[we];if(rt(Ae)&&!Ae.isInline())Ne||(ye+=`
|
|
239
|
-
`),Ae.isEmpty()?Ne=!1:Ne=!0;else if(Ne=!1,St(Ae)){let Te=Ae.getTextContent();Ae===h?Ae===E?(S.type!=="element"||$.type!=="element"||$.offset===S.offset)&&(Te=K<be?Te.slice(K,be):Te.slice(be,K)):Te=G?Te.slice(K):Te.slice(be):Ae===E&&(Te=G?Te.slice(0,be):Te.slice(0,K)),ye+=Te}else(Bn(Ae)||Do(Ae))&&(Ae!==E||!this.isCollapsed())&&(ye+=Ae.getTextContent())}return ye}applyDOMRange(c){const h=Rn(),E=h.getEditorState()._selection,S=Ey(c.startContainer,c.startOffset,c.endContainer,c.endOffset,h,E);if(S===null)return;const[$,G]=S;ko(this.anchor,$.key,$.offset,$.type),ko(this.focus,G.key,G.offset,G.type),this._cachedNodes=null}clone(){const c=this.anchor,h=this.focus;return new rr(tr(c.key,c.offset,c.type),tr(h.key,h.offset,h.type),this.format,this.style)}toggleFormat(c){this.format=Xn(this.format,c,null),this.dirty=!0}setStyle(c){this.style=c,this.dirty=!0}hasFormat(c){const h=Tr[c];return(this.format&h)!==0}insertRawText(c){const h=c.split(/(\r?\n|\t)/),E=[],S=h.length;for(let $=0;$<S;$++){const G=h[$];G===`
|
|
240
|
-
`||G===`\r
|
|
241
|
-
`?E.push(Or()):G===" "?E.push(Ta()):E.push(Gn(G))}this.insertNodes(E)}insertText(c){const h=this.anchor,E=this.focus,S=this.isCollapsed()||h.isBefore(E),$=this.format,G=this.style;S&&h.type==="element"?Ed(h,E,$,G):!S&&E.type==="element"&&Ed(E,h,$,G);const K=this.getNodes(),be=K.length,ye=S?h:E,Ne=S?E:h,we=ye.offset,Ae=Ne.offset;let Te=K[0];if(!St(Te))throw Error("insertText: first node is not a text node");const He=Te.getTextContent().length,Le=Te.getParentOrThrow(),Je=be-1;let ft=K[Je];if(this.isCollapsed()&&we===He&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextAfter()||!Le.canInsertTextAfter()&&Te.getNextSibling()===null)){let Ye=Te.getNextSibling();if((!St(Ye)||!Ye.canInsertTextBefore()||Fs(Ye))&&(Ye=Gn(),Ye.setFormat($),Le.canInsertTextAfter()?Te.insertAfter(Ye):Le.insertAfter(Ye)),Ye.select(0,0),Te=Ye,c!==""){this.insertText(c);return}}else if(this.isCollapsed()&&we===0&&(Te.isSegmented()||Te.isToken()||!Te.canInsertTextBefore()||!Le.canInsertTextBefore()&&Te.getPreviousSibling()===null)){let Ye=Te.getPreviousSibling();if((!St(Ye)||Fs(Ye))&&(Ye=Gn(),Ye.setFormat($),Le.canInsertTextBefore()?Te.insertBefore(Ye):Le.insertBefore(Ye)),Ye.select(),Te=Ye,c!==""){this.insertText(c);return}}else if(Te.isSegmented()&&we!==He){const Ye=Gn(Te.getTextContent());Ye.setFormat($),Te.replace(Ye),Te=Ye}else if(!this.isCollapsed()&&c!==""){const Ye=ft.getParent();if(!Le.canInsertTextBefore()||!Le.canInsertTextAfter()||rt(Ye)&&(!Ye.canInsertTextBefore()||!Ye.canInsertTextAfter())){this.insertText(""),xy(this.anchor,this.focus,null),this.insertText(c);return}}if(be===1){if(Te.isToken()){const Pt=Gn(c);Pt.select(),Te.replace(Pt);return}const Ye=Te.getFormat(),Ft=Te.getStyle();if(we===Ae&&(Ye!==$||Ft!==G))if(Te.getTextContent()==="")Te.setFormat($),Te.setStyle(G);else{const Pt=Gn(c);if(Pt.setFormat($),Pt.setStyle(G),Pt.select(),we===0)Te.insertBefore(Pt,!1);else{const[Zt]=Te.splitText(we);Zt.insertAfter(Pt,!1)}Pt.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);return}else if(ds(Te)){const Pt=Gn(c);Pt.setFormat($),Pt.setStyle(G),Pt.select(),Te.replace(Pt);return}const Ht=Ae-we;Te=Te.spliceText(we,Ht,c,!0),Te.getTextContent()===""?Te.remove():this.anchor.type==="text"&&(Te.isComposing()?this.anchor.offset-=c.length:(this.format=Ye,this.style=Ft))}else{const Ye=new Set([...Te.getParentKeys(),...ft.getParentKeys()]),Ft=rt(Te)?Te:Te.getParentOrThrow();let Ht=rt(ft)?ft:ft.getParentOrThrow(),Pt=ft;if(!Ft.is(Ht)&&Ht.isInline())do Pt=Ht,Ht=Ht.getParentOrThrow();while(Ht.isInline());if(Ne.type==="text"&&(Ae!==0||ft.getTextContent()==="")||Ne.type==="element"&&ft.getIndexWithinParent()<Ae)if(St(ft)&&!ft.isToken()&&Ae!==ft.getTextContentSize()){if(ft.isSegmented()){const Wt=Gn(ft.getTextContent());ft.replace(Wt),ft=Wt}!ro(Ne.getNode())&&Ne.type==="text"&&(ft=ft.spliceText(0,Ae,"")),Ye.add(ft.__key)}else{const Wt=ft.getParentOrThrow();!Wt.canBeEmpty()&&Wt.getChildrenSize()===1?Wt.remove():ft.remove()}else Ye.add(ft.__key);const Zt=Ht.getChildren(),jt=new Set(K),Jt=Ft.is(Ht),cn=Ft.isInline()&&Te.getNextSibling()===null?Ft:Te;for(let Wt=Zt.length-1;Wt>=0;Wt--){const Wn=Zt[Wt];if(Wn.is(Te)||rt(Wn)&&Wn.isParentOf(Te))break;Wn.isAttached()&&(!jt.has(Wn)||Wn.is(Pt)?Jt||cn.insertAfter(Wn,!1):Wn.remove())}if(!Jt){let Wt=Ht,Wn=null;for(;Wt!==null;){const Io=Wt.getChildren(),zi=Io.length;(zi===0||Io[zi-1].is(Wn))&&(Ye.delete(Wt.__key),Wn=Wt),Wt=Wt.getParent()}}if(!Te.isToken())Te=Te.spliceText(we,He-we,c,!0),Te.getTextContent()===""?Te.remove():Te.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=c.length);else if(we===He)Te.select();else{const Wt=Gn(c);Wt.select(),Te.replace(Wt)}for(let Wt=1;Wt<be;Wt++){const Wn=K[Wt],Io=Wn.__key;Ye.has(Io)||Wn.remove()}}}removeText(){this.insertText("")}formatText(c){if(this.isCollapsed()){this.toggleFormat(c),kn(null);return}const h=this.getNodes(),E=[];for(const Ye of h)St(Ye)&&E.push(Ye);const S=E.length;if(S===0){this.toggleFormat(c),kn(null);return}const $=this.anchor,G=this.focus,K=this.isBackward(),be=K?G:$,ye=K?$:G;let Ne=0,we=E[0],Ae=be.type==="element"?0:be.offset;if(be.type==="text"&&Ae===we.getTextContentSize()&&(Ne=1,we=E[1],Ae=0),we==null)return;const Te=we.getFormatFlags(c,null),He=S-1;let Le=E[He];const Je=ye.type==="text"?ye.offset:Le.getTextContentSize();if(we.is(Le)){if(Ae===Je)return;if(Ae===0&&Je===we.getTextContentSize())we.setFormat(Te);else{const Ye=we.splitText(Ae,Je),Ft=Ae===0?Ye[0]:Ye[1];Ft.setFormat(Te),be.type==="text"&&be.set(Ft.__key,0,"text"),ye.type==="text"&&ye.set(Ft.__key,Je-Ae,"text")}this.format=Te;return}Ae!==0&&([,we]=we.splitText(Ae),Ae=0),we.setFormat(Te);const ft=Le.getFormatFlags(c,Te);Je>0&&(Je!==Le.getTextContentSize()&&([Le]=Le.splitText(Je)),Le.setFormat(ft));for(let Ye=Ne+1;Ye<He;Ye++){const Ft=E[Ye];if(!Ft.isToken()){const Ht=Ft.getFormatFlags(c,ft);Ft.setFormat(Ht)}}be.type==="text"&&be.set(we.__key,Ae,"text"),ye.type==="text"&&ye.set(Le.__key,Je,"text"),this.format=Te|ft}insertNodes(c){if(c.length===0)return;if(this.anchor.key==="root"){this.insertParagraph();const Le=_n();if(!Tt(Le))throw Error("Expected RangeSelection after insertParagraph");return Le.insertNodes(c)}const h=rs(this.anchor.getNode(),pa),E=c[c.length-1];if("__language"in h){if("__language"in c[0])this.insertText(c[0].getTextContent());else{const Le=Sh(this);h.splice(Le,0,c),E.selectEnd()}return}const S=Le=>(rt(Le)||Bn(Le))&&!Le.isInline();if(!c.some(S)){const Le=Sh(this);h.splice(Le,0,c),E.selectEnd();return}const $=E1(c),G=$.getLastDescendant(),K=$.getChildren(),be=Le=>"__value"in Le&&"__checked"in Le,ye=Le=>rt(Le)&&pa(Le)&&!Le.isEmpty()&&rt(h)&&(!h.isEmpty()||be(h)),Ne=!rt(h)||!h.isEmpty()?this.insertParagraph():null,we=K[K.length-1];let Ae=K[0];ye(Ae)&&(h.append(...Ae.getChildren()),Ae=K[1]),Ae&&An(h,Ae);const Te=rs(G,pa);Ne&&rt(Te)&&(be(Ne)||pa(we))&&(Te.append(...Ne.getChildren()),Ne.remove()),rt(h)&&h.isEmpty()&&h.remove(),G.selectEnd();const He=rt(h)?h.getLastChild():null;Do(He)&&Te!==h&&He.remove()}insertParagraph(){if(this.anchor.key==="root"){const G=Wi();return fr().splice(this.anchor.offset,0,[G]),G.select(),G}const c=Sh(this),h=rs(this.anchor.getNode(),pa),E=h.getChildAtIndex(c),S=E?[E,...E.getNextSiblings()]:[],$=h.insertNewAfter(this,!1);return $?($.append(...S),$.selectStart(),$):null}insertLineBreak(c){const h=Or();if(this.insertNodes([h]),c){const E=h.getParentOrThrow(),S=h.getIndexWithinParent();E.select(S,S)}}extract(){const c=this.getNodes(),h=c.length,E=h-1,S=this.anchor,$=this.focus;let G=c[0],K=c[E];const[be,ye]=Po(this);if(h===0)return[];if(h===1){if(St(G)&&!this.isCollapsed()){const we=be>ye?ye:be,Ae=be>ye?be:ye,Te=G.splitText(we,Ae),He=we===0?Te[0]:Te[1];return He!=null?[He]:[]}return[G]}const Ne=S.isBefore($);if(St(G)){const we=Ne?be:ye;we===G.getTextContentSize()?c.shift():we!==0&&([,G]=G.splitText(we),c[0]=G)}if(St(K)){const we=K.getTextContent().length,Ae=Ne?ye:be;Ae===0?c.pop():Ae!==we&&([K]=K.splitText(Ae),c[E]=K)}return c}modify(c,h,E){const S=this.focus,$=this.anchor,G=c==="move",K=da(S,h);if(Bn(K)&&!K.isIsolated()){if(G&&K.isKeyboardSelectable()){const Te=Th();Te.add(K.__key),hr(Te);return}const Ae=h?K.getPreviousSibling():K.getNextSibling();if(St(Ae)){const Te=Ae.__key,He=h?Ae.getTextContent().length:0;S.set(Te,He,"text"),G&&$.set(Te,He,"text");return}else{const Te=K.getParentOrThrow();let He,Le;rt(Ae)?(Le=Ae.__key,He=h?Ae.getChildrenSize():0):(He=K.getIndexWithinParent(),Le=Te.__key,h||He++),S.set(Le,He,"element"),G&&$.set(Le,He,"element");return}}const be=Rn(),ye=Br(be._window);if(!ye)return;const Ne=be._blockCursorElement,we=be._rootElement;if(we!==null&&Ne!==null&&rt(K)&&!K.isInline()&&!K.canBeEmpty()&&ha(Ne,be,we),Bi(ye,c,h?"backward":"forward",E),ye.rangeCount>0){const Ae=ye.getRangeAt(0),Te=this.anchor.getNode(),He=ro(Te)?Te:Fc(Te);if(this.applyDOMRange(Ae),this.dirty=!0,!G){const Le=this.getNodes(),Je=[];let ft=!1;for(let Ye=0;Ye<Le.length;Ye++){const Ft=Le[Ye];Ln(Ft,He)?Je.push(Ft):ft=!0}if(ft&&Je.length>0)if(h){const Ye=Je[0];rt(Ye)?Ye.selectStart():Ye.getParentOrThrow().selectStart()}else{const Ye=Je[Je.length-1];rt(Ye)?Ye.selectEnd():Ye.getParentOrThrow().selectEnd()}(ye.anchorNode!==Ae.startContainer||ye.anchorOffset!==Ae.startOffset)&&Lr(this)}}}deleteCharacter(c){const h=this.isCollapsed();if(this.isCollapsed()){const E=this.anchor,S=this.focus;let $=E.getNode();if(!c&&(E.type==="element"&&rt($)&&E.offset===$.getChildrenSize()||E.type==="text"&&E.offset===$.getTextContentSize())){const K=$.getParent(),be=$.getNextSibling()||(K===null?null:K.getNextSibling());if(rt(be)&&be.isShadowRoot())return}const G=da(S,c);if(Bn(G)&&!G.isIsolated()){if(G.isKeyboardSelectable()&&rt($)&&$.getChildrenSize()===0){$.remove();const K=Th();K.add(G.__key),hr(K)}else G.remove(),Rn().dispatchCommand(t,void 0);return}else if(!c&&rt(G)&&rt($)&&$.isEmpty()){$.remove(),G.selectStart();return}if(this.modify("extend",c,"character"),this.isCollapsed()){if(c&&E.offset===0&&(E.type==="element"?E.getNode():E.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const K=S.type==="text"?S.getNode():null;if($=E.type==="text"?E.getNode():null,K!==null&&K.isSegmented()){const be=S.offset,ye=K.getTextContentSize();if(K.is($)||c&&be!==ye||!c&&be!==0){eu(K,c,be);return}}else if($!==null&&$.isSegmented()){const be=E.offset,ye=$.getTextContentSize();if($.is(K)||c&&be!==0||!c&&be!==ye){eu($,c,be);return}}sl(this,c)}}if(this.removeText(),c&&!h&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const E=this.anchor.getNode();E.isEmpty()&&ro(E.getParent())&&E.getIndexWithinParent()===0&&E.collapseAtStart(this)}}deleteLine(c){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",c,"lineboundary"),(c?this.focus:this.anchor).offset===0&&this.modify("extend",c,"character")),this.removeText()}deleteWord(c){this.isCollapsed()&&this.modify("extend",c,"word"),this.removeText()}}function gr(g){return g instanceof pn}function Mo(g){const c=g.offset;if(g.type==="text")return c;const h=g.getNode();return c===h.getChildrenSize()?h.getTextContent().length:0}function Po(g){const c=g.anchor,h=g.focus;return c.type==="element"&&h.type==="element"&&c.key===h.key&&c.offset===h.offset?[0,0]:[Mo(c),Mo(h)]}function Lr(g){const c=g.focus,h=g.anchor,E=h.key,S=h.offset,$=h.type;ko(h,c.key,c.offset,c.type),ko(c,E,S,$),g._cachedNodes=null}function Bi(g,c,h,E){g.modify(c,h,E)}function sl(g,c){const h=g.anchor,E=g.focus,S=h.getNode(),$=E.getNode();if(S===$&&h.type==="text"&&E.type==="text"){const G=h.offset,K=E.offset,be=G<K,ye=be?G:K,Ne=be?K:G,we=Ne-1;if(ye!==we){const Ae=S.getTextContent().slice(ye,Ne);Oc(Ae)||(c?E.offset=we:h.offset=we)}}}function eu(g,c,h){const E=g,S=E.getTextContent().split(/(?=\s)/g),$=S.length;let G=0,K=0;for(let ye=0;ye<$;ye++){const Ne=S[ye],we=ye===$-1;if(K=G,G+=Ne.length,c&&G===h||G>h||we){S.splice(ye,1),we&&(K=void 0);break}}const be=S.join("").trim();be===""?E.remove():(E.setTextContent(be),E.select(K,K))}function h1(g,c,h){const E=g.getParent();return h===null||E===null||!E.canBeEmpty()||E!==h.getNode()}function by(g,c,h,E){let S=c,$;if(g.nodeType===We){let G=!1;const K=g.childNodes,be=K.length;S===be&&(G=!0,S=be-1);let ye=K[S],Ne=!1;if(ye===E._blockCursorElement?(ye=K[S+1],Ne=!0):E._blockCursorElement!==null&&S--,$=Si(ye),St($))S=Ua($,G);else{let we=Si(g);if(we===null)return null;if(rt(we)){let Ae=we.getChildAtIndex(S);if(rt(Ae)&&h1(Ae,S,h)){const Te=G?Ae.getLastDescendant():Ae.getFirstDescendant();Te===null?(we=Ae,S=0):(Ae=Te,we=rt(Ae)?Ae:Ae.getParentOrThrow())}St(Ae)?($=Ae,we=null,S=Ua(Ae,G)):Ae!==we&&G&&!Ne&&S++}else{const Ae=we.getIndexWithinParent();c===0&&Bn(we)&&Si(g)===we?S=Ae:S=Ae+1,we=we.getParentOrThrow()}if(rt(we))return tr(we.__key,S,"element")}}else $=Si(g);return St($)?tr($.__key,S,"text"):null}function _y(g,c,h){const E=g.offset,S=g.getNode();if(E===0){const $=S.getPreviousSibling(),G=S.getParent();if(!c)rt($)&&!h&&$.isInline()?(g.key=$.__key,g.offset=$.getChildrenSize(),g.type="element"):St($)&&(g.key=$.__key,g.offset=$.getTextContent().length);else if((h||!c)&&$===null&&rt(G)&&G.isInline()){const K=G.getPreviousSibling();St(K)&&(g.key=K.__key,g.offset=K.getTextContent().length)}}else if(E===S.getTextContent().length){const $=S.getNextSibling(),G=S.getParent();if(c&&rt($)&&$.isInline())g.key=$.__key,g.offset=0,g.type="element";else if((h||c)&&$===null&&rt(G)&&G.isInline()&&!G.canInsertTextAfter()){const K=G.getNextSibling();St(K)&&(g.key=K.__key,g.offset=0)}}}function xy(g,c,h){if(g.type==="text"&&c.type==="text"){const E=g.isBefore(c),S=g.is(c);_y(g,E,S),_y(c,!E,S),S&&(c.key=g.key,c.offset=g.offset,c.type=g.type);const $=Rn();if($.isComposing()&&$._compositionKey!==g.key&&Tt(h)){const G=h.anchor,K=h.focus;ko(g,G.key,G.offset,G.type),ko(c,K.key,K.offset,K.type)}}}function Ey(g,c,h,E,S,$){if(g===null||h===null||!ei(S,g,h))return null;const G=by(g,c,Tt($)?$.anchor:null,S);if(G===null)return null;const K=by(h,E,Tt($)?$.focus:null,S);if(K===null)return null;if(G.type==="element"&&K.type==="element"){const be=Si(g),ye=Si(h);if(Bn(be)&&Bn(ye))return null}return xy(G,K,$),[G,K]}function p1(g){return rt(g)&&!g.isInline()}function Cy(g,c,h,E,S,$){const G=di(),K=new rr(tr(g,c,S),tr(h,E,$),0,"");return K.dirty=!0,G._selection=K,K}function g1(){const g=tr("root",0,"element"),c=tr("root",0,"element");return new rr(g,c,0,"")}function Th(){return new pn(new Set)}function m1(){const g=tr("root",0,"element"),c=tr("root",0,"element");return new ui("root",g,c)}function y1(g){const c=g.getEditorState()._selection,h=Br(g._window);return Tt(c)||c==null?Nh(c,h,g):c.clone()}function Nh(g,c,h){const E=h._window;if(E===null)return null;const S=E.event,$=S?S.type:void 0,G=$==="selectionchange",K=!at()&&(G||$==="beforeinput"||$==="compositionstart"||$==="compositionend"||$==="click"&&S&&S.detail===3||$==="drop"||$===void 0);let be,ye,Ne,we;if(!Tt(g)||K){if(c===null)return null;if(be=c.anchorNode,ye=c.focusNode,Ne=c.anchorOffset,we=c.focusOffset,G&&Tt(g)&&!ei(h,be,ye))return g.clone()}else return g.clone();const Ae=Ey(be,Ne,ye,we,h,g);if(Ae===null)return null;const[Te,He]=Ae;return new rr(Te,He,Tt(g)?g.format:0,Tt(g)?g.style:"")}function _n(){return di()._selection}function ll(){return Rn()._editorState._selection}function Cd(g,c,h,E=1){const S=g.anchor,$=g.focus,G=S.getNode(),K=$.getNode();if(!c.is(G)&&!c.is(K))return;const be=c.__key;if(g.isCollapsed()){const ye=S.offset;if(h<=ye&&E>0||h<ye&&E<0){const Ne=Math.max(0,ye+E);S.set(be,Ne,"element"),$.set(be,Ne,"element"),wy(g)}}else{const ye=g.isBackward(),Ne=ye?$:S,we=Ne.getNode(),Ae=ye?S:$,Te=Ae.getNode();if(c.is(we)){const He=Ne.offset;(h<=He&&E>0||h<He&&E<0)&&Ne.set(be,Math.max(0,He+E),"element")}if(c.is(Te)){const He=Ae.offset;(h<=He&&E>0||h<He&&E<0)&&Ae.set(be,Math.max(0,He+E),"element")}}wy(g)}function wy(g){const c=g.anchor,h=c.offset,E=g.focus,S=E.offset,$=c.getNode(),G=E.getNode();if(g.isCollapsed()){if(!rt($))return;const K=$.getChildrenSize(),be=h>=K,ye=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text"),E.set(ye.__key,Ne,"text")}return}if(rt($)){const K=$.getChildrenSize(),be=h>=K,ye=be?$.getChildAtIndex(K-1):$.getChildAtIndex(h);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),c.set(ye.__key,Ne,"text")}}if(rt(G)){const K=G.getChildrenSize(),be=S>=K,ye=be?G.getChildAtIndex(K-1):G.getChildAtIndex(S);if(St(ye)){let Ne=0;be&&(Ne=ye.getTextContentSize()),E.set(ye.__key,Ne,"text")}}}function v1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(Tt(E)){const S=E.anchor,$=E.focus;let G;if(S.type==="text"&&(G=S.getNode(),G.selectionTransform(h,E)),$.type==="text"){const K=$.getNode();G!==K&&K.selectionTransform(h,E)}}}function wd(g,c,h,E,S){let $=null,G=0,K=null;E!==null?($=E.__key,St(E)?(G=E.getTextContentSize(),K="text"):rt(E)&&(G=E.getChildrenSize(),K="element")):S!==null&&($=S.__key,St(S)?K="text":rt(S)&&(K="element")),$!==null&&K!==null?g.set($,G,K):(G=c.getIndexWithinParent(),G===-1&&(G=h.getChildrenSize()),g.set(h.__key,G,"element"))}function Ty(g,c,h,E,S){g.type==="text"?(g.key=h,c||(g.offset+=S)):g.offset>E.getIndexWithinParent()&&(g.offset-=1)}function b1(g,c,h,E,S,$,G){const K=E.anchorNode,be=E.focusNode,ye=E.anchorOffset,Ne=E.focusOffset,we=document.activeElement;if(S.has("collaboration")&&we!==$||we!==null&&wc(we))return;if(!Tt(c)){g!==null&&ei(h,K,be)&&E.removeAllRanges();return}const Ae=c.anchor,Te=c.focus,He=Ae.key,Le=Te.key,Je=ts(h,He),ft=ts(h,Le),Ye=Ae.offset,Ft=Te.offset,Ht=c.format,Pt=c.style,Zt=c.isCollapsed();let jt=Je,Jt=ft,cn=!1;if(Ae.type==="text"){jt=On(Je);const Wt=Ae.getNode();cn=Wt.getFormat()!==Ht||Wt.getStyle()!==Pt}else Tt(g)&&g.anchor.type==="text"&&(cn=!0);if(Te.type==="text"&&(Jt=On(ft)),!(jt===null||Jt===null)&&(Zt&&(g===null||cn||Tt(g)&&(g.format!==Ht||g.style!==Pt))&&it(Ht,Pt,Ye,He,performance.now()),!(ye===Ye&&Ne===Ft&&K===jt&&be===Jt&&!(E.type==="Range"&&Zt)&&((we===null||!$.contains(we))&&$.focus({preventScroll:!0}),Ae.type!=="element")))){try{E.setBaseAndExtent(jt,Ye,Jt,Ft)}catch{}if(!S.has("skip-scroll-into-view")&&c.isCollapsed()&&$!==null&&$===document.activeElement){const Wt=c instanceof rr&&c.anchor.type==="element"?jt.childNodes[Ye]||null:E.rangeCount>0?E.getRangeAt(0):null;if(Wt!==null){let Wn;if(Wt instanceof Text){const Io=document.createRange();Io.selectNode(Wt),Wn=Io.getBoundingClientRect()}else Wn=Wt.getBoundingClientRect();xh(h,Wn,$)}}Ie()}}function _1(g){let c=_n()||ll();c===null&&(c=fr().selectEnd()),c.insertNodes(g)}function x1(){const g=_n();return g===null?"":g.getTextContent()}function Ny(g,c,h){const E=[];let S=null,$=null;function G(ye,Ne,we){const Ae={cell:we,startColumn:Ne,startRow:ye},Te=we.__rowSpan,He=we.__colSpan;for(let Le=0;Le<Te;Le++){E[ye+Le]===void 0&&(E[ye+Le]=[]);for(let Je=0;Je<He;Je++)E[ye+Le][Ne+Je]=Ae}c.is(we)&&(S=Ae),h.is(we)&&($=Ae)}function K(ye,Ne){return E[ye]===void 0||E[ye][Ne]===void 0}const be=g.getChildren();for(let ye=0;ye<be.length;ye++){const Ne=be[ye];if(!nu(Ne))throw Error("Expected GridNode children to be GridRowNode");const we=Ne.getChildren();let Ae=0;for(const Te of we){if(!bo(Te))throw Error("Expected GridRowNode children to be GridCellNode");for(;!K(ye,Ae);)Ae++;G(ye,Ae,Te),Ae+=Te.__colSpan}}if(S===null)throw Error("Anchor not found in Grid");if($===null)throw Error("Focus not found in Grid");return[E,S,$]}function Sy(g){let c;if(g instanceof Dh)c=g;else if(g instanceof $t){const S=ki(g,bo);if(!bo(S))throw Error("Expected to find a parent GridCellNode");c=S}else{const S=ki(g.getNode(),bo);if(!bo(S))throw Error("Expected to find a parent GridCellNode");c=S}const h=c.getParent();if(!nu(h))throw Error("Expected GridCellNode to have a parent GridRowNode");const E=h.getParent();if(!kh(E))throw Error("Expected GridRowNode to have a parent GridNode");return[c,h,E]}function Sh(g){g.isCollapsed()||g.removeText();const c=g.anchor,h=c.getNode();if(!St(h))return c.offset;const E=h.getParent();if(!E){const be=Wi();return fr().append(be),be.select(),0}const S=h.splitText(c.offset);if(S.length===0)return 0;const $=c.offset===0?0:1,G=S[0].getIndexWithinParent()+$;if(!E.isInline()||G===0)return G;const K=E.getChildAtIndex(G);return K&&E.insertNewAfter(g).append(K,...K.getNextSiblings()),E.getIndexWithinParent()+$}function E1(g){const c=Wi();let h=null;for(let E=0;E<g.length;E++){const S=g[E],$=Do(S);if($||Bn(S)&&S.isInline()||rt(S)&&S.isInline()||St(S)||S.isParentRequired()){if(h===null&&(h=S.createParentElementNode(),c.append(h),$))continue;h!==null&&h.append(S)}else c.append(S),h=null}return c}let mr=null,yr=null,Hr=!1,Oh=!1,Td=0;const Oy={characterData:!0,childList:!0,subtree:!0};function cl(){return Hr||mr!==null&&mr._readOnly}function Ar(){if(Hr)throw Error("Cannot use method in read-only mode.")}function Ay(){if(Td>99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function di(){if(mr===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return mr}function Rn(){if(yr===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return yr}function C1(){return yr}function Ry(g,c,h){const E=c.__type,S=Cc(g,E);let $=h.get(E);$===void 0&&($=Array.from(S.transforms),h.set(E,$));const G=$.length;for(let K=0;K<G&&($[K](c),!!c.isAttached());K++);}function $y(g,c){return g!==void 0&&g.__key!==c&&g.isAttached()}function w1(g,c){const h=c._dirtyLeaves,E=g._nodeMap;for(const S of h){const $=E.get(S);St($)&&$.isAttached()&&$.isSimpleText()&&!$.isUnmergeable()&&Mr($)}}function T1(g,c){const h=c._dirtyLeaves,E=c._dirtyElements,S=g._nodeMap,$=Jr(),G=new Map;let K=h,be=K.size,ye=E,Ne=ye.size;for(;be>0||Ne>0;){if(be>0){c._dirtyLeaves=new Set;for(const we of K){const Ae=S.get(we);St(Ae)&&Ae.isAttached()&&Ae.isSimpleText()&&!Ae.isUnmergeable()&&Mr(Ae),Ae!==void 0&&$y(Ae,$)&&Ry(c,Ae,G),h.add(we)}if(K=c._dirtyLeaves,be=K.size,be>0){Td++;continue}}c._dirtyLeaves=new Set,c._dirtyElements=new Map;for(const we of ye){const Ae=we[0],Te=we[1];if(Ae!=="root"&&!Te)continue;const He=S.get(Ae);He!==void 0&&$y(He,$)&&Ry(c,He,G),E.set(Ae,Te)}K=c._dirtyLeaves,be=K.size,ye=c._dirtyElements,Ne=ye.size,Td++}c._dirtyLeaves=h,c._dirtyElements=E}function N1(g){return Ah(g,Rn()._nodes)}function Ah(g,c){const h=g.type,E=c.get(h);if(E===void 0)throw Error(`parseEditorState: type "${h}" + not found`);const S=E.klass;if(g.type!==S.getType())throw Error(`LexicalNode: Node ${S.name} does not implement .importJSON().`);const $=S.importJSON(g),G=g.children;if(rt($)&&Array.isArray(G))for(let K=0;K<G.length;K++){const be=G[K],ye=Ah(be,c);$.append(ye)}return $}function S1(g,c,h){const E=$h(),S=mr,$=Hr,G=yr,K=c._dirtyElements,be=c._dirtyLeaves,ye=c._cloneNotNeeded,Ne=c._dirtyType;c._dirtyElements=new Map,c._dirtyLeaves=new Set,c._cloneNotNeeded=new Set,c._dirtyType=0,mr=E,Hr=!1,yr=c;try{const we=c._nodes,Ae=g.root;Ah(Ae,we),h&&h(),E._readOnly=!0,ky(E)}catch(we){we instanceof Error&&c._onError(we)}finally{c._dirtyElements=K,c._dirtyLeaves=be,c._cloneNotNeeded=ye,c._dirtyType=Ne,mr=S,Hr=$,yr=G}return E}function Dy(g,c){const h=mr,E=Hr,S=yr;mr=g,Hr=!0,yr=null;try{return c()}finally{mr=h,Hr=E,yr=S}}function ky(g){const c=g._nodeMap;c.set=()=>{throw new Error("Cannot call set() on a frozen Lexical node map")},c.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},c.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function fs(g,c){const h=g._pendingEditorState,E=g._rootElement,S=g._headless||E===null;if(h===null)return;const $=g._editorState,G=$._selection,K=h._selection,be=g._dirtyType!==st,ye=mr,Ne=Hr,we=yr,Ae=g._updating,Te=g._observer;let He=null;if(g._pendingEditorState=null,g._editorState=h,!S&&be&&Te!==null){yr=g,mr=h,Hr=!1,g._updating=!0;try{const Zt=g._dirtyType,jt=g._dirtyElements,Jt=g._dirtyLeaves;Te.disconnect(),He=gd($,h,g,Zt,jt,Jt)}catch(Zt){if(Zt instanceof Error&&g._onError(Zt),!Oh)jy(g,null,E,h),Er(g),g._dirtyType=Ct,Oh=!0,fs(g,$),Oh=!1;else throw Zt;return}finally{Te.observe(E,Oy),g._updating=Ae,mr=ye,Hr=Ne,yr=we}}h._readOnly||(h._readOnly=!0,ky(h),Tt(K)&&(Object.freeze(K.anchor),Object.freeze(K.focus)),Object.freeze(K));const Le=g._dirtyLeaves,Je=g._dirtyElements,ft=g._normalizedNodes,Ye=g._updateTags,Ft=g._deferred;be&&(g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements=new Map,g._normalizedNodes=new Set,g._updateTags=new Set),fd(g,h);const Ht=S?null:Br(g._window);if(g._editable&&Ht!==null&&(be||K===null||K.dirty)){yr=g,mr=h;try{if(Te!==null&&Te.disconnect(),be||K===null||K.dirty){const Zt=g._blockCursorElement;Zt!==null&&ha(Zt,g,E),b1(G,K,g,Ht,Ye,E)}Lt(g,E,K),Te!==null&&Te.observe(E,Oy)}finally{yr=we,mr=ye}}He!==null&&A1(g,He,Ye,Le,$),!Tt(K)&&K!==null&&(G===null||!G.is(K))&&g.dispatchCommand(t,void 0);const Pt=g._pendingDecorators;Pt!==null&&(g._decorators=Pt,g._pendingDecorators=null,tu("decorator",g,!0,Pt)),O1(g,c||$,h),tu("update",g,!0,{dirtyElements:Je,dirtyLeaves:Le,editorState:h,normalizedNodes:ft,prevEditorState:c||$,tags:Ye}),$1(g,Ft),R1(g)}function O1(g,c,h){const E=Bs(c),S=Bs(h);E!==S&&tu("textcontent",g,!0,S)}function A1(g,c,h,E,S){const $=Array.from(g._listeners.mutation),G=$.length;for(let K=0;K<G;K++){const[be,ye]=$[K],Ne=c.get(ye);Ne!==void 0&&be(Ne,{dirtyLeaves:E,prevEditorState:S,updateTags:h})}}function tu(g,c,h,...E){const S=c._updating;c._updating=h;try{const $=Array.from(c._listeners[g]);for(let G=0;G<$.length;G++)$[G].apply(null,E)}finally{c._updating=S}}function My(g,c,h){if(g._updating===!1||yr!==g){let S=!1;return g.update(()=>{S=My(g,c,h)}),S}const E=zs(g);for(let S=4;S>=0;S--)for(let $=0;$<E.length;$++){const G=E[$]._commands.get(c);if(G!==void 0){const K=G[S];if(K!==void 0){const be=Array.from(K),ye=be.length;for(let Ne=0;Ne<ye;Ne++)if(be[Ne](h,g)===!0)return!0}}}return!1}function R1(g){const c=g._updates;if(c.length!==0){const h=c.shift();if(h){const[E,S]=h;Iy(g,E,S)}}}function $1(g,c){if(g._deferred=[],c.length!==0){const h=g._updating;g._updating=!0;try{for(let E=0;E<c.length;E++)c[E]()}finally{g._updating=h}}}function Py(g,c){const h=g._updates;let E=c||!1;for(;h.length!==0;){const S=h.shift();if(S){const[$,G]=S;let K,be;G!==void 0&&(K=G.onUpdate,be=G.tag,G.skipTransforms&&(E=!0),K&&g._deferred.push(K),be&&g._updateTags.add(be)),$()}}return E}function Iy(g,c,h){const E=g._updateTags;let S,$,G=!1,K=!1;h!==void 0&&(S=h.onUpdate,$=h.tag,$!=null&&E.add($),G=h.skipTransforms||!1,K=h.discrete||!1),S&&g._deferred.push(S);const be=g._editorState;let ye=g._pendingEditorState,Ne=!1;(ye===null||ye._readOnly)&&(ye=g._pendingEditorState=M1(ye||be),Ne=!0),ye._flushSync=K;const we=mr,Ae=Hr,Te=yr,He=g._updating;mr=ye,Hr=!1,g._updating=!0,yr=g;try{Ne&&(g._headless?be._selection!=null&&(ye._selection=be._selection.clone()):ye._selection=y1(g));const Le=g._compositionKey;c(),G=Py(g,G),v1(ye,g),g._dirtyType!==st&&(G?w1(ye,g):T1(ye,g),Py(g),hd(be,ye,g._dirtyLeaves,g._dirtyElements));const Je=g._compositionKey;Le!==Je&&(ye._flushSync=!0);const ft=ye._selection;if(Tt(ft)){const Ye=ye._nodeMap,Ft=ft.anchor.key,Ht=ft.focus.key;if(Ye.get(Ft)===void 0||Ye.get(Ht)===void 0)throw Error("updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node.")}else gr(ft)&&ft._nodes.size===0&&(ye._selection=null)}catch(Le){Le instanceof Error&&g._onError(Le),g._pendingEditorState=be,g._dirtyType=Ct,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),fs(g);return}finally{mr=we,Hr=Ae,yr=Te,g._updating=He,Td=0}g._dirtyType!==st||k1(ye,g)?ye._flushSync?(ye._flushSync=!1,fs(g)):Ne&&po(()=>{fs(g)}):(ye._flushSync=!1,Ne&&(E.clear(),g._deferred=[],g._pendingEditorState=null))}function no(g,c,h){g._updating?g._updates.push([c,h]):Iy(g,c,h)}class Rh extends $t{constructor(c){super(c)}decorate(c,h){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Bn(g){return g instanceof Rh}class hs extends $t{constructor(c){super(c),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const c=this.getFormat();return ho[c]||""}getIndent(){return this.getLatest().__indent}getChildren(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h),h=h.getNextSibling();return c}getChildrenKeys(){const c=[];let h=this.getFirstChild();for(;h!==null;)c.push(h.__key),h=h.getNextSibling();return c}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const c=Rn()._dirtyElements;return c!==null&&c.has(this.__key)}isLastChild(){const c=this.getLatest(),h=this.getParentOrThrow().getLastChild();return h!==null&&h.is(c)}getAllTextNodes(){const c=[];let h=this.getFirstChild();for(;h!==null;){if(St(h)&&c.push(h),rt(h)){const E=h.getAllTextNodes();c.push(...E)}h=h.getNextSibling()}return c}getFirstDescendant(){let c=this.getFirstChild();for(;c!==null;){if(rt(c)){const h=c.getFirstChild();if(h!==null){c=h;continue}}break}return c}getLastDescendant(){let c=this.getLastChild();for(;c!==null;){if(rt(c)){const h=c.getLastChild();if(h!==null){c=h;continue}}break}return c}getDescendantByIndex(c){const h=this.getChildren(),E=h.length;if(c>=E){const $=h[E-1];return rt($)&&$.getLastDescendant()||$||null}const S=h[c];return rt(S)&&S.getFirstDescendant()||S||null}getFirstChild(){const c=this.getLatest().__first;return c===null?null:In(c)}getFirstChildOrThrow(){const c=this.getFirstChild();if(c===null)throw Error(`Expected node ${this.__key} to have a first child.`);return c}getLastChild(){const c=this.getLatest().__last;return c===null?null:In(c)}getLastChildOrThrow(){const c=this.getLastChild();if(c===null)throw Error(`Expected node ${this.__key} to have a last child.`);return c}getChildAtIndex(c){const h=this.getChildrenSize();let E,S;if(c<h/2){for(E=this.getFirstChild(),S=0;E!==null&&S<=c;){if(S===c)return E;E=E.getNextSibling(),S++}return null}for(E=this.getLastChild(),S=h-1;E!==null&&S>=c;){if(S===c)return E;E=E.getPreviousSibling(),S--}return null}getTextContent(){let c="";const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContent(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Kt)}return c}getTextContentSize(){let c=0;const h=this.getChildren(),E=h.length;for(let S=0;S<E;S++){const $=h[S];c+=$.getTextContentSize(),rt($)&&S!==E-1&&!$.isInline()&&(c+=Kt.length)}return c}getDirection(){return this.getLatest().__dir}hasFormat(c){if(c!==""){const h=xr[c];return(this.getFormat()&h)!==0}return!1}select(c,h){Ar();const E=_n();let S=c,$=h;const G=this.getChildrenSize();if(!this.canBeEmpty()){if(c===0&&h===0){const be=this.getFirstChild();if(St(be)||rt(be))return be.select(0,0)}else if((c===void 0||c===G)&&(h===void 0||h===G)){const be=this.getLastChild();if(St(be)||rt(be))return be.select()}}S===void 0&&(S=G),$===void 0&&($=G);const K=this.__key;if(Tt(E))E.anchor.set(K,S,"element"),E.focus.set(K,$,"element"),E.dirty=!0;else return Cy(K,S,K,$,"element","element");return E}selectStart(){const c=this.getFirstDescendant();return c?c.selectStart():this.select()}selectEnd(){const c=this.getLastDescendant();return c?c.selectEnd():this.select()}clear(){const c=this.getWritable();return this.getChildren().forEach(h=>h.remove()),c}append(...c){return this.splice(this.getChildrenSize(),0,c)}setDirection(c){const h=this.getWritable();return h.__dir=c,h}setFormat(c){const h=this.getWritable();return h.__format=c!==""?xr[c]:0,this}setIndent(c){const h=this.getWritable();return h.__indent=c,this}splice(c,h,E){const S=E.length,$=this.getChildrenSize(),G=this.getWritable(),K=G.__key,be=[],ye=[],Ne=this.getChildAtIndex(c+h);let we=null,Ae=$-h+S;if(c!==0)if(c===$)we=this.getLastChild();else{const He=this.getChildAtIndex(c);He!==null&&(we=He.getPreviousSibling())}if(h>0){let He=we===null?this.getFirstChild():we.getNextSibling();for(let Le=0;Le<h;Le++){if(He===null)throw Error("splice: sibling not found");const Je=He.getNextSibling(),ft=He.__key,Ye=He.getWritable();Zr(Ye),ye.push(ft),He=Je}}let Te=we;for(let He=0;He<S;He++){const Le=E[He];Te!==null&&Le.is(Te)&&(we=Te=Te.getPreviousSibling());const Je=Le.getWritable();Je.__parent===K&&Ae--,Zr(Je);const ft=Le.__key;if(Te===null)G.__first=ft,Je.__prev=null;else{const Ye=Te.getWritable();Ye.__next=ft,Je.__prev=Ye.__key}if(Le.__key===K)throw Error("append: attempting to append self");Je.__parent=K,be.push(ft),Te=Le}if(c+h===$){if(Te!==null){const He=Te.getWritable();He.__next=null,G.__last=Te.__key}}else if(Ne!==null){const He=Ne.getWritable();if(Te!==null){const Le=Te.getWritable();He.__prev=Te.__key,Le.__next=Ne.__key}else He.__prev=null}if(G.__size=Ae,ye.length){const He=_n();if(Tt(He)){const Le=new Set(ye),Je=new Set(be),{anchor:ft,focus:Ye}=He;Ly(ft,Le,Je)&&wd(ft,ft.getNode(),this,we,Ne),Ly(Ye,Le,Je)&&wd(Ye,Ye.getNode(),this,we,Ne),Ae===0&&!this.canBeEmpty()&&!Qn(this)&&this.remove()}}return G}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(c,h){return null}canIndent(){return!0}collapseAtStart(c){return!1}excludeFromCopy(c){return!1}canExtractContents(){return!0}canReplaceWith(c){return!0}canInsertAfter(c){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(c){return!1}extractWithChild(c,h,E){return!1}}function rt(g){return g instanceof hs}function Ly(g,c,h){let E=g.getNode();for(;E;){const S=E.__key;if(c.has(S)&&!h.has(S))return!0;E=E.getParent()}return!1}class ul extends hs{static getType(){return"root"}static clone(){return new ul}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){throw Error("getTopLevelElementOrThrow: root nodes are not top level elements")}getTextContent(){const c=this.__cachedText;return(cl()||Rn()._dirtyType===st)&&c!==null?c:super.getTextContent()}remove(){throw Error("remove: cannot be called on root nodes")}replace(c){throw Error("replace: cannot be called on root nodes")}insertBefore(c){throw Error("insertBefore: cannot be called on root nodes")}insertAfter(c){throw Error("insertAfter: cannot be called on root nodes")}updateDOM(c,h){return!1}append(...c){for(let h=0;h<c.length;h++){const E=c[h];if(!rt(E)&&!Bn(E))throw Error("rootNode.append: Only element or decorator nodes can be appended to the root node")}return super.append(...c)}static importJSON(c){const h=fr();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function D1(){return new ul}function ro(g){return g instanceof ul}function k1(g,c){const h=c.getEditorState()._selection,E=g._selection;if(E!==null){if(E.dirty||!E.is(h))return!0}else if(h!==null)return!0;return!1}function M1(g){return new Nd(new Map(g._nodeMap))}function $h(){return new Nd(new Map([["root",D1()]]))}function Fy(g){const c=g.exportJSON(),h=g.constructor;if(c.type!==h.getType())throw Error(`LexicalNode: Node ${h.name} does not match the serialized type. Check if .exportJSON() is implemented and it is returning the correct type.`);const E=c.children;if(rt(g)){if(!Array.isArray(E))throw Error(`LexicalNode: Node ${h.name} is an element but .exportJSON() does not have a children array.`);const S=g.getChildren();for(let $=0;$<S.length;$++){const G=S[$],K=Fy(G);E.push(K)}}return c}class Nd{constructor(c,h){this._nodeMap=c,this._selection=h||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(c){return Dy(this,c)}clone(c){const h=new Nd(this._nodeMap,c===void 0?this._selection:c);return h._readOnly=!0,h}toJSON(){return Dy(this,()=>({root:Fy(fr())}))}}class dl extends hs{static getType(){return"paragraph"}static clone(c){return new dl(c.__key)}createDOM(c){const h=document.createElement("p"),E=Di(c.theme,"paragraph");return E!==void 0&&h.classList.add(...E),h}updateDOM(c,h,E){return!1}static importDOM(){return{p:c=>({conversion:P1,priority:0})}}exportDOM(c){const{element:h}=super.exportDOM(c);if(h&&oi(h)){this.isEmpty()&&h.append(document.createElement("br"));const E=this.getFormatType();h.style.textAlign=E;const S=this.getDirection();S&&(h.dir=S);const $=this.getIndent();$>0&&(h.style.textIndent=`${$*20}px`)}return{element:h}}static importJSON(c){const h=Wi();return h.setFormat(c.format),h.setIndent(c.indent),h.setDirection(c.direction),h}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(c,h){const E=Wi(),S=this.getDirection();return E.setDirection(S),this.insertAfter(E,h),E}collapseAtStart(){const c=this.getChildren();if(c.length===0||St(c[0])&&c[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function P1(g){const c=Wi();if(g.style){c.setFormat(g.style.textAlign);const h=parseInt(g.style.textIndent,10)/20;h>0&&c.setIndent(h)}return{node:c}}function Wi(){return fa(new dl)}function I1(g){return g instanceof dl}const L1=0,F1=1,j1=2,B1=3,W1=4;function jy(g,c,h,E){const S=g._keyToDOMMap;S.clear(),g._editorState=$h(),g._pendingEditorState=E,g._compositionKey=null,g._dirtyType=st,g._cloneNotNeeded.clear(),g._dirtyLeaves=new Set,g._dirtyElements.clear(),g._normalizedNodes=new Set,g._updateTags=new Set,g._updates=[],g._blockCursorElement=null;const $=g._observer;$!==null&&($.disconnect(),g._observer=null),c!==null&&(c.textContent=""),h!==null&&(h.textContent="",S.set("root",h))}function z1(g,c){const h=new Map,E=new Set,S=$=>{Object.keys($).forEach(G=>{let K=h.get(G);K===void 0&&(K=[],h.set(G,K)),K.push($[G])})};return g.forEach($=>{const G=$.klass.importDOM!=null?$.klass.importDOM.bind($.klass):null;if(G==null||E.has(G))return;E.add(G);const K=G();K!==null&&S(K)}),c&&S(c),h}function H1(g){const c=g||{},h=C1(),E=c.theme||{},S=g===void 0?h:c.parentEditor||null,$=c.disableEvents||!1,G=$h(),K=c.namespace||(S!==null?S._config.namespace:Ac()),be=c.editorState,ye=[ul,li,Zn,ci,dl,...c.nodes||[]],{onError:Ne,html:we}=c,Ae=c.editable!==void 0?c.editable:!0;let Te;if(g===void 0&&h!==null)Te=h._nodes;else{Te=new Map;for(let Le=0;Le<ye.length;Le++){let Je=ye[Le],ft=null,Ye=null;if(typeof Je!="function"){const Zt=Je;Je=Zt.replace,ft=Zt.with,Ye=Zt.withKlass||null}{const Zt=Je.name;if(Zt!=="RootNode"){const jt=Je.prototype;["getType","clone"].forEach(Jt=>{Je.hasOwnProperty(Jt)||console.warn(`${Zt} must implement static "${Jt}" method`)}),!Je.hasOwnProperty("importDOM")&&Je.hasOwnProperty("exportDOM")&&console.warn(`${Zt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),jt instanceof Rh&&(jt.hasOwnProperty("decorate")||console.warn(`${jt.constructor.name} must implement "decorate" method`)),Je.hasOwnProperty("importJSON")||console.warn(`${Zt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),jt.hasOwnProperty("exportJSON")||console.warn(`${Zt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const Ft=Je.getType(),Ht=Je.transform(),Pt=new Set;Ht!==null&&Pt.add(Ht),Te.set(Ft,{exportDOM:we&&we.export?we.export.get(Je):void 0,klass:Je,replace:ft,replaceWithKlass:Ye,transforms:Pt})}}const He=new G1(G,S,Te,{disableEvents:$,namespace:K,theme:E},Ne||console.error,z1(Te,we?we.import:void 0),Ae);return be!==void 0&&(He._pendingEditorState=be,He._dirtyType=Ct),He}class G1{constructor(c,h,E,S,$,G,K){this._parentEditor=h,this._rootElement=null,this._editorState=c,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=S,this._nodes=E,this._decorators={},this._pendingDecorators=null,this._dirtyType=st,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Ac(),this._onError=$,this._htmlConversions=G,this._editable=K,this._headless=h!==null&&h._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(c){const h=this._listeners.update;return h.add(c),()=>{h.delete(c)}}registerEditableListener(c){const h=this._listeners.editable;return h.add(c),()=>{h.delete(c)}}registerDecoratorListener(c){const h=this._listeners.decorator;return h.add(c),()=>{h.delete(c)}}registerTextContentListener(c){const h=this._listeners.textcontent;return h.add(c),()=>{h.delete(c)}}registerRootListener(c){const h=this._listeners.root;return c(this._rootElement,null),h.add(c),()=>{c(null,this._rootElement),h.delete(c)}}registerCommand(c,h,E){if(E===void 0)throw Error('Listener for type "command" requires a "priority".');const S=this._commands;S.has(c)||S.set(c,[new Set,new Set,new Set,new Set,new Set]);const $=S.get(c);if($===void 0)throw Error(`registerCommand: Command ${String(c)} not found in command map`);const G=$[E];return G.add(h),()=>{G.delete(h),$.every(K=>K.size===0)&&S.delete(c)}}registerMutationListener(c,h){if(this._nodes.get(c.getType())===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);const E=this._listeners.mutation;return E.set(h,c),()=>{E.delete(h)}}registerNodeTransformToKlass(c,h){const E=c.getType(),S=this._nodes.get(E);if(S===void 0)throw Error(`Node ${c.name} has not been registered. Ensure node has been passed to createEditor.`);return S.transforms.add(h),S}registerNodeTransform(c,h){const E=this.registerNodeTransformToKlass(c,h),S=[E],$=E.replaceWithKlass;if($!=null){const G=this.registerNodeTransformToKlass($,h);S.push(G)}return Ka(this,c.getType()),()=>{S.forEach(G=>G.transforms.delete(h))}}hasNode(c){return this._nodes.has(c.getType())}hasNodes(c){return c.every(this.hasNode.bind(this))}dispatchCommand(c,h){return mt(this,c,h)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(c){const h=this._rootElement;if(c!==h){const E=Di(this._config.theme,"root"),S=this._pendingEditorState||this._editorState;if(this._rootElement=c,jy(this,h,c,S),h!==null&&(this._config.disableEvents||Ze(h),E!=null&&h.classList.remove(...E)),c!==null){const $=Nt(c),G=c.style;G.userSelect="text",G.whiteSpace="pre-wrap",G.wordBreak="break-word",c.setAttribute("data-lexical-editor","true"),this._window=$,this._dirtyType=Ct,Er(this),this._updateTags.add("history-merge"),fs(this),this._config.disableEvents||Ve(c,this),E!=null&&c.classList.add(...E)}else this._editorState=S,this._pendingEditorState=null,this._window=null;tu("root",this,!1,c,h)}}getElementByKey(c){return this._keyToDOMMap.get(c)||null}getEditorState(){return this._editorState}setEditorState(c,h){if(c.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");mn(this);const E=this._pendingEditorState,S=this._updateTags,$=h!==void 0?h.tag:null;E!==null&&!E.isEmpty()&&($!=null&&S.add($),fs(this)),this._pendingEditorState=c,this._dirtyType=Ct,this._dirtyElements.set("root",!1),this._compositionKey=null,$!=null&&S.add($),fs(this)}parseEditorState(c,h){const E=typeof c=="string"?JSON.parse(c):c;return S1(E,this,h)}update(c,h){no(this,c,h)}focus(c,h={}){const E=this._rootElement;E!==null&&(E.setAttribute("autocapitalize","off"),no(this,()=>{const S=_n(),$=fr();S!==null?S.dirty=!0:$.getChildrenSize()!==0&&(h.defaultSelection==="rootStart"?$.selectStart():$.selectEnd())},{onUpdate:()=>{E.removeAttribute("autocapitalize"),c&&c()},tag:"focus"}),this._pendingEditorState===null&&E.removeAttribute("autocapitalize"))}blur(){const c=this._rootElement;c!==null&&c.blur();const h=Br(this._window);h!==null&&h.removeAllRanges()}isEditable(){return this._editable}setEditable(c){this._editable!==c&&(this._editable=c,tu("editable",this,!0,c))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Dh extends hs{constructor(c,h){super(h),this.__colSpan=c,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(c){return this.getWritable().__colSpan=c,this}getRowSpan(){return this.__rowSpan}setRowSpan(c){return this.getWritable().__rowSpan=c,this}}function bo(g){return g instanceof Dh}class By extends hs{}function kh(g){return g instanceof By}class Wy extends hs{}function nu(g){return g instanceof Wy}return Ke.$INTERNAL_isPointSelection=nr,Ke.$addUpdateTag=Eh,Ke.$applyNodeReplacement=fa,Ke.$copyNode=Ys,Ke.$createLineBreakNode=Or,Ke.$createNodeSelection=Th,Ke.$createParagraphNode=Wi,Ke.$createRangeSelection=g1,Ke.$createTabNode=Ta,Ke.$createTextNode=Gn,Ke.$getAdjacentNode=da,Ke.$getNearestNodeFromDOMNode=Xr,Ke.$getNearestRootOrShadowRoot=Fc,Ke.$getNodeByKey=In,Ke.$getPreviousSelection=ll,Ke.$getRoot=fr,Ke.$getSelection=_n,Ke.$getTextContent=x1,Ke.$hasAncestor=Ln,Ke.$hasUpdateTag=ud,Ke.$insertNodes=_1,Ke.$isBlockElementNode=p1,Ke.$isDecoratorNode=Bn,Ke.$isElementNode=rt,Ke.$isInlineElementOrDecoratorNode=Vs,Ke.$isLeafNode=To,Ke.$isLineBreakNode=Do,Ke.$isNodeSelection=gr,Ke.$isParagraphNode=I1,Ke.$isRangeSelection=Tt,Ke.$isRootNode=ro,Ke.$isRootOrShadowRoot=Qn,Ke.$isTabNode=ds,Ke.$isTextNode=St,Ke.$nodesOfType=Lc,Ke.$normalizeSelection__EXPERIMENTAL=aa,Ke.$parseSerializedNode=N1,Ke.$selectAll=$i,Ke.$setCompositionKey=kn,Ke.$setSelection=hr,Ke.$splitNode=jc,Ke.BLUR_COMMAND=q,Ke.CAN_REDO_COMMAND=w,Ke.CAN_UNDO_COMMAND=N,Ke.CLEAR_EDITOR_COMMAND=J,Ke.CLEAR_HISTORY_COMMAND=F,Ke.CLICK_COMMAND=n,Ke.COMMAND_PRIORITY_CRITICAL=W1,Ke.COMMAND_PRIORITY_EDITOR=L1,Ke.COMMAND_PRIORITY_HIGH=B1,Ke.COMMAND_PRIORITY_LOW=F1,Ke.COMMAND_PRIORITY_NORMAL=j1,Ke.CONTROLLED_TEXT_INSERTION_COMMAND=a,Ke.COPY_COMMAND=re,Ke.CUT_COMMAND=B,Ke.DELETE_CHARACTER_COMMAND=r,Ke.DELETE_LINE_COMMAND=m,Ke.DELETE_WORD_COMMAND=p,Ke.DEPRECATED_$computeGridMap=Ny,Ke.DEPRECATED_$createGridSelection=m1,Ke.DEPRECATED_$getGridCellNodeRect=zr,Ke.DEPRECATED_$getNodeTriplet=Sy,Ke.DEPRECATED_$isGridCellNode=bo,Ke.DEPRECATED_$isGridNode=kh,Ke.DEPRECATED_$isGridRowNode=nu,Ke.DEPRECATED_$isGridSelection=Ir,Ke.DEPRECATED_GridCellNode=Dh,Ke.DEPRECATED_GridNode=By,Ke.DEPRECATED_GridRowNode=Wy,Ke.DRAGEND_COMMAND=ee,Ke.DRAGOVER_COMMAND=j,Ke.DRAGSTART_COMMAND=V,Ke.DROP_COMMAND=te,Ke.DecoratorNode=Rh,Ke.ElementNode=hs,Ke.FOCUS_COMMAND=I,Ke.FORMAT_ELEMENT_COMMAND=fe,Ke.FORMAT_TEXT_COMMAND=b,Ke.INDENT_CONTENT_COMMAND=de,Ke.INSERT_LINE_BREAK_COMMAND=o,Ke.INSERT_PARAGRAPH_COMMAND=i,Ke.INSERT_TAB_COMMAND=Q,Ke.KEY_ARROW_DOWN_COMMAND=P,Ke.KEY_ARROW_LEFT_COMMAND=O,Ke.KEY_ARROW_RIGHT_COMMAND=v,Ke.KEY_ARROW_UP_COMMAND=k,Ke.KEY_BACKSPACE_COMMAND=X,Ke.KEY_DELETE_COMMAND=Z,Ke.KEY_DOWN_COMMAND=y,Ke.KEY_ENTER_COMMAND=M,Ke.KEY_ESCAPE_COMMAND=oe,Ke.KEY_MODIFIER_COMMAND=ue,Ke.KEY_SPACE_COMMAND=Y,Ke.KEY_TAB_COMMAND=U,Ke.LineBreakNode=Zn,Ke.MOVE_TO_END=T,Ke.MOVE_TO_START=R,Ke.OUTDENT_CONTENT_COMMAND=pe,Ke.PASTE_COMMAND=l,Ke.ParagraphNode=dl,Ke.REDO_COMMAND=_,Ke.REMOVE_TEXT_COMMAND=u,Ke.RootNode=ul,Ke.SELECTION_CHANGE_COMMAND=t,Ke.SELECT_ALL_COMMAND=W,Ke.TabNode=ci,Ke.TextNode=li,Ke.UNDO_COMMAND=C,Ke.createCommand=e,Ke.createEditor=H1,Ke.getNearestEditorFromDOMNode=Ni,Ke.isHTMLAnchorElement=Mi,Ke.isHTMLElement=oi,Ke.isSelectionCapturedInDecoratorInput=wc,Ke.isSelectionWithinEditor=ei,Ke}var Ue={},Ib;function Z9(){if(Ib)return Ue;Ib=1;let e={},t={},n={},r={},o={},i={},a={},l={},u={},p={},m={},b={},C={},_={},y={},v={},T={},O={},R={},k={},P={},M={},Y={},X={},oe={},Z={},U={},Q={},de={},pe={},te={},fe={},V={},j={},ee={},re={};function B(f){let s=new URLSearchParams;s.append("code",f);for(let d=1;d<arguments.length;d++)s.append("v",arguments[d]);throw Error(`Minified Lexical error #${f}; visit https://lexical.dev/docs/error?${s} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let W=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",J=W&&"documentMode"in document?document.documentMode:null,F=W&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),w=W&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),N=W&&"InputEvent"in window&&!J?"getTargetRanges"in new window.InputEvent("input"):!1,I=W&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),q=W&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ue=W&&/Android/.test(navigator.userAgent),he=W&&/^(?=.*Chrome).*/i.test(navigator.userAgent),se=W&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!he,Ce=I||q||se?" ":"",Oe=w?" ":Ce,Be=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,ce=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,le={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},ve={directionless:1,unmergeable:2},Me={center:2,end:6,justify:4,left:1,right:3,start:5},Pe={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},We={normal:0,segmented:2,token:1},Xe={0:"normal",2:"segmented",1:"token"},st=!1,dt=0;function Ct(f){dt=f.timeStamp}function Se(f,s,d){return s.__lexicalLineBreak===f||f[`__lexicalKey_${d._key}`]!==void 0}function me(f){return f.getEditorState().read(()=>{let s=hn();return s!==null?s.clone():null})}function _e(f,s,d){st=!0;let x=100<performance.now()-dt;try{Pr(f,()=>{let A=hn()||me(f);var D=new Map,z=f.getRootElement(),ie=f._editorState,xe=f._blockCursorElement;let Re=!1,Ve="";for(var Ze=0;Ze<s.length;Ze++){var Ge=s[Ze],Ie=Ge.type,it=Ge.target,vt=wr(it,ie);if(!(vt===null&&it!==z||on(vt))){if(Ie==="characterData"){if(Ge=x&&Nt(vt))e:{Ge=A,Ie=it;var $t=vt;if(Lt(Ge)){var Vt=Ge.anchor.getNode();if(Vt.is($t)&&Ge.format!==Vt.getFormat()){Ge=!1;break e}}Ge=Ie.nodeType===3&&$t.isAttached()}Ge&&($t=po(f._window),Ie=Ge=null,$t!==null&&$t.anchorNode===it&&(Ge=$t.anchorOffset,Ie=$t.focusOffset),it=it.nodeValue,it!==null&&je(vt,it,Ge,Ie,!1))}else if(Ie==="childList"){for(Re=!0,Ie=Ge.addedNodes,$t=0;$t<Ie.length;$t++){Vt=Ie[$t];var An=ur(Vt),Zn=Vt.parentNode;Zn==null||Vt===xe||An!==null||Vt.nodeName==="BR"&&Se(Vt,Zn,f)||(w&&(An=Vt.innerText||Vt.nodeValue)&&(Ve+=An),Zn.removeChild(Vt))}if(Ge=Ge.removedNodes,Ie=Ge.length,0<Ie){for($t=0,Vt=0;Vt<Ie;Vt++)Zn=Ge[Vt],(Zn.nodeName==="BR"&&Se(Zn,it,f)||xe===Zn)&&(it.appendChild(Zn),$t++);Ie!==$t&&(it===z&&(vt=ie._nodeMap.get("root")),D.set(it,vt))}}}}if(0<D.size)for(let[cs,Or]of D)if(nt(Or))for(D=Or.getChildrenKeys(),z=cs.firstChild,ie=0;ie<D.length;ie++)xe=f.getElementByKey(D[ie]),xe!==null&&(z==null?(cs.appendChild(xe),z=xe):z!==xe&&cs.replaceChild(xe,z),z=z.nextSibling);else Nt(Or)&&Or.markDirty();if(D=d.takeRecords(),0<D.length){for(z=0;z<D.length;z++)for(xe=D[z],ie=xe.addedNodes,xe=xe.target,Ze=0;Ze<ie.length;Ze++)vt=ie[Ze],it=vt.parentNode,it==null||vt.nodeName!=="BR"||Se(vt,xe,f)||it.removeChild(vt);d.takeRecords()}A!==null&&(Re&&(A.dirty=!0,xr(A)),w&&Ut(f)&&A.insertRawText(Ve))})}finally{st=!1}}function De(f){let s=f._observer;if(s!==null){let d=s.takeRecords();_e(f,d,s)}}function Fe(f){dt===0&&Cn(f).addEventListener("textInput",Ct,!0),f._observer=new MutationObserver((s,d)=>{_e(f,s,d)})}function ke(f,s){let d=f.__mode,x=f.__format;f=f.__style;let A=s.__mode,D=s.__format;return s=s.__style,(d===null||d===A)&&(x===null||x===D)&&(f===null||f===s)}function ze(f,s){let d=f.mergeWithSibling(s),x=bn()._normalizedNodes;return x.add(f.__key),x.add(s.__key),d}function tt(f){if(f.__text===""&&f.isSimpleText()&&!f.isUnmergeable())f.remove();else{for(var s;(s=f.getPreviousSibling())!==null&&Nt(s)&&s.isSimpleText()&&!s.isUnmergeable();)if(s.__text==="")s.remove();else{ke(s,f)&&(f=ze(s,f));break}for(var d;(d=f.getNextSibling())!==null&&Nt(d)&&d.isSimpleText()&&!d.isUnmergeable();)if(d.__text==="")d.remove();else{ke(f,d)&&ze(f,d);break}}}function ut(f){return Et(f.anchor),Et(f.focus),f}function Et(f){for(;f.type==="element";){var s=f.getNode(),d=f.offset;if(d===s.getChildrenSize()?(s=s.getChildAtIndex(d-1),d=!0):(s=s.getChildAtIndex(d),d=!1),Nt(s)){f.set(s.__key,d?s.getTextContentSize():0,"text");break}else if(!nt(s))break;f.set(s.__key,d?s.getChildrenSize():0,"element")}}let Bt=1,Qe=typeof queueMicrotask=="function"?queueMicrotask:f=>{Promise.resolve().then(f)};function et(f){let s=document.activeElement;if(s===null)return!1;let d=s.nodeName;return on(wr(f))&&(d==="INPUT"||d==="TEXTAREA"||s.contentEditable==="true"&&s.__lexicalEditor==null)}function lt(f,s,d){let x=f.getRootElement();try{return x!==null&&x.contains(s)&&x.contains(d)&&s!==null&&!et(s)&&wt(s)===f}catch{return!1}}function wt(f){for(;f!=null;){let s=f.__lexicalEditor;if(s!=null)return s;f=mn(f)}return null}function _t(f){return f.isToken()||f.isSegmented()}function Rt(f){for(;f!=null;){if(f.nodeType===3)return f;f=f.firstChild}return null}function qe(f,s,d){let x=le[s];return d!==null&&(f&x)===(d&x)||(f^=x,s==="subscript"?f&=~le.superscript:s==="superscript"&&(f&=~le.subscript)),f}function ot(f,s){if(s!=null)f.__key=s;else{er(),99<ma&&B(14),s=bn();var d=Qr(),x=""+Bt++;d._nodeMap.set(x,f),nt(f)?s._dirtyElements.set(x,!0):s._dirtyLeaves.add(x),s._cloneNotNeeded.add(x),s._dirtyType=1,f.__key=x}}function yt(f){var s=f.getParent();if(s!==null){let A=f.getWritable();s=s.getWritable();var d=f.getPreviousSibling();if(f=f.getNextSibling(),d===null)if(f!==null){var x=f.getWritable();s.__first=f.__key,x.__prev=null}else s.__first=null;else{if(x=d.getWritable(),f!==null){let D=f.getWritable();D.__prev=x.__key,x.__next=D.__key}else x.__next=null;A.__prev=null}f===null?d!==null?(f=d.getWritable(),s.__last=d.__key,f.__next=null):s.__last=null:(f=f.getWritable(),d!==null?(d=d.getWritable(),d.__next=f.__key,f.__prev=d.__key):f.__prev=null,A.__next=null),s.__size--,A.__parent=null}}function kt(f){99<ma&&B(14);var s=f.getLatest(),d=s.__parent,x=Qr();let A=bn(),D=x._nodeMap;if(x=A._dirtyElements,d!==null)e:for(;d!==null;){if(x.has(d))break e;let z=D.get(d);if(z===void 0)break;x.set(d,!1),d=z.__parent}s=s.__key,A._dirtyType=1,nt(f)?x.set(s,!0):A._dirtyLeaves.add(s)}function Dt(f){er();var s=bn();let d=s._compositionKey;f!==d&&(s._compositionKey=f,d!==null&&(s=sn(d),s!==null&&s.getWritable()),f!==null&&(f=sn(f),f!==null&&f.getWritable()))}function Kt(){return ya()?null:bn()._compositionKey}function sn(f,s){return f=(s||Qr())._nodeMap.get(f),f===void 0?null:f}function ur(f,s){let d=bn();return f=f[`__lexicalKey_${d._key}`],f!==void 0?sn(f,s):null}function wr(f,s){for(;f!=null;){let d=ur(f,s);if(d!==null)return d;f=mn(f)}return null}function Xo(f){let s=Object.assign({},f._decorators);return f._pendingDecorators=s}function oa(f){return f.read(()=>Yn().getTextContent())}function Tr(f,s){Pr(f,()=>{var d=Qr();if(!d.isEmpty())if(s==="root")Yn().markDirty();else{d=d._nodeMap;for(let[,x]of d)x.markDirty()}},f._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Yn(){return Qr()._nodeMap.get("root")}function xr(f){er();let s=Qr();f!==null&&(f.dirty=!0,f.setCachedNodes(null)),s._selection=f}function ho(f){var s=bn(),d;e:{for(d=f;d!=null;){let x=d[`__lexicalKey_${s._key}`];if(x!==void 0){d=x;break e}d=mn(d)}d=null}return d===null?(s=s.getRootElement(),f===s?sn("root"):null):sn(d)}function ia(f){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(f)}function Ee(f){let s=[];for(;f!==null;)s.push(f),f=f._parentEditor;return s}function ae(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function $e(f,s,d){if(s=po(s._window),s!==null){var x=s.anchorNode,{anchorOffset:A,focusOffset:D}=s;if(x!==null&&(s=x.nodeType===3?x.nodeValue:null,x=wr(x),s!==null&&Nt(x))){if(s===Ce&&d){let z=d.length;s=d,D=A=z}s!==null&&je(x,s,A,D,f)}}}function je(f,s,d,x,A){let D=f;if(D.isAttached()&&(A||!D.isDirty())){let Re=D.isComposing(),Ve=s;if((Re||A)&&s[s.length-1]===Ce&&(Ve=s.slice(0,-1)),s=D.getTextContent(),A||Ve!==s)if(Ve==="")if(Dt(null),I||q||se)D.remove();else{let Ze=bn();setTimeout(()=>{Ze.update(()=>{D.isAttached()&&D.remove()})},20)}else{A=D.getParent(),s=ii();var z=D.getTextContentSize(),ie=Kt(),xe=D.getKey();D.isToken()||ie!==null&&xe===ie&&!Re||Lt(s)&&(A!==null&&!A.canInsertTextBefore()&&s.anchor.offset===0||s.anchor.key===f.__key&&s.anchor.offset===0&&!D.canInsertTextBefore()||s.focus.key===f.__key&&s.focus.offset===z&&!D.canInsertTextAfter())?D.markDirty():(f=hn(),Lt(f)&&d!==null&&x!==null&&(f.setTextNodeRange(D,d,D,x),D.isSegmented()&&(d=D.getTextContent(),d=Ln(d),D.replace(d),D=d)),D.setTextContent(Ve))}}}function at(f,s){if(s.isSegmented())return!0;if(!f.isCollapsed())return!1;f=f.anchor.offset;let d=s.getParentOrThrow(),x=s.isToken();return f===0?((f=!s.canInsertTextBefore()||!d.canInsertTextBefore()||x)||(s=s.getPreviousSibling(),f=(Nt(s)||nt(s)&&s.isInline())&&!s.canInsertTextAfter()),f):f===s.getTextContentSize()?!s.canInsertTextAfter()||!d.canInsertTextAfter()||x:!1}function xt(f,s){f.__lexicalClassNameCache===void 0&&(f.__lexicalClassNameCache={});let d=f.__lexicalClassNameCache,x=d[s];return x!==void 0?x:(f=f[s],typeof f=="string"?(f=f.split(" "),d[s]=f):f)}function bt(f,s,d,x,A){d.size!==0&&(d=x.__type,x=x.__key,s=s.get(d),s===void 0&&B(33,d),d=s.klass,s=f.get(d),s===void 0&&(s=new Map,f.set(d,s)),f=s.get(x),d=f==="destroyed"&&A==="created",(f===void 0||d)&&s.set(x,d?"updated":A))}function ht(f,s,d){let x=f.getParent(),A=d;return x!==null&&(s&&d===0?(A=f.getIndexWithinParent(),f=x):s||d!==f.getChildrenSize()||(A=f.getIndexWithinParent()+1,f=x)),f.getChildAtIndex(s?A-1:A)}function At(f,s){var d=f.offset;return f.type==="element"?(f=f.getNode(),ht(f,s,d)):(f=f.getNode(),s&&d===0||!s&&d===f.getTextContentSize()?(d=s?f.getPreviousSibling():f.getNextSibling(),d===null?ht(f.getParentOrThrow(),s,f.getIndexWithinParent()+(s?0:1)):d):null)}function Ut(f){return f=(f=Cn(f).event)&&f.inputType,f==="insertFromPaste"||f==="insertFromPasteAsQuotation"}function Mt(f){return!Sr(f)&&!f.isLastChild()&&!f.isInline()}function Yt(f,s){return f=f._keyToDOMMap.get(s),f===void 0&&B(75,s),f}function mn(f){return f=f.assignedSlot||f.parentElement,f!==null&&f.nodeType===11?f.host:f}function Er(f,s){for(f=f.getParent();f!==null;){if(f.is(s))return!0;f=f.getParent()}return!1}function Cn(f){return f=f._window,f===null&&B(78),f}function qn(f){for(f=f.getParentOrThrow();f!==null&&!Mr(f);)f=f.getParentOrThrow();return f}function Mr(f){return Sr(f)||nt(f)&&f.isShadowRoot()}function aa(f){return f=f.constructor.clone(f),ot(f,null),f}function Qo(f){var s=bn();let d=f.constructor.getType();return s=s._nodes.get(d),s===void 0&&B(97),s=s.replace,s!==null?(s=s(f),s instanceof f.constructor||B(98),s):f}function xc(f,s){f=f.getParent(),!Sr(f)||nt(s)||on(s)||B(99)}function Ec(f){return(on(f)||nt(f)&&!f.canBeEmpty())&&!f.isInline()}function Cc(f,s,d){d.style.removeProperty("caret-color"),s._blockCursorElement=null,s=f.parentElement,s!==null&&s.removeChild(f)}function po(f){return W?(f||window).getSelection():null}function Ls(f,s){for(;f!==Yn()&&f!=null;){if(s(f))return f;f=f.getParent()}return null}function wc(f){let s=[],d=[f];for(;0<d.length;){let x=d.pop();x===void 0&&B(112),nt(x)&&d.unshift(...x.getChildren()),x!==f&&s.push(x)}return s}function ei(f){return f.nodeType===1}function Ni(f){if(on(f)&&!f.isInline())return!0;if(!nt(f)||Mr(f))return!1;var s=f.getFirstChild();return s=s===null||$i(s)||Nt(s)||s.isInline(),!f.isInline()&&f.canBeEmpty()!==!1&&s}function Tc(f,s){for(;f!==null&&f.getParent()!==null&&!s(f);)f=f.getParentOrThrow();return s(f)?f:null}function Fs(f,s,d,x,A,D){for(f=f.getFirstChild();f!==null;){let z=f.__key;f.__parent===s&&(nt(f)&&Fs(f,z,d,x,A,D),d.has(z)||D.delete(z),A.push(z)),f=f.getNextSibling()}}function fh(f,s,d,x){f=f._nodeMap,s=s._nodeMap;let A=[];for(let[D]of x){let z=s.get(D);z===void 0||z.isAttached()||(nt(z)&&Fs(z,D,f,s,A,x),f.has(D)||x.delete(D),A.push(D))}for(let D of A)s.delete(D);for(let D of d)x=s.get(D),x===void 0||x.isAttached()||(f.has(D)||d.delete(D),s.delete(D))}let On="",Xn="",To="",No,dr,Zr,Ga=!1,Nc=!1,kn,Jr=null,In,js,Xr,So,Bs,Ka;function fr(f,s){let d=Xr.get(f);if(s!==null){let x=$c(f);x.parentNode===s&&s.removeChild(x)}So.has(f)||dr._keyToDOMMap.delete(f),nt(d)&&(f=Va(d,Xr),Ws(f,0,f.length-1,null)),d!==void 0&&bt(Ka,Zr,kn,d,"destroyed")}function Ws(f,s,d,x){for(;s<=d;++s){let A=f[s];A!==void 0&&fr(A,x)}}function hr(f,s){f.setProperty("text-align",s)}function ed(f,s){var d=No.theme.indent;if(typeof d=="string"){let x=f.classList.contains(d);0<s&&!x?f.classList.add(d):1>s&&x&&f.classList.remove(d)}d=getComputedStyle(f).getPropertyValue("--lexical-indent-base-value")||"40px",f.style.setProperty("padding-inline-start",s===0?"":`calc(${s} * ${d})`)}function Si(f,s){f=f.style,s===0?hr(f,""):s===1?hr(f,"left"):s===2?hr(f,"center"):s===3?hr(f,"right"):s===4?hr(f,"justify"):s===5?hr(f,"start"):s===6&&hr(f,"end")}function Ua(f,s,d){let x=So.get(f);x===void 0&&B(60);let A=x.createDOM(No,dr);var D=dr._keyToDOMMap;if(A["__lexicalKey_"+dr._key]=f,D.set(f,A),Nt(x)?A.setAttribute("data-lexical-text","true"):on(x)&&A.setAttribute("data-lexical-decorator","true"),nt(x)){if(f=x.__indent,D=x.__size,f!==0&&ed(A,f),D!==0){--D,f=Va(x,So);var z=Xn;Xn="",Sc(f,x,0,D,A,null),Ac(x,A),Xn=z}f=x.__format,f!==0&&Si(A,f),x.isInline()||zs(null,x,A),Mt(x)&&(On+=`
|
|
242
|
-
|
|
243
|
-
`,To+=`
|
|
244
|
-
|
|
245
|
-
`)}else D=x.getTextContent(),on(x)?(z=x.decorate(dr,No),z!==null&&Hs(f,z),A.contentEditable="false"):Nt(x)&&(x.isDirectionless()||(Xn+=D)),On+=D,To+=D;return s!==null&&(d!=null?s.insertBefore(A,d):(d=s.__lexicalLineBreak,d!=null?s.insertBefore(A,d):s.appendChild(A))),bt(Ka,Zr,kn,x,"created"),A}function Sc(f,s,d,x,A,D){let z=On;for(On="";d<=x;++d)Ua(f[d],A,D);Mt(s)&&(On+=`
|
|
246
|
-
|
|
247
|
-
`),A.__lexicalTextContent=On,On=z+On}function Oc(f,s){return f=s.get(f),$i(f)||on(f)&&f.isInline()}function zs(f,s,d){f=f!==null&&(f.__size===0||Oc(f.__last,Xr)),s=s.__size===0||Oc(s.__last,So),f?s||(s=d.__lexicalLineBreak,s!=null&&d.removeChild(s),d.__lexicalLineBreak=null):s&&(s=document.createElement("br"),d.__lexicalLineBreak=s,d.appendChild(s))}function Ac(f,s){var d=s.__lexicalDir;if(s.__lexicalDirTextContent!==Xn||d!==Jr){let D=Xn==="";if(D)var x=Jr;else x=Xn,x=Be.test(x)?"rtl":ce.test(x)?"ltr":null;if(x!==d){let z=s.classList,ie=No.theme;var A=d!==null?ie[d]:void 0;let xe=x!==null?ie[x]:void 0;A!==void 0&&(typeof A=="string"&&(A=A.split(" "),A=ie[d]=A),z.remove(...A)),x===null||D&&x==="ltr"?s.removeAttribute("dir"):(xe!==void 0&&(typeof xe=="string"&&(d=xe.split(" "),xe=ie[x]=d),xe!==void 0&&z.add(...xe)),s.dir=x),Nc||(f.getWritable().__dir=x)}Jr=x,s.__lexicalDirTextContent=Xn,s.__lexicalDir=x}}function Va(f,s){let d=[];for(f=f.__first;f!==null;){let x=s.get(f);x===void 0&&B(101),d.push(f),f=x.__next}return d}function Oi(f,s){var d=Xr.get(f),x=So.get(f);d!==void 0&&x!==void 0||B(61);var A=Ga||js.has(f)||In.has(f);let D=Yt(dr,f);if(d===x&&!A)return nt(d)?(x=D.__lexicalTextContent,x!==void 0&&(On+=x,To+=x),x=D.__lexicalDirTextContent,x!==void 0&&(Xn+=x)):(x=d.getTextContent(),Nt(d)&&!d.isDirectionless()&&(Xn+=x),To+=x,On+=x),D;if(d!==x&&A&&bt(Ka,Zr,kn,x,"updated"),x.updateDOM(d,D,No))return x=Ua(f,null,null),s===null&&B(62),s.replaceChild(x,D),fr(f,null),x;if(nt(d)&&nt(x)){if(f=x.__indent,f!==d.__indent&&ed(D,f),f=x.__format,f!==d.__format&&Si(D,f),A){f=x,A=Xn,Xn="",s=On;var z=d.__size,ie=f.__size;if(On="",z===1&&ie===1){var xe=d.__first,Re=f.__first;if(xe===Re)Oi(xe,D);else{var Ve=$c(xe);Re=Ua(Re,null,null),D.replaceChild(Re,Ve),fr(xe,null)}}else{Re=Va(d,Xr);var Ze=Va(f,So);if(z===0)ie!==0&&Sc(Ze,f,0,ie-1,D,null);else if(ie===0)z!==0&&(xe=D.__lexicalLineBreak==null,Ws(Re,0,z-1,xe?null:D),xe&&(D.textContent=""));else{var Ge=Re;Re=Ze,Ze=z-1,z=ie-1;let it=D.firstChild,vt=0;for(ie=0;vt<=Ze&&ie<=z;){var Ie=Ge[vt];let $t=Re[ie];if(Ie===$t)it=Rc(Oi($t,D)),vt++,ie++;else{xe===void 0&&(xe=new Set(Ge)),Ve===void 0&&(Ve=new Set(Re));let Vt=Ve.has(Ie),An=xe.has($t);Vt?(An?(Ie=Yt(dr,$t),Ie===it?it=Rc(Oi($t,D)):(it!=null?D.insertBefore(Ie,it):D.appendChild(Ie),Oi($t,D)),vt++):Ua($t,D,it),ie++):(it=Rc($c(Ie)),fr(Ie,D),vt++)}}xe=vt>Ze,Ve=ie>z,xe&&!Ve?(xe=Re[z+1],xe=xe===void 0?null:dr.getElementByKey(xe),Sc(Re,f,ie,z,D,xe)):Ve&&!xe&&Ws(Ge,vt,Ze,D)}}Mt(f)&&(On+=`
|
|
248
|
-
|
|
249
|
-
`),D.__lexicalTextContent=On,On=s+On,Ac(f,D),Xn=A,Sr(x)||x.isInline()||zs(d,x,D)}Mt(x)&&(On+=`
|
|
250
|
-
|
|
251
|
-
`,To+=`
|
|
252
|
-
|
|
253
|
-
`)}else d=x.getTextContent(),on(x)?(A=x.decorate(dr,No),A!==null&&Hs(f,A)):Nt(x)&&!x.isDirectionless()&&(Xn+=d),On+=d,To+=d;return!Nc&&Sr(x)&&x.__cachedText!==To&&(x=x.getWritable(),x.__cachedText=To),D}function Hs(f,s){let d=dr._pendingDecorators,x=dr._decorators;if(d===null){if(x[f]===s)return;d=Xo(dr)}d[f]=s}function Rc(f){return f=f.nextSibling,f!==null&&f===dr._blockCursorElement&&(f=f.nextSibling),f}function $c(f){let s=Bs.get(f);return s===void 0&&B(75,f),s}let Oo=Object.freeze({}),Dc=[["keydown",bh],["pointerdown",ph],["compositionstart",yh],["compositionend",vh],["input",mh],["click",hh],["cut",Oo],["copy",Oo],["dragstart",Oo],["dragover",Oo],["dragend",Oo],["paste",Oo],["focus",Oo],["blur",Oo],["drop",Oo]];N&&Dc.push(["beforeinput",(f,s)=>gh(f,s)]);let Ya=0,td=0,nd=0,sa=null,qa=0,kc=!1,Mc=!1,Za=!1,Ja=!1,rd=[0,"",0,"root",0];function od(f,s,d,x,A){let D=f.anchor,z=f.focus,ie=D.getNode();var xe=bn();let Re=po(xe._window),Ve=Re!==null?Re.anchorNode:null,Ze=D.key;xe=xe.getElementByKey(Ze);let Ge=d.length;return Ze!==z.key||!Nt(ie)||(!A&&(!N||nd<x+50)||ie.isDirty()&&2>Ge||ia(d))&&D.offset!==z.offset&&!ie.isComposing()||_t(ie)||ie.isDirty()&&1<Ge||(A||!N)&&xe!==null&&!ie.isComposing()&&Ve!==Rt(xe)||Re!==null&&s!==null&&(!s.collapsed||s.startContainer!==Re.anchorNode||s.startOffset!==Re.anchorOffset)||ie.getFormat()!==f.format||ie.getStyle()!==f.style||at(f,ie)}function id(f,s){return f!==null&&f.nodeValue!==null&&f.nodeType===3&&s!==0&&s!==f.nodeValue.length}function ad(f,s,d){let{anchorNode:x,anchorOffset:A,focusNode:D,focusOffset:z}=f;kc&&(kc=!1,id(x,A)&&id(D,z))||Pr(s,()=>{if(!d)xr(null);else if(lt(s,x,D)){var ie=hn();if(Lt(ie)){var xe=ie.anchor,Re=xe.getNode();if(ie.isCollapsed()){f.type==="Range"&&f.anchorNode===f.focusNode&&(ie.dirty=!0);var Ve=Cn(s).event;Ve=Ve?Ve.timeStamp:performance.now();let[Ge,Ie,it,vt,$t]=rd;var Ze=Yn();Ze=s.isComposing()===!1&&Ze.getTextContent()==="",Ve<$t+200&&xe.offset===it&&xe.key===vt?(ie.format=Ge,ie.style=Ie):xe.type==="text"?(ie.format=Re.getFormat(),ie.style=Re.getStyle()):xe.type!=="element"||Ze||(ie.format=0,ie.style="")}else{xe=255,Re=!1,Ve=ie.getNodes(),Ze=Ve.length;for(let Ge=0;Ge<Ze;Ge++){let Ie=Ve[Ge];if(Nt(Ie)&&(Re=!0,xe&=Ie.getFormat(),xe===0))break}ie.format=Re?xe:0}}pt(s,e,void 0)}})}function hh(f,s){Pr(s,()=>{let d=hn();var x=po(s._window);let A=ii();if(x)if(Lt(d)){let z=d.anchor;var D=z.getNode();z.type==="element"&&z.offset===0&&d.isCollapsed()&&!Sr(D)&&Yn().getChildrenSize()===1&&D.getTopLevelElementOrThrow().isEmpty()&&A!==null&&d.is(A)?(x.removeAllRanges(),d.dirty=!0):f.detail!==3||d.isCollapsed()||(x=d.focus.getNode(),D!==x&&(nt(D)?D.select(0):D.getParentOrThrow().select(0)))}else f.pointerType==="touch"&&(D=x.anchorNode,D!==null&&(D=D.nodeType,D===1||D===3))&&(x=Pi(A,x,s),xr(x));pt(s,t,f)})}function ph(f,s){let d=f.target;f=f.pointerType,d instanceof Node&&f!=="touch"&&Pr(s,()=>{on(wr(d))||(Mc=!0)})}function Pc(f){return f.getTargetRanges?(f=f.getTargetRanges(),f.length===0?null:f[0]):null}function sd(f,s){return f!==s||nt(f)||nt(s)||!f.isToken()||!s.isToken()}function gh(f,s){let d=f.inputType,x=Pc(f);d==="deleteCompositionText"||w&&Ut(s)||d!=="insertCompositionText"&&Pr(s,()=>{let A=hn();if(d==="deleteContentBackward"){if(A===null){var D=ii();if(!Lt(D))return;xr(D.clone())}if(Lt(A)){ue&&Dt(A.anchor.key),td===229&&f.timeStamp<Ya+30&&s.isComposing()&&A.anchor.key===A.focus.key?(Dt(null),Ya=0,setTimeout(()=>{Pr(s,()=>{Dt(null)})},30),Lt(A)&&(D=A.anchor.getNode(),D.markDirty(),A.format=D.getFormat(),A.style=D.getStyle()),1>=A.anchor.getNode().getTextContent().length&&(f.preventDefault(),pt(s,n,!0))):(f.preventDefault(),pt(s,n,!0));return}}if(Lt(A)){D=f.data,sa!==null&&$e(!1,s,sa),A.dirty&&sa===null||!A.isCollapsed()||Sr(A.anchor.getNode())||x===null||A.applyDOMRange(x),sa=null;var z=A.focus,ie=A.anchor.getNode();if(z=z.getNode(),d==="insertText"||d==="insertTranspose")D===`
|
|
254
|
-
`?(f.preventDefault(),pt(s,r,!1)):D===`
|
|
255
|
-
|
|
256
|
-
`?(f.preventDefault(),pt(s,o,void 0)):D==null&&f.dataTransfer?(D=f.dataTransfer.getData("text/plain"),f.preventDefault(),A.insertRawText(D)):D!=null&&od(A,x,D,f.timeStamp,!0)?(f.preventDefault(),pt(s,i,D)):sa=D,nd=f.timeStamp;else switch(f.preventDefault(),d){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pt(s,i,f);break;case"insertFromComposition":Dt(null),pt(s,i,f);break;case"insertLineBreak":Dt(null),pt(s,r,!1);break;case"insertParagraph":Dt(null),Za&&!q?(Za=!1,pt(s,r,!1)):pt(s,o,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pt(s,a,f);break;case"deleteByComposition":sd(ie,z)&&pt(s,l,f);break;case"deleteByDrag":case"deleteByCut":pt(s,l,f);break;case"deleteContent":pt(s,n,!1);break;case"deleteWordBackward":pt(s,u,!0);break;case"deleteWordForward":pt(s,u,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pt(s,p,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pt(s,p,!1);break;case"formatStrikeThrough":pt(s,m,"strikethrough");break;case"formatBold":pt(s,m,"bold");break;case"formatItalic":pt(s,m,"italic");break;case"formatUnderline":pt(s,m,"underline");break;case"historyUndo":pt(s,b,void 0);break;case"historyRedo":pt(s,C,void 0)}}})}function mh(f,s){f.stopPropagation(),Pr(s,()=>{var d=hn(),x=f.data,A=Pc(f);if(x!=null&&Lt(d)&&od(d,A,x,f.timeStamp,!1)){Ja&&(Ic(s,x),Ja=!1);var D=d.anchor,z=D.getNode();if(A=po(s._window),A===null)return;let ie=D.offset;(D=N&&!d.isCollapsed()&&Nt(z)&&A.anchorNode!==null)&&(z=z.getTextContent().slice(0,ie)+x+z.getTextContent().slice(ie+d.focus.offset),A=A.anchorNode,D=z===(A.nodeType===3?A.nodeValue:null)),D||pt(s,i,x),x=x.length,w&&1<x&&f.inputType==="insertCompositionText"&&!s.isComposing()&&(d.anchor.offset-=x),I||q||se||!s.isComposing()||(Ya=0,Dt(null))}else $e(!1,s,x!==null?x:void 0),Ja&&(Ic(s,x||void 0),Ja=!1);er(),d=bn(),De(d)}),sa=null}function yh(f,s){Pr(s,()=>{let d=hn();if(Lt(d)&&!s.isComposing()){let x=d.anchor,A=d.anchor.getNode();Dt(x.key),(f.timeStamp<Ya+30||x.type==="element"||!d.isCollapsed()||A.getFormat()!==d.format||A.getStyle()!==d.style)&&pt(s,i,Oe)}})}function Ic(f,s){var d=f._compositionKey;if(Dt(null),d!==null&&s!=null){if(s===""){s=sn(d),f=Rt(f.getElementByKey(d)),f!==null&&f.nodeValue!==null&&Nt(s)&&je(s,f.nodeValue,null,null,!0);return}if(s[s.length-1]===`
|
|
257
|
-
`&&(d=hn(),Lt(d))){s=d.focus,d.anchor.set(s.key,s.offset,s.type),pt(f,P,null);return}}$e(!0,f,s)}function vh(f,s){w?Ja=!0:Pr(s,()=>{Ic(s,f.data)})}function bh(f,s){if(Ya=f.timeStamp,td=f.keyCode,!s.isComposing()){var{keyCode:d,shiftKey:x,ctrlKey:A,metaKey:D,altKey:z}=f;if(!pt(s,_,f)){if(d!==39||A||D||z)if(d!==39||z||x||!A&&!D)if(d!==37||A||D||z)if(d!==37||z||x||!A&&!D)if(d!==38||A||D)if(d!==40||A||D)if(d===13&&x)Za=!0,pt(s,P,f);else if(d===32)pt(s,M,f);else if(F&&A&&d===79)f.preventDefault(),Za=!0,pt(s,r,!0);else if(d!==13||x){var ie=F?z||D?!1:d===8||d===72&&A:A||z||D?!1:d===8;ie?d===8?pt(s,Y,f):(f.preventDefault(),pt(s,n,!0)):d===27?pt(s,X,f):(ie=F?x||z||D?!1:d===46||d===68&&A:A||z||D?!1:d===46,ie?d===46?pt(s,oe,f):(f.preventDefault(),pt(s,n,!1)):d===8&&(F?z:A)?(f.preventDefault(),pt(s,u,!0)):d===46&&(F?z:A)?(f.preventDefault(),pt(s,u,!1)):F&&D&&d===8?(f.preventDefault(),pt(s,p,!0)):F&&D&&d===46?(f.preventDefault(),pt(s,p,!1)):d===66&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"bold")):d===85&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"underline")):d===73&&!z&&(F?D:A)?(f.preventDefault(),pt(s,m,"italic")):d!==9||z||A||D?d===90&&!x&&(F?D:A)?(f.preventDefault(),pt(s,b,void 0)):(ie=F?d===90&&D&&x:d===89&&A||d===90&&A&&x,ie?(f.preventDefault(),pt(s,C,void 0)):oi(s._editorState._selection)?(ie=x?!1:d===67?F?D:A:!1,ie?(f.preventDefault(),pt(s,te,f)):(ie=x?!1:d===88?F?D:A:!1,ie?(f.preventDefault(),pt(s,fe,f)):d===65&&(F?D:A)&&(f.preventDefault(),pt(s,V,f)))):!w&&d===65&&(F?D:A)&&(f.preventDefault(),pt(s,V,f))):pt(s,Z,f))}else Za=!1,pt(s,P,f);else pt(s,k,f);else pt(s,R,f);else pt(s,O,f);else pt(s,T,f);else pt(s,v,f);else pt(s,y,f);(A||x||z||D)&&pt(s,re,f)}}}function ld(f){let s=f.__lexicalEventHandles;return s===void 0&&(s=[],f.__lexicalEventHandles=s),s}let la=new Map;function cd(f){f=f.target;let s=po(f==null?null:f.nodeType===9?f.defaultView:f.ownerDocument.defaultView);if(s!==null){var d=wt(s.anchorNode);if(d!==null){Mc&&(Mc=!1,Pr(d,()=>{var z=ii(),ie=s.anchorNode;ie!==null&&(ie=ie.nodeType,ie===1||ie===3)&&(z=Pi(z,s,d),xr(z))})),f=Ee(d),f=f[f.length-1];var x=f._key,A=la.get(x),D=A||f;D!==d&&ad(s,D,!1),ad(s,d,!0),d!==f?la.set(x,d):A&&la.delete(x)}}}function _h(f,s){qa===0&&f.ownerDocument.addEventListener("selectionchange",cd),qa++,f.__lexicalEditor=s;let d=ld(f);for(let x=0;x<Dc.length;x++){let[A,D]=Dc[x],z=typeof D=="function"?ie=>{ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()&&D(ie,s))}:ie=>{if(ie._lexicalHandled!==!0&&(ie._lexicalHandled=!0,s.isEditable()))switch(A){case"cut":return pt(s,fe,ie);case"copy":return pt(s,te,ie);case"paste":return pt(s,a,ie);case"dragstart":return pt(s,Q,ie);case"dragover":return pt(s,de,ie);case"dragend":return pt(s,pe,ie);case"focus":return pt(s,j,ie);case"blur":return pt(s,ee,ie);case"drop":return pt(s,U,ie)}};f.addEventListener(A,z),d.push(()=>{f.removeEventListener(A,z)})}}function Ai(f,s,d){er();var x=f.__key;let A=f.getParent();if(A!==null){var D=hn();if(Lt(D)&&nt(f)){var{anchor:z,focus:ie}=D,xe=z.getNode(),Re=ie.getNode();Er(xe,f)&&z.set(f.__key,0,"element"),Er(Re,f)&&ie.set(f.__key,0,"element")}if(xe=D,Re=!1,Lt(xe)&&s){D=xe.anchor;let Ve=xe.focus;D.key===x&&(ga(D,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0),Ve.key===x&&(ga(Ve,f,A,f.getPreviousSibling(),f.getNextSibling()),Re=!0)}else oi(xe)&&s&&f.isSelected()&&f.selectPrevious();Lt(xe)&&s&&!Re?(x=f.getIndexWithinParent(),yt(f),Ii(xe,A,x,-1)):yt(f),d||Mr(A)||A.canBeEmpty()||!A.isEmpty()||Ai(A,s),s&&Sr(A)&&A.isEmpty()&&A.selectEnd()}}class ca{static getType(){B(64,this.name)}static clone(){B(65,this.name)}constructor(s){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,ot(this,s)}getType(){return this.__type}isAttached(){for(var s=this.__key;s!==null;){if(s==="root")return!0;if(s=sn(s),s===null)break;s=s.__parent}return!1}isSelected(s){if(s=s||hn(),s==null)return!1;let d=s.getNodes().some(x=>x.__key===this.__key);return Nt(this)?d:Lt(s)&&s.anchor.type==="element"&&s.focus.type==="element"&&s.anchor.key===s.focus.key&&s.anchor.offset===s.focus.offset?!1:d}getKey(){return this.__key}getIndexWithinParent(){var s=this.getParent();if(s===null)return-1;s=s.getFirstChild();let d=0;for(;s!==null;){if(this.is(s))return d;d++,s=s.getNextSibling()}return-1}getParent(){let s=this.getLatest().__parent;return s===null?null:sn(s)}getParentOrThrow(){let s=this.getParent();return s===null&&B(66,this.__key),s}getTopLevelElement(){let s=this;for(;s!==null;){let d=s.getParent();if(Mr(d))return s;s=d}return null}getTopLevelElementOrThrow(){let s=this.getTopLevelElement();return s===null&&B(67,this.__key),s}getParents(){let s=[],d=this.getParent();for(;d!==null;)s.push(d),d=d.getParent();return s}getParentKeys(){let s=[],d=this.getParent();for(;d!==null;)s.push(d.__key),d=d.getParent();return s}getPreviousSibling(){let s=this.getLatest().__prev;return s===null?null:sn(s)}getPreviousSiblings(){let s=[];var d=this.getParent();if(d===null)return s;for(d=d.getFirstChild();d!==null&&!d.is(this);)s.push(d),d=d.getNextSibling();return s}getNextSibling(){let s=this.getLatest().__next;return s===null?null:sn(s)}getNextSiblings(){let s=[],d=this.getNextSibling();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getCommonAncestor(s){let d=this.getParents();var x=s.getParents();nt(this)&&d.unshift(this),nt(s)&&x.unshift(s),s=d.length;var A=x.length;if(s===0||A===0||d[s-1]!==x[A-1])return null;for(x=new Set(x),A=0;A<s;A++){let D=d[A];if(x.has(D))return D}return null}is(s){return s==null?!1:this.__key===s.__key}isBefore(s){if(this===s)return!1;if(s.isParentOf(this))return!0;if(this.isParentOf(s))return!1;var d=this.getCommonAncestor(s);let x=this;for(;;){var A=x.getParentOrThrow();if(A===d){A=x.getIndexWithinParent();break}x=A}for(x=s;;){if(s=x.getParentOrThrow(),s===d){d=x.getIndexWithinParent();break}x=s}return A<d}isParentOf(s){let d=this.__key;if(d===s.__key)return!1;for(;s!==null;){if(s.__key===d)return!0;s=s.getParent()}return!1}getNodesBetween(s){let d=this.isBefore(s),x=[],A=new Set;for(var D=this;;){var z=D.__key;if(A.has(z)||(A.add(z),x.push(D)),D===s)break;if(z=nt(D)?d?D.getFirstChild():D.getLastChild():null,z!==null)D=z;else if(z=d?D.getNextSibling():D.getPreviousSibling(),z!==null)D=z;else{if(D=D.getParentOrThrow(),A.has(D.__key)||x.push(D),D===s)break;z=D;do z===null&&B(68),D=d?z.getNextSibling():z.getPreviousSibling(),z=z.getParent(),z!==null&&(D!==null||A.has(z.__key)||x.push(z));while(D===null)}}return d||x.reverse(),x}isDirty(){let s=bn()._dirtyLeaves;return s!==null&&s.has(this.__key)}getLatest(){let s=sn(this.__key);return s===null&&B(113),s}getWritable(){er();var s=Qr(),d=bn();s=s._nodeMap;let x=this.__key,A=this.getLatest(),D=A.__parent;d=d._cloneNotNeeded;var z=hn();return Br(z)&&z.setCachedNodes(null),d.has(x)?(kt(A),A):(z=A.constructor.clone(A),z.__parent=D,z.__next=A.__next,z.__prev=A.__prev,nt(A)&&nt(z)?(z.__first=A.__first,z.__last=A.__last,z.__size=A.__size,z.__indent=A.__indent,z.__format=A.__format,z.__dir=A.__dir):Nt(A)&&Nt(z)&&(z.__format=A.__format,z.__style=A.__style,z.__mode=A.__mode,z.__detail=A.__detail),d.add(x),z.__key=x,kt(z),s.set(x,z),z)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){B(70)}updateDOM(){B(71)}exportDOM(s){return{element:this.createDOM(s._config,s)}}exportJSON(){B(72)}static importJSON(){B(18,this.name)}static transform(){return null}remove(s){Ai(this,!0,s)}replace(s,d){er();var x=hn();x!==null&&(x=x.clone()),xc(this,s);let A=this.getLatest(),D=this.__key,z=s.__key,ie=s.getWritable();s=this.getParentOrThrow().getWritable();let xe=s.__size;yt(ie);let Re=A.getPreviousSibling(),Ve=A.getNextSibling(),Ze=A.__prev,Ge=A.__next,Ie=A.__parent;return Ai(A,!1,!0),Re===null?s.__first=z:Re.getWritable().__next=z,ie.__prev=Ze,Ve===null?s.__last=z:Ve.getWritable().__prev=z,ie.__next=Ge,ie.__parent=Ie,s.__size=xe,d&&this.getChildren().forEach(it=>{ie.append(it)}),Lt(x)&&(xr(x),d=x.anchor,x=x.focus,d.key===D&&fa(d,ie),x.key===D&&fa(x,ie)),Kt()===D&&Dt(z),ie}insertAfter(s,d=!0){er(),xc(this,s);var x=this.getWritable();let A=s.getWritable();var D=A.getParent();let z=hn();var ie=!1,xe=!1;if(D!==null){var Re=s.getIndexWithinParent();yt(A),Lt(z)&&(xe=D.__key,ie=z.anchor,D=z.focus,ie=ie.type==="element"&&ie.key===xe&&ie.offset===Re+1,xe=D.type==="element"&&D.key===xe&&D.offset===Re+1)}D=this.getNextSibling(),Re=this.getParentOrThrow().getWritable();let Ve=A.__key,Ze=x.__next;return D===null?Re.__last=Ve:D.getWritable().__prev=Ve,Re.__size++,x.__next=Ve,A.__next=Ze,A.__prev=x.__key,A.__parent=x.__parent,d&&Lt(z)&&(d=this.getIndexWithinParent(),Ii(z,Re,d+1),x=Re.__key,ie&&z.anchor.set(x,d+2,"element"),xe&&z.focus.set(x,d+2,"element")),s}insertBefore(s,d=!0){er(),xc(this,s);var x=this.getWritable();let A=s.getWritable(),D=A.__key;yt(A);let z=this.getPreviousSibling(),ie=this.getParentOrThrow().getWritable(),xe=x.__prev,Re=this.getIndexWithinParent();return z===null?ie.__first=D:z.getWritable().__next=D,ie.__size++,x.__prev=D,A.__prev=xe,A.__next=x.__key,A.__parent=x.__parent,x=hn(),d&&Lt(x)&&(d=this.getParentOrThrow(),Ii(x,d,Re)),s}isParentRequired(){return!1}createParentElementNode(){return vo()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(s,d){er();let x=this.getPreviousSibling(),A=this.getParentOrThrow();return x===null?A.select(0,0):nt(x)?x.select():Nt(x)?x.select(s,d):(s=x.getIndexWithinParent()+1,A.select(s,s))}selectNext(s,d){er();let x=this.getNextSibling(),A=this.getParentOrThrow();return x===null?A.select():nt(x)?x.select(0,0):Nt(x)?x.select(s,d):(s=x.getIndexWithinParent(),A.select(s,s))}markDirty(){this.getWritable()}}function Xa(f,s,d){d=d||s.getParentOrThrow().getLastChild();let x=s;for(s=[s];x!==d;){if(!x.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");x=x.getNextSibling(),s.push(x)}for(let A of s)f=f.insertAfter(A)}class ua extends ca{static getType(){return"linebreak"}static clone(s){return new ua(s.__key)}constructor(s){super(s)}getTextContent(){return`
|
|
258
|
-
`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:s=>{let d=s.parentElement,x,A;return d!==null&&((x=d.firstChild)===s||x.nextSibling===s&&x.nodeType===3&&(x.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((A=d.lastChild)===s||A.previousSibling===s&&A.nodeType===3&&(A.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:Qa,priority:0}}}}static importJSON(){return Ri()}exportJSON(){return{type:"linebreak",version:1}}}function Qa(){return{node:Ri()}}function Ri(){return Qo(new ua)}function $i(f){return f instanceof ua}function Di(f,s){return s&16?"code":s&128?"mark":s&32?"sub":s&64?"sup":null}function es(f,s){return s&1?"strong":s&2?"em":"span"}function Lc(f,s,d,x,A){f=x.classList,x=xt(A,"base"),x!==void 0&&f.add(...x),x=xt(A,"underlineStrikethrough");let D=!1,z=s&8&&s&4;var ie=d&8&&d&4;x!==void 0&&(ie?(D=!0,z||f.add(...x)):z&&f.remove(...x));for(let xe in le)ie=le[xe],x=xt(A,xe),x!==void 0&&(d&ie?!D||xe!=="underline"&&xe!=="strikethrough"?(!(s&ie)||z&&xe==="underline"||xe==="strikethrough")&&f.add(...x):s&ie&&f.remove(...x):s&ie&&f.remove(...x))}function Gs(f,s,d){let x=s.firstChild;if(d=d.isComposing(),f+=d?Ce:"",x==null)s.textContent=f;else if(s=x.nodeValue,s!==f)if(d||w){d=s.length;let A=f.length,D=0,z=0;for(;D<d&&D<A&&s[D]===f[D];)D++;for(;z+D<d&&z+D<A&&s[d-z-1]===f[A-z-1];)z++;f=[D,d-D-z,f.slice(D,A-z)];let[ie,xe,Re]=f;xe!==0&&x.deleteData(ie,xe),x.insertData(ie,Re)}else x.nodeValue=f}function da(f,s){return s=document.createElement(s),s.appendChild(f),s}class ti extends ca{static getType(){return"text"}static clone(s){return new ti(s.__text,s.__key)}constructor(s,d){super(d),this.__text=s,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let s=this.getLatest();return Xe[s.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Kt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(s){return s=le[s],(this.getFormat()&s)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(s,d){let x=this.getLatest().__format;return qe(x,s,d)}createDOM(s){var d=this.__format,x=Di(this,d);let A=es(this,d),D=document.createElement(x===null?A:x),z=D;return this.hasFormat("code")&&D.setAttribute("spellcheck","false"),x!==null&&(z=document.createElement(A),D.appendChild(z)),x=z,Gs(this.__text,x,this),s=s.theme.text,s!==void 0&&Lc(A,0,d,x,s),d=this.__style,d!==""&&(D.style.cssText=d),D}updateDOM(s,d,x){let A=this.__text;var D=s.__format,z=this.__format,ie=Di(this,D);let xe=Di(this,z);var Re=es(this,D);let Ve=es(this,z);return(ie===null?Re:ie)!==(xe===null?Ve:xe)?!0:ie===xe&&Re!==Ve?(D=d.firstChild,D==null&&B(48),s=ie=document.createElement(Ve),Gs(A,s,this),x=x.theme.text,x!==void 0&&Lc(Ve,0,z,s,x),d.replaceChild(ie,D),!1):(Re=d,xe!==null&&ie!==null&&(Re=d.firstChild,Re==null&&B(49)),Gs(A,Re,this),x=x.theme.text,x!==void 0&&D!==z&&Lc(Ve,D,z,Re,x),z=this.__style,s.__style!==z&&(d.style.cssText=z),!1)}static importDOM(){return{"#text":()=>({conversion:Us,priority:0}),b:()=>({conversion:Ks,priority:0}),code:()=>({conversion:ni,priority:0}),em:()=>({conversion:ni,priority:0}),i:()=>({conversion:ni,priority:0}),s:()=>({conversion:ni,priority:0}),span:()=>({conversion:mt,priority:0}),strong:()=>({conversion:ni,priority:0}),sub:()=>({conversion:ni,priority:0}),sup:()=>({conversion:ni,priority:0}),u:()=>({conversion:ni,priority:0})}}static importJSON(s){let d=Ln(s.text);return d.setFormat(s.format),d.setDetail(s.detail),d.setMode(s.mode),d.setStyle(s.style),d}exportDOM(s){return{element:s}=super.exportDOM(s),s!==null&&ei(s)||B(132),s.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(s=da(s,"b")),this.hasFormat("italic")&&(s=da(s,"i")),this.hasFormat("strikethrough")&&(s=da(s,"s")),this.hasFormat("underline")&&(s=da(s,"u")),{element:s}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(s){let d=this.getWritable();return d.__format=typeof s=="string"?le[s]:s,d}setDetail(s){let d=this.getWritable();return d.__detail=typeof s=="string"?ve[s]:s,d}setStyle(s){let d=this.getWritable();return d.__style=s,d}toggleFormat(s){let d=this.getFormat();return s=qe(d,s,null),this.setFormat(s)}toggleDirectionless(){let s=this.getWritable();return s.__detail^=1,s}toggleUnmergeable(){let s=this.getWritable();return s.__detail^=2,s}setMode(s){if(s=We[s],this.__mode===s)return this;let d=this.getWritable();return d.__mode=s,d}setTextContent(s){if(this.__text===s)return this;let d=this.getWritable();return d.__text=s,d}select(s,d){er();let x=hn();var A=this.getTextContent();let D=this.__key;if(typeof A=="string"?(A=A.length,s===void 0&&(s=A),d===void 0&&(d=A)):d=s=0,Lt(x))A=Kt(),A!==x.anchor.key&&A!==x.focus.key||Dt(D),x.setTextNodeRange(this,s,this,d);else return go(D,s,D,d,"text","text");return x}selectStart(){return this.select(0,0)}selectEnd(){let s=this.getTextContentSize();return this.select(s,s)}spliceText(s,d,x,A){let D=this.getWritable(),z=D.__text,ie=x.length,xe=s;0>xe&&(xe=ie+xe,0>xe&&(xe=0));let Re=hn();return A&&Lt(Re)&&(s+=ie,Re.setTextNodeRange(D,s,D,s)),d=z.slice(0,xe)+x+z.slice(xe+d),D.__text=d,D}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...s){er();var d=this.getLatest(),x=d.getTextContent(),A=d.__key,D=Kt(),z=new Set(s);s=[];for(var ie=x.length,xe="",Re=0;Re<ie;Re++)xe!==""&&z.has(Re)&&(s.push(xe),xe=""),xe+=x[Re];if(xe!==""&&s.push(xe),z=s.length,z===0)return[];if(s[0]===x)return[d];var Ve=s[0];x=d.getParentOrThrow(),Re=d.getFormat();let Ze=d.getStyle(),Ge=d.__detail;ie=!1,d.isSegmented()?(xe=Ln(Ve),xe.__format=Re,xe.__style=Ze,xe.__detail=Ge,ie=!0):(xe=d.getWritable(),xe.__text=Ve),d=hn(),xe=[xe],Ve=Ve.length;for(let vt=1;vt<z;vt++){var Ie=s[vt],it=Ie.length;Ie=Ln(Ie).getWritable(),Ie.__format=Re,Ie.__style=Ze,Ie.__detail=Ge;let $t=Ie.__key;if(it=Ve+it,Lt(d)){let Vt=d.anchor,An=d.focus;Vt.key===A&&Vt.type==="text"&&Vt.offset>Ve&&Vt.offset<=it&&(Vt.key=$t,Vt.offset-=Ve,d.dirty=!0),An.key===A&&An.type==="text"&&An.offset>Ve&&An.offset<=it&&(An.key=$t,An.offset-=Ve,d.dirty=!0)}D===A&&Dt($t),Ve=it,xe.push(Ie)}return A=this.getPreviousSibling(),D=this.getNextSibling(),A!==null&&kt(A),D!==null&&kt(D),A=x.getWritable(),D=this.getIndexWithinParent(),ie?(A.splice(D,0,xe),this.remove()):A.splice(D,1,xe),Lt(d)&&Ii(d,x,D,z-1),xe}mergeWithSibling(s){var d=s===this.getPreviousSibling();d||s===this.getNextSibling()||B(50);var x=this.__key;let A=s.__key,D=this.__text,z=D.length;Kt()===A&&Dt(x);let ie=hn();if(Lt(ie)){let xe=ie.anchor,Re=ie.focus;xe!==null&&xe.key===A&&(ai(xe,d,x,s,z),ie.dirty=!0),Re!==null&&Re.key===A&&(ai(Re,d,x,s,z),ie.dirty=!0)}return x=s.__text,this.setTextContent(d?x+D:D+x),d=this.getWritable(),s.remove(),d}isTextEntity(){return!1}}function mt(f){let s=f.style.fontWeight==="700",d=f.style.textDecoration==="line-through",x=f.style.fontStyle==="italic",A=f.style.textDecoration==="underline",D=f.style.verticalAlign;return{forChild:z=>(Nt(z)&&(s&&z.toggleFormat("bold"),d&&z.toggleFormat("strikethrough"),x&&z.toggleFormat("italic"),A&&z.toggleFormat("underline"),D==="sub"&&z.toggleFormat("subscript"),D==="super"&&z.toggleFormat("superscript")),z),node:null}}function Ks(f){let s=f.style.fontWeight==="normal";return{forChild:d=>(Nt(d)&&!s&&d.toggleFormat("bold"),d),node:null}}let ts=new WeakMap;function Us(f){f.parentElement===null&&B(129);for(var s=f.textContent||"",d,x=f.parentNode,A=[f];x!==null&&(d=ts.get(x))===void 0&&!(x.nodeName==="PRE"||x.nodeType===1&&x.style!==void 0&&x.style.whiteSpace!==void 0&&x.style.whiteSpace.startsWith("pre"));)A.push(x),x=x.parentNode;for(d=d===void 0?x:d,x=0;x<A.length;x++)ts.set(A[x],d);if(d!==null){for(s=s.split(/(\r?\n|\t)/),f=[],A=s.length,d=0;d<A;d++)x=s[d],x===`
|
|
259
|
-
`||x===`\r
|
|
260
|
-
`?f.push(Ri()):x===" "?f.push(Vs()):x!==""&&f.push(Ln(x));return{node:f}}if(s=s.replace(/\r/g,"").replace(/[ \t\n]+/g," "),s==="")return{node:null};if(s[0]===" "){for(A=f,d=!0;A!==null&&(A=ud(A,!1))!==null;)if(x=A.textContent||"",0<x.length){/[ \t\n]$/.test(x)&&(s=s.slice(1)),d=!1;break}d&&(s=s.slice(1))}if(s[s.length-1]===" "){for(A=!0;f!==null&&(f=ud(f,!0))!==null;)if(0<(f.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){A=!1;break}A&&(s=s.slice(0,s.length-1))}return s===""?{node:null}:{node:Ln(s)}}let xh=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function ud(f,s){for(;;){for(var d=void 0;(d=s?f.nextSibling:f.previousSibling)===null;)if(f=f.parentElement,f===null)return null;if(f=d,f.nodeType===1&&(d=f.style.display,d===""&&f.nodeName.match(xh)===null||d!==""&&!d.startsWith("inline")))return null;for(;(d=s?f.firstChild:f.lastChild)!==null;)f=d;if(f.nodeType===3)return f;if(f.nodeName==="BR")return null}}let Eh={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ni(f){let s=Eh[f.nodeName.toLowerCase()];return s===void 0?{node:null}:{forChild:d=>(Nt(d)&&!d.hasFormat(s)&&d.toggleFormat(s),d),node:null}}function Ln(f=""){return Qo(new ti(f))}function Nt(f){return f instanceof ti}class Ao extends ti{static getType(){return"tab"}static clone(s){let d=new Ao(s.__key);return d.__text=s.__text,d.__format=s.__format,d.__style=s.__style,d}constructor(s){super(" ",s),this.__detail=2}static importDOM(){return null}static importJSON(s){let d=Vs();return d.setFormat(s.format),d.setStyle(s.style),d}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){B(126)}setDetail(){B(127)}setMode(){B(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Vs(){return Qo(new Ao)}function Fc(f){return f instanceof Ao}class Qn{constructor(s,d,x){this._selection=null,this.key=s,this.offset=d,this.type=x}is(s){return this.key===s.key&&this.offset===s.offset&&this.type===s.type}isBefore(s){let d=this.getNode(),x=s.getNode(),A=this.offset;if(s=s.offset,nt(d)){var D=d.getDescendantByIndex(A);d=D??d}return nt(x)&&(D=x.getDescendantByIndex(s),x=D??x),d===x?A<s:d.isBefore(x)}getNode(){let s=sn(this.key);return s===null&&B(20),s}set(s,d,x){let A=this._selection,D=this.key;this.key=s,this.offset=d,this.type=x,ya()||(Kt()===D&&Dt(s),A!==null&&(A.setCachedNodes(null),A.dirty=!0))}}function Ys(f,s){let d=s.__key,x=f.offset,A="element";if(Nt(s))A="text",s=s.getTextContentSize(),x>s&&(x=s);else if(!nt(s)){var D=s.getNextSibling();Nt(D)?(d=D.__key,x=0,A="text"):(D=s.getParent())&&(d=D.__key,x=s.getIndexWithinParent()+1)}f.set(d,x,A)}function fa(f,s){if(nt(s)){let d=s.getLastDescendant();nt(d)||Nt(d)?Ys(f,d):Ys(f,s)}else Ys(f,s)}function qs(f,s,d,x){let A=f.getNode(),D=A.getChildAtIndex(f.offset),z=Ln(),ie=Sr(A)?vo().append(z):z;z.setFormat(d),z.setStyle(x),D===null?A.append(ie):D.insertBefore(ie),f.is(s)&&s.set(z.__key,0,"text"),f.set(z.__key,0,"text")}function ri(f,s,d,x){f.key=s,f.offset=d,f.type=x}class ns{constructor(s,d){this.anchor=s,this.focus=d,s._selection=this,d._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Br(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return rs(this)}}class ha{constructor(s){this.dirty=!1,this._nodes=s,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){if(!oi(s))return!1;let d=this._nodes,x=s._nodes;return d.size===x.size&&Array.from(d).every(A=>x.has(A))}add(s){this.dirty=!0,this._nodes.add(s),this._cachedNodes=null}delete(s){this.dirty=!0,this._nodes.delete(s),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(s){return this._nodes.has(s)}clone(){return new ha(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.getNodes(),x=d.length;var A=d[x-1];if(Nt(A))A=A.select();else{let D=A.getIndexWithinParent()+1;A=A.getParentOrThrow().select(D,D)}for(A.insertNodes(s),s=0;s<x;s++)d[s].remove()}getNodes(){var s=this._cachedNodes;if(s!==null)return s;var d=this._nodes;s=[];for(let x of d)d=sn(x),d!==null&&s.push(d);return ya()||(this._cachedNodes=s),s}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function Lt(f){return f instanceof Mi}function Br(f){return f instanceof ns}function jc(f){let[s,,d]=Zs(f);f=d.getChildren();let x=f.length;var A=f[0].getChildren().length;let D=Array(x);for(var z=0;z<x;z++)D[z]=Array(A);for(A=0;A<x;A++){z=f[A].getChildren();let ie=0;for(let xe=0;xe<z.length;xe++){for(;D[A][ie];)ie++;let Re=z[xe],Ve=Re.__rowSpan||1,Ze=Re.__colSpan||1;for(let Ge=0;Ge<Ve;Ge++)for(let Ie=0;Ie<Ze;Ie++)D[A+Ge][ie+Ie]=Re;if(s===Re)return{colSpan:Ze,columnIndex:ie,rowIndex:A,rowSpan:Ve};ie+=Ze}}return null}class ki extends ns{constructor(s,d,x){super(d,x),this.gridKey=s}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return dd(s)?this.gridKey===s.gridKey&&this.anchor.is(s.anchor)&&this.focus.is(s.focus):!1}set(s,d,x){this.dirty=!0,this.gridKey=s,this.anchor.key=d,this.focus.key=x,this._cachedNodes=null}clone(){return new ki(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(s){let d=this.focus.getNode();ut(d.select(0,d.getChildrenSize())).insertNodes(s)}getShape(){var s=sn(this.anchor.key);if(Wr(s)||B(103),s=jc(s),s===null)throw Error("getCellRect: expected to find AnchorNode");var d=sn(this.focus.key);Wr(d)||B(104);let x=jc(d);if(x===null)throw Error("getCellRect: expected to find focusCellNode");d=Math.min(s.columnIndex,x.columnIndex);let A=Math.max(s.columnIndex,x.columnIndex),D=Math.min(s.rowIndex,x.rowIndex);return s=Math.max(s.rowIndex,x.rowIndex),{fromX:Math.min(d,A),fromY:Math.min(D,s),toX:Math.max(d,A),toY:Math.max(D,s)}}getNodes(){function s($t){let{cell:Vt,startColumn:An,startRow:Zn}=$t;Re=Math.min(Re,An),Ve=Math.min(Ve,Zn),Ze=Math.max(Ze,An+Vt.__colSpan-1),Ge=Math.max(Ge,Zn+Vt.__rowSpan-1)}var d=this._cachedNodes;if(d!==null)return d;var x=this.anchor.getNode();d=this.focus.getNode();var A=Ls(x,Wr);x=Ls(d,Wr),Wr(A)||B(103),Wr(x)||B(104),d=A.getParent(),ls(d)||B(105),d=d.getParent(),Vc(d)||B(106);var D=x.getParents()[1];if(D!==d){if(d.isParentOf(x)){if(d=D.getParent(),d==null)throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,x.getKey(),d.getKey())}else{if(d=d.getParent(),d==null)throw Error("Expected gridParent to have a parent");this.set(this.gridKey,d.getKey(),x.getKey())}return this.getNodes()}let[z,ie,xe]=Ro(d,A,x),Re=Math.min(ie.startColumn,xe.startColumn),Ve=Math.min(ie.startRow,xe.startRow),Ze=Math.max(ie.startColumn+ie.cell.__colSpan-1,xe.startColumn+xe.cell.__colSpan-1),Ge=Math.max(ie.startRow+ie.cell.__rowSpan-1,xe.startRow+xe.cell.__rowSpan-1);x=Re,A=Ve,D=Re;for(var Ie=Ve;Re<x||Ve<A||Ze>D||Ge>Ie;){if(Re<x){var it=Ie-A;--x;for(var vt=0;vt<=it;vt++)s(z[A+vt][x])}if(Ve<A)for(it=D-x,--A,vt=0;vt<=it;vt++)s(z[A][x+vt]);if(Ze>D)for(it=Ie-A,D+=1,vt=0;vt<=it;vt++)s(z[A+vt][D]);if(Ge>Ie)for(it=D-x,Ie+=1,vt=0;vt<=it;vt++)s(z[Ie][x+vt])}for(d=[d],x=null,A=Ve;A<=Ge;A++)for(D=Re;D<=Ze;D++)({cell:Ie}=z[A][D]),it=Ie.getParent(),ls(it)||B(107),it!==x&&d.push(it),d.push(Ie,...wc(Ie)),x=it;return ya()||(this._cachedNodes=d),d}getTextContent(){let s=this.getNodes(),d="";for(let x=0;x<s.length;x++)d+=s[x].getTextContent();return d}}function dd(f){return f instanceof ki}class Mi extends ns{constructor(s,d,x,A){super(s,d),this.format=x,this.style=A}getCachedNodes(){return this._cachedNodes}setCachedNodes(s){this._cachedNodes=s}is(s){return Lt(s)?this.anchor.is(s.anchor)&&this.focus.is(s.focus)&&this.format===s.format&&this.style===s.style:!1}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var s=this._cachedNodes;if(s!==null)return s;s=this.anchor;var d=this.focus,x=s.isBefore(d),A=x?s:d;x=x?d:s,s=A.getNode(),d=x.getNode();let D=A.offset;return A=x.offset,nt(s)&&(x=s.getDescendantByIndex(D),s=x??s),nt(d)&&(x=d.getDescendantByIndex(A),x!==null&&x!==s&&d.getChildAtIndex(A)===x&&(x=x.getPreviousSibling()),d=x??d),s=s.is(d)?nt(s)&&0<s.getChildrenSize()?[]:[s]:s.getNodesBetween(d),ya()||(this._cachedNodes=s),s}setTextNodeRange(s,d,x,A){ri(this.anchor,s.__key,d,"text"),ri(this.focus,x.__key,A,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let s=this.getNodes();if(s.length===0)return"";let d=s[0],x=s[s.length-1],A=this.anchor,D=this.focus,z=A.isBefore(D),[ie,xe]=rs(this),Re="",Ve=!0;for(let Ze=0;Ze<s.length;Ze++){let Ge=s[Ze];if(nt(Ge)&&!Ge.isInline())Ve||(Re+=`
|
|
261
|
-
`),Ve=!Ge.isEmpty();else if(Ve=!1,Nt(Ge)){let Ie=Ge.getTextContent();Ge===d?Ge===x?(A.type!=="element"||D.type!=="element"||D.offset===A.offset)&&(Ie=ie<xe?Ie.slice(ie,xe):Ie.slice(xe,ie)):Ie=z?Ie.slice(ie):Ie.slice(xe):Ge===x&&(Ie=z?Ie.slice(0,xe):Ie.slice(0,ie)),Re+=Ie}else!on(Ge)&&!$i(Ge)||Ge===x&&this.isCollapsed()||(Re+=Ge.getTextContent())}return Re}applyDOMRange(s){let d=bn(),x=d.getEditorState()._selection;if(s=pr(s.startContainer,s.startOffset,s.endContainer,s.endOffset,d,x),s!==null){var[A,D]=s;ri(this.anchor,A.key,A.offset,A.type),ri(this.focus,D.key,D.offset,D.type),this._cachedNodes=null}}clone(){let s=this.anchor,d=this.focus;return new Mi(new Qn(s.key,s.offset,s.type),new Qn(d.key,d.offset,d.type),this.format,this.style)}toggleFormat(s){this.format=qe(this.format,s,null),this.dirty=!0}setStyle(s){this.style=s,this.dirty=!0}hasFormat(s){return(this.format&le[s])!==0}insertRawText(s){s=s.split(/(\r?\n|\t)/);let d=[],x=s.length;for(let A=0;A<x;A++){let D=s[A];D===`
|
|
262
|
-
`||D===`\r
|
|
263
|
-
`?d.push(Ri()):D===" "?d.push(Vs()):d.push(Ln(D))}this.insertNodes(d)}insertText(s){var d=this.anchor,x=this.focus,A=this.isCollapsed()||d.isBefore(x),D=this.format,z=this.style;A&&d.type==="element"?qs(d,x,D,z):A||x.type!=="element"||qs(x,d,D,z);var ie=this.getNodes(),xe=ie.length,Re=A?x:d;x=(A?d:x).offset;var Ve=Re.offset;d=ie[0],Nt(d)||B(26),A=d.getTextContent().length;var Ze=d.getParentOrThrow(),Ge=ie[xe-1];if(this.isCollapsed()&&x===A&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!Ze.canInsertTextAfter()&&d.getNextSibling()===null)){var Ie=d.getNextSibling();if(Nt(Ie)&&Ie.canInsertTextBefore()&&!_t(Ie)||(Ie=Ln(),Ie.setFormat(D),Ze.canInsertTextAfter()?d.insertAfter(Ie):Ze.insertAfter(Ie)),Ie.select(0,0),d=Ie,s!==""){this.insertText(s);return}}else if(this.isCollapsed()&&x===0&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!Ze.canInsertTextBefore()&&d.getPreviousSibling()===null)){if(Ie=d.getPreviousSibling(),(!Nt(Ie)||_t(Ie))&&(Ie=Ln(),Ie.setFormat(D),Ze.canInsertTextBefore()?d.insertBefore(Ie):Ze.insertBefore(Ie)),Ie.select(),d=Ie,s!==""){this.insertText(s);return}}else if(d.isSegmented()&&x!==A)Ze=Ln(d.getTextContent()),Ze.setFormat(D),d.replace(Ze),d=Ze;else if(!(this.isCollapsed()||s===""||(Ie=Ge.getParent(),Ze.canInsertTextBefore()&&Ze.canInsertTextAfter()&&(!nt(Ie)||Ie.canInsertTextBefore()&&Ie.canInsertTextAfter())))){this.insertText(""),Fn(this.anchor,this.focus,null),this.insertText(s);return}if(xe===1)if(d.isToken())s=Ln(s),s.select(),d.replace(s);else{if(ie=d.getFormat(),xe=d.getStyle(),x===Ve&&(ie!==D||xe!==z))if(d.getTextContent()==="")d.setFormat(D),d.setStyle(z);else{ie=Ln(s),ie.setFormat(D),ie.setStyle(z),ie.select(),x===0?d.insertBefore(ie,!1):([xe]=d.splitText(x),xe.insertAfter(ie,!1)),ie.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length);return}else if(Fc(d)){s=Ln(s),s.setFormat(D),s.setStyle(z),s.select(),d.replace(s);return}d=d.spliceText(x,Ve-x,s,!0),d.getTextContent()===""?d.remove():this.anchor.type==="text"&&(d.isComposing()?this.anchor.offset-=s.length:(this.format=ie,this.style=xe))}else{if(D=new Set([...d.getParentKeys(),...Ge.getParentKeys()]),Ie=nt(d)?d:d.getParentOrThrow(),z=nt(Ge)?Ge:Ge.getParentOrThrow(),Ze=Ge,!Ie.is(z)&&z.isInline())do Ze=z,z=z.getParentOrThrow();while(z.isInline());if(Re.type==="text"&&(Ve!==0||Ge.getTextContent()==="")||Re.type==="element"&&Ge.getIndexWithinParent()<Ve)if(Nt(Ge)&&!Ge.isToken()&&Ve!==Ge.getTextContentSize()){if(Ge.isSegmented()){var it=Ln(Ge.getTextContent());Ge.replace(it),Ge=it}Sr(Re.getNode())||Re.type!=="text"||(Ge=Ge.spliceText(0,Ve,"")),D.add(Ge.__key)}else Re=Ge.getParentOrThrow(),Re.canBeEmpty()||Re.getChildrenSize()!==1?Ge.remove():Re.remove();else D.add(Ge.__key);for(Re=z.getChildren(),Ve=new Set(ie),Ge=Ie.is(z),Ie=Ie.isInline()&&d.getNextSibling()===null?Ie:d,it=Re.length-1;0<=it;it--){let vt=Re[it];if(vt.is(d)||nt(vt)&&vt.isParentOf(d))break;vt.isAttached()&&(!Ve.has(vt)||vt.is(Ze)?Ge||Ie.insertAfter(vt,!1):vt.remove())}if(!Ge)for(Re=z,z=null;Re!==null;)Ve=Re.getChildren(),Ge=Ve.length,(Ge===0||Ve[Ge-1].is(z))&&(D.delete(Re.__key),z=Re),Re=Re.getParent();for(d.isToken()?x===A?d.select():(s=Ln(s),s.select(),d.replace(s)):(d=d.spliceText(x,A-x,s,!0),d.getTextContent()===""?d.remove():d.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=s.length)),s=1;s<xe;s++)d=ie[s],D.has(d.__key)||d.remove()}}removeText(){this.insertText("")}formatText(s){if(this.isCollapsed())this.toggleFormat(s),Dt(null);else{var d=this.getNodes(),x=[];for(var A of d)Nt(A)&&x.push(A);var D=x.length;if(D===0)this.toggleFormat(s),Dt(null);else{A=this.anchor;var z=this.focus,ie=this.isBackward();d=ie?z:A,A=ie?A:z;var xe=0,Re=x[0];if(z=d.type==="element"?0:d.offset,d.type==="text"&&z===Re.getTextContentSize()&&(xe=1,Re=x[1],z=0),Re!=null){ie=Re.getFormatFlags(s,null);var Ve=D-1,Ze=x[Ve];if(D=A.type==="text"?A.offset:Ze.getTextContentSize(),Re.is(Ze))z!==D&&(z===0&&D===Re.getTextContentSize()?Re.setFormat(ie):(s=Re.splitText(z,D),s=z===0?s[0]:s[1],s.setFormat(ie),d.type==="text"&&d.set(s.__key,0,"text"),A.type==="text"&&A.set(s.__key,D-z,"text")),this.format=ie);else{z!==0&&([,Re]=Re.splitText(z),z=0),Re.setFormat(ie);var Ge=Ze.getFormatFlags(s,ie);for(0<D&&(D!==Ze.getTextContentSize()&&([Ze]=Ze.splitText(D)),Ze.setFormat(Ge)),xe+=1;xe<Ve;xe++){let Ie=x[xe];if(!Ie.isToken()){let it=Ie.getFormatFlags(s,Ge);Ie.setFormat(it)}}d.type==="text"&&d.set(Re.__key,z,"text"),A.type==="text"&&A.set(Ze.__key,D,"text"),this.format=ie|Ge}}}}}insertNodes(s){if(s.length!==0){if(this.anchor.key==="root"){this.insertParagraph();var d=hn();if(!Lt(d))throw Error("Expected RangeSelection after insertParagraph");return d.insertNodes(s)}var x=Tc(this.anchor.getNode(),Ni);if(d=s[s.length-1],"__language"in x)if("__language"in s[0])this.insertText(s[0].getTextContent());else{var A=Li(this);x.splice(A,0,s),d.selectEnd()}else if(s.some(ie=>(nt(ie)||on(ie))&&!ie.isInline())){d=Js(s),s=d.getLastDescendant();var D=d.getChildren();d=nt(x)&&x.isEmpty()?null:this.insertParagraph(),A=D[D.length-1];var z=D[0];(ie=>nt(ie)&&Ni(ie)&&!ie.isEmpty()&&nt(x)&&(!x.isEmpty()||"__value"in x&&"__checked"in x))(z)&&(x.append(...z.getChildren()),z=D[1]),z&&Xa(x,z),D=Tc(s,Ni),d&&nt(D)&&("__value"in d&&"__checked"in d||Ni(A))&&(D.append(...d.getChildren()),d.remove()),nt(x)&&x.isEmpty()&&x.remove(),s.selectEnd(),s=nt(x)?x.getLastChild():null,$i(s)&&D!==x&&s.remove()}else A=Li(this),x.splice(A,0,s),d.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var s=vo();return Yn().splice(this.anchor.offset,0,[s]),s.select(),s}var d=Li(this);return s=Tc(this.anchor.getNode(),Ni),d=(d=s.getChildAtIndex(d))?[d,...d.getNextSiblings()]:[],(s=s.insertNewAfter(this,!1))?(s.append(...d),s.selectStart(),s):null}insertLineBreak(s){var d=Ri();this.insertNodes([d]),s&&(s=d.getParentOrThrow(),d=d.getIndexWithinParent(),s.select(d,d))}extract(){var s=this.getNodes(),d=s.length,x=d-1,A=this.anchor;let D=this.focus;var z=s[0];let ie=s[x],[xe,Re]=rs(this);return d===0?[]:d===1?Nt(z)&&!this.isCollapsed()?(s=xe>Re?Re:xe,x=z.splitText(s,xe>Re?xe:Re),s=s===0?x[0]:x[1],s!=null?[s]:[]):[z]:(d=A.isBefore(D),Nt(z)&&(A=d?xe:Re,A===z.getTextContentSize()?s.shift():A!==0&&([,z]=z.splitText(A),s[0]=z)),Nt(ie)&&(z=ie.getTextContent().length,d=d?Re:xe,d===0?s.pop():d!==z&&([ie]=ie.splitText(d),s[x]=ie)),s)}modify(s,d,x){var A=this.focus,D=this.anchor,z=s==="move",ie=At(A,d);if(on(ie)&&!ie.isIsolated())z&&ie.isKeyboardSelectable()?(d=mo(),d.add(ie.__key),xr(d)):(s=d?ie.getPreviousSibling():ie.getNextSibling(),Nt(s)?(ie=s.__key,d=d?s.getTextContent().length:0,A.set(ie,d,"text"),z&&D.set(ie,d,"text")):(x=ie.getParentOrThrow(),nt(s)?(x=s.__key,ie=d?s.getChildrenSize():0):(ie=ie.getIndexWithinParent(),x=x.__key,d||ie++),A.set(x,ie,"element"),z&&D.set(x,ie,"element")));else if(D=bn(),A=po(D._window)){var xe=D._blockCursorElement,Re=D._rootElement;if(Re===null||xe===null||!nt(ie)||ie.isInline()||ie.canBeEmpty()||Cc(xe,D,Re),A.modify(s,d?"backward":"forward",x),0<A.rangeCount&&(ie=A.getRangeAt(0),D=this.anchor.getNode(),D=Sr(D)?D:qn(D),this.applyDOMRange(ie),this.dirty=!0,!z)){for(z=this.getNodes(),s=[],x=!1,xe=0;xe<z.length;xe++)Re=z[xe],Er(Re,D)?s.push(Re):x=!0;x&&0<s.length&&(d?(d=s[0],nt(d)?d.selectStart():d.getParentOrThrow().selectStart()):(d=s[s.length-1],nt(d)?d.selectEnd():d.getParentOrThrow().selectEnd())),(A.anchorNode!==ie.startContainer||A.anchorOffset!==ie.startOffset)&&(d=this.focus,z=this.anchor,A=z.key,ie=z.offset,D=z.type,ri(z,d.key,d.offset,d.type),ri(d,A,ie,D),this._cachedNodes=null)}}}deleteCharacter(s){let d=this.isCollapsed();if(this.isCollapsed()){var x=this.anchor,A=this.focus,D=x.getNode();if(!s&&(x.type==="element"&&nt(D)&&x.offset===D.getChildrenSize()||x.type==="text"&&x.offset===D.getTextContentSize())){var z=D.getParent();if(z=D.getNextSibling()||(z===null?null:z.getNextSibling()),nt(z)&&z.isShadowRoot())return}if(z=At(A,s),on(z)&&!z.isIsolated()){z.isKeyboardSelectable()&&nt(D)&&D.getChildrenSize()===0?(D.remove(),s=mo(),s.add(z.__key),xr(s)):(z.remove(),bn().dispatchCommand(e,void 0));return}if(!s&&nt(z)&&nt(D)&&D.isEmpty()){D.remove(),z.selectStart();return}if(this.modify("extend",s,"character"),this.isCollapsed()){if(s&&x.offset===0&&(x.type==="element"?x.getNode():x.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(z=A.type==="text"?A.getNode():null,D=x.type==="text"?x.getNode():null,z!==null&&z.isSegmented()){if(x=A.offset,A=z.getTextContentSize(),z.is(D)||s&&x!==A||!s&&x!==0){fd(z,s,x);return}}else if(D!==null&&D.isSegmented()&&(x=x.offset,A=D.getTextContentSize(),D.is(z)||s&&x!==0||!s&&x!==A)){fd(D,s,x);return}if(D=this.anchor,z=this.focus,x=D.getNode(),A=z.getNode(),x===A&&D.type==="text"&&z.type==="text"){var ie=D.offset,xe=z.offset;let Re=ie<xe;A=Re?ie:xe,xe=Re?xe:ie,ie=xe-1,A!==ie&&(x=x.getTextContent().slice(A,xe),ia(x)||(s?z.offset=ie:D.offset=ie))}}}this.removeText(),s&&!d&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(s=this.anchor.getNode(),s.isEmpty()&&Sr(s.getParent())&&s.getIndexWithinParent()===0&&s.collapseAtStart(this))}deleteLine(s){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",s,"lineboundary"),(s?this.focus:this.anchor).offset===0&&this.modify("extend",s,"character")),this.removeText()}deleteWord(s){this.isCollapsed()&&this.modify("extend",s,"word"),this.removeText()}}function oi(f){return f instanceof ha}function pa(f){let s=f.offset;return f.type==="text"?s:(f=f.getNode(),s===f.getChildrenSize()?f.getTextContent().length:0)}function rs(f){let s=f.anchor;return f=f.focus,s.type==="element"&&f.type==="element"&&s.key===f.key&&s.offset===f.offset?[0,0]:[pa(s),pa(f)]}function fd(f,s,d){let x=f.getTextContent().split(/(?=\s)/g),A=x.length,D=0,z=0;for(let ie=0;ie<A;ie++){let xe=x[ie],Re=ie===A-1;if(z=D,D+=xe.length,s&&D===d||D>d||Re){x.splice(ie,1),Re&&(z=void 0);break}}s=x.join("").trim(),s===""?f.remove():(f.setTextContent(s),f.select(z,z))}function Bc(f,s,d,x){var A=s;if(f.nodeType===1){let ie=!1;var D=f.childNodes,z=D.length;A===z&&(ie=!0,A=z-1);let xe=D[A];if(z=!1,xe===x._blockCursorElement?(xe=D[A+1],z=!0):x._blockCursorElement!==null&&A--,x=ho(xe),Nt(x))A=ie?x.getTextContentSize():0;else{if(D=ho(f),D===null)return null;if(nt(D)?(f=D.getChildAtIndex(A),(s=nt(f))&&(s=f.getParent(),s=d===null||s===null||!s.canBeEmpty()||s!==d.getNode()),s&&(d=ie?f.getLastDescendant():f.getFirstDescendant(),d===null?(D=f,A=0):(f=d,D=nt(f)?f:f.getParentOrThrow())),Nt(f)?(x=f,D=null,A=ie?f.getTextContentSize():0):f!==D&&ie&&!z&&A++):(A=D.getIndexWithinParent(),A=s===0&&on(D)&&ho(f)===D?A:A+1,D=D.getParentOrThrow()),nt(D))return new Qn(D.__key,A,"element")}}else x=ho(f);return Nt(x)?new Qn(x.__key,A,"text"):null}function hd(f,s,d){var x=f.offset,A=f.getNode();x===0?(x=A.getPreviousSibling(),A=A.getParent(),s?(d||!s)&&x===null&&nt(A)&&A.isInline()&&(s=A.getPreviousSibling(),Nt(s)&&(f.key=s.__key,f.offset=s.getTextContent().length)):nt(x)&&!d&&x.isInline()?(f.key=x.__key,f.offset=x.getChildrenSize(),f.type="element"):Nt(x)&&(f.key=x.__key,f.offset=x.getTextContent().length)):x===A.getTextContent().length&&(x=A.getNextSibling(),A=A.getParent(),s&&nt(x)&&x.isInline()?(f.key=x.__key,f.offset=0,f.type="element"):(d||s)&&x===null&&nt(A)&&A.isInline()&&!A.canInsertTextAfter()&&(s=A.getNextSibling(),Nt(s)&&(f.key=s.__key,f.offset=0)))}function Fn(f,s,d){if(f.type==="text"&&s.type==="text"){var x=f.isBefore(s);let A=f.is(s);hd(f,x,A),hd(s,!x,A),A&&(s.key=f.key,s.offset=f.offset,s.type=f.type),x=bn(),x.isComposing()&&x._compositionKey!==f.key&&Lt(d)&&(x=d.anchor,d=d.focus,ri(f,x.key,x.offset,x.type),ri(s,d.key,d.offset,d.type))}}function pr(f,s,d,x,A,D){return f===null||d===null||!lt(A,f,d)||(s=Bc(f,s,Lt(D)?D.anchor:null,A),s===null)||(x=Bc(d,x,Lt(D)?D.focus:null,A),x===null||s.type==="element"&&x.type==="element"&&(f=ho(f),d=ho(d),on(f)&&on(d)))?null:(Fn(s,x,D),[s,x])}function go(f,s,d,x,A,D){let z=Qr();return f=new Mi(new Qn(f,s,A),new Qn(d,x,D),0,""),f.dirty=!0,z._selection=f}function mo(){return new ha(new Set)}function Cr(f){let s=f.getEditorState()._selection,d=po(f._window);return Lt(s)||s==null?Pi(s,d,f):s.clone()}function Pi(f,s,d){var x=d._window;if(x===null)return null;var A=x.event,D=A?A.type:void 0;x=D==="selectionchange",A=!st&&(x||D==="beforeinput"||D==="compositionstart"||D==="compositionend"||D==="click"&&A&&A.detail===3||D==="drop"||D===void 0);let z;if(!Lt(f)||A){if(s===null)return null;if(A=s.anchorNode,D=s.focusNode,z=s.anchorOffset,s=s.focusOffset,x&&Lt(f)&&!lt(d,A,D))return f.clone()}else return f.clone();if(d=pr(A,z,D,s,d,f),d===null)return null;let[ie,xe]=d;return new Mi(ie,xe,Lt(f)?f.format:0,Lt(f)?f.style:"")}function hn(){return Qr()._selection}function ii(){return bn()._editorState._selection}function Ii(f,s,d,x=1){var A=f.anchor,D=f.focus,z=A.getNode(),ie=D.getNode();if(s.is(z)||s.is(ie)){if(z=s.__key,f.isCollapsed())s=A.offset,(d<=s&&0<x||d<s&&0>x)&&(d=Math.max(0,s+x),A.set(z,d,"element"),D.set(z,d,"element"),os(f));else{let Re=f.isBackward();ie=Re?D:A;var xe=ie.getNode();A=Re?A:D,D=A.getNode(),s.is(xe)&&(xe=ie.offset,(d<=xe&&0<x||d<xe&&0>x)&&ie.set(z,Math.max(0,xe+x),"element")),s.is(D)&&(s=A.offset,(d<=s&&0<x||d<s&&0>x)&&A.set(z,Math.max(0,s+x),"element"))}os(f)}}function os(f){var s=f.anchor,d=s.offset;let x=f.focus;var A=x.offset,D=s.getNode(),z=x.getNode();if(f.isCollapsed())nt(D)&&(z=D.getChildrenSize(),z=(A=d>=z)?D.getChildAtIndex(z-1):D.getChildAtIndex(d),Nt(z)&&(d=0,A&&(d=z.getTextContentSize()),s.set(z.__key,d,"text"),x.set(z.__key,d,"text")));else{if(nt(D)){let ie=D.getChildrenSize();d=(f=d>=ie)?D.getChildAtIndex(ie-1):D.getChildAtIndex(d),Nt(d)&&(D=0,f&&(D=d.getTextContentSize()),s.set(d.__key,D,"text"))}nt(z)&&(d=z.getChildrenSize(),A=(s=A>=d)?z.getChildAtIndex(d-1):z.getChildAtIndex(A),Nt(A)&&(z=0,s&&(z=A.getTextContentSize()),x.set(A.__key,z,"text")))}}function Wc(f,s){if(s=s.getEditorState()._selection,f=f._selection,Lt(f)){var d=f.anchor;let x=f.focus,A;d.type==="text"&&(A=d.getNode(),A.selectionTransform(s,f)),x.type==="text"&&(d=x.getNode(),A!==d&&d.selectionTransform(s,f))}}function ga(f,s,d,x,A){let D=null,z=0,ie=null;x!==null?(D=x.__key,Nt(x)?(z=x.getTextContentSize(),ie="text"):nt(x)&&(z=x.getChildrenSize(),ie="element")):A!==null&&(D=A.__key,Nt(A)?ie="text":nt(A)&&(ie="element")),D!==null&&ie!==null?f.set(D,z,ie):(z=s.getIndexWithinParent(),z===-1&&(z=d.getChildrenSize()),f.set(d.__key,z,"element"))}function ai(f,s,d,x,A){f.type==="text"?(f.key=d,s||(f.offset+=A)):f.offset>x.getIndexWithinParent()&&--f.offset}function Ro(f,s,d){let x=[],A=null,D=null;f=f.getChildren();for(let Ve=0;Ve<f.length;Ve++){var z=f[Ve];ls(z)||B(108);var ie=z.getChildren();z=0;for(let Ze of ie){for(Wr(Ze)||B(109);x[Ve]!==void 0&&x[Ve][z]!==void 0;)z++;ie=Ve;var xe=z,Re=Ze;let Ge={cell:Re,startColumn:xe,startRow:ie},Ie=Re.__rowSpan,it=Re.__colSpan;for(let vt=0;vt<Ie;vt++){x[ie+vt]===void 0&&(x[ie+vt]=[]);for(let $t=0;$t<it;$t++)x[ie+vt][xe+$t]=Ge}s.is(Re)&&(A=Ge),d.is(Re)&&(D=Ge),z+=Ze.__colSpan}}return A===null&&B(110),D===null&&B(111),[x,A,D]}function Zs(f){f instanceof Kc||(f instanceof ca?(f=Ls(f,Wr),Wr(f)||B(114)):(f=Ls(f.getNode(),Wr),Wr(f)||B(114)));let s=f.getParent();ls(s)||B(115);let d=s.getParent();return Vc(d)||B(116),[f,s,d]}function Li(f){f.isCollapsed()||f.removeText();var s=f.anchor,d=s.getNode();if(!Nt(d))return s.offset;let x=d.getParent();return x?(d=d.splitText(s.offset),d.length===0?0:(s=s.offset===0?0:1,d=d[0].getIndexWithinParent()+s,!x.isInline()||d===0?d:((d=x.getChildAtIndex(d))&&x.insertNewAfter(f).append(d,...d.getNextSiblings()),x.getIndexWithinParent()+s))):(f=vo(),Yn().append(f),f.select(),0)}function Js(f){let s=vo(),d=null;for(let x=0;x<f.length;x++){let A=f[x],D=$i(A);if(D||on(A)&&A.isInline()||nt(A)&&A.isInline()||Nt(A)||A.isParentRequired()){if(d===null&&(d=A.createParentElementNode(),s.append(d),D))continue;d!==null&&d.append(A)}else s.append(A),d=null}return s}let jn=null,vn=null,Nr=!1,Xs=!1,ma=0,is={characterData:!0,childList:!0,subtree:!0};function ya(){return Nr||jn!==null&&jn._readOnly}function er(){Nr&&B(13)}function Qr(){return jn===null&&B(15),jn}function bn(){return vn===null&&B(16),vn}function zc(f,s,d){var x=s.__type;let A=f._nodes.get(x);for(A===void 0&&B(30,x),f=d.get(x),f===void 0&&(f=Array.from(A.transforms),d.set(x,f)),d=f.length,x=0;x<d&&(f[x](s),s.isAttached());x++);}function Ch(f,s){s=s._dirtyLeaves,f=f._nodeMap;for(let d of s)s=f.get(d),Nt(s)&&s.isAttached()&&s.isSimpleText()&&!s.isUnmergeable()&&tt(s)}function Qs(f,s){let d=s._dirtyLeaves,x=s._dirtyElements;f=f._nodeMap;let A=Kt(),D=new Map;var z=d;let ie=z.size;for(var xe=x,Re=xe.size;0<ie||0<Re;){if(0<ie){s._dirtyLeaves=new Set;for(let Ve of z)z=f.get(Ve),Nt(z)&&z.isAttached()&&z.isSimpleText()&&!z.isUnmergeable()&&tt(z),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&zc(s,z,D),d.add(Ve);if(z=s._dirtyLeaves,ie=z.size,0<ie){ma++;continue}}s._dirtyLeaves=new Set,s._dirtyElements=new Map;for(let Ve of xe)xe=Ve[0],Re=Ve[1],(xe==="root"||Re)&&(z=f.get(xe),z!==void 0&&z!==void 0&&z.__key!==A&&z.isAttached()&&zc(s,z,D),x.set(xe,Re));z=s._dirtyLeaves,ie=z.size,xe=s._dirtyElements,Re=xe.size,ma++}s._dirtyLeaves=d,s._dirtyElements=x}function Hc(f,s){var d=f.type,x=s.get(d);if(x===void 0&&B(17,d),d=x.klass,f.type!==d.getType()&&B(18,d.name),d=d.importJSON(f),f=f.children,nt(d)&&Array.isArray(f))for(x=0;x<f.length;x++){let A=Hc(f[x],s);d.append(A)}return d}function va(f,s){let d=jn,x=Nr,A=vn;jn=f,Nr=!0,vn=null;try{return s()}finally{jn=d,Nr=x,vn=A}}function si(f,s){let d=f._pendingEditorState,x=f._rootElement,A=f._headless||x===null;if(d!==null){var D=f._editorState,z=D._selection,ie=d._selection,xe=f._dirtyType!==0,Re=jn,Ve=Nr,Ze=vn,Ge=f._updating,Ie=f._observer,it=null;if(f._pendingEditorState=null,f._editorState=d,!A&&xe&&Ie!==null){vn=f,jn=d,Nr=!1,f._updating=!0;try{let pn=f._dirtyType,Tt=f._dirtyElements,nr=f._dirtyLeaves;Ie.disconnect();var vt=pn,$t=Tt,Vt=nr;Xn=To=On="",Ga=vt===2,Jr=null,dr=f,No=f._config,Zr=f._nodes,kn=dr._listeners.mutation,In=$t,js=Vt,Xr=D._nodeMap,So=d._nodeMap,Nc=d._readOnly,Bs=new Map(f._keyToDOMMap);let zr=new Map;Ka=zr,Oi("root",null),Ka=Bs=No=So=Xr=js=In=Zr=dr=void 0,it=zr}catch(pn){if(pn instanceof Error&&f._onError(pn),Xs)throw pn;Gc(f,null,x,d),Fe(f),f._dirtyType=2,Xs=!0,si(f,D),Xs=!1;return}finally{Ie.observe(x,is),f._updating=Ge,jn=Re,Nr=Ve,vn=Ze}}d._readOnly||(d._readOnly=!0);var An=f._dirtyLeaves,Zn=f._dirtyElements,cs=f._normalizedNodes,Or=f._updateTags,Do=f._deferred;xe&&(f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements=new Map,f._normalizedNodes=new Set,f._updateTags=new Set);var nl=f._decorators,Ea=f._pendingDecorators||nl,bd=d._nodeMap,Yc;for(Yc in Ea)bd.has(Yc)||(Ea===nl&&(Ea=Xo(f)),delete Ea[Yc]);var eo=A?null:po(f._window);if(f._editable&&eo!==null&&(xe||ie===null||ie.dirty)){vn=f,jn=d;try{if(Ie!==null&&Ie.disconnect(),xe||ie===null||ie.dirty){let pn=f._blockCursorElement;pn!==null&&Cc(pn,f,x);e:{let Tt=eo.anchorNode,nr=eo.focusNode,zr=eo.anchorOffset,ui=eo.focusOffset,Ir=document.activeElement;if(!(Or.has("collaboration")&&Ir!==x||Ir!==null&&et(Ir)))if(Lt(ie)){var Ca=ie.anchor,wa=ie.focus,li=Ca.key,wh=wa.key,_d=Yt(f,li),qc=Yt(f,wh),rl=Ca.offset,xd=wa.offset,Zc=ie.format,Jc=ie.style,Xc=ie.isCollapsed(),us=_d,to=qc,Gn=!1;if(Ca.type==="text"){us=Rt(_d);let rr=Ca.getNode();Gn=rr.getFormat()!==Zc||rr.getStyle()!==Jc}else Lt(z)&&z.anchor.type==="text"&&(Gn=!0);if(wa.type==="text"&&(to=Rt(qc)),us!==null&&to!==null){if(Xc&&(z===null||Gn||Lt(z)&&(z.format!==Zc||z.style!==Jc))){var St=performance.now();rd=[Zc,Jc,rl,li,St]}if(zr===rl&&ui===xd&&Tt===us&&nr===to&&(eo.type!=="Range"||!Xc)&&(Ir!==null&&x.contains(Ir)||x.focus({preventScroll:!0}),Ca.type!=="element"))break e;try{eo.setBaseAndExtent(us,rl,to,xd)}catch{}if(!Or.has("skip-scroll-into-view")&&ie.isCollapsed()&&x!==null&&x===document.activeElement){let rr=ie instanceof Mi&&ie.anchor.type==="element"?us.childNodes[rl]||null:0<eo.rangeCount?eo.getRangeAt(0):null;if(rr!==null){let gr;if(rr instanceof Text){let Lr=document.createRange();Lr.selectNode(rr),gr=Lr.getBoundingClientRect()}else gr=rr.getBoundingClientRect();let Mo=x.ownerDocument,Po=Mo.defaultView;if(Po!==null)for(var{top:ci,bottom:Ta}=gr,ds,ol,tr=x;tr!==null;){let Lr=tr===Mo.body;if(Lr)ds=0,ol=Cn(f).innerHeight;else{let sl=tr.getBoundingClientRect();ds=sl.top,ol=sl.bottom}let Bi=0;if(ci<ds?Bi=-(ds-ci):Ta>ol&&(Bi=Ta-ol),Bi!==0)if(Lr)Po.scrollBy(0,Bi);else{let sl=tr.scrollTop;tr.scrollTop+=Bi;let eu=tr.scrollTop-sl;ci-=eu,Ta-=eu}if(Lr)break;tr=mn(tr)}}}kc=!0}}else z!==null&<(f,Tt,nr)&&eo.removeAllRanges()}}e:{let pn=f._blockCursorElement;if(Lt(ie)&&ie.isCollapsed()&&ie.anchor.type==="element"&&x.contains(document.activeElement)){let Tt=ie.anchor,nr=Tt.getNode(),zr=Tt.offset,ui=nr.getChildrenSize(),Ir=!1,rr=null;if(zr===ui){let gr=nr.getChildAtIndex(zr-1);Ec(gr)&&(Ir=!0)}else{let gr=nr.getChildAtIndex(zr);if(Ec(gr)){let Mo=gr.getPreviousSibling();(Mo===null||Ec(Mo))&&(Ir=!0,rr=f.getElementByKey(gr.__key))}}if(Ir){let gr=f.getElementByKey(nr.__key);if(pn===null){let Mo=f._config.theme,Po=document.createElement("div");Po.contentEditable="false",Po.setAttribute("data-lexical-cursor","true");let Lr=Mo.blockCursor;if(Lr!==void 0){if(typeof Lr=="string"){let Bi=Lr.split(" ");Lr=Mo.blockCursor=Bi}Lr!==void 0&&Po.classList.add(...Lr)}f._blockCursorElement=pn=Po}x.style.caretColor="transparent",rr===null?gr.appendChild(pn):gr.insertBefore(pn,rr);break e}}pn!==null&&Cc(pn,f,x)}Ie!==null&&Ie.observe(x,is)}finally{vn=Ze,jn=Re}}if(it!==null){var Qc=it;let pn=Array.from(f._listeners.mutation),Tt=pn.length;for(let nr=0;nr<Tt;nr++){let[zr,ui]=pn[nr],Ir=Qc.get(ui);Ir!==void 0&&zr(Ir,{dirtyLeaves:An,prevEditorState:D,updateTags:Or})}}Lt(ie)||ie===null||z!==null&&z.is(ie)||f.dispatchCommand(e,void 0);var il=f._pendingDecorators;il!==null&&(f._decorators=il,f._pendingDecorators=null,as("decorator",f,!0,il));var Ed=oa(s||D),ko=oa(d);if(Ed!==ko&&as("textcontent",f,!0,ko),as("update",f,!0,{dirtyElements:Zn,dirtyLeaves:An,editorState:d,normalizedNodes:cs,prevEditorState:s||D,tags:Or}),f._deferred=[],Do.length!==0){let pn=f._updating;f._updating=!0;try{for(let Tt=0;Tt<Do.length;Tt++)Do[Tt]()}finally{f._updating=pn}}var al=f._updates;if(al.length!==0){let pn=al.shift();if(pn){let[Tt,nr]=pn;gd(f,Tt,nr)}}}}function as(f,s,d,...x){let A=s._updating;s._updating=d;try{let D=Array.from(s._listeners[f]);for(f=0;f<D.length;f++)D[f].apply(null,x)}finally{s._updating=A}}function pt(f,s,d){if(f._updating===!1||vn!==f){let D=!1;return f.update(()=>{D=pt(f,s,d)}),D}let x=Ee(f);for(let D=4;0<=D;D--)for(let z=0;z<x.length;z++){var A=x[z]._commands.get(s);if(A!==void 0&&(A=A[D],A!==void 0)){A=Array.from(A);let ie=A.length;for(let xe=0;xe<ie;xe++)if(A[xe](d,f)===!0)return!0}}return!1}function pd(f,s){let d=f._updates;for(s=s||!1;d.length!==0;){var x=d.shift();if(x){let[A,D]=x,z;D!==void 0&&(x=D.onUpdate,z=D.tag,D.skipTransforms&&(s=!0),x&&f._deferred.push(x),z&&f._updateTags.add(z)),A()}}return s}function gd(f,s,d){let x=f._updateTags;var A,D=A=!1;if(d!==void 0){var z=d.onUpdate;A=d.tag,A!=null&&x.add(A),A=d.skipTransforms||!1,D=d.discrete||!1}z&&f._deferred.push(z),d=f._editorState,z=f._pendingEditorState;let ie=!1;(z===null||z._readOnly)&&(z=f._pendingEditorState=new xa(new Map((z||d)._nodeMap)),ie=!0),z._flushSync=D,D=jn;let xe=Nr,Re=vn,Ve=f._updating;jn=z,Nr=!1,f._updating=!0,vn=f;try{ie&&(f._headless?d._selection!=null&&(z._selection=d._selection.clone()):z._selection=Cr(f));let Ze=f._compositionKey;s(),A=pd(f,A),Wc(z,f),f._dirtyType!==0&&(A?Ch(z,f):Qs(z,f),pd(f),fh(d,z,f._dirtyLeaves,f._dirtyElements)),Ze!==f._compositionKey&&(z._flushSync=!0);let Ge=z._selection;if(Lt(Ge)){let Ie=z._nodeMap,it=Ge.focus.key;Ie.get(Ge.anchor.key)!==void 0&&Ie.get(it)!==void 0||B(19)}else oi(Ge)&&Ge._nodes.size===0&&(z._selection=null)}catch(Ze){Ze instanceof Error&&f._onError(Ze),f._pendingEditorState=d,f._dirtyType=2,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),si(f);return}finally{jn=D,Nr=xe,vn=Re,f._updating=Ve,ma=0}f._dirtyType!==0||_a(z,f)?z._flushSync?(z._flushSync=!1,si(f)):ie&&Qe(()=>{si(f)}):(z._flushSync=!1,ie&&(x.clear(),f._deferred=[],f._pendingEditorState=null))}function Pr(f,s,d){f._updating?f._updates.push([s,d]):gd(f,s,d)}class el extends ca{constructor(s){super(s)}decorate(){B(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function on(f){return f instanceof el}class $o extends ca{constructor(s){super(s),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let s=this.getFormat();return Pe[s]||""}getIndent(){return this.getLatest().__indent}getChildren(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d),d=d.getNextSibling();return s}getChildrenKeys(){let s=[],d=this.getFirstChild();for(;d!==null;)s.push(d.__key),d=d.getNextSibling();return s}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let s=bn()._dirtyElements;return s!==null&&s.has(this.__key)}isLastChild(){let s=this.getLatest(),d=this.getParentOrThrow().getLastChild();return d!==null&&d.is(s)}getAllTextNodes(){let s=[],d=this.getFirstChild();for(;d!==null;){if(Nt(d)&&s.push(d),nt(d)){let x=d.getAllTextNodes();s.push(...x)}d=d.getNextSibling()}return s}getFirstDescendant(){let s=this.getFirstChild();for(;s!==null;){if(nt(s)){let d=s.getFirstChild();if(d!==null){s=d;continue}}break}return s}getLastDescendant(){let s=this.getLastChild();for(;s!==null;){if(nt(s)){let d=s.getLastChild();if(d!==null){s=d;continue}}break}return s}getDescendantByIndex(s){let d=this.getChildren(),x=d.length;return s>=x?(s=d[x-1],nt(s)&&s.getLastDescendant()||s||null):(s=d[s],nt(s)&&s.getFirstDescendant()||s||null)}getFirstChild(){let s=this.getLatest().__first;return s===null?null:sn(s)}getFirstChildOrThrow(){let s=this.getFirstChild();return s===null&&B(45,this.__key),s}getLastChild(){let s=this.getLatest().__last;return s===null?null:sn(s)}getLastChildOrThrow(){let s=this.getLastChild();return s===null&&B(96,this.__key),s}getChildAtIndex(s){var d=this.getChildrenSize();let x;if(s<d/2){for(x=this.getFirstChild(),d=0;x!==null&&d<=s;){if(d===s)return x;x=x.getNextSibling(),d++}return null}for(x=this.getLastChild(),--d;x!==null&&d>=s;){if(d===s)return x;x=x.getPreviousSibling(),d--}return null}getTextContent(){let s="",d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContent(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=`
|
|
264
|
-
|
|
265
|
-
`)}return s}getTextContentSize(){let s=0,d=this.getChildren(),x=d.length;for(let A=0;A<x;A++){let D=d[A];s+=D.getTextContentSize(),nt(D)&&A!==x-1&&!D.isInline()&&(s+=2)}return s}getDirection(){return this.getLatest().__dir}hasFormat(s){return s!==""?(s=Me[s],(this.getFormat()&s)!==0):!1}select(s,d){er();let x=hn(),A=s,D=d;var z=this.getChildrenSize();if(!this.canBeEmpty()){if(s===0&&d===0){if(s=this.getFirstChild(),Nt(s)||nt(s))return s.select(0,0)}else if(!(s!==void 0&&s!==z||d!==void 0&&d!==z)&&(s=this.getLastChild(),Nt(s)||nt(s)))return s.select()}if(A===void 0&&(A=z),D===void 0&&(D=z),z=this.__key,Lt(x))x.anchor.set(z,A,"element"),x.focus.set(z,D,"element"),x.dirty=!0;else return go(z,A,z,D,"element","element");return x}selectStart(){let s=this.getFirstDescendant();return s?s.selectStart():this.select()}selectEnd(){let s=this.getLastDescendant();return s?s.selectEnd():this.select()}clear(){let s=this.getWritable();return this.getChildren().forEach(d=>d.remove()),s}append(...s){return this.splice(this.getChildrenSize(),0,s)}setDirection(s){let d=this.getWritable();return d.__dir=s,d}setFormat(s){return this.getWritable().__format=s!==""?Me[s]:0,this}setIndent(s){return this.getWritable().__indent=s,this}splice(s,d,x){let A=x.length,D=this.getChildrenSize(),z=this.getWritable(),ie=z.__key;var xe=[],Re=[];let Ve=this.getChildAtIndex(s+d),Ze=null,Ge=D-d+A;if(s!==0)if(s===D)Ze=this.getLastChild();else{var Ie=this.getChildAtIndex(s);Ie!==null&&(Ze=Ie.getPreviousSibling())}if(0<d){var it=Ze===null?this.getFirstChild():Ze.getNextSibling();for(Ie=0;Ie<d;Ie++){it===null&&B(100);var vt=it.getNextSibling(),$t=it.__key;it=it.getWritable(),yt(it),Re.push($t),it=vt}}for(Ie=Ze,vt=0;vt<A;vt++){$t=x[vt],Ie!==null&&$t.is(Ie)&&(Ze=Ie=Ie.getPreviousSibling()),it=$t.getWritable(),it.__parent===ie&&Ge--,yt(it);let Vt=$t.__key;Ie===null?(z.__first=Vt,it.__prev=null):(Ie=Ie.getWritable(),Ie.__next=Vt,it.__prev=Ie.__key),$t.__key===ie&&B(76),it.__parent=ie,xe.push(Vt),Ie=$t}if(s+d===D?Ie!==null&&(Ie.getWritable().__next=null,z.__last=Ie.__key):Ve!==null&&(s=Ve.getWritable(),Ie!==null?(d=Ie.getWritable(),s.__prev=Ie.__key,d.__next=Ve.__key):s.__prev=null),z.__size=Ge,Re.length&&(s=hn(),Lt(s))){Re=new Set(Re),xe=new Set(xe);let{anchor:Vt,focus:An}=s;ba(Vt,Re,xe)&&ga(Vt,Vt.getNode(),this,Ze,Ve),ba(An,Re,xe)&&ga(An,An.getNode(),this,Ze,Ve),Ge!==0||this.canBeEmpty()||Mr(this)||this.remove()}return z}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function nt(f){return f instanceof $o}function ba(f,s,d){for(f=f.getNode();f;){let x=f.__key;if(s.has(x)&&!d.has(x))return!0;f=f.getParent()}return!1}class Fi extends $o{static getType(){return"root"}static clone(){return new Fi}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){B(51)}getTextContent(){let s=this.__cachedText;return!ya()&&bn()._dirtyType!==0||s===null?super.getTextContent():s}remove(){B(52)}replace(){B(53)}insertBefore(){B(54)}insertAfter(){B(55)}updateDOM(){return!1}append(...s){for(let d=0;d<s.length;d++){let x=s[d];nt(x)||on(x)||B(56)}return super.append(...s)}static importJSON(s){let d=Yn();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Sr(f){return f instanceof Fi}function _a(f,s){if(s=s.getEditorState()._selection,f=f._selection,f!==null){if(f.dirty||!f.is(s))return!0}else if(s!==null)return!0;return!1}function ji(){return new xa(new Map([["root",new Fi]]))}function tl(f){let s=f.exportJSON();var d=f.constructor;s.type!==d.getType()&&B(130,d.name);let x=s.children;if(nt(f))for(Array.isArray(x)||B(59,d.name),f=f.getChildren(),d=0;d<f.length;d++){let A=tl(f[d]);x.push(A)}return s}class xa{constructor(s,d){this._nodeMap=s,this._selection=d||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(s){return va(this,s)}clone(s){return s=new xa(this._nodeMap,s===void 0?this._selection:s),s._readOnly=!0,s}toJSON(){return va(this,()=>({root:tl(Yn())}))}}class yo extends $o{static getType(){return"paragraph"}static clone(s){return new yo(s.__key)}createDOM(s){let d=document.createElement("p");return s=xt(s.theme,"paragraph"),s!==void 0&&d.classList.add(...s),d}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:ss,priority:0})}}exportDOM(s){if({element:s}=super.exportDOM(s),s&&ei(s)){this.isEmpty()&&s.append(document.createElement("br"));var d=this.getFormatType();s.style.textAlign=d,(d=this.getDirection())&&(s.dir=d),d=this.getIndent(),0<d&&(s.style.textIndent=`${20*d}px`)}return{element:s}}static importJSON(s){let d=vo();return d.setFormat(s.format),d.setIndent(s.indent),d.setDirection(s.direction),d}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(s,d){s=vo();let x=this.getDirection();return s.setDirection(x),this.insertAfter(s,d),s}collapseAtStart(){let s=this.getChildren();if(s.length===0||Nt(s[0])&&s[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ss(f){let s=vo();return f.style&&(s.setFormat(f.style.textAlign),f=parseInt(f.style.textIndent,10)/20,0<f&&s.setIndent(f)),{node:s}}function vo(){return Qo(new yo)}function Gc(f,s,d,x){let A=f._keyToDOMMap;A.clear(),f._editorState=ji(),f._pendingEditorState=x,f._compositionKey=null,f._dirtyType=0,f._cloneNotNeeded.clear(),f._dirtyLeaves=new Set,f._dirtyElements.clear(),f._normalizedNodes=new Set,f._updateTags=new Set,f._updates=[],f._blockCursorElement=null,x=f._observer,x!==null&&(x.disconnect(),f._observer=null),s!==null&&(s.textContent=""),d!==null&&(d.textContent="",A.set("root",d))}function md(f,s){let d=new Map,x=new Set,A=D=>{Object.keys(D).forEach(z=>{let ie=d.get(z);ie===void 0&&(ie=[],d.set(z,ie)),ie.push(D[z])})};return f.forEach(D=>{D=D.klass.importDOM!=null?D.klass.importDOM.bind(D.klass):null,D==null||x.has(D)||(x.add(D),D=D(),D!==null&&A(D))}),s&&A(s),d}class yd{constructor(s,d,x,A,D,z,ie){this._parentEditor=d,this._rootElement=null,this._editorState=s,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=A,this._nodes=x,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ae(),this._onError=D,this._htmlConversions=z,this._editable=ie,this._headless=d!==null&&d._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(s){let d=this._listeners.update;return d.add(s),()=>{d.delete(s)}}registerEditableListener(s){let d=this._listeners.editable;return d.add(s),()=>{d.delete(s)}}registerDecoratorListener(s){let d=this._listeners.decorator;return d.add(s),()=>{d.delete(s)}}registerTextContentListener(s){let d=this._listeners.textcontent;return d.add(s),()=>{d.delete(s)}}registerRootListener(s){let d=this._listeners.root;return s(this._rootElement,null),d.add(s),()=>{s(null,this._rootElement),d.delete(s)}}registerCommand(s,d,x){x===void 0&&B(35);let A=this._commands;A.has(s)||A.set(s,[new Set,new Set,new Set,new Set,new Set]);let D=A.get(s);D===void 0&&B(36,String(s));let z=D[x];return z.add(d),()=>{z.delete(d),D.every(ie=>ie.size===0)&&A.delete(s)}}registerMutationListener(s,d){this._nodes.get(s.getType())===void 0&&B(37,s.name);let x=this._listeners.mutation;return x.set(d,s),()=>{x.delete(d)}}registerNodeTransformToKlass(s,d){var x=s.getType();return x=this._nodes.get(x),x===void 0&&B(37,s.name),x.transforms.add(d),x}registerNodeTransform(s,d){var x=this.registerNodeTransformToKlass(s,d);let A=[x];return x=x.replaceWithKlass,x!=null&&(x=this.registerNodeTransformToKlass(x,d),A.push(x)),Tr(this,s.getType()),()=>{A.forEach(D=>D.transforms.delete(d))}}hasNode(s){return this._nodes.has(s.getType())}hasNodes(s){return s.every(this.hasNode.bind(this))}dispatchCommand(s,d){return pt(this,s,d)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(s){let d=this._rootElement;if(s!==d){let z=xt(this._config.theme,"root");var x=this._pendingEditorState||this._editorState;if(this._rootElement=s,Gc(this,d,s,x),d!==null){if(!this._config.disableEvents){qa!==0&&(qa--,qa===0&&d.ownerDocument.removeEventListener("selectionchange",cd));var A=d.__lexicalEditor;if(A!=null){if(A._parentEditor!==null){var D=Ee(A);D=D[D.length-1]._key,la.get(D)===A&&la.delete(D)}else la.delete(A._key);d.__lexicalEditor=null}for(A=ld(d),D=0;D<A.length;D++)A[D]();d.__lexicalEventHandles=[]}z!=null&&d.classList.remove(...z)}s!==null?(x=(x=s.ownerDocument)&&x.defaultView||null,A=s.style,A.userSelect="text",A.whiteSpace="pre-wrap",A.wordBreak="break-word",s.setAttribute("data-lexical-editor","true"),this._window=x,this._dirtyType=2,Fe(this),this._updateTags.add("history-merge"),si(this),this._config.disableEvents||_h(s,this),z!=null&&s.classList.add(...z)):(this._editorState=x,this._window=this._pendingEditorState=null),as("root",this,!1,s,d)}}getElementByKey(s){return this._keyToDOMMap.get(s)||null}getEditorState(){return this._editorState}setEditorState(s,d){s.isEmpty()&&B(38),De(this);let x=this._pendingEditorState,A=this._updateTags;d=d!==void 0?d.tag:null,x===null||x.isEmpty()||(d!=null&&A.add(d),si(this)),this._pendingEditorState=s,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,d!=null&&A.add(d),si(this)}parseEditorState(s,d){s=typeof s=="string"?JSON.parse(s):s;let x=ji(),A=jn,D=Nr,z=vn,ie=this._dirtyElements,xe=this._dirtyLeaves,Re=this._cloneNotNeeded,Ve=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,jn=x,Nr=!1,vn=this;try{Hc(s.root,this._nodes),d&&d(),x._readOnly=!0}catch(Ze){Ze instanceof Error&&this._onError(Ze)}finally{this._dirtyElements=ie,this._dirtyLeaves=xe,this._cloneNotNeeded=Re,this._dirtyType=Ve,jn=A,Nr=D,vn=z}return x}update(s,d){Pr(this,s,d)}focus(s,d={}){let x=this._rootElement;x!==null&&(x.setAttribute("autocapitalize","off"),Pr(this,()=>{let A=hn(),D=Yn();A!==null?A.dirty=!0:D.getChildrenSize()!==0&&(d.defaultSelection==="rootStart"?D.selectStart():D.selectEnd())},{onUpdate:()=>{x.removeAttribute("autocapitalize"),s&&s()},tag:"focus"}),this._pendingEditorState===null&&x.removeAttribute("autocapitalize"))}blur(){var s=this._rootElement;s!==null&&s.blur(),s=po(this._window),s!==null&&s.removeAllRanges()}isEditable(){return this._editable}setEditable(s){this._editable!==s&&(this._editable=s,as("editable",this,!0,s))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Kc extends $o{constructor(s,d){super(d),this.__colSpan=s,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(s){return this.getWritable().__colSpan=s,this}getRowSpan(){return this.__rowSpan}setRowSpan(s){return this.getWritable().__rowSpan=s,this}}function Wr(f){return f instanceof Kc}class Uc extends $o{}function Vc(f){return f instanceof Uc}class vd extends $o{}function ls(f){return f instanceof vd}return Ue.$INTERNAL_isPointSelection=Br,Ue.$addUpdateTag=function(f){er(),bn()._updateTags.add(f)},Ue.$applyNodeReplacement=Qo,Ue.$copyNode=aa,Ue.$createLineBreakNode=Ri,Ue.$createNodeSelection=mo,Ue.$createParagraphNode=vo,Ue.$createRangeSelection=function(){let f=new Qn("root",0,"element"),s=new Qn("root",0,"element");return new Mi(f,s,0,"")},Ue.$createTabNode=Vs,Ue.$createTextNode=Ln,Ue.$getAdjacentNode=At,Ue.$getNearestNodeFromDOMNode=wr,Ue.$getNearestRootOrShadowRoot=qn,Ue.$getNodeByKey=sn,Ue.$getPreviousSelection=ii,Ue.$getRoot=Yn,Ue.$getSelection=hn,Ue.$getTextContent=function(){let f=hn();return f===null?"":f.getTextContent()},Ue.$hasAncestor=Er,Ue.$hasUpdateTag=function(f){return bn()._updateTags.has(f)},Ue.$insertNodes=function(f){let s=hn()||ii();s===null&&(s=Yn().selectEnd()),s.insertNodes(f)},Ue.$isBlockElementNode=function(f){return nt(f)&&!f.isInline()},Ue.$isDecoratorNode=on,Ue.$isElementNode=nt,Ue.$isInlineElementOrDecoratorNode=function(f){return nt(f)&&f.isInline()||on(f)&&f.isInline()},Ue.$isLeafNode=function(f){return Nt(f)||$i(f)||on(f)},Ue.$isLineBreakNode=$i,Ue.$isNodeSelection=oi,Ue.$isParagraphNode=function(f){return f instanceof yo},Ue.$isRangeSelection=Lt,Ue.$isRootNode=Sr,Ue.$isRootOrShadowRoot=Mr,Ue.$isTabNode=Fc,Ue.$isTextNode=Nt,Ue.$nodesOfType=function(f){var s=Qr();let d=s._readOnly,x=f.getType();s=s._nodeMap;let A=[];for(let[,D]of s)D instanceof f&&D.__type===x&&(d||D.isAttached())&&A.push(D);return A},Ue.$normalizeSelection__EXPERIMENTAL=ut,Ue.$parseSerializedNode=function(f){return Hc(f,bn()._nodes)},Ue.$selectAll=function(){var f=Yn();f=f.select(0,f.getChildrenSize()),xr(ut(f))},Ue.$setCompositionKey=Dt,Ue.$setSelection=xr,Ue.$splitNode=function(f,s){let d=f.getChildAtIndex(s);d==null&&(d=f),Mr(f)&&B(102);let x=z=>{const ie=z.getParentOrThrow(),xe=Mr(ie),Re=z!==d||xe?aa(z):z;if(xe)return z.insertAfter(Re),[z,Re,Re];const[Ve,Ze,Ge]=x(ie);return z=z.getNextSiblings(),Ge.append(Re,...z),[Ve,Ze,Re]},[A,D]=x(d);return[A,D]},Ue.BLUR_COMMAND=ee,Ue.CAN_REDO_COMMAND={},Ue.CAN_UNDO_COMMAND={},Ue.CLEAR_EDITOR_COMMAND={},Ue.CLEAR_HISTORY_COMMAND={},Ue.CLICK_COMMAND=t,Ue.COMMAND_PRIORITY_CRITICAL=4,Ue.COMMAND_PRIORITY_EDITOR=0,Ue.COMMAND_PRIORITY_HIGH=3,Ue.COMMAND_PRIORITY_LOW=1,Ue.COMMAND_PRIORITY_NORMAL=2,Ue.CONTROLLED_TEXT_INSERTION_COMMAND=i,Ue.COPY_COMMAND=te,Ue.CUT_COMMAND=fe,Ue.DELETE_CHARACTER_COMMAND=n,Ue.DELETE_LINE_COMMAND=p,Ue.DELETE_WORD_COMMAND=u,Ue.DEPRECATED_$computeGridMap=Ro,Ue.DEPRECATED_$createGridSelection=function(){let f=new Qn("root",0,"element"),s=new Qn("root",0,"element");return new ki("root",f,s)},Ue.DEPRECATED_$getGridCellNodeRect=jc,Ue.DEPRECATED_$getNodeTriplet=Zs,Ue.DEPRECATED_$isGridCellNode=Wr,Ue.DEPRECATED_$isGridNode=Vc,Ue.DEPRECATED_$isGridRowNode=ls,Ue.DEPRECATED_$isGridSelection=dd,Ue.DEPRECATED_GridCellNode=Kc,Ue.DEPRECATED_GridNode=Uc,Ue.DEPRECATED_GridRowNode=vd,Ue.DRAGEND_COMMAND=pe,Ue.DRAGOVER_COMMAND=de,Ue.DRAGSTART_COMMAND=Q,Ue.DROP_COMMAND=U,Ue.DecoratorNode=el,Ue.ElementNode=$o,Ue.FOCUS_COMMAND=j,Ue.FORMAT_ELEMENT_COMMAND={},Ue.FORMAT_TEXT_COMMAND=m,Ue.INDENT_CONTENT_COMMAND={},Ue.INSERT_LINE_BREAK_COMMAND=r,Ue.INSERT_PARAGRAPH_COMMAND=o,Ue.INSERT_TAB_COMMAND={},Ue.KEY_ARROW_DOWN_COMMAND=k,Ue.KEY_ARROW_LEFT_COMMAND=T,Ue.KEY_ARROW_RIGHT_COMMAND=y,Ue.KEY_ARROW_UP_COMMAND=R,Ue.KEY_BACKSPACE_COMMAND=Y,Ue.KEY_DELETE_COMMAND=oe,Ue.KEY_DOWN_COMMAND=_,Ue.KEY_ENTER_COMMAND=P,Ue.KEY_ESCAPE_COMMAND=X,Ue.KEY_MODIFIER_COMMAND=re,Ue.KEY_SPACE_COMMAND=M,Ue.KEY_TAB_COMMAND=Z,Ue.LineBreakNode=ua,Ue.MOVE_TO_END=v,Ue.MOVE_TO_START=O,Ue.OUTDENT_CONTENT_COMMAND={},Ue.PASTE_COMMAND=a,Ue.ParagraphNode=yo,Ue.REDO_COMMAND=C,Ue.REMOVE_TEXT_COMMAND=l,Ue.RootNode=Fi,Ue.SELECTION_CHANGE_COMMAND=e,Ue.SELECT_ALL_COMMAND=V,Ue.TabNode=Ao,Ue.TextNode=ti,Ue.UNDO_COMMAND=b,Ue.createCommand=function(){return{}},Ue.createEditor=function(f){var s=f||{},d=vn,x=s.theme||{};let A=f===void 0?d:s.parentEditor||null,D=s.disableEvents||!1,z=ji(),ie=s.namespace||(A!==null?A._config.namespace:ae()),xe=s.editorState,Re=[Fi,ti,ua,Ao,yo,...s.nodes||[]],{onError:Ve,html:Ze}=s;if(s=s.editable!==void 0?s.editable:!0,f===void 0&&d!==null)f=d._nodes;else for(f=new Map,d=0;d<Re.length;d++){let Ie=Re[d],it=null;var Ge=null;typeof Ie!="function"&&(Ge=Ie,Ie=Ge.replace,it=Ge.with,Ge=Ge.withKlass||null);let vt=Ie.getType(),$t=Ie.transform(),Vt=new Set;$t!==null&&Vt.add($t),f.set(vt,{exportDOM:Ze&&Ze.export?Ze.export.get(Ie):void 0,klass:Ie,replace:it,replaceWithKlass:Ge,transforms:Vt})}return x=new yd(z,A,f,{disableEvents:D,namespace:ie,theme:x},Ve||console.error,md(f,Ze?Ze.import:void 0),s),xe!==void 0&&(x._pendingEditorState=xe,x._dirtyType=2),x},Ue.getNearestEditorFromDOMNode=wt,Ue.isHTMLAnchorElement=function(f){return ei(f)&&f.tagName==="A"},Ue.isHTMLElement=ei,Ue.isSelectionCapturedInDecoratorInput=et,Ue.isSelectionWithinEditor=lt,Ue}var Lb,Fb;function Xt(){return Fb||(Fb=1,Lb=process.env.NODE_ENV==="development"?q9():Z9()),Lb}var jb;function J9(){if(jb)return dp;jb=1;var e=cr(),t=Xt(),n=H;const r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;const i={tag:"history-merge"};function a({initialConfig:u,children:p}){const m=n.useMemo(()=>{const{theme:b,namespace:C,editor__DEPRECATED:_,nodes:y,onError:v,editorState:T,html:O}=u,R=e.createLexicalComposerContext(null,b);let k=_||null;if(k===null){const P=t.createEditor({editable:u.editable,html:O,namespace:C,nodes:y,onError:M=>v(M,P),theme:b});l(P,T),k=P}return[k,R]},[]);return o(()=>{const b=u.editable,[C]=m;C.setEditable(b!==void 0?b:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:m},p)}function l(u,p){if(p!==null){if(p===void 0)u.update(()=>{const m=t.$getRoot();if(m.isEmpty()){const b=t.$createParagraphNode();m.append(b);const C=r?document.activeElement:null;(t.$getSelection()!==null||C!==null&&C===u.getRootElement())&&b.select()}},i);else if(p!==null)switch(typeof p){case"string":{const m=u.parseEditorState(p);u.setEditorState(m,i);break}case"object":{u.setEditorState(p,i);break}case"function":{u.update(()=>{t.$getRoot().isEmpty()&&p(u)},i);break}}}}return dp.LexicalComposer=a,dp}var fp={},Bb;function X9(){if(Bb)return fp;Bb=1;var e=cr(),t=Xt(),n=H;let r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=r?n.useLayoutEffect:n.useEffect;let i={tag:"history-merge"};function a(l,u){if(u!==null){if(u===void 0)l.update(()=>{var p=t.$getRoot();if(p.isEmpty()){let m=t.$createParagraphNode();p.append(m),p=r?document.activeElement:null,(t.$getSelection()!==null||p!==null&&p===l.getRootElement())&&m.select()}},i);else if(u!==null)switch(typeof u){case"string":let p=l.parseEditorState(u);l.setEditorState(p,i);break;case"object":l.setEditorState(u,i);break;case"function":l.update(()=>{t.$getRoot().isEmpty()&&u(l)},i)}}}return fp.LexicalComposer=function({initialConfig:l,children:u}){let p=n.useMemo(()=>{const{theme:m,namespace:b,editor__DEPRECATED:C,nodes:_,onError:y,editorState:v,html:T}=l,O=e.createLexicalComposerContext(null,m);let R=C||null;if(R===null){const k=t.createEditor({editable:l.editable,html:T,namespace:b,nodes:_,onError:P=>y(P,k),theme:m});a(k,v),R=k}return[R,O]},[]);return o(()=>{let m=l.editable,[b]=p;b.setEditable(m!==void 0?m:!0)},[]),n.createElement(e.LexicalComposerContext.Provider,{value:p},u)},fp}process.env.NODE_ENV==="development"?J9():X9();var hp={},pp,Wb;function Q9(){if(Wb)return pp;Wb=1;var e=cr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(a){const[l]=e.useLexicalComposerContext(),u=t.useMemo(()=>a(l),[l,a]),p=t.useRef(u.initialValueFn()),[m,b]=t.useState(p.current);return n(()=>{const{initialValueFn:C,subscribe:_}=u,y=C();return p.current!==y&&(p.current=y,b(y)),_(v=>{p.current=v,b(v)})},[u,a]),m}function o(a){return{initialValueFn:()=>a.isEditable(),subscribe:l=>a.registerEditableListener(l)}}function i(){return r(o)}return pp=i,pp}var gp,zb;function e7(){if(zb)return gp;zb=1;var e=cr(),t=H,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function r(i){let[a]=e.useLexicalComposerContext(),l=t.useMemo(()=>i(a),[a,i]),u=t.useRef(l.initialValueFn()),[p,m]=t.useState(u.current);return n(()=>{let{initialValueFn:b,subscribe:C}=l,_=b();return u.current!==_&&(u.current=_,m(_)),C(y=>{u.current=y,m(y)})},[l,i]),p}function o(i){return{initialValueFn:()=>i.isEditable(),subscribe:a=>i.registerEditableListener(a)}}return gp=function(){return r(o)},gp}var Hb,Gb;function ON(){return Gb||(Gb=1,Hb=process.env.NODE_ENV==="development"?Q9():e7()),Hb}var Ui={},Kb;function t7(){if(Kb)return Ui;Kb=1;var e=Xt();function t(u,p){let m=u.getFirstChild(),b=0;e:for(;m!==null;){if(e.$isElementNode(m)){const y=m.getFirstChild();if(y!==null){m=y;continue}}else if(e.$isTextNode(m)){const y=m.getTextContentSize();if(b+y>p)return{node:m,offset:p-b};b+=y}const C=m.getNextSibling();if(C!==null){m=C;continue}let _=m.getParent();for(;_!==null;){const y=_.getNextSibling();if(y!==null){m=y;continue e}_=_.getParent()}break}return null}function n(u,p=!0){if(u)return!1;let m=o();return p&&(m=m.trim()),m===""}function r(u,p){return()=>n(u,p)}function o(){return e.$getRoot().getTextContent()}function i(u){if(!n(u,!1))return!1;const p=e.$getRoot().getChildren(),m=p.length;if(m>1)return!1;for(let b=0;b<m;b++){const C=p[b];if(e.$isDecoratorNode(C))return!1;if(e.$isElementNode(C)){if(!e.$isParagraphNode(C)||C.__indent!==0)return!1;const _=C.getChildren(),y=_.length;for(let v=0;v<y;v++){const T=_[b];if(!e.$isTextNode(T))return!1}}}return!0}function a(u){return()=>i(u)}function l(u,p,m,b){const C=k=>k instanceof m,_=k=>{const P=e.$createTextNode(k.getTextContent());P.setFormat(k.getFormat()),k.replace(P)},y=k=>k.getLatest().__mode,v=k=>{if(!k.isSimpleText())return;const P=k.getPreviousSibling();let M=k.getTextContent(),Y=k,X;if(e.$isTextNode(P)){const oe=P.getTextContent(),Z=oe+M,U=p(Z);if(C(P))if(U===null||y(P)!==0){_(P);return}else{const Q=U.end-oe.length;if(Q>0){const de=M.slice(0,Q),pe=oe+de;if(P.select(),P.setTextContent(pe),Q===M.length)k.remove();else{const te=M.slice(Q);k.setTextContent(te)}return}}else if(U===null||U.start<oe.length)return}for(;;){X=p(M);let oe=X===null?"":M.slice(X.end);if(M=oe,oe===""){const Q=Y.getNextSibling();if(e.$isTextNode(Q)){oe=Y.getTextContent()+Q.getTextContent();const de=p(oe);if(de===null){C(Q)?_(Q):Q.markDirty();return}else if(de.start!==0)return}}else{const Q=p(oe);if(Q!==null&&Q.start===0)return}if(X===null)return;if(X.start===0&&e.$isTextNode(P)&&P.isTextEntity())continue;let Z;X.start===0?[Z,Y]=Y.splitText(X.end):[,Z,Y]=Y.splitText(X.start,X.end);const U=b(Z);if(U.setFormat(Z.getFormat()),Z.replace(U),Y==null)return}},T=k=>{const P=k.getTextContent(),M=p(P);if(M===null||M.start!==0){_(k);return}if(P.length>M.end){k.splitText(M.end);return}const Y=k.getPreviousSibling();e.$isTextNode(Y)&&Y.isTextEntity()&&(_(Y),_(k));const X=k.getNextSibling();e.$isTextNode(X)&&X.isTextEntity()&&(_(X),C(k)&&_(k))},O=u.registerNodeTransform(e.TextNode,v),R=u.registerNodeTransform(m,T);return[O,R]}return Ui.$canShowPlaceholder=i,Ui.$canShowPlaceholderCurry=a,Ui.$findTextIntersectionFromCharacters=t,Ui.$isRootTextContentEmpty=n,Ui.$isRootTextContentEmptyCurry=r,Ui.$rootTextContent=o,Ui.registerLexicalTextEntity=l,Ui}var Vi={},Ub;function n7(){if(Ub)return Vi;Ub=1;var e=Xt();function t(o,i=!0){return o?!1:(o=n(),i&&(o=o.trim()),o==="")}function n(){return e.$getRoot().getTextContent()}function r(o){if(!t(o,!1))return!1;o=e.$getRoot().getChildren();let i=o.length;if(1<i)return!1;for(let l=0;l<i;l++){var a=o[l];if(e.$isDecoratorNode(a))return!1;if(e.$isElementNode(a)){if(!e.$isParagraphNode(a)||a.__indent!==0)return!1;a=a.getChildren();let u=a.length;for(let p=0;p<u;p++)if(!e.$isTextNode(a[l]))return!1}}return!0}return Vi.$canShowPlaceholder=r,Vi.$canShowPlaceholderCurry=function(o){return()=>r(o)},Vi.$findTextIntersectionFromCharacters=function(o,i){var a=o.getFirstChild();o=0;e:for(;a!==null;){if(e.$isElementNode(a)){var l=a.getFirstChild();if(l!==null){a=l;continue}}else if(e.$isTextNode(a)){if(l=a.getTextContentSize(),o+l>i)return{node:a,offset:i-o};o+=l}if(l=a.getNextSibling(),l!==null)a=l;else{for(a=a.getParent();a!==null;){if(l=a.getNextSibling(),l!==null){a=l;continue e}a=a.getParent()}break}}return null},Vi.$isRootTextContentEmpty=t,Vi.$isRootTextContentEmptyCurry=function(o,i){return()=>t(o,i)},Vi.$rootTextContent=n,Vi.registerLexicalTextEntity=function(o,i,a,l){let u=m=>{const b=e.$createTextNode(m.getTextContent());b.setFormat(m.getFormat()),m.replace(b)},p=o.registerNodeTransform(e.TextNode,m=>{if(m.isSimpleText()){var b=m.getPreviousSibling(),C=m.getTextContent(),_=m;if(e.$isTextNode(b)){var y=b.getTextContent(),v=i(y+C);if(b instanceof a){if(v===null||b.getLatest().__mode!==0){u(b);return}if(v=v.end-y.length,0<v){_=C.slice(0,v),_=y+_,b.select(),b.setTextContent(_),v===C.length?m.remove():(b=C.slice(v),m.setTextContent(b));return}}else if(v===null||v.start<y.length)return}for(;;){if(m=i(C),C=v=m===null?"":C.slice(m.end),v===""){if(y=_.getNextSibling(),e.$isTextNode(y)){if(v=_.getTextContent()+y.getTextContent(),v=i(v),v===null){y instanceof a?u(y):y.markDirty();break}else if(v.start!==0)break}}else if(y=i(v),y!==null&&y.start===0)break;if(m===null)break;if(m.start===0&&e.$isTextNode(b)&&b.isTextEntity())continue;let T;if(m.start===0?[T,_]=_.splitText(m.end):[,T,_]=_.splitText(m.start,m.end),m=l(T),m.setFormat(T.getFormat()),T.replace(m),_==null)break}}});return o=o.registerNodeTransform(a,m=>{var b=m.getTextContent();const C=i(b);C===null||C.start!==0?u(m):b.length>C.end?m.splitText(C.end):(b=m.getPreviousSibling(),e.$isTextNode(b)&&b.isTextEntity()&&(u(b),u(m)),b=m.getNextSibling(),e.$isTextNode(b)&&b.isTextEntity()&&(u(b),m instanceof a&&u(m)))}),[p,o]},Vi}var Vb,Yb;function AN(){return Yb||(Yb=1,Vb=process.env.NODE_ENV==="development"?t7():n7()),Vb}var Mn={},or={},qb;function r7(){if(qb)return or;qb=1;var e=Xt();const t=new Map;function n(V){let j=V;for(;j!=null;){if(j.nodeType===Node.TEXT_NODE)return j;j=j.firstChild}return null}function r(V){const j=V.parentNode;if(j==null)throw new Error("Should never happen");return[j,Array.from(j.childNodes).indexOf(V)]}function o(V,j,ee,re,B){const W=j.getKey(),J=re.getKey(),F=document.createRange();let w=V.getElementByKey(W),N=V.getElementByKey(J),I=ee,q=B;if(e.$isTextNode(j)&&(w=n(w)),e.$isTextNode(re)&&(N=n(N)),j===void 0||re===void 0||w===null||N===null)return null;w.nodeName==="BR"&&([w,I]=r(w)),N.nodeName==="BR"&&([N,q]=r(N));const ue=w.firstChild;w===N&&ue!=null&&ue.nodeName==="BR"&&I===0&&q===0&&(q=1);try{F.setStart(w,I),F.setEnd(N,q)}catch{return null}return F.collapsed&&(I!==q||W!==J)&&(F.setStart(N,q),F.setEnd(w,I)),F}function i(V,j){const ee=V.getRootElement();if(ee===null)return[];const re=ee.getBoundingClientRect(),B=getComputedStyle(ee),W=parseFloat(B.paddingLeft)+parseFloat(B.paddingRight),J=Array.from(j.getClientRects());let F=J.length;J.sort((N,I)=>{const q=N.top-I.top;return Math.abs(q)<=3?N.left-I.left:q});let w;for(let N=0;N<F;N++){const I=J[N],q=w&&w.top<=I.top&&w.top+w.height>I.top&&w.left+w.width>I.left,ue=I.width+W===re.width;if(q||ue){J.splice(N--,1),F--;continue}w=I}return J}function a(V){const j={},ee=V.split(";");for(const re of ee)if(re!==""){const[B,W]=re.split(/:([^]+)/);B&&W&&(j[B.trim()]=W.trim())}return j}function l(V){let j=t.get(V);return j===void 0&&(j=a(V),t.set(V,j)),Object.freeze(j),j}function u(V){let j="";for(const ee in V)ee&&(j+=`${ee}: ${V[ee]};`);return j}function p(V,j){return V.__first=j.__first,V.__last=j.__last,V.__size=j.__size,V.__format=j.__format,V.__indent=j.__indent,V.__dir=j.__dir,V}function m(V,j){return V.__format=j.__format,V.__style=j.__style,V.__mode=j.__mode,V.__detail=j.__detail,V}function b(V){const j=V.constructor.clone(V);return j.__parent=V.__parent,j.__next=V.__next,j.__prev=V.__prev,e.$isElementNode(V)&&e.$isElementNode(j)?p(j,V):e.$isTextNode(V)&&e.$isTextNode(j)?m(j,V):j}function C(V,j){if(j.isSelected()&&!j.isSegmented()&&!j.isToken()&&e.$INTERNAL_isPointSelection(V)){const ee=V.anchor.getNode(),re=V.focus.getNode(),B=j.is(ee),W=j.is(re);if(B||W){const J=V.isBackward(),[F,w]=V.getCharacterOffsets(),N=ee.is(re),I=j.is(J?re:ee),q=j.is(J?ee:re);let ue=0,he;if(N)ue=F>w?w:F,he=F>w?F:w;else if(I)ue=J?w:F,he=void 0;else if(q){const se=J?F:w;ue=0,he=se}return j.__text=j.__text.slice(ue,he),j}}return j}function _(V){return V.type==="text"?V.offset===V.getNode().getTextContentSize():V.offset===V.getNode().getChildrenSize()}function y(V,j,ee){let re=j.getNode(),B=ee;if(e.$isElementNode(re)){const W=re.getDescendantByIndex(j.offset);W!==null&&(re=W)}for(;B>0&&re!==null;){if(e.$isElementNode(re)){const N=re.getLastDescendant();N!==null&&(re=N)}let W=re.getPreviousSibling(),J=0;if(W===null){let N=re.getParentOrThrow(),I=N.getPreviousSibling();for(;I===null;){if(N=N.getParent(),N===null){W=null;break}I=N.getPreviousSibling()}N!==null&&(J=N.isInline()?0:2,W=I)}let F=re.getTextContent();F===""&&e.$isElementNode(re)&&!re.isInline()&&(F=`
|
|
266
|
-
|
|
267
|
-
`);const w=F.length;if(!e.$isTextNode(re)||B>=w){const N=re.getParent();re.remove(),N!=null&&N.getChildrenSize()===0&&!e.$isRootNode(N)&&N.remove(),B-=w+J,re=W}else{const N=re.getKey(),I=V.getEditorState().read(()=>{const he=e.$getNodeByKey(N);return e.$isTextNode(he)&&he.isSimpleText()?he.getTextContent():null}),q=w-B,ue=F.slice(0,q);if(I!==null&&I!==F){const he=e.$getPreviousSelection();let se=re;if(re.isSimpleText())re.setTextContent(I);else{const Ce=e.$createTextNode(I);re.replace(Ce),se=Ce}if(e.$isRangeSelection(he)&&he.isCollapsed()){const Ce=he.anchor.offset;se.select(Ce,Ce)}}else if(re.isSimpleText()){const he=j.key===N;let se=j.offset;se<B&&(se=w);const Ce=he?se-B:0,Oe=he?se:q;if(he&&Ce===0){const[Be]=re.splitText(Ce,Oe);Be.remove()}else{const[,Be]=re.splitText(Ce,Oe);Be.remove()}}else{const he=e.$createTextNode(ue);re.replace(he)}B=0}}}function v(V){const j=V.getStyle(),ee=a(j);t.set(j,ee)}function T(V,j){const ee=l("getStyle"in V?V.getStyle():V.style),re=Object.entries(j).reduce((W,[J,F])=>(F===null?delete W[J]:W[J]=F,W),{...ee}),B=u(re);V.setStyle(B),t.set(B,re)}function O(V,j){const ee=V.getNodes(),re=ee.length;if(e.DEPRECATED_$isGridSelection(V)){const ce=e.$createRangeSelection(),le=ce.anchor,ve=ce.focus;for(let Me=0;Me<re;Me++){const Pe=ee[Me];e.DEPRECATED_$isGridCellNode(Pe)&&(le.set(Pe.getKey(),0,"element"),ve.set(Pe.getKey(),Pe.getChildrenSize(),"element"),O(e.$normalizeSelection__EXPERIMENTAL(ce),j))}e.$setSelection(V);return}const B=re-1;let W=ee[0],J=ee[B];if(V.isCollapsed()&&e.$isRangeSelection(V)){T(V,j);return}const F=V.anchor,w=V.focus,N=W.getTextContent().length,I=w.offset;let q=F.offset;const ue=F.isBefore(w);let he=ue?q:I,se=ue?I:q;const Ce=ue?F.type:w.type,Oe=ue?w.type:F.type,Be=ue?w.key:F.key;if(e.$isTextNode(W)&&he===N){const ce=W.getNextSibling();e.$isTextNode(ce)&&(q=0,he=0,W=ce)}if(ee.length===1){if(e.$isTextNode(W)){if(he=Ce==="element"?0:q>I?I:q,se=Oe==="element"?N:q>I?q:I,he===se)return;if(he===0&&se===N)T(W,j),W.select(he,se);else{const ce=W.splitText(he,se),le=he===0?ce[0]:ce[1];T(le,j),le.select(0,se-he)}}}else{if(e.$isTextNode(W)&&he<W.getTextContentSize()&&(he!==0&&(W=W.splitText(he)[1],he=0,F.set(W.getKey(),he,"text")),T(W,j)),e.$isTextNode(J)){const ce=J.getTextContent().length;J.__key!==Be&&se!==0&&(se=ce),se!==ce&&([J]=J.splitText(se)),se!==0&&T(J,j)}for(let ce=1;ce<B;ce++){const le=ee[ce],ve=le.getKey();e.$isTextNode(le)&&ve!==W.getKey()&&ve!==J.getKey()&&!le.isToken()&&T(le,j)}}}function R(V,j){if(V.anchor.key==="root"){const B=j(),W=e.$getRoot(),J=W.getFirstChild();J?J.replace(B,!0):W.append(B);return}const ee=V.getNodes(),re=fe(V.anchor.getNode(),te);re&&ee.indexOf(re)===-1&&ee.push(re);for(let B=0;B<ee.length;B++){const W=ee[B];if(!te(W))continue;const J=j();J.setFormat(W.getFormatType()),J.setIndent(W.getIndent()),W.replace(J,!0)}}function k(V){return V.getNode().isAttached()}function P(V){let j=V;for(;j!==null&&!e.$isRootOrShadowRoot(j);){const ee=j.getLatest(),re=j.getParent();ee.getChildrenSize()===0&&j.remove(!0),j=re}}function M(V,j,ee=null){const re=V.getNodes(),B=re.length,W=V.anchor;if(B===0||B===1&&W.type==="element"&&W.getNode().getChildrenSize()===0){const w=W.type==="text"?W.getNode().getParentOrThrow():W.getNode(),N=w.getChildren();let I=j();I.setFormat(w.getFormatType()),I.setIndent(w.getIndent()),N.forEach(q=>I.append(q)),ee&&(I=ee.append(I)),w.replace(I);return}let J=null,F=[];for(let w=0;w<B;w++){const N=re[w];e.$isRootOrShadowRoot(N)?(Y(V,F,F.length,j,ee),F=[],J=N):J===null||J!==null&&e.$hasAncestor(N,J)?F.push(N):(Y(V,F,F.length,j,ee),F=[N])}Y(V,F,F.length,j,ee)}function Y(V,j,ee,re,B=null){if(j.length===0)return;const W=j[0],J=new Map,F=[];let w=e.$isElementNode(W)?W:W.getParentOrThrow();w.isInline()&&(w=w.getParentOrThrow());let N=!1;for(;w!==null;){const se=w.getPreviousSibling();if(se!==null){w=se,N=!0;break}if(w=w.getParentOrThrow(),e.$isRootOrShadowRoot(w))break}const I=new Set;for(let se=0;se<ee;se++){const Ce=j[se];e.$isElementNode(Ce)&&Ce.getChildrenSize()===0&&I.add(Ce.getKey())}const q=new Set;for(let se=0;se<ee;se++){const Ce=j[se];let Oe=Ce.getParent();if(Oe!==null&&Oe.isInline()&&(Oe=Oe.getParent()),Oe!==null&&e.$isLeafNode(Ce)&&!q.has(Ce.getKey())){const Be=Oe.getKey();if(J.get(Be)===void 0){const ce=re();ce.setFormat(Oe.getFormatType()),ce.setIndent(Oe.getIndent()),F.push(ce),J.set(Be,ce),Oe.getChildren().forEach(le=>{ce.append(le),q.add(le.getKey()),e.$isElementNode(le)&&le.getChildrenKeys().forEach(ve=>q.add(ve))}),P(Oe)}}else if(I.has(Ce.getKey())){const Be=re();Be.setFormat(Ce.getFormatType()),Be.setIndent(Ce.getIndent()),F.push(Be),Ce.remove(!0)}}if(B!==null)for(let se=0;se<F.length;se++){const Ce=F[se];B.append(Ce)}let ue=null;if(e.$isRootOrShadowRoot(w))if(N)if(B!==null)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce)}else{const se=w.getFirstChild();if(e.$isElementNode(se)&&(w=se),se===null)if(B)w.append(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];w.append(Oe),ue=Oe}else if(B!==null)se.insertBefore(B);else for(let Ce=0;Ce<F.length;Ce++){const Oe=F[Ce];se.insertBefore(Oe),ue=Oe}}else if(B)w.insertAfter(B);else for(let se=F.length-1;se>=0;se--){const Ce=F[se];w.insertAfter(Ce),ue=Ce}const he=e.$getPreviousSelection();e.$isRangeSelection(he)&&k(he.anchor)&&k(he.focus)?e.$setSelection(he.clone()):ue!==null?ue.selectEnd():V.dirty=!0}function X(V,j){const ee=e.$getAdjacentNode(V.focus,j);return e.$isDecoratorNode(ee)&&!ee.isIsolated()||e.$isElementNode(ee)&&!ee.isInline()&&!ee.canBeEmpty()}function oe(V,j,ee,re){V.modify(j?"extend":"move",ee,re)}function Z(V){const j=V.anchor.getNode();return(e.$isRootNode(j)?j:j.getParentOrThrow()).getDirection()==="rtl"}function U(V,j,ee){const re=Z(V);oe(V,j,ee?!re:re,"character")}function Q(V){const j=V.anchor,ee=V.focus,re=j.getNode().getTopLevelElementOrThrow().getParentOrThrow();let B=re.getFirstDescendant(),W=re.getLastDescendant(),J="element",F="element",w=0;e.$isTextNode(B)?J="text":!e.$isElementNode(B)&&B!==null&&(B=B.getParentOrThrow()),e.$isTextNode(W)?(F="text",w=W.getTextContentSize()):!e.$isElementNode(W)&&W!==null&&(W=W.getParentOrThrow()),B&&W&&(j.set(B.getKey(),0,J),ee.set(W.getKey(),w,F))}function de(V,j,ee){const re=V.getStyle(),B=l(re);return B!==null&&B[j]||ee}function pe(V,j,ee=""){let re=null;const B=V.getNodes(),W=V.anchor,J=V.focus,F=V.isBackward(),w=F?J.offset:W.offset,N=F?J.getNode():W.getNode();if(V.isCollapsed()&&V.style!==""){const I=V.style,q=l(I);if(q!==null&&j in q)return q[j]}for(let I=0;I<B.length;I++){const q=B[I];if(!(I!==0&&w===0&&q.is(N))&&e.$isTextNode(q)){const ue=de(q,j,ee);if(re===null)re=ue;else if(re!==ue){re="";break}}}return re===null?ee:re}function te(V){if(e.$isDecoratorNode(V)&&!V.isInline())return!0;if(!e.$isElementNode(V)||e.$isRootOrShadowRoot(V))return!1;const j=V.getFirstChild(),ee=j===null||e.$isLineBreakNode(j)||e.$isTextNode(j)||j.isInline();return!V.isInline()&&V.canBeEmpty()!==!1&&ee}function fe(V,j){let ee=V;for(;ee!==null&&ee.getParent()!==null&&!j(ee);)ee=ee.getParentOrThrow();return j(ee)?ee:null}return or.$addNodeStyle=v,or.$cloneWithProperties=b,or.$getSelectionStyleValueForProperty=pe,or.$isAtNodeEnd=_,or.$isParentElementRTL=Z,or.$moveCaretSelection=oe,or.$moveCharacter=U,or.$patchStyleText=O,or.$selectAll=Q,or.$setBlocksType=R,or.$shouldOverrideDefaultCharacterSelection=X,or.$sliceSelectedTextNodeContent=C,or.$wrapNodes=M,or.createDOMRange=o,or.createRectsFromDOMRange=i,or.getStyleObjectFromCSS=l,or.trimTextContentFromAnchor=y,or}var ir={},Zb;function o7(){if(Zb)return ir;Zb=1;var e=Xt();let t=new Map;function n(y){for(;y!=null;){if(y.nodeType===Node.TEXT_NODE)return y;y=y.firstChild}return null}function r(y){let v=y.parentNode;if(v==null)throw Error("Should never happen");return[v,Array.from(v.childNodes).indexOf(y)]}function o(y){let v={};y=y.split(";");for(let T of y)if(T!==""){let[O,R]=T.split(/:([^]+)/);O&&R&&(v[O.trim()]=R.trim())}return v}function i(y){let v=t.get(y);return v===void 0&&(v=o(y),t.set(y,v)),v}function a(y){let v="";for(let T in y)T&&(v+=`${T}: ${y[T]};`);return v}function l(y,v){var T=i("getStyle"in y?y.getStyle():y.style);v=Object.entries(v).reduce((O,[R,k])=>(k===null?delete O[R]:O[R]=k,O),{...T}),T=a(v),y.setStyle(T),t.set(T,v)}function u(y,v){var T=y.getNodes(),O=T.length;if(e.DEPRECATED_$isGridSelection(y)){for(var R=e.$createRangeSelection(),k=R.anchor,P=R.focus,M=0;M<O;M++){var Y=T[M];e.DEPRECATED_$isGridCellNode(Y)&&(k.set(Y.getKey(),0,"element"),P.set(Y.getKey(),Y.getChildrenSize(),"element"),u(e.$normalizeSelection__EXPERIMENTAL(R),v))}e.$setSelection(y)}else if(--O,R=T[0],k=T[O],y.isCollapsed()&&e.$isRangeSelection(y))l(y,v);else{M=y.anchor;var X=y.focus;Y=R.getTextContent().length;var oe=X.offset,Z=M.offset,U=M.isBefore(X);P=U?Z:oe,y=U?oe:Z;var Q=U?M.type:X.type,de=U?X.type:M.type;if(X=U?X.key:M.key,e.$isTextNode(R)&&P===Y&&(U=R.getNextSibling(),e.$isTextNode(U)&&(P=Z=0,R=U)),T.length===1)e.$isTextNode(R)&&(P=Q==="element"?0:Z>oe?oe:Z,y=de==="element"?Y:Z>oe?Z:oe,P!==y&&(P===0&&y===Y?(l(R,v),R.select(P,y)):(T=R.splitText(P,y),T=P===0?T[0]:T[1],l(T,v),T.select(0,y-P))));else for(e.$isTextNode(R)&&P<R.getTextContentSize()&&(P!==0&&(R=R.splitText(P)[1],P=0,M.set(R.getKey(),P,"text")),l(R,v)),e.$isTextNode(k)&&(P=k.getTextContent().length,k.__key!==X&&y!==0&&(y=P),y!==P&&([k]=k.splitText(y)),y!==0&&l(k,v)),y=1;y<O;y++)P=T[y],M=P.getKey(),e.$isTextNode(P)&&M!==R.getKey()&&M!==k.getKey()&&!P.isToken()&&l(P,v)}}function p(y){for(;y!==null&&!e.$isRootOrShadowRoot(y);){let v=y.getLatest(),T=y.getParent();v.getChildrenSize()===0&&y.remove(!0),y=T}}function m(y,v,T,O,R=null){if(v.length!==0){var k=v[0],P=new Map,M=[];k=e.$isElementNode(k)?k:k.getParentOrThrow(),k.isInline()&&(k=k.getParentOrThrow());for(var Y=!1;k!==null;){var X=k.getPreviousSibling();if(X!==null){k=X,Y=!0;break}if(k=k.getParentOrThrow(),e.$isRootOrShadowRoot(k))break}X=new Set;for(var oe=0;oe<T;oe++){var Z=v[oe];e.$isElementNode(Z)&&Z.getChildrenSize()===0&&X.add(Z.getKey())}var U=new Set;for(oe=0;oe<T;oe++){Z=v[oe];var Q=Z.getParent();if(Q!==null&&Q.isInline()&&(Q=Q.getParent()),Q!==null&&e.$isLeafNode(Z)&&!U.has(Z.getKey())){if(Z=Q.getKey(),P.get(Z)===void 0){let de=O();de.setFormat(Q.getFormatType()),de.setIndent(Q.getIndent()),M.push(de),P.set(Z,de),Q.getChildren().forEach(pe=>{de.append(pe),U.add(pe.getKey()),e.$isElementNode(pe)&&pe.getChildrenKeys().forEach(te=>U.add(te))}),p(Q)}}else X.has(Z.getKey())&&(Q=O(),Q.setFormat(Z.getFormatType()),Q.setIndent(Z.getIndent()),M.push(Q),Z.remove(!0))}if(R!==null)for(v=0;v<M.length;v++)R.append(M[v]);if(v=null,e.$isRootOrShadowRoot(k))if(Y)if(R!==null)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)k.insertAfter(M[R]);else if(Y=k.getFirstChild(),e.$isElementNode(Y)&&(k=Y),Y===null)if(R)k.append(R);else for(R=0;R<M.length;R++)Y=M[R],k.append(Y),v=Y;else if(R!==null)Y.insertBefore(R);else for(k=0;k<M.length;k++)R=M[k],Y.insertBefore(R),v=R;else if(R)k.insertAfter(R);else for(R=M.length-1;0<=R;R--)Y=M[R],k.insertAfter(Y),v=Y;M=e.$getPreviousSelection(),e.$isRangeSelection(M)&&M.anchor.getNode().isAttached()&&M.focus.getNode().isAttached()?e.$setSelection(M.clone()):v!==null?v.selectEnd():y.dirty=!0}}function b(y,v,T,O){y.modify(v?"extend":"move",T,O)}function C(y){return y=y.anchor.getNode(),(e.$isRootNode(y)?y:y.getParentOrThrow()).getDirection()==="rtl"}function _(y){if(e.$isDecoratorNode(y)&&!y.isInline())return!0;if(!e.$isElementNode(y)||e.$isRootOrShadowRoot(y))return!1;var v=y.getFirstChild();return v=v===null||e.$isLineBreakNode(v)||e.$isTextNode(v)||v.isInline(),!y.isInline()&&y.canBeEmpty()!==!1&&v}return ir.$addNodeStyle=function(y){y=y.getStyle();let v=o(y);t.set(y,v)},ir.$cloneWithProperties=function(y){let v=y.constructor.clone(y);return v.__parent=y.__parent,v.__next=y.__next,v.__prev=y.__prev,e.$isElementNode(y)&&e.$isElementNode(v)?(v.__first=y.__first,v.__last=y.__last,v.__size=y.__size,v.__format=y.__format,v.__indent=y.__indent,v.__dir=y.__dir,v):(e.$isTextNode(y)&&e.$isTextNode(v)&&(v.__format=y.__format,v.__style=y.__style,v.__mode=y.__mode,v.__detail=y.__detail),v)},ir.$getSelectionStyleValueForProperty=function(y,v,T=""){let O=null,R=y.getNodes();var k=y.anchor,P=y.focus,M=y.isBackward();let Y=M?P.offset:k.offset;if(k=M?P.getNode():k.getNode(),y.isCollapsed()&&y.style!==""&&(y=i(y.style),y!==null&&v in y))return y[v];for(y=0;y<R.length;y++){var X=R[y];if((y===0||Y!==0||!X.is(k))&&e.$isTextNode(X)){if(P=v,M=T,X=X.getStyle(),X=i(X),P=X!==null&&X[P]||M,O===null)O=P;else if(O!==P){O="";break}}}return O===null?T:O},ir.$isAtNodeEnd=function(y){return y.type==="text"?y.offset===y.getNode().getTextContentSize():y.offset===y.getNode().getChildrenSize()},ir.$isParentElementRTL=C,ir.$moveCaretSelection=b,ir.$moveCharacter=function(y,v,T){let O=C(y);b(y,v,T?!O:O,"character")},ir.$patchStyleText=u,ir.$selectAll=function(y){let v=y.anchor;y=y.focus;var T=v.getNode().getTopLevelElementOrThrow().getParentOrThrow();let O=T.getFirstDescendant();T=T.getLastDescendant();let R="element",k="element",P=0;e.$isTextNode(O)?R="text":e.$isElementNode(O)||O===null||(O=O.getParentOrThrow()),e.$isTextNode(T)?(k="text",P=T.getTextContentSize()):e.$isElementNode(T)||T===null||(T=T.getParentOrThrow()),O&&T&&(v.set(O.getKey(),0,R),y.set(T.getKey(),P,k))},ir.$setBlocksType=function(y,v){if(y.anchor.key==="root"){v=v();var T=e.$getRoot();(y=T.getFirstChild())?y.replace(v,!0):T.append(v)}else{for(T=y.getNodes(),y=y.anchor.getNode();y!==null&&y.getParent()!==null&&!_(y);)y=y.getParentOrThrow();for((y=_(y)?y:null)&&T.indexOf(y)===-1&&T.push(y),y=0;y<T.length;y++){let O=T[y];if(!_(O))continue;let R=v();R.setFormat(O.getFormatType()),R.setIndent(O.getIndent()),O.replace(R,!0)}}},ir.$shouldOverrideDefaultCharacterSelection=function(y,v){return y=e.$getAdjacentNode(y.focus,v),e.$isDecoratorNode(y)&&!y.isIsolated()||e.$isElementNode(y)&&!y.isInline()&&!y.canBeEmpty()},ir.$sliceSelectedTextNodeContent=function(y,v){if(v.isSelected()&&!v.isSegmented()&&!v.isToken()&&e.$INTERNAL_isPointSelection(y)){var T=y.anchor.getNode(),O=y.focus.getNode(),R=v.is(T),k=v.is(O);if(R||k){R=y.isBackward();let[P,M]=y.getCharacterOffsets();y=T.is(O),k=v.is(R?O:T),O=v.is(R?T:O),T=0;let Y;y?(T=P>M?M:P,Y=P>M?P:M):k?(T=R?M:P,Y=void 0):O&&(R=R?P:M,T=0,Y=R),v.__text=v.__text.slice(T,Y)}}return v},ir.$wrapNodes=function(y,v,T=null){var O=y.getNodes();let R=O.length;var k=y.anchor;if(R===0||R===1&&k.type==="element"&&k.getNode().getChildrenSize()===0){y=k.type==="text"?k.getNode().getParentOrThrow():k.getNode(),O=y.getChildren();let M=v();M.setFormat(y.getFormatType()),M.setIndent(y.getIndent()),O.forEach(Y=>M.append(Y)),T&&(M=T.append(M)),y.replace(M)}else{k=null;var P=[];for(let M=0;M<R;M++){let Y=O[M];e.$isRootOrShadowRoot(Y)?(m(y,P,P.length,v,T),P=[],k=Y):k===null||k!==null&&e.$hasAncestor(Y,k)?P.push(Y):(m(y,P,P.length,v,T),P=[Y])}m(y,P,P.length,v,T)}},ir.createDOMRange=function(y,v,T,O,R){let k=v.getKey(),P=O.getKey(),M=document.createRange(),Y=y.getElementByKey(k);if(y=y.getElementByKey(P),e.$isTextNode(v)&&(Y=n(Y)),e.$isTextNode(O)&&(y=n(y)),v===void 0||O===void 0||Y===null||y===null)return null;Y.nodeName==="BR"&&([Y,T]=r(Y)),y.nodeName==="BR"&&([y,R]=r(y)),v=Y.firstChild,Y===y&&v!=null&&v.nodeName==="BR"&&T===0&&R===0&&(R=1);try{M.setStart(Y,T),M.setEnd(y,R)}catch{return null}return!M.collapsed||T===R&&k===P||(M.setStart(y,R),M.setEnd(Y,T)),M},ir.createRectsFromDOMRange=function(y,v){var T=y.getRootElement();if(T===null)return[];y=T.getBoundingClientRect(),T=getComputedStyle(T),T=parseFloat(T.paddingLeft)+parseFloat(T.paddingRight),v=Array.from(v.getClientRects());let O=v.length;v.sort((k,P)=>{let M=k.top-P.top;return 3>=Math.abs(M)?k.left-P.left:M});let R;for(let k=0;k<O;k++){let P=v[k],M=P.width+T===y.width;R&&R.top<=P.top&&R.top+R.height>P.top&&R.left+R.width>P.left||M?(v.splice(k--,1),O--):R=P}return v},ir.getStyleObjectFromCSS=i,ir.trimTextContentFromAnchor=function(y,v,T){let O=v.getNode();if(e.$isElementNode(O)){var R=O.getDescendantByIndex(v.offset);R!==null&&(O=R)}for(;0<T&&O!==null;){e.$isElementNode(O)&&(R=O.getLastDescendant(),R!==null&&(O=R));var k=O.getPreviousSibling(),P=0;if(k===null){R=O.getParentOrThrow();for(var M=R.getPreviousSibling();M===null;){if(R=R.getParent(),R===null){k=null;break}M=R.getPreviousSibling()}R!==null&&(P=R.isInline()?0:2,k=M)}if(M=O.getTextContent(),M===""&&e.$isElementNode(O)&&!O.isInline()&&(M=`
|
|
268
|
-
|
|
269
|
-
`),R=M.length,!e.$isTextNode(O)||T>=R)M=O.getParent(),O.remove(),M==null||M.getChildrenSize()!==0||e.$isRootNode(M)||M.remove(),T-=R+P,O=k;else{let Y=O.getKey();P=y.getEditorState().read(()=>{const oe=e.$getNodeByKey(Y);return e.$isTextNode(oe)&&oe.isSimpleText()?oe.getTextContent():null}),k=R-T;let X=M.slice(0,k);P!==null&&P!==M?(T=e.$getPreviousSelection(),R=O,O.isSimpleText()?O.setTextContent(P):(R=e.$createTextNode(P),O.replace(R)),e.$isRangeSelection(T)&&T.isCollapsed()&&(T=T.anchor.offset,R.select(T,T))):O.isSimpleText()?(P=v.key===Y,M=v.offset,M<T&&(M=R),T=P?M-T:0,R=P?M:k,P&&T===0?([T]=O.splitText(T,R),T.remove()):([,T]=O.splitText(T,R),T.remove())):(T=e.$createTextNode(X),O.replace(T)),T=0}}},ir}var Jb,Xb;function za(){return Xb||(Xb=1,Jb=process.env.NODE_ENV==="development"?r7():o7()),Jb}var Qb;function i7(){if(Qb)return Mn;Qb=1;var e=za(),t=Xt();function n(...X){return()=>{X.forEach(oe=>oe())}}function r(X){return`${X}px`}const o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(X,oe,Z){let U=null,Q=null,de=null,pe=[];const te=document.createElement("div");function fe(){if(U===null)throw Error("Unexpected null rootDOMNode");if(Q===null)throw Error("Unexpected null parentDOMNode");const{left:re,top:B}=U.getBoundingClientRect(),W=Q,J=e.createRectsFromDOMRange(X,oe);te.isConnected||W.append(te);let F=!1;for(let w=0;w<J.length;w++){const N=J[w],I=pe[w]||document.createElement("div"),q=I.style;q.position!=="absolute"&&(q.position="absolute",F=!0);const ue=r(N.left-re);q.left!==ue&&(q.left=ue,F=!0);const he=r(N.top-B);q.top!==he&&(I.style.top=he,F=!0);const se=r(N.width);q.width!==se&&(I.style.width=se,F=!0);const Ce=r(N.height);q.height!==Ce&&(I.style.height=Ce,F=!0),I.parentNode!==te&&(te.append(I),F=!0),pe[w]=I}for(;pe.length>J.length;)pe.pop();F&&Z(pe)}function V(){Q=null,U=null,de!==null&&de.disconnect(),de=null,te.remove();for(const re of pe)re.remove();pe=[]}function j(){const re=X.getRootElement();if(re===null)return V();const B=re.parentElement;if(!(B instanceof HTMLElement))return V();V(),U=re,Q=B,de=new MutationObserver(W=>{const J=X.getRootElement(),F=J&&J.parentElement;if(J!==U||F!==Q)return j();for(const w of W)if(!te.contains(w.target))return fe()}),de.observe(B,o),fe()}const ee=X.registerRootListener(j);return()=>{ee(),V()}}function a(X,oe){let Z=null,U=null,Q=null,de=null,pe=()=>{};function te(fe){fe.read(()=>{const V=t.$getSelection();if(!t.$isRangeSelection(V)){Z=null,U=null,Q=null,de=null,pe(),pe=()=>{};return}const{anchor:j,focus:ee}=V,re=j.getNode(),B=re.getKey(),W=j.offset,J=ee.getNode(),F=J.getKey(),w=ee.offset,N=X.getElementByKey(B),I=X.getElementByKey(F),q=Z===null||N===null||W!==U||B!==Z.getKey()||re!==Z&&(!(Z instanceof t.TextNode)||re.updateDOM(Z,N,X._config)),ue=Q===null||I===null||w!==de||F!==Q.getKey()||J!==Q&&(!(Q instanceof t.TextNode)||J.updateDOM(Q,I,X._config));if(q||ue){const he=X.getElementByKey(j.getNode().getKey()),se=X.getElementByKey(ee.getNode().getKey());if(he!==null&&se!==null&&he.tagName==="SPAN"&&se.tagName==="SPAN"){const Ce=document.createRange();let Oe,Be,ce,le;ee.isBefore(j)?(Oe=se,Be=ee.offset,ce=he,le=j.offset):(Oe=he,Be=j.offset,ce=se,le=ee.offset);const ve=Oe.firstChild;if(ve===null)throw Error("Expected text node to be first child of span");const Me=ce.firstChild;if(Me===null)throw Error("Expected text node to be first child of span");Ce.setStart(ve,Be),Ce.setEnd(Me,le),pe(),pe=i(X,Ce,Pe=>{for(const We of Pe){const Xe=We.style;Xe.background!=="Highlight"&&(Xe.background="Highlight"),Xe.color!=="HighlightText"&&(Xe.color="HighlightText"),Xe.zIndex!=="-1"&&(Xe.zIndex="-1"),Xe.pointerEvents!=="none"&&(Xe.pointerEvents="none"),Xe.marginTop!==r(-1.5)&&(Xe.marginTop=r(-1.5)),Xe.paddingTop!==r(4)&&(Xe.paddingTop=r(4)),Xe.paddingBottom!==r(0)&&(Xe.paddingBottom=r(0))}oe!==void 0&&oe(Pe)})}}Z=re,U=W,Q=J,de=w})}return te(X.getEditorState()),n(X.registerUpdateListener(({editorState:fe})=>te(fe)),pe,()=>{pe()})}function l(X,...oe){oe.forEach(Z=>{if(typeof Z=="string"){const U=Z.split(" ").filter(Q=>Q!=="");X.classList.add(...U)}})}function u(X,...oe){oe.forEach(Z=>{typeof Z=="string"&&X.classList.remove(...Z.split(" "))})}function p(X,oe){for(const Z of oe)if(X.type.startsWith(Z))return!0;return!1}function m(X,oe){const Z=X[Symbol.iterator]();return new Promise((U,Q)=>{const de=[],pe=()=>{const{done:te,value:fe}=Z.next();if(te)return U(de);const V=new FileReader;V.addEventListener("error",Q),V.addEventListener("load",()=>{const j=V.result;typeof j=="string"&&de.push({file:fe,result:j}),pe()}),p(fe,oe)?V.readAsDataURL(fe):pe()};pe()})}function b(X,oe){const Z=[],U=(X||t.$getRoot()).getLatest(),Q=oe||(t.$isElementNode(U)?U.getLastDescendant():U);let de=U,pe=C(de);for(;de!==null&&!de.is(Q);)if(Z.push({depth:pe,node:de}),t.$isElementNode(de)&&de.getChildrenSize()>0)de=de.getFirstChild(),pe++;else{let te=null;for(;te===null&&de!==null;)te=de.getNextSibling(),te===null?(de=de.getParent(),pe--):de=te}return de!==null&&de.is(Q)&&Z.push({depth:pe,node:de}),Z}function C(X){let oe=X,Z=0;for(;(oe=oe.getParent())!==null;)Z++;return Z}function _(X,oe){let Z=X;for(;Z!=null;){if(Z instanceof oe)return Z;Z=Z.getParent()}return null}function y(X){const oe=v(X,Z=>t.$isElementNode(Z)&&!Z.isInline());if(!t.$isElementNode(oe))throw Error(`Expected node ${X.__key} to have closest block element node.`);return oe}function v(X,oe){let Z=X;for(;Z!==t.$getRoot()&&Z!=null;){if(oe(Z))return Z;Z=Z.getParent()}return null}function T(X,oe,Z,U){const Q=te=>te instanceof oe,de=te=>{const fe=te.getChildren();for(let ee=0;ee<fe.length;ee++){const re=fe[ee];if(Q(re))return null}let V=te,j=te;for(;V!==null;)if(j=V,V=V.getParent(),Q(V))return{child:j,parent:V};return null},pe=te=>{const fe=de(te);if(fe!==null){const{child:V,parent:j}=fe;if(V.is(te)){U(j,te);const ee=V.getNextSiblings(),re=ee.length;if(j.insertAfter(V),re!==0){const B=Z(j);V.insertAfter(B);for(let W=0;W<re;W++)B.append(ee[W])}!j.canBeEmpty()&&j.getChildrenSize()===0&&j.remove()}}};return X.registerNodeTransform(oe,pe)}function O(X,oe){const Z=new Map,U=X._pendingEditorState;for(const[de,pe]of oe._nodeMap){const te=e.$cloneWithProperties(pe);t.$isTextNode(te)&&(te.__text=pe.__text),Z.set(de,te)}U&&(U._nodeMap=Z),X._dirtyType=2;const Q=oe._selection;t.$setSelection(Q===null?null:Q.clone())}function R(X){const oe=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(oe)){const{focus:Z}=oe,U=Z.getNode(),Q=Z.offset;if(t.$isRootOrShadowRoot(U)){const de=U.getChildAtIndex(Q);de==null?U.append(X):de.insertBefore(X),X.selectNext()}else{let de,pe;t.$isTextNode(U)?(de=U.getParentOrThrow(),pe=U.getIndexWithinParent(),Q>0&&(pe+=1,U.splitText(Q))):(de=U,pe=Q);const[,te]=t.$splitNode(de,pe);te.insertBefore(X),te.selectStart()}}else{if(oe!=null){const U=oe.getNodes();U[U.length-1].getTopLevelElementOrThrow().insertAfter(X)}else t.$getRoot().append(X);const Z=t.$createParagraphNode();X.insertAfter(Z),Z.select()}return X.getLatest()}function k(X,oe){const Z=oe();return X.replace(Z),Z.append(X),Z}function P(X,oe){return X!==null?Object.getPrototypeOf(X).constructor.name===oe.name:!1}function M(X,oe){const Z=[];for(let U=0;U<X.length;U++){const Q=oe(X[U]);Q!==null&&Z.push(Q)}return Z}function Y(X,oe){const Z=X.getFirstChild();Z!==null?Z.insertBefore(oe):X.append(oe)}return Mn.$splitNode=t.$splitNode,Mn.isHTMLAnchorElement=t.isHTMLAnchorElement,Mn.isHTMLElement=t.isHTMLElement,Mn.$dfs=b,Mn.$filter=M,Mn.$findMatchingParent=v,Mn.$getNearestBlockElementAncestorOrThrow=y,Mn.$getNearestNodeOfType=_,Mn.$insertFirst=Y,Mn.$insertNodeToNearestRoot=R,Mn.$restoreEditorState=O,Mn.$wrapNodeInElement=k,Mn.addClassNamesToElement=l,Mn.isMimeType=p,Mn.markSelection=a,Mn.mediaFileReader=m,Mn.mergeRegister=n,Mn.objectKlassEquals=P,Mn.positionNodeOnRange=i,Mn.registerNestedElementResolver=T,Mn.removeClassNamesFromElement=u,Mn}var Pn={},e_;function a7(){if(e_)return Pn;e_=1;var e=za(),t=Xt();function n(u){let p=new URLSearchParams;p.append("code",u);for(let m=1;m<arguments.length;m++)p.append("v",arguments[m]);throw Error(`Minified Lexical error #${u}; visit https://lexical.dev/docs/error?${p} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(...u){return()=>{u.forEach(p=>p())}}let o={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(u,p,m){function b(){if(y===null)throw Error("Unexpected null rootDOMNode");if(v===null)throw Error("Unexpected null parentDOMNode");let{left:P,top:M}=y.getBoundingClientRect();var Y=v;let X=e.createRectsFromDOMRange(u,p);R.isConnected||Y.append(R),Y=!1;for(let U=0;U<X.length;U++){var oe=X[U];let Q=O[U]||document.createElement("div"),de=Q.style;de.position!=="absolute"&&(de.position="absolute",Y=!0);var Z=`${oe.left-P}px`;de.left!==Z&&(de.left=Z,Y=!0),Z=`${oe.top-M}px`,de.top!==Z&&(Q.style.top=Z,Y=!0),Z=`${oe.width}px`,de.width!==Z&&(Q.style.width=Z,Y=!0),oe=`${oe.height}px`,de.height!==oe&&(Q.style.height=oe,Y=!0),Q.parentNode!==R&&(R.append(Q),Y=!0),O[U]=Q}for(;O.length>X.length;)O.pop();Y&&m(O)}function C(){y=v=null,T!==null&&T.disconnect(),T=null,R.remove();for(let P of O)P.remove();O=[]}function _(){let P=u.getRootElement();if(P===null)return C();let M=P.parentElement;if(!(M instanceof HTMLElement))return C();C(),y=P,v=M,T=new MutationObserver(Y=>{let X=u.getRootElement(),oe=X&&X.parentElement;if(X!==y||oe!==v)return _();for(let Z of Y)if(!R.contains(Z.target))return b()}),T.observe(M,o),b()}let y=null,v=null,T=null,O=[],R=document.createElement("div"),k=u.registerRootListener(_);return()=>{k(),C()}}function a(u,p){for(let m of p)if(u.type.startsWith(m))return!0;return!1}function l(u,p){for(;u!==t.$getRoot()&&u!=null;){if(p(u))return u;u=u.getParent()}return null}return Pn.$splitNode=t.$splitNode,Pn.isHTMLAnchorElement=t.isHTMLAnchorElement,Pn.isHTMLElement=t.isHTMLElement,Pn.$dfs=function(u,p){let m=[];u=(u||t.$getRoot()).getLatest(),p=p||(t.$isElementNode(u)?u.getLastDescendant():u);for(var b=u,C=0;(b=b.getParent())!==null;)C++;for(b=C;u!==null&&!u.is(p);)if(m.push({depth:b,node:u}),t.$isElementNode(u)&&0<u.getChildrenSize())u=u.getFirstChild(),b++;else for(C=null;C===null&&u!==null;)C=u.getNextSibling(),C===null?(u=u.getParent(),b--):u=C;return u!==null&&u.is(p)&&m.push({depth:b,node:u}),m},Pn.$filter=function(u,p){let m=[];for(let b=0;b<u.length;b++){let C=p(u[b]);C!==null&&m.push(C)}return m},Pn.$findMatchingParent=l,Pn.$getNearestBlockElementAncestorOrThrow=function(u){let p=l(u,m=>t.$isElementNode(m)&&!m.isInline());return t.$isElementNode(p)||n(4,u.__key),p},Pn.$getNearestNodeOfType=function(u,p){for(;u!=null;){if(u instanceof p)return u;u=u.getParent()}return null},Pn.$insertFirst=function(u,p){let m=u.getFirstChild();m!==null?m.insertBefore(p):u.append(p)},Pn.$insertNodeToNearestRoot=function(u){var p=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(p)){var{focus:m}=p;if(p=m.getNode(),m=m.offset,t.$isRootOrShadowRoot(p))m=p.getChildAtIndex(m),m==null?p.append(u):m.insertBefore(u),u.selectNext();else{let b,C;t.$isTextNode(p)?(b=p.getParentOrThrow(),C=p.getIndexWithinParent(),0<m&&(C+=1,p.splitText(m))):(b=p,C=m),[,p]=t.$splitNode(b,C),p.insertBefore(u),p.selectStart()}}else p!=null?(p=p.getNodes(),p[p.length-1].getTopLevelElementOrThrow().insertAfter(u)):t.$getRoot().append(u),p=t.$createParagraphNode(),u.insertAfter(p),p.select();return u.getLatest()},Pn.$restoreEditorState=function(u,p){let m=new Map,b=u._pendingEditorState;for(let[C,_]of p._nodeMap){let y=e.$cloneWithProperties(_);t.$isTextNode(y)&&(y.__text=_.__text),m.set(C,y)}b&&(b._nodeMap=m),u._dirtyType=2,u=p._selection,t.$setSelection(u===null?null:u.clone())},Pn.$wrapNodeInElement=function(u,p){return p=p(),u.replace(p),p.append(u),p},Pn.addClassNamesToElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&(m=m.split(" ").filter(b=>b!==""),u.classList.add(...m))})},Pn.isMimeType=a,Pn.markSelection=function(u,p){function m(T){T.read(()=>{var O=t.$getSelection();if(t.$isRangeSelection(O)){var{anchor:R,focus:k}=O;O=R.getNode();var P=O.getKey(),M=R.offset,Y=k.getNode(),X=Y.getKey(),oe=k.offset,Z=u.getElementByKey(P),U=u.getElementByKey(X);if(P=b===null||Z===null||M!==C||P!==b.getKey()||O!==b&&(!(b instanceof t.TextNode)||O.updateDOM(b,Z,u._config)),X=_===null||U===null||oe!==y||X!==_.getKey()||Y!==_&&(!(_ instanceof t.TextNode)||Y.updateDOM(_,U,u._config)),P||X){Z=u.getElementByKey(R.getNode().getKey());var Q=u.getElementByKey(k.getNode().getKey());if(Z!==null&&Q!==null&&Z.tagName==="SPAN"&&Q.tagName==="SPAN"){if(X=document.createRange(),k.isBefore(R)?(P=Q,U=k.offset,Q=Z,Z=R.offset):(P=Z,U=R.offset,Z=k.offset),P=P.firstChild,P===null||(Q=Q.firstChild,Q===null))throw Error("Expected text node to be first child of span");X.setStart(P,U),X.setEnd(Q,Z),v(),v=i(u,X,de=>{for(let pe of de){let te=pe.style;te.background!=="Highlight"&&(te.background="Highlight"),te.color!=="HighlightText"&&(te.color="HighlightText"),te.zIndex!=="-1"&&(te.zIndex="-1"),te.pointerEvents!=="none"&&(te.pointerEvents="none"),te.marginTop!=="-1.5px"&&(te.marginTop="-1.5px"),te.paddingTop!=="4px"&&(te.paddingTop="4px"),te.paddingBottom!=="0px"&&(te.paddingBottom="0px")}p!==void 0&&p(de)})}}b=O,C=M,_=Y,y=oe}else y=_=C=b=null,v(),v=()=>{}})}let b=null,C=null,_=null,y=null,v=()=>{};return m(u.getEditorState()),r(u.registerUpdateListener(({editorState:T})=>m(T)),v,()=>{v()})},Pn.mediaFileReader=function(u,p){let m=u[Symbol.iterator]();return new Promise((b,C)=>{let _=[],y=()=>{const{done:v,value:T}=m.next();if(v)return b(_);const O=new FileReader;O.addEventListener("error",C),O.addEventListener("load",()=>{const R=O.result;typeof R=="string"&&_.push({file:T,result:R}),y()}),a(T,p)?O.readAsDataURL(T):y()};y()})},Pn.mergeRegister=r,Pn.objectKlassEquals=function(u,p){return u!==null?Object.getPrototypeOf(u).constructor.name===p.name:!1},Pn.positionNodeOnRange=i,Pn.registerNestedElementResolver=function(u,p,m,b){return u.registerNodeTransform(p,C=>{e:{for(var _=C.getChildren(),y=0;y<_.length;y++)if(_[y]instanceof p){_=null;break e}for(_=C;_!==null;)if(y=_,_=_.getParent(),_ instanceof p){_={child:y,parent:_};break e}_=null}if(_!==null){const{child:v,parent:T}=_;if(v.is(C)){if(b(T,C),C=v.getNextSiblings(),_=C.length,T.insertAfter(v),_!==0){y=m(T),v.insertAfter(y);for(let O=0;O<_;O++)y.append(C[O])}T.canBeEmpty()||T.getChildrenSize()!==0||T.remove()}}})},Pn.removeClassNamesFromElement=function(u,...p){p.forEach(m=>{typeof m=="string"&&u.classList.remove(...m.split(" "))})},Pn}var t_,n_;function yn(){return n_||(n_=1,t_=process.env.NODE_ENV==="development"?i7():a7()),t_}var mp={},r_;function s7(){if(r_)return mp;r_=1;var e=Xt();function t(n){const r=window.location.origin,o=i=>{if(i.origin!==r)return;const a=n.getRootElement();if(document.activeElement!==a)return;const l=i.data;if(typeof l=="string"){let u;try{u=JSON.parse(l)}catch{return}if(u&&u.protocol==="nuanria_messaging"&&u.type==="request"){const p=u.payload;if(p&&p.functionId==="makeChanges"){const m=p.args;if(m){const[b,C,_,y,v,T]=m;n.update(()=>{const O=e.$getSelection();if(e.$isRangeSelection(O)){const R=O.anchor;let k=R.getNode(),P=0,M=0;if(e.$isTextNode(k)&&b>=0&&C>=0&&(P=b,M=b+C,O.setTextNodeRange(k,P,k,M)),(P!==M||_!=="")&&(O.insertRawText(_),k=R.getNode()),e.$isTextNode(k)){P=y,M=y+v;const Y=k.getTextContentSize();P=P>Y?Y:P,M=M>Y?Y:M,O.setTextNodeRange(k,P,k,M)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",o,!0),()=>{window.removeEventListener("message",o,!0)}}return mp.registerDragonSupport=t,mp}var yp={},o_;function l7(){if(o_)return yp;o_=1;var e=Xt();return yp.registerDragonSupport=function(t){let n=window.location.origin,r=o=>{if(o.origin===n){var i=t.getRootElement();if(document.activeElement===i&&(i=o.data,typeof i=="string")){try{var a=JSON.parse(i)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"&&(a=a.payload)&&a.functionId==="makeChanges"&&(a=a.args)){const[l,u,p,m,b]=a;t.update(()=>{const C=e.$getSelection();if(e.$isRangeSelection(C)){var _=C.anchor;let y=_.getNode(),v=0,T=0;e.$isTextNode(y)&&0<=l&&0<=u&&(v=l,T=l+u,C.setTextNodeRange(y,v,y,T)),(v!==T||p!=="")&&(C.insertRawText(p),y=_.getNode()),e.$isTextNode(y)&&(v=m,T=m+b,_=y.getTextContentSize(),v=v>_?_:v,T=T>_?_:T,C.setTextNodeRange(y,v,y,T)),o.stopImmediatePropagation()}})}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},yp}var i_,a_;function RN(){return a_||(a_=1,i_=process.env.NODE_ENV==="development"?s7():l7()),i_}var Lo={},hi={},zd={},s_;function c7(){if(s_)return zd;s_=1;var e=za(),t=yn(),n=Xt();function r(p,m){const b=m.body?m.body.childNodes:[];let C=[];for(let _=0;_<b.length;_++){const y=b[_];if(!l.has(y.nodeName)){const v=u(y,p);v!==null&&(C=C.concat(v))}}return C}function o(p,m){if(typeof document>"u"||typeof window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const b=document.createElement("div"),C=n.$getRoot().getChildren();for(let _=0;_<C.length;_++){const y=C[_];i(p,y,b,m)}return b.innerHTML}function i(p,m,b,C=null){let _=C!=null?m.isSelected(C):!0;const y=n.$isElementNode(m)&&m.excludeFromCopy("html");let v=m;if(C!==null){let Y=e.$cloneWithProperties(m);Y=n.$isTextNode(Y)&&C!=null?e.$sliceSelectedTextNodeContent(C,Y):Y,v=Y}const T=n.$isElementNode(v)?v.getChildren():[],O=p._nodes.get(v.getType());let R;O&&O.exportDOM!==void 0?R=O.exportDOM(p,v):R=v.exportDOM(p);const{element:k,after:P}=R;if(!k)return!1;const M=document.createDocumentFragment();for(let Y=0;Y<T.length;Y++){const X=T[Y],oe=i(p,X,M,C);!_&&n.$isElementNode(m)&&oe&&m.extractWithChild(X,C,"html")&&(_=!0)}if(_&&!y){if(t.isHTMLElement(k)&&k.append(M),b.append(k),P){const Y=P.call(v,k);Y&&k.replaceWith(Y)}}else b.append(M);return _}function a(p,m){const{nodeName:b}=p,C=m._htmlConversions.get(b.toLowerCase());let _=null;if(C!==void 0)for(const y of C){const v=y(p);v!==null&&(_===null||_.priority<v.priority)&&(_=v)}return _!==null?_.conversion:null}const l=new Set(["STYLE","SCRIPT"]);function u(p,m,b=new Map,C){let _=[];if(l.has(p.nodeName))return _;let y=null;const v=a(p,m),T=v?v(p):null;let O=null;if(T!==null){O=T.after;const P=T.node;if(y=Array.isArray(P)?P[P.length-1]:P,y!==null){for(const[,M]of b)if(y=M(y,C),!y)break;y&&_.push(...Array.isArray(P)?P:[y])}T.forChild!=null&&b.set(p.nodeName,T.forChild)}const R=p.childNodes;let k=[];for(let P=0;P<R.length;P++)k.push(...u(R[P],m,new Map(b),y));return O!=null&&(k=O(k)),y==null?_=_.concat(k):n.$isElementNode(y)&&y.append(...k),_}return zd.$generateHtmlFromNodes=o,zd.$generateNodesFromDOM=r,zd}var Hd={},l_;function u7(){if(l_)return Hd;l_=1;var e=za(),t=yn(),n=Xt();function r(a,l,u,p=null){let m=p!=null?l.isSelected(p):!0,b=n.$isElementNode(l)&&l.excludeFromCopy("html");var C=l;p!==null&&(C=e.$cloneWithProperties(l),C=n.$isTextNode(C)&&p!=null?e.$sliceSelectedTextNodeContent(p,C):C);let _=n.$isElementNode(C)?C.getChildren():[];var y=a._nodes.get(C.getType());y=y&&y.exportDOM!==void 0?y.exportDOM(a,C):C.exportDOM(a);let{element:v,after:T}=y;if(!v)return!1;y=document.createDocumentFragment();for(let O=0;O<_.length;O++){let R=_[O],k=r(a,R,y,p);!m&&n.$isElementNode(l)&&k&&l.extractWithChild(R,p,"html")&&(m=!0)}return m&&!b?(t.isHTMLElement(v)&&v.append(y),u.append(v),T&&(a=T.call(C,v))&&v.replaceWith(a)):u.append(y),m}let o=new Set(["STYLE","SCRIPT"]);function i(a,l,u=new Map,p){let m=[];if(o.has(a.nodeName))return m;let b=null;var C,{nodeName:_}=a,y=l._htmlConversions.get(_.toLowerCase());if(_=null,y!==void 0)for(C of y)y=C(a),y!==null&&(_===null||_.priority<y.priority)&&(_=y);if(_=(C=_!==null?_.conversion:null)?C(a):null,C=null,_!==null){if(C=_.after,y=_.node,b=Array.isArray(y)?y[y.length-1]:y,b!==null){for(var[,v]of u)if(b=v(b,p),!b)break;b&&m.push(...Array.isArray(y)?y:[b])}_.forChild!=null&&u.set(a.nodeName,_.forChild)}for(a=a.childNodes,p=[],v=0;v<a.length;v++)p.push(...i(a[v],l,new Map(u),b));return C!=null&&(p=C(p)),b==null?m=m.concat(p):n.$isElementNode(b)&&b.append(...p),m}return Hd.$generateHtmlFromNodes=function(a,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let u=document.createElement("div"),p=n.$getRoot().getChildren();for(let m=0;m<p.length;m++)r(a,p[m],u,l);return u.innerHTML},Hd.$generateNodesFromDOM=function(a,l){l=l.body?l.body.childNodes:[];let u=[];for(let m=0;m<l.length;m++){var p=l[m];o.has(p.nodeName)||(p=i(p,a),p!==null&&(u=u.concat(p)))}return u},Hd}var c_,u_;function $N(){return u_||(u_=1,c_=process.env.NODE_ENV==="development"?c7():u7()),c_}var d_;function d7(){if(d_)return hi;d_=1;var e=$N(),t=za(),n=yn(),r=Xt();const o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",i=P=>o?(P||window).getSelection():null;function a(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?"":e.$generateHtmlFromNodes(P,M)}function l(P){const M=r.$getSelection();if(M==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(M)&&M.isCollapsed()||M.getNodes().length===0?null:JSON.stringify(y(P,M))}function u(P,M){const Y=P.getData("text/plain")||P.getData("text/uri-list");Y!=null&&M.insertRawText(Y)}function p(P,M,Y){const X=P.getData("application/x-lexical-editor");if(X)try{const U=JSON.parse(X);if(U.namespace===Y._config.namespace&&Array.isArray(U.nodes)){const Q=v(U.nodes);return m(Y,Q,M)}}catch{}const oe=P.getData("text/html");if(oe)try{const U=new DOMParser().parseFromString(oe,"text/html"),Q=e.$generateNodesFromDOM(Y,U);return m(Y,Q,M)}catch{}const Z=P.getData("text/plain")||P.getData("text/uri-list");if(Z!=null)if(r.$isRangeSelection(M)){const U=Z.split(/(\r?\n|\t)/);U[U.length-1]===""&&U.pop();for(let Q=0;Q<U.length;Q++){const de=U[Q];de===`
|
|
270
|
-
`||de===`\r
|
|
271
|
-
`?M.insertParagraph():de===" "?M.insertNodes([r.$createTabNode()]):M.insertText(de)}}else M.insertRawText(Z)}function m(P,M,Y){const X=r.DEPRECATED_$isGridSelection(Y),oe=r.$isRangeSelection(Y);if((X||oe&&n.$findMatchingParent(Y.anchor.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null&&n.$findMatchingParent(Y.focus.getNode(),Z=>r.DEPRECATED_$isGridCellNode(Z))!==null)&&M.length===1&&r.DEPRECATED_$isGridNode(M[0])){b(M,Y,!1,P);return}Y.insertNodes(M)}function b(P,M,Y,X){if(P.length!==1||!r.DEPRECATED_$isGridNode(P[0]))throw Error("$mergeGridNodesStrategy: Expected Grid insertion.");const oe=P[0],Z=oe.getChildren(),U=oe.getFirstChildOrThrow().getChildrenSize(),Q=oe.getChildrenSize(),de=n.$findMatchingParent(M.anchor.getNode(),q=>r.DEPRECATED_$isGridCellNode(q)),pe=de&&n.$findMatchingParent(de,q=>r.DEPRECATED_$isGridRowNode(q)),te=pe&&n.$findMatchingParent(pe,q=>r.DEPRECATED_$isGridNode(q));if(!r.DEPRECATED_$isGridCellNode(de)||!r.DEPRECATED_$isGridRowNode(pe)||!r.DEPRECATED_$isGridNode(te))throw Error("$mergeGridNodesStrategy: Expected selection to be inside of a Grid.");const fe=pe.getIndexWithinParent(),V=Math.min(te.getChildrenSize()-1,fe+Q-1),j=de.getIndexWithinParent(),ee=Math.min(pe.getChildrenSize()-1,j+U-1),re=Math.min(j,ee),B=Math.min(fe,V),W=Math.max(j,ee),J=Math.max(fe,V),F=te.getChildren();let w=0,N,I;for(let q=B;q<=J;q++){const ue=F[q];if(!r.DEPRECATED_$isGridRowNode(ue))throw Error("getNodes: expected to find GridRowNode");const he=Z[w];if(!r.DEPRECATED_$isGridRowNode(he))throw Error("getNodes: expected to find GridRowNode");const se=ue.getChildren(),Ce=he.getChildren();let Oe=0;for(let Be=re;Be<=W;Be++){const ce=se[Be];if(!r.DEPRECATED_$isGridCellNode(ce))throw Error("getNodes: expected to find GridCellNode");const le=Ce[Oe];if(!r.DEPRECATED_$isGridCellNode(le))throw Error("getNodes: expected to find GridCellNode");q===B&&Be===re?N=ce.getKey():q===J&&Be===W&&(I=ce.getKey());const ve=ce.getChildren();le.getChildren().forEach(Me=>{r.$isTextNode(Me)&&r.$createParagraphNode().append(Me),ce.append(Me)}),ve.forEach(Me=>Me.remove()),Oe++}w++}if(N&&I){const q=r.DEPRECATED_$createGridSelection();q.set(te.getKey(),N,I),r.$setSelection(q),X.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}}function C(P){const M=P.exportJSON(),Y=P.constructor;if(M.type!==Y.getType())throw Error(`LexicalNode: Node ${Y.name} does not implement .exportJSON().`);const X=M.children;if(r.$isElementNode(P)&&!Array.isArray(X))throw Error(`LexicalNode: Node ${Y.name} is an element but .exportJSON() does not have a children array.`);return M}function _(P,M,Y,X=[]){let oe=M!=null?Y.isSelected(M):!0;const Z=r.$isElementNode(Y)&&Y.excludeFromCopy("html");let U=Y;if(M!==null){let pe=t.$cloneWithProperties(Y);pe=r.$isTextNode(pe)&&M!=null?t.$sliceSelectedTextNodeContent(M,pe):pe,U=pe}const Q=r.$isElementNode(U)?U.getChildren():[],de=C(U);if(r.$isTextNode(U)){const pe=U.__text;pe.length>0?de.text=pe:oe=!1}for(let pe=0;pe<Q.length;pe++){const te=Q[pe],fe=_(P,M,te,de.children);!oe&&r.$isElementNode(Y)&&fe&&Y.extractWithChild(te,M,"clone")&&(oe=!0)}if(oe&&!Z)X.push(de);else if(Array.isArray(de.children))for(let pe=0;pe<de.children.length;pe++){const te=de.children[pe];X.push(te)}return oe}function y(P,M){const Y=[],X=r.$getRoot().getChildren();for(let oe=0;oe<X.length;oe++){const Z=X[oe];_(P,M,Z,Y)}return{namespace:P._config.namespace,nodes:Y}}function v(P){const M=[];for(let Y=0;Y<P.length;Y++){const X=P[Y],oe=r.$parseSerializedNode(X);r.$isTextNode(oe)&&t.$addNodeStyle(oe),M.push(oe)}return M}const T=50;let O=null;async function R(P,M){if(O!==null)return!1;if(M!==null)return new Promise((Q,de)=>{P.update(()=>{Q(k(P,M))})});const Y=P.getRootElement(),X=P._window==null?window.document:P._window.document,oe=i(P._window);if(Y===null||oe===null)return!1;const Z=X.createElement("span");Z.style.cssText="position: fixed; top: -1000px;",Z.append(X.createTextNode("#")),Y.append(Z);const U=new Range;return U.setStart(Z,0),U.setEnd(Z,1),oe.removeAllRanges(),oe.addRange(U),new Promise((Q,de)=>{const pe=P.registerCommand(r.COPY_COMMAND,te=>(n.objectKlassEquals(te,ClipboardEvent)&&(pe(),O!==null&&(window.clearTimeout(O),O=null),Q(k(P,te))),!0),r.COMMAND_PRIORITY_CRITICAL);O=window.setTimeout(()=>{pe(),O=null,Q(!1)},T),X.execCommand("copy"),Z.remove()})}function k(P,M){const Y=i(P._window);if(!Y)return!1;const X=Y.anchorNode,oe=Y.focusNode;if(X!==null&&oe!==null&&!r.isSelectionWithinEditor(P,X,oe))return!1;M.preventDefault();const Z=M.clipboardData,U=r.$getSelection();if(Z===null||U===null)return!1;const Q=a(P),de=l(P);let pe="";return U!==null&&(pe=U.getTextContent()),Q!==null&&Z.setData("text/html",Q),de!==null&&Z.setData("application/x-lexical-editor",de),Z.setData("text/plain",pe),!0}return hi.$generateJSONFromSelectedNodes=y,hi.$generateNodesFromSerializedNodes=v,hi.$getHtmlContent=a,hi.$getLexicalContent=l,hi.$insertDataTransferForPlainText=u,hi.$insertDataTransferForRichText=p,hi.$insertGeneratedNodes=m,hi.copyToClipboard=R,hi}var pi={},f_;function f7(){if(f_)return pi;f_=1;var e=$N(),t=za(),n=yn(),r=Xt();function o(v){let T=new URLSearchParams;T.append("code",v);for(let O=1;O<arguments.length;O++)T.append("v",arguments[O]);throw Error(`Minified Lexical error #${v}; visit https://lexical.dev/docs/error?${T} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?"":e.$generateHtmlFromNodes(v,T)}function l(v){let T=r.$getSelection();if(T==null)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(T)&&T.isCollapsed()||T.getNodes().length===0?null:JSON.stringify(b(v,T))}function u(v,T,O){let R=r.DEPRECATED_$isGridSelection(O),k=r.$isRangeSelection(O);(R||k&&n.$findMatchingParent(O.anchor.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null&&n.$findMatchingParent(O.focus.getNode(),P=>r.DEPRECATED_$isGridCellNode(P))!==null)&&T.length===1&&r.DEPRECATED_$isGridNode(T[0])?p(T,O,!1,v):O.insertNodes(T)}function p(v,T,O,R){v.length===1&&r.DEPRECATED_$isGridNode(v[0])||o(42);var k=v[0];v=k.getChildren(),O=k.getFirstChildOrThrow().getChildrenSize();var P=k.getChildrenSize(),M=n.$findMatchingParent(T.anchor.getNode(),de=>r.DEPRECATED_$isGridCellNode(de));T=(k=M&&n.$findMatchingParent(M,de=>r.DEPRECATED_$isGridRowNode(de)))&&n.$findMatchingParent(k,de=>r.DEPRECATED_$isGridNode(de)),r.DEPRECATED_$isGridCellNode(M)&&r.DEPRECATED_$isGridRowNode(k)&&r.DEPRECATED_$isGridNode(T)||o(43);var Y=k.getIndexWithinParent(),X=Math.min(T.getChildrenSize()-1,Y+P-1);P=M.getIndexWithinParent(),M=Math.min(k.getChildrenSize()-1,P+O-1),O=Math.min(P,M),k=Math.min(Y,X),P=Math.max(P,M),Y=Math.max(Y,X),X=T.getChildren(),M=0;let oe,Z;for(let de=k;de<=Y;de++){var U=X[de];r.DEPRECATED_$isGridRowNode(U)||o(24);var Q=v[M];r.DEPRECATED_$isGridRowNode(Q)||o(24),U=U.getChildren(),Q=Q.getChildren();let pe=0;for(let te=O;te<=P;te++){let fe=U[te];r.DEPRECATED_$isGridCellNode(fe)||o(25);let V=Q[pe];r.DEPRECATED_$isGridCellNode(V)||o(25),de===k&&te===O?oe=fe.getKey():de===Y&&te===P&&(Z=fe.getKey());let j=fe.getChildren();V.getChildren().forEach(ee=>{r.$isTextNode(ee)&&r.$createParagraphNode().append(ee),fe.append(ee)}),j.forEach(ee=>ee.remove()),pe++}M++}oe&&Z&&(v=r.DEPRECATED_$createGridSelection(),v.set(T.getKey(),oe,Z),r.$setSelection(v),R.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}function m(v,T,O,R=[]){let k=T!=null?O.isSelected(T):!0,P=r.$isElementNode(O)&&O.excludeFromCopy("html");var M=O;if(T!==null){var Y=t.$cloneWithProperties(O);M=Y=r.$isTextNode(Y)&&T!=null?t.$sliceSelectedTextNodeContent(T,Y):Y}let X=r.$isElementNode(M)?M.getChildren():[];var oe=M;Y=oe.exportJSON();var Z=oe.constructor;Y.type!==Z.getType()&&o(58,Z.name);let U=Y.children;for(r.$isElementNode(oe)&&(Array.isArray(U)||o(59,Z.name)),r.$isTextNode(M)&&(M=M.__text,0<M.length?Y.text=M:k=!1),M=0;M<X.length;M++)oe=X[M],Z=m(v,T,oe,Y.children),!k&&r.$isElementNode(O)&&Z&&O.extractWithChild(oe,T,"clone")&&(k=!0);if(k&&!P)R.push(Y);else if(Array.isArray(Y.children))for(v=0;v<Y.children.length;v++)R.push(Y.children[v]);return k}function b(v,T){let O=[],R=r.$getRoot().getChildren();for(let k=0;k<R.length;k++)m(v,T,R[k],O);return{namespace:v._config.namespace,nodes:O}}function C(v){let T=[];for(let O=0;O<v.length;O++){let R=r.$parseSerializedNode(v[O]);r.$isTextNode(R)&&t.$addNodeStyle(R),T.push(R)}return T}let _=null;function y(v,T){var O=i?(v._window||window).getSelection():null;if(!O)return!1;var R=O.anchorNode;if(O=O.focusNode,R!==null&&O!==null&&!r.isSelectionWithinEditor(v,R,O)||(T.preventDefault(),T=T.clipboardData,R=r.$getSelection(),T===null||R===null))return!1;O=a(v),v=l(v);let k="";return R!==null&&(k=R.getTextContent()),O!==null&&T.setData("text/html",O),v!==null&&T.setData("application/x-lexical-editor",v),T.setData("text/plain",k),!0}return pi.$generateJSONFromSelectedNodes=b,pi.$generateNodesFromSerializedNodes=C,pi.$getHtmlContent=a,pi.$getLexicalContent=l,pi.$insertDataTransferForPlainText=function(v,T){v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null&&T.insertRawText(v)},pi.$insertDataTransferForRichText=function(v,T,O){var R=v.getData("application/x-lexical-editor");if(R)try{let P=JSON.parse(R);if(P.namespace===O._config.namespace&&Array.isArray(P.nodes)){let M=C(P.nodes);return u(O,M,T)}}catch{}if(R=v.getData("text/html"))try{var k=new DOMParser().parseFromString(R,"text/html");let P=e.$generateNodesFromDOM(O,k);return u(O,P,T)}catch{}if(v=v.getData("text/plain")||v.getData("text/uri-list"),v!=null)if(r.$isRangeSelection(T))for(v=v.split(/(\r?\n|\t)/),v[v.length-1]===""&&v.pop(),O=0;O<v.length;O++)k=v[O],k===`
|
|
272
|
-
`||k===`\r
|
|
273
|
-
`?T.insertParagraph():k===" "?T.insertNodes([r.$createTabNode()]):T.insertText(k);else T.insertRawText(v)},pi.$insertGeneratedNodes=u,pi.copyToClipboard=async function(v,T){if(_!==null)return!1;if(T!==null)return new Promise(M=>{v.update(()=>{M(y(v,T))})});var O=v.getRootElement();let R=v._window==null?window.document:v._window.document,k=i?(v._window||window).getSelection():null;if(O===null||k===null)return!1;let P=R.createElement("span");return P.style.cssText="position: fixed; top: -1000px;",P.append(R.createTextNode("#")),O.append(P),O=new Range,O.setStart(P,0),O.setEnd(P,1),k.removeAllRanges(),k.addRange(O),new Promise(M=>{let Y=v.registerCommand(r.COPY_COMMAND,X=>(n.objectKlassEquals(X,ClipboardEvent)&&(Y(),_!==null&&(window.clearTimeout(_),_=null),M(y(v,X))),!0),r.COMMAND_PRIORITY_CRITICAL);_=window.setTimeout(()=>{Y(),_=null,M(!1)},50),R.execCommand("copy"),P.remove()})},pi}var h_,p_;function DN(){return p_||(p_=1,h_=process.env.NODE_ENV==="development"?d7():f7()),h_}var g_;function h7(){if(g_)return Lo;g_=1;var e=DN(),t=za(),n=yn(),r=Xt();function o(pe,te){if(typeof document.caretRangeFromPoint<"u"){const fe=document.caretRangeFromPoint(pe,te);return fe===null?null:{node:fe.startContainer,offset:fe.startOffset}}else if(document.caretPositionFromPoint!=="undefined"){const fe=document.caretPositionFromPoint(pe,te);return fe===null?null:{node:fe.offsetNode,offset:fe.offset}}else return null}const i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),b=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class _ extends r.ElementNode{static getType(){return"quote"}static clone(te){return new _(te.__key)}constructor(te){super(te)}createDOM(te){const fe=document.createElement("blockquote");return n.addClassNamesToElement(fe,te.theme.quote),fe}updateDOM(te,fe){return!1}static importDOM(){return{blockquote:te=>({conversion:k,priority:0})}}exportDOM(te){const{element:fe}=super.exportDOM(te);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const V=this.getFormatType();fe.style.textAlign=V;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(te){const fe=y();return fe.setFormat(te.format),fe.setIndent(te.indent),fe.setDirection(te.direction),fe}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(te,fe){const V=r.$createParagraphNode(),j=this.getDirection();return V.setDirection(j),this.insertAfter(V,fe),V}collapseAtStart(){const te=r.$createParagraphNode();return this.getChildren().forEach(fe=>te.append(fe)),this.replace(te),!0}}function y(){return r.$applyNodeReplacement(new _)}function v(pe){return pe instanceof _}class T extends r.ElementNode{static getType(){return"heading"}static clone(te){return new T(te.__tag,te.__key)}constructor(te,fe){super(fe),this.__tag=te}getTag(){return this.__tag}createDOM(te){const fe=this.__tag,V=document.createElement(fe),j=te.theme.heading;if(j!==void 0){const ee=j[fe];n.addClassNamesToElement(V,ee)}return V}updateDOM(te,fe){return!1}static importDOM(){return{h1:te=>({conversion:R,priority:0}),h2:te=>({conversion:R,priority:0}),h3:te=>({conversion:R,priority:0}),h4:te=>({conversion:R,priority:0}),h5:te=>({conversion:R,priority:0}),h6:te=>({conversion:R,priority:0}),p:te=>{const fe=te.firstChild;return fe!==null&&O(fe)?{conversion:()=>({node:null}),priority:3}:null},span:te=>O(te)?{conversion:fe=>({node:P("h1")}),priority:3}:null}}exportDOM(te){const{element:fe}=super.exportDOM(te);if(fe&&n.isHTMLElement(fe)){this.isEmpty()&&fe.append(document.createElement("br"));const V=this.getFormatType();fe.style.textAlign=V;const j=this.getDirection();j&&(fe.dir=j)}return{element:fe}}static importJSON(te){const fe=P(te.tag);return fe.setFormat(te.format),fe.setIndent(te.indent),fe.setDirection(te.direction),fe}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(te,fe=!0){const V=te?te.anchor.offset:0,j=V===this.getTextContentSize()||!te?r.$createParagraphNode():P(this.getTag()),ee=this.getDirection();if(j.setDirection(ee),this.insertAfter(j,fe),V===0&&!this.isEmpty()&&te){const re=r.$createParagraphNode();re.select(),this.replace(re,!0)}return j}collapseAtStart(){const te=this.isEmpty()?r.$createParagraphNode():P(this.getTag());return this.getChildren().forEach(fe=>te.append(fe)),this.replace(te),!0}extractWithChild(){return!0}}function O(pe){return pe.nodeName.toLowerCase()==="span"?pe.style.fontSize==="26pt":!1}function R(pe){const te=pe.nodeName.toLowerCase();let fe=null;return(te==="h1"||te==="h2"||te==="h3"||te==="h4"||te==="h5"||te==="h6")&&(fe=P(te),pe.style!==null&&fe.setFormat(pe.style.textAlign)),{node:fe}}function k(pe){const te=y();return pe.style!==null&&te.setFormat(pe.style.textAlign),{node:te}}function P(pe){return r.$applyNodeReplacement(new T(pe))}function M(pe){return pe instanceof T}function Y(pe,te){pe.preventDefault(),te.update(()=>{const fe=r.$getSelection(),V=pe instanceof InputEvent||pe instanceof KeyboardEvent?null:pe.clipboardData;V!=null&&r.$INTERNAL_isPointSelection(fe)&&e.$insertDataTransferForRichText(V,fe,te)},{tag:"paste"})}async function X(pe,te){await e.copyToClipboard(te,n.objectKlassEquals(pe,ClipboardEvent)?pe:null),te.update(()=>{const fe=r.$getSelection();r.$isRangeSelection(fe)?fe.removeText():r.$isNodeSelection(fe)&&fe.getNodes().forEach(V=>V.remove())})}function oe(pe){let te=null;if(pe instanceof DragEvent?te=pe.dataTransfer:pe instanceof ClipboardEvent&&(te=pe.clipboardData),te===null)return[!1,[],!1];const fe=te.types,V=fe.includes("Files"),j=fe.includes("text/html")||fe.includes("text/plain");return[V,Array.from(te.files),j]}function Z(pe){const te=r.$getSelection();if(!r.$isRangeSelection(te))return!1;const fe=new Set,V=te.getNodes();for(let j=0;j<V.length;j++){const ee=V[j],re=ee.getKey();if(fe.has(re))continue;const B=n.$getNearestBlockElementAncestorOrThrow(ee),W=B.getKey();B.canIndent()&&!fe.has(W)&&(fe.add(W),pe(B))}return fe.size>0}function U(pe){const te=r.$getNearestNodeFromDOMNode(pe);return r.$isDecoratorNode(te)}function Q(pe){const te=pe.focus;return te.key==="root"&&te.offset===r.$getRoot().getChildrenSize()}function de(pe){return n.mergeRegister(pe.registerCommand(r.CLICK_COMMAND,te=>{const fe=r.$getSelection();return r.$isNodeSelection(fe)?(fe.clear(),!0):!1},0),pe.registerCommand(r.DELETE_CHARACTER_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteCharacter(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_WORD_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteWord(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DELETE_LINE_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.deleteLine(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,te=>{const fe=r.$getSelection();if(typeof te=="string")r.$INTERNAL_isPointSelection(fe)&&fe.insertText(te);else{if(!r.$INTERNAL_isPointSelection(fe))return!1;const V=te.dataTransfer;if(V!=null)e.$insertDataTransferForRichText(V,fe,pe);else if(r.$isRangeSelection(fe)){const j=te.data;return j&&fe.insertText(j),!0}}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_TEXT_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.formatText(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.FORMAT_ELEMENT_COMMAND,te=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe)&&!r.$isNodeSelection(fe))return!1;const V=fe.getNodes();for(const j of V){const ee=n.$findMatchingParent(j,re=>r.$isElementNode(re)&&!re.isInline());ee!==null&&ee.setFormat(te)}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_LINE_BREAK_COMMAND,te=>{const fe=r.$getSelection();return r.$isRangeSelection(fe)?(fe.insertLineBreak(te),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(te.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.INDENT_CONTENT_COMMAND,()=>Z(te=>{const fe=te.getIndent();te.setIndent(fe+1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>Z(te=>{const fe=te.getIndent();fe>0&&te.setIndent(fe-1)}),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_UP_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!U(te.target)){const V=fe.getNodes();if(V.length>0)return V[0].selectPrevious(),!0}else if(r.$isRangeSelection(fe)){const V=r.$getAdjacentNode(fe.focus,!0);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectPrevious(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_DOWN_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const V=fe.getNodes();if(V.length>0)return V[0].selectNext(0,0),!0}else if(r.$isRangeSelection(fe)){if(Q(fe))return te.preventDefault(),!0;const V=r.$getAdjacentNode(fe.focus,!1);if(!te.shiftKey&&r.$isDecoratorNode(V)&&!V.isIsolated()&&!V.isInline())return V.selectNext(),te.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_LEFT_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)){const V=fe.getNodes();if(V.length>0)return te.preventDefault(),V[0].selectPrevious(),!0}if(!r.$isRangeSelection(fe))return!1;if(t.$shouldOverrideDefaultCharacterSelection(fe,!0)){const V=te.shiftKey;return te.preventDefault(),t.$moveCharacter(fe,V,!0),!0}return!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,te=>{const fe=r.$getSelection();if(r.$isNodeSelection(fe)&&!U(te.target)){const j=fe.getNodes();if(j.length>0)return te.preventDefault(),j[0].selectNext(0,0),!0}if(!r.$isRangeSelection(fe))return!1;const V=te.shiftKey;return t.$shouldOverrideDefaultCharacterSelection(fe,!1)?(te.preventDefault(),t.$moveCharacter(fe,V,!1),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_BACKSPACE_COMMAND,te=>{if(U(te.target))return!1;const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;te.preventDefault();const{anchor:V}=fe,j=V.getNode();return fe.isCollapsed()&&V.offset===0&&!r.$isRootNode(j)&&n.$getNearestBlockElementAncestorOrThrow(j).getIndent()>0?pe.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_DELETE_COMMAND,te=>{if(U(te.target))return!1;const fe=r.$getSelection();return r.$isRangeSelection(fe)?(te.preventDefault(),pe.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ENTER_COMMAND,te=>{const fe=r.$getSelection();if(!r.$isRangeSelection(fe))return!1;if(te!==null){if((p||u||b)&&l)return!1;if(te.preventDefault(),te.shiftKey)return pe.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return pe.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const te=r.$getSelection();return r.$isRangeSelection(te)?(pe.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DROP_COMMAND,te=>{const[,fe]=oe(te);if(fe.length>0){const j=te.clientX,ee=te.clientY,re=o(j,ee);if(re!==null){const{offset:B,node:W}=re,J=r.$getNearestNodeFromDOMNode(W);if(J!==null){const F=r.$createRangeSelection();if(r.$isTextNode(J))F.anchor.set(J.getKey(),B,"text"),F.focus.set(J.getKey(),B,"text");else{const N=J.getParentOrThrow().getKey(),I=J.getIndexWithinParent()+1;F.anchor.set(N,I,"element"),F.focus.set(N,I,"element")}const w=r.$normalizeSelection__EXPERIMENTAL(F);r.$setSelection(w)}pe.dispatchCommand(C,fe)}return te.preventDefault(),!0}const V=r.$getSelection();return!!r.$isRangeSelection(V)},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGSTART_COMMAND,te=>{const[fe]=oe(te),V=r.$getSelection();return!(fe&&!r.$isRangeSelection(V))},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.DRAGOVER_COMMAND,te=>{const[fe]=oe(te),V=r.$getSelection();if(fe&&!r.$isRangeSelection(V))return!1;const j=te.clientX,ee=te.clientY,re=o(j,ee);if(re!==null){const B=r.$getNearestNodeFromDOMNode(re.node);r.$isDecoratorNode(B)&&te.preventDefault()}return!0},r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.COPY_COMMAND,te=>(e.copyToClipboard(pe,n.objectKlassEquals(te,ClipboardEvent)?te:null),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.CUT_COMMAND,te=>(X(te,pe),!0),r.COMMAND_PRIORITY_EDITOR),pe.registerCommand(r.PASTE_COMMAND,te=>{const[,fe,V]=oe(te);if(fe.length>0&&!V)return pe.dispatchCommand(C,fe),!0;if(r.isSelectionCapturedInDecoratorInput(te.target))return!1;const j=r.$getSelection();return r.$INTERNAL_isPointSelection(j)?(Y(te,pe),!0):!1},r.COMMAND_PRIORITY_EDITOR))}return Lo.$createHeadingNode=P,Lo.$createQuoteNode=y,Lo.$isHeadingNode=M,Lo.$isQuoteNode=v,Lo.DRAG_DROP_PASTE=C,Lo.HeadingNode=T,Lo.QuoteNode=_,Lo.eventFiles=oe,Lo.registerRichText=de,Lo}var Fo={},m_;function p7(){if(m_)return Fo;m_=1;var e=DN(),t=za(),n=yn(),r=Xt();function o(Z,U){return typeof document.caretRangeFromPoint<"u"?(Z=document.caretRangeFromPoint(Z,U),Z===null?null:{node:Z.startContainer,offset:Z.startOffset}):document.caretPositionFromPoint!=="undefined"?(Z=document.caretPositionFromPoint(Z,U),Z===null?null:{node:Z.offsetNode,offset:Z.offset}):null}let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=i&&"documentMode"in document?document.documentMode:null,l=i&&"InputEvent"in window&&!a?"getTargetRanges"in new window.InputEvent("input"):!1,u=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),b=i&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!m,C=r.createCommand("DRAG_DROP_PASTE_FILE");class _ extends r.ElementNode{static getType(){return"quote"}static clone(U){return new _(U.__key)}constructor(U){super(U)}createDOM(U){let Q=document.createElement("blockquote");return n.addClassNamesToElement(Q,U.theme.quote),Q}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:R,priority:0})}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=y();return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(U,Q){U=r.$createParagraphNode();let de=this.getDirection();return U.setDirection(de),this.insertAfter(U,Q),U}collapseAtStart(){let U=r.$createParagraphNode();return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}}function y(){return r.$applyNodeReplacement(new _)}class v extends r.ElementNode{static getType(){return"heading"}static clone(U){return new v(U.__tag,U.__key)}constructor(U,Q){super(Q),this.__tag=U}getTag(){return this.__tag}createDOM(U){let Q=this.__tag,de=document.createElement(Q);return U=U.theme.heading,U!==void 0&&n.addClassNamesToElement(de,U[Q]),de}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:O,priority:0}),h2:()=>({conversion:O,priority:0}),h3:()=>({conversion:O,priority:0}),h4:()=>({conversion:O,priority:0}),h5:()=>({conversion:O,priority:0}),h6:()=>({conversion:O,priority:0}),p:U=>(U=U.firstChild,U!==null&&T(U)?{conversion:()=>({node:null}),priority:3}:null),span:U=>T(U)?{conversion:()=>({node:k("h1")}),priority:3}:null}}exportDOM(U){if({element:U}=super.exportDOM(U),U&&n.isHTMLElement(U)){this.isEmpty()&&U.append(document.createElement("br"));var Q=this.getFormatType();U.style.textAlign=Q,(Q=this.getDirection())&&(U.dir=Q)}return{element:U}}static importJSON(U){let Q=k(U.tag);return Q.setFormat(U.format),Q.setIndent(U.indent),Q.setDirection(U.direction),Q}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(U,Q=!0){let de=U?U.anchor.offset:0,pe=de!==this.getTextContentSize()&&U?k(this.getTag()):r.$createParagraphNode(),te=this.getDirection();return pe.setDirection(te),this.insertAfter(pe,Q),de===0&&!this.isEmpty()&&U&&(U=r.$createParagraphNode(),U.select(),this.replace(U,!0)),pe}collapseAtStart(){let U=this.isEmpty()?r.$createParagraphNode():k(this.getTag());return this.getChildren().forEach(Q=>U.append(Q)),this.replace(U),!0}extractWithChild(){return!0}}function T(Z){return Z.nodeName.toLowerCase()==="span"?Z.style.fontSize==="26pt":!1}function O(Z){let U=Z.nodeName.toLowerCase(),Q=null;return(U==="h1"||U==="h2"||U==="h3"||U==="h4"||U==="h5"||U==="h6")&&(Q=k(U),Z.style!==null&&Q.setFormat(Z.style.textAlign)),{node:Q}}function R(Z){let U=y();return Z.style!==null&&U.setFormat(Z.style.textAlign),{node:U}}function k(Z){return r.$applyNodeReplacement(new v(Z))}function P(Z,U){Z.preventDefault(),U.update(()=>{let Q=r.$getSelection(),de=Z instanceof InputEvent||Z instanceof KeyboardEvent?null:Z.clipboardData;de!=null&&r.$INTERNAL_isPointSelection(Q)&&e.$insertDataTransferForRichText(de,Q,U)},{tag:"paste"})}async function M(Z,U){await e.copyToClipboard(U,n.objectKlassEquals(Z,ClipboardEvent)?Z:null),U.update(()=>{let Q=r.$getSelection();r.$isRangeSelection(Q)?Q.removeText():r.$isNodeSelection(Q)&&Q.getNodes().forEach(de=>de.remove())})}function Y(Z){let U=null;if(Z instanceof DragEvent?U=Z.dataTransfer:Z instanceof ClipboardEvent&&(U=Z.clipboardData),U===null)return[!1,[],!1];var Q=U.types;return Z=Q.includes("Files"),Q=Q.includes("text/html")||Q.includes("text/plain"),[Z,Array.from(U.files),Q]}function X(Z){var U=r.$getSelection();if(!r.$isRangeSelection(U))return!1;let Q=new Set;U=U.getNodes();for(let te=0;te<U.length;te++){var de=U[te],pe=de.getKey();Q.has(pe)||(de=n.$getNearestBlockElementAncestorOrThrow(de),pe=de.getKey(),de.canIndent()&&!Q.has(pe)&&(Q.add(pe),Z(de)))}return 0<Q.size}function oe(Z){return Z=r.$getNearestNodeFromDOMNode(Z),r.$isDecoratorNode(Z)}return Fo.$createHeadingNode=k,Fo.$createQuoteNode=y,Fo.$isHeadingNode=function(Z){return Z instanceof v},Fo.$isQuoteNode=function(Z){return Z instanceof _},Fo.DRAG_DROP_PASTE=C,Fo.HeadingNode=v,Fo.QuoteNode=_,Fo.eventFiles=Y,Fo.registerRichText=function(Z){return n.mergeRegister(Z.registerCommand(r.CLICK_COMMAND,()=>{const U=r.$getSelection();return r.$isNodeSelection(U)?(U.clear(),!0):!1},0),Z.registerCommand(r.DELETE_CHARACTER_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteCharacter(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_WORD_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteWord(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DELETE_LINE_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.deleteLine(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,U=>{const Q=r.$getSelection();if(typeof U=="string")r.$INTERNAL_isPointSelection(Q)&&Q.insertText(U);else{if(!r.$INTERNAL_isPointSelection(Q))return!1;const de=U.dataTransfer;de!=null?e.$insertDataTransferForRichText(de,Q,Z):r.$isRangeSelection(Q)&&(U=U.data)&&Q.insertText(U)}return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.REMOVE_TEXT_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.removeText(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_TEXT_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.formatText(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.FORMAT_ELEMENT_COMMAND,U=>{var Q=r.$getSelection();if(!r.$isRangeSelection(Q)&&!r.$isNodeSelection(Q))return!1;Q=Q.getNodes();for(const de of Q)Q=n.$findMatchingParent(de,pe=>r.$isElementNode(pe)&&!pe.isInline()),Q!==null&&Q.setFormat(U);return!0},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_LINE_BREAK_COMMAND,U=>{const Q=r.$getSelection();return r.$isRangeSelection(Q)?(Q.insertLineBreak(U),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_PARAGRAPH_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(U.insertParagraph(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INSERT_TAB_COMMAND,()=>(r.$insertNodes([r.$createTabNode()]),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.INDENT_CONTENT_COMMAND,()=>X(U=>{const Q=U.getIndent();U.setIndent(Q+1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.OUTDENT_CONTENT_COMMAND,()=>X(U=>{const Q=U.getIndent();0<Q&&U.setIndent(Q-1)}),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_UP_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){if(U=Q.getNodes(),0<U.length)return U[0].selectPrevious(),!0}else if(r.$isRangeSelection(Q)&&(Q=r.$getAdjacentNode(Q.focus,!0),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline()))return Q.selectPrevious(),U.preventDefault(),!0;return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_DOWN_COMMAND,U=>{var Q=r.$getSelection();if(r.$isNodeSelection(Q)){if(U=Q.getNodes(),0<U.length)return U[0].selectNext(0,0),!0}else if(r.$isRangeSelection(Q)){let de=Q.focus;if(de.key==="root"&&de.offset===r.$getRoot().getChildrenSize())return U.preventDefault(),!0;if(Q=r.$getAdjacentNode(Q.focus,!1),!U.shiftKey&&r.$isDecoratorNode(Q)&&!Q.isIsolated()&&!Q.isInline())return Q.selectNext(),U.preventDefault(),!0}return!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_LEFT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectPrevious(),!0}return r.$isRangeSelection(Q)&&t.$shouldOverrideDefaultCharacterSelection(Q,!0)?(de=U.shiftKey,U.preventDefault(),t.$moveCharacter(Q,de,!0),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,U=>{const Q=r.$getSelection();if(r.$isNodeSelection(Q)&&!oe(U.target)){var de=Q.getNodes();if(0<de.length)return U.preventDefault(),de[0].selectNext(0,0),!0}return r.$isRangeSelection(Q)?(de=U.shiftKey,t.$shouldOverrideDefaultCharacterSelection(Q,!1)?(U.preventDefault(),t.$moveCharacter(Q,de,!1),!0):!1):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_BACKSPACE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;U.preventDefault(),{anchor:U}=Q;const de=U.getNode();return Q.isCollapsed()&&U.offset===0&&!r.$isRootNode(de)&&0<n.$getNearestBlockElementAncestorOrThrow(de).getIndent()?Z.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_DELETE_COMMAND,U=>{if(oe(U.target))return!1;const Q=r.$getSelection();return r.$isRangeSelection(Q)?(U.preventDefault(),Z.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1)):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ENTER_COMMAND,U=>{const Q=r.$getSelection();if(!r.$isRangeSelection(Q))return!1;if(U!==null){if((p||u||b)&&l)return!1;if(U.preventDefault(),U.shiftKey)return Z.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return Z.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.KEY_ESCAPE_COMMAND,()=>{const U=r.$getSelection();return r.$isRangeSelection(U)?(Z.blur(),!0):!1},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DROP_COMMAND,U=>{const[,Q]=Y(U);if(0<Q.length){var de=o(U.clientX,U.clientY);if(de!==null){const{offset:te,node:fe}=de;var pe=r.$getNearestNodeFromDOMNode(fe);if(pe!==null){if(de=r.$createRangeSelection(),r.$isTextNode(pe))de.anchor.set(pe.getKey(),te,"text"),de.focus.set(pe.getKey(),te,"text");else{const V=pe.getParentOrThrow().getKey();pe=pe.getIndexWithinParent()+1,de.anchor.set(V,pe,"element"),de.focus.set(V,pe,"element")}de=r.$normalizeSelection__EXPERIMENTAL(de),r.$setSelection(de)}Z.dispatchCommand(C,Q)}return U.preventDefault(),!0}return U=r.$getSelection(),!!r.$isRangeSelection(U)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGSTART_COMMAND,U=>{[U]=Y(U);const Q=r.$getSelection();return!(U&&!r.$isRangeSelection(Q))},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.DRAGOVER_COMMAND,U=>{var[Q]=Y(U);const de=r.$getSelection();return Q&&!r.$isRangeSelection(de)?!1:(Q=o(U.clientX,U.clientY),Q!==null&&(Q=r.$getNearestNodeFromDOMNode(Q.node),r.$isDecoratorNode(Q)&&U.preventDefault()),!0)},r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.SELECT_ALL_COMMAND,()=>(r.$selectAll(),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.COPY_COMMAND,U=>(e.copyToClipboard(Z,n.objectKlassEquals(U,ClipboardEvent)?U:null),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.CUT_COMMAND,U=>(M(U,Z),!0),r.COMMAND_PRIORITY_EDITOR),Z.registerCommand(r.PASTE_COMMAND,U=>{const[,Q,de]=Y(U);if(0<Q.length&&!de)return Z.dispatchCommand(C,Q),!0;if(r.isSelectionCapturedInDecoratorInput(U.target))return!1;const pe=r.$getSelection();return r.$INTERNAL_isPointSelection(pe)?(P(U,Z),!0):!1},r.COMMAND_PRIORITY_EDITOR))},Fo}var y_,v_;function oy(){return v_||(v_=1,y_=process.env.NODE_ENV==="development"?h7():p7()),y_}var b_;function g7(){if(b_)return hp;b_=1;var e=cr(),t=ON(),n=H,r=AN(),o=yn(),i=Iu,a=RN(),l=oy(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(v){return v.getEditorState().read(r.$canShowPlaceholderCurry(v.isComposing()))}function m(v){const[T,O]=n.useState(()=>p(v));return u(()=>{function R(){const k=p(v);O(k)}return R(),o.mergeRegister(v.registerUpdateListener(()=>{R()}),v.registerEditableListener(()=>{R()}))},[v]),T}function b(v,T){const[O,R]=n.useState(()=>v.getDecorators());return u(()=>v.registerDecoratorListener(k=>{i.flushSync(()=>{R(k)})}),[v]),n.useEffect(()=>{R(v.getDecorators())},[v]),n.useMemo(()=>{const k=[],P=Object.keys(O);for(let M=0;M<P.length;M++){const Y=P[M],X=n.createElement(T,{onError:Z=>v._onError(Z)},n.createElement(n.Suspense,{fallback:null},O[Y])),oe=v.getElementByKey(Y);oe!==null&&k.push(i.createPortal(X,oe,Y))}return k},[T,O,v])}function C(v){u(()=>o.mergeRegister(l.registerRichText(v),a.registerDragonSupport(v)),[v])}function _({contentEditable:v,placeholder:T,ErrorBoundary:O}){const[R]=e.useLexicalComposerContext(),k=b(R,O);return C(R),n.createElement(n.Fragment,null,v,n.createElement(y,{content:T}),k)}function y({content:v}){const[T]=e.useLexicalComposerContext(),O=m(T),R=t();return O?typeof v=="function"?v(R):v:null}return hp.RichTextPlugin=_,hp}var vp={},__;function m7(){if(__)return vp;__=1;var e=cr(),t=ON(),n=H,r=AN(),o=yn(),i=Iu,a=RN(),l=oy(),u=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function p(y){return y.getEditorState().read(r.$canShowPlaceholderCurry(y.isComposing()))}function m(y){let[v,T]=n.useState(()=>p(y));return u(()=>{function O(){let R=p(y);T(R)}return O(),o.mergeRegister(y.registerUpdateListener(()=>{O()}),y.registerEditableListener(()=>{O()}))},[y]),v}function b(y,v){let[T,O]=n.useState(()=>y.getDecorators());return u(()=>y.registerDecoratorListener(R=>{i.flushSync(()=>{O(R)})}),[y]),n.useEffect(()=>{O(y.getDecorators())},[y]),n.useMemo(()=>{let R=[],k=Object.keys(T);for(let P=0;P<k.length;P++){let M=k[P],Y=n.createElement(v,{onError:oe=>y._onError(oe)},n.createElement(n.Suspense,{fallback:null},T[M])),X=y.getElementByKey(M);X!==null&&R.push(i.createPortal(Y,X,M))}return R},[v,T,y])}function C(y){u(()=>o.mergeRegister(l.registerRichText(y),a.registerDragonSupport(y)),[y])}function _({content:y}){var[v]=e.useLexicalComposerContext();v=m(v);let T=t();return v?typeof y=="function"?y(T):y:null}return vp.RichTextPlugin=function({contentEditable:y,placeholder:v,ErrorBoundary:T}){let[O]=e.useLexicalComposerContext();return T=b(O,T),C(O),n.createElement(n.Fragment,null,y,n.createElement(_,{content:v}),T)},vp}process.env.NODE_ENV==="development"?g7():m7();var bp={},x_;function y7(){if(x_)return bp;x_=1;var e=cr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(i){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function o({ariaActiveDescendant:i,ariaAutoComplete:a,ariaControls:l,ariaDescribedBy:u,ariaExpanded:p,ariaLabel:m,ariaLabelledBy:b,ariaMultiline:C,ariaOwns:_,ariaRequired:y,autoCapitalize:v,className:T,id:O,role:R="textbox",spellCheck:k=!0,style:P,tabIndex:M,"data-testid":Y,...X}){const[oe]=e.useLexicalComposerContext(),[Z,U]=t.useState(!1),Q=t.useCallback(de=>{oe.setRootElement(de)},[oe]);return r(()=>(U(oe.isEditable()),oe.registerEditableListener(de=>{U(de)})),[oe]),t.createElement("div",n({},X,{"aria-activedescendant":Z?i:void 0,"aria-autocomplete":Z?a:"none","aria-controls":Z?l:void 0,"aria-describedby":u,"aria-expanded":Z&&R==="combobox"?!!p:void 0,"aria-label":m,"aria-labelledby":b,"aria-multiline":C,"aria-owns":Z?_:void 0,"aria-readonly":Z?void 0:!0,"aria-required":y,autoCapitalize:v,className:T,contentEditable:Z,"data-testid":Y,id:O,ref:Q,role:R,spellCheck:k,style:P,tabIndex:M}))}return bp.ContentEditable=o,bp}var _p={},E_;function v7(){if(E_)return _p;E_=1;var e=cr(),t=H;function n(){return n=Object.assign?Object.assign.bind():function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i],l;for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var r=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return _p.ContentEditable=function({ariaActiveDescendant:o,ariaAutoComplete:i,ariaControls:a,ariaDescribedBy:l,ariaExpanded:u,ariaLabel:p,ariaLabelledBy:m,ariaMultiline:b,ariaOwns:C,ariaRequired:_,autoCapitalize:y,className:v,id:T,role:O="textbox",spellCheck:R=!0,style:k,tabIndex:P,"data-testid":M,...Y}){let[X]=e.useLexicalComposerContext(),[oe,Z]=t.useState(!1),U=t.useCallback(Q=>{X.setRootElement(Q)},[X]);return r(()=>(Z(X.isEditable()),X.registerEditableListener(Q=>{Z(Q)})),[X]),t.createElement("div",n({},Y,{"aria-activedescendant":oe?o:void 0,"aria-autocomplete":oe?i:"none","aria-controls":oe?a:void 0,"aria-describedby":l,"aria-expanded":oe&&O==="combobox"?!!u:void 0,"aria-label":p,"aria-labelledby":m,"aria-multiline":b,"aria-owns":oe?C:void 0,"aria-readonly":oe?void 0:!0,"aria-required":_,autoCapitalize:y,className:v,contentEditable:oe,"data-testid":M,id:T,ref:U,role:O,spellCheck:R,style:k,tabIndex:P}))},_p}process.env.NODE_ENV==="development"?y7():v7();var xp,C_;function b7(){if(C_)return xp;C_=1;var e=H;function t(l,u){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,m){return p.__proto__=m,p},t(l,u)}function n(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,t(l,u)}var r=function(l,u){return l===void 0&&(l=[]),u===void 0&&(u=[]),l.length!==u.length||l.some(function(p,m){return!Object.is(p,u[m])})},o={error:null},i=function(l){n(u,l);function u(){for(var m,b=arguments.length,C=new Array(b),_=0;_<b;_++)C[_]=arguments[_];return m=l.call.apply(l,[this].concat(C))||this,m.state=o,m.resetErrorBoundary=function(){for(var y,v=arguments.length,T=new Array(v),O=0;O<v;O++)T[O]=arguments[O];m.props.onReset==null||(y=m.props).onReset.apply(y,T),m.reset()},m}u.getDerivedStateFromError=function(m){return{error:m}};var p=u.prototype;return p.reset=function(){this.setState(o)},p.componentDidCatch=function(m,b){var C,_;(C=(_=this.props).onError)==null||C.call(_,m,b)},p.componentDidUpdate=function(m,b){var C=this.state.error,_=this.props.resetKeys;if(C!==null&&b.error!==null&&r(m.resetKeys,_)){var y,v;(y=(v=this.props).onResetKeysChange)==null||y.call(v,m.resetKeys,_),this.reset()}},p.render=function(){var m=this.state.error,b=this.props,C=b.fallbackRender,_=b.FallbackComponent,y=b.fallback;if(m!==null){var v={error:m,resetErrorBoundary:this.resetErrorBoundary};if(e.isValidElement(y))return y;if(typeof C=="function")return C(v);if(_)return e.createElement(_,v);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},u}(e.Component);function a({children:l,onError:u}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:u},l)}return xp=a,xp}var Ep,w_;function _7(){if(w_)return Ep;w_=1;var e=H;function t(a,l){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,p){return u.__proto__=p,u},t(a,l)}function n(a,l){a.prototype=Object.create(l.prototype),a.prototype.constructor=a,t(a,l)}function r(a,l){return a===void 0&&(a=[]),l===void 0&&(l=[]),a.length!==l.length||a.some(function(u,p){return!Object.is(u,l[p])})}var o={error:null},i=function(a){function l(){for(var p,m=arguments.length,b=Array(m),C=0;C<m;C++)b[C]=arguments[C];return p=a.call.apply(a,[this].concat(b))||this,p.state=o,p.resetErrorBoundary=function(){for(var _,y=arguments.length,v=Array(y),T=0;T<y;T++)v[T]=arguments[T];p.props.onReset==null||(_=p.props).onReset.apply(_,v),p.reset()},p}n(l,a),l.getDerivedStateFromError=function(p){return{error:p}};var u=l.prototype;return u.reset=function(){this.setState(o)},u.componentDidCatch=function(p,m){var b,C;(b=(C=this.props).onError)==null||b.call(C,p,m)},u.componentDidUpdate=function(p,m){var b=this.props.resetKeys;if(this.state.error!==null&&m.error!==null&&r(p.resetKeys,b)){var C,_;(C=(_=this.props).onResetKeysChange)==null||C.call(_,p.resetKeys,b),this.reset()}},u.render=function(){var p=this.state.error,m=this.props,b=m.fallbackRender,C=m.FallbackComponent;if(m=m.fallback,p!==null){if(p={error:p,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(m))return m;if(typeof b=="function")return b(p);if(C)return e.createElement(C,p);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},l}(e.Component);return Ep=function({children:a,onError:l}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:l},a)},Ep}process.env.NODE_ENV==="development"?b7():_7();var Cp={},Rr={},T_;function x7(){if(T_)return Rr;T_=1;var e=Xt(),t=yn();function n(B){let W=1,J=B.getParent();for(;J!=null;){if(oe(J)){const F=J.getParent();if(fe(F)){W++,J=F.getParent();continue}throw Error("A ListItemNode must have a ListNode for a parent.")}return W}return W}function r(B){let W=B.getParent();if(!fe(W))throw Error("A ListItemNode must have a ListNode for a parent.");let J=W;for(;J!==null;)J=J.getParent(),fe(J)&&(W=J);return W}function o(B){let W=[];const J=B.getChildren().filter(oe);for(let F=0;F<J.length;F++){const w=J[F],N=w.getFirstChild();fe(N)?W=W.concat(o(N)):W.push(w)}return W}function i(B){return oe(B)&&fe(B.getFirstChild())}function a(B){let W=B;for(;W.getNextSibling()==null&&W.getPreviousSibling()==null;){const J=W.getParent();if(J==null||!(oe(W)||fe(W)))break;W=J}W.remove()}function l(B){return X().append(B)}function u(B,W){return oe(B)&&(W.length===0||W.length===1&&B.is(W[0])&&B.getChildrenSize()===0)}function p(B){const W=B.getParent();let J=1;if(W!=null)if(fe(W))J=W.getStart();else throw Error("$getListItemValue: list node is not parent of list item node");const F=B.getPreviousSiblings();for(let w=0;w<F.length;w++){const N=F[w];oe(N)&&!fe(N.getFirstChild())&&J++}return J}function m(B,W){B.update(()=>{const J=e.$getSelection();if(e.$INTERNAL_isPointSelection(J)){const F=J.getNodes(),w=J.anchor.getNode(),N=w.getParent();if(u(w,F)){const I=te(W);if(e.$isRootOrShadowRoot(N)){w.replace(I);const q=X();e.$isElementNode(w)&&(q.setFormat(w.getFormatType()),q.setIndent(w.getIndent())),I.append(q)}else if(oe(w)){const q=w.getParentOrThrow();b(I,q.getChildren()),q.replace(I)}return}else{const I=new Set;for(let q=0;q<F.length;q++){const ue=F[q];if(e.$isElementNode(ue)&&ue.isEmpty()&&!oe(ue)&&!I.has(ue.getKey())){C(ue,W);continue}if(e.$isLeafNode(ue)){let he=ue.getParent();for(;he!=null;){const se=he.getKey();if(fe(he)){if(!I.has(se)){const Ce=te(W);b(Ce,he.getChildren()),he.replace(Ce),v(Ce),I.add(se)}break}else{const Ce=he.getParent();if(e.$isRootOrShadowRoot(Ce)&&!I.has(se)){I.add(se),C(he,W);break}he=Ce}}}}}}})}function b(B,W){B.splice(B.getChildrenSize(),0,W)}function C(B,W){if(fe(B))return B;const J=B.getPreviousSibling(),F=B.getNextSibling(),w=X();if(w.setFormat(B.getFormatType()),w.setIndent(B.getIndent()),b(w,B.getChildren()),fe(J)&&W===J.getListType())return J.append(w),B.remove(),fe(F)&&W===F.getListType()&&(b(J,F.getChildren()),F.remove()),J;if(fe(F)&&W===F.getListType())return F.getFirstChildOrThrow().insertBefore(w),B.remove(),F;{const N=te(W);return N.append(w),B.replace(N),v(N),N}}function _(B,W){const J=B.getLastChild(),F=W.getFirstChild();J&&F&&i(J)&&i(F)&&(_(J.getFirstChild(),F.getFirstChild()),F.remove());const w=W.getChildren();w.length>0&&(B.append(...w),v(B)),W.remove()}function y(B){B.update(()=>{const W=e.$getSelection();if(e.$isRangeSelection(W)){const J=new Set,F=W.getNodes(),w=W.anchor.getNode();if(u(w,F))J.add(r(w));else for(let N=0;N<F.length;N++){const I=F[N];if(e.$isLeafNode(I)){const q=t.$getNearestNodeOfType(I,k);q!=null&&J.add(r(q))}}for(const N of J){let I=N;const q=o(N);for(const ue of q){const he=e.$createParagraphNode();b(he,ue.getChildren()),I.insertAfter(he),I=he,ue.__key===W.anchor.key&&W.anchor.set(he.getKey(),0,"element"),ue.__key===W.focus.key&&W.focus.set(he.getKey(),0,"element"),ue.remove()}N.remove()}}})}function v(B,W){const J=W||B.getChildren();if(J!==void 0)for(let F=0;F<J.length;F++){const w=J[F];if(oe(w)){const N=w.getValue(),I=p(w);N!==I&&w.setValue(I)}}}function T(B){const W=new Set;if(i(B)||W.has(B.getKey()))return;const J=B.getParent(),F=B.getNextSibling(),w=B.getPreviousSibling();if(i(F)&&i(w)){const N=w.getFirstChild();if(fe(N)){N.append(B);const I=F.getFirstChild();if(fe(I)){const q=I.getChildren();b(N,q),F.remove(),W.add(F.getKey())}v(N)}}else if(i(F)){const N=F.getFirstChild();if(fe(N)){const I=N.getFirstChild();I!==null&&I.insertBefore(B),v(N)}}else if(i(w)){const N=w.getFirstChild();fe(N)&&(N.append(B),v(N))}else if(fe(J)){const N=X(),I=te(J.getListType());N.append(I),I.append(B),w?w.insertAfter(N):F?F.insertBefore(N):J.append(N),v(I)}fe(J)&&v(J)}function O(B){if(i(B))return;const W=B.getParent(),J=W?W.getParent():void 0,F=J?J.getParent():void 0;if(fe(F)&&oe(J)&&fe(W)){const w=W?W.getFirstChild():void 0,N=W?W.getLastChild():void 0;if(B.is(w))J.insertBefore(B),W.isEmpty()&&J.remove();else if(B.is(N))J.insertAfter(B),W.isEmpty()&&J.remove();else{const I=W.getListType(),q=X(),ue=te(I);q.append(ue),B.getPreviousSiblings().forEach(Ce=>ue.append(Ce));const he=X(),se=te(I);he.append(se),b(se,B.getNextSiblings()),J.insertBefore(q),J.insertAfter(he),J.replace(B)}v(W),v(F)}}function R(){const B=e.$getSelection();if(!e.$isRangeSelection(B)||!B.isCollapsed())return!1;const W=B.anchor.getNode();if(!oe(W)||W.getChildrenSize()!==0)return!1;const J=r(W),F=W.getParent();if(!fe(F))throw Error("A ListItemNode must have a ListNode for a parent.");const w=F.getParent();let N;if(e.$isRootOrShadowRoot(w))N=e.$createParagraphNode(),J.insertAfter(N);else if(oe(w))N=X(),w.insertAfter(N);else return!1;N.select();const I=W.getNextSiblings();if(I.length>0){const q=te(F.getListType());if(e.$isParagraphNode(N))N.insertAfter(q);else{const ue=X();ue.append(q),N.insertAfter(ue)}I.forEach(ue=>{ue.remove(),q.append(ue)})}return a(W),!0}class k extends e.ElementNode{static getType(){return"listitem"}static clone(W){return new k(W.__value,W.__checked,W.__key)}constructor(W,J,F){super(F),this.__value=W===void 0?1:W,this.__checked=J}createDOM(W){const J=document.createElement("li"),F=this.getParent();return fe(F)&&F.getListType()==="check"&&M(J,this,null),J.value=this.__value,P(J,W.theme,this),J}updateDOM(W,J,F){const w=this.getParent();return fe(w)&&w.getListType()==="check"&&M(J,this,W),J.value=this.__value,P(J,F.theme,this),!1}static transform(){return W=>{const J=W.getParent();fe(J)&&(v(J),J.getListType()!=="check"&&W.getChecked()!=null&&W.setChecked(void 0))}}static importDOM(){return{li:W=>({conversion:Y,priority:0})}}static importJSON(W){const J=X();return J.setChecked(W.checked),J.setValue(W.value),J.setFormat(W.format),J.setDirection(W.direction),J}exportDOM(W){const J=this.createDOM(W._config);return J.style.textAlign=this.getFormatType(),{element:J}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(e.$isElementNode(F)&&this.canMergeWith(F)){const w=F.getChildren();this.append(...w),F.remove()}else super.append(F)}return this}replace(W,J){if(oe(W))return super.replace(W);this.setIndent(0);const F=this.getParentOrThrow();if(!fe(F))return W;if(F.__first===this.getKey())F.insertBefore(W);else if(F.__last===this.getKey())F.insertAfter(W);else{const w=te(F.getListType());let N=this.getNextSibling();for(;N;){const I=N;N=N.getNextSibling(),w.append(I)}F.insertAfter(W),W.insertAfter(w)}return J&&this.getChildren().forEach(w=>{W.append(w)}),this.remove(),F.getChildrenSize()===0&&F.remove(),W}insertAfter(W,J=!0){const F=this.getParentOrThrow();if(!fe(F))throw Error("insertAfter: list node is not parent of list item node");const w=this.getNextSiblings();if(oe(W)){const N=super.insertAfter(W,J),I=W.getParentOrThrow();return fe(I)&&v(I),N}if(fe(W)){let N=W;const I=W.getChildren();for(let q=I.length-1;q>=0;q--)N=I[q],this.insertAfter(N,J);return N}if(F.insertAfter(W,J),w.length!==0){const N=te(F.getListType());w.forEach(I=>N.append(I)),W.insertAfter(N,J)}return W}remove(W){const J=this.getPreviousSibling(),F=this.getNextSibling();if(super.remove(W),J&&F&&i(J)&&i(F))_(J.getFirstChild(),F.getFirstChild()),F.remove();else if(F){const w=F.getParent();fe(w)&&v(w)}}insertNewAfter(W,J=!0){const F=X(this.__checked==null?void 0:!1);return this.insertAfter(F,J),F}collapseAtStart(W){const J=e.$createParagraphNode();this.getChildren().forEach(I=>J.append(I));const F=this.getParentOrThrow(),w=F.getParentOrThrow(),N=oe(w);if(F.getChildrenSize()===1)if(N)F.remove(),w.select();else{F.insertBefore(J),F.remove();const I=W.anchor,q=W.focus,ue=J.getKey();I.type==="element"&&I.getNode().is(this)&&I.set(ue,I.offset,"element"),q.type==="element"&&q.getNode().is(this)&&q.set(ue,q.offset,"element")}else F.insertBefore(J),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(W){const J=this.getWritable();J.__value=W}getChecked(){return this.getLatest().__checked}setChecked(W){const J=this.getWritable();J.__checked=W}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const W=this.getParent();if(W===null)return this.getLatest().__indent;let J=W.getParentOrThrow(),F=0;for(;oe(J);)J=J.getParentOrThrow().getParentOrThrow(),F++;return F}setIndent(W){if(!(typeof W=="number"&&W>-1))throw Error("Invalid indent value.");let J=this.getIndent();for(;J!==W;)J<W?(T(this),J++):(O(this),J--);return this}insertBefore(W){if(oe(W)){const J=this.getParentOrThrow();if(fe(J)){const F=this.getNextSiblings();v(J,F)}}return super.insertBefore(W)}canInsertAfter(W){return oe(W)}canReplaceWith(W){return oe(W)}canMergeWith(W){return e.$isParagraphNode(W)||oe(W)}extractWithChild(W,J){if(!e.$isRangeSelection(J))return!1;const F=J.anchor.getNode(),w=J.focus.getNode();return this.isParentOf(F)&&this.isParentOf(w)&&this.getTextContent().length===J.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return te("bullet")}}function P(B,W,J){const F=[],w=[],N=W.list,I=N?N.listitem:void 0;let q;if(N&&N.nested&&(q=N.nested.listitem),I!==void 0){const ue=I.split(" ");F.push(...ue)}if(N){const ue=J.getParent(),he=fe(ue)&&ue.getListType()==="check",se=J.getChecked();(!he||se)&&w.push(N.listitemUnchecked),(!he||!se)&&w.push(N.listitemChecked),he&&F.push(se?N.listitemChecked:N.listitemUnchecked)}if(q!==void 0){const ue=q.split(" ");J.getChildren().some(he=>fe(he))?F.push(...ue):w.push(...ue)}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function M(B,W,J,F){fe(W.getFirstChild())?(B.removeAttribute("role"),B.removeAttribute("tabIndex"),B.removeAttribute("aria-checked")):(B.setAttribute("role","checkbox"),B.setAttribute("tabIndex","-1"),(!J||W.__checked!==J.__checked)&&B.setAttribute("aria-checked",W.getChecked()?"true":"false"))}function Y(B){const W=t.isHTMLElement(B)&&B.getAttribute("aria-checked")==="true";return{node:X(W)}}function X(B){return e.$applyNodeReplacement(new k(void 0,B))}function oe(B){return B instanceof k}class Z extends e.ElementNode{static getType(){return"list"}static clone(W){const J=W.__listType||pe[W.__tag];return new Z(J,W.__start,W.__key)}constructor(W,J,F){super(F);const w=pe[W]||W;this.__listType=w,this.__tag=w==="number"?"ol":"ul",this.__start=J}getTag(){return this.__tag}setListType(W){const J=this.getWritable();J.__listType=W,J.__tag=W==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(W,J){const F=this.__tag,w=document.createElement(F);return this.__start!==1&&w.setAttribute("start",String(this.__start)),w.__lexicalListType=this.__listType,U(w,W.theme,this),w}updateDOM(W,J,F){return W.__tag!==this.__tag?!0:(U(J,F.theme,this),!1)}static importDOM(){return{ol:W=>({conversion:de,priority:0}),ul:W=>({conversion:de,priority:0})}}static importJSON(W){const J=te(W.listType,W.start);return J.setFormat(W.format),J.setIndent(W.indent),J.setDirection(W.direction),J}exportDOM(W){const{element:J}=super.exportDOM(W);return J&&t.isHTMLElement(J)&&(this.__start!==1&&J.setAttribute("start",String(this.__start)),this.__listType==="check"&&J.setAttribute("__lexicalListType","check")),{element:J}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...W){for(let J=0;J<W.length;J++){const F=W[J];if(oe(F))super.append(F);else{const w=X();if(fe(F))w.append(F);else if(e.$isElementNode(F)){const N=e.$createTextNode(F.getTextContent());w.append(N)}else w.append(F);super.append(w)}}return v(this),this}extractWithChild(W){return oe(W)}}function U(B,W,J){const F=[],w=[],N=W.list;if(N!==void 0){const I=N[`${J.__tag}Depth`]||[],q=n(J)-1,ue=q%I.length,he=I[ue],se=N[J.__tag];let Ce;const Oe=N.nested;if(Oe!==void 0&&Oe.list&&(Ce=Oe.list),se!==void 0&&F.push(se),he!==void 0){const Be=he.split(" ");F.push(...Be);for(let ce=0;ce<I.length;ce++)ce!==ue&&w.push(J.__tag+ce)}if(Ce!==void 0){const Be=Ce.split(" ");q>1?F.push(...Be):w.push(...Be)}}w.length>0&&t.removeClassNamesFromElement(B,...w),F.length>0&&t.addClassNamesToElement(B,...F)}function Q(B){const W=[];for(let J=0;J<B.length;J++){const F=B[J];if(oe(F)){W.push(F);const w=F.getChildren();w.length>1&&w.forEach(N=>{fe(N)&&W.push(l(N))})}else W.push(l(F))}return W}function de(B){const W=B.nodeName.toLowerCase();let J=null;if(W==="ol"){const F=B.start;J=te("number",F)}else W==="ul"&&(t.isHTMLElement(B)&&B.getAttribute("__lexicallisttype")==="check"?J=te("check"):J=te("bullet"));return{after:Q,node:J}}const pe={ol:"number",ul:"bullet"};function te(B,W=1){return e.$applyNodeReplacement(new Z(B,W))}function fe(B){return B instanceof Z}const V=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),j=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),ee=e.createCommand("INSERT_CHECK_LIST_COMMAND"),re=e.createCommand("REMOVE_LIST_COMMAND");return Rr.$createListItemNode=X,Rr.$createListNode=te,Rr.$getListDepth=n,Rr.$handleListInsertParagraph=R,Rr.$isListItemNode=oe,Rr.$isListNode=fe,Rr.INSERT_CHECK_LIST_COMMAND=ee,Rr.INSERT_ORDERED_LIST_COMMAND=j,Rr.INSERT_UNORDERED_LIST_COMMAND=V,Rr.ListItemNode=k,Rr.ListNode=Z,Rr.REMOVE_LIST_COMMAND=re,Rr.insertList=m,Rr.removeList=y,Rr}var $r={},N_;function E7(){if(N_)return $r;N_=1;var e=Xt(),t=yn();function n(V){let j=new URLSearchParams;j.append("code",V);for(let ee=1;ee<arguments.length;ee++)j.append("v",arguments[ee]);throw Error(`Minified Lexical error #${V}; visit https://lexical.dev/docs/error?${j} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(V){let j=1;for(V=V.getParent();V!=null;){if(P(V)){if(V=V.getParent(),Q(V)){j++,V=V.getParent();continue}n(40)}break}return j}function o(V){V=V.getParent(),Q(V)||n(40);let j=V;for(;j!==null;)j=j.getParent(),Q(j)&&(V=j);return V}function i(V){let j=[];V=V.getChildren().filter(P);for(let ee=0;ee<V.length;ee++){let re=V[ee],B=re.getFirstChild();Q(B)?j=j.concat(i(B)):j.push(re)}return j}function a(V){return P(V)&&Q(V.getFirstChild())}function l(V){for(;V.getNextSibling()==null&&V.getPreviousSibling()==null;){let j=V.getParent();if(j==null||!P(V)&&!Q(V))break;V=j}V.remove()}function u(V){return k().append(V)}function p(V,j){return P(V)&&(j.length===0||j.length===1&&V.is(j[0])&&V.getChildrenSize()===0)}function m(V,j){V.splice(V.getChildrenSize(),0,j)}function b(V,j){if(Q(V))return V;let ee=V.getPreviousSibling(),re=V.getNextSibling(),B=k();return B.setFormat(V.getFormatType()),B.setIndent(V.getIndent()),m(B,V.getChildren()),Q(ee)&&j===ee.getListType()?(ee.append(B),V.remove(),Q(re)&&j===re.getListType()&&(m(ee,re.getChildren()),re.remove()),ee):Q(re)&&j===re.getListType()?(re.getFirstChildOrThrow().insertBefore(B),V.remove(),re):(j=U(j),j.append(B),V.replace(j),_(j),j)}function C(V,j){var ee=V.getLastChild();let re=j.getFirstChild();ee&&re&&a(ee)&&a(re)&&(C(ee.getFirstChild(),re.getFirstChild()),re.remove()),ee=j.getChildren(),0<ee.length&&(V.append(...ee),_(V)),j.remove()}function _(V,j){if(V=j||V.getChildren(),V!==void 0)for(j=0;j<V.length;j++){let W=V[j];if(P(W)){let J=W.getValue();var ee=W,re=ee.getParent(),B=1;for(re!=null&&(Q(re)?B=re.getStart():n(44)),ee=ee.getPreviousSiblings(),re=0;re<ee.length;re++){let F=ee[re];P(F)&&!Q(F.getFirstChild())&&B++}J!==B&&W.setValue(B)}}}function y(V){if(!a(V)){var j=V.getParent(),ee=j?j.getParent():void 0,re=ee?ee.getParent():void 0;if(Q(re)&&P(ee)&&Q(j)){var B=j?j.getFirstChild():void 0,W=j?j.getLastChild():void 0;if(V.is(B))ee.insertBefore(V),j.isEmpty()&&ee.remove();else if(V.is(W))ee.insertAfter(V),j.isEmpty()&&ee.remove();else{var J=j.getListType();B=k();let F=U(J);B.append(F),V.getPreviousSiblings().forEach(w=>F.append(w)),W=k(),J=U(J),W.append(J),m(J,V.getNextSiblings()),ee.insertBefore(B),ee.insertAfter(W),ee.replace(V)}_(j),_(re)}}}class v extends e.ElementNode{static getType(){return"listitem"}static clone(j){return new v(j.__value,j.__checked,j.__key)}constructor(j,ee,re){super(re),this.__value=j===void 0?1:j,this.__checked=ee}createDOM(j){let ee=document.createElement("li"),re=this.getParent();return Q(re)&&re.getListType()==="check"&&O(ee,this,null),ee.value=this.__value,T(ee,j.theme,this),ee}updateDOM(j,ee,re){let B=this.getParent();return Q(B)&&B.getListType()==="check"&&O(ee,this,j),ee.value=this.__value,T(ee,re.theme,this),!1}static transform(){return j=>{let ee=j.getParent();Q(ee)&&(_(ee),ee.getListType()!=="check"&&j.getChecked()!=null&&j.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:R,priority:0})}}static importJSON(j){let ee=k();return ee.setChecked(j.checked),ee.setValue(j.value),ee.setFormat(j.format),ee.setDirection(j.direction),ee}exportDOM(j){return j=this.createDOM(j._config),j.style.textAlign=this.getFormatType(),{element:j}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...j){for(let ee=0;ee<j.length;ee++){let re=j[ee];if(e.$isElementNode(re)&&this.canMergeWith(re)){let B=re.getChildren();this.append(...B),re.remove()}else super.append(re)}return this}replace(j,ee){if(P(j))return super.replace(j);this.setIndent(0);let re=this.getParentOrThrow();if(!Q(re))return j;if(re.__first===this.getKey())re.insertBefore(j);else if(re.__last===this.getKey())re.insertAfter(j);else{let B=U(re.getListType()),W=this.getNextSibling();for(;W;){let J=W;W=W.getNextSibling(),B.append(J)}re.insertAfter(j),j.insertAfter(B)}return ee&&this.getChildren().forEach(B=>{j.append(B)}),this.remove(),re.getChildrenSize()===0&&re.remove(),j}insertAfter(j,ee=!0){var re=this.getParentOrThrow();Q(re)||n(39);var B=this.getNextSiblings();if(P(j))return ee=super.insertAfter(j,ee),j=j.getParentOrThrow(),Q(j)&&_(j),ee;if(Q(j)){for(re=j,j=j.getChildren(),B=j.length-1;0<=B;B--)re=j[B],this.insertAfter(re,ee);return re}if(re.insertAfter(j,ee),B.length!==0){let W=U(re.getListType());B.forEach(J=>W.append(J)),j.insertAfter(W,ee)}return j}remove(j){let ee=this.getPreviousSibling(),re=this.getNextSibling();super.remove(j),ee&&re&&a(ee)&&a(re)?(C(ee.getFirstChild(),re.getFirstChild()),re.remove()):re&&(j=re.getParent(),Q(j)&&_(j))}insertNewAfter(j,ee=!0){return j=k(this.__checked==null?void 0:!1),this.insertAfter(j,ee),j}collapseAtStart(j){let ee=e.$createParagraphNode();this.getChildren().forEach(J=>ee.append(J));var re=this.getParentOrThrow(),B=re.getParentOrThrow();let W=P(B);return re.getChildrenSize()===1?W?(re.remove(),B.select()):(re.insertBefore(ee),re.remove(),re=j.anchor,j=j.focus,B=ee.getKey(),re.type==="element"&&re.getNode().is(this)&&re.set(B,re.offset,"element"),j.type==="element"&&j.getNode().is(this)&&j.set(B,j.offset,"element")):(re.insertBefore(ee),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(j){this.getWritable().__value=j}getChecked(){return this.getLatest().__checked}setChecked(j){this.getWritable().__checked=j}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var j=this.getParent();if(j===null)return this.getLatest().__indent;j=j.getParentOrThrow();let ee=0;for(;P(j);)j=j.getParentOrThrow().getParentOrThrow(),ee++;return ee}setIndent(j){typeof j=="number"&&-1<j||n(117);let ee=this.getIndent();for(;ee!==j;)if(ee<j){e:{var re=new Set;if(a(this)||re.has(this.getKey()))break e;let F=this.getParent();var B=this.getNextSibling(),W=this.getPreviousSibling();if(a(B)&&a(W)){if(W=W.getFirstChild(),Q(W)){W.append(this);var J=B.getFirstChild();Q(J)&&(J=J.getChildren(),m(W,J),B.remove(),re.add(B.getKey())),_(W)}}else a(B)?(B=B.getFirstChild(),Q(B)&&(re=B.getFirstChild(),re!==null&&re.insertBefore(this),_(B))):a(W)?(B=W.getFirstChild(),Q(B)&&(B.append(this),_(B))):Q(F)&&(re=k(),J=U(F.getListType()),re.append(J),J.append(this),W?W.insertAfter(re):B?B.insertBefore(re):F.append(re),_(J));Q(F)&&_(F)}ee++}else y(this),ee--;return this}insertBefore(j){if(P(j)){let ee=this.getParentOrThrow();if(Q(ee)){let re=this.getNextSiblings();_(ee,re)}}return super.insertBefore(j)}canInsertAfter(j){return P(j)}canReplaceWith(j){return P(j)}canMergeWith(j){return e.$isParagraphNode(j)||P(j)}extractWithChild(j,ee){if(!e.$isRangeSelection(ee))return!1;j=ee.anchor.getNode();let re=ee.focus.getNode();return this.isParentOf(j)&&this.isParentOf(re)&&this.getTextContent().length===ee.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return U("bullet")}}function T(V,j,ee){let re=[],B=[];var W=(j=j.list)?j.listitem:void 0;if(j&&j.nested)var J=j.nested.listitem;if(W!==void 0&&(W=W.split(" "),re.push(...W)),j){W=ee.getParent(),W=Q(W)&&W.getListType()==="check";let F=ee.getChecked();W&&!F||B.push(j.listitemUnchecked),W&&F||B.push(j.listitemChecked),W&&re.push(F?j.listitemChecked:j.listitemUnchecked)}J!==void 0&&(J=J.split(" "),ee.getChildren().some(F=>Q(F))?re.push(...J):B.push(...J)),0<B.length&&t.removeClassNamesFromElement(V,...B),0<re.length&&t.addClassNamesToElement(V,...re)}function O(V,j,ee){Q(j.getFirstChild())?(V.removeAttribute("role"),V.removeAttribute("tabIndex"),V.removeAttribute("aria-checked")):(V.setAttribute("role","checkbox"),V.setAttribute("tabIndex","-1"),ee&&j.__checked===ee.__checked||V.setAttribute("aria-checked",j.getChecked()?"true":"false"))}function R(V){return V=t.isHTMLElement(V)&&V.getAttribute("aria-checked")==="true",{node:k(V)}}function k(V){return e.$applyNodeReplacement(new v(void 0,V))}function P(V){return V instanceof v}class M extends e.ElementNode{static getType(){return"list"}static clone(j){return new M(j.__listType||Z[j.__tag],j.__start,j.__key)}constructor(j,ee,re){super(re),this.__listType=j=Z[j]||j,this.__tag=j==="number"?"ol":"ul",this.__start=ee}getTag(){return this.__tag}setListType(j){let ee=this.getWritable();ee.__listType=j,ee.__tag=j==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(j){let ee=document.createElement(this.__tag);return this.__start!==1&&ee.setAttribute("start",String(this.__start)),ee.__lexicalListType=this.__listType,Y(ee,j.theme,this),ee}updateDOM(j,ee,re){return j.__tag!==this.__tag?!0:(Y(ee,re.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:oe,priority:0}),ul:()=>({conversion:oe,priority:0})}}static importJSON(j){let ee=U(j.listType,j.start);return ee.setFormat(j.format),ee.setIndent(j.indent),ee.setDirection(j.direction),ee}exportDOM(j){return{element:j}=super.exportDOM(j),j&&t.isHTMLElement(j)&&(this.__start!==1&&j.setAttribute("start",String(this.__start)),this.__listType==="check"&&j.setAttribute("__lexicalListType","check")),{element:j}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...j){for(let re=0;re<j.length;re++){var ee=j[re];if(P(ee))super.append(ee);else{let B=k();Q(ee)||e.$isElementNode(ee)&&(ee=e.$createTextNode(ee.getTextContent())),B.append(ee),super.append(B)}}return _(this),this}extractWithChild(j){return P(j)}}function Y(V,j,ee){let re=[],B=[];var W=j.list;if(W!==void 0){let F=W[`${ee.__tag}Depth`]||[];j=r(ee)-1;let w=j%F.length;var J=F[w];let N=W[ee.__tag],I;if(W=W.nested,W!==void 0&&W.list&&(I=W.list),N!==void 0&&re.push(N),J!==void 0)for(J=J.split(" "),re.push(...J),J=0;J<F.length;J++)J!==w&&B.push(ee.__tag+J);I!==void 0&&(ee=I.split(" "),1<j?re.push(...ee):B.push(...ee))}0<B.length&&t.removeClassNamesFromElement(V,...B),0<re.length&&t.addClassNamesToElement(V,...re)}function X(V){let j=[];for(let re=0;re<V.length;re++){var ee=V[re];P(ee)?(j.push(ee),ee=ee.getChildren(),1<ee.length&&ee.forEach(B=>{Q(B)&&j.push(u(B))})):j.push(u(ee))}return j}function oe(V){let j=V.nodeName.toLowerCase(),ee=null;return j==="ol"?ee=U("number",V.start):j==="ul"&&(ee=t.isHTMLElement(V)&&V.getAttribute("__lexicallisttype")==="check"?U("check"):U("bullet")),{after:X,node:ee}}let Z={ol:"number",ul:"bullet"};function U(V,j=1){return e.$applyNodeReplacement(new M(V,j))}function Q(V){return V instanceof M}let de=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),pe=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),te=e.createCommand("INSERT_CHECK_LIST_COMMAND"),fe=e.createCommand("REMOVE_LIST_COMMAND");return $r.$createListItemNode=k,$r.$createListNode=U,$r.$getListDepth=r,$r.$handleListInsertParagraph=function(){var V=e.$getSelection();if(!e.$isRangeSelection(V)||!V.isCollapsed()||(V=V.anchor.getNode(),!P(V)||V.getChildrenSize()!==0))return!1;var j=o(V),ee=V.getParent();Q(ee)||n(40);let re=ee.getParent(),B;if(e.$isRootOrShadowRoot(re))B=e.$createParagraphNode(),j.insertAfter(B);else if(P(re))B=k(),re.insertAfter(B);else return!1;if(B.select(),j=V.getNextSiblings(),0<j.length){let W=U(ee.getListType());e.$isParagraphNode(B)?B.insertAfter(W):(ee=k(),ee.append(W),B.insertAfter(ee)),j.forEach(J=>{J.remove(),W.append(J)})}return l(V),!0},$r.$isListItemNode=P,$r.$isListNode=Q,$r.INSERT_CHECK_LIST_COMMAND=te,$r.INSERT_ORDERED_LIST_COMMAND=pe,$r.INSERT_UNORDERED_LIST_COMMAND=de,$r.ListItemNode=v,$r.ListNode=M,$r.REMOVE_LIST_COMMAND=fe,$r.insertList=function(V,j){V.update(()=>{var ee=e.$getSelection();if(e.$INTERNAL_isPointSelection(ee)){var re=ee.getNodes();ee=ee.anchor.getNode();var B=ee.getParent();if(p(ee,re))re=U(j),e.$isRootOrShadowRoot(B)?(ee.replace(re),B=k(),e.$isElementNode(ee)&&(B.setFormat(ee.getFormatType()),B.setIndent(ee.getIndent())),re.append(B)):P(ee)&&(ee=ee.getParentOrThrow(),m(re,ee.getChildren()),ee.replace(re));else for(ee=new Set,B=0;B<re.length;B++){var W=re[B];if(e.$isElementNode(W)&&W.isEmpty()&&!P(W)&&!ee.has(W.getKey()))b(W,j);else if(e.$isLeafNode(W))for(W=W.getParent();W!=null;){let F=W.getKey();if(Q(W)){if(!ee.has(F)){var J=U(j);m(J,W.getChildren()),W.replace(J),_(J),ee.add(F)}break}else{if(J=W.getParent(),e.$isRootOrShadowRoot(J)&&!ee.has(F)){ee.add(F),b(W,j);break}W=J}}}}})},$r.removeList=function(V){V.update(()=>{let j=e.$getSelection();if(e.$isRangeSelection(j)){var ee=new Set,re=j.getNodes(),B=j.anchor.getNode();if(p(B,re))ee.add(o(B));else for(B=0;B<re.length;B++){var W=re[B];e.$isLeafNode(W)&&(W=t.$getNearestNodeOfType(W,v),W!=null&&ee.add(o(W)))}for(let J of ee){ee=J,re=i(J);for(let F of re)re=e.$createParagraphNode(),m(re,F.getChildren()),ee.insertAfter(re),ee=re,F.__key===j.anchor.key&&j.anchor.set(re.getKey(),0,"element"),F.__key===j.focus.key&&j.focus.set(re.getKey(),0,"element"),F.remove();J.remove()}}})},$r}var S_,O_;function iy(){return O_||(O_=1,S_=process.env.NODE_ENV==="development"?x7():E7()),S_}var A_;function C7(){if(A_)return Cp;A_=1;var e=iy(),t=cr(),n=H,r=yn(),o=Xt();function i(l){n.useEffect(()=>r.mergeRegister(l.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(l,"number"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(l,"bullet"),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(l),!0),o.COMMAND_PRIORITY_LOW),l.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[l])}function a(){const[l]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!l.hasNodes([e.ListNode,e.ListItemNode]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[l]),i(l),null}return Cp.ListPlugin=a,Cp}var wp={},R_;function w7(){if(R_)return wp;R_=1;var e=iy(),t=cr(),n=H,r=yn(),o=Xt();function i(a){n.useEffect(()=>r.mergeRegister(a.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(a,"number"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(a,"bullet"),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(a),!0),o.COMMAND_PRIORITY_LOW),a.registerCommand(o.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),o.COMMAND_PRIORITY_LOW)),[a])}return wp.ListPlugin=function(){let[a]=t.useLexicalComposerContext();return n.useEffect(()=>{if(!a.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[a]),i(a),null},wp}process.env.NODE_ENV==="development"?C7():w7();var Tp={},gi={},$_;function T7(){if($_)return gi;$_=1;var e=yn(),t=Xt();const n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(y){return new r(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}constructor(y,v={},T){super(T);const{target:O=null,rel:R=null,title:k=null}=v;this.__url=y,this.__target=O,this.__rel=R,this.__title=k}createDOM(y){const v=document.createElement("a");return v.href=this.sanitizeUrl(this.__url),this.__target!==null&&(v.target=this.__target),this.__rel!==null&&(v.rel=this.__rel),this.__title!==null&&(v.title=this.__title),e.addClassNamesToElement(v,y.theme.link),v}updateDOM(y,v,T){const O=this.__url,R=this.__target,k=this.__rel,P=this.__title;return O!==y.__url&&(v.href=O),R!==y.__target&&(R?v.target=R:v.removeAttribute("target")),k!==y.__rel&&(k?v.rel=k:v.removeAttribute("rel")),P!==y.__title&&(P?v.title=P:v.removeAttribute("title")),!1}static importDOM(){return{a:y=>({conversion:o,priority:1})}}static importJSON(y){const v=i(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}sanitizeUrl(y){try{const v=new URL(y);if(!n.has(v.protocol))return"about:blank"}catch{return y}return y}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(y){const v=this.getWritable();v.__url=y}getTarget(){return this.getLatest().__target}setTarget(y){const v=this.getWritable();v.__target=y}getRel(){return this.getLatest().__rel}setRel(y){const v=this.getWritable();v.__rel=y}getTitle(){return this.getLatest().__title}setTitle(y){const v=this.getWritable();v.__title=y}insertNewAfter(y,v=!0){const T=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(T,v),T}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(y,v,T){if(!t.$isRangeSelection(v))return!1;const O=v.anchor.getNode(),R=v.focus.getNode();return this.isParentOf(O)&&this.isParentOf(R)&&v.getTextContent().length>0}}function o(_){let y=null;if(e.isHTMLAnchorElement(_)){const v=_.textContent;(v!==null&&v!==""||_.children.length>0)&&(y=i(_.getAttribute("href")||"",{rel:_.getAttribute("rel"),target:_.getAttribute("target"),title:_.getAttribute("title")}))}return{node:y}}function i(_,y){return t.$applyNodeReplacement(new r(_,y))}function a(_){return _ instanceof r}class l extends r{static getType(){return"autolink"}static clone(y){return new l(y.__url,{rel:y.__rel,target:y.__target,title:y.__title},y.__key)}static importJSON(y){const v=u(y.url,{rel:y.rel,target:y.target,title:y.title});return v.setFormat(y.format),v.setIndent(y.indent),v.setDirection(y.direction),v}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(y,v=!0){const T=this.getParentOrThrow().insertNewAfter(y,v);if(t.$isElementNode(T)){const O=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return T.append(O),O}return null}}function u(_,y){return t.$applyNodeReplacement(new l(_,y))}function p(_){return _ instanceof l}const m=t.createCommand("TOGGLE_LINK_COMMAND");function b(_,y={}){const{target:v,title:T}=y,O=y.rel===void 0?"noreferrer":y.rel,R=t.$getSelection();if(!t.$isRangeSelection(R))return;const k=R.extract();if(_===null)k.forEach(P=>{const M=P.getParent();if(a(M)){const Y=M.getChildren();for(let X=0;X<Y.length;X++)M.insertBefore(Y[X]);M.remove()}});else{if(k.length===1){const Y=k[0],X=C(Y,a);if(X!==null){X.setURL(_),v!==void 0&&X.setTarget(v),O!==null&&X.setRel(O),T!==void 0&&X.setTitle(T);return}}let P=null,M=null;k.forEach(Y=>{const X=Y.getParent();if(!(X===M||X===null||t.$isElementNode(Y)&&!Y.isInline())){if(a(X)){M=X,X.setURL(_),v!==void 0&&X.setTarget(v),O!==null&&M.setRel(O),T!==void 0&&M.setTitle(T);return}if(X.is(P)||(P=X,M=i(_,{rel:O,target:v,title:T}),a(X)?Y.getPreviousSibling()===null?X.insertBefore(M):X.insertAfter(M):Y.insertBefore(M)),a(Y)){if(Y.is(M))return;if(M!==null){const oe=Y.getChildren();for(let Z=0;Z<oe.length;Z++)M.append(oe[Z])}Y.remove();return}M!==null&&M.append(Y)}})}}function C(_,y){let v=_;for(;v!==null&&v.getParent()!==null&&!y(v);)v=v.getParentOrThrow();return y(v)?v:null}return gi.$createAutoLinkNode=u,gi.$createLinkNode=i,gi.$isAutoLinkNode=p,gi.$isLinkNode=a,gi.AutoLinkNode=l,gi.LinkNode=r,gi.TOGGLE_LINK_COMMAND=m,gi.toggleLink=b,gi}var mi={},D_;function N7(){if(D_)return mi;D_=1;var e=yn(),t=Xt();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(C){return new r(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}constructor(C,_={},y){super(y);let{target:v=null,rel:T=null,title:O=null}=_;this.__url=C,this.__target=v,this.__rel=T,this.__title=O}createDOM(C){let _=document.createElement("a");return _.href=this.sanitizeUrl(this.__url),this.__target!==null&&(_.target=this.__target),this.__rel!==null&&(_.rel=this.__rel),this.__title!==null&&(_.title=this.__title),e.addClassNamesToElement(_,C.theme.link),_}updateDOM(C,_){let y=this.__url,v=this.__target,T=this.__rel,O=this.__title;return y!==C.__url&&(_.href=y),v!==C.__target&&(v?_.target=v:_.removeAttribute("target")),T!==C.__rel&&(T?_.rel=T:_.removeAttribute("rel")),O!==C.__title&&(O?_.title=O:_.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:o,priority:1})}}static importJSON(C){let _=i(C.url,{rel:C.rel,target:C.target,title:C.title});return _.setFormat(C.format),_.setIndent(C.indent),_.setDirection(C.direction),_}sanitizeUrl(C){try{let _=new URL(C);if(!n.has(_.protocol))return"about:blank"}catch{}return C}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(C){this.getWritable().__url=C}getTarget(){return this.getLatest().__target}setTarget(C){this.getWritable().__target=C}getRel(){return this.getLatest().__rel}setRel(C){this.getWritable().__rel=C}getTitle(){return this.getLatest().__title}setTitle(C){this.getWritable().__title=C}insertNewAfter(C,_=!0){return C=i(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(C,_),C}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(C,_){if(!t.$isRangeSelection(_))return!1;C=_.anchor.getNode();let y=_.focus.getNode();return this.isParentOf(C)&&this.isParentOf(y)&&0<_.getTextContent().length}}function o(b){let C=null;if(e.isHTMLAnchorElement(b)){let _=b.textContent;(_!==null&&_!==""||0<b.children.length)&&(C=i(b.getAttribute("href")||"",{rel:b.getAttribute("rel"),target:b.getAttribute("target"),title:b.getAttribute("title")}))}return{node:C}}function i(b,C){return t.$applyNodeReplacement(new r(b,C))}function a(b){return b instanceof r}class l extends r{static getType(){return"autolink"}static clone(C){return new l(C.__url,{rel:C.__rel,target:C.__target,title:C.__title},C.__key)}static importJSON(C){let _=u(C.url,{rel:C.rel,target:C.target,title:C.title});return _.setFormat(C.format),_.setIndent(C.indent),_.setDirection(C.direction),_}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(C,_=!0){return C=this.getParentOrThrow().insertNewAfter(C,_),t.$isElementNode(C)?(_=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),C.append(_),_):null}}function u(b,C){return t.$applyNodeReplacement(new l(b,C))}let p=t.createCommand("TOGGLE_LINK_COMMAND");function m(b,C){for(;b!==null&&b.getParent()!==null&&!C(b);)b=b.getParentOrThrow();return C(b)?b:null}return mi.$createAutoLinkNode=u,mi.$createLinkNode=i,mi.$isAutoLinkNode=function(b){return b instanceof l},mi.$isLinkNode=a,mi.AutoLinkNode=l,mi.LinkNode=r,mi.TOGGLE_LINK_COMMAND=p,mi.toggleLink=function(b,C={}){let{target:_,title:y}=C,v=C.rel===void 0?"noreferrer":C.rel;if(C=t.$getSelection(),t.$isRangeSelection(C))if(C=C.extract(),b===null)C.forEach(T=>{if(T=T.getParent(),a(T)){let O=T.getChildren();for(let R=0;R<O.length;R++)T.insertBefore(O[R]);T.remove()}});else{if(C.length===1){let R=m(C[0],a);if(R!==null){R.setURL(b),_!==void 0&&R.setTarget(_),v!==null&&R.setRel(v),y!==void 0&&R.setTitle(y);return}}let T=null,O=null;C.forEach(R=>{var k=R.getParent();if(k!==O&&k!==null&&(!t.$isElementNode(R)||R.isInline()))if(a(k))O=k,k.setURL(b),_!==void 0&&k.setTarget(_),v!==null&&O.setRel(v),y!==void 0&&O.setTitle(y);else if(k.is(T)||(T=k,O=i(b,{rel:v,target:_,title:y}),a(k)?R.getPreviousSibling()===null?k.insertBefore(O):k.insertAfter(O):R.insertBefore(O)),a(R)){if(!R.is(O)){if(O!==null){k=R.getChildren();for(let P=0;P<k.length;P++)O.append(k[P])}R.remove()}}else O!==null&&O.append(R)})}},mi}var k_,M_;function ay(){return M_||(M_=1,k_=process.env.NODE_ENV==="development"?T7():N7()),k_}var P_;function S7(){if(P_)return Tp;P_=1;var e=ay(),t=cr(),n=yn(),r=Xt(),o=H;function i({validateUrl:a}){const[l]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!l.hasNodes([e.LinkNode]))throw new Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(l.registerCommand(e.TOGGLE_LINK_COMMAND,u=>{if(u===null)return e.toggleLink(u),!0;if(typeof u=="string")return a===void 0||a(u)?(e.toggleLink(u),!0):!1;{const{url:p,target:m,rel:b,title:C}=u;return e.toggleLink(p,{rel:b,target:m,title:C}),!0}},r.COMMAND_PRIORITY_LOW),a!==void 0?l.registerCommand(r.PASTE_COMMAND,u=>{const p=r.$getSelection();if(!r.$isRangeSelection(p)||p.isCollapsed()||!(u instanceof ClipboardEvent)||u.clipboardData==null)return!1;const m=u.clipboardData.getData("text");return a(m)?p.getNodes().some(b=>r.$isElementNode(b))?!1:(l.dispatchCommand(e.TOGGLE_LINK_COMMAND,m),u.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[l,a]),null}return Tp.LinkPlugin=i,Tp}var Np={},I_;function O7(){if(I_)return Np;I_=1;var e=ay(),t=cr(),n=yn(),r=Xt(),o=H;return Np.LinkPlugin=function({validateUrl:i}){let[a]=t.useLexicalComposerContext();return o.useEffect(()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,l=>{if(l===null)return e.toggleLink(l),!0;if(typeof l=="string")return i===void 0||i(l)?(e.toggleLink(l),!0):!1;let{url:u,target:p,rel:m,title:b}=l;return e.toggleLink(u,{rel:m,target:p,title:b}),!0},r.COMMAND_PRIORITY_LOW),i!==void 0?a.registerCommand(r.PASTE_COMMAND,l=>{let u=r.$getSelection();if(!r.$isRangeSelection(u)||u.isCollapsed()||!(l instanceof ClipboardEvent)||l.clipboardData==null)return!1;let p=l.clipboardData.getData("text");return i(p)?u.getNodes().some(m=>r.$isElementNode(m))?!1:(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,p),l.preventDefault(),!0):!1},r.COMMAND_PRIORITY_LOW):()=>{})},[a,i]),null},Np}process.env.NODE_ENV==="development"?S7():O7();var Sp={},tn={},L_;function A7(){if(L_)return tn;L_=1;var e=Xt(),t=yn();const n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(me){const _e=new o(me.__headerState,me.__colSpan,me.__width,me.__key);return _e.__rowSpan=me.__rowSpan,_e.__backgroundColor=me.__backgroundColor,_e}static importDOM(){return{td:me=>({conversion:i,priority:0}),th:me=>({conversion:i,priority:0})}}static importJSON(me){const _e=me.colSpan||1,De=me.rowSpan||1,Fe=a(me.headerState,_e,me.width||void 0);return Fe.__rowSpan=De,Fe.__backgroundColor=me.backgroundColor||null,Fe}constructor(me=r.NO_STATUS,_e=1,De,Fe){super(_e,Fe),this.__headerState=me,this.__width=De,this.__backgroundColor=null}createDOM(me){const _e=document.createElement(this.getTag());return this.__width&&(_e.style.width=`${this.__width}px`),this.__colSpan>1&&(_e.colSpan=this.__colSpan),this.__rowSpan>1&&(_e.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(_e.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(_e,me.theme.tableCell,this.hasHeader()&&me.theme.tableCellHeader),_e}exportDOM(me){const{element:_e}=super.exportDOM(me);if(_e){const De=_e,Fe=700,ke=this.getParentOrThrow().getChildrenSize();De.style.border="1px solid black",this.__colSpan>1&&(De.colSpan=this.__colSpan),this.__rowSpan>1&&(De.rowSpan=this.__rowSpan),De.style.width=`${this.getWidth()||Math.max(90,Fe/ke)}px`,De.style.verticalAlign="top",De.style.textAlign="start";const ze=this.getBackgroundColor();ze!==null?De.style.backgroundColor=ze:this.hasHeader()&&(De.style.backgroundColor="#f2f3f5")}return{element:_e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(me){const _e=this.getWritable();return _e.__headerState=me,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(me){const _e=this.getWritable();return _e.__width=me,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(me){this.getWritable().__backgroundColor=me}toggleHeaderStyle(me){const _e=this.getWritable();return(_e.__headerState&me)===me?_e.__headerState-=me:_e.__headerState+=me,_e}hasHeaderState(me){return(this.getHeaderStyles()&me)===me}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(me){return me.__headerState!==this.__headerState||me.__width!==this.__width||me.__colSpan!==this.__colSpan||me.__rowSpan!==this.__rowSpan||me.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(Se){const me=Se,_e=Se.nodeName.toLowerCase();let De;n.test(me.style.width)&&(De=parseFloat(me.style.width));const Fe=a(_e==="th"?r.ROW:r.NO_STATUS,me.colSpan,De);Fe.__rowSpan=me.rowSpan;const ke=me.style.backgroundColor;return ke!==""&&(Fe.__backgroundColor=ke),{forChild:(ze,tt)=>{if(l(tt)&&!e.$isElementNode(ze)){const ut=e.$createParagraphNode();return e.$isLineBreakNode(ze)&&ze.getTextContent()===`
|
|
274
|
-
`?null:(ut.append(ze),ut)}return ze},node:Fe}}function a(Se,me=1,_e){return e.$applyNodeReplacement(new o(Se,me,_e))}function l(Se){return Se instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(me){return new u(me.__height,me.__key)}static importDOM(){return{tr:me=>({conversion:p,priority:0})}}static importJSON(me){return m(me.height)}constructor(me,_e){super(_e),this.__height=me}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(me){const _e=document.createElement("tr");return this.__height&&(_e.style.height=`${this.__height}px`),t.addClassNamesToElement(_e,me.theme.tableRow),_e}isShadowRoot(){return!0}setHeight(me){const _e=this.getWritable();return _e.__height=me,this.__height}getHeight(){return this.getLatest().__height}updateDOM(me){return me.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(Se){const me=Se;let _e;return n.test(me.style.height)&&(_e=parseFloat(me.style.height)),{node:m(_e)}}function m(Se){return e.$applyNodeReplacement(new u(Se))}function b(Se){return Se instanceof u}const C=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=Se=>C?(Se||window).getSelection():null;class y{constructor(me,_e){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=_e,this.editor=me,this.grid={cells:[],columns:0,rows:0},this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(me=>me())}trackTableGrid(){const me=new MutationObserver(_e=>{this.editor.update(()=>{let De=!1;for(let ke=0;ke<_e.length;ke++){const ze=_e[ke].target.nodeName;if(ze==="TABLE"||ze==="TR"){De=!0;break}}if(!De)return;const Fe=this.editor.getElementByKey(this.tableNodeKey);if(!Fe)throw new Error("Expected to find TableElement in DOM");this.grid=P(Fe)})});this.editor.update(()=>{const _e=this.editor.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");this.grid=P(_e),me.observe(_e,{childList:!0,subtree:!0})})}clearHighlight(){const me=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.gridSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=me.getElementByKey(this.tableNodeKey);if(!De)throw new Error("Expected to find TableElement in DOM");const Fe=P(De);M(me,Fe,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(_e,me._config.theme.tableSelection),_e.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){const me=this.editor;me.update(()=>{const _e=me.getElementByKey(this.tableNodeKey);if(!_e)throw new Error("Expected to find TableElement in DOM");t.addClassNamesToElement(_e,me._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(me){if(me!=null&&me.gridKey===this.tableNodeKey){const _e=this.editor;this.gridSelection=me,this.isHighlightingCells=!0,this.disableHighlightStyle(),M(_e,this.grid,this.gridSelection)}else me==null?this.clearHighlight():(this.tableNodeKey=me.gridKey,this.updateTableGridSelection(me))}setFocusCellForSelection(me,_e=!1){const De=this.editor;De.update(()=>{const Fe=e.$getNodeByKey(this.tableNodeKey);if(!w(Fe))throw new Error("Expected TableNode.");if(!De.getElementByKey(this.tableNodeKey))throw new Error("Expected to find TableElement in DOM");const ke=me.x,ze=me.y;if(this.focusCell=me,this.anchorCell!==null){const tt=_(De._window);tt&&tt.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ke||this.anchorY!==ze||_e))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ke===this.focusX&&ze===this.focusY)return;if(this.focusX=ke,this.focusY=ze,this.isHighlightingCells){const tt=e.$getNearestNodeFromDOMNode(me.elem);if(this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(tt)){const ut=tt.getKey();this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ut,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),De.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),M(De,this.grid,this.gridSelection)}}})}setAnchorCellForSelection(me){this.isHighlightingCells=!1,this.anchorCell=me,this.anchorX=me.x,this.anchorY=me.y,this.editor.update(()=>{const _e=e.$getNearestNodeFromDOMNode(me.elem);if(l(_e)){const De=_e.getKey();this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=De}})}formatCells(me){this.editor.update(()=>{const _e=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(_e))throw Error("Expected grid selection");const De=e.$createRangeSelection(),Fe=De.anchor,ke=De.focus;_e.getNodes().forEach(ze=>{l(ze)&&ze.getTextContentSize()!==0&&(Fe.set(ze.getKey(),0,"element"),ke.set(ze.getKey(),ze.getChildrenSize(),"element"),De.formatText(me))}),e.$setSelection(_e),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){const me=this.editor;me.update(()=>{const _e=e.$getNodeByKey(this.tableNodeKey);if(!w(_e))throw new Error("Expected TableNode.");const De=e.$getSelection();if(!e.DEPRECATED_$isGridSelection(De))throw Error("Expected grid selection");const Fe=De.getNodes().filter(l);if(Fe.length===this.grid.columns*this.grid.rows){_e.selectPrevious(),_e.remove(),e.$getRoot().selectStart();return}Fe.forEach(ke=>{if(e.$isElementNode(ke)){const ze=e.$createParagraphNode(),tt=e.$createTextNode();ze.append(tt),ke.append(ze),ke.getChildren().forEach(ut=>{ut!==ze&&ut.remove()})}}),M(me,this.grid,null),e.$setSelection(null),me.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}}const v="__lexicalTableSelection";function T(Se,me,_e,De){const Fe=_e.getRootElement();if(Fe===null)throw new Error("No root element.");const ke=new y(_e,Se.getKey()),ze=_e._window||window;O(me,ke),me.addEventListener("mousedown",Qe=>{setTimeout(()=>{if(Qe.button!==0||!ze)return;const et=k(Qe.target);et!==null&&(re(Qe),ke.setAnchorCellForSelection(et));const lt=()=>{ze.removeEventListener("mouseup",lt),ze.removeEventListener("mousemove",wt)},wt=_t=>{const Rt=k(_t.target);Rt!==null&&(ke.anchorX!==Rt.x||ke.anchorY!==Rt.y)&&(_t.preventDefault(),ke.setFocusCellForSelection(Rt))};ze.addEventListener("mouseup",lt),ze.addEventListener("mousemove",wt)},0)});const tt=Qe=>{Qe.button===0&&_e.update(()=>{const et=e.$getSelection(),lt=Qe.target;e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&Fe.contains(lt)&&ke.clearHighlight()})};ze.addEventListener("mousedown",tt),ke.listenersToRemove.add(()=>ze.removeEventListener("mousedown",tt)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_DOWN_COMMAND,Qe=>ee(_e,Qe,"down",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_UP_COMMAND,Qe=>ee(_e,Qe,"up",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_LEFT_COMMAND,Qe=>ee(_e,Qe,"backward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,Qe=>ee(_e,Qe,"forward",Se,ke),e.COMMAND_PRIORITY_HIGH)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_ESCAPE_COMMAND,Qe=>{const et=e.$getSelection();if(e.DEPRECATED_$isGridSelection(et)){const lt=t.$findMatchingParent(et.focus.getNode(),l);if(l(lt))return re(Qe),lt.selectEnd(),!0}return!1},e.COMMAND_PRIORITY_HIGH));const ut=Qe=>()=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),kt=>l(kt));if(!l(lt))return!1;const wt=et.anchor.getNode(),_t=et.focus.getNode(),Rt=Se.isParentOf(wt),qe=Se.isParentOf(_t);if(Rt&&!qe||qe&&!Rt)return ke.clearText(),!0;const ot=t.$findMatchingParent(et.anchor.getNode(),kt=>e.$isElementNode(kt)),yt=ot&&t.$findMatchingParent(ot,kt=>e.$isElementNode(kt)&&l(kt.getParent()));if(!e.$isElementNode(yt)||!e.$isElementNode(ot))return!1;if(Qe===e.DELETE_LINE_COMMAND&&yt.getPreviousSibling()===null)return!0;if((Qe===e.DELETE_CHARACTER_COMMAND||Qe===e.DELETE_WORD_COMMAND)&&et.isCollapsed()&&et.anchor.offset===0&&ot!==yt){const kt=ot.getChildren(),Dt=e.$createParagraphNode();return kt.forEach(Kt=>Dt.append(Kt)),ot.replace(Dt),ot.getWritable().__parent=lt.getKey(),!0}}return!1};[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(Qe=>{ke.listenersToRemove.add(_e.registerCommand(Qe,ut(Qe),e.COMMAND_PRIORITY_CRITICAL))});const Et=Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return Qe.preventDefault(),Qe.stopPropagation(),ke.clearText(),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1};ke.listenersToRemove.add(_e.registerCommand(e.KEY_BACKSPACE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.KEY_DELETE_COMMAND,Et,e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FORMAT_TEXT_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.formatCells(Qe),!0;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,Qe=>{const et=e.$getSelection();if(!Q(et,Se))return!1;if(e.DEPRECATED_$isGridSelection(et))return ke.clearHighlight(),!1;if(e.$isRangeSelection(et)){const lt=t.$findMatchingParent(et.anchor.getNode(),wt=>l(wt));if(!l(lt))return!1}return!1},e.COMMAND_PRIORITY_CRITICAL)),De&&ke.listenersToRemove.add(_e.registerCommand(e.KEY_TAB_COMMAND,Qe=>{const et=e.$getSelection();if(!e.$isRangeSelection(et)||!et.isCollapsed()||!Q(et,Se))return!1;const lt=V(et.anchor.getNode());if(lt===null)return!1;re(Qe);const wt=Se.getCordsFromCellNode(lt,ke.grid);return Z(ke,Se,wt.x,wt.y,Qe.shiftKey?"backward":"forward"),!0},e.COMMAND_PRIORITY_CRITICAL)),ke.listenersToRemove.add(_e.registerCommand(e.FOCUS_COMMAND,Qe=>Se.isSelected(),e.COMMAND_PRIORITY_HIGH));function Bt(Qe){const et=Se.getCordsFromCellNode(Qe,ke.grid);return Se.getCellFromCordsOrThrow(et.x,et.y,ke.grid)}return ke.listenersToRemove.add(_e.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{const Qe=e.$getSelection(),et=e.$getPreviousSelection();if(e.$isRangeSelection(Qe)){const{anchor:lt,focus:wt}=Qe,_t=lt.getNode(),Rt=wt.getNode(),qe=V(_t),ot=V(Rt),yt=qe&&Se.is(j(qe)),kt=ot&&Se.is(j(ot)),Dt=yt!==kt,Kt=yt&&kt,sn=Qe.isBackward();if(Dt){const ur=Qe.clone();ur.focus.set(Se.getKey(),sn?0:Se.getChildrenSize(),"element"),e.$setSelection(ur),X(_e,ke)}else Kt&&(qe.is(ot)||(ke.setAnchorCellForSelection(Bt(qe)),ke.setFocusCellForSelection(Bt(ot),!0)))}return Qe&&!Qe.is(et)&&(e.DEPRECATED_$isGridSelection(Qe)||e.DEPRECATED_$isGridSelection(et))&&ke.gridSelection&&!ke.gridSelection.is(et)?(e.DEPRECATED_$isGridSelection(Qe)&&Qe.gridKey===ke.tableNodeKey?ke.updateTableGridSelection(Qe):!e.DEPRECATED_$isGridSelection(Qe)&&e.DEPRECATED_$isGridSelection(et)&&et.gridKey===ke.tableNodeKey&&ke.updateTableGridSelection(null),!1):(ke.hasHijackedSelectionStyles&&!Se.isSelected()?oe(_e,ke):!ke.hasHijackedSelectionStyles&&Se.isSelected()&&X(_e,ke),!1)},e.COMMAND_PRIORITY_CRITICAL)),ke}function O(Se,me){Se[v]=me}function R(Se){return Se[v]}function k(Se){let me=Se;for(;me!=null;){const _e=me.nodeName;if(_e==="TD"||_e==="TH"){const De=me._cell;return De===void 0?null:De}me=me.parentNode}return null}function P(Se){const me=[],_e={cells:me,columns:0,rows:0};let De=Se.firstChild,Fe=0,ke=0;for(me.length=0;De!=null;){const ze=De.nodeName;if(ze==="TD"||ze==="TH"){const Et=De,Bt={elem:Et,hasBackgroundColor:Et.style.backgroundColor!=="",highlighted:!1,x:Fe,y:ke};De._cell=Bt;let Qe=me[ke];Qe===void 0&&(Qe=me[ke]=[]),Qe[Fe]=Bt}else{const Et=De.firstChild;if(Et!=null){De=Et;continue}}const tt=De.nextSibling;if(tt!=null){Fe++,De=tt;continue}const ut=De.parentNode;if(ut!=null){const Et=ut.nextSibling;if(Et==null)break;ke++,Fe=0,De=Et}}return _e.columns=Fe+1,_e.rows=ke+1,_e}function M(Se,me,_e){const De=new Set(_e?_e.getNodes():[]);Y(me,(Fe,ke)=>{const ze=Fe.elem;De.has(ke)?(Fe.highlighted=!0,te(Se,Fe)):(Fe.highlighted=!1,fe(Se,Fe),ze.getAttribute("style")||ze.removeAttribute("style"))})}function Y(Se,me){const{cells:_e}=Se;for(let De=0;De<_e.length;De++){const Fe=_e[De];if(Fe)for(let ke=0;ke<Fe.length;ke++){const ze=Fe[ke];if(!ze)continue;const tt=e.$getNearestNodeFromDOMNode(ze.elem);tt!==null&&me(ze,tt,{x:ke,y:De})}}}function X(Se,me){me.disableHighlightStyle(),Y(me.grid,_e=>{_e.highlighted=!0,te(Se,_e)})}function oe(Se,me){me.enableHighlightStyle(),Y(me.grid,_e=>{const De=_e.elem;_e.highlighted=!1,fe(Se,_e),De.getAttribute("style")||De.removeAttribute("style")})}const Z=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)?de(me.getCellNodeFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid),ke):De!==(ke?Se.grid.rows-1:0)?de(me.getCellNodeFromCordsOrThrow(ke?0:Se.grid.columns-1,De+(ke?1:-1),Se.grid),ke):ke?me.selectNext():me.selectPrevious(),!0;case"up":return De!==0?de(me.getCellNodeFromCordsOrThrow(_e,De-1,Se.grid),!1):me.selectPrevious(),!0;case"down":return De!==Se.grid.rows-1?de(me.getCellNodeFromCordsOrThrow(_e,De+1,Se.grid),!0):me.selectNext(),!0;default:return!1}},U=(Se,me,_e,De,Fe)=>{const ke=Fe==="forward";switch(Fe){case"backward":case"forward":return _e!==(ke?Se.grid.columns-1:0)&&Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e+(ke?1:-1),De,Se.grid)),!0;case"up":return De!==0?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De-1,Se.grid)),!0):!1;case"down":return De!==Se.grid.rows-1?(Se.setFocusCellForSelection(me.getCellFromCordsOrThrow(_e,De+1,Se.grid)),!0):!1;default:return!1}};function Q(Se,me){if(e.$isRangeSelection(Se)||e.DEPRECATED_$isGridSelection(Se)){const _e=me.isParentOf(Se.anchor.getNode()),De=me.isParentOf(Se.focus.getNode());return _e&&De}return!1}function de(Se,me){me?Se.selectStart():Se.selectEnd()}const pe="172,206,247";function te(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null?_e.style.setProperty("background-color",`rgb(${pe})`):_e.style.setProperty("background-image",`linear-gradient(to right, rgba(${pe},0.85), rgba(${pe},0.85))`),_e.style.setProperty("caret-color","transparent")}function fe(Se,me){const _e=me.elem,De=e.$getNearestNodeFromDOMNode(_e);if(!l(De))throw Error("Expected to find LexicalNode from Table Cell DOMNode");De.getBackgroundColor()===null&&_e.style.removeProperty("background-color"),_e.style.removeProperty("background-image"),_e.style.removeProperty("caret-color")}function V(Se){const me=t.$findMatchingParent(Se,l);return l(me)?me:null}function j(Se){const me=t.$findMatchingParent(Se,w);return w(me)?me:null}function ee(Se,me,_e,De,Fe){const ke=e.$getSelection();if(!Q(ke,De))return!1;if(e.$isRangeSelection(ke)&&ke.isCollapsed()){if(_e==="backward"||_e==="forward")return!1;const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l);if(!l(ut)||!ut.is(Et))return!1;const Bt=j(ut);if(Bt!==De&&Bt!=null){const qe=Se.getElementByKey(Bt.getKey());if(qe!=null)return Fe.grid=P(qe),ee(Se,me,_e,Bt,Fe)}const Qe=Se.getElementByKey(ut.__key),et=Se.getElementByKey(ze.key);if(et==null||Qe==null)return!1;let lt;if(ze.type==="element")lt=et.getBoundingClientRect();else{const qe=window.getSelection();if(qe===null||qe.rangeCount===0)return!1;lt=qe.getRangeAt(0).getBoundingClientRect()}const wt=_e==="up"?ut.getFirstChild():ut.getLastChild();if(wt==null)return!1;const _t=Se.getElementByKey(wt.__key);if(_t==null)return!1;const Rt=_t.getBoundingClientRect();if(_e==="up"?Rt.top>lt.top-lt.height:lt.bottom+lt.height>Rt.bottom){re(me);const qe=De.getCordsFromCellNode(ut,Fe.grid);if(me.shiftKey){const ot=De.getCellFromCordsOrThrow(qe.x,qe.y,Fe.grid);Fe.setAnchorCellForSelection(ot),Fe.setFocusCellForSelection(ot,!0)}else return Z(Fe,De,qe.x,qe.y,_e);return!0}}else if(e.DEPRECATED_$isGridSelection(ke)){const{anchor:ze,focus:tt}=ke,ut=t.$findMatchingParent(ze.getNode(),l),Et=t.$findMatchingParent(tt.getNode(),l),[Bt]=ke.getNodes(),Qe=Se.getElementByKey(Bt.getKey());if(!l(ut)||!l(Et)||!w(Bt)||Qe==null)return!1;Fe.updateTableGridSelection(ke);const et=P(Qe),lt=De.getCordsFromCellNode(ut,et),wt=De.getCellFromCordsOrThrow(lt.x,lt.y,et);if(Fe.setAnchorCellForSelection(wt),re(me),me.shiftKey){const _t=De.getCordsFromCellNode(Et,et);return U(Fe,Bt,_t.x,_t.y,_e)}else Et.selectEnd();return!0}return!1}function re(Se){Se.preventDefault(),Se.stopImmediatePropagation(),Se.stopPropagation()}class B extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(me){return new B(me.__key)}static importDOM(){return{table:me=>({conversion:J,priority:1})}}static importJSON(me){return F()}constructor(me){super(me)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(me,_e){const De=document.createElement("table");return t.addClassNamesToElement(De,me.theme.table),De}updateDOM(){return!1}exportDOM(me){return{...super.exportDOM(me),after:_e=>{if(_e){const De=_e.cloneNode(),Fe=document.createElement("colgroup"),ke=document.createElement("tbody");t.isHTMLElement(_e)&&ke.append(..._e.children);const ze=this.getFirstChildOrThrow();if(!b(ze))throw new Error("Expected to find row node.");const tt=ze.getChildrenSize();for(let ut=0;ut<tt;ut++){const Et=document.createElement("col");Fe.append(Et)}return De.replaceChildren(Fe,ke),De}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(me,_e){const{rows:De,cells:Fe}=_e;for(let ke=0;ke<De;ke++){const ze=Fe[ke];if(ze==null)continue;const tt=ze.findIndex(ut=>{if(!ut)return;const{elem:Et}=ut;return e.$getNearestNodeFromDOMNode(Et)===me});if(tt!==-1)return{x:tt,y:ke}}throw new Error("Cell not found in table.")}getCellFromCords(me,_e,De){const{cells:Fe}=De,ke=Fe[_e];return ke==null?null:ke[me]??null}getCellFromCordsOrThrow(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(!Fe)throw new Error("Cell not found at cords.");return Fe}getCellNodeFromCords(me,_e,De){const Fe=this.getCellFromCords(me,_e,De);if(Fe==null)return null;const ke=e.$getNearestNodeFromDOMNode(Fe.elem);return l(ke)?ke:null}getCellNodeFromCordsOrThrow(me,_e,De){const Fe=this.getCellNodeFromCords(me,_e,De);if(!Fe)throw new Error("Node at cords not TableCellNode.");return Fe}canSelectBefore(){return!0}canIndent(){return!1}}function W(Se,me){const _e=Se.getElementByKey(me.getKey());if(_e==null)throw new Error("Table Element Not Found");return P(_e)}function J(Se){return{node:F()}}function F(){return e.$applyNodeReplacement(new B)}function w(Se){return Se instanceof B}function N(Se,me,_e=!0){const De=F();for(let Fe=0;Fe<Se;Fe++){const ke=m();for(let ze=0;ze<me;ze++){let tt=r.NO_STATUS;typeof _e=="object"?(Fe===0&&_e.rows&&(tt|=r.ROW),ze===0&&_e.columns&&(tt|=r.COLUMN)):_e&&(Fe===0&&(tt|=r.ROW),ze===0&&(tt|=r.COLUMN));const ut=a(tt),Et=e.$createParagraphNode();Et.append(e.$createTextNode()),ut.append(Et),ke.append(ut)}De.append(ke)}return De}function I(Se){const me=t.$findMatchingParent(Se,_e=>l(_e));return l(me)?me:null}function q(Se){const me=t.$findMatchingParent(Se,_e=>b(_e));if(b(me))return me;throw new Error("Expected table cell to be inside of table row.")}function ue(Se){const me=t.$findMatchingParent(Se,_e=>w(_e));if(w(me))return me;throw new Error("Expected table cell to be inside of table.")}function he(Se){const me=q(Se);return ue(me).getChildren().findIndex(_e=>_e.is(me))}function se(Se){return q(Se).getChildren().findIndex(me=>me.is(Se))}function Ce(Se,me){const _e=ue(Se),{x:De,y:Fe}=_e.getCordsFromCellNode(Se,me);return{above:_e.getCellNodeFromCords(De,Fe-1,me),below:_e.getCellNodeFromCords(De,Fe+1,me),left:_e.getCellNodeFromCords(De-1,Fe,me),right:_e.getCellNodeFromCords(De+1,Fe,me)}}function Oe(Se,me){const _e=Se.getChildren();if(me>=_e.length||me<0)throw new Error("Expected table cell to be inside of table row.");return _e[me].remove(),Se}function Be(Se,me,_e=!0,De,Fe){const ke=Se.getChildren();if(me>=ke.length||me<0)throw new Error("Table row target index out of range");const ze=ke[me];if(b(ze))for(let tt=0;tt<De;tt++){const ut=ze.getChildren(),Et=ut.length,Bt=m();for(let Qe=0;Qe<Et;Qe++){const et=ut[Qe];if(!l(et))throw Error("Expected table cell");const{above:lt,below:wt}=Ce(et,Fe);let _t=r.NO_STATUS;const Rt=lt&<.getWidth()||wt&&wt.getWidth()||void 0;(lt&<.hasHeaderState(r.COLUMN)||wt&&wt.hasHeaderState(r.COLUMN))&&(_t|=r.COLUMN);const qe=a(_t,1,Rt);qe.append(e.$createParagraphNode()),Bt.append(qe)}_e?ze.insertAfter(Bt):ze.insertBefore(Bt)}else throw new Error("Row before insertion index does not exist.");return Se}function ce(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a INTERNAL_PointSelection");const _e=me.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,ze]=e.DEPRECATED_$computeGridMap(Fe,De,De),tt=ke[0].length,{startRow:ut}=ze;if(Se){const Et=ut+De.__rowSpan-1,Bt=ke[Et],Qe=m();for(let lt=0;lt<tt;lt++){const{cell:wt,startRow:_t}=Bt[lt];_t+wt.__rowSpan-1<=Et?Qe.append(a(r.NO_STATUS)):wt.setRowSpan(wt.__rowSpan+1)}const et=Fe.getChildAtIndex(Et);if(!e.DEPRECATED_$isGridRowNode(et))throw Error("focusEndRow is not a GridRowNode");et.insertAfter(Qe)}else{const Et=ke[ut],Bt=m();for(let et=0;et<tt;et++){const{cell:lt,startRow:wt}=Et[et];wt===ut?Bt.append(a(r.NO_STATUS)):lt.setRowSpan(lt.__rowSpan+1)}const Qe=Fe.getChildAtIndex(ut);if(!e.DEPRECATED_$isGridRowNode(Qe))throw Error("focusEndRow is not a GridRowNode");Qe.insertBefore(Bt)}}function le(Se,me,_e=!0,De,Fe){const ke=Se.getChildren(),ze=[];for(let tt=0;tt<ke.length;tt++){const ut=ke[tt];if(b(ut))for(let Et=0;Et<De;Et++){const Bt=ut.getChildren();if(me>=Bt.length||me<0)throw new Error("Table column target index out of range");const Qe=Bt[me];if(!l(Qe))throw Error("Expected table cell");const{left:et,right:lt}=Ce(Qe,Fe);let wt=r.NO_STATUS;(et&&et.hasHeaderState(r.ROW)||lt&<.hasHeaderState(r.ROW))&&(wt|=r.ROW);const _t=a(wt);_t.append(e.$createParagraphNode()),ze.push({newTableCell:_t,targetCell:Qe})}}return ze.forEach(({newTableCell:tt,targetCell:ut})=>{_e?ut.insertAfter(tt):ut.insertBefore(tt)}),Se}function ve(Se=!0){const me=e.$getSelection();if(!e.$INTERNAL_isPointSelection(me))throw Error("Expected a PointSeleciton");const _e=me.anchor.getNode(),De=me.focus.getNode(),[Fe]=e.DEPRECATED_$getNodeTriplet(_e),[ke,,ze]=e.DEPRECATED_$getNodeTriplet(De),[tt,ut,Et]=e.DEPRECATED_$computeGridMap(ze,ke,Fe),Bt=tt.length,Qe=Se?Math.max(ut.startColumn,Et.startColumn):Math.min(ut.startColumn,Et.startColumn),et=Se?Qe+ke.__colSpan-1:Qe-1,lt=ze.getFirstChild();if(!e.DEPRECATED_$isGridRowNode(lt))throw Error("Expected firstTable child to be a row");let wt=null;function _t(){const qe=a(r.NO_STATUS).append(e.$createParagraphNode());return wt===null&&(wt=qe),qe}let Rt=lt;e:for(let qe=0;qe<Bt;qe++){if(qe!==0){const Kt=Rt.getNextSibling();if(!e.DEPRECATED_$isGridRowNode(Kt))throw Error("Expected row nextSibling to be a row");Rt=Kt}const ot=tt[qe];if(et<0){st(Rt,_t());continue}const{cell:yt,startColumn:kt,startRow:Dt}=ot[et];if(kt+yt.__colSpan-1<=et){let Kt=yt,sn=Dt,ur=et;for(;sn!==qe&&Kt.__rowSpan>1;)if(ur-=yt.__colSpan,ur>=0){const{cell:wr,startRow:Xo}=ot[ur];Kt=wr,sn=Xo}else{Rt.append(_t());continue e}Kt.insertAfter(_t())}else yt.setColSpan(yt.__colSpan+1)}wt!==null&&Xe(wt)}function Me(Se,me){const _e=Se.getChildren();for(let De=0;De<_e.length;De++){const Fe=_e[De];if(b(Fe)){const ke=Fe.getChildren();if(me>=ke.length||me<0)throw new Error("Table column target index out of range");ke[me].remove()}}return Se}function Pe(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startRow:Et}=tt,{startRow:Bt}=ut,Qe=Bt+ke.__rowSpan-1;if(ze.length===Qe-Et+1){Fe.remove();return}const et=ze[0].length,lt=ze[Qe+1],wt=Fe.getChildAtIndex(Qe+1);for(let _t=Qe;_t>=Et;_t--){for(let qe=et-1;qe>=0;qe--){const{cell:ot,startRow:yt,startColumn:kt}=ze[_t][qe];if(kt===qe&&(_t===Et&&yt<Et&&ot.setRowSpan(ot.__rowSpan-(yt-Et)),yt>=Et&&yt+ot.__rowSpan-1>Qe)){if(ot.setRowSpan(ot.__rowSpan-(Qe-yt+1)),wt===null)throw Error("Expected nextRowNode not to be null");if(qe===0)st(wt,ot);else{const{cell:Dt}=lt[qe-1];Dt.insertAfter(ot)}}}const Rt=Fe.getChildAtIndex(_t);if(!e.DEPRECATED_$isGridRowNode(Rt))throw Error(`Expected GridNode childAtIndex(${String(_t)}) to be RowNode`);Rt.remove()}if(lt!==void 0){const{cell:_t}=lt[0];Xe(_t)}else{const _t=ze[Et-1],{cell:Rt}=_t[0];Xe(Rt)}}function We(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),_e=Se.focus.getNode(),[De,,Fe]=e.DEPRECATED_$getNodeTriplet(me),[ke]=e.DEPRECATED_$getNodeTriplet(_e),[ze,tt,ut]=e.DEPRECATED_$computeGridMap(Fe,De,ke),{startColumn:Et}=tt,{startRow:Bt,startColumn:Qe}=ut,et=Math.min(Et,Qe),lt=Math.max(Et+De.__colSpan-1,Qe+ke.__colSpan-1),wt=lt-et+1;if(ze[0].length===lt-et+1){Fe.selectPrevious(),Fe.remove();return}const _t=ze.length;for(let ot=0;ot<_t;ot++)for(let yt=et;yt<=lt;yt++){const{cell:kt,startColumn:Dt}=ze[ot][yt];if(Dt<et){if(yt===et){const Kt=et-Dt;kt.setColSpan(kt.__colSpan-Math.min(wt,kt.__colSpan-Kt))}}else if(Dt+kt.__colSpan-1>lt){if(yt===lt){const Kt=lt-Dt+1;kt.setColSpan(kt.__colSpan-Kt)}}else kt.remove()}const Rt=ze[Bt],qe=Rt[Qe+ke.__colSpan];if(qe!==void 0){const{cell:ot}=qe;Xe(ot)}else{const ot=Rt[Qe-1],{cell:yt}=ot;Xe(yt)}}function Xe(Se){const me=Se.getFirstDescendant();me==null?Se.selectStart():me.getParentOrThrow().selectStart()}function st(Se,me){const _e=Se.getFirstChild();_e!==null?_e.insertBefore(me):Se.append(me)}function dt(){const Se=e.$getSelection();if(!e.$INTERNAL_isPointSelection(Se))throw Error("Expected a INTERNAL_PointSelection");const me=Se.anchor.getNode(),[_e,De,Fe]=e.DEPRECATED_$getNodeTriplet(me),ke=_e.__colSpan,ze=_e.__rowSpan;if(ke>1){for(let tt=1;tt<ke;tt++)_e.insertAfter(a(r.NO_STATUS));_e.setColSpan(1)}if(ze>1){const[tt,ut]=e.DEPRECATED_$computeGridMap(Fe,_e,_e),{startColumn:Et,startRow:Bt}=ut;let Qe;for(let et=1;et<ze;et++){const lt=Bt+et,wt=tt[lt];if(Qe=(Qe||De).getNextSibling(),!e.DEPRECATED_$isGridRowNode(Qe))throw Error("Expected row next sibling to be a row");let _t=null;for(let Rt=0;Rt<Et;Rt++){const qe=wt[Rt],ot=qe.cell;qe.startRow===lt&&(_t=ot),ot.__colSpan>1&&(Rt+=ot.__colSpan-1)}if(_t===null)for(let Rt=0;Rt<ke;Rt++)st(Qe,a(r.NO_STATUS));else for(let Rt=0;Rt<ke;Rt++)_t.insertAfter(a(r.NO_STATUS))}_e.setRowSpan(1)}}const Ct=e.createCommand("INSERT_TABLE_COMMAND");return tn.$createTableCellNode=a,tn.$createTableNode=F,tn.$createTableNodeWithDimensions=N,tn.$createTableRowNode=m,tn.$deleteTableColumn=Me,tn.$deleteTableColumn__EXPERIMENTAL=We,tn.$deleteTableRow__EXPERIMENTAL=Pe,tn.$getElementGridForTableNode=W,tn.$getTableCellNodeFromLexicalNode=I,tn.$getTableColumnIndexFromTableCellNode=se,tn.$getTableNodeFromLexicalNodeOrThrow=ue,tn.$getTableRowIndexFromTableCellNode=he,tn.$getTableRowNodeFromTableCellNodeOrThrow=q,tn.$insertTableColumn=le,tn.$insertTableColumn__EXPERIMENTAL=ve,tn.$insertTableRow=Be,tn.$insertTableRow__EXPERIMENTAL=ce,tn.$isTableCellNode=l,tn.$isTableNode=w,tn.$isTableRowNode=b,tn.$removeTableRowAtIndex=Oe,tn.$unmergeCell=dt,tn.INSERT_TABLE_COMMAND=Ct,tn.TableCellHeaderStates=r,tn.TableCellNode=o,tn.TableNode=B,tn.TableRowNode=u,tn.TableSelection=y,tn.applyTableHandlers=T,tn.getCellFromTarget=k,tn.getTableSelectionFromTableElement=R,tn}var nn={},F_;function R7(){if(F_)return nn;F_=1;var e=Xt(),t=yn();let n=/^(\d+(?:\.\d+)?)px$/,r={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class o extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(N){let I=new o(N.__headerState,N.__colSpan,N.__width,N.__key);return I.__rowSpan=N.__rowSpan,I.__backgroundColor=N.__backgroundColor,I}static importDOM(){return{td:()=>({conversion:i,priority:0}),th:()=>({conversion:i,priority:0})}}static importJSON(N){let I=N.rowSpan||1,q=a(N.headerState,N.colSpan||1,N.width||void 0);return q.__rowSpan=I,q.__backgroundColor=N.backgroundColor||null,q}constructor(N=r.NO_STATUS,I=1,q,ue){super(I,ue),this.__headerState=N,this.__width=q,this.__backgroundColor=null}createDOM(N){let I=document.createElement(this.getTag());return this.__width&&(I.style.width=`${this.__width}px`),1<this.__colSpan&&(I.colSpan=this.__colSpan),1<this.__rowSpan&&(I.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(I.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(I,N.theme.tableCell,this.hasHeader()&&N.theme.tableCellHeader),I}exportDOM(N){if({element:N}=super.exportDOM(N),N){var I=this.getParentOrThrow().getChildrenSize();N.style.border="1px solid black",1<this.__colSpan&&(N.colSpan=this.__colSpan),1<this.__rowSpan&&(N.rowSpan=this.__rowSpan),N.style.width=`${this.getWidth()||Math.max(90,700/I)}px`,N.style.verticalAlign="top",N.style.textAlign="start",I=this.getBackgroundColor(),I!==null?N.style.backgroundColor=I:this.hasHeader()&&(N.style.backgroundColor="#f2f3f5")}return{element:N}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(N){return this.getWritable().__headerState=N,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(N){return this.getWritable().__width=N,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(N){this.getWritable().__backgroundColor=N}toggleHeaderStyle(N){let I=this.getWritable();return I.__headerState=(I.__headerState&N)===N?I.__headerState-N:I.__headerState+N,I}hasHeaderState(N){return(this.getHeaderStyles()&N)===N}hasHeader(){return this.getLatest().__headerState!==r.NO_STATUS}updateDOM(N){return N.__headerState!==this.__headerState||N.__width!==this.__width||N.__colSpan!==this.__colSpan||N.__rowSpan!==this.__rowSpan||N.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function i(w){var N=w.nodeName.toLowerCase();let I;return n.test(w.style.width)&&(I=parseFloat(w.style.width)),N=a(N==="th"?r.ROW:r.NO_STATUS,w.colSpan,I),N.__rowSpan=w.rowSpan,w=w.style.backgroundColor,w!==""&&(N.__backgroundColor=w),{forChild:(q,ue)=>l(ue)&&!e.$isElementNode(q)?(ue=e.$createParagraphNode(),e.$isLineBreakNode(q)&&q.getTextContent()===`
|
|
275
|
-
`?null:(ue.append(q),ue)):q,node:N}}function a(w,N=1,I){return e.$applyNodeReplacement(new o(w,N,I))}function l(w){return w instanceof o}class u extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(N){return new u(N.__height,N.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(N){return m(N.height)}constructor(N,I){super(I),this.__height=N}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(N){let I=document.createElement("tr");return this.__height&&(I.style.height=`${this.__height}px`),t.addClassNamesToElement(I,N.theme.tableRow),I}isShadowRoot(){return!0}setHeight(N){return this.getWritable().__height=N,this.__height}getHeight(){return this.getLatest().__height}updateDOM(N){return N.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(w){let N;return n.test(w.style.height)&&(N=parseFloat(w.style.height)),{node:m(N)}}function m(w){return e.$applyNodeReplacement(new u(w))}function b(w){return w instanceof u}function C(w){let N=new URLSearchParams;N.append("code",w);for(let I=1;I<arguments.length;I++)N.append("v",arguments[I]);throw Error(`Minified Lexical error #${w}; visit https://lexical.dev/docs/error?${N} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let _=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class y{constructor(N,I){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=I,this.editor=N,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(N=>N())}trackTableGrid(){let N=new MutationObserver(I=>{this.editor.update(()=>{var q=!1;for(let ue=0;ue<I.length;ue++){const he=I[ue].target.nodeName;if(he==="TABLE"||he==="TR"){q=!0;break}}if(q){if(q=this.editor.getElementByKey(this.tableNodeKey),!q)throw Error("Expected to find TableElement in DOM");this.grid=T(q)}})});this.editor.update(()=>{let I=this.editor.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");this.grid=T(I),N.observe(I,{childList:!0,subtree:!0})})}clearHighlight(){let N=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),N.update(()=>{var I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");if(I=N.getElementByKey(this.tableNodeKey),!I)throw Error("Expected to find TableElement in DOM");I=T(I),O(N,I,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(I,N._config.theme.tableSelection),I.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){let N=this.editor;N.update(()=>{let I=N.getElementByKey(this.tableNodeKey);if(!I)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(I,N._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(N){if(N!=null&&N.gridKey===this.tableNodeKey){let I=this.editor;this.gridSelection=N,this.isHighlightingCells=!0,this.disableHighlightStyle(),O(I,this.grid,this.gridSelection)}else N==null?this.clearHighlight():(this.tableNodeKey=N.gridKey,this.updateTableGridSelection(N))}setFocusCellForSelection(N,I=!1){let q=this.editor;q.update(()=>{var ue=e.$getNodeByKey(this.tableNodeKey);if(!j(ue))throw Error("Expected TableNode.");if(!q.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");ue=N.x;let he=N.y;if(this.focusCell=N,this.anchorCell!==null){let se=_?(q._window||window).getSelection():null;se&&se.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(!this.isHighlightingCells&&(this.anchorX!==ue||this.anchorY!==he||I))this.isHighlightingCells=!0,this.disableHighlightStyle();else if(ue===this.focusX&&he===this.focusY)return;this.focusX=ue,this.focusY=he,this.isHighlightingCells&&(ue=e.$getNearestNodeFromDOMNode(N.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&l(ue)&&(ue=ue.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=ue,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),q.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),O(q,this.grid,this.gridSelection)))})}setAnchorCellForSelection(N){this.isHighlightingCells=!1,this.anchorCell=N,this.anchorX=N.x,this.anchorY=N.y,this.editor.update(()=>{var I=e.$getNearestNodeFromDOMNode(N.elem);l(I)&&(I=I.getKey(),this.gridSelection=this.gridSelection!=null?this.gridSelection.clone():e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=I)})}formatCells(N){this.editor.update(()=>{let I=e.$getSelection();e.DEPRECATED_$isGridSelection(I)||C(11);let q=e.$createRangeSelection(),ue=q.anchor,he=q.focus;I.getNodes().forEach(se=>{l(se)&&se.getTextContentSize()!==0&&(ue.set(se.getKey(),0,"element"),he.set(se.getKey(),se.getChildrenSize(),"element"),q.formatText(N))}),e.$setSelection(I),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){let N=this.editor;N.update(()=>{let I=e.$getNodeByKey(this.tableNodeKey);if(!j(I))throw Error("Expected TableNode.");var q=e.$getSelection();e.DEPRECATED_$isGridSelection(q)||C(11),q=q.getNodes().filter(l),q.length===this.grid.columns*this.grid.rows?(I.selectPrevious(),I.remove(),e.$getRoot().selectStart()):(q.forEach(ue=>{if(e.$isElementNode(ue)){let he=e.$createParagraphNode(),se=e.$createTextNode();he.append(se),ue.append(he),ue.getChildren().forEach(Ce=>{Ce!==he&&Ce.remove()})}}),O(N,this.grid,null),e.$setSelection(null),N.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function v(w){for(;w!=null;){let N=w.nodeName;if(N==="TD"||N==="TH"){if(w=w._cell,w===void 0)break;return w}w=w.parentNode}return null}function T(w){let N=[],I={cells:N,columns:0,rows:0};var q=w.firstChild;let ue=w=0;for(N.length=0;q!=null;){var he=q.nodeName;if(he==="TD"||he==="TH"){he=q,he={elem:he,hasBackgroundColor:he.style.backgroundColor!=="",highlighted:!1,x:w,y:ue},q._cell=he;let se=N[ue];se===void 0&&(se=N[ue]=[]),se[w]=he}else if(he=q.firstChild,he!=null){q=he;continue}if(he=q.nextSibling,he!=null)w++,q=he;else if(he=q.parentNode,he!=null){if(q=he.nextSibling,q==null)break;ue++,w=0}}return I.columns=w+1,I.rows=ue+1,I}function O(w,N,I){let q=new Set(I?I.getNodes():[]);R(N,(ue,he)=>{let se=ue.elem;q.has(he)?(ue.highlighted=!0,oe(w,ue)):(ue.highlighted=!1,Z(w,ue),se.getAttribute("style")||se.removeAttribute("style"))})}function R(w,N){({cells:w}=w);for(let I=0;I<w.length;I++){let q=w[I];if(q)for(let ue=0;ue<q.length;ue++){let he=q[ue];if(!he)continue;let se=e.$getNearestNodeFromDOMNode(he.elem);se!==null&&N(he,se,{x:ue,y:I})}}}function k(w,N){N.disableHighlightStyle(),R(N.grid,I=>{I.highlighted=!0,oe(w,I)})}function P(w,N){N.enableHighlightStyle(),R(N.grid,I=>{let q=I.elem;I.highlighted=!1,Z(w,I),q.getAttribute("style")||q.removeAttribute("style")})}let M=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)?(w=N.getCellNodeFromCordsOrThrow(I+(he?1:-1),q,w.grid),he?w.selectStart():w.selectEnd()):q!==(he?w.grid.rows-1:0)?(w=N.getCellNodeFromCordsOrThrow(he?0:w.grid.columns-1,q+(he?1:-1),w.grid),he?w.selectStart():w.selectEnd()):he?N.selectNext():N.selectPrevious(),!0;case"up":return q!==0?N.getCellNodeFromCordsOrThrow(I,q-1,w.grid).selectEnd():N.selectPrevious(),!0;case"down":return q!==w.grid.rows-1?N.getCellNodeFromCordsOrThrow(I,q+1,w.grid).selectStart():N.selectNext(),!0;default:return!1}},Y=(w,N,I,q,ue)=>{const he=ue==="forward";switch(ue){case"backward":case"forward":return I!==(he?w.grid.columns-1:0)&&w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I+(he?1:-1),q,w.grid)),!0;case"up":return q!==0?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q-1,w.grid)),!0):!1;case"down":return q!==w.grid.rows-1?(w.setFocusCellForSelection(N.getCellFromCordsOrThrow(I,q+1,w.grid)),!0):!1;default:return!1}};function X(w,N){if(e.$isRangeSelection(w)||e.DEPRECATED_$isGridSelection(w)){let I=N.isParentOf(w.anchor.getNode());return w=N.isParentOf(w.focus.getNode()),I&&w}return!1}function oe(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null?w.style.setProperty("background-color","rgb(172,206,247)"):w.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),w.style.setProperty("caret-color","transparent")}function Z(w,N){w=N.elem,N=e.$getNearestNodeFromDOMNode(w),l(N)||C(131),N.getBackgroundColor()===null&&w.style.removeProperty("background-color"),w.style.removeProperty("background-image"),w.style.removeProperty("caret-color")}function U(w){return w=t.$findMatchingParent(w,l),l(w)?w:null}function Q(w){return w=t.$findMatchingParent(w,j),j(w)?w:null}function de(w,N,I,q,ue){let he=e.$getSelection();if(!X(he,q))return!1;if(e.$isRangeSelection(he)&&he.isCollapsed()){if(I==="backward"||I==="forward")return!1;let{anchor:Be,focus:ce}=he;var se=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l);if(!l(se)||!se.is(Ce))return!1;if(Ce=Q(se),Ce!==q&&Ce!=null){var Oe=w.getElementByKey(Ce.getKey());if(Oe!=null)return ue.grid=T(Oe),de(w,N,I,Ce,ue)}if(Ce=w.getElementByKey(se.__key),Oe=w.getElementByKey(Be.key),Oe==null||Ce==null)return!1;if(Be.type==="element")Ce=Oe.getBoundingClientRect();else{if(Ce=window.getSelection(),Ce===null||Ce.rangeCount===0)return!1;Ce=Ce.getRangeAt(0).getBoundingClientRect()}if(Oe=I==="up"?se.getFirstChild():se.getLastChild(),Oe==null||(w=w.getElementByKey(Oe.__key),w==null))return!1;if(w=w.getBoundingClientRect(),I==="up"?w.top>Ce.top-Ce.height:Ce.bottom+Ce.height>w.bottom){if(pe(N),w=q.getCordsFromCellNode(se,ue.grid),N.shiftKey)I=q.getCellFromCordsOrThrow(w.x,w.y,ue.grid),ue.setAnchorCellForSelection(I),ue.setFocusCellForSelection(I,!0);else return M(ue,q,w.x,w.y,I);return!0}}else if(e.DEPRECATED_$isGridSelection(he)){let{anchor:Be,focus:ce}=he;return Oe=t.$findMatchingParent(Be.getNode(),l),Ce=t.$findMatchingParent(ce.getNode(),l),[se]=he.getNodes(),w=w.getElementByKey(se.getKey()),!l(Oe)||!l(Ce)||!j(se)||w==null?!1:(ue.updateTableGridSelection(he),w=T(w),Oe=q.getCordsFromCellNode(Oe,w),Oe=q.getCellFromCordsOrThrow(Oe.x,Oe.y,w),ue.setAnchorCellForSelection(Oe),pe(N),N.shiftKey?(N=q.getCordsFromCellNode(Ce,w),Y(ue,se,N.x,N.y,I)):(Ce.selectEnd(),!0))}return!1}function pe(w){w.preventDefault(),w.stopImmediatePropagation(),w.stopPropagation()}class te extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(N){return new te(N.__key)}static importDOM(){return{table:()=>({conversion:fe,priority:1})}}static importJSON(){return V()}constructor(N){super(N)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(N){let I=document.createElement("table");return t.addClassNamesToElement(I,N.theme.table),I}updateDOM(){return!1}exportDOM(N){return{...super.exportDOM(N),after:I=>{if(I){let q=I.cloneNode(),ue=document.createElement("colgroup"),he=document.createElement("tbody");if(t.isHTMLElement(I)&&he.append(...I.children),I=this.getFirstChildOrThrow(),!b(I))throw Error("Expected to find row node.");I=I.getChildrenSize();for(let se=0;se<I;se++){let Ce=document.createElement("col");ue.append(Ce)}return q.replaceChildren(ue,he),q}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(N,I){let{rows:q,cells:ue}=I;for(I=0;I<q;I++){var he=ue[I];if(he!=null&&(he=he.findIndex(se=>{if(se)return{elem:se}=se,e.$getNearestNodeFromDOMNode(se)===N}),he!==-1))return{x:he,y:I}}throw Error("Cell not found in table.")}getCellFromCords(N,I,q){return{cells:q}=q,I=q[I],I==null?null:(N=I[N],N??null)}getCellFromCordsOrThrow(N,I,q){if(N=this.getCellFromCords(N,I,q),!N)throw Error("Cell not found at cords.");return N}getCellNodeFromCords(N,I,q){return N=this.getCellFromCords(N,I,q),N==null?null:(N=e.$getNearestNodeFromDOMNode(N.elem),l(N)?N:null)}getCellNodeFromCordsOrThrow(N,I,q){if(N=this.getCellNodeFromCords(N,I,q),!N)throw Error("Node at cords not TableCellNode.");return N}canSelectBefore(){return!0}canIndent(){return!1}}function fe(){return{node:V()}}function V(){return e.$applyNodeReplacement(new te)}function j(w){return w instanceof te}function ee(w){if(w=t.$findMatchingParent(w,N=>b(N)),b(w))return w;throw Error("Expected table cell to be inside of table row.")}function re(w){if(w=t.$findMatchingParent(w,N=>j(N)),j(w))return w;throw Error("Expected table cell to be inside of table.")}function B(w,N){let I=re(w),{x:q,y:ue}=I.getCordsFromCellNode(w,N);return{above:I.getCellNodeFromCords(q,ue-1,N),below:I.getCellNodeFromCords(q,ue+1,N),left:I.getCellNodeFromCords(q-1,ue,N),right:I.getCellNodeFromCords(q+1,ue,N)}}function W(w){let N=w.getFirstDescendant();N==null?w.selectStart():N.getParentOrThrow().selectStart()}function J(w,N){let I=w.getFirstChild();I!==null?I.insertBefore(N):w.append(N)}let F=e.createCommand("INSERT_TABLE_COMMAND");return nn.$createTableCellNode=a,nn.$createTableNode=V,nn.$createTableNodeWithDimensions=function(w,N,I=!0){let q=V();for(let he=0;he<w;he++){let se=m();for(let Ce=0;Ce<N;Ce++){var ue=r.NO_STATUS;typeof I=="object"?(he===0&&I.rows&&(ue|=r.ROW),Ce===0&&I.columns&&(ue|=r.COLUMN)):I&&(he===0&&(ue|=r.ROW),Ce===0&&(ue|=r.COLUMN)),ue=a(ue);let Oe=e.$createParagraphNode();Oe.append(e.$createTextNode()),ue.append(Oe),se.append(ue)}q.append(se)}return q},nn.$createTableRowNode=m,nn.$deleteTableColumn=function(w,N){let I=w.getChildren();for(let ue=0;ue<I.length;ue++){var q=I[ue];if(b(q)){if(q=q.getChildren(),N>=q.length||0>N)throw Error("Table column target index out of range");q[N].remove()}}return w},nn.$deleteTableColumn__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[N]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,N);var{startColumn:Ce}=he;let{startRow:Oe,startColumn:Be}=se;w=Math.min(Ce,Be),Ce=Math.max(Ce+I.__colSpan-1,Be+N.__colSpan-1);let ce=Ce-w+1;if(ue[0].length===Ce-w+1)q.selectPrevious(),q.remove();else{var le=ue.length;for(let ve=0;ve<le;ve++)for(let Me=w;Me<=Ce;Me++){let{cell:Pe,startColumn:We}=ue[ve][Me];We<w?Me===w&&Pe.setColSpan(Pe.__colSpan-Math.min(ce,Pe.__colSpan-(w-We))):We+Pe.__colSpan-1>Ce?Me===Ce&&Pe.setColSpan(Pe.__colSpan-(Ce-We+1)):Pe.remove()}w=ue[Oe],N=w[Be+N.__colSpan],N!==void 0?({cell:N}=N,W(N)):({cell:N}=w[Be-1],W(N))}},nn.$deleteTableRow__EXPERIMENTAL=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");var N=w.anchor.getNode();w=w.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N);[w]=e.DEPRECATED_$getNodeTriplet(w);let[ue,he,se]=e.DEPRECATED_$computeGridMap(q,I,w);({startRow:N}=he);var{startRow:Ce}=se;if(w=Ce+w.__rowSpan-1,ue.length===w-N+1)q.remove();else{Ce=ue[0].length;var Oe=ue[w+1],Be=q.getChildAtIndex(w+1);for(let le=w;le>=N;le--){for(var ce=Ce-1;0<=ce;ce--){let{cell:ve,startRow:Me,startColumn:Pe}=ue[le][ce];if(Pe===ce&&(le===N&&Me<N&&ve.setRowSpan(ve.__rowSpan-(Me-N)),Me>=N&&Me+ve.__rowSpan-1>w))if(ve.setRowSpan(ve.__rowSpan-(w-Me+1)),Be===null&&C(122),ce===0)J(Be,ve);else{let{cell:We}=Oe[ce-1];We.insertAfter(ve)}}ce=q.getChildAtIndex(le),e.DEPRECATED_$isGridRowNode(ce)||C(123,String(le)),ce.remove()}Oe!==void 0?({cell:N}=Oe[0],W(N)):({cell:N}=ue[N-1][0],W(N))}},nn.$getElementGridForTableNode=function(w,N){if(w=w.getElementByKey(N.getKey()),w==null)throw Error("Table Element Not Found");return T(w)},nn.$getTableCellNodeFromLexicalNode=function(w){return w=t.$findMatchingParent(w,N=>l(N)),l(w)?w:null},nn.$getTableColumnIndexFromTableCellNode=function(w){return ee(w).getChildren().findIndex(N=>N.is(w))},nn.$getTableNodeFromLexicalNodeOrThrow=re,nn.$getTableRowIndexFromTableCellNode=function(w){let N=ee(w);return re(N).getChildren().findIndex(I=>I.is(N))},nn.$getTableRowNodeFromTableCellNodeOrThrow=ee,nn.$insertTableColumn=function(w,N,I=!0,q,ue){let he=w.getChildren(),se=[];for(let Be=0;Be<he.length;Be++){let ce=he[Be];if(b(ce))for(let le=0;le<q;le++){var Ce=ce.getChildren();if(N>=Ce.length||0>N)throw Error("Table column target index out of range");Ce=Ce[N],l(Ce)||C(12);let{left:ve,right:Me}=B(Ce,ue);var Oe=r.NO_STATUS;(ve&&ve.hasHeaderState(r.ROW)||Me&&Me.hasHeaderState(r.ROW))&&(Oe|=r.ROW),Oe=a(Oe),Oe.append(e.$createParagraphNode()),se.push({newTableCell:Oe,targetCell:Ce})}}return se.forEach(({newTableCell:Be,targetCell:ce})=>{I?ce.insertAfter(Be):ce.insertBefore(Be)}),w},nn.$insertTableColumn__EXPERIMENTAL=function(w=!0){function N(){let le=a(r.NO_STATUS).append(e.$createParagraphNode());return Be===null&&(Be=le),le}var I=e.$getSelection();if(!e.$INTERNAL_isPointSelection(I))throw Error("Expected a PointSeleciton");var q=I.anchor.getNode();I=I.focus.getNode(),[q]=e.DEPRECATED_$getNodeTriplet(q);let[ue,,he]=e.DEPRECATED_$getNodeTriplet(I),[se,Ce,Oe]=e.DEPRECATED_$computeGridMap(he,ue,q);q=se.length,I=w?Math.max(Ce.startColumn,Oe.startColumn):Math.min(Ce.startColumn,Oe.startColumn),w=w?I+ue.__colSpan-1:I-1,I=he.getFirstChild(),e.DEPRECATED_$isGridRowNode(I)||C(120);let Be=null;var ce=I;e:for(I=0;I<q;I++){I!==0&&(ce=ce.getNextSibling(),e.DEPRECATED_$isGridRowNode(ce)||C(121));let le=se[I];if(0>w){J(ce,N());continue}let{cell:ve,startColumn:Me,startRow:Pe}=le[w];if(Me+ve.__colSpan-1<=w){let We=ve,Xe=Pe,st=w;for(;Xe!==I&&1<We.__rowSpan;)if(st-=ve.__colSpan,0<=st){let{cell:dt,startRow:Ct}=le[st];We=dt,Xe=Ct}else{ce.append(N());continue e}We.insertAfter(N())}else ve.setColSpan(ve.__colSpan+1)}Be!==null&&W(Be)},nn.$insertTableRow=function(w,N,I=!0,q,ue){var he=w.getChildren();if(N>=he.length||0>N)throw Error("Table row target index out of range");if(N=he[N],b(N))for(he=0;he<q;he++){let Ce=N.getChildren(),Oe=Ce.length,Be=m();for(let ce=0;ce<Oe;ce++){var se=Ce[ce];l(se)||C(12);let{above:le,below:ve}=B(se,ue);se=r.NO_STATUS;let Me=le&&le.getWidth()||ve&&ve.getWidth()||void 0;(le&&le.hasHeaderState(r.COLUMN)||ve&&ve.hasHeaderState(r.COLUMN))&&(se|=r.COLUMN),se=a(se,1,Me),se.append(e.$createParagraphNode()),Be.append(se)}I?N.insertAfter(Be):N.insertBefore(Be)}else throw Error("Row before insertion index does not exist.");return w},nn.$insertTableRow__EXPERIMENTAL=function(w=!0){var N=e.$getSelection();if(!e.$INTERNAL_isPointSelection(N))throw Error("Expected a INTERNAL_PointSelection");N=N.focus.getNode();let[I,,q]=e.DEPRECATED_$getNodeTriplet(N),[ue,he]=e.DEPRECATED_$computeGridMap(q,I,I);N=ue[0].length;var{startRow:se}=he;if(w){w=se+I.__rowSpan-1;var Ce=ue[w];se=m();for(var Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce+Be.__rowSpan-1<=w?se.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(w),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertAfter(se)}else{for(Ce=ue[se],w=m(),Oe=0;Oe<N;Oe++){let{cell:Be,startRow:ce}=Ce[Oe];ce===se?w.append(a(r.NO_STATUS)):Be.setRowSpan(Be.__rowSpan+1)}N=q.getChildAtIndex(se),e.DEPRECATED_$isGridRowNode(N)||C(119),N.insertBefore(w)}},nn.$isTableCellNode=l,nn.$isTableNode=j,nn.$isTableRowNode=b,nn.$removeTableRowAtIndex=function(w,N){let I=w.getChildren();if(N>=I.length||0>N)throw Error("Expected table cell to be inside of table row.");return I[N].remove(),w},nn.$unmergeCell=function(){var w=e.$getSelection();if(!e.$INTERNAL_isPointSelection(w))throw Error("Expected a INTERNAL_PointSelection");w=w.anchor.getNode();let[N,I,q]=e.DEPRECATED_$getNodeTriplet(w);w=N.__colSpan;let ue=N.__rowSpan;if(1<w){for(var he=1;he<w;he++)N.insertAfter(a(r.NO_STATUS));N.setColSpan(1)}if(1<ue){let[Oe,Be]=e.DEPRECATED_$computeGridMap(q,N,N),{startColumn:ce,startRow:le}=Be,ve;for(he=1;he<ue;he++){var se=le+he;let Me=Oe[se];ve=(ve||I).getNextSibling(),e.DEPRECATED_$isGridRowNode(ve)||C(125);var Ce=null;for(let Pe=0;Pe<ce;Pe++){let We=Me[Pe],Xe=We.cell;We.startRow===se&&(Ce=Xe),1<Xe.__colSpan&&(Pe+=Xe.__colSpan-1)}if(Ce===null)for(Ce=0;Ce<w;Ce++)J(ve,a(r.NO_STATUS));else for(se=0;se<w;se++)Ce.insertAfter(a(r.NO_STATUS))}N.setRowSpan(1)}},nn.INSERT_TABLE_COMMAND=F,nn.TableCellHeaderStates=r,nn.TableCellNode=o,nn.TableNode=te,nn.TableRowNode=u,nn.TableSelection=y,nn.applyTableHandlers=function(w,N,I,q){function ue(ce){return ce=w.getCordsFromCellNode(ce,se.grid),w.getCellFromCordsOrThrow(ce.x,ce.y,se.grid)}let he=I.getRootElement();if(he===null)throw Error("No root element.");let se=new y(I,w.getKey()),Ce=I._window||window;N.__lexicalTableSelection=se,N.addEventListener("mousedown",ce=>{setTimeout(()=>{if(ce.button===0&&Ce){var le=v(ce.target);le!==null&&(pe(ce),se.setAnchorCellForSelection(le));var ve=()=>{Ce.removeEventListener("mouseup",ve),Ce.removeEventListener("mousemove",Me)},Me=Pe=>{const We=v(Pe.target);We===null||se.anchorX===We.x&&se.anchorY===We.y||(Pe.preventDefault(),se.setFocusCellForSelection(We))};Ce.addEventListener("mouseup",ve),Ce.addEventListener("mousemove",Me)}},0)});let Oe=ce=>{ce.button===0&&I.update(()=>{const le=e.$getSelection(),ve=ce.target;e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&he.contains(ve)&&se.clearHighlight()})};Ce.addEventListener("mousedown",Oe),se.listenersToRemove.add(()=>Ce.removeEventListener("mousedown",Oe)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_DOWN_COMMAND,ce=>de(I,ce,"down",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_UP_COMMAND,ce=>de(I,ce,"up",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_LEFT_COMMAND,ce=>de(I,ce,"backward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,ce=>de(I,ce,"forward",w,se),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.KEY_ESCAPE_COMMAND,ce=>{var le=e.$getSelection();return e.DEPRECATED_$isGridSelection(le)&&(le=t.$findMatchingParent(le.focus.getNode(),l),l(le))?(pe(ce),le.selectEnd(),!0):!1},e.COMMAND_PRIORITY_HIGH));let Be=ce=>()=>{var le=e.$getSelection();if(!X(le,w))return!1;if(e.DEPRECATED_$isGridSelection(le))return se.clearText(),!0;if(e.$isRangeSelection(le)){const Pe=t.$findMatchingParent(le.anchor.getNode(),We=>l(We));if(!l(Pe))return!1;var ve=le.anchor.getNode(),Me=le.focus.getNode();if(ve=w.isParentOf(ve),Me=w.isParentOf(Me),ve&&!Me||Me&&!ve)return se.clearText(),!0;if(ve=(Me=t.$findMatchingParent(le.anchor.getNode(),We=>e.$isElementNode(We)))&&t.$findMatchingParent(Me,We=>e.$isElementNode(We)&&l(We.getParent())),!e.$isElementNode(ve)||!e.$isElementNode(Me))return!1;if(ce===e.DELETE_LINE_COMMAND&&ve.getPreviousSibling()===null)return!0;if((ce===e.DELETE_CHARACTER_COMMAND||ce===e.DELETE_WORD_COMMAND)&&le.isCollapsed()&&le.anchor.offset===0&&Me!==ve){le=Me.getChildren();const We=e.$createParagraphNode();return le.forEach(Xe=>We.append(Xe)),Me.replace(We),Me.getWritable().__parent=Pe.getKey(),!0}}return!1};return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(ce=>{se.listenersToRemove.add(I.registerCommand(ce,Be(ce),e.COMMAND_PRIORITY_CRITICAL))}),N=ce=>{const le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(ce.preventDefault(),ce.stopPropagation(),se.clearText(),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},se.listenersToRemove.add(I.registerCommand(e.KEY_BACKSPACE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.KEY_DELETE_COMMAND,N,e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FORMAT_TEXT_COMMAND,ce=>{let le=e.$getSelection();return X(le,w)?e.DEPRECATED_$isGridSelection(le)?(se.formatCells(ce),!0):(e.$isRangeSelection(le)&&(ce=t.$findMatchingParent(le.anchor.getNode(),ve=>l(ve)),l(ce)),!1):!1},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var ce=e.$getSelection();return X(ce,w)&&(e.DEPRECATED_$isGridSelection(ce)?se.clearHighlight():e.$isRangeSelection(ce)&&(ce=t.$findMatchingParent(ce.anchor.getNode(),le=>l(le)),l(ce))),!1},e.COMMAND_PRIORITY_CRITICAL)),q&&se.listenersToRemove.add(I.registerCommand(e.KEY_TAB_COMMAND,ce=>{var le=e.$getSelection();return!e.$isRangeSelection(le)||!le.isCollapsed()||!X(le,w)||(le=U(le.anchor.getNode()),le===null)?!1:(pe(ce),le=w.getCordsFromCellNode(le,se.grid),M(se,w,le.x,le.y,ce.shiftKey?"backward":"forward"),!0)},e.COMMAND_PRIORITY_CRITICAL)),se.listenersToRemove.add(I.registerCommand(e.FOCUS_COMMAND,()=>w.isSelected(),e.COMMAND_PRIORITY_HIGH)),se.listenersToRemove.add(I.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let ce=e.$getSelection(),le=e.$getPreviousSelection();if(e.$isRangeSelection(ce)){let{anchor:Xe,focus:st}=ce;var ve=Xe.getNode(),Me=st.getNode();ve=U(ve),Me=U(Me);var Pe=ve&&w.is(Q(ve)),We=Me&&w.is(Q(Me));let dt=Pe!==We;We=Pe&&We,Pe=ce.isBackward(),dt?(ve=ce.clone(),ve.focus.set(w.getKey(),Pe?0:w.getChildrenSize(),"element"),e.$setSelection(ve),k(I,se)):We&&!ve.is(Me)&&(se.setAnchorCellForSelection(ue(ve)),se.setFocusCellForSelection(ue(Me),!0))}return ce&&!ce.is(le)&&(e.DEPRECATED_$isGridSelection(ce)||e.DEPRECATED_$isGridSelection(le))&&se.gridSelection&&!se.gridSelection.is(le)?(e.DEPRECATED_$isGridSelection(ce)&&ce.gridKey===se.tableNodeKey?se.updateTableGridSelection(ce):!e.DEPRECATED_$isGridSelection(ce)&&e.DEPRECATED_$isGridSelection(le)&&le.gridKey===se.tableNodeKey&&se.updateTableGridSelection(null),!1):(se.hasHijackedSelectionStyles&&!w.isSelected()?P(I,se):!se.hasHijackedSelectionStyles&&w.isSelected()&&k(I,se),!1)},e.COMMAND_PRIORITY_CRITICAL)),se},nn.getCellFromTarget=v,nn.getTableSelectionFromTableElement=function(w){return w.__lexicalTableSelection},nn}var j_,B_;function sy(){return B_||(B_=1,j_=process.env.NODE_ENV==="development"?A7():R7()),j_}var W_;function $7(){if(W_)return Sp;W_=1;var e=cr(),t=sy(),n=yn(),r=Xt(),o=H;function i({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){const[p]=e.useLexicalComposerContext();return o.useEffect(()=>{if(!p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode]))throw Error("TablePlugin: TableNode, TableCellNode or TableRowNode not registered on editor");return p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:b,includeHeaders:C})=>{const _=t.$createTableNodeWithDimensions(Number(b),Number(m),C);n.$insertNodeToNearestRoot(_);const y=_.getFirstDescendant();return r.$isTextNode(y)&&y.select(),!0},r.COMMAND_PRIORITY_EDITOR)},[p]),o.useEffect(()=>{const m=new Map,b=_=>{const y=_.getKey(),v=p.getElementByKey(y);if(v&&!m.has(y)){const T=t.applyTableHandlers(_,v,p,u);m.set(y,T)}};p.getEditorState().read(()=>{const _=r.$nodesOfType(t.TableNode);for(const y of _)t.$isTableNode(y)&&b(y)});const C=p.registerMutationListener(t.TableNode,_=>{for(const[y,v]of _)if(v==="created")p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&b(T)});else if(v==="destroyed"){const T=m.get(y);T!==void 0&&(T.removeListeners(),m.delete(y))}});return()=>{C();for(const[,_]of m)_.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(m.getColSpan()>1||m.getRowSpan()>1){const[,,b]=r.DEPRECATED_$getNodeTriplet(m),[C]=r.DEPRECATED_$computeGridMap(b,m,m),_=C.length,y=C[0].length;let v=b.getFirstChild();if(!r.DEPRECATED_$isGridRowNode(v))throw Error("Expected TableNode first child to be a RowNode");const T=[];for(let O=0;O<_;O++){if(O!==0&&(v=v.getNextSibling(),!r.DEPRECATED_$isGridRowNode(v)))throw Error("Expected TableNode first child to be a RowNode");let R=null;for(let k=0;k<y;k++){const P=C[O][k],M=P.cell;if(P.startRow===O&&P.startColumn===k)R=M,T.push(M);else if(M.getColSpan()>1||M.getRowSpan()>1){const Y=t.$createTableCellNode(M.__headerState);R!==null?R.insertAfter(Y):n.$insertFirst(v,Y)}}}for(const O of T)O.setColSpan(1),O.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null}return Sp.TablePlugin=i,Sp}var Op={},z_;function D7(){if(z_)return Op;z_=1;var e=cr(),t=sy(),n=yn(),r=Xt(),o=H;function i(a){let l=new URLSearchParams;l.append("code",a);for(let u=1;u<arguments.length;u++)l.append("v",arguments[u]);throw Error(`Minified Lexical error #${a}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}return Op.TablePlugin=function({hasCellMerge:a=!0,hasCellBackgroundColor:l=!0,hasTabHandler:u=!0}){let[p]=e.useLexicalComposerContext();return o.useEffect(()=>(p.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||i(10),p.registerCommand(t.INSERT_TABLE_COMMAND,({columns:m,rows:b,includeHeaders:C})=>(m=t.$createTableNodeWithDimensions(Number(b),Number(m),C),n.$insertNodeToNearestRoot(m),m=m.getFirstDescendant(),r.$isTextNode(m)&&m.select(),!0),r.COMMAND_PRIORITY_EDITOR)),[p]),o.useEffect(()=>{let m=new Map,b=_=>{const y=_.getKey(),v=p.getElementByKey(y);v&&!m.has(y)&&(_=t.applyTableHandlers(_,v,p,u),m.set(y,_))};p.getEditorState().read(()=>{let _=r.$nodesOfType(t.TableNode);for(let y of _)t.$isTableNode(y)&&b(y)});let C=p.registerMutationListener(t.TableNode,_=>{for(const[y,v]of _)v==="created"?p.getEditorState().read(()=>{const T=r.$getNodeByKey(y);t.$isTableNode(T)&&b(T)}):v==="destroyed"&&(_=m.get(y),_!==void 0&&(_.removeListeners(),m.delete(y)))});return()=>{C();for(let[,_]of m)_.removeListeners()}},[p,u]),o.useEffect(()=>{if(!a)return p.registerNodeTransform(t.TableCellNode,m=>{if(1<m.getColSpan()||1<m.getRowSpan()){var[,,b]=r.DEPRECATED_$getNodeTriplet(m);[m]=r.DEPRECATED_$computeGridMap(b,m,m);let _=m.length,y=m[0].length;if(b=b.getFirstChild(),!r.DEPRECATED_$isGridRowNode(b))throw Error("Expected TableNode first child to be a RowNode");let v=[];for(let T=0;T<_;T++){if(T!==0&&(b=b.getNextSibling(),!r.DEPRECATED_$isGridRowNode(b)))throw Error("Expected TableNode first child to be a RowNode");let O=null;for(let R=0;R<y;R++){var C=m[T][R];let k=C.cell;C.startRow===T&&C.startColumn===R?(O=k,v.push(k)):(1<k.getColSpan()||1<k.getRowSpan())&&(C=t.$createTableCellNode(k.__headerState),O!==null?O.insertAfter(C):n.$insertFirst(b,C))}}for(let T of v)T.setColSpan(1),T.setRowSpan(1)}})},[p,a]),o.useEffect(()=>{if(!l)return p.registerNodeTransform(t.TableCellNode,m=>{m.getBackgroundColor()!==null&&m.setBackgroundColor(null)})},[p,l,a]),null},Op}process.env.NODE_ENV==="development"?$7():D7();var Kn={},H_={exports:{}},G_;function kN(){return G_||(G_=1,function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
276
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
277
|
-
*
|
|
278
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
279
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
280
|
-
* @namespace
|
|
281
|
-
* @public
|
|
282
|
-
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},l={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function R(k){return k instanceof u?new u(k.type,R(k.content),k.alias):Array.isArray(k)?k.map(R):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(R){return Object.prototype.toString.call(R).slice(8,-1)},objId:function(R){return R.__id||Object.defineProperty(R,"__id",{value:++i}),R.__id},clone:function R(k,P){P=P||{};var M,Y;switch(l.util.type(k)){case"Object":if(Y=l.util.objId(k),P[Y])return P[Y];M={},P[Y]=M;for(var X in k)k.hasOwnProperty(X)&&(M[X]=R(k[X],P));return M;case"Array":return Y=l.util.objId(k),P[Y]?P[Y]:(M=[],P[Y]=M,k.forEach(function(oe,Z){M[Z]=R(oe,P)}),M);default:return k}},getLanguage:function(R){for(;R;){var k=o.exec(R.className);if(k)return k[1].toLowerCase();R=R.parentElement}return"none"},setLanguage:function(R,k){R.className=R.className.replace(RegExp(o,"gi"),""),R.classList.add("language-"+k)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(M){var R=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(R){var k=document.getElementsByTagName("script");for(var P in k)if(k[P].src==R)return k[P]}return null}},isActive:function(R,k,P){for(var M="no-"+k;R;){var Y=R.classList;if(Y.contains(k))return!0;if(Y.contains(M))return!1;R=R.parentElement}return!!P}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(R,k){var P=l.util.clone(l.languages[R]);for(var M in k)P[M]=k[M];return P},insertBefore:function(R,k,P,M){M=M||l.languages;var Y=M[R],X={};for(var oe in Y)if(Y.hasOwnProperty(oe)){if(oe==k)for(var Z in P)P.hasOwnProperty(Z)&&(X[Z]=P[Z]);P.hasOwnProperty(oe)||(X[oe]=Y[oe])}var U=M[R];return M[R]=X,l.languages.DFS(l.languages,function(Q,de){de===U&&Q!=R&&(this[Q]=X)}),X},DFS:function R(k,P,M,Y){Y=Y||{};var X=l.util.objId;for(var oe in k)if(k.hasOwnProperty(oe)){P.call(k,oe,k[oe],M||oe);var Z=k[oe],U=l.util.type(Z);U==="Object"&&!Y[X(Z)]?(Y[X(Z)]=!0,R(Z,P,null,Y)):U==="Array"&&!Y[X(Z)]&&(Y[X(Z)]=!0,R(Z,P,oe,Y))}}},plugins:{},highlightAll:function(R,k){l.highlightAllUnder(document,R,k)},highlightAllUnder:function(R,k,P){var M={callback:P,container:R,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};l.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),l.hooks.run("before-all-elements-highlight",M);for(var Y=0,X;X=M.elements[Y++];)l.highlightElement(X,k===!0,M.callback)},highlightElement:function(R,k,P){var M=l.util.getLanguage(R),Y=l.languages[M];l.util.setLanguage(R,M);var X=R.parentElement;X&&X.nodeName.toLowerCase()==="pre"&&l.util.setLanguage(X,M);var oe=R.textContent,Z={element:R,language:M,grammar:Y,code:oe};function U(de){Z.highlightedCode=de,l.hooks.run("before-insert",Z),Z.element.innerHTML=Z.highlightedCode,l.hooks.run("after-highlight",Z),l.hooks.run("complete",Z),P&&P.call(Z.element)}if(l.hooks.run("before-sanity-check",Z),X=Z.element.parentElement,X&&X.nodeName.toLowerCase()==="pre"&&!X.hasAttribute("tabindex")&&X.setAttribute("tabindex","0"),!Z.code){l.hooks.run("complete",Z),P&&P.call(Z.element);return}if(l.hooks.run("before-highlight",Z),!Z.grammar){U(l.util.encode(Z.code));return}if(k&&r.Worker){var Q=new Worker(l.filename);Q.onmessage=function(de){U(de.data)},Q.postMessage(JSON.stringify({language:Z.language,code:Z.code,immediateClose:!0}))}else U(l.highlight(Z.code,Z.grammar,Z.language))},highlight:function(R,k,P){var M={code:R,grammar:k,language:P};if(l.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=l.tokenize(M.code,M.grammar),l.hooks.run("after-tokenize",M),u.stringify(l.util.encode(M.tokens),M.language)},tokenize:function(R,k){var P=k.rest;if(P){for(var M in P)k[M]=P[M];delete k.rest}var Y=new b;return C(Y,Y.head,R),m(R,Y,k,Y.head,0),y(Y)},hooks:{all:{},add:function(R,k){var P=l.hooks.all;P[R]=P[R]||[],P[R].push(k)},run:function(R,k){var P=l.hooks.all[R];if(!(!P||!P.length))for(var M=0,Y;Y=P[M++];)Y(k)}},Token:u};r.Prism=l;function u(R,k,P,M){this.type=R,this.content=k,this.alias=P,this.length=(M||"").length|0}u.stringify=function R(k,P){if(typeof k=="string")return k;if(Array.isArray(k)){var M="";return k.forEach(function(U){M+=R(U,P)}),M}var Y={type:k.type,content:R(k.content,P),tag:"span",classes:["token",k.type],attributes:{},language:P},X=k.alias;X&&(Array.isArray(X)?Array.prototype.push.apply(Y.classes,X):Y.classes.push(X)),l.hooks.run("wrap",Y);var oe="";for(var Z in Y.attributes)oe+=" "+Z+'="'+(Y.attributes[Z]||"").replace(/"/g,""")+'"';return"<"+Y.tag+' class="'+Y.classes.join(" ")+'"'+oe+">"+Y.content+"</"+Y.tag+">"};function p(R,k,P,M){R.lastIndex=k;var Y=R.exec(P);if(Y&&M&&Y[1]){var X=Y[1].length;Y.index+=X,Y[0]=Y[0].slice(X)}return Y}function m(R,k,P,M,Y,X){for(var oe in P)if(!(!P.hasOwnProperty(oe)||!P[oe])){var Z=P[oe];Z=Array.isArray(Z)?Z:[Z];for(var U=0;U<Z.length;++U){if(X&&X.cause==oe+","+U)return;var Q=Z[U],de=Q.inside,pe=!!Q.lookbehind,te=!!Q.greedy,fe=Q.alias;if(te&&!Q.pattern.global){var V=Q.pattern.toString().match(/[imsuy]*$/)[0];Q.pattern=RegExp(Q.pattern.source,V+"g")}for(var j=Q.pattern||Q,ee=M.next,re=Y;ee!==k.tail&&!(X&&re>=X.reach);re+=ee.value.length,ee=ee.next){var B=ee.value;if(k.length>R.length)return;if(!(B instanceof u)){var W=1,J;if(te){if(J=p(j,re,R,pe),!J||J.index>=R.length)break;var I=J.index,F=J.index+J[0].length,w=re;for(w+=ee.value.length;I>=w;)ee=ee.next,w+=ee.value.length;if(w-=ee.value.length,re=w,ee.value instanceof u)continue;for(var N=ee;N!==k.tail&&(w<F||typeof N.value=="string");N=N.next)W++,w+=N.value.length;W--,B=R.slice(re,w),J.index-=re}else if(J=p(j,0,B,pe),!J)continue;var I=J.index,q=J[0],ue=B.slice(0,I),he=B.slice(I+q.length),se=re+B.length;X&&se>X.reach&&(X.reach=se);var Ce=ee.prev;ue&&(Ce=C(k,Ce,ue),re+=ue.length),_(k,Ce,W);var Oe=new u(oe,de?l.tokenize(q,de):q,fe,q);if(ee=C(k,Ce,Oe),he&&C(k,ee,he),W>1){var Be={cause:oe+","+U,reach:se};m(R,k,P,ee.prev,re,Be),X&&Be.reach>X.reach&&(X.reach=Be.reach)}}}}}}function b(){var R={value:null,prev:null,next:null},k={value:null,prev:R,next:null};R.next=k,this.head=R,this.tail=k,this.length=0}function C(R,k,P){var M=k.next,Y={value:P,prev:k,next:M};return k.next=Y,M.prev=Y,R.length++,Y}function _(R,k,P){for(var M=k.next,Y=0;Y<P&&M!==R.tail;Y++)M=M.next;k.next=M,M.prev=k,R.length-=Y}function y(R){for(var k=[],P=R.head.next;P!==R.tail;)k.push(P.value),P=P.next;return k}if(!r.document)return r.addEventListener&&(l.disableWorkerMessageHandler||r.addEventListener("message",function(R){var k=JSON.parse(R.data),P=k.language,M=k.code,Y=k.immediateClose;r.postMessage(l.highlight(M,l.languages[P],P)),Y&&r.close()},!1)),l;var v=l.util.currentScript();v&&(l.filename=v.src,v.hasAttribute("data-manual")&&(l.manual=!0));function T(){l.manual||l.highlightAll()}if(!l.manual){var O=document.readyState;O==="loading"||O==="interactive"&&v&&v.defer?document.addEventListener("DOMContentLoaded",T):window.requestAnimationFrame?window.requestAnimationFrame(T):window.setTimeout(T,16)}return l}(t);e.exports&&(e.exports=n),typeof yb<"u"&&(yb.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var i={};i["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};a["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var l={};l[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:a},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var i=r.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(v,T){return"✖ Error "+v+" while fetching file: "+T},i="✖ Error: File does not exist or is empty",a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},l="data-src-status",u="loading",p="loaded",m="failed",b="pre[data-src]:not(["+l+'="'+p+'"]):not(['+l+'="'+u+'"])';function C(v,T,O){var R=new XMLHttpRequest;R.open("GET",v,!0),R.onreadystatechange=function(){R.readyState==4&&(R.status<400&&R.responseText?T(R.responseText):R.status>=400?O(o(R.status,R.statusText)):O(i))},R.send(null)}function _(v){var T=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(v||"");if(T){var O=Number(T[1]),R=T[2],k=T[3];return R?k?[O,Number(k)]:[O,void 0]:[O,O]}}n.hooks.add("before-highlightall",function(v){v.selector+=", "+b}),n.hooks.add("before-sanity-check",function(v){var T=v.element;if(T.matches(b)){v.code="",T.setAttribute(l,u);var O=T.appendChild(document.createElement("CODE"));O.textContent=r;var R=T.getAttribute("data-src"),k=v.language;if(k==="none"){var P=(/\.(\w+)$/.exec(R)||[,"none"])[1];k=a[P]||P}n.util.setLanguage(O,k),n.util.setLanguage(T,k);var M=n.plugins.autoloader;M&&M.loadLanguages(k),C(R,function(Y){T.setAttribute(l,p);var X=_(T.getAttribute("data-range"));if(X){var oe=Y.split(/\r\n?|\n/g),Z=X[0],U=X[1]==null?oe.length:X[1];Z<0&&(Z+=oe.length),Z=Math.max(0,Math.min(Z-1,oe.length)),U<0&&(U+=oe.length),U=Math.max(0,Math.min(U,oe.length)),Y=oe.slice(Z,U).join(`
|
|
283
|
-
`),T.hasAttribute("data-start")||T.setAttribute("data-start",String(Z+1))}O.textContent=Y,n.highlightElement(O)},function(Y){T.setAttribute(l,m),O.textContent=Y})}}),n.plugins.fileHighlight={highlight:function(v){for(var T=(v||document).querySelectorAll(b),O=0,R;R=T[O++];)n.highlightElement(R)}};var y=!1;n.fileHighlight=function(){y||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),y=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(H_)),H_.exports}var k7={},K_;function MN(){return K_||(K_=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),k7}var M7={},U_;function PN(){return U_||(U_=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),M7}var P7={},V_;function IN(){return V_||(V_=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),P7}var I7={},Y_;function LN(){return Y_||(Y_=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(m){return m=m.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+m+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(m){["url","bold","italic","strike","code-snippet"].forEach(function(b){m!==b&&(e.languages.markdown[m].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(m){if(m.language!=="markdown"&&m.language!=="md")return;function b(C){if(!(!C||typeof C=="string"))for(var _=0,y=C.length;_<y;_++){var v=C[_];if(v.type!=="code"){b(v.content);continue}var T=v.content[1],O=v.content[3];if(T&&O&&T.type==="code-language"&&O.type==="code-block"&&typeof T.content=="string"){var R=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");R=(/[a-z][\w-]*/i.exec(R)||[""])[0].toLowerCase();var k="language-"+R;O.alias?typeof O.alias=="string"?O.alias=[O.alias,k]:O.alias.push(k):O.alias=[k]}}}b(m.tokens)}),e.hooks.add("wrap",function(m){if(m.type==="code-block"){for(var b="",C=0,_=m.classes.length;C<_;C++){var y=m.classes[C],v=/language-(.+)/.exec(y);if(v){b=v[1];break}}var T=e.languages[b];if(T)m.content=e.highlight(p(m.content),T,b);else if(b&&b!=="none"&&e.plugins.autoloader){var O="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);m.attributes.id=O,e.plugins.autoloader.loadLanguages(b,function(){var R=document.getElementById(O);R&&(R.innerHTML=e.highlight(R.textContent,e.languages[b],b))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;function p(m){var b=m.replace(a,"");return b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(C,_){if(_=_.toLowerCase(),_[0]==="#"){var y;return _[1]==="x"?y=parseInt(_.slice(2),16):y=Number(_.slice(1)),u(y)}else{var v=l[_];return v||C}}),b}e.languages.md=e.languages.markdown}(Prism)),I7}var L7={},q_;function FN(){return q_||(q_=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),L7}var F7={},Z_;function jN(){return Z_||(Z_=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),F7}var j7={},J_;function BN(){return J_||(J_=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),j7}var B7={},X_;function WN(){return X_||(X_=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),B7}var W7={},Q_;function zN(){return Q_||(Q_=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),W7}var z7={},ex;function HN(){return ex||(ex=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),z7}var H7={},tx;function GN(){return tx||(tx=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift})),H7}var G7={},nx;function KN(){return nx||(nx=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),G7}var K7={},rx;function UN(){return rx||(rx=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),K7}var U7={},ox;function VN(){return ox||(ox=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),U7}var ix;function V7(){if(ix)return Kn;ix=1;var e=kN();MN(),PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN(),HN(),GN(),KN(),UN(),VN();var t=yn(),n=Xt();const r=ce=>ce!=null&&e.languages.hasOwnProperty(ce)?ce:void 0;function o(ce,le){for(const ve of ce.childNodes){if(t.isHTMLElement(ve)&&ve.tagName===le)return!0;o(ve,le)}return!1}const i="data-highlight-language";class a extends n.ElementNode{static getType(){return"code"}static clone(le){return new a(le.__language,le.__key)}constructor(le,ve){super(ve),this.__language=r(le)}createDOM(le){const ve=document.createElement("code");t.addClassNamesToElement(ve,le.theme.code),ve.setAttribute("spellcheck","false");const Me=this.getLanguage();return Me&&ve.setAttribute(i,Me),ve}updateDOM(le,ve,Me){const Pe=this.__language,We=le.__language;return Pe?Pe!==We&&ve.setAttribute(i,Pe):We&&ve.removeAttribute(i),!1}exportDOM(){const le=document.createElement("pre");le.setAttribute("spellcheck","false");const ve=this.getLanguage();return ve&&le.setAttribute(i,ve),{element:le}}static importDOM(){return{code:le=>le.textContent!=null&&(/\r?\n/.test(le.textContent)||o(le,"BR"))?{conversion:p,priority:1}:null,div:le=>({conversion:m,priority:1}),pre:le=>({conversion:p,priority:0}),table:le=>O(le)?{conversion:b,priority:3}:null,td:le=>{const ve=le,Me=ve.closest("table");return T(ve)?{conversion:_,priority:3}:Me&&O(Me)?{conversion:C,priority:3}:null},tr:le=>{const ve=le.closest("table");return ve&&O(ve)?{conversion:C,priority:3}:null}}}static importJSON(le){const ve=l(le.language);return ve.setFormat(le.format),ve.setIndent(le.indent),ve.setDirection(le.direction),ve}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(le,ve=!0){const Me=this.getChildren(),Pe=Me.length;if(Pe>=2&&Me[Pe-1].getTextContent()===`
|
|
284
|
-
`&&Me[Pe-2].getTextContent()===`
|
|
285
|
-
`&&le.isCollapsed()&&le.anchor.key===this.__key&&le.anchor.offset===Pe){Me[Pe-1].remove(),Me[Pe-2].remove();const dt=n.$createParagraphNode();return this.insertAfter(dt,ve),dt}const{anchor:We,focus:Xe}=le,st=(We.isBefore(Xe)?We:Xe).getNode();if(n.$isTextNode(st)){let dt=pe(st);const Ct=[];for(;;)if(n.$isTabNode(dt))Ct.push(n.$createTabNode()),dt=dt.getNextSibling();else if(de(dt)){let ze=0;const tt=dt.getTextContent(),ut=dt.getTextContentSize();for(;ze<ut&&tt[ze]===" ";ze++);if(ze!==0&&Ct.push(Q(" ".repeat(ze))),ze!==ut)break;dt=dt.getNextSibling()}else break;const Se=st.splitText(We.offset)[0],me=We.offset===0?0:1,_e=Se.getIndexWithinParent()+me,De=st.getParentOrThrow(),Fe=[n.$createLineBreakNode(),...Ct];De.splice(_e,0,Fe);const ke=Ct[Ct.length-1];ke?ke.select():We.offset===0?Se.selectPrevious():Se.getNextSibling().selectNext(0,0)}if(u(st)){const{offset:dt}=le.anchor;st.splice(dt,0,[n.$createLineBreakNode()]),st.select(dt+1,dt+1)}return null}canIndent(){return!1}collapseAtStart(){const le=n.$createParagraphNode();return this.getChildren().forEach(ve=>le.append(ve)),this.replace(le),!0}setLanguage(le){const ve=this.getWritable();ve.__language=r(le)}getLanguage(){return this.getLatest().__language}}function l(ce){return n.$applyNodeReplacement(new a(ce))}function u(ce){return ce instanceof a}function p(ce){let le;return t.isHTMLElement(ce)&&(le=ce.getAttribute(i)),{node:l(le)}}function m(ce){const le=ce,ve=y(le);return!ve&&!v(le)?{node:null}:{after:Me=>{const Pe=ce.parentNode;return Pe!=null&&ce!==Pe.lastChild&&Me.push(n.$createLineBreakNode()),Me},node:ve?l():null}}function b(){return{node:l()}}function C(){return{node:null}}function _(ce){const le=ce;return{after:ve=>(le.parentNode&&le.parentNode.nextSibling&&ve.push(n.$createLineBreakNode()),ve),node:null}}function y(ce){return ce.style.fontFamily.match("monospace")!==null}function v(ce){let le=ce.parentElement;for(;le!==null;){if(y(le))return!0;le=le.parentElement}return!1}function T(ce){return ce.classList.contains("js-file-line")}function O(ce){return ce.classList.contains("js-file-line-container")}const R="javascript",k={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},P={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function M(ce){return P[ce]||ce}function Y(ce){const le=M(ce);return k[le]||le}const X=()=>R,oe=()=>Object.keys(e.languages).filter(ce=>typeof e.languages[ce]!="function").sort();class Z extends n.TextNode{constructor(le,ve,Me){super(le,Me),this.__highlightType=ve}static getType(){return"code-highlight"}static clone(le){return new Z(le.__text,le.__highlightType||void 0,le.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(le){const ve=super.createDOM(le),Me=U(le.theme,this.__highlightType);return t.addClassNamesToElement(ve,Me),ve}updateDOM(le,ve,Me){const Pe=super.updateDOM(le,ve,Me),We=U(Me.theme,le.__highlightType),Xe=U(Me.theme,this.__highlightType);return We!==Xe&&(We&&t.removeClassNamesFromElement(ve,We),Xe&&t.addClassNamesToElement(ve,Xe)),Pe}static importJSON(le){const ve=Q(le.text,le.highlightType);return ve.setFormat(le.format),ve.setDetail(le.detail),ve.setMode(le.mode),ve.setStyle(le.style),ve}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(le){return this}isParentRequired(){return!0}createParentElementNode(){return l()}}function U(ce,le){return le&&ce&&ce.codeHighlight&&ce.codeHighlight[le]}function Q(ce,le){return n.$applyNodeReplacement(new Z(ce,le))}function de(ce){return ce instanceof Z}function pe(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getPreviousSibling();return le}function te(ce){let le=ce,ve=ce;for(;de(ve)||n.$isTabNode(ve);)le=ve,ve=ve.getNextSibling();return le}const fe={defaultLanguage:R,tokenize(ce,le){return e.tokenize(ce,e.languages[le||""]||e.languages[this.defaultLanguage])}};function V(ce,le){let ve=null,Me=null,Pe=ce,We=le,Xe=ce.getTextContent();for(;;){if(We===0){if(Pe=Pe.getPreviousSibling(),Pe===null)break;if(!(de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(Pe)){ve={node:Pe,offset:1};break}We=Math.max(0,Pe.getTextContentSize()-1),Xe=Pe.getTextContent()}else We--;const dt=Xe[We];de(Pe)&&dt!==" "&&(Me={node:Pe,offset:We})}if(Me!==null)return Me;let st=null;if(le<ce.getTextContentSize())de(ce)&&(st=ce.getTextContent()[le]);else{const dt=ce.getNextSibling();de(dt)&&(st=dt.getTextContent()[0])}if(st!==null&&st!==" ")return ve;{const dt=j(ce,le);return dt!==null?dt:ve}}function j(ce,le){let ve=ce,Me=le,Pe=ce.getTextContent(),We=ce.getTextContentSize();for(;;){if(!de(ve)||Me===We){if(ve=ve.getNextSibling(),ve===null||n.$isLineBreakNode(ve))return null;de(ve)&&(Me=0,Pe=ve.getTextContent(),We=ve.getTextContentSize())}if(de(ve)){if(Pe[Me]!==" ")return{node:ve,offset:Me};Me++}}}function ee(ce){const le=te(ce);if(n.$isLineBreakNode(le))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return le}function re(ce,le,ve){const Me=ce.getParent();u(Me)?J(Me,le,ve):de(ce)&&ce.replace(n.$createTextNode(ce.__text))}function B(ce,le){const ve=le.getElementByKey(ce.getKey());if(ve===null)return;const Me=ce.getChildren(),Pe=Me.length;if(Pe===ve.__cachedChildrenLength)return;ve.__cachedChildrenLength=Pe;let We="1",Xe=1;for(let st=0;st<Pe;st++)n.$isLineBreakNode(Me[st])&&(We+=`
|
|
286
|
-
`+ ++Xe);ve.setAttribute("data-gutter",We)}const W=new Set;function J(ce,le,ve){const Me=ce.getKey();W.has(Me)||(W.add(Me),ce.getLanguage()===void 0&&ce.setLanguage(ve.defaultLanguage),le.update(()=>{w(Me,()=>{const Pe=n.$getNodeByKey(Me);if(!u(Pe)||!Pe.isAttached())return!1;const We=Pe.getTextContent(),Xe=ve.tokenize(We,Pe.getLanguage()||ve.defaultLanguage),st=F(Xe),dt=N(Pe.getChildren(),st),{from:Ct,to:Se,nodesForReplacement:me}=dt;return Ct!==Se||me.length?(ce.splice(Ct,Se-Ct,me),!0):!1})},{onUpdate:()=>{W.delete(Me)},skipTransforms:!0}))}function F(ce,le){const ve=[];for(const Me of ce)if(typeof Me=="string"){const Pe=Me.split(/(\n|\t)/),We=Pe.length;for(let Xe=0;Xe<We;Xe++){const st=Pe[Xe];st===`
|
|
287
|
-
`||st===`\r
|
|
288
|
-
`?ve.push(n.$createLineBreakNode()):st===" "?ve.push(n.$createTabNode()):st.length>0&&ve.push(Q(st,le))}}else{const{content:Pe}=Me;typeof Pe=="string"?ve.push(...F([Pe],Me.type)):Array.isArray(Pe)&&ve.push(...F(Pe,Me.type))}return ve}function w(ce,le){const ve=n.$getNodeByKey(ce);if(!u(ve)||!ve.isAttached())return;const Me=n.$getSelection();if(!n.$isRangeSelection(Me)){le();return}const Pe=Me.anchor,We=Pe.offset,Xe=Pe.type==="element"&&n.$isLineBreakNode(ve.getChildAtIndex(Pe.offset-1));let st=0;if(!Xe){const dt=Pe.getNode();st=We+dt.getPreviousSiblings().reduce((Ct,Se)=>Ct+Se.getTextContentSize(),0)}if(le()){if(Xe){Pe.getNode().select(We,We);return}ve.getChildren().some(dt=>{const Ct=n.$isTextNode(dt);if(Ct||n.$isLineBreakNode(dt)){const Se=dt.getTextContentSize();if(Ct&&Se>=st)return dt.select(st,st),!0;st-=Se}return!1})}}function N(ce,le){let ve=0;for(;ve<ce.length&&I(ce[ve],le[ve]);)ve++;const Me=ce.length,Pe=le.length,We=Math.min(Me,Pe)-ve;let Xe=0;for(;Xe<We;)if(Xe++,!I(ce[Me-Xe],le[Pe-Xe])){Xe--;break}const st=ve,dt=Me-Xe,Ct=le.slice(ve,Pe-Xe);return{from:st,nodesForReplacement:Ct,to:dt}}function I(ce,le){return de(ce)&&de(le)&&ce.__text===le.__text&&ce.__highlightType===le.__highlightType||n.$isTabNode(ce)&&n.$isTabNode(le)||n.$isLineBreakNode(ce)&&n.$isLineBreakNode(le)}function q(ce){if(!n.$isRangeSelection(ce))return!1;const le=ce.anchor.getNode(),ve=ce.focus.getNode();if(le.is(ve)&&u(le))return!0;const Me=le.getParent();return u(Me)&&Me.is(ve.getParent())}function ue(ce){const le=ce.getNodes(),ve=[[]];if(le.length===1&&u(le[0]))return ve;let Me=ve[0];for(let Pe=0;Pe<le.length;Pe++){const We=le[Pe];if(!(de(We)||n.$isTabNode(We)||n.$isLineBreakNode(We)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(We)?Pe!==0&&Me.length>0&&(Me=[],ve.push(Me)):Me.push(We)}return ve}function he(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return null;const ve=ce?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND,Me=ce?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND;if(ue(le).length>1)return ve;const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(u(Pe))return ve;const We=pe(Pe),Xe=te(Pe),st=le.anchor,dt=le.focus;let Ct,Se;return dt.isBefore(st)?(Ct=dt,Se=st):(Ct=st,Se=dt),We!==null&&Xe!==null&&Ct.key===We.getKey()&&Ct.offset===0&&Se.key===Xe.getKey()&&Se.offset===Xe.getTextContentSize()?ve:Me}function se(ce){const le=n.$getSelection();if(!n.$isRangeSelection(le)||!q(le))return!1;const ve=ue(le),Me=ve.length;if(ve.length>1){for(let Xe=0;Xe<Me;Xe++){const st=ve[Xe];if(st.length>0){let dt=st[0];Xe===0&&(dt=pe(dt)),dt!==null&&(ce===n.INDENT_CONTENT_COMMAND?dt.insertBefore(n.$createTabNode()):n.$isTabNode(dt)&&dt.remove())}}return!0}const Pe=le.getNodes()[0];if(!(u(Pe)||de(Pe)||n.$isTabNode(Pe)||n.$isLineBreakNode(Pe)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(u(Pe))return ce===n.INDENT_CONTENT_COMMAND&&le.insertNodes([n.$createTabNode()]),!0;const We=pe(Pe);if(We===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return ce===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(We)?We.insertAfter(n.$createTabNode()):We.insertBefore(n.$createTabNode()):n.$isTabNode(We)&&We.remove(),!0}function Ce(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.offset,Xe=Pe.offset,st=Me.getNode(),dt=Pe.getNode(),Ct=ce===n.KEY_ARROW_UP_COMMAND;if(!q(ve)||!(de(st)||n.$isTabNode(st))||!(de(dt)||n.$isTabNode(dt)))return!1;if(!le.altKey){if(ve.isCollapsed()){const tt=st.getParentOrThrow();if(Ct&&We===0&&st.getPreviousSibling()===null){if(tt.getPreviousSibling()===null)return tt.selectPrevious(),le.preventDefault(),!0}else if(!Ct&&We===st.getTextContentSize()&&st.getNextSibling()===null&&tt.getNextSibling()===null)return tt.selectNext(),le.preventDefault(),!0}return!1}let Se,me;if(st.isBefore(dt)?(Se=pe(st),me=te(dt)):(Se=pe(dt),me=te(st)),Se==null||me==null)return!1;const _e=Se.getNodesBetween(me);for(let tt=0;tt<_e.length;tt++){const ut=_e[tt];if(!de(ut)&&!n.$isTabNode(ut)&&!n.$isLineBreakNode(ut))return!1}le.preventDefault(),le.stopPropagation();const De=Ct?Se.getPreviousSibling():me.getNextSibling();if(!n.$isLineBreakNode(De))return!0;const Fe=Ct?De.getPreviousSibling():De.getNextSibling();if(Fe==null)return!0;let ze=(de(Fe)||n.$isTabNode(Fe)||n.$isLineBreakNode(Fe)?Ct?pe(Fe):te(Fe):null)??Fe;return De.remove(),_e.forEach(tt=>tt.remove()),ce===n.KEY_ARROW_UP_COMMAND?(_e.forEach(tt=>ze.insertBefore(tt)),ze.insertBefore(De)):(ze.insertAfter(De),ze=De,_e.forEach(tt=>{ze.insertAfter(tt),ze=tt})),ve.setTextNodeRange(st,We,dt,Xe),!0}function Oe(ce,le){const ve=n.$getSelection();if(!n.$isRangeSelection(ve))return!1;const{anchor:Me,focus:Pe}=ve,We=Me.getNode(),Xe=Pe.getNode(),st=ce===n.MOVE_TO_START;if(!(de(We)||n.$isTabNode(We))||!(de(Xe)||n.$isTabNode(Xe)))return!1;if(st){const dt=V(Xe,Pe.offset);if(dt!==null){const{node:Ct,offset:Se}=dt;n.$isLineBreakNode(Ct)?Ct.selectNext(0,0):ve.setTextNodeRange(Ct,Se,Ct,Se)}else Xe.getParentOrThrow().selectStart()}else ee(Xe).select();return le.preventDefault(),le.stopPropagation(),!0}function Be(ce,le){if(!ce.hasNodes([a,Z]))throw new Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return le==null&&(le=fe),t.mergeRegister(ce.registerMutationListener(a,ve=>{ce.update(()=>{for(const[Me,Pe]of ve)if(Pe!=="destroyed"){const We=n.$getNodeByKey(Me);We!==null&&B(We,ce)}})}),ce.registerNodeTransform(a,ve=>J(ve,ce,le)),ce.registerNodeTransform(n.TextNode,ve=>re(ve,ce,le)),ce.registerNodeTransform(Z,ve=>re(ve,ce,le)),ce.registerCommand(n.KEY_TAB_COMMAND,ve=>{const Me=he(ve.shiftKey);return Me===null?!1:(ve.preventDefault(),ce.dispatchCommand(Me,void 0),!0)},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INSERT_TAB_COMMAND,()=>{const ve=n.$getSelection();return q(ve)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.INDENT_CONTENT_COMMAND,ve=>se(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.OUTDENT_CONTENT_COMMAND,ve=>se(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_UP_COMMAND,ve=>Ce(n.KEY_ARROW_UP_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.KEY_ARROW_DOWN_COMMAND,ve=>Ce(n.KEY_ARROW_DOWN_COMMAND,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_END,ve=>Oe(n.MOVE_TO_END,ve),n.COMMAND_PRIORITY_LOW),ce.registerCommand(n.MOVE_TO_START,ve=>Oe(n.MOVE_TO_START,ve),n.COMMAND_PRIORITY_LOW))}return Kn.$createCodeHighlightNode=Q,Kn.$createCodeNode=l,Kn.$isCodeHighlightNode=de,Kn.$isCodeNode=u,Kn.CODE_LANGUAGE_FRIENDLY_NAME_MAP=k,Kn.CODE_LANGUAGE_MAP=P,Kn.CodeHighlightNode=Z,Kn.CodeNode=a,Kn.DEFAULT_CODE_LANGUAGE=R,Kn.PrismTokenizer=fe,Kn.getCodeLanguages=oe,Kn.getDefaultCodeLanguage=X,Kn.getEndOfCodeInLine=ee,Kn.getFirstCodeNodeOfLine=pe,Kn.getLanguageFriendlyName=Y,Kn.getLastCodeNodeOfLine=te,Kn.getStartOfCodeInLine=V,Kn.normalizeCodeLang=M,Kn.registerCodeHighlighting=Be,Kn}var Un={},ax;function Y7(){if(ax)return Un;ax=1;var e=kN();MN(),PN(),IN(),LN(),FN(),jN(),BN(),WN(),zN(),HN(),GN(),KN(),UN(),VN();var t=yn(),n=Xt();let r=F=>F!=null&&e.languages.hasOwnProperty(F)?F:void 0;function o(F,w){for(let N of F.childNodes){if(t.isHTMLElement(N)&&N.tagName===w)return!0;o(N,w)}return!1}class i extends n.ElementNode{static getType(){return"code"}static clone(w){return new i(w.__language,w.__key)}constructor(w,N){super(N),this.__language=r(w)}createDOM(w){let N=document.createElement("code");return t.addClassNamesToElement(N,w.theme.code),N.setAttribute("spellcheck","false"),(w=this.getLanguage())&&N.setAttribute("data-highlight-language",w),N}updateDOM(w,N){let I=this.__language;return w=w.__language,I?I!==w&&N.setAttribute("data-highlight-language",I):w&&N.removeAttribute("data-highlight-language"),!1}exportDOM(){let w=document.createElement("pre");w.setAttribute("spellcheck","false");let N=this.getLanguage();return N&&w.setAttribute("data-highlight-language",N),{element:w}}static importDOM(){return{code:w=>w.textContent!=null&&(/\r?\n/.test(w.textContent)||o(w,"BR"))?{conversion:u,priority:1}:null,div:()=>({conversion:p,priority:1}),pre:()=>({conversion:u,priority:0}),table:w=>y(w)?{conversion:m,priority:3}:null,td:w=>{let N=w.closest("table");return w.classList.contains("js-file-line")?{conversion:C,priority:3}:N&&y(N)?{conversion:b,priority:3}:null},tr:w=>(w=w.closest("table"))&&y(w)?{conversion:b,priority:3}:null}}static importJSON(w){let N=a(w.language);return N.setFormat(w.format),N.setIndent(w.indent),N.setDirection(w.direction),N}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(w,N=!0){var I=this.getChildren(),q=I.length;if(2<=q&&I[q-1].getTextContent()===`
|
|
289
|
-
`&&I[q-2].getTextContent()===`
|
|
290
|
-
`&&w.isCollapsed()&&w.anchor.key===this.__key&&w.anchor.offset===q)return I[q-1].remove(),I[q-2].remove(),w=n.$createParagraphNode(),this.insertAfter(w,N),w;let{anchor:ue,focus:he}=w;if(N=(ue.isBefore(he)?ue:he).getNode(),n.$isTextNode(N)){for(q=Y(N),I=[];;)if(n.$isTabNode(q))I.push(n.$createTabNode()),q=q.getNextSibling();else if(M(q)){for(var se=0,Ce=q.getTextContent(),Oe=q.getTextContentSize();se<Oe&&Ce[se]===" ";se++);if(se!==0&&I.push(P(" ".repeat(se))),se!==Oe)break;q=q.getNextSibling()}else break;q=N.splitText(ue.offset)[0],se=ue.offset===0?0:1,se=q.getIndexWithinParent()+se,Ce=N.getParentOrThrow(),Oe=[n.$createLineBreakNode(),...I],Ce.splice(se,0,Oe),(I=I[I.length-1])?I.select():ue.offset===0?q.selectPrevious():q.getNextSibling().selectNext(0,0)}return l(N)&&({offset:w}=w.anchor,N.splice(w,0,[n.$createLineBreakNode()]),N.select(w+1,w+1)),null}canIndent(){return!1}collapseAtStart(){let w=n.$createParagraphNode();return this.getChildren().forEach(N=>w.append(N)),this.replace(w),!0}setLanguage(w){this.getWritable().__language=r(w)}getLanguage(){return this.getLatest().__language}}function a(F){return n.$applyNodeReplacement(new i(F))}function l(F){return F instanceof i}function u(F){let w;return t.isHTMLElement(F)&&(w=F.getAttribute("data-highlight-language")),{node:a(w)}}function p(F){let w=F.style.fontFamily.match("monospace")!==null;return w||_(F)?{after:N=>{let I=F.parentNode;return I!=null&&F!==I.lastChild&&N.push(n.$createLineBreakNode()),N},node:w?a():null}:{node:null}}function m(){return{node:a()}}function b(){return{node:null}}function C(F){return{after:w=>(F.parentNode&&F.parentNode.nextSibling&&w.push(n.$createLineBreakNode()),w),node:null}}function _(F){for(F=F.parentElement;F!==null;){if(F.style.fontFamily.match("monospace")!==null)return!0;F=F.parentElement}return!1}function y(F){return F.classList.contains("js-file-line-container")}let v={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},T={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function O(F){return T[F]||F}class R extends n.TextNode{constructor(w,N,I){super(w,I),this.__highlightType=N}static getType(){return"code-highlight"}static clone(w){return new R(w.__text,w.__highlightType||void 0,w.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(w){let N=super.createDOM(w);return w=k(w.theme,this.__highlightType),t.addClassNamesToElement(N,w),N}updateDOM(w,N,I){let q=super.updateDOM(w,N,I);return w=k(I.theme,w.__highlightType),I=k(I.theme,this.__highlightType),w!==I&&(w&&t.removeClassNamesFromElement(N,w),I&&t.addClassNamesToElement(N,I)),q}static importJSON(w){let N=P(w.text,w.highlightType);return N.setFormat(w.format),N.setDetail(w.detail),N.setMode(w.mode),N.setStyle(w.style),N}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function k(F,w){return w&&F&&F.codeHighlight&&F.codeHighlight[w]}function P(F,w){return n.$applyNodeReplacement(new R(F,w))}function M(F){return F instanceof R}function Y(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getPreviousSibling();return w}function X(F){let w=F;for(;M(F)||n.$isTabNode(F);)w=F,F=F.getNextSibling();return w}let oe={defaultLanguage:"javascript",tokenize(F,w){return e.tokenize(F,e.languages[w||""]||e.languages[this.defaultLanguage])}};function Z(F,w){let N=null;var I=null,q=F;let ue=w,he=F.getTextContent();for(;;){if(ue===0){if(q=q.getPreviousSibling(),q===null)break;if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(q)){N={node:q,offset:1};break}ue=Math.max(0,q.getTextContentSize()-1),he=q.getTextContent()}else ue--;let se=he[ue];M(q)&&se!==" "&&(I={node:q,offset:ue})}if(I!==null)return I;if(I=null,w<F.getTextContentSize()?M(F)&&(I=F.getTextContent()[w]):(q=F.getNextSibling(),M(q)&&(I=q.getTextContent()[0])),I!==null&&I!==" ")return N;e:for(I=F,q=F.getTextContent(),F=F.getTextContentSize();;){if(!M(I)||w===F){if(I=I.getNextSibling(),I===null||n.$isLineBreakNode(I)){F=null;break e}M(I)&&(w=0,q=I.getTextContent(),F=I.getTextContentSize())}if(M(I)){if(q[w]!==" "){F={node:I,offset:w};break e}w++}}return F!==null?F:N}function U(F){if(F=X(F),n.$isLineBreakNode(F))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return F}function Q(F,w,N){let I=F.getParent();l(I)?pe(I,w,N):M(F)&&F.replace(n.$createTextNode(F.__text))}let de=new Set;function pe(F,w,N){let I=F.getKey();de.has(I)||(de.add(I),F.getLanguage()===void 0&&F.setLanguage(N.defaultLanguage),w.update(()=>{fe(I,()=>{var q=n.$getNodeByKey(I);if(!l(q)||!q.isAttached())return!1;var ue=q.getTextContent();ue=N.tokenize(ue,q.getLanguage()||N.defaultLanguage),ue=te(ue);var he=q.getChildren();for(q=0;q<he.length&&V(he[q],ue[q]);)q++;var se=he.length;let Ce=ue.length,Oe=Math.min(se,Ce)-q,Be=0;for(;Be<Oe;)if(Be++,!V(he[se-Be],ue[Ce-Be])){Be--;break}he=q,se-=Be,ue=ue.slice(q,Ce-Be);let{from:ce,to:le,nodesForReplacement:ve}={from:he,nodesForReplacement:ue,to:se};return ce!==le||ve.length?(F.splice(ce,le-ce,ve),!0):!1})},{onUpdate:()=>{de.delete(I)},skipTransforms:!0}))}function te(F,w){let N=[];for(let I of F)if(typeof I=="string"){F=I.split(/(\n|\t)/);let q=F.length;for(let ue=0;ue<q;ue++){let he=F[ue];he===`
|
|
291
|
-
`||he===`\r
|
|
292
|
-
`?N.push(n.$createLineBreakNode()):he===" "?N.push(n.$createTabNode()):0<he.length&&N.push(P(he,w))}}else({content:F}=I),typeof F=="string"?N.push(...te([F],I.type)):Array.isArray(F)&&N.push(...te(F,I.type));return N}function fe(F,w){if(F=n.$getNodeByKey(F),l(F)&&F.isAttached()){var N=n.$getSelection();if(n.$isRangeSelection(N)){N=N.anchor;var I=N.offset,q=N.type==="element"&&n.$isLineBreakNode(F.getChildAtIndex(N.offset-1)),ue=0;if(!q){let he=N.getNode();ue=I+he.getPreviousSiblings().reduce((se,Ce)=>se+Ce.getTextContentSize(),0)}w()&&(q?N.getNode().select(I,I):F.getChildren().some(he=>{let se=n.$isTextNode(he);if(se||n.$isLineBreakNode(he)){let Ce=he.getTextContentSize();if(se&&Ce>=ue)return he.select(ue,ue),!0;ue-=Ce}return!1}))}else w()}}function V(F,w){return M(F)&&M(w)&&F.__text===w.__text&&F.__highlightType===w.__highlightType||n.$isTabNode(F)&&n.$isTabNode(w)||n.$isLineBreakNode(F)&&n.$isLineBreakNode(w)}function j(F){if(!n.$isRangeSelection(F))return!1;var w=F.anchor.getNode();return F=F.focus.getNode(),w.is(F)&&l(w)?!0:(w=w.getParent(),l(w)&&w.is(F.getParent()))}function ee(F){F=F.getNodes();let w=[[]];if(F.length===1&&l(F[0]))return w;let N=w[0];for(let I=0;I<F.length;I++){let q=F[I];if(!(M(q)||n.$isTabNode(q)||n.$isLineBreakNode(q)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(q)?I!==0&&0<N.length&&(N=[],w.push(N)):N.push(q)}return w}function re(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return null;let N=F?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(F=F?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<ee(w).length)return N;var I=w.getNodes()[0];if(!(l(I)||M(I)||n.$isTabNode(I)||n.$isLineBreakNode(I)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(l(I))return N;let q=Y(I);I=X(I);var ue=w.anchor;let he=w.focus;return he.isBefore(ue)?w=he:(w=ue,ue=he),q!==null&&I!==null&&w.key===q.getKey()&&w.offset===0&&ue.key===I.getKey()&&ue.offset===I.getTextContentSize()?N:F}function B(F){var w=n.$getSelection();if(!n.$isRangeSelection(w)||!j(w))return!1;var N=ee(w);let I=N.length;if(1<N.length){for(w=0;w<I;w++){var q=N[w];0<q.length&&(q=q[0],w===0&&(q=Y(q)),q!==null&&(F===n.INDENT_CONTENT_COMMAND?q.insertBefore(n.$createTabNode()):n.$isTabNode(q)&&q.remove()))}return!0}if(N=w.getNodes()[0],!(l(N)||M(N)||n.$isTabNode(N)||n.$isLineBreakNode(N)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(l(N))return F===n.INDENT_CONTENT_COMMAND&&w.insertNodes([n.$createTabNode()]),!0;if(N=Y(N),N===null)throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return F===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(N)?N.insertAfter(n.$createTabNode()):N.insertBefore(n.$createTabNode()):n.$isTabNode(N)&&N.remove(),!0}function W(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N,ue=I.offset,he=q.offset,se=I.getNode(),Ce=q.getNode();var Oe=F===n.KEY_ARROW_UP_COMMAND;if(!j(N)||!M(se)&&!n.$isTabNode(se)||!M(Ce)&&!n.$isTabNode(Ce))return!1;if(!w.altKey){if(N.isCollapsed()){if(F=se.getParentOrThrow(),Oe&&ue===0&&se.getPreviousSibling()===null){if(F.getPreviousSibling()===null)return F.selectPrevious(),w.preventDefault(),!0}else if(!Oe&&ue===se.getTextContentSize()&&se.getNextSibling()===null&&F.getNextSibling()===null)return F.selectNext(),w.preventDefault(),!0}return!1}let Be;if(se.isBefore(Ce)){var ce=Y(se);Be=X(Ce)}else ce=Y(Ce),Be=X(se);if(ce==null||Be==null)return!1;let le=ce.getNodesBetween(Be);for(let Me=0;Me<le.length;Me++){let Pe=le[Me];if(!M(Pe)&&!n.$isTabNode(Pe)&&!n.$isLineBreakNode(Pe))return!1}if(w.preventDefault(),w.stopPropagation(),w=Oe?ce.getPreviousSibling():Be.getNextSibling(),!n.$isLineBreakNode(w)||(ce=Oe?w.getPreviousSibling():w.getNextSibling(),ce==null))return!0;Oe=M(ce)||n.$isTabNode(ce)||n.$isLineBreakNode(ce)?Oe?Y(ce):X(ce):null;let ve=Oe??ce;return w.remove(),le.forEach(Me=>Me.remove()),F===n.KEY_ARROW_UP_COMMAND?(le.forEach(Me=>ve.insertBefore(Me)),ve.insertBefore(w)):(ve.insertAfter(w),ve=w,le.forEach(Me=>{ve.insertAfter(Me),ve=Me})),N.setTextNodeRange(se,ue,Ce,he),!0}function J(F,w){let N=n.$getSelection();if(!n.$isRangeSelection(N))return!1;let{anchor:I,focus:q}=N;var ue=I.getNode();let he=q.getNode();if(F=F===n.MOVE_TO_START,!M(ue)&&!n.$isTabNode(ue)||!M(he)&&!n.$isTabNode(he))return!1;if(F)if(ue=Z(he,q.offset),ue!==null){let{node:se,offset:Ce}=ue;n.$isLineBreakNode(se)?se.selectNext(0,0):N.setTextNodeRange(se,Ce,se,Ce)}else he.getParentOrThrow().selectStart();else U(he).select();return w.preventDefault(),w.stopPropagation(),!0}return Un.$createCodeHighlightNode=P,Un.$createCodeNode=a,Un.$isCodeHighlightNode=M,Un.$isCodeNode=l,Un.CODE_LANGUAGE_FRIENDLY_NAME_MAP=v,Un.CODE_LANGUAGE_MAP=T,Un.CodeHighlightNode=R,Un.CodeNode=i,Un.DEFAULT_CODE_LANGUAGE="javascript",Un.PrismTokenizer=oe,Un.getCodeLanguages=()=>Object.keys(e.languages).filter(F=>typeof e.languages[F]!="function").sort(),Un.getDefaultCodeLanguage=()=>"javascript",Un.getEndOfCodeInLine=U,Un.getFirstCodeNodeOfLine=Y,Un.getLanguageFriendlyName=function(F){return F=O(F),v[F]||F},Un.getLastCodeNodeOfLine=X,Un.getStartOfCodeInLine=Z,Un.normalizeCodeLang=O,Un.registerCodeHighlighting=function(F,w){if(!F.hasNodes([i,R]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return w==null&&(w=oe),t.mergeRegister(F.registerMutationListener(i,N=>{F.update(()=>{for(let[ue,he]of N)if(he!=="destroyed"){var I=n.$getNodeByKey(ue);if(I!==null)e:{var q=I;if(I=F.getElementByKey(q.getKey()),I===null)break e;q=q.getChildren();let se=q.length;if(se===I.__cachedChildrenLength)break e;I.__cachedChildrenLength=se;let Ce="1",Oe=1;for(let Be=0;Be<se;Be++)n.$isLineBreakNode(q[Be])&&(Ce+=`
|
|
293
|
-
`+ ++Oe);I.setAttribute("data-gutter",Ce)}}})}),F.registerNodeTransform(i,N=>pe(N,F,w)),F.registerNodeTransform(n.TextNode,N=>Q(N,F,w)),F.registerNodeTransform(R,N=>Q(N,F,w)),F.registerCommand(n.KEY_TAB_COMMAND,N=>{let I=re(N.shiftKey);return I===null?!1:(N.preventDefault(),F.dispatchCommand(I,void 0),!0)},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INSERT_TAB_COMMAND,()=>{let N=n.$getSelection();return j(N)?(n.$insertNodes([n.$createTabNode()]),!0):!1},n.COMMAND_PRIORITY_LOW),F.registerCommand(n.INDENT_CONTENT_COMMAND,()=>B(n.INDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.OUTDENT_CONTENT_COMMAND,()=>B(n.OUTDENT_CONTENT_COMMAND),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_UP_COMMAND,N=>W(n.KEY_ARROW_UP_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.KEY_ARROW_DOWN_COMMAND,N=>W(n.KEY_ARROW_DOWN_COMMAND,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_END,N=>J(n.MOVE_TO_END,N),n.COMMAND_PRIORITY_LOW),F.registerCommand(n.MOVE_TO_START,N=>J(n.MOVE_TO_START,N),n.COMMAND_PRIORITY_LOW))},Un}process.env.NODE_ENV==="development"?V7():Y7();cr();yn();var ly=Xt();function q7({src:e,altText:t,width:n,height:r,maxWidth:o}){const i=H.useMemo(()=>({height:r,width:n,maxWidth:o}),[r,n,o]);return an.jsx("img",{src:e,alt:t,style:i})}function Z7({altText:e,height:t,maxWidth:n=500,src:r,width:o,key:i}){return ly.$applyNodeReplacement(new cy(r,e,n,o,t,i))}class cy extends ly.DecoratorNode{constructor(t,n,r,o,i,a){super(a),so(this,"__src"),so(this,"__altText"),so(this,"__width"),so(this,"__height"),so(this,"__maxWidth"),this.__src=t,this.__altText=n,this.__maxWidth=r,this.__width=o||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(t){return new cy(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return Z7(t)}createDOM(t){const n=document.createElement("span"),r=t.theme.image;return r&&(n.className=r),n}updateDOM(){return!1}decorate(){return an.jsx(q7,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}ly.createCommand("INSERT_IMAGE_COMMAND");iy();sy();ay();oy();var gu={},sx;function J7(){if(sx)return gu;sx=1;var e=yn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(a){return new n(a.__text,a.__key)}constructor(a,l){super(a,l)}createDOM(a){const l=super.createDOM(a);return e.addClassNamesToElement(l,a.theme.hashtag),l}static importJSON(a){const l=r(a.text);return l.setFormat(a.format),l.setDetail(a.detail),l.setMode(a.mode),l.setStyle(a.style),l}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(i=""){return t.$applyNodeReplacement(new n(i))}function o(i){return i instanceof n}return gu.$createHashtagNode=r,gu.$isHashtagNode=o,gu.HashtagNode=n,gu}var mu={},lx;function X7(){if(lx)return mu;lx=1;var e=yn(),t=Xt();class n extends t.TextNode{static getType(){return"hashtag"}static clone(i){return new n(i.__text,i.__key)}constructor(i,a){super(i,a)}createDOM(i){let a=super.createDOM(i);return e.addClassNamesToElement(a,i.theme.hashtag),a}static importJSON(i){let a=r(i.text);return a.setFormat(i.format),a.setDetail(i.detail),a.setMode(i.mode),a.setStyle(i.style),a}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(o=""){return t.$applyNodeReplacement(new n(o))}return mu.$createHashtagNode=r,mu.$isHashtagNode=function(o){return o instanceof n},mu.HashtagNode=n,mu}process.env.NODE_ENV==="development"?J7():X7();var vl={},Ap={},cx;function Q7(){if(cx)return Ap;cx=1;var e=cr(),t=Xt(),n=H;function r(i,a){return i.getEditorState().read(()=>{const l=t.$getNodeByKey(a);return l===null?!1:l.isSelected()})}function o(i){const[a]=e.useLexicalComposerContext(),[l,u]=n.useState(()=>r(a,i));n.useEffect(()=>{let b=!0;const C=a.registerUpdateListener(()=>{b&&u(r(a,i))});return()=>{b=!1,C()}},[a,i]);const p=n.useCallback(b=>{a.update(()=>{let C=t.$getSelection();t.$isNodeSelection(C)||(C=t.$createNodeSelection(),t.$setSelection(C)),t.$isNodeSelection(C)&&(b?C.add(i):C.delete(i))})},[a,i]),m=n.useCallback(()=>{a.update(()=>{const b=t.$getSelection();t.$isNodeSelection(b)&&b.clear()})},[a]);return[l,p,m]}return Ap.useLexicalNodeSelection=o,Ap}var Rp={},ux;function eY(){if(ux)return Rp;ux=1;var e=cr(),t=Xt(),n=H;function r(o,i){return o.getEditorState().read(()=>{let a=t.$getNodeByKey(i);return a===null?!1:a.isSelected()})}return Rp.useLexicalNodeSelection=function(o){let[i]=e.useLexicalComposerContext(),[a,l]=n.useState(()=>r(i,o));n.useEffect(()=>{let m=!0,b=i.registerUpdateListener(()=>{m&&l(r(i,o))});return()=>{m=!1,b()}},[i,o]);let u=n.useCallback(m=>{i.update(()=>{let b=t.$getSelection();t.$isNodeSelection(b)||(b=t.$createNodeSelection(),t.$setSelection(b)),t.$isNodeSelection(b)&&(m?b.add(o):b.delete(o))})},[i,o]),p=n.useCallback(()=>{i.update(()=>{const m=t.$getSelection();t.$isNodeSelection(m)&&m.clear()})},[i]);return[a,u,p]},Rp}var dx,fx;function YN(){return fx||(fx=1,dx=process.env.NODE_ENV==="development"?Q7():eY()),dx}var hx;function tY(){if(hx)return vl;hx=1;var e=cr(),t=YN(),n=yn(),r=Xt(),o=H;const i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:b}){const[C]=e.useLexicalComposerContext(),[_,y,v]=t.useLexicalNodeSelection(b),T=o.useCallback(O=>{if(_&&r.$isNodeSelection(r.$getSelection())){O.preventDefault();const R=r.$getNodeByKey(b);m(R)&&R.remove()}return!1},[_,b]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{const R=C.getElementByKey(b);return O.target===R?(O.shiftKey||v(),y(!_),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,_,b,T,y]),o.useEffect(()=>{const O=C.getElementByKey(b);O!==null&&(O.className=_?"selected":"")},[C,_,b]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(C){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
294
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(b){return b instanceof l}return vl.$createHorizontalRuleNode=p,vl.$isHorizontalRuleNode=m,vl.HorizontalRuleNode=l,vl.INSERT_HORIZONTAL_RULE_COMMAND=i,vl}var bl={},px;function nY(){if(px)return bl;px=1;var e=cr(),t=YN(),n=yn(),r=Xt(),o=H;let i=r.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function a({nodeKey:b}){let[C]=e.useLexicalComposerContext(),[_,y,v]=t.useLexicalNodeSelection(b),T=o.useCallback(O=>(_&&r.$isNodeSelection(r.$getSelection())&&(O.preventDefault(),O=r.$getNodeByKey(b),m(O)&&O.remove()),!1),[_,b]);return o.useEffect(()=>n.mergeRegister(C.registerCommand(r.CLICK_COMMAND,O=>{let R=C.getElementByKey(b);return O.target===R?(O.shiftKey||v(),y(!_),!0):!1},r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_DELETE_COMMAND,T,r.COMMAND_PRIORITY_LOW),C.registerCommand(r.KEY_BACKSPACE_COMMAND,T,r.COMMAND_PRIORITY_LOW)),[v,C,_,b,T,y]),o.useEffect(()=>{let O=C.getElementByKey(b);O!==null&&(O.className=_?"selected":"")},[C,_,b]),null}class l extends r.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new l(C.__key)}static importJSON(){return p()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
|
|
295
|
-
`}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(a,{nodeKey:this.__key})}}function u(){return{node:p()}}function p(){return r.$applyNodeReplacement(new l)}function m(b){return b instanceof l}return bl.$createHorizontalRuleNode=p,bl.$isHorizontalRuleNode=m,bl.HorizontalRuleNode=l,bl.INSERT_HORIZONTAL_RULE_COMMAND=i,bl}process.env.NODE_ENV==="development"?tY():nY();var gx=Object.prototype.hasOwnProperty;function mx(e,t,n){for(n of e.keys())if(Nu(n,t))return n}function Nu(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Nu(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=mx(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=mx(t,o),!o)||!Nu(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(gx.call(e,n)&&++r&&!gx.call(t,n)||!(n in t)||!Nu(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let vg,qN,ZN,JN,XN=!0;typeof process<"u"&&({FORCE_COLOR:vg,NODE_DISABLE_COLORS:qN,NO_COLOR:ZN,TERM:JN}=process.env||{},XN=process.stdout&&process.stdout.isTTY);const Qt={enabled:!qN&&ZN==null&&JN!=="dumb"&&(vg!=null&&vg!=="0"||XN),reset:xn(0,0),bold:xn(1,22),dim:xn(2,22),italic:xn(3,23),underline:xn(4,24),inverse:xn(7,27),hidden:xn(8,28),strikethrough:xn(9,29),black:xn(30,39),red:xn(31,39),green:xn(32,39),yellow:xn(33,39),blue:xn(34,39),magenta:xn(35,39),cyan:xn(36,39),white:xn(37,39),gray:xn(90,39),grey:xn(90,39),bgBlack:xn(40,49),bgRed:xn(41,49),bgGreen:xn(42,49),bgYellow:xn(43,49),bgBlue:xn(44,49),bgMagenta:xn(45,49),bgCyan:xn(46,49),bgWhite:xn(47,49)};function yx(e,t){let n=0,r,o="",i="";for(;n<e.length;n++)r=e[n],o+=r.open,i+=r.close,~t.indexOf(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return o+t+i}function rY(e,t){let n={has:e,keys:t};return n.reset=Qt.reset.bind(n),n.bold=Qt.bold.bind(n),n.dim=Qt.dim.bind(n),n.italic=Qt.italic.bind(n),n.underline=Qt.underline.bind(n),n.inverse=Qt.inverse.bind(n),n.hidden=Qt.hidden.bind(n),n.strikethrough=Qt.strikethrough.bind(n),n.black=Qt.black.bind(n),n.red=Qt.red.bind(n),n.green=Qt.green.bind(n),n.yellow=Qt.yellow.bind(n),n.blue=Qt.blue.bind(n),n.magenta=Qt.magenta.bind(n),n.cyan=Qt.cyan.bind(n),n.white=Qt.white.bind(n),n.gray=Qt.gray.bind(n),n.grey=Qt.grey.bind(n),n.bgBlack=Qt.bgBlack.bind(n),n.bgRed=Qt.bgRed.bind(n),n.bgGreen=Qt.bgGreen.bind(n),n.bgYellow=Qt.bgYellow.bind(n),n.bgBlue=Qt.bgBlue.bind(n),n.bgMagenta=Qt.bgMagenta.bind(n),n.bgCyan=Qt.bgCyan.bind(n),n.bgWhite=Qt.bgWhite.bind(n),n}function xn(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(r){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),r===void 0?this:Qt.enabled?yx(this.keys,r+""):r+""):r===void 0?rY([e],[n]):Qt.enabled?yx([n],r+""):r+""}}function Ha(){}Ha.prototype={diff:function(e,t){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function a(k){return o?(setTimeout(function(){o(void 0,k)},0),!0):k}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var l=t.length,u=e.length,p=1,m=l+u;r.maxEditLength&&(m=Math.min(m,r.maxEditLength));var b=(n=r.timeout)!==null&&n!==void 0?n:1/0,C=Date.now()+b,_=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(_[0],t,e,0);if(_[0].oldPos+1>=u&&y+1>=l)return a([{value:this.join(t),count:t.length}]);var v=-1/0,T=1/0;function O(){for(var k=Math.max(v,-p);k<=Math.min(T,p);k+=2){var P=void 0,M=_[k-1],Y=_[k+1];M&&(_[k-1]=void 0);var X=!1;if(Y){var oe=Y.oldPos-k;X=Y&&0<=oe&&oe<l}var Z=M&&M.oldPos+1<u;if(!X&&!Z){_[k]=void 0;continue}if(!Z||X&&M.oldPos+1<Y.oldPos?P=i.addToPath(Y,!0,void 0,0):P=i.addToPath(M,void 0,!0,1),y=i.extractCommon(P,t,e,k),P.oldPos+1>=u&&y+1>=l)return a(oY(i,P.lastComponent,t,e,i.useLongestToken));_[k]=P,P.oldPos+1>=u&&(T=Math.min(T,k-1)),y+1>=l&&(v=Math.max(v,k+1))}p++}if(o)(function k(){setTimeout(function(){if(p>m||Date.now()>C)return o();O()||k()},0)})();else for(;p<=m&&Date.now()<=C;){var R=O();if(R)return R}},addToPath:function(e,t,n,r){var o=e.lastComponent;return o&&o.added===t&&o.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,a=e.oldPos,l=a-r,u=0;l+1<o&&a+1<i&&this.equals(t[l+1],n[a+1]);)l++,a++,u++;return u&&(e.lastComponent={count:u,previousComponent:e.lastComponent}),e.oldPos=a,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function oY(e,t,n,r,o){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var l=0,u=i.length,p=0,m=0;l<u;l++){var b=i[l];if(b.removed){if(b.value=e.join(r.slice(m,m+b.count)),m+=b.count,l&&i[l-1].added){var C=i[l-1];i[l-1]=i[l],i[l]=C}}else{if(!b.added&&o){var _=n.slice(p,p+b.count);_=_.map(function(v,T){var O=r[m+T];return O.length>v.length?O:v}),b.value=e.join(_)}else b.value=e.join(n.slice(p,p+b.count));p+=b.count,b.added||(m+=b.count)}}var y=i[u-1];return u>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(i[u-2].value+=y.value,i.pop()),i}var vx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,bx=/\S/,QN=new Ha;QN.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!bx.test(e)&&!bx.test(t)};QN.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&vx.test(t[n])&&vx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var eS=new Ha;eS.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
296
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var iY=new Ha;iY.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var aY=new Ha;aY.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function tf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tf=function(t){return typeof t}:tf=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}var sY=Object.prototype.toString,Mu=new Ha;Mu.useLongestToken=!0;Mu.tokenize=eS.tokenize;Mu.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(bg(e,null,null,o),o," ")};Mu.equals=function(e,t){return Ha.prototype.equals.call(Mu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function bg(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var a;if(sY.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),i=0;i<e.length;i+=1)a[i]=bg(e[i],t,n,r,o);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),tf(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],u;for(u in e)e.hasOwnProperty(u)&&l.push(u);for(l.sort(),i=0;i<l.length;i+=1)u=l[i],a[u]=bg(e[u],t,n,r,u);t.pop(),n.pop()}else a=e;return a}var _g=new Ha;_g.tokenize=function(e){return e.slice()};_g.join=_g.removeEmpty=function(e){return e};Qt.red,Qt.grey,Qt.green;Qt.dim().italic;Qt.dim("→");Qt.dim("·");Qt.dim("↵");function wf(e){e=e.replace(/\r?\n/g,`
|
|
297
|
-
`);let t=e.match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,o=(t||[]).length;for(;n<o;n++)r=Math.min(r,t[n].length);return o&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}class lY extends Error{constructor(t={}){super(t.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=t.details||!1,this.generated=!!t.generated,this.operator=t.operator,this.expects=t.expects,this.actual=t.actual}}function Ko(e,t,n,r,o,i,a){if(e)return;let l=a||i;if(a instanceof Error)throw a;let u=o;throw new lY({actual:t,expects:n,operator:r,message:l,details:u,generated:!a})}function Xi(e,t){Ko(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Xi.ok=Xi;Xi.equal=function(e,t,n){Ko(!Nu(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)};Xi.type=function(e,t,n){let r=typeof e;Ko(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)};Xi.instance=function(e,t,n){let r="`"+(t.name||t.constructor.name)+"`";Ko(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${r}`,n)};Xi.snapshot=function(e,t,n){e=wf(e),t=wf(t),Ko(e!==t,e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)};Xi.fixture=function(e,t,n){e=wf(e),t=wf(t),Ko(e!==t,e,t,"not.fixture",!1,"Expected value not to match fixture",n)};Xi.match=function(e,t,n){typeof t=="string"?Ko(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Ko(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)};Xi.throws=function(e,t,n){!n&&typeof t=="string"&&(n=t,t=null);try{e()}catch(r){typeof t=="function"?Ko(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Ko(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Ko(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};class Ps extends Error{}class cY extends Ps{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class uY extends Ps{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class dY extends Ps{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class jl extends Ps{}class tS extends Ps{constructor(t){super(`Invalid unit ${t}`)}}class Kr extends Ps{}class Oa extends Ps{constructor(){super("Zone is an abstract class")}}const gt="numeric",Yo="short",co="long",Tf={year:gt,month:gt,day:gt},nS={year:gt,month:Yo,day:gt},fY={year:gt,month:Yo,day:gt,weekday:Yo},rS={year:gt,month:co,day:gt},oS={year:gt,month:co,day:gt,weekday:co},iS={hour:gt,minute:gt},aS={hour:gt,minute:gt,second:gt},sS={hour:gt,minute:gt,second:gt,timeZoneName:Yo},lS={hour:gt,minute:gt,second:gt,timeZoneName:co},cS={hour:gt,minute:gt,hourCycle:"h23"},uS={hour:gt,minute:gt,second:gt,hourCycle:"h23"},dS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Yo},fS={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:co},hS={year:gt,month:gt,day:gt,hour:gt,minute:gt},pS={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},gS={year:gt,month:Yo,day:gt,hour:gt,minute:gt},mS={year:gt,month:Yo,day:gt,hour:gt,minute:gt,second:gt},hY={year:gt,month:Yo,day:gt,weekday:Yo,hour:gt,minute:gt},yS={year:gt,month:co,day:gt,hour:gt,minute:gt,timeZoneName:Yo},vS={year:gt,month:co,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:Yo},bS={year:gt,month:co,day:gt,weekday:co,hour:gt,minute:gt,timeZoneName:co},_S={year:gt,month:co,day:gt,weekday:co,hour:gt,minute:gt,second:gt,timeZoneName:co};class Yu{get type(){throw new Oa}get name(){throw new Oa}get ianaName(){return this.name}get isUniversal(){throw new Oa}offsetName(t,n){throw new Oa}formatOffset(t,n){throw new Oa}offset(t){throw new Oa}equals(t){throw new Oa}get isValid(){throw new Oa}}let $p=null;class ih extends Yu{static get instance(){return $p===null&&($p=new ih),$p}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return AS(t,n,r)}formatOffset(t,n){return Su(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let nf={};function pY(e){return nf[e]||(nf[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),nf[e]}const gY={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function mY(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,l,u,p,m]=r;return[a,o,i,l,u,p,m]}function yY(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],l=gY[i];i==="era"?r[l]=a:Gt(l)||(r[l]=parseInt(a,10))}return r}let Gd={};class Qi extends Yu{static create(t){return Gd[t]||(Gd[t]=new Qi(t)),Gd[t]}static resetCache(){Gd={},nf={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Qi.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return AS(t,n,r,this.name)}formatOffset(t,n){return Su(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=pY(this.name);let[o,i,a,l,u,p,m]=r.formatToParts?yY(r,n):mY(r,n);l==="BC"&&(o=-Math.abs(o)+1);const b=sh({year:o,month:i,day:a,hour:u===24?0:u,minute:p,second:m,millisecond:0});let C=+n;const _=C%1e3;return C-=_>=0?_:1e3+_,(b-C)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let _x={};function vY(e,t={}){const n=JSON.stringify([e,t]);let r=_x[n];return r||(r=new Intl.ListFormat(e,t),_x[n]=r),r}let xg={};function Eg(e,t={}){const n=JSON.stringify([e,t]);let r=xg[n];return r||(r=new Intl.DateTimeFormat(e,t),xg[n]=r),r}let Cg={};function bY(e,t={}){const n=JSON.stringify([e,t]);let r=Cg[n];return r||(r=new Intl.NumberFormat(e,t),Cg[n]=r),r}let wg={};function _Y(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=wg[o];return i||(i=new Intl.RelativeTimeFormat(e,t),wg[o]=i),i}let rf=null;function xY(){return rf||(rf=new Intl.DateTimeFormat().resolvedOptions().locale,rf)}let xx={};function EY(e){let t=xx[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,xx[e]=t}return t}function CY(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Eg(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=Eg(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function wY(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function TY(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function NY(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function Kd(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function SY(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class OY{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=bY(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):hy(t,3);return Jn(n,this.padTo)}}}class AY{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Qi.create(l).valid?(o=l,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Eg(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class RY{constructor(t,n,r){this.opts={style:"long",...r},!n&&SS()&&(this.rtf=_Y(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):ZY(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const $Y={firstDay:1,minimalDays:4,weekend:[6,7]};class gn{static fromOpts(t){return gn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Vn.defaultLocale,l=a||(i?"en-US":xY()),u=n||Vn.defaultNumberingSystem,p=r||Vn.defaultOutputCalendar,m=Tg(o)||Vn.defaultWeekSettings;return new gn(l,u,p,m,a)}static resetCache(){rf=null,xg={},Cg={},wg={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return gn.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,l,u]=CY(t);this.locale=a,this.numberingSystem=n||l||null,this.outputCalendar=r||u||null,this.weekSettings=o,this.intl=wY(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=SY(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:gn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Tg(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Kd(this,t,DS,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=TY(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return Kd(this,t,PS,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=NY(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return Kd(this,void 0,()=>IS,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Kd(this,t,LS,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(l=>l.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new OY(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new AY(t,this.intl,n)}relFormatter(t={}){return new RY(this.intl,this.isEnglish(),t)}listFormatter(t={}){return vY(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:OS()?EY(this.locale):$Y}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let Dp=null;class Fr extends Yu{static get utcInstance(){return Dp===null&&(Dp=new Fr(0)),Dp}static instance(t){return t===0?Fr.utcInstance:new Fr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Fr(lh(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Su(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Su(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Su(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class DY extends Yu{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ka(e,t){if(Gt(e)||e===null)return t;if(e instanceof Yu)return e;if(PY(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?ih.instance:n==="utc"||n==="gmt"?Fr.utcInstance:Fr.parseSpecifier(n)||Qi.create(e)}else return _s(e)?Fr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new DY(e)}let Ex=()=>Date.now(),Cx="system",wx=null,Tx=null,Nx=null,Sx=60,Ox,Ax=null;class Vn{static get now(){return Ex}static set now(t){Ex=t}static set defaultZone(t){Cx=t}static get defaultZone(){return ka(Cx,ih.instance)}static get defaultLocale(){return wx}static set defaultLocale(t){wx=t}static get defaultNumberingSystem(){return Tx}static set defaultNumberingSystem(t){Tx=t}static get defaultOutputCalendar(){return Nx}static set defaultOutputCalendar(t){Nx=t}static get defaultWeekSettings(){return Ax}static set defaultWeekSettings(t){Ax=Tg(t)}static get twoDigitCutoffYear(){return Sx}static set twoDigitCutoffYear(t){Sx=t%100}static get throwOnInvalid(){return Ox}static set throwOnInvalid(t){Ox=t}static resetCaches(){gn.resetCache(),Qi.resetCache()}}class Go{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const xS=[0,31,59,90,120,151,181,212,243,273,304,334],ES=[0,31,60,91,121,152,182,213,244,274,305,335];function Eo(e,t){return new Go("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function uy(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function CS(e,t,n){return n+(qu(e)?ES:xS)[t-1]}function wS(e,t){const n=qu(e)?ES:xS,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function dy(e,t){return(e-t+7)%7+1}function Nf(e,t=4,n=1){const{year:r,month:o,day:i}=e,a=CS(r,o,i),l=dy(uy(r,o,i),n);let u=Math.floor((a-l+14-t)/7),p;return u<1?(p=r-1,u=Pu(p,t,n)):u>Pu(r,t,n)?(p=r+1,u=1):p=r,{weekYear:p,weekNumber:u,weekday:l,...ch(e)}}function Rx(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=dy(uy(r,1,t),n),l=Ul(r);let u=o*7+i-a-7+t,p;u<1?(p=r-1,u+=Ul(p)):u>l?(p=r+1,u-=Ul(r)):p=r;const{month:m,day:b}=wS(p,u);return{year:p,month:m,day:b,...ch(e)}}function kp(e){const{year:t,month:n,day:r}=e,o=CS(t,n,r);return{year:t,ordinal:o,...ch(e)}}function $x(e){const{year:t,ordinal:n}=e,{month:r,day:o}=wS(t,n);return{year:t,month:r,day:o,...ch(e)}}function Dx(e,t){if(!Gt(e.localWeekday)||!Gt(e.localWeekNumber)||!Gt(e.localWeekYear)){if(!Gt(e.weekday)||!Gt(e.weekNumber)||!Gt(e.weekYear))throw new jl("Cannot mix locale-based week fields with ISO-based week fields");return Gt(e.localWeekday)||(e.weekday=e.localWeekday),Gt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Gt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function kY(e,t=4,n=1){const r=ah(e.weekYear),o=Co(e.weekNumber,1,Pu(e.weekYear,t,n)),i=Co(e.weekday,1,7);return r?o?i?!1:Eo("weekday",e.weekday):Eo("week",e.weekNumber):Eo("weekYear",e.weekYear)}function MY(e){const t=ah(e.year),n=Co(e.ordinal,1,Ul(e.year));return t?n?!1:Eo("ordinal",e.ordinal):Eo("year",e.year)}function TS(e){const t=ah(e.year),n=Co(e.month,1,12),r=Co(e.day,1,Sf(e.year,e.month));return t?n?r?!1:Eo("day",e.day):Eo("month",e.month):Eo("year",e.year)}function NS(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Co(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Co(n,0,59),l=Co(r,0,59),u=Co(o,0,999);return i?a?l?u?!1:Eo("millisecond",o):Eo("second",r):Eo("minute",n):Eo("hour",t)}function Gt(e){return typeof e>"u"}function _s(e){return typeof e=="number"}function ah(e){return typeof e=="number"&&e%1===0}function PY(e){return typeof e=="string"}function IY(e){return Object.prototype.toString.call(e)==="[object Date]"}function SS(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function OS(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function LY(e){return Array.isArray(e)?e:[e]}function kx(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function FY(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Jl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tg(e){if(e==null)return null;if(typeof e!="object")throw new Kr("Week settings must be an object");if(!Co(e.firstDay,1,7)||!Co(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Co(t,1,7)))throw new Kr("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Co(e,t,n){return ah(e)&&e>=t&&e<=n}function jY(e,t){return e-t*Math.floor(e/t)}function Jn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Da(e){if(!(Gt(e)||e===null||e===""))return parseInt(e,10)}function ps(e){if(!(Gt(e)||e===null||e===""))return parseFloat(e)}function fy(e){if(!(Gt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function hy(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function qu(e){return e%4===0&&(e%100!==0||e%400===0)}function Ul(e){return qu(e)?366:365}function Sf(e,t){const n=jY(t-1,12)+1,r=e+(t-n)/12;return n===2?qu(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function sh(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Mx(e,t,n){return-dy(uy(e,1,t),n)+t-1}function Pu(e,t=4,n=1){const r=Mx(e,t,n),o=Mx(e+1,t,n);return(Ul(e)-r+o)/7}function Ng(e){return e>99?e:e>Vn.twoDigitCutoffYear?1900+e:2e3+e}function AS(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},l=new Intl.DateTimeFormat(n,a).formatToParts(o).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function lh(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function RS(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Kr(`Invalid unit value ${e}`);return t}function Of(e,t){const n={};for(const r in e)if(Jl(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=RS(o)}return n}function Su(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Jn(n,2)}:${Jn(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Jn(n,2)}${Jn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ch(e){return FY(e,["hour","minute","second","millisecond"])}const BY=["January","February","March","April","May","June","July","August","September","October","November","December"],$S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WY=["J","F","M","A","M","J","J","A","S","O","N","D"];function DS(e){switch(e){case"narrow":return[...WY];case"short":return[...$S];case"long":return[...BY];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const kS=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],MS=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],zY=["M","T","W","T","F","S","S"];function PS(e){switch(e){case"narrow":return[...zY];case"short":return[...MS];case"long":return[...kS];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const IS=["AM","PM"],HY=["Before Christ","Anno Domini"],GY=["BC","AD"],KY=["B","A"];function LS(e){switch(e){case"narrow":return[...KY];case"short":return[...GY];case"long":return[...HY];default:return null}}function UY(e){return IS[e.hour<12?0:1]}function VY(e,t){return PS(t)[e.weekday-1]}function YY(e,t){return DS(t)[e.month-1]}function qY(e,t){return LS(t)[e.year<0?0:1]}function ZY(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const b=e==="days";switch(t){case 1:return b?"tomorrow":`next ${o[e][0]}`;case-1:return b?"yesterday":`last ${o[e][0]}`;case 0:return b?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,l=Math.abs(t),u=l===1,p=o[e],m=r?u?p[1]:p[2]||p[1]:u?o[e][0]:e;return a?`${l} ${m} ago`:`in ${l} ${m}`}function Px(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const JY={D:Tf,DD:nS,DDD:rS,DDDD:oS,t:iS,tt:aS,ttt:sS,tttt:lS,T:cS,TT:uS,TTT:dS,TTTT:fS,f:hS,ff:gS,fff:yS,ffff:bS,F:pS,FF:mS,FFF:vS,FFFF:_S};class Dr{static create(t,n={}){return new Dr(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const l=t.charAt(a);l==="'"?(r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||l===n?r+=l:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return JY[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Jn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(_,y)=>this.loc.extract(t,_,y),a=_=>t.isOffsetFixed&&t.offset===0&&_.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,_.format):"",l=()=>r?UY(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(_,y)=>r?YY(t,_):i(y?{month:_}:{month:_,day:"numeric"},"month"),p=(_,y)=>r?VY(t,_):i(y?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),m=_=>{const y=Dr.macroTokenToFormatOpts(_);return y?this.formatWithSystemDefault(t,y):_},b=_=>r?qY(t,_):i({era:_},"era"),C=_=>{switch(_){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return p("short",!0);case"cccc":return p("long",!0);case"ccccc":return p("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return p("short",!1);case"EEEE":return p("long",!1);case"EEEEE":return p("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return b("short");case"GG":return b("long");case"GGGGG":return b("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return m(_)}};return Px(Dr.parseFormat(n),C)}formatDurationFromString(t,n){const r=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=u=>p=>{const m=r(p);return m?this.num(u.get(m),p.length):p},i=Dr.parseFormat(n),a=i.reduce((u,{literal:p,val:m})=>p?u:u.concat(m),[]),l=t.shiftTo(...a.map(r).filter(u=>u));return Px(i,o(l))}}const FS=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function yc(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function vc(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,l,u]=i(t,o);return[{...n,...a},l||r,u]},[{},null,1]).slice(0,2)}function bc(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function jS(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=Da(t[n+o]);return[r,null,n+o]}}const BS=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,XY=`(?:${BS.source}?(?:\\[(${FS.source})\\])?)?`,py=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,WS=RegExp(`${py.source}${XY}`),gy=RegExp(`(?:T${WS.source})?`),QY=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,eq=/(\d{4})-?W(\d\d)(?:-?(\d))?/,tq=/(\d{4})-?(\d{3})/,nq=jS("weekYear","weekNumber","weekDay"),rq=jS("year","ordinal"),oq=/(\d{4})-(\d\d)-(\d\d)/,zS=RegExp(`${py.source} ?(?:${BS.source}|(${FS.source}))?`),iq=RegExp(`(?: ${zS.source})?`);function Vl(e,t,n){const r=e[t];return Gt(r)?n:Da(r)}function aq(e,t){return[{year:Vl(e,t),month:Vl(e,t+1,1),day:Vl(e,t+2,1)},null,t+3]}function _c(e,t){return[{hours:Vl(e,t,0),minutes:Vl(e,t+1,0),seconds:Vl(e,t+2,0),milliseconds:fy(e[t+3])},null,t+4]}function Zu(e,t){const n=!e[t]&&!e[t+1],r=lh(e[t+1],e[t+2]),o=n?null:Fr.instance(r);return[{},o,t+3]}function Ju(e,t){const n=e[t]?Qi.create(e[t]):null;return[{},n,t+1]}const sq=RegExp(`^T?${py.source}$`),lq=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function cq(e){const[t,n,r,o,i,a,l,u,p]=e,m=t[0]==="-",b=u&&u[0]==="-",C=(_,y=!1)=>_!==void 0&&(y||_&&m)?-_:_;return[{years:C(ps(n)),months:C(ps(r)),weeks:C(ps(o)),days:C(ps(i)),hours:C(ps(a)),minutes:C(ps(l)),seconds:C(ps(u),u==="-0"),milliseconds:C(fy(p),b)}]}const uq={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function my(e,t,n,r,o,i,a){const l={year:t.length===2?Ng(Da(t)):Da(t),month:$S.indexOf(n)+1,day:Da(r),hour:Da(o),minute:Da(i)};return a&&(l.second=Da(a)),e&&(l.weekday=e.length>3?kS.indexOf(e)+1:MS.indexOf(e)+1),l}const dq=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function fq(e){const[,t,n,r,o,i,a,l,u,p,m,b]=e,C=my(t,o,r,n,i,a,l);let _;return u?_=uq[u]:p?_=0:_=lh(m,b),[C,new Fr(_)]}function hq(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,gq=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,mq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ix(e){const[,t,n,r,o,i,a,l]=e;return[my(t,o,r,n,i,a,l),Fr.utcInstance]}function yq(e){const[,t,n,r,o,i,a,l]=e;return[my(t,l,n,r,o,i,a),Fr.utcInstance]}const vq=yc(QY,gy),bq=yc(eq,gy),_q=yc(tq,gy),xq=yc(WS),HS=vc(aq,_c,Zu,Ju),Eq=vc(nq,_c,Zu,Ju),Cq=vc(rq,_c,Zu,Ju),wq=vc(_c,Zu,Ju);function Tq(e){return bc(e,[vq,HS],[bq,Eq],[_q,Cq],[xq,wq])}function Nq(e){return bc(hq(e),[dq,fq])}function Sq(e){return bc(e,[pq,Ix],[gq,Ix],[mq,yq])}function Oq(e){return bc(e,[lq,cq])}const Aq=vc(_c);function Rq(e){return bc(e,[sq,Aq])}const $q=yc(oq,iq),Dq=yc(zS),kq=vc(_c,Zu,Ju);function Mq(e){return bc(e,[$q,HS],[Dq,kq])}const Lx="Invalid Duration",GS={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Pq={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...GS},_o=146097/400,_l=146097/4800,Iq={years:{quarters:4,months:12,weeks:_o/7,days:_o,hours:_o*24,minutes:_o*24*60,seconds:_o*24*60*60,milliseconds:_o*24*60*60*1e3},quarters:{months:3,weeks:_o/28,days:_o/4,hours:_o*24/4,minutes:_o*24*60/4,seconds:_o*24*60*60/4,milliseconds:_o*24*60*60*1e3/4},months:{weeks:_l/7,days:_l,hours:_l*24,minutes:_l*24*60,seconds:_l*24*60*60,milliseconds:_l*24*60*60*1e3},...GS},bs=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Lq=bs.slice(0).reverse();function Aa(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new rn(r)}function KS(e,t){let n=t.milliseconds??0;for(const r of Lq.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Fx(e,t){const n=KS(e,t)<0?-1:1;bs.reduceRight((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],l=Math.floor(i/a);t[o]+=l*n,t[r]-=l*a*n}return o},null),bs.reduce((r,o)=>{if(Gt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function Fq(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class rn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Iq:Pq;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||gn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return rn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Kr(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new rn({values:Of(t,rn.normalizeUnit),loc:gn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(_s(t))return rn.fromMillis(t);if(rn.isDuration(t))return t;if(typeof t=="object")return rn.fromObject(t);throw new Kr(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Oq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=Rq(t);return r?rn.fromObject(r,n):rn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the Duration is invalid");const r=t instanceof Go?t:new Go(t,n);if(Vn.throwOnInvalid)throw new dY(r);return new rn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new tS(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Dr.create(this.loc,r).formatDurationFromString(this,t):Lx}toHuman(t={}){if(!this.isValid)return Lx;const n=bs.map(r=>{const o=this.values[r];return Gt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=hy(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?KS(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t),r={};for(const o of bs)(Jl(n.values,o)||Jl(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Aa(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=RS(t(this.values[r],r));return Aa(this,{values:n},!0)}get(t){return this[rn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Of(t,rn.normalizeUnit)};return Aa(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Aa(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Fx(this.matrix,t),Aa(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Fq(this.normalize().shiftToAll().toObject());return Aa(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>rn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of bs)if(t.indexOf(a)>=0){i=a;let l=0;for(const p in r)l+=this.matrix[p][a]*r[p],r[p]=0;_s(o[a])&&(l+=o[a]);const u=Math.trunc(l);n[a]=u,r[a]=(l*1e3-u*1e3)/1e3}else _s(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Fx(this.matrix,n),Aa(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Aa(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of bs)if(!n(this.values[r],t.values[r]))return!1;return!0}}const xl="Invalid Interval";function jq(e,t){return!e||!e.isValid?zn.invalid("missing or invalid start"):!t||!t.isValid?zn.invalid("missing or invalid end"):t<e?zn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class zn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the Interval is invalid");const r=t instanceof Go?t:new Go(t,n);if(Vn.throwOnInvalid)throw new uY(r);return new zn({invalid:r})}static fromDateTimes(t,n){const r=vu(t),o=vu(n);return jq(r,o)??new zn({start:r,end:o})}static after(t,n){const r=rn.fromDurationLike(n),o=vu(t);return zn.fromDateTimes(o,o.plus(r))}static before(t,n){const r=rn.fromDurationLike(n),o=vu(t);return zn.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=It.fromISO(r,n),a=i.isValid}catch{a=!1}let l,u;try{l=It.fromISO(o,n),u=l.isValid}catch{u=!1}if(a&&u)return zn.fromDateTimes(i,l);if(a){const p=rn.fromISO(o,n);if(p.isValid)return zn.after(i,p)}else if(u){const p=rn.fromISO(r,n);if(p.isValid)return zn.before(l,p)}}return zn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:r.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(r,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?zn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(vu).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,l=+a>+this.e?this.e:a;r.push(zn.fromDateTimes(o,l)),o=l,i+=1}return r}splitBy(t){const n=rn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(u=>u*o));i=+l>+this.e?this.e:l,a.push(zn.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:zn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return zn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),l=a.sort((u,p)=>u.time-p.time);for(const u of l)r+=u.type==="s"?1:-1,r===1?n=u.time:(n&&+n!=+u.time&&o.push(zn.fromDateTimes(n,u.time)),n=null);return zn.merge(o)}difference(...t){return zn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:xl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Tf,n={}){return this.isValid?Dr.create(this.s.loc.clone(n),t).formatInterval(this):xl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:xl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:xl}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:xl}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):rn.invalid(this.invalidReason)}mapEndpoints(t){return zn.fromDateTimes(t(this.s),t(this.e))}}class Ud{static hasDST(t=Vn.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Qi.isValidZone(t)}static normalizeZone(t){return ka(t,Vn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||gn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||gn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||gn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||gn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||gn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return gn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return gn.create(n,null,"gregory").eras(t)}static features(){return{relative:SS(),localeWeek:OS()}}}function jx(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(rn.fromMillis(r).as("days"))}function Bq(e,t,n){const r=[["years",(u,p)=>p.year-u.year],["quarters",(u,p)=>p.quarter-u.quarter+(p.year-u.year)*4],["months",(u,p)=>p.month-u.month+(p.year-u.year)*12],["weeks",(u,p)=>{const m=jx(u,p);return(m-m%7)/7}],["days",jx]],o={},i=e;let a,l;for(const[u,p]of r)n.indexOf(u)>=0&&(a=u,o[u]=p(e,t),l=i.plus(o),l>t?(o[u]--,e=i.plus(o),e>t&&(l=e,o[u]--,e=i.plus(o))):e=l);return[e,o,l,a]}function Wq(e,t,n,r){let[o,i,a,l]=Bq(e,t,n);const u=t-o,p=n.filter(b=>["hours","minutes","seconds","milliseconds"].indexOf(b)>=0);p.length===0&&(a<t&&(a=o.plus({[l]:1})),a!==o&&(i[l]=(i[l]||0)+u/(a-o)));const m=rn.fromObject(i,r);return p.length>0?rn.fromMillis(u,r).shiftTo(...p).plus(m):m}const yy={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Bx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},zq=yy.hanidec.replace(/[\[|\]]/g,"").split("");function Hq(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(yy.hanidec)!==-1)t+=zq.indexOf(e[n]);else for(const o in Bx){const[i,a]=Bx[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function jo({numberingSystem:e},t=""){return new RegExp(`${yy[e||"latn"]}${t}`)}const Gq="missing Intl.DateTimeFormat.formatToParts support";function ln(e,t=n=>n){return{regex:e,deser:([n])=>t(Hq(n))}}const Kq=" ",US=`[ ${Kq}]`,VS=new RegExp(US,"g");function Uq(e){return e.replace(/\./g,"\\.?").replace(VS,US)}function Wx(e){return e.replace(/\./g,"").replace(VS," ").toLowerCase()}function Bo(e,t){return e===null?null:{regex:RegExp(e.map(Uq).join("|")),deser:([n])=>e.findIndex(r=>Wx(n)===Wx(r))+t}}function zx(e,t){return{regex:e,deser:([,n,r])=>lh(n,r),groups:t}}function Vd(e){return{regex:e,deser:([t])=>t}}function Vq(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Yq(e,t){const n=jo(t),r=jo(t,"{2}"),o=jo(t,"{3}"),i=jo(t,"{4}"),a=jo(t,"{6}"),l=jo(t,"{1,2}"),u=jo(t,"{1,3}"),p=jo(t,"{1,6}"),m=jo(t,"{1,9}"),b=jo(t,"{2,4}"),C=jo(t,"{4,6}"),_=v=>({regex:RegExp(Vq(v.val)),deser:([T])=>T,literal:!0}),y=(v=>{if(e.literal)return _(v);switch(v.val){case"G":return Bo(t.eras("short"),0);case"GG":return Bo(t.eras("long"),0);case"y":return ln(p);case"yy":return ln(b,Ng);case"yyyy":return ln(i);case"yyyyy":return ln(C);case"yyyyyy":return ln(a);case"M":return ln(l);case"MM":return ln(r);case"MMM":return Bo(t.months("short",!0),1);case"MMMM":return Bo(t.months("long",!0),1);case"L":return ln(l);case"LL":return ln(r);case"LLL":return Bo(t.months("short",!1),1);case"LLLL":return Bo(t.months("long",!1),1);case"d":return ln(l);case"dd":return ln(r);case"o":return ln(u);case"ooo":return ln(o);case"HH":return ln(r);case"H":return ln(l);case"hh":return ln(r);case"h":return ln(l);case"mm":return ln(r);case"m":return ln(l);case"q":return ln(l);case"qq":return ln(r);case"s":return ln(l);case"ss":return ln(r);case"S":return ln(u);case"SSS":return ln(o);case"u":return Vd(m);case"uu":return Vd(l);case"uuu":return ln(n);case"a":return Bo(t.meridiems(),0);case"kkkk":return ln(i);case"kk":return ln(b,Ng);case"W":return ln(l);case"WW":return ln(r);case"E":case"c":return ln(n);case"EEE":return Bo(t.weekdays("short",!1),1);case"EEEE":return Bo(t.weekdays("long",!1),1);case"ccc":return Bo(t.weekdays("short",!0),1);case"cccc":return Bo(t.weekdays("long",!0),1);case"Z":case"ZZ":return zx(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return zx(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Vd(/[a-z_+-/]{1,256}?/i);case" ":return Vd(/[^\S\n\r]/);default:return _(v)}})(e)||{invalidReason:Gq};return y.token=e,y}const qq={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Zq(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const u=/^\s+$/.test(o);return{literal:!u,val:u?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let l=qq[a];if(typeof l=="object"&&(l=l[i]),l)return{literal:!1,val:l}}function Jq(e){return[`^${e.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,e]}function Xq(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Jl(n,a)){const l=n[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(o[l.token.val[0]]=l.deser(r.slice(i,i+u))),i+=u}return[r,o]}else return[r,{}]}function Qq(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Gt(e.z)||(n=Qi.create(e.z)),Gt(e.Z)||(n||(n=new Fr(e.Z)),r=e.Z),Gt(e.q)||(e.M=(e.q-1)*3+1),Gt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Gt(e.u)||(e.S=fy(e.u)),[Object.keys(e).reduce((o,i)=>{const a=t(i);return a&&(o[a]=e[i]),o},{}),n,r]}let Mp=null;function eZ(){return Mp||(Mp=It.fromMillis(1555555555555)),Mp}function tZ(e,t){if(e.literal)return e;const n=Dr.macroTokenToFormatOpts(e.val),r=ZS(n,t);return r==null||r.includes(void 0)?e:r}function YS(e,t){return Array.prototype.concat(...e.map(n=>tZ(n,t)))}function qS(e,t,n){const r=YS(Dr.parseFormat(n),e),o=r.map(a=>Yq(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,l]=Jq(o),u=RegExp(a,"i"),[p,m]=Xq(t,u,l),[b,C,_]=m?Qq(m):[null,null,void 0];if(Jl(m,"a")&&Jl(m,"H"))throw new jl("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:u,rawMatches:p,matches:m,result:b,zone:C,specificOffset:_}}}function nZ(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=qS(e,t,n);return[r,o,i,a]}function ZS(e,t){if(!e)return null;const n=Dr.create(t,e).dtFormatter(eZ()),r=n.formatToParts(),o=n.resolvedOptions();return r.map(i=>Zq(i,e,o))}const Pp="Invalid DateTime",Hx=864e13;function Yd(e){return new Go("unsupported zone",`the zone "${e.name}" is not supported`)}function Ip(e){return e.weekData===null&&(e.weekData=Nf(e.c)),e.weekData}function Lp(e){return e.localWeekData===null&&(e.localWeekData=Nf(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function gs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function JS(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function qd(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function of(e,t,n){return JS(sh(e),t,n)}function Gx(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,Sf(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=rn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=sh(i);let[u,p]=JS(l,n,e.zone);return a!==0&&(u+=a,p=e.zone.offset(u)),{ts:u,o:p}}function yu(e,t,n,r,o,i){const{setZone:a,zone:l}=n;if(e&&Object.keys(e).length!==0||t){const u=t||l,p=It.fromObject(e,{...n,zone:u,specificOffset:i});return a?p:p.setZone(l)}else return It.invalid(new Go("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Zd(e,t,n=!0){return e.isValid?Dr.create(gn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Fp(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Jn(e.c.year,n?6:4),t?(r+="-",r+=Jn(e.c.month),r+="-",r+=Jn(e.c.day)):(r+=Jn(e.c.month),r+=Jn(e.c.day)),r}function Kx(e,t,n,r,o,i){let a=Jn(e.c.hour);return t?(a+=":",a+=Jn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=Jn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=Jn(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Jn(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Jn(Math.trunc(-e.o/60)),a+=":",a+=Jn(Math.trunc(-e.o%60))):(a+="+",a+=Jn(Math.trunc(e.o/60)),a+=":",a+=Jn(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const XS={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rZ={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},oZ={ordinal:1,hour:0,minute:0,second:0,millisecond:0},QS=["year","month","day","hour","minute","second","millisecond"],iZ=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],aZ=["year","ordinal","hour","minute","second","millisecond"];function sZ(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new tS(e);return t}function Ux(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return sZ(e)}}function Vx(e,t){const n=ka(t.zone,Vn.defaultZone),r=gn.fromObject(t),o=Vn.now();let i,a;if(Gt(e.year))i=o;else{for(const p of QS)Gt(e[p])&&(e[p]=XS[p]);const l=TS(e)||NS(e);if(l)return It.invalid(l);const u=n.offset(o);[i,a]=of(e,u,n)}return new It({ts:i,zone:n,loc:r,o:a})}function Yx(e,t,n){const r=Gt(n.round)?!0:n.round,o=(a,l)=>(a=hy(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,l)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const l=i(a);if(Math.abs(l)>=1)return o(l,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function qx(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class It{constructor(t){const n=t.zone||Vn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Go("invalid input"):null)||(n.isValid?null:Yd(n));this.ts=Gt(t.ts)?Vn.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const a=n.offset(this.ts);o=qd(this.ts,a),r=Number.isNaN(o.year)?new Go("invalid input"):null,o=r?null:o,i=r?null:a}this._zone=n,this.loc=t.loc||gn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=qx(arguments),[r,o,i,a,l,u,p]=n;return Vx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static utc(){const[t,n]=qx(arguments),[r,o,i,a,l,u,p]=n;return t.zone=Fr.utcInstance,Vx({year:r,month:o,day:i,hour:a,minute:l,second:u,millisecond:p},t)}static fromJSDate(t,n={}){const r=IY(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=ka(n.zone,Vn.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:gn.fromObject(n)}):It.invalid(Yd(o))}static fromMillis(t,n={}){if(_s(t))return t<-Hx||t>Hx?It.invalid("Timestamp out of range"):new It({ts:t,zone:ka(n.zone,Vn.defaultZone),loc:gn.fromObject(n)});throw new Kr(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(_s(t))return new It({ts:t*1e3,zone:ka(n.zone,Vn.defaultZone),loc:gn.fromObject(n)});throw new Kr("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=ka(n.zone,Vn.defaultZone);if(!r.isValid)return It.invalid(Yd(r));const o=gn.fromObject(n),i=Of(t,Ux),{minDaysInFirstWeek:a,startOfWeek:l}=Dx(i,o),u=Vn.now(),p=Gt(n.specificOffset)?r.offset(u):n.specificOffset,m=!Gt(i.ordinal),b=!Gt(i.year),C=!Gt(i.month)||!Gt(i.day),_=b||C,y=i.weekYear||i.weekNumber;if((_||m)&&y)throw new jl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(C&&m)throw new jl("Can't mix ordinal dates with month/day");const v=y||i.weekday&&!_;let T,O,R=qd(u,p);v?(T=iZ,O=rZ,R=Nf(R,a,l)):m?(T=aZ,O=oZ,R=kp(R)):(T=QS,O=XS);let k=!1;for(const U of T){const Q=i[U];Gt(Q)?k?i[U]=O[U]:i[U]=R[U]:k=!0}const P=v?kY(i,a,l):m?MY(i):TS(i),M=P||NS(i);if(M)return It.invalid(M);const Y=v?Rx(i,a,l):m?$x(i):i,[X,oe]=of(Y,p,r),Z=new It({ts:X,zone:r,o:oe,loc:o});return i.weekday&&_&&t.weekday!==Z.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=Tq(t);return yu(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=Nq(t);return yu(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=Sq(t);return yu(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Gt(t)||Gt(n))throw new Kr("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[l,u,p,m]=nZ(a,t,n);return m?It.invalid(m):yu(l,u,r,`format ${n}`,t,p)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Mq(t);return yu(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Kr("need to specify a reason the DateTime is invalid");const r=t instanceof Go?t:new Go(t,n);if(Vn.throwOnInvalid)throw new cY(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=ZS(t,gn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return YS(Dr.parseFormat(t),gn.fromObject(n)).map(r=>r.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ip(this).weekYear:NaN}get weekNumber(){return this.isValid?Ip(this).weekNumber:NaN}get weekday(){return this.isValid?Ip(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Lp(this).weekday:NaN}get localWeekNumber(){return this.isValid?Lp(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Lp(this).weekYear:NaN}get ordinal(){return this.isValid?kp(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ud.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ud.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ud.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ud.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=sh(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),l=this.zone.offset(r-i*n);if(a===l)return[this];const u=r-a*n,p=r-l*n,m=qd(u,a),b=qd(p,l);return m.hour===b.hour&&m.minute===b.minute&&m.second===b.second&&m.millisecond===b.millisecond?[gs(this,{ts:u}),gs(this,{ts:p})]:[this]}get isInLeapYear(){return qu(this.year)}get daysInMonth(){return Sf(this.year,this.month)}get daysInYear(){return this.isValid?Ul(this.year):NaN}get weeksInWeekYear(){return this.isValid?Pu(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Pu(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Dr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Fr.instance(t),n)}toLocal(){return this.setZone(Vn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=ka(t,Vn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=of(a,i,t)}return gs(this,{ts:o,zone:t})}else return It.invalid(Yd(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return gs(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Of(t,Ux),{minDaysInFirstWeek:r,startOfWeek:o}=Dx(n,this.loc),i=!Gt(n.weekYear)||!Gt(n.weekNumber)||!Gt(n.weekday),a=!Gt(n.ordinal),l=!Gt(n.year),u=!Gt(n.month)||!Gt(n.day),p=l||u,m=n.weekYear||n.weekNumber;if((p||a)&&m)throw new jl("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new jl("Can't mix ordinal dates with month/day");let b;i?b=Rx({...Nf(this.c,r,o),...n},r,o):Gt(n.ordinal)?(b={...this.toObject(),...n},Gt(n.day)&&(b.day=Math.min(Sf(b.year,b.month),b.day))):b=$x({...kp(this.c),...n});const[C,_]=of(b,this.o,this.zone);return gs(this,{ts:C,o:_})}plus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t);return gs(this,Gx(this,n))}minus(t){if(!this.isValid)return this;const n=rn.fromDurationLike(t).negate();return gs(this,Gx(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=rn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(o==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?Dr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Pp}toLocaleString(t=Tf,n={}){return this.isValid?Dr.create(this.loc.clone(n),t).formatDateTime(this):Pp}toLocaleParts(t={}){return this.isValid?Dr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let l=Fp(this,a);return l+="T",l+=Kx(this,a,n,r,o,i),l}toISODate({format:t="extended"}={}){return this.isValid?Fp(this,t==="extended"):null}toISOWeekDate(){return Zd(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+Kx(this,a==="extended",n,t,r,i):null}toRFC2822(){return Zd(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Zd(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Fp(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),Zd(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Pp}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return rn.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=LY(n).map(rn.normalizeUnit),a=t.valueOf()>this.valueOf(),l=a?this:t,u=a?t:this,p=Wq(l,u,i,o);return a?p.negate():p}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?zn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),Yx(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?Yx(t.base||It.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(It.isDateTime))throw new Kr("min requires all arguments be DateTimes");return kx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new Kr("max requires all arguments be DateTimes");return kx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return qS(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Tf}static get DATE_MED(){return nS}static get DATE_MED_WITH_WEEKDAY(){return fY}static get DATE_FULL(){return rS}static get DATE_HUGE(){return oS}static get TIME_SIMPLE(){return iS}static get TIME_WITH_SECONDS(){return aS}static get TIME_WITH_SHORT_OFFSET(){return sS}static get TIME_WITH_LONG_OFFSET(){return lS}static get TIME_24_SIMPLE(){return cS}static get TIME_24_WITH_SECONDS(){return uS}static get TIME_24_WITH_SHORT_OFFSET(){return dS}static get TIME_24_WITH_LONG_OFFSET(){return fS}static get DATETIME_SHORT(){return hS}static get DATETIME_SHORT_WITH_SECONDS(){return pS}static get DATETIME_MED(){return gS}static get DATETIME_MED_WITH_SECONDS(){return mS}static get DATETIME_MED_WITH_WEEKDAY(){return hY}static get DATETIME_FULL(){return yS}static get DATETIME_FULL_WITH_SECONDS(){return vS}static get DATETIME_HUGE(){return bS}static get DATETIME_HUGE_WITH_SECONDS(){return _S}}function vu(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&_s(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new Kr(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var fn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(fn||{});function vy(e){const t={1:fn.Monday,2:fn.Tuesday,3:fn.Wednesday,4:fn.Thursday,5:fn.Friday,6:fn.Saturday,7:fn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function vi(e){return{[fn.Monday]:"Monday",[fn.Tuesday]:"Tuesday",[fn.Wednesday]:"Wednesday",[fn.Thursday]:"Thursday",[fn.Friday]:"Friday",[fn.Saturday]:"Saturday",[fn.Sunday]:"Sunday"}[e]}class Zx{constructor(t,n,r){so(this,"end"),so(this,"start"),this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[o,i]=n.start.split(":"),[a,l]=n.end.split(":");this.end=this.end.set({hour:Number(a),minute:Number(l)}),this.start=this.start.set({hour:Number(o),minute:Number(i)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class e1{constructor(t,n){so(this,"holidayHoursByDate"),so(this,"hours"),so(this,"timezone"),this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const o=this.getHours(r);if(o&&!o.isClosed)for(const i of o.openIntervals||[]){const a=new Zx(r,i,this.timezone);if(a.contains(t))return a}}return null}getCurrentInterval(){return this.getInterval(It.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(i,a)=>i.start===a.start?0:i.start>a.start?1:-1,o=n.sort(r);for(const[i,a]of o.entries())if(a.contains(t)&&o.length>i+1)return o[i+1];for(const i of o)if(i.start>t)return i;return null}getIntervalsForNDays(t,n){const r=[];for(let o=0;o<t;o++){let i=n;i=i.plus({days:o});const a=this.getHours(i);a&&!a.isClosed&&r.push(...a.openIntervals.map(l=>new Zx(i,l,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=vi(vy(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(It.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,o,i]=n,a=It.fromObject({year:Number(r),month:Number(o),day:Number(i)},{zone:this.timezone});if(t<a)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(It.now())}}function lZ(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function cZ(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function Xu(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function Qu(e){return!e.futureInterval}function uZ(e){return Xu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):Qu(e)?an.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):an.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function dZ(e){return Xu(e)||Qu(e)?null:an.jsx("span",{className:"HoursStatus-separator",children:" • "})}function fZ(e){return Xu(e)||Qu(e)?null:an.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function hZ(e){if(Xu(e)||Qu(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return an.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function pZ(e){var t,n;if(Xu(e)||Qu(e))return null;const r={weekday:"long",...e.dayOptions??{}};let o="";if(e.isOpen){const i=e.currentInterval;o+=((t=i==null?void 0:i.end)==null?void 0:t.setLocale("en-US").toLocaleString(r))||""}else{const i=e.futureInterval;o+=((n=i==null?void 0:i.start)==null?void 0:n.setLocale("en-US").toLocaleString(r))||""}return an.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",o]})}function gZ(e,t){const n=e.currentTemplate||uZ,r=e.separatorTemplate||dZ,o=e.futureTemplate||fZ,i=e.timeTemplate||hZ,a=e.dayOfWeekTemplate||pZ;return an.jsxs("div",{className:ku("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),o(e),i(e),a(e)]})}const mZ=e=>{const[t,n]=H.useState(!1),[r,o]=H.useState(!1);H.useEffect(()=>{o(!0)},[]);const i=e.statusTemplate||gZ,a=new e1(e.hours,e.timezone),l=a.isOpenNow(),u=a.getCurrentInterval(),p=a.getNextInterval(),m=(u==null?void 0:u.end)||(p==null?void 0:p.start);if(m&&!t){n(!0);const C=m.toMillis()-It.now().toMillis();setTimeout(()=>n(!1),C)}const b={isOpen:l,currentInterval:u,futureInterval:p,...e};return an.jsx(an.Fragment,{children:r&&i(b,e)})};function yZ(e,t){const n=[];return e.forEach(r=>{const o=n[n.length-1];o?cZ(o.intervals,r.intervals)?(o.endDay=r.endDay,o.isToday=o.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const o=t&&vi(r.startDay)in t?t[vi(r.startDay)]||"":vi(r.startDay),i=t&&vi(r.endDay)in t?t[vi(r.endDay)]||"":vi(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${o}`:`${o} - ${i}`}})}function vZ(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(o=>{const i=o.getStartTime("en-US",t),a=o.getEndTime("en-US",t);n.push(`${i} - ${a}`)}),n}function bZ(e,t,n){const r=[];for(let o=1;o<=7;o++){const i=It.fromObject({weekday:o}),a=vy(i);r.push({startDay:a,endDay:a,dayName:n&&vi(a).toLowerCase()in n?n[vi(a).toLowerCase()]||"":vi(a),intervals:e.filter(l=>l.start.weekday===o),isToday:t.weekday===o})}return r}const _Z=e=>{const[t,n]=H.useState(!1);H.useEffect(()=>{n(!0)},[]);const r=new e1(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),o=It.now(),i=r.getIntervalsForNDays(7,o);let a=bZ(i,o,e.dayOfWeekNames);function l(m){return m?{today:vy(o),monday:fn.Monday,tuesday:fn.Tuesday,wednesday:fn.Wednesday,thursday:fn.Thursday,friday:fn.Friday,saturday:fn.Saturday,sunday:fn.Sunday}[m]:fn.Sunday}let u=[fn.Sunday,fn.Monday,fn.Tuesday,fn.Wednesday,fn.Thursday,fn.Friday,fn.Saturday];const p=u.indexOf(l(e.startOfWeek));return u=lZ(u,7-p),a.sort((m,b)=>u.indexOf(m.startDay)-u.indexOf(b.startDay)),e.collapseDays&&(a=yZ(a,e.dayOfWeekNames)),an.jsx(an.Fragment,{children:t&&an.jsx("div",{className:ku("HoursTable",e.className),children:a.map(m=>{const b=(e.intervalStringsBuilderFn||vZ)(m,e.timeOptions);return an.jsxs("div",{className:ku("HoursTable-row",{"is-today":m.isToday}),children:[an.jsx("span",{className:"HoursTable-day",children:m.dayName}),an.jsx("span",{className:"HoursTable-intervals",children:b.map((C,_)=>an.jsx("span",{className:"HoursTable-interval",children:C},_))})]},m.dayName)})})})},Sg=Math.log2(1.6745627884839434),xZ=4,EZ=19,Og="js-baidu-neg-lng-fix";let t1;const CZ=new Promise(e=>t1=e),wZ="https://api.map.baidu.com/geoconv/v1/";let bu=[];const TZ="gcj02ToBD09Callback_b872c21c";let NZ=0,Jx;async function n1(e){return await new Promise((t,n)=>{bu.push({coordinates:e,resolve:t,reject:n}),bu.length===1&&(Jx=setTimeout(r,100)),bu.length>40&&(clearTimeout(Jx),r());function r(){const o=bu;bu=[];const i=[].concat(...o.map(u=>u.coordinates)),a=TZ+"_"+NZ++,l=document.createElement("script");window[a]=u=>{if(u.status){const b=new Error(`Unable to convert coordinates to BD-09: Received status code ${u.status}${u.message?": "+u.message:""}`);o.forEach(C=>C.reject(b))}const p=u.result.map(b=>new gc(b.y,b.x));let m=0;o.forEach(b=>{b.resolve(p.slice(m,m+=b.coordinates.length))}),delete window[a],l.parentNode.removeChild(l)},CZ.then(u=>{const p={ak:u,callback:a,coords:i.map(m=>`${m.longitude},${m.latitude}`).join(";"),from:3,to:5};l.src=wZ+"?"+Object.entries(p).map(([m,b])=>m+"="+b).join("&"),document.head.appendChild(l)})}})}class SZ extends mc{constructor(t){super(t);const n=!!(window.MSInputMethodContext&&document.documentMode);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:n?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper.dataset.baiduZoom=this.map.getZoom(),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new gc(this.map.getCenter())}getZoom(){return this.map.getZoom()-Sg}setCenter(t,n){this._centerReady=n1([t]).then(([r])=>{const o=new BMap.Point(r.longitude,r.latitude);this.map.panTo(o,{noAnimation:!n})})}setZoom(t,n){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+Sg)},{enableAnimation:n})})}}class OZ extends oh{constructor(t){super(t),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;const n=this;class r extends BMap.Marker{initialize(a){return n._wrapper=super.initialize(a),n._wrapper&&(n._wrapper.style.zIndex=n._zIndex,n._originalWrapperClass=n._wrapper.getAttribute("class"),n._wrapper.setAttribute("class",n._getClass()),n._wrapper.appendChild(n._element),n.addListeners()),n._wrapper}draw(){if(n._wrapper){const a=n._wrapper.style.zIndex;super.draw(),n._wrapper.style.height="",n._wrapper.style.width="",n._wrapper.style.pointerEvents="none",n._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0));const o=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(o),this.pin.setShadow(o)}addListeners(){super.addListeners(),this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=n1([t]).then(([n])=>{this._negativeLngFix=n.longitude<0,this.pin.setPosition(new BMap.Point(n.longitude+(this._negativeLngFix?180:0),n.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](Og)})}setMap(t,n){this._coordinateReady.then(()=>{n&&n.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?Og:""} ${this._wrapperClass}`}}const AZ="https://api.map.baidu.com/getscript";function RZ(e,t,n,{params:r={},version:o="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const i=n,a={ak:i,v:o,...r};t1(i);const l=document.createElement("script");l.src=AZ+"?"+Object.entries(a).map(([m,b])=>m+"="+b).join("&"),l.onload=()=>e(),document.head.appendChild(l);let u="";for(let m=xZ;m<=EZ;m++){const b=2**(m-Sg+7);u+=`[data-baidu-zoom="${m}"] .${Og}{transform:translateX(-${b}px);}`}const p=document.createElement("style");p.appendChild(document.createTextNode(u)),document.head.appendChild(p)}new Ms().withLoadFunction(RZ).withMapClass(SZ).withPinClass(OZ).withProviderName("Baidu").build();let r1;function $Z(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),this._container=document.createElement("div"),this._map=null,this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(n){this._pins.add(n),n._wrapper.style.position="absolute",this._container.appendChild(n._wrapper),this._map&&this.updatePinPosition(n)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(n){this._pins.delete(n),this._container.removeChild(n._wrapper)}updatePinPosition(n){if(!this._map)return;const r=this._map.tryLocationToPixel(n._location,Microsoft.Maps.PixelReference.control);n._wrapper.style.left=r.x+"px",n._wrapper.style.top=r.y+"px"}updatePinPositions(){this._pins.forEach(n=>this.updatePinPosition(n))}}r1=e}class DZ extends mc{constructor(t){super(t),this.wrapper=t.wrapper,this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new r1(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler())}getCenter(){return new gc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(t,n){const r=new Microsoft.Maps.Location(t.latitude,t.longitude);this.map.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(t,n){this.map.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class kZ extends oh{static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}constructor(t){super(t),this._map=null,this._location=new Microsoft.Maps.Location(0,0)}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,n){n&&n.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}const Xx="BingMapsCallback_593d7d33",MZ="https://www.bing.com/api/maps/mapcontrol";function PZ(e,t,n,{params:r={}}={}){window[Xx]=()=>{$Z(),e()};const o={callback:Xx,key:n,...r};SN(MZ+"?"+Object.entries(o).map(([i,a])=>i+"="+a).join("&"))}new Ms().withLoadFunction(PZ).withMapClass(DZ).withPinClass(kZ).withProviderName("Bing").build();class IZ extends mc{constructor(t){if(super(t),this.map=new mapboxgl.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions}),t.controlEnabled){const n=new mapboxgl.NavigationControl({showCompass:!1});this.map.addControl(n)}this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new gc(this.map.getCenter())}getZoom(){return this.map.getZoom()+1}setCenter(t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map[n?"panTo":"setCenter"](r)}setZoom(t,n){this.map[n?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,n,r){const o=new mapboxgl.LngLat(n.longitude,n.latitude);this.map[r?"easeTo":"jumpTo"]({center:o,zoom:t-1})}}class LZ extends oh{constructor(t){super(t),this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper})}setCoordinate(t){this.pin.setLngLat(new mapboxgl.LngLat(t.longitude,t.latitude))}setMap(t,n){t?this.pin.addTo(t.getProviderMap().map):this.pin.remove()}}function FZ(e,t,n,{version:r="v1.13.0"}={}){const o=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ms().withLoadFunction(FZ).withMapClass(IZ).withPinClass(LZ).withProviderName("Mapbox").build();let o1=class extends mc{constructor(e){super(e),this._initMap(e),e.controlEnabled&&this.map.zoomControl.setPosition("topright"),this.map.on("movestart",()=>this._panStartHandler()),this.map.on("moveend",()=>this._panHandler())}getCenter(){return new gc(this.map.getCenter())}getZoom(){return this.map.getZoom()}setCenter(e,t){const n=new L.latLng(e.latitude,e.longitude);this.map.panTo(n,{animate:t})}setZoom(e,t){this.map.setZoom(e,{animate:t})}setZoomCenter(e,t,n){const r=new L.latLng(t.latitude,t.longitude);this.map.setView(r,e,{animate:n})}_initMap(e){this.map=new L.map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions});const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.tileLayerOptions||{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=this.constructor.apiKey,L.tileLayer(n,r).addTo(this.map)}},jZ=class extends ny{constructor(e){super(e),this.pin=new L.marker,this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(e){const t=new L.latLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){e?this.pin.addTo(e.getProviderMap().map):this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),o=e.getAnchorY();this.pin.setIcon(new L.icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,o*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}};function BZ(e,t,n,{version:r="1.7.1"}={}){const o=`https://unpkg.com/leaflet@${r}/dist/leaflet`;o1.apiKey=n;const i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>e(),document.head.appendChild(i),document.head.appendChild(a)}const i1=new Ms().withLoadFunction(BZ).withMapClass(o1).withPinClass(jZ).withProviderName("Leaflet").build(),WZ=i1.getMapClass(),zZ=i1.getPinClass();class HZ extends WZ{_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.latLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class GZ extends zZ{}function KZ(e,t,n,{version:r="v1.3.2"}={}){const o=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,i=document.createElement("link");i.rel="stylesheet",i.href=o+".css";const a=document.createElement("script");a.src=o+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(i),document.head.appendChild(a)}new Ms().withLoadFunction(KZ).withMapClass(HZ).withPinClass(GZ).withProviderName("MapQuest").build();const uh=({label:e,link:t,variant:n,size:r,borderRadius:o,className:i,fontSize:a="default"})=>ne.jsx(nh,{asChild:!0,className:i,variant:n,size:r,borderRadius:o,fontSize:a,children:ne.jsx(rh,{href:t??"",children:e})});uh.displayName="CTA";const a1=kr("components",{variants:{level:{1:"font-heading1-fontWeight text-heading1-fontSize text-heading1-color font-heading1-fontFamily",2:"font-heading2-fontWeight text-heading2-fontSize text-heading2-color font-heading2-fontFamily",3:"font-heading3-fontWeight text-heading3-fontSize text-heading3-color font-heading3-fontFamily",4:"font-heading4-fontWeight text-heading4-fontSize text-heading4-color font-heading4-fontFamily",5:"font-heading5-fontWeight text-heading5-fontSize text-heading5-color font-heading5-fontFamily",6:"font-heading6-fontWeight text-heading6-fontSize text-heading6-color font-heading6-fontFamily"},fontSize:{default:"",xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{default:"",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},transform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"}},defaultVariants:{fontSize:"default",color:"primary",weight:"default",transform:"none"}}),dh=ge.forwardRef(({className:e,level:t=1,color:n,weight:r,transform:o,fontSize:i,...a},l)=>{const u=`h${t}`;return ne.jsx(u,{id:"tag",className:jr(a1({fontSize:i,color:n,weight:r,transform:o,level:t}),e),ref:l,...a,children:a.children})});dh.displayName="Heading";const s1=kr("mx-auto",{variants:{padding:{default:"px-4 py-16 md:px-8",none:"",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"},maxWidth:{default:"max-w-6xl",full:"max-w-full",xl:"max-w-4xl"}},defaultVariants:{padding:"default",maxWidth:"default"}}),Is=ge.forwardRef(({className:e,padding:t,maxWidth:n,...r},o)=>ne.jsx("div",{className:"components bg-main",children:ne.jsx("div",{className:jr(s1({padding:t,maxWidth:n}),e),ref:o,...r,children:r.children})}));Is.displayName="Section";const UZ={address:_r({label:"Address",filter:{types:["type.address"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},VZ=({alignment:e,padding:t,address:n,getDirectionsProvider:r})=>{const o=Vr(),i=br(o,n),a=EN(i,void 0,void 0,{provider:r});return ne.jsx(Is,{className:`flex flex-col justify-center components ${e} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:t,children:i&&ne.jsx("div",{children:ne.jsxs(uo,{displayName:"Address",fieldId:n.constantValueEnabled?"constant value":"address",children:[ne.jsx(d9,{address:i,lines:[["line1"],["line2","city","region","postalCode"]]}),a&&ne.jsx(rh,{cta:{link:a,label:"Get Directions",linkType:"URL"},target:"_blank",className:"font-bold text-palette-primary underline hover:no-underline md:px-4;"})]})})})},YZ={fields:UZ,defaultProps:{alignment:"items-start",padding:"none",getDirectionsProvider:"google",address:{field:"address",constantValue:{line1:"",city:"",region:"",postalCode:"",countryCode:""}}},label:"Address",render:e=>ne.jsx(VZ,{...e})},l1=ge.forwardRef(({text:e,...t},n)=>{const r=Vr();return ne.jsx(uo,{displayName:"Body",fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(th,{ref:n,...t,children:br(r,e)})})});l1.displayName="BodyText";const Qx={text:_r({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Pa(),color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},qZ={label:"Body Text",fields:Qx,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},fontSize:"default",fontWeight:"default",color:"default",textTransform:"none"},resolveFields:async()=>{const e=await Xl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...Qx,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>ne.jsx(l1,{...e})},ZZ={entityField:_r({label:"Entity Field",filter:{types:["type.cta"]}}),fontSize:Pa(),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]}},JZ=({entityField:e,variant:t,className:n,fontSize:r,...o})=>{const i=Vr(),a=br(i,e);return ne.jsx(uo,{displayName:"CTA",fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(uh,{label:a==null?void 0:a.label,link:(a==null?void 0:a.link)||"#",variant:t,className:n,fontSize:r,...o})})},XZ={label:"Call to Action",fields:ZZ,defaultProps:{entityField:{field:"",constantValue:{name:"Call to Action"}},variant:"primary",fontSize:"default"},render:e=>ne.jsx(JZ,{...e})},QZ="data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Material/Outline/Mail_outline'%3e%3cpath%20id='Vector'%20d='M14.4%201.95831H1.6C0.72%201.95831%200.00799999%202.67831%200.00799999%203.55831L0%2013.1583C0%2014.0383%200.72%2014.7583%201.6%2014.7583H14.4C15.28%2014.7583%2016%2014.0383%2016%2013.1583V3.55831C16%202.67831%2015.28%201.95831%2014.4%201.95831ZM14.4%2013.1583H1.6V5.15831L8%209.15831L14.4%205.15831V13.1583ZM8%207.55831L1.6%203.55831H14.4L8%207.55831Z'%20fill='%23D83B18'/%3e%3c/g%3e%3c/svg%3e",eJ=kr("list-inside font-body-fontFamily",{variants:{fontSize:{default:"text-body-fontSize",xs:"text-xs",sm:"text-sm",medium:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontSize:"default",fontWeight:"default",color:"default"}}),eE={list:_r({label:"Entity Field",filter:{types:["type.string"],allowList:["emails"],includeListsOnly:!0}}),fontSize:{label:"Font Size",type:"select",options:[{label:"Default",value:"default"},{label:"Extra Small",value:"xs"},{label:"Small",value:"sm"},{label:"Medium",value:"medium"},{label:"Large",value:"lg"},{label:"Extra Large",value:"xl"},{label:"2xl",value:"2xl"},{label:"3xl",value:"3xl"},{label:"4xl",value:"4xl"},{label:"5xl",value:"5xl"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},includeHyperlink:{label:"Include Hyperlink",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},listLength:{type:"number",label:"List Length",min:1,max:100}},tJ=({list:e,fontSize:t,fontWeight:n,color:r,includeHyperlink:o,listLength:i})=>{const a=Vr();let l=br(a,e);return l?Array.isArray(l)||(l=[l]):l=["sample_email1@gmail.com","sample_email2@yahoo.com","sample_email3@msn.com"],ne.jsx(uo,{displayName:"Email List",fieldId:e.field,children:ne.jsx("ul",{className:jr("components",eJ({fontSize:t,fontWeight:n,color:r}),`${o?"text-blue-600 dark:text-blue-500 hover:underline":""}`),children:l.slice(0,Math.min(l.length,i)).map((u,p)=>ne.jsxs("li",{className:"mb-2 flex items-center",children:[ne.jsx("img",{className:"mr-2",src:QZ}),ne.jsx("span",{children:o?ne.jsx("a",{href:u,children:u}):u})]},p))})})},nJ={label:"Emails",fields:eE,defaultProps:{list:{field:"",constantValue:[]},includeHyperlink:!0,listLength:5},resolveFields:async()=>{const e=await Xl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...eE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>ne.jsx(tJ,{...e})},rJ=kr("flex",{variants:{direction:{row:"flex-row",column:"flex-col"},alignment:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justification:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around"},spacing:{small:"gap-2",medium:"gap-4",large:"gap-8"},wrap:{wrap:"flex-wrap",nowrap:"flex-nowrap"}},defaultVariants:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"}}),c1=ge.forwardRef(({className:e,direction:t,alignment:n,justification:r,spacing:o,renderDropZone:i,...a},l)=>ne.jsx("div",{className:jr(rJ({direction:t,alignment:n,justification:r,spacing:o}),e),ref:l,...a,children:i({zone:"flex-container"})}));c1.displayName="FlexContainer";const oJ={direction:{label:"Direction",type:"select",options:[{value:"row",label:"Horizontal"},{value:"column",label:"Vertical"}]},alignment:{label:"Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"stretch",label:"Stretch"}]},justification:{label:"Justification",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"},{value:"spaceAround",label:"Space Around"}]},spacing:{label:"Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},wrap:{label:"Wrap",type:"select",options:[{value:"nowrap",label:"No Wrap"},{value:"wrap",label:"Wrap"}]}},iJ={label:"Flex Container",fields:oJ,defaultProps:{direction:"column",alignment:"start",justification:"start",spacing:"medium",wrap:"nowrap"},render:({direction:e,alignment:t,justification:n,spacing:r,className:o,puck:{renderDropZone:i}})=>ne.jsx(c1,{renderDropZone:i,direction:e,alignment:t,justification:n,className:o,spacing:r})},aJ={coordinate:_r({label:"Get Directions",filter:{types:["type.coordinate"]}}),getDirectionsProvider:{label:"Maps Provider",type:"radio",options:[{label:"Google",value:"google"},{label:"Apple",value:"apple"},{label:"Bing",value:"bing"}]},variant:{label:"Variant",type:"radio",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},size:{label:"Size",type:"radio",options:[{label:"Default",value:"default"},{label:"Small",value:"small"},{label:"Large",value:"large"}]},fontSize:Pa(),borderRadius:{label:"Border Radius",type:"radio",options:[{label:"Default",value:"default"},{label:"None",value:"none"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},sJ=({variant:e,size:t,borderRadius:n,alignment:r,padding:o,coordinate:i,getDirectionsProvider:a,fontSize:l})=>{const u=Vr(),p=br(u,i);p||console.warn("yextDisplayCoordinate is not present in the stream");const m=EN(void 0,void 0,void 0,{provider:a},p);return ne.jsx(Is,{className:`flex flex-col justify-center components ${r} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:o,children:ne.jsx(nh,{asChild:!0,variant:e,size:t,fontSize:l,borderRadius:n,children:ne.jsx(rh,{href:m??"#",children:"Get Directions"})})})},lJ={fields:aJ,defaultProps:{variant:"primary",size:"default",fontSize:"default",borderRadius:"default",alignment:"items-start",padding:"none",getDirectionsProvider:"google",coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},label:"Get Directions",render:e=>ne.jsx(sJ,{...e})},cJ=[{label:"0",value:"py-0"},{label:"0.5",value:"py-0.5"},{label:"1",value:"py-1"},{label:"1.5",value:"py-1.5"},{label:"2",value:"py-2"},{label:"2.5",value:"py-2.5"},{label:"3",value:"py-3"},{label:"3.5",value:"py-3.5"},{label:"4",value:"py-4"},{label:"5",value:"py-5"},{label:"6",value:"py-6"},{label:"7",value:"py-7"},{label:"8",value:"py-8"},{label:"9",value:"py-9"},{label:"10",value:"py-10"},{label:"11",value:"py-11"},{label:"12",value:"py-12"},{label:"14",value:"py-14"},{label:"16",value:"py-16"},{label:"20",value:"py-20"},{label:"24",value:"py-24"}],uJ=kr("components",{variants:{backgroundColor:{default:"bg-grid-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"},maxContentWidth:{default:"max-w-grid-maxWidth",lg:"max-w-[1024px]",xl:"max-w-[1280px]",xxl:"max-w-[1536px]"}},defaultVariants:{backgroundColor:"default",maxContentWidth:"default"}}),dJ=kr("components flex flex-col min-h-0 min-w-0 md:grid md:grid-cols-12 mx-auto gap-y-grid-verticalSpacing",{variants:{horizontalSpacing:{small:"gap-x-2 md:gap-x-4",medium:"gap-x-8 md:gap-x-12",large:"gap-x-12 md:gap-x-16"}},defaultVariants:{horizontalSpacing:"medium"}}),fJ=kr("flex flex-col gap-y-grid-verticalSpacing",{variants:{verticalAlignment:{start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between"}},defaultVariants:{verticalAlignment:"start"}}),u1=ge.forwardRef(({className:e,distribution:t,columns:n,horizontalSpacing:r,verticalPadding:o,maxContentWidth:i,renderDropZone:a,backgroundColor:l,...u},p)=>ne.jsx(Is,{className:jr(uJ({maxContentWidth:i,backgroundColor:l}),o),padding:"none",children:ne.jsx("div",{className:jr(dJ({horizontalSpacing:r}),e),ref:p,style:{gridTemplateColumns:t==="manual"?"repeat(12, 1fr)":`repeat(${n.length}, 1fr)`},...u,children:n.map(({span:m,verticalAlignment:b},C)=>ne.jsx("div",{className:jr(fJ({verticalAlignment:b})),style:{gridColumn:m&&t==="manual"?`span ${Math.max(Math.min(m,12),1)}`:""},children:a({zone:`column-${C}`})},C))})}));u1.displayName="GridSection";const hJ={distribution:{type:"radio",options:[{value:"auto",label:"Auto"},{value:"manual",label:"Manual"}]},columns:{type:"array",getItemSummary:(e,t)=>`Column ${(t??0)+1}, span ${e.span?Math.max(Math.min(e.span,12),1):"auto"}`,arrayFields:{span:{label:"Span (1-12)",type:"number",min:0,max:12},verticalAlignment:{label:"Vertical Alignment",type:"select",options:[{value:"start",label:"Start"},{value:"center",label:"Center"},{value:"end",label:"End"},{value:"spaceBetween",label:"Space Between"}]}}},verticalPadding:{label:"Vertical Padding",type:"select",options:cJ},horizontalSpacing:{label:"Horizontal Spacing",type:"select",options:[{value:"small",label:"Small"},{value:"medium",label:"Medium"},{value:"large",label:"Large"}]},maxContentWidth:{label:"Maximum Content Width",type:"select",options:[{value:"default",label:"Default"},{value:"lg",label:"LG"},{value:"xl",label:"XL"},{value:"xxl",label:"2XL"}]},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},pJ={label:"Grid Section",fields:hJ,defaultProps:{distribution:"auto",columns:[{verticalAlignment:"start"},{verticalAlignment:"start"}],verticalPadding:"default",backgroundColor:"default",horizontalSpacing:"medium",maxContentWidth:"default"},render:({columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i,puck:{renderDropZone:a}})=>ne.jsx(u1,{renderDropZone:a,columns:e,distribution:t,backgroundColor:n,maxContentWidth:r,horizontalSpacing:o,verticalPadding:i})},gJ="https://placehold.co/50",mJ=kr("",{variants:{backgroundColor:{default:"bg-header-backgroundColor",primary:"bg-palette-primary",secondary:"bg-palette-secondary",accent:"bg-palette-accent",text:"bg-palette-text",background:"bg-palette-background"}},defaultVariants:{backgroundColor:"default"}}),yJ={logo:{type:"object",label:"Logo",objectFields:{image:_r({label:"Image",filter:{types:["type.image"]}})}},links:{type:"array",label:"Links",arrayFields:{cta:_r({label:"Call To Action",filter:{types:["type.cta"]}})},getItemSummary:(e,t)=>`Link ${t!==void 0?t+1:""}`,defaultItemProps:{id:Ag.v4(),cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}},backgroundColor:{label:"Background Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},vJ={fields:yJ,defaultProps:{logo:{image:{field:"",constantValue:{height:50,width:50,url:gJ},constantValueEnabled:!0}},links:[{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}},{cta:{field:"",constantValue:{link:"#",label:"Link"},constantValueEnabled:!0}}]},label:"Header",render:e=>ne.jsx(bJ,{...e}),resolveData:({props:e},{lastData:t})=>(t==null?void 0:t.props.links.length)===e.links.length?{props:e}:{props:{...e,links:e.links.map(n=>({...n,id:n.id??Ag.v4()}))}}},bJ=e=>{const t=Vr(),{logo:n,links:r,backgroundColor:o}=e,i=br(t,n.image),a=r==null?void 0:r.map(l=>{const u=br(t,l.cta);if(u)return{id:l.id,...u}}).filter(l=>l!==void 0);return console.log(a,r),ne.jsx("header",{className:jr("w-full bg-white components",mJ({backgroundColor:o})),children:ne.jsxs("div",{className:"mx-auto flex max-w-6xl flex-1 items-center justify-between px-4 py-6",children:[i&&ne.jsx(ty,{image:i,className:"w-full h-full object-cover"}),ne.jsx("div",{className:"flex items-center justify-end space-x-4",children:ne.jsx("ul",{className:"flex space-x-8",children:a==null?void 0:a.map((l,u)=>ne.jsx("li",{className:"cursor-pointer font-bold text-palette-primary hover:text-palette-secondary",children:ne.jsx(rh,{cta:l,eventName:`link${u}`})},l.id))})})]})})},d1=ge.forwardRef(({text:e,...t},n)=>{const r=Vr();return ne.jsx(uo,{displayName:"Heading "+t.level,fieldId:e.constantValueEnabled?"constant value":e.field,children:ne.jsx(dh,{ref:n,...t,children:br(r,e)})})});d1.displayName="HeadingText";const tE={text:_r({label:"Entity Field",filter:{types:["type.string"]}}),level:{type:"number",label:"Heading Level",min:1,max:6},fontSize:Pa(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}},_J={label:"Heading Text",fields:tE,defaultProps:{text:{field:"",constantValue:"Text",constantValueEnabled:!0},content:"Heading",level:2,fontSize:"default",weight:"default",color:"default",transform:"none"},resolveFields:async e=>{const t=await Xl({fontCssVariable:`--fontFamily-heading${e.props.level}-fontFamily`});return{...tE,weight:{label:"Font Weight",type:"select",options:t}}},render:e=>ne.jsx(d1,{...e})},xJ={hours:_r({label:"Hours",filter:{types:["type.hours"]}}),startOfWeek:{label:"Start of the week",type:"radio",options:[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"},{label:"Today",value:"today"}]},collapseDays:{label:"Collapse days",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},showAdditionalHoursText:{label:"Show additional hours text",type:"radio",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},alignment:{label:"Align card",type:"radio",options:[{label:"Left",value:"items-start"},{label:"Center",value:"items-center"}]},padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]}},EJ=({hours:e,startOfWeek:t,collapseDays:n,showAdditionalHoursText:r,alignment:o,padding:i})=>{const a=Vr(),l=br(a,e),{additionalHoursText:u}=a;return ne.jsx(Is,{className:`flex flex-col justify-center components ${o} font-body-fontFamily font-body-fontWeight text-body-fontSize text-body-color`,padding:i,children:ne.jsxs("div",{children:[l&&ne.jsx(uo,{displayName:"Hours",fieldId:"hours",children:ne.jsx(_Z,{hours:l,startOfWeek:t,collapseDays:n})}),u&&r&&ne.jsx(uo,{displayName:"Hours Text",fieldId:"additionalHoursText",children:ne.jsx("div",{className:"mt-4",children:u})})]})})},CJ={fields:xJ,defaultProps:{hours:{field:"hours",constantValue:{}},startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0,alignment:"items-center",padding:"none"},label:"Hours Table",render:e=>ne.jsx(EJ,{...e})},wJ={hours:_r({label:"Hours",filter:{types:["type.hours"]}}),showCurrentStatus:{type:"radio",label:"Show Current Status",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},timeFormat:{type:"select",label:"Time Format",options:[{label:"12-hour",value:"12h"},{label:"24-hour",value:"24h"}]},showDayNames:{type:"radio",label:"Show Day Names",options:[{label:"Yes",value:!0},{label:"No",value:!1}]},dayOfWeekFormat:{type:"select",label:"Day of Week Format",options:[{label:"Short",value:"short"},{label:"Long",value:"long"}]}},TJ=({hours:e,className:t,showCurrentStatus:n,timeFormat:r,showDayNames:o,dayOfWeekFormat:i})=>{const a=Vr(),l=br(a,e);return l?ne.jsx(uo,{displayName:"Hours",fieldId:e.field,children:ne.jsx(mZ,{hours:l,className:jr("components font-semibold mb-2 font-body-fontFamily",t),currentTemplate:n?void 0:()=>ne.jsx(ne.Fragment,{}),separatorTemplate:n?void 0:()=>ne.jsx(ne.Fragment,{}),dayOfWeekTemplate:o?void 0:()=>ne.jsx(ne.Fragment,{}),dayOptions:{weekday:i},timeOptions:{hour12:r==="12h"},timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}):null},NJ={label:"Hours Status",fields:wJ,defaultProps:{hours:{field:"hours",constantValue:{}},className:"",showCurrentStatus:!0,timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long"},render:e=>ne.jsx(TJ,{...e})},SJ="https://placehold.co/640x360",f1=kr("",{variants:{size:{small:"max-w-xs",medium:"max-w-md",large:"max-w-xl",full:"w-full"},aspectRatio:{auto:"aspect-auto",square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]"},rounded:{none:"",small:"rounded-sm",medium:"rounded-md",large:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"medium",aspectRatio:"auto",rounded:null}}),OJ={image:_r({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}},AJ=({image:e,size:t,aspectRatio:n,rounded:r})=>{const o=Vr(),i=br(o,e);return i?ne.jsx(uo,{displayName:"Image",fieldId:e.field,children:ne.jsx("div",{className:jr(f1({size:t,aspectRatio:n,rounded:r}),"overflow-hidden"),children:ne.jsx(ty,{image:i,className:"w-full h-full object-cover"})})}):null},RJ={label:"Image",fields:OJ,defaultProps:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:SJ},constantValueEnabled:!0},size:"medium",aspectRatio:"auto",rounded:"none"},render:e=>ne.jsx(AJ,{...e})},$J=kr("components flex gap-2 items-center text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"}},defaultVariants:{fontWeight:"default",color:"default"}}),DJ=(e,t="domestic")=>{const r=(""+e).replace(/\D/g,"").match(/^(?:\+?(\d{1,3}))?(\d{3})(\d{3})(\d{4})$/);if(r){const o=r[1]?`+${r[1]} `:"";return t==="international"?`${o}(${r[2]}) ${r[3]}-${r[4]}`:`(${r[2]}) ${r[3]}-${r[4]}`}return e},nE={phone:_r({label:"Entity Field",filter:{types:["type.phone"]}}),format:{label:"Format",type:"radio",options:[{label:"Domestic",value:"domestic"},{label:"International",value:"international"}]},fontWeight:{label:"Font Weight",type:"select",options:[{label:"Default",value:"default"},{label:"Thin",value:"thin"},{label:"Extra Light",value:"extralight"},{label:"Light",value:"light"},{label:"Normal",value:"normal"},{label:"Medium",value:"medium"},{label:"Semibold",value:"semibold"},{label:"Bold",value:"bold"},{label:"Extrabold",value:"extrabold"},{label:"Black",value:"black"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]}},kJ=({phone:e,format:t,fontWeight:n,color:r})=>{const o=Vr(),i=br(o,e);if(i)return ne.jsx(uo,{displayName:"Phone",fieldId:e.field,children:ne.jsxs("p",{className:$J({fontWeight:n,color:r}),children:[ne.jsx(M$,{className:"w-4 h-4"}),DJ(i,t)]})})},MJ={label:"Phone",fields:nE,defaultProps:{textSize:16,phone:{field:"mainPhone",constantValue:""}},resolveFields:async()=>{const e=await Xl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...nE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>ne.jsx(kJ,{...e})},PJ="https://placehold.co/640x360",IJ={orientation:{type:"select",label:"Orientation",options:[{label:"Left",value:"left"},{label:"Right",value:"right"}]},title:{type:"object",label:"Title",objectFields:{text:_r({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Pa(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},description:{type:"object",label:"Description",objectFields:{text:_r({label:"Entity Field",filter:{types:["type.string"]}}),fontSize:Pa(),color:{label:"Font Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},transform:{label:"Text Transform",type:"select",options:[{value:"none",label:"None"},{value:"lowercase",label:"Lowercase"},{value:"uppercase",label:"Uppercase"},{value:"capitalize",label:"Capitalize"}]}}},image:{type:"object",label:"Image",objectFields:{image:_r({label:"Image",filter:{types:["type.image"]}}),size:{type:"select",label:"Size",options:[{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full Width",value:"full"}]},aspectRatio:{type:"select",label:"Aspect Ratio",options:[{label:"Auto",value:"auto"},{label:"Square",value:"square"},{label:"Video (16:9)",value:"video"},{label:"Portrait (3:4)",value:"portrait"}]},rounded:{type:"select",label:"Rounded Corners",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"medium"},{label:"Large",value:"large"},{label:"Full",value:"full"}]}}},cta:{type:"object",label:"Call to Action",objectFields:{entityField:_r({label:"Entity Field",filter:{types:["type.cta"]}}),variant:{type:"select",label:"Variant",options:[{label:"Primary",value:"primary"},{label:"Link",value:"link"}]},fontSize:Pa()}}},LJ=({orientation:e,title:t,description:n,image:r,cta:o})=>{const i=Vr(),a=br(i,r.image),l=br(i,o.entityField);return a?ne.jsx(Is,{className:"components",children:ne.jsxs("div",{className:jr("flex flex-col md:flex-row bg-white overflow-hidden md:gap-8",e==="right"&&"md:flex-row-reverse"),children:[a&&ne.jsx(uo,{displayName:"Image",fieldId:r.image.field,children:ne.jsx("div",{className:jr(f1({size:r.size,rounded:r.rounded,aspectRatio:r.aspectRatio}),"overflow-hidden"),children:ne.jsx(ty,{image:a,className:"w-full h-full object-cover"})})}),ne.jsxs("div",{className:"flex flex-col justify-center gap-y-4 md:gap-y-8 p-4 md:px-16 md:py-0 w-full break-all",children:[(t==null?void 0:t.text)&&ne.jsx(dh,{fontSize:t.fontSize,color:t.color,transform:t.transform,children:br(i,t.text)}),(n==null?void 0:n.text)&&ne.jsx(th,{fontSize:n.fontSize,textTransform:n.transform,color:n.color,children:br(i,n.text)}),l&&ne.jsx(uh,{variant:o.variant,label:l.name,link:l.link??"#",fontSize:o.fontSize})]})]})}):null},FJ={label:"Promo",fields:IJ,defaultProps:{orientation:"left",title:{text:{field:"",constantValue:"Title",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},description:{text:{field:"",constantValue:"Description",constantValueEnabled:!0},fontSize:"default",color:"default",transform:"none"},image:{image:{field:"primaryPhoto",constantValue:{alternateText:"",height:360,width:640,url:PJ},constantValueEnabled:!0},size:"medium",rounded:"none",aspectRatio:"auto"},cta:{entityField:{field:"",constantValue:{name:"Call to Action"}},fontSize:"default",variant:"primary"}},render:e=>ne.jsx(LJ,{...e})},jJ=kr("list-disc components list-inside text-body-fontSize font-body-fontFamily",{variants:{fontWeight:{default:"font-body-fontWeight",100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},color:{default:"text-palette-body-color",primary:"text-palette-primary",secondary:"text-palette-secondary",accent:"text-palette-accent",text:"text-palette-text",background:"text-palette-background"},textTransform:{none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},padding:{default:"px-4 py-16 md:px-8",none:"p-0",small:"px-4 py-8 md:px-8",large:"px-[200px] py-24 md:px-8"}},defaultVariants:{padding:"none",fontWeight:"default",color:"default",textTransform:"none"}}),rE={list:_r({label:"Entity Field",filter:{types:["type.string"],includeListsOnly:!0}}),padding:{label:"Padding",type:"radio",options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"default"},{label:"Large",value:"large"}]},color:{label:"Color",type:"select",options:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Accent",value:"accent"},{label:"Text",value:"text"},{label:"Background",value:"background"}]},textTransform:{label:"Text Transform",type:"select",options:[{label:"None",value:"none"},{label:"Uppercase",value:"uppercase"},{label:"Lowercase",value:"lowercase"},{label:"Capitalize",value:"capitalize"}]}},BJ=({list:e,padding:t,fontWeight:n,color:r,textTransform:o})=>{const i=Vr();let a=br(i,e);return a?Array.isArray(a)||(a=[a]):a=["Sample text 1","Sample text 2","Sample text 3"],ne.jsx(uo,{displayName:"Text List",fieldId:e.field,children:ne.jsx("ul",{className:jJ({padding:t,fontWeight:n,color:r,textTransform:o}),children:a.map((l,u)=>ne.jsx("li",{className:"mb-2",children:l},u))})})},WJ={label:"Text List",fields:rE,defaultProps:{padding:"none",list:{field:"",constantValue:[]}},resolveFields:async()=>{const e=await Xl({fontCssVariable:"--fontFamily-body-fontFamily"});return{...rE,fontWeight:{label:"Font Weight",type:"select",options:e}}},render:e=>ne.jsx(BJ,{...e})};exports.AddressComponent=YZ;exports.Body=th;exports.BodyTextComponent=qZ;exports.Button=nh;exports.CTA=uh;exports.CTAWrapperComponent=XZ;exports.DocumentContext=Rg;exports.Editor=fV;exports.EmailsComponent=nJ;exports.EntityField=uo;exports.FlexContainerComponent=iJ;exports.FontSizeSelector=Pa;exports.GetDirectionsComponent=lJ;exports.GridSectionComponent=pJ;exports.Header=vJ;exports.Heading=dh;exports.HeadingTextComponent=_J;exports.HoursStatusComponent=NJ;exports.HoursTableComponent=CJ;exports.ImageWrapperComponent=RJ;exports.Jl=ku;exports.NumberFieldWithDefaultOption=QV;exports.PhoneComponent=MJ;exports.PromoComponent=FJ;exports.Section=Is;exports.TailwindConfigContext=$g;exports.TextListComponent=WJ;exports.VisualEditorProvider=HO;exports.YextEntityFieldSelector=_r;exports.Zl=CN;exports.applyTheme=rO;exports.bodyVariants=_N;exports.buttonVariants=xN;exports.constructFontSelectOptions=Q1;exports.defaultFonts=Dg;exports.getFontWeightOptions=nO;exports.getFontWeightOverrideOptions=Xl;exports.headingVariants=a1;exports.lt=an;exports.resolveYextEntityField=br;exports.sectionVariants=s1;exports.themeMangerCn=jr;exports.themeMangerTwMergeConfiguration=CE;exports.themeResolver=iO;exports.useDocument=Vr;exports.useEntityFields=uE;exports.usePlatformBridgeDocument=Y1;exports.usePlatformBridgeEntityFields=q1;exports.useTailwindConfig=dE;
|