@rainbow-robotics/preview-host 0.11.2 → 0.11.4-dev.0
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/assets/AmrCapabilityControl.DmKtXdoo.js +1 -0
- package/dist/assets/{RbLocalizationProvider.Bjp-XasT.js → RbLocalizationProvider.CWhKAdXD.js} +1 -1
- package/dist/assets/{__federation_expose_App.BoAD7rmq.js → __federation_expose_App.CUrub2ol.js} +311 -321
- package/dist/assets/__federation_fn_import.DdkEuT6t.js +2 -2
- package/dist/assets/{cssMode.DvbQhRWp.js → cssMode.C5Zyww__.js} +1 -1
- package/dist/assets/{freemarker2.D4QgvvAA.js → freemarker2.ysOkqchO.js} +1 -1
- package/dist/assets/{handlebars.aNWQrcY9.js → handlebars.DdkDbjfW.js} +1 -1
- package/dist/assets/{html.De5DHXNR.js → html.CK06Y45j.js} +1 -1
- package/dist/assets/{htmlMode.LxOTVQQu.js → htmlMode.DO34bW4E.js} +1 -1
- package/dist/assets/index.BRGvomBZ.js +26 -0
- package/dist/assets/{index.lzV92Wx_.js → index.BdbaU625.js} +1 -1
- package/dist/assets/{index.DKZKIW-y.js → index.kyIuumb-.js} +1 -1
- package/dist/assets/{javascript.Cvwtihkn.js → javascript.Cugfg21W.js} +1 -1
- package/dist/assets/{jsonMode.DhyMqrQK.js → jsonMode.ckKFHWaI.js} +1 -1
- package/dist/assets/{liquid.BteD4Gob.js → liquid.k584rnbm.js} +1 -1
- package/dist/assets/{lspLanguageFeatures.B0QqnvEK.js → lspLanguageFeatures.Tshm-6XN.js} +1 -1
- package/dist/assets/{mdx.DswheUlM.js → mdx.DTf7uR5-.js} +1 -1
- package/dist/assets/{python.BoMGDtn_.js → python.DNZBF2xl.js} +1 -1
- package/dist/assets/{razor.D9ppbGyZ.js → razor.CR5Ji_Km.js} +1 -1
- package/dist/assets/remoteEntry.js +1 -1
- package/dist/assets/{tsMode.CI_2C2BP.js → tsMode.Qy3maEQ-.js} +1 -1
- package/dist/assets/{typescript.B-PscPZM.js → typescript.ByaBzX6p.js} +1 -1
- package/dist/assets/{useParsedPointCloudData.By3wmxd4.js → useParsedPointCloudData.DK254fdP.js} +141 -141
- package/dist/assets/{xml.BR2Tjm_U.js → xml.lKXo8JWz.js} +1 -1
- package/dist/assets/{yaml.CO5muCL7.js → yaml.B2kfcoc0.js} +1 -1
- package/dist/index.html +5 -5
- package/package.json +1 -1
- package/serve.mjs +20 -15
- package/dist/assets/AmrCapabilityControl.DHlClNfl.js +0 -1
- package/dist/assets/index.aaHIZMQG.js +0 -26
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as f}from"./__federation_fn_import.DdkEuT6t.js";import{co as u,H as r,j as a,X as S,U as p,x as b,c1 as o,bI as O,aW as E,a$ as P,V as M,bs as F,bF as _,_ as D,fT as w,gJ as L}from"./RbLocalizationProvider.CWhKAdXD.js";import{a as I}from"./index.kyIuumb-.js";const{useQuery:R}=await f("@tanstack/react-query"),C=[{key:"charge",endpoint:"/{robot_model}/capability/charge",labelKey:"move.amr.rightPanel.capability.charge"},{key:"io",endpoint:"/{robot_model}/capability/Io",labelKey:"move.amr.rightPanel.capability.io"},{key:"camera",endpoint:"/{robot_model}/capability/camera",labelKey:"move.amr.rightPanel.capability.camera"},{key:"lidar2d",endpoint:"/{robot_model}/capability/lidar2d",labelKey:"move.amr.rightPanel.capability.lidar2d"},{key:"lidar3d",endpoint:"/{robot_model}/capability/lidar3d",labelKey:"move.amr.rightPanel.capability.lidar3d"},{key:"imu",endpoint:"/{robot_model}/capability/imu",labelKey:"move.amr.rightPanel.capability.imu"},{key:"safetyBumper",endpoint:"/{robot_model}/capability/safetyBumper",labelKey:"move.amr.rightPanel.capability.safetyBumper"},{key:"safetyInterlock",endpoint:"/{robot_model}/capability/safetyInterlock",labelKey:"move.amr.rightPanel.capability.safetyInterlock"},{key:"safetyObstacle",endpoint:"/{robot_model}/capability/safetyObstacle",labelKey:"move.amr.rightPanel.capability.safetyObstacle"},{key:"safetyOperationStop",endpoint:"/{robot_model}/capability/safetyOperationStop",labelKey:"move.amr.rightPanel.capability.safetyOperationStop"},{key:"safetySpeedControl",endpoint:"/{robot_model}/capability/safetySpeedControl",labelKey:"move.amr.rightPanel.capability.safetySpeedControl"},{key:"bms",endpoint:"/{robot_model}/capability/bms",labelKey:"move.amr.rightPanel.capability.bms"}],K=e=>typeof e=="object"&&e!==null&&"enabled"in e&&e.enabled===!1,V=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"message"in e){const t=e.message;if(typeof t=="string")return t}},$=async({robot_model:e})=>{const t=await Promise.allSettled(C.map(l=>{const s=l.endpoint.replace("{robot_model}",e);return I.get(s,{skipErrorToast:!0})}));return C.map((l,s)=>{const n=t[s];return n.status==="fulfilled"?{...l,supported:!K(n.value),data:n.value}:{...l,supported:!1,data:null,errorMessage:V(n.reason)}})},U=({robot_model:e,enabled:t=!0})=>R({queryKey:["amrCapabilities",e],queryFn:()=>$({robot_model:e}),enabled:!!e&&t,staleTime:5*1e3,gcTime:60*1e3}),{useMutation:q}=await f("@tanstack/react-query"),j=()=>q({mutationFn:({robot_model:e,target:t,frequency:l})=>I.post(`/${e}/control/streamFrequency`,{target:t,frequency:Math.min(10,Math.max(0,l))})}),{useState:k}=await f("react"),z=4294967295,x=e=>{if(!(e==null||e===z))return`${e} ms`},G={0:"NONE",1:"CHARGING",2:"COMPLETE",3:"FAIL",4:"CANCEL"},T={0:"NONE",1:"PDU_BMS",2:"USB_BMS"},Y={0:"CABLE",1:"CONTACT",2:"INDUCTIVE"},H={0:"RPLIDAR",1:"SICK",2:"LAKI",3:"LIVOX",4:"HOKUYO"},X={0:"ORBBEC"},c=({label:e,children:t})=>r(p,{className:"items-center justify-between gap-3",children:[a("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:e}),a("span",{className:b("typo-compact-xs-normal text-right",t!=null?"text-fg-default":"text-fg-subtler"),children:t??"—"})]}),Q={default:"gray",success:"green",warning:"orange",danger:"red"},g=({label:e,variant:t="default"})=>a(D,{type:"soft",color:Q[t],children:e}),h=({label:e,value:t})=>a(c,{label:e,children:a(g,{label:t?"ON":"OFF",variant:t?"success":"default"})}),y=({label:e,bits:t})=>r(o,{className:"gap-1",children:[a("span",{className:"typo-compact-xs-normal text-fg-subtle",children:e}),t?.length?a(p,{className:"gap-1",children:t.map((l,s)=>a("div",{className:b("size-4 rounded-sm border text-center leading-4",l?"border-fg-success bg-fill-success-subtlest":"border-border-subtler bg-fill-disabled"),children:a("span",{className:b("typo-compact-2xs-normal",l?"text-fg-success":"text-fg-subtler"),children:s})},s))}):a("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]}),N=({label:e,connection:t,rows:l,children:s})=>{const{t:n}=u();return r(o,{className:"bg-fill-disabled gap-1.5 rounded-md p-2.5",children:[r(p,{className:"items-center justify-between gap-3",children:[a("span",{className:"typo-compact-xs-semibold text-fg-default min-w-0 break-words",children:e}),a("span",{className:b("typo-compact-2xs-medium shrink-0",t?"text-fg-success":"text-fg-subtler"),children:n(t?"settings.amr.frs.status.connected":"settings.amr.frs.status.disconnected")})]}),l.map(({key:i,value:m})=>a(c,{label:i,children:m},i)),s]})},J=({label:e,value:t})=>a(D,{type:"soft",color:t?"green":"gray",children:r(p,{className:"items-center gap-1",children:[t?a(w,{className:"size-3"}):a(L,{className:"size-3"}),a("span",{children:e}),a("span",{className:"font-semibold",children:t?"On":"Off"})]})}),B=({flags:e})=>a(p,{className:"flex-wrap gap-1.5",children:e.map(({label:t,value:l})=>a(J,{label:t,value:l},t))}),W=({streams:e})=>e.length?r(o,{className:"border-subtle mt-0.5 gap-1 border-t pt-1.5",children:[a("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Streams"}),a(p,{className:"flex-wrap gap-1",children:e.map(t=>r(p,{className:"border-subtle bg-alt-1 items-center gap-1 rounded px-1.5 py-1",children:[a("span",{className:"typo-compact-2xs-semibold text-fg-default",children:t.quality}),r("span",{className:"typo-compact-2xs-normal text-fg-subtle",children:[t.width,"x",t.height]}),r("span",{className:"typo-compact-2xs-normal text-fg-subtler",children:[t.fps,"fps"]})]},`${t.camId}-${t.quality}`))})]}):null,Z=({data:e})=>{const t=e.chargeState==null?"—":G[e.chargeState]??String(e.chargeState),l=e.chargeState===1?"success":e.chargeState===3?"danger":e.chargeState===4?"warning":"default";return r(o,{className:"gap-2",children:[r(o,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[a(h,{label:"Dock State",value:e.dockState}),a(c,{label:"Charge State",children:a(g,{label:t,variant:l})}),r(c,{label:"Battery",children:[e.batteryPercent?.toFixed(1)," %"]}),r(c,{label:"Charge Current",children:[e.chargeCurrent?.toFixed(2)," A"]}),r(c,{label:"Contact Voltage",children:[e.contactVoltage?.toFixed(2)," V"]}),a(c,{label:"Battery Source",children:a(g,{label:e.batteryType==null?"—":T[e.batteryType]??String(e.batteryType)})})]}),r(p,{className:"items-center gap-1.5 px-0.5",children:[a("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:"Charge Type"}),e.chargeType?.length?a(p,{className:"flex-wrap gap-1.5",children:e.chargeType.map(s=>a(g,{label:Y[s]??String(s),variant:"default"},s))}):a("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]})]})},ee=({data:e})=>r(o,{className:"gap-3 p-0.5",children:[a(y,{label:"MCU0 DIO",bits:e.mcu0Dio}),a(y,{label:"MCU1 DIO",bits:e.mcu1Dio}),a(y,{label:"MCU0 DIN",bits:e.mcu0Din}),a(y,{label:"MCU1 DIN",bits:e.mcu1Din})]}),ae=({data:e})=>r(o,{className:"gap-2",children:[a(B,{flags:[{label:"Obstacle",value:e.enabledObs},{label:"Depth",value:e.enabledDepth},{label:"Filter",value:e.enabledFilter}]}),e.info?.length?e.info.map((t,l)=>{const s=typeof t.type=="number"?X[t.type]??String(t.type):t.type??"—",n=t.camId??t.index??l,i=e.rtspInfo?.filter(m=>m.camId===n)??[];return a(N,{label:`Camera ${n}${t.serial?` · ${t.serial}`:""}`,connection:t.connection,rows:[{key:"Type",value:s},{key:"TF",value:t.tf?.length?t.tf.map(m=>m.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(t.dataAgeMs)}],children:a(W,{streams:i})},l)}):a("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),A=({data:e,is3d:t=!1})=>r(o,{className:"gap-2",children:[a(B,{flags:[{label:"Obstacle",value:e.enabledObs}]}),e.info?.length?e.info.map((l,s)=>a(N,{label:`Lidar ${l.index??s}${l.serial?` · ${l.serial}`:""}`,connection:l.connection,rows:[{key:"Type",value:H[l.type]??String(l.type??"—")},...t?[]:[{key:"IP",value:l.ip}],{key:"Safety",value:l.safety!==void 0?l.safety?"Safety":"Normal":void 0},{key:"TF",value:l.tf?.length?l.tf.map(n=>n.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(l.dataAgeMs)}]},s)):a("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),te=({data:e})=>a(o,{className:"gap-2",children:e.info?.length?e.info.map((t,l)=>a(N,{label:`IMU ${t.index??l}${t.serial?` · ${t.serial}`:""}`,connection:t.connection,rows:[{key:"Type",value:t.type===1?"IMU":"DEFAULT"},{key:"Data Age",value:x(t.dataAgeMs)}]},l)):a("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})}),le=({data:e})=>{const t=[{label:"Bumper State",value:e.bumperState},{label:"Interlock State",value:e.interlockState},{label:"Obstacle Detect",value:e.obsDetect},{label:"Operation Stop",value:e.operationStopState},{label:"Speed Control",value:e.speedControlState}].filter(l=>l.value!==void 0);return r(o,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[a(h,{label:"Enabled",value:e.enabled}),t.map(l=>a(h,{label:l.label,value:l.value},l.label))]})},se=({data:e})=>{const{t}=u(),l=n=>t(`move.amr.rightPanel.capability.field.bms.${n}`),s=(n,i,m)=>n==null?void 0:`${n.toFixed(m)} ${i}`;return r(o,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[a(c,{label:l("source"),children:e.source==null?void 0:T[e.source]??String(e.source)}),a(c,{label:l("soc"),children:s(e.soc,"%",1)}),a(c,{label:l("voltage"),children:s(e.voltage,"V",2)}),a(c,{label:l("current"),children:s(e.current,"A",2)}),a(c,{label:l("temperature"),children:s(e.temperature,"°C",1)}),a(c,{label:l("soh"),children:e.soh==null||e.soh<0?void 0:s(e.soh,"%",1)}),a(c,{label:l("cellVMax"),children:s(e.cellVMax,"V",3)}),a(c,{label:l("cellVMin"),children:s(e.cellVMin,"V",3)}),a(c,{label:l("linkLost"),children:e.linkLost==null?void 0:t(e.linkLost?"move.amr.rightPanel.capability.field.bms.linkLostTrue":"move.amr.rightPanel.capability.field.bms.linkLostFalse")})]})},re=({capKey:e,data:t})=>{switch(e){case"charge":return a(Z,{data:t});case"io":return a(ee,{data:t});case"camera":return a(ae,{data:t});case"lidar2d":return a(A,{data:t});case"lidar3d":return a(A,{data:t,is3d:!0});case"imu":return a(te,{data:t});case"bms":return a(se,{data:t});default:return a(le,{data:t})}},ne=[{label:"LiDAR 2D",value:"lidar2d"},{label:"LiDAR 3D",value:"lidar3d"},{label:"OBS Map",value:"obsMap"}],ce=({robotModel:e})=>{const[t,l]=k("lidar2d"),[s,n]=k("1"),{mutate:i,isPending:m}=j();return r(o,{className:"gap-2 pb-1",children:[r(p,{className:"items-center justify-between gap-2",children:[a("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Target"}),a(P,{size:"2xs",variant:"brand",disabled:m,onClick:()=>{const d=Math.min(10,Math.max(0,Number(s)));i({robot_model:e,target:t,frequency:d})},children:"Set"})]}),a(F,{size:"sm",value:t,handleChange:d=>l(d),children:ne.map(({label:d,value:v})=>a(M,{value:v,children:d},v))}),a(p,{className:"items-center gap-2",children:a(_,{className:"flex-1",size:"sm",value:s,step:1,digit:0,fixedDigit:0,min:"0",max:"10",handleChange:d=>n(d)})})]})},ie=({item:e})=>{const{t}=u();return e.supported?e.data?a("div",{className:"pb-1",children:a(re,{capKey:e.key,data:e.data})}):null:a("p",{className:"typo-compact-xs-normal text-fg-disabled px-1 py-2",children:t("move.amr.rightPanel.capability.status.notSupported")})},oe=()=>{const{t:e}=u();return a(E,{className:"flex-1 [&_[data-slot='empty-view-section']]:h-full",type:"icon",icon:a(O,{size:20}),message:e("move.amr.rightPanel.capability.status.loading")})},ue=({className:e,robotModel:t})=>{const{t:l}=u(),{data:s,isLoading:n}=U({robot_model:t});return r(o,{className:b("AmrCapabilityControl h-full min-h-0",e),children:[n&&a(oe,{}),(s??[]).map(i=>a("div",{className:"border-subtler border-b px-1 py-1",children:a(S,{disabled:!i.supported,title:a(p,{className:"w-full items-center justify-between gap-2",children:a("span",{className:b("typo-compact-sm2-semibold min-w-0 truncate",i.supported?"text-fg-default":"text-fg-disabled"),children:l(i.labelKey)})}),children:a(ie,{item:i})})},i.key)),a("div",{className:"border-subtler border-b px-1 py-1",children:a(S,{title:a("span",{className:"typo-compact-sm2-semibold text-fg-default",children:l("move.amr.rightPanel.capability.streamFrequency")}),children:a(ce,{robotModel:t})})})]})};export{ue as default};
|
package/dist/assets/{RbLocalizationProvider.Bjp-XasT.js → RbLocalizationProvider.CWhKAdXD.js}
RENAMED
|
@@ -313,4 +313,4 @@ Minimum version required to store current data is: `+z+`.
|
|
|
313
313
|
top ${r}ms ease,
|
|
314
314
|
bottom ${r}ms ease,
|
|
315
315
|
max-height ${r}ms ease
|
|
316
|
-
`},children:[B&&le,te("div",{"data-comp":"ToastStackContent",style:fe,children:[!q&&h(D6,{label:a,visible:re,animationDuration:r,className:"absolute",style:{...ee,[B?"bottom":"top"]:ie},onClick:()=>Li.closeAll(D)}),i[D]?.map((be,we)=>h(j0e,{...be,toastOrder:we+1,toastCount:i[D]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:u[D],isStackExpanded:f[D],isWrapperExpandedForLayout:F,isWrapperScrollable:w[D],requestStackExpand:N,onStackMouseEnter:L,onStackMouseLeave:A},be.id))]}),!B&&le]},D)})})},{useEffect:K0e,useMemo:q2,useRef:B6,useState:z6}=await U("react"),$_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=B6(null),x=B6(null),[C,M]=z6(!1),[P,O]=z6(!1),L=!!s,A=(f??0)>=3&&!m&&!v,N=A,z=q2(()=>I0e(n,r),[n,r]),j=q2(()=>D0e(d,C),[d,C]),D=q2(()=>{switch(r){case"copy":return h(L8,{});case"danger":return h($8,{});case"warning":case"caution":return h(q8,{});case"success":return n==="basic"?h(M0e,{}):h(Hs,{});default:return null}},[n,r]),T=i??D,F=L?O0e(n,r):null,B=L&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},$=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:re,startY:Q}=x.current,{clientX:ne,clientY:ie}=Y;x.current.deltaX=ne-re,x.current.deltaY=ie-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},q=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const re=Y.currentTarget;if(re.style.transitionProperty="",re.hasPointerCapture?.(Y.pointerId)&&re.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:ne=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:ne;if(Q===0&&ne===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?re.style.top="0px":d==="bottom-center"?re.style.bottom="0px":d.includes("left")?re.style.left="0px":d.includes("right")&&(re.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return K0e(()=>{M(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:oe($0e({open:C,hidden:!1,stacked:!1,motion:j}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:$,onPointerUp:q,onPointerLeave:q,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:oe(T0e({type:n,variant:r,hasAction:L,stacked:N,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Gl,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:oe($6(),B&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:oe($6(),"min-w-0 flex-1"),children:[T?h("span",{className:N0e({type:n,tone:z,variant:r}),children:T}):null,te(Gl,{className:oe(P0e(),"w-full"),children:[o?h("div",{className:oe(A0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:oe(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),F&&B?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:F.size,variant:F.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),F&&!B?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:F.size,variant:F.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:X0e}=await U("react"),D_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=Sue(),{theme:a}=hf();return X0e(()=>{o&&n(o)},[o,n]),te(Wh,{className:oe("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Wx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var U2={};const It=t=>typeof t=="string",$d=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},F6=t=>t==null?"":""+t,Z0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Q0e=/###/g,V6=t=>t&&t.indexOf("###")>-1?t.replace(Q0e,"."):t,j6=t=>!t||It(t),Xd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(j6(t))return{};const a=V6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return j6(t)?{}:{obj:t,k:V6(r[o])}},H6=(t,e,n)=>{const{obj:r,k:o}=Xd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Xd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Xd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},J0e=(t,e,n,r)=>{const{obj:o,k:a}=Xd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},G0=(t,e)=>{const{obj:n,k:r}=Xd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ehe=(t,e,n)=>{const r=G0(t,n);return r!==void 0?r:G0(e,n)},bR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):bR(t[r],e[r],n):t[r]=e[r]);return t},kl=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var the={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const nhe=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>the[e]):t;class rhe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const ohe=[" ",",","?","!",";"],ahe=new rhe(20),ihe=(t,e,n)=>{e=e||"",n=n||"";const r=ohe.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=ahe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},tw=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},ff=t=>t?.replace(/_/g,"-"),she={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class K0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||she,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new K0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new K0(this.logger,e)}}var Ja=new K0;class qh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class W6 extends qh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=G0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:tw(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),H6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=G0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?bR(l,r,a):l={...l,...r},H6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var yR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const _R=Symbol("i18next/PATH_KEY");function lhe(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===_R?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function fu(t,e){const{[_R]:n}=t(lhe()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const q6={},Y2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class X0 extends qh{constructor(e,n={}){super(),Z0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=Y2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ihe(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=fu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(D=>typeof D=="function"?fu(D,{...this.options,...o}):String(D));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),M=X0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",L=C&&!o.ordinal&&o.count===0,A=L&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let N=g;x&&!g&&M&&(N=A);const z=Y2(N),j=Object.prototype.toString.apply(N);if(x&&N&&z&&_.indexOf(j)<0&&!(It(S)&&Array.isArray(N))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,N,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=D,v.usedParams=this.getUsedParamsDetails(o),v):D}if(i){const D=Array.isArray(N),T=D?[]:{},F=D?y:w;for(const B in N)if(Object.prototype.hasOwnProperty.call(N,B)){const I=`${F}${i}${B}`;M&&!g?T[B]=this.translate(I,{...o,defaultValue:Y2(A)?A[B]:void 0,joinArrays:!1,ns:l}):T[B]=this.translate(I,{...o,joinArrays:!1,ns:l}),T[B]===I&&(T[B]=N[B])}g=T}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let D=!1,T=!1;!this.isValidLookup(g)&&M&&(D=!0,g=A),this.isValidLookup(g)||(T=!0,g=s);const B=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:g,I=M&&A!==g&&this.options.updateMissing;if(T||D||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const re=this.resolve(s,{...o,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let re=0;re<q.length;re++)$.push(q[re]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(o.lng||this.language):$.push(o.lng||this.language);const Y=(re,Q,ne)=>{const ie=M&&ne!==g?ne:B;this.options.missingKeyHandler?this.options.missingKeyHandler(re,u,Q,ie,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(re,u,Q,ie,I,o),this.emit("missingKey",re,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?$.forEach(re=>{const Q=this.pluralResolver.getSuffixes(re,o);L&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(ne=>{Y([re],s+ne,o[`defaultValue${ne}`]||A)})}):Y($,s,A))}g=this.extendTranslation(g,e,o,v,r),T&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(T||D)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,D?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=yR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?fu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!q6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(q6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const M=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+M)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+M))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class U6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=ff(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ff(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const Y6={zero:0,one:1,two:2,few:3,many:4,other:5},G6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class che{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=ff(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),G6;if(!e.match(/-|_/))return G6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>Y6[o]-Y6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const K6=(t,e,n,r=".",o=!0)=>{let a=ehe(t,e,n);return!a&&o&&It(n)&&(a=tw(t,n,r),a===void 0&&(a=tw(e,n,r))),a},G2=t=>t.replace(/\$/g,"$$$$");class X6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:nhe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?kl(a):i||"{{",this.suffix=s?kl(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?kl(m):v||kl("$t("),this.nestingSuffix=g?kl(g):w||kl(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=K6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(K6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>G2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?G2(this.escape(v)):G2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=F6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${kl(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=F6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const uhe=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Z6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(ff(r),o),e[i]=s),s(n)}},dhe=t=>(e,n,r)=>t(ff(n),r)(e);class fhe{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Z6:dhe;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Z6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=uhe(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const phe=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class hhe extends qh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{J0e(l.loaded,[a],i),phe(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const K2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Q6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),N1=()=>{},mhe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},xR="__i18next_supportNoticeShown",ghe=()=>!!(typeof globalThis<"u"&&globalThis[xR]||typeof process<"u"&&U2&&U2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&U2),vhe=()=>{typeof globalThis<"u"&&(globalThis[xR]=!0)},whe=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Zd extends qh{constructor(e={},n){if(super(),this.options=Q6(e),this.services={},this.logger=Ja,this.modules={external:[]},mhe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=K2();this.options={...r,...this.options,...Q6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!whe(this)&&!ghe()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),vhe());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=fhe;const d=new U6(this.options);this.store=new W6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new che(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new X6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new hhe(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new X0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=N1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=$d(),l=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=N1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=$d();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=N1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&yR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=$d();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=fu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=fu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=fu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=$d();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=$d();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new U6(K2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Zd(e,n);return r.createInstance=Zd.createInstance,r}cloneInstance(e={},n=N1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Zd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new W6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...K2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new X6(u)}return a.translator=new X0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Nr=Zd.createInstance();Nr.createInstance;Nr.dir;Nr.init;Nr.loadResources;Nr.reloadResources;Nr.use;Nr.changeLanguage;Nr.getFixedT;Nr.t;Nr.exists;Nr.setDefaultNamespace;Nr.hasLoadedNamespace;Nr.loadNamespaces;Nr.loadLanguages;const bhe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,yhe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},_he=t=>yhe[t],xhe=t=>t.replace(bhe,_he);let J6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xhe,transDefaultProps:void 0};const She=(t={})=>{J6={...J6,...t}},Che={type:"3rdParty",init(t){She(t.options.react)}},{createContext:Ehe}=await U("react"),Mhe=Ehe(),{createElement:khe,useMemo:Rhe}=await U("react");function The({i18n:t,defaultNS:e,children:n}){const r=Rhe(()=>({i18n:t,defaultNS:e}),[t,e]);return khe(Mhe.Provider,{value:r},n)}const{createContext:Nhe,useContext:Phe}=await U("react");let Ahe=(t=>String(t));const Ihe=t=>{Ahe=t.t.bind(t)},SR=Nhe(null),B_e=()=>{const t=Phe(SR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:Ohe,useEffect:Lhe,useMemo:$he,useState:X2}=await U("react"),z_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=X2(null),[l,u]=X2(!1),[d,f]=X2(localStorage.getItem(`${e}_Language`)||r);Lhe(()=>{(async()=>{try{const g=a?Nr.createInstance():Nr;await g.use(Che).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),Ihe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=Ohe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=$he(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(iR,{size:"3rem",className:"text-fg-default"})}):h(SR.Provider,{value:v,children:h(The,{i18n:i,children:t})})};export{Xhe as $,xH as A,Xee as B,SH as C,hw as D,rn as E,mw as F,me as G,te as H,aY as I,fg as J,pg as K,AZ as L,oY as M,nY as N,Cf as O,To as P,lme as Q,D7 as R,qi as S,IZ as T,Yo as U,Kv as V,d6 as W,kz as X,eme as Y,xfe as Z,Sbe as _,sd as a,Wr as a$,Mbe as a0,Pbe as a1,Ibe as a2,Nbe as a3,Obe as a4,kbe as a5,Rbe as a6,Abe as a7,Tbe as a8,iw as a9,afe as aA,rfe as aB,nfe as aC,efe as aD,Jde as aE,ofe as aF,mbe as aG,Lbe as aH,Wbe as aI,jbe as aJ,Dbe as aK,Hbe as aL,Ube as aM,j1e as aN,zbe as aO,qbe as aP,Ybe as aQ,Gbe as aR,Bbe as aS,Vbe as aT,Fbe as aU,$be as aV,S6 as aW,x8 as aX,Qhe as aY,Jhe as aZ,Cbe as a_,hz as aa,uz as ab,oR as ac,mpe as ad,aR as ae,wpe as af,Cfe as ag,dbe as ah,Vk as ai,Wk as aj,qk as ak,Dde as al,hbe as am,zde as an,f0 as ao,Vde as ap,Fde as aq,Qk as ar,Bde as as,d0 as at,pbe as au,Lz as av,Qde as aw,vbe as ax,gbe as ay,tfe as az,wg as b,hye as b$,Kbe as b0,oye as b1,nye as b2,Zbe as b3,rye as b4,iye as b5,Xbe as b6,Qbe as b7,Jbe as b8,aye as b9,vfe as bA,mfe as bB,hfe as bC,bfe as bD,wbe as bE,Ffe as bF,$_e as bG,dye as bH,iR as bI,ide as bJ,fye as bK,upe as bL,rR as bM,xbe as bN,Bpe as bO,mye as bP,wye as bQ,gye as bR,vye as bS,sR as bT,zpe as bU,kF as bV,Rfe as bW,Mfe as bX,fw as bY,kfe as bZ,pye as b_,sye as ba,uye as bb,eye as bc,cye as bd,lye as be,tye as bf,Wh as bg,a1e as bh,B3 as bi,ybe as bj,Nfe as bk,D_e as bl,Jk as bm,Qfe as bn,fbe as bo,bye as bp,_ye as bq,yye as br,Xv as bs,Hk as bt,Xk as bu,pfe as bv,bbe as bw,gfe as bx,yfe as by,wfe as bz,uh as c,XB as c$,Ebe as c0,Gl as c1,vz as c2,Fpe as c3,Khe as c4,M1e as c5,F$ as c6,dz as c7,oz as c8,_be as c9,Q8 as cA,qE as cB,Eve as cC,Hr as cD,qD as cE,Whe as cF,Yve as cG,N3 as cH,qhe as cI,fB as cJ,Uhe as cK,UD as cL,Vhe as cM,zl as cN,Xve as cO,xo as cP,kB as cQ,jf as cR,lD as cS,uD as cT,If as cU,JD as cV,QD as cW,JB as cX,KB as cY,QB as cZ,ZB as c_,Tz as ca,qpe as cb,bde as cc,f$ as cd,mz as ce,_8 as cf,Vfe as cg,Pue as ch,Ofe as ci,Jfe as cj,xF as ck,Yz as cl,Qn as cm,hf as cn,B_e as co,ime as cp,Ph as cq,twe as cr,D3 as cs,ewe as ct,cve as cu,Li as cv,Wo as cw,jte as cx,ya as cy,kn as cz,ld as d,Oye as d$,GB as d0,tU as d1,rc as d2,Yhe as d3,kr as d4,cw as d5,Q0 as d6,gge as d7,jD as d8,HD as d9,Wye as dA,b_e as dB,Uye as dC,M_e as dD,m_e as dE,Lye as dF,E_e as dG,qye as dH,Pye as dI,Jye as dJ,t_e as dK,e_e as dL,n_e as dM,r_e as dN,l_e as dO,s_e as dP,i_e as dQ,Hye as dR,Qye as dS,Aye as dT,p_e as dU,g_e as dV,__e as dW,R_e as dX,Rye as dY,Iye as dZ,Bye as d_,Zhe as da,zB as db,ame as dc,Ege as dd,Mge as de,kge as df,Jq as dg,oD as dh,iD as di,Cye as dj,Wx as dk,xye as dl,Sye as dm,Eye as dn,k_e as dp,y_e as dq,Mye as dr,x_e as ds,u_e as dt,c_e as du,w_e as dv,Dye as dw,Zye as dx,f_e as dy,Tye as dz,kG as e,z8 as e$,kye as e0,S_e as e1,jye as e2,T_e as e3,h_e as e4,zye as e5,a_e as e6,d_e as e7,C_e as e8,Fye as e9,I8 as eA,A8 as eB,V8 as eC,pf as eD,ome as eE,ube as eF,DD as eG,k8 as eH,B8 as eI,WB as eJ,TB as eK,mB as eL,sS as eM,CB as eN,tB as eO,M8 as eP,tz as eQ,Gme as eR,O2e as eS,rw as eT,qve as eU,aB as eV,nB as eW,BB as eX,DB as eY,Z0 as eZ,vue as e_,Vye as ea,Yye as eb,Xye as ec,Kye as ed,Gye as ee,$ye as ef,o_e as eg,v_e as eh,Nye as ei,Ahe as ej,Gn as ek,L8 as el,cF as em,rme as en,WD as eo,q8 as ep,pD as eq,pB as er,gB as es,w3 as et,mM as eu,Uoe as ev,PD as ew,fD as ex,IB as ey,kD as ez,Ws as f,VB as f$,zD as f0,$B as f1,iB as f2,_7 as f3,x7 as f4,C7 as f5,S7 as f6,b7 as f7,Ih as f8,J$ as f9,Kse as fA,pk as fB,eh as fC,hse as fD,OB as fE,S8 as fF,hme as fG,GD as fH,eD as fI,tD as fJ,SD as fK,MB as fL,sD as fM,rD as fN,TD as fO,VD as fP,BD as fQ,LD as fR,Hs as fS,J0 as fT,dB as fU,RD as fV,ED as fW,Cve as fX,Vve as fY,pC as fZ,lw as f_,PB as fa,NB as fb,dD as fc,sB as fd,_B as fe,ZD as ff,RB as fg,KD as fh,XD as fi,hB as fj,vB as fk,LB as fl,AB as fm,nD as fn,F8 as fo,yD as fp,P8 as fq,gte as fr,jhe as fs,Sue as ft,$8 as fu,Zve as fv,yge as fw,Xl as fx,Hhe as fy,Sve as fz,qo as g,bge as g0,nme as g1,WO as g2,Mve as g3,Ghe as g4,bV as g5,wV as g6,vge as g7,age as g8,l3e as g9,FD as gA,gD as gB,Gve as gC,tte as gD,ete as gE,yle as gF,HB as gG,ND as gH,Eu as gI,xD as gJ,Ff as gK,Nge as ga,wge as gb,_ge as gc,Nl as gd,Qee as ge,z_e as gf,Jve as gg,L_e as gh,tme as gi,lB as gj,$D as gk,SB as gl,MD as gm,wB as gn,ID as go,wD as gp,oc as gq,wM as gr,mge as gs,qte as gt,hge as gu,Vte as gv,Mr as gw,Rte as gx,x3 as gy,WE as gz,Ew as h,ln as i,h as j,Wt as k,it as l,R7 as m,W7 as n,Mw as o,Go as p,s7 as q,CH as r,e7 as s,xf as t,Ko as u,Sf as v,Ef as w,oe as x,PZ as y,OZ as z};
|
|
316
|
+
`},children:[B&&le,te("div",{"data-comp":"ToastStackContent",style:fe,children:[!q&&h(D6,{label:a,visible:re,animationDuration:r,className:"absolute",style:{...ee,[B?"bottom":"top"]:ie},onClick:()=>Li.closeAll(D)}),i[D]?.map((be,we)=>h(j0e,{...be,toastOrder:we+1,toastCount:i[D]?.length??0,component:o,animationDuration:r,isWrapperMouseOver:u[D],isStackExpanded:f[D],isWrapperExpandedForLayout:F,isWrapperScrollable:w[D],requestStackExpand:N,onStackMouseEnter:L,onStackMouseLeave:A},be.id))]}),!B&&le]},D)})})},{useEffect:K0e,useMemo:q2,useRef:B6,useState:z6}=await U("react"),$_e=({className:t,open:e,type:n="basic",variant:r="default",title:o,content:a,icon:i,actionLabel:s,handleActionClick:l,closeOnActionClick:u=!0,position:d,toastCount:f,isWrapperMouseOver:m,isStackExpanded:v,pauseTimer:g,resumeTimer:w,requestStackExpand:y,closeToast:_})=>{const S=B6(null),x=B6(null),[C,M]=z6(!1),[P,O]=z6(!1),L=!!s,A=(f??0)>=3&&!m&&!v,N=A,z=q2(()=>I0e(n,r),[n,r]),j=q2(()=>D0e(d,C),[d,C]),D=q2(()=>{switch(r){case"copy":return h(L8,{});case"danger":return h($8,{});case"warning":case"caution":return h(q8,{});case"success":return n==="basic"?h(M0e,{}):h(Hs,{});default:return null}},[n,r]),T=i??D,F=L?O0e(n,r):null,B=L&&!!o!=!!a,I=Y=>{Y.button!==2&&(Y.stopPropagation(),Y.preventDefault(),Y.currentTarget.setPointerCapture?.(Y.pointerId),S.current=Y.pointerId,x.current={startX:Y.clientX,startY:Y.clientY},g())},$=Y=>{if(!x.current||S.current!==Y.pointerId)return;Y.stopPropagation(),Y.preventDefault();const{startX:re,startY:Q}=x.current,{clientX:ne,clientY:ie}=Y;x.current.deltaX=ne-re,x.current.deltaY=ie-Q;const ee=Y.currentTarget;ee.style.transitionProperty="translate",O(!0),d==="top-center"?x.current.deltaY<0?ee.style.top=`${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d==="bottom-center"?x.current.deltaY>0?ee.style.bottom=`-${x.current.deltaY}px`:(x.current=null,ee.hasPointerCapture?.(Y.pointerId)&&ee.releasePointerCapture(Y.pointerId)):d.includes("left")?ee.style.left=`${x.current.deltaX}px`:d.includes("right")&&(ee.style.right=`-${x.current.deltaX}px`)},q=Y=>{if(Y.stopPropagation(),Y.preventDefault(),S.current!==Y.pointerId)return;const re=Y.currentTarget;if(re.style.transitionProperty="",re.hasPointerCapture?.(Y.pointerId)&&re.releasePointerCapture(Y.pointerId),!x.current){O(!1),S.current=null,w();return}const{deltaX:Q=0,deltaY:ne=0}=x.current,ee=d.includes("left")||d.includes("right")?Q:ne;if(Q===0&&ne===0){if((f??0)>=3&&!v){y?.(),O(!1),S.current=null,x.current=null,w();return}_();return}Math.abs(ee)>15?_():d==="top-center"?re.style.top="0px":d==="bottom-center"?re.style.bottom="0px":d.includes("left")?re.style.left="0px":d.includes("right")&&(re.style.right="0px"),O(!1),S.current=null,x.current=null,w()};return K0e(()=>{M(e)},[e]),h("div",{"data-comp":"RBSimpleToast",className:oe($0e({open:C,hidden:!1,stacked:!1,motion:j}),!C&&"pointer-events-none",t),onPointerDown:I,onPointerMove:$,onPointerUp:q,onPointerLeave:q,onContextMenu:Y=>Y.preventDefault(),children:h("div",{className:oe(T0e({type:n,variant:r,hasAction:L,stacked:N,active:P})),style:P?{boxShadow:"none"}:void 0,onTouchEnd:()=>O(!1),children:te(Gl,{className:"w-full items-stretch gap-3",children:[te(Yo,{alignItems:"flex-start",className:oe($6(),B&&"w-full justify-between gap-3"),children:[te(Yo,{alignItems:"flex-start",className:oe($6(),"min-w-0 flex-1"),children:[T?h("span",{className:N0e({type:n,tone:z,variant:r}),children:T}):null,te(Gl,{className:oe(P0e(),"w-full"),children:[o?h("div",{className:oe(A0e(),A?"truncate":"wrap-break-word whitespace-pre-line"),children:o}):null,a?h("div",{className:oe(A?"truncate":"wrap-break-word whitespace-pre-line"),children:a}):null]})]}),F&&B?h("span",{className:"shrink-0",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:F.size,variant:F.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]}),F&&!B?h("span",{className:"inline-flex w-full justify-end",onPointerDown:Y=>Y.stopPropagation(),onPointerUp:Y=>Y.stopPropagation(),onClick:Y=>Y.stopPropagation(),children:h(Wr,{size:F.size,variant:F.variant,onClick:()=>{l?.(),u&&_?.()},children:s})}):null]})})})},{useEffect:X0e}=await U("react"),D_e=({className:t,open:e,resolve:n,onOpenChange:r})=>{const{barCodeValue:o}=Sue(),{theme:a}=hf();return X0e(()=>{o&&n(o)},[o,n]),te(Wh,{className:oe("RBQrBarCodeGuideModal","max-h-full w-fit",t),open:e,header:{title:"QR 코드 스캔 가이드"},onOpenChange:r,children:[te("div",{className:"text-fg-default text-body-sm-normal mt-[1.5rem] mb-[1rem] text-center leading-[1.5]",children:["바코드 USB를 로봇에 연결 후",h("br",{}),"로봇 명판에 QR 코드를 찍어주세요"]}),h("div",{className:"mx-auto w-[30rem] p-5",children:h("img",{src:Wx(a==="dark"?"/qr-bar-code-guide-dark-img.png":"/qr-bar-code-guide-img.webp"),alt:"qr-bar-code-guide",className:"w-full object-cover"})})]})};var U2={};const It=t=>typeof t=="string",$d=()=>{let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n},F6=t=>t==null?"":""+t,Z0e=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Q0e=/###/g,V6=t=>t&&t.indexOf("###")>-1?t.replace(Q0e,"."):t,j6=t=>!t||It(t),Xd=(t,e,n)=>{const r=It(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(j6(t))return{};const a=V6(r[o]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++o}return j6(t)?{}:{obj:t,k:V6(r[o])}},H6=(t,e,n)=>{const{obj:r,k:o}=Xd(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let a=e[e.length-1],i=e.slice(0,e.length-1),s=Xd(t,i,Object);for(;s.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),s=Xd(t,i,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},J0e=(t,e,n,r)=>{const{obj:o,k:a}=Xd(t,e,Object);o[a]=o[a]||[],o[a].push(n)},G0=(t,e)=>{const{obj:n,k:r}=Xd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},ehe=(t,e,n)=>{const r=G0(t,n);return r!==void 0?r:G0(e,n)},bR=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?It(t[r])||t[r]instanceof String||It(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):bR(t[r],e[r],n):t[r]=e[r]);return t},kl=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var the={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const nhe=t=>It(t)?t.replace(/[&<>"'\/]/g,e=>the[e]):t;class rhe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const ohe=[" ",",","?","!",";"],ahe=new rhe(20),ihe=(t,e,n)=>{e=e||"",n=n||"";const r=ohe.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=ahe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(t);if(!a){const i=t.indexOf(n);i>0&&!o.test(t.substring(0,i))&&(a=!0)}return a},tw=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let o=t;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,s="";for(let l=a;l<r.length;++l)if(l!==a&&(s+=n),s+=r[l],i=o[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},ff=t=>t?.replace(/_/g,"-"),she={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class K0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||she,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(It(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new K0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new K0(this.logger,e)}}var Ja=new K0;class qh{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([o,a])=>{for(let i=0;i<a;i++)o.apply(o,[e,...n])})}}class W6 extends qh{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,o={}){const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&a?s.push(...r.split(a)):s.push(r)));const l=G0(this.data,s);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),l||!i||!It(r)?l:tw(this.data?.[e]?.[n],r,a)}addResource(e,n,r,o,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),H6(this.data,s,o),a.silent||this.emit("added",e,n,r,o)}addResources(e,n,r,o={silent:!1}){for(const a in r)(It(r[a])||Array.isArray(r[a]))&&this.addResource(e,n,a,r[a],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,a,i={silent:!1,skipCopy:!1}){let s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=G0(this.data,s)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?bR(l,r,a):l={...l,...r},H6(this.data,s,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var yR={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(a=>{e=this.processors[a]?.process(e,n,r,o)??e}),e}};const _R=Symbol("i18next/PATH_KEY");function lhe(){const t=[],e=Object.create(null);let n;return e.get=(r,o)=>(n?.revoke?.(),o===_R?t:(t.push(o),n=Proxy.revocable(r,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function fu(t,e){const{[_R]:n}=t(lhe()),r=e?.keySeparator??".",o=e?.nsSeparator??":";if(n.length>1&&o){const a=e?.ns,i=Array.isArray(a)?a:null;if(i&&i.length>1&&i.slice(1).includes(n[0]))return`${n[0]}${o}${n.slice(1).join(r)}`}return n.join(r)}const q6={},Y2=t=>!It(t)&&typeof t!="boolean"&&typeof t!="number";class X0 extends qh{constructor(e,n={}){super(),Z0e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const o=this.resolve(e,r);if(o?.res===void 0)return!1;const a=Y2(o.res);return!(r.returnObjects===!1&&a)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ihe(e,r,o);if(i&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:It(a)?[a]:a};const u=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(o)}return{key:e,namespaces:It(a)?[a]:a}}translate(e,n,r){let o=typeof n=="object"?{...n}:n;if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o={...o}),o||(o={}),e==null)return"";typeof e=="function"&&(e=fu(e,{...this.options,...o})),Array.isArray(e)||(e=[String(e)]),e=e.map(D=>typeof D=="function"?fu(D,{...this.options,...o}):String(D));const a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],o),u=l[l.length-1];let d=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=o.lng||this.language,m=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(o)}:s;const v=this.resolve(e,o);let g=v?.res;const w=v?.usedKey||s,y=v?.exactUsedKey||s,_=["[object Number]","[object Function]","[object RegExp]"],S=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,C=o.count!==void 0&&!It(o.count),M=X0.hasDefaultValue(o),P=C?this.pluralResolver.getSuffix(f,o.count,o):"",O=o.ordinal&&C?this.pluralResolver.getSuffix(f,o.count,{ordinal:!1}):"",L=C&&!o.ordinal&&o.count===0,A=L&&o[`defaultValue${this.options.pluralSeparator}zero`]||o[`defaultValue${P}`]||o[`defaultValue${O}`]||o.defaultValue;let N=g;x&&!g&&M&&(N=A);const z=Y2(N),j=Object.prototype.toString.apply(N);if(x&&N&&z&&_.indexOf(j)<0&&!(It(S)&&Array.isArray(N))){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,N,{...o,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(v.res=D,v.usedParams=this.getUsedParamsDetails(o),v):D}if(i){const D=Array.isArray(N),T=D?[]:{},F=D?y:w;for(const B in N)if(Object.prototype.hasOwnProperty.call(N,B)){const I=`${F}${i}${B}`;M&&!g?T[B]=this.translate(I,{...o,defaultValue:Y2(A)?A[B]:void 0,joinArrays:!1,ns:l}):T[B]=this.translate(I,{...o,joinArrays:!1,ns:l}),T[B]===I&&(T[B]=N[B])}g=T}}else if(x&&It(S)&&Array.isArray(g))g=g.join(S),g&&(g=this.extendTranslation(g,e,o,r));else{let D=!1,T=!1;!this.isValidLookup(g)&&M&&(D=!0,g=A),this.isValidLookup(g)||(T=!0,g=s);const B=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:g,I=M&&A!==g&&this.options.updateMissing;if(T||D||I){if(this.logger.log(I?"updateKey":"missingKey",f,u,s,I?A:g),i){const re=this.resolve(s,{...o,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let re=0;re<q.length;re++)$.push(q[re]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(o.lng||this.language):$.push(o.lng||this.language);const Y=(re,Q,ne)=>{const ie=M&&ne!==g?ne:B;this.options.missingKeyHandler?this.options.missingKeyHandler(re,u,Q,ie,I,o):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(re,u,Q,ie,I,o),this.emit("missingKey",re,u,Q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?$.forEach(re=>{const Q=this.pluralResolver.getSuffixes(re,o);L&&o[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(ne=>{Y([re],s+ne,o[`defaultValue${ne}`]||A)})}):Y($,s,A))}g=this.extendTranslation(g,e,o,v,r),T&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(T||D)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,D?g:void 0,o))}return a?(v.res=g,v.usedParams=this.getUsedParamsDetails(o),v):g}extendTranslation(e,n,r,o,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const f=e.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,r.lng||this.language||o.usedLng,r),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;u<m&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...f)=>a?.[0]===f[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,s=It(i)?[i]:i;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=yR.handle(s,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,o,a,i,s;return It(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?fu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;o=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!It(n.count),v=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(y=>{this.isValidLookup(r)||(s=y,!q6[`${w[0]}-${y}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(q6[`${w[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(_=>{if(this.isValidLookup(r))return;i=_;const S=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(S,d,_,y,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const M=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&C.indexOf(P)===0&&S.push(d+C.replace(P,this.options.pluralSeparator)),S.push(d+C),v&&S.push(d+M)),g){const O=`${d}${this.options.contextSeparator||"_"}${n.context}`;S.push(O),m&&(n.ordinal&&C.indexOf(P)===0&&S.push(O+C.replace(P,this.options.pluralSeparator)),S.push(O+C),v&&S.push(O+M))}}let x;for(;x=S.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(_,y,x,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,o={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!It(e.replace);let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class U6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(e){if(e=ff(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=ff(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(It(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getScriptPartFromCode(r);if(this.isSupportedCode(o))return n=o;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),It(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return It(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):It(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const Y6={zero:0,one:1,two:2,few:3,many:4,other:5},G6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class che{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=ff(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),G6;if(!e.match(/-|_/))return G6;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>Y6[o]-Y6[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(e,n,r={}){const o=this.getRule(e,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const K6=(t,e,n,r=".",o=!0)=>{let a=ehe(t,e,n);return!a&&o&&It(n)&&(a=tw(t,n,r),a===void 0&&(a=tw(e,n,r))),a},G2=t=>t.replace(/\$/g,"$$$$");class X6{constructor(e={}){this.logger=Ja.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:v,nestingSuffix:g,nestingSuffixEscaped:w,nestingOptionsSeparator:y,maxReplaces:_,alwaysFormat:S}=e.interpolation;this.escape=n!==void 0?n:nhe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?kl(a):i||"{{",this.suffix=s?kl(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?kl(m):v||kl("$t("),this.nestingSuffix=g?kl(g):w||kl(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=_||1e3,this.alwaysFormat=S!==void 0?S:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,o){let a,i,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const _=K6(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(_,void 0,r,{...o,...n,interpolationkey:v}):_}const g=v.split(this.formatSeparator),w=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(K6(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>G2(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?G2(this.escape(v)):G2(v)}].forEach(v=>{for(s=0;a=v.regex.exec(e);){const g=a[1].trim();if(i=u(g),i===void 0)if(typeof d=="function"){const y=d(e,a,o);i=It(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),i="";else!It(i)&&!this.useRawValueToEscape&&(i=F6(i));const w=v.safeValue(i);if(e=e.replace(a[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n,r={}){let o,a,i;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${kl(d)}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const v=m.match(/'/g),g=m.match(/"/g);((v?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!It(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const u=/{.*}/.test(o[1])?o[1].lastIndexOf("}")+1:o[1].indexOf(this.formatSeparator);if(u!==-1&&(l=o[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),o[1]=o[1].slice(0,u)),a=n(s.call(this,o[1].trim(),i),i),a&&o[0]===e&&!It(a))return a;It(a)||(a=F6(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const uhe=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[s,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Z6=t=>{const e={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let s=e[i];return s||(s=t(ff(r),o),e[i]=s),s(n)}},dhe=t=>(e,n,r)=>t(ff(n),r)(e);class fhe{constructor(e={}){this.logger=Ja.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Z6:dhe;this.formats={number:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a});return s=>i.format(s)}),currency:r((o,a)=>{const i=new Intl.NumberFormat(o,{...a,style:"currency"});return s=>i.format(s)}),datetime:r((o,a)=>{const i=new Intl.DateTimeFormat(o,{...a});return s=>i.format(s)}),relativetime:r((o,a)=>{const i=new Intl.RelativeTimeFormat(o,{...a});return s=>i.format(s,a.range||"day")}),list:r((o,a)=>{const i=new Intl.ListFormat(o,{...a});return s=>i.format(s)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Z6(n)}format(e,n,r,o={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,l)=>{const{formatName:u,formatOptions:d}=uhe(l);if(this.formats[u]){let f=s;try{const m=o?.formatParams?.[o.interpolationkey]||{},v=m.locale||m.lng||o.locale||o.lng||r;f=this.formats[u](s,v,{...d,...o,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${u}`);return s},e)}}const phe=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class hhe extends qh{constructor(e,n,r,o={}){super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(e,n,r,o){const a={},i={},s={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const m=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const o=e.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const s={};this.queue.forEach(l=>{J0e(l.loaded,[a],i),phe(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(f=>{s[u][f]===void 0&&(s[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,o=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,a*2,i)},a);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,n,s)}prepareLoading(e,n,r={},o){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();It(e)&&(e=this.languageUtils.toResolveHierarchy(e)),It(n)&&(n=[n]);const a=this.queueLoad(e,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&s&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,s),this.loaded(e,i,s)})}saveMissing(e,n,r,o,a,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const l={...i,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,r,o,l):d=u(e,n,r,o),d&&typeof d.then=="function"?d.then(f=>s(null,f)).catch(s):s(null,d)}catch(d){s(d)}else u(e,n,r,o,s,l)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}const K2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),It(t[1])&&(e.defaultValue=t[1]),It(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Q6=t=>(It(t.ns)&&(t.ns=[t.ns]),It(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),It(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),N1=()=>{},mhe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})},xR="__i18next_supportNoticeShown",ghe=()=>!!(typeof globalThis<"u"&&globalThis[xR]||typeof process<"u"&&U2&&U2.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&U2),vhe=()=>{typeof globalThis<"u"&&(globalThis[xR]=!0)},whe=t=>!!(t?.modules?.backend?.name?.indexOf("Locize")>0||t?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||t?.options?.backend?.backends&&t.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||t?.options?.backend?.projectId||t?.options?.backend?.backendOptions&&t.options.backend.backendOptions.some(e=>e?.projectId));class Zd extends qh{constructor(e={},n){if(super(),this.options=Q6(e),this.services={},this.logger=Ja,this.modules={external:[]},mhe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(It(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=K2();this.options={...r,...this.options,...Q6(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!whe(this)&&!ghe()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),vhe());const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Ja.init(o(this.modules.logger),this.options):Ja.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=fhe;const d=new U6(this.options);this.store=new W6(this.options.resources,this.options);const f=this.services;f.logger=Ja,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new che(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=o(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new X6(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new hhe(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new X0(this.services,this.options),this.translator.on("*",(v,...g)=>{this.emit(v,...g)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=N1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=$d(),l=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),n(d,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,n=N1){let r=n;const o=It(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};o?i(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=$d();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=N1),this.services.backendConnector.reload(e,n,a=>{o.resolve(),r(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&yR.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=$d();this.emit("languageChanging",e);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},i=s=>{!e&&!s&&this.services.languageDetector&&(s=[]);const l=It(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(It(s)?[s]:s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),r}getFixedT(e,n,r){const o=(a,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(s)):l={...i},l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const u={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=fu(l.keyPrefix,u));const d=this.options.keySeparator||".";let f;return l.keyPrefix&&Array.isArray(a)?f=a.map(m=>(typeof m=="function"&&(m=fu(m,u)),`${l.keyPrefix}${d}${m}`)):(typeof a=="function"&&(a=fu(a,u)),f=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a),this.t(f,l)};return It(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}loadNamespaces(e,n){const r=$d();return this.options.ns?(It(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=$d();It(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const a=o.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new U6(K2());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new Zd(e,n);return r.createInstance=Zd.createInstance,r}cloneInstance(e={},n=N1){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Zd(o);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,f)=>(d[f]={...l[u][f]},d),l[u]),l),{});a.store=new W6(s,o),a.services.resourceStore=a.store}if(e.interpolation){const l={...K2().interpolation,...this.options.interpolation,...e.interpolation},u={...o,interpolation:l};a.services.interpolator=new X6(u)}return a.translator=new X0(a.services,o),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Nr=Zd.createInstance();Nr.createInstance;Nr.dir;Nr.init;Nr.loadResources;Nr.reloadResources;Nr.use;Nr.changeLanguage;Nr.getFixedT;Nr.t;Nr.exists;Nr.setDefaultNamespace;Nr.hasLoadedNamespace;Nr.loadNamespaces;Nr.loadLanguages;const bhe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,yhe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},_he=t=>yhe[t],xhe=t=>t.replace(bhe,_he);let J6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xhe,transDefaultProps:void 0};const She=(t={})=>{J6={...J6,...t}},Che={type:"3rdParty",init(t){She(t.options.react)}},{createContext:Ehe}=await U("react"),Mhe=Ehe(),{createElement:khe,useMemo:Rhe}=await U("react");function The({i18n:t,defaultNS:e,children:n}){const r=Rhe(()=>({i18n:t,defaultNS:e}),[t,e]);return khe(Mhe.Provider,{value:r},n)}const{createContext:Nhe,useContext:Phe}=await U("react");let Ahe=(t=>String(t));const Ihe=t=>{Ahe=t.t.bind(t)},SR=Nhe(null),B_e=()=>{const t=Phe(SR);if(!t)throw new Error("useLocalization must be used within RbLocalizationProvider");return t},{useCallback:Ohe,useEffect:Lhe,useMemo:$he,useState:X2}=await U("react"),z_e=({children:t,appName:e,resources:n,defaultLng:r="en",fallbackLng:o="en",separateInstance:a=!0})=>{const[i,s]=X2(null),[l,u]=X2(!1),[d,f]=X2(localStorage.getItem(`${e}_Language`)||r);Lhe(()=>{(async()=>{try{const g=a?Nr.createInstance():Nr;await g.use(Che).init({lng:d,fallbackLng:o,resources:n,interpolation:{escapeValue:!1}}),Ihe(g),s(g),u(!0)}catch(g){console.error("Localization init Failed:",g)}})()},[n,d,o,a]);const m=Ohe(g=>{i?.changeLanguage(g),f(g),localStorage.setItem(`${e}_Language`,g)},[i,e]),v=$he(()=>i?{i18n:i,t:i.t.bind(i),changeLanguage:m,currentLanguage:d}:null,[i,m,d]);return!l||!v?h("div",{className:"bg-default flex h-screen w-full items-center justify-center",children:h(iR,{size:"3rem",className:"text-fg-default"})}):h(SR.Provider,{value:v,children:h(The,{i18n:i,children:t})})};export{Xhe as $,xH as A,Xee as B,SH as C,hw as D,rn as E,mw as F,me as G,te as H,aY as I,fg as J,pg as K,AZ as L,oY as M,nY as N,Cf as O,To as P,lme as Q,D7 as R,qi as S,IZ as T,Yo as U,Kv as V,d6 as W,kz as X,eme as Y,xfe as Z,Sbe as _,sd as a,Wr as a$,Mbe as a0,Pbe as a1,Ibe as a2,Nbe as a3,Obe as a4,kbe as a5,Rbe as a6,Abe as a7,Tbe as a8,iw as a9,afe as aA,rfe as aB,nfe as aC,efe as aD,Jde as aE,ofe as aF,mbe as aG,Lbe as aH,Wbe as aI,jbe as aJ,Dbe as aK,Hbe as aL,Ube as aM,j1e as aN,zbe as aO,qbe as aP,Ybe as aQ,Gbe as aR,Bbe as aS,Vbe as aT,Fbe as aU,$be as aV,S6 as aW,x8 as aX,Qhe as aY,Jhe as aZ,Cbe as a_,hz as aa,uz as ab,oR as ac,mpe as ad,aR as ae,wpe as af,Cfe as ag,dbe as ah,Vk as ai,Wk as aj,qk as ak,Dde as al,hbe as am,zde as an,f0 as ao,Vde as ap,Fde as aq,Qk as ar,Bde as as,d0 as at,pbe as au,Lz as av,Qde as aw,vbe as ax,gbe as ay,tfe as az,wg as b,hye as b$,Kbe as b0,oye as b1,nye as b2,Zbe as b3,rye as b4,iye as b5,Xbe as b6,Qbe as b7,Jbe as b8,aye as b9,vfe as bA,mfe as bB,hfe as bC,bfe as bD,wbe as bE,Ffe as bF,$_e as bG,dye as bH,iR as bI,ide as bJ,fye as bK,upe as bL,rR as bM,xbe as bN,Bpe as bO,mye as bP,wye as bQ,gye as bR,vye as bS,sR as bT,zpe as bU,kF as bV,Rfe as bW,Mfe as bX,fw as bY,kfe as bZ,pye as b_,sye as ba,uye as bb,eye as bc,cye as bd,lye as be,tye as bf,Wh as bg,a1e as bh,B3 as bi,ybe as bj,Nfe as bk,D_e as bl,Jk as bm,Qfe as bn,fbe as bo,bye as bp,_ye as bq,yye as br,Xv as bs,Hk as bt,Xk as bu,pfe as bv,bbe as bw,gfe as bx,yfe as by,wfe as bz,uh as c,XB as c$,Ebe as c0,Gl as c1,vz as c2,Fpe as c3,Khe as c4,M1e as c5,F$ as c6,dz as c7,oz as c8,_be as c9,Q8 as cA,qE as cB,Eve as cC,Hr as cD,qD as cE,Whe as cF,Yve as cG,N3 as cH,qhe as cI,fB as cJ,Uhe as cK,UD as cL,Vhe as cM,zl as cN,Xve as cO,xo as cP,kB as cQ,jf as cR,lD as cS,uD as cT,If as cU,JD as cV,QD as cW,JB as cX,KB as cY,QB as cZ,ZB as c_,Tz as ca,qpe as cb,bde as cc,f$ as cd,mz as ce,_8 as cf,Vfe as cg,Pue as ch,Ofe as ci,Jfe as cj,xF as ck,Yz as cl,Qn as cm,hf as cn,B_e as co,ime as cp,Ph as cq,twe as cr,D3 as cs,ewe as ct,cve as cu,Li as cv,Wo as cw,jte as cx,ya as cy,kn as cz,ld as d,Oye as d$,GB as d0,tU as d1,rc as d2,Yhe as d3,kr as d4,cw as d5,Q0 as d6,gge as d7,jD as d8,HD as d9,Wye as dA,b_e as dB,Uye as dC,M_e as dD,m_e as dE,Lye as dF,E_e as dG,qye as dH,Pye as dI,Jye as dJ,t_e as dK,e_e as dL,n_e as dM,r_e as dN,l_e as dO,s_e as dP,i_e as dQ,Hye as dR,Qye as dS,Aye as dT,p_e as dU,g_e as dV,__e as dW,R_e as dX,Rye as dY,Iye as dZ,Bye as d_,Zhe as da,zB as db,ame as dc,Ege as dd,Mge as de,kge as df,Jq as dg,oD as dh,iD as di,Cye as dj,Wx as dk,xye as dl,Sye as dm,Eye as dn,k_e as dp,y_e as dq,Mye as dr,x_e as ds,u_e as dt,c_e as du,w_e as dv,Dye as dw,Zye as dx,f_e as dy,Tye as dz,kG as e,BB as e$,kye as e0,S_e as e1,jye as e2,T_e as e3,h_e as e4,zye as e5,a_e as e6,d_e as e7,C_e as e8,Fye as e9,Uoe as eA,PD as eB,fD as eC,IB as eD,kD as eE,I8 as eF,A8 as eG,V8 as eH,ome as eI,ube as eJ,DD as eK,k8 as eL,B8 as eM,WB as eN,TB as eO,mB as eP,sS as eQ,CB as eR,tB as eS,M8 as eT,tz as eU,Gme as eV,O2e as eW,rw as eX,qve as eY,aB as eZ,nB as e_,Vye as ea,Yye as eb,Xye as ec,Kye as ed,Gye as ee,$ye as ef,o_e as eg,v_e as eh,Nye as ei,Ahe as ej,Gn as ek,L8 as el,cF as em,rme as en,WD as eo,q8 as ep,pD as eq,eh as er,sD as es,rD as et,pf as eu,Mve as ev,pB as ew,gB as ex,w3 as ey,mM as ez,Ws as f,lw as f$,DB as f0,Z0 as f1,vue as f2,z8 as f3,zD as f4,$B as f5,iB as f6,_7 as f7,x7 as f8,C7 as f9,Xl as fA,yge as fB,Hhe as fC,Sve as fD,Kse as fE,pk as fF,hse as fG,OB as fH,S8 as fI,hme as fJ,GD as fK,eD as fL,tD as fM,SD as fN,MB as fO,TD as fP,VD as fQ,BD as fR,LD as fS,Hs as fT,J0 as fU,dB as fV,RD as fW,ED as fX,Cve as fY,Vve as fZ,pC as f_,S7 as fa,b7 as fb,Ih as fc,J$ as fd,PB as fe,NB as ff,dD as fg,sB as fh,_B as fi,ZD as fj,RB as fk,KD as fl,XD as fm,hB as fn,vB as fo,LB as fp,AB as fq,nD as fr,F8 as fs,yD as ft,P8 as fu,gte as fv,jhe as fw,Sue as fx,$8 as fy,Zve as fz,qo as g,VB as g0,bge as g1,nme as g2,WO as g3,Ghe as g4,bV as g5,wV as g6,vge as g7,age as g8,l3e as g9,FD as gA,gD as gB,Gve as gC,tte as gD,ete as gE,yle as gF,HB as gG,ND as gH,Eu as gI,xD as gJ,Ff as gK,Nge as ga,wge as gb,_ge as gc,Nl as gd,Qee as ge,z_e as gf,Jve as gg,L_e as gh,tme as gi,lB as gj,$D as gk,SB as gl,MD as gm,wB as gn,ID as go,wD as gp,oc as gq,wM as gr,mge as gs,qte as gt,hge as gu,Vte as gv,Mr as gw,Rte as gx,x3 as gy,WE as gz,Ew as h,ln as i,h as j,Wt as k,it as l,R7 as m,W7 as n,Mw as o,Go as p,s7 as q,CH as r,e7 as s,xf as t,Ko as u,Sf as v,Ef as w,oe as x,PZ as y,OZ as z};
|