@lax-wp/design-system 0.11.20 → 0.11.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.cjs.js CHANGED
@@ -97,7 +97,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
97
97
  }
98
98
  `}),l.jsxs("div",{className:"flex flex-col gap-1 max-h-60 overflow-y-auto w-fit popover-tags-no-scrollbar",children:[a!==null&&l.jsx("div",{className:`sticky top-0 text-xs font-medium text-neutral-600
99
99
  border-b border-neutral-200 dark:border-neutral-700 dark:text-neutral-300 pb-1
100
- bg-white dark:bg-black-800 z-10`,children:a}),b.map(S=>l.jsx("div",{className:"flex items-center py-1 cursor-pointer",children:l.jsx(lr,{label:S?.label,color:S?.color||"blue",size:e,icon:i,href:S?.href})},S?.id||S.label))]})]});return l.jsx("div",{ref:c,className:`${A?"w-fit":"w-full"} ${r}`,children:l.jsxs("div",{className:`inline-flex ${o?"flex-nowrap":"flex-wrap"} gap-2 items-center`,children:[_.map((S,k)=>{const E=y.get(k)||s;return l.jsx(lr,{label:S?.label,color:S?.color||"blue",size:e,icon:i,truncate:E,href:S?.href},S?.id||S.label)}),b.length>0&&l.jsx(Ye.Popover,{content:v(),title:null,trigger:"hover",placement:"topLeft",arrow:!1,rootClassName:"max-w-none z-[9999]",getPopupContainer:()=>document.body,children:l.jsx("button",{type:"button",className:"cursor-pointer inline-flex items-center gap-1 border-0 bg-transparent p-0",onMouseDown:S=>S.stopPropagation(),"aria-label":`Show ${b.length} more tags`,children:l.jsx(lr,{label:`+${b.length} more`,color:"green",size:e})})}),u&&l.jsx("div",{className:"inline-flex items-center",children:u})]})})},Y4=h.forwardRef(({id:t,label:e,value:r,className:n,type:i="string",tags:a,tooltip:s,items:o,isModified:A=!1,isChanged:u=!1,size:c="medium",isHighlighted:d=!1,deletedValue:f,highlightColor:p="warning",isSearchActive:m=!1,originalValue:g=!1,showDiff:_=!1,isLiveField:b=!1,isAiExtracted:y=!1,deltaChange:v,theme:S="light",onUpload:k,acceptsUpload:E=!1,MasterDataModal:w,riskDetails:T,isRiskAnalysisOpen:O=!1,RiskDetailsCard:C,"aria-label":N,decodeEntities:R=!0,onAiExtractedIndicatorClick:D},L)=>{const[P,U]=h.useState(!0),[j,I]=h.useState(!1),[F,z]=h.useState(null),[W,G]=h.useState(!1),X=ie=>R?CD(ie):ie,q=()=>{U(!P)},Q=ie=>{I(!0),z({...ie,value:r})},re=()=>{I(!1),z(null)},$=ie=>{const Ne=ie.target.files?.[0];Ne&&k&&k(Ne),ie.target.value=""},ee=()=>{const ie=typeof r=="string"&&u4(r);if(m&&typeof r=="object")return r;if(r||i?.toLowerCase()==="boolean"&&r===0||i?.toLowerCase()==="currency"&&Number(r)>=0){if((r===!0||r==="True")&&!g)return"Yes";if((r===!1||r==="False")&&!g)return"No";if(i?.toLowerCase()==="url")return l.jsx("a",{href:r,className:"text-primary-600 truncate",children:X(r)});if(i?.toLowerCase()==="boolean")return B1(r);if(i?.toLowerCase()==="currency")return aa(r,o?.currency_code)||"-";if(i?.toLowerCase()==="datetime"){const Ne=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return Mn(Ne,{skipTimezone:!1,withTime:!0})}else if(i?.toLowerCase()==="date"||ie){const Ne=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return Mn(Ne,{skipTimezone:!0,withTime:!1})}else{if(i?.toLowerCase()==="percentage")return`${r}%`;if(typeof r=="string"&&r.length>100){const Ne=X(r);return l.jsxs("p",{children:[Ne.slice(0,P?100:Ne.length),P?"... ":" ",l.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:q,onKeyDown:be=>{(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),q())},"aria-label":P?"Show more content":"Show less content",type:"button",children:P?"Show more":"Show less"})]})}else return typeof r=="string"?X(r):r}}return"-"},oe=()=>{switch(c){case"small":return"extra-small";case"large":return"large";default:return"small"}},J=()=>{switch(p){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return l.jsxs("div",{id:t||"",ref:L,className:B("font-medium relative",n),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),"aria-label":N||`Label: ${e}, Value: ${r}`,children:[l.jsxs(ne,{variant:"medium",size:oe(),className:"flex gap-1 items-center flex-wrap",appearance:"subtitle",children:[typeof e=="string"?X(e):e," ",l.jsx(Yr,{labels:a?.map(ie=>({...ie,color:ie.color||"primary"}))}),b&&l.jsx(de.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),y&&l.jsx(xn,{onClick:()=>D?.(ee())}),s&&l.jsx(Le,{placement:"top",title:s,whiteSpace:"pre-wrap",children:l.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ie=>{(ie.key==="Enter"||ie.key===" ")&&ie.preventDefault()},children:l.jsx(Gr,{size:14})})})]}),l.jsxs(ne,{variant:"medium",size:oe(),className:B("text-- whitespace-normal break-all flex gap-1 pt-0.5",A&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",O&&T?.color&&`bg-${T.color}-50 border-${T.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[_&&f&&r?l.jsxs("div",{className:"flex gap-2",children:[l.jsx("span",{className:"line-through",children:X(f)}),l.jsx("span",{children:ee()})]}):u||d?l.jsx("mark",{className:B("rounded-md py-0.5 px-1",J()),children:ee()}):ee(),i?.toLowerCase()==="currency"&&v!==0&&v!==void 0&&v!==null&&l.jsxs(ze.motion.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},transition:{duration:.25},className:B("inline-flex items-center gap-1 ml-1.5 text-xs font-medium",v>0?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:[l.jsx("span",{className:"flex items-center justify-center w-4 h-4",children:v>0?l.jsx(de.ArrowUpwardRounded,{sx:{fontSize:16},className:"text-emerald-600 dark:text-emerald-400"}):l.jsx(de.ArrowDownwardRounded,{sx:{fontSize:16},className:"text-red-600 dark:text-red-400"})}),l.jsx("span",{children:aa(Math.abs(v),o?.currency_code||"USD")})]}),o?.is_master_data&&o?.reference&&r&&l.jsx("button",{onClick:()=>Q(o),onKeyDown:ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),Q(o))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:l.jsx(o4,{width:20,height:20})}),E&&l.jsx("input",{type:"file",onChange:$,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),f&&!_&&l.jsx(ne,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:l.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:l.jsx("del",{children:f||i?.toLowerCase()==="boolean"&&f==="0"?f==="True"?"Yes":f==="False"?"No":i?.toLowerCase()==="boolean"?B1(f):i?.toLowerCase()==="currency"?aa(f,o?.currency_code):i?.toLowerCase()==="date"?Mn(f,{skipTimezone:!0,withTime:!1}):i?.toLowerCase()==="datetime"?Mn(f,{skipTimezone:!0,withTime:!0}):i?.toLowerCase()==="percentage"?`${f}%`:f.length>100?l.jsxs("p",{children:[X(f).slice(0,P?100:f.length),P?"... ":" ",l.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:q,children:P?"Show more":"Show less"})]}):X(f):"-"})})}),w&&l.jsx(w,{isVisible:j,onClose:re,masterdataInfo:F}),W&&T&&O&&l.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ie=>ie.stopPropagation(),onMouseDown:ie=>ie.preventDefault(),onKeyDown:ie=>{ie.key==="Escape"&&G(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:C?l.jsx(C,{riskDetails:T}):l.jsx("div",{className:"shadow-lg p-4",children:l.jsxs("div",{className:"text-sm",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:T.description||"Risk analysis information"})]})})})]})});Y4.displayName="LabelValue";const K4=({fill:t="currentColor",size:e=20,className:r})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:r,children:[l.jsx("mask",{id:"mask0_540_1032",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_540_1032)",children:l.jsx("path",{d:"M8.83329 11.5L7.02079 9.68749C6.86802 9.53471 6.67718 9.46193 6.44829 9.46916C6.21885 9.47582 6.02774 9.55555 5.87496 9.70832C5.72218 9.8611 5.64579 10.0555 5.64579 10.2917C5.64579 10.5278 5.72218 10.7222 5.87496 10.875L8.24996 13.25C8.40274 13.4028 8.59718 13.4792 8.83329 13.4792C9.0694 13.4792 9.26385 13.4028 9.41663 13.25L14.1458 8.52082C14.2986 8.36805 14.3716 8.17693 14.365 7.94749C14.3577 7.7186 14.2777 7.52777 14.125 7.37499C13.9722 7.22221 13.7777 7.14582 13.5416 7.14582C13.3055 7.14582 13.1111 7.22221 12.9583 7.37499L8.83329 11.5ZM9.99996 18.3333C8.84718 18.3333 7.76385 18.1144 6.74996 17.6767C5.73607 17.2394 4.85413 16.6458 4.10413 15.8958C3.35413 15.1458 2.76051 14.2639 2.32329 13.25C1.88551 12.2361 1.66663 11.1528 1.66663 9.99999C1.66663 8.84721 1.88551 7.76388 2.32329 6.74999C2.76051 5.7361 3.35413 4.85416 4.10413 4.10416C4.85413 3.35416 5.73607 2.76027 6.74996 2.32249C7.76385 1.88527 8.84718 1.66666 9.99996 1.66666C11.1527 1.66666 12.2361 1.88527 13.25 2.32249C14.2638 2.76027 15.1458 3.35416 15.8958 4.10416C16.6458 4.85416 17.2394 5.7361 17.6766 6.74999C18.1144 7.76388 18.3333 8.84721 18.3333 9.99999C18.3333 11.1528 18.1144 12.2361 17.6766 13.25C17.2394 14.2639 16.6458 15.1458 15.8958 15.8958C15.1458 16.6458 14.2638 17.2394 13.25 17.6767C12.2361 18.1144 11.1527 18.3333 9.99996 18.3333ZM9.99996 16.6667C11.8472 16.6667 13.4202 16.0175 14.7191 14.7192C16.0175 13.4203 16.6666 11.8472 16.6666 9.99999C16.6666 8.15277 16.0175 6.57971 14.7191 5.28082C13.4202 3.98249 11.8472 3.33332 9.99996 3.33332C8.15274 3.33332 6.57996 3.98249 5.28163 5.28082C3.98274 6.57971 3.33329 8.15277 3.33329 9.99999C3.33329 11.8472 3.98274 13.4203 5.28163 14.7192C6.57996 16.0175 8.15274 16.6667 9.99996 16.6667Z",fill:t})})]}),V1=({fill:t="currentColor",size:e=24,className:r})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:r,children:l.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:t})}),Z4=({className:t,size:e="20",fill:r="#475467"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:[l.jsx("mask",{id:"mask0_3351_252036",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),l.jsxs("g",{mask:"url(#mask0_3351_252036)",children:[l.jsx("path",{d:"M16.5 2.5C16.9125 2.5 17.2658 2.64668 17.5596 2.94043C17.8533 3.23418 18 3.5875 18 4V6.25C18 6.5375 17.9314 6.79102 17.7939 7.00977C17.6565 7.22843 17.4749 7.40649 17.25 7.54395V10.3174C16.7935 10.0396 16.2878 9.83528 15.75 9.7168V7.75H5.25V16H9.94727C10.1143 16.546 10.3723 17.0523 10.7051 17.5H5.25C4.8375 17.5 4.48418 17.3533 4.19043 17.0596C3.89668 16.7658 3.75 16.4125 3.75 16V7.54395C3.52506 7.40649 3.34354 7.22843 3.20605 7.00977C3.06855 6.79102 3 6.5375 3 6.25V4C3 3.5875 3.14668 3.23418 3.44043 2.94043C3.73418 2.64668 4.0875 2.5 4.5 2.5H16.5ZM12 10C12.1681 10 12.3134 10.0468 12.4385 10.1367C11.7915 10.466 11.2273 10.9334 10.7832 11.5H9C8.7875 11.5 8.60957 11.4279 8.46582 11.2842C8.32207 11.1404 8.25 10.9625 8.25 10.75C8.25 10.5375 8.32207 10.3596 8.46582 10.2158C8.60957 10.0721 8.7875 10 9 10H12ZM4.5 6.25H16.5V4H4.5V6.25Z",fill:r}),l.jsx("path",{d:"M16.5 2.5C16.9125 2.5 17.2658 2.64668 17.5596 2.94043C17.8533 3.23418 18 3.5875 18 4V6.25C18 6.5375 17.9314 6.79102 17.7939 7.00977C17.6565 7.22843 17.4749 7.40649 17.25 7.54395V16C17.25 16.4125 17.1033 16.7658 16.8096 17.0596C16.5158 17.3533 16.1625 17.5 15.75 17.5H5.25C4.8375 17.5 4.48418 17.3533 4.19043 17.0596C3.89668 16.7658 3.75 16.4125 3.75 16V7.54395C3.52506 7.40649 3.34354 7.22843 3.20605 7.00977C3.06855 6.79102 3 6.5375 3 6.25V4C3 3.5875 3.14668 3.23418 3.44043 2.94043C3.73418 2.64668 4.0875 2.5 4.5 2.5H16.5ZM5.25 16H15.75V7.75H5.25V16ZM12 10C12.2125 10 12.3904 10.0721 12.5342 10.2158C12.6779 10.3596 12.75 10.5375 12.75 10.75C12.75 10.9625 12.6779 11.1404 12.5342 11.2842C12.3904 11.4279 12.2125 11.5 12 11.5H9C8.7875 11.5 8.60957 11.4279 8.46582 11.2842C8.32207 11.1404 8.25 10.9625 8.25 10.75C8.25 10.5375 8.32207 10.3596 8.46582 10.2158C8.60957 10.0721 8.7875 10 9 10H12ZM4.5 6.25H16.5V4H4.5V6.25Z",fill:r})]})]}),$4=({fill:t="currentColor",size:e=24,className:r})=>l.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:l.jsx("g",{mask:"url(#mask0_1871_44063)",children:l.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})}),bP={success:"bg-success-100 dark:bg-success-950 text-success-500 dark:text-success-300 border border-b-success-200 dark:border-none",error:"bg-red-100 dark:bg-red-950 text-red-600 dark:text-red-300 border border-b-red-200 dark:border-none",warning:"bg-amber-100 dark:bg-amber-950 text-amber-600 dark:text-amber-300 border border-b-amber-200 dark:border-none",info:"bg-blue-100 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-b-blue-200 dark:border-none",infoGrey:"bg-neutral-200 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-b-neutral-300 dark:border-none",archived:"bg-neutral-200 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-b-neutral-300 dark:border-none",canceled:"bg-gray-100 dark:bg-gray-950 text-gray-600 dark:text-gray-300",queued:"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border border-b-blue-200 dark:border-none",paused:"bg-blue-100 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-b-amber-200 dark:border-none",awaiting_action:"bg-orange-50 dark:bg-orange-950 text-orange-500 dark:text-orange-300 border border-b-amber-200 dark:border-none",skipped:"bg-gray-100 dark:bg-gray-950 text-gray-600 dark:text-gray-300 border border-b-gray-200 dark:border-none",pending:"bg-pink-100 dark:bg-pink-950 text-pink-500 dark:text-pink-300 border border-b-pink-200 dark:border-none"},xP={success:l.jsx(K4,{size:20,className:"text-green-600 dark:text-green-300"}),error:l.jsx(de.RemoveCircleOutline,{sx:{height:18,width:18},className:"text-red-600 dark:text-red-300"}),warning:l.jsx(V1,{size:20,className:"text-amber-600 dark:text-amber-300"}),paused:l.jsx(de.PlayArrowRounded,{sx:{height:20,width:20},className:"text-blue-600 dark:text-blue-300"}),info:l.jsx(V1,{size:20,className:"text-blue-600 dark:text-blue-300"}),infoGrey:l.jsx($4,{size:20,className:"text-gray-600 dark:text-gray-300"}),archived:l.jsx(Z4,{fill:"currentColor",size:"20",className:"text-gray-500 dark:text-gray-300"}),queued:l.jsx(qn.MdOutlinePending,{size:20,className:"text-blue-700 dark:text-blue-300"}),canceled:l.jsx(LN,{sx:{height:20,width:20},className:"text-gray-500 dark:text-gray-300"}),awaiting_action:l.jsx(de.Pending,{sx:{height:18,width:18},className:"text-orange-500 dark:text-orange-300"}),skipped:l.jsx(de.DoDisturbRounded,{sx:{fontSize:"18px"},className:"text-gray-600 dark:text-gray-300"}),pending:l.jsx(de.Timer,{sx:{height:18,width:18},className:"text-pink-500 dark:text-pink-300"})},wo=h.forwardRef(({children:t,status:e,additionalChildren:r,ExpandedComponent:n,executionId:i,className:a},s)=>{const[o,A]=h.useState(!1),u=e==="error"&&n;return l.jsxs("div",{ref:s,className:B("w-full",a),children:[l.jsxs("div",{className:B(bP[e],"gap-2 font-semibold text-sm p-2 rounded-tl-xl w-full flex justify-between items-center",u&&"cursor-pointer select-none"),onClick:()=>u&&A(!o),children:[l.jsxs("div",{className:"flex items-center gap-2 mx-auto",children:[xP[e],l.jsx("span",{children:t})]}),u&&l.jsx("span",{className:"ml-2",children:o?l.jsx(qn.MdKeyboardArrowUp,{size:20}):l.jsx(qn.MdKeyboardArrowDown,{size:20})}),r?l.jsx("span",{children:r}):null]}),u&&o&&l.jsx(n,{executionId:i,children:t})]})});wo.displayName="Banner";const _P=()=>l.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_36675_12)",children:l.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),yP=(t,e)=>{const r=document.getElementById(t);r?e(r):requestAnimationFrame(()=>{const n=document.getElementById(t);n&&e(n)})},vP=(t,e)=>{if(t.current){if(e)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(t.current.size?.width));else{const r=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(r){t.current.updateSize({width:r,height:"100%"});return}}t.current.updateSize({width:e?"100vw":"",height:"100%"})}},SP=(t,e,r,n,i,a)=>{const[s,o]=h.useState(!1),[A,u]=h.useState(null);return h.useEffect(()=>{if(!t||typeof window>"u"){u(null);return}yP(t,u)},[t]),h.useEffect(()=>{vP(i,r)},[r]),h.useEffect(()=>{if(t&&e){const c=requestAnimationFrame(()=>{o(!0)});return()=>{cancelAnimationFrame(c),o(!1)}}t||o(!0),e||o(!1)},[e,t]),h.useEffect(()=>{i.current?.size?.width&&n&&n(i.current.size.width)},[i.current?.size?.width,n]),{shouldRenderSidebar:s,portalTarget:A}},EP=({isOpen:t,header:e,id:r,ref:n,className:i,containerClassName:a,widthStyle:s,heightStyle:o,motionVariants:A,resizableRef:u,fullScreen:c,maxResizableWidth:d,minWidth:f,handleKey:p,onDragEnd:m,onResize:g,children:_})=>l.jsx(ze.AnimatePresence,{children:t&&l.jsx(ze.motion.div,{ref:n,id:r,initial:A.initial,animate:A.animate,exit:A.exit,transition:{type:"tween",duration:.3},className:B("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",c?"fixed w-full transition translate-x-4 duration-300":"sticky",i),style:{width:s,height:o},children:l.jsx(IN.Resizable,{onResize:b=>{b.stopPropagation();const y=u.current?.size?.width;g&&g(y||f)},onResizeStart:b=>{b.stopPropagation()},ref:u,maxWidth:c?d:d*.75,minWidth:f,minHeight:o,maxHeight:o,enable:c?{}:{[p]:!0},handleClasses:{[p]:B("relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700")},handleComponent:{[p]:l.jsx("div",{className:B("absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",p==="left"&&"-right-2.5 -left-auto"),children:l.jsx(_P,{})})},className:"!h-full",onResizeStop:m||void 0,children:l.jsxs("div",{className:B("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",a),children:[e?l.jsx("div",{className:"py-4 px-6",children:e||null}):null,l.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:_})]})})})}),J4=h.forwardRef(({isOpen:t,children:e,fullScreen:r=!1,defaultSize:n=void 0,minWidth:i=400,onDragEnd:a=null,onResize:s,className:o,placement:A="right",parentContainer:u,header:c,id:d,containerClassName:f,ignoreParentContainerHeight:p=!1,height:m,isMainSidebarExpanded:g=!1,mainSidebarExpandedWidth:_=280,mainSidebarCollapsedWidth:b=80,navbarHeight:y=64},v)=>{const S=g?_:b,k=h.useRef(null),{shouldRenderSidebar:E,portalTarget:w}=SP(u,t,r,s,k),T=typeof window<"u"?window.innerWidth-S:0,O=n,C=A==="right",N=m||(u&&!p?"100%":`calc(100vh - ${y}px)`),R={initial:{x:C?"100%":"-100%"},animate:{x:0},exit:{x:C?"100%":"-100%"}},D=C?"left":"right",L=l.jsx(EP,{isOpen:t,header:c,id:d,ref:v,className:o,containerClassName:f,widthStyle:O,heightStyle:N,motionVariants:R,resizableRef:k,fullScreen:r,maxResizableWidth:T,minWidth:i,handleKey:D,onDragEnd:a,onResize:s,children:e});return u?!E||!w?null:Xr.createPortal(L,w):E?L:null});J4.displayName="ResizableSidebar";const e7=h.forwardRef(({pdfUrl:t,width:e="100%",height:r="100vh",className:n,iframeClassName:i,title:a="PDF Viewer",showLoading:s=!0,loadingComponent:o,errorComponent:A,onError:u,onLoad:c,allowFullScreen:d=!0,"aria-label":f},p)=>{const[m,g]=h.useState(!0),[_,b]=h.useState(!1),y=()=>{g(!1),b(!1),c?.()},v=()=>{g(!1),b(!0),u?.()},S=l.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm",children:"Loading PDF..."})]})}),k=l.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:l.jsxs("div",{className:"text-center p-6",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.998-.833-2.768 0L3.046 16.5c-.77.833.192 2.5 1.732 2.5z"})}),l.jsx("h3",{className:"text-lg font-medium text-neutral-900 dark:text-neutral-100 mb-2",children:"Failed to load PDF"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm mb-4",children:"The PDF document could not be displayed. Please check the URL or try again later."}),l.jsx("button",{onClick:()=>{b(!1),g(!0);const w=document.querySelector(`iframe[src="${t}"]`);w&&(w.src=w.src)},className:"bg-blue-600 text-white px-4 py-2 rounded-md text-sm hover:bg-blue-700 transition-colors",children:"Retry"})]})});return!t||!(w=>{try{return new URL(w,window.location.href).pathname.toLowerCase().endsWith(".pdf")||w.includes("pdf")}catch{return!1}})(t)?l.jsx("div",{ref:p,className:B("relative overflow-hidden",n),style:{width:e,height:r},children:A||k}):l.jsxs("div",{ref:p,className:B("relative overflow-hidden",n),style:{width:e,height:r},"aria-label":f||`PDF Viewer: ${a}`,children:[m&&s&&l.jsx("div",{className:"absolute inset-0 z-10",children:o||S}),_&&l.jsx("div",{className:"absolute inset-0 z-10",children:A||k}),!_&&l.jsx("iframe",{src:t,title:a,className:B("w-full h-full border-none",m&&"opacity-0",i),onLoad:y,onError:v,allowFullScreen:d,loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-forms","aria-label":f||`PDF document: ${a}`}),l.jsx("div",{className:"sr-only",children:"PDF document viewer. Use your browser's PDF controls to navigate, zoom, or download the document."})]})});e7.displayName="PdfViewer";const kP={top:"top","top-start":"topLeft","top-end":"topRight",bottom:"bottom","bottom-start":"bottomLeft","bottom-end":"bottomRight",left:"left","left-start":"leftTop","left-end":"leftBottom",right:"right","right-start":"rightTop","right-end":"rightBottom"},t7=h.forwardRef(({children:t,component:e,placement:r="bottom",isOpen:n,toggleMenu:i,parentContainer:a,noSpacing:s=!1,triggerClassName:o,containerClassName:A,className:u,showArrow:c=!1,offset:d=8,disableOutsideClick:f=!1,"aria-label":p,disabled:m=!1,trigger:g="click",styles:_},b)=>{const y=kP[r],v=h.useMemo(()=>({..._,body:{padding:0,minWidth:"120px",zIndex:5002,..._?.body}}),[_]),S=w=>{!f&&!w&&n&&i?.()},k=w=>{w.preventDefault(),w.stopPropagation(),m||i?.(w)},E=h.useMemo(()=>w=>{if(a==="body")return document.body;if(a){const T=document.getElementById(a);if(T)return T}return w.parentElement||document.body},[a]);return l.jsx("div",{ref:b,className:B("relative inline-block",u),children:l.jsx(Ye.Popover,{open:n,onOpenChange:S,content:l.jsx("div",{className:"relative",children:e}),placement:y,trigger:g,arrow:c,getPopupContainer:E,classNames:{root:B("lax-popper-overlay",A)},styles:v,align:{offset:[0,d]},children:l.jsx("button",{onClick:k,className:B("flex items-center justify-center outline-none focus:outline-none transition-colors",!s&&"p-2",m&&"opacity-50 cursor-not-allowed",o),"aria-label":p,"aria-expanded":n,"aria-haspopup":"true",disabled:m,type:"button",children:t})})})});t7.displayName="Popper";const wP=({size:t=24,fill:e="#12B76A"})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:e,xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{mask:"url(#mask0_4874_46615)",children:l.jsx("path",{d:"M10.6 13.8L8.425 11.625C8.24167 11.4417 8.01267 11.3543 7.738 11.363C7.46267 11.371 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.0833 16.0833 10.3167 16.175 10.6 16.175C10.8833 16.175 11.1167 16.0833 11.3 15.9L16.975 10.225C17.1583 10.0417 17.246 9.81233 17.238 9.537C17.2293 9.26233 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z",fill:e})})}),TP=({size:t=24,fill:e="#F04438"})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{id:"error",children:l.jsx("g",{mask:"url(#mask0_4874_46622)",children:l.jsx("path",{id:"error_2",d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:e})})})}),OP=({size:t=24,fill:e="#F79009"})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:l.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:e})}),CP=({size:t=24,fill:e="#016DCF"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[l.jsx("mask",{id:"mask0_32271_5688",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:l.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_32271_5688)",children:l.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:e})})]}),NP=({size:t=24,fill:e="#016DCF"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[l.jsx("mask",{id:"mask0_35096_2621",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:l.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_35096_2621)",children:l.jsx("path",{d:"M8 20H16V17C16 15.9 15.6083 14.9583 14.825 14.175C14.0417 13.3917 13.1 13 12 13C10.9 13 9.95833 13.3917 9.175 14.175C8.39167 14.9583 8 15.9 8 17V20ZM12 11C13.1 11 14.0417 10.6083 14.825 9.825C15.6083 9.04167 16 8.1 16 7V4H8V7C8 8.1 8.39167 9.04167 9.175 9.825C9.95833 10.6083 10.9 11 12 11ZM5 22C4.71667 22 4.47917 21.9042 4.2875 21.7125C4.09583 21.5208 4 21.2833 4 21C4 20.7167 4.09583 20.4792 4.2875 20.2875C4.47917 20.0958 4.71667 20 5 20H6V17C6 15.9833 6.2375 15.0292 6.7125 14.1375C7.1875 13.2458 7.85 12.5333 8.7 12C7.85 11.4667 7.1875 10.7542 6.7125 9.8625C6.2375 8.97083 6 8.01667 6 7V4H5C4.71667 4 4.47917 3.90417 4.2875 3.7125C4.09583 3.52083 4 3.28333 4 3C4 2.71667 4.09583 2.47917 4.2875 2.2875C4.47917 2.09583 4.71667 2 5 2H19C19.2833 2 19.5208 2.09583 19.7125 2.2875C19.9042 2.47917 20 2.71667 20 3C20 3.28333 19.9042 3.52083 19.7125 3.7125C19.5208 3.90417 19.2833 4 19 4H18V7C18 8.01667 17.7625 8.97083 17.2875 9.8625C16.8125 10.7542 16.15 11.4667 15.3 12C16.15 12.5333 16.8125 13.2458 17.2875 14.1375C17.7625 15.0292 18 15.9833 18 17V20H19C19.2833 20 19.5208 20.0958 19.7125 20.2875C19.9042 20.4792 20 20.7167 20 21C20 21.2833 19.9042 21.5208 19.7125 21.7125C19.5208 21.9042 19.2833 22 19 22H5Z",fill:e})})]}),DP=({size:t=16})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"})}),RP=t=>{switch(t){case"success":return l.jsx("div",{className:"w-8 h-8 bg-green-50 dark:bg-green-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(wP,{size:24,fill:"#12B76A"})});case"error":return l.jsx("div",{className:"w-8 h-8 bg-red-50 dark:bg-red-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(TP,{fill:"#F04438",size:24})});case"warning":return l.jsx("div",{className:"w-8 h-8 bg-yellow-50 dark:bg-yellow-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(OP,{fill:"#F79009",size:24})});case"info":return l.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(CP,{})});case"in-progress":return l.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(NP,{})});default:return null}},PP={success:"border-b-[5px] !border-green-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",error:"border-b-[5px] !border-red-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",warning:"border-b-[5px] !border-yellow-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",info:"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600","in-progress":"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600"},LP=({closeToast:t})=>l.jsx("button",{onClick:t,className:"text-neutral-900 dark:text-white hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",children:l.jsx(DP,{size:16})}),IP=({position:t="bottom-right",autoClose:e=3e3,hideProgressBar:r=!0,newestOnTop:n=!0,closeOnClick:i=!0,pauseOnFocusLoss:a=!1,draggable:s=!0,pauseOnHover:o=!0,rtl:A=!1,className:u,style:c={zIndex:1e5},...d})=>l.jsx(Tt.ToastContainer,{position:t,transition:Tt.Slide,autoClose:e,hideProgressBar:r,newestOnTop:n,closeOnClick:i,rtl:A,pauseOnFocusLoss:a,draggable:s,pauseOnHover:o,icon:({type:f})=>RP(f),bodyStyle:{gap:"4px"},style:c,toastClassName:f=>{const{type:p="",defaultClassName:m=""}=f||{};return`w-[100%] sm:w-[400px] bg-white dark:bg-neutral-800 rounded-[4px] font-medium text-sm text-neutral-900 dark:text-white shadow-lg p-[20px] min-h-0 ${m} ${PP[p]} ${u||""}`},closeButton:LP,...d}),MP={success:(t,e)=>Tt.toast.success(t,e),error:(t,e)=>Tt.toast.error(t,e),warning:(t,e)=>Tt.toast.warning(t,e),info:(t,e)=>Tt.toast.info(t,e),inProgress:(t,e)=>Tt.toast(t,{...e,type:"in-progress"}),dismiss:t=>Tt.toast.dismiss(t),isActive:t=>Tt.toast.isActive(t)};function $A(){return $A=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$A.apply(null,arguments)}function r7(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}let W1=[],n7=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,r=0;e<t.length;e++)(e%2?n7:W1).push(r=r+t[e])})();function jP(t){if(t<768)return!1;for(let e=0,r=W1.length;;){let n=e+r>>1;if(t<W1[n])r=n;else if(t>=n7[n])e=n+1;else return!0;if(e==r)return!1}}function B3(t){return t>=127462&&t<=127487}const q3=8205;function HP(t,e,r=!0,n=!0){return(r?i7:FP)(t,e,n)}function i7(t,e,r){if(e==t.length)return e;e&&a7(t.charCodeAt(e))&&s7(t.charCodeAt(e-1))&&e--;let n=$c(t,e);for(e+=V3(n);e<t.length;){let i=$c(t,e);if(n==q3||i==q3||r&&jP(i))e+=V3(i),n=i;else if(B3(i)){let a=0,s=e-2;for(;s>=0&&B3($c(t,s));)a++,s-=2;if(a%2==0)break;e+=2}else break}return e}function FP(t,e,r){for(;e>0;){let n=i7(t,e-2,r);if(n<e)return n;e--}return 0}function $c(t,e){let r=t.charCodeAt(e);if(!s7(r)||e+1==t.length)return r;let n=t.charCodeAt(e+1);return a7(n)?(r-55296<<10)+(n-56320)+65536:r}function a7(t){return t>=56320&&t<57344}function s7(t){return t>=55296&&t<56320}function V3(t){return t<65536?1:2}let ut=class o7{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,r,n){[e,r]=ns(this,e,r);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(r,this.length,i,1),Rn.from(i,this.length-(r-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,r=this.length){[e,r]=ns(this,e,r);let n=[];return this.decompose(e,r,n,0),Rn.from(n,r-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let r=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new io(this),a=new io(e);for(let s=r,o=r;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(e=1){return new io(this,e)}iterRange(e,r=this.length){return new l7(this,e,r)}iterLines(e,r){let n;if(e==null)n=this.iter();else{r==null&&(r=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new A7(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?o7.empty:e.length<=32?new jt(e):Rn.from(jt.split(e,[]))}};class jt extends ut{constructor(e,r=UP(e)){super(),this.text=e,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(e,r,n,i){for(let a=0;;a++){let s=this.text[a],o=i+s.length;if((r?n:o)>=e)return new zP(i,o,n,s);i=o+1,n++}}decompose(e,r,n,i){let a=e<=0&&r>=this.length?this:new jt(W3(this.text,e,r),Math.min(r,this.length)-Math.max(0,e));if(i&1){let s=n.pop(),o=wA(a.text,s.text.slice(),0,a.length);if(o.length<=32)n.push(new jt(o,s.length+a.length));else{let A=o.length>>1;n.push(new jt(o.slice(0,A)),new jt(o.slice(A)))}}else n.push(a)}replace(e,r,n){if(!(n instanceof jt))return super.replace(e,r,n);[e,r]=ns(this,e,r);let i=wA(this.text,wA(n.text,W3(this.text,0,e)),r),a=this.length+n.length-(r-e);return i.length<=32?new jt(i,a):Rn.from(jt.split(i,[]),a)}sliceString(e,r=this.length,n=`
100
+ bg-white dark:bg-black-800 z-10`,children:a}),b.map(S=>l.jsx("div",{className:"flex items-center py-1 cursor-pointer",children:l.jsx(lr,{label:S?.label,color:S?.color||"blue",size:e,icon:i,href:S?.href})},S?.id||S.label))]})]});return l.jsx("div",{ref:c,className:`${A?"w-fit":"w-full"} ${r}`,children:l.jsxs("div",{className:`inline-flex ${o?"flex-nowrap":"flex-wrap"} gap-2 items-center`,children:[_.map((S,k)=>{const E=y.get(k)||s;return l.jsx(lr,{label:S?.label,color:S?.color||"blue",size:e,icon:i,truncate:E,href:S?.href},S?.id||S.label)}),b.length>0&&l.jsx(Ye.Popover,{content:v(),title:null,trigger:"hover",placement:"topLeft",arrow:!1,rootClassName:"max-w-none z-[9999]",getPopupContainer:()=>document.body,children:l.jsx("button",{type:"button",className:"cursor-pointer inline-flex items-center gap-1 border-0 bg-transparent p-0",onMouseDown:S=>S.stopPropagation(),"aria-label":`Show ${b.length} more tags`,children:l.jsx(lr,{label:`+${b.length} more`,color:"green",size:e})})}),u&&l.jsx("div",{className:"inline-flex items-center",children:u})]})})},Y4=h.forwardRef(({id:t,label:e,value:r,className:n,type:i="string",tags:a,tooltip:s,items:o,isModified:A=!1,isChanged:u=!1,size:c="medium",isHighlighted:d=!1,deletedValue:f,highlightColor:p="warning",isSearchActive:m=!1,originalValue:g=!1,showDiff:_=!1,isLiveField:b=!1,isAiExtracted:y=!1,deltaChange:v,theme:S="light",onUpload:k,acceptsUpload:E=!1,MasterDataModal:w,riskDetails:T,isRiskAnalysisOpen:O=!1,RiskDetailsCard:C,"aria-label":N,decodeEntities:R=!0,onAiExtractedIndicatorClick:D},L)=>{const[P,U]=h.useState(!0),[j,I]=h.useState(!1),[F,z]=h.useState(null),[W,G]=h.useState(!1),X=ie=>R?CD(ie):ie,q=()=>{U(!P)},Q=ie=>{I(!0),z({...ie,value:r})},re=()=>{I(!1),z(null)},$=ie=>{const Ne=ie.target.files?.[0];Ne&&k&&k(Ne),ie.target.value=""},ee=()=>{const ie=typeof r=="string"&&u4(r);if(m&&typeof r=="object")return r;if(r||i?.toLowerCase()==="boolean"&&r===0||i?.toLowerCase()==="currency"&&Number(r)>=0){if((r===!0||r==="True")&&!g&&i?.toLowerCase()!=="choice")return"Yes";if((r===!1||r==="False")&&!g&&i?.toLowerCase()!=="choice")return"No";if(i?.toLowerCase()==="url")return l.jsx("a",{href:r,className:"text-primary-600 truncate",children:X(r)});if(i?.toLowerCase()==="boolean")return B1(r);if(i?.toLowerCase()==="currency")return aa(r,o?.currency_code)||"-";if(i?.toLowerCase()==="datetime"){const Ne=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return Mn(Ne,{skipTimezone:!1,withTime:!0})}else if(i?.toLowerCase()==="date"||ie){const Ne=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return Mn(Ne,{skipTimezone:!0,withTime:!1})}else{if(i?.toLowerCase()==="percentage")return`${r}%`;if(typeof r=="string"&&r.length>100){const Ne=X(r);return l.jsxs("p",{children:[Ne.slice(0,P?100:Ne.length),P?"... ":" ",l.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:q,onKeyDown:be=>{(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),q())},"aria-label":P?"Show more content":"Show less content",type:"button",children:P?"Show more":"Show less"})]})}else return typeof r=="string"?X(r):r}}return"-"},oe=()=>{switch(c){case"small":return"extra-small";case"large":return"large";default:return"small"}},J=()=>{switch(p){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return l.jsxs("div",{id:t||"",ref:L,className:B("font-medium relative",n),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),"aria-label":N||`Label: ${e}, Value: ${r}`,children:[l.jsxs(ne,{variant:"medium",size:oe(),className:"flex gap-1 items-center flex-wrap",appearance:"subtitle",children:[typeof e=="string"?X(e):e," ",l.jsx(Yr,{labels:a?.map(ie=>({...ie,color:ie.color||"primary"}))}),b&&l.jsx(de.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),y&&l.jsx(xn,{onClick:()=>D?.(ee())}),s&&l.jsx(Le,{placement:"top",title:s,whiteSpace:"pre-wrap",children:l.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:ie=>{(ie.key==="Enter"||ie.key===" ")&&ie.preventDefault()},children:l.jsx(Gr,{size:14})})})]}),l.jsxs(ne,{variant:"medium",size:oe(),className:B("text-- whitespace-normal break-all flex gap-1 pt-0.5",A&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",O&&T?.color&&`bg-${T.color}-50 border-${T.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[_&&f&&r?l.jsxs("div",{className:"flex gap-2",children:[l.jsx("span",{className:"line-through",children:X(f)}),l.jsx("span",{children:ee()})]}):u||d?l.jsx("mark",{className:B("rounded-md py-0.5 px-1",J()),children:ee()}):ee(),i?.toLowerCase()==="currency"&&v!==0&&v!==void 0&&v!==null&&l.jsxs(ze.motion.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},transition:{duration:.25},className:B("inline-flex items-center gap-1 ml-1.5 text-xs font-medium",v>0?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:[l.jsx("span",{className:"flex items-center justify-center w-4 h-4",children:v>0?l.jsx(de.ArrowUpwardRounded,{sx:{fontSize:16},className:"text-emerald-600 dark:text-emerald-400"}):l.jsx(de.ArrowDownwardRounded,{sx:{fontSize:16},className:"text-red-600 dark:text-red-400"})}),l.jsx("span",{children:aa(Math.abs(v),o?.currency_code||"USD")})]}),o?.is_master_data&&o?.reference&&r&&l.jsx("button",{onClick:()=>Q(o),onKeyDown:ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),Q(o))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:l.jsx(o4,{width:20,height:20})}),E&&l.jsx("input",{type:"file",onChange:$,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),f&&!_&&l.jsx(ne,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:l.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:l.jsx("del",{children:f||i?.toLowerCase()==="boolean"&&f==="0"?f==="True"&&i?.toLowerCase()!=="choice"?"Yes":f==="False"&&i?.toLowerCase()!=="choice"?"No":i?.toLowerCase()==="boolean"?B1(f):i?.toLowerCase()==="currency"?aa(f,o?.currency_code):i?.toLowerCase()==="date"?Mn(f,{skipTimezone:!0,withTime:!1}):i?.toLowerCase()==="datetime"?Mn(f,{skipTimezone:!0,withTime:!0}):i?.toLowerCase()==="percentage"?`${f}%`:f.length>100?l.jsxs("p",{children:[X(f).slice(0,P?100:f.length),P?"... ":" ",l.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:q,children:P?"Show more":"Show less"})]}):X(f):"-"})})}),w&&l.jsx(w,{isVisible:j,onClose:re,masterdataInfo:F}),W&&T&&O&&l.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:ie=>ie.stopPropagation(),onMouseDown:ie=>ie.preventDefault(),onKeyDown:ie=>{ie.key==="Escape"&&G(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:C?l.jsx(C,{riskDetails:T}):l.jsx("div",{className:"shadow-lg p-4",children:l.jsxs("div",{className:"text-sm",children:[l.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:T.description||"Risk analysis information"})]})})})]})});Y4.displayName="LabelValue";const K4=({fill:t="currentColor",size:e=20,className:r})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:r,children:[l.jsx("mask",{id:"mask0_540_1032",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_540_1032)",children:l.jsx("path",{d:"M8.83329 11.5L7.02079 9.68749C6.86802 9.53471 6.67718 9.46193 6.44829 9.46916C6.21885 9.47582 6.02774 9.55555 5.87496 9.70832C5.72218 9.8611 5.64579 10.0555 5.64579 10.2917C5.64579 10.5278 5.72218 10.7222 5.87496 10.875L8.24996 13.25C8.40274 13.4028 8.59718 13.4792 8.83329 13.4792C9.0694 13.4792 9.26385 13.4028 9.41663 13.25L14.1458 8.52082C14.2986 8.36805 14.3716 8.17693 14.365 7.94749C14.3577 7.7186 14.2777 7.52777 14.125 7.37499C13.9722 7.22221 13.7777 7.14582 13.5416 7.14582C13.3055 7.14582 13.1111 7.22221 12.9583 7.37499L8.83329 11.5ZM9.99996 18.3333C8.84718 18.3333 7.76385 18.1144 6.74996 17.6767C5.73607 17.2394 4.85413 16.6458 4.10413 15.8958C3.35413 15.1458 2.76051 14.2639 2.32329 13.25C1.88551 12.2361 1.66663 11.1528 1.66663 9.99999C1.66663 8.84721 1.88551 7.76388 2.32329 6.74999C2.76051 5.7361 3.35413 4.85416 4.10413 4.10416C4.85413 3.35416 5.73607 2.76027 6.74996 2.32249C7.76385 1.88527 8.84718 1.66666 9.99996 1.66666C11.1527 1.66666 12.2361 1.88527 13.25 2.32249C14.2638 2.76027 15.1458 3.35416 15.8958 4.10416C16.6458 4.85416 17.2394 5.7361 17.6766 6.74999C18.1144 7.76388 18.3333 8.84721 18.3333 9.99999C18.3333 11.1528 18.1144 12.2361 17.6766 13.25C17.2394 14.2639 16.6458 15.1458 15.8958 15.8958C15.1458 16.6458 14.2638 17.2394 13.25 17.6767C12.2361 18.1144 11.1527 18.3333 9.99996 18.3333ZM9.99996 16.6667C11.8472 16.6667 13.4202 16.0175 14.7191 14.7192C16.0175 13.4203 16.6666 11.8472 16.6666 9.99999C16.6666 8.15277 16.0175 6.57971 14.7191 5.28082C13.4202 3.98249 11.8472 3.33332 9.99996 3.33332C8.15274 3.33332 6.57996 3.98249 5.28163 5.28082C3.98274 6.57971 3.33329 8.15277 3.33329 9.99999C3.33329 11.8472 3.98274 13.4203 5.28163 14.7192C6.57996 16.0175 8.15274 16.6667 9.99996 16.6667Z",fill:t})})]}),V1=({fill:t="currentColor",size:e=24,className:r})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:r,children:l.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:t})}),Z4=({className:t,size:e="20",fill:r="#475467"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 20 20",fill:"none",className:t,children:[l.jsx("mask",{id:"mask0_3351_252036",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{width:"20",height:"20",fill:"#D9D9D9"})}),l.jsxs("g",{mask:"url(#mask0_3351_252036)",children:[l.jsx("path",{d:"M16.5 2.5C16.9125 2.5 17.2658 2.64668 17.5596 2.94043C17.8533 3.23418 18 3.5875 18 4V6.25C18 6.5375 17.9314 6.79102 17.7939 7.00977C17.6565 7.22843 17.4749 7.40649 17.25 7.54395V10.3174C16.7935 10.0396 16.2878 9.83528 15.75 9.7168V7.75H5.25V16H9.94727C10.1143 16.546 10.3723 17.0523 10.7051 17.5H5.25C4.8375 17.5 4.48418 17.3533 4.19043 17.0596C3.89668 16.7658 3.75 16.4125 3.75 16V7.54395C3.52506 7.40649 3.34354 7.22843 3.20605 7.00977C3.06855 6.79102 3 6.5375 3 6.25V4C3 3.5875 3.14668 3.23418 3.44043 2.94043C3.73418 2.64668 4.0875 2.5 4.5 2.5H16.5ZM12 10C12.1681 10 12.3134 10.0468 12.4385 10.1367C11.7915 10.466 11.2273 10.9334 10.7832 11.5H9C8.7875 11.5 8.60957 11.4279 8.46582 11.2842C8.32207 11.1404 8.25 10.9625 8.25 10.75C8.25 10.5375 8.32207 10.3596 8.46582 10.2158C8.60957 10.0721 8.7875 10 9 10H12ZM4.5 6.25H16.5V4H4.5V6.25Z",fill:r}),l.jsx("path",{d:"M16.5 2.5C16.9125 2.5 17.2658 2.64668 17.5596 2.94043C17.8533 3.23418 18 3.5875 18 4V6.25C18 6.5375 17.9314 6.79102 17.7939 7.00977C17.6565 7.22843 17.4749 7.40649 17.25 7.54395V16C17.25 16.4125 17.1033 16.7658 16.8096 17.0596C16.5158 17.3533 16.1625 17.5 15.75 17.5H5.25C4.8375 17.5 4.48418 17.3533 4.19043 17.0596C3.89668 16.7658 3.75 16.4125 3.75 16V7.54395C3.52506 7.40649 3.34354 7.22843 3.20605 7.00977C3.06855 6.79102 3 6.5375 3 6.25V4C3 3.5875 3.14668 3.23418 3.44043 2.94043C3.73418 2.64668 4.0875 2.5 4.5 2.5H16.5ZM5.25 16H15.75V7.75H5.25V16ZM12 10C12.2125 10 12.3904 10.0721 12.5342 10.2158C12.6779 10.3596 12.75 10.5375 12.75 10.75C12.75 10.9625 12.6779 11.1404 12.5342 11.2842C12.3904 11.4279 12.2125 11.5 12 11.5H9C8.7875 11.5 8.60957 11.4279 8.46582 11.2842C8.32207 11.1404 8.25 10.9625 8.25 10.75C8.25 10.5375 8.32207 10.3596 8.46582 10.2158C8.60957 10.0721 8.7875 10 9 10H12ZM4.5 6.25H16.5V4H4.5V6.25Z",fill:r})]})]}),$4=({fill:t="currentColor",size:e=24,className:r})=>l.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,children:l.jsx("g",{mask:"url(#mask0_1871_44063)",children:l.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})}),bP={success:"bg-success-100 dark:bg-success-950 text-success-500 dark:text-success-300 border border-b-success-200 dark:border-none",error:"bg-red-100 dark:bg-red-950 text-red-600 dark:text-red-300 border border-b-red-200 dark:border-none",warning:"bg-amber-100 dark:bg-amber-950 text-amber-600 dark:text-amber-300 border border-b-amber-200 dark:border-none",info:"bg-blue-100 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-b-blue-200 dark:border-none",infoGrey:"bg-neutral-200 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-b-neutral-300 dark:border-none",archived:"bg-neutral-200 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-b-neutral-300 dark:border-none",canceled:"bg-gray-100 dark:bg-gray-950 text-gray-600 dark:text-gray-300",queued:"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border border-b-blue-200 dark:border-none",paused:"bg-blue-100 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-b-amber-200 dark:border-none",awaiting_action:"bg-orange-50 dark:bg-orange-950 text-orange-500 dark:text-orange-300 border border-b-amber-200 dark:border-none",skipped:"bg-gray-100 dark:bg-gray-950 text-gray-600 dark:text-gray-300 border border-b-gray-200 dark:border-none",pending:"bg-pink-100 dark:bg-pink-950 text-pink-500 dark:text-pink-300 border border-b-pink-200 dark:border-none"},xP={success:l.jsx(K4,{size:20,className:"text-green-600 dark:text-green-300"}),error:l.jsx(de.RemoveCircleOutline,{sx:{height:18,width:18},className:"text-red-600 dark:text-red-300"}),warning:l.jsx(V1,{size:20,className:"text-amber-600 dark:text-amber-300"}),paused:l.jsx(de.PlayArrowRounded,{sx:{height:20,width:20},className:"text-blue-600 dark:text-blue-300"}),info:l.jsx(V1,{size:20,className:"text-blue-600 dark:text-blue-300"}),infoGrey:l.jsx($4,{size:20,className:"text-gray-600 dark:text-gray-300"}),archived:l.jsx(Z4,{fill:"currentColor",size:"20",className:"text-gray-500 dark:text-gray-300"}),queued:l.jsx(qn.MdOutlinePending,{size:20,className:"text-blue-700 dark:text-blue-300"}),canceled:l.jsx(LN,{sx:{height:20,width:20},className:"text-gray-500 dark:text-gray-300"}),awaiting_action:l.jsx(de.Pending,{sx:{height:18,width:18},className:"text-orange-500 dark:text-orange-300"}),skipped:l.jsx(de.DoDisturbRounded,{sx:{fontSize:"18px"},className:"text-gray-600 dark:text-gray-300"}),pending:l.jsx(de.Timer,{sx:{height:18,width:18},className:"text-pink-500 dark:text-pink-300"})},wo=h.forwardRef(({children:t,status:e,additionalChildren:r,ExpandedComponent:n,executionId:i,className:a},s)=>{const[o,A]=h.useState(!1),u=e==="error"&&n;return l.jsxs("div",{ref:s,className:B("w-full",a),children:[l.jsxs("div",{className:B(bP[e],"gap-2 font-semibold text-sm p-2 rounded-tl-xl w-full flex justify-between items-center",u&&"cursor-pointer select-none"),onClick:()=>u&&A(!o),children:[l.jsxs("div",{className:"flex items-center gap-2 mx-auto",children:[xP[e],l.jsx("span",{children:t})]}),u&&l.jsx("span",{className:"ml-2",children:o?l.jsx(qn.MdKeyboardArrowUp,{size:20}):l.jsx(qn.MdKeyboardArrowDown,{size:20})}),r?l.jsx("span",{children:r}):null]}),u&&o&&l.jsx(n,{executionId:i,children:t})]})});wo.displayName="Banner";const _P=()=>l.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:l.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_36675_12)",children:l.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),yP=(t,e)=>{const r=document.getElementById(t);r?e(r):requestAnimationFrame(()=>{const n=document.getElementById(t);n&&e(n)})},vP=(t,e)=>{if(t.current){if(e)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(t.current.size?.width));else{const r=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(r){t.current.updateSize({width:r,height:"100%"});return}}t.current.updateSize({width:e?"100vw":"",height:"100%"})}},SP=(t,e,r,n,i,a)=>{const[s,o]=h.useState(!1),[A,u]=h.useState(null);return h.useEffect(()=>{if(!t||typeof window>"u"){u(null);return}yP(t,u)},[t]),h.useEffect(()=>{vP(i,r)},[r]),h.useEffect(()=>{if(t&&e){const c=requestAnimationFrame(()=>{o(!0)});return()=>{cancelAnimationFrame(c),o(!1)}}t||o(!0),e||o(!1)},[e,t]),h.useEffect(()=>{i.current?.size?.width&&n&&n(i.current.size.width)},[i.current?.size?.width,n]),{shouldRenderSidebar:s,portalTarget:A}},EP=({isOpen:t,header:e,id:r,ref:n,className:i,containerClassName:a,widthStyle:s,heightStyle:o,motionVariants:A,resizableRef:u,fullScreen:c,maxResizableWidth:d,minWidth:f,handleKey:p,onDragEnd:m,onResize:g,children:_})=>l.jsx(ze.AnimatePresence,{children:t&&l.jsx(ze.motion.div,{ref:n,id:r,initial:A.initial,animate:A.animate,exit:A.exit,transition:{type:"tween",duration:.3},className:B("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",c?"fixed w-full transition translate-x-4 duration-300":"sticky",i),style:{width:s,height:o},children:l.jsx(IN.Resizable,{onResize:b=>{b.stopPropagation();const y=u.current?.size?.width;g&&g(y||f)},onResizeStart:b=>{b.stopPropagation()},ref:u,maxWidth:c?d:d*.75,minWidth:f,minHeight:o,maxHeight:o,enable:c?{}:{[p]:!0},handleClasses:{[p]:B("relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700")},handleComponent:{[p]:l.jsx("div",{className:B("absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",p==="left"&&"-right-2.5 -left-auto"),children:l.jsx(_P,{})})},className:"!h-full",onResizeStop:m||void 0,children:l.jsxs("div",{className:B("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",a),children:[e?l.jsx("div",{className:"py-4 px-6",children:e||null}):null,l.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:_})]})})})}),J4=h.forwardRef(({isOpen:t,children:e,fullScreen:r=!1,defaultSize:n=void 0,minWidth:i=400,onDragEnd:a=null,onResize:s,className:o,placement:A="right",parentContainer:u,header:c,id:d,containerClassName:f,ignoreParentContainerHeight:p=!1,height:m,isMainSidebarExpanded:g=!1,mainSidebarExpandedWidth:_=280,mainSidebarCollapsedWidth:b=80,navbarHeight:y=64},v)=>{const S=g?_:b,k=h.useRef(null),{shouldRenderSidebar:E,portalTarget:w}=SP(u,t,r,s,k),T=typeof window<"u"?window.innerWidth-S:0,O=n,C=A==="right",N=m||(u&&!p?"100%":`calc(100vh - ${y}px)`),R={initial:{x:C?"100%":"-100%"},animate:{x:0},exit:{x:C?"100%":"-100%"}},D=C?"left":"right",L=l.jsx(EP,{isOpen:t,header:c,id:d,ref:v,className:o,containerClassName:f,widthStyle:O,heightStyle:N,motionVariants:R,resizableRef:k,fullScreen:r,maxResizableWidth:T,minWidth:i,handleKey:D,onDragEnd:a,onResize:s,children:e});return u?!E||!w?null:Xr.createPortal(L,w):E?L:null});J4.displayName="ResizableSidebar";const e7=h.forwardRef(({pdfUrl:t,width:e="100%",height:r="100vh",className:n,iframeClassName:i,title:a="PDF Viewer",showLoading:s=!0,loadingComponent:o,errorComponent:A,onError:u,onLoad:c,allowFullScreen:d=!0,"aria-label":f},p)=>{const[m,g]=h.useState(!0),[_,b]=h.useState(!1),y=()=>{g(!1),b(!1),c?.()},v=()=>{g(!1),b(!0),u?.()},S=l.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm",children:"Loading PDF..."})]})}),k=l.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:l.jsxs("div",{className:"text-center p-6",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.998-.833-2.768 0L3.046 16.5c-.77.833.192 2.5 1.732 2.5z"})}),l.jsx("h3",{className:"text-lg font-medium text-neutral-900 dark:text-neutral-100 mb-2",children:"Failed to load PDF"}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm mb-4",children:"The PDF document could not be displayed. Please check the URL or try again later."}),l.jsx("button",{onClick:()=>{b(!1),g(!0);const w=document.querySelector(`iframe[src="${t}"]`);w&&(w.src=w.src)},className:"bg-blue-600 text-white px-4 py-2 rounded-md text-sm hover:bg-blue-700 transition-colors",children:"Retry"})]})});return!t||!(w=>{try{return new URL(w,window.location.href).pathname.toLowerCase().endsWith(".pdf")||w.includes("pdf")}catch{return!1}})(t)?l.jsx("div",{ref:p,className:B("relative overflow-hidden",n),style:{width:e,height:r},children:A||k}):l.jsxs("div",{ref:p,className:B("relative overflow-hidden",n),style:{width:e,height:r},"aria-label":f||`PDF Viewer: ${a}`,children:[m&&s&&l.jsx("div",{className:"absolute inset-0 z-10",children:o||S}),_&&l.jsx("div",{className:"absolute inset-0 z-10",children:A||k}),!_&&l.jsx("iframe",{src:t,title:a,className:B("w-full h-full border-none",m&&"opacity-0",i),onLoad:y,onError:v,allowFullScreen:d,loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-forms","aria-label":f||`PDF document: ${a}`}),l.jsx("div",{className:"sr-only",children:"PDF document viewer. Use your browser's PDF controls to navigate, zoom, or download the document."})]})});e7.displayName="PdfViewer";const kP={top:"top","top-start":"topLeft","top-end":"topRight",bottom:"bottom","bottom-start":"bottomLeft","bottom-end":"bottomRight",left:"left","left-start":"leftTop","left-end":"leftBottom",right:"right","right-start":"rightTop","right-end":"rightBottom"},t7=h.forwardRef(({children:t,component:e,placement:r="bottom",isOpen:n,toggleMenu:i,parentContainer:a,noSpacing:s=!1,triggerClassName:o,containerClassName:A,className:u,showArrow:c=!1,offset:d=8,disableOutsideClick:f=!1,"aria-label":p,disabled:m=!1,trigger:g="click",styles:_},b)=>{const y=kP[r],v=h.useMemo(()=>({..._,body:{padding:0,minWidth:"120px",zIndex:5002,..._?.body}}),[_]),S=w=>{!f&&!w&&n&&i?.()},k=w=>{w.preventDefault(),w.stopPropagation(),m||i?.(w)},E=h.useMemo(()=>w=>{if(a==="body")return document.body;if(a){const T=document.getElementById(a);if(T)return T}return w.parentElement||document.body},[a]);return l.jsx("div",{ref:b,className:B("relative inline-block",u),children:l.jsx(Ye.Popover,{open:n,onOpenChange:S,content:l.jsx("div",{className:"relative",children:e}),placement:y,trigger:g,arrow:c,getPopupContainer:E,classNames:{root:B("lax-popper-overlay",A)},styles:v,align:{offset:[0,d]},children:l.jsx("button",{onClick:k,className:B("flex items-center justify-center outline-none focus:outline-none transition-colors",!s&&"p-2",m&&"opacity-50 cursor-not-allowed",o),"aria-label":p,"aria-expanded":n,"aria-haspopup":"true",disabled:m,type:"button",children:t})})})});t7.displayName="Popper";const wP=({size:t=24,fill:e="#12B76A"})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:e,xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{mask:"url(#mask0_4874_46615)",children:l.jsx("path",{d:"M10.6 13.8L8.425 11.625C8.24167 11.4417 8.01267 11.3543 7.738 11.363C7.46267 11.371 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.0833 16.0833 10.3167 16.175 10.6 16.175C10.8833 16.175 11.1167 16.0833 11.3 15.9L16.975 10.225C17.1583 10.0417 17.246 9.81233 17.238 9.537C17.2293 9.26233 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z",fill:e})})}),TP=({size:t=24,fill:e="#F04438"})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{id:"error",children:l.jsx("g",{mask:"url(#mask0_4874_46622)",children:l.jsx("path",{id:"error_2",d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:e})})})}),OP=({size:t=24,fill:e="#F79009"})=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:l.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:e})}),CP=({size:t=24,fill:e="#016DCF"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[l.jsx("mask",{id:"mask0_32271_5688",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:l.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_32271_5688)",children:l.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:e})})]}),NP=({size:t=24,fill:e="#016DCF"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[l.jsx("mask",{id:"mask0_35096_2621",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:l.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),l.jsx("g",{mask:"url(#mask0_35096_2621)",children:l.jsx("path",{d:"M8 20H16V17C16 15.9 15.6083 14.9583 14.825 14.175C14.0417 13.3917 13.1 13 12 13C10.9 13 9.95833 13.3917 9.175 14.175C8.39167 14.9583 8 15.9 8 17V20ZM12 11C13.1 11 14.0417 10.6083 14.825 9.825C15.6083 9.04167 16 8.1 16 7V4H8V7C8 8.1 8.39167 9.04167 9.175 9.825C9.95833 10.6083 10.9 11 12 11ZM5 22C4.71667 22 4.47917 21.9042 4.2875 21.7125C4.09583 21.5208 4 21.2833 4 21C4 20.7167 4.09583 20.4792 4.2875 20.2875C4.47917 20.0958 4.71667 20 5 20H6V17C6 15.9833 6.2375 15.0292 6.7125 14.1375C7.1875 13.2458 7.85 12.5333 8.7 12C7.85 11.4667 7.1875 10.7542 6.7125 9.8625C6.2375 8.97083 6 8.01667 6 7V4H5C4.71667 4 4.47917 3.90417 4.2875 3.7125C4.09583 3.52083 4 3.28333 4 3C4 2.71667 4.09583 2.47917 4.2875 2.2875C4.47917 2.09583 4.71667 2 5 2H19C19.2833 2 19.5208 2.09583 19.7125 2.2875C19.9042 2.47917 20 2.71667 20 3C20 3.28333 19.9042 3.52083 19.7125 3.7125C19.5208 3.90417 19.2833 4 19 4H18V7C18 8.01667 17.7625 8.97083 17.2875 9.8625C16.8125 10.7542 16.15 11.4667 15.3 12C16.15 12.5333 16.8125 13.2458 17.2875 14.1375C17.7625 15.0292 18 15.9833 18 17V20H19C19.2833 20 19.5208 20.0958 19.7125 20.2875C19.9042 20.4792 20 20.7167 20 21C20 21.2833 19.9042 21.5208 19.7125 21.7125C19.5208 21.9042 19.2833 22 19 22H5Z",fill:e})})]}),DP=({size:t=16})=>l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"})}),RP=t=>{switch(t){case"success":return l.jsx("div",{className:"w-8 h-8 bg-green-50 dark:bg-green-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(wP,{size:24,fill:"#12B76A"})});case"error":return l.jsx("div",{className:"w-8 h-8 bg-red-50 dark:bg-red-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(TP,{fill:"#F04438",size:24})});case"warning":return l.jsx("div",{className:"w-8 h-8 bg-yellow-50 dark:bg-yellow-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(OP,{fill:"#F79009",size:24})});case"info":return l.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(CP,{})});case"in-progress":return l.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:l.jsx(NP,{})});default:return null}},PP={success:"border-b-[5px] !border-green-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",error:"border-b-[5px] !border-red-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",warning:"border-b-[5px] !border-yellow-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",info:"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600","in-progress":"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600"},LP=({closeToast:t})=>l.jsx("button",{onClick:t,className:"text-neutral-900 dark:text-white hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",children:l.jsx(DP,{size:16})}),IP=({position:t="bottom-right",autoClose:e=3e3,hideProgressBar:r=!0,newestOnTop:n=!0,closeOnClick:i=!0,pauseOnFocusLoss:a=!1,draggable:s=!0,pauseOnHover:o=!0,rtl:A=!1,className:u,style:c={zIndex:1e5},...d})=>l.jsx(Tt.ToastContainer,{position:t,transition:Tt.Slide,autoClose:e,hideProgressBar:r,newestOnTop:n,closeOnClick:i,rtl:A,pauseOnFocusLoss:a,draggable:s,pauseOnHover:o,icon:({type:f})=>RP(f),bodyStyle:{gap:"4px"},style:c,toastClassName:f=>{const{type:p="",defaultClassName:m=""}=f||{};return`w-[100%] sm:w-[400px] bg-white dark:bg-neutral-800 rounded-[4px] font-medium text-sm text-neutral-900 dark:text-white shadow-lg p-[20px] min-h-0 ${m} ${PP[p]} ${u||""}`},closeButton:LP,...d}),MP={success:(t,e)=>Tt.toast.success(t,e),error:(t,e)=>Tt.toast.error(t,e),warning:(t,e)=>Tt.toast.warning(t,e),info:(t,e)=>Tt.toast.info(t,e),inProgress:(t,e)=>Tt.toast(t,{...e,type:"in-progress"}),dismiss:t=>Tt.toast.dismiss(t),isActive:t=>Tt.toast.isActive(t)};function $A(){return $A=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$A.apply(null,arguments)}function r7(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}let W1=[],n7=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,r=0;e<t.length;e++)(e%2?n7:W1).push(r=r+t[e])})();function jP(t){if(t<768)return!1;for(let e=0,r=W1.length;;){let n=e+r>>1;if(t<W1[n])r=n;else if(t>=n7[n])e=n+1;else return!0;if(e==r)return!1}}function B3(t){return t>=127462&&t<=127487}const q3=8205;function HP(t,e,r=!0,n=!0){return(r?i7:FP)(t,e,n)}function i7(t,e,r){if(e==t.length)return e;e&&a7(t.charCodeAt(e))&&s7(t.charCodeAt(e-1))&&e--;let n=$c(t,e);for(e+=V3(n);e<t.length;){let i=$c(t,e);if(n==q3||i==q3||r&&jP(i))e+=V3(i),n=i;else if(B3(i)){let a=0,s=e-2;for(;s>=0&&B3($c(t,s));)a++,s-=2;if(a%2==0)break;e+=2}else break}return e}function FP(t,e,r){for(;e>0;){let n=i7(t,e-2,r);if(n<e)return n;e--}return 0}function $c(t,e){let r=t.charCodeAt(e);if(!s7(r)||e+1==t.length)return r;let n=t.charCodeAt(e+1);return a7(n)?(r-55296<<10)+(n-56320)+65536:r}function a7(t){return t>=56320&&t<57344}function s7(t){return t>=55296&&t<56320}function V3(t){return t<65536?1:2}let ut=class o7{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,r,n){[e,r]=ns(this,e,r);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(r,this.length,i,1),Rn.from(i,this.length-(r-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,r=this.length){[e,r]=ns(this,e,r);let n=[];return this.decompose(e,r,n,0),Rn.from(n,r-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let r=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new io(this),a=new io(e);for(let s=r,o=r;;){if(i.next(s),a.next(s),s=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(e=1){return new io(this,e)}iterRange(e,r=this.length){return new l7(this,e,r)}iterLines(e,r){let n;if(e==null)n=this.iter();else{r==null&&(r=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,r==this.lines+1?this.length:r<=1?0:this.line(r-1).to))}return new A7(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?o7.empty:e.length<=32?new jt(e):Rn.from(jt.split(e,[]))}};class jt extends ut{constructor(e,r=UP(e)){super(),this.text=e,this.length=r}get lines(){return this.text.length}get children(){return null}lineInner(e,r,n,i){for(let a=0;;a++){let s=this.text[a],o=i+s.length;if((r?n:o)>=e)return new zP(i,o,n,s);i=o+1,n++}}decompose(e,r,n,i){let a=e<=0&&r>=this.length?this:new jt(W3(this.text,e,r),Math.min(r,this.length)-Math.max(0,e));if(i&1){let s=n.pop(),o=wA(a.text,s.text.slice(),0,a.length);if(o.length<=32)n.push(new jt(o,s.length+a.length));else{let A=o.length>>1;n.push(new jt(o.slice(0,A)),new jt(o.slice(A)))}}else n.push(a)}replace(e,r,n){if(!(n instanceof jt))return super.replace(e,r,n);[e,r]=ns(this,e,r);let i=wA(this.text,wA(n.text,W3(this.text,0,e)),r),a=this.length+n.length-(r-e);return i.length<=32?new jt(i,a):Rn.from(jt.split(i,[]),a)}sliceString(e,r=this.length,n=`
101
101
  `){[e,r]=ns(this,e,r);let i="";for(let a=0,s=0;a<=r&&s<this.text.length;s++){let o=this.text[s],A=a+o.length;a>e&&s&&(i+=n),e<A&&r>a&&(i+=o.slice(Math.max(0,e-a),r-a)),a=A+1}return i}flatten(e){for(let r of this.text)e.push(r)}scanIdentical(){return 0}static split(e,r){let n=[],i=-1;for(let a of e)n.push(a),i+=a.length+1,n.length==32&&(r.push(new jt(n,i)),n=[],i=-1);return i>-1&&r.push(new jt(n,i)),r}}class Rn extends ut{constructor(e,r){super(),this.children=e,this.length=r,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,r,n,i){for(let a=0;;a++){let s=this.children[a],o=i+s.length,A=n+s.lines-1;if((r?A:o)>=e)return s.lineInner(e,r,n,i);i=o+1,n=A+1}}decompose(e,r,n,i){for(let a=0,s=0;s<=r&&a<this.children.length;a++){let o=this.children[a],A=s+o.length;if(e<=A&&r>=s){let u=i&((s<=e?1:0)|(A>=r?2:0));s>=e&&A<=r&&!u?n.push(o):o.decompose(e-s,r-s,n,u)}s=A+1}}replace(e,r,n){if([e,r]=ns(this,e,r),n.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let s=this.children[i],o=a+s.length;if(e>=a&&r<=o){let A=s.replace(e-a,r-a,n),u=this.lines-s.lines+A.lines;if(A.lines<u>>4&&A.lines>u>>6){let c=this.children.slice();return c[i]=A,new Rn(c,this.length-(r-e)+n.length)}return super.replace(a,o,A)}a=o+1}return super.replace(e,r,n)}sliceString(e,r=this.length,n=`
102
102
  `){[e,r]=ns(this,e,r);let i="";for(let a=0,s=0;a<this.children.length&&s<=r;a++){let o=this.children[a],A=s+o.length;s>e&&a&&(i+=n),e<A&&r>s&&(i+=o.sliceString(e-s,r-s,n)),s=A+1}return i}flatten(e){for(let r of this.children)r.flatten(e)}scanIdentical(e,r){if(!(e instanceof Rn))return 0;let n=0,[i,a,s,o]=r>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=r,a+=r){if(i==s||a==o)return n;let A=this.children[i],u=e.children[a];if(A!=u)return n+A.scanIdentical(u,r);n+=A.length+1}}static from(e,r=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let p of e)n+=p.lines;if(n<32){let p=[];for(let m of e)m.flatten(p);return new jt(p,r)}let i=Math.max(32,n>>5),a=i<<1,s=i>>1,o=[],A=0,u=-1,c=[];function d(p){let m;if(p.lines>a&&p instanceof Rn)for(let g of p.children)d(g);else p.lines>s&&(A>s||!A)?(f(),o.push(p)):p instanceof jt&&A&&(m=c[c.length-1])instanceof jt&&p.lines+m.lines<=32?(A+=p.lines,u+=p.length+1,c[c.length-1]=new jt(m.text.concat(p.text),m.length+1+p.length)):(A+p.lines>i&&f(),A+=p.lines,u+=p.length+1,c.push(p))}function f(){A!=0&&(o.push(c.length==1?c[0]:Rn.from(c,u)),u=-1,A=c.length=0)}for(let p of e)d(p);return f(),o.length==1?o[0]:new Rn(o,r)}}ut.empty=new jt([""],0);function UP(t){let e=-1;for(let r of t)e+=r.length+1;return e}function wA(t,e,r=0,n=1e9){for(let i=0,a=0,s=!0;a<t.length&&i<=n;a++){let o=t[a],A=i+o.length;A>=r&&(A>n&&(o=o.slice(0,n-i)),i<r&&(o=o.slice(r-i)),s?(e[e.length-1]+=o,s=!1):e.push(o)),i=A+1}return e}function W3(t,e,r){return wA(t,[""],e,r)}class io{constructor(e,r=1){this.dir=r,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[r>0?1:(e instanceof jt?e.text.length:e.children.length)<<1]}nextInner(e,r){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],a=this.offsets[n],s=a>>1,o=i instanceof jt?i.text.length:i.children.length;if(s==(r>0?o:0)){if(n==0)return this.done=!0,this.value="",this;r>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((a&1)==(r>0?0:1)){if(this.offsets[n]+=r,e==0)return this.lineBreak=!0,this.value=`
103
103
  `,this;e--}else if(i instanceof jt){let A=i.text[s+(r<0?-1:0)];if(this.offsets[n]+=r,A.length>Math.max(0,e))return this.value=e==0?A:r>0?A.slice(e):A.slice(0,A.length-e),this;e-=A.length}else{let A=i.children[s+(r<0?-1:0)];e>A.length?(e-=A.length,this.offsets[n]+=r):(r<0&&this.offsets[n]--,this.nodes.push(A),this.offsets.push(r>0?1:(A instanceof jt?A.text.length:A.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class l7{constructor(e,r,n){this.value="",this.done=!1,this.cursor=new io(e,r>n?-1:1),this.pos=r>n?e.length:0,this.from=Math.min(r,n),this.to=Math.max(r,n)}nextInner(e,r){if(r<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,r<0?this.pos-this.to:this.from-this.pos);let n=r<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*r,this.value=i.length<=n?i:r<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class A7{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:r,lineBreak:n,value:i}=this.inner.next(e);return r&&this.afterBreak?(this.value="",this.afterBreak=!1):r?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(ut.prototype[Symbol.iterator]=function(){return this.iter()},io.prototype[Symbol.iterator]=l7.prototype[Symbol.iterator]=A7.prototype[Symbol.iterator]=function(){return this});class zP{constructor(e,r,n,i){this.from=e,this.to=r,this.number=n,this.text=i}get length(){return this.to-this.from}}function ns(t,e,r){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,r))]}function ar(t,e,r=!0,n=!0){return HP(t,e,r,n)}function BP(t){return t>=56320&&t<57344}function qP(t){return t>=55296&&t<56320}function Or(t,e){let r=t.charCodeAt(e);if(!qP(r)||e+1==t.length)return r;let n=t.charCodeAt(e+1);return BP(n)?(r-55296<<10)+(n-56320)+65536:r}function Tb(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Pn(t){return t<65536?1:2}const X1=/\r\n?|\n/;var Ar=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ar||(Ar={}));class Vn{constructor(e){this.sections=e}get length(){let e=0;for(let r=0;r<this.sections.length;r+=2)e+=this.sections[r];return e}get newLength(){let e=0;for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r+1];e+=n<0?this.sections[r]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let r=0,n=0,i=0;r<this.sections.length;){let a=this.sections[r++],s=this.sections[r++];s<0?(e(n,i,a),i+=a):i+=s,n+=a}}iterChangedRanges(e,r=!1){Q1(this,e,r)}get invertedDesc(){let e=[];for(let r=0;r<this.sections.length;){let n=this.sections[r++],i=this.sections[r++];i<0?e.push(n,i):e.push(i,n)}return new Vn(e)}composeDesc(e){return this.empty?e:e.empty?this:u7(this,e)}mapDesc(e,r=!1){return e.empty?this:G1(this,e,r)}mapPos(e,r=-1,n=Ar.Simple){let i=0,a=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],A=this.sections[s++],u=i+o;if(A<0){if(u>e)return a+(e-i);a+=o}else{if(n!=Ar.Simple&&u>=e&&(n==Ar.TrackDel&&i<e&&u>e||n==Ar.TrackBefore&&i<e||n==Ar.TrackAfter&&u>e))return null;if(u>e||u==e&&r<0&&!o)return e==i||r<0?a:a+A;a+=A}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return a}touchesRange(e,r=e){for(let n=0,i=0;n<this.sections.length&&i<=r;){let a=this.sections[n++],s=this.sections[n++],o=i+a;if(s>=0&&i<=r&&o>=e)return i<e&&o>r?"cover":!0;i=o}return!1}toString(){let e="";for(let r=0;r<this.sections.length;){let n=this.sections[r++],i=this.sections[r++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(r=>typeof r!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Vn(e)}static create(e){return new Vn(e)}}class Gt extends Vn{constructor(e,r){super(e),this.inserted=r}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Q1(this,(r,n,i,a,s)=>e=e.replace(i,i+(n-r),s),!1),e}mapDesc(e,r=!1){return G1(this,e,r,!0)}invert(e){let r=this.sections.slice(),n=[];for(let i=0,a=0;i<r.length;i+=2){let s=r[i],o=r[i+1];if(o>=0){r[i]=o,r[i+1]=s;let A=i>>1;for(;n.length<A;)n.push(ut.empty);n.push(s?e.slice(a,a+s):ut.empty)}a+=s}return new Gt(r,n)}compose(e){return this.empty?e:e.empty?this:u7(this,e,!0)}map(e,r=!1){return e.empty?this:G1(this,e,r,!0)}iterChanges(e,r=!1){Q1(this,e,r)}get desc(){return Vn.create(this.sections)}filter(e){let r=[],n=[],i=[],a=new To(this);e:for(let s=0,o=0;;){let A=s==e.length?1e9:e[s++];for(;o<A||o==A&&a.len==0;){if(a.done)break e;let c=Math.min(a.len,A-o);hr(i,c,-1);let d=a.ins==-1?-1:a.off==0?a.ins:0;hr(r,c,d),d>0&&ki(n,r,a.text),a.forward(c),o+=c}let u=e[s++];for(;o<u;){if(a.done)break e;let c=Math.min(a.len,u-o);hr(r,c,-1),hr(i,c,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(c),o+=c}}return{changes:new Gt(r,n),filtered:Vn.create(i)}}toJSON(){let e=[];for(let r=0;r<this.sections.length;r+=2){let n=this.sections[r],i=this.sections[r+1];i<0?e.push(n):i==0?e.push([n]):e.push([n].concat(this.inserted[r>>1].toJSON()))}return e}static of(e,r,n){let i=[],a=[],s=0,o=null;function A(c=!1){if(!c&&!i.length)return;s<r&&hr(i,r-s,-1);let d=new Gt(i,a);o=o?o.compose(d.map(o)):d,i=[],a=[],s=0}function u(c){if(Array.isArray(c))for(let d of c)u(d);else if(c instanceof Gt){if(c.length!=r)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${r})`);A(),o=o?o.compose(c.map(o)):c}else{let{from:d,to:f=d,insert:p}=c;if(d>f||d<0||f>r)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${r})`);let m=p?typeof p=="string"?ut.of(p.split(n||X1)):p:ut.empty,g=m.length;if(d==f&&g==0)return;d<s&&A(),d>s&&hr(i,d-s,-1),hr(i,f-d,g),ki(a,i,m),s=f}}return u(e),A(!o),o}static empty(e){return new Gt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let r=[],n=[];for(let i=0;i<e.length;i++){let a=e[i];if(typeof a=="number")r.push(a,-1);else{if(!Array.isArray(a)||typeof a[0]!="number"||a.some((s,o)=>o&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)r.push(a[0],0);else{for(;n.length<i;)n.push(ut.empty);n[i]=ut.of(a.slice(1)),r.push(a[0],n[i].length)}}}return new Gt(r,n)}static createSet(e,r){return new Gt(e,r)}}function hr(t,e,r,n=!1){if(e==0&&r<=0)return;let i=t.length-2;i>=0&&r<=0&&r==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=r:n?(t[i]+=e,t[i+1]+=r):t.push(e,r)}function ki(t,e,r){if(r.length==0)return;let n=e.length-2>>1;if(n<t.length)t[t.length-1]=t[t.length-1].append(r);else{for(;t.length<n;)t.push(ut.empty);t.push(r)}}function Q1(t,e,r){let n=t.inserted;for(let i=0,a=0,s=0;s<t.sections.length;){let o=t.sections[s++],A=t.sections[s++];if(A<0)i+=o,a+=o;else{let u=i,c=a,d=ut.empty;for(;u+=o,c+=A,A&&n&&(d=d.append(n[s-2>>1])),!(r||s==t.sections.length||t.sections[s+1]<0);)o=t.sections[s++],A=t.sections[s++];e(i,u,a,c,d),i=u,a=c}}}function G1(t,e,r,n=!1){let i=[],a=n?[]:null,s=new To(t),o=new To(e);for(let A=-1;;){if(s.done&&o.len||o.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&o.ins==-1){let u=Math.min(s.len,o.len);hr(i,u,-1),s.forward(u),o.forward(u)}else if(o.ins>=0&&(s.ins<0||A==s.i||s.off==0&&(o.len<s.len||o.len==s.len&&!r))){let u=o.len;for(hr(i,o.ins,-1);u;){let c=Math.min(s.len,u);s.ins>=0&&A<s.i&&s.len<=c&&(hr(i,0,s.ins),a&&ki(a,i,s.text),A=s.i),s.forward(c),u-=c}o.next()}else if(s.ins>=0){let u=0,c=s.len;for(;c;)if(o.ins==-1){let d=Math.min(c,o.len);u+=d,c-=d,o.forward(d)}else if(o.ins==0&&o.len<c)c-=o.len,o.next();else break;hr(i,u,A<s.i?s.ins:0),a&&A<s.i&&ki(a,i,s.text),A=s.i,s.forward(s.len-c)}else{if(s.done&&o.done)return a?Gt.createSet(i,a):Vn.create(i);throw new Error("Mismatched change set lengths")}}}function u7(t,e,r=!1){let n=[],i=r?[]:null,a=new To(t),s=new To(e);for(let o=!1;;){if(a.done&&s.done)return i?Gt.createSet(n,i):Vn.create(n);if(a.ins==0)hr(n,a.len,0,o),a.next();else if(s.len==0&&!s.done)hr(n,0,s.ins,o),i&&ki(i,n,s.text),s.next();else{if(a.done||s.done)throw new Error("Mismatched change set lengths");{let A=Math.min(a.len2,s.len),u=n.length;if(a.ins==-1){let c=s.ins==-1?-1:s.off?0:s.ins;hr(n,A,c,o),i&&c&&ki(i,n,s.text)}else s.ins==-1?(hr(n,a.off?0:a.len,A,o),i&&ki(i,n,a.textBit(A))):(hr(n,a.off?0:a.len,s.off?0:s.ins,o),i&&!s.off&&ki(i,n,s.text));o=(a.ins>A||s.ins>=0&&s.len>A)&&(o||n.length>u),a.forward2(A),s.forward(A)}}}}class To{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,r=this.i-2>>1;return r>=e.length?ut.empty:e[r]}textBit(e){let{inserted:r}=this.set,n=this.i-2>>1;return n>=r.length&&!e?ut.empty:r[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ta{constructor(e,r,n){this.from=e,this.to=r,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,r=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,r):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new ta(n,i,this.flags)}extend(e,r=e){if(e<=this.anchor&&r>=this.anchor)return ue.range(e,r);let n=Math.abs(e-this.anchor)>Math.abs(r-this.anchor)?e:r;return ue.range(this.anchor,n)}eq(e,r=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!r||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(e.anchor,e.head)}static create(e,r,n){return new ta(e,r,n)}}class ue{constructor(e,r){this.ranges=e,this.mainIndex=r}map(e,r=-1){return e.empty?this:ue.create(this.ranges.map(n=>n.map(e,r)),this.mainIndex)}eq(e,r=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],r))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(e,r=!0){return ue.create([e].concat(this.ranges),r?0:this.mainIndex+1)}replaceRange(e,r=this.mainIndex){let n=this.ranges.slice();return n[r]=e,ue.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(e.ranges.map(r=>ta.fromJSON(r)),e.main)}static single(e,r=e){return new ue([ue.range(e,r)],0)}static create(e,r=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let a=e[i];if(a.empty?a.from<=n:a.from<n)return ue.normalized(e.slice(),r);n=a.to}return new ue(e,r)}static cursor(e,r=0,n,i){return ta.create(e,e,(r==0?0:r<0?8:16)|(n==null?7:Math.min(6,n))|(i??16777215)<<6)}static range(e,r,n,i){let a=(n??16777215)<<6|(i==null?7:Math.min(6,i));return r<e?ta.create(r,e,48|a):ta.create(e,r,(r>e?8:0)|a)}static normalized(e,r=0){let n=e[r];e.sort((i,a)=>i.from-a.from),r=e.indexOf(n);for(let i=1;i<e.length;i++){let a=e[i],s=e[i-1];if(a.empty?a.from<=s.to:a.from<s.to){let o=s.from,A=Math.max(a.to,s.to);i<=r&&r--,e.splice(--i,2,a.anchor>a.head?ue.range(A,o):ue.range(o,A))}}return new ue(e,r)}}function c7(t,e){for(let r of t.ranges)if(r.to>e)throw new RangeError("Selection points outside of document")}let Ob=0;class we{constructor(e,r,n,i,a){this.combine=e,this.compareInput=r,this.compare=n,this.isStatic=i,this.id=Ob++,this.default=e([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(e={}){return new we(e.combine||(r=>r),e.compareInput||((r,n)=>r===n),e.compare||(e.combine?(r,n)=>r===n:Cb),!!e.static,e.enables)}of(e){return new TA([],this,0,e)}compute(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new TA(e,this,1,r)}computeN(e,r){if(this.isStatic)throw new Error("Can't compute a static facet");return new TA(e,this,2,r)}from(e,r){return r||(r=n=>n),this.compute([e],n=>r(n.field(e)))}}function Cb(t,e){return t==e||t.length==e.length&&t.every((r,n)=>r===e[n])}class TA{constructor(e,r,n,i){this.dependencies=e,this.facet=r,this.type=n,this.value=i,this.id=Ob++}dynamicSlot(e){var r;let n=this.value,i=this.facet.compareInput,a=this.id,s=e[a]>>1,o=this.type==2,A=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?A=!0:d=="selection"?u=!0:(((r=e[d.id])!==null&&r!==void 0?r:1)&1)==0&&c.push(e[d.id]);return{create(d){return d.values[s]=n(d),1},update(d,f){if(A&&f.docChanged||u&&(f.docChanged||f.selection)||Y1(d,c)){let p=n(d);if(o?!X3(p,d.values[s],i):!i(p,d.values[s]))return d.values[s]=p,1}return 0},reconfigure:(d,f)=>{let p,m=f.config.address[a];if(m!=null){let g=eu(f,m);if(this.dependencies.every(_=>_ instanceof we?f.facet(_)===d.facet(_):_ instanceof Zt?f.field(_,!1)==d.field(_,!1):!0)||(o?X3(p=n(d),g,i):i(p=n(d),g)))return d.values[s]=g,0}else p=n(d);return d.values[s]=p,1}}}}function X3(t,e,r){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!r(t[n],e[n]))return!1;return!0}function Y1(t,e){let r=!1;for(let n of e)ao(t,n)&1&&(r=!0);return r}function VP(t,e,r){let n=r.map(A=>t[A.id]),i=r.map(A=>A.type),a=n.filter(A=>!(A&1)),s=t[e.id]>>1;function o(A){let u=[];for(let c=0;c<n.length;c++){let d=eu(A,n[c]);if(i[c]==2)for(let f of d)u.push(f);else u.push(d)}return e.combine(u)}return{create(A){for(let u of n)ao(A,u);return A.values[s]=o(A),1},update(A,u){if(!Y1(A,a))return 0;let c=o(A);return e.compare(c,A.values[s])?0:(A.values[s]=c,1)},reconfigure(A,u){let c=Y1(A,n),d=u.config.facets[e.id],f=u.facet(e);if(d&&!c&&Cb(r,d))return A.values[s]=f,0;let p=o(A);return e.compare(p,f)?(A.values[s]=f,0):(A.values[s]=p,1)}}}const zl=we.define({static:!0});class Zt{constructor(e,r,n,i,a){this.id=e,this.createF=r,this.updateF=n,this.compareF=i,this.spec=a,this.provides=void 0}static define(e){let r=new Zt(Ob++,e.create,e.update,e.compare||((n,i)=>n===i),e);return e.provide&&(r.provides=e.provide(r)),r}create(e){let r=e.facet(zl).find(n=>n.field==this);return(r?.create||this.createF)(e)}slot(e){let r=e[this.id]>>1;return{create:n=>(n.values[r]=this.create(n),1),update:(n,i)=>{let a=n.values[r],s=this.updateF(a,i);return this.compareF(a,s)?0:(n.values[r]=s,1)},reconfigure:(n,i)=>{let a=n.facet(zl),s=i.facet(zl),o;return(o=a.find(A=>A.field==this))&&o!=s.find(A=>A.field==this)?(n.values[r]=o.create(n),1):i.config.address[this.id]!=null?(n.values[r]=i.field(this),0):(n.values[r]=this.create(n),1)}}}init(e){return[this,zl.of({field:this,create:e})]}get extension(){return this}}const Ji={lowest:4,low:3,default:2,high:1,highest:0};function Ms(t){return e=>new d7(e,t)}const Vi={highest:Ms(Ji.highest),high:Ms(Ji.high),default:Ms(Ji.default),low:Ms(Ji.low),lowest:Ms(Ji.lowest)};class d7{constructor(e,r){this.inner=e,this.prec=r}}class Ju{of(e){return new K1(this,e)}reconfigure(e){return Ju.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class K1{constructor(e,r){this.compartment=e,this.inner=r}}class JA{constructor(e,r,n,i,a,s){for(this.base=e,this.compartments=r,this.dynamicSlots=n,this.address=i,this.staticValues=a,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let r=this.address[e.id];return r==null?e.default:this.staticValues[r>>1]}static resolve(e,r,n){let i=[],a=Object.create(null),s=new Map;for(let f of WP(e,r,s))f instanceof Zt?i.push(f):(a[f.facet.id]||(a[f.facet.id]=[])).push(f);let o=Object.create(null),A=[],u=[];for(let f of i)o[f.id]=u.length<<1,u.push(p=>f.slot(p));let c=n?.config.facets;for(let f in a){let p=a[f],m=p[0].facet,g=c&&c[f]||[];if(p.every(_=>_.type==0))if(o[m.id]=A.length<<1|1,Cb(g,p))A.push(n.facet(m));else{let _=m.combine(p.map(b=>b.value));A.push(n&&m.compare(_,n.facet(m))?n.facet(m):_)}else{for(let _ of p)_.type==0?(o[_.id]=A.length<<1|1,A.push(_.value)):(o[_.id]=u.length<<1,u.push(b=>_.dynamicSlot(b)));o[m.id]=u.length<<1,u.push(_=>VP(_,m,p))}}let d=u.map(f=>f(o));return new JA(e,s,d,o,A,a)}}function WP(t,e,r){let n=[[],[],[],[],[]],i=new Map;function a(s,o){let A=i.get(s);if(A!=null){if(A<=o)return;let u=n[A].indexOf(s);u>-1&&n[A].splice(u,1),s instanceof K1&&r.delete(s.compartment)}if(i.set(s,o),Array.isArray(s))for(let u of s)a(u,o);else if(s instanceof K1){if(r.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;r.set(s.compartment,u),a(u,o)}else if(s instanceof d7)a(s.inner,s.prec);else if(s instanceof Zt)n[o].push(s),s.provides&&a(s.provides,o);else if(s instanceof TA)n[o].push(s),s.facet.extensions&&a(s.facet.extensions,Ji.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(u,o)}}return a(t,Ji.default),n.reduce((s,o)=>s.concat(o))}function ao(t,e){if(e&1)return 2;let r=e>>1,n=t.status[r];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;t.status[r]=4;let i=t.computeSlot(t,t.config.dynamicSlots[r]);return t.status[r]=2|i}function eu(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const f7=we.define(),Z1=we.define({combine:t=>t.some(e=>e),static:!0}),p7=we.define({combine:t=>t.length?t[0]:void 0,static:!0}),h7=we.define(),m7=we.define(),g7=we.define(),b7=we.define({combine:t=>t.length?t[0]:!1});class Kn{constructor(e,r){this.type=e,this.value=r}static define(){return new XP}}class XP{of(e){return new Kn(this,e)}}class QP{constructor(e){this.map=e}of(e){return new Xe(this,e)}}class Xe{constructor(e,r){this.type=e,this.value=r}map(e){let r=this.type.map(this.value,e);return r===void 0?void 0:r==this.value?this:new Xe(this.type,r)}is(e){return this.type==e}static define(e={}){return new QP(e.map||(r=>r))}static mapEffects(e,r){if(!e.length)return e;let n=[];for(let i of e){let a=i.map(r);a&&n.push(a)}return n}}Xe.reconfigure=Xe.define();Xe.appendConfig=Xe.define();class Bt{constructor(e,r,n,i,a,s){this.startState=e,this.changes=r,this.selection=n,this.effects=i,this.annotations=a,this.scrollIntoView=s,this._doc=null,this._state=null,n&&c7(n,r.newLength),a.some(o=>o.type==Bt.time)||(this.annotations=a.concat(Bt.time.of(Date.now())))}static create(e,r,n,i,a,s){return new Bt(e,r,n,i,a,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let r of this.annotations)if(r.type==e)return r.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let r=this.annotation(Bt.userEvent);return!!(r&&(r==e||r.length>e.length&&r.slice(0,e.length)==e&&r[e.length]=="."))}}Bt.time=Kn.define();Bt.userEvent=Kn.define();Bt.addToHistory=Kn.define();Bt.remote=Kn.define();function GP(t,e){let r=[];for(let n=0,i=0;;){let a,s;if(n<t.length&&(i==e.length||e[i]>=t[n]))a=t[n++],s=t[n++];else if(i<e.length)a=e[i++],s=e[i++];else return r;!r.length||r[r.length-1]<a?r.push(a,s):r[r.length-1]<s&&(r[r.length-1]=s)}}function x7(t,e,r){var n;let i,a,s;return r?(i=e.changes,a=Gt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),a=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(a):(n=t.selection)===null||n===void 0?void 0:n.map(i),effects:Xe.mapEffects(t.effects,i).concat(Xe.mapEffects(e.effects,a)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function $1(t,e,r){let n=e.selection,i=Xa(e.annotations);return e.userEvent&&(i=i.concat(Bt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Gt?e.changes:Gt.of(e.changes||[],r,t.facet(p7)),selection:n&&(n instanceof ue?n:ue.single(n.anchor,n.head)),effects:Xa(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function _7(t,e,r){let n=$1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(r=!1);for(let a=1;a<e.length;a++){e[a].filter===!1&&(r=!1);let s=!!e[a].sequential;n=x7(n,$1(t,e[a],s?n.changes.newLength:t.doc.length),s)}let i=Bt.create(t,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return KP(r?YP(i):i)}function YP(t){let e=t.startState,r=!0;for(let i of e.facet(h7)){let a=i(t);if(a===!1){r=!1;break}Array.isArray(a)&&(r=r===!0?a:GP(r,a))}if(r!==!0){let i,a;if(r===!1)a=t.changes.invertedDesc,i=Gt.empty(e.doc.length);else{let s=t.changes.filter(r);i=s.changes,a=s.filtered.mapDesc(s.changes).invertedDesc}t=Bt.create(e,i,t.selection&&t.selection.map(a),Xe.mapEffects(t.effects,a),t.annotations,t.scrollIntoView)}let n=e.facet(m7);for(let i=n.length-1;i>=0;i--){let a=n[i](t);a instanceof Bt?t=a:Array.isArray(a)&&a.length==1&&a[0]instanceof Bt?t=a[0]:t=_7(e,Xa(a),!1)}return t}function KP(t){let e=t.startState,r=e.facet(g7),n=t;for(let i=r.length-1;i>=0;i--){let a=r[i](t);a&&Object.keys(a).length&&(n=x7(n,$1(e,a,t.changes.newLength),!0))}return n==t?t:Bt.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}const ZP=[];function Xa(t){return t==null?ZP:Array.isArray(t)?t:[t]}var Ot=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Ot||(Ot={}));const $P=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let J1;try{J1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function JP(t){if(J1)return J1.test(t);for(let e=0;e<t.length;e++){let r=t[e];if(/\w/.test(r)||r>"€"&&(r.toUpperCase()!=r.toLowerCase()||$P.test(r)))return!0}return!1}function eL(t){return e=>{if(!/\S/.test(e))return Ot.Space;if(JP(e))return Ot.Word;for(let r=0;r<t.length;r++)if(e.indexOf(t[r])>-1)return Ot.Word;return Ot.Other}}class ot{constructor(e,r,n,i,a,s){this.config=e,this.doc=r,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=a,s&&(s._state=this);for(let o=0;o<this.config.dynamicSlots.length;o++)ao(this,o<<1);this.computeSlot=null}field(e,r=!0){let n=this.config.address[e.id];if(n==null){if(r)throw new RangeError("Field is not present in this state");return}return ao(this,n),eu(this,n)}update(...e){return _7(this,e,!0)}applyTransaction(e){let r=this.config,{base:n,compartments:i}=r;for(let o of e.effects)o.is(Ju.reconfigure)?(r&&(i=new Map,r.compartments.forEach((A,u)=>i.set(u,A)),r=null),i.set(o.value.compartment,o.value.extension)):o.is(Xe.reconfigure)?(r=null,n=o.value):o.is(Xe.appendConfig)&&(r=null,n=Xa(n).concat(o.value));let a;r?a=e.startState.values.slice():(r=JA.resolve(n,i,this),a=new ot(r,this.doc,this.selection,r.dynamicSlots.map(()=>null),(A,u)=>u.reconfigure(A,this),null).values);let s=e.startState.facet(Z1)?e.newSelection:e.newSelection.asSingle();new ot(r,e.newDoc,s,a,(o,A)=>A.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:e},range:ue.cursor(r.from+e.length)}))}changeByRange(e){let r=this.selection,n=e(r.ranges[0]),i=this.changes(n.changes),a=[n.range],s=Xa(n.effects);for(let o=1;o<r.ranges.length;o++){let A=e(r.ranges[o]),u=this.changes(A.changes),c=u.map(i);for(let f=0;f<o;f++)a[f]=a[f].map(c);let d=i.mapDesc(u,!0);a.push(A.range.map(d)),i=i.compose(c),s=Xe.mapEffects(s,c).concat(Xe.mapEffects(Xa(A.effects),d))}return{changes:i,selection:ue.create(a,r.mainIndex),effects:s}}changes(e=[]){return e instanceof Gt?e:Gt.of(e,this.doc.length,this.facet(ot.lineSeparator))}toText(e){return ut.of(e.split(this.facet(ot.lineSeparator)||X1))}sliceDoc(e=0,r=this.doc.length){return this.doc.sliceString(e,r,this.lineBreak)}facet(e){let r=this.config.address[e.id];return r==null?e.default:(ao(this,r),eu(this,r))}toJSON(e){let r={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof Zt&&this.config.address[i.id]!=null&&(r[n]=i.spec.toJSON(this.field(e[n]),this))}return r}static fromJSON(e,r={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let a in n)if(Object.prototype.hasOwnProperty.call(e,a)){let s=n[a],o=e[a];i.push(s.init(A=>s.spec.fromJSON(o,A)))}}return ot.create({doc:e.doc,selection:ue.fromJSON(e.selection),extensions:r.extensions?i.concat([r.extensions]):i})}static create(e={}){let r=JA.resolve(e.extensions||[],new Map),n=e.doc instanceof ut?e.doc:ut.of((e.doc||"").split(r.staticFacet(ot.lineSeparator)||X1)),i=e.selection?e.selection instanceof ue?e.selection:ue.single(e.selection.anchor,e.selection.head):ue.single(0);return c7(i,n.length),r.staticFacet(Z1)||(i=i.asSingle()),new ot(r,n,i,r.dynamicSlots.map(()=>null),(a,s)=>s.create(a),null)}get tabSize(){return this.facet(ot.tabSize)}get lineBreak(){return this.facet(ot.lineSeparator)||`